You are on page 1of 94

COMSATS University Islamabad, Lahore Campus

Department of Electrical and Computer Engineering

EEE 351 – Principles of Communication


Systems
Lab Manual for SPRING 2019

Lab Resource Person


Engr. S.M.SAAD.FAROOQ

Theory Resource Person


DR. ASSAD ALI

Supervised By
Dr. SOBIA BAIG

Name: __________________________ Registration Number: CIIT/ - - /LHR

Program: _______________________ Batch: _____________________________________

Semester ___________________________
Revision History

Date
S. No. Activity Performed by
(DD/MM/YYYY)
1 Lab Manual Preparation 02/09/2013 Engr. Rizwan Asif

2 Lab Manual Review 10/12/2014 Dr. Sobia Baig

3 Layout Modifications 02/01/2015 Ayesha Naz

4 Lab Manual Final Review 10/02/2015 Dr. Hafiz M. Asif


Lab Manual Modifications
5 20/08/2015 Ayesha Naz
and Review
Lab Manual Modifications to Ayesha Naz
6 04/08/2017
OBE Format Assad Ali
7 Lab Manual Review 22/09/2017 Dr. Sobia Baig

8 Lab Manual Format Changes 14/09/2018 Mayyda Mukhtar


Lab Manual Modifications in
9 28/02/2019 Numan Abdullah
OBE Format

|EEE 351 | Principles of Communication Systems Lab Manual i


Preface

The field of telecommunication has reconstructed the frontier upon which the world has come to
intricately interweave the lives of people across the globe. The industry has catapulted in a very
short span of time, and needless to say it would continue to do so for centuries to come. This
manual has been written as a laboratory reference for the course titled EEE 351 Principles of
Communication Systems. This is a basic course for students of BS Engineering. Students for whom
Principles of Communication Systems is the only one course offered in the field of communication.
The course starts with a brief review of Fourier analysis and random processes. Basic analog
communication systems, including Amplitude Modulation and Frequency Modulation systems
are covered next. Then, digital communication systems using Pulse Code Modulation (PCM),
Pulse Amplitude Modulation is also discussed. The performance of communication systems in the
presence of noise is also analysed. We will consider the effects of inter symbol interference and
noise and ways to mitigate them using software and hardware. In the laboratory, the student will
perform experiments which demonstrate the basic principles of analog and digital communication
systems, also covered in the theoretical part of curriculum.
All experiments described in this manual are performed on TIMS (Telecommunications
Instructional Modelling System) as well as Discreet Components. TIMS is a modular system for
modelling telecommunications block diagrams whereas the simulations are performed within the
environment of MATLAB which is interactive software for scientific and engineering
calculations. Simulations can model the behavior of real systems with remarkable degree of
precision.

|EEE 351 | Principles of Communication Systems Lab Manual ii


Books
Text Books
1. Modern Digital and Analog Communication Systems 4th Edition by B.P. Lathi
Reference Books
1. Introduction to Digital and Analog Communication Systems by Simon Haykin and Micheal Moher,
Wiley, 4th Edition
2. Fundamentals of Communication Systems by John G. Proakis and Masoud Salehi, Prentice Hall, 2004

Learning Outcomes
Theory CLOs
After successfully completing this course, the students will be able to:
1. Analyze the behavior of amplitude and angle modulated signals both in time and frequency
domain to comprehend the analog communication systems (Level: C4).
2. Design and analysis of digital data communication system using constituent basic
building blocks (Level: C5).
3. Evaluate performance of digital communication system using basic communication
parameters (Level C6).
Lab CLOs
After successfully completing this course, the students will be able to:
4. Display the performance of various analog and digital modulation techniques and manipulates
the associated parameters for their evaluation u s i n g software and hardware tools (PLO5/P5)
5. Students will be able to explain the communication system’s design effectively with the help of
documentation and technical reports. (PLO10/A2)
6. Analyze the performance of various concepts of analog and digital communication systems using
hardware and software tools. (PLO9/A2)

CLOs – PLOs Mapping


PLO Cognitive Domain Affective Domain Psychomotor Domain
PLO10
PLO2

PLO3

PLO4

PLO5

PLO9

CLO

CLO1 x C4

CLO2 x C5

CLO3 x C6

CLO4 x P5

CLO5 x A2
CLO6 x A2

|EEE 351 | Principles of Communication Systems Lab Manual iii


Lab CLOs – Lab Experiment Mapping
Lab

Lab 10

Lab 11

Lab 12

Lab 13

Lab 14
Lab 1

Lab 2

Lab 3

Lab 4

Lab 5

Lab 6

Lab 7

Lab 8

Lab 9
CLO

CLO4 x x x x x x x x x X x x x X

CLO5 x x x x x x x x x X x x x X
CLO6 x x x x x x x x x X x x x X

Grading Policy
The final marks for lab would comprise of Lab Assessment (25%), Lab S1 (10%), Lab S2 (15 %) and
Lab Terminal (50%).

S-I 0.5*(S-I Exam result) + 0.5* (average of lab evaluation of Lab 1-4)
S-II 0.5*(S-II Exam result) + 0.5*[ (average of lab evaluation of Lab 5-8) * 1.5]
Terminal 0.5*(Terminal Exam result) +0.25*[(average of lab evaluation of Lab 9-12) *5] +
0.10*[(average of lab evaluation of Lab 5-8) *5] + 0.15*[(average of lab evaluation of Lab 1-4) *5]
A/Q Marks: For CEP designated courses: Add CEP marks out of 25.
For Non-CEP designated courses: [(Average of lab evaluation of Lab (1-12)) * 2.5]

The minimum pass marks for both lab and theory shall be 50%. Students obtaining less than 50%
marks (in either theory or lab, or both) shall be deemed to have failed in the course. The final marks
would be computed with 75% weight to theory and 25% to lab final marks.

List of Equipment
 EMONA Telecommunications Instructional Modelling Systems (TIMS)
 Instek Digital Oscilloscope
 Multimeter
 Regulated Power Supply
 Functional Generators
 Breadboard and other Discrete Components

Software Resources
 MATLAB
 SIMULINK

|EEE 351 | Principles of Communication Systems Lab Manual iv


Lab Instructions
• This lab activity comprises of three parts: Pre-lab, Lab Tasks, Lab Report and Conclusion & Viva
session.
• The students should perform and demonstrate each lab task separately for step-wise evaluation.
• Only those tasks that are completed during the allocated lab time will be credited to the students.
• Students are however encouraged to practice on their own in spare time for enhancing their skills.

Lab Report Instructions


All questions should be answered precisely to get maximum credit. Lab report must ensure following items:
• Lab Objectives
• Methodology
• Conclusion

Safety Instructions

1. Conduct yourself in a responsible manner at all times in the laboratory.


2. Know the location of electrical panels and disconnect switches in or near your laboratory so that
power can be quickly shut down in the event of a fire or electrical accident.
3. Report any damages to equipment, hazards, and potential hazards to the laboratory instructor/staff
available at the time.
4. If in doubt about electrical safety, see the laboratory instructor.
5. Make sure that the computers should be properly logged off when you complete your lab task.
6. Make sure that the software used in Lab is properly handled.
7. During any problem regarding software consult the Lab instructor/staff available.
8. Do not eat food, drink beverages or chew gum in the laboratory and do not use laboratory
glassware as containers for food or beverages. Smoking is strictly prohibited in lab area.
9. Do not plug in a flash drive on lab computers.
10. Do not upload, delete or alter any software on the lab PC.

|EEE 351 | Principles of Communication Systems Lab Manual v


|EEE 351 | Principles of Communication Systems Lab Manual vi
Table of Contents
Revision History ............................................................................................................................................................i

Preface ..........................................................................................................................................................................ii

Books ........................................................................................................................................................................... iii

Learning Outcomes ..................................................................................................................................................... iii

CLOs – PLOs Mapping ................................................................................................................................................... iii

Lab CLOs – Lab Experiment Mapping ............................................................................................................................ iv

Grading Policy ............................................................................................................................................................. iv

List of Equipment ........................................................................................................................................................ iv

Software Resources ..................................................................................................................................................... iv

Lab Instructions ........................................................................................................................................................... v

Lab Report Instructions ............................................................................................................................................... v

Safety Instructions ........................................................................................................................................................ v

LAB # 1 .......................................................................................................................................................................10

To Sketch Frequency Domain Representation of Signals for Analysis of Communication Systems Using MATLAB
....................................................................................................................................................................................10
Objectives ....................................................................................................................................................................... 10
Pre-Lab ........................................................................................................................................................................... 10
In-Lab Tasks .................................................................................................................................................................... 11
Lab Assessment .............................................................................................................................................................. 19

LAB # 2 .......................................................................................................................................................................20

To Construct a Modulator for Amplitude Modeling in Analog Communication Systems Using Discrete
Components ................................................................................................................................................................20
Objectives ....................................................................................................................................................................... 20
Pre-Lab ........................................................................................................................................................................... 20
In-Lab Tasks .................................................................................................................................................................... 23
Assessment ..................................................................................................................................................................... 24

LAB # 3 .......................................................................................................................................................................25

To Construct an Envelope Detector Using Discrete Components for Demodulation in Analog Communication
Systems .......................................................................................................................................................................25
Objectives ....................................................................................................................................................................... 25
Pre-Lab ............................................................................................................................................................................ 25
In-Lab Tasks .................................................................................................................................................................... 27
Lab Assessment .............................................................................................................................................................. 31

|EEE 351 | Principles of Communication Systems Lab Manual vii


LAB # 4 .......................................................................................................................................................................32

To Assemble a Modem for Single Side Band Amplitude Modulation Using TIMS Trainer for Analog
Communication Systems ............................................................................................................................................32
Objectives ....................................................................................................................................................................... 32
Pre-Lab ............................................................................................................................................................................ 32
In-Lab Tasks .................................................................................................................................................................... 33
Lab Assessment .............................................................................................................................................................. 36

LAB # 5 .......................................................................................................................................................................37

To Assemble a Modem for Quadrature Amplitude Modulation using TIMS Trainer for Analog Communication
Systems .......................................................................................................................................................................37
Objectives ....................................................................................................................................................................... 37
Pre-Lab ............................................................................................................................................................................ 37
In-Lab Tasks .................................................................................................................................................................... 38
Lab Assessment .............................................................................................................................................................. 41

LAB # 6 .......................................................................................................................................................................42

To Assemble Phase Locked Loop (PLL) using TIMS Trainer for Phase Detection in Analog Communication
Systems .......................................................................................................................................................................42
Objectives ....................................................................................................................................................................... 42
Pre-Lab ............................................................................................................................................................................ 42
In-Lab Tasks .................................................................................................................................................................... 47
Lab Assessment .............................................................................................................................................................. 49

LAB # 7 .......................................................................................................................................................................50

To Construct Frequency Modulator using Discrete Components for Analog Communication Systems ..................50
Objectives ....................................................................................................................................................................... 50
In-Lab Tasks .................................................................................................................................................................... 50
Lab Assessment .............................................................................................................................................................. 53

LAB # 8 .......................................................................................................................................................................54

To Display Sampling of Analog Signals for Digitization using Discrete Components and MATLAB ......................54
Objectives ....................................................................................................................................................................... 54
Pre-Lab ............................................................................................................................................................................ 54
In-Lab Tasks .................................................................................................................................................................... 55
Lab Assessment .............................................................................................................................................................. 59

LAB # 9 .......................................................................................................................................................................60

To Display Various Line Coding Schemes for Pulse Code Modulation using TIMS Trainer ...................................60
Objectives ....................................................................................................................................................................... 60
Pre-Lab ............................................................................................................................................................................ 60
In-Lab Tasks .................................................................................................................................................................... 63
Lab Assessment .............................................................................................................................................................. 65

LAB # 10 .....................................................................................................................................................................66

|EEE 351 | Principles of Communication Systems Lab Manual viii


