void Isr(void);
void main(void)
{
/* Voltage D, Q structure initialization */
/* Current D, Q structure initialization */
/* Speed initialization */
/* Motor parameters for decoupling Kd = 40, Kq = 20 */
}
/* Periodical function or interrupt */
void Isr(void)
{
/* Decoupling calculation */
GMCLIB_DecouplingPMSM_F16(&sVoltageDQ, &sCurrentDQ, f16AngularSpeed, &sDecouplingParam,
&sVoltageDQDecoupled);
}
2.6 GMCLIB_ElimDcBusRipFOC
The
function is used for the correct PWM duty cycle
output calculation, based on the measured DC-bus voltage. The side effect is the
elimination of the the DC-bus voltage ripple in the output PWM duty cycle. This function
is meant to be used with a space vector modulation, whose modulation index (with
respect to the DC-bus voltage) is an inverse square root of 3.
The general equation to calculate the duty cycle for the above-mentioned space vector
modulation is as follows:
Equation 14
where:
• U
PWM
is the duty cycle output
• u
FOC
is the real FOC voltage
• u
dcbus
is the real measured DC-bus voltage
Using the previous equations, the
function compensates
an amplitude of the direct-
α
and the quadrature-
β
component of the stator-reference
voltage vector, using the formula shown in the following equations:
Chapter 2 Algorithms in detail
GMCLIB User's Guide, Rev. 2, 10/2015
Freescale Semiconductor, Inc.
27
Summary of Contents for DSP56800E
Page 1: ...GMCLIB User s Guide DSP56800E Document Number DSP56800EGMCLIBUG Rev 2 10 2015 ...
Page 2: ...GMCLIB User s Guide Rev 2 10 2015 2 Freescale Semiconductor Inc ...
Page 4: ...GMCLIB User s Guide Rev 2 10 2015 4 Freescale Semiconductor Inc ...
Page 64: ...GMCLIB_SvmU7n GMCLIB User s Guide Rev 2 10 2015 64 Freescale Semiconductor Inc ...
Page 78: ...GMCLIB User s Guide Rev 2 10 2015 78 Freescale Semiconductor Inc ...