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

where:<br />

Equation GFLIB_Acos_Eq1<br />

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

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

Additionally, because the arccos(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_Acos_Eq2<br />

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

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

For the interval (0, 0.5], the algorithm uses a polynomial approximation as follows:<br />

Equation GFLIB_Acos_Eq3<br />

Equation GFLIB_Acos_Eq4<br />

The division of the [0,1) interval into two sub-intervals, with polynomial coefficients<br />

calculated <strong>for</strong> each sub-interval, is noted in Table 4-28.<br />

Table 4-28. Integer polynomial coefficients <strong>for</strong> each interval<br />

Interval a 0 a 1 a 2 a 3 a 4<br />

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

Saved successfully!

Ooh no, something went wrong!