sahil-kale / basilisk-actuator-control-lib

Hardware-agnostic library enabling field oriented control of of PMSM and BLDC Motors
https://sahil-kale.github.io/basilisk-actuator-control-lib/
1 stars 0 forks source link

Understand why sinusoidal PWM requires multiplying the inverse clark transform results by 2.0f #26

Closed sahil-kale closed 10 months ago

sahil-kale commented 10 months ago

Per matlab and wikipedia's documentation, the inverse clarke transform is implemented correctly. https://en.wikipedia.org/wiki/Alpha%E2%80%93beta_transformation

However, when checking the results of the voltage vector produced by the sine PWM, it was noted that the output of the duty cycles and by extension, output of the voltage vectors, were off by a factor of 1.5

I am not fully sure why the multiplication of the voltages produced by the inverse clarke are required, but that is the case so far.

Understanding this would be good.

sahil-kale commented 10 months ago

Edit: it is actually a factor of 2 (something like 3/2 * 4/3)? Or perhaps something to do with phase-phase vs phase-gnd voltage?

sahil-kale commented 10 months ago

I think I figured out the reason why: The inverse clark park transforms returns a voltage vector that is either positive OR negative. However, we're able to generate +- bus voltage / 2. Therefore, when scaling the voltage vectors of the inverse, we need to divide by half the bus voltage, or in this case, scale by 2 :D