Wiener filter
In signal processing, the Wiener filter is a filter used to produce an estimate of a desired or target random process by linear time-invariant filtering an observed noisy process, assuming known stationary signal and noise spectra, and additive noise. The Wiener filter minimizes the mean square error between the estimated random process and the desired process.
Contents |
Description[edit]
The goal of the Wiener filter is to filter out noise that has corrupted a signal. It is based on a statistical approach, and a more statistical account of the theory is given in the MMSE estimator article.
Typical filters are designed for a desired frequency response. However, the design of the Wiener filter takes a different approach. One is assumed to have knowledge of the spectral properties of the original signal and the noise, and one seeks the linear time-invariant filter whose output would come as close to the original signal as possible. Wiener filters are characterized by the following:[1]
- Assumption: signal and (additive) noise are stationary linear stochastic processes with known spectral characteristics or known autocorrelation and cross-correlation
- Requirement: the filter must be physically realizable/causal (this requirement can be dropped, resulting in a non-causal solution)
- Performance criterion: minimum mean-square error (MMSE)
This filter is frequently used in the process of deconvolution; for this application, see Wiener deconvolution.
Wiener filter problem setup[edit]
The input to the Wiener filter is assumed to be a signal,
, corrupted by additive noise,
. The output,
, is calculated by means of a filter,
, using the following convolution:[1]
where
is the original signal (not exactly known; to be estimated),
is the noise,
is the estimated signal (the intention is to equal
), and
is the Wiener filter's impulse response.
The error is defined as
where
is the delay of the Wiener Filter (since it is causal). In other words, the error is the difference between the estimated signal and the true signal shifted by
.
The squared error is
where
is the desired output of the filter and
is the error. Depending on the value of
, the problem can be described as follows:
- if
then the problem is that of prediction (error is reduced when
is similar to a later value of s), - if
then the problem is that of filtering (error is reduced when
is similar to
), and - if
then the problem is that of smoothing (error is reduced when
is similar to an earlier value of s).
Taking the expected value of the squared error results in
where
is the observed signal,
is the autocorrelation function of
,
is the autocorrelation function of
, and
is the cross-correlation function of
and
. If the signal
and the noise
are uncorrelated (i.e., the cross-correlation
is zero), then this means that
and
. For many applications, the assumption of uncorrelated signal and noise is reasonable.
The goal is to minimize
, the expected value of the squared error, by finding the optimal
, the Wiener filter impulse response function. The minimum may be found by calculating the first order incremental change in the least square resulting from an incremental change in
for positive time. This is
For a minimum, this must vanish identically for all
for
which leads to the Wiener–Hopf equation:
This is the fundamental equation of the Wiener theory. The right-hand side resembles a convolution but is only over the semi-infinite range. The equation can be solved to find the optimal filter
by a special technique due to Wiener and Hopf.
Wiener filter solutions[edit]
The Wiener filter problem has solutions for three possible cases: one where a noncausal filter is acceptable (requiring an infinite amount of both past and future data), the case where a causal filter is desired (using an infinite amount of past data), and the finite impulse response (FIR) case where a finite amount of past data is used. The first case is simple to solve but is not suited for real-time applications. Wiener's main accomplishment was solving the case where the causality requirement is in effect, and in an appendix of Wiener's book Levinson gave the FIR solution.
Noncausal solution[edit]
Where
are spectra. Provided that
is optimal, then the minimum mean-square error equation reduces to
and the solution
is the inverse two-sided Laplace transform of
.
Causal solution[edit]
where
consists of the causal part of
(that is, that part of this fraction having a positive time solution under the inverse Laplace transform)
is the causal component of
(i.e., the inverse Laplace transform of
is non-zero only for
)
is the anti-causal component of
(i.e., the inverse Laplace transform of
is non-zero only for
)
This general formula is complicated and deserves a more detailed explanation. To write down the solution
in a specific case, one should follow these steps:[2]
- Start with the spectrum
in rational form and factor it into causal and anti-causal components:
where
contains all the zeros and poles in the left half plane (LHP) and
contains the zeroes and poles in the right half plane (RHP). This is called the Wiener–Hopf factorization.
- Divide
by
and write out the result as a partial fraction expansion. - Select only those terms in this expansion having poles in the LHP. Call these terms
. - Divide
by
. The result is the desired filter transfer function
.
Finite impulse response Wiener filter for discrete series[edit]
The causal finite impulse response (FIR) Wiener filter, instead of using some given data matrix X and output vector Y, finds optimal tap weights by using the statistics of the input and output signals. It populates the input matrix X with estimates of the auto-correlation of the input signal (T) and populates the output vector Y with estimates of the cross-correlation between the output and input signals (V).
In order to derive the coefficients of the Wiener filter, consider the signal w[n] being fed to a Wiener filter of order N and with coefficients
,
. The output of the filter is denoted x[n] which is given by the expression
The residual error is denoted e[n] and is defined as e[n] = x[n] − s[n] (see the corresponding block diagram). The Wiener filter is designed so as to minimize the mean square error (MMSE criteria) which can be stated concisely as follows:
where
denotes the expectation operator. In the general case, the coefficients
may be complex and may be derived for the case where w[n] and s[n] are complex as well. With a complex signal, the matrix to be solved is a Hermitian Toeplitz matrix, rather than symmetric Toeplitz matrix. For simplicity, the following considers only the case where all these quantities are real. The mean square error (MSE) may be rewritten as:
To find the vector
which minimizes the expression above, calculate its derivative with respect to 
Assuming that w[n] and s[n] are each stationary and jointly stationary, the sequences
and
known respectively as the autocorrelation of w[n] and the cross-correlation between w[n] and s[n] can be defined as follows:
The derivative of the MSE may therefore be rewritten as (notice that
)
Letting the derivative be equal to zero results in
which can be rewritten in matrix form
These equations are known as the Wiener–Hopf equations. The matrix T appearing in the equation is a symmetric Toeplitz matrix. Under suitable conditions on
, these matrices are known to be positive definite and therefore non-singular yielding a unique solution to the determination of the Wiener filter coefficient vector,
. Furthermore, there exists an efficient algorithm to solve such Wiener–Hopf equations known as the Levinson-Durbin algorithm so an explicit inversion of
is not required.
Relationship to the least mean squares filter[edit]
The realization of the causal Wiener filter looks a lot like the solution to the least squares estimate, except in the signal processing domain. The least squares solution, for input matrix
and output vector
is
The FIR Wiener filter is related to the least mean squares filter, but minimizing its error criterion does not rely on cross-correlations or auto-correlations. Its solution converges to the Wiener filter solution.
State-space realizations[edit]
The above frequency-domain solutions can be realized in state-space forms. Discrete-time and continuous-time formulations are described in [3] and ,[4][5] respectively. The causal Wiener solution is equivalent to the minimum-variance Kalman filter. The Wiener filter and Kalman filter equivalence is a consequence of the Kalman–Yakubovich–Popov lemma which is also known as the Positive Real Lemma.
The non-causal Wiener solution is known as the minimum-variance smoother. This smoother can attain the best-possible error performance, provided that the model parameters and noise statistics are known precisely.
See the Kalman Filtering Section and the references for examples of state-space Wiener smoother recursions.
Applications[edit]
The Wiener filter can be used in image processing to remove noise from a picture. For example, using the Mathematica function: WienerFilter[image,2] on the first image on the right, produces the filtered image below it.
It is commonly used to denoise audio signals, especially speech, as a preprocessor before speech recognition.
History[edit]
The filter was proposed by Norbert Wiener during the 1940s and published in 1949.[6]. The discrete-time equivalent of Wiener's work was derived independently by Andrey Kolmogorov and published in 1941. Hence the theory is often called the Wiener–Kolmogorov filtering theory. The Wiener filter was the first statistically designed filter to be proposed and subsequently gave rise to many others including the famous Kalman filter.
See also[edit]
- Norbert Wiener
- Kalman filter
- Wiener deconvolution
- Eberhard Hopf
- Least mean squares filter
- Similarities between Wiener and LMS
- Linear prediction
- MMSE estimator
References[edit]
- ^ a b Brown, Robert Grover; Hwang, Patrick Y.C. (1996). Introduction to Random Signals and Applied Kalman Filtering (3 ed.). New York: John Wiley & Sons. ISBN 0-471-12839-2.
- ^ Welch, Lloyd R. "Wiener–Hopf Theory".
- ^ Einicke, G.A. (March 2006). "Optimal and Robust Noncausal Filter Formulations". IEEE Trans. Signal Processing 54 (3): 1069–1077
- ^ Einicke, G.A. (April 2007). "Asymptotic Optimality of the Minimum-Variance Fixed-Interval Smoother". IEEE Trans. Signal Processing 55 (4): 1543–1547
- ^ Einicke, G.A.; Ralston, J.C.; Hargrave, C.O.; Reid, D.C.; Hainsworth, D.W. (December 2008). "Longwall Mining Automation. An Application of Minimum-Variance Smoothing". IEEE Control Systems Magazine 28 (6): 1543–1547
- ^ Wiener, Norbert (1949). Extrapolation, Interpolation, and Smoothing of Stationary Time Series. New York: Wiley. ISBN 0-262-73005-7.
- Thomas Kailath, Ali H. Sayed, and Babak Hassibi, Linear Estimation, Prentice-Hall, NJ, 2000, ISBN 978-0-13-022464-4.
- Wiener N: The interpolation, extrapolation and smoothing of stationary time series', Report of the Services 19, Research Project DIC-6037 MIT, February 1942
- Kolmogorov A.N: 'Stationary sequences in Hilbert space', (In Russian) Bull. Moscow Univ. 1941 vol.2 no.6 1-40. English translation in Kailath T. (ed.) Linear least squares estimation Dowden, Hutchinson & Ross 1977
Further reading[edit]
- Einicke, G.A. (2012). Smoothing, Filtering and Prediction: Estimating the Past, Present and Future. Rijeka, Croatia: Intech. ISBN 978-953-307-752-9.
External links[edit]
- Mathematica WienerFilter function
![\hat{s}(t) = g(t) * [s(t) + n(t)] = \int\limits_{-\infty}^{\infty}{g(\tau)\left[s(t - \tau) + n(t - \tau)\right]\,d\tau},](http://upload.wikimedia.org/math/1/a/0/1a039bd106f4c12eb14dfa56bb8d24ed.png)


then the problem is that of
then the problem is that of
then the problem is that of ![\mathrm{E}(e^2) = R_s(0) - 2\int\limits_{-\infty}^{\infty}{g(\tau)R_{xs}(\tau + \alpha)\,d\tau} + \iint\limits^{[\infty, \infty]}_{[-\infty, -\infty]}{g(\tau)g(\theta)R_x(\tau - \theta)\,d\tau\,d\theta},](http://upload.wikimedia.org/math/0/a/a/0aa165e7687d4963494f76fc57f97971.png)





consists of the causal part of
(that is, that part of this fraction having a positive time solution under the inverse Laplace transform)
is the causal component of
(i.e., the inverse Laplace transform of
)
is the anti-causal component of
)
by ![x[n] = \sum_{i=0}^N a_i w[n-i] .](http://upload.wikimedia.org/math/2/5/e/25edcb637ab69b6f63cb08de9c326157.png)
![a_i = \arg \min ~E\{e^2[n]\} ,](http://upload.wikimedia.org/math/f/6/7/f67cd9bd8ba060e78e08c27d1786f725.png)
![\begin{array}{rcl}
E\{e^2[n]\} &=& E\{(x[n]-s[n])^2\}\\
&=& E\{x^2[n]\} + E\{s^2[n]\} - 2E\{x[n]s[n]\}\\
&=& E\{\big( \sum_{i=0}^N a_i w[n-i] \big)^2\} + E\{s^2[n]\} - 2E\{\sum_{i=0}^N a_i w[n-i]s[n]\} .
\end{array}](http://upload.wikimedia.org/math/4/2/8/4285107c56e77402580a6ba86a079e1c.png)
![\begin{array}{rcl}
\frac{\partial}{\partial a_i} E\{e^2[n]\} &=& 2E\{ \big( \sum_{j=0}^N a_j w[n-j] \big) w[n-i] \} - 2E\{s[n]w[n-i]\} \quad i=0,\, \ldots,\, N\\
&=& 2 \sum_{j=0}^N E\{w[n-j]w[n-i]\} a_j - 2E\{ w[n-i]s[n]\} .
\end{array}](http://upload.wikimedia.org/math/e/2/9/e299408f3386e553f792782cd68c0306.png)
![\begin{align}
R_w[m] =& E\{w[n]w[n+m]\} \\
R_{ws}[m] =& E\{w[n]s[n+m]\} .
\end{align}](http://upload.wikimedia.org/math/9/d/4/9d4a5870336bed73cc523fd73d5bbc37.png)
![\frac{\partial}{\partial a_i} E\{e^2[n]\} = 2 \sum_{j=0}^{N} R_w[j-i] a_j - 2 R_{sw}[i] \quad i = 0,\, \ldots,\, N .](http://upload.wikimedia.org/math/8/8/6/886f213bdf588b55ac2cc22ae3573ff9.png)
![\sum_{j=0}^N R_w[j-i] a_j = R_{sw}[i] \quad i = 0,\, \ldots,\, N ,](http://upload.wikimedia.org/math/7/5/9/75998b961d229d548270c1912477fdd3.png)
![\begin{align}
&\mathbf{T}\mathbf{a} = \mathbf{v}\\
\Rightarrow
&\begin{bmatrix}
R_w[0] & R_w[1] & \cdots & R_w[N] \\
R_w[1] & R_w[0] & \cdots & R_w[N-1] \\
\vdots & \vdots & \ddots & \vdots \\
R_w[N] & R_w[N-1] & \cdots & R_w[0]
\end{bmatrix}
\begin{bmatrix}
a_0 \\ a_1 \\ \vdots \\ a_N
\end{bmatrix}
=
\begin{bmatrix}
R_{sw}[0] \\R_{sw}[1] \\ \vdots \\ R_{sw}[N]
\end{bmatrix}
\end{align}](http://upload.wikimedia.org/math/7/3/9/7393e158d10db4b633bb192ef47b891c.png)
