Skip to main content

Wiener Filtering Explained


Wiener Filtering Theory

Theory of Wiener Filtering

Wiener filtering is a fundamental technique in statistical signal processing used to estimate a desired signal from a noisy observation. The objective is to design a linear time-invariant (LTI) filter whose output minimizes the mean-square error (MSE) between the estimated signal and the desired signal.

Signal Model and Notation

  • x[n] denote the observed (input) signal
  • d[n] denote the desired (reference) signal
  • h[n] denote the impulse response (filter coefficients)
  • y[n] denote the filter output (estimate of d[n])
  • e[n] denote the estimation error

The output of the LTI filter is given by the convolution:

$$ y[n] = \sum_{m=-\infty}^{\infty} h[m]\,x[n-m] $$

Here, h[m] represents the filter coefficient at lag m, and x[n-m] is the input sample delayed by m. The summation combines all weighted past and future samples (for the general case).

The estimation error is defined as:

$$ e[n] = d[n] - y[n] $$

This represents the difference between the desired signal and its estimate.

Mean-Square Error Criterion

The performance of the filter is evaluated using the mean-square error:

$$ \xi = E\{e^2[n]\} = E\{(d[n] - y[n])^2\} $$

Here, E{⋅} denotes the statistical expectation operator. The squaring ensures that both positive and negative errors contribute positively.

The Wiener filtering problem consists of determining the impulse response h[n] that minimizes ξ:

$$ h_{\text{opt}} = \arg \min_h E\{(d[n] - y[n])^2\} $$

Here, arg min denotes the value of h[n] that minimizes the MSE.

Correlation Functions

Autocorrelation Function

$$ \varphi_{xx}[k] = E\{x[n]\,x[n+k]\} $$

Here, k is the lag (time shift). This function measures how similar the signal is to a shifted version of itself.

For wide-sense stationary (WSS) processes, φxx[k] depends only on k. At k = 0, φxx[0] = E{x²[n]} represents the average power of the input signal.

Cross-Correlation Function

$$ \varphi_{xd}[k] = E\{x[n]\,d[n+k]\} $$

This measures how the input signal x[n] is related to the desired signal d[n] at a shift of k.

Wiener–Hopf Equation

$$ \sum_{m=-\infty}^{\infty} h_{\text{opt}}[m]\,\varphi_{xx}[k-m] = \varphi_{xd}[k], \quad \forall k $$

Here, hopt[m] are the optimal filter coefficients. This equation expresses that the filtered input must match the cross-correlation with the desired signal for all lags k.

Frequency-Domain Representation

$$ H_{\text{opt}}(z) = \frac{\Phi_{xd}(z)}{\Phi_{xx}(z)} $$
  • Φxx(z) is the power spectral density (PSD) of x[n]
  • Φxd(z) is the cross-power spectral density between x[n] and d[n]

Here, Hopt(z) represents the frequency response of the optimal filter.

Noise Reduction Model

$$ x[n] = s[n] + v[n] $$
  • s[n] is the desired signal
  • v[n] is additive noise

Assume s[n] and v[n] are uncorrelated, and let d[n] = s[n]. Then:

$$ \Phi_{xx}(z) = \Phi_{ss}(z) + \Phi_{vv}(z), \quad \Phi_{xd}(z) = \Phi_{ss}(z) $$

The optimal Wiener filter becomes:

$$ H_{\text{opt}}(z) = \frac{\Phi_{ss}(z)}{\Phi_{ss}(z) + \Phi_{vv}(z)} $$

At frequencies where the noise power Φvv(z) is large, the denominator increases, causing the filter to reduce the gain (attenuation) at those frequencies.

Finite-Length (FIR) Wiener Filter

$$ y[n] = \sum_{k=0}^{N-1} h[k]\,x[n-k] $$

Here, only past and present samples are used, making the filter causal.

Define the coefficient vector and input vector:

$$ H = [h[0], h[1], \dots, h[N-1]]^T $$ $$ X[n] = [x[n], x[n-1], \dots, x[n-N+1]]^T $$

Then the filter output is:

$$ y[n] = H^T X[n] $$

Here, H^T denotes the transpose of H, representing an inner product.

  • R = E{X[n] X^T[n]} : autocorrelation matrix of the input
  • P = E{X[n] d[n]} : cross-correlation vector
