You are on page 1of 16

Visvesvaraya National Institute

of Technology (VNIT), Nagpur

Analog Communication
(ECL301)
Lab Report

Submitted by :
Vipinkumar K (BT19ECE120)
Semester 5

Submitted to :
Dr. Ankit A. Bhurane
(Course Instructor)
Department of Electronics and Communication Engineering,
VNIT Nagpur
Contents

1 Task - 1: Record voice signal and plot its Fourier transform . . . . . 2


2 Task - 2: Fourier Transform of Sinc Function . . . . . . . . . . . . . . 4
3 Task - 3: Simulating Amplitude Modulation using DSB-SC . . . . . . 6
4 Task - 4: Power Analysis of the DSB-SC and message signals. . . . . 9
5 Task - 5: Simulation of Amplitude Demodulation . . . . . . . . . . . 10
6 Task - 6: Analysis of SSB modulation using Hilbert Transform . . . . 13

1
1.0 Vipinkumar K (BT19ECE120)

Task - 1: Record voice signal and plot its Fourier


transform
Aim: To record our own voice signal and plot its Fourier transform.

Requirements: Octave 6.3.0 / MATLAB R201Xx / Python 3.0 + Spyder IDE

Concept: In this experiment, a voice signal is recorded and analysed by plotting


its Fourier transform.

Simulation Code with Comments:


1 clc
2 clear all;
3 close all;
4
5 fs=6000; %sampling frequency
6 num bits=8; %number of bits
7 channel=1; %channel
8 t=5; %time in seconds
9
10 aud=audiorecorder(fs,num bits,channel); %generating the audio ...
recorder
11 record(aud,t); %recording the audio in the audio recorder
12
13 %receiving the recorded audio and plotting it
14 rec aud=getaudiodata(aud);
15 plot(rec aud);
16
17 %plotting the Fast Fourier Transform of the recorded audio
18 fft aud=fft(rec aud);
19 plot(abs(fft aud));

Output: The MATLAB record() function is used to record the audio and it is
plotted as shown in figure 1. The Fourier transform of the recorded voice signal is
also plotted as shown in figure 2.

Observations and Discussions: We observe the plotted voice signal in the figure
1 and the FFT of the voice signal is plotted in the figure 2. The FFT of the signal
is observed to be symmetric, with peaks at the beginning and end, and as we reach
near to the frequency of 15000 Hz, the signal becomes almost flat, and rises again
as we reach the end.

2
1.0 Vipinkumar K (BT19ECE120)

Figure 1: Recorded Voice Signal

Figure 2: FFT of Recorded Voice Signal

3
2.0 Vipinkumar K (BT19ECE120)

Task - 2: Fourier Transform of Sinc Function


Aim: To plot the Fourier Transform of sinc function.

Requirements: Octave 6.3.0 / MATLAB R201Xx / Python 3.0 + Spyder IDE

Concept: In this experiment, a sinc function is considered and its Fourier Trans-
form is plotted.

Simulation Code with Comments:


21 clc;
22 clear all;
23 close all;
24
25 %taking time from −20 to 20 with intervals of 0.01 seconds.
26 t=−20:0.01:20;
27 x=sinc(t);
28 plot(t,x);
29
30 % Fourier Transform of the sinc function
31 y=fft(x);
32 plot(t,abs(y));

Output: An arbitrary time interval is considered and the MATLAB sinc() function
is used to generate a sinc signal in the given time interval. The signal is plotted as
shown in figure 3. The Fourier Transform of the signal is plotted as shown in figure
4.

Observations and Discussions: The sinc signal in figure 3 peaks at 0, and keeps
on decreasing until it reaches -20 and 20. If we observe the fourier transform of the
signal plotted in 4, the Fourier Transform is having its peaks at the extreme ends,
at -20 and 20, while it is 0 everywhere else.

4
2.0 Vipinkumar K (BT19ECE120)

Figure 3: Sinc Signal

Figure 4: Fourier Transform of Sinc Signal

5
3.0 Vipinkumar K (BT19ECE120)

Task - 3: Simulating Amplitude Modulation using


DSB-SC
Aim: Simulate Amplitude Modulation by plotting the DSB-SC of a sine or cosine
wave.

Requirements: Octave 6.3.0 / MATLAB R201Xx / Python 3.0 + Spyder IDE

Concept: In this experiment, Amplitude Modulation of a sinusoidal signal is stud-


