Overload List
| # | Signature | Description |
|---|---|---|
| 1 | void IirInit(TVec Num, TVec Den, ref TIirState IIRState, Boolean ComplexData) | Initialize an IIR filter. |
| 2 | void IirInit(TVec Taps, ref TIirState IIRState, Boolean ComplexData) | Initialize an IIR filter. |
Overload 1: void IirInit(TVec Num, TVec Den, ref TIirState IIRState, Boolean ComplexData)
Initialize an IIR filter.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Num | TVec | source TVec |
| 2 | Den | TVec | source TVec |
| 3 | IIRState | TIirState (ref) | |
| 4 | ComplexData | Boolean |
Result: stored in self (calling object)
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.
Overload 2: void IirInit(TVec Taps, ref TIirState IIRState, Boolean ComplexData)
Initialize an IIR filter.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Taps | TVec | source TVec |
| 2 | IIRState | TIirState (ref) | |
| 3 | ComplexData | Boolean |
Result: stored in self (calling object)
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