Recursive Least Squares Method Computer Science Essay

Published: Last Edited:

This essay has been submitted by a student. This is not an example of the work written by our professional essay writers.

Non linear restricted element analyses of structure that are subject to seismic proceedings have necessary of high quality accelerogram data. Raw accelerogram data needs to be familiar to remove the pressure of the transfer process of the gadget itself. This techinique is known as upgrading. Unfortunately, data about the recording gadget is often unknown or undependable. This is above all often the case for older analogue recordings. This paper utilizes a recursive least squares (RLS) algorithm to recognize the utensil characteristics even when completely unknown. The fallout presented in the paper applies a modern approach to de noising the accelerogram by employing the wavelet transform. This system removes only those workings of the signal whose amplitudes are below a confident doorsill and is not therefore occurrence selective. It takes over from to some extent predictable band pass filter which requires a careful mixture of cut-off frequencies, now needless.

Seismology is the technical study of earthquakes and the broadcast of elastic waves from side to side the Earth. The study of this meadow also contain study of earthquake belongings, like tsunamis as well as diverse seismic sources like volcanic, tectonic, oceanic, atmospheric, and artificial processes (like explosions). Pale seismology is a related field that utilizes geology to infer data regarding past earthquakes. Seismogram is identified a recording of earth movement as a principle of this time.

Seismic waves

Various types of seismic waves are produced by Earthquakes and other sources, which travel from side to side, astound, and facilitate a helpful way to represent both sources and structures deep within the Earth. In solids there are three usual types of seismic waves: P-waves, S-waves (both are called body waves) and interface waves. There are other two usual kinds of surface waves (Rayleigh and Love) which move all along a solid-air interface, can be explained primarily in terms of interacting P- and/or S-waves.


The earliest brand of body wave is the P-wave, which is also called primary wave. This is the earliest to 'arrive' at a seismic situation, and, as a output, the best brand of seismic wave. The P wave can move from side to side solid astound and fluids, which contains water or the liquid layers of the earth. It shoves and drags the astound it moves from side to side immediately like sound waves push and pull the air. Consist you ever heard a big clap of thunder and heard the windows rattle at the same time? The windows rattle due to the sound waves were pushing and pulling on the window glass much like P waves push and pull on astound. At times animals can perceive sound the P waves of an earthquake. Generally people can only feel the bump and clatter of these waves.

P waves generally known as compressional waves, because utilization of their pushing and pulling behavior.

Figure 1 - A P wave travels from side to side a medium by means of firmness and dilation. Subdivision is standing for by cube in this model.


An S wave is slower compared to a P wave and can only move from side to side solid astound, not from side to side any liquid medium. Based on this property of S waves seismologists conclude that the Earth's outer core is a liquid. S waves move astound particles in the up and down direction, or side-to-side, perpendicular to the direction that the wave is traveling in (the direction of wave propagation).

Figure 2 - An S wave travels from side to side a medium. Particles are represented by cubes in this model.

Surface Waves

Surface waves will have low frequency than body waves, which travels only from side to side the crust, and are easily distinguished on a seismogram as an output. Surface waves are nearly absolutely accountable for the damage and demolition related with earthquakes; however they turn up after body waves. In the deeper earthquakes this damage and the strength of the surface waves are condensed.

Love Waves

The earliest brand of surface wave is called a Love wave, named after a British Mathematician A.E.H. Love, who worked out the mathematical model for this brand of wave in 1911. Restrained to the float up of the crust, Love waves manufacture absolutely horizontal motion.

Figure 3 - A Love wave travels from side to side a medium. Particles are represented by cubes in this model.

Rayleigh Waves

The other brand of surface wave is the Rayleigh wave, named for John William Strutt, Lord Rayleigh, who mathematically predicted the existence of this brand of wave in 1885. Primarily of the trembling felt from an earthquake is due to the Rayleigh wave, which can be much larger than the other waves.

Figure 4 - A Rayleigh wave travels from side to side a medium. Particles are represented by cubes in this model.

For large earthquakes, the normal modes of the Earth can be observed. The most primitive observations were made in the 1960s as the introduction of higher fidelity instruments coincided with two of the largest earthquakes of the 20th century - the 1960 Great Chilean earthquake and the 1964 Great Alaskan earthquake.

