 Least mean squares filter

Least mean squares (LMS) algorithms are a class of adaptive filter used to mimic a desired filter by finding the filter coefficients that relate to producing the least mean squares of the error signal (difference between the desired and the actual signal). It is a stochastic gradient descent method in that the filter is only adapted based on the error at the current time. It was invented in 1960 by Stanford University professor Bernard Widrow and his first Ph.D. student, Ted Hoff.
Contents
Problem formulation
Relationship to the least mean squares filter
The realization of the causal Wiener filter looks a lot like the solution to the least squares estimate, except in the signal processing domain. The least squares solution, for input matrix \scriptstyle\mathbf{X} and output vector \scriptstyle\mathbf{y} is
\boldsymbol{\hat\beta} = (\mathbf{X} ^\mathbf{T}\mathbf{X})^{1}\mathbf{X}^{\mathbf{T}}\boldsymbol y .
The FIR Wiener filter is related to the least mean squares filter, but minimizing its error criterion does not rely on crosscorrelations or autocorrelations. Its solution converges to the Wiener filter solution. Most linear adaptive filtering problems can be formulated using the block diagram above. That is, an unknown system is to be identified and the adaptive filter attempts to adapt the filter to make it as close as possible to , while using only observable signals x(n), d(n) and e(n); but y(n), v(n) and h(n) are not directly observable. Its solution is closely related to the Wiener filter.
definition of symbols
 d(n) = y(n) + ν(n)
Idea
The idea behind LMS filters is to use steepest descent to find filter weights which minimize a cost function. We start by defining the cost function as
where e(n) is the error at the current sample 'n' and E{.} denotes the expected value.
This cost function (C(n)) is the mean square error, and it is minimized by the LMS. This is where the LMS gets its name. Applying steepest descent means to take the partial derivatives with respect to the individual entries of the filter coefficient (weight) vector
where is the gradient operator.
Now, is a vector which points towards the steepest ascent of the cost function. To find the minimum of the cost function we need to take a step in the opposite direction of . To express that in mathematical terms
where is the step size(adaptation constant). That means we have found a sequential update algorithm which minimizes the cost function. Unfortunately, this algorithm is not realizable until we know .
Generally, the expectation above is not computed. Instead, to run the LMS in an online (updating after each new sample is received) environment, we use an instantaneous estimate of that expectation. See below.
Simplifications
For most systems the expectation function must be approximated. This can be done with the following unbiased estimator
where N indicates the number of samples we use for that estimate. The simplest case is N = 1
For that simple case the update algorithm follows as
Indeed this constitutes the update algorithm for the LMS filter.
LMS algorithm summary
The LMS algorithm for a pth order algorithm can be summarized as
Parameters: p = filter order μ = step size Initialisation: Computation: For n = 0,1,2,... where denotes the Hermitian transpose of .
Convergence and stability in the mean
Assume that the true filter is constant, and that the input signal x(n) is widesense stationary. Then converges to as if and only if
where λ_{max} is the greatest eigenvalue of the autocorrelation matrix . If this condition is not fulfilled, the algorithm becomes unstable and diverges.
Maximum convergence speed is achieved when
where λ_{min} is the smallest eigenvalue of R. Given that μ is less than or equal to this optimum, the convergence speed is determined by μλ_{min}, with a larger value yielding faster convergence. This means that faster convergence can be achieved when λ_{max} is close to λ_{min}, that is, the maximum achievable convergence speed depends on the eigenvalue spread of R.
A white noise signal has autocorrelation matrix R = σ^{2}I, where σ^{2} is the variance of the signal. In this case all eigenvalues are equal, and the eigenvalue spread is the minimum over all possible matrices. The common interpretation of this result is therefore that the LMS converges quickly for white input signals, and slowly for colored input signals, such as processes with lowpass or highpass characteristics.
It is important to note that the above upperbound on μ only enforces stability in the mean, but the coefficients of can still grow infinitely large, i.e. divergence of the coefficients is still possible. A more practical bound is
where denotes the trace of R. This bound guarantees that the coefficients of do not diverge (in practice, the value of μ should not be chosen close to this upper bound, since it is somewhat optimistic due to approximations and assumptions made in the derivation of the bound).
Normalised least mean squares filter (NLMS)
The main drawback of the "pure" LMS algorithm is that it is sensitive to the scaling of its input x(n). This makes it very hard (if not impossible) to choose a learning rate μ that guarantees stability of the algorithm (Haykin 2002). The Normalised least mean squares filter (NLMS) is a variant of the LMS algorithm that solves this problem by normalising with the power of the input. The NLMS algorithm can be summarised as:
Parameters: p = filter order μ = step size Initialization: Computation: For n = 0,1,2,... Optimal learning rate
It can be shown that if there is no interference (v(n) = 0), then the optimal learning rate for the NLMS algorithm is
 μ_{opt} = 1
and is independent of the input x(n) and the real (unknown) impulse response . In the general case with interference (), the optimal learning rate is
The results above assume that the signals v(n) and x(n) are uncorrelated to each other, which is generally the case in practice.
Proof
Let the filter misalignment be defined as , we can derive the expected misalignment for the next sample as:
Let and
Assuming independence, we have:
The optimal learning rate is found at , which leads to:
See also
 Recursive least squares
 For statistical techniques relevant to LMS filter see Least squares.
 Similarities between Wiener and LMS
 Multidelay block frequency domain adaptive filter
 Kernel adaptive filter
References
 Monson H. Hayes: Statistical Digital Signal Processing and Modeling, Wiley, 1996, ISBN 0471594318
 Simon Haykin: Adaptive Filter Theory, Prentice Hall, 2002, ISBN 0130484342
 Simon S. Haykin, Bernard Widrow (Editor): LeastMeanSquare Adaptive Filters, Wiley, 2003, ISBN 0471215708
 Bernard Widrow, Samuel D. Stearns: Adaptive Signal Processing, Prentice Hall, 1985, ISBN 0130040290
 Weifeng Liu, Jose Principe and Simon Haykin: Kernel Adaptive Filtering: A Comprehensive Introduction, John Wiley, 2010, ISBN 0470447532
 Paulo S.R. Diniz: Adaptive Filtering: Algorithms and Practical Implementation, Kluwer Academic Publishers, 1997, ISBN 0792399129
External links
 LMS Algorithm in Adaptive Antenna Arrays www.antennatheory.com
 LMS Noise cancellation demo www.advsolned.com
Categories: Digital signal processing
 Filter theory
 Stochastic algorithms
Wikimedia Foundation. 2010.