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.

where T s [sec] is the sampling time.<br />

In order to implement the discrete equation of the controller on the fixed point arithmetic<br />

plat<strong>for</strong>m, the maximal values (scales) of input <strong>and</strong> output signals have to be known a<br />

priori. This is essential <strong>for</strong> correct casting of the physical signal values into fixed point<br />

values:<br />

• E MAX - maximal value of the controller input error signal<br />

• U MAX - maximal value of the controller output signal<br />

The fractional representation of both input <strong>and</strong> output signals, normalized between [-1,<br />

1), is obtained as follows:<br />

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

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

Applying such scaling (normalization) on the proportional term of equation<br />

GFLIB_<strong>Control</strong>lerPIpAW_Eq3 results in:<br />

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

where K P_sc is the proportional gain parameter considering input/output scaling.<br />

Analogically, scaling the integral term of equation GFLIB_<strong>Control</strong>lerPIpAW_Eq4 results<br />

in:<br />

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

where K I_sc is the integral gain parameter considering input/output scaling.<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. 281

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

Saved successfully!

Ooh no, something went wrong!