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: How to run C2000 motorware Lab4 with Speed loop as well as Current Loop Controller?

Part Number: TMS320F28027F

Hi Everyone,

I have implemented Lab 4 using hvkit_rev1p1 . Using gMotorVars.Iq_RefA Current Loop Control(torque) and the desired RPM(8500) is achieved!!

In that whatever acceleration i have achieved that is not enough for me, i want more acceleration.

So  my query is

Q1)To get higher acceleration, can i get it by enabling speed Control loop CTRL_setFlag_enableSpeedCtrl(ctrlHandle, true) in while loop?(using Lab4). and how to do it?


Q2) To get higher acceleration with required torque, is there any other method or lab?



  • Q1, yes, you might refer to lab05b or lab10a to enable speed close loop, and set the target speed and acceleration in the main loop.

    Q2. As Q1. Changing USER_MOTOR_MAX_CURRENT in user.h to set the target maximum troque.

    // set the speed reference
    CTRL_setSpd_ref_krpm(ctrlHandle, gMotorVars.SpeedRef_krpm);

    // set the speed acceleration

  • I am able to get 400rpm also with higher acceleration. But getting problem in deceleration with Lab5b.

    So, according to your suggestion i moved to Sensored lab. With Lab6a i am able to achieve higher acceleration+deceleration as well as low rpm(10rpm tested). 

    Thank you Yanming  for your support.