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.

TMS320F28069M: InstaSPIN-FOC lab05b speed controller adjustment

Part Number: TMS320F28069M

Greetings! It seems I made a mistake on my first lab05b attempt and ForceAngle was "ON". So now I turn it off and I am trying to adjust my speed controller. My initial values are Kp_spd=0.26(IQ24) and Ki_spd=0.00633(IQ24). In order to make the motor run I decreased both to 0.001. In this case(Kp_spd=0.001 and Ki_spd=0.001) the motor is spinning, but it suddenly changes the direction. It is oscillating. I tried with many sets of bigger values, but I couldn`t rotate the motor. So should I try something else? For example to changed the Kp_Idq or Ki_Idq? On lab05a everything is fine. I am not sure if Kp_spd and Ki_spd could be so low. Should I continoue decreasing these values?

Should I try to monitor the Iq_ref which was passed directly to the controller (according to block 26 lab05b doc) in lab05a? Is there a setting related to CTRL_setIq_ref_pu? Because according to the same block(26), the speedref_krpm is passed to the trajectory controller and than to the speed controller. Is it possible the traj controller not to be set properly. I don`t find any settings in the lab05b script connected to the traj ramp!

I am woking in blind here!  Any ideas?

Thanks!

  • Did you try to run the lab02b to identify the motor parameters? And use the identified motor parameters to run the lab05b?

    Any load is adding on the motor when run the lab05b?

    Did you capture any motor phase current for understanding your question?

    Seems like you don't need to change the default gains of both speed and current PI regulator at this moment. You just need to change the gains of the speed PI regulator when you want to optimize the motor control to achieve the response speed you need. 

  • I have identified the motor and I am using these parameters in lab05b. There is no load, but the motor has internal break(conical construction specific for hoist motors). Do I have to adjust the traj ramp controller (CTRL_setIq_ref_pu)? The motor is not running without ForceAngle activated(unless I decrease  speed PI dramatically) and a bigger value set for Kp_spd. Can I activate ForceAngle just to spin the motor and then to disable it in order to continue the lab? To use 2 sets of speed PI settings? 1 for start up and 1 for rotation?

  • Update: I made a comparison between the SpeedRef_krpm and Speed_krpm. So when ForceAngle is active and SpeedRef_krpm=_IQ(0.1), Speed_krpm is varing up to 0.75 and the IqRef_A or spd_out is -0.13. I think the software is attempting to slowdown the motor. And when I turn on ForceAngle, SpeedRef_krpm=_IQ(0.1), Speed_krpm varies a lot and spd_out follows. The PID settings are without change as they are calculated Kp_spd=0.26,Ki_spd=0.0066, Kp_Idq=1.14, Ki_Idq=0.34. I think the software is reactiving too fast, but because of the internal break the motor is following quite slow and the result is no movement. I think the speed controller should react more slowly (or start on current loop) in the beginning. Maybe I should make a program where I start the motor using only the current loop and than the speed controller is activated. When the motor is already turning. Or somehow slowdown the reaction of the speed controller?! Or override the CTRL_getSpd_out_pu and use the max value for a few ms?!

    I tried to increase the USER_FORCE_ANGLE_FREQ_Hz to 10Hz. In this case the motor starts spinning, but it doesn`t acc, but the speed_krpm is pointing 0.74. When I turn off the Force Angle the motor stops. Next I increased the USER_FORCE_ANGLE_FREQ_Hz to 50Hz. In this case motor start spinning even faster, again if I turn off the force angle it stops. When forced angle is active I can`t control the speed_krpm. It doesn`t follow the speedref_krpm. I think it turns with the setting from the USER_FORCE_ANGLE_FREQ_Hz. How can I make a transition from Force angle to normal rotation? What are the recommendations in this case?

    What does the MaximumSpeed_pu depend on? I can`t find where it is set! As I said in my case it is 0.13, but when I was running lab05a I was able to set the IqRef_A to a higher value. Is there a possibility the problem to be there?

    Thanks!

  • Please try to set a higher SpeedRef_krpm, and run the motor without load or light load to see what happens.

    I tried to increase the USER_FORCE_ANGLE_FREQ_Hz to 10Hz. I

    The value is too large. You may not need to change the default value in most cases.

    Having an incorrect Rs value (especially a value higher than the actual Rs) will make the start-up behave poorly. You might refer to chapter 14 "Managing Full Load at Startup, Low-Speed and Speed Reversal" in InstaSPIN-FOC and InstaSPIN-MOTION User's Guide

    https://www.ti.com/lit/spruhj1

    1. Enable stator Rs recalibration before startup
    2. Enable forced angle
    3. Make sure that the current ADC offset is calibrated.
    What does the MaximumSpeed_pu depend on? I can`t find where it is set! As I said in my case it is 0.13, but when I was running lab05a I was able to set the IqRef_A to a higher value. Is there a possibility the problem to be there?

    Set the right maximum torque current according to your motor.

    #define USER_MOTOR_MAX_CURRENT            (5.0)                               // A -  30~150%  of rated current of the motor