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

Note<br />

Both the inverse modulation index pIn->fltModIndex <strong>and</strong> the<br />

measured DC bus voltage pIn->fltDcBusMsr must be equal to<br />

or greater than 0, otherwise the results are undefined.<br />

4.105.5 Re-entrancy<br />

The function is re-entrant.<br />

4.105.6 Code Example<br />

#include "gmclib.h"<br />

SWLIBS_2Syst_FLT fltAB;<br />

SWLIBS_2Syst_FLT fltOutAB;<br />

GMCLIB_ELIMDCBUSRIP_T_FLT flttrMyElimDcBusRip =<br />

GMCLIB_ELIMDCBUSRIP_DEFAULT_FLT;<br />

1<br />

0.764140062<br />

1<br />

0.764140062<br />

1<br />

0.764140062<br />

void main(void)<br />

{<br />

// inverse modulation coefficient <strong>for</strong> st<strong>and</strong>ard space vector modulation<br />

trMyElimDcBusRip.fltModIndex = 0.866025404;<br />

// Input voltage vector 15V @ angle 30deg<br />

// alpha component of input voltage vector = 12.99[V]<br />

fltAB.fltArg1 = 12.99038106;<br />

// beta component of input voltage vector = 7.5[V]<br />

fltAB.fltArg2 = 7.5;<br />

// value of the measured DC bus voltage 17V<br />

flttrMyElimDcBusRip.fltArgDcBusMsr = 17;<br />

}<br />

// output alpha component of the output vector should be fltOutAB.fltArg1 =<br />

// output beta component of the output vector should be fltOutAB.fltArg2 =<br />

GMCLIB_ElimDcBusRip_FLT (&fltOutAB,&fltAB,&flttrMyElimDcBusRip);<br />

// output alpha component of the output vector should be fltOutAB.fltArg1 =<br />

// output beta component of the output vector should be fltOutAB.fltArg2 =<br />

GMCLIB_ElimDcBusRip (&fltOutAB,&fltAB,&flttrMyElimDcBusRip,Define FLT);<br />

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

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

// implementation selected as default<br />

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

// output alpha component of the output vector should be fltOutAB.fltArg1 =<br />

// output beta component of the output vector should be fltOutAB.fltArg2 =<br />

GMCLIB_ElimDcBusRip (&fltOutAB,&fltAB,&flttrMyElimDcBusRip);<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 />

486 Freescale Semiconductor, Inc.

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

Saved successfully!

Ooh no, something went wrong!