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 GFLIB_<strong>Control</strong>lerPIr_FLT<br />

4.48.3 Return<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.48.4 Description<br />

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

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

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

Equation GFLIB_<strong>Control</strong>lerPIr_Eq1<br />

The transfer function <strong>for</strong> this kind of PI controller, in a continuous time domain, is<br />

described using the Laplace trans<strong>for</strong>mation as follows:<br />

Equation GFLIB_<strong>Control</strong>lerPIr_Eq2<br />

Trans<strong>for</strong>ming equation GFLIB_<strong>Control</strong>lerPIr_Eq2 into a discrete time domain leads to<br />

the following equation:<br />

Equation GFLIB_<strong>Control</strong>lerPIr_Eq3<br />

where Kp is proportional gain, Ki is integral gain, Ts is the sampling period, u(k) is the<br />

controller output, e(k) is the controller input error signal, CC1 <strong>and</strong> CC2 are controller<br />

coefficients calculated depending on the discretization method used, as shown in Table<br />

4-61.<br />

Table 4-61. Calculation of coefficients CC1 <strong>and</strong> CC2 using various discretization methods<br />

Trapezoidal Backward Rect. Forward Rect.<br />

CC1= K p+K IT S/2 K p+K IT S K p<br />

CC2= -K p+K IT S/2 -K p -K p+K IT S<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 />

302 Freescale Semiconductor, Inc.

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

Saved successfully!

Ooh no, something went wrong!