SPWM Calculations for Inverter Circuit

Below in Figure 1 is a graph with a triangle wave and three-phase sinusoidal waves.

Triangle and three-phase sine waves
Figure 1: Triangle and three-phase sinusoidal waves

Each of the three sinusoidal waves are compared to the triangle wave to determine the pulse width modulation of each set of MOSFETs. This is a technique called Sinusoidal Pulse Width Modulation (SPWM). Below in Figure 2 is the inverter circuit with the MOSFETs numbered.

Inverter circuit with MOSFETs numbered
Figure 2: Inverter circuit with MOSFETs numbered

The MOSFETs are paired in the vertical direction. Below in Figure 3 is the PWM graph for the 0-degree phase shifted sinusoidal wave.

PWM for 0-degree phase shifted sinusoidal wave
Figure 3: PWM for 0-degree phase shifted sinusoidal wave

When the sinusoidal wave is greater than the triangle wave, MOSFET 1 of the first pair is high while MOSFET 2 is low. When the sinusoidal wave is less than the triangle wave, MOSFET 1 is low while MOSFET 2 is high. Below in Figure 4 is the PWM graph for the 120-degree phase shifted sinusoidal wave.

PWM for 120-degree phase shifted sinusoidal wave
Figure 4: PWM for 120-degree phase shifted sinusoidal wave

When the sinusoidal wave is greater than the triangle wave, MOSFET 3 of the second pair is high while MOSFET 4 is low. When the sinusoidal wave is less than the triangle wave, MOSFET 3 is low while MOSFET 4 is high. Below in Figure 5 is the PWM graph for the 240-degree phase shifted sinusoidal wave.

PWM for 240-degree phase shifted sinusoidal wave
Figure 5: PWM for 240-degree phase shifted sinusoidal wave

When the sinusoidal wave is greater than the triangle wave, MOSFET 5 of the third pair is high while MOSFET 6 is low. When the sinusoidal wave is less than the triangle wave, MOSFET 5 is low while MOSFET 6 is high.

In order to use Arduino’s PWM, the ON and OFF delays of each MOSFET need to be calculated based on the PWM graphs. This will be done in MATLAB.

Below in Figure 6 is the Simulink model of the inverter circuit that creates the same PWM graphs.

Simulink Inverter
Figure 6: Simulink Inverter

Below in Figure 7 is the output of the Simulink inverter.

Simulink Inverter Output
Figure 7: Simulink Inverter Output

Click here for the MATLAB code.