To Assemble an Encoder for Pulse Code Modulation (PCM) using TIMS Trainer .................................................66
Objectives ....................................................................................................................................................................... 66
Pre-Lab ............................................................................................................................................................................ 66
Lab Tasks ......................................................................................................................................................................... 67
Lab Assessment .............................................................................................................................................................. 71

LAB # 11 .....................................................................................................................................................................72

To Assemble Decoder for Pulse Code Modulation (PCM) using TIMS Trainer .......................................................72
Objectives ....................................................................................................................................................................... 72
Pre-Lab ............................................................................................................................................................................ 72
Lab Tasks ......................................................................................................................................................................... 73
Lab Assessment .............................................................................................................................................................. 75

LAB # 12 .....................................................................................................................................................................76

To Construct a Modem Based on Amplitude Shift Keying using Discrete Components for Digital Communication
Systems .......................................................................................................................................................................76
Objectives ....................................................................................................................................................................... 76
Pre-Lab ............................................................................................................................................................................ 76
Lab Tasks ......................................................................................................................................................................... 78
Lab Assessment .............................................................................................................................................................. 81

LAB # 13 .....................................................................................................................................................................82

To Construct Modem Based on Frequency Shift Keying using Discrete Components for Digital Communication
Systems .......................................................................................................................................................................82
Objectives ....................................................................................................................................................................... 82
Pre-Lab ............................................................................................................................................................................ 82
Lab Tasks ......................................................................................................................................................................... 84
Lab Assessment .............................................................................................................................................................. 87

LAB # 14 .....................................................................................................................................................................88

To Construct Modem Based on Binary Phase Shift Keying using Discrete Components for Digital Communication
Systems .......................................................................................................................................................................88
Objectives ....................................................................................................................................................................... 88
Pre-Lab ............................................................................................................................................................................ 88
Lab Tasks ......................................................................................................................................................................... 90
Lab Assessment .............................................................................................................................................................. 93

|EEE 351 | Principles of Communication Systems Lab Manual ix


Lab Experiment | 1

LAB # 1
To Sketch Frequency Domain Representation of Signals for Analysis of
Communication Systems Using MATLAB
Objectives

 To display magnitude and phase response of Fourier series coefficients using MATLAB for
visualization of signals in communication systems

Pre-Lab
Read this experiment in its entirety to become familiar with objectives of this lab. Study in detail and
become familiar with the fundamentals of Fourier series and discrete time Fourier transform. The
instructor may provide the class some time to reflect upon these before proceeding with the lab.

Fourier Series
In mathematics, a Fourier series decomposed periodic functions or periodic signals into the sum of a
(possibly infinite) set of simple oscillating functions, namely sine’s and cosines (or complex
exponentials). The study of Fourier series is a branch of Fourier analysis.
Using Euler’s equation, we can convert the standard Rectangular Fourier Series into an exponential
form. Even though complex numbers are a little more complicated to comprehend, we use this form
for many reasons:
 Only need to perform one integration
 A single exponential can be manipulated more easily than a sum of sinusoids
 It provides a logical transition into a further discussion of the Fourier Transform

Tasks

