# wiener filter (non-causal) calculating covariance matrices

I'm learning about the Wiener filter, and I'm working on my own implementation. I'm starting out with the non-causal filter, and I need to calculate some covariance matrices. If the signal is assumed to be a linear combination of a target signal and noise, then the signal can be modeled as: $$x[n] = y[n] + w[n]$$ where x is the observed signal, y is the target and w is noise. If I understand correctly, the weiner filter is a linear-minimum-mean-square-error estimation process. What I'm getting hung up on is that we need to compute a matrix of expected values based on the input signal x, namely $$E[xx^{T}]$$ and I know that to do this we need to apply the expectation operator to each element in the matrix $$xx^{T}$$ but I don't know how to do that computation, or what it even means.

## 1 Answer

The expectation operator can not be applied in real.In Weiner filter you will require to find the value of R i.e. correlation matrix of input signal which is ideally E[X(n)X'(n)] and also P i.e cross correlation matrix of input signal and desired signal E[X(n)d(n)]. Actual meaning of this expectation is that the correlation is obtained by using a large number of realisation of the input signal called ensemble .But in reality we have only one realisation and that is the input signal which you are going to apply to the weiner filter to calculate output. hence its exact value cant be find out. and therefore to use weiner filter in reality we require to apply various approximations to calculations of covariance matrix which finally result in various adaptive algorithms .As an example ,LMS algorithm which uses the following approximations for above matrices, R=X(n)*X'(n) and P= X(n)d(n) Now these values can be calculated using the only available realisation of signal.Although these Algorithms do not provide full convergence to weiner solution but approximates weights close to weiner solution. This error in solution is the result of approximation used. Weiner solution is actually the ideal solution of a adaptive filter hence it can not be attained because the Expectation operation can be applied in theory but practical implementation is impossible. LMS,NLMS,BLMS,RLS these are some other algorithms that can also be used .each have its own good side and a bad side and have to be applied according to necessity.

• Thank you, this helped tremendously. All the resources that I had looked at never mentioned that the matrices couldn't be computed directly. Jan 20 '14 at 4:10