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.

(GFLIB_CONTROLLER_PIAW_P_T_F16). If the PI controller output reaches the upper<br />

or lower limit then u16LimitFlag = 1, otherwise u16LimitFlag = 0 (integer values). An<br />

anti- windup strategy is implemented by limiting the integral portion. The integral state is<br />

limited by the controller limits, in the same way as the controller output.<br />

The PI algorithm in the continuous time domain can be described as:<br />

where<br />

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

• e(t) - input error in the continuous time domain<br />

• u(t) - controller output in the continuous time domain<br />

• K P - proportional gain<br />

• K I - integral gain<br />

Equation GFLIB_<strong>Control</strong>lerPIpAW_Eq1 can be described using the Laplace<br />

trans<strong>for</strong>mation as follows:<br />

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

The proportional part of equation GFLIB_<strong>Control</strong>lerPIpAW_Eq2 is trans<strong>for</strong>med into the<br />

discrete time domain simply as:<br />

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

Trans<strong>for</strong>ming the integral part of equation GFLIB_<strong>Control</strong>lerPIpAW_Eq2 into a discrete<br />

time domain using the Bilinear method, also known as trapezoidal approximation, leads<br />

to the following equation:<br />

where T s [sec] is the sampling time.<br />

Equation GFLIB_<strong>Control</strong>lerPIpAW_Eq4<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. 285

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

Saved successfully!

Ooh no, something went wrong!