Hey guys,
You’ve already passed through the most relevant topics about 6pwm and 3pwm difference.
I’d just like to complete the discussion a bit.
In terms of FOC when using PWM modulation none the less if its sinusoidal or space vector there is no real difference in between the two.
The 6pwm is a bit more complicated to setup in software and has several more parameters like the dead time. But it essentially, with simplefoc, does not give you any other performance benefits.
So the choice is mostly related to the type of hardware you’re using: your driver architecture, your microcontroller capacity to driver 6pwm and the available pinout and similar.
For the FOC algorithm in it’s standard form no real difference.
However, having all 6 mosfet switches available has some benefits, you can disable certain phases by setting high and low side mosfets to the high impedance. This can be usefull when you’re implementing the BackEMF control of the motor, there you are obliged to disable one phase and measure the induced voltage on it, using the 3pwm you are not able to do that (except if yor driver has one enable pin per phase - but even then you need an additional pin to do it).
Another interest of having all 6 mosfets controllable is to avoid using PWM at all. You can bang-bang control your BLDC motor by choosing wisely which switches to open and when. The true Space vector algorithm is implemented not using the PWM but by controlling the switches directly, and the main benefit of the space vector modulation is that it provides you with a sequence of turning on and off the switches in a way that you never need to change the state of more than one switch (mosfet).
However these options are not implemented in the simplefoc for the moment, but might come at some point ![]()
I would be interested to at least support BackEMF control at least.