1. The periodic signal 𝑥(𝑡) is defined in one period as 𝑥(𝑡) = 𝑡𝑒 −𝑡 , 0 ≤ 𝑡 ≤ 6 . Plot the
approximate signals in 4 periods in time using 81 terms of the complex exponential and
trigonometric forms of Fourier series. For comparison reasons, plot the original signal 𝑥(𝑡)
over the same time interval.
2. The periodic signal in one period is given by:
1, 0 ≤ 𝑡 ≤ 1
𝑥(𝑡) = {
0 1≤𝑡≤2
Plot in one period the approximate signals using 41 and 201 terms of the complex exponential
Fourier series. Furthermore, each time plot the complex exponential coefficients.

|EEE 351 | Principles of Communication Systems Lab Manual 10


Lab Experiment | 1

In-Lab Tasks

Task 1
1. Evaluate the Fourier series coefficients using:

Plot the magnitude |Dn| (in volts) and phase ∠Dn (in degrees0 of the first twenty-one
coefficients, Let {n = -10,……..0,…….10} versus frequency (in rad/sec).
2. Plot two periods of g(t) directly i.e. by creating a vector of samples of g(t) and plotting that
vector.
3. Plot an approximation to g(t) using these first twenty-one terms of the exponential Fourier
series.

Make a function file sinc1.m using the following code listing.

Listing 1.1: Sinc function

function y = sinc1(x) % sinc function implementation


k = length(x)
for i = 1:k
if x(i) == 0
y(i) = 1
else
y(i) = sin(x(i))/x(i)
end
end
end

Sketch the plot for listing 1.1

|EEE 351 | Principles of Communication Systems Lab Manual 11


Lab Experiment | 1

Task 2
Magnitude and Phase of Fourier Series Coefficients
Write the following code in MATLAB and run it.

Listing 1.2: Magnitude and Phase Response


n = [-10:10];
z = n*(pi/4)
Dn = 0.25*exp(-1*z).*sinc 1(z);
magDn = abs (Dn) ;
argDn = angle (Dn) *(180/ pi ) ;
w = 0.5*n ;
stem(w,magDn) , xlabel( ' Frequency in rad/ s e c ( units of pi ) ' )
grid
title( 'Magnitude o f the Exponential Fourier series coefficients' )
stem(w, argDn ) , xlabel( ' Frequency in rad/ s e c ( units of pi ) ' )
ylabel( ' degrees ' )
grid
title( ' Phase of the Exponential Fourier series coefficients')
Sketch the Plot for listing 1.2

|EEE 351 | Principles of Communication Systems Lab Manual 12


Lab Experiment | 1

Task 3
Sum of Fourier Series Coefficients
The signal g(t) can be reconstructed by adding the Fourier coefficients. To verify this, we find the
sum given by:

The following code in Listing 1.3 is used to find the sum in (1.2). The output is shown in Figure 1.1.

Listing 1.3: Approximation of g(t)


n = [-10:10];
z = n*(pi/4)
Dn = 0.25*exp(-1*z).*sinc 1(z);
nwo = n*(pi/2);
t = [0: 0.01: 8]
BIG = nwo.*t;
g = Dn*exp(i*BIG)
w = 0.5*n ;
plot(t, real(g)),
grid
xlabel( ' second ' )
title( 'Approximation to g(t) suing the first ten components of the Fourier series')

Figure 1.1: Approximation to g(t) using the First Ten Components of the Fourier Series

|EEE 351 | Principles of Communication Systems Lab Manual 13


Lab Experiment | 1

We can approximate g(t) using the first ten components of the Fourier series. The following code is
used to generate two periods of function g(t). it uses a customized unit step function, u(t), a copy of
which is also provided below. The ability to use the unit step function to write piecewise functions
proves extremely effective. Below is code listing.
Listing 1.4: g(t) using unit step

gt = (u(t)-u(t-1)) + (u(t-4) -u(t-5)) + u(t-8);


plot(t, gt),
grid
xlabel( ' second ' )
title(‘The real g(t)’)
axis ([0.8 -0.2 1.2])
Listing 1.5: u(t) implementation

function[y] = u(x)
y = 0.5+0.5*sign(x)
end

Sketch the Plot for listing 1.4 & 1.5

|EEE 351 | Principles of Communication Systems Lab Manual 14


Lab Experiment | 1

Discrete Fourier Transform (DFT)


Introduction
In mathematics, the DFT is a specific kind of discrete transform, used in Fourier analysis. It
transforms one function into another, which is called the frequency domain representation of the
original function (which is often a function in the time domain).
The DFT requires an input function that is discrete. Such inputs are often created by sampling a
continuous function, such as a person’s voice. The discrete input function must also have a limited
(finite) duration, such as one period of a periodic sequence or a windowed segment of a longer
sequence.
Discrete Fourier Transform (DFT) decomposes a sequence of values into components of different
frequencies. This operation is useful in many fields but computing it directly from the definition is
often too slow to be practical. An FFT is a way to compute the same result more quickly, computing
a DFT of N points using the definition, takes O(N2) arithmetical operations, while an FFT can
compute of the same results in only O(N log N) operations.
The difference in speed can be substantial, especially for long data sets where N may be in the
thousands, the computation time can be reduced by several orders of magnitude in such cases. This
huge improvement made many DFT based algorithms practical. FFTs are of great importance to a
wide variety of applications, from digital signal processing and solving partial differential equations
to algorithms for quick multiplication of large integers.
In particular, the DFT is widely employed in signal processing and related fields to analyze the
frequencies contained in a sampled signal, to solve partial differential equations, and to perform
other operations such as convolutions or multiplying large integers. A key enabling factor for these
applications is the fact the DFT can be computed efficiently in practice using a Fast Fourier
Transform (FFT) algorithm.

Task 4
Plotting the Signal
This is the code segment for plotting the signal g(t). vector g contains samples of function g(t), which
is formed by concatenating three individual vectors g1, g2 and g3. The result in Figure 2 shows the
plot of g(t) signal.
Listing 2.1: Plotting signal g(t)
g1 = [0:1/32:1-(1/32) ] ;
g2 = [ -1:1/32:1-(1/32) ] ;
g3 = [ -1:1/32:0-(1/32) ] ;
g = [ g1 , g2 , g3 ] ;

|EEE 351 | Principles of Communication Systems Lab Manual 15


Lab Experiment | 1

t = [ -1:1/64:1-(1/64) ] ;
plot( t , g ) ;
axis( [ -1.5 1.5 -1.5 1.5 ] )
grid

Task 5
Discrete Fourier Series using FFT
Using the following code, we get the Fourier series coefficients.

Listing 2.2: FFT of g(t)


z = fft( g ) ;
stem( t , z ) ;

If we plot this calculated fft what we get is an arrangement of those total 128 coefficients one by one
i.e. they are not arranged as a normal Fourier series spectrum. FFTSHIFT command helps us o reach
there. We will get a plot using FFTSHIFT command such as DC component is at the center, and plot
gets the shape of a normal Fourier Series plot.

Listing 2.3: FFT of g(t)


z1 = fftshift( z ) ;
n=[1:1:128];
a = n-65;
f = 0.5* a ;
stem( f : abs ( z1 ) )

Figure 1.2: Plot using the MATLAB Function FFTSHIFT

|EEE 351 | Principles of Communication Systems Lab Manual 16


Lab Experiment | 1

COMMENTS
 FFT function plot the Fourier series but with DC component.
 FFTSHIFT shifts the DC component to the center of spectrum.
 Magnitude of the Fourier series is plotted against frequency to remove the complex part from
the Fourier series.

Task 6
1. Write MATLAB code to get the spectrum of g(t) and also sketch the output.
2. Write MATAB code to get the magnitude and phase of g(t).

|EEE 351 | Principles of Communication Systems Lab Manual 17


Lab Experiment | 1

Task 7
Consider the signal in Figure 1.3:
1. Plot the signal in MATLAB for two periods of time.
2. Find its Fourier series and plot it. The plot should have DC component at the center.

Figure 1.3: Example Plot for the Signal

|EEE 351 | Principles of Communication Systems Lab Manual 18


Lab Experiment | 1

Lab Assessment

Pre-Lab /1

Performance /3

Results /2
/10
Viva /2

Lab Report /2

Instructor Signature and Comments:

|EEE 351 | Principles of Communication Systems Lab Manual 19


Lab Experiment | 2

LAB # 2
To Construct a Modulator for Amplitude Modeling in Analog Communication
Systems Using Discrete Components
Objectives

 To construct amplitude modulator and observed output signals using various discrete
components

Equipment Required
Resistors, Capacitors, Oscilloscope, Multimeter, Regulated Power Supply, Function Generators,
Breadboard and Connecting Wires.

Pre-Lab
Read this experiment in its entirety to become familiar with objectives of this lab. Study in detail and
become familiar with the fundamentals of Amplitude Modulation and Double Side Band Suppressed
Carrier modulation. The instructor may provide the class some time to reflect upon these before
proceeding with the lab.
Introduction
An amplitude modulated signal is defined as:
𝐴𝑀 = (𝐴 + 𝑚(𝑡)) cos 𝜔𝑡 … … … … 1
= 𝑚(𝑡)𝑐𝑜𝑠𝜔𝑡 + 𝐴𝑐𝑜𝑠𝜔𝑡 … … … . .2
= [𝑙𝑜𝑤 𝑓𝑟𝑒𝑞𝑢𝑒𝑛𝑐𝑦 𝑡𝑒𝑟𝑚 𝑚(𝑡)] 𝑥 [ℎ𝑖𝑔ℎ 𝑓𝑟𝑒𝑞𝑢𝑒𝑛𝑐𝑦 𝑡𝑒𝑟𝑚 𝑐(𝑡)] … … . . 3
Here:
‘A’ is the DC value. For modelling convenience equation 1 has been written into two parts in
equation 2.
Block Diagram
Equation 1 can be represented by the block diagram of Figure 2.1.

Figure 2.1: Block Diagram of AM

|EEE 351 | Principles of Communication Systems Lab Manual 20


Lab Experiment | 2

To make 100% amplitude modulated signal adjust the ADDER output voltages independently to +1
volt DC and 1 volt peak of the sinusoidal message. Figure 2.2 illustrates what the oscilloscope will
show.
The depth of modulation ‘m’ can be measured either by taking the ratio of the amplitude of the AC
and DC terms at the ADDER output, or applying the formula:

𝑚 = (𝑃 − 𝑄)/(𝑃 + 𝑄)

Figure 2.2: AM, with A = 1, as Seen on the Oscilloscope

Figure 2.3: The Oscilloscope Display for the Case A = 1.5

Where, P and Q are the peak-to-peak and trough-to-trough amplitudes respectively of the AM
waveform of Figure 2.3. Note that Q = 0 for the case m=1. To vary the depth of modulation, use the
G gain control of the ADDER. Notice that the ‘envelope’, or routine shape, of the AM signal of
Figure 2.3 is the same as that of the message provided that m ≤ 1.

|EEE 351 | Principles of Communication Systems Lab Manual 21


Lab Experiment | 2

The envelope of the AM signal is defined as |a(t)|. When m ≤ 1 the envelope shape and the message
shape are the same. When m > 1 the envelope is still defined as |a(t)|, but it is no longer the same
shape as the message. Note that equation 4 is still applicable- the trough is interpreted as being
negative.
Significance of A
First note that the shape of the outline, or envelope, of the AM waveform (lower trace), is exactly
that of the message waveform (upper trace). As mentioned earlier, the message includes a DC
component, although this is often ignored or forgotten when making these comparisons. You can
shift the upper trace down so that it matches the envelope of the Am signal on the other trace. Now
examine the effect of varying the magnitude of the parameter ‘m’. This is done by varying the
message amplitude with the ADDER gain control G.

Figure 2.4: Amplitude Modulation Model Graph

|EEE 351 | Principles of Communication Systems Lab Manual 22


Lab Experiment | 2

In-Lab Tasks

Lab Task 1: Generation of AM using Discrete Components


Generate AM signal using discrete components as shown is Figure 2.5.

Figure 2.5: Circuit Diagram

Lab Task 2: MATLAB Exercises

1. Write the MATLAB code and verify the results of the performed experiment. Draw its
Simulink diagram as well.
2. Use MATLAB to generate and display an AM wave for 100% modulation, under
modulation and over modulation.
Carrier frequency, Fc = 5KHz
Amplitude of Carrier frequency, Ac = 9

|EEE 351 | Principles of Communication Systems Lab Manual 23


Lab Experiment | 2

Assessment

Pre-Lab /1

Performance /3

Results /2
/10
Viva /2

Lab Report /2

Instructor Signature and Comments:

|EEE 351 | Principles of Communication Systems Lab Manual 24


Lab Experiment | 3

LAB # 3
To Construct an Envelope Detector Using Discrete Components for
Demodulation in Analog Communication Systems
Objectives

 To assemble an envelope detector using TIMS trainer for demodulation of amplitude


modulated signals.
 To construct envelope detector using discrete components for demodulation of amplitude
modulated signals.
 To sketch the recovered message signal with envelope detector using MATLAB for
demodulation of amplitude modulated signals.

Pre-Lab
Read this experiment in its entirety to become familiar with objectives of this lab. Study in detail and
become familiar with the fundamentals of Amplitude Modulation and demodulation. Further, also
become aware of the envelope detection techniques. The instructor may provide the class some time
to reflect upon these before proceeding with the lab.
Introduction

Envelopes
When we talk of the envelopes of signals we are concerned with the appearance of signals in the
time domain. Text books are full of drawings of modulated signals, and you already have an idea of
what the term ‘envelope’ means. It will now be given a more formal definition.
Qualitatively, the envelope of a signal y(t) is that boundary within which the signal is contained,
when views in the time domain. It is an imaginary line.
This boundary has an upper and lower part. You will see these are mirror images of each other. In
practice, when speaking of the envelope, it is customary to consider only one of them as ‘the
envelope’ (typically the upper boundary).
Although the envelope is imaginary in the sense described above, it is possible to generate, from
y(t), a signal e(t), having the same shape as this imaginary line. The circuit which does this is
commonly called an envelope detector.

|EEE 351 | Principles of Communication Systems Lab Manual 25


Lab Experiment | 3

The Diode Detector


The ubiquitous diode detector is the prime example of an envelope generator. It is well documented
in most textbooks on analog modulation. It is synonymous with the term ‘envelope demodulator’ in
the context. But remember, the diode detector is an approximation to the ideal. We will first
examine the ideal circuit.

The Ideal Envelope Detector


The ideal envelope detector is a circuit which takes the absolute value of its input, and then passes
the result through a lowpass filter. The output from this lowpass filter is the required envelope
signal. See Figure 3.1.

Figure 3.1: The Ideal Envelope Recovery Arrangement

The truth of the above statement will be tested for some extreme cases in the work to follow, you can
then make your own conclusions as to its veracity.
The absolute value operation, being non-linear, must generate some new frequency components.
Among them are those of the wanted envelope. Presumably, since the arrangement actually works,
the unwanted components lie above those wanted components of the envelope.
It is the purpose of the lowpass filter to separate the wanted from the unwanted components
generated by the absolute value operation.
The analysis of the ideal envelope recovery circuit, for the case of a general input signal, is not a
trivial mathematical exercise, the operation being non-linear. So, it is not easy to define beforehand
where the unwanted components lie.

|EEE 351 | Principles of Communication Systems Lab Manual 26


Lab Experiment | 3

In-Lab Tasks

Lab Task 1: Generation of AM using TIMS


Implement this hardware model on TIMS and observe the output.

Figure 3.2: TIMS Model for AM Generation

Lab Task 2: Envelope Detection Using TIMS


The Ideal Model:
The TIMS model of the ideal envelope detector is shown in block diagram form in Figure 3.3.

Figure 3.3: Modelling the Ideal Envelope Detector with TIMS

The ‘ideal rectifier’ is easy to build, does in fact approach the ideal for our purpose, and one is
available as the RECTIFIER in the TIMS UTILITIES module. For purposes of comparison, a diode
detector, in the form of ‘DIODE+LPF’, is also available in the same module; this will be examined
later.

|EEE 351 | Principles of Communication Systems Lab Manual 27


Lab Experiment | 3

The desirable characteristics of the lowpass filter will depend upon the frequency components in the
envelope of the signal as already discussed.
We can easily check the performance of the ideal envelope detector in the laboratory, by testing it on
a variety of signals.
The actual envelope shape of each signal can be displayed by observing the modulated signal itself
with the oscilloscope, suitably triggered.

AM Envelope:
For this part of the experiment we will use the generator of Figure 3.4 and connect its output to the
envelope detector of Figure 2.

Figure 3.4: Generator for AM and DSBSC

T1 plug in the TUNEABLE LPF module. Set it to widest bandwidth, which is about 12 kHz (front
panel toggle witch to WIDE, and TUNE control fully clockwise). Adjust its passband gain to about
unity. To do this you can use a test signal from the ADUIO OSCILLATOR, or perhaps the 2 kHz
message from the MASTER SIGNALS module.

Figure 3.5: Modulated Signal Generator and Envelope Recovery

|EEE 351 | Principles of Communication Systems Lab Manual 28


Lab Experiment | 3

T2 model the generator of Figure above and connect its output to an ideal envelope detector. For the
lowpass filter use the TUNEABLE LPF module. Your whole system might look like that shown
modeled in Figure 3.5.
T3 set the frequency of the AUDIO OSCILLATOR to about 1 kHz. This is your message. T4 adjust
the triggering and sweep speed of the oscilloscope to display two periods of the message (CH2-A).
T5 adjust the generator to produce an AM signal, with a depth of modulation less than 100%. Don’t
forget to so adjust the ADDER gains that its output (DC + AC) will not overload the MULTIPLIER;
that is, keep the MULTIPLIER input within the bounds of the TIMS ANALOG REFERENCE
LEVEL (4 volt peak-to-peak). This signal is not symmetrical about zero volts; neither excursion
should exceed the 2 volt peak level. T6 for the case m < 1 observe that the output from the filter (the
ideal envelope detector output) is the same shape as the envelope of the AM signal a sine wave.

Lab Task 3: Envelope Detection Using Envelope Detector

 Generate AM signal (D1, D2, R2, C1, L1) with modulation index less than 1 i.e. µ < 1.
 Build the envelope detector (D2, C2 and R3) as shown in Figure 3.6 below.
 Display the demodulated output of the envelope detector on the oscilloscope.
 Compare the message signal to the demodulated signal on the oscilloscope.
 Draw the message, modulated and the demodulated signal on the next page.
 Investigate the effect of variation of varying the message frequency and modulation index.

(a)

|EEE 351 | Principles of Communication Systems Lab Manual 29


Lab Experiment | 3

(b)

Figure 3.6: (a) Envelope Detector Circuit Diagram (b) Circuit Diagram for Amplitude Modulation with Envelope Detector

Lab Task 4: MATLAB EXCERCISE


1. Write the MATLAB code of the performed experiment to verify the results. Draw its
Simulink diagram as well.
2. Use MATLAB to generate and display an AM wave for 100% modulation, under
modulation and over modulation. Also write the code to demodulate the signals.
Carrier frequency, Fc = 5KHz
Amplitude of Carrier frequency, Ac = 9

|EEE 351 | Principles of Communication Systems Lab Manual 30


Lab Experiment | 3

Lab Assessment

Pre-Lab /1

Performance /3

Results /2
/10
Viva /2

Lab Report /2

Instructor Signature and Comments:

|EEE 351 | Principles of Communication Systems Lab Manual 31


Lab Experiment | 4

LAB # 4
To Assemble a Modem for Single Side Band Amplitude Modulation Using TIMS
Trainer for Analog Communication Systems
Objectives

 To assemble a modulator and demodulator using TIMS trainer for single side band amplitude
modulation
 To sketch the single side band amplitude modulated signal using MATLAB for amplitude modulation

Equipment Required
Adder, Audio Oscillator, Multiplier, Phase Shifter, Quadrature Phase Splitter, Voltage Controlled
Oscillator

Pre-Lab
Read this experiment in its entirety to become familiar with objectives of this lab. Study in detail and
become familiar with the fundamentals Double Side Band and Single Side Band Amplitude
Modulation. The instructor may provide the class some time to reflect upon these before proceeding
with the lab.

Introduction
The method of sideband removal is to make two DSDSC signals, identical in all respects, except for
their relative phasing. If this is suitably arranged the two DSBSC can be added, whereupon the two
upper sidebands (say) cancel whilst the two lower add. An arrangement for achieving this is
illustrated in Figure 4.1.

Figure 4.1: SSB Generation using the Phasing Method

The block labelled ‘QPS’ is a quadrature phase splitter. This produces two output signals, I and Q,
from a single input. These two are in phase quadrature. In the position shown in the diagram, it will

|EEE 351 | Principles of Communication Systems Lab Manual 32


Lab Experiment | 4

be clear that this phase relationship must be maintained over the bandwidth of the message. So, it is a
wideband phase splitter.
There is another phase shifter in the diagram, but this works at one frequency only – that of the
carrier. Wideband phase shifters (Hilbert transformers) are difficult to design. The phase splitter is a
compromise. Although it maintains a (relatively) constant phase difference of 90 between its two
outputs, there is a variable (with frequency) phase shift between both output and the common input.
This is acceptable for speech signals (speech quality and recognition are not affected by phase
errors) but not good for phase-sensitive data transmission.

In-Lab Tasks
Lab Task 1: SSB Modulation

Figure 4.2: The SSB Phasing Generator Model

To align this generator, it is a simple matter to observe first the ‘upper’ DSBSC (upper in the sense
of the ADDER inputs), and then the lower. Adjust each one separately (by removing the appropriate
patch lead from the ADDER input) to have the same output amplitudes (say 4 volts peak-to-peak).
Then replace both ADDER inputs and watch the ADDER outputs as the PHASE SHIFTER is
adjusted. The desired output is a single sine wave, so adjust for a flat envelope. A fine trim of one
or other of the ADDER gain controls will probably necessary.
The gain and phase adjustments are non-interactive. The magnitude of the remaining envelope will
indicate, and can be used analytically, to determine the ratio of wanted to unwanted sideband in the
|EEE 351 | Principles of Communication Systems Lab Manual 33
Lab Experiment | 4

output. This will not be infinite. The QPS, which cannot be adjusted, will set the ultimate
performance of the system. Which sideband has been produced? This can be predicted analytically
by measuring the relative phases of all signals. Alternatively, measure it! Demonstrate your
knowledge of the system by re-adjusting it to produce the opposite sideband.

Lab Task 2: SSB Demodulation


An SSB signal can be demodulated with a product demodulator. But a product demodulator is not a
SSB demodulator in the strict sense. A true demodulator can distinguish between a lower sideband
and an upper sideband. This experiment investigates the phasing type demodulator, block diagram of
which is shown in Figure 4.3. it would be helpful, though not essential, that the lab sheet entitled
SSB generation has been completed.

Figure 4.3: Model of Phasing-Type SSB Demodulator

An SSB received signal is required. If such a signal were derived from a single tone message and
based on a 100 kHz (suppressed) carrier, it can be simulated by a single sine wave either just above
or just below 100 kHz. This can be obtained from a VCO.

After patching up the model it is necessary to align it. With an input signal (VCO) at say, 102 kHz
(simulating an upper sideband):
 Examine the waveforms throughout the mode. Most will be unfamiliar.
 Use the oscilloscope to set the phase shift through the PHASE SHIFTER to about 90.
 With only one input at a time into the ADDER, set its output to say 2 volt peak-to-peak.
|EEE 351 | Principles of Communication Systems Lab Manual 34
Lab Experiment | 4

 Connect both inputs to the ADDER. Minimize the output from the LPF by alternately.

Adjusting the PHASE SHIFTER and one ADDER gain control (why not maximize the ADDER
output in the above procedure?). the above procedure used an upper sideband for alignment. It is
now set to receive the lower sideband of a 100 kHz carrier. Verify this by tuning the VCO to the
region of the lower sideband. Alternatively, institute whatever change you think is necessary to swap
from one sideband reception to the other. Conversion of the summer from an ADDER to a
SUBTRACTOR would do it (insert a BUFFER AMPLIFIER), which acts as an inverter, into one
path to the ADDER); what other methods are there? Notice that by removing one input from the
ADDER you have a DSBSC receiver. Observe that it will still demodulate the simulated SSB.

Lab Task 3: MATLAB EXCERCISE


1. Write the MATLAB code of the performed experiment to verify the results. Draw its
Simulink diagram as well.

|EEE 351 | Principles of Communication Systems Lab Manual 35


Lab Experiment | 4

Lab Assessment

Pre-Lab /1

Performance /3

Results /2
/10
Viva /2

Lab Report /2

Instructor Signature and Comments:

|EEE 351 | Principles of Communication Systems Lab Manual 36


Lab Experiment | 5

LAB # 5
To Assemble a Modem for Quadrature Amplitude Modulation using TIMS
Trainer for Analog Communication Systems
Objectives

 To assemble a modulator and demodulator using TIMS trainer for quadrature amplitude
modulation
 To sketch the quadrature amplitude modulated signal using MATLAB for amplitude
modulation

Equipment Required
TIMS modules of Multiplier, Phase Shifter, Adder and Audio Oscillator

Pre-Lab
Read this experiment in its entirety to become familiar with objectives of this lab. Study in detail and
become familiar with the fundamentals of Quadrature Amplitude Modulation and Demodulation.
The instructor may provide the class some time to reflect upon these before proceeding with the lab.

Introduction
There are two messages A and B. whilst these are typically independent when they are analog; it is
common practice for them to be intimately related for the case of digital messages. In the former case
the modulator is often called a quadrature amplitude modulator (QAM), whereas in the later it is
often called a Quadrature Phase Shift Keyed (QPSK) modulator.

Figure 5.1: QAM Modulator

This lab sheet investigated an analog application of the modulator. The system is then described as a
pair of identical double sideband suppressed carrier (DSBSC) generators, with their outputs added.
Their common carriers come from the same source but are in phase quadrature. The two DSBSC are
overlaid in frequency but can be separated (by a suitable receiver) because of this phase difference.
|EEE 351 | Principles of Communication Systems Lab Manual 37
Lab Experiment | 5

Note that the two paths into the ADDER are labelled ‘I’ and ‘Q’. This refers to the phasing of the
DSBSC in phase and quadrature.
Please complete the lab sheet entitled QAM-generation, which describes the generation of a
quadrature amplitude modulated signal with two, independent, analog messages. That generator is
required for this experiment, as it provides an input to a QAM demodulator. A QAM demodulator is
depicted in block diagram form in Figure 5.1. In this experiment only, the principle of separately
recovering either message A or message B from the QAM is demonstrated. Only one half of the
demodulator need to be constructed.

Figure 5.2: QAM Demodulator

Such a simplified demodulator is shown in the block diagram of Figure 5.2. This is the structure you
will be modelling. By appropriate adjustment of the phase, either message A or message B can be
recovered.

In-Lab Tasks
Lab Task 1: QAM Modulation
Figure 5.3 shows a model of the block diagram of a QAM modulator, show in Figure 5.1.

Figure 5.3: QAM Generation Block Diagram

|EEE 351 | Principles of Communication Systems Lab Manual 38


Lab Experiment | 5

The 100 kHz quadrature carriers come from the MASTER SIGNALS module. Note that these do not
need to be in precise quadrature relationship; errors of a few degrees make negligible difference to
the performance of the system as a whole-transmitter, channel and receiver. It is at the demodulator
that precision is required-here it is necessary that the local carriers match exactly the phase
difference at the transmitter.
The two independent analog messages come from an AUDIO Oscillator and the MASTER
SIGNALS module (2 kHz).
Setting up is simple. Choose a frequency in the range say 300 to 3000 Hz for the AUDIO Oscillator
(message ‘A’). Confirm there are DSBSC at the output of each MULTIPLIER. Adjust their
amplitudes to be equal at the output of the ADDER, by using the ADDER gain controls (remove the
‘A’ input when adjusting ‘g’ and the ‘B’ input when adjusting ‘G’). Since the QAM signal will (in
later experiments) be the input to an analog channel, its amplitude should be at about the TIMS
ANALOG REFERENCE LEVEL of 4 volt peak-to-peak.
What is the relationship between the peak amplitude of each DSBSC at the ADDER output, and their
sum?
To what should the oscilloscope be triggered when examining the QAM? Is the QAM of a
‘recognizable’ shape? For the case when each message could lie anywhere in the range 300 to 3000
Hz, what bandwidth would be required for the transmission of the QAM?

Lab Task 2: QAM Demodulation


Set up the transmitter according to the plan adopted in the lab sheet entitled QAM generation.
Synchronize the oscilloscope to, and observe, say, the ‘A’ message, on CH1-A. A model of the block
diagram of Figure 5.2, which is a demodulator, or receiver, is shown in Figure 5.4.

Figure 5.4: Channel A or B Demodulator

|EEE 351 | Principles of Communication Systems Lab Manual 39


Lab Experiment | 5

The 100 kHz carrier (sin(ωt) or cos(ωt)) comes from MASTER SIGNALS. This is a ‘stolen’ carrier.
In commercial practice the carrier information must be derived directly from the received signal.
Remember to set the on-board switch SW1 of the PHASE SHIFTER to the HI range.
The 3 kHz LPF in the HEADPHONE AMPLIFIER can be used if the messages are restricted to this
bandwidth. Observe the output from this filter with the oscilloscope on CH2-A. since message A is
already displayed on CH1-A, an immediate comparison can be made. Probably both messages will
be appearing at the filter output, although of different amplitudes. Being on different frequencies the
display will not be stationary.
Now slowly rotate the coarse control of the PHASE SHIFTER. The output waveform should slowly
approach the shape of the message A (if not, flip the 180-front panel toggle switch). Note that the
phase adjustment is not used to maximize the amplitude of the wanted message but to minimize the
amplitude of the unwanted message. Provided the phasing at the transmitter is anywhere near
quadrature there should always be a useful level of the wanted message. The magnitude of the
wanted waveform will be the maximum possible only when true quadrature phasing is achieved at
the transmitter. An error of 450 at the transmitter, after accurate adjustment at the receiver, results in
a degradation of 3 dB over what might have been achieved. This is a signal-to-noise ratio
degradation; the noise level is not affected by the carrier phasing.

Phase Vision Multiplex


The arrangement just examined has been called phase division multiplex- there are two channels
sharing the same frequency space. Separation-demultiplexing- is by virtue of their special phase
relationships.
To enable carrier acquisition from the received signal there needs to be a small ‘pilot’ carrier,
typically about 20 dB below the signal itself. A filter is used to separate this from the message
sidebands. TIMS can easily demonstrate such a system by using a Phase Locked Loop (PLL) as the
filtering element.

Lab Task 3: MATLAB EXCERCISE


1. Write the MATLAB code of the performed experiment to verify the results. Draw its
Simulink diagram as well.

|EEE 351 | Principles of Communication Systems Lab Manual 40


Lab Experiment | 5

Lab Assessment

Pre-Lab /1

Performance /3

Results /2
/10
Viva /2

Lab Report /2

Instructor Signature and Comments:

|EEE 351 | Principles of Communication Systems Lab Manual 41


Lab Experiment | 6

LAB # 6
To Assemble Phase Locked Loop (PLL) using TIMS Trainer for Phase Detection
in Analog Communication Systems
Objectives

 To construct and assemble phase lock loop using discrete components and TIMS trainer for
phase detection in analog communication systems

Pre-Lab
Read this experiment in its entirety to become familiar with objectives of this lab. Study in detail and
become familiar with the fundamentals of Phase Locked Loop. The instructor may provide the class
some time to reflect upon these before proceeding with the lab.

Introduction
Phase Locked Loop is a device which is used to track the phase and frequency of an incoming signal.
It uses a voltage-controlled oscillator (VCO), the output of which can be automatically synchronized
(‘locked’) to a periodic input signal. The locking property of the PLL has numerous applications in
communication systems (such as frequency, amplitude, or phase modulation/demodulation, analog
or digital) clock and data recovery, self-tunable filters, frequency synthesis etc.
Following Figure 6.1 represents the block diagram of PLL showing its basic function connected
together in a feedback loop.

Figure 6.1: Block Diagram of a Phase Locked Loop (PLL)

 Voltage-Controlled Oscillator (VCO)


 Phase Detector (PD)
 Low Pass Loop Filter (LPF)

|EEE 351 | Principles of Communication Systems Lab Manual 42


Lab Experiment | 6

VCO is an oscillator of the frequency of which fosc is proportional to input voltage Vo. The input
voltage to VCO determines the frequency fosc of the periodic signal Vosc at the output of the VCO.
Phase comparator is device that compares the phase of the output signal of VCO and the incoming
signal and produces a signal proportional to the phase difference between the incoming signal and
the VCO output signal. The output of the phase detector is filtered by a low pass loop filter. The loop
is closed by connecting the filter output to the input of the VCO. When the loop is locked on the
incoming signal Vi, the frequency of the VCO output fosc is exactly equal to the frequency fi of the
periodic signal Vi.
fosc = fi
The basic function of PLL is to maintain the frequency lock (fosc = fi) between the input and the
output signals even if the frequency fi of the incoming signal varies with time. Assuming that the
PLL is in the locked condition and then if the frequency fi of the incoming signal increases slightly,
the phase difference between the VCO signal and the incoming signal will begin to increase in time.
As a result, the filter output voltage Vo increases, and the VCO output frequency fosc increases until
it matches fi, thus keeping the PLL in the locked condition.

Figure 6.2: Steady-State Characteristics of the Basic PLL

The range of frequencies from fi=fmin to fi=fmax, where the locked PLL remains in the locked
condition is called the lock range the PLL. If the PLL is initially locked, and fi becomes smaller than
the fmin, or if fi exceeds fmax, the PLL is unlocked, the VCO oscillates at the frequency fo called the
subtitle center frequency, or the free-running frequency of the VCO. The lock can be established
again if the incoming signal frequency fi gets closed enough to fo. The range of frequencies fi = fo-fc

|EEE 351 | Principles of Communication Systems Lab Manual 43


Lab Experiment | 6

to fi = fo+fc such that the initially unlocked PLL becomes locked is called the capture range of
PLL. The lock range is wider than the capture range. So, if the VCO output frequencies fosc is
plotted against the incoming frequency fi, we obtain the PLL steady state characteristics shown in
Figure 6.2. the characteristics simply shows that fosc=fi in the locked condition, and that
fosc=fo=constant when PLL is unlocked. A hysteresis can be observed in the fosc(fi) characteristic
because the capture range is smaller than the lock range.

The 4046 Phase – Locked Loop IC


A diagram of the 4046 PLL is shown in the Figure 6.3. A single positive supply voltage is needed for
the chip. The positive supply voltage VDD is connected to pin 16 and the ground is connected to pin
8. In the lab we will use +VDD = +15V. The incoming signal Vi goes to the input of an internal
amplifier at the pin 14 of the chip. The internal amplifier has the input biased at abut +VDD/2.
Therefore, the incoming signal can be capacitive coupled to the input as shown in Figure 6.3. The
incoming ac signal Vi of about one-volt peak-to-peak is sufficient for proper operation. The output
Vi2 of the amplifier is internally connected to one of the inputs of the phase detector on the chip.

Phase Detector

Figure 6.3: CMOS 4046 PLL

The phase detector on the 4046 is simply an XOR logic gate as shown in Figure 6.3, where, with
logic low output (Vφ=0V) when the two inputs are both high and low and the logic high output
(Vφ=VDD) otherwise. Following figure shows the operation of the XOR phase detector when the
PLL is in the locked condition. Vi2 and Vosc are two phase-shifted periodic square-wave signals at

|EEE 351 | Principles of Communication Systems Lab Manual 44


Lab Experiment | 6

the same frequency fosc=fi and with 50 percent duty cycle. The output of the phase detector is a
periodic square wave signal Vφ(t) at the frequency 2fi, and with the duty ration Dφ that depends on
the phase difference between Vi and Vosc.
VDD = φ π

Figure 6.4: Operation of the Phase Detector with XOR Gate

The periodic signal Vφ(t) at the output of the XOR phase detector can be written as the Fourier
series:
𝑉𝜔(𝑡) = 𝑉𝑜 + 𝑋 𝑘 = 1 𝑉𝐾 sin((4𝑘𝜋𝑓𝑖)𝑡 − 𝜗𝑘)
Where Vo is the DC component of Vφ(t), and Vk is the amplitude of the kth harmonic at the
frequency 2kfi. The DC component of the phase detector output can be found easily as the average of
Vφ(t) over a period TI=2.
𝑉𝑜 = 𝑉𝐷𝐷𝜑𝜋
Loop Filter
The output Vφ(t) of the phase detector is filtered by an external low-pass filter. In Figure 6.3, the
loop filter is a simple passive RC filter. The purpose of the low-pass filter is to pass the dc and low-
frequency portions of Vφ(t) and to attenuate high-frequency ac component at frequencies 2kfi. The
simple RC filter has the cut-off frequency:
𝑓𝑝 = 12𝜋𝑅𝐶
The cut-off frequency should be smaller than the input frequency for the output of the filter to be
approximately equal to Vo. Vo is proportional to the phase difference between the incoming signal Vi
and the signal Vosc from the VCO and the constant of proportionality,
𝐾𝐷 = 𝑉𝐷𝐷 𝑝𝑖

|EEE 351 | Principles of Communication Systems Lab Manual 45


Lab Experiment | 6

is called the gain or the sensitivity of the phase detector. This expression is valid for 0 ≤ 𝜑 ≤ 𝜋. The
filter output VO as a function of the phase difference 𝜑 is shown in Figure 6.5. Note that Vo id Vi
and Vosc are in phase (𝜑 = 0), and that it reaches the maximum value Vo = VDD when the two
signals are exactly out of phase (𝜑 = 𝜋). From Figure 6.4 it is easy to see that 𝜑𝜋, 𝑉𝑜 decreases. Of
course, the characteristics is periodic in 𝜑 with period 2𝜋. The range 0 ≤ 𝜑 ≤ 𝜋 is the range where
the PLL can operate in the locked condition.

Figure 6.5: Characteristics of the Phase Detector

Voltage Controlled Oscillator


The voltage VO controls the charging and discharging currents through an external capacitor C1, and
therefore determines the time needed to charge (discharge) the capacitor to a predetermined
threshold level. As a result, the frequency fosc of the VCO output is determined by VO. The VCO
output Vosc is a square wave with 50 percent duty cycle and frequency fosc. As shown in Figure 6.3,
the VCO characteristic are user-adjustable by three external components: R1, R2 and C1. When Vo
is zero, VCO operates at the minimum frequency fmin and when Vo -= VDD, the VCO operates at
the maximum frequency fmax. The actual operating frequencies can differ significantly from the
values predicted by the above equations. So, one may need to tune the component values by
experiment. For fosc between the minimum fmin and the maximum fmax, the VCO output frequency
fosc is ideally a linear function of the control voltage Vo. The slop is called the gain or the frequency
sensitivity of the VCO in HZ V.
𝐾𝑜 = 4𝑓𝑜𝑠𝑐 4𝑉𝑂
Lock Range and Capture Range
Once the PLL is in the locked condition, it remains locked as long as the VCO output frequency fosc
can be adjusted to match the incoming signal frequency fi, i.e. as long as 𝑓𝑚𝑖𝑛 ≤ 𝑓𝑖 ≤ 𝑓𝑚𝑎𝑥. When
the lock is lost, the VCO operates at the free-running frequency fo, which is between the fmin and
fmax. To establish the lock gain, i.e. to capture the incoming signal again, the incoming signal

|EEE 351 | Principles of Communication Systems Lab Manual 46


Lab Experiment | 6

frequency fi must be close enough to fo. Here ‘close enough’ means that fi must be in the range from
fo-fc to fo+fc, where 2fc is called the capture range. The capture 2fc is smaller than the lock range
fmax-fmin as shown in Figure 6.2. The capture range 2fc-c depends on the characteristics of the loop
filter. For the simple RC filter, a very crude, approximate implicit expression for the capture range
can be found as:
𝑓𝑐 ≅ 𝑉𝐷𝐷 2𝐾𝑜 𝑞 1 + (𝑓𝑐 𝑓𝑝)2

Where, fp is the cut-off frequency of the filter, VDD is the supply voltage and Ko is the VCO gain.
Given Ko and fp this relation can be solved for fc numerically which yields an approximate
theoretical prediction for the capture range 2fc. If the capture range is much larger than the cut off
frequency of the filter, fc-fp >> 1, then the expression for the capture range is simplified.
2𝑓𝑐 ≅ 𝑞 2𝐾𝑜 𝑓𝑝 𝑉𝐷𝐷
Note that the capture range 2fc is smaller if the cut-off frequency fp of the filter is lower. It is usually
desirable to have a wider capture range, which can be accomplished by increasing the cut-off
frequency of the filter. On the other hand, a lower cut-off fp is desirable in order to better attenuate
high frequency components of vφ at the phase detector output and improve noise rejection in general.

In-Lab Tasks
Lab Task 1
 Set the values of C1 = 0.03µF, R1=R2=18KΩ.
 Find out the fmin and fmax of the VCO. To find fmin simply connect the VCO input (pin9) to
ground and to find fmax, connect pin 9 to VDD.
 Find out the free-running frequency fo of the VCO. This is the frequency of the output signal
when input is not applied to phase detector.
 Apply an incoming signal Vi from the signal generator. Adjust its frequency to approximately
match the free running frequency fo of the VCO. When Vi is applied, the PLL should operate
in the locked condition, with fo exactly equal to fi. The locked condition can be easily
verified by observing Vi and Vosc simultaneously on a dual trace oscilloscope. If fi=fosc,
stable waveforms of both Vi and Vosc can be observed. otherwise, one of the waveforms on
the scope screen is blurred or is moving with respect to the other.
 By changing the frequency of the incoming signal, determine the actual lock range of the
PLL i.e. determine the maximum and minimum frequency fi such that starting from the

|EEE 351 | Principles of Communication Systems Lab Manual 47


Lab Experiment | 6

locked condition the PLL remains in the locked condition. The lock range should be equal to
fmax-fmin.
 Record the readings for the lock range and the capture range below:
fmin = ……………………..
fmax =…………………….
fcap1 = fo-fc =…………....
fcap2 = fo+fc =…………...
lock range = fmax-fmin = ………………….
Capture range = fcap2-fcap1 = ……………..

|EEE 351 | Principles of Communication Systems Lab Manual 48


Lab Experiment | 6

Lab Assessment

Pre-Lab /1

Performance /3

Results /2
/10
Viva /2

Lab Report /2

Instructor Signature and Comments:

|EEE 351 | Principles of Communication Systems Lab Manual 49


Lab Experiment | 7

LAB # 7
To Construct Frequency Modulator using Discrete Components for Analog
Communication Systems
Objectives

 To construct PLL based frequency modulator using discrete components for analog
communication systems.

In-Lab Tasks
Lab Task 1:
Build the circuit shown in Figure 7.1. This uses the VCO portion of the 4046 PLL.

Figure 7.1: PLL (CD 4046 BC)

 First, investigate it using the ‘test input’ circuit that is shown in Figure 7.2. Find the frequency
and sketch the waveform for the three VCO input voltages shown in the table below. From that
information, determine the FM constant, Kf for your modulator. See the data analysis section
below for guidance in this calculation
 Second, instead of the ‘test input’ circuit, use, as the input the function generator with the
sinusoidal output listed as follows:
o Frequency = 5 KHz (fm = modulating frequency)
o Amplitude = 2 volts (p-p)
o DC offset = 5V

|EEE 351 | Principles of Communication Systems Lab Manual 50


Lab Experiment | 7

Figure 7.2: Test Input Circuit

 Examine the time domain signal at the VCO output. It should look similar to the plot of
Figure 7.3. Essentially, this is a rectangular waveform with a varying frequency, i.e. a
frequency that is modulated. The maximum and minimum frequencies, fmax and fmin can be
determined using the following formulas:
fmin = 1 T1
fmax = 1 T2
 Write an expression for the time domain output, assuming that the output waveform is
sinusoidal like. What is the β of your signal? Examine the spectra using the spectrum
analyzer. (make the connection to the spectrum analyzer using a high impedance scope
probe). Sketch the spectra and measure the power in significant sidebands (powers greater
than one percent of the total transmitted power). Record this data in the table shown in the
report section.

|EEE 351 | Principles of Communication Systems Lab Manual 51


Lab Experiment | 7

Figure 7.3: Time Domain Signal at the VCO Output

Data Analysis
The FM constant, Kf, can be determines by plotting the VCO’s output frequency v/s the VCO’s
input voltage. This should give (approximately) a straight line, its slope is Kf in hertz per volt. You
will want to convert it to radians/seconds-per-volt in order to write the expression for the FM signal
l you generate. To find β, use

β = [peak modulating tone amplitude/modulating tone frequency (in Hz)] kf .

An alternative method is given by:


β = fmax – fmin fm

|EEE 351 | Principles of Communication Systems Lab Manual 52


Lab Experiment | 7

Lab Assessment

Pre-Lab /1

Performance /3

Results /2
/10
Viva /2

Lab Report /2

Instructor Signature and Comments:

|EEE 351 | Principles of Communication Systems Lab Manual 53


Lab Experiment | 8

LAB # 8
To Display Sampling of Analog Signals for Digitization using Discrete
Components and MATLAB
Objectives

 To trace the Nyquist sampled signal for understanding of sampling theorem


 To display recovered message signal using sampled values in MATLAB
 To construct a sampler circuit using discrete components for digitization of analog signals

Pre-Lab
Read this experiment in its entirety to become familiar with objectives of this lab. Study in detail and
become familiar with the basics of sampling theorem provided with this laboratory experiment and
in chapter 6 of the reference book. The instructor may provide the class some time to reflect upon
these before proceedings with the lab. Furthermore, you need to complete the following tasks on
MATLAB and also attach the codes with detailed annotations on them:
 Generate a band limited random signal in MATLAB
 Plot the signal in time and frequency domain

Background
Analog signals which are the most familiar type of signal, are continuous functions of time in the
sense that their amplitudes are defined explicitly for every instant of time. However, there is another
important class of signals, usually referred to as sampled signals, for which the amplitude is defined
(non-zero) only for a certain discrete instant of time. Figure 8.1 displays an example of both the
analog and a sampled signal. Sampled signals are used in pulse modulation communication Systems,
in sampled data control systems, and when digital computers are used as part of an analog system.

Figure 8.1: Examples of (a) an Analog Signal; (b) a Sampled Signal

|EEE 351 | Principles of Communication Systems Lab Manual 54


Lab Experiment | 8

The process of generating sampled signals, sometimes called pulse-amplitude modulation is


illustrated in Figure 8.2. The analog input signal, , is multiplied by the uniform pulse train,
, and the resulting output signal, ,is non-zero only when and are both non-

zero. The signal, , is said to have been sampled by the sampling signal .

Figure 8.2: Generation of Sampled Signals

Sampled signals such as in Figure 8.2 (d) are useful if they contain the same information as the
original signal , as shown in Figure 8.2 (b). That is to say, must be recoverable from
The conditions under which such a recovery of the original signal occurs, constitute a
statement of the sampling theorem. Briefly these conditions are:
 The original signal must be a bandwidth limited function (i.e. have no frequency
components outside the frequency interval (-fb, fb) and
 The frequency of the sampling signal must be greater than .

In-Lab Tasks

Lab Task 1: Verification of Sampling Theorem using TIMS Trainer


The sampling process is illustrated by a switch that can be operated with the help of pulse train as
shown in Figure 8.3. The input to this switch is a single audio tone. To model the arrangement of
Figure 8.3 with TIMS the modules required are a TWIN PULSE GENERATOR (only one pulse is
used), and a DUAL ANALOG SWITCH (only one of the switches is used). Note that, for the
sampling method being examined, the shape of the top of each sample is the same as that of the
message. This is often called natural sampling.

|EEE 351 | Principles of Communication Systems Lab Manual 55


Lab Experiment | 8

Figure 8.3: Sampling a Sine Wave

With the help of above given arrangement and TIMS modules, draw a circuit diagram (with proper
labelling) that satisfied the sampling theorem. Also implement the designed circuit on TIMS trainer.

Circuit Diagram

Having generated a train of samples, now observe that it is possible to recover, or reconstructed (or
interpolate) the message from these samples. Now with the help of Fourier series analysis, and
consideration of the nature of the sampled signal, you can already conclude that the spectrum of the
sampled signal will contain components at and around harmonics of the switching signal, and
hopefully the message itself. If this is so, then a low pass filter from the HEADPHONE AMPLIFIER
would seem the obvious choice to extract the message. The reconstruction circuitry is illustrated in
Figure 8.4.

|EEE 351 | Principles of Communication Systems Lab Manual 56


Lab Experiment | 8

Figure 8.4: Reconstruction Circuit

You can confirm that it recovers the message from the samples by connecting the output of the
DUAL ANALOG SWITCH to the input of the 3 kHz LPF in the HEADPHONE AMPLIFIER
module and displaying the output on the oscilloscope.

Lab Task 2: Design and Implementation of Flat Top Sampling Circuit using
Discrete Components
During transmission, noise is introduced at top of the transmission pulse which can be easily
removed if the pulse is in the form of flat top. Here, the top of the samples is flat i.e. they have
constant amplitudes. Hence, it is called as flat top sampling or practical sampling. Flat top sampling
makes use of sample and hold circuit.
The sample and hold operation is simple to implement and is a very commonly used method of
sampling in communications systems. In its simplest form the sample is held until the next sample is
taken. So, it is of maximum width. This is illustrated in Figure 8.5 below:

Figure 8.5: Sample and Hold Operation

In the above example, the sampling instant is coincident with the rising edge of the clock signal. In
practice, there may be a ‘processing delay’ before the stepped waveform is presented at the output.
In this very task, you need to design a circuit diagram of flat top sampling using discrete
components. Also design a low pass filter to reconstruct the message signal from its sampled output.
After designing the circuit, implement it on the bread board to test its validity. The circuit must be
designed with following parameters:
(sine wave)

|EEE 351 | Principles of Communication Systems Lab Manual 57


Lab Experiment | 8

(duty cycle i.e. pulse wave)

Circuit Diagram

Lab Task 3: MATLAB EXCERCISE


1. Use MATLAB to see the effects of sampling. Generate a baseband signal. This signal is
sampled every To sec. Simulate sampling with an impulse train by sampling every kTo sec.
Let m represent the baseband signal, ms the sampled signal and k represent the length of m.
Hint:
𝑎 = 𝑚(1: 𝑘: 𝐾); 𝑚𝑠 = 𝑧𝑒𝑟𝑜𝑠(1, 𝐾); 𝑚𝑠(1: 𝑘: 𝐾) = 𝑎;
After generating the sampled signal ms, attempt reconstruction of m with a lowpass filter. Let
the reconstructed signal be mh.
Hint:
8.1
[𝑛, 𝑑] = 𝑏𝑢𝑡𝑡𝑒𝑟 ( ) ; 𝑚ℎ = 𝑓𝑖𝑙𝑡𝑒𝑟(𝑛, 𝑑, 𝑚𝑠);
2𝑘
Plot m, the sampled signal, and the reconstructed signal in time and frequency domain.
Repeat by sampling different rates including a case where aliasing occurs. Discuss the results.

|EEE 351 | Principles of Communication Systems Lab Manual 58


Lab Experiment | 8

Lab Assessment

Pre-Lab /1

Performance /3

Results /2
/10
Viva /2

Lab Report /2

Instructor Signature and Comments:

|EEE 351 | Principles of Communication Systems Lab Manual 59


Lab Experiment | 9

LAB # 9
To Display Various Line Coding Schemes for Pulse Code Modulation using
TIMS Trainer
Objectives

 To assemble the circuit for implementation of various line codes e.g. NRZ, RZ, Manchester etc.
suing TIMS trainer
 To display line coded waveform for PCM using trainer

Pre-Lab
Read this experiment in its entirety to become familiar with objectives of this lab. study in detail and
become familiar with the basics of line coding provided with this laboratory experiment and in
chapter 7 of the reference book. The instructor may provide the class some time to reflect upon these
before proceeding with the lab.
Plot the following bit sequence in MATLAB as a sequence of perfect square wave.
𝑋 = [0 1 1 0 0 1 0]

Background
The process for converting digital data into digital signal is said to be Line Coding. Digital data is
found in binary format. It is represented (stored) internally as series of 1s and 0s. Digital signal is
denoted by discrete signal, which represents digital data. There are three types of line coding
schemes available as shown in Figure 9.1.

Figure 9.1: Types of Line Coding Schemes

|EEE 351 | Principles of Communication Systems Lab Manual 60


Lab Experiment | 9

Uni-Polar Encoding
Unipolar encoding schemes use signal voltage level to represent data. In this case, to represent binary
1, high voltage is transmitted and to represent 0, no voltage transmitted. It is also called Unipolar-
Non-return-to-zero, because there is no rest condition i.e. it either represents 1 or 0.

Figure 9.2: Uni-Polar Signal

Polar Encoding
Polar encoding scheme uses multiple voltage levels to represent binary values. Polar encoding
techniques are of four types:

 Polar Non-Return to Zero (Polar NRZ)


It uses two different voltage levels to represent binary values. Generally, positive voltage
represents 1 and negative values represents 0. It is also NRZ because there is no rest
condition NRZ scheme has two variants. NRZ-L and NRZ-I. NRZ-L changes voltage level at
when a different bit is encountered whereas NRZ-I changes voltage when a 1 is encountered.

Figure 9.3: Polar NRZ Signal

|EEE 351 | Principles of Communication Systems Lab Manual 61


Lab Experiment | 9

 Return to Zero (RZ)


Problem with NRZ is that the receiver cannot conclude when a bit is ended and when the next
bit is started, in case when sender and receiver’s clock are not synchronized. RZ uses three
voltage levels, positive voltage to represent 1, negative voltage to represent 0 and zero
voltage for none.

Figure 9.4: Polar Return to Zero Signal

 Manchester
This encoding scheme is a combination of RZ and NRZ-L. bit time is divided into two
halves. It transmits in the middle of the bit and changes phase when a different bit is
encountered.

Bipolar Encoding
Bipolar encoding uses three voltage levels, positive, negative and zero. Zero voltage represents
binary 0 and bit 1 is represented by altering positive and negative voltages.

Figure 9.5: Bipolar Signal

Advantages of Line Coding


There are many reasons for using line coding. Each of the line codes you will be examining offers
one or more of the following advantages:

|EEE 351 | Principles of Communication Systems Lab Manual 62


Lab Experiment | 9

 Spectrum shaping and relocation without modulation or filtering. This is important in


telephone line applications, for example, where the transfer characteristic has heavy
attenuation below 300 Hz.
 Bit clock recovery can be simplified.
 DC component can be eliminated; this allows AC (capacitor or transformer) coupling
between stages (as in telephone lines). Can control baseline wander (baseline wander shifts
the position of the signal waveform relative to the detector threshold and leads to severe
erosion of noise margin).
 Error detection capabilities.
 Bandwidth usage; the possibility of transmitting at a higher rate than other schemes over the
same bandwidth.

In-Lab Tasks
Lab Task 1: TIMS TRAINER
Design a TIMS circuit diagram using a Line encoder module that will encode a binary data into
different line coding schemes. Also, design its receiver that will decode the line coded signal to
provide original binary data. Moreover, implement the designed circuit on TIMS trainer.

Circuit Diagram

|EEE 351 | Principles of Communication Systems Lab Manual 63


Lab Experiment | 9

In TIMS, the LINE-CODE ENCODER accepts a TTL input, and the output is suitable for
transmission via an analog channel. As signal passes through the communication channel it could be
corrupted due to channel’s impact or noise. Here, it is re-generated by a detector. The TIMS detector
is the DECISISON MAKER module. Finally, the TIMS LINE-CODE DECODER module accepts
the output from the DECISION MAKER and decodes it back to the binary TTL format.
The LINE-CODE ENCODER serves as a source of the system bit clock. It is driven by a master
clock at 8.333 kHz (from the TIMS MASTER SIGNALS module). It divides this by a factor of four,
in order to derive some necessary internal timing signals at a rate of 2.083 kHz. This, then becomes a
convenient source of a 2.083 kHz TTL signal for use as the system bit clock.
Because the LINE-CODE DECODER has some processing to do it, it introduces a time delay. To
allow for this, it provides a re-timed clock if required by any further digital processing circuits (e.g.
for decoding, or error counting modules).

Lab Task 2: MATLAB EXERCISE


Write a MATLAB program to line encode your complete registration number using uni-polar and
polar NRZ coding.

Write code

|EEE 351 | Principles of Communication Systems Lab Manual 64


Lab Experiment | 9

Lab Assessment

Pre-Lab /1

Performance /3

Results /2
/10
Viva /2

Lab Report /2

Instructor Signature and Comments:

|EEE 351 | Principles of Communication Systems Lab Manual 65


Lab Experiment | 10

LAB # 10
To Assemble an Encoder for Pulse Code Modulation (PCM) using TIMS Trainer

Objectives

 To assemble various block i.e. Sampler, Quantizer, Encoder for Pulse Code Modulation signal using
TIMS trainer.

Pre-Lab
Read this experiment in its entirety to become familiar with objectives of this lab. study in detail and
become familiar with the basics of pulse code modulation provided with this laboratory experiment
and in chapter 6 of the reference book. The instructor may provide the class some time to reflect
upon these before proceedings with the lab. Furthermore, explore the following MATLAB functions
and write a short summary about their usage:
𝑌 = 𝑞𝑢𝑎𝑛𝑡(𝑋, 𝑄);
𝑂𝑢𝑡 = 𝑐𝑜𝑚𝑝𝑎𝑛𝑑(𝑖𝑛, 𝑝𝑎𝑟𝑎𝑚, 𝑣);

Background
Information in an analog from cannot be processed by digital computers so its necessary to convert
them into digital form. After converted to digital signal, it is easy for us to process the signal such as
encoding, filtering the unwanted signal and so on. PCM is a term which was formed during the
development of digital audio transmission standards. Digital data can be transported robustly over
long distances unlike the analog data and can be interleaved with other digital data so various
combinations of transmission channels can be used.
PCM doesn’t mean any specific kind of compression, it only implies Pulse Amplitude Modulation
(PAM)- quantization by amplitude and quantization by time which means digitization of the analog
signal. The range of values which the signal can achieve (quantization) is divided into segments,
each segment has a segment representative of the quantization level which lies in the middle of the
segment.
The value that a signal has in certain time is called a sample; the process of taking samples is called
quantization by time. After quantization by time, it is necessary to conduct quantization by
amplitude. Quantization by amplitude means that according to the amplitude of samples one
quantization segment is chosen (every quantization segment contains an interval of amplitudes).

|EEE 351 | Principles of Communication Systems Lab Manual 66


Lab Experiment | 10

PCM modulation is commonly used in radio and telephone transmission. The main advantage is that
the PCM modulation only needs 8 kHz sampling frequency to maintain the original quality of audio.
Figure 10.1 is the block diagram of PCM modulation. First of all, a low pass filter is used that
removes the noise in the audio signal. After that the audio signal will be sampled to obtain a series of
sampling values. Next, the signal will pass through a quantizer that defines the levels. Then the
signal will pass through an encoder to encode the quantization values and then convert to digital
signal. In fact, the process of quantization can be achieved at one time by A/D converter. However,
we should pay attention to the quantization levels. For example, if the bits for PCM modulation is 3,
then the quantization levels are 23 = 8, which is 8 steps. If the bits for PCM are 4, then the
quantization levels are 24 = 16, which is 16 steps. The increasing of bits of PCM modulation will
prevent the signal from distortion, but the bandwidth will also increase due to the increasing of the
capacity of data. An encoder utilized ‘n’ output terminals; therefore, we need to convert the parallel
data to serial data, which is the way that satisfy the data format of PCM modulation. Modulation
process is executed in three steps, 1) Sampling, 2) Quantization, and 3) Encoding. The details of
each process can be seen in chapter 6 of the reference book.

