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.

CCS/DRV8301-69M-KIT: Motor does not rotate according to desired speed in lab12b

Part Number: DRV8301-69M-KIT

Tool/software: Code Composer Studio

I calculated inertia and friction value from lab12a.

Below is the listed parameters of My_Motor:

#define USER_MOTOR_TYPE MOTOR_Type_Pm
#define USER_MOTOR_NUM_POLE_PAIRS (2)
#define USER_MOTOR_Rr (NULL)
#define USER_MOTOR_Rs (0.06247277)
#define USER_MOTOR_Ls_d (0.0001257352)//0.0001257352
#define USER_MOTOR_Ls_q (0.0001257352)//0.0001257352
#define USER_MOTOR_RATED_FLUX (0.06861208)//0.06861208
#define USER_MOTOR_MAGNETIZING_CURRENT (NULL)
#define USER_MOTOR_RES_EST_CURRENT (3.4)
#define USER_MOTOR_IND_EST_CURRENT (-3.4)
#define USER_MOTOR_MAX_CURRENT (3.5)
#define USER_MOTOR_FLUX_EST_FREQ_Hz (10.0)
#define USER_MOTOR_ENCODER_LINES (1000)
#define USER_MOTOR_MAX_SPEED_KRPM (5270)
#define USER_SYSTEM_INERTIA (0.287504)//0.2291667461
#define USER_SYSTEM_FRICTION (0.83979)//0.819734
#define USER_SYSTEM_BANDWIDTH_SCALE (12.0)

My encoder has 2000 CPR so I have set Encoder lines to 1000.

I observed very unusual behavior , Motor keeps on spinning at constant speed irrespective of the speed I set into SpeedRefKrpm.

Motor doesnot stop even iF i set RefSpeed at 0.0.

  • Ayushi,

    Can you please share some more information on the type of motor you are running? It seems the inductance of the motor is really low. Please make sure to use lab02c for motor identification.

    You can try to run inertia ID and evaluate the InstaSPIN MOTION with lab 05c/d and see if it works with that and see if the USER_SYSTEM_INERTIA and USER_SYSTEM_FRICTION values matches with your sensored result.

    For the encoder, what do you mean by 2000 CPR? If you are using quadrature encoder and you get 2000 counts per revolution, that means you have 500 lines in encoder. Please also make sure the the enc_zero_offset is properly set based on your motor, encoder and connection in ENC_setup function.

    Han
  • INductance of motor at !khz is 0.165 millihenries

     

    Unfortunately lab5c does not work for me , I determine Inertia and Friction from GUI composer and substituted in lab5d and lab5d works fine for me.

    I am using Incremental encoder and it has 2000CPR, I read in some post that no. of encoder lines = CPR/2

    Can you help me in explaining how to set Encoder Zero offset and test it whether its correct or not

    Thanks,

    Ayushi

  • Are you measuring the inductance with LCR meter? If you are doing so, please be aware the Rs and Ls values are for single phase coil, not phase to phase. If you are using the motor parameter from GUI, then I will suggest try out lab02c since that identify low inductance motor better than the GUI version.

    If you can share datasheet of your motor / encoder, it will be helpful for me to have better understanding of your system. In general, quadrature encoder will give 4 count per line since both raising and falling edge of A / B signals are counted. Please confirm what do you mean by CPR.

    For the encoder zero offset, it relates to the index line location with respect to the electrical zero (i.e. d axis is in the same direction of a axis).
  • E3_datasheet.pdfCPR is counts per revolution for my encoder , which is 2000

  • Based on the encoder datasheet, the CPR value is number of lines and the PPR is 4 times the CPR (since QEP counts both raising and falling edge of A and B signal), which is the number of counts you get from QEP value. For your encoder, you should put 2000 as number of lines.

    For the motor, you can give d axis current (connect a to positive and connect b and c to negative) with controlled current. The motor shaft will stop at electrical angle zero. There will be number of pole pair positions that the rotor could stop.
  • Hi Han,

    Problem is resolved !

    As you suggested  I changed the encoder lines to 2000 and change the current source.

    Thanks a lot!