DRV8353RS-EVM: DRV8353RS-EVM, LAUNCHXL-F28027F, ISO-F28027F, TORQUE CONTROL of BLDC

Part Number: DRV8353RS-EVM
Other Parts Discussed in Thread: MOTORWARE,
  1. We would like to know the values of Kp, Ki, and Kd values using Proj_lab05b. So, let us know which variable we need to call in the watch window, or do we need to add any commands in the main program for it? And How to give the set value for the motor speed?
  2.  We would like to measure the value of the current sense from the controller. What are the steps for that? When referred, there was a sample program in Proj_lab05a, But, What is the function of the throttle loop in that. Could you please explain? And How to set the limit for the current sense?

Thanks and Regards

JESINTHA E 

  • Hi Jesintha,

    I will forward this to the C2000 team for support of MotorWare using DRV8353RS-EVM. 

    I believe you should be able to look in the gMotorVars structure for Kp, Ki, and Kd values, as well as a variable for the speed value (SpeedRef). 

    Also the values for the current sense should be in Adc structure, but not sure what the variables are called. Limit for current sense in DRV8353RS can be set in the driver through the VDS_LVL overcurrent settings or there may be a software threshold set to trigger a fault if the measured current sense is above a limit. 

    Thanks,
    Aaron

  •  You might take a look at the lab guide in the folder below after you install the motorWare.

    C:\ti\motorware\motorware_1_01_00_18\docs\labs

    Set the reference speed of the motor to gMotorVars.SpeedRef_krpm

     gMotorVars.Kp_Idq and gMotorVars.Ki_Idq for the gains of current PI controller

    gMotorVars.Kp_spd and gMotorVars.Ki_spd for the gains of speed PI controller

  • 1) We would like to know how to set the speed reference of the motor using gMotorVars.SpeedRef_krpm, Where to assign the value and in which file of the project?



    In the Instaspin Lab's datasheet, we could find that, We need to set gMotorVars.SpeedRef_krpm to 1 inorder to spin the motor at 1000 rpm. But we need to run the motor at 3600 rpm, What value must be set?

    2) We want to know what is the default value set in current sense and how to set these values and in which file do we need to change? gMotorVars.Kp_Idq and gMotorVars.Ki_Idq for the gains of current PI controller.   

  • 1) We would like to know how to set the speed reference of the motor using gMotorVars.SpeedRef_krpm, Where to assign the value and in which file of the project?

    You can assign a value to gMotorVars.SpeedRef_krpm in background loop as below for setting the speed to 1000rpm.

    gMotorVars.SpeedRef_krpm = _IQ(1.0);

    2) We want to know what is the default value set in current sense and how to set these values and in which file do we need to change? gMotorVars.Kp_Idq and gMotorVars.Ki_Idq for the gains of current PI controller.   

    The default values are calculated according to the motor and hardware parameters in USER_calcPIgains() function of user.c file.

    You can find the function below in proj_labxx.c, 

            // update Kp and Ki gains

            updateKpKiGains(ctrlHandle);

    And then you might add the following codes in font of updateKpKiGains(ctrlHandle) to set the gains to a value you want.

    gMotorVars.Kp_Idq = Kp_Idq_set_value;

    gMotorVars.Ki_Idq = Ki_Idq_set_value;

    gMotorVars.Kp_spd = Kp_spd_set_value;

    gMotorVars.Ki_spd = Ki_spd_set_value;

  • Thank you Yanming. 

    In the Instaspin Lab's datasheet, we could find that, We need to set gMotorVars.SpeedRef_krpm to 1.0  inorder to spin the motor at 1000 rpm. But when we tried, The maximum rpm was only 690. The maximum speed of our motor is 3600 rpm. So, What parameters do we need to change for the motor to run at 3600 rpm? and What is the _IQ value needs to be set for that?

  • All of the projects in motorWare uses the IQmath based PU format. _IQ(1.0) means 1000rpm. gMotorVars.SpeedRef_krpm = _IQ(3.6) for 3600rpm.

    Please make sure that the motor parameters are set correctly in user.h file. If not, you may try to use lab02c to identify the motor parameters. And also, need to set the right hardware parameters according to the hardware board.

    #define USER_ADC_FULL_SCALE_VOLTAGE_V     (132.7979508)  // DRV8353EVM = 129.6126 V

    #define USER_ADC_FULL_SCALE_CURRENT_A     (47.14285714)     // DRV8353EVM = 47.14285714A/Gain=10VpV

    #define USER_VOLTAGE_FILTER_POLE_Hz     (348.3834808)   // DRV8353EVM = 348.3834808 Hz

    You should implement the speed close loop like lab05b or lab10a if you want to achieve a stable and precise feedback speed, not the torque control.

    You might refer to the examples below for using the DRV8353RS-EVM with InstaSPIN-FOC.

    [FAQ] DRV8353RS-EVM with InstaSPIN and MotorWare support

    https://e2e.ti.com/support/microcontrollers/c2000/f/171/t/921751