Member-only story
Frequency Modulation (FM), simulation in Python
Frequency Modulation (FM) was introduced to overcome the disadvantages of AM, which is not robust agains noise and interference (a Python simulation has been carried out here). FM encodes the information data varying the frequency of the carrier signal. Because of that, this modulation is more robust agains additive noise than the AM modulation. Therefore, it is widely used in audio broadcasting, specially for music. It is also used for other applications such as radar or video transmission systems. A classification of more modulation techniques can be found in this article.
Below, the FM expression is detailed, and the Python code to modulate and demodulate FM signals is shown.
FM Theory
This modulation is an analog modulation which is defined by the following expresion [1]:
where Ac is the carrier ampligude, fc is the angular frequency of the carrier and θm(t) is:
where m(τ) is the data signal and fΔ is the frequency deviation, which defines the maximum frequency deviation of the FM signal from the center frequency (fc). Therefore, the frequency depends on the frequency deviation and on the data signal. For a data signal which is limited to the range ± 1, the FM signal frequency ranges from fc-fΔ to fc+fΔ.
We can see an example of a FM modulated signal in the Figure below. Modulation, carrier and FM signals are shown, and it can be seen how the frequency varies faster for higher values of the modulation signal.

Frequency deviation and modulation index
We already introduced the frequency deviation (fΔ), which determines the maximum and minimum frequencies of the FM signal.
In the same way that the AM modulation, we define the FM modulation index as the ratio of frequency deviation (fΔ) and the maximum frequency of the modulation signal (fm).
As an example, the Figure below shows two different FM signals for the same data signal (in green). The signal in red has a higher frequency deviation than the signal in purple…