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.

motor could not speed up to it's max speed

hello,

my motor's max speed is 5000RPM, but motor became shaking durning 3700RPM. and it is sensorless lab (FOC)

this is my user.h param:

#define USER_IQ_FULL_SCALE_FREQ_Hz        (400.0) 

#define USER_IQ_FULL_SCALE_VOLTAGE    (650.0)  


#define USER_ADC_FULL_SCALE_VOLTAGE       (665.597) 


#define USER_IQ_FULL_SCALE_CURRENT_A          (100.0) 
#define USER_ADC_FULL_SCALE_CURRENT_A        (200.0)

#define USER_PWM_FREQ_kHz                (20.0)

#define USER_NUM_PWM_TICKS_PER_ISR_TICK        (2)
#define USER_NUM_ISR_TICKS_PER_CTRL_TICK       (2)    
#define USER_NUM_CTRL_TICKS_PER_CURRENT_TICK   (1)   
#define USER_NUM_CTRL_TICKS_PER_EST_TICK       (1)    
#define USER_NUM_CTRL_TICKS_PER_SPEED_TICK  (1) 
#define USER_NUM_CTRL_TICKS_PER_TRAJ_TICK   (1)

#define USER_VOLTAGE_FILTER_POLE_Hz  (550.8)  

#define USER_MOTOR_TYPE                 MOTOR_Type_Pm
#define USER_MOTOR_NUM_POLE_PAIRS       (2)
#define USER_MOTOR_Rr                   (NULL)
#define USER_MOTOR_Rs                   (0.34)
#define USER_MOTOR_Ls_d                 (0.0084)
#define USER_MOTOR_Ls_q                 (0.0084)
#define USER_MOTOR_RATED_FLUX           (1.016966)
#define USER_MOTOR_MAGNETIZING_CURRENT  (NULL)
#define USER_MOTOR_RES_EST_CURRENT      (2.0)
#define USER_MOTOR_IND_EST_CURRENT      (-1.0)
#define USER_MOTOR_MAX_CURRENT          (20.0)
#define USER_MOTOR_FLUX_EST_FREQ_Hz     (20.0)
#define USER_MOTOR_MAX_SPEED_KRPM       (5.0)

  • this is your own custom hardware?
    are you sure there are no issues? especially with current sense?

    I suggest changing the following
    #define USER_PWM_FREQ_kHz (20.0)

    #define USER_NUM_PWM_TICKS_PER_ISR_TICK (2)
    #define USER_NUM_ISR_TICKS_PER_CTRL_TICK (1)
    #define USER_NUM_CTRL_TICKS_PER_CURRENT_TICK (1)
    #define USER_NUM_CTRL_TICKS_PER_EST_TICK (1)
    #define USER_NUM_CTRL_TICKS_PER_SPEED_TICK (10)
    #define USER_NUM_CTRL_TICKS_PER_TRAJ_TICK (10)

    this uses 20 KHz PWM with 10 KHz ISR/CTRL/CURRENT/EST rates and 1 KHz SPEED/TRAJ.

    Control is stable below <3500 RPM?

    Have you tried reducing your speed controller gains?

    Have you tried proj_lab05a Torque Mode where the speed loop is removed? This will allow you to reach maximum speed (with sinewave modulation).
  • hi,

    yes, this is my own custom hardware.

    motor could reach 5000RPM with lab12b, so may i confirm that current sensor is correct?

    i have tried lab4, motor could reach maximum speed, is there have any different with lab5a?

    yes, Control is stable below 3500 RPM.

    i had tried to control motor with your config advise in user.h, but it have no effect on my problem.

    and i found a problem as follow pic:

    the refvalue & fbackvalue is very stable, and they larger than outMax.

    is there something wrong?

  • try reducing your pid_spd.Kp value to increase stability at higher speeds.

    since lab04/05a are stable it proves everything else besides the speed loop is operating correctly.

    since it also appears you have the InstaSPIN-MOTION enabled device you can also try the lab05c-05e to use the SpinTAC speed controller for better stability.
  • Hello,

    outMax limits the output of the speed controller, not the reference or the feedback value, so it is perfectly ok to have a feedback and/or reference larger than outMax.

    -Jorge

  • helllo,

    so may i regard outMax as the motor max accleration limit?

    if the absolute values of refValue and fBackValue are very different,and the output Value will become a large value,

    current loop use this to in/decrease the Iq?

  • hello,
    when i enable system, i found that pid value will refresh after "online", is there any function i could Write off to avoid pid rewrite?

    once motor loss control, it became shaking, and it couldn't recovery whatever gmotorVars.spdRef is.
    should i just reduce pid_spd.kp, and ignored iq & id?
  • Some days ago, motor could reach its max speed.
    is there any software issue i should check again?
  • The output of the speed controller sets the reference of the Iq current controller. So you are correct, if the reference and feedback value are large, then the output will be large.

    To change the gains of the speed controller, you need to change the values of the following global variables (using lab 5b as an example):

    gMotorVars.Kp_spd
    gMotorVars.Ki_spd
    gMotorVars.Kp_Idq
    gMotorVars.Ki_Idq
    gMotorVars.Kp_Idq
    gMotorVars.Ki_Idq

    So that when this function is called, all gains are updated:

    void updateKpKiGains(CTRL_Handle handle)
    {
      if((gMotorVars.CtrlState == CTRL_State_OnLine) && (gMotorVars.Flag_MotorIdentified == true) && (Flag_Latch_softwareUpdate == false))
        {
          // set the kp and ki speed values from the watch window
          CTRL_setKp(handle,CTRL_Type_PID_spd,gMotorVars.Kp_spd);
          CTRL_setKi(handle,CTRL_Type_PID_spd,gMotorVars.Ki_spd);
    
          // set the kp and ki current values for Id and Iq from the watch window
          CTRL_setKp(handle,CTRL_Type_PID_Id,gMotorVars.Kp_Idq);
          CTRL_setKi(handle,CTRL_Type_PID_Id,gMotorVars.Ki_Idq);
          CTRL_setKp(handle,CTRL_Type_PID_Iq,gMotorVars.Kp_Idq);
          CTRL_setKi(handle,CTRL_Type_PID_Iq,gMotorVars.Ki_Idq);
    	}
    
      return;
    } // end of updateKpKiGains() function

    You mentioned that the maximum speed was reached, could you confirm if there are pending issues?

    -Jorge

  • hello,
    i run lab2 again and use the result to drive motor, everything became correct.(had seen that motor parament decide PI)

    but i don't understand is why lab2's result is different from the rated parament which in motor document.

    Rated_Rs = 0.34Ω, Lab2_Rs = 0.23Ω

    Rated_Ls = 0.0084, Lab2_Ls = 0.0034.

    is there have any problem with hardware(voltage/current filter) ?
  • Just curious...is your motor a delta wound motor? We calculate resistance as if it were a Y wound motor. The translation between delta to Y is 3 to 1. But that can't totally explain the difference since it is still off by a factor of 2. But it is curious that it is off by exactly 2X.
    -Dave
  • I bet your parameters are line to line. ours are line-neutral which would be half. And the ones in the datasheet are usually not very accurate.