Anda di halaman 1dari 133

COMSATS Institute of Information Technology Lahore

Department of Electrical Engineering



PRINCIPLES OF COMMUNICATION SYSTEMS
(EEE351)



Laboratory Manual 2014


ENGR. MUHAMMAD RIZWAN ASIF ENGR. MUKHTAR HUSSAIN

2

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. In the laboratory, the student will encounter
experiments which demonstrate the basic principles of analog and digital communication
systems explored in the lectures.

All experiments described in this manual are performed on TIMS (Telecommunications
Instructional Modeling System) and are based on computer simulations. TIMS is a modular
system for modeling telecommunications block diagrams whereas the simulations are
performed within the environment of MATLAB which is an interactive system for scientific
and engineering calculations. Simulations can model the behavior of real systems with
remarkable degree of precision.

The MATLAB program provides the user with rich set of functions to manipulate and
process data. In addition, there are several toolboxes such as Communication System Toolbox
consisting of high level functions for specific applications.

The experiments have been written with the idea that each model examined could eventually
become part of a larger telecommunications system, the aim of this large system being to
transmit a message from input to output. TIMS brings alive the block diagram of the text
book with a working model, recreating the waveform on an oscilloscope. On the similar
basis, the same experiments are simulated using MATLAB.




Engr. Muhammad Rizwan Asif
Lab Engineer, EE Dept.
COMSATS, Lahore



3

Table of Contents
INTRODUCTION TO TIMS ................................................................................................................... 4
LAB 1 INTRODUCTION TO OSCILLOSCOPES ...................................................................................... 6
LAB 2 MODELING EQUATIONS ...................................................................................................... 18
LAB 3 DSBSC MODULATION AND DEMODULATION ...................................................................... 25
LAB 4 AMPLITUDE MODULATION.................................................................................................. 33
LAB 5 ENVELOPE DETECTION ....................................................................................................... 39
LAB 6 SSB MODULATION AND DEMODULATION ........................................................................... 44
LAB 7 CARRIER ACQUISITION PLL ............................................................................................. 51
LAB 8 FM GENERATION AND DEMODULATION .............................................................................. 55
LAB 9 ANGLE MODULATION ......................................................................................................... 61
LAB 10 QAM MODULATION AND DEMODULATION .................................................................... 62
LAB 11 THE SAMPLING THEOREM ................................................................................................. 69
LAB 12 PCM ENCODING AND DECODING ...................................................................................... 80
LAB 13 LINE CODING .................................................................................................................... 97
LAB 14 AMPLITUDE SHIFT KEYING ............................................................................................. 105
LAB 15 BINARY PHASE SHIFT KEYING ........................................................................................ 115
LAB 16 FREQUENCY SHIFT KEYING............................................................................................. 123



4

INTRODUCTION TO TIMS
TIMS is a modular system for modeling telecommunications block diagrams. Since block
diagrams themselves represent telecommunications systems, or sub-systems, and each sub-
system can probably be represented by a mathematical equation, then TIMS can also be said
to be a telecommunications equation modeler.

Most TIMS modules perform a single function. For example, there are multipliers, adders,
filters, samplers. Other modules generate signals such as sine waves, square waves, and
random sequences.

Complex systems are modeled by a collection of these simple modules. There are few
modules that perform complex functions which otherwise could have been performed by a
collection of simpler modules.

Conventions
TIMS is almost self-explanatory, and a first-time user should have no trouble in patching up a
basic system in a few minutes, without the need to refer to the extensive User Manuals. TIMS
modules conform to the following conventions.

Inputs to each module are located on the left hand side of the front panel outputs from
each module are located on the right hand side of the front panel modules become
powered when plugged in, and pass signals via external patch leads.
Connecting front panel sockets.
Sockets involving analog signals are colored yellow.
Sockets involving digital signals are colored red.
Analog signals are user-adjusted to the TIMS ANALOG REFERENCE LEVEL,
which is 4 volt peak-to-peak.
Digital signals are sent and received at TTL levels (0 volt and 5 volt).
Input impedances are high (>10 kohms) and output impedances low (<150 ohms), so
that interconnections do not change signal levels.
No signal can be generated by a TIMS module which could damage another module
Outputs can be short circuited, or joined together, without causing any damage.
Modules can be inserted in any free slot of a system rack, where they obtain their DC
power.
Baseband signals are typically located below 10 kHz.
Bandpass signals are typically located in the 100 kHz region.
Most modules can perform their intended functions over the full TIMS frequency
range, which extends to 1 MHz.
System noise is typically at least 40 dB below the TIMS ANALOG REFERENCE
LEVEL.

Messages

Analog systems are typically set up using single sinusoids as messages. A two-tone test
signal can be modeled for more rigorous tests. A SPEECH module is instructive for other
tests.
5

Instrumentation
TIMS is complete in itself except for one addition - an oscilloscope - which is the basic
measurement tool. Since the bandwidth of TIMS signals seldom exceeds 1 MHz, a general
purpose two channel oscilloscope is more than adequate.

The in-built FREQUENCY COUNTER is used for all frequency measurements.

Experimental practice
It is customary to insert modules into the TIMS frame in the order they appear in the block
diagram which is to be modeled. Patching usually proceeds from input to output in a
systematic manner.

Analog signals, at module interfaces, are normally adjusted to the TIMS ANALOG
REFERENCE LEVEL of 4 volt peak-to-peak.

When it is necessary to transmit a TTL signal via an analog circuit, an analog version is
usually available. This is a 2 volt (bi-polar) waveform derived from the TTL version.

























6

LAB 1 INTRODUCTION TO OSCILLOSCOPES
An oscilloscope is a type of electronic test equipment that allows signal voltages to be
viewed, usually as a two-dimensional graph of one or more electrical potential differences
(vertical axis) plotted as a function of time or of some other voltage (horizontal axis).
Digital Storage Oscilloscope
The digital storage oscilloscope, or DSO for short, is now the preferred type for most
industrial applications, although simple analogue CROs is still used by hobbyists. It replaces
the unreliable storage method used in analogue storage scopes with digital memory, which
can store data as long as required without degradation. It also allows complex processing of
the signal by high-speed digital signal processing circuits.

The vertical input, instead of driving the vertical amplifier, is digitized by an analog to digital
converter to create a data set that is stored in the memory of a microprocessor. The data set is
processed and then sent to the display, which in early DSOs was a cathode ray tube, but is
now more likely to be an LCD flat panel. DSOs with color LCD displays are common. The
data set can be sent over a LAN or a WAN for processing or archiving. The screen image can
be directly recorded on paper by means of an attached printer or plotter, without the need for
an oscilloscope camera. The scope's own signal analysis software can extract many useful
time-domain features (e.g. rise time, pulse width, amplitude), frequency spectra, histograms
and statistics, persistence maps, and a large number of parameters meaningful to engineers in
specialized fields such as telecommunications, disk drive analysis and power electronics.
The Trace
In its simplest mode, the oscilloscope repeatedly draws a horizontal line called the trace
across the middle of the screen from left to right. One of the controls, the timebase control,
sets the speed at which the line is drawn, and is calibrated in seconds per division. If the input
voltage departs from zero, the trace is deflected either upwards or downwards. Another
control, the vertical control, sets the scale of the vertical deflection, and is calibrated in volts
per division. The resulting trace is a graph of voltage against time, with the more distant past
on the left and the more recent past on the right.

If the input signal is periodic, then a nearly stable trace can be obtained just by setting the
timebase to match the frequency of the input signal. For example, if the input signal is a 50
Hz sine wave, then its period is 20 ms, so the timebase should be adjusted so that the time
between successive horizontal sweeps is 20 ms. This mode is called continual sweep.
Unfortunately, an oscilloscope's timebase is not perfectly accurate, and the frequency of most
input signals are not perfectly stable, so the trace will drift across the screen making
measurements difficult.



7
















Figure 1: Instek GDS-820 oscilloscope

Figure 1 shows the front view of the oscilloscope.

Basic Start up Procedure:
1. Turn the Oscilloscope ON by pressing ON/STBY button

2. Its a good practice to return the oscilloscope to its Default settings before any
measurements. For this purpose, press SAVE/RECALL hard key on the front panel
and then F2 (for Default Setup softkey)

Quick Performance Check:
Connect a 10X attenuating probe to Channel 1. Change the (3) settings as follows:
1. Vertical Section: Channel 1, change probe factor to 10:1. Press CH1 hard key and
then repeatedly pressing the Probe factor softkey.
2. Vertical Section: Channel, change the vertical scale to 500mV/div. Use the Channel
1s VOLT/DIV knob.
3. Horizontal Section: Change the time/div to 5ms/div.

Now touch the probe with your finger. If you see a few cycles of sine wave, both your
oscilloscope and the probe are functioning.

The signal you are seeing is actually 50Hz power line noise, and your finger (a crude
antenna) is providing a very convenient test signal picked from power wiring in the
building.
8

Figure 2: Output of Quick Performance Check

Probe Compensation:
1. Connect a 10X probe to the channel 1 BNC Connector input, and connect the probe
tip to the hook labeled 2V attached just below the bottom-left of LCD screen.
2. The display you see will not be that satisfactory. You have two options to adjust the
display:
A. Adjust yourself the horizontal TIME/DIV and Vertical VOLTS/DIV knob.

B. Let the oscilloscope do the adjustments for you. J ust press the AUTOSET hardkey.
This will display two and a half cycles of a square waveform.

3. Check the waveform presentation for overshoot and roll off. If necessary adjust the
probe compensation screw on the probe assembly.

Figure 3: Probe Compensation
Vector/Dots:
1. With the previous steps waveform on display, press Display hardkey. In the soft menu,
you can switch between dot display and vector display by repeatedly pressing F1 hardkey.
Draw the waveforms in two cases:


9










a) Dots Figure 4 b) Vector Display
Averaging:
Our buildings and most laboratories are dirty in electromagnetic sense. This is due to power
line noise, computer systems, lighting and RF signals that create unwanted signals on the top
of voltages we do want to measure.

One way to minimize the problem is to use Averaging feature of digital oscilloscope. The
number of averages can be changed, as needed, over a wide range of values (The default
number is 8). To see the effect of averaging do the following:
1. Turn averaging OFF by pressing SAMPLE soft key. Draw the square wave as it appears.
2. Turn averaging ON and draw the waveform you observe.










Figure 5: Waveforms a) with and b) without averaging

3. Set the number of averages to 4, 8, 16, 32 256 and note down the effect on the waveform.
4. As you increase the number of averages, each time, remove the probe from the 2V hook and
re-connect it. Note down your observations.




10
Cursors:
Cursors are a powerful feature of oscilloscope which allows you to take accurate
measurements along horizontal and vertical axes.
1. Press Cursors hardkey and you will see the waveform and soft menu.
2. Use Vertical Cursors to measure the time period of the square waveform.
3. Use Horizontal Cursors to measure the peak-to-peak value of the waveform and note your
readings is space provided below.

Figure 6: Measurement using Cursors a) Horizontal and b) Vertical Cursors

T1 = V1 =
T2 = V2 =
Time Period = , Freq = , Vpp =

XY Mode:
A very useful feature of Oscilloscope is XY plot. Signal on one Channel forms X-axis while
the signal on 2
nd
channel represents Y-axis.

1. From the function generator give a sine wave as an input to both the channels. Observe and
draw the graph.
2. Now plot sine wave vs. a cosine wave and show the sketch as it appears on oscilloscope.











Figure 7: XY Plots a) Sine vs. Sine b) Sine vs. Cosine

11

Triggering:
To provide a more stable trace, modern oscilloscopes have a function called the saddle. When
using saddling, the scope will pause each time the sweep reaches the extreme right side of the
screen. The scope then waits for a specified event before drawing the next trace. The trigger
event is usually the input waveform reaching some user-specified threshold voltage in the
specified direction (going positive or going negative).

The effect is to resynchronize the timebase to the input signal, preventing horizontal drift of
the trace. In this way, triggering allows the display of periodic signals such as sine waves and
square waves. Trigger circuits also allow the display of non-periodic signals such as single
pulses or pulses that don't recur at a fixed rate.

Types of trigger include:

external trigger, a pulse from an internal source connected to a dedicated input on the
scope.
edge trigger, an edge-detector that generates a pulse when the input signal crosses a
specified threshold voltage in a specified direction.
delayed trigger, which waits a specified time after an edge trigger before starting the
sweep. No trigger circuit acts instantaneously, so there is always a certain delay, but a
trigger delay circuit extends this delay to a known and adjustable interval. In this way,
the operator can examine a particular pulse in a long train of pulses.

Experimental Procedure
1. Set up the function generator to produce a 2vpp 1 kHz sine wave. Follow the
following steps:

a. Turn the Function generator ON
b. Connect the probe to BNC Connector
c. Use Navigation Arrows to move between parameters on LCD Screen
d. Use numeric keys to adjust the values of each parameter
e. Press Enter when you are done
f. Press the Output button so that the RED LED is ON, indicating that the output is
now available.
2. Connect the output of Function generator to Channel 1.
3. Turn ON the Oscilloscope.
4. Press SAVE/RECALL hardkey and Default Setup softkey to restore oscilloscope
to its defaults.
5. Press Autoset so that Oscilloscope adjusts the display for you.
6. Observe and draw the Waveform you see.
7. Confirm using Cursors that the frequency and amplitude is what you set using
function generator.
12

Figure 8: Sine wave and its parameters.
Measure:
Our Oscilloscope has another powerful feature Measure allowing us to measure the
commonly used parameters of signals automatically. We just need to reach that value on
Menu and note down its value.
1. Press Measure hardkey from the front panel.
2. In the soft menu for measure you will see something like.


Figure 9: Measure
3. Note Down the following values for sine wave.
4. Repeat the same for square wave.





Vpp =
Freq =
Time Period=
13

Parameter Sine Square
Vpp



Freq


Time Period


Vrms


Vavg

Vmax


Vmin



+Width



-Width


Duty Cycle


Table 1: Measure
5. Play a little with the waveforms by changing duty cycle, DC offset and frequency.
Dont use Autoset this time and Try to adjust Time/Div and Volts/Div yourself.
Trigger:
Now that you have learned about Triggering from previous experiments theory, lets play a
little with this thing.
1. With the sine wave of 1 kHz on the oscilloscope, press the Menu hardkey
from trigger section on Front Panel. You will be seeing something like.

Figure 10: Trigger
14
2. Draw the waveform you see.
3. Press F5. Enter the sub menu and change the slope to falling edge. Draw
what you observe.





Figure 11: Edge Triggering a) Rising Edge b) Falling Edge
4. Change the trigger source to and write down your observations below.
a. CH2
b. Line
c. External





5. Lets move to External Triggering. Apply a signal of 2 kHz to EXT TRIG
connector.
Select Trig Source as External. What do you see on Oscilloscope?
6. Again apply a signal of 4 kHz as External Triggering source and draw
what you on Oscilloscope.








Figure 12: External Triggering a) 2 kHz b) 4 kHz
15
Math:
Math is another useful feature of our oscilloscope. With Math we can obtain:
a. The sum of two channels
b. The difference between two channels
c. FFT of the signal on any Channel
d.
1. Give sine wave as input to Channel 1 and a DC signal at Channel 2
2. From Math soft menu select CH1 +CH2 and draw the waveform you see.
3. Now obtain CH1 CH2 and plot the graph here.






Figure 13: a) CH1 + CH2 b) CH1 CH2
4. Apply a sine wave of arbitrary frequency on Channel 1.
5. From the Math Menu select FFT and CH1 as a source.
5. Change to window to Hanning and adjust Timebase to obtain a clear display of FFT
6. Use cursors to measure the frequencies in the math signal.
7. Draw the graph you see on oscilloscope on your.

Figure 14: FFT of Sine Wave


16

Exercise:
Q1. Whats the difference between a digital and an analog oscilloscope?
Q2. Mention some additional features you find in digital oscilloscope.
Q3. How many waveforms (internal/external) you can see on your oscilloscope.
Q4. Name three different types of Triggering.
Q5. Whats duty Cycle? Draw a square wave with 10% duty cycle.
Q6. Is the frequency of a signal affected if you change the timebase on Oscilloscope?
Q7. What is triggering meant for?
Q8. How the display of a dynamic (always changing) signal becomes static on Oscilloscope?























17

Lab Grades

Total Marks Obtained Marks
Lab Performance
5
Knowledge about Lab
5
Values Obtained
(Accurate/Precise)
5
Lab Participation
5
Behavior in the Lab
5
Viva/Quiz/Assignment
5
Total
30

