From 96d6da4e252b06dcfdc041e7df23e86161c33007 Mon Sep 17 00:00:00 2001 From: rihab kouki Date: Tue, 28 Jul 2020 11:24:49 +0100 Subject: Official ARM version: v5.6.0 --- docs/DSP/html/group__BiquadCascadeDF1.html | 227 +++++++++++++---------------- 1 file changed, 102 insertions(+), 125 deletions(-) (limited to 'docs/DSP/html/group__BiquadCascadeDF1.html') diff --git a/docs/DSP/html/group__BiquadCascadeDF1.html b/docs/DSP/html/group__BiquadCascadeDF1.html index 46d4ca2..d90de8f 100644 --- a/docs/DSP/html/group__BiquadCascadeDF1.html +++ b/docs/DSP/html/group__BiquadCascadeDF1.html @@ -32,7 +32,7 @@ Logo
CMSIS-DSP -  Version 1.5.2 +  Version 1.7.0
CMSIS DSP Software Library
@@ -116,33 +116,33 @@ $(document).ready(function(){initNavTree('group__BiquadCascadeDF1.html','');}); - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + +

Functions

void arm_biquad_cascade_df1_f32 (const arm_biquad_casd_df1_inst_f32 *S, float32_t *pSrc, float32_t *pDst, uint32_t blockSize)
 Processing function for the floating-point Biquad cascade filter. More...
 
void arm_biquad_cascade_df1_fast_q15 (const arm_biquad_casd_df1_inst_q15 *S, q15_t *pSrc, q15_t *pDst, uint32_t blockSize)
 Fast but less precise processing function for the Q15 Biquad cascade filter for Cortex-M3 and Cortex-M4. More...
 
void arm_biquad_cascade_df1_fast_q31 (const arm_biquad_casd_df1_inst_q31 *S, q31_t *pSrc, q31_t *pDst, uint32_t blockSize)
 Fast but less precise processing function for the Q31 Biquad cascade filter for Cortex-M3 and Cortex-M4. More...
 
void arm_biquad_cascade_df1_init_f32 (arm_biquad_casd_df1_inst_f32 *S, uint8_t numStages, float32_t *pCoeffs, float32_t *pState)
 Initialization function for the floating-point Biquad cascade filter. More...
 
void arm_biquad_cascade_df1_init_q15 (arm_biquad_casd_df1_inst_q15 *S, uint8_t numStages, q15_t *pCoeffs, q15_t *pState, int8_t postShift)
 Initialization function for the Q15 Biquad cascade filter. More...
 
void arm_biquad_cascade_df1_init_q31 (arm_biquad_casd_df1_inst_q31 *S, uint8_t numStages, q31_t *pCoeffs, q31_t *pState, int8_t postShift)
 Initialization function for the Q31 Biquad cascade filter. More...
 
void arm_biquad_cascade_df1_q15 (const arm_biquad_casd_df1_inst_q15 *S, q15_t *pSrc, q15_t *pDst, uint32_t blockSize)
 Processing function for the Q15 Biquad cascade filter. More...
 
void arm_biquad_cascade_df1_q31 (const arm_biquad_casd_df1_inst_q31 *S, q31_t *pSrc, q31_t *pDst, uint32_t blockSize)
 Processing function for the Q31 Biquad cascade filter. More...
 
void arm_biquad_cascade_df1_f32 (const arm_biquad_casd_df1_inst_f32 *S, const float32_t *pSrc, float32_t *pDst, uint32_t blockSize)
 Processing function for the floating-point Biquad cascade filter. More...
 
void arm_biquad_cascade_df1_fast_q15 (const arm_biquad_casd_df1_inst_q15 *S, const q15_t *pSrc, q15_t *pDst, uint32_t blockSize)
 Processing function for the Q15 Biquad cascade filter (fast variant). More...
 
void arm_biquad_cascade_df1_fast_q31 (const arm_biquad_casd_df1_inst_q31 *S, const q31_t *pSrc, q31_t *pDst, uint32_t blockSize)
 Processing function for the Q31 Biquad cascade filter (fast variant). More...
 
