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.

TMS320F28035: Space Vector PWM

Part Number: TMS320F28035
Other Parts Discussed in Thread: DRV8301, , CONTROLSUITE, MOTORWARE

Hello everyone,

I have somewhat of a general question.  I am using the TMS320F28035 along with the DRV8301 to drive a BLDC motor.  Due to my ignorance of how the ePWM modules were paired (ePWMxA amd ePWMxB), I had designed the board to use all ePWMxA's (ePWM1A-ePWM6A) for the PWMs sent to the DRV8301.  Luckily, I learned from one of you guys at TI that it is possible to use complimentary PWM in conjunction with SVPWM techniques to control the motor.  So I decided to do the following with what I had to work with:

1.  I setup the DRV8301 to use 3PWM mode with default dead time (seems to be enough dead time now but may increase dead time later).

2.  I am now using only ePWM1A, ePWM2A, and ePWM3A (I am letting the DRV8301 take care of the complimentary pwm signals).

3.  I am using the built in current amplifiers of the DRV8301 to measure the phase currents.

4. Using the motor Hall signals to measure speed and rotor position.

So now for the question.  Since I do not have any type of PI controller or anything else other than Hall signals and current measurements, how would I apply the information I am obtaining from the motor to implement SVPWM?  My thoughts are that I can use the halls to determine what sector needs to be used.  And then I can measure the current to determine the timing for the two space vector pwm settings along with the null vector pwm settings.  I am trying to implement center aligned forward-reverse SVPWM.  I understand the concept of SVPWM (I couldn't quit smiling when it clicked in my mind lol), but I have never implemented the SVPWM technique.  In fact, this is my first time designing a motor controller.  Also, just one more question about PWM:  Is there a rule of thumb for how fast the PWM frequency needs to be?  My MCU is running at approximately 16 MHz, and  I heard that the PWM frequency should be at least 10x's the electrical frequency of the the motor.  Any suggestions or help would be greatly appreciated.

Thank you,

Brandon

    

  • 1. For DRV8301, you can only use 3 PWMs from C2000 to control the DRV8301 as you descripted.

    2. For SVPWM, you can download the C2000 controlSUITE or motorWare from TI website, there are many example projects to show how to drive the motor.
    Maybe, you can refer to "PM_Sensorless" project in \ti\controlSUITE\development_kits\DRV830x-HC-C2-KIT_v105\PM_Sensorless if you installed the controlSUITE, this project implement sensorless FOC with SVPWM. There are two types SVPWM, you can find the detail description in the library guide in controlSUITE. Maybe, you can use SVGEN_MF if you don't have any speed or current close loop in your project.

    Btw, the F28035 can run up to 60MHz, why did you set its frequency to 16MHz? Often, the pwm frequency must be more than 12 times of maximum frequency of motor.
  • Yanming,

    Thanks for the response.  I will look into the controlSUITE and motorWare you mentioned.  Concerning the MCU operating frequency, I am not sure if I have it correct. The way I calculated the frequency was to measure the frequency of the PWM counter.  Also, I didn't account for the up-down count having a pwm period twice as much as the maximum counter value.  So the frequency of the counter I measured should have been about 30 MHz.  Is the counter the same frequency as the CPU internal oscillator?  Also, I am not sure if I set the clock correctly for the CPU itself.  I have an external crystal but using the internal oscillator.  Do you know how I need to set up the MCU to operate at 60 MHz with an external crystal?  Thank you.

    -Brandon

  • Brandon,

            controlSUITE examples show how to setup the clocks in the system init function. It is possible to determine your clock rate by looking at the speed of the PWM counter, however the best way is to observe your clock frequency using XCLKOUT... This and other clocking details, including how to setup the PLL, are described in the System Control and Interrupts Reference Guide.

    Regards,
    Cody