IIR Filter¶
This module implements Infinite Impulse Response (IIR) filters of generic order. Filtered data follows the following formula:
y[n] = b[0] * x[n] + b[1] * x[n-1] + ... + b[size_b - 1] * x[n - size_b + 1]
- a[0] * y[n-1] - a[1] * y[n-2] - ... - a[size_a - 1] * y[n - size_a]
x[]
the input array withn
entries;b[]
the Feedforward filter coefficients array withsize_b
entries;y[]
the output array withn
entries;a[]
the Feedback filter coefficients array withsize_a
entries.
class IIR_FILTER¶
IIR_FILTER(b, a)
b
and a
as coefficients. b
is the Feedforward filter coefficients list;a
is the Backward filter coefficients list;
method filter_array¶
filter_array(input, reset=False)
input
list and returns the resulting output. input
is the input data list to filter;reset
if set toTrue
, old values stored in the filter are cleared before filtering the new data. Default value isFalse
.
Return a list with the filtered output.
method reset¶
reset()
method destroy¶
destroy()