Functions | |
void | arm_iir_lattice_init_f32 (arm_iir_lattice_instance_f32 *S, uint16_t numStages, float32_t *pkCoeffs, float32_t *pvCoeffs, float32_t *pState, uint32_t blockSize) |
void | arm_iir_lattice_f32 (const arm_iir_lattice_instance_f32 *S, float32_t *pSrc, float32_t *pDst, uint32_t blockSize) |
void | arm_iir_lattice_init_q31 (arm_iir_lattice_instance_q31 *S, uint16_t numStages, q31_t *pkCoeffs, q31_t *pvCoeffs, q31_t *pState, uint32_t blockSize) |
void | arm_iir_lattice_q31 (const arm_iir_lattice_instance_q31 *S, q31_t *pSrc, q31_t *pDst, uint32_t blockSize) |
void | arm_iir_lattice_init_q15 (arm_iir_lattice_instance_q15 *S, uint16_t numStages, q15_t *pkCoeffs, q15_t *pvCoeffs, q15_t *pState, uint32_t blockSize) |
void | arm_iir_lattice_q15 (const arm_iir_lattice_instance_q15 *S, q15_t *pSrc, q15_t *pDst, uint32_t blockSize) |
This set of functions implements lattice filters for Q15, Q31 and floating-point data types. Lattice filters are used in a variety of adaptive filter applications. The filter structure has feedforward and feedback components and the net impulse response is infinite length. The functions operate on blocks of input and output data and each call to the function processes blockSize
samples through the filter. pSrc
and pDst
point to input and output arrays containing blockSize
values.
Infinite Impulse Response Lattice filter
fN(n) = x(n) fm-1(n) = fm(n) - km * gm-1(n-1) for m = N, N-1, ...1 gm(n) = km * fm-1(n) + gm-1(n-1) for m = N, N-1, ...1 y(n) = vN * gN(n) + vN-1 * gN-1(n) + ...+ v0 * g0(n)
pkCoeffs
points to array of reflection coefficients of size numStages
. Reflection coefficients are stored in time-reversed order. {kN, kN-1, ....k1}
pvCoeffs
points to the array of ladder coefficients of size (numStages+1)
. Ladder coefficients are stored in time-reversed order. {vN, vN-1, ...v0}
pState
points to a state array of size numStages + blockSize
. The state variables shown in the figure above (the g values) are stored in the pState
array. The state variables are updated after each block of data is processed; the coefficients are untouched. arm_iir_lattice_instance_f32 S = {numStages, pState, pkCoeffs, pvCoeffs}; arm_iir_lattice_instance_q31 S = {numStages, pState, pkCoeffs, pvCoeffs}; arm_iir_lattice_instance_q15 S = {numStages, pState, pkCoeffs, pvCoeffs};
numStages
is the number of stages in the filter; pState
points to the state buffer array; pkCoeffs
points to array of the reflection coefficients; pvCoeffs
points to the array of ladder coefficients. void arm_iir_lattice_init_f32 | ( | arm_iir_lattice_instance_f32 * | S, |
uint16_t | numStages, | ||
float32_t * | pkCoeffs, | ||
float32_t * | pvCoeffs, | ||
float32_t * | pState, | ||
uint32_t | blockSize | ||
) |
Initialization function for the floating-point IIR lattice filter.
[in] | *S | points to an instance of the floating-point IIR lattice structure. |
[in] | numStages | number of stages in the filter. |
[in] | *pkCoeffs | points to the reflection coefficient buffer. The array is of length numStages. |
[in] | *pvCoeffs | points to the ladder coefficient buffer. The array is of length numStages+1. |
[in] | *pState | points to the state buffer. The array is of length numStages+blockSize. |
[in] | blockSize | number of samples to process. |
Definition at line 46 of file arm_iir_lattice_init_f32.c.
void arm_iir_lattice_f32 | ( | const arm_iir_lattice_instance_f32 * | S, |
float32_t * | pSrc, | ||
float32_t * | pDst, | ||
uint32_t | blockSize | ||
) |
Processing function for the floating-point IIR lattice filter.
[in] | *S | points to an instance of the floating-point IIR lattice structure. |
[in] | *pSrc | points to the block of input data. |
[out] | *pDst | points to the block of output data. |
[in] | blockSize | number of samples to process. |
Definition at line 111 of file arm_iir_lattice_f32.c.
void arm_iir_lattice_init_q31 | ( | arm_iir_lattice_instance_q31 * | S, |
uint16_t | numStages, | ||
q31_t * | pkCoeffs, | ||
q31_t * | pvCoeffs, | ||
q31_t * | pState, | ||
uint32_t | blockSize | ||
) |
Initialization function for the Q31 IIR lattice filter.
[in] | *S | points to an instance of the Q31 IIR lattice structure. |
[in] | numStages | number of stages in the filter. |
[in] | *pkCoeffs | points to the reflection coefficient buffer. The array is of length numStages. |
[in] | *pvCoeffs | points to the ladder coefficient buffer. The array is of length numStages+1. |
[in] | *pState | points to the state buffer. The array is of length numStages+blockSize. |
[in] | blockSize | number of samples to process. |
Definition at line 46 of file arm_iir_lattice_init_q31.c.
void arm_iir_lattice_q31 | ( | const arm_iir_lattice_instance_q31 * | S, |
q31_t * | pSrc, | ||
q31_t * | pDst, | ||
uint32_t | blockSize | ||
) |
Processing function for the Q31 IIR lattice filter.
[in] | *S | points to an instance of the Q31 IIR lattice structure. |
[in] | *pSrc | points to the block of input data. |
[out] | *pDst | points to the block of output data. |
[in] | blockSize | number of samples to process. |
Scaling and Overflow Behavior:
Definition at line 53 of file arm_iir_lattice_q31.c.
void arm_iir_lattice_init_q15 | ( | arm_iir_lattice_instance_q15 * | S, |
uint16_t | numStages, | ||
q15_t * | pkCoeffs, | ||
q15_t * | pvCoeffs, | ||
q15_t * | pState, | ||
uint32_t | blockSize | ||
) |
Initialization function for the Q15 IIR lattice filter.
[in] | *S | points to an instance of the Q15 IIR lattice structure. |
[in] | numStages | number of stages in the filter. |
[in] | *pkCoeffs | points to reflection coefficient buffer. The array is of length numStages. |
[in] | *pvCoeffs | points to ladder coefficient buffer. The array is of length numStages+1. |
[in] | *pState | points to state buffer. The array is of length numStages+blockSize. |
[in] | blockSize | number of samples to process per call. |
Definition at line 46 of file arm_iir_lattice_init_q15.c.
void arm_iir_lattice_q15 | ( | const arm_iir_lattice_instance_q15 * | S, |
q15_t * | pSrc, | ||
q15_t * | pDst, | ||
uint32_t | blockSize | ||
) |
Processing function for the Q15 IIR lattice filter.
[in] | *S | points to an instance of the Q15 IIR lattice structure. |
[in] | *pSrc | points to the block of input data. |
[out] | *pDst | points to the block of output data. |
[in] | blockSize | number of samples to process. |
Scaling and Overflow Behavior:
Definition at line 54 of file arm_iir_lattice_q15.c.