Analogue and Digital Communication Lab Manual
Analogue and Digital Communication Lab Manual
LAB MANUAL
Date: __________
Page | 2
Lab Manual of Analog & Digital Communication
1 List of Equipment 4
Page | 3
Lab Manual of Analog & Digital Communication
1 Function generator
2 Oscilloscope
3 Digital Multi-meter
4 Power supply
5 IC XR-2206
6 IC CD4046
7 IC MC1496
8 IC LM565
9 IC Op-Amp 741
10 Capacitors
11 Resistors
12 Diode
13 Probes
Page | 4
Lab Manual of Analog & Digital Communication
EXPERIMENT # 1
Generation of noise and observations of its effect on a sinusoidal signal
Objective
Familiarize students with the contents of the experiment and give them hands on experience regarding
the experiment
To learn the effect of noise on sinusoidal signal
Design and observe the filter output
Apparatus
Oscilloscope
Power supply
Functional generator
Op Amp 741
Resistors & Capacitor
Theory
The unwanted signal that gets introduced in a signal when it passes through any communication system is
termed as Noise. Generally, Noise is classified with respect to its origin as internal or external noise; the internal
noise is generated by the components of the communication system itself while the external noise is added to
the signal due to the external fields developed due to other communication systems, power lines or even due to
human interference. With proper care, the external noise can be minimized and can be even removed, similarly
with proper care the internal noise can be minimized but can never be eliminated. Noise is one of the basic
factors that limit the communication systems in terms of their performance. One of the important parameters to
observe is Signal to Noise ratio (S/N) which plays very important role in any communication system.
Noise can also be classified in terms of its spectrum. Thermal noise is one of the most common sources of
noise, also known as white noise because its spectrum is flat over the range of frequencies.
Circuit given in figure 1, generates white noise and can be easily coupled with message signal. The reason it
works is that the base-emitter junction behaves like a Zener diode. What happens, the most NPN small-signal
transistors have a Veb breakdown voltage of somewhere around 5V. Feed a larger voltage into the junction
Page | 5
Lab Manual of Analog & Digital Communication
and it will breakdown and conduct, momentarily stop, then start again. It all happens randomly and so fast
that it produces a random output voltage to the 10uF capacitor. Then summing Amplifier is used to sum up
the white noise and message signal.
Procedure
1. Generate a white noise and message signal using noise circuit (shown in fig. 1) and signal generator
respectively.
2. Use summing amplifier to sum up the white noise and message signal generated in step 1.
3. Get the signal from the output pin of amplifier and observe it on the oscilloscope.
4. Design a passive RC low pass filter and compare this with the output you obtained in step 3.
5. Design an active RC low pass filter (non-inverting) and compare the output with the output you obtained
using passive low pass filter.
The low pass filter only allows low frequency signals from 0Hz to its cut-off frequency, ƒc point to pass while
blocking those any higher. Cutoff frequency for first order filter is obtained by setting gain of circuit equals
to .
√
𝟏
fc =
𝟐𝝅𝑹𝑪
Passive Filter:
A simple passive RC Low Pass Filter, can be easily made by connecting together in series a single
Resistor with a single Capacitor as shown in figure 1. In this type of filter arrangement, the input signal
(Vin) is applied to the series combination (both the Resistor and Capacitor together) but the output
signal (Vout) is taken across the capacitor only. This type of filter is known generally as a “first-order
filter”
Active Filter:
An active filter generally uses an operational amplifier (op-amp) within its design. Its principle of
operation and frequency response is exactly the same as those for the previously seen passive filter, the
only difference this time is that it uses an op-amp for amplification and gain control.
For a non-inverting amplifier circuit, the magnitude of the voltage gain for the filter is given as a
function of the feedback resistor (R2) divided by its corresponding input resistor (R1) value and is given
as:
Gain: 1+
Page | 6
Lab Manual of Analog & Digital Communication
Sketch the output waveforms of the active and passive low-pass filters as seen on the oscilloscope for both
uniform and Gaussian noises. Also mention the time/div and volts/div for each channel.
POST LAB
1. Derive the cutoff frequency expression for a first order passive RC low pass filter?
2. Design inverting Active low pass filter, Derive the expression for Gain?
3. What will happen if we use high order low pass filter?
Page | 7
Lab Manual of Analog & Digital Communication
EXPERIMENT # 2
Generation of AM signals
Objective
Familiarize students with the contents of the experiment and give them hands on experience regarding
the experiment
To observe the effect of modulation index in amplitude modulation
Apparatus
MC1496
Oscilloscope
Function generator
Power supply
Connecting wires
Theory
An amplitude modulated signal can be obtained by simply multiplying the message signal with the carrier
signal; that is, if 𝑚(𝑡) is the message signal and 𝑐(𝑡) is the carrier signal, then we can write the modulated AM
signal as
𝜑(𝑡) = 𝑚(𝑡). 𝑐(𝑡)
or
𝜑(𝑡) = 𝑚(𝑡). 𝐴 cos 𝜔 𝑡
Message Signal
1
-1
0 0.001 0.002 0.003 0.004 0.005 0.006 0.007 0.008 0.009 0.01
Carrier Signal
1
-1
0 0.001 0.002 0.003 0.004 0.005 0.006 0.007 0.008 0.009 0.01
Modulated Signal
1
-1
0 0.001 0.002 0.003 0.004 0.005 0.006 0.007 0.008 0.009 0.01
Figure 2.1
Page | 8
Lab Manual of Analog & Digital Communication
Therefore, we need a simple multiplying unit for amplitude modulation. However, there are different types of
modulators which include:
1. Multiplier Modulators
These modulators contain a simple analog multiplier circuit whose output is directly
proportional to the product of both signals
2. Non-linear modulators
These modulators use nonlinear devices such as semi-conductor diode or a transistor for the
purpose of modulation.
3. Switching modulators
These modulators use the principle of switching to obtain the approximate product of carrier
and the message signal, usually these modulators use square wave as carrier. Ring modulator is an
example of such a modulator.
In this experiment, a Gilbert multiplier cell (MC1496) is used to generate amplitude modulated signal. Figure
2.2 shows the schematic of MC1496 along with the external components required to realize an amplitude
modulator. The potentiometer is used to set the DC level of the modulating signal, which can be used to adjust
the modulation index.
Procedure
Using MC 1496
1. Generate a 2Vp-p, 100 Hz sinusoidal message signal from the function generator 1.
2. Generate the sinusoidal carrier signal of 2Vp-p, 5 KHz from function generator 2.
3. Plug in the signal generated in step 1 to the pin 1 of MC 1496, labeled as “Modulating signal input”.
4. Plug in the carrier signal generated in step 2 to the pin 10, labeled as “Carrier Signal Input”.
5. Get the output from the +Vo and –Vo and observe it on oscilloscope. Using the following three controls
achieve the desired modulation.
Amplitude of Modulating Signal (functional generator)
Offset of Modulating Signal (functional generator)
Carrier Null Setting (Carrier Adjust)
Figure 2.2
Page | 9
Lab Manual of Analog & Digital Communication
Graphical Analysis:
Sketch the waveforms of modulating signal, carrier signal and modulated signal. Also mention the time/div and
volts/div for each channel.
5. Get the modulated output from the function generator and observe it on oscilloscope.
6. Change the voltage level of message signal 𝑚 to see the effect of modulation due to increasing
modulation index 𝜇, as per given table
Modulation Index 𝝁=
𝒎𝒑 1 0.75 0.5 0.25 1.25
𝑨𝑪
𝑨𝒄 (V) 1 1 1 1 1
𝒎𝒑 (V)
7. Also decrease the frequency of the carrier signal gradually and observe the effect on the modulated
signal.
Graphical Analysis:
Sketch the modulated waveforms for all cases of modulation index. Also mention the time/div and volts/div for
each channel.
POST LAB
Page | 10
Lab Manual of Analog & Digital Communication
EXPERIMENT # 3
Demodulation of AM signals
Objective
Familiarize students with the contents of the experiment and give them hands on experience regarding
the experiment
To demodulate the modulated wave using envelope detector
Apparatus
Resistor
Capacitor
Diode
Oscilloscope
Function generator
Theory
Demodulation of the amplitude modulated signal can be achieved by using the modulators which are the
circuits used for modulation can also be used for demodulation. However, we have to make following changes:
The carrier input is also required. We can classify demodulators as either coherent or non-coherent
demodulators. Coherent demodulators require the carrier signal in addition to the modulated signal for
demodulating AM signal however non-coherent demodulators do not require carrier signal as input. An
example of such a demodulator is known as envelope detector which usually comprises of a diode followed
by a RC circuit.
Page | 11
Lab Manual of Analog & Digital Communication
Procedure
Coherent Demodulation
1. Generate an AM signal as done using MC1496 of previous experiment.
2. Demodulate the AM signal using MC 1496 modulation circuit with low pass filter at the output; note
that the carrier should be the same as used in the modulation process.
3. Compare the demodulated signal from the module with the original message signal.
Graphical Analysis:
Sketch the modulated signal and demodulated signal (mixer module) observe on the oscilloscope. Also mention
the time/div and volts/div for each channel.
Non-coherent Demodulation
Graphical Analysis:
Sketch the AM signal (for 𝜇 = 1,𝜇 < 1 𝑎𝑛𝑑 𝜇 > 1) and the demodulated signal obtained from envelope
detector. Also mention the time/div and volts/div for each channel.
POST LAB
Page | 12
Lab Manual of Analog & Digital Communication
EXPERIMENT # 4
Frequency Modulation
Objective
Apparatus
Resistor
Capacitor
IC XR2206
Oscilloscope
Function generator
Theory
The requirement of frequency modulation is to vary the frequency of the high frequency carrier signal
according to the amplitude of the message signal Frequency modulated signal can be generated by using
Direct method
Indirect method
1. The output frequency of a voltage-contr oll ed oscillator is directly proportional to the input voltage.
So, if a message signal is supplied as input then the frequency of the output signal will contain the
amplitude changes of input signal in its frequency. This method is used commonly with a feedback
system which can generate an error voltage if the output frequency deviates far from the center
frequency.
2. The frequency can be varied with respect to some message signal if the reactance of an LC circuit is
varied in proportion to the magnitude of the message signal
3. A Varactor diode can be used whose reactance changes with the input signal and hence output
frequency can be varied
For indirect method, the signal is first integrated and then phase modulated to get the required FM output.
However, this type of modulation gives rise to Narrow Band FM signal which is then converted to required
range and bandwidth by using frequency multipliers and converters.
The modulation index is defined as the ratio of the maximum frequency deviation to the modulating frequency.
The maximum frequency deviation is the shift from center frequency 𝑓 when the amplitude of the modulating
signal is maximum.
Procedure
Page | 13
Lab Manual of Analog & Digital Communication
Graphical Analysis:
Draw the message signal, carrier signal and frequency modulated signal as seen on the oscilloscope. Also
mention the time/div and volts/div for each channel.
Using XR-2206
Design a Frequency modulator for carrier frequency of 45 KHz using VCO of XR2206. Data sheet of IC
XR2206 is attached with this manual. You may not use the other sections of the chip. Observe the frequency
modulated signal on oscilloscope and note down the readings in the given table. Find the frequency deviation
and calculate the modulation index.
Graphical Analysis:
Draw the message signal, carrier signal and frequency modulated signal as seen on the oscilloscope. Also
mention the time/div and volts/div for each channel.
Experimental Results:
Table 4.1
Amplitude Frequency
Message signal
Carrier Signal
∆𝒇 =______
𝜷 =_______
Page | 14
Lab Manual of Analog & Digital Communication
Page | 15
Lab Manual of Analog & Digital Communication
Page | 16
Lab Manual of Analog & Digital Communication
Page | 17
Lab Manual of Analog & Digital Communication
Page | 18
Lab Manual of Analog & Digital Communication
Page | 19
Lab Manual of Analog & Digital Communication
Page | 20
Lab Manual of Analog & Digital Communication
Page | 21
Lab Manual of Analog & Digital Communication
EXPERIMENT # 5
Objective
Apparatus
IC CD4046
Resistor
Capacitor
Oscilloscope
Function generator
Theory
PLL stands for 'Phase-Locked Loop' and is basically a closed loop frequency control system, whose functioning
is based on the phase sensitive detection of phase difference between the input and output signals of the
controlled oscillator. The PLL is a useful building block in communication circuits. There are a wide variety of
uses for a PLL including FM and AM detection, phase tracking, frequency synthesis, and frequency
multiplication. The purpose of this lab is to look at the PLL characteristics.
Figure 1 shows the classic configuration of a PLL. It consists of three main components: a voltage-controlled
oscillator (VCO), a phase comparator, and a loop filter.
Page | 22
Lab Manual of Analog & Digital Communication
a) Free Running
When there is no signal or when the feedback loop is open, the VCO operates at a preset frequency
called its natural or free-running frequency (f0).
b) Capture
To be in the capture state there must be an input signal and the feedback loop must be closed. In the
capture state the PLL is in the process of acquiring a lock. The frequency range over which the input
will causes the loop to lock is called the acquisition range or capture range. Pull-in range is the
capture range expressed as a peak value. The lowest frequency the PLL can lock onto is called the
lower capture limit (𝑓 ), and the highest frequency the PLL can lock onto is called the upper capture
limit (𝑓 ).
The first part of the experiment focuses on the Voltage Controlled Oscillator and measurements will be made
of frequency vs. voltage characteristics of the VCO. The second part entails building a PLL with the VCO from
part one. Here, lock and capture ranges will be measured. We will be using CD4046 chip for VCO and PLL
implementation. Data sheet is provided along with the manual.
Page | 23
Lab Manual of Analog & Digital Communication
In order to design a VCO with specific characteristics, Figure 5-7 of the data sheet provide the necessary
component information. For example figure 5 shows how the center frequency varies with the capacitance C1,
resistance R1, and supply voltage VDD. Figure 6 & 7 gives information about the minimum and maximum
frequency respectively.
Procedure
1. Using the following component values and Figure 3 assemble the VCO on bread board.
𝑉𝐷𝐷 = 15𝑉
𝑅1 = 10 𝑘Ω
𝑅2 = 100 𝑘Ω
𝐶1 = 0.01 𝜇𝐹
2. The INHIBIT pin (Pin 5) must be grounded, and it is suitable for VSS (Pin 8) to be ground as well.
3. Make sure that the supply voltages are turned low and the power supply is initially off.
4. When this setup is complete, turn the power supply on.
5. Observe the output at Pin 4 on oscilloscope.
6. Increase the voltage on Pin 9, VCO in, up to 15V in steps. Record the frequency of the output
waveform at each step in Table 1.
Page | 24
Lab Manual of Analog & Digital Communication
Observations
0.0
1.5
3
4.5
6
7.5
9
10.5
12
13.5
15
To configure the CD4046 chip as a PLL we will use the VCO from the previous part and add the
external circuitry for loop filter. In this part we will observe the functioning of PLL and will measure the lock
and capture range of PLL. The lock range of a PLL is set by the VCO where as the capture range is set by the
loop filter. The capture range can be equal to the lock range or smaller, but never larger. In this experiment the
loop components are chosen to make the capture range equal to the lock range.
Procedure
1. Set up the circuit as shown in figure 4 with following loop filter components.
𝐶2 = 0.01𝜇𝐹
𝑅3 = 10 𝑘Ω
2. Select square wave from function generator and set the frequency close to center frequency of VCO.
Apply square wave signal at Pin 14 through the capacitor. Observe the applied signal on channel 1, and
the VCO (or PLL) output on channel 2 of oscilloscope. PLL should show a stable waveform and have
the same frequency as the input square wave.
3. To measure the lock range start from the center frequency and slowly decrease the input frequency until
the signals are just unlocking, this is the lower lock limit 𝒇𝑳𝒍 .
4. Then increase the frequency until the signals start to lock again; this is the lower capture limit 𝒇𝑪𝒍 . Note
that these frequencies will be pretty close to each other since the loop filter was designed to give a
capture range equal to the lock range.
5. Continue increasing the frequency until the signals are unlocked again this is the upper lock limit 𝒇𝑳𝒖 .
Page | 25
Lab Manual of Analog & Digital Communication
6. Lastly, decrease the frequency from this point until the signals are locked again; this is the upper capture
limit 𝒇𝑪𝒖 .
Observations
Table 5.2: PLL Characteristics
Lock range 𝒇𝑳
Capture range𝒇𝑪
Page | 26
Lab Manual of Analog & Digital Communication
Page | 27
Lab Manual of Analog & Digital Communication
Page | 28
Lab Manual of Analog & Digital Communication
Page | 29
Lab Manual of Analog & Digital Communication
Page | 30
Lab Manual of Analog & Digital Communication
Page | 31
Lab Manual of Analog & Digital Communication
POST LAB
A PLL has a VCO with a free running frequency of 12MHz. As the frequency of the reference input signal is
gradually raised from zero, loop locks at 10MHz and comes out of lock again at 16MHz. Find the capture range
and lock range.
Page | 32
Lab Manual of Analog & Digital Communication
EXPERIMENT # 6
FM Demodulator
Objective
Apparatus
IC LM565
Resistors
Capacitors
DC power supply
Function Generator
Oscilloscope
Connecting probes and cables
Theory
Frequency demodulator, also called frequency discriminator, is a circuit, which converts instantaneous
frequency variations to linear voltage changes. There are many types of circuit used in communication system
as FM to AM conversion, balanced, and phase discriminators and phase-locked loop (PLL) frequency
demodulators.
1) Slope Detection
An operational amplifier differentiator followed by an envelope detector can serve the purpose of FM
demodulator.
A simple tuned circuit followed by an envelope detector can serve the purpose of demodulator because its
frequency response below or above the tuned frequency is approximately linear this method of
demodulation is known as slope detection. However the slope of |H (ω)| for such a demodulator is linear only
for a small band this problem can be removed by using Balanced discriminator or ratio detectors.
2) Zero-crossing detector
These are the frequency counters designed to measure the instantaneous frequency by counting the number
of zero crossings. The rate of zero crossings is equal to the instantaneous frequency of the signal.
Page | 33
Lab Manual of Analog & Digital Communication
3) Phase-locked loop
A basic phase locked loop is a simple control loop, which locks a VCO (voltage controlled oscillator)
to some reference frequency. The VCO in an oscillator with output frequency proportional to input control
voltage. We consider here only the process by which the loop stays “in lock” and the VCO tracks the
phase/frequency of the reference input. Therefore, the VCO adjusts itself so that the error signal e(t) tends to
zero. When e(t) is close to zero, r(t)~s(t) and v(t) ~m(t) (the message signal).
In this experiment we will introduce the operations of PLL frequency demodulator using LM565. The PLL
circuit of Figure 1 can be used as a frequency demodulator.
Procedure
0.3
𝑓 = = _______________
𝑅 𝐶
Page | 34
Lab Manual of Analog & Digital Communication
Graphical Analysis
Sketch the frequency modulated and frequency demodulated waveforms as seen on the oscilloscope. Also
mention the time/div and volts/div for each channel.
POST LAB
1. What effect does changing the amplitude of the modulation signal have on the demodulated output?
2. Referring to Figure 4. How would you change the VCO free-running frequency from 20 to 50 KHz?
3. Why VCO control voltage used as the demodulated output?
Page | 35
Lab Manual of Analog & Digital Communication
EXPERIMENT # 7
Pre-Emphasis & De-Emphasis
Objective
Learn how the characteristics of pre-emphasis and De-emphasis differ from each other
Apparatus
Oscilloscope
Function Generator
Resistors
Capacitors
Theory
The noise has an effect on the higher modulating frequencies than on the lower ones. Thus, if the higher
frequencies were artificially boosted at the transmitter and correspondingly cut at the receiver, an
improvement in noise immunity could be expected, thereby increasing the SNR ratio. This boosting of the
higher modulating frequencies at the transmitter is known as pre-emphasis and the compensation at the
receiver is called de-emphasis.
Procedure
Pre-emphasis
Page | 36
Lab Manual of Analog & Digital Communication
1k
3k
5k
7k
10 k
13 k
15 k
17 k
20 k
Graphical Analysis
Plot the graph between gain in dB vs. frequency of pre-emphasis network.
De-emphasis
Page | 37
Lab Manual of Analog & Digital Communication
1k
3k
5k
7k
10 k
13 k
15 k
17 k
20 k
Graphical Analysis
Plot the graph between gain in dB Vs. frequency of de-emphasis network.
POST LAB
Page | 38
Lab Manual of Analog & Digital Communication
EXPERIMENT # 8
Digital Modulation: FSK
Objective
Apparatus
XR2206
Oscilloscope
Function Generator
Power supply
Resistors
Capacitors
Theory
FSK modulation requires the swapping of frequency from one level to another. A “0” is transmitted by a pulse
of frequency 𝑓 and “1” is transmitted by using a pulse of frequency 𝑓 as show in figure 1. Hence the binary
information is 1contained in the frequency of the carrier wave.
FSK signal can be generated by using two oscillators tuned at two different frequencies but connected to single
output terminal. ‘0’ can be transmitted by selecting the output of one of the oscillators while ‘1’ can be
transmitted by selecting the other oscillator. The selection between the two oscillators will be determined by
the message signal.
We will be using XR-2206 for Frequency Shift Keying. Data sheet is provided along with the manual. The XR-
2206 can be operated with two separate timing resistors 𝑅 and 𝑅 , connected to timing Pins 7 and 8
respectively, as shown in Figure 2. Depending on the polarity of the logic signal at Pin 9, either one or the other
of these timing resistors is activated. If Pin 9 is open-circuited or connected to a bias voltage ≥ 2𝑉, only 𝑅 is
activated. Similarly, if the voltage level at Pin 9 is ≤ 1𝑉, only 𝑅 is activated. Thus, the output frequency can
be keyed between two levels, 𝑓 and 𝑓 , as
𝑓 = and 𝑓 =
Page | 39
Lab Manual of Analog & Digital Communication
Procedure
1. Design an FSK modulator to have f1 = 50,000 Hz and f2 = 10,000 Hz. Use any values of resistors or
capacitors. But remember to look at data sheet very carefully.
Table 7.1
𝑓 = 50𝑘𝐻𝑧 𝑅 =
C=
𝑓 = 10𝑘𝐻𝑧 𝑅 =
Graphical Analysis
Sketch the message signal and FSK modulated signal as seen on the oscilloscope. Also mention the time/div
and volts/div for each channel.
POST LAB
3. What will happen if we remove the resistor between 13 and 14 pin of XR-2206 IC?
4. What does variable resistor do in the given figure 2.
Page | 40
Lab Manual of Analog & Digital Communication
EXPERIMENT # 9
To understand the operational theory of Amplitude Shift Keying (ASK) / On-Off Keying (OOK).
To implement the OOK modulation using XR-2206 IC.
Apparatus
XR 2206
Oscilloscope
Function generator
Resistors
Capacitors
Theory
Figure 7. 1 Digital modulation formats with low-data rate short range wireless applications: amplitude shift keying (a), on-off keying
(b). Coherent waveforms as the binary state change occurs at carrier zero crossing points.
Page | 41
Lab Manual of Analog & Digital Communication
In Figure 7.1(a), the carrier amplitude is shifted between two amplitude levels to produce ASK. In
Figure 7.1(b), the binary signal turns the carrier off and on to create OOK.
OOK signal can be generated by using a single oscillator tuned at a fixed frequency ‘𝑓 ’ for one of
the two binary inputs. ‘0’ means off, i.e. no waveform or ground while ‘1’ i.e. on condition can be
transmitted by selecting some frequency for the oscillator circuit comprising 𝑅 and 𝐶.
We will be using XR-2206 for On-Off Keying (OOK). Data sheet is provided along with the manual.
The XR-2206 can be operated with two separate timing resistors 𝑅 and 𝑅 , connected to timing Pins
7 and 8 respectively, as shown in Figure 2. Depending on the polarity of the logic signal at Pin 9,
either one or the other of these timing resistors is activated. If Pin 9 is open-circuited or connected to
a bias voltage ≥ 2𝑉, only 𝑅 is activated. Similarly, if the voltage level at Pin 9 is ≤ 1𝑉, only 𝑅 is
activated. The desired frequency can be selected from the following reqlations.
𝑓 = and 𝑓 =
Procedure
5. Design an OOK modulator to have f1 = 10,000 Hz and f2 = 0 Hz. Use any values of resistors
or capacitors. But remember to look at data sheet very carefully.
6. Set up the circuit as show in Figure 7.2.
7. Generate a digital signal having frequency 2 KHz and amplitude 5Vp-p with dc bias from
function generator and apply it on Pin 9.
8. Observe the output at Pin 2 on oscilloscope.
Page | 42
Lab Manual of Analog & Digital Communication
Graphical Analysis
Sketch the message signal and OOK modulated signal for both cases as seen on the oscilloscope. Also
mention the time/div and volts/div for each channel.
POST LAB
Page | 43
Lab Manual of Analog & Digital Communication
EXPERIMENT # 10
Apparatus
XR 2206
Oscilloscope
Function generator
Dual DC power supply
Resistors
Capacitors
Theory
Figure 8. 1: The phase changes when the binary state switches between 0 & 1 in a BPSK
1. Construct the function generator circuit shown in Fig 8.2 (set 𝑉 = 0V)
2. Select a suitable resistance 𝑅 until a sine wave with minimum distortion is observed at 𝑉 .
3. Adjust 𝑅 until the output frequency 𝑓 = 100𝑘𝐻𝑧.
4. Slowly increase the dc control voltage until 𝑉 = 𝑉 ⁄2, and observe the output waveform.
5. Increase the dc control voltage until 𝑉 = +10𝑉, and again observe the output waveform.
6. Set the dc control voltage to 0V, and connect the oscilloscope external trigger input (1 𝑉 , 1𝑘𝐻𝑧) to
pin 11 of XR-2206. (Pin 11 is a square wave output signal with a frequency equal to the VCO output
frequency. Synchronizing the oscilloscope to this signal establishes a phase reference for 𝑉 .
7. Calculate the dc control voltage where the output signal undergoes a 180° phase reversal using the
formula,
𝑉
𝑉 =
2
where, 𝑉 = control voltage value where an output phase reversal occurs (volts)
𝑉 = DC supply voltage (volts)
8. Slowly increase the dc control voltage from 0 to +10V dc while observing 𝑉 .
In this section, the operation of a BPSK modulator is examined. The same that is shown in Fig 8.2 is used for
the modulator except that a function generator is placed in series with the dc control voltage supply. The
function generator simulates a binary digital input signal. The XR-2206 acts like a phase reversing switch that
is controlled by the external input voltage applied to pin 1. If the input voltage has an average voltage equal to
𝑉 ⁄2 and varies above and below this value, the phase of the output signal will reverse phase proportionally.
Page | 45
Lab Manual of Analog & Digital Communication
POST LAB
4. What is the relationship between a BPSK modulator output phase and its input signal level?
5. What is the relationship between a BPSK modulator output phase and its input signal frequency?
6. Brief the basic operation of the XR-2206 as a BPSK modulator.
Page | 46
Lab Manual of Analog & Digital Communication
EXPERIMENT # 11
MATLAB Basics for Communication System Design
Objective
To understand the use of MATLAB for solving communication engineering problems.
Learn the basics of MATLAB as used in Analogue Communication.
To develop understanding of MATLAB environment, commands and syntax.
MATLAB
MATLAB is a powerful tool that is utilized by the engineers and others professionals in development and testing
of various projects. It is versatile software, with the help of which you can solve and develop any sort of
engineering problem. The name MATLAB stands for MATRIX LABORAORY. All the work done in
MATLAB is basically in the form of matrices. Scalars are referred as 1-to-1 matrix and vectors are matrices
having more than 1 row and column. MATLAB is programmable and have the same logical, relational,
conditional and loop structures as in other programming languages, such as C, Java etc. It’s very easy to use
MATLAB, all we need is to practice it and become a friend of it.
Summary:
Scalars
Vectors
Matrices
Plotting
m-files
functions
Getting Started:
a) Go to the start button, then programs, MATLAB and then start MATLAB. It is preferred that you
have MATLAB7. You can then start MATLAB by double clicking on its icon on Desktop, if there is
any.
b) The Prompt:
>>
The operator shows above is the prompt in MATLAB. MATLAB is interactive language like C, Java
etc. We can write the commands over here.
c) In MATLAB we can see our previous commands and instructions by pressing the up key. Press the
key once to see the previous entry, twice to see the entry before that and so on. We can also edit the
text by using forward and back-word keys.
Help in MATLAB
In order to use the built-in help of the MATLAB we use the help keyword. Write it on the prompt and see the
output.
Page | 47
Lab Manual of Analog & Digital Communication
Also try
Scalars
A scalar is a single number. A scalar is stored in the MATLAB as a 1 x 1 matrix. Try these on the prompt.
>> A = 2;
>> B = 3;
>> C = A^B
>> C = A*B
Try these instructions as well
>> C = A+B
>> C = A-B
>> C = A/B
>> C = A\B
Try to implement these two relations and show the result in the provided space
a = 2.5, b = 5, c = -6
Vectors
Vectors are also called arrays in MATLAB. Vectors are declared in the following format.
>> X = [1 2 3 4]
>> Y = [2 5 8 9]
Try these two instructions in MATLAB and see the results.
________________________________________________________________________________________
Page | 48
Lab Manual of Analog & Digital Communication
>> X’ = __________________
Also try some new instructions for this like and notice the outputs in each case.
There is an important operator, the colon operator (:), it is very important operator and frequently used during
these labs. Try this one.
>> X = [0:0.1:1]
________________________________________________________________________________________
____________________________________________________________________
Length = ____________________
Size = ____________________
Try ‘help ones’ and ‘help zeros’ as well, and note down its important features.
MATRICES
>> A = [1 2 3; 4 5 6; 7 8 9]
>> B = [1,2,3; 4,5,6; 7,8,9]
Page | 49
Lab Manual of Analog & Digital Communication
Is there any difference between the two? Try to implement 2-to-3 matrix and 3-to-2 matrix.
Also take help on mod, rem, det, inv and eye and try to implement them. Try to use length and size
commands with these matrices as well and see the results.
1. 6x + 12y + 4z = 70
7x – 2y + 3z= 5
2x + 8y -9z = 64
2. A = [2 3 4 5; 1 8 9 0; 2 3 1 3; 5 8 9 3]
Solve 6A – 2I + A2 =
PLOTTING
Plotting is very important as we have to deal with various type of waves and we have to view them as well.
Try these and have a look on the results.
>> x = [0:0.1:10];
>> y = sin (x);
>> z = cos (x);
>> subplot (3,1,1);
>> plot (x,y);
>> grid on;
>> subplot (3,1,2);
>> plot (x,z);
>> grid on; hold on;
>> subplot (3,1,3);
>> stem (x,z);
>> grid on;
>> hold on;
>> subplot (3,1,3);
>> stem (x,y, ,'r');
Take help on the functions and commands that you don’t know. See the difference between the stem and
plot.
See help on plot, figure, grid, hold, subplot, stem and other features of it.
M-FILES
MATLAB can execute a sequence of statements stored in disk files. Such files are called M-files because they
must have the file type ‘.m’. Lot of our work will be done with creation of m-files.
Page | 50
Lab Manual of Analog & Digital Communication
Script Files
We can use script files in order to write long programs such as one on the previous page. A script file may
contain any command that can be entered on the prompt. Script files can have any name but they should be
saved with “.m” extension. In order to excurse an m-file from the prompt, just type its name on the prompt.
You can make an m-file by typing edit on the prompt or by clicking on the file then new and m-file. See an
example of m-file. Write it and see the results.
% This is comment
% A comment begins with a percent symbol
% The text written in the comments is ignored by the MATLAB
% comments in your m-files.
clear;
clc;
x = [0:0.1:10];
y = sin (x);
subplot (2,2,1);
plot (x,y, ,'r');
grid on;
z = cos (x);
subplot (2,2,2);
plot (x,z);
grid on;
w = 90;
yy = 2*pi*sin (x+w)
subplot (2,2,3);
plot (x,yy);
grid on;
zz = sin (x+2*w);
subplot (2,2,4);
stem (x,zz, ,'g');
hold on;
stem (x,y, ,'r');
grid on;
Function Files
MATLAB have many built-in functions including trigonometry, logarithm, calculus and hyperbolic functions
etc. In addition we can define our own functions and we can use built-in functions in our functions files as
well. The function files should be started with the function definition and should be saved with the name of
function. The general format of the function file is
Page | 51
Lab Manual of Analog & Digital Communication
Generation of Signals
Signals are represented mathematically as a function of one or more independent variables. We will generally
refer to the independent variable as time. Therefore we can say a signal is a function of time. Write these
instructions in m-file as execute to see the result.
Sinusoidal Sequence:
% Example 2.1
% Sinusoidal signals
% 2sin( 2πτ-π/2)
t=[-5:0.01:5];
x=2*sin((2*pi*t)-(pi/2));
plot(t,x)
grid on;
axis([-6 6 -3 3])
ylabel ('x(t)')
xlabel ('Time(sec)')
title ('Figure 2.1')
Figure 11.1
See the output, change the phase shift value and observe the differences.
=0 n≠0
We are making a function named imseq and we further use this function in next experiments of this lab. The
MATLAB code is given below:
Page | 52
Lab Manual of Analog & Digital Communication
It is defined as
u(n) = 1 n ≥ 0
0 n≤0
We require an array operator “ .^ ” to implement a real exponential sequence. See the MATLAB code below
>> n = [0:10];
>> x = (0.9).^n;
It is define as:
Where a is called the attenuation and b is the frequency in radians. It can be implemented by following
MATLAB script.
>> n = [0:10];
>> x = exp ((2+3j)*n);
Page | 53
Lab Manual of Analog & Digital Communication
Random Sequence:
Many practical sequences cannot be described by the mathematical expressions like above, these are called
random sequences. They depend upon the parameters like probability density function or their statistical
moments. In MATLAB two types of random sequences are available. See the code below:
>> rand (1,N)
And
The above instruction generates a length N random sequence whose elements are uniformly distributed between
[0,1]. And the last instruction, randn generates a length N Gaussian random sequence with mean 0 and variance
1. Plot these sequences.
% example 2.3
%Generation of random sequence
n = [0:10];
x = rand (1, length (n));
y = randn (1, length (n));
plot (n,x) ;
grid on;
hold on;
plot(n,y,'r');
ylabel ('x & y')
xlabel ('n')
title ('Figure 2.3')
Periodic Sequences:
A sequence is periodic if it repeats itself after equal interval of time. The smallest interval is called the
fundamental period. Implement code given below and see the periodicity.
% Example 2.4
% Generation of periodic sequences
n = [0:4];
x = [1 1 2 -1 0];
subplot (2,1,1);
stem (n,x);
grid on;
axis ([0 14 -1 2]);
xlabel ('n');
ylabel ('x(n)');
title ('Figure 2.4(a)');
xtilde = [x,x,x];
length_xtilde = length (xtilde);
n_new = [0:length_xtilde-1];
subplot (2,1,2);
stem (n_new,xtilde,'r');
grid on;
xlabel ('n');
ylabel ('perodic x(n)');
title ('Figure 2.4(b)');
Page | 54
Lab Manual of Analog & Digital Communication
Figure 11.4
POST LAB
Page | 55
Lab Manual of Analog & Digital Communication
EXPERIMENT # 12
Objective
SUMMARY
Signal operations (Addition, Multiplication, Scaling, Shifting, Folding, Sample Summation, Sample
product, Energy, Even and Odd sequences, Convolution)
SIGNALS OPERATIONS:
Signal Addition
The length of x1 and x2 should be equal. See the MATLAB code below:
function [y,n] = sigadd(x1,n1,x2,n2)
% implement y(n) = x1(n) + x2 (n)
% [y,n] = sigadd (x1,n1,x2,n2)
% y = sum sequence over n, which include n1 and n2
% x1 = first sequence over n1
% x2 = second sequence over n2 (n2 can be different from n1)
n = min(min(n1),min(n2)): max(max(n1),max(n2)); %duration of y(n)
y1 = zeros(1,length(n)); % initialization
y2 = y1;
y1(find((n>=min(n1))&(n<=max(n1))==1))=x1; % x1 with duration of y
y2(find((n>=min(n2))&(n<=max(n2))==1))=x2; % x2 with duration of y
y = y1 + y2;
Page | 56
Lab Manual of Analog & Digital Communication
grid on;
axis ([-5 10 -5 5]);
xlabel ('n1'); ylabel ('x1(n)');
title ('1st signal');
subplot (3,1,2);
stem (n2,x2);
grid on; hold on;
axis ([-5 10 -5 5]);
xlabel ('n2'); ylabel ('x2(n)');
title ('2nd signal');
subplot (3,1,3); stem (n,y,'r');
grid on;
axis ([-5 10 -5 5]);
xlabel ('n'); ylabel ('y(n)');
title ('Added Signals');
Figure 11.5
Signal Multiplication:
The multiplication of two signals is basically sample by sample multiplication or you can say dot multiplication.
By definition it is
It is implemented by the array operator ‘ .* ‘ that we studied in last lab. A signal multiplication function is
developed that is similar to the sigadd function. See the code below:
_______________________________________________________
Page | 57
Lab Manual of Analog & Digital Communication
% Example 2.6
% signal multiplication using sigmult function
clear;
clc;
n1 = [0:0.1:10];
x1 = sin (n1);
n2 = [-5:0.1:7];
x2 = 4*sin (n2);
[y,n] = sigmult(x1,n1,x2,n2);
subplot (3,1,1);
stem (n1,x1);
grid on;
axis ([-5 10 -5 5]);
xlabel ('n1');
ylabel ('x1(n)');
title ('1st signal');
subplot (3,1,2);
stem (n2,x2);
grid on;
hold on;
axis ([-5 10 -5 5]);
xlabel ('n2');
ylabel ('x2(n)');
title ('2nd signal');
subplot (3,1,3);
stem (n,y,'r');
grid on;
axis ([-5 10 -5 5]);
xlabel ('n');
ylabel ('y(n)');
title ('Multiplied Signals');
Page | 58
Lab Manual of Analog & Digital Communication
Figure 11.6
1. Scaling:
In this operation the samples of the signal is multiplied by a scalar α. The mathematical operator * is
used for the implementation of the scaling property.
α{x(n)} = { α x(n)}
>> [x,n] = stepseq (-1,-5,5);
>> a = 2;
>> y = a*x;
>> subplot (2,1,1);
>>stem (n,x);grid on;
>> subplot (2,1,2);
>> stem (n,y, 'r');
>> grid on;
2. Shifting
In this operation, each sample of the signal is shifted by k to get a shifted signal. By definition:
y(n) = {x (n-k)}
In this operation there is no change in the array or vector x, that contains the samples of the signal. Only n
is changed be adding k to each element. The function is given below:
function [y,n] = sigshift (x,m,n0)
% implement y(n) = x(n-n0)
Page | 59
Lab Manual of Analog & Digital Communication
Page | 60
Lab Manual of Analog & Digital Communication
Figure 12.1
3. Folding:
In this operation each sample of x(n) is flipped around n=0 to obtain a folded signal y(n).
y (n) = {x(-n)}
In MATLAB, this function is implemented by using a built-in function fliplr(x) and –fliplr(x). Its
implementation is given below:
function [y,n] = sigfold(x,n)
% implements y(n) = x(-n)
% [y,n] = sigfold(x,n)
% x = samples of the original signal
% n = indexes of the original signal
y = fliplr(x);
n = -fliplr (n);
Page | 61
Lab Manual of Analog & Digital Communication
4. Sample Summation:
This operation is different from sigadd function. In this operation we add all the sample values of any
signal x(n) between any two of its index values. By definition
In MATLAB it is implemented by the sum(x(n1:n2)) command. See the code below for the demonstration of
above function.
>> [x,n] = stepseq (5,0,10)
>> sum(x(2:7))
5. Sample Product:
This operation also differs from the sigmult function. It implies the sample values over the range n1:n2. It is
implemented by the prod(x(n1:n2)). See the code below.
>> x = [0 1 2 3 4 5]
>> prod(x(2:5))
6. Energy:
Where the subscript * is used for complex conjugate of the signal x. The energy of the finite duration signal is
computed in MATLAB as.
>> Ex = sum (x.*conj(x));
Or
>> Ex = sum (abs(x).^2);
A real valued sequence xe(n) is called even if the following condition satisfies.
xe(-n) = xe(n)
xo(-n) = -xo(n)
% example 3.2
% Generation of even and odd signals
n1 = [0:0.01:1];
x1 = 2*n1;
n2 = [1:0.01:2];
x2 = -2*n2+4;
n = [n1,n2];
x = [x1,x2];
Page | 62
Lab Manual of Analog & Digital Communication
%Even Signal
[xe,ne] = sigfold(x,n);
%Plotting of original signal
subplot (3,1,1);
plot (n,x);
axis ([-4 4 0 2.5]);
grid on;
%Plotting of original signal + even signal
subplot (3,1,2);
plot (n,x/2,ne,xe/2);
axis ([-4 4 0 2.5]);
grid on;
% Plotting of original signal + odd signal
xo = -xe;
no = ne;
subplot (3,1,3);
plot (n,x/2,no,xo/2);
axis ([-4 4 -2.5 2.5]);
grid on;
Figure 12.2
The above example shows to develop the even and odd signals from a given signal. Now we are going to
develop a function to compute the even and odd signals for ourselves. See the code of function file below:
function [xe,xo,m] = evenodd (x,n)
% Decomposes a real function into its even and odd parts
% [xe,xo,m] = evenodd(x,n)
% xe = even signal
% xo = odd signal
% m = indexes
% x = original signal
% n = indexes for original signal
if any(imag(x)~=0)
error(‘x is not a real sequence’)
Page | 63
Lab Manual of Analog & Digital Communication
end
m = -fliplr(n);
m1 = min([m,n]);
m2 = max([m,n]);
m = m1:m2;
nm = n(1)-m(1);
n1 = 1:length(n);
x1 = zeros(1,length(m));
x1(n1+nm) = x;
x = x1;
xe = 0.5*(x+fliplr(x));
xo = 0.5*(x-fliplr(x));
Now change the example 3.2 code to implement the same example with this function.
8. Convolution:
The convolution is very important operation as far the system as their impulse responses are concern. It is
mathematically defines as:
Where h(n) is the impulse response of the system. The above definition is best depicted by the following
diagram.
A function is developed which will evaluate convolution in a more precise form and also calculate the indexes
to help us plot the sequences.
function [y,ny] = conv_m(x,nx,h,nh)
% Modified convolution routine for signal processing
% [y,ny] = conv_m(x,nx,h,nh)
% [y,ny] = convolution result
% x = original signal
% nx = index values
% h = impulse response signal
% nh = index values for impulse response
nyb = nx(1) + nh(1);
nye = nx(length(x)) + nh(length(h));
ny = [nyb:nye];
y = conv(x,h);
Page | 64
Lab Manual of Analog & Digital Communication
POST LAB
a. x(n) = u(n) – u(n-5). Decompose into even and odd components and plot them.
b. The impulse response of LTI system is h (n) = delta (n-2), if the input to this system is a arbitrary sequence
x(n) of length 10, then plot the original and the convolved outputs of the system. What is the change if the
h(n) = x(n) and input signal is now the previous impulse response of the system.
c. n = [-2:2]
x1 = [3,2,1,-2,-3];
x2 = [1,1,1,1,1]
Implement y = x1*x2
Page | 65
Lab Manual of Analog & Digital Communication
EXPERIMENT # 13
Objective
This section deals with looking at the spectrum of simple waves. We first look at the spectrum of a
simple sine wave
.
To start Simulink: Start MATLAB then type simulink on the command line. A Simulink Library
Window opens up as shown in figure 13.1.
Figure 13.1
Spectrum of a simple sine wave: - Figure 13.2 shows the design for viewing the spectrum of a simple sine wave.
Page | 66
Lab Manual of Analog & Digital Communication
Figure 13.2
Figure 13.3 shows the time-domain sine wave and the corresponding frequency domain is shown in figure
13.4. The frequency domain spectrum is obtained through a buffered-FFT scope, which comprises of a Fast
Fourier Transform of 128 samples which also has a buffering of 64 of them in one frame. The property block
of the B-FFT is also displayed in figure 13.5.
Figure 13.3
Page | 67
Lab Manual of Analog & Digital Communication
Figure 13.4
This is the property box of the Spectrum Analyzer
Figure 13.5
Page | 68
Lab Manual of Analog & Digital Communication
From the property box of the B-FFT scope the axis properties can be changed and the Line properties can
be changed. The line properties are not shown in the above. The Frequency range can be changed by using the
frequency range pop down menu and so can be the y-axis the amplitude scaling be changed to either real
magnitude or the dB (log of magnitude) scale. The upper limit can be specified as shown by the Min and Max
Y-limits edit box. The sampling time in this case has been set to 1/5000.
Note: The sampling frequency of the B-FFT scope should match with the sampling time of the input time
signal.
Also as indicated above the FFT is taken for 128 points and buffered with half of them for an overlap.
Note: The signal analyzer if chosen with half the scale, the spectrum is the single-sided analyzer, so the power
in the spectrum is the total power.
Similar operations can be done for other waveforms – like the square wave, triangular. These signals can
be generated from the signal generator block.
Figure 13.6
Page | 69
Lab Manual of Analog & Digital Communication
The following figure demonstrates the waveform multiplication. A sine wave of 1 kHz is generated using a
sine wave generator and multiplied with a replica signal. The input signal and the output are shown in figures.
It can be seen that the output of the multiplier in time domain is basically a sine wave but doesn’t have the
negative sides since they get cancelled out in the multiplication.
Figure 13.7
The spectral output of the spectrum is shown below. It can be seen that there are two side components
in spectrum. The components at fc + fm and –(fc + fm) can be seen along with a central impulse.
Figure 13.8
Page | 70
Lab Manual of Analog & Digital Communication
Figure 13.9
Figure 13.10
Page | 71
Lab Manual of Analog & Digital Communication
The output is shown below. It can be seen that the output consists of just two side bands at +(fc +
fm) and the other at –(fc + fm) , i.e. at 9kHz and 11kHz.
Figure 13.11
By multiplying the carrier signal and the message signal, we achieve modulation.
We observe the output to have no 10 KHz component i.e., the carrier is not present. The output contains a
band at 9 KHz (fc-fm) and a band at 11 KHz (fc + fm). Thus we observe a double side band suppressed
carrier. All the transmitted power is in the 2 sidebands.
By varying the carrier and message signal frequencies, we observe that the 2 sidebands move according to
equation fc ± fm.
Now, using a square wave as modulating signal, we see that DSBSC is still achieved.
The output from spectrum analyzer was slightly different from the theoretical output. In the result from
the spectrum analyzer, there is a small peak at frequency = 10kHz (the carrier frequency) and other 2
peak at 0 and 1000 Hz. This may caused by the incorrectly calibrated multiplier.
Next, the changes to the waveform parameters have been made and then the outputs have been observed.
And here are the changes that have been made
Page | 72
Lab Manual of Analog & Digital Communication
Figure 13.12
Amplitude Modulation
This experiment is the amplitude modulation for modulation index a = 1 and 0.5.
From the equation of the AM
y = km (1 + a ⋅ cos(2π (1000)t) ⋅ cos(2π (10000)t
The representation of the signal in both time-domain and frequency domain when km=1 for a=1 and a=0.5
were found to be as shown in figures.
The experimental set up for generating an AM signal looks like this: -
Page | 73
Lab Manual of Analog & Digital Communication
Figure 13.12
Figure 13.13
Page | 74
Lab Manual of Analog & Digital Communication
Figure 13.14
Figure 13.15
Page | 75
Lab Manual of Analog & Digital Communication
It must be noted here that the A.M signal can be converted into a DSB-SC signal by making the constant
= 0.
The waveforms at various levels of modulation are shown in the following figures.
Figure 13.16
Page | 76
Lab Manual of Analog & Digital Communication
Figure 13.17
Figure 13.18
The results from the experiment were shown. The results from the experiment are pretty much the same
as in the theoretical ones except there are 2 other peaks at 0 and 1000 kHz. This is the same as earlier
experiment. The cause of this problem is probably the multiplier.
Page | 77
Lab Manual of Analog & Digital Communication
The last experiment in this section is the two tone modulation. In this experiment, the 2 kHz signal had
been added to the modulating signal in the above experiment. Theoretically, the representation of the modulated
signal in time-domain and frequency domain would have been as in the figure below. In the figure, 1 kHz and
2 kHz signals were modulated with 10 kHz carrier.
Figure 13.19
Figure 13.20
Page | 78
Lab Manual of Analog & Digital Communication
Figure 13.21
The two-tone signal is amplitude modulated using the same block model discussed in the previous
section. The output spectrum is shown in figure. In this case the signals of 1 kHz and 2 kHz are modulated
by a 10kHz carrier. The output spectrum is shown in figure
Figure 13.21
Page | 79
Lab Manual of Analog & Digital Communication
The result from the experiment was shown. The highest peak is at the carrier frequency as in the theoretical
result. But there were differences on the sidebands. In the figure from MATLAB, both frequencies in the
sidebands have the same magnitude, but from the experiment, the components at 9000Hz and 11000Hz have
higher magnitude than the components at 8000Hz and 12000 Hz. There’re also many small peaks of about
1000Hz apart in the experiment result. This might come from the incorrectly calibrated multiplier.
The final experiment in this section is to change the carrier frequency and the modulating frequency. When
the carrier frequency increases, the spectrum of the modulated signal is expected to have the two
sidebands centered at the new carrier frequency. And when one of the two modulating signals changes in
frequency, the spectrum of the output signal should have two components move away from their original
positions according to the change in frequency. The result from the experiment was shown. Both change in
carrier frequency and modulating frequency is shown.
Figure 13.22
The output is going to be a side band. The output of this setup before and after the Filtering is shown in
figures and figure. It can be noted that the output of the SSB signal before filtering has the higher order
frequency components which are eliminated by the filter.
Page | 80
Lab Manual of Analog & Digital Communication
Figure 13.23
Instead of using a filter, the same task can be achieved by using a phase shifter and summer in conjunction
with the existing circuit. Operating the summer as an adder causes the USB to be produced. If the summer is
operated as an inverter, then, the LSB will be retained.
Without filtering
Figure 13.24
Page | 81
Lab Manual of Analog & Digital Communication
After filtering the higher order components are removed and we get a wave form of the form shown in figure
Figure 13.25
Figure shows the experimental setup for the Phase Shift SSB Modulation. The signal consists of four
input sine waves.
Page | 82
Lab Manual of Analog & Digital Communication
both the time domain and the frequency domain is of importance to us.
When the sign is +-, it represents the lower side band and the wave form for ++ represents the upper-side bands
respectively. The output spectrum is shown in figure.
Figure 13.27
Conclusion
We learnt how to operate the spectrum analyzer, oscilloscope and the function generator to generate and view
different waveforms. We also performed the different modulation schemes – DSBSC, AM and SSB. We
conclude that the DSBSC modulating system is better as no power is lost in the carrier. SSB permits more
of the information to be transmitted over the same channel by chopping off the duplicate sideband.
Page | 83
Lab Manual of Analog & Digital Communication
POST LAB
1. If message and carrier signal is a square and sine wave having frequency 1KHz and 10Khz
respectively. Then Sketch the spectrum of modulated signal?
2. Draw simulink block diagram of given spectrum?
Magnitude Response
0.7
0.6
0.5
0.4
0.3
0.2
0.1
0
-2.5 -2 -1.5 -1 -0.5 0 0.5 1 1.5 2 2.5
Frequency (in hertz) 4
x 10
Figure 13.29
Page | 84
Lab Manual of Analog & Digital Communication
EXPERIMENT # 14
In this first part of the lab we will focus on a couple of simple examples and plot their spectrum, in
time and in frequency domain. In second part of this lab we will write the code for Amplitude
modulation with carrier and suppress carrier and then focus on two tune modulation and at the end
of this lab we will write a code for single side band.
Sketch the time and frequency domain representations (magnitude only) of the following
The time and frequency domain of the input signal is shown as below.
CODE:
%% Time specifications:
Fs = 10000; 1
dt = 1/Fs;
StopTime = 0.5; 0.5
Magnitude
t = (0:dt:StopTime-dt)';
0
N = size(t,1);
-0.5
Fc = 1000;
x = cos(2*pi*Fc*t); -1
0 0.001 0.002 0.003 0.004 0.005 0.006 0.007 0.008 0.009 0.01
Time
subplot(2,1,1)
plot(t,x); 0.8
axis([0 1/100 -1 1]);
0.6
xlabel('Time');
Magnitude
ylabel('Magnitude') 0.4
%% Fourier Transform:
X = fftshift(fft(x)); 0.2
%% Frequency specifications:
dF = Fs/N; 0
-5000 -4000 -3000 -2000 -1000 0 1000 2000 3000 4000 5000
f = -Fs/2:dF:Fs/2-dF; Frequency (in hertz)
%% Plot the spectrum:
subplot(2,1,2)
plot(f,abs(X)/N);
xlabel('Frequency (in hertz)');
ylabel('Magnitude')
Page | 85
Lab Manual of Analog & Digital Communication
Fs = 1000000; 2
dt = 1/Fs;
StopTime = 0.5; 1
Magnitude
t = (0:dt:StopTime-dt)';
N = size(t,1); 0
Fc = 1000; -1
x = SQUARE(2*3.14*Fc*t);
-2
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5
subplot(2,1,1)
Time -3
plot(t,x); x 10
axis([0 1/200 -2 2]);
xlabel('Time');
ylabel('Magnitude'); 0.4
%% Fourier Transform:
Magnitude
X = fftshift(fft(x)); 0.3
%% Frequency specifications: 0.2
dF = Fs/N;
f = -Fs/2:dF:Fs/2-dF; 0.1
%% Plot the spectrum:
subplot(2,1,2) 0
-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1
plot(f,abs(X)/N); Frequency (in hertz) 5
axis([-100000 100000 0 0.5]); x 10
xlabel('Frequency (in hertz)');
Figure 14.2 Spectrum of Square Wave (1000 Hz)
ylabel('Magnitude');
C. Cos2(2πft) f = 1kHz
1
Fs = 30000; 0.5
dt = 1/Fs;
Magnitude
StopTime = 0.5; 0
t = (0:dt:StopTime-dt)';
N = size(t,1); -0.5
Fc = 1000; -1
x = cos(2*pi*Fc*t); 0 0.001 0.002 0.003 0.004 0.005 0.006 0.007 0.008 0.009 0.01
x=x.*x; Time
subplot(2,1,1)
plot(t,x); 0.6
xlabel('Time');
Magnitude
ylabel('Magnitude');
0.4
axis([0 1/100 -1 1]);
X = fftshift(fft(x));
dF = Fs/N; 0.2
f = -Fs/2:dF:Fs/2-dF;
subplot(2,1,2) 0
plot(f,abs(X)/N); -5000 -4000 -3000 -2000 -1000 0 1000 2000 3000 4000 5000
axis([-5000 5000 0 0.75]) Frequency (in hertz)
zoom on Figure 14.3 Spectrum of cos2 (2000πt)
xlabel('Frequency (in hertz)');
Page | 86
Lab Manual of Analog & Digital Communication
ylabel('Magnitude');
Magnitude
StopTime = 0.5;
t = (0:dt:StopTime-dt)'; 0
N = size(t,1);
Fc1 = 300; -0.5
x1 = cos(2*pi*Fc1*t);
Fc2 = 5000; -1
x2 = cos(2*pi*Fc2*t); 0 0.001 0.002 0.003 0.004 0.005 0.006 0.007 0.008 0.009 0.01
x=x1.*x2; Time
subplot(2,1,1)
plot(t,x);
axis([0 1/100 -1 1]); 0.4
xlabel('Time');
Magnitude
ylabel('Magnitude'); 0.3
0.2
X = fftshift(fft(x));
dF = Fs/N; 0.1
f = -Fs/2:dF:Fs/2-dF;
subplot(2,1,2) 0
-6000 -4000 -2000 0 2000 4000 6000
plot(f,abs(X)/N);
Frequency (in hertz)
axis([-6000 6000 0 0.5]);
xlabel('Frequency (in hertz)'); Figure 14.4 Spectrum of AM-SC (DSB)
ylabel('Magnitude');
2
B. Double side-band – with carrier modulation
1
Fs = 30000;
Magnitude
dt = 1/Fs; 0
StopTime = 0.5;
t = (0:dt:StopTime-dt)';
N = size(t,1); -1
Fc1 = 300;
x1 = cos(2*pi*Fc1*t); -2
0 0.002 0.004 0.006 0.008 0.01
Fc2 = 5000;
x2 = cos(2*pi*Fc2*t); Time
x=(1+x1).*x2;
subplot(2,1,1)
plot(t,x);
axis([0 1/100 -2 2]); 0.4
Magnitude
xlabel('Time');
ylabel('Magnitude')
X = fftshift(fft(x)); 0.2
dF = Fs/N;
f = -Fs/2:dF:Fs/2-dF;
%% Plot the spectrum: 0
subplot(2,1,2) -6000 -4000 -2000 0 2000 4000 6000 8000
plot(f,abs(X)/N); Frequency (in hertz)
xlabel('Frequency (in hertz)');
Figure 14.5 Spectrum of AM-WC (µ = 1)
ylabel('Magnitude')
Page | 87
Lab Manual of Analog & Digital Communication
Magnitude
t = (0:dt:StopTime-dt)';
0
N = size(t,1);
Fc1 = 300;
x1 = cos(2*pi*Fc1*t); -1
Fc2 = 5000;
x2 = cos(2*pi*Fc2*t); -2
x=(1+0.5*x1).*x2; 0 0.001 0.002 0.003 0.004 0.005 0.006 0.007 0.008 0.009 0.01
subplot(2,1,1) Time
plot(t,x);
axis([0 1/100 -2 2]);
xlabel('Time');
0.6
ylabel('Magnitude');
Magnitude
X = fftshift(fft(x));
dF = Fs/N; 0.4
f = -Fs/2:dF:Fs/2-dF;
subplot(2,1,2) 0.2
plot(f,abs(X)/N);
zoom on
xlabel('Frequency (in hertz)'); -6000 -4000 -2000 0 2000 4000 6000
ylabel('Magnitude'); Frequency (in hertz)
Figure 14.6 Spectrum of AM-WC (µ = 0.5)
Fs = 43000; 1
Magnitude
dt = 1/Fs;
StopTime = 0.5; 0
t = (0:dt:StopTime-dt)';
N = size(t,1); -1
Fc1 = 1000;
x1 = cos(2*pi*Fc1*t);
-2
Fc2 = 2000; 0 0.001 0.002 0.003 0.004 0.005 0.006 0.007 0.008 0.009 0.01
x2 = cos(2*pi*Fc2*t); Time
Fc3 = 10000;
x3 = cos(2*pi*Fc3*t); 0.4
x=(x1+x2).*x3;
subplot(2,1,1)
0.3
plot(t,x);
Magnitude
xlabel('Time');
ylabel('Magnitude'); 0.2
axis([0 1/100 -2 2]);
X = fftshift(fft(x)); 0.1
dF = Fs/N;
f = -Fs/2:dF:Fs/2-dF; 0
subplot(2,1,2) -2.5 -2 -1.5 -1 -0.5 0 0.5 1 1.5 2 2.5
plot(f,abs(X)/N); Frequency (in hertz) 4
x 10
xlabel('Frequency (in hertz)'); Figure 14.7 Spectrum of Two Tune Modulation (SC)
ylabel('Magnitude');
Page | 88
Lab Manual of Analog & Digital Communication
Fs = 40000; 2
dt = 1/Fs;
StopTime = 1; 1
Magnitude
t = (0:dt:StopTime-dt)';
N = size(t,1); 0
Fc1 = 1000;
x1 = cos(2*pi*Fc1*t); -1
Fc2 = 2000;
x2 = cos(2*pi*Fc2*t); -2
0 0.001 0.002 0.003 0.004 0.005 0.006 0.007 0.008 0.009 0.01
Fc3 = 10000;
Time
x3 = cos(2*pi*Fc3*t);
x=(1+(x1+x2)).*x3; 0.8
subplot(2,1,1)
plot(t,x); 0.6
xlabel('Time');
Magnitude
ylabel('Magnitude'); 0.4
axis([0 1/100 -2 2]);
X = fftshift(fft(x)); 0.2
dF = Fs/N;
f = -Fs/2:dF:Fs/2-dF; 0
subplot(2,1,2) -2 -1.5 -1 -0.5 0 0.5 1 1.5 2
plot(f,abs(X)/N); Figure 14.8 Spectrum of Two
Frequency Tune Modulation ( µ =1)
(in hertz) 4
x 10
xlabel('Frequency (in hertz)');
ylabel('Magnitude');
-2
0 0.001 0.002 0.003 0.004 0.005 0.006 0.007 0.008 0.009 0.01
-2
0 0.001 0.002 0.003 0.004 0.005 0.006 0.007 0.008 0.009 0.01
0.8
Amplitude
0.6
0.4
0.2
-1 -0.5 0 0.5 1
Frequency (in hertz) 4
x 10
Figure 14.9 Spectrum of Two Tune Modulation ( µ = 0.5)
Page | 89
Lab Manual of Analog & Digital Communication
-2
0 0.001 0.002 0.003 0.004 0.005 0.006 0.007 0.008 0.009 0.01
0.5
0
-2.5 -2 -1.5 -1 -0.5 0 0.5 1 1.5 2 2.5
4
x 10
Uper Side Band (USB)
1
0.5
0
-2.5 -2 -1.5 -1 -0.5 0 0.5 1 1.5 2 2.5
4
x 10
Figure 14.8 Spectrum of SSB
POST LAB
Page | 90
Lab Manual of Analog & Digital Communication
Notice:
Copying and plagiarism of lab reports is a serious academic misconduct. First instance of copying may
entail ZERO in that experiment. Second instance of copying may be reported to DC. This may result
in awarding FAIL in the lab course.
Page | 91
Lab Manual of Analog & Digital Communication
In all the Electrical Engineering (EE) labs, with an aim to prevent any unforeseen accidents during
conduct of lab experiments, following preventive measures and safe practices shall be adopted:
Remember that the voltage of the electricity and the available electrical current in EE labs has
enough power to cause death/injury by electrocution. It is around 50V/10 mA that the “cannot
let go” level is reached. “The key to survival is to decrease our exposure to energized circuits.”
If a person touches an energized bare wire or faulty equipment while grounded, electricity will
instantly pass through the body to the ground, causing a harmful, potentially fatal, shock.
Each circuit must be protected by a fuse or circuit breaker that will blow or “trip” when its safe
carrying capacity is surpassed. If a fuse blows or circuit breaker trips repeatedly while in
normal use (not overloaded), check for shorts and other faults in the line or devices. Do not
resume use until the trouble is fixed.
It is hazardous to overload electrical circuits by using extension cords and multi-plug outlets.
Use extension cords only when necessary and make sure they are heavy enough for the job.
Avoid creating an “octopus” by inserting several plugs into a multi-plug outlet connected to a
single wall outlet. Extension cords should ONLY be used on a temporary basis in situations
where fixed wiring is not feasible.
Dimmed lights, reduced output from heaters and poor monitor pictures are all symptoms of an
overloaded circuit. Keep the total load at any one time safely below maximum capacity.
If wires are exposed, they may cause a shock to a person who comes into contact with them.
Cords should not be hung on nails, run over or wrapped around objects, knotted or twisted.
This may break the wire or insulation. Short circuits are usually caused by bare wires touching
due to breakdown of insulation. Electrical tape or any other kind of tape is not adequate for
insulation!
Electrical cords should be examined visually before use for external defects such as: Fraying
(worn out) and exposed wiring, loose parts, deformed or missing parts, damage to outer jacket
or insulation, evidence of internal damage such as pinched or crushed outer jacket. If any
defects are found the electric cords should be removed from service immediately.
Pull the plug not the cord. Pulling the cord could break a wire, causing a short circuit.
Plug your heavy current consuming or any other large appliances into an outlet that is not
shared with other appliances. Do not tamper with fuses as this is a potential fire hazard. Do not
overload circuits as this may cause the wires to heat and ignite insulation or other combustibles.
Keep lab equipment properly cleaned and maintained.
Ensure lamps are free from contact with flammable material. Always use lights bulbs with the
recommended wattage for your lamp and equipment.
Be aware of the odor of burning plastic or wire.
ALWAYS follow the manufacturer recommendations when using or installing new lab
equipment. Wiring installations should always be made by a licensed electrician or other
qualified person. All electrical lab equipment should have the label of a testing laboratory.
Be aware of missing ground prong and outlet cover, pinched wires, damaged casings on
electrical outlets.
Inform Lab engineer / Lab assistant of any failure of safety preventive measures and safe
practices as soon you notice it. Be alert and proceed with caution at all times in the laboratory.
Conduct yourself in a responsible manner at all times in the EE Labs.
Page | 92
Lab Manual of Analog & Digital Communication
Follow all written and verbal instructions carefully. If you do not understand a direction or
part of a procedure, ASK YOUR LAB ENGINEER / LAB ASSISTANT BEFORE
PROCEEDING WITH THE ACTIVITY.
Never work alone in the laboratory. No student may work in EE Labs without the presence of
the Lab engineer / Lab assistant.
Perform only those experiments authorized by your teacher. Carefully follow all instructions,
both written and oral. Unauthorized experiments are not allowed.
Be prepared for your work in the EE Labs. Read all procedures thoroughly before entering the
laboratory. Never fool around in the laboratory. Horseplay, practical jokes, and pranks are
dangerous and prohibited.
Always work in a well-ventilated area.
Observe good housekeeping practices. Work areas should be kept clean and tidy at all times.
Experiments must be personally monitored at all times. Do not wander around the room,
distract other students, startle other students or interfere with the laboratory experiments of
others.
Dress properly during a laboratory activity. Long hair, dangling jewelry, and loose or baggy
clothing are a hazard in the laboratory. Long hair must be tied back, and dangling jewelry and
baggy clothing must be secured. Shoes must completely cover the foot.
Know the locations and operating procedures of all safety equipment including fire
extinguisher. Know what to do if there is a fire during a lab period; “Turn off equipment, if
possible and exit EE lab immediately.”
Page | 93
Lab Manual of Analog & Digital Communication
Each student will maintain a lab notebook for each lab course. He will write a report for each
experiment he performs in his notebook. A format has been developed for writing these lab reports.
Introduction
An RC circuit is a first order circuit that utilizes a capacitor as an energy storage element whereas a
resistor as an energy wastage element. RC circuits are building blocks of electronic devices and their
thorough understanding is important in comprehending advance engineering systems such as
transistors and transmission lines.
An RC circuit can be operated with both DC and AC sources. In this lab we study transient response
of RC circuits with a square wave as a DC source. During the DC operation of an RC circuit the
voltage across the capacitor or the resistor show energy storing (capacitor charging) and dissipating
(capacitor discharging via resistor) mechanisms of the circuit. The capacitor charging or discharging
curves then lead to determine time constant of the circuit where the time constant signifies time
required by the RC circuit to store or waste energy.
Objective:
To study transient response of a series RC circuit
Measurements:
The circuit used for the experiment is shown in Fig. 1.
Page | 94
Lab Manual of Analog & Digital Communication
Both input (a square wave) and output (voltage across capacitor) waveforms are monitored on an
oscilloscope. The capacitor charging is observed during "on" part of the square waveform whereas the
capacitor discharging is observed during "off" part of the square waveform (Fig. 2). We measure the
time constant from the capacitor charging or discharging curve. While keeping the capacitor value
constant, we also measure time constants with various resistor values (Table I).
Resistance
270 Ω 330 Ω 470 Ω 1 kΩ 2.2 kΩ 3.3 kΩ
(Nominal)
Time constant
(Calculated)
Time constant
(Measured)
Conclusions:
From the measurements following conclusions can be drawn:
Both of the above conclusions are also easily verifiable by solving differential equation for the RC
circuit.
Applications:
An RC circuit can be employed for a camera flash. The capacitor discharges through the flash light
during a picture taking event.
Page | 95