AnsweredAssumed Answered

Using the KMS SVPWM to Create a 3 Phase PWM Modulator without a Motor

Question asked by Derek Cook on Apr 26, 2018
Latest reply on May 2, 2018 by Derek Cook

Hello, 

 

I am using the mkv31f512vll12p. I would like to use the SVPWM KMS block to create a constant 200V 50Hz 3 phase PWM to validate my IGBT hardware. How would I go about doing this? I do not have a motor connected to the system during the validation. Therefore, there is no resolver or encoder reading in the rotor angle of the motor. Because of this, I have commented out most of the DRV_updateAtFastTick() to test this out. I have also tried this with the commented parts of DRV_updateAtFastTick() left in.

 

I see the SVPWM block takes in as an input the stationary voltage reference frame from the IPARK block, which takes in as an input the rotor angle and voltage reference to produce this. 

 

 

I have tried a couple of things: 

##

1) Using a stationary rotor angle. It looks like KMS expects this to be between -_LQ(1.0) and _LQ(1.0)? 

2) Using a rotor angle that increments from -_LQ(1.0) to _LQ(1.0) changing _LQ(0.1) every fast tick. 

 

Stationary rotor angle:

 

/* START SVPWM BLOCK ***********************************************************/
/* Turn inverter switches on */
SVPWM_enable(&svpwm);
// Define Rotor Angle

tempAngle = _LQ(1.0); 

// Define Reference Voltage
tempStatorRefVoltageDQ.d = _LQ(0.0);
tempStatorRefVoltageDQ.q = _LQ(200.0);

// Assign sin and cos of angle
_LQsincosPU(tempAngle, &tempOrient.sinAngle, &tempOrient.cosAngle);

// Run Inverse Park Transform
IPARK_run(&ipark, &tempOrient, &tempStatorRefVoltageDQ);

// Run 3 Phase PWM
SVPWM_updateFastTick(&svpwm, &(ipark.output.vector), ipark.output.magnitude);
/* END SVPWM BLOCK *************************************************************/

 

Rotating Rotor Angle: 

/* START SVPWM BLOCK ***********************************************************/
/* Turn inverter switches on */
SVPWM_enable(&svpwm);
// Define Rotor Angle
if(rotorAngle < 0.9)
{
rotorAngle += 0.1;
}

else
{
rotorAngle = -1.0;
}

tempAngle = _LQ(rotorAngle); // between -LQ(1.0) and LQ(1.0)

// Define Reference Voltage
tempStatorRefVoltageDQ.d = _LQ(0.0);
tempStatorRefVoltageDQ.q = _LQ(200.0);

// Assign sin and cos of angle
_LQsincosPU(tempAngle, &tempOrient.sinAngle, &tempOrient.cosAngle);

// Run Inverse Park Transform
IPARK_run(&ipark, &tempOrient, &tempStatorRefVoltageDQ);

// Run 3 Phase PWM
SVPWM_updateFastTick(&svpwm, &(ipark.output.vector), ipark.output.magnitude);
/* END SVPWM BLOCK *************************************************************/

 

I never see any PWM output out of the Phase A, B and C PWM outputs. This remains low. Also, if I want 200V out am I correct to do this? 

 

// Define Reference Voltage
tempStatorRefVoltageDQ.d = _LQ(0.0);
tempStatorRefVoltageDQ.q = _LQ(200.0);

 

Thanks for your assistance in this matter, 

 

Derek

Outcomes