Tool/software: Code Composer Studio
We have been working on a sensorless motor control with INStaspin FOC (on a TMS320F28052F).
The motor has 2 poles pair, and is working at 40v, 10A max, 3.5 krpm max speed. PWM is at 30 kHz, system run at 60 mHz.
i'm making the motor spin at 2.5krpm and i then stop it brutally on the shaft
what i want to achieve, is to monitor the current consumption so that its level always stay below 2 Amps
To do so, i monitor the max out of speed PID in ctrl.h (PID_setMinMax(obj->pidHandle_spd,outMin,outMax);) and i use the formula Is_A = sqrt ( Iq_A x Iq_A + Id_A x Id_A )
_iq Is_A, Id_A_temp, Iq_A_temp;
Is_A = _IQ(2.0);
Id_A_temp = _IQmpy(CTRL_getId_in_pu(handle), _IQ(USER_IQ_FULL_SCALE_CURRENT_A));
Iq_A_temp = _IQsqrt(_IQmpy(Is_A, Is_A) - _IQmpy(Id_A_temp, Id_A_temp));
Iq_A_temp = _IQdiv(Iq_A_temp, _IQ(USER_IQ_FULL_SCALE_CURRENT_A));
if(Iq_A_temp < outMax)
{
outMax = Iq_A_temp;
outMin = -outMax;
}
PID_setMinMax(obj->pidHandle_spd,outMin,outMax);
That seems to work when the motor is stopped. What i observe, is that there is a peak of current during the stop and i don't understand why ? Can anyone provide me hints ?
Yellow curve is the Current with 100mV/A resolution
Blue curve is the Voltage in V