Comments


Date: ; Instructor Sig. .




18

LAB 2 MODELING EQUATIONS
Modules

Basic: ADDER, AUDIO OSCILLATOR, PHASE SHIFTER
Optional basic: MULTIPLIER

Preparation

This experiment assumes no prior knowledge of telecommunications. It illustrates how TIMS
is used to model a mathematical equation. You will learn some experimental techniques. It
will serve to introduce you to the TIMS system, and prepare you for the more serious
experiments to follow.

In this experiment you will model a simple trigonometric equation. That is, you will
demonstrate in hardware something with which you are already familiar analytically.

An equation to model

You will see that what you are to do experimentally is to demonstrate that two AC signals of
the same frequency, equal amplitude and opposite phase, when added, will sum to zero. This
process is used frequently in communication electronics as a means of removing, or at least
minimizing, unwanted components in a system. You will meet it in later experiments.

The equation which you are going to model is:

y(t) =V
1
sin(2f
1
t) +V
2
sin(2f
2
t + ) ......... 1
=v
1
(t) +v
2
(t) ........ 2

Here y(t) is described as the sum of two sine waves. Every young engineer knows that, if:

Each is of the same frequency: f
1
=f
2
Hz ........ 3
Each is of the same amplitude: V
1
=V
2
volts ........ 4
And they are 180
o
out of phase: = 180 degrees ........ 5
Then: y(t) =0 ........ 6

A block diagram to represent eqn.(1) is suggested in Figure 1.

Figure 1: Block diagram model of Equation 1

19

Note that we ensure the two signals are of the same frequency (f
1
=f
2
) by obtaining them
from the same source. The 180 degree phase change is achieved with an inverting amplifier,
of unity gain.

In the block diagram of Figure 1 it is assumed, by convention, that the ADDER has unity
gain between each input and the output. Thus the output is y(t) of eqn.(2).

This diagram appears to satisfy the requirements for obtaining a null at the output. Now see
how we could model it with TIMS modules.

A suitable arrangement is illustrated in block diagram form in Figure 2.

Figure 2: The TIMS model of Figure 1.

Before you build this model with TIMS modules let us consider the procedure you might
follow in performing the experiment.

The ADDER

The annotation for the ADDER needs explanation. The symbol G near input A means the
signal at this input will appear at the output, amplified by a factor G. Similar remarks apply
to the input labeled g. Both G and g are adjustable by adjacent controls on the front
panel of the ADDER. But note that, like the controls on all of the other TIMS modules, these
controls are not calibrated. You must adjust these gains for a desired final result by
measurement.

Thus the ADDER output is not identical with eqn.(2), but instead:

ADDER output =g.v
1
(t) +G.v
2
(t) ........ 7
=V
1
sin2f
1
t +V
2
sin2f
2
t ........ 8

Conditions for a null

For a null at the output, sometimes referred to as a balance, one would be excused for
thinking that:

If:
1) the PHASE SHIFTER is adjusted to introduce a difference of 180
o
between its input and
output and
20

2) the gains g and G are adjusted to equality then
3) the amplitude of the output signal y(t) will be zero.

In practice the above procedure will almost certainly not result in zero output! Here is
the first important observation about the practical modeling of a theoretical concept.

In a practical system there are inevitably small impairments to be accounted for. For example,
the gain through the PHASE SHIFTER is approximately unity, not exactly so. It would thus
be pointless to set the gains g and G to be precisely equal. Likewise it would be a waste of
time to use an expensive phase meter to set the PHASE SHIFTER to exactly 180
o
, since there
are always small phase shifts not accounted for elsewhere in the model.

So we do not make precise adjustments to modules, independently of the system into which
they will be incorporated, and then patch them together and expect the system to behave.

All adjustments are made to the system as a whole to bring about the desired end result.

Experiment

You are now ready to model eqn. (1). The modeling is explained step-by-step as a series of
small tasks T.

Take these tasks seriously, now and in later experiments, and TIMS will provide you with
hours of stimulating experiences in telecommunications and beyond. The tasks are identified
with a T, are numbered sequentially, and should be performed in the order given.

T1 both channels of the oscilloscope should be permanently connected to the matching
coaxial connectors on the SCOPE SELECTOR.

T2 in this experiment you will be using three plug-in modules, namely: an AUDIO
OSCILLATOR, a PHASE SHIFTER, and an ADDER. Obtain one each of these.

Most modules can be controlled entirely from their front panels, but some have switches
mounted on their circuit boards. Set these switches before plugging the modules into the
TIMS SYSTEM UNIT; they will seldom require changing during the course of an
experiment.

T3 set the on-board range switch of the PHASE SHIFTER to LO. Its circuitry is designed to
give a wide phase shift in either the audio frequency range (LO), or the 100 kHz range (HI).
A few, but not many other modules have onboard switches. These are generally set, and
remain so set, at the beginning of an experiment.

Modules can be inserted into any one of the twelve available slots in the TIMS SYSTEM
UNIT. Choose their locations to suit yourself. Typically one would try to match their relative
locations as shown in the block diagram being modeled. Once plugged in, modules are in an
operating condition.

T4 plug the three modules into the TIMS SYSTEM UNIT.

21

T5 set the front panel switch of the FREQUENCY COUNTER to a GATE TIME of 1s. This is
the most common selection for measuring frequency.

When you become more familiar with TIMS you may choose to associate certain signals with
particular patch lead colors. For the present, choose any color which takes your fancy.

T6 connect a patch lead from the lower yellow (analog) output of the AUDIO OSCILLATOR
to the ANALOG input of the FREQUENCY COUNTER. The display will indicate the
oscillator frequency f
1
in kilohertz (kHz).

T7 set the frequency f
1
with the knob on the front panel of the AUDIO OSCILLATOR to
approximately 1 kHz (any frequency would in fact be suitable for this experiment).

T8 patch a lead from the lower analog output of the AUDIO OSCILLATOR to the input of the
PHASE SHIFTER.

T9 patch a lead from the output of the PHASE SHIFTER to the input G of the ADDER 2.

T10 patch a lead from the lower analog output of the AUDIO OSCILLATOR to the input g of
the ADDER.

T11 patch a lead from the input g of the ADDER to CH2-A of the SCOPE SELECTOR
module. Set the lower toggle switch of the SCOPE SELECTOR to UP.

T12 patch a lead from the input G of the ADDER to CH1-A of the SCOPE SELECTOR. Set
the upper SCOPE SELECTOR toggle switch UP.

T13 patch a lead from the output of the ADDER to CH1-B of the SCOPE SELECTOR. This
signal, y(t), will be examined later on.

Your model should be the same as that shown in Figure 4 below, which is based on Figure 2.
Note that in future experiments the format of Figure 2 will be used for TIMS models, rather
than the more illustrative and informal style of Figure 4, which depicts the actual flexible
patching leads.

You are now ready to set up some signal levels.

Figure 4: The TIMS model

T14 find the sine wave on CH1-A and, using the oscilloscope controls, place it in the upper
half of the screen.
22


T15 find the sine wave on CH2-A and, using the oscilloscope controls, place it in the lower
half of the screen. This will display, throughout the experiment, a constant amplitude sine
wave, and act as a monitor on the signal you are working with.

Two signals will be displayed. These are the signals connected to the two ADDER inputs.
One goes via the PHASE SHIFTER, which has a gain whose nominal value is unity; the
other is a direct connection. They will be of the same nominal amplitude.

T16 vary the COARSE control of the PHASE SHIFTER, and show that the relative phases of
these two signals may be adjusted. Observe the effect of the 180
0
toggle switch on the front
panel of the PHASE SHIFTER.

As part of the plan outlined previously it is now necessary to set the amplitudes of the two
signals at the output of the ADDER to approximate equality.

Comparison of eqn. (1) with Figure 2 will show that the ADDER gain control g will adjust
V
1
, and G will adjust V
2
.

You should set both V
1
and V
2
, which are the magnitudes of the two signals at the ADDER
output, at or near the TIMS ANALOG REFERENCE LEVEL, namely 4 volt peak-to-peak.
Now let us look at these two signals at the output of the ADDER.

T17 switch the SCOPE SELECTOR from CH1-A to CH1-B. Channel 1 (upper trace) is now
displaying the ADDER output.

T18 remove the patch cords from the g input of the ADDER. This sets the amplitude V
1
at the
ADDER output to zero; it will not influence the adjustment of G.

T19 adjust the G gain control of the ADDER until the signal at the output of the ADDER,
displayed on CH1-B of the oscilloscope, is about 4 volt peak to peak. This is V
2
.

T20 remove the patch cord from the G input of the ADDER. This sets the V
2
output from the
ADDER to zero, and so it will not influence the adjustment of g.

T21 replace the patch cords previously removed from the g input of the ADDER, thus
restoring V
1
.

T22 adjust the g gain control of the ADDER until the signal at the output of the ADDER,
displayed on CH1-B of the oscilloscope, is about 4 volt peak to peak. This is V
1
.

T23 replace the patch cords previously removed from the G input of the ADDER.

