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.

TMS320F28027F: TMS320F28027F

Part Number: TMS320F28027F

Hello,

I am working on a project for an e-bike motor controller, I am using the controller TMS320F28027F, which is built on a custom board. before addressing the problem I'd like to mentioned all used elements.I am using Lab4 from InstaSPIN FOC. The torque ADC value is indicated from 0 to 5v.

The controller works fine on different PMSM motors, including one direct drive motor. the problem, there is one direct drive PMSM,  which I am facing problems with. The below attached pictures (2&3) shows how it looks on the direct drive motor, which is not good.

the motor parameters (I don't have the motor specs, I have followed the guide to reach the below values)

#define USER_SYSTEM_FREQ_MHz             (60.0)

#define USER_PWM_FREQ_kHz             (30.0)

#elif (USER_MOTOR == MI_motor)
#define USER_MOTOR_TYPE                 MOTOR_Type_Pm
#define USER_MOTOR_NUM_POLE_PAIRS       (7)
#define USER_MOTOR_Rr                   (NULL)
#define USER_MOTOR_Rs                 
#define USER_MOTOR_Ls_d              
#define USER_MOTOR_Ls_q                
#define USER_MOTOR_RATED_FLUX          
#define USER_MOTOR_MAGNETIZING_CURRENT  (NULL)
#define USER_MOTOR_RES_EST_CURRENT      (5.0)
#define USER_MOTOR_IND_EST_CURRENT      (-5.0)
#define USER_MOTOR_MAX_CURRENT          (40)
#define USER_MOTOR_FLUX_EST_FREQ_Hz     (10)  

It should look like attachment 1 but it comes out as attachment 2 and 3.

any tips or suggestions are highly appreciated

Blue is the input signal 0 to 5v & light blue is the output signal 0 to 40A.

attachment 1

  

attachment 2

attachment 3

  • Did you use lab02b or lab02c to identify the motor parameters first, and then set these parameters in user.h for lab04?

    You need to know the rated current and rated frequency of motor, and set a right USER_MOTOR_MAX_CURRENT (like 1.5*Rated Motor), USER_MOTOR_RES_EST_CURRENT(10~20% of Rated Current), USER_MOTOR_IND_EST_CURRENT(-10~20% of Rated Current), and USER_MOTOR_FLUX_EST_FREQ_Hz (10~20% of Rated Frequency) in user.h for motor parameters identification in lab02b or lab02c.

    After motor identification, you have to adjust the Kp and Ki of current PID regulator for startup and running since lan04 is torque control mode. I propose using speed close mode for startup and switch to torque mode for running in E-bike application.
  • Yanming,

    Thank you very much for your advice I am going to start with that.

    Kamal

  • I have been working as suggest above, I have adjusted my motor parameters. so far there is potential improvements but not the optimal that we are looking for. I still get spikes, please see the attached picture

  • What's the current waveform? Startup? Or Running? It seems you have to improve current and voltage signal sampling, and a accurate Rs can improve the startup performance also.