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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Function GDFLIB_FilterIIR2_F16<br />

4.16.2 Arguments<br />

Table 4-16. GDFLIB_FilterIIR2_F16 arguments<br />

Type Name Direction Description<br />

tFrac16 f16In input Value of input signal to be filtered in step (k). The value is a<br />

16-bit number in the 1.15 fractional <strong>for</strong>mat.<br />

GDFLIB_FILTER_IIR2_<br />

T_F16 *const<br />

4.16.3 Return<br />

pParam input,<br />

output<br />

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

parameters.<br />

The function returns a 16-bit value in fractional <strong>for</strong>mat 1.15, representing the filtered<br />

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

4.16.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 />

188 Freescale Semiconductor, Inc.

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

Saved successfully!

Ooh no, something went wrong!