Figure 10.1: Block Diagram of PCM Encoder

Lab Tasks
Lab Task 1: TIMS TRAINER
Design a TIMS circuit diagram using a PCM encoder module that will generate a PCM encoded
signal for a sinusoidal input signal with 2 kHz frequency. Also, implement the designed circuit on
TIMS trainer.
The input to the PCM ENCODER module is an analog message. This must be constrained to a
defined bandwidth and amplitude range. The maximum allowable message bandwidth will depend
upon the sampling rate to be used. The Nyquist criterion must be observed. the amplitude range must
be held within the ± 2.0 volts range of the TIMS ANALOG REFERENCE LEVEL. This is in
keeping with the amplitude limits set for all analog modules.

|EEE 351 | Principles of Communication Systems Lab Manual 67


Lab Experiment | 10

Circuit Diagram

A brief description of the operation of the module follows:


 The module is driven by an external TTL clock.
 The input analog message is sampled periodically. The sample rate is determined by the
external clock.
 The sampling is a sample-and-hold operation. It is internal to the module and cannot viewed by
the user. What is held is the amplitude of the analog message at the sampling instant. The
amplitude of each sample is compared with a finite set of amplitude levels. These are
distributed (uniformly, for linear sampling) within the range ±2.0 volts (the TIMS ANALOG
REFERENCE LEVEL). These are the system quantizing levels.
 Each quantizing level is assigned a number, starting from zero for the lowest (most negative)