Both signals (amplitudes V
1
and V
2
) are now displayed on the upper half of the screen (CH1-
B). Their individual amplitudes have been made approximately equal. Their algebraic sum
may lie anywhere between zero and 8 volt peak-to-peak, depending on the value of the phase
angle . It is true that 8 volt peak-to-peak would be in excess of the TIMS ANALOG
REFERENCE LEVEL, but it won`t overload the oscilloscope, and in any case will soon be
reduced to a null.

23

Exercise

Before entering the realm of telecommunications (with the help of other experiments), there
are many equations familiar to you that can be modeled. For example, try demonstrating the
truth of typical trigonometric identities, such as:

cosA.cosB = [ cos(A-B) + cos(A+B) ]
sinA.sinB = [ cos(A-B) - cos(A+B) ]
sinA.cosB = [ sin(A-B) + sin(A+B) ]
cos2A = + cos2A
sin2A = - cos2A



MATLAB PORTION:

Q1. Implement the following equation on MATLAB and verify the results deduced from the
experiment. Draw its simulink diagram as well.

y(t) =V
1
sin(2f
1
t) +V
2
sin(2f
2
t + )
when =0 and =180





























24

Lab Grades

Total Marks Obtained Marks
Lab Performance
5
Knowledge about Lab
5
Values Obtained
(Accurate/Precise)
5
Lab Participation
5
Behavior in the Lab
5
Viva/Quiz/Assignment
5
Total
30

Comments


Date: ; Instructor Sig. .







25

LAB 3 DSBSC MODULATION AND DEMODULATION
Part A: DSBSC Generation
Modules

Basic: MULTIPLIER
Optional basic: AUDIO OSCILLATOR, ADDER

Preparation

A double sideband suppressed carrier (DSBSC) signal is defined as:

DSBSC = m(t).cost ........ 1

where typically the frequency components in m(t), the message, all lie well below the
frequency of . The DSBSC occupies a band of frequencies either side of , by amounts
equal to the bandwidth of m(t).

This is easy to show, for the simple case where m(t) =cost, by making the substitution and
expanding eqn(1) to eqn(2).

DSBSC = .cos(-)t + .cos(+)t ........ 2

Here the message source m(t) is shown as a single sinusoid. Its frequency () would typically
be much less than that of the carrier source ().

A snap-shot of the waveform of a DSBSC is shown in Figure 2, together with the message
from which it was derived.


Figure 1: DSBSC- seen in Time Domain


26

A block diagram, showing how eqn. (1) could be modeled with hardware, is shown in Figure
3 below.


Figure 2: block diagram to generate eqn. (1) with hardware.

Experiment

Model the block diagram of Figure 1 as shown in Figure 2. If an AUDIO OSCILLATOR is
not available, the 2 kHz MESSAGE from MASTER SIGNALS can be substituted. But this
would be a special case, since this message is synchronous with the carrier frequency.

Figure 3: The TIMS model of Figure 2

There should be no trouble in viewing the output of the above generator, and displaying it as
shown in Figure 4. Ideally the oscilloscope should be synchronized to the message waveform.

Figure 4: Typical display of a DSBCS and the message

This is not the same as the snap-shot illustrated in Figure 1. An oscilloscope with the ability
to capture and display the signal over a few message periods could reproduce the display of
Figure 1.
27


You can obtain the snap-shot-like display with a standard oscilloscope, provided the
frequency ratio of the message is a sub multiple of that of the carrier. This can be achieved
with difficulty by manual adjustment of the message frequency. A better solution is to use the
2 kHz MESSAGE from MASTER SIGNALS. The frequency of this signal is exactly 1/48 of
the carrier.

If an AUDIO OSCILLATOR is not available (the 2 kHz MESSAGE from MASTER
SIGNALS being used as the message) then the display of Figure 4 will not be possible.

Pilot carrier

For synchronous demodulators a local, synchronous carrier is required.



































28

Part B: DSBSC Product Demodulation
Modules

Basic: for the demodulator MULTIPLIER, PHASE SHIFTER, VCO
Basic: for the signal sources ADDER, MULTIPLIER, PHASE SHIFTER
Optional basic: AUDIO OSCILLATOR

Preparation

The product demodulator is defined by the block diagram of Figure 1.

Figure 1: a product demodulator

The carrier source must be locked in frequency to the carrier (suppressed or otherwise) of the
incoming signal. This will be arranged by stealing a carrier signal from the source of the
modulated signal. In practice this carrier signal must be derived from the received signal
itself, using carrier acquisition circuitry. This is examined in other Lab Sheets for example,
Carrier acquisition - PLL.

Remember that in the experiment to follow the message will be a single sine wave. This is
very useful for many measurements, but speech would also be very revealing. If you do not
have a speech source it is still possible to speculate on what the consequences would be.

Experiment

The block diagram of Figure 1 is shown modeled by TIMS in Figure 2. Not shown is the
source of input modulated signal, which you will have generated yourself. It will use the 100
kHz source from MASTER SIGNALS. This will also be the source of stolen carrier.

The sinusoidal message at the transmitter should be in the range 300 to 3000 kHz, say, to
cover the range of a speech signal. The 3 kHz LPF in the HEADPHONE AMPLIFIER is
compatible with this frequency range.
29


Figure 2: The TIMS model of Figure 1

Synchronous carrier

Initially use a stolen carrier; that is, one synchronous with the received signal.

DSBSC input

Notice that the phase of the stolen carrier plays a significant role. It can reduce the message
output amplitude to zero. It is not very useful here, but most desirable in other applications.
Think about it.
























30

Exercise:

Q1 How would you answer the question what is frequency of the signal y(t) =
E.cost.cost?
Q2 What would the FREQUENCY COUNTER read if connected to the signal y(t) =
E.cost.cost?
Q3 Is a DSBSC signal periodic?










































31

MATLAB PORTION:

Q1. Write the given code on MATLAB and verify the results of the performed experiment.
Draw its simulink diagram as well.

% Define the time interval
ts=0.00001;
t=-0.1:ts:0.1;
% Define the functions m(t) and c(t)
m=exp(-100*abs(t));
c=cos(2*pi*1000*t);
% Perform the multiplication
g=m.*c;
% for synchronous demodulation
y=g.*c;
% Create the filter
cutoff=500;
[a b]=butter(5,2*cutoff*ts);
% Get the output after the filter;
z=filter(a,b,y);
% Plot the input and output on the same graph
subplot(5,1,1)
plot(t,m)
title('Message Signal')
subplot(5,1,2)
plot(t,c)
title(' Carrier Signal')
figure (2)
subplot(5,1,3)
plot(t,g)
title('Modulated Signal')
subplot(5,1,4)
plot(t,y)
title('For demodulation')
subplot(5,1,5)
plot(t,z)
title('Recovered Signal')

Q2. Use MATLAB to simulate the following block diagram and attach the results.



32

Lab Grades

Total Marks Obtained Marks
Lab Performance
5
Knowledge about Lab
5
Values Obtained
(Accurate/Precise)
5
Lab Participation
5
Behavior in the Lab
5
Viva/Quiz/Assignment
5
Total
30

Comments


Date: ; Instructor Sig. .





33

LAB 4 AMPLITUDE MODULATION
Modules

Basic: ADDER, MULTIPLIER
Optional basic: AUDIO OSCILLATOR

Preparation

An amplitude modulated signal is defined as:

AM =(A +m(t) ) cost ........ 1
=m(t)cost+Acost ........ 2
=[low frequency term m(t)] x [high frequency term c(t)] ........ 3
Here:
A is the DC value. For modeling convenience eqn. (1) has been written into two parts in
eqn. (2).

Block diagram

Equation (1) can be represented by the block diagram of Figure 1.

Figure 1: Generation of AM

Model


Figure 2: Model of Figure 1

34

If no AUDIO OSCILLATOR is available the 2 kHz message from MASTER SIGNALS can
be used instead (although this is a special case, being synchronous with the carrier).

Experiment

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 3 illustrates what the
oscilloscope will show.

Figure 3: AM, with A=1, as seen on the oscilloscope

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:

m =

........ 4


Figure 4: 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 3. Note that Q =0 for the case m =1.

To vary the depth of modulation use the G gain control of the ADDER.
35


Notice that the envelope, or outline shape, of the AM signal of Figure 3 is the same as that
of the message provided that m 1.


Figure 5: the oscilloscope display for the case A = 0.5

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 (see opposite, for the case m =1.5). Note that eqn.(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 4.7: the AM envelope for m < 1 and m > 1



36

Exercise

Q1 There is no difficulty in relating the formula of eqn. (4) to the waveforms of Figure 4 for
values of m less than unity. But the formula is also valid for m > 1, provided the
magnitudes P and Q are interpreted correctly. By varying m, and watching the waveform,
can you see how P and Q are defined for m >1?

Q2 If the AC/DC switch on the MULTIPLIER front panel is switched to AC what will the
output of the model of Figure 6 become?

Q3 An AM signal, depth of modulation 100% from a single tone message, has a peak-to-peak
amplitude of 4 volts. What would an RMS voltmeter read if connected to this signal? You
can check your answer if you have a WIDEBAND TRUE RMS METER module.

Q6 When modeling AM, what difference would there have been to the AM from the
MULTIPLIER if the opposite polarity (+ve) had been taken from the VARIABLE DC
module?

































37

MATLAB PORTION:

Q1. Write the given code on MATLAB and verify the results of the performed experiment.
Draw its simulink diagram as well.

% Define the time interval
ts=0.00001;
t=-0.1:ts:0.1;
% Define the functions m(t) and c(t)
m=exp(-100*abs(t));
c=cos(2*pi*1000*t);
A=input('Enter the DC value');
% Perform the multiplication
g=(A+m).*c;
% for synchronous demodulation
y=g.*c;
% Create the filter
cutoff=500;
[a b]=butter(5,2*cutoff*ts);
% Get the output after the filter;
z=filter(a,b,y);
% Plot the input and output on the same graph
figure (1)
subplot(2,1,1)
plot(t,m)
title('Message Signal')
subplot(2,1,2)
plot(t,c)
title(' Carrier Signal')
figure (2)
subplot(3,1,1)
plot(t,g)
title('Modulated Signal')
subplot(3,1,2)
plot(t,y)
title('For demodulation')
subplot(3,1,3)
plot(t,z-(A/2))
title('Recovered Signal')

Q2. Change m(t) to 2+ sin(2 1000t) and c(t) to cos(2 10
4
t) and change the filter settings to obtain
the desired result.








38

Lab Grades

Total Marks Obtained Marks
Lab Performance
5
Knowledge about Lab
5
Values Obtained
(Accurate/Precise)
5
Lab Participation
5
Behavior in the Lab
5
Viva/Quiz/Assignment
5
Total
30

Comments


Date: ; Instructor Sig. .






39

LAB 5 ENVELOPE DETECTION
Modules

Basic: ADDER, MULTIPLIER, UTILITIES, TUNEABLE LPF
Optional basic: AUDIO OSCILLATOR, LPF

Preparation

An envelope detector is typically used for recovering the message from the envelope of an
amplitude modulated (AM) signal. In its most simple realization it consists of a diode, a
capacitor, and a resistor. This is an approximation to the ideal envelope detector, which
consists of a rectifier and a lowpass filter (LPF).

In this experiment the ideal realization will first be examined. This is illustrated in the block
diagram of Figure 1. The rectifier here operates as a device which generates the absolute
value of its input.


Figure 1: the ideal envelope recovery arrangement

The block diagram of Figure 1 is shown modeled in Figure 2.

Figure 2: Modeling the ideal envelope detector

Experiment

As an input to the envelope detector you will need to make yourself an AM signal. This can
be done with the message source from the MASTER SIGNALS module (or the optional
AUDIO OSCILLATOR), an ADDER, and a MULTIPLIER. See the Lab Sheet entitled
amplitudemodulation.

40

With say a 2 kHz message to the AM generator, a depth of modulation of about 50%, and the
LPF of the envelope detector set to as wide a bandwidth as possible (about 12 kHz), show
that the envelope detector output is indeed a faithful copy of the message.

Now investigate the following:

1. Increase the depth of modulation to 100%

2. Increase the depth of modulation beyond 100%. Even though the envelope of the
input signal is no longer a faithful copy of the message, the output of the envelope
detector should still be a faithful copy of the envelope. However, this will only be so
if the bandwidth of the LPF is wide enough. How wide?

3. Remove the DC component from the ADDER of the AM generator. This makes a
double sideband suppressed carrier (DSBSC) signal. Even if you have not met this
signal before you can still observe if the envelope detector can recover its envelope.

Once again, the bandwidth of the LPF must be appropriate.

The diode detector

In practice the envelope detector is often realized with only a single diode and RC filter. This
can also be modeled with TIMS, as shown in Figure 3.

Figure 3: approximation to an ideal envelope detector

Repeat the observations made previously with the ideal realization of the envelope detector.
Note and explain the difference in performance.

Remember that the diode detector requires a number of approximations to be met, including
that the carrier frequency should be very much larger than the message frequency.





41

Exercise:

Q1 An analysis of the ideal envelope detector is given in the Appendix to this experiment.
What are the conditions for there to be no distortion components in the recovered envelope?

Q2 Analyze the performance of a square-law device as an envelope detector, assuming an
ideal filter may be used. Are there any distortion components in the recovered envelope?

Q3 Explain the major difference differences in performance between envelope detectors with
half and full wave rectifiers.

Q4 Define what is meant by selective fading. If an amplitude modulated signal is
undergoing selective fading, how would this affect the performance of an envelope detector
as a demodulator?




































42


MATLAB PORTION:

Q1. Write the given code on MATLAB and verify the results of the performed experiment.
Draw its simulink diagram as well.

% Define the time interval
ts=0.00001;
t=-0.1:ts:0.1;
% Define the functions m(t) and c(t)
m=cos(2*pi*10*t);
c=cos(2*pi*1000*t);
A=input('Enter the DC value');
% Perform the multiplication
g=(A+m).*c;
% for asynchronous demodulation
%rectification
y1=abs(y);
% Create the filter
cutoff=500;
[a b]=butter(5,2*cutoff*ts);
% Get the output after the filter;
z=filter(a,b,y1);
% Plot the input and output on the same graph
figure (1)
subplot(2,1,1)
plot(t,m)
title('Message Signal')
subplot(2,1,2)
plot(t,c)
title(' Carrier Signal')
figure (2)
subplot(3,1,1)
plot(t,g)
title('Modulated Signal')
subplot(3,1,2)
plot(t,y)
title('For demodulation')
subplot(3,1,3)
plot(t,(z-A/2))
title('Recovered Signal')

Q2. Use MATLAB to generate and display an AM wave for 100% modulation, under modulation and
over modulation.

Carrier frequency, f
c
5kHz
Amplitude carrier frequency, A
c
9




43

Lab Grades

Total Marks Obtained Marks
Lab Performance
5
Knowledge about Lab
5
Values Obtained
(Accurate/Precise)
5
Lab Participation
5
Behavior in the Lab
5
Viva/Quiz/Assignment
5
Total
30

Comments


Date: ; Instructor Sig. .





44

LAB 6 SSB MODULATION AND DEMODULATION
Part A: SSB Generation
Modules

Basic: ADDER, AUDIO OSCILLATOR, 2 x MULTIPLIER, PHASE SHIFTER, QPS

Preparation

Figure 1: SSB Generation using band pass filter

A double sideband suppressed carrier (DSBSC) signal can be converted to a single sideband
by the removal of one sideband. The most obvious method of sideband removal is with a
bandpass filter as shown in Figure 1 above. This is simple in conception, yet requires a far-
from-simple filter for its execution. See historical note below.

A second method of sideband removal is to make two DSBSC 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 2.

Figure 2: SSB Generation using the phasing method

The block labeled 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 be clear that this phase relationship must be maintained over the bandwidth of
the message. So it is a wideband phase splitter.

45

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
0
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.

Experiment

The arrangement of Figure 3 is a model of the block diagram of Figure 2.

Figure 3: 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
volt peak-to-peak) Then replace both ADDER inputs, and watch the ADDER output 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 be 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 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.

Vary the message frequency and see if the system performs adequately over the full
frequency range available. Which module is most likely to limit the system bandwidth?

Historical note: Today, it is a digital world. Frequency division multiplex (FDM) has been almost entirely replaced by time
division multiplexing (TDM). As the FDM systems were de-commissioned, the market was flooded with SSB filters. Some
were in the range 64 to 108 kHz. They were ideal for TIMS, and very cheap. Unfortunately the supply has dried up, and
currently available SSB filters for TIMS are prohibitively expensive. Thus for SSB purposes, TIMS uses the less expensive
QPS.
46

Part B: SSB Demodulation
Modules:

Basic: for demodulation ADDER, 2 x MULTIPLIER, QPS
Basic: for transmission VCO

Preparation

An SSB signal can be demodulated with a product demodulator. But a product demodulator
is not an SSB demodulator in the strict sense. A true SSB demodulator can distinguish
between a lower sideband and an upper sideband.

This experiment investigates the phasing type demodulator, block diagrams of which are
shown in Figure 1. It would be helpful, though not essential, that the Lab Sheet entitled SSB
generation has been completed.

Figure 4: ideal (left) and practical (right) phasing-type SSB demodulator

The 90 degree phase shifter in the lower - Q - arm of the structure (left block) needs to
introduce a 90 degree phase shift over all frequencies of interest. In this case these are those
of the message. Such a filter is difficult to realize. A practical solution is the quadrature
phase splitter - QPS - shown in the right block. This maintains a 90 degree shift between its
outputs, although the phase difference between one input and either output varies with
frequency. This variation is acceptable when the message is speech.

Note that ideally there should be identical lowpass filters in each multiplier output. In
practice a single lowpass filter is inserted in the summing output.

The practical advantage of this is a saving of components (modules). One disadvantage of
this is that the QPS will be presented with larger-than-necessary signals at its inputs the
unwanted sum frequency components as well as the wanted difference frequency
components. Unwanted components increase the risk of overload.

Experiment

A model of the block diagram of Figure 1 is shown in Figure 2.
47


Figure 5: 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):

1. Examine the waveforms throughout the model. Most will be un-familiar.

2. Use the oscilloscope to set the phase shift through the PHASE SHIFTER to about 90
0
.

3. With only one input at a time into the ADDER, set its output to say 2 volt peak-to-
peak.

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. So why bother with the complication of using
the QPS for SSB reception?




48

Exercise:

Q1 What simple modification(s) to your model would change the output from the current to
the opposite sideband?
Q2 With knowledge of the model configuration, and the individual module properties,
determine analytically which sideband (USSB or LSSB) the model should generate. Check
this against the measured result.
Q3 Why are mass produced (and, consequently, affordable) 100 kHz SSB filters not available
in the 1990s?
Q4 What sort of phase error could the arrangement of Figure 4 detect?
Q5 Is the QPS an approximation to the Hilbert transformer? Explain.
Q6 Suggest a simple test circuit for checking QPS modules on the production line.
Q7 Sketch the output of an SSB transmitter, as seen in the time domain, when the message is
two audio tones of equal amplitude. Discuss.
Q8 Devise an application for the QPS not connected with SSB.















49

MATLAB PORTION

Q1. Write the given code on MATLAB and verify the results of the performed experiment.
Draw its simulink diagram as well.

% Define the time interval
ts=0.00001;
t=-0.1:ts:0.1;

% Define the functions m(t) and c(t)
m=2*sin(2*pi*5*t);
c=2*sin(2*pi*300*t);

mh=2*sin((2*pi*5*t)+(pi/2));
ch=2*sin((2*pi*300*t)+(pi/2));

md=m.*c;
modh=mh.*ch;
mod=md+modh;

subplot(5,1,1)
plot(t,m)
title('message signal');

subplot(5,1,2)
plot(t,mh)
title('hilbert message signal');

subplot(5,1,3)
plot(t,md)
title('modulated signal');

subplot(5,1,4)
plot(t,modh)
title('modulated hilbert signal');

subplot(5,1,5)
plot(t,mod)
title('SSB modulated signal');













50

Lab Grades

Total Marks Obtained Marks
Lab Performance
5
Knowledge about Lab
5
Values Obtained
(Accurate/Precise)
5
Lab Participation
5
Behavior in the Lab
5
Viva/Quiz/Assignment
5
Total
30

Comments


Date: ; Instructor Sig. .






51

LAB 7 CARRIER ACQUISITION PLL
Modules

Basic: MULTIPLIER, UTILITIES, VCO
Extra basic: modules are required to generate the signal of your choice from which the
carrier can be acquired.

Preparation

There is generally a need, at the receiver, to have a copy of the carrier which was used at the
transmitter.

This need is often satisfied, in a laboratory situation, by using a stolen carrier. This is easily
done with TIMS. But in commercial practice, where the receiver is remote from the
transmitter, this local carrier must be derived from the received signal itself.

The use of a stolen carrier in the TIMS environment is justified by the fact that it enables the
investigator (you) to concentrate on the main aim of the experiment, and not be side-tracked
by complications which might be introduced by the carrier acquisition scheme. The
experiment described here illustrates the use of the phase locked loop - PLL - as a tracking
filter to acquire the carrier from a signal which already contains a small, or pilot, carrier
component.

Figure 1: the basic PLL

Consider the arrangement of Figure 1 in open loop form; that is, the connection between the
filter output and VCO control voltage input is broken.

Suppose there is an un-modulated carrier at the input.

The arrangement is reminiscent of a product demodulator. If the VCO was tuned precisely to
the frequency of the incoming carrier, =0 say, then the output would be a DC voltage, of
magnitude depending on the phase difference between itself and the incoming carrier.
For two angles within the 360
0
range the output would be precisely zero volts DC.

Now suppose the VCO started to drift slowly off in frequency. Depending upon which way it
drifted, the output voltage would be a slowly varying AC, which if slow enough looks like a
varying amplitude DC. The sign of this DC voltage would depend upon the direction of drift.
52


Suppose now that the loop of Figure 1 is closed. If the sign of the slowly varying DC voltage,
now a VCO control voltage, is so arranged that it is in the direction to urge the VCO back to
the incoming carrier frequency =0, then the VCO would be encouraged to lock on to the
incoming carrier. The carrier has been acquired.



Matters become more complicated if the incoming signal is now modulated. Refer to your
course work. In the laboratory you can make a model of the PLL, and demonstrate that it is
able to derive a carrier from a DSB signal which contains a pilot carrier.

You will now model the PLL of Figure 1, and use a DSB plus small carrier (Figure 2) as its
input. The arrangement is shown modeled in Figure 3.


Figure 2: DSB plus small carrier



Figure 3: a model of PLL of Figure 1





53

1. Set the VCO into VCO mode (check SW2 on the circuit board).

2. Patch up a suitable input signal based on a 100 kHz carrier - say a DSBSC +pilot
carrier.

3. Patch up the model of Figure 2 above.

4. Initially set the GAIN of the VCO fully anti-clockwise.

5. Tune the VCO close to 100 kHz. Observe the 100 kHz signal from MASTER
SIGNALS on CH1-A, and the VCO output on CH2-A. Synchronize the oscilloscope
to CH1-A. The VCO signal will not be stationary on the screen.

6. Slowly advance the GAIN of the VCO until lock is indicated by the VCO signal
(CH2- A) becoming stationary on the screen. If this is not achieved then reduce the
GAIN to near-zero (advanced say 5% to 10% of full travel) and tune the VCO closer
to 100 kHz, while watching the oscilloscope. Then slowly increase the GAIN again
until lock is achieved.

7. While watching the phase between the two 100 kHz signals, tune the VCO from
outside lock on the low frequency side, to outside lock on the high frequency side.
Whilst in lock, note (and record) the phase between the two signals as the VCO is
tuned through the lock condition.

8. Try removing the pilot carrier entirely from the incoming signal. For a single tone
message you may find a carrier can still be acquired!

Other measurements

Analysis of the PLL is a non-trivial exercise. This experiment has been an introduction only.
Find out about the many properties associated with the PLL, and consider how you might go
about measuring some of them.



MATLAB PORTION:

Q1. Draw the Simulink diagram of figure 1 and attach the results.











54

Lab Grades

Total Marks Obtained Marks
Lab Performance
5
Knowledge about Lab
5
Values Obtained
(Accurate/Precise)
5
Lab Participation
5
Behavior in the Lab
5
Viva/Quiz/Assignment
5
Total
30

Comments


Date: ; Instructor Sig. .






55

LAB 8 FM GENERATION AND DEMODULATION
Part A: FM Generation
Modules:

Basic: VCO
Optional basic: AUDIO OSCILLATOR

Preparation

A very simple and direct method of generating an FM signal is by the use of a voltage
controlled oscillator VCO. The frequency of such an oscillator can be varied by an amount
proportional to the magnitude of an input (control) voltage. Such oscillators, in the form of an
integrated circuit, have very linear characteristics over a frequency range which is a
significant percentage of the centre frequency.

Despite the above desirable characteristic, the VCO fails in one respect as a generator of FM
the stability of its centre frequency is not acceptable for most communication purposes. It is
hardly necessary to show the block diagram of such an FM generator! See Figure 1(a).

Figure 1: FM by VCO (a) and resulting output (b)

Figure 1(b) shows a snap shot time domain display of an FM signal, together with the
message from which it was derived. The frequency change is large compared with the un-
modulated output frequency, and the carrier frequency is only four times that of the message.
So this waveform is not a typical one. But it can be reproduced with TIMS.

Note particularly that there are no amplitude variations the envelope of an FM waveform is
a constant.

Experiment


Figure 2: FM generation by VCO
56

A model of the VCO method of generation is shown in Figure 2. Note that the on-board
switch SW2 must be set to VCO.

The message is shown coming from an AUDIO OSCILLATOR, but the 2 kHz sine wave
from MASTER SIGNALS can be used instead.

Deviation calibration

Before generating an FM waveform it is interesting to determine the deviation sensitivity
and linearity of the VCO.

Use the front panel f
0
control to set the output frequency close to 100 kHz.

Instead of using a sine wave as the message, connect instead the VARIABLE DC voltage to
the input V
IN
of the VCO.

The deviation sensitivity can be set with the front panel GAIN control. Set this to about 20%
of its fully clockwise rotation.

Vary the VARIABLE DC at the V
IN
socket of the VCO and plot frequency variation versus
both negative and positive values of V
IN
. If this is reasonably linear over the full DC range
then increase the GAIN control (sensitivity) setting of the VCO and repeat. The aim is to
determine the extent of the linear range, restricting the DC voltage to the TIMS ANALOG
REFERENCE LEVEL of 4 volt peak-to-peak.

10 kHz deviation

Using the previous results, set up the VCO to a 10 kHz frequency deviation from a signal at
the TIMS ANALOG REFERENCE LEVEL of 4 volts peak-to-peak.

Alternatively:

1. Set the DC voltage to 2 volts

2. Set the GAIN control fully anti-clockwise, and the output frequency to 100 kHz

3. Advance the GAIN control until the frequency changes by 10 kHz.

Sinusoidal messages

Replace the DC voltage source with the output from an AUDIO OSCILLATOR. The
frequency deviation will now be about 10 kHz, since the oscillator output is about 2 volt
peak.

To display a waveform of the type illustrated in Figure 1(b) is not easy with a basic
oscilloscope, but glimpses may be obtained by slowly varying the message frequency over the
range say 1.5 kHz to 2.5 kHz.

57

Part B: FM Demodulation by PLL
Modules:

Basic: for demodulation MULTIPLIER, UTILITIES, VCO
Basic: for generation VCO

Preparation

This experiment examines the phase locked loop as an FM demodulator. Figure 1 shows a
block diagram of the arrangement to be examined.

Figure 1: the PLL

The principle of operation is simple or so it would appear. Consider the arrangement of
Figure 1 in open loop form. That is, the connection between the filter output and VCO control
voltage input is broken.

Suppose there is an un-modulated carrier at the input.

The arrangement is reminiscent of a product, or multiplier-type, demodulator. If the VCO
was tuned precisely to the frequency of the incoming carrier,
0
say, then the output would
be a DC voltage, of magnitude depending on the phase difference between itself and the
incoming carrier.

For two angles within the 360
0
range the output would be precisely zero volts DC.

Now suppose the VCO started to drift slowly off in frequency. Depending upon which way it
drifted, the output voltage would be a slowly varying AC, which if slow enough looks like a
varying amplitude DC. The sign of this DC voltage would depend upon the direction of drift.

Suppose now that the loop of Figure 1 is closed. If the sign of the slowly varying DC voltage,
now a VCO control voltage, is so arranged that it is in the direction to urge the VCO back to
the incoming carrier frequency
0
, then the VCO would be encouraged to lock on to the
incoming carrier. This is a method of carrier acquisition.

Next suppose that the incoming carrier is frequency modulated. For a low frequency
message, and small deviation, you can imagine that the VCO will endeavor to follow the
incoming carrier frequency. What about wideband FM? With appropriate design of the
lowpass filter and VCO circuitry the VCO will follow the incoming carrier for this too.

58


The above concepts can be examined by modeling a PLL.

Experiment

To test the PLL use the output from the generator described in the Lab Sheet entitled FM
generation. Set up the generator as described there, with a carrier in the vicinity of 100 kHz.
Set it to a known frequency deviation. Then:

1. Model the demodulator as illustrated in Figure 2.

Figure 2: the PLL model

2. Set up the VCO module in 100 kHz VCO mode. In the first instance set the front
panel GAIN control to its mid-range position.

3. Connect the output of the generator to the input of the demodulator

4. The PLL may or may not at once lock on to the incoming FM signal. This will depend
upon several factors, including:

the frequency to which the PLL is tuned
the capture range of the PLL
the PLL loop gain the setting of the front panel GAIN control of the VCO

You will also need to know what method you will use to verify that lock has taken place.

5. Make any necessary adjustments to the PLL to obtain lock, and record how this was
done. Measure the amplitude and frequency of the recovered message (if periodic), or
otherwise describe it (speech or music?).

6. Compare the waveform and frequency of the message at the transmitter, and the
message from the demodulator.

7. Check the relationship between the message amplitude at the transmitter, and the
message amplitude from the demodulator.
59

Exercise

Q1 Define capture range, lock range, demodulation sensitivity of the PLL as an FM
demodulator. What other parameters are important?
Q2 How does the sensitivity of the VCO, to the external modulating signal, determine the
performance of the demodulator?
Q3 What is the significance of the bandwidth of the LPF in the phase locked loop?

MATLAB PORTION:

Q1. Draw the Simulink diagram of the above experiment and attach the results.

































60

Lab Grades

Total Marks Obtained Marks
Lab Performance
5
Knowledge about Lab
5
Values Obtained
(Accurate/Precise)
5
Lab Participation
5
Behavior in the Lab
5
Viva/Quiz/Assignment
5
Total
30

Comments


Date: ; Instructor Sig. .



61

LAB 9 ANGLE MODULATION




















62

LAB 10 QAM MODULATION AND DEMODULATION
Part A: QAM Modulation
Modules

Basic: ADDER, AUDIO OSCILLATOR, 2 x MULTIPLIER

Preparation

Consider the block diagram of Figure 1. It is a quadrature modulator.

Figure 1: a quadrature modulator

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 latter it is often called a quadrature phase shift keyed (QPSK)
modulator.

This Lab Sheet investigates 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.

Note that the two paths into the ADDER are labeled I and Q. This refers to the phasing of
the DSBSC - in phase and quadrature.

Experiment

Figure 2 shows a model of the block diagram of Figure 1.
63

Figure 2: QAM generation- the model of Figure 1

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?






64

Part B: QAM Demodulation
Modules

Basic: MULTIPLIER, PHASE SHIFTER
Extra basic: for the transmitter: ADDER, AUDIO OSCILLATOR, 2 x MULTIPLIER

Preparation

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 1.

Figure 1: a QAM demodulator

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 be constructed.

Figure 2

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

Experiment

Transmitter
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.

Receiver
A model of the block diagram of Figure 2, which is a demodulator, or receiver, is shown in
Figure 3.


Figure 3: channel A or B demodulator

The 100 kHz carrier (sint or cost) 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 message A (if not, flip the 180
0
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. When this minimum is achieved then what
remains, by default, is the wanted 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.
66

Phase division 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.








































67

Exercise:
Q1. Explain how a QAM system conserves bandwidth.
Q2. The modulator used the quadrature 100 kHz outputs from the MASTER SIGNALS
module. Did it matter if these were not precisely in quadrature? Explain.
MATLAB PORTION:
Q1. Write the given code on MATLAB and verify the results of the performed experiment.
Draw its simulink diagram as well.


















68

Lab Grades

Total Marks Obtained Marks
Lab Performance
5
Knowledge about Lab
5
Values Obtained
(Accurate/Precise)
5
Lab Participation
5
Behavior in the Lab
5
Viva/Quiz/Assignment
5
Total
30

Comments


Date: ; Instructor Sig. .



69

LAB 11 THE SAMPLING THEOREM

Modules:
AUDIO OSCILLATOR, TWIN PULSE GENERATOR, DUAL ANALOG SWITCH, LOW
PASS FILTER

PREPARATION
A sample is part of something. How many samples of something does one need, in order to
be able to deduce what the something is? If the something was an electrical signal, say a
message, and then the samples could be obtained by looking at it for short periods on a
regular basis. For how long must one look, and how often, in order to be able to work out the
nature of the message whose samples we have - to be able to reconstruct the message from its
samples?
Suppose it was convenient to transmit these samples down a channel. If the samples were
short, compared with the time between them, and made on a regular basis -periodically -
there would be lots of time during which nothing was being sent. This time could be used for
sending something else, including a set of samples taken of another message, at the same rate,
but at slightly different times. And if the samples were narrow enough, further messages
could be sampled, and sandwiched in between those already present. J ust how many
messages could be packed into the channel?
The answers to many of these questions will be discovered during the course of this
experiment.
The sampling theorem defines the conditions for successful sampling, of particular interest
being the minimum rate at which samples must be taken. You should be reading about it in a
suitable text book. A simple analysis is presented in Appendix A to this experiment.

This experiment is designed to introduce you to some of the fundamentals, including
determination of the minimum sampling rate for distortion-less reconstruction.

EXPERIMENT
Taking samples:

In the first part of the experiment you will set up the arrangement illustrated in Figure 1.
Conditions will be such that the requirements of the Sampling Theorem, not yet given, are
met. The message will be a single audio tone.
70


Figure 1: sampling a sine wave
To model the arrangement of Figure 1 with TIMS the modules required are a TWIN PULSE
GENERATOR (only one pulse is used), to produce s(t) from a clock signal, and a DUAL
ANALOG SWITCH (only one of the switches is used). The TIMS model is shown in Figure
2 below.


Figure 2: the TIMS model of Figure 1

T1 Patch up the model shown in Figure 2 above. Include the oscilloscope connections. Note
the oscilloscope is externally triggered from the message.
Note: the oscilloscope is shown synchronized to the message. Since the message frequency
is a sub-multiple of the sample clock, the sample clock could also have been used for this
purpose. However, later in the experiment the message and clock are not so related. In that
case the choice of synchronization signal will be determined by just what details of the
displayed signals are of interest. Check out this assertion as the experiment proceeds.
T2 View CH1-A and CH2-A, which are the message to be sampled, and the samples
themselves. The sweep speed should be set to show two or three periods of the message on
CH1-A.
71

T3 Adjust the width of the pulse from the TWIN PULSE GENERATOR with the pulse width
control. The pulse is the switching function s(t), and its width is t. You should be able to
reproduce the sampled waveform of Figure 3.
Your oscilloscope display will not show the message in dashed form (!), but you could use
the oscilloscope shift controls to superimpose the two traces for comparison.

Figure 3: four samples per period of a sine wave.

Please remember that this oscilloscope display is that of a VERY SPECIAL CASE, and is
typical of that illustrated in text books.

The message and the samples are stationary on the screen.

This is because the frequency of the message is an exact sub-multiple of the sampling
frequency. This has been achieved with a message of (100/48) kHz, and a sampling rate of
(100/12) kHz.
In general, if the oscilloscope is synchronized to the sample clock, successive views of the
message samples would not overlap in amplitude. Individual samples would appear at the
same location on the time axis, but samples from successive sweeps would be of different
amplitudes. You will soon see this more general case.
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.
Reconstruction / Interpolation:

Having generated a train of samples, now observe that it is possible to recover, or reconstruct
(or interpolate) the message from these samples.
From 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 would seem the obvious choice to extract the message. This can be checked
by experiment.
Later in this experiment you will discover the properties this filter is required to have, but for
the moment use the 3 kHz LPF from the HEADPHONE AMPLIFIER.
The reconstruction circuitry is illustrated in Figure 4.
72


Figure 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.
T4 Connect the message samples, from the output of the DUAL ANALOG SWITCH, to the
input of the 3 KHz LPF in the HEADPHONE AMPLIFIER module, as shown in the patching
diagram of Figure 2.
T5 Switch to CH2-B and there is the message. Its amplitude may be a little small, so use the
oscilloscope CH2 gain control. If you choose to use a BUFFER AMPLIFIER, place it at the
output of the LPF. Why not at the input?
The sample width selected for the above measurements was set arbitrarily at about 20% of
the sampling period. What are the consequences of selecting a different width?
Sample width:

Apart from varying the time interval between samples, what effect upon the message
reconstruction does the sample width have? This can be determined experimentally.
T6 Vary the width of the samples, and report the consequences as observed at the filter
output
Reconstruction filter bandwidth:

Demonstrating that reconstruction is possible by using the 3 kHz LPF within the
HEADPHONE AMPLIFIER was perhaps cheating slightly? Had the reconstructed message
been distorted, the distortion components would have been removed by this filter, since the
message frequency is not far below 3 kHz itself.
T7 Replace the 2 kHz message from the MASTER SIGNALS module with one from an AUDIO
OSCILLATOR. In the first instance set the audio oscillator to about 2 kHz, and observe CH1-
A and CH2-A simultaneously as you did in an earlier Task. You will see that the display is
quite different.
The individual samples are no longer visible -the display on CH2-A is not stationary.
T8 Change the oscilloscope triggering to the sample clock. Report the results.
T9 Return the oscilloscope triggering to the message source. Try fine adjustments to the
message frequency (sub-multiples of the sampling rates).
This time you have a different picture again - the message is stationary, but the samples are
not. You can see how the text book display is just a snap shot over a few samples, and not a
73

typical oscilloscope display unless there is a relationship between the message and sampling
rate.
It is possible, as the message frequency is fine tuned, to achieve a stationary display, but only
for a moment or two.
Now that you have a variable frequency message, it might be worthwhile to recheck the
message reconstruction.
T10 Look again at the reconstructed message on CH2-B. Lower the message frequency, so
that if any distortion products are present (harmonics of the message) they will pass via the 3
kHz LPF.
Pulse shape:

You have been looking at a form of pulse amplitude modulated (PAM) signal. If this
sampling is the first step in the conversion of the message to digital form, the next step would
be to convert the pulse amplitude to a digital number. This would be pulse code modulation
(PCM).
The importance of the pulse shape will not be considered in this experiment. We will
continue to consider the samples as retaining their shapes (as shown in the Figure 3, for
example). Your measurements should show that the amplitude of the reconstituted message is
directly proportional to the width of the samples.
To find minimum sampling rate:

Now that you have seen that an analog signal can be recovered from a train of periodic
samples, you may be asking:

What is the slowest practical sampling rate for the recovery process to be successful?

The sampling theorem was discovered in answer to this question. You are invited now to re-
enact the discovery:
Use the 3 kHz LPF as the reconstruction filter. The highest frequency message that
this will pass is determined by the filter passband edge f
c
, nominally 3 kHz.
Set the message frequency to f
c
.
Use the VCO to provide a variable sampling rate, and reduce it until the message can
no longer be reconstructed without visible distortion.
Use, in the first instance, a fixed sample width t, say 20% of the sampling period.
The above procedure will be followed soon; but first there is a preparatory measurement to be
performed.


74

PREPARATION
MDSDR (Maximum Detectable Signal-to-Distortion Ratio):

In the procedure to follow you are going to report when it is just visibly obvious, in the time
domain, when a single sine wave has been corrupted by the presence of another. You will use
frequencies which will approximate those present during a later part of the experiment.
The frequencies are:
Wanted component - 3 kHz
Unwanted component - 4 kHz

Suppose initially the amplitude of the unwanted signal is zero volt. While observing the
wanted signal, in the time domain, how large amplitude would the unwanted signals have to
become for its presence to be (just) noticed?

Knowledge of this phenomenon will be useful to you throughout your career. An estimate of
this amplitude ratio will now be made with the model illustrated in Figure 5.


Figure 5: corruption measurement

T11 Obtain a VCO module. Set the FSK -VCO switch, located on the circuit board, to
'VCO'. Set the front panel HI -LO switch to LO. Then plug the module into a convenient
slot in the TIMS unit.
T12 Model the block diagram of Figure 5. Use a VCO and an AUDIO OSCILLATOR for the
two sine waves. Reduce the unwanted signal to zero at the ADDER output. Set up the wanted
signal output amplitude to say 4 volt peak-to-peak. Trigger the oscilloscope to the source of
this signal. Increase the amplitude of the unwanted signal until its presence is just obvious on
the oscilloscope. Measure the relative amplitudes of the two signals at the ADDER output.
This is your MDSDR -the maximum detectable signal-to-distortion ratio. It would typically be
quoted in decibels.
Use of MDSDR:

Consider the spectrum of the signal samples. Refer to Appendix A of this experiment if
necessary.
75

Components in the lower end of the spectrum of the sampled signal are shown in Figure 6
below. It is the job of the LPF to extract the very lowest component, which is the message
(here represented by a single tone at frequency rad/s).

Figure 6: lower end of the spectrum of the sampled signal

During the measurement to follow, the frequency will be gradually reduced, so that the
unwanted components move lower in frequency towards the filter passband.
You will be observing the wanted component as it appears at the output of the LPF. The
closest unwanted component is the one at frequency ( -) rad/s.
Depending on the magnitude of , this component will be either:
1. Outside the filter passband, and not visible in the LPF output (as in Figure 6)
2. In the transition band, and perhaps visible in the LPF output
3. Within the filter passband, and certainly visible in the LPF output
Assuming both the wanted and unwanted components have the same amplitudes, the
presence of the unwanted component will first be noticed when falls to the frequency
marked on the transition band of the LPF. This equals, in decibels, the MDSDR.
T13 Measure the frequency of your LPF at which the attenuation, relative to the passband
attenuation, is equal to the MDSDR. Call this f
MDSDR
.

Minimum Sampling Rate Measurement:

T14 Remove the patch lead from the 8.333 kHz SAMPLE CLOCK source on the MASTER
SIGNALS module, and connect it instead to the VCO TTL OUTPUT socket. The VCO is now
the sample clock source.

T15 Use the FREQUENCY COUNTER to set the VCO to 10 kHz or above.

T16 Use the FREQUENCY COUNTER to set the AUDIO OSCILLATOR to f
c
, the edge of the
3 kHz LPF passband.

T17 Synchronize the oscilloscope to the sample clock. Whilst observing the samples, set the
sample width t to about 20% of the sampling period.

76

The sampling theorem states, inter alia, that the minimum sampling rate is twice the
frequency of the message.

Under the above experimental conditions, the sampling rate is well above this minimum.

T18 Synchronize the oscilloscope to the message, direct from the AUDIO OSCILLATOR, and
confirm that the message being sampled, and the reconstructed message, is identical in shape
and frequency (the difference in amplitudes is of no consequence here).

It is now time to determine the minimum sampling rate for undistorted message
reconstruction.

T19 Whilst continuing to monitor both the message and the reconstructed message, slowly
reduce the sampling rate (the VCO frequency). As soon as the message shows signs of
distortion (aliasing distortion), increase the sampling rate until it just disappears. The
sampling rate will now be the minimum possible.

T20 Calculate the frequency of the unwanted component. It will be the just-measured
minimum sampling rate, minus the message frequency. How does this compare with f
MDSDR

measured in Task 13?

T21 Compare your result with that declared by the sampling theorem. Explain discrepancies!

Further measurements:

A good engineer would not stop here. Whilst agreeing that it is possible to sample and
reconstruct a single sine wave, he would call for a more demanding test. Qualitatively he
might try a speech message. Quantitatively he would probably try a two-tone test signal.
Whatever method he tries, he would make sure he used a band-limited message. He will then
know the highest frequency contained in the message, and adjust his sampling rate with
respect to this.
If you have bandlimited speech available at TRUNKS, or a SPEECH MODULE, you should
repeat the measurements of the previous section.
The Two Tone Test Message:

A two-tone test message consists of two audio tones added together.
You can make a two-tone test signal by adding the output of an AUDIO OSCILLATOR to
the 2 kHz message from the MASTER SIGNALS module.
There may be a two-tone test signal at TRUNKS, or use a SPEECH Module.
Summing up:

You have been introduced to the principles of sampling and reconstruction.
The penalty for selecting too low a sampling rate was seen as distortion of the recovered
message. This is known as aliasing distortion; the filter has allowed some of the unwanted
components in the spectrum of the sampled signal to reach the output. Analysis of the
77

spectrum can tell you where these have come from, and so how to re-configure the system -
more appropriate filter, or faster sampling rate? In the laboratory you can make some
independent measurements to reach much the same conclusions.
In a practical situation it is necessary to:

1. Select a filter with a passband edge at the highest message frequency, and a stopband
attenuation to give the required signal to noise-plus-distortion ratio.

2. Sample at a rate at least equal to the filter slot band width plus the highest message
frequency. This will be higher than the theoretical minimum rate. Can you see how
this rate was arrived at?





















78

TUTORIAL QUESTIONS

Q1 Even if the signal to be sampled is already bandlimited, why is it good practice to include
an anti-aliasing filter?

Q2 In the experiment the patching diagram shows that the non-delayed pulse was taken from
the TWIN PULSE GENERATOR to model the switching function s(t). What differences
would there have been if the delayed pulse had been selected? Explain.
Q3 Consider a sampling scheme as illustrated in Figure 1. The sampling rate is determined by
the distance between the pulses of the switching function s (t). Assume the message was
reconstructed using the scheme of Figure 4.
Suppose the pulse rate was slowly increased, whilst keeping the pulse width fixed. Describe
and explain what would be observed at the low pass filter output.


















79

Lab Grades
Total Marks Obtained Marks
Lab Performance
10
Knowledge about Lab
5
Values Obtained
(Accurate/Precise)
5
Lab Participation 5
Viva/Quiz/Assignment
5
Total
25

Comments


Date: ; Instructor Sig. .



80

LAB 12 PCM ENCODING AND DECODING
Modules:

PCM ENCODER, WIDEBAND TRUE RMS METER, PCM DECODER

PREPARATION PCM ENCODING
PCM:

This is an introductory experiment to pulse code modulation - PCM.
The experiment will acquaint you with the PCM ENCODER, which is one of the TIMS
Advanced Modules. This module generates a PCM output signal from an analog input
message.
In this experiment the module will be used in isolation; that is, it will not be part of a larger
system. The formatting of a PCM signal will be examined in the time domain. A later
experiment, entitled PCM decoding (in this Volume), will illustrate the recovery of the
analog message from the digital signal.
PCM encoding:

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 input amplitude limits set for all analog
modules.
A step-by-step description of the operation of the module follows:
1. The module is driven by an external TTL clock.
2. The input analog message is sampled periodically. The sample rate is determined by
the external clock.
3. The sampling is a sample-and-hold operation. It is internal to the module, and cannot
be viewed by the user. What is held is the amplitude of the analog message at the
sampling instant.
81

4. Each sample amplitude 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.
5. 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.
6. 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 code word will depend upon the number of quantizing
levels. In fact, n =log
2
(L).
7. The code word is assembled into a time frame together with other bits as may be
required (described below). In the TIMS PCM ENCODER (and many commercial
systems) 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.
8. The frames are transmitted serially. They are transmitted at the same rate as the
samples are taken (but see Tutorial Question 3). The serial bit stream appears at the
output of the module.
9. Also available from the module is a synchronizing signal FS (frame synch). This
signals the end of each data frame.

The PCM Encoder module:

Front panel features:



Figure 1: front panel layout of the PCM ENCODER

The front panel layout of the module is shown in Figure 1.

Note and understand the purpose of each of the input and output connections, and the three-
position toggle switch. Counting from the top, these are:

82

SLAVE: not used during this experiment. Do not connect anything to this input.
MASTER: not used during this experiment. Do not connect anything to this output.
SYNC. MESSAGE: periodic, synchronized, message. Either sinusoidal, or
sinusoidal-like (sinuous), its frequency being a sub-multiple of the MASTER
CLOCK (being any one of four frequencies selected by an on-board switch SW2). A
message synchronized to the system clock is convenient for obtaining stable
oscilloscope displays. Having a recognizable shape (but being more complex than a
simple sine wave) gives a qualitative idea of distortion during the decoding process
(examined in a later experiment). See Table A-1 in the Appendix to this experiment
for more details.
SELECT CODING SCHEME: a three-position toggle switch which selects the 4-bit
or 7-bit encoding scheme of the analog samples; or (together with an on-board jumper
connection) the companding scheme.
FS: frame synchronization, a signal which indicates the end of each data frame.
V
IN
: the analog signal to be encoded.
PCM DATA: the output data stream, the examination of which forms the major part
of this experiment.
CLK: this is a TTL (red) input, and serves as the MASTER CLOCK for the module.
Clock rate must be 10 kHz or less. For this experiment you will use the 8.333 kHz
TTL signal from the MASTER SIGNALS module.

TIMS PCM Time Frame:

Each binary word is located in a time frame. The time frame contains eight slots of equal
length, and is eight clock periods long. The slots, from first to last, are numbered 7 through 0.
These slots contain the bits of a binary word. The least significant bit (LSB) is contained in
slot 0.

The LSB consists of alternating ones and zeros. These are placed (embedded) in the frame
by the encoder itself, and cannot be modified by the user. They are used by subsequent
decoders to determine the location of each frame in the data stream, and its length.
The remaining seven slots are available for the bits of the binary code word. Thus the system
is capable of a resolution of seven-bits maximum. This resolution, for purposes of
experiment, can be reduced to four bits (by front panel switch). The 4bit mode uses only five
83

of the available eight slots -one for the embedded frame synchronization bits, and the
remaining four for the binary code word (in slots 4, 3, 2, and 1).
Pre-calculations:

You will be using an 8.333 kHz master clock. Answer Tutorial Question Q1 now, before
commencing the experiment.

EXPERIMENT PCM ENCODING

The only module required for this experiment is a TIMS PCM ENCODER.

It is not necessary, for this experiment, to become involved with how the PCM ENCODER
module achieves its purpose. What will be discovered is what it does under various
conditions of operation.

The module is capable of being used in two modes: as a stand-alone PCM encoder, for one
channel, or, with modifications to the data stream, as part of a two-channel time division
multiplexed (TDM) PCM system.
Operation as a single channel PCM encoder is examined in this experiment.
Before plugging the module in:
T1 Select the TIMS companding a 4-law with the on-board COMP jumper (in preparation for
a later part of the experiment).
T2 Locate the on-board switch SW2. Put the LEFT HAND toggle DOWN and the RIGHT
HAND toggle UP. This sets the frequency of a message from the module at SYNC.
MESSAGE. This message is synchronized to a sub-multiple of the MASTER CLOCK
frequency.
Patching up:

To determine some of the properties of the analog to digital conversion process it is best to
start with a DC message. This ensures completely stable oscilloscope displays, and enables
easy identification of the quantizing levels.
Selecting the 4-bit encoding scheme reduces the number of levels (2
4
) to be examined.
84

T3 Insert the module into the TIMS frame. Switch the front panel toggle switch to 4-BIT
LINEAR (i.e. no companding).
T4 Patch the 8.333 kHz TTL SAMPLE CLOCK from the MASTER SIGNALS module to the
CLK input of the PCM ENCODER module.
T5 Connect the V
IN
input socket to ground of the variable DC module.
T6 Connect the frame synchronization signal FS to the oscilloscope ext. synch input.
T7 On CH1-A display the frame synchronization signal FS. Adjust the sweep speed to show
three frame markers. These mark the end of each frame.
T8 On CH2-A display the CLK signal.
T9 Record the number of clock periods per frame.
Currently the analog input signal is zero volts (Vin is grounded). Before checking with the
oscilloscope, consider what the PCM output signal might look like. Make a sketch of this
signal, fully annotated. Then:
T10 On CH2-B display the PCM DATA from the PCM DATA output socket.
Except for the alternating pattern of 1 and 0 in the frame marker slot, you might have
expected nothing else in the frame (all zeros), because the input analog signal is at zero volts.
But you do not now the coding scheme.
There is an analog input signal to the encoder. It is of zero volts. This will have been coded
into a 4-bit binary output number, which will appear in each frame. It need not be 0000. The
same number appears in each frame because the analog input is constant.
Your display should be similar to that of Figure 3 below, except that this shows five frames
(too many frames on the oscilloscope display makes bit identification more difficult).

Figure 2: 5 frames of 4-bit PCM output for zero amplitude input
85

Knowing:
1. the number of slots per frame is 8
2. the location of the least significant bit is coincident with the end of the frame
3. the binary word length is four bits
4. the first three slots are empty (in fact filled with zeros, but these remain unchanged
under all conditions of the 4-bit coding scheme)
Then:
T11 Identify the binary word in slots 4, 3, 2, and 1.

Quantizing Levels for 4-bit Linear Encoding:

You will now proceed to determine the quantizing/encoding scheme for the 4-bit linear case.
T12 Remove the ground connection, and connect the output of the VARIABLE DC module to
V
IN
. Sweep the DC voltage slowly backwards and forwards over its complete range, and note
how the data pattern changes in discrete jumps.
T13 If you have a WIDEBAND TRUE RMS METER module use this to monitor the DC
amplitude at V
IN
-otherwise use the oscilloscope (CH1-B). Adjust V
IN
to its maximum negative
value. Record the DC voltage and the pattern of the 4-bit binary number.
T14 Slowly increase the amplitude of the DC input signal until there is a sudden change to
the PCM output signal format. Record the format of the new digital word, and the input
amplitude at which the change occurred.
T15 Continue this process over the full range of the DC supply.
T16 Draw a diagram showing the quantizing levels and their associated binary numbers.
4-bit Data Format:
From measurements made so far you should be able to answer the questions:
What is the sampling rate?
What is the frame width?
What is the width of a data bit?
What is the width of a data word?
How many quantizing levels are there?
Are the quantizing levels uniformly (linearly) spaced?
86

7-bit Linear Encoding:

T17 Change to 7-bit linear encoding by use of the front panel toggle switch.
It would take a long time to repeat all of the above Tasks for the 7-bit encoding scheme.
Instead:
T18 Make sufficient measurements so that you can answer all of the above questions in the
section titled 4-bit data format above. Making one or two assumptions (such as ?) you should
be able to deduce the coding scheme used.
Companding:

This module is to be used in conjunction with the PCM DECODER in a later experiment. As
a pair they have a companding option. There is compression in the encoder, and expansion in
the decoder. In the encoder this means the quantizing levels are closer together for small
input amplitudes - that is, in effect, that the input amplitude peaks are compressed during
encoding. At the decoder the reverse action is introduced to restore an approximate linear
input/output characteristic.
It can be shown that this sort of characteristic offers certain advantages, especially when the
message has a high peak-to-average amplitude characteristic, as does speech, and where the
signal-to-noise ratio is not high. This improvement will not be checked in this experiment.
But the existence of the non-linear quantization in the encoder will be confirmed. In a later
experiment, entitled PCM decoding, it will be possible to check the input/output linearity
of the modules as a compatible pair.
T19 Change to 4-bit companding by use of the front panel toggle switch.
T20 The TIMS A
4
companding law has already been selected (first Task). Make the necessary
measurements to determine the nature of the law.

Periodic Messages:

Although the experiment is substantially complete, you may have wondered why a periodic
message was not chosen at any time. Try it.
T21 Take a periodic message from the SYNC. MESSAGE socket. This was set as the second
Task.
87

T22 Adjust the oscilloscope to display the message. Record its frequency and shape. Check if
these are compatible with the Nyquist criterion; adjust the amplitude if necessary with one of
the BUFFER AMPLIFIERS.
T23 Now look at the PCM DATA output. Synchronize the oscilloscope (as previously) to the
frame (FS) signal. Display two or three frames on CH1-A, and the PCM DATA output on
CH2-A.
You will see that the data signal reveals very little. It consists of many overlaid digital words,
all different.
PREPARATION PCM DECODING

Signal Source:

The signal to be decoded in this experiment will be provided by you, using the PCM
ENCODER module as set up earlier.
Clock Synchronization:

A clock synchronization signal will be stolen from the encoder.

Frame Synchronization:

Automatic:

In the PCM DECODER module there is circuitry which automatically identifies 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 an end of frame synchronization signal FS is
generated, and made available at the front panel.
The search for the frame is continuously updated. Why?
Under noisy conditions (not relevant for this particular experiment) the reliability of
the process will depend upon the size of the group of frames to be examined. This can
be set by the on-board switch SW3 of the PCM DECODER module. See Table A-1 in
the Appendix to this experiment for details.
88

Stolen:

Frame synchronization can also be achieved, of course, by stealing the
synchronization signal, FS, from the PCM ENCODER module. Use of this signal
would assume that the clock signal to the PCM DECODER is of the correct phase.
This is assured in this experiment, but would need adjustment if the PCM signal is
transmitted via a bandlimited channel (see Tutorial Question 0). Hence, the embedded
frame synchronization information.
Companding:

You should prepare by reading something about the principles of companding. You
will already be aware that the PCM ENCODER module can incorporate compression
into its encoding scheme. The PCM DECODER module can introduce the
complementary expansion. The existence of these characteristics will be confirmed,
but their effectiveness in intelligibility enhancement (when speech is the message) is
not examined.
PCM Decoding:

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. The
source of frame timing information has been discussed above.
Upon reception, the PCM DECODER:
1. 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.
2. Extracts the binary number, which is the coded (and quantized) amplitude of the
sample from which it was derived, from the frame.
3. Identifies the quantization level which this number represents.
4. Generates a voltage proportional to this amplitude level.
5. Presents this voltage to the output V
OUT
. The voltage appears at V
OUT
for the duration
of the frame under examination.
6. Message reconstruction can be achieved, albeit with some distortion, by low pass
filtering. A built-in reconstruction filter is provided in the module.
Encoding:

At the encoder the sample-and-hold operation (before encoding) is executed periodically. It
produces a rectangular pulse form. Each pulse in the waveform is of exactly the same
amplitude as the message at the sampling instant.
89

But it is not possible to recover a distortion-less message from these samples. They are flat
top, rather than natural samples.
Call this the sampling distortion.
At the encoder the amplitude of this waveform was then quantized. It is still a rectangular
pulsed waveform, but the amplitude of each pulse will, in general, be in error by a small
amount. Call this waveform s (t).
Decoding:

The voltage at V
OUT
of the decoder is identical with s(t) above. The decoder itself has
introduced no distortion of the received signal.
But s(t) is already an inexact version of the sample-and-hold operation at the encoder. This
will give rise to quantization distortion as well as the sampling distortion already mentioned.
The TIMS PCM Decoder Module:


Figure 1: front panel layout of the PCM DECODER
A TIMS PCM DECODER module will be used for decoding. The front panel of this module
is shown in Figure 1.
Note and understand the purpose of the input and output connections, and the toggle
switches. Counting from the top, these are:
SLAVE: not used during this experiment. Do not connect anything to this input.
MASTER: not used during this experiment. Do not connect anything to this output.
SELECT CODING SCHEME: a three position toggle which selects the coding
scheme used by the signal to be decoded.
FS SELECT: a two-position toggle switch which selects the method of obtaining the
frame synchronization signal (FS) either external at (EXT.FS), or derived internally
from the embedded information in the received PCM itself (EMBED FS).
90

EXT. FS: connect an external frame sync. signal here if this method of frame
synchronization is to be used.
EMBED FS: if the frame synch. signal is derived internally from the embedded
information, it is available for inspection at this output.
PCM DATA: the PCM signal to be decoded is connected here. V
OUT
: the decoded
PCM signal.
CLK: this is a TTL (red) input, and serves as the MASTER CLOCK for the module.
Clock rate must be 10 kHz or less. For this experiment you will use the 8.333 kHz
TTL signal from the MASTER SIGNALS module.
EXPERIMENT PCM DECODING

The Transmitter (Encoder):

A suitable source of PCM signal will be generated using a PCM ENCODER module. This
module was examined in the experiment entitled PCM encoding.
You should set it up before patching up the demodulator.
T1 Before plugging in PCM ENCODER module, set the toggles of the on-board SYNC
MESSAGE switch SW2. Set the left hand toggle DOWN, and the right hand toggle UP. This
selects a 130 Hz sinusoidal message, which will be used later. Now insert the module into the
TIMS system.
T2 Use the 8.333 kHz TTL signal from the MASTER SIGNALS module for the CLK.
T3 Select, with the front panel toggle switch, the 4-bit LINEAR coding scheme.
T4 Synchronize the oscilloscope externally to the frame synchronization signal at FS. Set
the sweep speed to 0.5 ms/cm (say). This should show a few frames on the screen.
T5 Connect CH1-A of the SCOPE SELECTOR to the PCM OUTPUT of the PCM
ENCODER.
T6 We would like to recognize the PCM DATA out signal. So choose a large negative DC
for the message (from the VARIABLE DC module). From previous work we know the
corresponding code word is 0000, so only the embedded alternating 0 and 1 bits (for
remote FS) in the LSB position should be seen. Confirm this. They should be 1920 ms apart.
T7 Vary the DC output and show the appearance of new patterns on CH1-A. When finished,
return the DC to its maximum negative value (control fully anti-clockwise).
The PCM signal is now ready for transmission. In a later experiment the PCM signal will be
sent via a noisy, bandlimited channel. For the present it will be connected directly to a TIMS
PCM DECODER module.
91

The Receiver (Decoder):

T8 Use the front panel toggle switch to select the 4-bit LINEAR decoding scheme (to match
that of the transmitter).
T9 Steal an 8.333 kHz TTL clock signal from the transmitter and connect it to the CLK
input.
T10 In the first instance steal the frame synchronization signal FS from the transmitter by
connecting it to the frame synchronization input FS of the receiver. At the same time ensure
that the FS SELECT toggle switch on the receiver is set to EXT. FS.
T11 Ensure both channels of the oscilloscope are set to accept DC; set their gains to 1
volt/cm. With their inputs grounded set their traces in the centre of their respective halves of
the screen. Remove the grounds.
T12 Connect CH2-A to the sample-and-hold output of the PCM DECODER.
A DC Message:

You are now ready to check the overall transmission from transmitter input to decoder
output. The message is a DC signal.
T13 Connect the PCM DATA output signal from the transmitter to the PCM DATA input of
the receiver.
T14 Slowly vary the DC output from the VARIABLE DC module back and forth over its
complete range. Observe the behaviour of the two traces. The input to the encoder moves
continuously. The output from the decoder moves in discrete steps. These are the 16
amplitude quantizing steps of the PCM ENCODER.
You are observing the source of quantizing noise. The output can take up only one of 16
predetermined values.
T15 Draw up a table relating input to output voltages. You can now see the number of
quantizing levels at the transmitter, and their values.
T16 Compare the quantizing levels just measured with those determined in the experiment
entitled PCM encoding.
T17 Reset the coding scheme on both modules to 7-bit. Sweep the input DC signal over the
complete range as before. Notice the granularity in the output is almost un-noticeable
compared with the 4-bit case. There are now 27 rather than 24 steps over the range.
A Periodic Message:

It was not possible, when examining the PCM ENCODER in the experiment entitled PCM
encoding, to see the sample-and-hold waveform within the encoder. But you have just been
92

looking at it (assuming perfect decoding) at the output of the decoder. With a periodic
message its appearance may be more familiar to you.
T18 change to a periodic message by connecting the SYNC MESSAGE of the PCM
ENCODER, via a BUFFER AMPLIFIER, to its input V
IN
. Amplitude of 2 V
PP
is suitable.
Slow down the oscilloscope sweep speed to 1 ms/cm. Observe and record the signal at CH2-
A.
When you agree that what you see is what you expected to see, prepare to make a change and
predict the outcome.
Currently the encoding scheme is generating a 4-bit digital word for each sample.
What would be the change to the waveform, now displaying on CH2-A, if, at the encoder, the
coding scheme was changed from 4-bit to 7-bit?
Sketch your answer to this question -show the waveform before and then after the change.
T19 Change the coding scheme from 4-bit to 7-bit. That is, change the front panel toggle
switch of both the PCM ENCODER and the PCM DECODER from 4-bit to 7-bit. Observe,
record, and explain the change to the waveform on CH2-A.
Message Reconstruction:

You can see, qualitatively, that the output is related to the input. The message could probably
be recovered from this waveform. But it would be difficult to predict with what accuracy.
Low pass filtering of the waveform at the output of the decoder will reconstruct the message,
although theory shows that it will not be perfect. It will improve with the number of
quantizing levels.
What amplitude characteristic is required for the reconstruction filter?
If any distortion components are present they would most likely include harmonics of the
message. If these are to be measurable (visible on the oscilloscope, in the present case), then
they must not be removed by the filter and so give a false indication of performance.
So we could look for harmonics in the output of the filter. But we do not have conveniently
available a spectrum analyzer.
An alternative is to use a two-tone test message. Changes to its shape (especially its
envelope) are an indication of distortion, and are more easily observed (with an oscilloscope)
than when a pure sine wave is used. It will be difficult to make one of these for this
experiment, because our messages have been restricted to rather low frequencies, which are
outside the range of most TIMS modules.
But there is provided in the PCM ENCODER a message with a shape slightly more complex
than a sine wave. It can be selected with the switch SW2 on the encoder circuit board. Set the
93

left hand toggle UP, and the right hand toggle DOWN. See the Appendix to the experiment
entitled PCM encoding for more details.
A message reconstruction LPF is installed in the PCM DECODER module (version 2 and
above). If you do not have such modules then bypass the next two Tasks.
T20 Change to the complex message from the PCM ENCODER as described above.
T21 Include the built-in LPF in the output of the PCM DECODER, and observe the
reconstructed message. Make comparisons between the 4-bit linear and the 7-bit linear
coding schemes. Try different message amplitudes into the PCM ENCODER. Can you
observe any distortion? Record your observations.
If you think the LPF itself might have introduced some distortion, you could check by
connecting the complex message to its input direct, and observing the output.
Companding:

It is now time to verify the companding algorithm installed in the encoder.
T22 Use the front panel toggle switches (on both modules) to select 4-bit companding. Use
both low and high level messages into the PCM ENCODER. Check the quantizing
characteristic. Record your observations and comment upon them.
Because of the speed limitations of the PCM modules it is not possible to use speech as the
message, and so to observe the effects of companding. The effective bandwidth of the system
is not wide enough.
Frame Synchronization:

In all of the above work the frame synchronization signal FS has been stolen from the
encoder (as has been the clock signal). This was not necessary.
The PCM ENCODER has circuitry for doing this automatically. It looks for the alternating
0 and 1 pattern embedded as the LSB of each frame. It is enabled by use of the FS
SELECT front panel toggle switch. Currently this is set to EXT FS.
T23 Change the FS SELECT switch on the front panel of the PCM DECODER module from
EXT FS to EMBED. Notice that frame synchronization is re-established after a short time.
Could you put an upper limit on this time?








94

TUTORIAL QUESTIONS
Q1 From your knowledge of the PCM ENCODER module, obtained during preparation for
the experiment, calculate the sampling rate of the analog input signal. Show that it is the same
for both the 4-bit and the 7-bit coding schemes. What can you say about the bandwidth of an
input analog signal to be encoded?
Q2 Define what is meant by the data frame in this experiment. Draw a diagram showing the
composition of a frame for:
a) The 4-bit coding scheme
b) The 7-bit coding scheme
Q3 It is possible to transmit each frame at a much slower rate than it was produced (and, of
course, recover the original message as well). Explain how this might be done. When might
this be an advantage?
Q4 Explain why a DC message gives a stable oscilloscope display of the PCM DATA output.
Why is the display unstable when a sine wave (for example) is the message?
Q5 For the 4-bit encoder draw a diagram showing the amplitude quantization levels and the
corresponding binary numbers used to encode them. Describe how this information was
obtained experimentally.
Q6 In the present experiment a stolen clock signal was used. Why would transmission of
the PCM signal via a bandlimited channel necessitate phase adjustment of this stolen clock
signal to the PCM Decoder?
Q7 Sketch the waveforms at the output V
OUT
from the decoder, for the 4-bit and the 7-bit
linear encoding scheme (and a large amplitude sinusoidal, synchronous message at the
encoder). A sketch might show these as being the same, but a more accurate drawing would
show more clearly the difference. Explain.
Q8 How would you arrive at a specification for the reconstruction filter used in this
experiment?
Q9 From the information in Table A-1 make some quantitative comments on the length of
time the built in circuitry of the PCM DECODER would take to recover the frame
synchronization signal FS from the incoming data stream. Were you able to verify this by
observation?

95

Lab Grades
Total Marks Obtained Marks
Lab Performance
10
Knowledge about Lab
5
Values Obtained
(Accurate/Precise)
5
Lab Participation 5
Viva/Quiz/Assignment
5
Total
25

Comments


Date: ; Instructor Sig. .




96

APPENDIX LAB 12
For a MASTER CLOCK of 8.333 kHz, Table A-1 below gives the frequencies of the
synchronized message at the SYNC. MESSAGE output for the setting of the on-board switch
SW2.

For other clock frequencies the message frequency can be calculated by using the divide by
entry in the Table.

These messages are periodic, but not necessarily sinusoidal in shape. The term sinuous
means sine-like.


Table A1

Automatic frame synchronization:

The PCM DECODER module has built in circuitry for locating the position of each frame in
the serial data stream. The circuitry looks for the embedded and alternating 0 and 1 in the
LSB position of each frame.

The search is made by examining a section of data whose length is a multiple of eight bits.

The length of this section can be changed by the on-board switch SW3. Under noisy
conditions it is advantageous to use longer lengths.

The switch settings are listed in Table A-1 below.


Table A2: synchronization search length options

97

LAB 13 LINE CODING
Modules:

SEQUENCE GENERATOR, LINE-CODE ENCODER, LINE-CODE DECODER, BUFFER
AMPLIFIER

PREPARATION

This experiment is tutorial in nature, and serves to introduce two new modules.
In your course work you should have covered the topic of line coding at whatever level is
appropriate for you. TIMS has a pair of modules, one of which can perform a number of line
code transformations on a binary TTL sequence. The other performs decoding.
Why 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:
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.
At the very least the LINE-CODE ENCODER serves as an interface between the TTL level
signals of the transmitter and those of the analog channel. Likewise, the line LINE-CODE
DECODER serves as an interface between the analog signals of the channel and the TTL
level signals required by the digital receiver.
The modules:

The two new modules to be introduced are the LINE-CODE ENCODER and the LINE-
CODE DECODER. You will not be concerned with how the coding and decoding is
performed.
You should examine the waveforms, using the original TTL sequence as a reference.
98

In a digital transmission system line encoding is the final digital processing performed on the
signal before it is connected to the analog channel, although there may be simultaneous
bandlimiting and wave shaping.
Thus in TIMS the LINE-CODE ENCODER accepts a TTL input, and the output is suitable
for transmission via an analog channel.
At the channel output is a signal at the TIMS ANALOG REFERENCE LEVEL, or less. It
could be corrupted by noise. Here it is re-generated by a detector. The TIMS detector is the
DECISION MAKER module (already examined in the experiment entitled Detection with the
DECISION MAKER in this Volume). Finally the TIMS LINE-CODE DECODER module
accepts the output from the DECISION MAKER and decodes it back to the binary TTL
format.
Preceding the line code encoder may be a source encoder with a matching decoder at the
receiver. These are included in the block diagram of Figure 1, which is of a typical baseband
digital transmission system. It shows the disposition of the LINE-CODE ENCODER and
LINE-CODE DECODER. All bandlimiting is shown concentrated in the channel itself, but
could be distributed between the transmitter, channel, and receiver.

Figure 1: baseband transmission system

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 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).
Terminology:

The word mark, and its converse space, often appears in a description of a binary
waveform. This is an historical reference to the mark and space of the telegraphist. In
modern day digital terminology these have become HI and LO, or 1 and 0, as
appropriate.
Unipolar signalling: where a 1 is represented with a finite voltage V volts, and a 0
with zero voltage. This seems to be a generally agreed-to definition.
99

Polar signalling: where a 1 is represented with a finite voltage +V volts, and a 0
with -V volts.
Bipolar signalling: where a 1 is represented alternately by +V and -V, and a 0 by
zero voltage.
The term RZ is an abbreviation of return to zero. This implies that the particular
waveform will return to zero for a finite part of each data 1 (typically half the
interval). The term NRZ is an abbreviation for non-return to zero, and this
waveform will not return to zero during the bit interval representing a data 1.
The use of L and M would seem to be somewhat illogical (or inconsistent) with
each other. For example, see how your text book justifies the use of the L and the
M in NRZ-L and NRZ-M.
Two sinusoids are said to be antipodal if they are 180
0
out of phase.
Available Line Codes:

For a TTL input signal the following output formats are available from the LINE-CODE
ENCODER.
NRZ-L:
Non return to zero -level (bipolar): this is a simple scale and level shift of the input TTL
waveform.
NRZ-M:
Non return to zero -mark (bipolar): there is a transition at the beginning of each 1, and no
change for a 0. The M refers to inversion on mark. This is a Line coding differential
code.
The decoder will give the correct output independently of the polarity of the input.
UNI-RZ:
Uni-polar -return to zero (uni-polar): there is a half-width output pulse if the input is a 1;
no output if the input is a 0. This waveform has a significant DC component.
BIP-RZ:
Bipolar return to zero (3-level): there is a half-width +ve output pulse if the input is a 1; or
a half-width -ve output pulse if the input is a 0. There is a return-to-zero for the second half
of each bit period.


100

RZ-AMI:
Return to zero -alternate mark inversion (3-level): there is a half-width output pulse if the
input is a 1; no output if the input is a 0. This would be the same as UNI-RZ. But, in
addition, there is a polarity inversion of every alternate output pulse.
Bi-L:
Biphase -level (Manchester): bipolar V volts. For each input 1 there is a transition from
+V to -V in the middle of the bit-period. For each input 0 there is a transition from -V to +V
in the middle of the bit period.
DICODE-NRZ:
Di-code non-return to zero (3-level): for each transition of the input there is an output pulse,
of opposite polarity from the preceding pulse. For no transition between input pulses there is
no output.

Figure 2: TIMS line codes

The output waveforms, apart from being encoded, have all had their amplitudes adjusted to
suit a TIMS analog channel (not explicitly shown in Figure 2).
101

When connected to the input of the LINE-CODE DECODER these waveforms are de-coded
back to the original TTL sequence.
Band Limiting:

No matter what the line code in use, it is not uncommon to bandlimit these waveforms before
they are sent to line, or used to modulate a carrier.
As soon as bandlimiting is invoked individual pulses will spread out (in the time domain) and
interfere with adjacent pulses. This raises the issue if inter-symbol interference (ISI).
A study of ISI is outside the intended scope of this text, but it cannot be ignored in practice.
Bandlimiting (by pulse shaping) can be effected and ISI controlled by appropriate filter
design.
Duo-binary Encoding:

A duobinary encoder (and decoder) is included in the line code modules. Duobinary encoding
is also called correlative coding, or partial response signalling. The precoded duobinary
encoding model implemented in the LINE-CODE.
EXPERIMENT

Figure 3 shows a simplified model of Figure 1. There is no source encoding or decoding, no
baseband channel, and no detection. For the purpose of the experiment this is sufficient to
confirm the operation of the line code modules.

Figure 3: simplified model of Figure 1

When a particular code has been set up, and the message successfully decoded without error,
the BUFFER should be included in the transmission path. By patching it in or out it will
introduce a polarity change in the channel.
102

If there is no change to the message output, then the code in use is insensitive to polarity
reversals.
Note that the LINE-CODE DECODER requires, for successful decoding, an input signal of
amplitude near the TIMS ANALOG REFERENCE LEVEL (2 volt pp). In normal
applications this is assured, since it will obtain its input from the DECISION MAKER.
Procedure:

There are no step-by-step Tasks for you to perform. Instead, it is left to you to ensure that (in
the approximate order indicated):
1. You read the TIMS Advanced Modules User Manual for more details of the LINE-
CODE ENCODER and LINE-CODE DECODER modules than is included here.
2. You select a short sequence from the transmitter message source
3. At least initially you synchronize the oscilloscope to show a snapshot of the
transmitter sequence. Later you may be interested in eye patterns?
4. Examine each code in turn from the encoder, confirming the transformation from TTL
is as expected. On the other hand, and far more challenging, is to determine what the
law of each transformation is without help from a Textbook or other reference.
5. Of significant interest would be an examination of the power spectra of each of the
coded signals. For this you would need data capturing facilities, and software to
perform spectral analysis.
6. And so on
Resetting:

Resetting of the LINE-CODE ENCODER and the LINE-CODE DECODER after the master
clock is connected, or after any clock interruption, is strictly not necessary for all codes. But
it is easier to do it for all codes rather than remember for which codes it is essential.












103

TUTORIAL QUESTIONS

Q1 Why introduce the complications of line encoding in a digital transmission system?

Q2 Apart from the inevitable delay introduced by the analog filter, did you notice any other
delays in the system? You may need this information when debugging later experiments.

Q3 An important function of many line encoders is the elimination of the DC component.
When is this desirable?























104

Lab Grades
Total Marks Obtained Marks
Lab Performance
10
Knowledge about Lab
5
Values Obtained
(Accurate/Precise)
5
Lab Participation 5
Viva/Quiz/Assignment
5
Total
25

Comments


Date: ; Instructor Sig. .






105

LAB 14 AMPLITUDE SHIFT KEYING

Modules:

AUDIO OSCILLATOR, SEQUENCE GENERATOR, DUAL ANALOG SWITCH,
ADDER, MULTIPLIER, UTILITIES, TUNABLE LPF, DECISION MAKER

PREPARATION

Generation:

Amplitude shift keying -ASK -in the context of digital communications is a modulation
process which imparts to a sinusoid two or more discrete amplitude levels. These are related
to the number of levels adopted by the digital message.
For a binary message sequence there are two levels, one of which is typically zero. Thus the
modulated waveform consists of bursts of a sinusoid.
Figure 1 illustrates a binary ASK signal (lower), together with the binary sequence which
initiated it (upper). Neither signal has been bandlimited.

Figure 1: an ASK signal (below) and the message (above)

There are sharp discontinuities shown at the transition points. These result in the signal
having an unnecessarily wide bandwidth. Bandlimiting is generally introduced before
transmission, in which case these discontinuities would be rounded off. The bandlimiting
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. This has been done in the
waveform of Figure 1.
One of the disadvantages of ASK, compared with FSK and PSK, for example, is that it has
not got a constant envelope. This makes its processing (eg, 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 2. This shows bandlimiting
following modulation.
106


Figure 2: the principle of ASK generation

The switch is opened and closed by the unipolar binary sequence.
Bandwidth Modification:

As already indicated, the sharp discontinuities in the ASK waveform of Figure 1 imply a
wide bandwidth. A significant reduction can be accepted before errors at the receiver increase
unacceptably. This can be brought about by bandlimiting (pulse shaping) the message before
modulation, or bandlimiting the ASK signal itself after generation.
Both these options are illustrated in Figure 3, which shows one of the generators you will be
modeling in this experiment.


Figure 3: ASK bandlimiting, with a LPF or a BPF.

Figure 4 shows the signals present in a model of Figure 3, where the message has been
bandlimited. The shape, after bandlimiting, depends naturally enough upon the amplitude and
phase characteristics of the bandlimiting filter.

Figure 4: original TTL message (lower), bandlimited message (centre), and ASK
(above)
107

You can approximate these waveforms with a SEQUENCE GENERATOR clocked at about
2 kHz, filter #3 of the BASEBAND CHANNEL FILTERS, and a 10 kHz carrier from a
VCO.
Demodulation methods:

It is apparent from Figures 1 and 4 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:
Envelope detection circuitry is simple.
Synchronous demodulation requires a phase-locked local carrier and therefore
carrier acquisition circuitry.

With bandlimiting of the transmitted ASK neither of these demodulation methods would
recover the original binary sequence; instead, their outputs would be a bandlimited version.
Thus further processing -by some sort of decision-making circuitry for example -would be
necessary.
Thus demodulation is a two-stage process:
1. Recovery of the bandlimited bit stream
2. Regeneration of the binary bit stream

Figure 5 illustrates.


Figure 5: the two stages of the demodulation process

Bandwidth Estimation:

It is easy to estimate the bandwidth of an ASK signal. Refer to the block diagram of Figure 3.
This is a DSB transmitter. It is an example of linear modulation. If we know the message
bandwidth, then the ASK bandwidth is twice this, centred on the carrier frequency.
Using the analogy of the DSB generator, the binary sequence is the message (bit rate ),
and the sine wave being switched is the carrier ().
108

Even though you may not have an analytical expression for the bandwidth of a pseudo
random binary sequence, you can estimate that it will be of the same order as that of a square,
or perhaps a rectangular, wave.
For the special case of a binary sequence of alternate ones and zeros the spectrum will:
be symmetrical about the frequency of the carrier
have a component at , because there will be a DC term in the message
have sidebands spaced at odd multiples of either side of the carrier
have sideband amplitudes which will decrease either side of the carrier (proportional
to 1/n, where n is the order of the term).

If you accept the spectrum is symmetrical around the carrier then you can measure its
effective bandwidth by passing it through a tuneable lowpass filter. A method is suggested in
the experiment below.
EXPERIMENT

Generation:

There are many methods of modeling an ASK generator with TIMS. For any of them the
binary message sequence is best obtained from a SEQUENCE GENERATOR, clocked at an
appropriate speed. Depending upon the generator configuration, either the data bit stream can
be bandlimited, or the ASK itself can be bandpass filtered.
Modeling with a Dual Analog Switch:

It is possible to model the rather basic generator as shown in Figure 2.
The switch can be modelled by one half of a DUAL ANALOG SWITCH module. Being an
analog switch, the carrier frequency would need to be in the audio range. For example, 15
kHz from a VCO. The TTL output from the SEQUENCE GENERATOR is connected
directly to the CONTROL input of the DUAL ANALOG SWITCH. For a synchronous
carrier and message use the 8.333 kHz TTL sample clock (filtered by a TUNEABLE LPF)
and the 2.083 kHz sinusoidal message from the MASTER SIGNALS module.
If you need the TUNEABLE LPF for bandlimiting of the ASK, use the sinusoidal output
from an AUDIO OSCILLATOR as the carrier. For a synchronized message as above, tune
the oscillator close to 8.333 kHz, and lock it there with the sample clock connected to its
SYNCH input.
This arrangement is shown modeled in Figure 6.
109


Figure 6: modeling ASK with the arrangement of Figure 2

Bandlimiting can be implemented with a filter at the output of the ANALOG SWITCH.

Modeling with a Multiplier:

A MULTIPLIER module can be used as the switch. The carrier can come from any suitable
sinusoidal source. It could be at any available TIMS frequency.

The other input to the MULTIPLIER needs to be the message sequence.

Neither the TTL nor the analog sequence is at an appropriate voltage level. Each requires
amplitude scaling. This can be implemented in an ADDER, which will invert the sequence
polarity. DC from the VARIABLE DC module can be used to re-set the DC level. The
required signal will be at a level of either 0 V or +2 V, the latter being optimum for the
(analog) MULTIPLIER.

This arrangement is shown modeled in Figure 7.

Figure 7: modeling ASK with the arrangement of Figure 3.

The operating frequency of the modulator of Figure 7 is not restricted to audio frequencies.
Any carrier frequency available within TIMS may be used, but remember to keep the data
rate below that of the carrier frequency.
110

For a synchronous system (i.e., message and carrier rates related, so as to give stable
oscilloscope displays):
clock the SEQUENCE GENERATOR from the 2 kHz message (as shown), or the
8.333 kHz sample clock.
use a 100 kHz carrier (as shown), or an AUDIO OSCILLATOR locked to the
8.333 kHz sample clock.

Any other combination of data clock and carrier frequency, synchronous or otherwise, is
possible (with this model); but not all combinations will generate an ASK signal. Try it!
Bandlimiting can be implemented with a filter at the MULTIPLIER output (a 100 kHz
CHANNEL FILTERS module), or the bit sequence itself can be bandlimited.
Bandwidth Measurement:

Having generated an ASK signal, an estimate of its bandwidth can be made using an
arrangement such as illustrated in Figure 8. The bandwidth of the low pass filter is reduced
until you consider that the envelope can no longer be identified.
This will indicate the upper frequency limit of the signal. Do you think it reasonable to then
make a declaration regarding the lower frequency limit?

Figure 8: ASK bandwidth estimation
The arrangement of Figure 8 is easy to model with TIMS. Use the TUNEABLE LPF. But
remember to select appropriate ASK frequencies.
Demodulation:

Both asynchronous and synchronous demodulation methods are used for the demodulation of
ASK signals.
Envelope Demodulation:

Having a very definite envelope, an envelope detector can be used as the first step in
recovering the original sequence. Further processing can be employed to regenerate
the true binary waveform.
Figure 9 is a model for envelope recovery from a baseband FSK signal.
111


Figure 9: envelope demodulation of baseband ASK

If you choose to evaluate the model of Figure 9, remember there is a relationship
between bit rate and the low pass filter bandwidth. Select your frequencies wisely.
Synchronous Demodulation:

A synchronous demodulator can be used for demodulation, as shown in Figure 10. In
the laboratory you can use a stolen carrier, as shown.

Figure 10: synchronous demodulation of ASK
Post-Demodulation Processing:

The output from both of the above demodulators will not be a copy of the binary
sequence TTL waveform. Band limiting will have shaped it, as (for example)
illustrated in Figure 4.
Some sort of decision device is then
required to regenerate the original
binary sequence. The DECISION
MAKER module could be employed,
with associated processing, if required.
This is illustrated in block diagram
form in Figure 11 (opposite).


Figure 11
112


This model will regenerate a bi-polar sequence from the recovered envelope.
Figure 12 shows the model of the block diagram of Figure 11.

Figure 12: regeneration to a bi-polar sequence

Remember to:
Convert the uni-polar, bandlimited output of the envelope detector to bi-polar
(using the ADDER), to suit the DECISION MAKER.
Set the on-board switch SW1, of the DECISION MAKER, to NRZ-L. This
configures it to accept bi-polar inputs.
Adjust the decision point of the DECISION MAKER
An the first instance, use a stolen carrier and bit clock

The output will be the regenerated message waveform. Coming from a YELLOW
analog output socket, it is bi-polar 2 V (not TTL).
The same regenerator can be used to process the output from the synchronous
demodulator of Figure 10.
Carrier Acquisition:

Rather than using a stolen carrier and bit clock you might like to try recovering these
from the received ASK signal.








113

TUTORIAL QUESTIONS

Q1 Suggest an advantage of making the data rate a sub-multiple of the carrier rate.

Q2 Discuss your methods of measuring and/or estimating the bandwidth of the ASK signal.
Estimate the maximum amount of bandwidth limiting possible, and the trade-offs involved.

Q3 The ASK waveform of Figure 1 is special in that: a) the bit rate is a sub-multiple of the
carrier b) the phasing of the message ensures that each burst of carrier starts and ends at
zero amplitude.





















114

Lab Grades
Total Marks Obtained Marks
Lab Performance
10
Knowledge about Lab
5
Values Obtained
(Accurate/Precise)
5
Lab Participation 5
Viva/Quiz/Assignment
5
Total
25

Comments


Date: ; Instructor Sig. .




115

LAB 15 BINARY PHASE SHIFT KEYING
Modules:

DECISION MAKER, LINE-CODE ENCODER, LINE-CODE DECODER, PHASE
SHIFTER modules

PREPARATION

Generation of BPSK:

Consider a sinusoidal carrier. If it is modulated by a bi-polar bit stream according to the
scheme illustrated in Figure 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 1: generation of BPSK

The information about the bit stream is contained in the changes of phase of the transmitted
signal.

A synchronous demodulator would be sensitive to these phase reversals.

The appearance of a BPSK signal in the time domain is shown in Figure 2 (lower trace). The
upper trace is the binary message sequence.

Figure 2: a BPSK signal in the time domain

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

/(2). In addition, the message transitions have been timed to occur at a zero-crossing of the
carrier.

Whilst this is referred to as 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.

But what does it do to the bandwidth? See Tutorial Question Q4.

Bandlimiting:

The basic BPSK generated by the simplified arrangement illustrated in Figure 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.

Bandlimiting 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.

1. Translation back to baseband, with recovery of the bandlimited message waveform

2. Regeneration from the bandlimited waveform back to the binary message bit stream.

Translation back to baseband requires a local, synchronized carrier.

Stage 1:

Translation back to baseband is achieved with a synchronous demodulator, as shown in
Figure 3 below.

This requires a local synchronous carrier. In this experiment a stolen carrier will be used.


Figure 7.3: synchronous demodulation of BPSK
117

Stage 2:

The translation process does not reproduce the original binary sequence, but a bandlimited
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.

Phase ambiguity:

You will see in the experiment that the sign of the phase of the demodulator carrier is
important.

Phase ambiguity is a problem in the demodulation of a BPSK signal.

There are techniques available to overcome this. One such sends a training sequence, of
known format, to enable the receiver to select the desired phase, following which the training
sequence is replaced by the normal data (until synchronism is lost !).

An alternative technique is to use differential encoding. This will be demonstrated in this
experiment by selecting a different code from the LINE-CODE ENCODER.

EXPERIMENT

The BPSK generator

The BPSK generator of Figure 1 is shown in expanded form in Figure 4, and modelled in
Figure 5.


Figure 4: block diagram of BPSK generator to be modeled

Note that the carrier will be four times the bit clock rate.

118

The low pass filter is included as a band limiter if required. Alternatively, a bandpass filter
could have been inserted at the output of the generator. Being a linear system, the effect
would be the same.

Figure 5: model of the BPSK generator

The AUDIO OSCILLATOR supplies a TTL signal for the bit clock digital DIVIDEBY-
FOUR sub-system in the LINE-CODE ENCODER, and a sinusoidal signal for the carrier.

The PHASE SHIFTER (set to the LO range with the on-board switch SW1) allows relative
phase shifts. Watch the phase transitions in the BPSK output signal as this phase is altered.
This PHASE SHIFTER can be considered optional.

The digital DIVIDE-BY-FOUR sub-system within the LINE-CODE ENCODER is used for
deriving the bit clock as a sub-multiple of the BPSK carrier. Because the DECISION
MAKER, used in the receiver, needs to operate in the range about 2 to 4 kHz, the BPSK
carrier will be in the range about 8 to 16 kHz.

The NRZ-L code is selected from LINE-CODE ENCODER.

Viewing of the phase reversals of the carrier is simplified because the carrier and binary
clock frequencies are harmonically related.

T1 Patch up the modulator of Figure 5; acquaint yourself with a BPSK signal. Examine the
transitions as the phase between bit clock and carrier is altered. Vary the bandwidth of the
PRBS with the TUNEABLE LPF. Notice the envelope.

BPSK demodulator:

Figure 3 shows a synchronous demodulator for a BPSK signal in block diagram form. This
has been modeled in Figure 6 below. In the first part of the experiment the carrier and bit
clocks will be stolen.

119


Figure 6: the BPSK demodulator

The phase of the carrier is adjustable with the PHASE SHIFTER for maximum output from
the lowpass filter. Phase reversals of 1800 can be introduced with the front panel toggle
switch.

Select the NRZ-L input to the LINE-CODE DECODER. The LINE-CODE ENCODER and
LINE-CODE DECODER modules are not essential in terms of the coding they introduce
(since a bi-polar sequence is already available from the SEQUENCE GENERATOR) but
they are useful in that they contain the DIVIDE-BY-FOUR sub-systems, which are used to
derive the sub-multiple bit clock.

The LPF following the demodulator multiplier is there to remove the components at double
the carrier frequency. Its bandwidth can be set to about 12 kHz; although, for maximum
signal-to-noise ratio (if measuring bit error rates, for example), something lower would
probably be preferred.

Measurements:

The BPSK will have been bandlimited by the lowpass filter in the transmitter, and so the
received waveform is no longer rectangular in shape. But you can observe that the
demodulator filter output is related to the transmitted sequence (the NRZ-L code introduces
only a level shift and amplitude scale).

The DECISION MAKER will regenerate the original TTL sequence waveform.

Notice the effect upon the recovered sequence when the carrier phase is reversed at the
demodulator.

The following Tasks are a reminder of what you might investigate.

T2 Patch up the demodulator of Figure 6. The received signal will have come from the
transmitter of Figure 5. Observe the output from the TUNEABLE LPF, and confirm its
appearance with respect to that transmitted. If the sequence is inverted then toggle the front
panel 1800 switch of the receiver PHASE CHANGER.

120

T3 Set the on-board switch SW1 of the DECISION MAKER to accept NRZ-L coding. Use the
gain control of the TUNEABLE LPF to set the input at about the TIMS ANALOG
REFERENCE LEVEL of 2 volt peak. Adjust the decision point. Check the output.

T4 Observe the TTL output from the LINE-CODE DECODER. Confirm that the phase of the
receiver carrier (for the NRZ-L line code) is still important.

T5 Investigate a change of bandwidth of the transmitted signal. Notice that, as the bandwidth
is changed, the amplitude of the demodulated sequence at the DECISION MAKER input will
change. This you might expect; but, under certain conditions, it can increase as the
bandwidth is decreased! How could this be? See Tutorial Question Q6.




































121

TUTORIAL QUESTIONS

Q1 Do you think BPSK is an analog signal? Any comments?

Q2 In the model of Figure 5, is it necessary that the MULTIPLIER be switched to DC, as
shown?

Q3 You observed the shape of the phase transitions as the PHASE SHIFTER of Figure 5 was
changed. Would this influence the spectrum of the BPSK signal?

Q4 Does making the bit rate a sub-multiple of the carrier frequency have any influence on the
spectrum of the BPSK signal?

Q5 What is the purpose of the lowpass filter in the BPSK demodulator model? What
determines its bandwidth?

Q6 The amplitude of the signal at the DECISION MAKER input can decrease as the
bandwidth of the transmitter is widened (or vice versa). At first glance this seems unusual?
Explain.

Q7 The PHASE SHIFTER in the demodulator of Figure 6 was adjusted for maximum output.
What phase was it optimizing, and what was the magnitude of this phase? Could you measure
it?


MATLAB PORTION

Write a MATLAB program for a BPSK Modulator and BPSK Demodulator, include the
channel effect. Also draw the constellation diagram.

Carefully follow the instructions given in the lab.









122

Lab Grades
Total Marks Obtained Marks
Lab Performance
10
Knowledge about Lab
5
Values Obtained
(Accurate/Precise)
5
Lab Participation 5
Viva/Quiz/Assignment
5
Total
25

Comments


Date: ; Instructor Sig. .



123

LAB 16 FREQUENCY SHIFT KEYING
Modules:

VCO, BIT CLOCK REGEN, UTILITIES and TUNEABLE LPF.

PREPARATION

Generation:

As its name suggests, a frequency shift keyed transmitter has its frequency shifted by the
message.
Although there could be more than two frequencies involved in an FSK signal, in this
experiment the message will be a binary bit stream, and so only two frequencies will be
involved.
The word keyed suggests that the message is of the on-off (mark-space) variety, such as
one (historically) generated by a morse key, or more likely in the present context, a binary
sequence. The output from such a generator is illustrated in Figure 1 below.

Figure 1: an FSK waveform, derived from a binary message

Conceptually, and in fact, the transmitter could consist of two oscillators (on frequencies f
1

and f
2
), with only one being connected to the output at any one time. This is shown in block
diagram form in Figure 2 below.

Figure 2: an FSK transmitter

124

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 f
1
and f
2
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. See Tutorial Question Q2.
The continuous phase advantage of the VCO is not accompanied by an ability to ensure that
f
1
and f
2
are integer multiples of the bit rate. This would be difficult (impossible?) 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 f
1
and f
2
(of Figure 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.
Demodulation:

There are different methods of demodulating FSK. A natural classification is into
synchronous (coherent) or asynchronous (non-coherent).

Representative demodulators of these two types are the following:

Asynchronous:

A close look at the waveform of Figure 1 reveals that it is the sum of two amplitude shift
keyed (ASK) signals. These signals were examined in the experiment entitled ASK -
amplitude shift keying in this lab manual.
The receiver of Figure 3 takes advantage of this. The FSK signal has been separated into two
parts by bandpass filters (BPF) tuned to the MARK and SPACE frequencies.
125


Figure 3: demodulation by conversion-to-ASK

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 re-shapes 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.
Hint: You are advised to read ahead, before attempting the experiment, to consider the
modelling of this demodulator. Unlike most TIMS models, you are not free to choose
parameters - particularly frequencies. If they are to be tuned to different frequencies, then one
of these frequencies must be 2.083 kHz (defined as the MARK frequency). This is a
restriction imposed by the BIT CLOCK REGEN module, of which the BPF are sub-systems.
As a result of this, most other frequencies involved are predetermined. Make sure you
appreciate why this is so, then decide upon:

bit clock rate
SPACE frequency
envelope detector LPF characteristics

Synchronous:

In the block diagram of Figure 4 two local carriers, on each of the two frequencies of the
binary FSK signal, are used in two synchronous demodulators. A decision circuit examines
the two outputs, and decides which is the most likely.
126


Figure 4: synchronous demodulation

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. This
demodulator is more complex than most asynchronous demodulators.
Phase Locked Loop:

A phase locked loop is a well known method of demodulating an FM signal. It is thus capable
of demodulating an FSK signal. It is shown, in block diagram form, in Figure 5 below.

Figure 5: phase locked loop demodulator

The control signal, which forces the lock, is a bandlimited copy of the message sequence.
Depending upon the bandwidth of the loop integrator, a separate LPF will probably be
required (as shown) to recover the message.

Post Demodulation processing:

The output of a demodulator will typically be a bandlimited version of the original binary
sequence. Some sort of decision device is then required to regenerate the original binary
127

sequence. This is shown in the block diagrams above, but has not been implemented in the
TIMS models to follow.
Comments:

One might imply, from all of the above, that the generation and demodulation of an FSK
signal is relatively trivial, and that there is not a lot more to know about its properties. Such is
not the case.
Extensive research has been carried out into the properties of an FSK signal. This includes
the determination of the optimum relationship between the frequencies of the two tones and
the data rate. You should refer to your text book for more information.

EXPERIMENT

This experiment is not typical. There are no specific tasks to be completed. Instead you are
invited to investigate any or all of the models below in your own way.

Various methods of FSK generation are possible with TIMS, and some suggestions follow.

In all of the modulation schemes the message will be derived from a pseudo random binary
SEQUENCE GENERATOR.

GENERATION:

Scheme 1:

A VCO module is ideally suited for the generation of a continuous phase FSK signal, as
shown in Figure 6.
In FSK mode, the VCO is keyed by the message TTL sequence. Internal circuitry results in a
TTL HI switching the VCO to frequency f
1
, while a TTL LO switches it to frequency f
2
.
These two frequencies may be in the audio range (front panel toggle switch LO), or in the
100 kHz range (front panel toggle switch HI).
The frequencies f
1
and f
2
are set by the on-board variable resistors RV8 and RV7
respectively, while a continuous TTL HI or a TTL LO is connected to the DATA input
socket. See Tutorial Question Q6.

In FSK mode, neither of the front panel rotary controls of the VCO is in operation. See
Tutorial Question Q2.

128


Figure 6: CPFSK

Scheme 2:

Figure 7 shows a model of the arrangement of Figure 2. It switches either one of two tones to
the output, in response to the message sequence.

Figure 7: a model of the arrangement of Figure 2

The binary sequence is shown clocked by a divided-by-8 version of the output of an AUDIO
OSCILLATOR. This oscillator cannot itself be tuned to this relatively low (for TIMS)
frequency. The DIVIDE-BY-8 sub-system is in the BIT CLOCK REGEN module (set the on-
board switch SW2 with both toggles DOWN).
The signals at f
1
and f
2
are provided by the 2.083 kHz MESSAGE from the MASTER
SIGNALS module, and a VCO, respectively. The DUAL AUDIO SWITCH module is used
to switch between them.

One of the two ANALOG SWITCHES is driven directly by the TTL binary
message sequence.

The other ANALOG SWITCH is driven by the same TTL sequence, reversed
in polarity, and then DC shifted by +5 volts. The reversal and DC shift is
performed by the ADDER, with a maximum -ve output from the VARIABLE
129

DC module. Although 5 volt signals exceed the TIMS ANALOG
REFERENCE LEVEL the ADDER design is such that it will not be
overloaded.

Unless there is already an FSK signal available at TRUNKS, this transmitter is to be used in
conjunction with an asynchronous demodulator, of the type illustrated in Figure 3, and
modelled in Figure 8 - so don`t strip it down unnecessarily.
DEMODULATION