ied by plotting the DSB-SC of the signal.

Simulation Code with Comments:


33 % Code for Amplitude Modulation of a sinusoid
34 clc;
35 clear all;
36 close all;
37
38 t=−10:0.01:10; %time interval
39 Fm=1; %Frequency of message signal
40 Fc=10; %Frequency of carrier signal
41 m=cos(2*pi*Fm*t); %Message signal
42 c=2*cos(2*pi*Fc*t); %carrier signal
43
44 %plot the message signal
45 figure();
46 plot(t,m);
47 %plot the carrier signal
48 figure();
49 plot(t,c);
50
51 %modulation of the message signal
52 x=m.*c;
53 figure()
54 plot(t,x);
55
56 %dsb−sc of the signal
57 y=fft(x);
58 figure();
59 plot(t,abs(y));

Output: A sinusoidal signal of frequency Fm is generated as shown in figure 5


(message signal). Another signal of frequency Fc>>Fm is generated, which is the
carrier signal shown in figure 6. The two signals are multiplied to generate the

6
3.0 Vipinkumar K (BT19ECE120)

Amplitude Modulated signal, which is plotted as shown in figure 7. In order to obtain


the DSB-SC of the message signal, the Amplitude Modulated signal is subjected to
the Fourier Transform, which gives us the DSB-SC as shown in figure 8.

Figure 5: Message Signal

Figure 6: Carrier Signal

Observations and Discussions: The message and carrier signals are plotted as
shown in figures 5 and 6. The Amplitude Modulated signal is a multiplication of
the two signals, which is plotted in figure 7. This Amplitude Modulated signal
is subjected to Fourier Transform, which gives the DSB-SC (Double Side Band -
Suppressed Carrier) signal. The LSB are at the points -7.7 and 7.7, while the USB
are at the points 8.2 and -8.2.

7
3.0 Vipinkumar K (BT19ECE120)

Figure 7: Amplitude Modulated Signal

Figure 8: DSC-SC of the signal

8
4.0 Vipinkumar K (BT19ECE120)

Task - 4: Power Analysis of the DSB-SC and message


signals.
Aim: Calculate the powers of message signal and DSB-SC signal and derive con-
clusions from them.

Requirements: Octave 6.3.0 / MATLAB R201Xx / Python 3.0 + Spyder IDE

Concept: In this experiment, a sinusoidal message signal is considered and its


DSB-SC is derived. Then the powers of both signals are calculated.

Procedure: In the experiment, the message signal is considered:


m(t) = cos(2π ∗ F m ∗ t)
where Fm=1. And the carrier signal considered is:
c(t) = 2cos(2π ∗ F c ∗ t)
where Fc >> Fm, and Fc=10.
Now, the DSB-SC of the modulated signal is given as:
x(t) = m(t) ∗ c(t) = m(t) ∗ 2cos(2π ∗ F c ∗ t)
x(t) = 2m(t)cos(2π ∗ F c ∗ t)
Now calculate the powers of m(t) and x(t).
1 T /2 2 1 T /2
Z Z
Pm (t) = lim m (t)dt = lim cos2 (2π ∗ F m ∗ t)dt
T →∞ T −T /2 T →∞ T −T /2

1
Pm (t) =
2
Z T /2 Z T /2
1 1
Px (t) = lim x2 (t)dt = lim 4cos2 (2π ∗ F m ∗ t)cos2 (2π ∗ F c ∗ t)dt
T →∞ T −T /2 T →∞ T −T /2

Px (t) = 1

1
Output: Thus, the average power of message signal is 2
and that of the DSB-SC
signal is 1.

Observations and Discussions: We observe that PPmx (t) (t)


1
is 1/2 , which equals 2.
The average power of the carrier signal is 2, and thus the average power of the
DSB-SC signal can be said to be approximately equal to the product of the average
powers of the carrier and message signals.

9
5.0 Vipinkumar K (BT19ECE120)

Task - 5: Simulation of Amplitude Demodulation


Aim: To simulate amplitude demodulation of a signal by recovering the message
signal.

Requirements: Octave 6.3.0 / MATLAB R201Xx / Python 3.0 + Spyder IDE

Concept: In this experiment, we have the amplitude modulated signal and we try
to recover back the message signal to study amplitude demodulation.

Procedure: Let
m(t) = Am cos(2π ∗ Fm ∗ t)
and
c(t) = Ac cos(2π ∗ Fc ∗ t)
Then, the DSB-SC equation is