level, with the highest number being (L-1), where L is the available number of levels.
 Each sample is assigned a digital (binary) code word representing the number associated with
the quantizing level which is closest to the sample amplitude. The number of bits ‘n’ in the
digital codeword will depend upon the number of quantizing levels. In fact, 𝑛 = 𝑙𝑜𝑔2 (𝐿).

|EEE 351 | Principles of Communication Systems Lab Manual 68


Lab Experiment | 10

 The codeword is assembled into time frame together with other bits as may be required
(described below). In the TIMS PCM ENCODER (and many commercial system) a single
extra bit is added, in the least significant bit position. This is alternately a one or a zero. These
bits are used by subsequent decoders for frame synchronization.
 The frames are transmitted serially. They are transmitted at the same rate as the samples are
taken. The serial bit stream appears at the output of the module.
 Also available from the module is a synchronizing signal FS (‘frame synch’). This signals the
end of each data frame.

Lab Task 2: MATLAB EXERCISE


1. Use MATLAB to observe the output of Pulse Code Modulation. This will constitute of two
parts:
 Sampling an analog signal.
 Uniformly quantizing the samples.
 Encoding the quantizer output to digital pulses.
Plot the sampled, quantized and the encoded signal. Repeat by changing the quantization
levels.
Also discuss the results.
2. Determine the mean squared error for a uniform quantizer with 12 quantization levels, each
of length 1, designed for a zero-mean Gaussian source with variance 4. It is assumed that the
quantization regions are symmetric with respect to the mean of the distribution.
Write code here

