| Electronic Components Datasheet Search |
|
PM0014 Datasheet(PDF) 41 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
PM0014 Datasheet(HTML) 41 Page - STMicroelectronics |
|
41 / 46 page ![]() PM0014 Signal processing library functions 41/46 6.4 Infinite impulse response filter 6.4.1 iir2_q15_q15_q15 iir2_q15_q15_q15 (struct Filter *IirPtr). Description: Real IIR filter of 16-bit fractional inputs, coefficients and outputs. The filter implemented is a direct form II. Argument: IirPtr Filter pointer. Algorithm: w(n) = x(n) + a(k) * w(n - k) Notes: The w(i) are the filter internal states and are saved in the delay line during computation. The delay line must be stored in DPRAM. Before the first call to the function, the delay line must be initialized to 0. The length of the delay line must be equal to the number of b(i) coefficients. As the number of b(i) coefficients is supposed to be equal to the number of a(i) coefficients, the length of the delay line is equal to IirNumberCoeffs/2. Library users must care about the a(i) coefficients. If their modulus are too great, the filter internal states w(i) can saturate. The output samples are in this condition false. The coefficient a0 must be initialized to 0. There is a saturation to 1 (respectively -1) if the computed output sample is greater than 1 (respectively lower than -1). Example of the use for iir2_q15_q15_q15: #define IirNumberCoeffs NumberOfCoefficients #define NbOutput NumberOfOutput iram short Delayline[IirNumberCoeffs/2]; iram short Coeff[IirNumberCoeffs]; void main() { // Data definition short Input[NbOutput]; short Out[NbOutput]; // Here should be the coef[] and input[] initialization. See the Test part... // Declare a filter structure struct Filter Filt; //Filter initialisation Filt.NumberCoeffs = IirNumberCoeffs; Filt.NumberOutputSamples = NbOutput; Filt.CoeffPtr = Coeff; Filt.InputPtr = Input; Filt.OutputPtr = Out; Filt.DelayLinePtr = Delayline; //Filter processing iir2_q15_q15_q15(&Filt); } k1 = IirNumberCoeff 2 ---------------------------------------------- 1 – |
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |