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

}<br />

f32Ang = GFLIB_AtanYXShifted (f32InY, f32InX, &Param, Define F32);<br />

// ##############################################################<br />

// Available only if 32-bit fractional implementation selected<br />

// as default<br />

// ##############################################################<br />

// f32Ang contains 0x11c6cdfc, the theoretical value is 0x1C34824B<br />

f32Ang = GFLIB_AtanYXShifted (f32InY, f32InX, &Param);<br />

4.38 Function GFLIB_AtanYXShifted_F16<br />

This function calculates the angle of two sine waves shifted in phase to each other.<br />

4.38.1 Declaration<br />

tFrac16 GFLIB_AtanYXShifted_F16(tFrac16 f16InY, tFrac16 f16InX, GFLIB_ATANYXSHIFTED_T_F16<br />

*pParam);<br />

4.38.2 Arguments<br />

Table 4-48. GFLIB_AtanYXShifted_F16 arguments<br />

Type Name Direction Description<br />

tFrac16 f16InY input The value of the first signal, assumed to be sin( θ).<br />

tFrac16 f16InX input The value of the second signal, assumed to be sin( θ + Δθ).<br />

GFLIB_ATANYXSHIFT<br />

ED_T_F16 *<br />

4.38.3 Return<br />

pParam input,<br />

output<br />

The parameters <strong>for</strong> the function.<br />

The function returns the angle of two sine waves shifted in phase to each other.<br />

4.38.4 Description<br />

The function calculates the angle of two sinusoidal signals, one shifted in phase to the<br />

other. The phase shift between sinusoidal signals does not have to be π/2 <strong>and</strong> can be any<br />

value.<br />

It is assumed that the arguments of the function are 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 />

258 Freescale Semiconductor, Inc.

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

Saved successfully!

Ooh no, something went wrong!