|EEE 351 | Principles of Communication Systems Lab Manual 69


Lab Experiment | 10

|EEE 351 | Principles of Communication Systems Lab Manual 70


Lab Experiment | 10

Lab Assessment

Pre-Lab /1

Performance /3

Results /2
/10
Viva /2

Lab Report /2

Instructor Signature and Comments:

|EEE 351 | Principles of Communication Systems Lab Manual 71


Lab Experiment | 11

LAB # 11
To Assemble Decoder for Pulse Code Modulation (PCM) using TIMS Trainer

Objectives

 To assemble a decoder using various blocks of TIMS trainer to reconstruct message signal in
Pulse Code Modulation.

Pre-Lab
Read this experiment in its entirety to become familiar with objectives of this lab. Study in detail and
become familiar with the basics of pulse code demodulation provided with this laboratory
experiment and in chapter 6 of the reference book. The instructor may provide the class more time to
reflect upon these before proceeding with the lab.

Generate a sinusoidal signal with amplitude 1 and ω = 1. Using a uniform PCM scheme, quantize it
once to 8 levels and once to 16 levels. Plot the original signal and the quantized signal on the same
axes. Compare the resulting SQNRs in the two cases.

Background
The signal to be decoded in this experiment will be provided by you, using the PCM ENCODER
module as set up in previous experiment. A clock synchronization signal will be stolen from the
encoder. In the PCM DECODER module there is circuitry which automatically identified the
location of each frame in the serial data stream. To do this it collects groups of eight data bits and
looks for the repeating pattern of alternate ones and zeros placed there (embedded) by the PCM
ENCODER in the LSB position.
It can be shown that such a pattern cannot occur elsewhere in the data stream provided that the
original bandlimited analog signal is sampled at or below the Nyquist rate. When the embedded
pattern is found a ‘end of frame’ synchronization signal FS is generated and made available at the
front panel. The search for the frame is continuously updated.
The PCM DECODER module is driven by an external clock. This clock signal is synchronized to
that of the transmitter. For this experiment a ‘stolen’ clock will be used.
Upon reception, the PCM DECODER:
 Extracts a frame synchronization signal FS from the data itself (from the embedded alternate
ones and zeros in the LSB position) or uses an FS signal stolen from the transmitter.

