Lab Manual CS_SFK
Lab Manual CS_SFK
Communication Systems
EE-319
Lab Manual
1
EE-319 Communication Systems
Department of Electrical Engineering | The University of Faisalabad
2. Clothing
When handling dangerous substances, wear gloves, laboratory coats, and safety
shield or glasses. Shorts and sandals should not be worn in the lab at any time.
Shoes are required when working on the machine shops
If you have long hair and loose clothes, then make sure that it is tied back or
confined.
Keep the work area clear of all materials except those needed for your work.
3. Disposal
Students are responsible for the proper disposal of used material if any
inappropriate containers.
4. Equipment Failure
If a piece of equipment faces while being used, report it immediately to the lab
engineer/assistant. Never try to fix the problem yourself because you could harm
yourself and others.
If leaving a lab unattended, turn off all ignition sources and lock the doors.
Clean up your work area before leaving.
Wash hands before leaving the lab and before eating.
5. Electricity
2
EE-319 Communication Systems
Department of Electrical Engineering | The University of Faisalabad
Obtain permission by the safety coordinator before operating any high voltage
equipment.
Maintain an unobstructed access to all electrical panels.
Avoid using extension cords whenever possible.
Never, ever modify or otherwise change any high voltage equipment.
Before attracting the power supply to your setup make sure there no ‘’live’’ wires
which can be touched.
When attaching a high voltage power supply ALWAYS switch off the supply.
6. Fire
If a person’s clothing catches on fire, he/she needs help.
Prevent him/her from running.
Make him/her lie down and smother the flame by rolling, wrapping with lab coats,
blankets, towels, etc.
Never turn a carbon dioxide extinguisher on a person.
If a fire breaks out, (if time allows) turn off all burners and remove solvents, place
the chemical and equipment safely to the nearest possible table/bench, exit the
building calmly.
If you do not use the fire extinguisher, leave the room immediately to a safer place
possible outside. There is a carbon dioxide extinguisher in the building and the
position and operation of these should be known.
Point the extinguisher at the base of the flames.
Very small fires can be put out with a damp towel by smothering.
Only after the safety of all is assured the matter of the extinguisher the fire is
considered.
Because a few seconds delay can result in very serious injury, Laboratory staff will
guide you on what to do and how to exit during the case of such an emergency.
8. In Case of emergency
Report the location of the emergency; give your name, telephone number, and
building and floor number.
Report the nature of the emergency whether an explosion has occurred and
whether there has been a chemical or electrical fire.
RESCUE: 1122
Police Emergency Control Room: 041-9200264
Army Control Room: 1135
Administrator: 041-8750971 (Ext. 327)
3
EE-319 Communication Systems
Department of Electrical Engineering | The University of Faisalabad
CLO-1: (C4)
CLO-2: (C4)
Implement and analyse various analog and digital modulation and demodulation techniques
by applying simulation tool.
PLOs
PLO PLO PLO PLO PLO PLO PLO PLO PLO PLO PLO PLO
1 2 3 4 5 6 7 8 9 10 11 12
CLOs
CLO1
CLO2
PLO1: Engineering Knowledge PLO7: Environment and Sustainability
PLO2: Problem Analysis PLO8: Ethics
PLO3: Design / Development of Solutions PLO9: Individual and Team Work
PLO4: Investigation PLO10: Communication
PLO5: Modern Tool Usage PLO11: Project Management
PLO6: The Engineer and Society PLO12: Lifelong Learning
4
EE-319 Communication Systems
Department of Electrical Engineering | The University of Faisalabad
Lab Report
5
EE-319 Communication Systems
Department of Electrical Engineering | The University of Faisalabad
(Lab Viva)
6
EE-319 Communication Systems
Department of Electrical Engineering | The University of Faisalabad
Lab Project
7
EE-319 Communication Systems
Department of Electrical Engineering | The University of Faisalabad
Project Report
Project Viva
V. Level of Inquiry
8
EE-319 Communication Systems
Department of Electrical Engineering | The University of Faisalabad
A raw phenomenon is provided to the student. The student chooses the problem to explore develop a
3 procedure for investigating the problem decides what together and interprets the data to propose
viable solutions.
9
EE-319 Communication Systems
Department of Electrical Engineering | The University of Faisalabad
Rubrics Evaluation
10
EE-319 Communication Systems
Department of Electrical Engineering | The University of Faisalabad
V. List of Experiments
Experiment 4 1
Amplitude shift keying
Experiment 5 1
Phase shift keying
Experiment 6 2
Frequency shift keying
Experiment 7 1
AM Modulation (DSB-SC)
Experiment 8 1
FM Modulation and Demodulation Model using Simulink
Experiment 9 1
PM Modulation
Experiment 10 Study and implementation of Sampling Theorem. 2
11
EE-319 Communication Systems
Department of Electrical Engineering | The University of Faisalabad
Experiment No. 1
Apparatus:
20 MHz scope
Digital Multimeter
Description:
All experiments included in this manual have been performed on the ADS-6000
communication Trainer. Before starting actual experiments, let us first familiarize our self
with the use of ADS-6000 communication Trainer.
Connect the ADS-6000 to the 220V AC power source and turn ON the Trainer. Measure ±
12V, ±19V and ±5V supply voltage using a multimeter and record the results below:
Function Generator
Connect the OUTPUT of the function generator to the oscilloscope and frequency counter.
Vary the frequency range selector switch RANGE and adjust it to minimum range, now note
the maximum and minimum frequency by varying the FREQUENCY potentiometer. Repeat
the procedure for all the ranges.
RANGE FREQUENCY
MIN MAX
X1
X10
X100
X1000
X10000
12
EE-319 Communication Systems
Department of Electrical Engineering | The University of Faisalabad
Experiment No. 2
MATLAB Simulink
Scope
Sine wave generator
Signal generator
Pulse generator
Clock generator
i. Procedure:
1. Click on the Simulink icon of write Simulink on the command window to open
Simulink in Matlab.
2. On Simulink window open a new file from file menu.
3. Now click on the scope given in the window and drop it on the new file.
4. Similarly drop sine wave generator, signal generator, clock generator.
5. Use 5 scopes to connect each generator individually.
6. Click on run start the simulation.
7. Use multiplier function from Simulink to multiply the signals of sine wave and pulse
generator.
8. Draw the output waveform and Results.
ii. Procedure:
1. Open Simulink in the mat lab software and draw the circuit according to the diagram.
2. Choose seven sine wave generators from apparatus bar
3. Select mux and sum from the tool bar and Drag it on the new file along with sine
wave generator.
4. Run simulation after connecting objects from either mux or sum to oscilloscope.
5. Draw the output waveform and Results.
13
EE-319 Communication Systems
Department of Electrical Engineering | The University of Faisalabad
Circuit Diagram:
14
EE-319 Communication Systems
Department of Electrical Engineering | The University of Faisalabad
Experiment No. 3
Objective:
This section deals with looking at the spectrum of simple waves. We first look at the
spectrum of a simple sine wave.
To start Simulink: Start MATLAB then type Simulink on the command line. A Simulink
Library Window opens up as shown in figure.
Spectrum of a simple sine wave: Figure shows the design for viewing the spectrum of a
simple sine wave.
15
EE-319 Communication Systems
Department of Electrical Engineering | The University of Faisalabad
Figure shows the time-domain sine wave and the corresponding frequency domain is shown
in figure. The frequency domain spectrum is obtained through a buffered-FFT scope, which
comprises of a Fast Fourier Transform of 128 samples which also has a buffering of 64 of
them in one frame. The property block of the B-FFT is also displayed in figure.
16
EE-319 Communication Systems
Department of Electrical Engineering | The University of Faisalabad
17
EE-319 Communication Systems
Department of Electrical Engineering | The University of Faisalabad
From the property box of the B-FFT scope the axis properties can be changed and the Line
properties can be changed. The line properties are not shown in the above. The Frequency
range can be changed by using the frequency range pop down menu and so can be the y-axis
the amplitude scaling be changed to either real magnitude or the dB (log of magnitude) scale.
The upper limit can be specified as shown by the Min and Max Y-limits edit box. The
sampling time in this case has been set to 1/5000.
Note: The sampling frequency of the B-FFT scope should match with the sampling time of
the input time signal.
Also as indicated above the FFT is taken for 128 points and buffered with half of them for an
overlap.
Note: The signal analyzer if chosen with half the scale, the spectrum is the single-sided
analyzer, so the power in the spectrum is the total power.
Similar operations can be done for other waveforms – like the square wave, triangular. These
signals can be generated from the signal generator block.
The following figure demonstrates the waveform multiplication. A sine wave of 1 kHz is
generated using a sine wave generator and multiplied with a replica signal. The input signal
and the output are shown in figures.
It can be seen that the output of the multiplier in time domain is basically a sine wave but
doesn’t have the negative sides since they get cancelled out in the multiplication.
18
EE-319 Communication Systems
Department of Electrical Engineering | The University of Faisalabad
The spectral output of the spectrum is shown below. It can be seen that there are two side
components in spectrum. The components at fc + fm and –(fc + fm) can be seen along with a
central impulse.
y = km*(cos(2π(1,000)t) + Vdc)2
The effect of adding a dc component to the input has the overall effect of raising the
amplitude of the 2 KHz component and decreases the 2 KHz component. However, for a
value of Vdc = 0.1V, the 1KHz component reduces and for any other increase in the Vdc
value, the 1KHz component increases.
19
EE-319 Communication Systems
Department of Electrical Engineering | The University of Faisalabad
The output is shown below. It can be seen that the output consists of just two side bands at +
(fc+ f m) and the other at –(fc + fm) , i.e. at 9kHz and 11kHz.
20
EE-319 Communication Systems
Department of Electrical Engineering | The University of Faisalabad
By multiplying the carrier signal and the message signal, we achieve modulation.
We observe the output to have no 10 KHz component i.e., the carrier is not present. The
output contains a band at 9 KHz (fc-fm) and a band at 11 KHz (fc + fm). Thus we observe a
double side band suppressed carrier. All the transmitted power is in the 2 sidebands.
By varying the carrier and message signal frequencies, we observe that the 2 sidebands move
according to equation fc ± fm.
Now, using a square wave as modulating signal, we see that DSBSC is still achieved.
The output from spectrum analyzer was slightly different from the theoretical output. In the
result from the spectrum analyzer, there is a small peak at frequency = 10 kHz (the carrier
frequency) and other 2 peak at 0 and 1000 Hz. This may cause by the incorrectly calibrated
multiplier.
Next, the changes to the waveform parameters have been made and then the outputs have
been observed. And here are the changes that have been made
Amplitude Modulation
This experiment is the amplitude modulation for modulation index a = 1 and 0.5.
From the equation of the AM
21
EE-319 Communication Systems
Department of Electrical Engineering | The University of Faisalabad
The representation of the signal in both time-domain and frequency domain when km=1 for
a=1 and a=0.5 were found to be as shown in figures.
The experimental set up for generating an AM signal looks like this:
22
EE-319 Communication Systems
Department of Electrical Engineering | The University of Faisalabad
It must be noted here that the A.M signal can be converted into a DSB-SC signal by making
the constant = 0.
The waveforms at various levels of modulation are shown in the following figures.
23
EE-319 Communication Systems
Department of Electrical Engineering | The University of Faisalabad
24
EE-319 Communication Systems
Department of Electrical Engineering | The University of Faisalabad
The results from the experiment were shown. The results from the experiment are pretty
much the same as in the theoretical ones except there are 2 other peaks at 0 and 1000 kHz.
This is the same as earlier experiment. The cause of this problem is probably the multiplier.
The last experiment in this section is the two tone modulation. In this experiment, the 2 kHz
signal had been added to the modulating signal in the above experiment. Theoretically, the
representation of the modulated signal in time-domain and frequency domain would have
been as in the figure below. In the figure, 1 kHz and 2 kHz signals were modulated with 10
kHz carrier.
25
EE-319 Communication Systems
Department of Electrical Engineering | The University of Faisalabad
26
EE-319 Communication Systems
Department of Electrical Engineering | The University of Faisalabad
The two-tone signal is amplitude modulated using the same block model discussed in the
previous section. The output spectrum is shown in figure. In this case the signals of 1 kHz
and 2 kHz are modulated by a 10 kHz carrier. The output spectrum is shown in figure
The result from the experiment was shown. The highest peak is at the carrier frequency as in
the theoretical result. But there were differences on the sidebands. In the figure from
MATLAB, both frequencies in the sidebands have the same magnitude, but from the
experiment, the components at 9000Hz and 11000Hz have higher magnitude than the
components at 8000Hz and 12000 Hz. There’re also many small peaks of about 1000Hz apart
in the experiment result. This might come from the incorrectly calibrated multiplier.
The final experiment in this section is to change the carrier frequency and the modulating
frequency. When the carrier frequency increases, the spectrum of the modulated signal is
expected to have the two sidebands centered at the new carrier frequency. And when one of
the two modulating signals changes in frequency, the spectrum of the output signal should
have two components move away from their original positions according to the change in
frequency. The result from the experiment was shown. Both change in carrier frequency and
modulating frequency is shown.
27
EE-319 Communication Systems
Department of Electrical Engineering | The University of Faisalabad
Experiment No. 4
Objective:
To generate and demodulate amplitude shift keyed (ASK) signal using MATLAB
Theory:
Generation of ASK
Amplitude shift keying - ASK - is a modulation process, which imparts to a sinusoid two or
more discrete amplitude levels. These are related to the number of levels adopted by the
digital message. For a binary message sequence there are two levels, one of which is typically
zero. The data rate is a sub-multiple of the carrier frequency. Thus the modulated waveform
consists of bursts of a sinusoid. One of the disadvantages of ASK, compared with FSK and
PSK, for example, and is that it has not got a constant envelope. This makes its processing
(e.g. power amplification) more difficult, since linearity becomes an important factor.
However, it does make for ease of demodulation with an envelope detector.
Demodulation
ASK signal has a well-defined envelope. Thus it is amenable to demodulation by an envelope
detector. Some sort of decision-making circuitry is necessary for detecting the message. The
signal is recovered by using a correlator and decision making circuitry is used to recover the
binary sequence.
Algorithm
Initialization commands
ASK modulation
ASK demodulation
28
EE-319 Communication Systems
Department of Electrical Engineering | The University of Faisalabad
Program
%ASK Modulation
clc;
clear all;
close all;
%GENERATE CARRIER SIGNAL
Tb=1; fc=10;
t=0:Tb/100:1;
c=sqrt(2/Tb)*sin(2*pi*fc*t);
%generate message signal
N=8;
m=rand(1,N);
t1=0;t2=Tb
for i=1:N
t=[t1:.01:t2]
if m(i)>0.5
m(i)=1;
m_s=ones(1,length(t));
else
m(i)=0;
m_s=zeros(1,length(t));
end
message(i,:)=m_s; %product of carrier and message
ask_sig(i,:)=c.*m_s;
t1=t1+(Tb+.01);
t2=t2+(Tb+.01);
%plot the message and ASK signal
subplot(5,1,2);axis([0 N -2 2]);
plot(t,message(i,:),'r');
title('message signal');xlabel('t--->');ylabel('m(t)');
grid on hold on;
subplot(5,1,4);plot(t,ask_sig(i,:));
title('ASK signal');xlabel('t--->');ylabel('s(t)');grid on hold on
end
hold off
%Plot the carrier signal and input binary data
subplot(5,1,3);plot(t,c);
title('carrier signal');xlabel('t--->');ylabel('c(t)');grid on
subplot(5,1,1);stem(m);
title('binary data bits');xlabel('n--->');ylabel('b(n)');grid on
% ASK Demodulation
t1=0;t2=Tb
for i=1:N
t=[t1:Tb/100:t2]
%correlator
x=sum(c.*ask_sig(i,:));
%decision device
if x>0
demod(i)=1;
else
demod(i)=0;
end
t1=t1+(Tb+.01);
29
EE-319 Communication Systems
Department of Electrical Engineering | The University of Faisalabad
t2=t2+(Tb+.01);
end
%plot demodulated binary data bits
subplot(5,1,5);stem(demod);
title('ASK demodulated signal'); xlabel('n--->');ylabel('b(n)');grid
on
Model Graphs
30
EE-319 Communication Systems
Department of Electrical Engineering | The University of Faisalabad
Experiment No. 5
Objective:
To generate and demodulate phase shift keyed (PSK) signal using MATLAB
PSK is a digital modulation scheme that conveys data by changing, or modulating, the phase
of a reference signal (the carrier wave). PSK uses a finite number of phases, each assigned a
unique pattern of binary digits. Usually, each phase encodes an equal number of bits. Each
pattern of bits forms the symbol that is represented by the particular phase. The demodulator,
which is designed specifically for the symbol-set used by the modulator, determines the phase
of the received signal and maps it back to the symbol it represents, thus recovering the
original data. In a coherent binary PSK system, the pair of signal S1 (t) and S2 (t) used to
represent binary symbols 1 & 0 are defined by
Algorithm
Initialization commands
PSK modulation
PSK demodulation
31
EE-319 Communication Systems
Department of Electrical Engineering | The University of Faisalabad
Program
% PSK modulation
clc;
clear all;
close all;
%GENERATE CARRIER SIGNAL
Tb=1;
t=0:Tb/100:Tb;
fc=2;
c=sqrt(2/Tb)*sin(2*pi*fc*t);
%generate message signal
N=8;
m=rand(1,N);
t1=0;t2=Tb
for i=1:N
t=[t1:.01:t2]
if m(i)>0.5
m(i)=1;
m_s=ones(1,length(t));
else
m(i)=0;
m_s=-1*ones(1,length(t));
end message(i,:)=m_s;
%product of carrier and message signal
bpsk_sig(i,:)=c.*m_s;
%Plot the message and BPSK modulated signal
subplot(5,1,2);axis([0 N -2 2]);plot(t,message(i,:),'r');
title('message signal(POLAR form)');xlabel('t--->');ylabel('m(t)');
grid on; hold on;
subplot(5,1,4);plot(t,bpsk_sig(i,:));
title('BPSK signal');xlabel('t--->');ylabel('s(t)');
grid on; hold on;
t1=t1+1.01; t2=t2+1.01;
end
hold off
%plot the input binary data and carrier signal
subplot(5,1,1);stem(m);
title('binary data bits');xlabel('n--->');ylabel('b(n)');
grid on;
subplot(5,1,3);plot(t,c);
title('carrier signal');xlabel('t--->');ylabel('c(t)');
grid on;
% PSK Demodulation
t1=0;t2=Tb
for i=1:N
t=[t1:.01:t2]
%correlator
x=sum(c.*bpsk_sig(i,:));
32
EE-319 Communication Systems
Department of Electrical Engineering | The University of Faisalabad
%decision device
if x>0
demod(i)=1;
else
demod(i)=0;
end
t1=t1+1.01;
t2=t2+1.01;
end
%plot the demodulated data bits
subplot(5,1,5);stem(demod);
title('demodulated data');xlabel('n--->');ylabel('b(n)'); grid on
Modal Graphs
33
EE-319 Communication Systems
Department of Electrical Engineering | The University of Faisalabad
Experiment No. 6
Objective:
To generate and demodulate frequency shift keyed (FSK) signal using MATLAB
Theory:
Generation of FSK
In binary FSK system, symbol 1 & 0 are distinguished from each other by transmitting one of
the two sinusoidal waves that differ in frequency by a fixed amount.
Eb=Transmitted energy/bit
Transmitted freq= ƒi = (nc+i)/Tb, and n = constant (integer), Tb = bit interval
Symbol 1 is represented by S1 (t)
Symbol 0 is represented by S0 (t)
Algorithm
Initialization commands
FSK modulation
34
EE-319 Communication Systems
Department of Electrical Engineering | The University of Faisalabad
FSK demodulation
Program
% FSK Modulation
clc;
clear all;
close all;
%GENERATE CARRIER SIGNAL
Tb=1; fc1=2;fc2=5;
t=0:(Tb/100):Tb;
c1=sqrt(2/Tb)*sin(2*pi*fc1*t);
c2=sqrt(2/Tb)*sin(2*pi*fc2*t);
%generate message signal
N=8;
m=rand(1,N);
t1=0;t2=Tb
for i=1:N
t=[t1:(Tb/100):t2]
if m(i)>0.5
m(i)=1;
m_s=ones(1,length(t));
invm_s=zeros(1,length(t));
else
m(i)=0;
m_s=zeros(1,length(t));
invm_s=ones(1,length(t));
end
message(i,:)=m_s;
%Multiplier
fsk_sig1(i,:)=c1.*m_s;
fsk_sig2(i,:)=c2.*invm_s;
fsk=fsk_sig1+fsk_sig2;
%plotting the message signal and the modulated signal
subplot(3,2,2);axis([0 N -2 2]);plot(t,message(i,:),'r'); title('message
signal');xlabel('t---->');ylabel('m(t)');grid on;hold on;
subplot(3,2,5);plot(t,fsk(i,:));
title('FSK signal');xlabel('t---->');ylabel('s(t)');grid on;hold on;
t1=t1+(Tb+.01); t2=t2+(Tb+.01); end
hold off
%Plotting binary data bits and carrier signal
subplot(3,2,1);stem(m);
title('binary data');xlabel('n---->');
ylabel('b(n)');grid on;
35
EE-319 Communication Systems
Department of Electrical Engineering | The University of Faisalabad
subplot(3,2,3);plot(t,c1);
title('carrier signal-1');xlabel('t---->');ylabel('c1(t)');grid on;
subplot(3,2,4);plot(t,c2);
title('carrier signal-2');xlabel('t---->');ylabel('c2(t)');grid on;
% FSK Demodulation
t1=0;t2=Tb
for i=1:N
t=[t1:(Tb/100):t2]
%correlator
x1=sum(c1.*fsk_sig1(i,:));
x2=sum(c2.*fsk_sig2(i,:));
x=x1-x2;
%decision device
if x>0
demod(i)=1;
else
demod(i)=0;
end
t1=t1+(Tb+.01);
t2=t2+(Tb+.01);
end
%Plotting the demodulated data bits
subplot(3,2,6);stem(demod);
title(' demodulated data');xlabel('n---->');ylabel('b(n)'); grid on;
Modal Graphs
36
EE-319 Communication Systems
Department of Electrical Engineering | The University of Faisalabad
Experiment No. 7
AM Modulation (DSB-SC)
Theory:
This code is an example of how to generate and analyze an amplitude-modulated (AM) signal
using MATLAB. It shows the basic steps of modulating and demodulating a signal, as well as
visualizing the signals in the time and frequency domain. It serves as a starting point for
further experimentation and optimization in communication systems and also helps in
understanding the characteristics of signals.
1. The first step is to clear the command window and any existing variables in the workspace
by using the "clc" and "clear" commands.
2. The next step is to define the sampling frequency and time vector. The sampling frequency
is set to 1000 Hz and the time vector is set to start from 0 to 1 second, sampled at the rate of
1000 samples per second.
3. The next step is to generate a modulating signal. A sinusoidal signal with a frequency of 5
Hz is generated over the time vector defined earlier. This will be the signal that will be used
to modulate the carrier signal.
4. The next step is to generate a carrier signal. A cosine signal with a frequency of 100 Hz is
generated over the time vector defined earlier. This will be the signal that will be modulated
by the modulating signal.
5. The next step is to modulate the carrier signal using the "ammod" function. The "ammod"
function modulates the carrier signal with the modulating signal, resulting in an amplitude-
modulated signal. The carrier frequency is set to 100 Hz, the sampling frequency is set to
1000 Hz, and the modulation index is set to 0.
6. The next step is to plot the signals in the time domain. The modulating signal, carrier
signal, and modulated signal are plotted using the "plot" function.
7. The next step is to perform a fast Fourier transform (FFT) on the signals. The FFT of the
modulating signal, carrier signal, and modulated signal are calculated using the "fft" function.
8. The next step is to plot the signals in the frequency domain. The magnitude of the FFT of
the modulating signal, carrier signal, and modulated signal are plotted using the "plot"
function.
9. The next step is to demodulate the modulated signal using the "amdemod" function. The
"amdemod" function demodulates the modulated signal, resulting in the original modulating
signal. The carrier frequency is set to 100 Hz, the sampling frequency is set to 1000 Hz, and
the modulation index is set to 0.
37
EE-319 Communication Systems
Department of Electrical Engineering | The University of Faisalabad
10. The next step is to plot the demodulated signal in the time domain. The demodulated
signal is plotted using the "plot" function.
11. The last step is to perform a fast Fourier transform (FFT) on the demodulated signal. The
FFT of the demodulated signal is calculated using the "fft" function.
12. The last step is to plot the demodulated signal in the frequency domain. The magnitude of
the FFT of the demodulated signal is plotted using the "plot" function
AM SSB-SC modulation/demodulation
Code:
38
EE-319 Communication Systems
Department of Electrical Engineering | The University of Faisalabad
In this script, a message signal (m) is defined with a frequency of 5 Hz and a sample rate of
10000 Hz. A carrier signal (f_c) with a frequency of 50 Hz is also defined. The message
signal is then modulated using the ssbmod function with the carrier signal to produce the SSB
modulated signal (y_mod). The ssbdemod function is then used to demodulate the modulated
signal and produce the demodulated signal (y_demod). The time domain and frequency
domain plots of the message signal, modulated signal, and demodulated signal are then
plotted using the subplot and plot functions.
39
EE-319 Communication Systems
Department of Electrical Engineering | The University of Faisalabad
Graphical Outputs:
40
EE-319 Communication Systems
Department of Electrical Engineering | The University of Faisalabad
Experiment No. 8
Simulation software is based on the process of modelling a real phenomenon with a set of
mathematical formulas. It is essentially, a program that allows the user to observe an
operation through simulation without actually performing that operation. Simulation software
is used widely to design equipment so that the final product will be as close to design
specification as possible without expensive process modification. Simulation has proven to be
a powerful tool in modelling a complete communication channels before embarking on the
real prototype. In recent years, extensive research has been conducted in the area of
simulation to model large complex systems like FM and understand their structures and
behaviors. At the same time, a variety of design principles and approaches for computer-
based simulation have evolved. As a result, an increasing number of computer simulation
sub-fields and approaches have been proposed, as well as a large number of tools and
applications having been designed and developed. The benefits of computer simulation are
becoming more generally recognized in several domains and areas.
Some of the computer software packages usually used by Engineers for analysis and
simulation of physical systems include: MATLAB/SIMULINK, RMxprt/Maxwell2D/3D,
SIMPLORER, HFSSV10, XFDTD/Varipose/XGTD, COMSOL, 5SPICE, ANSYS,
Electronic Workbench etc. The availability of these computer software packages is now
reshaping the role and applications of computer laboratory projects to involve students in
more intense problem-solving experience. These user programs also provide an opportunity
to easily conduct numerical experiments and to tackle realistic and more complicated
problems.
Description:
Modern engineering would be inconceivable without computers to gather data and run model
simulations. Whether it involves bringing back pictures of the surface of the planet Mars or
detailed images to guide brain surgeons, computers have greatly extended our knowledge of
the world around us and our ability to turn ideas into engineering reality. Modelling is the
process of generating abstract, conceptual, graphical and/or mathematical models. Science
offers a growing collection of methods, techniques and theory about all kinds of specialized
scientific modelling. A model in general is a pattern, plan, representation (especially in
miniature), or description designed to show the main object or workings of an object, system,
or concept. Simulation is used in different ways by different people. As used here, simulation
is defined as the process of creating a model (i.e., an abstract representation or exact copy) of
an existing or proposed system (e.g., a project, a business, a mine, a forest, the organs in your
body, etc.) in order to identify and understand those factors which control the system and/or
to predict (forecast) the future behavior of the system. Almost any system which can be
quantitatively described using equations and/or rules can be simulated.
41
EE-319 Communication Systems
Department of Electrical Engineering | The University of Faisalabad
The underlying purpose of simulation is to shed light on the underlying mechanisms that
control the behavior of a system. More practically, simulation can be used to predict
(forecast) the future behavior of a system, and determine what you can do to influence that
future behavior. That is, simulation can be used to predict the way in which the system will
evolve and respond to its surroundings, so that you can identify any necessary changes that
will help make the system perform the way that you want it to. Thus modelling and computer
simulation are important interdisciplinary tools.
There are a number of circuits that can be used to demodulate FM. Each type has its own
advantages and disadvantages, some being used when receivers used discrete components,
and others now that ICs are widely used.
42
EE-319 Communication Systems
Department of Electrical Engineering | The University of Faisalabad
Conclusions:
a. The data Attenuation can be substantially reduced while travelling long distances in
communication.
b. The Software Implementation gives us an advantage of reduction in hardware cost and
failures.
43
EE-319 Communication Systems
Department of Electrical Engineering | The University of Faisalabad
Experiment No. 9
PM Modulation
Theory:
Phase Modulation (PM) is a method of modulating a carrier signal in which the phase of the
carrier signal is varied in accordance with the amplitude of the message signal. In PM, the
phase angle of the carrier signal is varied in proportion to the amplitude of the message
signal.
This results in a modulated signal whose phase is continuously changing with respect to the
message signal.
The advantages of PM include its ability to provide a constant envelope, which allows for
efficient power amplification, as well as its ability to avoid detection by amplitude-sensitive
jamming signals. Additionally, PM is less affected by non-linearities in the transmission
channel and is less susceptible to phase noise.
44
EE-319 Communication Systems
Department of Electrical Engineering | The University of Faisalabad
This code is a MATLAB script that demonstrates the process of Phase Modulation (PM)
modulation and demodulation using built-in functions pmmod and pmdemod.
The code starts by defining the sample rate (fs) and the time vector (t). It then defines the
frequency of the message signal (f_m) and creates the message signal by taking the cosine of
2π times the message frequency multiplied by the time vector.
The code then defines the frequency of the carrier signal (f_c) and the modulation index
(beta). Using the pmmod function, the message signal is modulated onto the carrier signal,
creating the PM-modulated signal (y_mod). Using the pmdemod function, the PM modulated
signal is demodulated to recover the original message signal (y_demod).
45
EE-319 Communication Systems
Department of Electrical Engineering | The University of Faisalabad
The code then plots the message signal, PM modulated signal, and PM demodulated signal in
both the time domain and frequency domain using the plot function and fft function. It also
includes labeled x and y axes and titles for each subplot.
Graphical Outputs:
46
EE-319 Communication Systems
Department of Electrical Engineering | The University of Faisalabad
Experiment No. 10
Apparatus:
ADS-6000 Trainer.
ACS-05
Oscilloscope.
Tool Kit.
Theory:
r(t) = f(t).g(t)
The Fourier spectrum of the sampled signal is
R(ω) = F(ω) + £n=1 sin(n.d).[ F(ω - ωs) + F(ω - ωS)]
Where, cos = 2nfs is the sampling frequency in radian/sec. The sampled signal spectrum has
lobes F(co) of the signal f(t) at a>=0,.±cos,±2cDS An ideal LPF can recover the original
signal.
47
EE-319 Communication Systems
Department of Electrical Engineering | The University of Faisalabad
Procedure:
1. Connect trainer to power supply. Turn on the trainer and verify the voltages of the power
supply using the multimeter.
2. Connect power connector to the Module.
3. Connect the circuit as shown in Figure.
4. Connect scope CH1 to CLOCK O/P to verify presence of clock signal of about 67KHz
frequency. Next, connect CH1 to DATA 4 and see square wave signal of 36 KHz and
then CH1 to CLOCK O/P 1 to observe a stable pulse waveform (sampling signal, g (t) of
fig.), of 9KHz.
5. Connect CH2 of the scope to Function Generator to observe stable sine wave signal of
about 1 KHz (input signal, f (t) of fig.). Vary Amplitude pot on Function Generator to set
its amplitude to one volt peak to peak level. This signal is also the input signal to the
Sample / Hold at ANALOG l/P. Set the scope time base such that at least one complete
cycle of sine wave, is displayed on CH2.
6. Next connect CH2 of the scope to S/HOLD O/P to display sampled 1 KHz sine signal (r
(t) of fig.). Vary Amplitude pot on Function Generator and see that the amplitude of the
sampled signal also varies, accordingly.
7. Draw waveform of the sampled signal below:
8. Design a simple RC low pass filter with cut off frequency of 1 KHz using the equation:
fc = 1/2ΠRC.
9. Connect sample and hold waveform to RC LPF and observe the recovered waveform.
Draw the waveform of the recovered sine signal below:
Graphical output:
48
EE-319 Communication Systems
Department of Electrical Engineering | The University of Faisalabad
Experiment No. 11
Theory:
Pulse Code Modulation (PCM) provides a method of digital transmission of analog messages.
The analog signal is sampled, quantized and coded to convert into digital signal. Block
diagram of PCM generation system is shown in Fig.
The analog signal is band limited by a LPF and applied to sample-and-hold unit. The sampled
49
EE-319 Communication Systems
Department of Electrical Engineering | The University of Faisalabad
signal is then rounded off to the nearest discrete value in a set of L quantized levels. The
resulting waveform is discrete in time (by virtue of sampling) and discrete in amplitude (by
virtue of quantization). Next, an encoder translates the quantized samples into digital code
words. The encoder works with binary digits (0 & 1) and produces for each sample a code
word consisting of n bits in parallel. The number of quantized levels “L” and length of code
word un", are related by:
L = 2n
Finally, successive code words are readout serially, to constitute PCM waveform. If f s is the
sampling frequency, then output bit rate of PCM waveform for word length n is nf#.
In PCM receiver (Fig.), the received signal contaminated by noise, is regenerated to yield a
clean PCM waveform. Using sync and timing information, the serial bits are converted into
parallel words. DAC (digital to analog converter) then regenerates sample and hold
(staircase) waveform.
This staircase waveform differs from original S/H waveform by the round off error,
introduced in the quantizer. Low pass filter then produces smoothed output signal, which
differs from the original signal to the extent that the quantized samples differ from the exact
sample values.
Quantizing process, introduces noise in PCM signal, which depends upon word length “n”.
The signal to noise ratio (SNR), of a PCM signal is given by:
SNR = 3. 2".K or
Where K is the ratio of rms to peak signal amplitudes and is always <1. For above it is
obvious, that SNR depends upon K and n. SNR improves by 6 dB whenever PCM word
length “n”, is increased by one bit.
In this experiment, use of 8 bit PCM (word length n-8) has been made. Clock signal of 64
KHz has been made. Each PCM word (encoded signal sample), is followed by a zero to
differentiate it from the succeeding PCM word (next signal sample). PCM waveform is
shown in Fig.
50
EE-319 Communication Systems
Department of Electrical Engineering | The University of Faisalabad
Procedure:
5. Connect scope CH1 to clock signal and verify its presence. Next connect CH2 to FRAME
SYNC OUT and verify the sampling signal. The sampling signal is also frame sync, since
in this
6. Staircase (S/H) waveform is present.
7. Next experiment we have single channel PCM system.
8. Keep Ch2 displaying the sampling sync, signal? Connect AF signal to ANALOG l/P of
Sample / Hold. Now connect Ch1 to S/HOLD O/P to display S/H signal. Increase AF
signal and verify that connect Ch1 to PCM OUT verify that PCM waveform is available.
Vary AF signal and verify that PCM signal also varies. Reduce AF signal to zero. Verify
that PCM signal becomes of fixed pattern.
9. Connect Ch1 to ANALOG O/P PCM Decoder. Increase AF signal. S/H waveform of
demodulated AF signal will appear. Vary the amplitude of the AF signal and see that S/H
waveform also varies, accordingly. Change frequency of AF signal and see that frequency
of S/H signal also varies. Now insert the analog waveform to LPF. Smooth AF signal will
51
EE-319 Communication Systems
Department of Electrical Engineering | The University of Faisalabad
appear at OUTPUT.
10. Vary AF and see its response after LPF. Moreover we can adjust the output amplitude of
AF by varying POT 1 in PCM Decoder Section.
Experiment No. 12
Equipment/Tools:
ADS-6000 Trainer
Digital Multimeter (DMM)
Dual Beam Oscilloscope
ACS – 01
Theory:
Pulse Code Modulation (PCM) provides a method of digital transmission of analog messages.
The analog signal is sampled, quantized and coded to convert into digital signal. Block
diagram of PCM generation system is shown in Fig.
52
EE-319 Communication Systems
Department of Electrical Engineering | The University of Faisalabad
The analog signal is band limited by a LPF and applied to sample-and-hold unit. The sampled
signal is then rounded off to the nearest discrete value in a set of L quantized levels. The
resulting waveform is discrete in time (by virtue of sampling) and discrete in amplitude (by
virtue of quantization). Next, an encoder translates the quantized samples into digital code
words. The encoder works with binary digits (0 & 1) and produces for each sample a code
word consisting of n bits in parallel. The number of quantized levels “L” and length of code
word un", are related by:
L = 2n
Finally, successive code words are readout serially, to constitute PCM waveform. If f s is the
sampling frequency, then output bit rate of PCM waveform for word length n is nf#.
In PCM receiver (Fig.), the received signal contaminated by noise, is regenerated to yield a
clean PCM waveform. Using sync and timing information, the serial bits are converted into
parallel words. DAC (digital to analog converter) then regenerates sample and hold
(staircase) waveform.
This staircase waveform differs from original S/H waveform by the round off error,
introduced in the quantizer. Low pass filter then produces smoothed output signal, which
differs from the original signal to the extent that the quantized samples differ from the exact
sample values.
Quantizing process, introduces noise in PCM signal, which depends upon word length “n”.
The signal to noise ratio (SNR), of a PCM signal is given by:
SNR = 3. 2".K or
53
EE-319 Communication Systems
Department of Electrical Engineering | The University of Faisalabad
Where K is the ratio of rms to peak signal amplitudes and is always <1. For above it is
obvious, that SNR depends upon K and n. SNR improves by 6 dB whenever PCM word
length “n”, is increased by one bit.
In this experiment, use of 8 bit PCM (word length n-8) has been made. Clock signal of 64
KHz has been made. Each PCM word (encoded signal sample), is followed by a zero to
differentiate it from the succeeding PCM word (next signal sample). PCM waveform is
shown in Fig.
Procedure:
1. Connect the ADS-6000 Trainer to the 220V AC power supply.
2. Turn on the trainer and verify the voltage of the power supply using the multimeter.
3. Connect Power connector to the Module ACS - 01
4. Connect the circuit as shown in Diagram
5. Connect scope CH1 to clock signal and verify its presence. Next connect CH2 to FRAME
SYNC OUT and verify the sampling signal. The sampling signal is also frame sync, since
in this experiment we have single channel PCM system.
6. Keep Ch2 displaying the sampling sync, signal? Connect AF signal to ANALOG l/P of
Sample / Hold. Now connect Ch1 to S/HOLD O/P to display S/H signal. Increase AF
54
EE-319 Communication Systems
Department of Electrical Engineering | The University of Faisalabad
Experiment No. 13
Equipment /Tools:
ADS-6000 Trainer
ACS – 05
DMM
Dual Beam Scope
Theory:
55
EE-319 Communication Systems
Department of Electrical Engineering | The University of Faisalabad
Pulse Time Modulation represents a category of the pulse modulation techniques in' which
the timing of pulse, and not the amplitude, is varied parameter. Two types of Pulse Time
Modulations are pulse width modulation (PWM) and pulse position modulation (PPM). The
analog signal is sampled, and sample value is used to vary the width of the pulse to produce
PWM signal and position of the pulse to output PPM signal.
Fig. shows the block diagram of pulse width and position modulator. Timing diagram relating
the modulating and the sampling signals to the PWM and PPM signals, is shown in Fig.
Tlfe pulse width modulator shown in fig. 2 takes sampling signal and converts it into a
sawtooth waveform using an integrator. The modulating signal is sampled and passed
through sample and hold circuit to generate a staircase signal, which is compared with
sawtooth waveform using a voltage comparator. The output of the comparator is the PWM
signal which is then fed to pulse generator which triggers at the -ve going transition and its
output is the PPM signal. The PWM and PPM signals Min be demodulated using a low pass
filter.
56
EE-319 Communication Systems
Department of Electrical Engineering | The University of Faisalabad
57
EE-319 Communication Systems
Department of Electrical Engineering | The University of Faisalabad
5. Connect scope to CLOCK and verify presence of Clock signal. Next connect CH1 of
scope to CLOCK O/P 1 and verify presence of sampling signal. Connect CH2 of the
scope to Function Generator verify presence of sine wave signal. Set level of sine wave
signal to 1 Vpp
6. Next connect Ch2 to S/H SIGNAL l/P of Sample / Hold and observe sampling
7. Signal. Connect scope to S/HOLD O/P and verify that it is staircase waveform. The
sampling signal is also connected to PTM where it is converted to saw tooth waveform
(fig. 1). The staircase and saw tooth waveforms are compared using a voltage comparator
in PTM its output is the pulse width modulated (PWM) waveform of applied AF input
signal. Connect sampled signal to Ch. #1 and PWM output to Ch. #2 of the scope. Verify
that at the position where amplitude of the sampled signal is of maximum amplitude, the
PWM signal has maximum pulse width. Vary amplitude of AF input signal, and see its
effect on the PWM signal.
8. Design a simple RC LPF with cut off frequency of 1 KHz and connect PWM signal to its
input. Moves Ch1 probe to the output off RC LPF and draw the waveform. The output is
the same sinusoidal waveform superimposed by a very large ripple. Reduce AF signal and
measure the ripple frequency. What you can conclude form here?
58
EE-319 Communication Systems
Department of Electrical Engineering | The University of Faisalabad
Experiment No. 14
Equipment/Tools:
ADS-6000 Trainer
Oscilloscope
Digital Multimeter
DCS - 04
Theory:
So far we have carried out experiments regarding base band digital modulation techniques,
which are suitable for transmission of signals over wire and short distances. When base band
signal is transmitted over a radio link, its spectrum is shifted to high frequency range to
efficiently radiate the low frequency base band signal. A spectrum shift is also required to
transmit several message signals simultaneously by sharing the large bandwidth of the
transmission medium. The spectrum can be shifted to a higher frequency by modulating the
amplitude, phase and frequency of the high frequency carrier. In amplitude modulation, NRZ
base band signal y(t), is multiplied with the carrier cosω ct, we have modulated carrier
y(t).cosωct, as shown in Fig. This modulation scheme of transmitting binary data is known as
amplitude shift keying (ASK). When the data is transmitted by varying the carrier frequency,
the modulation scheme is known frequency shift keying (FSK). A “0” bit is transmitted by a
carrier pulse of “f1” frequency, and “1” bit is transmitted by carrier pulse of “f2” frequency.
FSK signal waveform, is shown in Fig.1. If the base band signal y(t), were polar (where “1”
data bit is represented by +ve pulse, and “0” bit is represented by –ve pulse), the
corresponding modulated signal would appear as shown in Fig.1. The phase of the carrier,
when “1” bit is transmitted differ by radians than that when “0” bit is transmitted. The bit
information therefore resides in the phase of the carrier. This scheme is known as phase shit
keying. We will take up ASK & PSK in next experiment, however, we perform experiment
on FSK here. Mathematically, we can represent FSK signal as summation of two ASK
signals as under:
Where ω1, ω 2 are carrier frequencies of ASK signals and y (t) & y (t) are NRZ and NRZ
complement are data signals. The PSD of FSK is then summation of PSD two AASK signals.
Practically, FSK is generated by modulating a frequency modulator ʃʃ with a digital signal y
(t). This type of FSK is known as Continuous–phase FSK “CPFSK” which can be
represented mathematically as,
59
EE-319 Communication Systems
Department of Electrical Engineering | The University of Faisalabad
5. Connect Function Generator to Carrier I/P, this will generate Clock at CLOCK O/P, use
this clock to operate the Data Generator section.
6. Now connect FSK out signal to the CH2 and observe the waveform of frequency shift
keyed signal. At positions where NRZ signal is “1” FSK signal frequency is on higher
side as compare to when NRZ data is “0”.
7. Remove NRZ data from FSK input and connect it to +5 volt supply. Measure on scope
60
EE-319 Communication Systems
Department of Electrical Engineering | The University of Faisalabad
the output frequency of the FSK modulator. Next connect DATA I/P to ground and again
measure the frequency. Record the results in the table below.
FSK Demodulator
The FSK signal is demodulated using a phase lock loop. FSK Demodulation section of
the module will be used for this purpose. Observe VCO free running frequency at Test
point TP3 (pin # 12 of IC XR2211), on the scope. Using 10K potentiometer, adjust VCO
frequency till it is equal to the mean of the two frequencies recorded in table above.
Now apply FSK modulated signal to the FSK Demodulated signal. The modulating data
NRZ signal will appear at the output of the demodulator. If the NRZ data is not recovered
properly, then readjust VCO frequency slightly. Display the recovered NRZ data on CH1
and original NRZ data on CH2 of the scope. Compare the two waveforms.
61
EE-319 Communication Systems
Department of Electrical Engineering | The University of Faisalabad
Experiment No. 15
Equipment/Tools:
ADS-6000 Trainer
Oscilloscope
Digital Multimeter
DCS - 04
Theory:
We have already discussed digital carrier modulation schemes and we performed experiment
on frequency shit keying (FSK). In this experiment we will look at Phase Shift Keying (PSK)
and Amplitude Shift Keying (ASK). Briefly, in PSK, it is phase changes of a sine wave that
represents the binary ones and zeroes of digital signals. A binary zero is 180 o out of phase
(phase shifted) with respect to a binary one. Each phase shift occurs at 0 to 1 or 1 to 0
transition. The amplitude and frequency of the carrier remains constant. Mathematically, PSK
signal is represented by the following equation:
Where y (t) is the NRZ/Manchester signal. Fig shows PSK modulated signal for given NRZ
data. In ASK, it is the amplitude difference or the presence and absence of a sine wave that
represents the binary ones and zeroes. A binary 1 represents fixed amplitude sine wave and
absence of sine wave carrier represents, zero. Fig7.a shows the ASK signal. Mathematically,
ASK signal is represented by y (t).coswt.
PSK modulator is shown in Fig.1, where coswt and cos (wt+180) are generated by a phase
shifter. The NRZ data y (t) and its complement y (t), are multiplied in Digital switch IC 4046,
with coswt and cos (wt+180) carrier, respectively. The two components are added together to
generate PSK signal. To generate ASK signal, y (t).cos (wt+180) is set to zero.
To demodulate PSK or ASK signals, a balance modulator is used where ASK & PSK signals
are demodulated synchronously by multiplying the signals with the carrier. The demodulated
62
EE-319 Communication Systems
Department of Electrical Engineering | The University of Faisalabad
5. Connect Function Generator to Carrier I/P, this will generate Clock at CLOCK O/P, use
this clock to operate the Data Generator section
6. Short the Jumper J1 to get PSK modulated output at ASK/PSK O/P.
7. Connect CH2 to PSK output. You will see PSK modulated waveform as shown in Fig.2.
Adjust AF signal to avoid any clipping in the waveform. Move CH2 probe between PSK
O/P and data I/P terminals. Draw the waveforms of data I/P and PSK o/p signals. Verify
that phase of the carrier changes by 180 at data transitions.
PSK is demodulated using balance modulator with AF carrier and PSK input signals. The
AF carrier is applied to the modulator. Connect PSK modulated waveform to the balance
modulator. Monitor output waveform of demodulator on scope. Adjust 50K pot till you
get clear waveform. Now design a simple RC LPF of cut off frequency 120Hz (AF/4) and
observe its output, which will be same as that of NRZ1.
63
EE-319 Communication Systems
Department of Electrical Engineering | The University of Faisalabad
ASK Modulator
1. That output is ASK waveform i.e. when data is 1 carrier is present and when it is zero.
2. Open the Jumper J1 to get ASK Output at ASK/PSK O/P.
3. Verify carrier is absent.
4. Now connect the ASK modulated waveform to the demodulator as done in case of PSK
above.
5. Verify that the demodulator output will be same as NRZ data input to ASK modulator.
64