Summary: This module introduces adaptive filters through the example of system identification using the LMS algorithm. The adaptive filter adjusts its coefficients to minimize the mean-square error between its output and that of an unknown system.
Note: Your browser may not currently support MathML. See our browser support page for additional details. You can always view the correct math in the PDF version.
Figure 1 is a block diagram of system
identification using adaptive filtering. The objective is to
change (adapt) the coefficients of an FIR filter,
![]() |
The adaptive filter,
The term inside the parentheses represents the gradient of
the squared-error with respect to the
To express the gradient decent coefficient update equation in a more usable manner, we can rewrite the derivative of the squared-error term as
Simulate the system identification block diagram shown in Figure 1.
Previously in MATLAB, you used the filter command
or the conv command to implement shift-invariant
filters. Those commands will not work here because adaptive
filters are shift-varying, since the coefficient update
equation changes the filter's impulse response at every sample
time. Therefore, implement the system identification block on
a sample-by-sample basis with a do loop, similar
to the way you might implement a time-domain FIR filter on a
DSP. For the "unknown" system, use the fourth-order,
low-pass, elliptical, IIR filter designed for the IIR Filtering: Filter-Design Exercise in
MATLAB.
Use Gaussian random noise as your input, which can be
generated in MATLAB using the command randn.
Random white noise provides signal at all digital frequencies
to train the adaptive filter. Simulate the system with an
adaptive filter of length 32 and a step-size of
Once your simulation is working, experiment with different step-sizes and adaptive filter lengths.
Use the same "unknown" filter as you used in the MATLAB simulation.
Although the coefficient update equation is relatively
straightforward, consider using the lms
instruction available on the TI processor, which is designed
for this application and yields a very efficient
implementation of the coefficient update equation.
To generate noise on the DSP, you can use the PN generator
from the Digital Transmitter:
Introduction to Quadrature Phase-Shift Keying, but
shift the PN register contents up to make the sign bit random.
(If the sign bit is always zero, then the noise will not be
zero-mean and this will affect convergence.) Send the desired
signal,
When using the step-size suggested in the MATLAB simulation
section, you should notice that the error converges very
quickly. Try an extremely small
If your project requires some modifications to the implementation here, refer to Haykin and consider some of the following questions regarding such modifications:
"Doug course at UIUC using the TI C54x DSP has been adopted by many EE, CE and CS depts Worldwide "