void arm_biquad_cascade_df1_init_f32 (arm_biquad_casd_df1_inst_f32 *S, uint8_t numStages, const float32_t *pCoeffs, float32_t *pState)
 Initialization function for the floating-point Biquad cascade filter. More...
 
void arm_biquad_cascade_df1_init_q15 (arm_biquad_casd_df1_inst_q15 *S, uint8_t numStages, const q15_t *pCoeffs, q15_t *pState, int8_t postShift)
 Initialization function for the Q15 Biquad cascade filter. More...
 
void arm_biquad_cascade_df1_init_q31 (arm_biquad_casd_df1_inst_q31 *S, uint8_t numStages, const q31_t *pCoeffs, q31_t *pState, int8_t postShift)
 Initialization function for the Q31 Biquad cascade filter. More...
 
void arm_biquad_cascade_df1_q15 (const arm_biquad_casd_df1_inst_q15 *S, const q15_t *pSrc, q15_t *pDst, uint32_t blockSize)
 Processing function for the Q15 Biquad cascade filter. More...
 
void arm_biquad_cascade_df1_q31 (const arm_biquad_casd_df1_inst_q31 *S, const q31_t *pSrc, q31_t *pDst, uint32_t blockSize)
 Processing function for the Q31 Biquad cascade filter. More...
 

Description

-

This set of functions implements arbitrary order recursive (IIR) filters. The filters are implemented as a cascade of second order Biquad sections. The functions support Q15, Q31 and floating-point data types. Fast version of Q15 and Q31 also supported on CortexM4 and Cortex-M3.

+

This set of functions implements arbitrary order recursive (IIR) filters. The filters are implemented as a cascade of second order Biquad sections. The functions support Q15, Q31 and floating-point data types. Fast version of Q15 and Q31 also available.

The functions operate on blocks of input and output data and each call to the function processes blockSize samples through the filter. pSrc points to the array of input data and pDst points to the array of output data. Both arrays contain blockSize values.

Algorithm
Each Biquad stage implements a second order filter using the difference equation:
     y[n] = b0 * x[n] + b1 * x[n-1] + b2 * x[n-2] + a1 * y[n-1] + a2 * y[n-2]
@@ -150,20 +150,20 @@ Functions
 Biquad.gif
 
Single Biquad filter stage
-Coefficients b0, b1 and b2 multiply the input signal x[n] and are referred to as the feedforward coefficients. Coefficients a1 and a2 multiply the output signal y[n] and are referred to as the feedback coefficients. Pay careful attention to the sign of the feedback coefficients. Some design tools use the difference equation
+ Coefficients b0, b1 and b2  multiply the input signal x[n] and are referred to as the feedforward coefficients. Coefficients a1 and a2 multiply the output signal y[n] and are referred to as the feedback coefficients. Pay careful attention to the sign of the feedback coefficients. Some design tools use the difference equation 
     y[n] = b0 * x[n] + b1 * x[n-1] + b2 * x[n-2] - a1 * y[n-1] - a2 * y[n-2]
 
In this case the feedback coefficients a1 and a2 must be negated when used with the CMSIS DSP Library.
Higher order filters are realized as a cascade of second order sections. numStages refers to the number of second order stages used. For example, an 8th order filter would be realized with numStages=4 second order stages.
BiquadCascade.gif
8th order filter using a cascade of Biquad stages
-A 9th order filter would be realized with numStages=5 second order stages with the coefficients for one of the stages configured as a first order filter (b2=0 and a2=0).
+ A 9th order filter would be realized with numStages=5 second order stages with the coefficients for one of the stages configured as a first order filter (b2=0 and a2=0).
The pState points to state variables array. Each Biquad stage has 4 state variables x[n-1], x[n-2], y[n-1], and y[n-2]. The state variables are arranged in the pState array as:
     {x[n-1], x[n-2], y[n-1], y[n-2]}
 
