# Why and how is PWM implemented in Field Oriented Control (FOC) ?

Mar 25, 2020
2
Hi everyone,

I am trying to understand and implement FOC algorithm in MATLAB for a PMSM. I understand we are converting the 3 phase stator currents into 2 time-invariant stator currents: (direct and quadrature currents or Id and Iq, respectively). But I do not unsderstand how PWM is applied here since PWM can only alternate between High and Low currents but I do not understand why this is required or how it will help in torque control since. I thought the PI controllers adjusted Id and Iq to be the same as the reference currents and then inverse Park transform and inverse Clarke transfroms would be applied to get 3 phase voltages. PWM shouldn't be used since we are feeding 3 phase voltages into the stator. So what is the function of PWM here ? What does it do ? Please your help would be really appreciated since I am struggling a lot with this. Thank you in advance.

Also could someone explain me how the PI controllers manage to convert currents into voltages to be fed into the inverse Park transform ?

Also why is SPWM employed ? what makes is that good ? (Could you also point me to a source (preferably academic) which explains SPWM ?

Moderator
Nov 17, 2011
13,736

#### hevans1944

##### Hop - AC8NS
Jun 21, 2012
4,886
PWM is widely used to implement so-called "micro-stepping" of DC stepper motors. By using a high-frequency (much higher than the actual stepping frequency) PWM current, that has the pulse-width modulated to model a sinusoidal wave form, the quadrature (in space) magnetic fields can be almost infinitely varied in relative phase and/or amplitude, allowing the rotor to be micropositioned between the poles of the motor.

Thus, the permanent magnet rotor is influenced by two quadruature (in space) magnetic fields that are created by sinusoidal currents, whose relative phase determines the rotor position and whose amplitude determines the torque. This is a vast improvement over simple PWM controllers that varied the strength (and sometime the polarity) of the magnetic fields between just two values, using quadrature square waves of variable duty cycle. The PWM square waves stepped the DC motor rotor in coarse steps determined by the number of poles and did not allow pausing at locations between the poles. The only purpose of PWM in these early applications was to limit the current through the switching transistors supplying power to the quadrature windings of the motor.

It was the later ability to modulate this current in a sinusoidal fashion that allowed microstepping to occur. Once the hardware became available to model sine waves with pulse-width modulation all sorts of AC application opened up, the first probably being DC-to-AC power inverters. Three-phase motor power and control is a natural consequence of this technology too.

Replies
11
Views
254
Replies
1
Views
132
Replies
10
Views
411
Replies
101
Views
2K
Replies
8
Views
790