$$ H_{\text{opt}} = R^{-1} P $$
  • R-1: The inverse of the input autocorrelation matrix. It helps the filter isolate the unique parts of the signal.
  • P: The cross-correlation vector. It indicates how the filter weights should be adjusted to match the desired output.

Minimum Mean-Square Error

$$ \xi_{\min} = \sigma_d^2 - P^T R^{-1} P $$ $$ \sigma_d^2 = E\{d^2[n]\} $$

Here, d[n] denotes the desired signal, and σd² represents its average power. The term PT R-1 P represents the amount of the desired signal power that can be recovered (estimated) from the observed input signal x[n].

Applications

  • Noise Reduction: Removing background hiss from recordings.
  • System Identification: Mapping how an unknown system behaves.
  • Channel Equalization: Fixing distorted signals in 4G/5G networks.
  • Image Restoration: Removing "blur" from digital photographs.

People are good at skipping over material they already know!

View Related Topics to







Contact Us

Name

Email *

Message *

Popular Posts

Amplitude, Frequency, and Phase Modulation Techniques (AM, FM, and PM)

📘 Overview 🧮 Amplitude Modulation (AM) 🧮 Online Amplitude Modulation Simulator 🧮 MATLAB Code for AM 🧮 Q & A and Summary 📚 Further Reading Amplitude Modulation (AM): The carrier signal's amplitude varies linearly with the amplitude of the message signal. An AM wave may thus be described, in the most general form, as a function of time as follows .                       When performing amplitude modulation (AM) with a carrier frequency of 100 Hz and a message frequency of 10 Hz, the resulting peak frequencies are as follows: 90 Hz (100 - 10 Hz), 100 Hz, and 110 Hz (100 + 10 Hz). Figure: Frequency Spectrums of AM Signal (Lower Sideband, Carrier, and Upper Sideband) A low-frequency message signal is modulated with a high-frequency carrier wave using a local oscillator to make communication possible. DSB, SSB, and VSB are common amplitude modulation techniques. We find a lot of bandwi...

Analog vs Digital Modulation Techniques | Advantages of Digital ...

Modulation Techniques Analog vs Digital Modulation Techniques... In the previous article, we've talked about the need for modulation and we've also talked about analog & digital modulations briefly. In this article, we'll discuss the main difference between analog and digital modulation in the case of digital modulation it takes a digital signal for modulation whereas analog modulator takes an analog signal.  Advantages of Digital Modulation over Analog Modulation Digital Modulation Techniques are Bandwidth efficient Its have good resistance against noise It can easily multiple various types of audio, voice signal As it is good noise resistant so we can expect good signal strength So, it leads high signal-to-noise ratio (SNR) Alternatively, it provides a high data rate or throughput Digital Modulation Techniques have better swathing capability as compared to Analog Modulation Techniques  The digital system provides better security than the a...

Shannon Limit Explained: Negative SNR, Eb/No and Channel Capacity

Understanding Negative SNR and the Shannon Limit Understanding Negative SNR and the Shannon Limit An explanation of Signal-to-Noise Ratio (SNR), its behavior in decibels, and how Shannon's theorem defines the ultimate communication limit. Signal-to-Noise Ratio in Shannon’s Equation In Shannon's equation, the Signal-to-Noise Ratio (SNR) is defined as the signal power divided by the noise power: SNR = S / N Since both signal power and noise power are physical quantities, neither can be negative. Therefore, the SNR itself is always a positive number. However, engineers often express SNR in decibels: SNR(dB) When SNR = 1, the logarithmic value becomes: SNR(dB) = 0 When the noise power exceeds the signal power (SNR < 1), the decibel representation becomes negative. Behavior of Shannon's Capacity Equation Shannon’s channel capacity formula is: C = B log₂(1 + SNR) For SNR = 0: log₂(1 + SNR) = 0 When SNR becomes smaller (in...

BER vs SNR for M-ary QAM, M-ary PSK, QPSK, BPSK, ...(MATLAB Code + Simulator)

