You are on page 1of 47

COMMUNICATION SYSTEMS

LAB
PRACTICAL FILE

NAME: ABHINAV KUMAR SINGH


BRANCH: EEE
YEAR: III
SECTION: T5-B
ENROLLMENT NO.: 00515604918
FACULTY NAME: MADHURIMA SARKAR, A.P
TABLE OF CONTENTS

S.NO NAME OF THE EXPERIMENT


.
1. To study the CRO and its control
2. To study Amplitude Modulation and Modulation Index
3. To study Amplitude Modulation and Demodulation
4. To generate AM-Double Side Band Suppressed Carrier (DSB-SC) signal.
5. To study the SSB-SC modulation of AM wave.
6. To study the SSB-SC demodulation of AM wave.
7. To study frequency modulation by using MATLAB.
8. To study Frequency Demodulation by using MATLAB.
9. To study Phase Modulation by using MATLAB.
10. To study Sampling Theorem.
11. To study the types of sampling.
12. To study Pulse Amplitude Modulation, Pulse Phase Modulation, Pulse Width
Modulation.
13. To study Time Division Multiplexing (TDM) system.
14. To Study ASK.
15. To study Additive White Gaussian Noise using DSB-SC.
EXPERIMENT 1

AIM: To study CRO and its controls.

APPARATUS REQUIRED FOR SIMULATION

1. System configuration: OS Windows 8 or 10 with 4 Gb RAM

2. Software used: MATLAB online R2020b

THEORY
The 20 MHz dual oscilloscope is a compact low line and light weight instruction. The 201
is a general-purpose dual trace oscilloscope having both vertical amplified offering as
bandwidth of DC-20 MHz and a maximum sensitivity of 2 mV/cm stable triggering for
low level. Signal is obtained up to 40 MHz. Full X-Y operation is achieved by switching
channels II into horizontal deflection system. So that matched sensitivities for both X & Y
signals. A component tester is incorporated in the oscilloscope which gives a quick list
of both active and passive components. Fully stabilized internal power supply condition.
The 201 offers six separate add-on modules via frequency.

Figure 1.1: Schematic of a CRT


1. Frequency Counter: Measures a wide range of frequencies directly from 20 Hz to
30 MHz with high accuracy. Its 4-digit display gives a resolution of 10 Hz, 10 KHz.
2. Tracer: It is used to test transistor, two terminal devices like rectifiers diodes,
Zener diodes. It can also used to find out parameters like saturation and cut off
voltages.
3. Power supply: It has a triple output which is suitable for most of requirement on
test bench.
4. Function Generator: The log KHz function generator has all standard function
sine, square, triangular and DC. It measures voltage up to DC 200 volt with high
accuracy and its 3 1/2-digit display gives resolution of 1 mV and 100 mV. It is very
useful while experimenting with digital circuits to view timing diagrams of flip
flops, divider and many other.
5. CRO:
a) Power- Turns mains power on/off.
b) X 5- When pressed, gives five times magnification of the signal.
c) X-Y- It cuts off the time base fed to the horizontal plates when pressed
and allows access to the horizontal signal fed through CH-II. It is used for
X-Y display.
d) 4. CH-I/CH-II/Trig I/Trig II- It selects and triggers CH-I when it is out. On
pressing, it selects and triggers CH-II.
e) Mono/Dual- A switch to select the single/duel beam operation.
f) Alt/Chop/Add- It selects alternate or chopped in DUAL mode. If mono is
selected, it enables addition or subtraction of signals on two channels.
g) Time/Div.- It selects time base speeds.
h) AUTO/NORM- AUTO mode enables trace when no signal is fed at the
trigger input. In NORM position, the trigger level can be varied using
LEVEL control.
i) LEVEL- It allows setting of the trigger level between peak-to-peak
amplitude of the input signal.
j) TRIG IN- A socket that is used to feed external trigger signal in EXT mode.
k) EXT- Switch that allows External triggering signal to be fed from the
socket marked TRIG IN.
l) X-POS- This knob controls the horizontal position of the beam trace.
m) VAR- Controls the time base speed in-between two steps of TIME/DIV
switch.
n) +/− - This switch selects the slope of triggering.
o) INV CH. II- This switch when pressed inverts the signal at CH. II.
p) INTENS- It controls the trace brightness.
q) FOCUS- It controls the sharpness of the trace.
r) DC/AC/GND- Coupling switch for each panel. In AC mode, the signal in
coupled through 0.1µF capacitor.
s) CH-I (Y) and CH-II (X)- BNC connectors serve as Y-input connections for
CH-I and CH-II. CH-II input connector also serves as Horizontal external
signal on using X-Y control.
t) Volts/Div. - A switch to select the sensitivity of each channel.
u) Y-Pos I and II- These controls are provided for vertical deflection of trace
for each channel.

6. Back Panel Controls:


