filter_sois (1)
IIR filter implementation through a cascad of second order sections.
Prototype
sptr<FilterGen<T>> filter_sois(const FRat<cfloat> &h, RIIStructure structure=FormeDirecte2)
Parameters
h | Transfert function. |
structure | RIIStructure::FormeDirecte1 or RIIStructure::FormeDirecte2 (see notes below) |
Returns
real to real filter.
Description
The given transfert function is factored into a cascad of second order sections, and eventually a first order section if the whole filter order is odd, enabling an efficient implementation of a IIR filter:
The direct form II is a little more efficient than the form I. However, if the coefficients are to be reloaded while the filter is in use, the form II can generate discontinuities, which is not the case with the first form.
- Warning
- It is highly recommanded that the given transfert function is specified by its roots and poles rather by its coefficients, because in the latter case, the poles and zeros locations (and hence the frequency response) may be very unstable (high sensitivity to troncating errors). Note that the function design_iira() returns a correct tranfert function (zeros & poles).