Is it correct to analyse the impact of a low-pass by regarding at the Fourier transform of a PWM signal, even if this one is generated with a H-Bridge ? And deduce that the higher frequencies forming the square signal are attenuated or even disappear ?
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.
In order to sufficiently suppress the unwanted components most often a higher order filter is used.
Is it correct to analyse the impact of a low-pass by regarding at the Fourier transform of a PWM signal, even if this one is generated with a H-Bridge ?
It can be correct to analyse a filter like that, but the reference will have to be the waveform before the filter, which is the PWM. But this has too much information, that is, it has the modulation (the sine you want to extract) and the switching, variable pulse-width frequency, which is to be filtered out (thus unneeded). So you'd be comparing a useful waveform (output) with a not so useful one (input). The only time this would be useful is to see just how well the switching frequency has been filtered out, but that can be easily deducted from the transfer function.
Here's a small example of what I mean:
V(x) is the PWM waveform,
V(o) is the output. It's a self-oscillating gizmo, so the switching frequency varies, and is present in the interval ~300kHz~420kHz, while the modulation is a 5kHz sine (m=70.71%). As you an see, visually the PWM (orange) waveform is not wanted and needs to be filtered out, while
V(o) is a sine with residual high-frequency content (no filter is perfect). You can verify in the FFT window that the carrier has been attenuated, you can measure it, but it would be an unnecessary step since the transfer function of the filter is known and the attenuation at a certain frequency can be easily determined analytically:
and the attenuations at 300kHz and 420kHz are -37.25dB and -43.07dB (more or less what you see in the picture, save the resolution and the fact that I didn't use a tighter timestep,
And deduce that the higher frequencies forming the square signal are attenuated or even disappear ?
If this would be your goal then you'd be doing a very unnecessary thing, since the very purpose of the lowpass filter is to filter out high frequency content. That is, you don't ned to perform an FFT on a lowpass filter to deduce that it's a lowpass filter.
TLDR: Yes, you can, but a) it can be deducted and b) that's why you're building the filter in the first place, to attenuate by X dB at Y Hz.