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

4.96.5 Re-entrancy<br />

The function is re-entrant.<br />

4.96.6 Code Example<br />

0.258819045<br />

-0.965925826<br />

#include "gmclib.h"<br />

SWLIBS_3Syst_FLT flttrAbc;<br />

SWLIBS_2Syst_FLT flttrAlBe;<br />

void main(void)<br />

{<br />

// input value<br />

flttrAbc.fltArg1 = 0.707106781; // input phase A ~ sin(45) ~ 0.707106781<br />

flttrAbc.fltArg2 = 0.258819045; // input phase B ~ sin(45 + 120) ~<br />

}<br />

flttrAbc.fltArg3 = -0.965925826; // input phase C ~ sin(45 - 120) ~<br />

// output should be flttrAlBe.fltArg1 ~ alpha = 0.707106781<br />

// output should be flttrAlBe.fltArg2 ~ beta = 0.707106781<br />

GMCLIB_Clark_FLT (&flttrAlBe,&flttrAbc);<br />

// output should be flttrAlBe.fltArg1 ~ alpha = 0.707106781<br />

// output should be flttrAlBe.fltArg2 ~ beta = 0.707106781<br />

GMCLIB_Clark (&flttrAlBe,&flttrAbc,Define FLT);<br />

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

// Available only if single precision floating point<br />

// implementation selected as default<br />

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

// output should be flttrAlBe.fltArg1 ~ alpha = 0.707106781<br />

// output should be flttrAlBe.fltArg2 ~ beta = 0.707106781<br />

GMCLIB_Clark (&flttrAlBe,&flttrAbc);<br />

4.97 Function GMCLIB_ClarkInv_F32<br />

The function implements the inverse Clarke trans<strong>for</strong>mation.<br />

4.97.1 Declaration<br />

void GMCLIB_ClarkInv_F32(SWLIBS_3Syst_F32 *const pOut, const SWLIBS_2Syst_F32 *const pIn);<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 />

454 Freescale Semiconductor, Inc.

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

Saved successfully!

Ooh no, something went wrong!