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.

TMS320F280049C: Relation between PWM frequency and sampling frequency in motor control algorithm.

Part Number: TMS320F280049C

Tool/software:

Hi team,

   I have developed bldc motor control algorithm using tms320f280049c and ganfet. In that i have confusion in sampling frequency and pwm frequency. If i set pwm freq at 20khz and sampling at 10khz the motor performance is good. If set pwm frequency and sampling frequency at the same rate motor not runs smoothly.

 So please tell us how to choose sampling frequency with respect to our pwm frequency and how it will affects the motor's performance.

Thanks, 

Sathish 

  • Hi Ajay

    If set pwm frequency and sampling frequency at the same rate motor not runs smoothly.

    Seemingly, the fast estimator ticks over runs the PWM frequency and duty cycle control, assuming 20KHz ticks. You may try the universal motor control SDK leveraging PPB (post parameter block) removing overhead from the application onto the hardware ADC modules. The conversion from x25 or x39 MCU class onto x49 is fairly easy to do if TI has not yet done so. We tested UMC-SDK code on x49 MCU and it does offer much improvement in the motor parameters control and current management overall. 

    Regards, 

  • Hi Sathish,

    How's the PWM module configured to update the duty cycle? How long does the control computation take?

    Thanks,

    Jiaxin

  • Hi Jiaxin,

              I'm running my control loop in the timer interrupt which runs at 10khz. So i was updating PWM duty cycle at the speed of 10khz. my PWM frequency is 20KHz.

    Thanks,
    Sathish P

  • Hi Ajay,

    Thanks for the extra information. Is the PWM configured in shadow mode? Can you use a GPIO to measure the time it takes for control loop calculation, i.e., timing between entering the interrupt for control computation and end of interrupt?

    Sincerely,

    Jiaxin

  • Hi Jiaxin,

       Is the PWM configured in shadow mode?
         
     yes, the PWM is configured in shadow mode.

      How long does the control computation take?
          In my code control computations takes 9.208 uS to complete 1 isr cycle.

    Thanks,
    Sathish 
             

  • Hi Ajay,

    This is weird. Your control computation doesn't take a long time and the PWM is configured in the right way. When you observed the motor didn't run smoothly, were the PWM frequency and control loop frequency both set at 10kHz or 20kHz? Can you share some current waveform and variable readings when the motor didn't run smoothly?

    Sincerely,

    Jiaxin