Functions | |
void | arm_fir_lattice_init_f32 (arm_fir_lattice_instance_f32 *S, uint16_t numStages, float32_t *pCoeffs, float32_t *pState) |
void | arm_fir_lattice_f32 (const arm_fir_lattice_instance_f32 *S, float32_t *pSrc, float32_t *pDst, uint32_t blockSize) |
void | arm_fir_lattice_init_q31 (arm_fir_lattice_instance_q31 *S, uint16_t numStages, q31_t *pCoeffs, q31_t *pState) |
void | arm_fir_lattice_q31 (const arm_fir_lattice_instance_q31 *S, q31_t *pSrc, q31_t *pDst, uint32_t blockSize) |
void | arm_fir_lattice_init_q15 (arm_fir_lattice_instance_q15 *S, uint16_t numStages, q15_t *pCoeffs, q15_t *pState) |
void | arm_fir_lattice_q15 (const arm_fir_lattice_instance_q15 *S, q15_t *pSrc, q15_t *pDst, uint32_t blockSize) |
This set of functions implements Finite Impulse Response (FIR) lattice filters for Q15, Q31 and floating-point data types. Lattice filters are used in a variety of adaptive filter applications. The filter structure is feedforward and the net impulse response is finite 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.
Finite Impulse Response Lattice filter
f0[n] = g0[n] = x[n] fm[n] = fm-1[n] + km * gm-1[n-1] for m = 1, 2, ...M gm[n] = km * fm-1[n] + gm-1[n-1] for m = 1, 2, ...M y[n] = fM[n]
pCoeffs
points to tha array of reflection coefficients of size numStages
. Reflection Coefficients are stored in the following order. {k1, k2, ..., kM}where M is number of stages
pState
points to a state array of size numStages
. The state variables (g values) hold previous inputs and are stored in the following order. {g0[n], g1[n], g2[n] ...gM-1[n]}The state variables are updated after each block of data is processed; the coefficients are untouched.
arm_fir_lattice_instance_f32 S = {numStages, pState, pCoeffs}; arm_fir_lattice_instance_q31 S = {numStages, pState, pCoeffs}; arm_fir_lattice_instance_q15 S = {numStages, pState, pCoeffs};
numStages
is the number of stages in the filter; pState
is the address of the state buffer; pCoeffs
is the address of the coefficient buffer. void arm_fir_lattice_init_f32 | ( | arm_fir_lattice_instance_f32 * | S, |
uint16_t | numStages, | ||
float32_t * | pCoeffs, | ||
float32_t * | pState | ||
) |
Initialization function for the floating-point FIR lattice filter.
[in] | *S | points to an instance of the floating-point FIR lattice structure. |
[in] | numStages | number of filter stages. |
[in] | *pCoeffs | points to the coefficient buffer. The array is of length numStages. |
[in] | *pState | points to the state buffer. The array is of length numStages. |
Definition at line 44 of file arm_fir_lattice_init_f32.c.
void arm_fir_lattice_f32 | ( | const arm_fir_lattice_instance_f32 * | S, |
float32_t * | pSrc, | ||
float32_t * | pDst, | ||
uint32_t | blockSize | ||
) |
Processing function for the floating-point FIR lattice filter.
[in] | *S | points to an instance of the floating-point FIR 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 112 of file arm_fir_lattice_f32.c.
void arm_fir_lattice_init_q31 | ( | arm_fir_lattice_instance_q31 * | S, |
uint16_t | numStages, | ||
q31_t * | pCoeffs, | ||
q31_t * | pState | ||
) |
Initialization function for the Q31 FIR lattice filter.
[in] | *S | points to an instance of the Q31 FIR lattice structure. |
[in] | numStages | number of filter stages. |
[in] | *pCoeffs | points to the coefficient buffer. The array is of length numStages. |
[in] | *pState | points to the state buffer. The array is of length numStages. |
Definition at line 44 of file arm_fir_lattice_init_q31.c.
void arm_fir_lattice_q31 | ( | const arm_fir_lattice_instance_q31 * | S, |
q31_t * | pSrc, | ||
q31_t * | pDst, | ||
uint32_t | blockSize | ||
) |
Processing function for the Q31 FIR lattice filter.
[in] | *S | points to an instance of the Q31 FIR 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: In order to avoid overflows the input signal must be scaled down by 2*log2(numStages) bits.
Definition at line 49 of file arm_fir_lattice_q31.c.
void arm_fir_lattice_init_q15 | ( | arm_fir_lattice_instance_q15 * | S, |
uint16_t | numStages, | ||
q15_t * | pCoeffs, | ||
q15_t * | pState | ||
) |
Initialization function for the Q15 FIR lattice filter.
[in] | *S | points to an instance of the Q15 FIR lattice structure. |
[in] | numStages | number of filter stages. |
[in] | *pCoeffs | points to the coefficient buffer. The array is of length numStages. |
[in] | *pState | points to the state buffer. The array is of length numStages. |
Definition at line 44 of file arm_fir_lattice_init_q15.c.
void arm_fir_lattice_q15 | ( | const arm_fir_lattice_instance_q15 * | S, |
q15_t * | pSrc, | ||
q15_t * | pDst, | ||
uint32_t | blockSize | ||
) |
Processing function for the Q15 FIR lattice filter.
[in] | *S | points to an instance of the Q15 FIR 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 45 of file arm_fir_lattice_q15.c.