Fourier transform to understand filtering on PWM
The Fourier transform is used to analyze PWM signals. The result depends on the type of PWM like type of carrier and kind of modulation.

A typical result looks like shown in the picture below. The baseband signal is present and a number of intermodulation products around the carrier frequency.

The two spectra are for different amplitudes of the modulating signal.


In order to sufficiently suppress the unwanted components most often a higher order filter is used.