a) Fuse- 350 MA fuse is provided at back panel space fuses are provided
inside the instrument.
b) 2 Mod- Banana socket provided for modulating signal input i.e., 2
modulation. Banana socket provided for sawtooth output.
Oscilloscope 201 comes with an additional facility a built-in component tester.
This allows passive and active components like resistance, capacitor,
inductors, transformers, silicon or germanium diode, Zener diode, transistors,
IFET and even digital IC’s to be used while still in the circuit.
Just push in the CT switch plug in two test probes. One at the banana socket
CI-IN and at the ground socket. A horizontal line 5 to 6 and will be seen a
shorting the test probes then vertical line is seen.

7. Working of CRO:
The cathode ray is a beam of electrons that are emitted by the heated cathode
(negative electrons) and accelerated the fluorescent screen. The assembly of the
cathode intensity good focus grid and accelerating anode is called electron gun.
Its purpose is to generate the electron beam between electron gun and the
screen are two pair of metal plates. One oriented to provide horizontal deflection
of the beam while other oriented to give vertical deflection of the beam.
These plated are referred as horizontal and vertical deflection plates, where the
electron beam hits the screen the phosphor is easier and light is emitted.
SOURCE CODE
fs = 10000;
t = 0:1/fs:1.5;
x1 = sawtooth(2*pi*50*t);
x2 = square(2*pi*50*t);

subplot(2,1,1)
plot(t,x1)
axis([0 0.2 -1.2 1.2])
xlabel('Time (sec)')
ylabel('Amplitude')
title('Sawtooth Periodic Wave')

subplot(2,1,2)
plot(t,x2)
axis([0 0.2 -1.2 1.2])
xlabel('Time (sec)')
ylabel('Amplitude')
title('Square Periodic Wave')

OUTPUT
RESULT: The control and components of CRO have been studied.

EXPERIMENT 2

AIM: To study amplitude modulation and find the modulation index of the modulated
wave.

APPARATUS REQUIRED FOR SIMULATION

1. System configuration: OS Windows 8 or 10 with 4 Gb RAM

2. Software used: MATLAB online R2020b

THEORY
In amplitude modulation, the amplitude of the sinusoidal carrier wave is varied
accordance with the modulating signal. Keeping the phase and frequency constant
DSBEC (Double side band full carrier) is also called simply AM. Let message signal be
m(t) and carrier signal be c(t).
Then for signal tone we have
m ( t )= Am ⋅cosωmt
c ( t ) =Ac ⋅ cosωct

s(t )=( Ac+m ( t ) ) cosωct

Where m is called modulation index on simplifying, we get


m m
s ( t ) =Ac ⋅ cosωct + Ac ⋅ cos ( ωm+ωc ) t+ Ac ⋅ cos(ωc−ωm) t
2 2

for m<1: Am <Ac = under modulated wave


for m =1: Am=Ac= Critically modulated wave
for m>1: Am>Ac = over modulated wave.
Modulation index is defined as the measure of extent of amplitude variation about as
unmounted maximum carrier.
Vmax−Vmin
m=
Vmax +Vmin

where, Vmax = Ac + Am
Vmin= Ac- Am

SOURCE CODE
fc = 1e5; %carrier frequency
fs = 1e6; %sampling frequency
f = 1e3; %frequency of messages signal
m = 0.5; %modulation index = 0.5
A = 1/m;
opt = -A; %opt decide amount of carrier, used as y
t = 0:(1/fs):((2/f) - (1/fs)); %set time range equal to two
cycles of modulating signal
x = cos(2 * pi * f * t); %message signal
y = modulate(x, fc, fs, 'amdsb-tc', opt); %AM double
sideband-transmitted carrier

figure;
subplot(221);
plot(x);
xlabel('time(t)');
ylabel('Amplitude');
title('Message Signal')

subplot(222);
plot(y);
xlabel('time(t)');
ylabel('Amplitude');
title('Under modulated')

m = 1.0; %modulation index = 1


opt = -1/m;
y = modulate(x, fc, fs, 'amdsb-tc', opt);
subplot(223);
plot(y);
xlabel('time(t)');
ylabel('Amplitude');
title('Critically modulated')

m = 1.2; %overmodulation
opt = -1/m;
y = modulate(x, fc, fs, 'amdsb-tc', opt);
subplot(224);
plot(y);
xlabel('time(t)');
ylabel('Amplitude');
title('Over modulated');

OUTPUT

RESULT
The modulation indexes are for:
1) Under modulation= 25%
2) Critical modulation = 100%
3) Over modulation= 26 %
EXPERIMENT 3

AIM: To study the amplitude modulation and demodulation of AM wave.

APPARATUS REQUIRED FOR SIMULATION

1. System configuration: OS Windows 8 or 10 with 4 Gb RAM

2. Software used: MATLAB online R2020b

