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.

Function GFLIB_<strong>Control</strong>lerPIpAW_F32<br />

limit values (f32UpperLimit <strong>and</strong> f32LowerLimit) are defined by the user. The PI<br />

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

of the structure of the PI controller parameters<br />

(GFLIB_CONTROLLER_PIAW_P_T_F32). 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 />

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

280 Freescale Semiconductor, Inc.

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

Saved successfully!

Ooh no, something went wrong!