SPcorFilt
Routine

double SPcorFilt (double Ed, const float rxx[], const float r[], float h[],
int N)
Purpose

Find filter coefficients to minimize the meansquare error
Description
This procedure finds the filter coefficients for a linear filter which
minimizes the meansquare error. Consider a filter with N coefficients,
with coefficient h(i) corresponding to lag Nd+i. The filter output is
N1
y(k) = SUM h(i) x(kiNd) ,
i=0
where x(i) is the input signal. The filter error is
e(k) = d(k)  y(k) ,
where d(k) is the desired signal. To minimize the meansquare filtering
error, solve
R h = r,
where R is a symmetric positive definite correlation matrix, h is a vector
of filter coefficients and r is a vector of correlation values. The matrix
R and and vector r are defined as follows
R(i,j) = E[x(kiNd) x(kjNd)], for 0 <= i,j < N,
r(i) = E[d(k) x(kiNd], for 0 <= i < N.
For this routine, the matrix R must be symmetric and Toeplitz. Then
R(i,j) = rxx(ij).
The solution is determined using Levinson's method. The resulting
meansquare filtering error can be expressed as
ferr = Ed  2 h'r + h'R h
= Ed  h'r ,
where Ed is the meansquare value of the desired signal,
Ed = E[d(k)^2] .
Parameters

< double SPcorFmse

Resultant filter meansquare error

> double Ed

Signal energy for the desired signal. This value is used only for the
computation of the meansquare error.

> const float rxx[]

N element vector of autocorrelation values. Element rxx[i] is the
autocorrelation at lag i.

> const float r[]

N element vector of crosscorrelation values. Element r[i] is the
crosscorrelation at lag Nd+i.

< float h[]

N element vector of filter coefficients. Coefficient h[i] is the filter
coefficient corresponding to lag Nd+i.

> int N

Number of elements in each of the vectors rxx, h and r.
Author / revision
P. Kabal
/ Revision 1.6 2003/05/09
See Also
SPcorFmse,
SPcorXpc
Main Index libtsp