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.

}<br />

// output should be 0x00A3D70A<br />

f32Output = GFLIB_<strong>Control</strong>lerPIr (f32InErr,&trMyPI);<br />

4.47 Function GFLIB_<strong>Control</strong>lerPIr_F16<br />

This function calculates a st<strong>and</strong>ard recurrent <strong>for</strong>m of the Proportional- Integral controller,<br />

without integral anti-windup.<br />

4.47.1 Declaration<br />

tFrac16 GFLIB_<strong>Control</strong>lerPIr_F16(tFrac16 f16InErr, GFLIB_CONTROLLER_PI_R_T_F16 *const pParam);<br />

4.47.2 Arguments<br />

Table 4-58. GFLIB_<strong>Control</strong>lerPIr_F16 arguments<br />

Type Name Direction Description<br />

tFrac16 f16InErr input Input error signal to the controller is a 16-bit number<br />

normalized between [-1, 1).<br />

GFLIB_CONTROLLER<br />

_PI_R_T_F16 *const<br />

4.47.3 Return<br />

pParam input,<br />

output<br />

Pointer to the controller parameters structure.<br />

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

applied to the controlled system so that the input error is <strong>for</strong>ced to zero.<br />

4.47.4 Description<br />

The function GFLIB_<strong>Control</strong>lerPIr_F16 calculates a st<strong>and</strong>ard recurrent <strong>for</strong>m of the<br />

Proportional-Integral controller, without integral anti-windup.<br />

The continuous time domain representation of the PI controller is defined as:<br />

Equation GFLIB_<strong>Control</strong>lerPIr_Eq1<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. 297

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

Saved successfully!

Ooh no, something went wrong!