The Non-Causal Wiener Filter

When You Are Allowed to Look Into the Future

If we record the observation sequence {Ym}\{Y_m\} off-line and then process it, we can use samples from both the past and the future of time nn to estimate XnX_n. This is the setting of smoothing: image denoising, audio restoration, seismic trace processing. The non-causal Wiener filter is the best linear smoother, and its transfer function is so simple that it deserves to be memorized.

Theorem: Non-Causal Wiener Filter

Let {Xn},{Yn}\{X_n\}, \{Y_n\} be jointly WSS with spectra Pxx(f),Pxy(f),Pxy(f){P_x}_{x}(f), {P_x}_{y}(f), P_{xy}(f) and Pxy(f)>0{P_x}_{y}(f) > 0 for all ff. The MMSE non-causal linear estimator X^n=βˆ‘k∈Zh[k]Ynβˆ’k\hat{X}_n = \sum_{k \in \mathbb{Z}} h[k] Y_{n-k} has transfer function β€…β€ŠhΛ‡nc(f)=Pxy(f)Py(f)β€…β€Š\boxed{\;\check{h}_{\text{nc}}(f) = \frac{P_{xy}(f)}{P_y(f)}\;} and the non-causal MMSE per sample is Οƒnc2=βˆ«βˆ’1/21/2[Px(f)βˆ’βˆ£Pxy(f)∣2Py(f)]df.\sigma_{\text{nc}}^2 = \int_{-1/2}^{1/2} \left[P_x(f) - \frac{|P_{xy}(f)|^2}{P_y(f)}\right] df.

Read the formula as a frequency-by-frequency matched filter. At each frequency ff, we have a "cross-correlation" Pxy(f)P_{xy}(f) between the desired signal and the observation, and an "observation power" Py(f)P_y(f). The Wiener gain is the cross-spectrum normalized by the observation spectrum. Where the signal is strong relative to the observation β€” meaning ∣Pxy(f)∣2β‰ˆPx(f)Py(f)|P_{xy}(f)|^2 \approx P_x(f) P_y(f) β€” the gain is close to one. Where the signal is drowned in noise β€” meaning ∣Pxy(f)∣2β‰ͺPx(f)Py(f)|P_{xy}(f)|^2 \ll P_x(f) P_y(f) β€” the gain is close to zero. The filter attenuates the bands where listening would hurt you.

,

Definition:

Signal in Additive Independent Noise

The canonical application is Yn=Xn+ZnY_n = X_n + Z_n where {Zn}\{Z_n\} is a zero-mean WSS noise process independent of {Xn}\{X_n\}. In this case rxy[k]=rxx[k]r_{xy}[k] = r_{xx}[k], so Pxy(f)=Px(f),Py(f)=Px(f)+Pz(f),P_{xy}(f) = P_x(f), \qquad P_y(f) = P_x(f) + P_z(f), and the non-causal Wiener filter takes the classical form hˇnc(f)=Px(f)Px(f)+Pz(f).\check{h}_{\text{nc}}(f) = \frac{P_x(f)}{P_x(f) + P_z(f)}.

Theorem: MMSE for Signal in Additive Independent Noise

Under the setting of DSignal in Additive Independent Noise, Οƒnc2=βˆ«βˆ’1/21/2Px(f) Pz(f)Px(f)+Pz(f) df.\sigma_{\text{nc}}^2 = \int_{-1/2}^{1/2} \frac{P_x(f)\, P_z(f)}{P_x(f) + P_z(f)}\,df.

The integrand is the harmonic mean of Px(f)P_x(f) and Pz(f)P_z(f) at each frequency (up to a factor of 2). It is always less than min⁑(Px(f),Pz(f))\min(P_x(f), P_z(f)): the Wiener filter never does worse than simply keeping the signal or throwing it away at each frequency, because the optimum choice is to do something in between.

Wiener Filter Frequency Response

