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.

Function GFLIB_Sin_FLT<br />

Equation GFLIB_Sin_Eq2<br />

The floating point optimized minimax approximation is chosen as sufficient in order to<br />

achieve the best ratio between calculation accuracy <strong>and</strong> execution speed. Optimized<br />

floating point minimax approximation of sine function reaches the best precision in the [π/2,<br />

π/2] range. To calculate the values in the interval [- π, - π/2) <strong>and</strong> ( π/2, π] the<br />

following equation can be used:<br />

<strong>for</strong> interval ( π/2, π]<br />

<strong>for</strong> interval [- π,-{ π/2)<br />

Equation GFLIB_Sin_Eq3<br />

Equation GFLIB_Sin_Eq4<br />

Equations GFLIB_Sin_Eq3 <strong>and</strong> GFLIB_Sin_Eq4 can be trans<strong>for</strong>med to the following<br />

<strong>for</strong>mula:<br />

Equation GFLIB_Sin_Eq5<br />

The floating point optimized approximation coefficients used <strong>for</strong> GFLIB_Sin_FLT<br />

calculation are noted in Table 4-103.<br />

Table 4-103. Approximation polynomial coefficients<br />

a 0 a 1 a 2<br />

-0.000184881402886 0.008311899801389 -0.166655540927577<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 />

410 Freescale Semiconductor, Inc.

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

Saved successfully!

Ooh no, something went wrong!