03.08.2013 Views

Embedded Software and Motor Control Libraries for PXR40xx

Embedded Software and Motor Control Libraries for PXR40xx

Embedded Software and Motor Control Libraries for PXR40xx

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Function GDFLIB_FilterIIR1_FLT<br />

}<br />

// ##############################################################<br />

// function returns no value<br />

GDFLIB_FilterIIR1Init (&flttrMyIIR1);<br />

4.12 Function GDFLIB_FilterIIR1_FLT<br />

This function implements the first order IIR filter.<br />

4.12.1 Declaration<br />

tFloat GDFLIB_FilterIIR1_FLT(tFloat fltIn, GDFLIB_FILTER_IIR1_T_FLT *const pParam);<br />

4.12.2 Arguments<br />

Table 4-12. GDFLIB_FilterIIR1_FLT arguments<br />

Type Name Direction Description<br />

tFloat fltIn input Value of the input signal to be filtered in step (k). Input is a 32bit<br />

number that contains a single precision floating point<br />

value.<br />

GDFLIB_FILTER_IIR1_<br />

T_FLT *const<br />

4.12.3 Return<br />

pParam input,<br />

output<br />

Pointer to a filter structure with a filter buffer <strong>and</strong> filter<br />

parameters. Arguments of the structure contain single<br />

precision floating point values.<br />

The function returns a 32-bit value in single precision floating point <strong>for</strong>mat, representing<br />

the filtered value of the input signal in step (k).<br />

4.12.4 Description<br />

This function calculates the first order infinite impulse (IIR) filter. The IIR filters are also<br />

called recursive filters because both the input <strong>and</strong> the previously calculated output values<br />

are used <strong>for</strong> calculation of the filter equation in each step. This <strong>for</strong>m of feedback enables<br />

transfer of the energy from the output to the input, which theoretically leads to an<br />

infinitely long impulse response (IIR).<br />

<strong>Embedded</strong> <strong>Software</strong> <strong>and</strong> <strong>Motor</strong> <strong>Control</strong> <strong>Libraries</strong> <strong>for</strong> <strong>PXR40xx</strong>, Rev. 1.0<br />

178 Freescale Semiconductor, Inc.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!