In the receivers described below it is assumed there is no bandlimiting (or noise) introduced
by a channel. In the case of poor signal-to-noise ratio the MARK and SPACE signals would
need to be compared in a decision circuit and the most likely one presented to the output.
Signals for demodulation:

The demodulators to be examined will require FSK signals as inputs. These may exist at
TRUNKS -check.
If not, then you will need to generate your own.
For a suitable FSK test signal you could use the model of Figure 7. The MARK signal is pre-
set to 2.083 kHz; initially set the SPACE to about 3 kHz.
Asynchronous Receiver:

An example of this is the demodulator of Figure 3, shown modelled in Figure 8.
The demodulator requires two bandpass (BPF) filters, tuned to the MARK and SPACE
frequencies. Suitable filters exist as sub-systems in the BIT CLOCK REGEN module.
To prepare the filters it is necessary to set the on-board switch SW1. Put the left hand toggle
UP, and right hand toggle DOWN. This tunes BPF1 to 2.083 kHz, and BPF2 anywhere in the
range 1 <f
o
<5 kHz, depending on the VCO (the filter centre frequency will be 1/50 of the
VCO frequency).
130


Figure 8: a model of the receiver of Figure 3

If you do not have extra UTILITIES and TUNEABLE LPF modules, then complete just one
arm of the demodulator.
Alignment requires the BPFs to be tuned to the MARK and SPACE frequencies. The first is
already done (2.083 kHz is already pre-set with SW1); the other is set with the VCO (already
pre-set with SW2).
Note that the specified bit rate is, by TIMS standards, rather low. The average oscilloscope
display can be a little flickery. Use a short sequence, and the SYNC signal from the
SEQUENCE GENERATOR to ext. trig.
What would happen if the bit rate was speeded up?
What would happen if the frequency of the SPACE signal, at the transmitter, was
moved towards 2.083 kHz? Of course, the receiver BPF2 would need to be
returned.