One of the earliest important discoveries (recommended by Richard Dixon Oldham in 1906 and best shown by Harold Jeffreys in 1926) is that the core of Earth at the outer is liquid. Pressure waves (P-waves) pass from side to side the core. Transverse or shear waves (S-waves) that vibrate side-to-side requires rigid material so that they do not pass from side to side of the outer core. Hence, the liquid core causes on the side of the planet a "shadow" opposite to the earthquake where no direct S-waves can be observed. When the velocity of the P wave at the outer core is also reduced, it causes a considerable delay for P waves whereby penetrating the core from the (seismically faster velocity) mantle.

Some of the primary methods of underground exploration in geophysics are seismic waves which are formed by explosions or vibrating controlled sources (in addition to lot of various electromagnetic methods like induced polarization and magnetotellurics). Controlled source seismology has been utilized to map salt domes, faults, anticlines and other geologic traps in petroleum-bearing rocks, geological faults, astound types, and long-buried giant meteor craters. For instance, the Chicxulub impactor, which is believed to consist killed the dinosaurs, was localized to Central America by analyzing ejecta in the cretaceous boundary, and then actually proven to exist utilizing seismic maps from oil exploration.

Utilizing seismic tomography with earthquake waves, the interior of the Earth has been absolutely mapped to a resolution of several hundred kilometers. This technique has enabled scientists to identify convection cells, mantle plumes and other large-scale features of the inner Earth.

Seismograph is an instrument which can sense and record the motion of the Earth. Nowadays, networks of seismographs continuously monitor the seismic environment of the planet, which allows the monitoring and analysis of global earthquakes and tsunami warnings and records a variety of seismic signals arising from non-earthquake sources ranging from explosions (nuclear and chemical), to pressure variations on the ocean floor which are induced by ocean waves (the global microseism), to cryospheric events which relates with the large icebergs and glaciers. Above-ocean meteor strike as large as ten kilotons of TNT, (equivalent to about 4.2 Ã- 1013 J of effective explosive force) consist been recorded by seismographs. The most important motivation for the global instrumentation of the Earth is the monitoring of nuclear testing.

One of the earliest attempts at the scientific study of earthquakes followed the 1755 Lisbon earthquake. The major developments in science and technology that spurred for the notable earthquakes especially contain the 1857 Basilicata earthquake, 1906 San Francisco earthquake, the 1964 Alaska earthquake and the 2004 Sumatra-Andaman earthquake. An general list of prominent earthquakes can be identified on the List of earthquakes page.

Forecasting a possible timing, location, magnitude and other significant features of a forthcoming seismic event is called earthquake prediction. Primarily seismologists do not consider that a system to make possible timely warnings for individual earthquakes have yet to be developed and lot of believe that such a system would be unlikely to afford considerable warning of impending seismic events. More general forecasts, however, are routinely utilized to establish seismic hazard. Such general forecasts calculate approximately the probability of an earthquake of a particular size affect a particular location within a particular time span and they are usually utilized in earthquake engineering. To create valuable systems for precise earthquake predictions, different attempts have been made by seismologists together with the VAN technique.


Seismic Data Improvement

The main point of seismic processing is to use the acquired data into an image that can be utilized to infer the sub-surface structure. Processing contain the application of a series of computer routine to the obtain information directed by the hand of the processing geophysicist. The interpreter must be involved at all stages to check that processing decisions do not radically alter the interpretability of the results in a detrimental manner.

In general, processing routines fall into one of the following categories:

* enhancing signal at the expense of noise

* facilitating velocity data

* breaking up diffractions and placing dipping events in their true subsurface locations

* increasing resolution.

Correction of Seismic information records

Correction of Seismic information records involves standard techniques of de convolving instrument and structural responses from seismic accelerograms. Instrument and structural responses are a result of convolution of ground motion with the transfer process of the recording instrument and structure on which the instrument is mounted. To recover an approximation of the ground motion of the seismic event the instrument response can be de-convolved in the time or frequency domain, which is usually followed by a band-pass filtering of the information records. A band-pass filter removes any ground motion outside the band and hence the accelerograms may not effectively represent an approximation of true ground motion. In order to overcome this it is proposed therefore to utilize wavelet de noising as an substitute to band-pass filtering. The key concepts of de-noising are it removes minimum and high frequency corrupting signals but holds relevant information records providing a better approximation of true ground motion. Utilizing the stationary wavelet transform (SWT) some data collected as sample seismic signals are threshold de noised and match up to with the more standard band-pass filtering techniques.

