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

}<br />

}<br />

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

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

f32OutBuf[ii] = GDFLIB_FilterFIR (FRAC32 (1.0), &Param, &State);<br />

4.2 Function GDFLIB_FilterFIR_F32<br />

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

4.2.1 Declaration<br />

tFrac32 GDFLIB_FilterFIR_F32(tFrac32 f32In, const GDFLIB_FILTERFIR_PARAM_T_F32 *const pParam,<br />

GDFLIB_FILTERFIR_STATE_T_F32 *const pState);<br />

4.2.2 Arguments<br />

Table 4-2. GDFLIB_FilterFIR_F32 arguments<br />

Type Name Direction Description<br />

tFrac32 f32In input Input value.<br />

const<br />

GDFLIB_FILTERFIR_P<br />

ARAM_T_F32 *const<br />

GDFLIB_FILTERFIR_S<br />

TATE_T_F32 *const<br />

4.2.3 Return<br />

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

pState input,<br />

output<br />

Pointer to the filter state structure.<br />

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

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

152 Freescale Semiconductor, Inc.

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

Saved successfully!

Ooh no, something went wrong!