The 4 state variables for stage 1 are first, then the 4 state variables for stage 2, and so on. The state array has a total length of 4*numStages values. The state variables are updated after each block of data is processed, the coefficients are untouched.
Instance Structure
The coefficients and state variables for a filter are stored together in an instance data structure. A separate instance structure must be defined for each filter. Coefficient arrays may be shared among several instances while state variable arrays cannot be shared. There are separate instance structure declarations for each of the 3 supported data types.
-
Init Functions
There is also an associated initialization function for each data type. The initialization function performs following operations:
    +
    Init Function
    There is also an associated initialization function for each data type. The initialization function performs following operations:
    • Sets the values of the internal structure fields.
    • Zeros out the values in the state buffer. To do this manually without calling the init function, assign the follow subfields of the instance structure: numStages, pCoeffs, pState. Also set all of the values in pState to zero.
    @@ -179,19 +179,19 @@ A 9th order filter would be realized with numStages=5 second order
  • Overflow and saturation
-
Scaling of coefficients: Filter coefficients are represented as fractional values and coefficients are restricted to lie in the range [-1 +1). The fixed-point functions have an additional scaling parameter postShift which allow the filter coefficients to exceed the range [+1 -1). At the output of the filter's accumulator is a shift register which shifts the result by postShift bits.
+
Scaling of coefficients
Filter coefficients are represented as fractional values and coefficients are restricted to lie in the range [-1 +1). The fixed-point functions have an additional scaling parameter postShift which allow the filter coefficients to exceed the range [+1 -1). At the output of the filter's accumulator is a shift register which shifts the result by postShift bits.
BiquadPostshift.gif
Fixed-point Biquad with shift by postShift bits after accumulator
-This essentially scales the filter coefficients by 2^postShift. For example, to realize the coefficients
+ This essentially scales the filter coefficients by 2^postShift. For example, to realize the coefficients 
    {1.5, -0.8, 1.2, 1.6, -0.9}
 
set the pCoeffs array to:
    {0.75, -0.4, 0.6, 0.8, -0.45}
 
and set postShift=1
-
Filter gain: The frequency response of a Biquad filter is a function of its coefficients. It is possible for the gain through the filter to exceed 1.0 meaning that the filter increases the amplitude of certain frequencies. This means that an input signal with amplitude < 1.0 may result in an output > 1.0 and these are saturated or overflowed based on the implementation of the filter. To avoid this behavior the filter needs to be scaled down such that its peak gain < 1.0 or the input signal must be scaled down so that the combination of input and filter are never overflowed.
-
Overflow and saturation: For Q15 and Q31 versions, it is described separately as part of the function specific documentation below.
+
Filter gain
The frequency response of a Biquad filter is a function of its coefficients. It is possible for the gain through the filter to exceed 1.0 meaning that the filter increases the amplitude of certain frequencies. This means that an input signal with amplitude < 1.0 may result in an output > 1.0 and these are saturated or overflowed based on the implementation of the filter. To avoid this behavior the filter needs to be scaled down such that its peak gain < 1.0 or the input signal must be scaled down so that the combination of input and filter are never overflowed.
+
Overflow and saturation
For Q15 and Q31 versions, it is described separately as part of the function specific documentation below.

Function Documentation

- +
@@ -204,7 +204,7 @@ This essentially scales the filter coefficients by 2^postShift. For - + @@ -228,20 +228,18 @@ This essentially scales the filter coefficients by 2^postShift. For
Parameters
float32_tconst float32_t pSrc,
- - - - + + + +
[in]*Spoints to an instance of the floating-point Biquad cascade structure.
[in]*pSrcpoints to the block of input data.
[out]*pDstpoints to the block of output data.
[in]blockSizenumber of samples to process per call.
[in]Spoints to an instance of the floating-point Biquad cascade structure
[in]pSrcpoints to the block of input data
[out]pDstpoints to the block of output data
[in]blockSizenumber of samples to process
-
Returns
none.
- -

References blockSize, arm_biquad_casd_df1_inst_f32::numStages, arm_biquad_casd_df1_inst_f32::pCoeffs, and arm_biquad_casd_df1_inst_f32::pState.

+
Returns
none
- +
@@ -254,7 +252,7 @@ This essentially scales the filter coefficients by 2^postShift. For - + @@ -276,25 +274,23 @@ This essentially scales the filter coefficients by 2^postShift. For
q15_tconst q15_t pSrc,
+

Fast but less precise processing function for the Q15 Biquad cascade filter for Cortex-M3 and Cortex-M4.