De noising utilizing a band-pass filtering technique

Digital band-pass filter are designed to separate the minimum and high frequency noise. Ormsby filter is the widely utilized digital band-pass filter. In order to reach the essential band-pass design specifications the Ormsby filter essential large values of N and at the time utilizes a considerable computational effort. In order to reach the essential stringent band-pass specification and reduce computation time Infinite impulse response (IIR) digital filters are now normally employed. The phase response of these filters is non linear whereas a zero phase response is essential. While it is still superior to the computational effort essential for the FIR filter there is a loss of computational optimality. While, by executing the information records in both the forward and reverse direction a zero phase response is also secured. In this techinique the information records is first filtered in the forward direction, then the filtered information records is reversed and run back through the filter. This techinique is computationally more efficient than former ones.

De noising utilizing wavelets

In this technique the discrete wavelet transform (DWT) of a signal will be taken and passed the transform through a threshold which removes the coefficients below a certain value and then taking the inverse DWT in order to rebuild a de noised time signal. After minimum pass filtering with the appropriate filter weights depending on the choice of a wavelet basis the DWT is able to concentrate most of the energy of the signal into a small number of wavelet coefficients. Match up to to those of the noise coefficients obtained after high pass filtering the dimensions of the wavelet coefficients will be large. Hence thresholding or shrinking the wavelet transform will eliminate the minimum amplitude noise in the wavelet domain and the inverse DWT will recover the preferred signal with minute loss of detail.

The stationary wavelet transform (SWT) (translation invariant DWT)

The key problem with the DWT approach is that it is not translation invariant. The signal is no longer orthogonal to most of the basis functions due to the coefficients of the DWT do not shift with a signal. To describe the signal more coefficients would be necessary and the co-efficient dimensions would also be much smaller, which reduces the effectiveness of any de noising scheme.

While from the outcome obtained it can be clearly stated that the differences among utilizing a DWT and SWT for de noising are insignificant; output plots like power spectral densities and the acceleration response spectra are virtually the same. While discontinuities in seismic records do occur therefore the SWT seems a more effective choice than DWT and digital band-pass filters for de noise purposes. The SWT only removes "noise" that has minimum energy content, which is independent of frequency. SWT de noising is computationally efficient and obviates the requirement to adjust filter cut off's to fit particular seismic events. For different groups of researchers around the world it is evident that choice of filter cut off frequencies varies. Rather unsurprisingly, at the minimum and high frequency range of the spectrum, the differences among band-pass filtering and SWT techniques exists. In the design of large dams or tall building structures the minimum frequency or long period end is of importance.

Different techniques of seismic information records correction:

Recursive least squares (RLS) Algorithm

This is an Adaptive filter algorithm which is utilized to get the filter coefficients by producing the least squares of the error signal which is related to it recursively. RLS algorithm is contrast to other algorithms, which aims to reduce the mean square error. The key difference among RLS filters and MSE filters is that former are dependent on the signals themselves, whereas later are dependent on their statistics.

Recursive Least Squares and Wavelet De Noising based Seismic correction demonstrates inverse filtering utilizing the RLS algorithm, which yields acceptable outcome when match up to the standard 2nd order type de convolution. In order to de-convolve the instrument response the follow-on inverse filter is then implemented to the information records. Power spectral plots and the total acceleration response spectra are equivalent of two sets of seismic events in this procedure. The key advantage of RLS over LMS is that RLS algorithm is dependent on the incoming information records samples rather than the statistics of the ensemble average as in the case of the LMS algorithm, this is the reason why the RLS algorithm was chosen in predilection to the least mean squares (LMS) adaptive algorithm.

Total Least Squares