AR(1) signal Xn=aXnβˆ’1+UnX_n = a X_{n-1} + U_n observed in additive white noise ZnZ_n. Visualize the non-causal and causal Wiener filters on the same axes. High SNR: both gains approach 1 at signal peaks. Low SNR: both gains collapse toward zero. Compare the phase of the causal filter (implicit here β€” only magnitude is shown).

Parameters
0.8
10

MMSE vs SNR: Causal, Non-Causal, and the Signal Variance Floor

For the AR(1)+noise problem, trace the three MMSE curves as SNR varies. At high SNR both filters drive the MMSE to zero; at low SNR both are limited by the signal variance. The gap between causal and non-causal MMSE is the price of real-time processing.

Parameters
0.8
-10
30

Wiener Denoising in the Time Domain

Simulate an AR(1) realization, add white noise, and compare the noisy observation, the true signal, the non-causal estimate (via DFT), and the causal estimate (via the recursive first-order filter derived from spectral factorization). Vary the AR coefficient and SNR to see the filter adapt.

Parameters
0.85
5
200
7

Example: AR(1) Signal in White Noise: Closed-Form Non-Causal Wiener Filter

Let Xn=aXnβˆ’1+UnX_n = a X_{n-1} + U_n where UnU_n is white with variance Οƒu2\sigma_u^2 and ∣a∣<1|a| < 1, and let Yn=Xn+ZnY_n = X_n + Z_n with ZnZ_n independent white noise of variance Οƒz2\sigma_z^2. Derive hΛ‡nc(f)\check{h}_{\text{nc}}(f) and the non-causal MMSE in closed form.

Common Mistake: Py(f)=0P_y(f) = 0 Breaks the Non-Causal Formula

Mistake:

Applying hˇnc(f)=Pxy(f)/Py(f)\check{h}_{\text{nc}}(f) = P_{xy}(f)/P_y(f) at frequencies where Py(f)=0P_y(f) = 0.

Correction:

If the observation PSD vanishes at some frequency — for example, YY is band-limited and ff is outside the band — then there is no observation power at that frequency and the formula is indeterminate. The correct interpretation: set hˇnc(f)=0\check{h}_{\text{nc}}(f) = 0 at such frequencies (we have no information, so estimate zero). The integrand in the MMSE formula should then be replaced by Px(f)P_x(f) at those frequencies (we lose the signal power entirely).

Key Takeaway

The non-causal Wiener filter has a one-line formula: hΛ‡nc(f)=Pxy(f)/Py(f)\check{h}_{\text{nc}}(f) = P_{xy}(f)/P_y(f). It is a frequency-selective attenuator that keeps bands of high SNR and suppresses bands of low SNR. The MMSE is the integral of Px(f)βˆ’βˆ£Pxy(f)∣2/Py(f)P_x(f) - |P_{xy}(f)|^2/P_y(f), which is never negative by Cauchy-Schwarz on the cross-spectrum.

⚠️Engineering Note

Implementing the Non-Causal Wiener Filter with the DFT

In practice the non-causal filter is implemented block-by-block on a finite observation segment using the DFT. Take an NN-point DFT of the observation, multiply by the sampled Wiener gain hΛ‡nc(k/N)\check{h}_{\text{nc}}(k/N), and inverse-DFT. This is asymptotically the optimal smoother, but it introduces circular-convolution artifacts at the block boundaries. Overlap-save and overlap-add reduce the boundary effects. For very long recordings the gain can be precomputed once and reused β€” the per-sample cost of the filter is then O(log⁑N)O(\log N) by FFT, compared with the O(N2)O(N^2) cost of solving the Toeplitz Wiener-Hopf system directly.

Practical Constraints
  • β€’

    Block-based DFT implementation requires Py(f)>0P_y(f) > 0 on the DFT grid.

  • β€’

    Finite-block effects appear at boundaries; overlap-save recommended for streaming.