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.

Function GFLIB_Cos_FLT<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 the sine function reaches the best precision in<br />

the [- π/2, π/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_Cos_Eq4<br />

Equation GFLIB_Cos_Eq5<br />

Equation GFLIB_Cos_Eq6<br />

Considering GFLIB_Cos_Eq2 <strong>and</strong> GFLIB_Cos_Eq6, the previously defined interval [- π/<br />

2, π/2] is trans<strong>for</strong>med to the interval [- π,0], <strong>and</strong> intervals ( π/2, π] <strong>and</strong> [- π, - π/2) are<br />

trans<strong>for</strong>med to the interval (0, π].<br />

Equations GFLIB_Cos_Eq2, GFLIB_Cos_Eq4 <strong>and</strong> GFLIB_Cos_Eq5 are finally<br />

trans<strong>for</strong>med to the following <strong>for</strong>mula:<br />

Equation GFLIB_Cos_Eq7<br />

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

calculation are noted in Table 4-71.<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 />

328 Freescale Semiconductor, Inc.

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

Saved successfully!

Ooh no, something went wrong!