Functions for performing real Infinite Impulse Response (IIR) filters.
Single order direct form 1 biquad filter.
- Details
- Single order biquad filter with direct form 1 implementation. Q15 multiplication is performed with a 32-bit accumulator to avoid intermediate overflow with saturation to Q15 when storing the result.
Biquad DF1 structure
- Transfer Function
- Pseudo code
y[n] = b0 * x[n] + b1 * x[n-1] + b2 * x[n-2] - a1 * y[n-1] - a2 * y[n-2]
- Parameters
-
params | Pointer to the biquad direct form 1 parameter structure. |
src | Pointer to the source data to filter. |
dst | Pointer to the destination vector. |
- Returns
- Status of the operation.
Single order direct form 2 biquad filter.
- Details
- Single order direct form 2 biquad filter with bias and minimum and maximum result calculation. Q15 multiplication is performed with a 32-bit accumulator to avoid intermediate overflow with saturation to Q15 when storing the result. The maximum and minimum of the destination vector are returned for post processing.
Biquad DF2 structure
- Transfer Function
- Pseudo code
y[n] = b0 * w[n] + b1 * w[n-1] + b2 * w[n-2]
w[n] = x[n] - a1 * x[n-1] - a2 * x[n-1] - a3 * x[n-2]
- Parameters
-
params | Pointer to the biquad direct form 2 parameter structure. |
src | Pointer to the source data to filter. |
dst | Pointer to the destination vector. |
- Returns
- Status of the operation.