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

S7 · Lesson 34 · Parametric models and linear prediction

Autoregressive signal models, the Yule–Walker equations, the Levinson–Durbin recursion and its reflection coefficients, prediction error and spectral envelopes

Many signals are well described as white noise passed through an all-pole filter: a vocal tract shaping the buzz of the vocal folds, a resonant structure shaping random forces, a channel shaping data. If that's the model, the signal's whole spectrum is captured by a handful of filter coefficients, and those coefficients can be found from the signal's autocorrelation by solving a small set of linear equations. The same coefficients make the best linear predictor of each sample from the ones before it, which is how speech codecs squeeze a voice into a few kilobits per second.

  • The power spectrum of a second-order autoregressive process, σ2|1−a1e−jω−a2e−2jω|2 in dB, with its poles at re±jθ (a1=2rcos⁡θ, a2=−r2) and unit driving noise.
  • The spectrum peaks near the pole angle; the closer r is to 1, the taller and narrower the peak, the shape of a formant in speech.
  • Two coefficients describe the whole curve. A speech codec sends about ten such coefficients per 20 ms frame instead of the samples themselves.

Predict

A first-order AR process has x[n] = 0.9x[n − 1] + w[n]. How well can x[n] be predicted from x[n − 1]?

Name it

Autoregressive models

An AR(p) process is white noise w[n] of variance σw2 through an all-pole filter:

x[n]=∑k=1pakx[n−k]+w[n],Pxx(ω)=σw2|1−∑kake−jωk|2

For AR(1), ϕxx[m]=σw21−a2a|m|.

Linear prediction and the Yule–Walker equations

The predictor x^[n]=∑k=1pakx[n−k] minimizing the mean-square error satisfies

∑k=1pakϕ[|i−k|]=ϕ[i],i=1,…,p

a Toeplitz system, with minimum error Ep=ϕ[0]−∑kakϕ[k]. If x really is AR(p), the predictor recovers the model's coefficients and Ep=σw2. The prediction gain is 10log⁡(ϕ[0]/Ep).

The Levinson–Durbin recursion

Solve order by order in O(p2) operations, starting from E0=ϕ[0]:

ki=ϕ[i]−∑j=1i−1aj(i−1)ϕ[i−j]Ei−1,ai(i)=ki,aj(i)=aj(i−1)−kiai−j(i−1),Ei=Ei−1(1−ki2)

The ki are the reflection coefficients of lesson 17's lattice; |ki|<1 for a valid autocorrelation, so the model is always stable, and Ei never increases with order. Choosing the order is a balance: too low misses spectral peaks, too high fits noise.

Worked example

A process has φ[0] = 1, φ[1] = 0.8 and φ[2] = 0.5. Find the second-order predictor by Levinson–Durbin.

Show the solution
  1. First order. k1=0.8E1=1−0.64=0.36
  2. Reflection coefficient. k2=0.5−0.8×0.80.36=−0.389 so a2 = −0.389.
  3. Update a1. a1=0.8−(−0.389)(0.8)=1.111
  4. Error. E2=0.36(1−0.151)=0.306
  5. Check against Yule–Walker. 1.111+0.8(−0.389)=0.80.8(1.111)−0.389=0.5
  6. Prediction gain. G=10log⁡(1/0.306)=5.1dB

Answer a1 = 1.111 and a2 = −0.389, with error power 0.306 and a prediction gain of 5.1 dB.

Worked example

An AR(1) process with a = 0.9 and σw2 = 1. What are its variance, its correlation one sample apart, and its PSD at DC and at π?

Show the solution
  1. Variance. ϕ[0]=11−0.81=5.26
  2. Correlation one sample apart. φ[1]/φ[0] = 0.9.
  3. PSD at DC. P(0)=1(1−0.9)2=100 which is 20 dB.
  4. PSD at π. P(π)=11.92=0.277 which is −5.6 dB: a strongly lowpass process.

Answer a variance of 5.26, a correlation of 0.9 one sample apart, and a PSD of 100 (20 dB) at DC and 0.277 (−5.6 dB) at π.

Worked example

A process has ϕ[m]=0.8|m|. Run Levinson–Durbin to order 2. What does the second order add, and what is the prediction gain?

Show the solution
  1. First order. k1=ϕ[1]/ϕ[0]=0.8 E1=1−0.64=0.36
  2. Second order. k2=ϕ[2]−a1ϕ[1]E1=0.64−0.8×0.80.36=0
  3. Why it adds nothing. This is exactly the autocorrelation of an AR(1) process with a = 0.8.
  4. Prediction gain. G=10log10⁡(1/0.36)=4.4dB at every order from 1 on.

Answer k2 = 0, so the second order adds nothing, and the prediction gain is 4.4 dB.

Check

An AR(1) process x[n] = 0.8x[n − 1] + w[n] is driven by white noise of variance 1. What's the variance of x?

Check

What's the one-step prediction gain for that AR(1) process?

Check

A process has φ[0] = 1, φ[1] = 0.6, φ[2] = 0.05. What's the second reflection coefficient k2?

Check

For the same process, what's the order-2 predictor coefficient a1?

Check

For the same process, what's the order-2 prediction error E2?

Check

What's the PSD of the AR(1) process with a = 0.5 and σw2 = 1 at ω = 3.142?

Check

A process has φ[0] = 1, φ[1] = 0.6 and φ[2] = 0.1.

(a)

What is the first-order prediction error E1?

(b)

What prediction gain does order 2 give?

Check

Levinson–Durbin runs on φ[0] = 1, φ[1] = p, φ[2] = q.

Step 1

What is k1?

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 does the linear predictor's error turn out to be white?

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.