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.

as default<br />

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

// output should be 0x01EB<br />

f16Output = GFLIB_<strong>Control</strong>lerPIpAW (f16InErr, &trMyPI);<br />

4.45 Function GFLIB_<strong>Control</strong>lerPIpAW_FLT<br />

The function calculates the parallel <strong>for</strong>m of the Proportional-Integral (PI) controller with<br />

implemented integral anti-windup functionality.<br />

4.45.1 Declaration<br />

tFloat GFLIB_<strong>Control</strong>lerPIpAW_FLT(tFloat fltInErr, GFLIB_CONTROLLER_PIAW_P_T_FLT *const<br />

pParam);<br />

4.45.2 Arguments<br />

Table 4-55. GFLIB_<strong>Control</strong>lerPIpAW_FLT<br />

arguments<br />

Type Name Direction Description<br />

tFloat fltInErr input Input error signal to the controller is a single precision floating<br />

point data type.<br />

GFLIB_CONTROLLER<br />

_PIAW_P_T_FLT<br />

*const<br />

4.45.3 Return<br />

pParam input,<br />

output<br />

Pointer to the controller parameters structure.<br />

The function returns a single precision floating point value, 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.45.4 Description<br />

Chapter 4 API References<br />

A PI controller attempts to correct the error between a measured process variable <strong>and</strong> a<br />

desired set-point by calculating <strong>and</strong> then outputting a corrective action that can adjust the<br />

process accordingly. The GFLIB_<strong>Control</strong>lerPIpAW function calculates the Proportional-<br />

Integral (PI) algorithm according to the equations below. The PI algorithm is<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 />

Freescale Semiconductor, Inc. 289

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

Saved successfully!

Ooh no, something went wrong!