You are on page 1of 11

Communication Systems Practice

Exp (No.3): (Frequency Modulation and Demodulation)

E THARAKA RAM(EC21B1005)
February 19, 2024

Aim
• To perform frequency modulation and demodulation using MATLAB and LabVIEW.

5
Software Used

00
Latest Version of MATLAB and LabVIEW.

Frequency Modulation
B1
Theory
Frequency modulation involves encoding information onto a signal, either analog or digital,
by adjusting the carrier wave’s frequency in line with the modulating signal’s frequency. The
modulating signal represents the information or message converted into an electronic signal.
21

In the context of signals represented by m(t) = Am cos(2πfm t) for the modulating signal
and c(t) = Ac cos(2πfc t) for the carrier signal, the frequency-modulated wave can be expressed
as:
EC

fm (t) = fc + kAm cos(2πfm t)


or equivalently:

fm (t) = fc + km(t)
Here, fm (t) denotes the frequency modulated wave, fc represents the frequency of the
carrier wave, m(t) is the modulating signal, and k is the proportionality constant.

Demodulation
The provided diagrams depict the block diagram and waveforms generated in LabVIEW for
Frequency Modulation (FM). The block diagram illustrates the FM modulation process, show-
ing components such as the differentiator and envelope detector. The waveforms demonstrate
the expected output of FM modulation under both wideband and narrowband conditions.
The first image displays the block diagram layout in LabVIEW for FM modulation. It
showcases the arrangement of components and their interconnections within the modulation
process.
The subsequent images exhibit the waveforms produced during FM modulation simula-
tions. One figure represents the waveforms observed under wideband conditions, while the

1
other illustrates the waveforms generated in a narrowband scenario. These visuals offer in-
sights into the behavior of FM modulation across different frequency bandwidths.

5
Figure 1: Block diagram

00
B1
21

Figure 2: Block diagram output


EC

Carson’s Rule
Carson’s Rule offers an estimation for the bandwidth of a frequency-modulated (FM) signal,
given by the formula:
B ≈ 2(∆f + fm )
where: - B represents the approximate bandwidth of the FM signal, - ∆f denotes the max-
imum frequency deviation, and - fm stands for the maximum frequency component of the
modulating signal.

2
MATLAB code and waveforms
0.1 Problem 1
%E THARAKA RAM
%EC21B1005
Am = 1;
Ac = 1;
fm = 100;
fc = 5000;
Df = 600 * pi / 2 * pi;
beta = Df * Am / fm;
fs = 2 ^12 * fc;
t = 0:1/fs:5/fm;
m = Am * cos(2 * pi * fm * t);
subplot(5,2,1)

05
plot(t,m)
title("Message Signal (EC21B1005)")
xlabel("t")
ylabel("m(t)")
M = fft(m);
subplot(5,2,2)
f1 = 0:length(M)-1;
plot(f1,abs(M))
0
B1
title("Spectrum of Message Signal")
xlabel("Frequency")
ylabel("Magnitude")
c = Ac * cos(2 * pi * fc * t);
subplot(5,2,3)
21

plot(t,c)
title("Carrier Signal")
xlabel("t")
ylabel("c(t)")
C = fft(c);
EC

subplot(5,2,4)
f2 = 1:length(C);
plot(f2,abs(C))
title("Spectrum of Carrier Signal")
xlabel("Frequency")
ylabel("Magnitude")
s1 = Ac * cos (2 * pi * fc * t + beta * sin(2 * pi * fm * t));
subplot(5,2,5)
plot(t,s1)
title("s1")
xlabel("t")
ylabel("s1(t)")
S1 = fft(s1);
subplot(5,2,6)
f3 = linspace(0,1/0.01,length(t));
plot(f3,abs(S1))
title("Spectrum of S1")

3
xlabel("Frequency")
ylabel("Magnitude")
s2 = fmmod(m,fc,fs, beta * fm);
subplot(5,2,7)
plot(t,s2)
title("s2")
xlabel("t")
ylabel("s2(t)")
S2 = fft(s2);
subplot(5,2,8)
f4 = linspace(0,1/0.01,length(t));
plot(f4,abs(S2))
title("Spectrum of S2 (using fmmod)")
xlabel("Frequency")
ylabel("Magnitude")
d = fmdemod(s2,fc,fs,beta * fm , 0);

05
subplot(5,2,9)
plot(t,d);
title("Demodulated Signal")
xlabel("t")
ylabel("d(t)")
D = fft(d);
subplot(5,2,10)
0
B1
f5 = linspace(0,1/0.01,length(D));
plot(f5,abs(D))
title("Spectrum of Demodulated Signal")
xlabel("Frequency")
ylabel("Magnitude")
21
EC

Figure 3: Problem 1

4
05
Figure 4: Problem 1

Problem 2
EC21B1005
E THARAKA RAM
0
B1
Am = 10;Ac = 1;
fm = 100;
fc = 5000;
Df = 600 * pi;
beta = Df * Am / fm;
21

fs = 2 ^12 * fc;
t = 0:1/fs:5/fm;
m = Am * cos(2 * pi * fm * t);
subplot(5,2,1)
plot(t,m)
EC

title("Message Signal (EC21B1005)")


xlabel("t")
ylabel("m(t)")
M = fft(m);
subplot(5,2,2)
f1 = 0:length(M)-1;
plot(f1,abs(M))
title("Spectrum of Message Signal")
xlabel("Frequency")
ylabel("Magnitude")
c = Ac * cos(2 * pi * fc * t);
subplot(5,2,3)
plot(t,c)
title("Carrier Signal")
xlabel("t")
ylabel("c(t)")
C = fft(c);

