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.

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

to the following equation:<br />

Equation GFLIB_<strong>Control</strong>lerPIrAW_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 the controller<br />

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

4-67.<br />

The output signal limitation is implemented in this controller. The actual output u(k) is<br />

bounded not to exceed the given limit values UpperLimit, LowerLimit. This is due to<br />

either the bounded power of the actuator or to the physical constraints of the plant.<br />

Table 4-67. 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 />

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

The bounds are described by a limitation element equation<br />

GFLIB_<strong>Control</strong>lerPIrAW_Eq4. When the bounds are exceeded, the non-linear saturation<br />

characteristic will take effect <strong>and</strong> influence the dynamic behavior. The described<br />

limitation is implemented in the internal controller accumulator (limitation during the<br />

calculation). There<strong>for</strong>e, if the limitation occurs, the controller output is clipped to its<br />

bounds <strong>and</strong> the wind-up occurrence of the accumulator portion is avoided by saturating<br />

the actual sum.<br />

Note<br />

All controller parameters <strong>and</strong> states can be reset during<br />

declaration using the<br />

GFLIB_CONTROLLER_PIAW_R_DEFAULT_FLT macro.<br />

As the PI controller also contains the integration part, the output<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. 315

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

Saved successfully!

Ooh no, something went wrong!