x(t) = m(t) ∗ c(t)

But the carrier signal is added to the modulated signal while it is transmitted so
that the carrier signal need not be generated back to demodulate the signal. Thus,
the signal then becomes

x(t) = [Ac + Am cos(2π ∗ Fm ∗ t)]cos(2π ∗ Fc ∗ t)


Am
x(t) = Ac [1 + cos(2π ∗ Fm ∗ t)]cos(2π ∗ Fc ∗ t)
Ac
The modulation index is defined as
Am
µ= .
Ac

Simulation Code with Comments:


60 % Code to demodulate a modulated signal
61 clc;
62 clear all;
63 close all;
64

65 % Generating the Amplitude Modulated signal


66 t=−10:0.01:10;
67 Fm=1;
68 Fc=10;
69 m=cos(2*pi*Fm*t);

10
5.0 Vipinkumar K (BT19ECE120)

70 c=2*cos(2*pi*Fc*t);
71

72 figure();
73 plot(t,m); % Plot the message signal.
74
75 x=m.*c;
76 figure()
77 plot(t,x); % Plot the amplitude modulated signal
78
79 % Demodulating the signal by multiplying it with carrier signal
80 xdem=x.*c;
81 figure()
82 plot(t,xdem);

Output: The message signal is generated and amplitude modulated, same as that
in task 3. These are shown in figures 9 and 10. Now, this amplitude modulated
signal is demodulated by multiplying it back with the carrier signal, which gives us
a distorted version of the original message signal as shown in figure 11.

Figure 9: Original Message Signal

Observations and Discussions: We observe that the amplitude modulated sig-


nal gives a distorted version of the original message signal, once it is multiplied back
by the same carrier signal. The original signal can be obtained with greater accu-
racy if it is passed into a Low Pass Filter with cutoff frequency equal to Fm, the
frequency of the message signal.

11
5.0 Vipinkumar K (BT19ECE120)

Figure 10: Amplitude Modulated Signal

Figure 11: Signal After Demodulation

12
6.0 Vipinkumar K (BT19ECE120)

Task - 6: Analysis of SSB modulation using Hilbert


Transform
Aim: Implementation of SSB using Hilbert Transform

Requirements: Octave 6.3.0 / MATLAB R201Xx / Python 3.0 + Spyder IDE

Concept: In this experiment, a sinusoid is considered as a message signal and


Hilbert Transform is used to plot is SSB.

Simulation Code with Comments:


83 % Code for SSB modulation using Hilbert Transform
84 clc;
85 clear all;
86 close all;
87
88 t=−10:0.01:10;
89 fm=1;
90 m=cos(2*pi*fm*t); % message signal
91 figure()
92 plot(t,m); % plotting the message signal
93
94 % Function for unit step function
95 function y = u(t)
96 zro = t == 0 ;
97 pos = t > 0 ;
98 y = zro/2 + pos;
99 endfunction
100

101 % FFT of message signal and unit step function


102 fft u=fft(u(t));
103 fft m=fft(m);
104
105 % SSB by multiplying FFTs of message and unit step
106 ssb=fft u. * fft m;
107 figure()
108 plot(t,ssb);
109
110 % SSB by Hilbert Transform
111 mh=hilbert(m);
112 fft mh=fft(m);
113 ssb fin=(fft m/2)+(j* fft mh/2);
114 figure()
115 plot(t,ssb fin);

13
6.0 Vipinkumar K (BT19ECE120)

Output: The original message signal is plotted in figure 12. The FFTs of the mes-
sage signal and unit step signal are calculated, and they are multiplied to obtain the
SSB of the signal. This signal is plotted in figure 13. This is verified by calculating
the Hilbert Transform of the signal and plotting the SSB using the signal. This is
plotted as shown in figure 14.

Figure 12: Message Signal

Figure 13: SSB using FFTs

Observations and Discussions: The actual message signal is plotted in figure


12. The SSB of the signal is the product of the Fourier Transforms of the signal,
and the unit step function. It plots only the LHS of LSB, as shown in figure 13.

14
6.0 Vipinkumar K (BT19ECE120)

Figure 14: SSB using Hilbert Transform

This is verified by plotting the SSB calculated using Hilbert Transform, which plotes
both the LHS of LSB as well as the RHS of USB, as shown in figure 14.

15

You might also like