S737 of 55
0 XP
  1. Hook
  2. Play
  3. Predict
  4. Name it
  5. Check
  6. Explain

S7 · Lesson 37 · Adaptive filters

Filters that learn the Wiener solution from data, the LMS algorithm and its step size, stability, convergence time and misadjustment, normalized LMS and RLS, and echo cancellation

The Wiener filter needs the signal's statistics, which in practice are unknown and keep changing: a phone's echo path changes when someone moves, a channel fades, a noise source drifts. An adaptive filter finds the Wiener solution by itself, nudging its coefficients after every sample in the direction that reduces the error. Widrow and Hoff's least-mean-squares algorithm, from 1960, does it with one multiplication per tap per sample and still runs in nearly every speakerphone and modem. Its one design choice, the step size, trades how fast it learns against how precisely it settles.

  • The average weight error of a one-tap LMS filter learning a fixed system with unit-power input, (1−μ)n, sample by sample, for step size μ.
  • Small steps converge smoothly but slowly, with a time constant of about 1/μ samples. Near μ = 1 it converges in one step.
  • Between 1 and 2 the weight overshoots and oscillates while converging; beyond 2 it diverges. Larger μ also leaves more residual noise in the weights, the misadjustment, about μ/2 here.

Predict

An echo canceller has 256 taps and its input has power 0.1. Roughly what's the largest LMS step size that keeps it stable?

Name it

The LMS algorithm

For a P-tap filter with weights 𝐰 and input vector 𝐱[n], desired response d[n]:

e[n]=d[n]−𝐰T𝐱[n],𝐰←𝐰+μe[n]𝐱[n]

a stochastic-gradient step on the mean-square error, whose minimum is the Wiener solution 𝐰o=R−1𝐩.

Step size

  • Stability (in the mean): 0<μ<2/λmax of R; the conservative, easily computed bound is μ<2/tr(R)=2/(Pσx2).
  • Convergence: each eigenmode of the weight error decays as (1−μλk)n, with time constant about 1/(μλk) samples. A large eigenvalue spread λmax/λmin (a strongly colored input) means some modes converge slowly.
  • Misadjustment: the excess mean-square error relative to the Wiener minimum, M≈μ2tr(R)=μPσx22.

Fast convergence and small misadjustment pull μ in opposite directions.

Variants

  • Normalized LMS: 𝐰←𝐰+μ~δ+‖𝐱‖2e𝐱, stable for 0<μ~<2 whatever the input level; the effective step is about μ~/(Pσx2).
  • RLS (recursive least squares) inverts the correlation recursively, converging in about 2P samples regardless of eigenvalue spread, at O(P2) cost per sample.

Applications

System identification and echo cancellation (the filter models the echo path and subtracts its estimate), noise cancellation with a reference microphone, channel equalization, and adaptive line enhancers.

Worked example

Design the step size for a 256-tap echo canceller with input power 0.1, aiming for 10% misadjustment.

Show the solution
  1. Step size. Solve M=μPσx2/2 for μ: μ=2(0.1)256×0.1=0.0078 a tenth of the stability bound 0.078.
  2. Time constant. For white input every eigenvalue is 0.1, so each weight mode has τ=10.0078×0.1=1280samples which is 0.16 s at 8 kHz.
  3. The trade. Halving the misadjustment would double the convergence time.

Answer μ = 0.0078, which converges with a time constant of 1280 samples (0.16 s).

Worked example

The same canceller uses NLMS with μ~ = 0.5. What's its effective step, and what happens when the talker gets 10 dB louder?

Show the solution
  1. Effective step. μ≈0.5256×0.1=0.0195 with a misadjustment of about 25%.
  2. Plain LMS, 10 dB louder. If the input power rises tenfold, plain LMS with a fixed μ would see its effective step, μσx2, rise tenfold, past the stability bound.
  3. NLMS, 10 dB louder. NLMS divides by ‖𝐱‖2, which rises tenfold too, so its behavior doesn't change.

Answer an effective step of about 0.0195; when the talker gets 10 dB louder, NLMS behaves the same, where plain LMS would go unstable.

Worked example

A one-tap LMS filter with unit-power input uses μ = 0.01. How fast does its mean weight error decay, and what misadjustment does it have?

Show the solution
  1. Decay. The error shrinks as (1−μ)n=0.99n a time constant of about 1/μ = 100 samples.
  2. Down to 1%. n=ln⁡0.01ln⁡0.99=458samples
  3. Misadjustment. M=μσx2/2=0.5%
  4. The trade. Ten times the step would converge ten times faster with ten times the excess error.

Answer the mean weight error decays as 0.99n (a time constant of about 100 samples, 1% after 458), and the misadjustment is 0.5%.

Check

A 128-tap LMS filter has input power 0.01. What's the trace bound on its step size?

Check

An LMS filter with μ = 0.005, 32 taps and input power 0.5. What's its misadjustment?

Check

What step size gives 10% misadjustment for 64 taps at input power 0.5?

Check

A weight mode has eigenvalue 0.1 and the step size is 0.01. At 48 kHz, what's its time constant?

Write units the way you normally would: 1.5 ms, 1500 µs and 0.0015 s are the same answer.

Check

A one-tap LMS filter with unit-power input uses μ = 0.8. What fraction of its initial mean weight error remains after 3 samples (with sign)?

Check

An NLMS filter uses μ~ = 0.5 with 64 taps at input power 0.2. What's its effective LMS step?

Check

A 128-tap LMS filter with white input of power 0.1 at 16 kHz is designed for 10% misadjustment.

(a)

What step size does it use?

(b)

What is its convergence time constant?

Write units the way you normally would: 1.5 ms, 1500 µs and 0.0015 s are the same answer.

Check

An LMS filter with step m and P taps sees white input of power s.

Step 1

What is the trace bound on the step?

Type it the way you would write it, like 3sin(2πft) or 3*sin(2*pi*f*t). Angles can be in radians or carry a degree sign, like 45°.

Explain why

Why can't an LMS filter both converge quickly and settle precisely?

Practice

Keep practicing

10 kinds of problem on this topic, dealt one at a time with new numbers every time, for as long as you like.