Frequency Modulation (FM) using MATLAB
Last Updated :
03 Apr, 2023
Frequency modulation is the process of the changing of frequency of the carrier signal in accordance with the instantaneous value/frequency of the message signal. The amplitude and phase of the signal are kept constant, but one can observe the fluctuations of frequency with respect to modulating signal.
Any study is more effective when it is explained in a theoretical method in addition to its practical, Here you will learn theoretical as well as practical implementation on the MATLAB interface Which will make you more familiar with the concept of Frequency modulation
Starting with the theoretical method where we will discuss the derivation of the frequency modulation;
Advantages of frequency modulation
- The amplitude of the Frequency modulated wave doesn’t get affected.
- FM decreases the noise, Hence increasing in S/N ratio.
- Noise can also be decreased by an increase in frequency deviation.
- Reduces the interference by the adjacent channels through guard bands.
- It operates in a very high frequency.
Applications of FM
- used in video cassette recorders.
- used in Radio Broadcast and satellite TV
- used for audio frequency synthesis.
Derivation To show the frequency deviation
Fig 1 Handwritten derivation of Frequency Modulation
Now starting with the MATLAB INTERFACE first we will check the original signal and modulated signal. Using MATLAB helps you to take accurate readings. Here starts with the Code:
Code:
MATLAB
fs = 1000;
fc = 200;
t = (0:1/fs:0.2)';
x = sin(2*pi*30*t)+2*sin(2*pi*60*t);
fDev = 50;
y = fmmod(x,fc,fs,fDev);
subplot(2,1,1)
plot(t,x)
xlabel( 'Time(s)' )
ylabel( 'Amplitude' )
legend( 'original signal' )
grid on;
subplot(2,1,2)
plot(t,y)
xlabel( 'Time(s)' )
ylabel( 'Amplitude' )
legend( 'modulated signal' )
grid on;
|
Output:
Fig 2 Shows the original signal and modulated signal
Code:
Matlab
fs = 1000;
fc = 200;
t = (0:1/fs:0.2)';
x = sin(2*pi*30*t)+2*sin(2*pi*60*t);
fDev = 50;
y = fmmod(x,fc,fs,fDev);
subplot(2,1,1);
plot(t,x);
xlabel( 'Time (s)' )
ylabel( 'Amplitude' )
legend( 'original signal' )
grid on;
subplot(2,1,2);
plot(t,x, 'r' ,t,y, 'b-' )
xlabel( 'Time (s)' )
ylabel( 'Amplitude' )
legend( 'Original Signal' , 'Modulated Signal' )
|
Output:
Fig 3 original signal and graph with both original and modulated signal
Brief explanation of terms used in the code
- fs Sampling rate, fc Carrier frequency are the frequencies.
- fDev is the frequency deviation.
- t is the time division.
- y = Frequency modulate x.
- y = fmmod (x, Fc, Fs, freqdev) returns a frequency modulated (FM) signal y, given the input message signal x, where the carrier signal has frequency Fc and sampling rate Fs. freqdev is the frequency deviation of the modulated signal.
- Plot is used for plotting the graph between the two entities.
- Subplot is used to plot more than one graph on the same output screen for better comparison
- xlabel and ylabel commands are used for defining the axis.
- legend is used to define the contents of graph with different colors or lines.
- grid on displays the major grid lines for the current axes.
Share your thoughts in the comments
Please Login to comment...