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

implemented in the parallel (non-interacting) <strong>for</strong>m, allowing the user to define the P <strong>and</strong> I<br />

parameters independently without interaction. The controller output is limited, <strong>and</strong> the<br />

limit values (fltUpperLimit <strong>and</strong> fltLowerLimit) are defined by the user. The PI controller<br />

algorithm also returns a limitation flag. This flag (u16LimitFlag) is a member of the<br />

structure of the PI controller parameters (GFLIB_CONTROLLER_PIAW_P_T_FLT). If<br />

the PI controller output reaches the upper or lower limit then u16LimitFlag = 1, otherwise<br />

u16LimitFlag = 0 (integer values). An anti-windup strategy is implemented by limiting<br />

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

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

290 Freescale Semiconductor, Inc.

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

Saved successfully!

Ooh no, something went wrong!