beautypg.com

Motorola DSP96002 User Manual

Page 543

background image

B-24

DSP96002 USER’S MANUAL

MOTOROLA

Notation and symbols:

x(n) - Input sample at time n.

d(n) - Desired signal at time n.

f(n) - FIR filter output at time n.

H(n) - Filter coefficient vector at time n. H={h0,h1,h2,h3}

X(n) - Filter state variable vector at time n. X={x0,x1,x2,x3}

u - Adaptation gain.

ntaps - Number of coefficient taps in the filter. For this

example, ntaps=4.

Exact LMS Algorithm:

e(n)=d(n)-H(n)X(n) (FIR filter and error)

H(n+1)=H(n)+uX(n)e(n) (Coefficient update)

Delayed LMS Algorithm:

e(n)=d(n)-H(n)X(n) (FIR filter and error)

H(n+1)=H(n)+uX(n-1)e(n-1) (Coefficient update)

In the exact LMS algorithm, the output of the FIR filter is first calculated (f(n)) and then the coefficients are

updated using the current error signal and coefficients. In the delayed LMS algorithm, the FIR filter and

coefficient update is performed at the same time. The coefficients are updated with the error value and co-

efficients from the previous sample.

References:

"Adaptive Digital Filters and Signal Analysis", Maurice G. Bellanger

Marcel Dekker, Inc. New York and Basel

"The DLMS Algorithm Suitable for the Pipelined Realization of Adaptive

Filters", Proc. IEEE ASSP Workshop, Academia Sinica, Beijing, 1986

The sections of code shown describe how to initialize all registers, filter an input sample and do the coefficient
update. Only the instructions relating to the filtering and coefficient update are shown as part of the bench-
mark. Instructions executed only once (for initialization) or instructions that may be user application depen-
dent are not included in the benchmark.

Exact LMS Algorithm

ntaps equ 4

u equ .01

org x:0

sbuf ds ntaps