This tutorial explains how to create an Amplitude Modulation (AM) signal in Matlab. First thing you need to do is downloading the available code here: https://uk.mathworks.com/matlabcentral/fileexchange/56465-amplitude-modulation–am–in-time-and-frequency-domain
When running the code in Matlab, you should get the following AM signal:
And its spectrum:
As you can see in the code, fs=220500 Hz, fc=2000 Hz and fm=300 Hz.
Now, remember that if you are given a signal, you can measure the periods in the AM signal and calculate those frequencies:
- For the carrier frequency: measure the period of the fast oscillation.
- For the modulation frequency: measure the period of the slow oscillation.
Now, by measuring the maximum and minimum amplitudes you can also get the modulation index:
Figure 3: AM signal, measuring amplitudes
Now, from each of both previous equations, we leave m as a function of Amax and Amin and we equal them:
Which is roughly the same value than we use for our calculation: y(t)=Ac(1+mx(t))sin(2*pi*fp*t);
We hope you find useful this post. As you can see, AM signals are very easy to generate. In our next post, we will see a Frequency Modulation (FM) tutorial in Matlab.