Sample rate: 16000 Hz
Signal length: 36288 samples (2.27 seconds)
SNR (approximate): -8.43 dB
Wiener Filtering
The Wiener filter is an optimal linear filter for estimating a desired signal from a noisy observation. It minimizes the mean-square error (MSE) between the desired signal and the filter output.
Problem Setup
We observe a noisy signal: y[n] = s[n] + v[n]
where:
- s[n] is the desired signal (unknown)
- v[n] is additive noise (unknown)
- y[n] is the observed signal
Our goal is to design a filter h[n] such that: \hat{s}[n] = \sum_{k} h[k] y[n-k]
minimizes the mean-square error: \mathbb{E}\left[|s[n] - \hat{s}[n]|^2\right]
Statistical Assumptions
We assume:
- s[n] and v[n] are jointly wide-sense stationary (WSS) random processes
- s[n] and v[n] are uncorrelated: \mathbb{E}[s[n]v[m]] = 0 for all n, m
- The autocorrelation functions R_{ss}[k] = \mathbb{E}[s[n]s[n-k]] and R_{vv}[k] = \mathbb{E}[v[n]v[n-k]] are known or can be estimated
Causal Wiener Filter (Wiener-Hopf Solution)
For real-time applications, we need a causal filter that only uses past and present samples. This leads to the Wiener-Hopf equation:
\sum_{k=0}^{M-1} h[k] R_{yy}[m-k] = R_{sy}[m], \quad m = 0, 1, \ldots, M-1
where M is the filter length. In matrix form:
\mathbf{R}_{yy} \mathbf{h} = \mathbf{r}_{sy}
where:
- \mathbf{R}_{yy} is the M \times M autocorrelation matrix of y[n]
- \mathbf{h} = [h[0], h[1], \ldots, h[M-1]]^T is the filter coefficient vector
- \mathbf{r}_{sy} = [R_{sy}[0], R_{sy}[1], \ldots, R_{sy}[M-1]]^T is the cross-correlation vector
The solution is: \mathbf{h} = \mathbf{R}_{yy}^{-1} \mathbf{r}_{sy}
This is the causal FIR Wiener filter or Wiener-Hopf solution.
Example 1: Speech Denoising with Beeping Noise
Let’s load a speech signal and corrupt it with beeping noise, then apply the causal Wiener filter.
Original speech:
Noisy signal (speech + beeping):
Causal Wiener Filter (Wiener-Hopf Solution) - Beeping Noise
Now let’s apply the causal FIR Wiener filter using the Wiener-Hopf equations. This filter only uses past and present samples, making it suitable for real-time applications.
Causal Wiener filter (FIR, length=128):
MSE: 0.043963
SNR improvement: 4.83 dB
Filtered signal (causal, beeping noise):
Example 2: Speech Denoising with Blender Noise
Now let’s apply the same causal Wiener filter to speech corrupted with blender noise.
Sample rate: 16000 Hz
Signal length: 36288 samples (2.27 seconds)
SNR (approximate): 2.01 dB
Original speech:
Noisy signal (speech + blender):
Causal Wiener Filter (Wiener-Hopf Solution) - Blender Noise
Now let’s apply the causal FIR Wiener filter to the blender noise case.
Causal Wiener filter (FIR, length=128):
MSE: 0.048936
SNR improvement: -5.37 dB
Filtered signal (causal, blender noise):
Key Insights
The Wiener filter’s effectiveness for denoising depends critically on the spectral characteristics of the signal and noise:
High SNR in important bands: The filter performs best when the signal-to-noise ratio is high in frequency bands where the desired signal has significant energy. This is exemplified by the beeping noise case, where the noise is concentrated in specific frequency regions, leaving other bands relatively clean.
Broadband noise limitation: When the noise signal covers the desired signal across most frequency bands (as in the blender noise case), the Wiener filter has limited ability to separate signal from noise. In such scenarios, effective filtering becomes challenging because the noise and signal occupy overlapping spectral regions.
The fundamental principle is that the Wiener filter can only suppress noise in frequency bands where the signal power exceeds the noise power. When noise dominates across the spectrum, the filter’s performance degrades accordingly.