Part Number: LAUNCHXL-F280039C
Hello team,
We were able to stop motor deceleration DC voltage bouncing by diving the PI ±currents. The linear DC supply >13,000uF and the Inverter 1300uF bulk capacitors. The same motor and DC inverter functions well with trapezoidal waveform with this linear supply >16A sustained. I
#else // !MOTOR1_ISBLDC
/* Reduce half the min/max deceleration current */
if(bMainDecel)
{
PI_setMinMax(obj->piHandle_spd, -obj->maxCurrent_A / 2 , obj->maxCurrent_A / 2);
}
else
{
PI_setMinMax(obj->piHandle_spd, -obj->maxCurrent_A / 1.25, obj->maxCurrent_A / 1.25);
}
SVGEN_setMode(obj->svgenHandle, obj->svmMode);
#endif // !MOTOR1_ISBLDC
When the motor estimated current is being set high as to reach the trajectory speed hertz, the PI integrator swings current wildly nonmonotonic linear ramp between the negative and positive integrator input values below! Oddly that also causes DC inductive voltage in the PI run series to bounce DC in Idq frame (motor1_drive.c).
Analyzing the PI set series function it seems __fsat missing but the compiler skips over it or CCS cannot find it?
Anyway the bMainDecel we added now stops DC bouncing in the PI min/max current controller during deceleration, also stops tripping OVC faults! Yet still has excessive nonlinear Acceleration to trajectory current swings, seemingly caused by integrator in the PI current controller not saturating?
Why to use function __fsat ?
Why is the VsMaxV being multiplied by PU 0.5f? That math makes +165v DC bus voltage = 82.5VsMax. Notice the rotors Speed_Hz is not being factored into the PI integrator Error factor. That seemingly is causing the trajectory to fall behind because the current starts to lag the voltage by significant amount whenever Speed_Hz is < 1000 RPM. This motor requires 14-16 amps of current to reach well beyond 1000 RPM at the rated voltage 235vdc.
Oddly we can only set USER_MOTOR1_MAX_CURRENT_A <= 10.535f or the PI starts to oscillate (bounce) the stator voltage when Speed_Hz >250Hz and still hear current bounce >420Hz. The problem is the current needs to be set >12A to cross the frequency barrier where the inertia moment is crossed at a specific Idq and rotor speed. The PI controller has to not overflow a 32-bit error multiplication! Yet it seems the float- 32 is overflowing the integrator Error in the PI_run function. Perhaps why Luminary Micro did 32-bit multiply in Thumb assembler, so CCS compiler optimizer does not affect the multiply of the speed integrator error amount. And the integral remains stable at most all rotor speeds when seemingly inductive current starts lagging behind the voltage more than a few hundred revolutions of the rotor >250Hz.
Error = refValue - fbackValue;
// Compute the proportional output
Up = Kp * Error;
// Maximum voltage output
obj->VsMax_V = objUser->maxVsMag_pu * obj->adcData.VdcBus_V;
PI_setMinMax(obj->piHandle_Id, -obj->VsMax_V, obj->VsMax_V);




// Maximum voltage output
obj->VsMax_V = objUser->maxVsMag_pu * obj->adcData.VdcBus_V;
PI_setMinMax(obj->piHandle_Id, -obj->VsMax_V, obj->VsMax_V);
#else // !SFRA_ENABLE
// run the Id controller
PI_run_series(obj->piHandle_Id,
obj->IdqRef_A.value[0], obj->Idq_in_A.value[0],
obj->Vdq_ffwd_V.value[0], (float32_t*)&obj->Vdq_out_V.value[0]);
// calculate Iq controller limits
float32_t outMax_V = __sqrt((obj->VsMax_V * obj->VsMax_V) -
(obj->Vdq_out_V.value[0] * obj->Vdq_out_V.value[0]));
PI_setMinMax(obj->piHandle_Iq, -outMax_V, outMax_V);
// run the Iq controller
PI_run(obj->piHandle_Iq, obj->IdqRef_A.value[1],
obj->Idq_in_A.value[1], (float32_t*)&obj->Vdq_out_V.value[1]);
#endif // !SFRA_ENABLE
#if defined(MOTOR1_FAST)
// set the Id reference value in the estimator
EST_setId_ref_A(obj->estHandle, obj->IdqRef_A.value[0]);
EST_setIq_ref_A(obj->estHandle, obj->IdqRef_A.value[1]);
#endif // MOTOR1_FAST
}



