Inverter
Inverters convert a DC voltage into an AC voltage. They work like a 4QS. Using PWM, sinusoidal voltages instead of DC voltages are generated on average over time.
Sine generator
A sine has positive and negative values. With a PWM we can only generate positive values between 0% and 100% (i.e. between 0 and 1). Therefore, in the first step we raise the mean value of the sine to 50% of the DC input voltage. Then we halve the values so that the shifted sine fits into the PWM value range of [0 … 1].

To generate a sinusoidal voltage from a PWM, we need a duty cycle that changes over time. When the sine reaches its maximum close to 1, the duty cycle is at its maximum. When the sine reaches its minimum close to 0, the duty cycle is at its minimum. When the sine reaches its “zero crossing” at 0.5, the duty cycle is 50%.

The PWM signals that generate the sine signal at certain points in time are drawn in red. The corresponding points in time are marked with red dots. Viewed over a short time, the PWM can only take the values 0 and 1. Only the time averages over a longer time range can take intermediate values.
The duty cycle values are usually determined by comparing a sine with a triangle. For this we look at only a small section of the sine function.

The upper figure shows the falling part of the sine function over time in blue. A triangular waveform can be seen in red. When the sine is greater than the triangle, the PWM in the lower figure outputs a HIGH level. When the sine is smaller than the triangle, the PWM outputs a LOW level. So when the sine is to take high values (far left), it is greater than the triangle for a longer time. The duty cycle is therefore high. When the sine is to be small (far right), the blue sine curve is greater than the triangle (red) for only a very short time. Then the duty cycle is small.
1P4QS
The PWM is usually calculated by a microcontroller. We now use this PWM to control the switches of a 4QS. When the PWM is HIGH, switches S1 and S4 close. When it is LOW, switches S2 and S3 close.

To the left of the load we generate a sine with the PWM. To the right of the load we generate the inverted sine. As a result, a sinusoidal voltage appears across the load on average over time.
3P4QS
In many applications, AC voltages are needed in three phases. This applies in particular to electrical machines or to applications that feed into the grid (e.g. PV systems). The machine is connected either in star or in delta. So the machine has three terminals. If you want to control an electrical machine, you therefore need three sinusoidal voltages. The model of a PMSM in star connection looks, for example, like this:

The PMSM is modelled as a series connection of an inductor and a voltage source. The voltage sources in the machine model generate a speed-dependent AC voltage. The current through the inductors generates a torque. The goal of machine control is usually to impress a sinusoidal current of a certain amplitude and phase. The speed-dependent voltage source must be taken into account. You can find more on this in the drive technology tutorial or in the lecture EMA I. We connect a 3P4QS as an inverter to the PMSM:
