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_FilterFIR_FLT<br />

}<br />

}<br />

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

// fltOut contains step response of the filter<br />

fltOutBuf[ii] = GDFLIB_FilterFIR ((tFloat)(1), &Param, &State);<br />

4.6 Function GDFLIB_FilterFIR_FLT<br />

The function per<strong>for</strong>ms a single iteration of an FIR filter.<br />

4.6.1 Declaration<br />

tFloat GDFLIB_FilterFIR_FLT(tFloat fltIn, const GDFLIB_FILTERFIR_PARAM_T_FLT *const pParam,<br />

GDFLIB_FILTERFIR_STATE_T_FLT *const pState);<br />

4.6.2 Arguments<br />

Table 4-6. GDFLIB_FilterFIR_FLT<br />

arguments<br />

Type Name Direction Description<br />

tFloat fltIn input Input value.<br />

const<br />

GDFLIB_FILTERFIR_P<br />

ARAM_T_FLT *const<br />

GDFLIB_FILTERFIR_S<br />

TATE_T_FLT *const<br />

4.6.3 Return<br />

pParam input Pointer to a parameter structure.<br />

pState input,<br />

output<br />

Pointer to a filter state structure.<br />

The value of a filtered signal after processing by an FIR filter.<br />

4.6.4 Description<br />

The function per<strong>for</strong>ms the operation of an FIR filter on a sample-by-sample basis. At<br />

each new input to the FIR filter, the function should be called, which will return a new<br />

filtered value.<br />

The FIR filter is defined by the following <strong>for</strong>mula:<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 />

164 Freescale Semiconductor, Inc.

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

Saved successfully!

Ooh no, something went wrong!