Parameters
- - - - + + + +
[in]*Spoints to an instance of the Q15 Biquad cascade structure.
[in]*pSrcpoints to the block of input data.
[out]*pDstpoints to the block of output data.
[in]blockSizenumber of samples to process per call.
[in]Spoints to an instance of the Q15 Biquad cascade structure
[in]pSrcpoints to the block of input data
[out]pDstpoints to the block of output data
[in]blockSizenumber of samples to process per call
-
Returns
none.
-

Scaling and Overflow Behavior:

-
This fast version uses a 32-bit accumulator with 2.30 format. The accumulator maintains full precision of the intermediate multiplication results but provides only a single guard bit. Thus, if the accumulator result overflows it wraps around and distorts the result. In order to avoid overflows completely the input signal must be scaled down by two bits and lie in the range [-0.25 +0.25). The 2.30 accumulator is then shifted by postShift bits and the result truncated to 1.15 format by discarding the low 16 bits.
-
Refer to the function arm_biquad_cascade_df1_q15() for a slower implementation of this function which uses 64-bit accumulation to avoid wrap around distortion. Both the slow and the fast versions use the same instance structure. Use the function arm_biquad_cascade_df1_init_q15() to initialize the filter structure.
- -

References __PKHBT, __SIMD32, __SMLAD(), __SMUAD(), __SMUADX(), arm_biquad_casd_df1_inst_q15::numStages, arm_biquad_casd_df1_inst_q15::pCoeffs, arm_biquad_casd_df1_inst_q15::postShift, and arm_biquad_casd_df1_inst_q15::pState.

+
Returns
none
+
Scaling and Overflow Behavior
This fast version uses a 32-bit accumulator with 2.30 format. The accumulator maintains full precision of the intermediate multiplication results but provides only a single guard bit. Thus, if the accumulator result overflows it wraps around and distorts the result. In order to avoid overflows completely the input signal must be scaled down by two bits and lie in the range [-0.25 +0.25). The 2.30 accumulator is then shifted by postShift bits and the result truncated to 1.15 format by discarding the low 16 bits.
+
Remarks
Refer to arm_biquad_cascade_df1_q15() for a slower implementation of this function which uses 64-bit accumulation to avoid wrap around distortion. Both the slow and the fast versions use the same instance structure. Use the function arm_biquad_cascade_df1_init_q15() to initialize the filter structure.
- +
@@ -307,7 +303,7 @@ This essentially scales the filter coefficients by 2^postShift. For - + @@ -329,25 +325,23 @@ This essentially scales the filter coefficients by 2^postShift. For
q31_tconst q31_t pSrc,
+

Fast but less precise processing function for the Q31 Biquad cascade filter for Cortex-M3 and Cortex-M4.

Parameters
- - - - + + + +
[in]*Spoints to an instance of the Q31 Biquad cascade structure.
[in]*pSrcpoints to the block of input data.
[out]*pDstpoints to the block of output data.
[in]blockSizenumber of samples to process per call.
[in]Spoints to an instance of the Q31 Biquad cascade structure
[in]pSrcpoints to the block of input data
[out]pDstpoints to the block of output data
[in]blockSizenumber of samples to process per call
-
Returns
none.
-

Scaling and Overflow Behavior:

-
This function is optimized for speed at the expense of fixed-point precision and overflow protection. The result of each 1.31 x 1.31 multiplication is truncated to 2.30 format. These intermediate results are added to a 2.30 accumulator. Finally, the accumulator is saturated and converted to a 1.31 result. The fast version has the same overflow behavior as the standard version and provides less precision since it discards the low 32 bits of each multiplication result. In order to avoid overflows completely the input signal must be scaled down by two bits and lie in the range [-0.25 +0.25). Use the intialization function arm_biquad_cascade_df1_init_q31() to initialize filter structure.
-
Refer to the function arm_biquad_cascade_df1_q31() for a slower implementation of this function which uses 64-bit accumulation to provide higher precision. Both the slow and the fast versions use the same instance structure. Use the function arm_biquad_cascade_df1_init_q31() to initialize the filter structure.
- -

