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.

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

The resulting controller discrete time domain equation in fixed point fractional<br />

representation is there<strong>for</strong>e given as:<br />

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

which can be rearranged into the following <strong>for</strong>m:<br />

where<br />

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

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

are the controller coefficients adapted according to the input <strong>and</strong> output scale values. In<br />

order to implement both coefficients as fractional numbers, both CC1 f <strong>and</strong> CC2 f must<br />

reside in the fractional range [-1, 1). However, depending on values CC1, CC2, E MAX , U<br />

MAX , the calculation of CC1 f <strong>and</strong> CC2 f may result in values outside this fractional<br />

range. There<strong>for</strong>e, a scaling of CC1 f, CC2 f is introduced as follows:<br />

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

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

Chapter 4 API References<br />

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

f16CC1sc,f16CC2sc 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 />

<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. 311

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

Saved successfully!

Ooh no, something went wrong!