The FIR filter is adapted using the least mean-square algorithm.
First the error signal is computed,
en=yn−
y
^
n
e
n
y
n
y
^
n
,
which provides a measure of how far our FIR filter is from
the unknown system output.
The coefficient update relation is a function of this
error signal squared and is given by
h
new
i=
h
old
i+μ2(−∂|e|2∂
hi
)
h
new
i
h
old
i
μ
2
h
i
e
2
(1)
The term inside the parenthesis represents the derivative, or gradient,
of the squared-error with respect to the i'th coefficient, and
the mu
muterms represents a step-size, or how much gradient
information is used to update each coefficient.
After repeatedly adjusting each coefficient in the direction
opposite to the gradient of the error, the adaptive filter
should converge; that is, the difference between the
unknown and adaptive systems should get smaller and smaller.
To express the gradient decent coefficient update equation
in a more usable manner, we can rewrite the derivative of the
squared-error term as
∂|e|2∂
hi
=2∂e∂
hi
e
h
i
e
2
2
h
i
e
e
∂|e|2∂
hi
=2∂(y−
y
^
)∂
hi
e
h
i
e
2
2
h
i
y
y
^
e
∂|e|2∂
hi
=(2∂(y−∑
i
=0N−1hixn−i)∂
hi
)e
h
i
e
2
2
h
i
y
i
0
N
1
h
i
x
n
i
e
∂|e|2∂
hi
=2(−xn−i)e
h
i
e
2
2
x
n
i
e
(2)which in turn gives us the final LMS coefficient
update,
h
new
i=
h
old
i+μexn−i
h
new
i
h
old
i
μ
e
x
n
i
(3)The
μ
μ term, or step-size, directly
affects how quickly the adaptive filter will converge toward
the unknown system. If
μ
μ is very small, then the coefficients
are not altered by a significant amount at each update. With
a large step-size, more gradient information is included in
each update; however, when the step-size is too large the
coefficients may be changed too much and the filter will
not converge.