|EEE 351 | Principles of Communication Systems Lab Manual 72


Lab Experiment | 11

 Extracts the binary number, which is the coded (and quantized) amplitude of the sample from
which it was derived, from the frame.
 Identifies the quantization level which this number represents.
 Generates a voltage proportional to this amplitude level.
 Presents this voltage to the output Vout. The voltage appears at Vout for the duration of the
frame under examination.
 Message reconstruction can be achieved, albeit with some distortion, by low pass filtering. A
built-in reconstructing filter is provided in the module.

Lab Tasks

Lab Task 1: TIMS TRAINER


Design a TIMS circuit diagram using a PCM decoder module that will decode a PCM encoded signal
for a sinusoidal input signal with 2 kHz frequency. Also, implement the designed circuit on TIMS
trainer.

Circuit Diagram

|EEE 351 | Principles of Communication Systems Lab Manual 73


Lab Experiment | 11

Lab Task 2: MATLAB EXERCISE


Sample and encode a sinusoidal message signal of frequency 1 kHz using a PCM encoder and
reconstruct the original message using PCM decoder in MATLAB.

Write code here

|EEE 351 | Principles of Communication Systems Lab Manual 74


Lab Experiment | 11

Lab Assessment

Pre-Lab /1

Performance /3

Results /2
/10
Viva /2

Lab Report /2

Instructor Signature and Comments:

|EEE 351 | Principles of Communication Systems Lab Manual 75


Lab Experiment | 12

LAB # 12
To Construct a Modem Based on Amplitude Shift Keying using Discrete
Components for Digital Communication Systems

Objectives

 To construct a modulator and demodulator for Amplitude Shift Keying using discrete
components.

Pre-Lab
Read this experiment in its entirety to become familiar with objectives if this lab. study in detail and
become familiar with the fundamentals of ASK modulation provided with this laboratory experiment
and in chapter 7 of the reference book. The instructor may provide the class more time to reflect
upon these before proceeding with the lab.

Background
Amplitude Shift Keying (ASK) in the context of digital communications is a modulation process
which imparts to a sinusoidal 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. Thus, the modulated waveform consists of bursts of a sinusoid. Figure 12.1
illustrates a binary ASK signal, together with the binary sequence which initiated it. Neither signal
has been band limited.

Figure 12.1: An ASK Signal and the Message

There are sharp discontinuities shown at the transition points. These result in the signal having an
unnecessarily wide bandwidth. Band limiting is generally introduced before transmission, in which
case these discontinuities would be ‘rounded off’. The band limiting may be applied to the digital
message, or the modulated signal itself. The data rate is often made a sub-multiple of the carrier
frequency.

|EEE 351 | Principles of Communication Systems Lab Manual 76


Lab Experiment | 12

One of the disadvantages of ASK 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. A block diagram of a basic ASK
generator is shown in Figure 12.2, where switch is opened and closed by unipolar binary sequence.

Figure 12.2: Block Diagram of ASK

Bandwidth Modification
As already indicated, the sharp discontinuities in the ASK waveform of Figure 12.1 imply a wide
bandwidth. A significant reduction can be accepted before errors at the receiver increases
unacceptably. This can be brought about by band limiting (pulse Shaping) the message before
modulation, or band limiting the ASK signal itself after generation. Both these options are
illustrated in Figure 12.3, which shows one of the generators you will be modelling in this
experiment.