📘 Overview of BER and SNR 🧮 Online Simulator for BER calculation of m-ary QAM and m-ary PSK 🧮 MATLAB Code for BER calculation of M-ary QAM, M-ary PSK, QPSK, BPSK, ... 📚 Further Reading 📂 View Other Topics on M-ary QAM, M-ary PSK, QPSK ... 🧮 Online Simulator for Constellation Diagram of m-ary QAM 🧮 Online Simulator for Constellation Diagram of m-ary PSK 🧮 MATLAB Code for BER calculation of ASK, FSK, and PSK 🧮 MATLAB Code for BER calculation of Alamouti Scheme 🧮 Different approaches to calculate BER vs SNR What is Bit Error Rate (BER)? The abbreviation BER stands for Bit Error Rate, which indicates how many corrupted bits are received (after the demodulation process) compared to the total number of bits sent in a communication process. BER = (number of bits received in error) / (total number of tran...

Online Simulator for ASK, FSK, and PSK

Try our new Digital Signal Processing Simulator!   Start Simulator for binary ASK Modulation Message Bits (e.g. 1,0,1,0) Carrier Frequency (Hz) Sampling Frequency (Hz) Run Simulation Simulator for binary FSK Modulation Input Bits (e.g. 1,0,1,0) Freq for '1' (Hz) Freq for '0' (Hz) Sampling Rate (Hz) Visualize FSK Signal Simulator for BPSK Modulation ...

Comparing Baseband and Passband Implementations of m-ary QAM

  Let's assume your original message signal is: 1, 0, 1, 1, 1, 0, 1, 1, 0, 1. If you want to modulate it using 4-QAM, then your baseband signal will be: 4-QAM Symbols (Real + jImag) Symbol 0: -1.00 + j-1.00 Symbol 1: 1.00 + j-1.00 Symbol 2: -1.00 + j-1.00 Symbol 3: 1.00 + j-1.00 Symbol 4: 1.00 + j1.00   Now, if you want to transmit them through a typical wireless medium, you need to modulate the baseband signal with a carrier frequency (in our case, 50 Hz). The resulting passband signal looks like this               In the above code, the symbol rate is 5 symbols per second.   Detailed explanation 4-QAM Constellation Points In typical normalized 4-QAM, each symbol is mapped to a complex number: Bits Symbol (I + jQ) 00 -1 - 1j 01 -1 + 1j 11 +1 + 1j 10 +1 - 1j Each point lies on a square centered at the origin with I and Q values either +1 or -1. ...

Comparing Baseband and Passband Implementations of ASK, FSK, and PSK

📘 Overview 🧮 Baseband and Passband Implementations of ASK, FSK, and PSK 🧮 Difference betwen baseband and passband 📚 Further Reading 📂 Other Topics on Baseband and Passband ... 🧮 Baseband modulation techniques 🧮 Passband modulation techniques   Baseband modulation techniques are methods used to encode information signals onto a baseband signal (a signal with frequencies close to zero), allowing for efficient transmission over a communication channel. These techniques are fundamental in various communication systems, including wired and wireless communication. Here are some common baseband modulation techniques: Amplitude Shift Keying (ASK) [↗] : In ASK, the amplitude of the baseband signal is varied to represent different symbols. Binary ASK (BASK) is a common implementation where two different amplitudes represent binary values (0 and 1). ASK is simple but susceptible to noise...

MATLAB code for BER vs SNR for M-QAM, M-PSK, QPSk, BPSK, ...(with Online Simulator)

🧮 MATLAB Code for BPSK, M-ary PSK, and M-ary QAM Together 🧮 MATLAB Code for M-ary QAM 🧮 MATLAB Code for M-ary PSK 📚 Further Reading MATLAB Script for BER vs. SNR for M-QAM, M-PSK, QPSK, BPSK % Written by Salim Wireless clc; clear; close all; num_symbols = 1e5; snr_db = -20:2:20; psk_orders = [2, 4, 8, 16, 32]; qam_orders = [4, 16, 64, 256]; ber_psk_results = zeros(length(psk_orders), length(snr_db)); ber_qam_results = zeros(length(qam_orders), length(snr_db)); for i = 1:length(psk_orders) psk_order = psk_orders(i); for j = 1:length(snr_db) data_symbols = randi([0, psk_order-1], 1, num_symbols); modulated_signal = pskmod(data_symbols, psk_order, pi/psk_order); received_signal = awgn(modulated_signal, snr_db(j), 'measured'); demodulated_symbols = pskdemod(received_signal, psk_order, pi/psk_order); ber_psk_results(i, j) = sum(data_symbols ~= demodulated_symbols) / num_symbols; end end for i...