SignalUtils::IirInit Function

Overload List

#SignatureDescription
1void IirInit(TVec *Taps, TIirState &IIRState, bool ComplexData);Initialize an IIR filter.
2void IirInit(TVec *Num, TVec *Den, TIirState &IIRState, bool ComplexData = false);Initialize an IIR filter.

Overload 1: void IirInit(TVec *Taps, TIirState &IIRState, bool ComplexData);

Initialize an IIR filter.

#NameTypeDescription
1TapsTVec *
2IIRStateTIirState &
3ComplexDatabool
Remarks:

Initialize an IIR filter by initializing the IirState variable. Set ComplexData to True, if the data stream to be filtered will be complex. First half of the taps contains the numerator and the second half the denominator coefficients of the transfer function. The length of the taps vector is equal to 2*(IIrOrder + 1), where IirOrder is the order of the Iir filter. Transfer function:

        Sum( t[k]  *z^(-k) )
H(z) = --------------------- ,           from k = 0 to N-1.
        Sum( t[N+k]*z^(-k) )


N .. length of polynomial, N = Taps.Length/2.
N-1 .. order of the polynomial
t ... taps vector
Declared in Dew::Signal::Units::SignalUtils · Dew.Signal/Units.SignalUtils.h · Cross-compiler

Overload 2: void IirInit(TVec *Num, TVec *Den, TIirState &IIRState, bool ComplexData = false);

Initialize an IIR filter.

#NameTypeDescription
1NumTVec *
2DenTVec *
3IIRStateTIirState &
4ComplexData = falsebool
Remarks:

Num contains the numerator and Den the denominator coefficients of the transfer function. The length of the Num and Den must be equal. If the numerator is of lower order that the denominator, then the numerator should be padded with zeros from the left. Transfer function:

        Sum( b[k]*z^(-k) )
H(z) = ----------------------,    from k = 0 to N-1.
        Sum( a[k]*z^(-k) )

N = Num.Length = Den.Length.
b... Num vector
a... Den vector


H(z) is also written as:

        Sum( b[k]*z^(-k) )
H(z) = ----------------------,    k = 0.. N-1, m = 1..N-1
        1 - Sum( a[m]*z^(-m) )

a[0] must always be 1.

IIR filters evaluate the difference equation:

y[i] = b[0]*x[i] + b[1]*x[i-1] + ... + b[N]*x[i-N]
                 + a[1]*y[i-1] + ... + a[N]*y[i-N]

x[i] ... input sample
y[i] ... output (filtered) sample

References:

[1]Understanding digital signal processing, Richard G. Lyons, Prentice Hall, 2001.

See Also: SignalUtils::IirFilter, SignalUtils::IirFree, IIRFilters::ButterFilter, IIRFilters::ChebyshevIFilter, IIRFilters::ChebyshevIIFilter, IIRFilters::EllipticFilter, IIRFilters::BesselFilter
Declared in Dew::Signal::Units::SignalUtils · Dew.Signal/Units.SignalUtils.h · Cross-compiler