After successfully demodulating the MARK and the SPACE:

Test you preparatory work and show how close the MARK / SPACE frequencies
can approach before performance is degraded -explain why this is so.

Predict what will happen if the bit rate is increased. If you have supplied your own
FSK signal then you should test your prediction.

Synchronous Receiver:

A synchronous receiver of Figure 4 requires two local carriers, locked to the MARK and
SPACE frequencies. Such a receiver would require two VCO and associated modules, and is
131

probably too ambitious to attempt as part of this experiment.

PLL- Phase Locked Loop:

A phase locked loop is shown in block diagram form in Figure 5, and modelled in Figure 9.


Figure 9: PLL demodulator -the model of Figure 5

For the present experiment the integrator (of Figure 5) is modelled with the LOOP FILTER
in the BIT CLOCK REGEN module. This module contains four independent sub-systems.
The DIVIDE-BY-8 sub-system may already be in use at the transmitter.
If you are fussy about the appearance of the demodulated output it can be further filtered; say
with the LPF in the HEADPHONE AMPLIFIER.
Could you use either the DECISION MAKER, or the COMPARATOR in the UTILITIES
modules, or the HARD LIMITER in the DELTA MODULATION UTILITIES module, to
regenerate the message as a clean TTL sequence?
















132

TUTORIAL QUESTIONS

