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.

SWLIBS_2Syst_F32 f32OutAB;<br />

GMCLIB_ELIMDCBUSRIP_T_F32 f32trMyElimDcBusRip =<br />

GMCLIB_ELIMDCBUSRIP_DEFAULT_F32;<br />

~ 0x7FFFFFFF<br />

void main(void)<br />

{<br />

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

f32trMyElimDcBusRip.f32ModIndex = FRAC32 (0.866025403784439);<br />

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

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

f32AB.f32Arg1 = FRAC32 (12.99/U_MAX);<br />

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

f32AB.f32Arg2 = FRAC32 (7.5/U_MAX);<br />

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

f32trMyElimDcBusRip.f32ArgDcBusMsr = FRAC32 (17.0/U_MAX);<br />

// output alpha component of the output vector should be<br />

// f32OutAB.f32Arg1 = (12.99/36)*0.8660/(17.0/36/2) = 1.3235 -> FRAC32(1.0)<br />

// output beta component of the output vector should be<br />

// f32OutAB.f32Arg2 = (7.5/36)*0.8660/(17.0/36/2) = 0.7641 -><br />

FRAC32(0.7641) ~ 0x61CF8000<br />

GMCLIB_ElimDcBusRip_F32 (&f32OutAB,&f32AB,&f32trMyElimDcBusRip);<br />

~ 0x7FFFFFFF<br />

// output alpha component of the output vector should be<br />

// f32OutAB.f32Arg1 = (12.99/36)*0.8660/(17.0/36/2) = 1.3235 -> FRAC32(1.0)<br />

// output beta component of the output vector should be<br />

// f32OutAB.f32Arg2 = (7.5/36)*0.8660/(17.0/36/2) = 0.7641 -><br />

FRAC32(0.7641) ~ 0x61CF8000<br />

GMCLIB_ElimDcBusRip (&f32OutAB,&f32AB,&f32trMyElimDcBusRip,Define F32);<br />

~ 0x7FFFFFFF<br />

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

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

// as default<br />

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

// output alpha component of the output vector should be<br />

// f32OutAB.f32Arg1 = (12.99/36)*0.8660/(17.0/36/2) = 1.3235 -> FRAC32(1.0)<br />

// output beta component of the output vector should be<br />

// f32OutAB.f32Arg2 = (7.5/36)*0.8660/(17.0/36/2) = 0.7641 -><br />

FRAC32(0.7641) ~ 0x61CF8000<br />

GMCLIB_ElimDcBusRip (&f32OutAB,&f32AB,&f32trMyElimDcBusRip);<br />

}<br />

4.104 Function GMCLIB_ElimDcBusRip_F16<br />

This function implements the DC Bus voltage ripple elimination.<br />

4.104.1 Declaration<br />

void GMCLIB_ElimDcBusRip_F16(SWLIBS_2Syst_F16 *const pOut, const SWLIBS_2Syst_F16 *const pIn,<br />

const GMCLIB_ELIMDCBUSRIP_T_F16 *const pParam);<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 />

Chapter 4 API References<br />

Freescale Semiconductor, Inc. 479

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

Saved successfully!

Ooh no, something went wrong!