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, in dB, with its poles at (, ) 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]?
The best predictor is , leaving exactly the new noise w[n] as error. The signal's power is = 5.26 σ², so the error is 1 − 0.81 = 19% of it: a prediction gain of 7.2 dB. Only the part that's genuinely new can't be predicted.
Name it
Autoregressive models
An AR(p) process is white noise w[n] of variance through an all-pole filter:
For AR(1), .
Linear prediction and the Yule–Walker equations
The predictor minimizing the mean-square error satisfies
a Toeplitz system, with minimum error . If x really is AR(p), the predictor recovers the model's coefficients and . The prediction gain is .
The Levinson–Durbin recursion
Solve order by order in operations, starting from :
The are the reflection coefficients of lesson 17's lattice; for a valid autocorrelation, so the model is always stable, and 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
- First order.
- Reflection coefficient. so = −0.389.
- Update .
- Error.
- Check against Yule–Walker.
- Prediction gain.
Answer = 1.111 and = −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 = 1. What are its variance, its correlation one sample apart, and its PSD at DC and at π?
Show the solution
- Variance.
- Correlation one sample apart. φ[1]/φ[0] = 0.9.
- PSD at DC. which is 20 dB.
- PSD at π. 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 . Run Levinson–Durbin to order 2. What does the second order add, and what is the prediction gain?
Show the solution
- First order.
- Second order.
- Why it adds nothing. This is exactly the autocorrelation of an AR(1) process with a = 0.8.
- Prediction gain. at every order from 1 on.
Answer = 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 ?
Check
For the same process, what's the order-2 predictor coefficient ?
Check
For the same process, what's the order-2 prediction error ?
Check
What's the PSD of the AR(1) process with a = 0.5 and = 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 ?
(b)
What prediction gain does order 2 give?
Check
Levinson–Durbin runs on φ[0] = 1, φ[1] = p, φ[2] = q.
Step 1
What is ?
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°.
Step 2
What is ?
Step 3
What is ?
Explain why
Why does the linear predictor's error turn out to be white?
The predictor is chosen so that its error is as small as possible in the mean-square sense, and the condition for that, the Yule–Walker equations, says the error must be uncorrelated with every past sample used in the prediction. If any correlation remained, part of the error could be predicted from those samples, and adding that part would shrink the error further, contradicting optimality. When the order is high enough to capture the signal's structure, the error is then uncorrelated with all of its own past too, which is what white means. The predictor has effectively removed everything predictable, the spectral shape, leaving only the new information in each sample, which is why prediction underlies both spectral modeling and compression.
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.