Q1 Analysis of the spectrum of an FM signal (an example of non-linear modulation) is not
trivial. For the case where the FSK signal can be looked upon as the sum of two ASK signals
(example of linear modulation), what can you say about its frequency spectrum?

Q2 The VCO is a very convenient method of making FSK - in fact, CFSK. VCOs come as
low-cost integrated circuits, and their modulation characteristics allow wideband FM.
However, for communications applications, they have one serious shortcoming. For
example?

Q3 What advantage is there in making the frequencies of the two tones of an FSK signal, and
the bit rate, sub-multiples of some reference frequency?

Q4 Given the bandwidths of a pair of BPFs, what would determine the frequency separation
of the two tones f
1
and f
2
, and the message bit rate f
S
, in a receiver such as illustrated in
Figure 3?

Q5 What are some of the factors which might determine the choice of either a synchronous or
asynchronous FSK demodulator?

Q6 Where can one find a convenient TTL HI, and a convenient TTL LO, in TIMS?














133

Lab Grades
Total Marks Obtained Marks
Lab Performance
10
Knowledge about Lab
5
Values Obtained
(Accurate/Precise)
5
Lab Participation 5
Viva/Quiz/Assignment
5
Total
25

Comments


Date: ; Instructor Sig. .

Anda mungkin juga menyukai