THEORY
The simplest form of modulation is amplitude modulation. In am, the modulating
voltage whose frequency is variably lower than that of carrier signal. Carriers frequency
is high while modulating frequency is low audio frequency.
AM is defined as a system of modulation in which amplitude of carrier wave is varied in
accordance while instantaneous amplitude of modulating signal is applied.
MODULATING VOLTAGE, Vm ( t )=Vm sin ω mt OR Vm cos ω mt
CARRIER VOLTAGE, Vc ( t )=Vc sin ω ct OR Vc cos ω ct
V ❑c (t ) = instantaneous voltage of carrier wave.

Hence, A=Vm ( t ) +Vc ( t )=Vc (t ) +Vm cos ω ct


DEMODULATION OF AMPLITUDE WAVE:
The process of obtaining the baseband signal from the modulated signal is known as
demodulation.
Am signal with large carrier frequency are detected by using multiple detectors.
The envelope detector employs circuit that introduce the envelope detector of am wave
baseband signal.
The detector is categorized as:
1. Square wave detector
2. Envelope detector

SOURCE CODE
% AM Modulation and Demodulation using Functions in MATLAB
% Modulation index
h = input('Modulation index = ');
%% Time Pereiod of Simulation :
t = linspace(0, 0.2, 100000);
%% Message Signal :
Am = 10;
fm = 200;
ym = Am*cos(2*pi*fm*t);
figure;
subplot(4, 1, 1);
plot(t(1:10000), ym(1:10000));
title('Message Signal');
xlabel('time(t)');
ylabel('Amplitude');
%% Carrier Signal :
Ac = Am/h;
fc = 2000;
yc = Ac*cos(2*pi*fc*t);
subplot(4, 1, 2);
plot(t(1:10000), yc(1:10000));
title('Carrier Signal');
xlabel('time(t)');
ylabel('Amplitude');
%% Modulated Signal :
y = ammod(ym, fc, 100000, 0, Ac);
subplot(4, 1, 3);
plot(t(1:10000), y(1:10000));
title('Modulated Signal');
xlabel('time(t)');
ylabel('Amplitude');
%% Demodulated Signal :
z = amdemod(y, fc, 100000, 0, Ac);
subplot(4, 1, 4);
plot(t(1:10000), z(1:10000));
title('Demodulated Signal');
xlabel('time(t)');
ylabel('Amplitude');
ylim([-10, 10]);

OUTPUT

RESULT: Demodulated wave is obtained.


EXPERIMENT 4

AIM: To generate AM-Double Side Band Suppressed Carrier (DSB-SC) signal.

APPARATUS REQUIRED FOR SIMULATION

1. System configuration: OS Windows 8 or 10 with 4 Gb RAM

2. Software used: MATLAB online R2020b

THEORY:
Balanced modulator is used for generating DSB-SC signal. A balanced modulator consists
of two standard amplitude modulators arranged in a balanced configuration so as to
suppress the carrier wave. The two modulators are identical except the reversal of sign
of the modulating signal applied to them.
CIRCUIT DIAGRAM:

