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.

4.18.2 Arguments<br />

Table 4-18. GDFLIB_FilterIIR2_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_IIR2_<br />

T_FLT *const<br />

4.18.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.18.4 Description<br />

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

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

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

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

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

A general <strong>for</strong>m of the IIR filter expressed as a transfer function in the Z-domain is<br />

described as follows:<br />

Equation GDFLIB_FilterIIR2_Eq1<br />

where N denotes the filter order. The second order IIR filter in the Z-domain is there<strong>for</strong>e<br />

given from eq. GDFLIB_FilterIIR2_Eq1 as:<br />

Equation GDFLIB_FilterIIR2_Eq2<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 />

Chapter 4 API References<br />

Freescale Semiconductor, Inc. 193

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

Saved successfully!

Ooh no, something went wrong!