| Electronic Components Datasheet Search |
|
RM0020 Datasheet(PDF) 48 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
RM0020 Datasheet(HTML) 48 Page - STMicroelectronics |
|
48 / 69 page ![]() Function API RM0020 48/69 Arguments: Description: Computes the second-order IIR filter on float data. The input samples are stored in the array x, output samples are written to the array y. Algorithm: Equation 40 for each n from 0 to N-1 Performance: See Section 7 and Table 56. Example 25. iir_float_2nd #include "libdsp2.h" /* #pragma and ALIGN macros used to align to 8 bytes */ #ifdef __ghs__ #pragma alignvar (8) #endif ALIGN_DCC(8) float x[256/*+4*/] ALIGN_MWERKS(8); /* +4 to ensure there are 16 bytes of readable memory behind x */ #ifdef __ghs__ #pragma alignvar (8) #endif ALIGN_DCC(8) float y [256] ALIGN_MWERKS(8); #ifdef __ghs__ #pragma alignvar (8) #endif ALIGN_DCC(8) float s[4] ALIGN_MWERKS(8) = {0,0,0,0}; float c[5] = {0.3115387742F,0.6230775485F,0.3115387742F,0.0736238464F,0.17253125 05F}; Table 25. iir_float_2nd arguments(1) 1. The arrays x,y,s must be double-word aligned, the array c must be word aligned (implicit alignment of float data). There must be 16 bytes of readable memory behind the array x. There are returned new values of x(-2), x(-1), y(-2), y(-1) in the array s to be ready for next function call. Nin number of input and output samples (N must be multiple of 4, must be >= 8) x in array of input samples of length N, x(0) x(1) ... x(N-1) y out array of output samples of length N, y(0) y(1) ... y(N-1) c in array of filter coefficients, c[5] = {b0, b1, b2, a1, a2} s in/out array of previous input and output values (state vector), s[4] = {x(-2), x(-1), y(-2), y(-1)} yn b0 xn b1 xn 1 – b2 xn 2 – a1 yn 1 – – a2 yn 2 – – ++ = |
|
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 |