This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMS320F28027: PM_sensorless project level7 speed loop fail

Part Number: TMS320F28027
Other Parts Discussed in Thread: DRV8301

Hi Champs,

I port PM_sensorless to F28027 platform. I tested level7 and current loop ran good. However, when I set lsw = 2, motor can't spin smoothly. I captured current waveform and smo1.theta. I found out that smo didn't output correct theta after change to speed loop. I changed SpeedRef to 0.3 pu. However, still failed in speed loop. Please see below picture for more detail. I checked speed3 module which estimated RPM is right in current. I though that mean smo is good. However, It still failed to change in speed loop. Could you please tell me which variable should I tune ? I used Anaheim motor which is TI provide. thanks for your reply in advance.

ch3 is GPIO28 which set high when park1.Angle = smo1.Theta;

Ch4 is smo1.theta.

ch1 is current

1.SMO generated another direction angle. 

 

2. SMO output wrong theta.

  • Hi Lisa,

    Did you change the RS, LS and POLES in PM_Sensorless-Setting.h based on the motor? If yes, you may tune the Kp and Ki of speed regulator, or smo1.Kslide and smo1.Kslf. These parameters as below should be ok for Anaheim_BLY172S_24V motor.

    #define RS 0.39 // Stator resistance (ohm)
    #define LS 0.00072 // Stator inductance (H)
    #define POLES 8 // Number of poles

    smo1.Kslide = _IQ(0.15);
    smo1.Kslf = _IQ(0.10);
  • Hi Yanming,

    thanks for your reply. i used your parameter and tried again. But it still failed. i  change Kslide to _IQ(1.5), i didn't change kslf. It's still not resolved. I found out that SMO generate reverse direction angle. it is really weird. i check speed3 module which estimate speed also is negative. I don't know why it generate reverse direction command. Could you please tell me why and how to solve it ? thanks! 

  • What h/w kit and example project are you using?
    You may change rc1. RampDelayMax, Kp and Ki of speed PID regulator, and initialize or clear the integral and derivative term of speed PI. And you need to set a right SpeedRef and IqRef to make sure that the motor spin smoothly, and then change lsw=1 to lsw=2.
  • Hi Yanming,

    I am using DRV8301+F28027 kit. I did clean the Ki first and increase it. But it still fail to change into speed loop. I set IqRef to _IQ(0.03);. But I found out that motor lock current is around 0.5A from power supply. It's bigger than F28035 lock current. I tried smaller value but it can't spin motor smoothly in current loop. I increase SpeedRef in order to make sure SMO get right angle. I increase SpeedRef from _IQ(0.25); to _IQ(0.4);. But it still fail... Could you please teach me is there any trick to tune this motor? i will try to tune rc1. RampDelayMax. Could you please tell me why i need to tune this variable ? thanks  

    I have other question, when i used F28035 which is totally ok with current/speed loop. But when i change to F28027, I didn't change any code. CPU frequency is same. Why F28027 failed to spin motor in speed loop.. I don't know why... It supposed to be same right? 

  • Yes, both should be the same, only if the pwm frequency is not very high to cause the ISR code can't be executed in time for the code running from FLASH on F28027F. It's better back Level5 and Level6 to verify the the estimated angle and speed are correct by SMO module, and maybe need to verify the current sampling is right in Level4 again.