Figure 12.3: ASK Band Limiting

Demodulation Methods
It is apparent from Figure 12.1 that the ASK signal has a well-defined envelope. Thus, it is amenable
to demodulation by an envelope detector. A synchronous demodulator would also be appropriate.
Note that:

|EEE 351 | Principles of Communication Systems Lab Manual 77


Lab Experiment | 12

 Envelope detection circuitry is simple.


 Synchronous demodulation requires a phase-locked local carrier and therefore carrier
acquisition circuitry.
With band limiting of the transmitting ASK neither of these demodulation methods would recover
the original binary sequence, instead, their outputs would be a band limited version. Thus, further
processing by some sort of decision making circuitry for example would be necessary. Thus,
demodulation is a two-stage process.
 Recovery of the band limited bit stream.
 Regeneration of the binary bit stream.

Lab Tasks

Lab Task 1: TIMS TRAINER


Design a TIMS circuit diagram of ASK modulator that employs an appropriate sinusoidal carrier to
modulate the baseband signal. Also, design its receiver with the help of envelope detector to recover
the baseband signal. Moreover, implement the designed circuit on TIMS trainer.

Circuit Diagram

|EEE 351 | Principles of Communication Systems Lab Manual 78


Lab Experiment | 12

Lab Task 2: Circuit Design using Discrete Components


Design a circuit diagram for ASK modulator using discrete components available in lab. use
baseband signal and sinusoidal carrier of frequency 100 Hz and 1000 Hz from the signal generator
respectively. Also employ envelope detector at the receiver to recover the baseband message.

Circuit Diagram

|EEE 351 | Principles of Communication Systems Lab Manual 79


Lab Experiment | 12

Lab Task 3: MATLAB EXERCISE


1. Use MATLAB to apply the ASK modulation to a bit sequence of 1 1 1 0 0 0.
2. Use MATLAB to generate a ASK signal with appropriate sinusoidal carrier.

Write code and attach results

|EEE 351 | Principles of Communication Systems Lab Manual 80


Lab Experiment | 12

Lab Assessment

Pre-Lab /1

Performance /3

Results /2
/10
Viva /2

Lab Report /2

Instructor Signature and Comments:

|EEE 351 | Principles of Communication Systems Lab Manual 81


Lab Experiment | 13

LAB # 13
To Construct Modem Based on Frequency Shift Keying using Discrete
Components for Digital Communication Systems

Objectives

 To construct a modulator and demodulator for Frequency Shift Keying using discrete
components.

Pre-Lab
Read this experiment in its entirety to become familiar with objectives of this lab. study in detail and
become familiar with the fundamentals of FSK modulation provided with this laboratory experiment
and in chapter 7 of the reference book. The instructor may provide the class some time to reflect
upon these before proceeding with the lab.

Use MATLAB to generate a FSK signal with appropriate sinusoidal carrier.

Background
In Frequency Shift Keying (FSK), the carrier frequency is shifted (i.e. from on frequency to another)
corresponding to the digital modulating signal. If the higher frequency is used to represent a data ‘1’
& lower frequency a data ‘0’, the resulting FSK waveform is shown in Figure 13.1. Thus,
Data = 1 High Frequency
Data = 0 Low Frequency

Figure 13.1: FSK Waveform, Derived from a Binary Message

Conceptually, and in fact, the transmitter could consist of two oscillators (on frequencies f1 and f2),
with only one being connected to the output at any one time. This is shown in block diagram form in
Figure 13.2 below:

|EEE 351 | Principles of Communication Systems Lab Manual 82


Lab Experiment | 13

Figure 13.2: An FSK Transmitter

Unless there are special relationships between the two oscillator frequencies and the bit clock there
will be abrupt phase discontinuities of the output waveform during transitions of the message.

Bandwidth
Practice is for the tones f1 and f2 to bear special inter-relationships, and to be integer multiples of the
bit rate. This leads to the possibility of continuous phase, which offers advantages, especially with
respect to bandwidth control. Alternatively, the frequency of a single oscillator (VCO) can be
switched between two values, thus guaranteeing continuous phase CPFSK. The continuous phase
advantage of the VCO is not accompanied by an ability to ensure that f1 and f2 are integer multiples
of the bit rate. This would be difficult to implement with a VCO. Being an example of non-linear
modulation, calculation of the bandwidth of an FSK signal is a non-trivial exercise. It will not be
attempted here.
FSK signals can be generated at baseband and transmitted over telephone lines (for example). In this
case, both f1 and f2 (of Figure 13.2) would be audio frequencies. Alternatively, this signal could be
translated to a higher frequency. Yet again, it may be generated directly at ‘carrier’ frequencies.
It is also represented as a sum of two ASK signals. The two carriers have different frequencies and
the digital data is inverted. The demodulation of FSK is done by separated the modulation signal into
two parts by band pass filter tuned to mark and space frequencies. The demodulation by this method
is shown in Figure 13.3. the output from each BPF looks like an amplitude shift keyed (ASK) signal.
These can be demodulated asynchronously, using the envelope. The decision circuit, to which the
outputs of the envelope detectors are presented, selects the output which is the most likely one of the
two inputs. It also reshapes the waveform from a bandlimited to a rectangular form. This is, in effect,
a two-channel receiver. The bandwidth of each is dependent on the message bit rate. There will be a
minimum frequency separation required of the two tones.

|EEE 351 | Principles of Communication Systems Lab Manual 83


Lab Experiment | 13

Figure 13.3: Demodulation by Conversion to ASK

Another method of demodulation of FSK can be carried out by a PLL. As known, the PLL tries to
‘lock’ the input frequency. It achieves this by generating corresponding O/P voltage to be fed to the
VCO, if any frequency deviation at its I/P is encountered. Thus, the PLL detector follows the
frequency changes and generated proportional O/P voltage. The O/P voltage from PLL contains the
carrier components. Therefore, to remove this, the signal is passed through low pass filter. The
resulting wave is too rounded to be used for digital data processing. Also, the amplitude level maybe
very low due to channel attenuation.

Lab Tasks

Lab Task 1: TIMS TRAINER


Design a TIMS circuit diagram of FSK modulator that employs an appropriate sinusoidal carrier to
modulate the baseband signal. Also, design its receiver with the help of PLL to recover the baseband
signal. Moreover, implement the designed circuit on TIMS trainer.

Circuit Diagram

|EEE 351 | Principles of Communication Systems Lab Manual 84


Lab Experiment | 13

Lab Task 2: Circuit Diagram using Discrete Components


Design a circuit diagram for FSK modulator using discrete components available in lab. Use
baseband signal of frequency 100 Hz from the signal generator. Also employ phase locked loop at
the receiver to recover the baseband message.

Circuit Diagram

|EEE 351 | Principles of Communication Systems Lab Manual 85


Lab Experiment | 13

Lab Task 3: MATLAB EXERCISE


Write a MATLAB code for modulating the input signal using FSK modulation and then demodulate
using both synchronous and asynchronous method.
Write code here

|EEE 351 | Principles of Communication Systems Lab Manual 86


Lab Experiment | 13

Lab Assessment

Pre-Lab /1

Performance /3

Results /2
/10
Viva /2

Lab Report /2

Instructor Signature and Comments:

|EEE 351 | Principles of Communication Systems Lab Manual 87


Lab Experiment | 14

LAB # 14
To Construct Modem Based on Binary Phase Shift Keying using Discrete
Components for Digital Communication Systems

Objectives

 To construct a modulator and demodulator for Binary Phase Shift Keying using discrete
components.

Pre-Lab
Read this experiment in its entirety to become familiar with objectives of this lab. study in detail and
become familiar with the fundamentals of BPSK modulation provided with this laboratory
experiment and in chapter 7 of the reference book. The instructor may provide the class some time to
reflect upon these before proceeding with the lab.

Use MATLAB to generate a BPSK signal with appropriate sinusoidal carrier.

Background
Consider a sinusoidal carrier. If it is modulated by a bi-polar bit stream according to the scheme
illustrated in Figure 14.1 below, its polarity will be reversed every time the bit stream changes
polarity. This, for a sine wave, is equivalent to a phase reversal (shift). The multiplier output is a
BPSK signal.

Figure 14.1: Generation of BPSK

The information about the bit stream is contained in the changes of phase of the transmitted signal.
Asynchronous demodulator would be sensitive to these phase reversals. The appearance of a BPSK
signal in the time domain is shown in Figure 14.2 (lower trace). The upper trace is the binary
message sequence.

|EEE 351 | Principles of Communication Systems Lab Manual 88


Lab Experiment | 14

Figure 14.2: A BPSK Signal in Time Domain

There is something special about the waveform of Figure 14.2. The wave shape is ‘symmetrical’ at
𝜔
each phase transition. This is because the bit rate is a sub-multiple of the carrier frequency 2𝜋. In

addition, the message transitions have been timed to occur at a zero-crossing of the carrier. Whilst
this is referred to a ‘special’, it is not uncommon in practice. It offers the advantage of simplifying
the bit clock recovery from a received signal. Once the carrier has been acquired then the bit clock
can be derived by division.

Band Limiting
The basic BPSK generated by the simplified arrangement illustrated in Figure 14.1 will have a
bandwidth in excess of that considered acceptable for efficient communications. If you can calculate
the spectrum of the binary sequence, then you know the bandwidth of the BPSK itself. The BPSK
signal is a linearly modulated DSB, and so it has a bandwidth twice that of the baseband data signal
from which it is derived. In practice, there would need to be some form of bandwidth control. Band
limiting can be performed either at baseband or at carrier frequency. It will be performed at baseband
in this experiment.

BPSK Demodulation
Demodulation of a BPSK signal can be considered a two-stage process.
 Translation back to baseband, with recovery of the band limited message waveform which is
achieved with a synchronous demodulator, as shown in Figure 14. 2 below. This requires a
local synchronous carrier. In this experiment a stolen carrier will be used.
 Regeneration from the band limited waveform back to the binary message bit stream.
Translation back to baseband requires a local, synchronized carrier. The translation process
does not reproduce the original binary sequence, but a band limited version of it. The original
binary sequence can be regenerated with a detector. This requires information regarding the bit
clock rate. If the bit rate is a sub-multiple of the carrier frequency, then bit clock regeneration is
simplified. In TIMS the DECISION MAKER module can be used for the regenerator, and in
this experiment the bit clock will be a sub-multiple of the carrier.
|EEE 351 | Principles of Communication Systems Lab Manual 89
Lab Experiment | 14

Figure 14.3: Synchronous Demodulation of BPSK

Lab Tasks

Lab Task 1: TIMS TRAINER


Design a TIMS circuit diagram of BPSK modulator that employs an appropriate sinusoidal carrier to
modulate the baseband signal. Also, design its receiver that uses synchronous demodulator to recover
the baseband signal. Moreover, implement the designed circuit on TIMS trainer.

Circuit Diagram

|EEE 351 | Principles of Communication Systems Lab Manual 90


Lab Experiment | 14

Lab Task 2: Circuit Design using Discrete Components


Design a circuit diagram for BPSK modulator using discrete components available in lab. Use
baseband signal and sinusoidal carrier of frequency 100 Hz and 1000 Hz from the signal generator
respectively. Moreover, implement the circuit on trainer board.

Circuit Diagram

|EEE 351 | Principles of Communication Systems Lab Manual 91


Lab Experiment | 14

Lab Task 3: MATLAB EXERCISE


Write a MATLAB code that modulated the following binary sequence 𝑋 = [11010010100001]
using BPSK modulation.

Write code here

|EEE 351 | Principles of Communication Systems Lab Manual 92


Lab Experiment | 14

Lab Assessment

Pre-Lab /1

Performance /3

Results /2
/10
Viva /2

Lab Report /2

Instructor Signature and Comments:

|EEE 351 | Principles of Communication Systems Lab Manual 93

You might also like