When instrument parameters are not represented the TLS algorithm is a useful tool for correcting seismic information records. The basic advantage of a least squares based technique of de convolution of an instrument response from seismic information records is that it does not necessitate any data regarding the instrument; it only necessitates the recorded seismic information records. The only requirement is the original recording from the seismograph and the algorithm can then produce the inverse filter with which to de convolve the instrument response. Utilizing information records from 4 instrument types the algorithm was gone through testing and was found to be in good agreement in all cases except with the QR RLS and the 2nd order SDOF responses. From this we can conclude that the TLS may not be as robust as the QR RLS in securing the instrument response, while the TLS performance in some cases is better than that of the QR RLS and the 2nd order SDOF with a standard filter, due to it reflects the anti alias filter whose details were in this case available in the record.. A particular problem in seismic correction techniques is that some times the transfer process of the recording instruments is not represented. In order to de couple the instrument response where instrument parameters are afforded, a 2nd order SDOF transfer process is implemented in either the time or frequency domain.

On the contrary when instrument parameters are not available, then if we don't make some assumptions regarding instrument parameter, it is not possible to de convolve (de couple) the instrument response from the seismic information records utilizing a 2nd order SDOF expression. An estimation of the instruments inverse frequency response was afforded with which to de convolve the information records to get an approximation of the ground motion.

Partial Total Least Squares approach

The problem in the Total Least Squares (TLS) AX ≈ B is solved by The Partial Total Least Squares (PTLS) subroutine by utilizing a Partial Singular Value Decomposition (PSVD), hereby improving the computational efficiency of the classical TLS algorithm (a factor 2 approximately). The TLS solution will be computed from any orthogonal basis of the right singular subspace corresponding to the smallest singular values of the augmented matrix [A;B] can be found based on a clear study, the computational complexity can be improved. For the smallest singular values the dimension of this subspace may be specified by the rank of the TLS approximation of [A;B] or depend on a specified upper bound (e.g. a perturbation level) .More than one vector in B is supported in the routine PTLS. By computing the least amount norm solution it also solves specified and undetermined sets of equations.

It has been demonstrated that the PTLS algorithm produces good outcome when match up to to the standard TLS. While the inverse responses are not representative of the instrument response when more rows and/or columns unmodified. Therefore applying the PTLS as opposed to the TLS isn't a net gain.

SDOF techniques

Seismic correction techniques generally apply a 2nd order, single degree of freedom (SDOF) instrument process with which to inverse filter or de convolute the accelerometer response. Unfortunately the significant instrument parameters are either not specified or are not representing in many of seismic time histories. Therefore in order to de convolute instrument response researchers utilize an approximation for the instrument parameters, or they do not instrument de convolute at all. Recently more modern inverse system identification techniques contain been implemented to de-convolute the instrument response. The main important techniques include the QR. Recursive Least Squares (QR RLS), the Total least Squares with wavelet de-noising and wavelet decomposition.

QR Recursive Least Squares (QR RLS) method:

QR decomposition based RLS algorithm is developed based on the square root Kalman filter counterpart. The algorithm is derived depending on the utilization of an orthogonal triangulation procedure represent as QR decomposition. Based on a Givens rotation or a Householder reflection the unitary matrix utilized in the algorithm is derived, which zero's out the elements of the input information records vector and changed the square root of the inverse correlation matrix. In order to get an approximation of the true ground motion these inverse filter weights are an approximation of the inverse transfer process of the instrument and these are then convoluted with the original seismic information records.

Iterative Re Weighted Least Squares method:

In order to specify its sensitivity to bursts of noise this technique of de convolution was utilized on synthetic and real seismic information records. These were of short duration but large amplitude, which would usually be connected with unsteady instrument operation, but could also occur as a naturally occurring transient.

The IRLS is an algorithm for determining Lp optimizations where p≠2 where as Least Squares uses L2 optimization. As far as possible the seismic information records utilized for the analysis is chosen such that instrument parameters were available in the seismic record. This include in particular information records from the SMART 1 array in Taiwan which facilitate some details of the anti alias filter utilized. For other digital records without the details of any anti alias filter, these can be derived from the sampling rate, on the assumption that an anti alias with a cut off at half the sampling rate would contain been utilized. Without any frequency selective filtering the IRLS was implemented to the seismic information records after de noising and correcting for baseline.


RLS (Recursive Least Square)