SOURCE CODE
clc;
clear all;
Message_Signal_Amplitude = input ('Enter the message signal
amplitude = ');
Carrier_Signal_Amplitude = input ('Enter the carrier signal
amplitude = ');
fm = input ('Enter the message frequency = ');
fc = input ('Enter the carrier frequency = ');
m = Message_Signal_Amplitude/Carrier_Signal_Amplitude;
% Representation of the Message Signal
t = 0:0.001:1;
Message_Signal = Message_Signal_Amplitude*sin (2*pi*fm*t);
subplot (4,1,1);
plot (t,Message_Signal,'b');
xlabel ('Time ---->');
ylabel ('Amplitude ---->');
title ('Message Signal ---->');
legend ('Message Signal ---->');
% Representation of the Carrier Signal
Carrier_Signal = sin (2*pi*fc*t);
subplot (4,1,2);
plot (t,Carrier_Signal,'r');
xlabel ('Time ---->');
ylabel ('Amplitude ---->');
title ('Carrier Signal ---->');
legend ('Carrier Signal ---->');
% Representation of the DSBSC Signal
DSBSC_Signal=Carrier_Signal_Amplitude*m.*sin
(2*pi*fm*t).*sin (2*pi*fc*t)
subplot (4,1,3);
plot (t,DSBSC_Signal,'black');
xlabel ('Time ---->');
ylabel ('Amplitude ---->');
title ('Double Sideband Suppressed Carrier Wave ---->');
legend ('DSB-SC Signal ---->');
% Add title to the Overall Plot
ha = axes ('Position',[0 0 1 1],'Xlim',[0 1],'Ylim',[0
1],'Box','off','Visible','off','Units','normalized',
'clipping' , 'off');
text (0.5, 1,'\bf Analog Modulation Technique: Double
Sideband Suppressed-Carrier Transmission (DSB-
SC)','HorizontalAlignment','center','VerticalAlignment',
'top')
% Representation of the DE- modulated DSBSC Signal
DE_mod_signal= DSBSC_Signal*Carrier_Signal
subplot (4,1,4);
plot (t, DE_mod_signal,'red');
xlabel ('Time ---->');
ylabel ('Amplitude ---->');
title ('DEMODULATED OR RECOVERED MESSAGE SIGNAL---->');
OUTPUT

RESULT
To successfully obtain wave form of DSB-SC AM Modulation Demodulation.

EXPERIMENT 5

AIM: To study the SSB-SC modulation of AM wave.

APPARATUS REQUIRED FOR SIMULATION

1. System configuration: OS Windows 8 or 10 with 4 Gb RAM

2. Software used: MATLAB online R2020b

THEORY

1. The modulating signal which contains no carrier wave and only one side
band (either lower side band or upper side band) is called SSB-SC.
2. Generation of SSB-SC modulated AM wave: In this type of modulating
process, a single band is produced with a suppressed carrier waveform.
For generating SSB-SC signal, firstly a DSB-SC signal is generated using a
balanced modulator and then one side band is filtered out using band pass
filter.

SOURCE CODE

close all;
clear all;
tmin=0;
tmax=10^-3;
step=(tmax-tmin)/1000;
t=tmin:step:tmax;
Am=1;
fm=2*10^3;
m1=Am*sin(2*pi*fm*t+0);
figure(1);
subplot(4,1,1);
plot(t,m1);
xlabel('time');
ylabel('amplitude');
title('message signal');
grid on;
tmin=0;
tmax=10^-3;
step=(tmax-tmin)/1000;
t=tmin:step:tmax; Ac=1;
fc=10^4;
c1=Ac*sin(2*pi*fc*t+0);

subplot(4,1,2);
plot(t,c1);
xlabel('time');
ylabel('amplitude');
title('carrier signal');
grid on;

m2=Am*sin(2*pi*fm*t+90);
c2=Ac*sin(2*pi*fc*t+90);
subplot(4,1,3);
plot(t,m2);
xlabel('time');
ylabel('amplitude');
title('message signal with 90 degree phase shift');
grid on;
subplot(4,1,4);
plot(t,c2);
xlabel('time');
ylabel('amplitude');
title('carrier signal with 90 degree phase shift');
grid on;
s=m1.*c2+m2.*c1;
plot(t,s);
xlabel('time');
ylabel('amplitude');
title('SSB-SC signal');
grid on;

OUTPUT

RESULT: SSB-SC modulation has been studied using MATLAB.


EXPERIMENT 6

AIM: To study the SSB-SC demodulation of AM wave.

APPARATUS REQUIRED FOR SIMULATION

1. System configuration: OS Windows 8 or 10 with 4 Gb RAM

2. Software used: MATLAB online R2020b

THEORY
1. The modulating signal which contains no carrier wave and only one side
band (either lower side band or upper side band) is called SSB-SC.
2. Demodulation of SSB-SC demodulated AM wave: For recovery, a
modulating signal and an SSB-SC signal is multiplied by a locally generated
carrier wave which is then passed through a owe pass filter. The original
modulating signal is ten recovered.

SOURCE CODE
fs = 270000; % SAMPLING FREQUENCY
t = (0:1/fs:0.01)'; % TIME AXIS
signal = sin(2*pi*300.*t)+2*sin(2*pi*600.*t); %MESSAGE
SIGNAL WITH DOUBLE TONE(300, 600)
fc = 12000; %CARRIER FREQUENCY
initialPhase = 0;
lowerSidebandSignal = ssbmod(signal,fc,fs,initialPhase);
%LSB
upperSidebandSignal =
ssbmod(signal,fc,fs,initialPhase,'upper'); %USB
s1 = ssbdemod(lowerSidebandSignal,fc,fs);
s2 = ssbdemod(upperSidebandSignal,fc,fs);
plot(t,signal,'k',t,s1,'r:',t,s2,'g-.');
legend('Original Signal','Demodulation of Lower
Sideband','Demodulation of Upper Sideband');

OUTPUT
RESULT: SSB-SC demodulation has been studied using MATLAB.
EXPERIMENT 7

Aim: To study frequency modulation by using MATLAB.

APPARATUS REQUIRED FOR SIMULATION

1. System configuration: OS Windows 8 or 10 with 4 Gb RAM

2. Software used: MATLAB online R2020b

THEORY
Frequency Modulation is the type of Modulation where the instantaneous frequency
deviation is varied according to the instantaneous magnitude of the message signal. The
process of detection provides a means of recovering the modulating signal from the
demodulating signal.

SOURCE CODE
Ac = input('Carrier Signal Amplitude: ');
Am = input('Message Signal Amplitude: ');
fc = input('Carrier Signal Frequency: ');
fm = input('Message Signal Frequency: ');
while fm>fc
disp('Message Signal Frequency is Incorrect.');
fm = input('Message Signal Frequency: ');
end
T = input('Time Period: ');
t = 0:0.001:T;
Ym = Am.*sin(2*pi*fm*t);
subplot(3, 1, 1);
plot(t, Ym);
title('Message Signal');
Yc = Ac.*sin(2*pi*fc*t);
subplot(3, 1, 2);
plot(t, Yc);
title('Carrier Signal');
Z = Ac.*sin(2*pi*fc*t+((Am/Ac).*(2*pi*fm*t)));
subplot(3, 1, 3);
plot(t, Z, 'r');
title('Modulated Signal');

OUTPUT

RESULT: FM has been studied using MATLAB.

EXPERIMENT 8
AIM: To study Frequency Demodulation by using MATLAB.

APPARATUS REQUIRED FOR SIMULATION

1. System configuration: OS Windows 8 or 10 with 4 Gb RAM

2. Software used: MATLAB online R2020b

THEORY
Frequency demodulation is a key process in the reception of a frequency modulated
signal once the signal has been received, filtered and amplified it is necessary to recover
the original modulation from the carrier .it is this process that is called demodulation or
detection.

SOURCE CODE
% FM demodulation

fc = 1e4;
fs = 1e5;
f1 = 2e3;
t = 0 : (1/fs) : ((2/f1) - (1/fs));
x1 = cos(2*pi*f1*t); %message signal
kf = 2*pi*(fc/fs)*(1/max(max(x1)));
kf = kf*(f1/fc);
opt = 10*kf;
y1 = modulate(x1, fc, fs, `fm`,opt);
figure;
subplot(311);
plot(t,x1);
title(“MESSAGE SIGNAL”);
subplot(312);
plot(t,y1);
title(“FREQUENCY MODULATED SIGNAL”);
x1_recover = demod(y1,fc,fs,`fm`,opt);
subplot(313);
plot(t,x1_recover);
title(“DEMODULATED FM SIGNAL”);
OUTPUT
RESULT: Frequency demodulation has been studied using MATLAB.

EXPERIMENT 9
AIM: To study Phase Modulation by using MATLAB.

APPARATUS REQUIRED FOR SIMULATION

1. System configuration: OS Windows 8 or 10 with 4 Gb RAM

2. Software used: MATLAB online R2020b

THEORY
The process of getting a modulating signal from a frequency modulated signal from a
frequency modulated is called demodulation. It converts the FM signal into a
corresponding AM signal with the help of frequency dependent circuits i.e.; the circuits
whose output voltage depends on the input frequency. A Phase locked loop is used in
tracking the phase and frequency of the carrier component of an FM signal.

SOURCE CODE
clc;
clear all;
t = 0:0.001:1;
vm = input('Enter the amplitude of message signal = ');
vc = input('Enter the amplitude of carrier signal = ');
fm = input('Enter the message frequency = ');
fc = input('Enter the carrier frequency = ');
m = input('Enter modulation index = ');
sm = vm*sin(2*pi*fm*t);
subplot(3,1,1);
plot(t,sm);
xlabel('Time ---->');
ylabel('Amplitude ---->');
title('Message Signal');
grid on;
sc = vc*sin(2*pi*fc*t);
subplot(3,1,2);
plot(t,sc);
xlabel('Time ---->');
ylabel('Amplitude ---->');
title('Carrier Signal');
grid on;
y = vc*sin(2*pi*fc*t+m.*sin(2*pi*fm*t));
subplot(3,1,3);
plot(t,y);
xlabel('Time ---->');
ylabel('Amplitude ---->');
title('PM Wave');
grid on;

INPUT
Enter the amplitude of message signal = 1
Enter the amplitude of carrier signal = 1
Enter the message frequency = 2
Enter the carrier frequency = 4
Enter modulation index = 1

OUTPUT

RESULT: Phase modulation has been studied using MATLAB.

EXPERIMENT 10
AIM: To study Sampling Theorem.

APPARATUS REQUIRED FOR SIMULATION

1. System configuration: OS Windows 8 or 10 with 4 Gb RAM

2. Software used: MATLAB online R2020b

THEORY

Sampling is the process of converting analog signal into a discrete signal or making an
analog or continuous signal to occur at an interval of time, this phenomenon is known
as sampling.

SAMPLING THEOREM: Sampling theorem states that a band limited signal having no
frequency components higher than f m hertz can be sampled if its sampling frequency is
equal to or greater than Nyquist rate.

Sampling Techniques

There are basically three types of Sampling techniques, namely:

1. Natural Sampling

2. Flat top Sampling

3. Ideal Sampling

1. Natural Sampling

Natural Sampling is a practical method of sampling in which pulse have finite width
equal to τ. Sampling is done in accordance with the carrier signal which is digital in
nature.

With the help of functional diagram of a Natural sampler, a sampled signal g(t) is
obtained by multiplication of sampling function c(t) and the input signal x(t).
Spectrum of Natural Sampled Signal is given by:

G(f )=Aτ /Ts .[ Σ sin c (n fs. τ ) X ( f −n fs)]

2. Flat Top Sampling

Flat top sampling is like natural sampling i.e.; practical in nature. In comparison to
natural sampling flat top sampling can be easily obtained. In this sampling techniques,
the top of the samples remains constant and is equal to the instantaneous value of the
message signal x(t) at the start of sampling process. Sample and hold circuit are used in
this type of sampling.

Spectrum of Flat top Sampled Signal is given by:

G(f )=fs .[ Σ X (f −n fs) . H (f )]

3. Ideal Sampling

Ideal Sampling is also known as Instantaneous sampling or Impulse Sampling. Train of


impulse is used as a carrier signal for ideal sampling. In this sampling technique the
sampling function is a train of impulses and the principle used is known as
multiplication principle.

Spectrum of Ideal Sampled Signal is given by:

G(f )=fs .[ Σ X (f −n fs)]

NYQUIST RATE: Nyquist rate is the rate at which sampling of a signal is done so that
overlapping of frequency does not take place. When the sampling rate become exactly
equal to 2fm samples per second, then the specific rate is known as Nyquist rate. It is
also known as the minimum sampling rate and is given by f s=2 f m .

SOURCE CODE

%sampling
clear all;
close all;
clc;
t=-10:0.01:10;
T= 4;
fm=1/T; % analog signal freq
x=cos(2*pi*fm*t); %analog signal
subplot(2,2,1);
plot(t,x,'linewidth',3); %Continuous amp signal
xlabel('time');ylabel('amplitude');
grid;
title('input signal');
n1=-4:1:4; %discrete time axis
fs1=1.6*fm;
fs2=2*fm;
fs3=8*fm;
x1=cos(2*pi*fm/fs1*n1);
subplot(2,2,2);
stem(n1,x1,'linewidth',3); %discrete signal
xlabel('number of samples');
ylabel('amplitude');
hold on;
subplot(2,2,2);
plot(n1,x1,'linewidth',3);
xlabel('time');
ylabel('amplitude');
grid;
title('under sampling');
n2=-5:1:5;
x2=cos(2*pi*fm/fs2*n2);
subplot(2,2,3);
stem(n2,x2,'linewidth',3);
xlabel('number of samples');
ylabel('amplitude');
hold on;
subplot(2,2,3);
plot(n2,x2,'linewidth',3);
xlabel('time');
ylabel('amplitude');
grid;
title('uniform sampling');
n3=-20:1:20;
x3=cos(2*pi*fm/fs3*n3);
subplot(2,2,4);
stem(n3,x3,'linewidth',3);
hold on;
subplot(2,2,4);
plot(n3,x3,'linewidth',3);
xlabel('number of samples');
ylabel('amplitude');
xlabel('time');
ylabel('amplitude');
grid;
title('over sampling');

OUTPUT

RESULT: Sampling Theorem has been studied.

EXPERIMENT 11
AIM: To study the types of sampling.

APPARATUS REQUIRED FOR SIMULATION

1. System configuration: OS Windows 8 or 10 with 4 Gb RAM

2. Software used: MATLAB online R2020b

THEORY

There are basically three types of Sampling techniques.

1. Natural Sampling

2. Flat top Sampling

3. Ideal Sampling

1. Natural Sampling

Natural sampling is practical method of sampling in which pulse have finite width equal
to T. Sampling is done in accordance with the carrier signal which is digital in nature.

2. Flat Top Sampling

During transmission, niche is introduced at top of the transmission pulse which can be
easily removed if the pulse is in the form of flat top. Here l. The top of the samples is
flat i.e., they have constant amplitude. Hence, it is called as flat top sampling or
practical sampling.

3. Ideal Sampling

Impulse sampling can be performed by multiplying input signal x(t) with impulse train of
period 'T'. Here the amplitude of impulse changes with respect to amplitude of input
signal x(t).

SOURCE CODE

A. MATLAB Code for Natural Sampling


%code starts here
clc;
clear all;
close all;
t = 0:0.001:1; %taking a total of 1000 samples
fc = input('Enter the Frequency of Carrier
Signal(square wave) = ');
fm = input('Enter the Frequency of Message Signal(sine
wave) = ');
a = input('Enter the Amplitude of Message Signal = ');
vc = square(2*pi*fc*t); % Creating the square wave
(Carrier) with unity amplitude
vm = a.*sin(2*pi*fm*t); % Creating the message wave
n = length(vc); % getting the length of carrier wave
for i = 1:n
%this loop for projecting the carrier amplitude of -1 &
+1 to 0 & +1
if (vc(i)<=0)
vc(i) = 0;
else
vc(i) = 1;
end
end
y = vc.*vm; % Multiplying the carrier & message signal
subplot(3,1,1);
plot(t,vm); % plotting the message signal
xlabel('Time Axis');
ylabel('Amplitude');
title('Message Signal');
subplot(3,1,2);
plot(t,vc); % plotting the carrier signal
xlabel('Time Axis');
ylabel('Amplitude');
title('Carrier Signal');
axis([0 1 0 1.5]);% to set scaling of x & y axis for
better visualization
subplot(3,1,3);
plot(t,y);
% plotting the naturally sampled signal thus generated
xlabel('Time Axis');
ylabel('Amplitude');
title('Sampled Signal (Natural)');
axis([0 1 -a-3 a+3]);
% to set scaling of x & y axis for better visualisation

B. MATLAB Code for Flat Top Sampling


clc;
fc = 20; % PULSE OR CARRIER
SINGAL FREQUENCY
fm =2; % ANALOG SIGNAL
fs = 1000; % SAMPLING FREQ
t=1;
n = [0:1/fs:t];
n = n(1:end-1);
dutycycle = 50; %on-time
s = square (2*pi*fc*n, dutycycle); % PULSE CARRIER
SIGNAL OR SAMPLING SIGNAL.

s(find(s<0))=0; %to make it unipolar pulse signal


%plot(s);
m = sin (2*pi*fm*n); %ANALOG SIGNAL
period_sam = length(n)/fc; %to find the number of
samples in one period
ind = 1:period_sam:length(n); %to find the starting
sample index
on_samp = ceil(period_sam * dutycycle/100); %no. of
samples in on period of time
pam = zeros(1,length(n));
for i =1:length(ind)
pam(ind(i):ind(i)+on_samp) = m(ind(i));
end
subplot(3,1,1);
plot(n,s);
ylim([-0.2 1.2]);
subplot(3,1,2);
plot(n,m);
ylim([-1.2 1.2]);
subplot(3,1,3);
plot(n,pam);
ylim([-1.2 1.2]);

C. MATLAB code for Ideal Sampling


clc;
a = input('Enter the amplitude:');
f = input('Enter frequency:');
t = 0:0.02:2; % for a total of 16 samples
x1 = 1; % to describe Impulse signal
x2 = a*sin(2*pi*f*t); % analog signal
y = x1.*x2; % sampled Instantaneous Signal
sub pilo(3,1,1);
stem(x1); % Impulse signal

xlabel('Time');
ylabel('Amplitude');
title('Impulse Signal');
subplot(3,1,2); %for sine wave plot
title('Sinusoidal Signal');
plot(t,x2);
ylim([-a-0.2 a+0.2])
xlabel('Time');
ylabel('Amplitude');
subplot(3,1,3); %for PAM wave plot
title('Instantaneous Sampled Waveform');
stem(t,y);
xlabel('Time');
ylabel('Amplitude');
ylim([-a-0.2 a+0.2])

INPUT
A. For Natural Sampling
Enter the Frequency of Carrier Signal(square wave) = 100
Enter the Frequency of Message Signal(sine wave) = 20
Enter the Amplitude of Message Signal = 5
B. For Ideal Sampling
Enter the amplitude = 4
Enter the frequency = 3

OUTPUT
A. For Natural Sampling
B. For Flat Top Sampling

C. For Ideal Sampling


RESULT: Types of Sampling has been studied.

EXPERIMENT 12
AIM: To study Pulse Amplitude Modulation, Pulse Phase Modulation, Pulse Width
Modulation.

APPARATUS REQUIRED FOR SIMULATION

1. System configuration: OS Windows 8 or 10 with 4 Gb RAM

2. Software used: MATLAB online R2020b

THEORY
In PAM, amplitude of pulses of carrier pulse train is varied in accordance with the
modulating signal. Fig. explains the principle of PAM. A signal i.e. baseband is shown in
fig. and carrier pulse train f (t) is also shown. The frequency of carrier train is decided by
sampling theorem. A pulse amplitude modulated signal fc(t) is shown. It can be seen
that the amplitude of pulse depends upon the value of f(t) during the time of pulse.

Fig.1: PAM Modulator

SOURCE CODE
clc;
fc = 20; % PULSE OR CARRIER SINGAL FREQUENCY
fm =2; % ANALOG SIGNAL
fs = 1000; % SAMPLING FREQ
t=1;
n = [0:1/fs:t];
n = n(1:end-1);
dutycycle = 50; %on-time
s = square (2*pi*fc*n, dutycycle); % PULSE CARRIER
SIGNAL OR SAMPLING SIGNAL.
s(find(s<0))=0; %to make it unipolar pulse signal
%plot(s);
m = sin (2*pi*fm*n); %ANAOG SIGNAL
period_sam = length(n)/fc; %to find the number of
samples in one period
ind = 1:period_sam:length(n); %to find the starting
sample index
on_samp = ceil(period_sam * dutycycle/100); %no. of
samples in on period of time
pam = zeros(1,length(n));
for i =1:length(ind)
pam(ind(i):ind(i)+on_samp) = m(ind(i));
end
subplot(3,1,1);
plot(n,s);
ylim([-0.2 1.2]);
subplot(3,1,2);
plot(n,m);
ylim([-1.2 1.2]);
subplot(3,1,3);
plot(n,pam);
ylim([-1.2 1.2]);

OUTPUT:
RESULT: PAM has been successfully studied using MATLAB.
EXPERIMENT 13

AIM: To study Time Division Multiplexing (TDM) system.

APPARATUS REQUIRED FOR SIMULATION

1. System configuration: OS Windows 8 or 10 with 4 Gb RAM

2. Software used: MATLAB online R2020b

BLOCK DIAGRAM:

Fig 1: Time division multiplexing Block Diagram

THEORY
In time division multiplexing, we use the fact that narrow pulses with wide spaces
between them are generated in any of the pulse modulation system, so that spaces
can be used by the signal from other sources. Moreover, although the spaces are
relatively fixed in width, pulse may be as narrow as desired, thus permitting the
generation of high-level hierarchies. There are two types of time division
multiplexing. One is slow speed TDM and other is high speed TDM. Slow speed
TDM is often used in radio telemetry and is produced simply with rotating
mechanical switches. The high speed TDM uses electronic switching and delay lines
to accomplish the same result.

PROCEDURE

1. Set the duty cycle control switch in position 5.


2. Turn the all potentiometers in Function Generator block fully
clockwise.
3. Make the following connections with banana to banana connectors:
⮚ 250 Hz to CH.0 input socket of TX. block.
⮚ 500 Hz to CH.1 input socket of TX. block.
⮚ 1 kHz to CH.2 input socket of TX. block.
⮚ 2 kHz to CH.3 input socket of TX. block.
4. Turn on the power supply of the trainer.
5. Observe the TX. output along-with CH.0 input for reference with the aid of
oscilloscope. The transmitter circuit samples all channels at different time intervals.
The Time Division Multiplexed samples appear at the TX. output. Vary the
amplitude of the input sine-waves by varying the potentiometers in the function
generator block. This will help identifying which sample belongs to which input
channel.

OBSERVATION
RESULT: Time Division Multiplexing and De-multiplexing has been studied.

PRECAUTIONS
1. Switch off the experimental kit during making connections.
2. Use the CRO carefully.
EXPERIMENT 14

AIM: To Study ASK.

APPARATUS REQUIRED FOR SIMULATION

1. System configuration: OS Windows 8 or 10 with 4 Gb RAM

2. Software used: MATLAB online R2020b

THEORY
Amplitude-shift keying (ASK) is a form of amplitude modulation that represents digital
data as variations in the amplitude of a carrier wave. In an ASK system, the binary
symbol d-amplitude carrier wave and fixed frequency for a bit duration of T seconds. If
the signal value is 1 then the carrier signal will be transmitted; otherwise, a signal value
of 0 will be transmitted.

PROGRAM CODE
% b is the input binary bit stream
% f is the frequency of the Carrier
b = input('Enter the Bit stream % n = ')
fc = input('carrier frequency = * ');
n = length(b) ; % determine the length of bit stream
t = 0: 0.01 : n; % time axis
x = 1 : 1 : (( n+1 )*100);
for 1 = 1 : n
for j = 1: .1 : i + 1
bw (x (1 * 100 : ( i+ 1) * 100 = b
(i) ; loop
end
end
bw = bw (100 : end) ; % Binary Bit stream
carrier = cos (2 * p1 * fc * t); % carrier signal
modulated = bw * carrier ; % modulated signal
subplot(3 , 1 , 1 )
plot(t , bw)
grid on;
ylabel(‘amplitude’)
xlabel(‘time’)
title(‘message signal’)
subplot(3, 1 , 2 )
plot(t, Carrier)
grid on;
ylabel(‘amplitude’)
xlabel(‘time’)
title = (‘carrier signal’)
subplot(3 , 1 , 3)
plot(t, modulated)
grid on;
ylabel(‘amplitude’)
xlabel(‘time’)
title(‘modulated signal’)

OUTPUT
RESULT: ASK has been studied.

EXPERIMENT 15

Aim: To study Additive White Gaussian Noise using DSB-SC.

APPARATUS REQUIRED FOR SIMULATION

1. System configuration: OS Windows 8 or 10 with 4 Gb RAM

2. Software used: MATLAB online R2020b

THEORY

AWGN is a basic noise model used in information theory to mimic the effect of many
random processes that occur in nature. Additive because it is added to any noise that
might be intrinsic to information system. White refers to the idea that it has uniform
power across the frequency band for the information system. Gaussian because it has a
normal distribution in the time domain with an average time of zero.

SOURCE CODE

% Additive White Gaussian Noise added in DSB-SC signal


fc = 1e5; % carrier frequency = 1*(10^5);
fs = 1e6;
f = 1e3;
m = 0.5;
A = 1/m;
opt = - A;
t = 0.1:(1/fs):((4/f)-(1/fs));
x = cos (2 * pi * f * t);
y = modulate (x, fc, fs, 'amdsb–tc', opt); %
AM Modulation
y_n = awgn (y, 20, 'measured'); %AWGN channel noise
figure;
subplot (221);
plot (n);
subplot (222); plot (y);
subplot (223); plot (y_n);
x_s = demod (y_n, tc, fs, 'amdsb-tc', opt);
% AM Demodulation
subplot (224); plot (y_n);

OUTPUT
<communication toolbox was not present in the installation because of which the
source code could not be executed correctly>

RESULT: AWGN added in DBS-SC has been studied using MATLAB.

You might also like