Chapter 5 — Linear Optimal Filtering
Companion material for Chapter 5. Covers the Wiener filter, matched filter, and the Wiener–Hopf equation, derived via the orthogonality principle.
§ 5.1 Problem Setup

Full IIR/FIR filter analysis: impulse response, pole-zero plot, magnitude and phase response. Useful for building intuition about filter behavior before the optimal design step.
Filtering applied to images — shows the spatial interpretation of the same operations used in the Wiener filter.
§ 5.2 Orthogonality Principle
Orthogonality Principle

Animated geometric interpretation: error vector e = d - \hat{d} projected onto the observation space. The optimal \hat{d} is the orthogonal projection.
2D example: estimate d from correlated observation x. Show the geometric projection and compute the MMSE estimate.
§ 5.3 Wiener Filter
Wiener–Hopf Equation

Solve the Wiener–Hopf equation numerically for an AR(1) signal in white noise. Implement and test the resulting filter.
Noise Suppression

Listen to the effect of low-pass filtering on audio — an accessible demonstration of noise suppression before the Wiener filter derivation.
Apply a Wiener filter for speech denoising. Plot spectrograms before and after, compare SNR.
Causal FIR Filter

Design a length-N causal FIR Wiener filter. Show how performance improves with filter order.
Linear Prediction

Implement a linear predictor for an AR(1) process. Compare the prediction error to the theoretical minimum (innovation variance).
Linear Predictive Coding (LPC)

Apply LPC to a short speech segment: compute LPC coefficients, synthesize from the excitation signal, and listen to the result.
§ 5.4 Matched Filter
Matched Filter

Step-by-step convolution animation — the matched filter is a correlation (convolution with time-reversed template), making this demo directly applicable.
Detect sinusoidal signals in noise — an instance of matched filtering for a known template signal.
Radar/sonar ping detection: embed a pulse in noise, apply the matched filter, and show that the output peak identifies the correct delay.
Matched Filter — Colored Noise
Extend the matched filter to colored noise via pre-whitening. Compare detection performance to the white-noise version.