Recursive least squares (RLS) algorithm is utilized in adaptive filters to find the filter coefficients that relate to recursively producing the least squares (minimum of the sum of the absolute squared) of the error signal (difference between the desired and the actual signal. This aims to reduce the mean square error when compared to other algorithms. The difference between RLS fitters and MSE filters is that former are dependent on the signals themselves, whereas later are dependent on their statistics (specifically, the autocorrelation of the input and the cross-correlation of the input and desired signals). If these statistics are known, an MSE filter with fixed co-efficient can be build.

Suppose that a signal d is transmitted over an echoed, noisy channel that can cause it to be expected as

where v(n) represent the noise. We try to pick up the preferred signal d by utilization of an FIR filter, :

The main is to calculate approximately the parameters of the filter , and at each time n which is submitted to the new least squares estimate by. As time evolves, avoid absolutely and rebuild the least squares algorithm to find the new estimate for, in terms of.

The advantage of the RLS algorithm is of saving computational power so that so that there will be no necessary adjustment to invert matrices. An added benefit is that it provides insight behind such results as the Kalman filter.

The idea behind RLS filters is to reduce a cost process C by appropriately selecting the filter co-efficient, thereby updates the filter as new data arrives. The error signal e(n) and the referred signal d(n) are defined in the negative feedback diagram below:

The error implicitly depends on the filter co-efficients from side to side the estimate :

The weighted least squares error process C-the cost process we desire to reduce-being a process of e(n) is also reliant on the filter co-efficients:

Where is an exponential weighting factor which in effect limits the number of input samples based on which the cost process is minimized.

The cost process is minimized by taking the partial derivatives for all entries k of the coefficient vector and setting the results to zero

The definition of the error signal can be replaced by e(n)

Rearranging the equation yields

The above equation can be written in terms of matrices

where R x(n)is the weighted autocorrelation matrix for x(n) and r dx(n) is the cross-correlation among the matrices d(n) and x(n). The co-efficients which reduce the cost process can be found by this as

This is the main output of the conversation.

The small the λ is, participation of previous samples is less. This makes the filter more reactive to recent samples, thereby making more fluctuations in the filter co-efficient. The growing window algorithm can be shown by λ = 1.

The conversation resulted in a single equation to establish a coefficient vector which reduces the cost process. In this section we obtain a recursive solution which of the form

where is a improvement factor at time n-1. The derivation of the recursive algorithm is expressed by the cross correlation in terms of by

where is the p+1 dimensional data vector

Similarly we express in terms of by

In the generation the coefficient vector, the inverse of the deterministic autocorrelation matrix is to be evaluated. The Woodbury matrix identity comes helpful for that job.



is (p+1)-by-(p+1)


is (p+1)-by-1


is 1-by-(p+1)


= I1 is the 1-by-1 identity matrix

The Woodbury matrix identity follows



To write in the regular literature, we describe

where the gain vector g(n) is

when g(n) is converted to other form

By subtracting

With the recursive definition of the preferred form follows

Then we get

This follows the recursive definition ofand then add in the recursive definition of together with the alternate form of and get

With we arrive at the update equation

where is the a priori error. When it is compared with a posteriori error; the error which is calculated after the filter is updated is

That means we identified the improvement factor

This instinctively satisfying output indicates that the improvement factor is directly proportional to the error and the gain vector, which controls how much sensitivity is preferred, from side to side the weighting factor, λ.

RLS algorithm summary

The RLS algorithm for a p-th order RLS filter can be explained as shown


p = filter order

λ = forgetting factor

δ = value to initialize


Where I is the (p + 1)-by-(p + 1) identity matrix




The recursion for P-th order RLS follows a Riccati equation and thus draw parallel to the Kalman filter.




Inverse filter


PSD Estimate

x=3 y=3.809e-008

x=4.861 y=4.835e-007

x=6.222 y=8.296e-008

x=8.972 y=4.46e-008

x=18.28 y=3.668e-008

Structural Frequency

x=0.92 y=0.429

x=2.84 y=0.5316

x=4.88 y=0.8343

x=9.54 y=0.4937

x=18.2 y=0.5591

Cut-off frequency x=18.6 y=0.2534





Welch's PSD Estimate

x=2.722 y=4.538e-007

x=4.194 y=6.471e-006

x=5.833 y=1.5e-006

x=7.111 y= 3.273e-007

Structural Frequency

x=2.48 y=1.718

x=4.16 y=2.943

x=5.78 y=1.569

x=14.6 y=0.8762

Cut-off frequency x=18 y=0.1698





Welch's PSD Estimate

x =2 y=3.885e-008

x= 4.361 y = 1.805e-007

x =5.889 y= 7.708e-008

x=7.611 y= 1.006e-007

Structural Frequency

x= 2.4 y= 0.4356

x= 4.36 y=0.5832

x=7.32 y=0.6583

x=18.08 y=0.3944

Cut-off frequency x=18 y=0.2482





Welch's PSD Estimate

x=2.252 y=8.145e-008

x=4.182 y=6.153e-008


x=7.813 y=6.235e-009

Structural Frequency

x=2.24 y=0.2955

x=3.7 y=0.329

x=4.92 y=0.2852

x=16.08 y=0.1993

Cut-off frequency x=61.2 y=0.0645




Welch's PSD estimate

x=2.206 y=5.979e-008

x=3.814 y=8.333e-008

x=5.905 y=4.256e-008

x=10.59 y=1.152e-008

Structural Frequency

x=1.54 y=0.306

x =3.36 y=0.3757

x=4.14 y = 0.3692

x=10.66 y=0.1792

Cut-off frequency x=61.2 y=0.0613




Welch's PSD estimate

X=0.9191 y=1.086e-008

X=2.16 y=1.247e-008

X = 6.043 y= 4.97e-008

X=10.87 y=5.9333e-008

Structural Frequency

X = 2.6 y = 0.1788

X= 5.66 y= 0.3386

X= 10.64 y= 0.1229

X=16.86 y= 0.08458

Cut-off frequency x =60.6 y =0.1078





Welch's PSD estimate

X=8.6 y = 1.792e-006

X=10 y= 1.701e-005

X=10.6 y= 8.679e-006

X = 12.1 y = 4.27e-006

Structural Frequency

X=0.98 y= 1.354

X= 5.18 y = 1.52

X= 10.12 y= 3.916

X=11.88 y= 2.594

Cut-off frequency x=6 y= -10.61





PSD Estimate

X =1.3 y = 1.363e-006

X = 6.9 y = 2.55e-006

X= 8.5 y = 1.784e-005

X= 10.3 y = 5.189e-006

Acceleration response

X= 0.08 y = 1.728

X= 8.34 y= 3.218

X = 9.38 y = 3.228

X= 16.82 y = 1.113

Cut-off frequency x=6 y = -3.524





Welch's PSD estimate

x = 8.6 y = 1.385e-006

x = 10.5 y = 7.462e-007

x = 12.2 y = 5.129e-007

x = 16.6 y = 1.735e-006

Structural Frequency

X = 3.96 y = 1.126

X = 9.66 y = 1.922

X = 13.64 y = 2.431

X = 17.54 y= 1.816

Cut-off frequency x=6 y = -22.32




Welch's Psd estimate

X = 1.773 y = 4.047e-007

X = 4.659 y = 5.889e-006

X = 8.114 y =2.296e-007

Structural Frequency

X = 1.6 y = 1.356

X= 2.8 y = 1.765

X = 4.22 y = 2.896

X = 8.04 y = 0.7926

Cut-off frequency x=60 y = 0.2862





Welch's Psd estimate

X = 0.6591 y = 2.57e-007

X =4.295 y = 7.856e-006

X= 8.386 y = 3.024e-007

Structural Frequency

X = 1.12 y = 1.222

X= 4.02 y = 2.133

X= 7.96 y = 1.054

Cut-off frequency x= 60.6 y = 0.2832





Welch's Psd estimate

X = 1.386 y = 1.336e-007

X = 4.455 y = 5.943e-007

X = 8.2.5 y = 2.741e-007

Structural Frequency

X = 3.12 y = 0.6345

X = 4.52 y = 0.8041

X = 8.02 y = 0.7752

X = 15.42 y = 0.5638

Cut-off frequency X = 60.6 y = 0.3414


In this paper we developed a seismic data analysis technique based on the RLS algorithm, which can effectively correct the data of differing spectra; provided they fit the model assumed by the RLS method. We examined the RLS prediction error as an event analyzed signal and in addition developed the coefficient change signal for seismic data. Our experiments indicate that this technique is very effective about the variations in the event ordering, event positions or starting position of the algorithm consist only minor effects on the filter coefficients. Therefore, this technique must be useful in those situations where the events are close to all-values and the noise level is not high.