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.

The introduced scaling shift u16NShift is chosen such that both coefficients<br />

f32CC1sc,f32CC2sc reside in the range [-1, 1). To simplify the implementation, this<br />

scaling shift is chosen to be a power of 2, so the final scaling is a simple shift operation.<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 32-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 />

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

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

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

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

Chapter 4 API References<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 />

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

Freescale Semiconductor, Inc. 307

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

Saved successfully!

Ooh no, something went wrong!