References mult_32x32_keep32_R, multAcc_32x32_keep32_R, arm_biquad_casd_df1_inst_q31::numStages, arm_biquad_casd_df1_inst_q31::pCoeffs, arm_biquad_casd_df1_inst_q31::postShift, and arm_biquad_casd_df1_inst_q31::pState.

+
Returns
none
+
Scaling and Overflow Behavior
This function is optimized for speed at the expense of fixed-point precision and overflow protection. The result of each 1.31 x 1.31 multiplication is truncated to 2.30 format. These intermediate results are added to a 2.30 accumulator. Finally, the accumulator is saturated and converted to a 1.31 result. The fast version has the same overflow behavior as the standard version and provides less precision since it discards the low 32 bits of each multiplication result. In order to avoid overflows completely the input signal must be scaled down by two bits and lie in the range [-0.25 +0.25). Use the intialization function arm_biquad_cascade_df1_init_q31() to initialize filter structure.
+
Remarks
Refer to arm_biquad_cascade_df1_q31() for a slower implementation of this function which uses 64-bit accumulation to provide higher precision. Both the slow and the fast versions use the same instance structure. Use the function arm_biquad_cascade_df1_init_q31() to initialize the filter structure.
- +
@@ -366,7 +360,7 @@ This essentially scales the filter coefficients by 2^postShift. For - + @@ -384,28 +378,25 @@ This essentially scales the filter coefficients by 2^postShift. For
Parameters
float32_tconst float32_t pCoeffs,
- + - - + +
[in,out]*Spoints to an instance of the floating-point Biquad cascade structure.
[in,out]Spoints to an instance of the floating-point Biquad cascade structure.
[in]numStagesnumber of 2nd order stages in the filter.
[in]*pCoeffspoints to the filter coefficients array.
[in]*pStatepoints to the state array.
[in]pCoeffspoints to the filter coefficients.
[in]pStatepoints to the state buffer.
Returns
none
-

Coefficient and State Ordering:

-
The coefficients are stored in the array pCoeffs in the following order:
+
Coefficient and State Ordering
The coefficients are stored in the array pCoeffs in the following order:
     {b10, b11, b12, a11, a12, b20, b21, b22, a21, a22, ...}
 
-
where b1x and a1x are the coefficients for the first stage, b2x and a2x are the coefficients for the second stage, and so on. The pCoeffs array contains a total of 5*numStages values.
+
where b1x and a1x are the coefficients for the first stage, b2x and a2x are the coefficients for the second stage, and so on. The pCoeffs array contains a total of 5*numStages values.
The pState is a pointer to state array. Each Biquad stage has 4 state variables x[n-1], x[n-2], y[n-1], and y[n-2]. The state variables are arranged in the pState array as:
     {x[n-1], x[n-2], y[n-1], y[n-2]}
 
The 4 state variables for stage 1 are first, then the 4 state variables for stage 2, and so on. The state array has a total length of 4*numStages values. The state variables are updated after each block of data is processed; the coefficients are untouched.
-

References arm_biquad_casd_df1_inst_f32::numStages, arm_biquad_casd_df1_inst_f32::pCoeffs, and arm_biquad_casd_df1_inst_f32::pState.

-
- +
@@ -424,7 +415,7 @@ This essentially scales the filter coefficients by 2^postShift. For - + @@ -448,28 +439,26 @@ This essentially scales the filter coefficients by 2^postShift. For
Parameters
q15_tconst q15_t pCoeffs,
- + - - + +
[in,out]*Spoints to an instance of the Q15 Biquad cascade structure.
[in,out]Spoints to an instance of the Q15 Biquad cascade structure.
[in]numStagesnumber of 2nd order stages in the filter.
[in]*pCoeffspoints to the filter coefficients.
[in]*pStatepoints to the state buffer.
[in]pCoeffspoints to the filter coefficients.
[in]pStatepoints to the state buffer.
[in]postShiftShift to be applied to the accumulator result. Varies according to the coefficients format
Returns
none
-

Coefficient and State Ordering:

-
The coefficients are stored in the array pCoeffs in the following order:
+
Coefficient and State Ordering
The coefficients are stored in the array pCoeffs in the following order:
     {b10, 0, b11, b12, a11, a12, b20, 0, b21, b22, a21, a22, ...}
