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.

where a 1...a 5 are coefficients of the approximation polynomial, which are calculated as<br />

follows (represented as 32-bit signed fractional numbers):<br />

Equation GFLIB_Cos_Eq6<br />

There<strong>for</strong>e, the resulting equation has the following <strong>for</strong>m:<br />

Equation GFLIB_Cos_Eq7<br />

Chapter 4 API References<br />

Figure 4-25 depicts a floating point cosine function generated from Matlab <strong>and</strong> the<br />

approximated value of the cosine function obtained from GFLIB_Cos_F32, plus their<br />

difference. The course of calculation accuracy as a function of the input angle can be<br />

observed from this figure.<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. 319

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

Saved successfully!

Ooh no, something went wrong!