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

Moreover, the scaling shift cannot be a negative number, so the operation of scaling is<br />

always to scale numbers with an absolute value larger than 1 down to fit in the range [-1,<br />

1).<br />

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

The final, scaled, fractional equation of the recurrent PI controller on a 16-bit fixed point<br />

plat<strong>for</strong>m is there<strong>for</strong>e implemented as follows:<br />

where:<br />

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

• u f(k) - fractional representation [-1, 1) of the controller output<br />

• e f(k) - fractional representation [-1, 1) of the controller input (error)<br />

• f16CC1sc - fractional representation [-1, 1) of the 1st controller coefficient<br />

• f16CC2sc - fractional representation [-1, 1) of the 2nd controller coefficient<br />

• u16NShift - in range [0,15] - is chosen such that both coefficients f16CC1sc <strong>and</strong><br />

f16CC2sc are in the range [-1, 1)<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 />

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

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

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

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

described limitation is implemented on the internal controller accumulator (limitation<br />

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

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

saturating the actual sum.<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 />

312 Freescale Semiconductor, Inc.

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

Saved successfully!

Ooh no, something went wrong!