-
where b1x and a1x are the coefficients for the first stage, b2x and a2x are the coefficients for the second stage, and so on. The pCoeffs array contains a total of 6*numStages values. The zero coefficient between b1 and b2 facilities use of 16-bit SIMD instructions on the Cortex-M4.
+
+
where b1x and a1x are the coefficients for the first stage, b2x and a2x are the coefficients for the second stage, and so on. The pCoeffs array contains a total of 6*numStages values. The zero coefficient between b1 and b2 facilities use of 16-bit SIMD instructions on the Cortex-M4.
The state variables are stored in the array pState. Each Biquad stage has 4 state variables x[n-1], x[n-2], y[n-1], and y[n-2]. The state variables are arranged in the pState array as:
     {x[n-1], x[n-2], y[n-1], y[n-2]}
 
The 4 state variables for stage 1 are first, then the 4 state variables for stage 2, and so on. The state array has a total length of 4*numStages values. The state variables are updated after each block of data is processed; the coefficients are untouched.
-

References arm_biquad_casd_df1_inst_q15::numStages, arm_biquad_casd_df1_inst_q15::pCoeffs, arm_biquad_casd_df1_inst_q15::postShift, and arm_biquad_casd_df1_inst_q15::pState.

-
- +
@@ -488,7 +477,7 @@ This essentially scales the filter coefficients by 2^postShift. For - + @@ -512,30 +501,26 @@ This essentially scales the filter coefficients by 2^postShift. For
Parameters
q31_tconst q31_t pCoeffs,
- + - - + +
[in,out]*Spoints to an instance of the Q31 Biquad cascade structure.
[in,out]Spoints to an instance of the Q31 Biquad cascade structure.
[in]numStagesnumber of 2nd order stages in the filter.
[in]*pCoeffspoints to the filter coefficients buffer.
[in]*pStatepoints to the state buffer.
[in]pCoeffspoints to the filter coefficients.
[in]pStatepoints to the state buffer.
[in]postShiftShift to be applied after the accumulator. Varies according to the coefficients format
Returns
none
-

Coefficient and State Ordering:

-
The coefficients are stored in the array pCoeffs in the following order:
+
Coefficient and State Ordering
The coefficients are stored in the array pCoeffs in the following order:
     {b10, b11, b12, a11, a12, b20, b21, b22, a21, a22, ...}
-
where b1x and a1x are the coefficients for the first stage, b2x and a2x are the coefficients for the second stage, and so on. The pCoeffs array contains a total of 5*numStages values.
+
+
where b1x and a1x are the coefficients for the first stage, b2x and a2x are the coefficients for the second stage, and so on. The pCoeffs array contains a total of 5*numStages values.
The pState points to state variables array. Each Biquad stage has 4 state variables x[n-1], x[n-2], y[n-1], and y[n-2]. The state variables are arranged in the pState array as:
     {x[n-1], x[n-2], y[n-1], y[n-2]}
 
The 4 state variables for stage 1 are first, then the 4 state variables for stage 2, and so on. The state array has a total length of 4*numStages values. The state variables are updated after each block of data is processed; the coefficients are untouched.
-

References arm_biquad_casd_df1_inst_q31::numStages, arm_biquad_casd_df1_inst_q31::pCoeffs, arm_biquad_casd_df1_inst_q31::postShift, and arm_biquad_casd_df1_inst_q31::pState.

- -

Referenced by main().

-
- +
@@ -548,7 +533,7 @@ This essentially scales the filter coefficients by 2^postShift. For - + @@ -572,23 +557,20 @@ This essentially scales the filter coefficients by 2^postShift. For
Parameters
q15_tconst q15_t pSrc,
- - - - + + + +
[in]*Spoints to an instance of the Q15 Biquad cascade structure.
[in]*pSrcpoints to the block of input data.
[out]*pDstpoints to the location where the output result is written.
[in]blockSizenumber of samples to process per call.
[in]Spoints to an instance of the Q15 Biquad cascade structure
[in]pSrcpoints to the block of input data
[out]pDstpoints to the location where the output result is written
[in]blockSizenumber of samples to process
-
Returns
none.
-

