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.

drv8301 bldc clarke transformation and current measurement

Other Parts Discussed in Thread: MOTORWARE, TMS570LS3137

Hi. I have 8301 kit and I am using motorware program. I tried to control my bldc motor with FOC algorithm and I am using
encoder. I have suprised about clarke transformation algorithm (clarkeHandle) in the code because it is different from
theoretical equation which is below.

Ialfa=Ia
Ibeta=(Ia+2*Ib)/sqrt(3)

However in the program;


pOutVec->value[0] = pInVec->value[0] * alpha_sf;
pOutVec->value[1] = (pInVec->value[0] + (pInVec->value[1] * 2) ) * beta_sf;

alpha_sf=1.00 and beta_sf=1.00

I think that this beta_sf should be 1/sqrt(3) not 1.00. I couldn't understand why beta_sf value is 1.00?

Also my motor currents are measured from low side sense resistor. To read correct motor current from sense resistor low
side A and B leg switches should on. In other words I should read sense voltage by ADC when low side switches conduct. Whic
part of the code is doing this interrupt?

  • 1. Please refer to CTRL_setupClarke_I() function in ctrl.c, the beta_sf should be set to 1/sqrt(3).
    2. All lab projects in motorware used shunt resistors for current sampling as you required, you may refer to the configuration in lab project.

  •  Thanks for your quick response. I have checked again and I highlighted that part  with screenshot.  May be I should give more details about my projetcs.

    Motorware_1_00_03_03\sw\solutions\foc_encoder_speed\boards\drv8301kit_revD\hercules\tms570ls3137\projects

    I can change 1.00 to 1/sqrt(3) however I couldnt understand second answer. May be this program (hercules/tms570ls3137) work what I said but I couldnt find that part in the code (pwm.c, rampgen.c etc.). I am new in this area. Could you give more detail about your second answer?

  • 1. I suppose you were not using C2000 motorware, you may refer to any lab projects in C2000 motorware and find the correct setting.
    2. As above reply, it's for C2000 motorware with InstaSPIN-FOC. You may refer to these example projects if you wanted to use TMS570.
  • Hi Yanming. Thanks for your answers but they didnt help me. I have DRV8301-LS31-KIT. I have TMS570LS3137 controller. I want to control my motor using Field Oriented Control. Also, I want to feedback from my quadrature encoder. In other words I want to control my motor with its sensor not sensorless control. To do this,  I am using, 

    Motorware_1_00_03_03\sw\solutions\foc_encoder_speed\boards\drv8301kit_revD\hercules\tms570ls3137\projects 

    as I mendioned above. 

    In addition, I am using Code Composer Studio v5  so that I can import projetcs and control my moıtor with microcontroller.

    Which project I should use? Could you suggest me?

  • You can find the example project in the folder ad below if you installed C2000 motorware.
    C:\ti\motorware\motorware_1_01_00_18\sw\solutions\instaspin_motion\boards\drv8301kit_revD\f28x\f2806xM

    I am unfamiliar with Hercules MCU. You may post your question to Hercules™ Safety Microcontrollers Forum as below since you are using Hercules MCU.
    e2e.ti.com/.../312