5
subplot(5,2,4)
f2 = 1:length(C);
plot(f2,abs(C))
title("Spectrum of Carrier Signal")
xlabel("Frequency")
ylabel("Magnitude")
beta = 3;
s1 = Ac * cos (2 * pi * fc * t + beta * sin(2 * pi * fm * t));
subplot(5,2,5)
plot(t,s1)
title("s1")
xlabel("t")
ylabel("s1(t)")
S1 = fft(s1);
subplot(5,2,6)
f3 = linspace(0,1/0.01,length(t));

05
plot(f3,abs(S1))
title("Spectrum of S1")
xlabel("Frequency")
ylabel("Magnitude")
s2 = fmmod(m,fc,fs, beta * fm);
subplot(5,2,7)
plot(t,s2)
0
B1
title("s2")
xlabel("t")
ylabel("s2(t)")
S2 = fft(s2);
subplot(5,2,8)
21

f4 = linspace(0,1/0.01,length(t));
plot(f4,abs(S2))
title("Spectrum of S2 (using fmmod)")
xlabel("Frequency")
ylabel("Magnitude")
EC

d = fmdemod(s2,fc,fs,beta * fm , 0);
subplot(5,2,9)
plot(t,d);
title("Demodulated Signal")
xlabel("t")
ylabel("d(t)")
D = fft(d);
subplot(5,2,10)
f5 = linspace(0,1/0.01,length(D));
plot(f5,abs(D))
title("Spectrum of Demodulated Signal")
xlabel("Frequency")
ylabel("Magnitude")

6
05
Figure 5: Problem 2

0
B1
21
EC

Figure 6: Problem 2

Problem 3
EC21B1005
E THARAKA RAM
Am = 10;Ac = 1;
fm = 100;
fc = 1000;
Df = 600 * pi;
beta = Df * Am / fm;
fs = 2 ^12 * fc;

7
t = 0:1/fs:5/fm;
m = Am * cos(2 * pi * fm * t);
subplot(5,2,1)
plot(t,m)
title("Message Signal (EC21B1005)")
xlabel("t")
ylabel("m(t)")
M = fft(m);
subplot(5,2,2)
f1 = 0:length(M)-1;
plot(f1,abs(M))
title("Spectrum of Message Signal")
xlabel("Frequency")
ylabel("Magnitude")
c = Ac * cos(2 * pi * fc * t);
subplot(5,2,3)

05
plot(t,c)
title("Carrier Signal")
xlabel("t")
ylabel("c(t)")
C = fft(c);
subplot(5,2,4)
f2 = 1:length(C);
0
B1
plot(f2,abs(C))
title("Spectrum of Carrier Signal")
xlabel("Frequency")
ylabel("Magnitude")
s1 = Ac * cos (2 * pi * fc * t + beta * sin(2 * pi * fm * t));
21

subplot(5,2,5)
plot(t,s1)
title("s1")
xlabel("t")
ylabel("s1(t)")
EC

S1 = fft(s1);
subplot(5,2,6)
f3 = linspace(0,1/0.01,length(t));
plot(f3,abs(S1))
title("Spectrum of S1")
xlabel("Frequency")
ylabel("Magnitude")
s2 = fmmod(m,fc,fs, beta * fm);
subplot(5,2,7)
plot(t,s2)
title("s2")
xlabel("t")
ylabel("s2(t)")
S2 = fft(s2);
subplot(5,2,8)
f4 = linspace(0,1/0.01,length(t));
plot(f4,abs(S2))

8
title("Spectrum of S2 (using fmmod)")
xlabel("Frequency")
ylabel("Magnitude")
d = fmdemod(s2,fc,fs,beta * fm , 0);
subplot(5,2,9)
plot(t,d);
title("Demodulated Signal")
xlabel("t")
ylabel("d(t)")
D = fft(d);
subplot(5,2,10)
f5 = linspace(0,1/0.01,length(D));
plot(f5,abs(D))
title("Spectrum of Demodulated Signal")
xlabel("Frequency")
ylabel("Magnitude")

5
00
B1
21
EC

Figure 7: Problem 3

9
5
00
Figure 8: Problem 3

Inference
B1
The frequency modulation and demodulation experiment conducted using LabVIEW and
MATLAB provided firsthand insights into the real-time processes involved. LabVIEW’s in-
tuitive graphical programming interface facilitated swift prototyping and interactive visual-
ization of FM signals, enabling a user-friendly experience. Meanwhile, MATLAB’s robust
signal processing capabilities empowered users to delve deeper into analysis and algorithm
21

development.
By leveraging both platforms, participants gained a comprehensive understanding of FM
modulation principles. They witnessed how LabVIEW’s simplicity aids in rapid experimenta-
tion and visualization, while MATLAB’s extensive tools enable sophisticated signal analysis
and algorithmic exploration. Together, these platforms showcased their utility in designing
EC

and evaluating practical communication systems, offering valuable insights into FM modula-
tion techniques.

Observations
The experimentation on frequency modulation and demodulation conducted with MATLAB
and LabVIEW yielded noteworthy results. LabVIEW’s graphical programming interface
streamlined the modulation and demodulation procedures, while its real-time display fea-
ture enriched comprehension during the experiment. MATLAB’s signal processing package
facilitated in-depth analysis of FM signals, enabling tasks such as spectrum analysis and
modulation index computation with precision. Together, these platforms delivered invaluable
insights into the intricacies of FM modulation and demodulation techniques.

10
Results
The Frequency modulation techniques and the demodulation of these modulated signals on
various modulation indices like Narrowband and Wide band were observed and the outputs
were noted and verified by respective TAs.

5
00
B1
21
EC

11

You might also like