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.

TMS320F2806: PWM frequency definition and FOC Update Rate

Part Number: TMS320F2806

Hi,

Apologies if this is the wrong forum for this, but I had a general question about the way PWM works in FOC.

In the InstaSPIN documentation the default PWM frequency is listed as 20kHz.

Is that the PWM period?  Meaning, if I set a PWM output to a duty cycle to 50%, do I see a 20kHz square wave?

If so, how many bits of resolution is that PWM?   If that was an 8-bit PWM, that means that the shortest pulse (1/255)*(1/20,000) would be less than a microsecond wide.

This seems wrong, since the output transistors can't really switch that fast, so I'm guessing I'm not understanding this correctly.

Also, if the FOC update rate is (say) 10kHz, then doesn't that determine the minimum PWM period as well?

The FOC update rate and the PWM rate must be related somehow, or one must limit the other...  Right?

Thanks again,

Todd

  • 1. PWM period is based on PWM frequency, it equals to 1/(PWM frequency), so the PWM period is 50us if PWM frequency is 20kHz. That's right, you could see a 20kHz square wave if the duty of PWM is 50%.
    2. The PWM resolution depends on both CPU and PWM frequency, which equals to log2(CPU Frequency/PWM frequency), for example, the CPU frequency is 100MHz, PWM frequency is 20kHz, and then the resolution is log2(100*1000/20)=log2(5000). The shortest pulse equals to the time clock of PWM, it's CPU time clock that is 10ns if CPUD frequency is 100MHz.
    3. Different concept. The right PWM frequency depends on the maximum switch frequency and turn on/ turn off time that could be found in FET datasheet.
    4. Generally, the FOC is updated with the PWM frequency since the current sampling equals to it, but you can use a different one, it's better to implement FOC every current sample.