Scaling and Overflow Behavior:

-
The function is implemented using a 64-bit internal accumulator. Both coefficients and state variables are represented in 1.15 format and multiplications yield a 2.30 result. The 2.30 intermediate results are accumulated in a 64-bit accumulator in 34.30 format. There is no risk of internal overflow with this approach and the full precision of intermediate multiplications is preserved. The accumulator is then shifted by postShift bits to truncate the result to 1.15 format by discarding the low 16 bits. Finally, the result is saturated to 1.15 format.
-
Refer to the function arm_biquad_cascade_df1_fast_q15() for a faster but less precise implementation of this filter for Cortex-M3 and Cortex-M4.
- -

References __PKHBT, __SIMD32, __SMLALD(), __SMUAD(), __SMUADX(), arm_biquad_casd_df1_inst_q15::numStages, arm_biquad_casd_df1_inst_q15::pCoeffs, arm_biquad_casd_df1_inst_q15::postShift, and arm_biquad_casd_df1_inst_q15::pState.

+
Returns
none
+
Scaling and Overflow Behavior
The function is implemented using a 64-bit internal accumulator. Both coefficients and state variables are represented in 1.15 format and multiplications yield a 2.30 result. The 2.30 intermediate results are accumulated in a 64-bit accumulator in 34.30 format. There is no risk of internal overflow with this approach and the full precision of intermediate multiplications is preserved. The accumulator is then shifted by postShift bits to truncate the result to 1.15 format by discarding the low 16 bits. Finally, the result is saturated to 1.15 format.
+
Remarks
Refer to arm_biquad_cascade_df1_fast_q15() for a faster but less precise implementation of this filter.
- +
@@ -601,7 +583,7 @@ This essentially scales the filter coefficients by 2^postShift. For - + @@ -625,21 +607,16 @@ This essentially scales the filter coefficients by 2^postShift. For
Parameters
q31_tconst q31_t pSrc,
- - - - + + + +
[in]*Spoints to an instance of the Q31 Biquad cascade structure.
[in]*pSrcpoints to the block of input data.
[out]*pDstpoints to the block of output data.
[in]blockSizenumber of samples to process per call.
[in]Spoints to an instance of the Q31 Biquad cascade structure
[in]pSrcpoints to the block of input data
[out]pDstpoints to the block of output data
[in]blockSizenumber of samples to process
-
Returns
none.
-

Scaling and Overflow Behavior:

-
The function is implemented using an internal 64-bit accumulator. The accumulator has a 2.62 format and maintains full precision of the intermediate multiplication results but provides only a single guard bit. Thus, if the accumulator result overflows it wraps around rather than clip. In order to avoid overflows completely the input signal must be scaled down by 2 bits and lie in the range [-0.25 +0.25). After all 5 multiply-accumulates are performed, the 2.62 accumulator is shifted by postShift bits and the result truncated to 1.31 format by discarding the low 32 bits.
-
Refer to the function arm_biquad_cascade_df1_fast_q31() for a faster but less precise implementation of this filter for Cortex-M3 and Cortex-M4.
- -

References blockSize, arm_biquad_casd_df1_inst_q31::numStages, arm_biquad_casd_df1_inst_q31::pCoeffs, arm_biquad_casd_df1_inst_q31::postShift, and arm_biquad_casd_df1_inst_q31::pState.

- -

Referenced by main().

+
Returns
none
+
Scaling and Overflow Behavior
The function is implemented using an internal 64-bit accumulator. The accumulator has a 2.62 format and maintains full precision of the intermediate multiplication results but provides only a single guard bit. Thus, if the accumulator result overflows it wraps around rather than clip. In order to avoid overflows completely the input signal must be scaled down by 2 bits and lie in the range [-0.25 +0.25). After all 5 multiply-accumulates are performed, the 2.62 accumulator is shifted by postShift bits and the result truncated to 1.31 format by discarding the low 32 bits.
+
Remarks
Refer to arm_biquad_cascade_df1_fast_q31() for a faster but less precise implementation of this filter.
@@ -648,7 +625,7 @@ This essentially scales the filter coefficients by 2^postShift. For