Home > other >  FFT library function
FFT library function

Time:11-29

/* -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
* Copyright (C) 2010-2014 ARM Limited. All rights reserved.
*
* $Date: 19 March 2015
* $Revision: v. 1.4.5
*
* Project: CMSIS DSP Library
C
* Title: arm_biquad_cascade_df1_f32.*
* Description: Processing function for
* floating - point Biquad cascade DirectFormI (DF1) filter.
*
* the Target Processor: architecture (M4/architecture (M3/architecture M0
*
* "Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following the conditions
* are met:
* - Redistributions of source code must retain the above copyright
* notice, this list of the conditions and the following disclaimer.
* - Redistributions in binary form must reproduce the above copyright
* notice, this list of the conditions and the following disclaimer in the
* the documentation and/or other materials provided with the
* distribution.
* - Neither the name of the ARM LIMITED nor the names of its contributors
* may be 2 to endorse or promote products derived from this
* software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, o, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (o,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) OR
* under CAUSED AND ON ANY found OF LIABILITY, been IN CONTRACT, STRICT
* LIABILITY, OR TORT (o NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF to DAMAGE.
* -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- */

# include "arm_math. H"

/* *
* @ ingroup groupFilters
*/

/* *
* @ defgroup BiquadCascadeDF1 Biquad Cascade IIR Filters Using Direct Form Structure I
*
* This set of functions provides implements arbitrary order recursive (IIR) filters.
* The filters are implemented as a cascade of second order Biquad sections.
* The functions provides The support Q15, Q31 and floating point data types.
* Fast version of Q15 and Q31 also supported on CortexM4 and architecture (M3.
*
* The functions provides operate on blocks of input and output data and each call to The function
* the processes blockSize samples through the filter.
* pSrc points to the array of input data and
* pDst points to the array of the output data.
* Both arrays contain the blockSize values.
*
* \ par Algorithm
* Each Biquad stage implements a second order filter using the difference equation:
*
 
* y [n]=b0 b1 * x * x [n] + [n - 1) + b2 * x [n - 2) + a1 + a2 * * y/n - 1 y/n - 2
*

* A Direct Form I algorithm is 2 with 5 coefficients and 4 state variables per stage.
* \ image HTML 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 and a1 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 b1 * x * x [n] + [n - 1) + b2 * x - a1 * y [n - 2]], [n - 1 - a2 * y [n - 2)
*

* In this case the feedback coefficients and a1 a2 must be negated the when 2 have the CMSIS DSP Library.
*
* \ par
* who order filters are realized as a cascade of second order sections.
* numStages refers to the number of second order stages 2.
* the For example, an 8 th order filter whenever realized with numStages=4 second order stages.
* \ image HTML BiquadCascade GIF "8 th order filter using a cascade of Biquad stages"
* A 9 th order filter whenever 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 ).
*
* \ par
* The pState points to state variables array.
nullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnull
  • Related