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_Asin_F32<br />

Figure 4-13. Course of the function GFLIB_Asin<br />

The computational algorithm uses the symmetry of the arcsin(x) function around the<br />

point (0, π/2), which allows to <strong>for</strong> computing the function values just in the interval [0,<br />

1 ) <strong>and</strong> to compute the function values in the interval [-1, 0) by the simple <strong>for</strong>mula:<br />

where:<br />

Equation GFLIB_Asin_Eq1<br />

• y[-1, 0) is the arcsin(x) function value in the interval [-1, 0)<br />

• y[1, 0) is the arcsin(x) function value in the interval [1, 0 )<br />

Additionally, because the arcsin(x) function is difficult <strong>for</strong> polynomial approximation <strong>for</strong><br />

x approaching 1 (or -1 by symmetry), due to its derivatives approaching infinity, a special<br />

trans<strong>for</strong>mation is used to trans<strong>for</strong>m the range of x from [0.5, 1) to (0, 0.5] :<br />

Equation GFLIB_Asin_Eq2<br />

In this way, the computation of the arcsin(x) function in the range [0.5, 1) can be replaced<br />

by the computation in the range (0, 0.5], in which approximation is easier.<br />

For the interval (0, 0.5], the algorithm uses polynomial approximation as follows:<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 />

222 Freescale Semiconductor, Inc.

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

Saved successfully!

Ooh no, something went wrong!