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.

}<br />

// output pwm dutycycles stored in structure referenced by tr32PwmABC<br />

// pwmA dutycycle = 0x7FFF A2C9 = FRAC32(0.9999888... )<br />

// pwmb dutycycle = 0x4000 5D35 = FRAC32(0.5000111... )<br />

// pwmc dutycycle = 0x0000 5D35 = FRAC32(0.0000111... )<br />

// svmSector = 0x1 [sector]<br />

u32SvmSector = GMCLIB_SvmStd_F32 (&tr32PwmABC,&tr32InVoltage);<br />

// output pwm dutycycles stored in structure referenced by tr32PwmABC<br />

// pwmA dutycycle = 0x7FFF A2C9 = FRAC32(0.9999888... )<br />

// pwmb dutycycle = 0x4000 5D35 = FRAC32(0.5000111... )<br />

// pwmc dutycycle = 0x0000 5D35 = FRAC32(0.0000111... )<br />

// svmSector = 0x1 [sector]<br />

u32SvmSector = GMCLIB_SvmStd (&tr32PwmABC,&tr32InVoltage,Define F32);<br />

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

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

// as default<br />

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

// output pwm dutycycles stored in structure referenced by tr32PwmABC<br />

// pwmA dutycycle = 0x7FFF A2C9 = FRAC32(0.9999888... )<br />

// pwmb dutycycle = 0x4000 5D35 = FRAC32(0.5000111... )<br />

// pwmc dutycycle = 0x0000 5D35 = FRAC32(0.0000111... )<br />

// svmSector = 0x1 [sector]<br />

u32SvmSector = GMCLIB_SvmStd (&tr32PwmABC,&tr32InVoltage);<br />

4.113 Function GMCLIB_SvmStd_F16<br />

This function calculates the duty-cycle ratios using the St<strong>and</strong>ard Space Vector<br />

Modulation technique.<br />

4.113.1 Declaration<br />

tU16 GMCLIB_SvmStd_F16(SWLIBS_3Syst_F16 *pOut, const SWLIBS_2Syst_F16 *const pIn);<br />

4.113.2 Arguments<br />

Table 4-142. GMCLIB_SvmStd_F16 arguments<br />

Type Name Direction Description<br />

SWLIBS_3Syst_F16 * pOut input,<br />

output<br />

const<br />

SWLIBS_2Syst_F16<br />

*const<br />

Chapter 4 API References<br />

Pointer to the structure containing calculated duty-cycle ratios<br />

of the 3-Phase system.<br />

pIn input Pointer to the structure containing direct U α <strong>and</strong> quadrature U<br />

β components of the stator voltage vector.<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 />

Freescale Semiconductor, Inc. 513

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

Saved successfully!

Ooh no, something went wrong!