Sie sind auf Seite 1von 50

1/129

ANALOG SIGNAL SAMPLING AND RECONSTRUCTION


AIM:
1. To experimentally verify Nyquist criterian for Analog signal sampling and its
reconstruction.
2. To study the effect on the reconstructed signal by varying the duty cycle of
the sampling
signals.
3. To study the difference between the sampling amplifier and sample and hold
amplifier
output and its effects on reconstruction.
4. To compare the performance of Low pass filter by varying the order of the
filter.
APPARATUS REQUIRED:
1. Analog signal sampling and reconstruction kit.
2. CRO
3. Power supply
4. Patch cords & wires
THEORY:
Sampling: It is the process in which an analog signal is converted in to a
corresponding sequence
of samples that are uniformly spaced in time. To perform sampling, the signal
should be band
limited and it must obey the Nyquist criterian of sampling theorem.
Nyquist criterian: It states that, as long as the sampling rate is at least equal
to twice the maximum
signal frequency, the signal can be faithfully reconstructed from the samples
without aliasing.
Sampling is achieved by an electronic switch that switches ON & OFF at the various
sampling
rates. The samples of the analog signal is being transmitted during the sampling
times. This is
illustrated in the in the fig 1.
The analog switch switches at the rate of the sampling rate selected (2, 4, 8,
16&32 KHz).
These sampling clock acts as the control input to the analog switch. Whenever the
switch is “ON”
ie Ton of the sampling signal, the base band signal from the unity gain amplifier
is latched to the
output. At reconstruction side, a LPF gathers all the samples to reconstruct the
original source
signal.
2/129
SAMPLING SIGNAL (2,6,8,16,32 KHZ)
Signal I/P Sampled O/P
CD 4016
Analog Switch
SAMPLING LOGIC
+
- +
-
C
Input g(t) Out Put u(t)
Fig. a
Out Put u(t)
Input g(t)
Fig. b
SAMPLE AND HOLD AMPLIFIER
Amplifier
3/129
4 3 2 1
Switch Positions
Duty Cycle 4 3 2 1
10% ON ON ON ON
20% ON ON ON OFF
30% ON ON OFF ON
40% ON ON OFF OFF
50% ON OFF ON ON
60% ON OFF ON OFF
70% ON OFF OFF ON
80% ON OFF OFF OFF
90% OFF ON ON ON
Sample and Hold: The sample and hold circuit is used to improve the signal power
at the out put
of the low pass filter in the receiver. In its ideal form, the sample and hold
circuit produces an
output waveform that represents a staircase interpolation of the original signal.
In sampling the spectrum of the sampled signal is scaled by the ratio T/Ts, where
T is the sampling
pulse duration and Ts is the sampling period. Typically this ratio is very small,
with the result that
the signal power at the output of the LPF in the receiver is correspondingly
small. We may
obviously overcome this situation by use of
Amplification, which may be quite large. Using a Sample and hold circuit provides
better remedy
to overcome this situation.
Fig 2 shows the typical Sample and hold circuit. Here analog switch is timed to
close only for the
small duration of T of each sampling pulse, during which time the capacitor
rapidly charges up to a
voltage level equal to that of the input sample. When the switch is open, the
capacitor retains its
voltage level until next closer of the switch. Thus the sample and hold circuit
produces an output
wave form that represents a staircase interpolation of the original signal.
4/129
VERIFICATION OF NYQUIST RATE
The input analog Signal at 2 Khz 32 KHz Sampling and Sampled output
16 KHz Sampling and sampled output 8 KHz Sampling and Sampled output
4 KHz Sampling and sampled output 2 KHz Sampling and sampled output
5/129
Effects of Duty cycle: The sampling theorem does not take into account of duty
cycle as long as
enough number of samples of information (i.e. at least the Nyquist rate) are being
transmitted.
Since enough information at frequent regular intervals of time are being
transmitted, there are no
problems in recovering the information from the samples irrespective of the duty
ratio of the
sampling signal. However when the sampling frequency is set equal to base band
signal frequency
with the duty cycle of the sampling frequency set to nearly 90% , the signal can
be reconstructed
once again faithfully.
PROCEDURE
1. VERIFICATION OF NYQUIST RATE
• Connect 2 KHz, 5v Pk-Pk signal generated on board to the ANALOG INPUT by patch
cords
• Connect the sampling frequency signal in the INTERNAL mode by means of the
shorting
jumper setting provided in the kit itself.
• Observe the out put of the sampling amplifier at the SAMPLE OUTPUT
• Connect the SAMPLE OUTPUT to the input of the 2nd order, 4th order& 6th Order
LPF.
• Vary the sampling frequency from 2 KHz to 32 KHz by pressing FR SEL and observe
the
reconstructed signal each time. Particularly verify the Nyquist criterian at the
sampling
frequency of 2 KHz ie at the same frequency level of base band signal & 4 KHz.
2. STUDYING THE EFFECT OF DUTY CYCLE
• Connect 2 KHz, 5v Pk-Pk signal generated on board to the ANALOG INPUT by patch
cords
• Connect the sampling frequency signal in the INTERNAL mode by means of the
shorting
jumper pin provided in the kit itself.
• By means of the DIP switch setting, as indicated in the duty cycle table vary
the duty cycle
of the sampling frequency signal from 10% to 90% in the discrete step of 10% each.
• Observe the effect of duty cycle at INTERNAL SAMPLING FREQENCY.
• Observe the effect of duty cycle on sampling amplifier at SAMPLE OUTPUT.
6/129
EFFECT OF VARYING THE DUTY CYCLE
20% Duty Cycle Sampling frequency at 4 KHz 30% Duty Cycle Sampling frequency at 4
KHz
And reconstructed output at 4th order filter And reconstructed output at 4th order
filter
50% Duty Cycle Sampling frequency at 4 KHz 70% Duty Cycle Sampling frequency at 4
KHz
And reconstructed output at 4th order filter And reconstructed output at 4th order
filter
7/129
• Vary the sampling frequency from 2 KHz to 32 KHz by pressing FR SEL and observe
the
reconstructed signal output across 2nd, 4th & 6th order LPF. Particularly verify
the
reconstructed signal at the output of 2nd & 4th order filter for the sampling
frequency of 2
KHz with Duty cycle of 90%.
3. SAMPLING VS SAMPLE AND HOLD
• Connect 2 KHz, 5v Pk-Pk signal generated on board to the ANALOG INPUT by patch
cords
• Connect the sampling frequency signal in the INTERNAL mode by means of the
shorting
jumper pin provided in the kit itself.
• Vary the sampling frequency from 2 KHz to 32 KHz by pressing FR SEL and observe
the
sampling amplifier at SAMPLE OUTPUT and reconstructed signal at the output of 4th
order LPF.
• Vary the sampling frequency from 2 KHz to 32 KHz by pressing FR SEL and observe
the
sample and Hold amplifier at SAMPLE HOLD OUTPUT and reconstructed signal at the
output of 4th order LPF.
• Compare the signals of SAMPLE OUTPUT and SAMPLE AND HOLD OUTPUT & also
the reconstructed signal output observed for various sampling frequencies.
4. EFFECT OF VARYING THE ORDER OF THE FILTER
• Connect 2 KHz, 5v Pk-Pk signal generated on board to the ANALOG INPUT by patch
cords.
• Connect the sampling frequency signal in the INTERNAL mode by means of the
shorting
jumper pin provided in the kit itself.
• Connect SAMPLE &HOLD OUTPUT to the input of the 2nd order LPF &observe the
reconstructed signal at the output of the 2nd order LPF.
• Connect SAMPLE &HOLD OUTPUT to the input of the 4th order LPF &observe the
reconstructed signal at the output of the 4th order LPF.
• Connect SAMPLE &HOLD OUTPUT to the input of the 6th order LPF &observe the
reconstructed signal at the output of the 6th order LPF.
• Select the duty cycle of 10% & observe the reconstructed signal output for 2nd,
4th & 6th
order LPF.
8/129
SAMPLING Vs SAMPLE & HOLD
Sampling 32 Khz and output at 2nd order LPF Sampling 32 Khz and output at 4th
order LPF
Sampling 16 Khz and output at 2nd order LPF Sampling 16 Khz and output at 4th
order LPF
Sampling 8 Khz and output at 2nd order LPF Sampling 8 Khz and output at 4th order
LPF
Sampling 2 Khz and sampled only and Sampling 2 Khz and sample & Hold and
output at 4th order LPF output at 4th order LPF
9/129
INFERENCES:
1. VERIFICATION OF NYQUIST RATE : We observe that by sampling a 2 KHz base band
signal at Nyquist rate of 4 KHz and above , the signal is reconstructed. But by
sampling the
same 2 KHz Base band signal at 2 KHz (< Nyquist rate), we observe that there is a
distortion in the reconstructed signal. From the above we infer that, for signal
reconstruction with no distortion, Nyquist criterian has to be satisfied. If
Nyquist criteria is
not satisfied, or if the signal is not band limited, then the spectral overlapping
& aliasing
occurs, causing high frequency components show up at the low frequencies in the
recovered signal.
2. EFFECT OF DUTY CYCLE: We observed that varying the duty cycle has no effect as
long as the Nyquist criterian is satisfied. However when the sampling frequency is
set to 2
KHz which is same as that of the base band signal with the duty cycle of the
sampling
frequency set to 90%, the signal is reconstructed once again faithfully, even
though Nyquist
criterian is not satisfied. This is because, during this Ton period of 90%, most
of the
information being conveyed even in a single sample.
3. SAMPLING VS SAMPLE AND HOLD: From the observations, we conclude that the
signal is reconstructed more precisely in the case of Sample & Hold amplifier
rather in case
of sampling amplifier, where the reconstructed signal suffers an amplitude
distortion. This
is because the spectrum of the sampled signal is scaled by the smaller ratio of
T/Ts. Hence
we infer that use of Sample & Hold is an excellent logic which compensates for the
poor
amplitude at the input of the LPF resulting in faithful reconstruction of the
signal.
4. EFFECT OF VARYING THE ORDER OF THE FILTER: We observe that the signal is
reconstructed more faithfully in a 4th & 6th order LPF compared to the 2nd order
LPF.
Especially in the case when the duty cycle is kept at 10%, the signal suffers with
distortion
at the output of 2nd order LPF. This is because when the order of the filter is
low, the rolloff
rate decreases, resulting in unfaithful reproduction of original signal. Where as
in the
case of 4th & 6th order filter, the performance & efficiency is improved due to
increased
Roll-off rate.
10/129
11/129
RESULT
1. Nyquist criterion for an Analog signal sampling & its reconstruction is being
experimentally verified.
2. Experimentally studied the effect on the reconstructed signal by varying the
duty cycle of
the sampling signals. Found that, as long as Nyquist criterian is satisfied, the
duty cycle
has no importance. However the signal can still be reconstructed, even though the
Nyquist criterian does not holds good in the case of duty cycle being selected to
its
maximum level (say 90%)
3. Experimentally studied the difference between the sampling amplifier and sample
and
hold amplifier output and its effects on reconstruction. We found that use of
sample &
Hold is an excellent logic which compensates for the poor amplitude at the input
of the
LPF resulting in faithful reconstruction of the signal.
4. Experimentally compared the performance of Low pass filter by varying the order
of the
filter. We found that the signal is reconstructed more faithfully in the 4th & 6th
order LPF
compared to the 2nd order LPF.
5. All necessary waveforms gathered from CRO being attached.
12/129
13/129
Time Division Multiplexing
AIM:
To learn the concept of Time Division Multiplexing technique and transmit four
different
signals using the same channel.
To understand clock recovery techniques using three-wire, two-wire and single –
wire
methods.
APPARATUS REQUIED:
TDM KIT, Oscilloscope, Power supply, connecting wires.
THEORY:
Multiplexing is a kind of signal processing operation whereby, a number of
independent
signals can be combined into a composite signal suitable for transmission over a
common channel.
This is accomplished by separating the signals either in frequency or time.
� The technique of separating the signals in frequency is referred to as Frequency
Division Multiplexing.
� The technique of separating the signals in time is referred to as Time Division
Multiplexing.
CONCEPT OF TDM:
The sampling theorem provides the basis for transmitting the information contained
in a
band-limited message signal m(t) as a sequence of samples of m(t) taken uniformly
at a rate that is
usually slightly higher than the Nyquist rate. An important feature of sampling
process is
conservation of time. That is, the transmission of the message samples engages the
communication
channel only for a fraction of the sampling interval on a periodic basis, and in
this way some of the
time interval between adjacent samples is cleared for use by other independent
message sources on
a time shared basis.
14/129
TYPICAL TDM WAVEFORM
Multiplexed output at TxD
15/129
We thereby obtain a TDM system, which enables the joint utilization of a common
communication channel by a plurality of independent message sources without mutual
interference
among them.
For a given message signal, transmission of the association PAM wave engages the
communication channel only for a fraction of the sampling interval between
adjacent pulses pf the
PAM wave. The channel is cleared for use by other independent message signals on a
time shared
basis.
Each input message signal is first restricted in bandwidth by a low-pass pre-alias
filter to
remove frequencies that are non essential to an adequate signal representation.
The pre-alias filter
outputs are then applied to a commutator, which is usually, implemented using
electronic
switching circuitry.
The function of commutator is two fold:
� to take a narrow sample of each of the N input messages at a rate fs that is
slightly
higher than 2W, where W is cutoff frequency of the pre-alias filter,
� to sequentially interleave these N samples inside a sampling interval Ts = 1/fs.
Following the commutation process, the multiplexed signal is applied to a pulse –
amplitude modulator. This is done to transform the multiplexed signal into a form
suitable for
transmission over the communication channel.
At the receiving end, the received signal is applied to a pulse-amplitude
demodulator,
which performs the reverse operation of the pulse amplitude modulator. The short
pulses produced
at the pulse demodulator output are distributed to the appropriate low-pass
reconstruction filters by
means of a decommutator, which operates in synchronism with the commutator in the
transmitter.
This synchronization is essential for a satisfactory operation of the TDM system.
16/129
SINGLE-WIRE TRANSMISSION
17/129
SYNCHRONIZATION:
Synchronization is the most critical aspect of TDM. There are two levels of
synchronization in TDM viz.,
� Frame synchronization
� Sample synchronization
To maintain proper positions of sample pulses in the multiplexed it is necessary
to
synchronous the sampling process. Because the sampling operations are usually
electronic, there
is typically a clock pulse train that serves as a reference for all samples. At
the receiving station,
there is similar clock that must be synchronized with the transmitter. Clock
synchronization can be
derived from the received waveforms by observing the pulse sequence over many
pulsed and
averaging the pulses (in a closed loop with the clock derived on the VCO).
Clock synchronization does not guarantee the proper sequence of samples is
synchronized.
Proper alignment of time slot sequence requires frame synchronization. One or more
time slots per
frame may be used for sending frame synchronization information. For example,
placing a special
pulse that has a larger amplitude than the largest expected message amplitude, the
start of the
frame can be easily identified using a threshold circuit.
CIRCUIT DISCRIPTION:
The kit basically consists of the following sections:
a) ON-BOARD FUNCTION GENERATOR:
The unit provides four amplitude variable synchronized sine waves for four
channels
250Hz, 500Hz, 1 KHz, 2 kHz. The amplitude of each sine wave can be varied from 0
to 5Vpeakpeak.
An amplitude variable DC level (0-5V) is also provided for generation of
synchronization
pulses. The 32 KHz sampling clock and 8 KHz channel identification signal are also
generated by
the circuit. The sampling rate is 32 KHz.
18/129
OBSERVED TDM WAVEFORMS
At Input Channel 1: Input At Output Channel 1: Receiver
Frequency 250 Hz Output Frequency 250 Hz
At Input Channel 2: Input At Output Channel 2: Receiver
Frequency 500 Hz Output Frequency 500 Hz
At Input Channel 3: Input At Output Channel 3: Receiver
Frequency 1KHz Output Frequency 1KHz
19/129
b) TRANSMITTER:
The transmitter section consists of a four analog input with 4-pole integrated
circuit analog
switch that provides sampling and TDM of each channel, using PAM signals.
b) RECEIVER:
The receiver section consists of a 4-pole analog switch that demultiplexes the 4
channels. A
4Th order low pass filter is provided for each receiver channel, in order to
obtain the information
from the multiplexed and PAM demodulated signals. The cutoff frequency of the 4TH
order filter is
3.4 KHz.
A PLL circuitry is used to generate the clock and channel information at the
receiver. Here
the phase comparator used is an edge controlled Digital Memory network. This type
of phase
comparator acts only on positive edges of the signal and comparator inputs are not
important. The
comparator threshold level control is provided for synchronous pulse detection,
when
synchronization pulsed are transmitted on one of the channels.
OPERATION OF THE KIT:
LEVEL-1: THREE-WIRE TRANSMISSION:
The Transmitter, Clock and the Channel identification signals are directly linked
with the
receiver. Here, in this method three wires are used from Tx to Rx, one for data,
one for clock and
the other one for channel. Hence the name three wire transmission.
PROCEDURE:
� The four channels are connected to the multiplexer input channel.
� The Tx signals viz., TxD, TxCH0, TxCLOCK are directly connected to their
receiver counterparts viz., RxD, RxCH0, and RxCLOCK respectively.
� The sampled signals are observed at the transmitter end at the receiver end.
INFERENCE:
Since the clock is also transmitted to the receiver, reconstruction is easy.
Fourth order low
pass filters are used to obtain the output.
20/129
OBSERVED TDM WAVEFORMS
At
Input Channel 4: Input At Output Channel 4: Receiver
Frequency 2KHz Output Frequency 2 KHz
Multiplexed output at TxD
At
Input Channel 1: DC signal At Output Channel 1: DC signal
21/129
LEVEL-2: TWO-WIRE TRANSMISSION:
In two wire transmission, only the channel identification is linked directly to
the receiver,
while the RxCH0 and RxCLOCK are generated by the PLL circuitry.
PROCEDURE:
� The four channels are connected to the multiplexer input.
� TxD is connected to RxD, TxCH0 to the PLL circuitry’s input.
� (PLL output)- Sync and clock are connected to RxCH0 and RxCLOCK
respectively.
� The sampled signals are observed at the transmitter end and at the fourth order
filter output as reconstructed.
INFERENCE:
The PLL is used to generate the channel identification info and CLOCK. PLL locks
on to
the TxCH0 signal frequency and thereby provides synchronization.
LEVEL-3: SINGLE-WIRE TRANSMISSION:
In single wire transmission only the TXD data is connected to RXD. The receiver
derives
the clock and channel identification signals from the incoming stream of TDM
pulses. Channel 0
sends the sync pulse. RxCLOCK is obtained using the threshold level comparator and
PLL.
PROCEDURE:
� Set the sync level to the maximum amplitude and connect it to the channel 0.
� Three of the 4 inputs are given to the remaining channels. Their amplitudes are
less than the sync signals.
� TxD is connected to RxD.
� The PLL input switch is set.
� Vary the threshold level comparator so that DC level transmitted is recovered as
such in the first channel.
� The PLL circuit is used to generate RxCH0 and RxCLOCK signals.
22/129
23/129
INFERENCE:
In all three transmission methods, the receiver output is got to be the same. In
single wire
transmission, the number of transmission lines is reduced to one but the number of
inputs is also
reduced by one. The PLL locks on to the frequency of sync pulses thereby
synchronizing the
transmitter to the receiver.
RESULT:
From the above experiments, it is clear that, regardless of the type of
transmission used, the
receiver output is got to be the same. Since single wire transmission uses only
one wire to connect
from Tx to Rx, Single wire transmission proves to be more economical.
Thus in TDM, the different message sources are multiplexed in maintaining the
individuality of each message throughout. As the number of independent message
sources is
increased, the time interval allotted has to be reduced. If pulses become too
short, impairments in
the transmission medium begin to interfere with the operation of the system.
Accordingly, in
practice, it is necessary to restrict the number of independent message sources
that can be included
in a Time Division Group.
24/129
25/129
AMPLITUDE MODULATION AND DEMODULATION
AIM
To generate and observe Amplitude Modulated Signal
To vary and set the required Percentage of Modulation
To demodulate the AM signal using
i) Envelope detector
ii) Square Law detector
iii) Coherent Demodulation
APPARATUS REQUIRED
Experiment Kit, Cathode Ray oscilloscope, Power supplies, Connecting wires,
Probes.
THEORY
If Am cos (2πfmt) is the message signal (audio) and Ac cos (2πfct) is the carrier,
then
m, the percentage of modulation is,
Let the sinusoidal carrier wave be defined as
c (t) = Ac cos(2πfct)
Where Ac – Carrier Amplitude
fc – Carrier Frequency
If m(t) = Am cos(2πfmt) and m-percentage of modulation
The modulated wave is
S(t) = Ac[1 + m cos(2πfmt] cos(2πfct)
26/129
27/129
% of Modulation = Amax - Amin
Amax + Amin
Where Amax – maximum amplitude of s(t)
Amin – maximum amplitude of s(t)
Total power in the AM wave is Pt = (1 + m2 /2)Pc
Where Pc – Carrier Power
PROCEDURE
GENERATION OF AM
1) The Message signal is connected to the AM input stage.
2) The output of AM input is connected to the multiplier, which has carrier
wave as another input.
3) The output of the multiplier is the AM signal.
DEMODULATION OF AM
ENVELOPE DETECTOR
Envelope detector is a non-linear device which consists of a diode and
resistorcapacitor
filter. On a positive half-cycle of the input signal, the diode is forward biased
and the
capacitor charges up rapidly to the peak value of the input signal. When the input
falls below this
value, the diode becomes reverse-biased and the capacitor discharges slowly
through the load
resistor. The discharging process continues until the next positive half cycle.
Thereafter, the
charging-discharging routine is continued.
PROCEDURE:
Connect CH1 to AM input stage and CH2 to output of multiplier. Now both modulating
tone and AM signals are displayed on screen. Observing AM, slowly vary the
potentiometer
28/129
Analog signal and Carrier Carrier Frequency response (FFT)
Over Modulation Under Modulation
Critical Modulation Modulated signal Frequency Response (FFT)
29/129
connected to AM input stage such that modulation varies from zero to cent
percentage and
more. Set m=0.5 and put the oscilloscope in X-Y mode to get the trapezoidal figure
as
Now set m = 100% and obtain XY plot
Make sure noise generator is off. AM signal is connected to envelope detector via
noise
adder. Observe output of envelope detector in CH1. Now keeping m=1, switch ON
noise
generator, the noise output level is -40dB. Observe the LPF output on CRO. Reduce
the noise
level in steps of 1dB and find the threshold when waveform loses its shape. At
this threshold,
measure signal voltage and noise voltage by connecting true RMS voltmeter to the
signal and noise
inputs of noise adder.
SQUARE LAW DETECTOR
A square-law detector simply means that the DC component of diode output is
proportional
to the square of the AC input voltage. So if you reduce RF input voltage by half,
you'll get one
quarter as much DC output. Or if you apply ten times as much RF input, you get 100
times as
much DC output as you did before. An increase of 3dB results in twice as much
output voltage.
PROCEDURE
The incoming signal is fed to both the inputs of a multiplier. The output signal
is passed
through a low pass filter. The output is the message.
Mathematical Representations:
Incoming, x (t) = Ac [1 + m cos (2πfmt)] cos(2πfct)+ Noise
Output of multiplier = [ x(t) ]2
= [Ac [1 + m cos(2πfmt)] cos(2πfct) + Noise]2
= Ac
2
m cos(2πfmt) + Higher frequency terms
Output of low pass filter = Ac
2 m cos(2πfmt)
Thus, the message signal has been retrieved from the incoming modulated signal.
m = (A-B)/(A+B)
30/129
Percentage of Modulation
31/129
STUDY
EFFECT OF NOISE
Now keeping m = 1, Switch ON the Noise Generator; the noise output level is –40dB.
The
noise passes through a BPF so that it is band limited to that of signal bandwidth.
Noise Adder adds
this noise with the signal. Observe the LPF output on the CRO. You should now be
able to see
slight distortion in that received signal. Increase the Noise level in steps of
1dB (ie. -39dB, -
38dB…) by pressing UP button. You could see that the demodulated signal is getting
more
distorted as you increase the noise level. Also you could hear the 3 KHz tone is
distorted due to
noise. As the noise level crosses the threshold, the displayed waveform is
distorted beyond
recognition and the speaker output is unintelligible.
Reduce the noise level, by pressing DOWN button, so that the displayed waveform is
only
slightly distorted. Now adjust the noise level for threshold. That is, increase
the noise level by
visually observing the waveform and aurally listening to the tone. At some point
of time you could
see that the 3 KHz tone losses its wave shape and also you have difficulty in
listening to the tone
clearly. The loss of message in an envelope detector that operates at a low
signal-to-noise ratio is
referred as the threshold effect.
Threshold means a value of the signal-to-noise ratio below which the noise
performance of
a detector deteriorates much more rapidly than proportionately to the signal-to-
noise ratio.
SIGNAL TO NOISE RATIO (SNR)
It is defined as,
(SNR)o = Average power of message signal at the receiver output
Average power of noise at the receiver output
Output signal to noise ratio is used to measure fidelity of the received message.
As long as
the noise and demodulator output are additive, output signal to noise ratio is
good measure. Output
signal at noise ratio depends upon types of modulation and demodulation.
32/129
33/129
INFERENCE
Thus from the waveform we obtain that when m tends to a value grater than 1 (over
modulation) we get distortion at the output. The non-linearity present in diode
restricts envelope
detector being used for demodulation large amplitude signals.
Comparison of Envelope Detector and Square Law Detector
Envelope Detector Square Law Detector
1. Don’t Square the Signal 1. Square the Signal
2. High Dynamic Range 2. Less Dynamic Range
3. It works only when |Ka m(t)| < 1 3. It works for any Ka m(t)
4. Poor SNR 4. Good SNR
5. No Distortion 5. Less Distortion
SPECTRUM OF AM
Analysis shows fig.1 that the sidebands of the AM, when derived from a message of
frequency μ rad/s, are located either side of the carrier frequency, spaced from
it by μ rad/s. As the
analysis predicts, even when m>1, there is no widening of the spectrum. This
assumes linear
operation; that is, that there is no hardware overload. The above fig.2 shows the
FFT plot of
spectrum of any signal.
RESULT
Thus the AM signal has been generated with varying percentages of modulation. The
demodulation of the AM signal has been performed using an envelope detector and a
square law
detector.
34/129
Block diagram of a method for generating a Narrowband FM
Phasor Diagram of narrowband FM
Block diagram of the indirect method of generating a wideband FM signal
35/129
Frequency Modulation and demodulation
Objectives
To generate narrow band and wide band FM signal
To demodulate FM signal using Phase Locked Loop (PLL) technique
To Calculate Signal to Noise ratio
To analyze FM spectra using Bessel functions
Requisites
1. Aces experimenter kit for FM modulation and Demodulation.
2. CRO
3. Connection Wires and Jacks
1 Introduction
AM uses the amplitude of the carrier to transmit the information. Since the
amplitude of the AM
modulated waveform is directly proportional to the amplitude of the message, AM
modulation is a linear
operation. Another way to transmit the information is Frequency Modulation (FM).
In this case, it is no
longer the amplitude of the carrier, but its instantaneous frequency, that is
changed according to the
variations of the message signal's amplitude. FM belongs to the family of Angle
Modulation methods.
Phase Modulation is also an Angle Modulation method, but will not be studied in
this Lab. Angle
modulation methods are nonlinear operations. It turns out that an FM system uses
more bandwidth than an
AM system. As bandwidth is a very limited resource in communication systems, we
can therefore question
the use of FM. You will discover during this Lab that the reason why FM systems
are widely used is that
this excess of bandwidth allows them to have a much better immunity to noise than
AM systems.
2 Theories about FM
2.1 Definition of an FM signal
36/129
Plot of Bessel Functions of first kind for varying Order
Number of significant side band frequencies of wideband FM signal for varying
modulation index
37/129
2.2 The single tone message example
2.3 Narrow-Band and Wide-Band FM
2.3.1 Narrow-band FM
2.3.2 Wide-band FM
38/129
The above figure shows AM and FM signals produced by a single tone. a.)
Carrier wave. b.) Sinusoidal Modulating signal. c.) Amplitude modulated
signal. d.) Frequency modulated signal
39/129
40/129
Signal flow diagram for FM generation
VCO
Voltage Controlled Oscillator
3KZ
6KZ
120KZ
FM I/P STAGE
FM
41/129
42/129
Band Pass
Filter
Noise
Adder
Phase
Detector
Loop
Filter
Voltage
controlled
Oscillator
Power AMP
Low Pass
Filter
Signal Flow Diagram for FM Demodulator
Phase Lock Loop
Noise in FM receiver a.) Power spectral density of quadrature component nQ(t) of
narrowband noise n(t). b.)Power spectral density of noise nd(t) at the
discriminator output.
C.) power spectral density of noise no(t) at the receiver output
Divide by
N Counter
Noise
Output
FM
43/129
3 The Characteristics of the FM wave:
1. The Zero crossings of FM wave no longer have a perfect regularity in their
spacing; Zero crossing refer to instants of time at which a wave form changes from
a
negative to positive value or vice versa.
2. The envelope of FM wave is constant and equal to the carrier amplitude.
3. The average power of FM wave is constant and equal to ½ A2
c. Where Ac is the
amplitude of the carrier wave.
4. The Frequency deviation, representing the maximum departure of the
instantaneous
frequency of the FM wave from the carrier frequency fc is
Δf = Kf Am.
Am is the amplitude of the modulation base band signal m(t).
5. The modulation index of the FM wave, β is defined as the ratio of the frequency
deviation Δf to the modulation frequency fm and is written as
β = Δf /fm
6. The transmission bandwidth of FM wave by Carson’s rule is
BWT = 2( β+1)fm
7. β is small (usually 0.5) for narrow-band FM and is large for wide-band FM.
8. The transmission bandwidth of a narrow-band FM wave is closely equal to twice
the message bandwidth, whereas in the case of wide-band Fm wave it is well in
excess of
the value.
4 Practical
FM Modulation Procedure:
1. Connect CH1 of oscilloscope to the out put of VCO.
2. Disconnect the Input to the VCO and adjust potentiometers connected to it so
that
the VCO frequency displayed on the scope is 120 kHz.
3. Connect the CVO Input back. Don't disturb the VCO potentiometer.
4. Now the Input of the VCO frequency modulated signal the Frequency deviation Δf
is adjusted by the potentiometer connected to FM Input stage
44/129
Discrete amplitude spectra of an FM signal normalized with respect to the carrier
amplitude, for the case of sinusoidal modulation of varying frequency and fixed
amplitude. Only the spectra for positive frequencies are shown
45/129
Narrow – Band FM Generation:
1. Adjust the potentiometer connected to FM Input stage to minimum so that Δf = 0.
2. Only the carrier Frequency fc of 120khz is desplayed on the screen. Next
connect
CH1 to the output of FM Input stage.
3. Set the Volt/Div of scope to 10mv slowly vary the potentiometer connected to
the
FM Input stage such that the Out put is 20mv peak to peak.
4. Next connect CH1, to the Output of VCO. The displayed wave form is the narrow
Band FM. Now the β < = 0.5
Wide – Band Generation:
1. Switch off the Noise generator. Set the Volt/div of CH1 to 100mv
2. Connect CH1 to the Output of FM Input stage.
3. Slowly vary the potentiometer connected to the FM Input stage such that the
Output
of it is 250 mv peak to peak.
4. Next connect CH1 to the Output of VCO. The displayed waveform is wide- band
FM. Now the 2 < β < 3.
FM Demodulation Using PLL:
The FM wave is added with the band limited noise and feed to the Input of PLL. The
PLL
demodulates the FM.
The PLL demodulate Out put is given to a low pass filter to remove the high
frequency
carrier residues the noise.
EFFECT OF NOISE:
When increase the Input noise, the Signal – to – Noise Ratio (SNR) reduces. At low
SNR,
the FM receiver breaks. At first, individual clicks are heard in the receiver
output due to the
occurrences of spikes (Spike noise or Impulse noise ) in otherwise smooth white
noise. The
number of clicks heard in the speaker is proportional to the number of spikes
appearing in the
demodulated output As the SNR decreases further, the individual clicks rapidly
merge in to
46/129
Carrier with Frequency response (FFT) Carrier and modulating signal
Narrow Band Fm with Frequency response (FFT) Narrow band FM with Modulating signal
Wide Band Fm with Frequency response (FFT) Wide band FM with modulating signal
47/129
crackling or sputtering sound. This indicates the receiver breakdown. For all
practical purposes,
the occurrences of spikes in de-modulated signal indicate the threshold.
Threshold means a value of the signal-to-noise ratio below which the noise
performance of
a detector deteriorates much more rapidly than proportionately to the signal-to-
noise ratio.
BESSEL FUNCTION:
Noise Performance at J0 = 0
Switch On the Noise Generator. The default noise level is -40dB
Connect Ch1 to the Output of Low pass filter. Observing the demodulated output,
increase
the noise level slowly in steps to 1 dB. As the noise level increases, the
waveform shows distortion
due to noise and smooth noise along with the 3 KHz tone could be heard form the
speaker. If noise
level is further increased, spikes appear in the waveform. This is the point of
threshold. If the noise
level is further increase, the receiver breaks down and crackling or sputtering
sound is heard from
the speaker. Set the threshold at the occurrence of spikes. At this point measure
the true RMS
values of the signal and noise at the input of Noise Adder.
Noise performance at J1 = 0
Switch Off the Noise Generator. Set the Volt/div of the scope to 100mv. Slowly
vary the
potentiometer connected to the FM Input stage such that the Output of it is 400mv
Peak – to- Peak.
Next connect CH1 to the Output of VCO (Volt/div of the scope = 1v). The displayed
waveform is
the wide band FM. Now the β ≈ 4. The Carson's bandwidth is 30 khz.
Repeat the procedure given in J0 = 0. Find SNR. This SNR is higher than the one
calculated at J0 =
0.
This clearly brings out the fact that the higher the bandwidth higher the SNR. In
FM
scheme, one can trade-off between bandwidth and SNR.
INFERENCE:
The power of FM signal is constant and independent of modulating signal. As
modulation
index increases the number of significant side band and hence band width
increased.
RESULT
The Generation is Narrow band and Wide band. FM signal was carreid out and FM
signal
was demodulated.
48/129
49/129
LINE CODING & CARRIER MODULATION TECHNIQUES
Aim:
1. To conduct an experiment on Line Coding in DCL – 005 and to observe the various
codes
broadly as NRZ, Bi phase, URZ.
2. To have two short, comparative, case study on
(I) NRZ Vs AMI
(II) NRZ Vs Bi phase
on the implementation of the above line codes on T1 digital system and to analyses
the various
transmission related parameters and to suggest proved remedies for the hurdles
encountered with
supportive graphs.
Pre requisites:
1. DCL- 005 (Line coding Kit).
2. CRO.
3. Connecting wires.
Theory
Principle and purpose behind Line Codes:
The transmission of Serial data over any distance immeterial of transmission
medium
involved, the data has to be maintained since it passes through repeaters, echo
chancellors, etc.....
The required data integrity must be maintained through data reconstruction with
proper
timing and retransmission. Line codes were created to facilitate this maintenance.
The technique of representing the signal in its electrical form called digital
data formats /
digital PAM Signals / line codes is called “Line code Techniques”. These line
coding techniques
can be encoded in several formats. All these PCM Systems can be broadly classified
as,
50/129
Unipolar Return to zero format:
Non return to zero format:
NRZ – L
NRZ – M
NRZ – S
51/129
A. Return to Zero format ⇒ URZ
B. Non – return to Zero formats ⇒ NRZ – L, NRZ-M, NRZ-S
C. Phase – encoded format ⇒ Biphasic-L(Manchester),
Biphasic-M, Biphasic-S.
D. Multi level binary format ⇒ RZ – AMI
A. Unipolar Return to zero format:
URZ : In URZ One is represented by half – bit wide pulse and zero is
represented by absence of pulse.
x(t) = A for 0 < t < Tb/2 (half interval)
x(t) = 0 for Tb/2 < t < Tb (half interval)
B. Non return to zero format:
In all the following NRZ formats the transitions takes place at the rising
edge of clock pulse.
NRZ – L : In NRZ –L One is represented by highs and zeros by lows
x (t) = 1 for O < t < Tb (full interval)
x (t) = O for O < t < Tb (full interval)
NRZ – M : One is represented by change in levels and zeros by no transition.
NRZ – S : One is represented by no transitions and zero is represented by change
in levels.
C. Phase Encoded formats:
The phase Encoded signals are special in the sense that they are composed of both
in phase
and out of phase component of the clock. In all the formats transition occurs at
the beginning
of every bit interval.
If ‘1’ is transmitted
x (t) = A/2 for O < t < Tb/2
x(t) =-A/2 for Tb/2 < t < Tb
52/129
Phase Encoded formats:
Biphase - L:
Biphase – M:
Biphase – S:
Multilevel Signals:
RZ – Alternate mark inversion (RZ – AMI)
53/129
If ‘0’ is transmitted
x (t) = -A/2 for O < t < Tb/2
x(t) = A/2 for Tb/2 < t < Tb.
Biphase - L :
One is represented by half bit wide pulse positioned during first half of the bit
interval
and a zero represented by half bit wide pulse positioned during second half of the
bit
interval.
Biphase – M:
One is represented as Second transition at half bit later whereas zero has no
Second
transition.
Biphase – S:
One is represented by no second transition. Zero is represented by Second
transition a
half bit later.
D. Multilevel Signals :
Multi level signals use one or more levels of voltages to represent the binary
digits ones and
zeros. The commonly used multi – level signal is AMI.
RZ – Alternate mark inversion (RZ – AMI )
One is represented by equal amplitude of alternate pulses and zero by no pulses.
General Inference on various coding formats:
1. The advantage of RZ – AMI is that the ambiguities due to transmission sign
inversion are
eliminated.
2. In all bipolar cases it needs absolute sense of polarity at the receiver.
4. It is obvious from the waveforms observed that NRZ – L,M,S have the frequency
component equal to half the clock frequency.
5. Whereas Biphase – L,M,S, URZ and AMI have the frequency of equal to that of
clock .
1. URZ & AMI signals are composed of both in phase and out of phase
components of the clock.
54/129
55/129
THE ABOVE FORMATS COULD BE COMPARED AND ANALYSED BASED ON THE
VARIOUS TRANSMISSION PARAMETERS AS FOLLOWINGLY.
Parameters
Unipolar
RZ
Bipolar
NRZ (AMI)
Bi phase - L
(Manchester)
Polarity
0, +ve
two levels
0, +ve, -ve
three levels
+ve, -ve
two levels
Availability of D.C
component
present absent absent
Signal freg
Bandwidth
fb
(higher Bandwidth)
fb/2 fb
(higher
Bandwidth)
Peak power
requirement
high high low
Noise Immunity poor good good
Cross talk
high low low
Synchronization
Capability (effect
of string of 1’S /
0’S)
better good good
Timing
no timing
information
no timing
information
good clock
recovery
Experimental Procedure :
The DCL – 005 trainer initiates the various data conditioning techniques
normally adopted in practice. The system broadly illustrates the following blocks.
(i) Data Simulator Logic (ii) Coding logic
56/129
57/129
Data Simulator Logic :
The data simulator logic generates NRZ – L data a constant pattern and a reference
clock
(250 KHZ) Which is the origin for all the other data formats.
Coding Logic : The coding Logic converts NRZ – L data to NRZ – M,
NRZ – S, URZ, Biphase – L, Biphase – M, Biphase – S and RZ – AMI Signals.
Set DCL – 005 in stand alone mode power on the unit and connect the internally
generated
clock and data to the relevant sockets of the data coding modules.
Observation :
Observe the various waveforms anticipated at the various test points provided.
Observe the
NRZ-L data and the various NRZ-M, NRZ-S, URZ, Biphase – L, Biphase – M, Biphase –
S, AMI.
When a larger no of such PCM signals has to be transmitted over a common channel,
multiplexing
of PCM signals is required.Let us have a
case study of multiplexing PCM signals Bipolar NRZ & AMI over T1 Digital System.
STUDY NO:1
Case study of multiplexing PCM signals Bipolar NRZ & AMI over T1 Digital System.
Specifications of T1 digital system :
It is a Simple transmission over telephone line using wide band
Co-axial Cable.
� It accommodates 24 analog signals from S1 – S24.
� Each signal is band limited to approximately 3.3 KHZ and is sampled at the rate
of 8 KHZ,
the Nyquist rate of 2 x 3.3 = 6.6 KHZ.
� The digital signal generated during the course of one complete sweep is
therefore 24x8 =
192 bits.
58/129
Fig 1.8
59/129
� Synchronization is achieved by adding a single bit preceding the 192 bits. So
that to form a
frame of 193 bits.
� Bit rate : Tp = 1/8000 = 125 Micro secs.
Bit rate of T1 System : 193 M bits/s = 1.544 M bits/s
125
The Inferences of NRZ wave form over T1 Digital System
For the variety of practical reasons the low frequency response of T1 channel is
limited
hence we simulate a rudimentary low frequency RC network for the transformer,
series
capacitances etc., through which signal is supposed to pass.
The output response is as shown
� When the input is constant the output decays exponentially (because of RC time
constant) to
zero volts.
� When the input changes abruptly by a amount of 2v the output changes by an equal
amount
since instantaneous change in Capacitor is not possible.
At the receiver end :
The most effective way of distinguishing at the receiver, ‘1’ from ‘0’ is
measuring the area
under the waveform. A positive area indicates I and negative area as ‘0’
Long persistency of “1” causes Severe depression
When the sequences has a long 1’s the equivalent area available is severely
depressed. The
same complicacy occurs in case of long O`S also.If there is long stream of
ones/zeros.The receiver
could conceivably suffer so much compound jitter that is would either loss or gain
an entire bit
time, and then he out of sync with the Transmitter as shown in Fig:1.8
Result of the study:
Hence in a NRZ waveform the long persistence sequence of1’s / 0’s builds up a “D.C
component” which cannot be transmitted over a T1 channel.
60/129
Fig no 2.
61/129
The remedy is RZ-AMI of Multi level binary format where the 1’S will be
represented by
the bit of half pulse width with alternate polarity and 0’S by no transition hence
neither the
persistence sequence of 1`s nor 0`s will generate the accumulation of D.C
component” as shown in
Fig:2.If the receiver should encounter two successive pulses of same polarity then
it will be
considered as the violation of waveform standards.
The Inference of AMI in T1 Digital system :
In AMI to prevent the bit Synchronizing from drop out of synchronism and to
guarantee an
accurate operation it is necessary that there may not be extended periods of
waveforms w/o any
transition (in case of long string of O’S) which shall affect the precision of
synchronization the
following remedy could be implemented.
Remedy for the Synchronization problem in RZ-AMI :
A procedure which circumvents this difficulty involve delaying the AMI waveforms
briefly
before transmission. So that it can be monitored. Whenever a long string of zero’s
is encountered
the string of zeros
will be replaced by a coded waveform containing frequent 1’S.The 1’S are inserted
without any
alternates which shall enable us to distinguish from the original 1’s to keep the
Synchronize going.
STUDY NO:2
COMPARATIVE STUDY ON NRZ Vs BI - PHASE :
In NRZ as shown in the sequence the continues 1’S are represented by a sustained
fixed level of
+Vb or –Vb voltage never returns to zero.
62/129
Power Spectral densities of NRZ
Power Spectral density in case of Biphase
63/129
In case of Biphase the signal is identical to clock waveform or reversed from the
clock
depending on whether 1’S or 0’S.Hence the signal passes through zero at least once
per clock
cycle. Since the Biphase changes its level more frequently than NRZ the Biphase
spectrum
naturally have more high frequency component.
Let us compare the power Spectral densities of NRZ and Biphase
Power Spectral densities of NRZ G(f) = IP(f)I2
Ts
G (f) = X2b Tb
2
 

 

fTb
Sin fTb
π
π
1. It has a maximum at f = 0, and G (f) = 0 at all multiples of (fb = 1/Tb) The
pedk occurs
between fb and 2fb ~ 1.5 fb and 14 dB lower than the peak at f = 0 hence the total
power in
an MRZ signal is reduced only by 10% if passed through LPF with the cutoff
frequency f =
fb. Thus 90% of power is at main lobe centered at f = 0 is saved moreover it
doesn’t
contains any D.C. Component.
2. Power Spectral density in case of Biphase = G(f) = V2b Tb
2 2
/ 2
/ 2
 

 

fTb
Sin fTb
π
π
Inference :
The principal lobes extends from (f = 0, to f = 2fb) and has the peaks
approximately ~ 3fb/4 and at
f = 0, G(f) = 0
It can be verified that if Bi phase Signal is transmitted through a LPF with a cut
off
frequency at 2fb the more than 95% of power is passed and results in safe
transmission.
Again we have to compromise that the cost in case of Bi phase since the modulation
rate is
#twice that of NRZ. The possible solution could be Quaternary coding where two
successive
bits are coupled together to get represented by a single symbol / Voltage level.
The analysing and
pros & cons of the same is forced to get restricted because of scope of the
objective.
64/129
Clock with NRZ-L Wave Form
65/129
Conclusion for both the studies :
The line codes have various advantages like
1. Robustness to channel noise and interference
2. Efficient regeneration of coded signal along the transmission path.
3. Efficient exchange of increased channel bandwidth for input S/N ratio by
obeying
exponential law.
4 Secure communication through the use of encryption / decryption modulation
schemes.
5. Error detection capability and matched power spectrum.
5. Transparency of availability is & O’S over the channel probable drawbacks and
proved
remedies.
6.
All the above advantage are attained at the cost of increased system complicacy
and
Increased Channel Bandwidth.
(i) Though many complicacies are faced in the design, comerically available VLSI
chips
stands granted.
(ii) Turning to the issue of bandwidth we do recognize that the increased
bandwidth
requirement may be reason for justifiable concern in past. The increased
availability of
wide band communication channels means that bandwidth is no more a system
constraint
Thanks for the deployment of communication satellites for broad casting and fibre
optic
communications for liberating the bandwidth constraint.
(iii) Though with the Sophisticated data compression techniques it is indeed
possible to remove
the redundancy inherently present they reduce the bit rate of transmission without
serious
degradation in System performance.
66/129
NRZ-L and BIO-S WaveForm
67/129
Eventually to say on broader angle the action of recuperating the clock signal
from the received
signal is inevitably affected by some deterioration. The square wave extracted is
not exactly
synchronous with the transmitted clock. Timing information, that is essentially
carried by the level
transitions of the received signal has been affected by the noise and the ISI and
has acquired,
i) Some inevitable delay, due to physical transit time.
ii) Some inaccuracy = Phase moudulation, called jitters, which could be only
minimised but
not eliminated.
9. bit error rate of very low value < 10-19
Nevretheless, comparing to the complication involved in analog transmission and
up-dation in
the circuitaries, though we compromise in the originality of the signal in digital
as we know
that digital has its own advantages, flexibilities and the power of Digital signal
processing
etc.....
Result:
Thus the experiment and the relevant case studies has been completed successfully.
Carrier Generation Logic:
The carrier waves are generated in synchronization with the reference clock to
produce the
three carrier sine waves that are necessary for carrier modulation. A PLL is used
to synchronize the
carrier with the incoming clock.
The modulation logic modulates the carrier with the digital information signals.
The various blocks that can be identified in DCl-006 are:
Detection Logic
Data Decoding Logic
68/129
NRZ-L With ASK Modulation
69/129
1. Detection Logic
a). ASK Demodulator: This detector is built around a diode rectifier and a
threshold detector.
Whenever the sine wave is transmitted, the detector identifies one and whenever
the carrier is
rejected from transmission, the detector identifies it as a zero.
b). FSK Demodulator: The digital PLL forms the heart of this logic. The PLL center
frequency
and the lock range are fixed around 2 MHz. So whenever the 2 MHz signal is
transmitted, then the
phase detector output of the PLL remains low. Thus the phase detector output of
the PLL directly
gives the demodulated data.
c) PSK Demodulator: The first step in PSK demodulation is the sine to square wave
conversion
using a Schmitt trigger. The PSK demodulator works on the principle of square law.
The digital
PLL IC is used for doubling the frequency component of the data. A phase
comparator logic built
around flip flops demodulates the data modulated carrier.
EXPERIMENTAL PROCEDURE:
ASK Modulation:
Experimental Setup:
Setup DCL-005 in stand alone
Connect S-Clock to the Coding Clock
Connect S-Data to the Control Input of the Modulator
Connect one channel of the scope to the S-Data. If it is not matching with the S-
Data slightly
adjust the potentiometer P!
Connect Sin 1 to the Input 1 of the modulator. The amplitude of the sine wave can
be varied by
means of potentiometer P$.
Connect GND to Input 2 of the modulator
Connect the Scope to the Control Unit test point and observe the modulated output
with respect to
control input.
Inference:
We observe that the ASK output resembles the AM signals waveforms. Only NRZ-L is
used.
ASK Demodulation:
Experimental Setup:
Maintain the connections in the DCL-005 as in the previous experiment
Connect the ASK output to the ASK demodulator input in the DCL-006
70/129
NRZ-L With FSK Modulation
71/129
Connect the Scope to the Ask input and the other channel to the data output of the
ASK
demodulator
Observations:
Observe the ASK modulated output and the modulating data in the two channels of
the
oscilloscope. Also observe the modulated carrier at the input of DCL-006. Observe
the ASK
demodulated output at the Data Output of the ASK demodulator and compare the
demodulated
signal with respect to the control input.
Inference:
We observe that a very small time lag between the modulating data and the
recovered data which
is less than one half of the carrier time period.
FSK Modulation:
Experimental Setup:
Connect the Sin 1 to the Input 1 of the Modulator
Connect Sin 2 to the Input 2 of the Modulator
Connect data to the Control Input of the Modulator
Connect the scope to the Control Input and the other channel to the Modulated
output.
Observations:
Observe the FSK Modulated output and the modulating data in the two channels of
the
oscilloscope. Observe the incoming modulated carrier and the recovered data with
respect to the
modulating data.
Inference:
Since the tracking ability and the time response of the PLL is limited, a small
phase lag
exists between the recovered data and the modulating data.
FSK Demodulation:
Experimental Setup:
Establish the same connections for FSK modulation in DCL 005
Set DCL 005 in conjunction with DCL 006
Connect the FSK modulated output to the FSL input of the FSK demodulator (DCL 006)
Connect the scope to the control input and the data output
72/129
NRZ-L with PSK Modulation
73/129
Observations:
Observe the FSK modulated output and the modulating data in the two channels of
the
scope. Observe the incoming modulated carrier and the recovered data with respect
to the
modulating data.
Inference:
Since the tracking ability and the time response of the PLL is limited, a small
phase lag
exists between the recovered data and the modulating data.
PSK Modulation:
In the PSK modulation for all one to zero transitions of the modulating data, the
modulated
output switches between the in phase and out of phase components of the modulating
frequency.
The frequency and phase components chosen for BPSK modulation are as follows.
4. 0.5 MHz (0 degrees) sine wave carrier for representing 1
5. 1 MHz (180 degrees) sine wave carrier for representing 0
Experimental Setup:
Maintain the setup as for the other keying equipments
Connect the Sin2 to Input 1 of the modulator. The modulator of Sin 2 can be
adjusted by means of
the Pot P2
Connect the Sin2* to Input 2 of the modulator. The modulator of Sin 2 can be
adjusted by means
of the Pot P3
Connect the scope to the control input of the modulator and the modulated output
Observations:
Observe the PSK Modulated output with respect to the control input. Observe the
phase
shifts in the frequency during each transition in the data
PSK Demodulation:
Experimental Setup:
Establish the same connections for PSK modulation and connect the DCL 006 in
conjunction with
the DCL 005.
Feed the PSK modulated output to the PSK input of the PSK demodulator of the DCL
006
Connect the scope to the PSK input and the data output for PSK demodulated output
Observe the PSK demodulated output with respect to the control input of the
modulator
74/129
75/129
Observations:
Observe the PSK modulated output and the modulating data in the two channels of
the
scope. Observe the incoming modulated carrier. Observe the extracted reference
carrier with
reference to the in phase modulating carrier. Also observe the recovered data with
respect to
modulating data.
Inference:
It is observed that the successful operation of the PSK is fully dependent on the
phase
components of the transmitted modulated carrier. If the phase reversals of the
modulated carrier
along with the rising edges and falling edges of the data are not proper, then the
efficient detection
of data from PSK modulated carrier becomes impossible.
RESULT:
The different line coding techniques were studied and understood.
The various Carrier Modulation and Demodulation schemes involved in the digital
communication system was studied.
76/129
% Amplitude Modulation MATLAB Code %
clear all;close all;
Fs = 1/.0001; % Sampling rate
t=0.0001:0.0001:1;
Nt = length(t); % Number of sample points
Nf = 2^18; % Number of points in FFT, for faster computation
f = (0:Nf-1)'/Nf*Fs; % Frequencies in FFT
% Construct message signal
m=1*sin(2*pi*10*t);M = fft(m, Nf);
figure(1);subplot(211);plot(t,m)
title('Message signal m(t)');xlabel('Time (sec)')
subplot(212);plot(f, abs(M));
ax = axis;axis([0 Fs/400 ax(3) ax(4)]); % Plot up to one-half the sampling rate
title('Message spectrum M(f)');xlabel('Frequency (Hz)');
% Define carrier frequency and amplitude for modulation
fc = 1000;Ac = 1;c = Ac * cos(2*pi*fc*t); % Carrier wave, unmodulated
ka = 1.5; % modulation index
sAM = (1 + ka*m) .* c;SAM = fft(sAM, Nf);
figure(2);subplot(221);plot(t,sAM);
title('AM modulated signal');xlabel('Time (sec)')
subplot(223);plot(f, abs(SAM));
ax = axis;axis([0 Fs/5 ax(3) ax(4)]);
title('Spectrum of AM signal');xlabel('Frequency (Hz)')
% Envelope detector for AM
sAMplus = hilbert(sAM); % Pre-envelope = s(t) + j * \hat{s}(t)
mAMdemod = sAMplus .* exp(-j*2*pi*fc*t); % Complex envelope % Envelope detector
output
MAMdemod = fft(mAMdemod, Nf);
subplot(222);plot(t,abs(mAMdemod))
title('Envelope detector output');xlabel('Time (sec)')
subplot(224);plot(f, abs(MAMdemod))
ax = axis;axis([0 Fs/400 ax(3) ax(4)]);
title('Spectrum of envelope detector output');xlabel('Frequency (Hz)')
% DSB-SC modulation
sDSB = m .* c;
SDSB = fft(sDSB, Nf);
figure(3);subplot(221);plot(t,sDSB)
title('DSB-SC modulated signal');xlabel('Time (sec)')
subplot(223);plot(f, abs(SDSB));
ax = axis;axis([0 Fs/5 ax(3) ax(4)]);
title('Spectrum of DSB-SC signal');xlabel('Frequency (Hz)')
% Coherent demodulator
phi = pi/6; % Phase of local oscillator
local = cos(2*pi*fc*t + phi);
vDSB = sDSB .* local;
Fcut = 1000;order = 5;
Fdig = Fcut / (Fs/2); % "Digital frequency" normalized by sampling rate
[b,a] = butter(order, Fdig);
mDSBdemod = filter(b, a, vDSB); % Apply the filter to the vDSB signal
mDSBdemod = mDSBdemod - mean(mDSBdemod);
MDSBdemod = fft(mDSBdemod, Nf);
subplot(222);plot(t,mDSBdemod);
title('Coherent detector output');xlabel('Time (sec)')
subplot(224);plot(f, abs(MDSBdemod));
ax = axis;axis([0 Fs/400 ax(3) ax(4)]);
title('Spectrum of coherent detector output');xlabel('Frequency (Hz)')
77/129
Generate AM and FM modulated waveform using MATLAB
Aim:
To Generate the AM and FM modulated waveforms and analyzing those modulation
performance using the MATLAB 7.0 software utility.
Apparatus Required:
1. PC with MATLAB SOFTWARE.
Theory:
Amplitude Modulation
In amplitude Modulation amplitude of the sinusoidal carrier wave is varied in
accordance with the base band signal. The following figure shows the sinusoidal
amplitude
modulated waveforms.
Figure(a) shows the carrier waveform, figure(b) shows the modulating waveform and
c shows the
modulated waveform. Consider a sinusoidal carrier wave c(t) is defined by
c(t) = Ac.Cos(2πfct)
78/129
Message Signal with Frequency Spectrum
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
-1
-0.5
0
0.5
1
Message signal m(t)
Time (sec)
0 5 10 15 20 25
0
1000
2000
3000
4000
5000
6000
Message spectrum M(f)
Frequency (Hz)
AM Under Modulation Ka=0.5
0 0.2 0.4 0.6 0.8 1
-1.5
-1
-0.5
0
0.5
1
1.5
AM modulated signal
Time (sec)
980 990 1000 1010 1020
0
1000
2000
3000
4000
5000
Spectrum of AM signal
Frequency (Hz)
0 0.2 0.4 0.6 0.8 1
0.5
1
1.5
Envelope detector output
Time (sec)
0 5 10 15 20 25
0
2000
4000
6000
8000
10000
Spectrum of envelope detector output
Frequency (Hz)
79/129
where Ac is the carrier amplitude and fc is the carrier frequency. In that the
above equation
phase of the carrier wave is zero. Let m(t) denotes the base band signal that
carries the
specification of the message. An amplitude modulation (AM) is defined as a process
in which the
amplitude of the carrier wave c(t) is varied about a mean value, linearly with the
base band signal
m(t). an amplitude modulated (AM) wave may thus be described in its most general
form as a
function of time as follows:
s(t) = Ac* [ (1+ka*M(t) * cos(2πfct) ]
where ka is the constant called the amplitude sensitivity of the modulator
responsible for
the generation of the modulated signal s(t). The following figure shows a base
band signal m(t),
and corresponding AM wave s(t) for two values of amplitude sensitivity
ka(modulation index) and
a carrier amplitude Ac=1 volt. We observe that the envelope of s(t) has
essentially the same shape
as the base band signal m(t) provided that two requirements are satisfied:
� The amplitude of kam(t) is always less than unity, that is, kam(t) < 1 for all
t. This condition is illustrated in figure. It ensures that the function 1+kam(t)
is always positive, and since an envelope is a positive function. We may
express the envelope of the AM wave s(t) as Ac(1+kam(t)).This is called
under modulation of the AM.
� When the amplitude sensitivity of the ka of the modulator is large enough to
make
� kam(t) >1 for any t is called as over modulated, resulting the carrier phase
reversal occurs wherever the m(t) crosses the zero.
� The carrier frequency fc is very larger than the maximum frequency
component in the message signal.
fc>>W
if the condition is not satisfied an envelope cannot be visualized satisfactorily.
80/129
0 0.2 0.4 0.6 0.8 1
-2
-1
0
1
2
AM modulated signal
Time (sec)
980 990 1000 1010 1020
0
1000
2000
3000
4000
5000
Spectrum of AM signal
Frequency (Hz)
0 0.2 0.4 0.6 0.8 1
0
0.5
1
1.5
2
Envelope detector output
Time (sec)
0 5 10 15 20 25
0
2000
4000
6000
8000
10000
Spectrum of envelope detector output
Frequency (Hz)
AM Perfect Modulation Ka=1.0
AM Over Modulation Ka=1.5
0 0.2 0.4 0.6 0.8 1
-3
-2
-1
0
1
2
3
AM modulated signal
Time (sec)
980 990 1000 1010 1020
0
1000
2000
3000
4000
5000
Spectrum of AM signal
Frequency (Hz)
0 0.2 0.4 0.6 0.8 1
0
0.5
1
1.5
2
2.5
3
Envelope detector output
Time (sec)
0 5 10 15 20 25
0
2000
4000
6000
8000
10000
Spectrum of envelope detector output
Frequency (Hz)
81/129
The Fourier transform of AM wave s(t) is given by
S(f) = Ac/2 [d(f-fc) + d(f-fc)] + kaAc/2 [M(f-fc) + M(f +fc)]
This spectrum consists of two delta functions weighted by the factor Ac/2 and
occurring at
± fc ; and two versions of the baseband spectrum translated in frequency by ± fc
and scaled in
amplitude by kaAc/2 .
82/129
AM- DSB –SC Signal and Coherent Detector output With Frequency spectrum
0 0.2 0.4 0.6 0.8 1
-1
-0.5
0
0.5
1
DSB-SC modulated signal
Time (sec)
980 990 1000 1010 1020
0
500
1000
1500
2000
2500
3000
Spectrum of DSB-SC signal
Frequency (Hz)
0 0.2 0.4 0.6 0.8 1
-0.5
0
0.5
Coherent detector output
Time (sec)
0 5 10 15 20 25
0
500
1000
1500
2000
2500
Spectrum of coherent detector output
Frequency (Hz)
83/129
From the spectrum of figure we note the following points:
� As a result of modulation process , the spectrum of the message signal m(t) for
completely
including negative sides in message signal also becomes visible for positive
frequencies,
provided the condition fc>>W.
� In the positive frequencies of the spectrum having the two side bands called
upper side
band and lower side band.
� The band width of the AM wave which exactly twice the message band width W, that
is
Bt = 2W.
Demodulations:
The demodulation is the process of detecting the original signal from the received
signal. This
received signal consists of noise & original signal. There are three types of
received format
1.Envelope Detector.
2.Squarelaw Detector.
Limitations:
� Amplitude modulation is wasteful of power.
� This is modulation occupies the more bandwidth. Twice the message bandwidth.
Frequency Modulation
The frequency modulation is that form of angle modulation in which the
instantaneous frequency fi(t) is varied linearly with the message signal m(t) , as
shown by
fi(t) = fc + kf*m(t).
The term fc represents the frequency of the unmodulated carrier, and the constant
kf represents the
frequency sensitivity of the modulator expressed in Hertz per volt. The FM
modulation is the
nonlinear modulation process so that the spectrum of the FM modulation is not
simple manner so
that analysis of FM is difficult process comparative AM modulation.
Here we consider two types of FM called namely
2. Narrow band FM.
3. Wide band FM.
84/129
% Frequency Modulation MATLAB Code %
close all;clear all;clc
dt = 1e-4; % Sample spacing (seconds)
Fs = 1/dt; % Sampling rate
t = (dt:dt:2)'; % Sample times: total of 2 seconds of data
Nt = length(t); % Number of sample points
Nf = 2^18; % Number of points in FFT, for faster computation
f = (0:Nf-1)'/Nf*Fs; % Frequencies in FFT
% Construct message signal
Am=1;mf=10;m=Am*cos(2*pi*mf*t);M = fft(m, Nf);
figure(1);subplot(211);plot(t,m);
title('Message signal m(t)');xlabel('Time (sec)');
subplot(212);plot(f, abs(M)); ax = axis;
axis([0 Fs/400 ax(3) ax(4)]);% Plot up to one-half the sampling rate
title('Message spectrum M(f)');xlabel('Frequency (Hz)')
% Define carrier frequency and amplitude for modulation
fc = 1000;Ac = 1;c = Ac * cos(2*pi*fc*t); %
kf = 1.5; % Frequency sensitivity
int_m(1) = 0; % Integrate the signal to produce FM signal
for k=1:Nt-1
int_m(k+1) = int_m(k) + m(k)*dt;
end
sFM = Ac * cos(2*pi*fc*t + 2*pi*kf*100*int_m');
SFM = fft(sFM, Nf);
figure(2);subplot(221);plot(t,sFM);
title('FM modulated signal');xlabel('Time (sec)');
subplot(223);plot(f, abs(SFM));
ax = axis;axis([0 Fs/5 ax(3) ax(4)]);
title('Spectrum of FM signal');xlabel('Frequency (Hz)')
% FM demodulator: Derivative followed by envelope detector
dsFM = sFM(1); % Compute derivative
for k=2:Nt
dsFM(k) = (sFM(k)-sFM(k-1))/dt;
end
% Envelope detector
dsFMplus = hilbert(dsFM); % Pre-envelope
dsFMtilde = dsFMplus .* exp(-j*2*pi*fc*(t')); % Complex envelope
mFMdemod = abs(dsFMtilde); % Envelope detector output
mFMdemod = mFMdemod - mean(mFMdemod); % Remove DC from output
MFMdemod = fft(mFMdemod, Nf);
subplot(222);plot(t,mFMdemod);
axis([0 2 kf*-600 kf*600]);
title('FM detector output');xlabel('Time (sec)');
subplot(224);plot(f, abs(MFMdemod));
ax = axis;axis([0 Fs/400 ax(3) ax(4)]);
title('Spectrum of FM detector output');xlabel('Frequency (Hz)');
85/129
Consider then a sinusoidal modulating signal defined by
m(t) = Am cos(2*pi*fm*t)
The instantaneous frequency of the resulting FM signal equals
fi(t) = fc + kf*Am*cos(2*pi*fm*t)
fi(t) = fc + Δf cos(2π*fm*t)
where
Δf = kf*Am
The quantity Δf is called the frequency deviation , representing the maximum
departure of
the instantaneous frequency of the FM signal from the carrier frequency fc. A
fundamental
characteristic of an FM signal is that the frequency deviation Δf is proportional
to the amplitude of
the modulating frequency. The fm signal is obtained as
θi(t) = 2πfct + Δf/fm sin(2πfmt).
The ratio of the frequency deviation Δf to the modulation frequency fm is commonly
called the modulation index of the FM signal. We denote it by the letter β and so
write
β = Δf/fm
The parameter β represents the phase deviation of the FM signal, that is the
maximum
departure of the angle θi(t) from the angle 2πfct of the unmodulated carrier,
hence β is measured
in radians
The FM signal itself is given by
s(t) = Ac cos[2πfct + βsin(2πfmt)]
Depending upon the value of β we differentiate the Narrow band and Wide band FM.
� If β is small compared to one radian for Narrow band FM
� If β is large compared to one radian for wide band FM
86/129
Message Signal with Frequency Spectrum
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2
-1
-0.5
0
0.5
1
Message signal m(t)
Time (sec)
0 5 10 15 20 25
0
2000
4000
6000
8000
10000
Message spectrum M(f)
Frequency (Hz)
Narrow band FM Kf=0.1
0 0.5 1 1.5 2
-1
-0.5
0
0.5
1
FM modulated signal
Time (sec)
980 990 1000 1010 1020
0
2000
4000
6000
8000
Spectrum of FM signal
Frequency (Hz)
0 0.5 1 1.5 2
-60
-40
-20
0
20
40
60
FM detector output
Time (sec)
0 5 10 15 20 25
0
1
2
3
4
5
6
x 105 Spectrum of FM detector output
Frequency (Hz)
87/129
Spectrum of wide band FM:
The Fourier transform of the both FM is
S(f) = Ac/2 Σ Jn(β)[d(f-fc-nfm) + d(f+fc+nfm)]
in that equation Jn(β) is the Bessel function. This Bessel function gives the
characteristics of the
FM modulated waveform properties.
The bandwidth of the FM modulation is decided by carsons rule equation (or)
universal graph.
If modulation index increase the side bandwidth of the FM bandwidth also
increased.
B = 2 Δf +2fm = 2 Δf(1+1/ β).
88/129
Wide Band FM Kf=1.5
0 0.5 1 1.5 2
-1
-0.5
0
0.5
1
FM modulated signal
Time (sec)
600 700 800 900 1000 1100 1200 1300
0
500
1000
1500
2000
2500
3000
Spectrum of FM signal
Frequency (Hz)
0 0.5 1 1.5 2
-500
0
500
FM detector output
Time (sec)
0 5 10 15 20 25
0
2
4
6
8
10
x 106 Spectrum of FM detector output
Frequency (Hz)
89/129
Generation of wideband FM:
A simplified block diagram of an indirect FM system is shown in the figure. The
message
signal m(t) is first integrated and then used to phase modulation a crystal
controlled oscillator ; the
use of crystal oscillator provides the frequency stability. To minimize the
distortion inherent in th
phase modulator, a maximum phase deviation or modulation index B is kept small.
From this we
will generate the wide band FM by means of a frequency multiplier so as to produce
the desired
wide band FM signal.
The modulated wave form S(t) = Ac cos[2πfct + 2πkf (integration(m(t)dt)].
FM demodulation:
Frequency demodulation is the process that enables us to recover the original
modulating
signal from a frequency-modulated signal. The objective is to produce a transfer
characteristic that
is the inverse of that of the frequency modulator, which can be realized directly
or indirectly. The
above diagram shows the direct method of frequency demodulation involving the
popular device
known as frequency discriminator, whose instantaneous output amplitude is directly
proportional
to the instantaneous frequency of the input FM signal.
The above figure shows the ideal frequency discriminator as a pair of slope
circuits with
their complex transfer functions related by the equation
H2 (f) = H1 (-f)
Followed by envelope detectors and finally a summer,. This scheme is called a
balance frequency
discriminator.
Algorithm for Generating AM modulated Wave:
1. Getting the inputs like Modulation index, Modulating frequency, Carrier
frequency, &
amplitude of the carrier and modulating signal.
2. Generate the modulating waveform as per input specifications.
3. Generate the carrier waveform as per input specifications.
4. Plot the both Modulating and carrier wave form in the same figure using the
subplot
command.
5. Generate the modulated waveform by using the following equation
S(t) = Ac * (1+ MI*m(t)) * cos (2 *pi*fc*t).
6. Plot the modulated waveform.
90/129
Generation of wideband FM:
FM demodulation:
91/129
Algorithm for Generating AM Demodulated Wave:
7. Taking the Hilbert transform for the modulated waveform.
8. The demodulated output was taken by using the following equation.
Demod = (HilberTransform(s(t))) * (exp(-j*2*pi*CF*t)).
9. Plot the demodulated output in separate figure.
Algorithm for Generating FM modulated Wave:
1. Getting the inputs like frequency sensitivity, Modulating frequency, Carrier
frequency, &
amplitude of the carrier and modulating signal.
2. Generate the modulating waveform as per input specifications.
3. Generate the carrier waveform as per input specifications.
4. Plot the both Modulating and carrier wave form in the same figure using the
subplot
command.
5. Generate the modulated waveform after integrating the modulating signal and
then
multiplying with the carrier.
6. Plot the modulated waveform in the figure.
Algorithm for Generating FM Demodulated Wave:
7. Taking the Hilbert transform for the modulated waveform the demodulation is
started.
8. The demodulated output is taken by using an envelope detector.
9. The demodulated output is plotted in a separate figure.
10. The Spectral content of the modulated waveform is also plotted.
Result:
Thus the modulation and demodulation of amplitude modulation, frequency modulation
using MATLAB was performed. The spectral content of the modulated waveform is also
studied
92/129
Generation of Coherent Binary FSK Signals:
Detection of Coherent Binary FSK Signals:
93/129
Frequency Shift Keying (FSK)
Using Mat Lab Software Simulation
Aim:
The Frequency shift keying studying and stimulation using Mat Lab Software and
plot the
Modulated, demodulated outputs and performance.
Requisites:
The Mat Lab Software installed Computer
Theory:
In a coherent binary FSK system, the pair of signals S1(t) and S2(t) used to
represent binary
symbols 1 and 0, respectively, is defined by
S1(t) = √2 Eb / Tb cos(2πf1t) (1)
S2(t) = √2 Eb / Tb cos(2π(f1+f)t = √2 Eb / Tb cos(2π(f2)t (2)
where 0 ≤ t < Tb, and Eb is the transmitted signal energy per bit.
The typical pair of sinusoidal waves are described by
..(3)
Where i=1,2 and transmitted frequency fi is
From the equation (1) and (2) ,it is clear that S1(t) and S2(t) is orthogonal, but
not normalized to have
unit energy.
..(4)
Where i=1,2
94/129
Frequency Shift Keying Code for Modulation and Demodulation
%Initilization:
numbits=input('Enter the number of data samples:');
f1=200; % in hz
f=1000; % in hz
stime = 0.005;
mid= 0.0001;
t=0:mid:stime-mid;
ipseq=randint(1,numbits);
out=[];
%Modulation:
for i = 1 : length(ipseq)
out=[out sin(2*pi*(f1+ipseq(i)*f)*t)];
end
subplot(3,1,1);
stem(ipseq);
title('input sequence');
subplot(3,1,2);
plot(out);
title('output fsk');
%Demodulation:
demod=[];
a=sin(2*pi*rootf*t);
for i = 1:length(ipseq)
y=(i-1)*50;
d=asin(out(y+1:y+50));
95/129
Correspondingly, the co-efficient Sij for i=1,2 and j=1,2 is defined by
..(5)
Two message points is defined as
And
..(6)
With the Euclidean distance between them equal to √2Eb .
Signal space diagram for FSK:
Generation of Coherent Binary FSK Signals:
To generate the binary FSK input binary data sequence is first applied to ON/OFF
level encoder, the
output of the symbol 1 is √E b , and output of symbol 0 is 0. This signal is
forwarded to both upper channel
and lower channel. By using inverter in lower channel, any one channel will switch
closed other will open
96/129
d1=d(2)/a(2);
if d1 < 2
demod = [demod 0];
else
demod=[demod 1];
end
end
subplot(3,1,3);
stem(demod);
title('demodulated output');
%FFT:
%It is difficult to identify the frequency components by looking at the original
signal.
%Converting to the frequency domain, the discrete Fourier transform of the noisy
signal
%found by taking the 1024-point fast Fourier transform (FFT):
Y = fft(out,1024);
%The power spectrum, a measurement of the power at various frequencies, is
Pyy = Y.* conj(Y) / 1024;
%Graph the first 257 points (the other 255 points are redundant) on a meaningful
frequency axis:
f = 8400*(0:512)/1024;
figure(2);%subplot(4,1,3);
plot(f,Pyy(1:513));
title('Frequency content of modulated signal');
xlabel('frequency (Hz)');
97/129
ie. For symbol 1:
Upper channel closed, √E b multiplied with Φ1(t) ,whereas lower channel is open.
Result is √2 Eb / Tb cos(2πf1t) is transmitted.
ie. For symbol 0:
Lower channel closed, √E b multiplied with Φ2(t) ,whereas upper channel is open.
result is √2 Eb / Tb cos(2πf2t) is transmitted.
Detection of Coherent Binary FSK Signals:
To detect the transmitted binary sequence ,input signal x(t) is product with Φ1(t)
in
upper channel and integrated and x(t) is product with Φ2(t) in lower channel and
integrated
.Resultant of both channel is forwarded to decision making device.
Where y > 0= Symbol 1
y < 0 = Symbol 0
Algorithm
Transmitter or Modulation
1. Generate the no of Random sequence bits as input given
2. Initialize frequency f1 and f
3. Initialize time limit for integration and other parameters
4. To generate the modulated output f1 or f2 multiply input bit sequence with f.
5. If input sequence is Eb, f will present ,otherwise it will be zero.
6. Add f1 and f to generate transmitted signal
i.e f1= f1+0 (where f = 0)
f2 = f1+f
7. Plot the input data and modulated carrier
Receiver or Demodulation
1. The Received signal is multiply with the same basis function.
2. sum the multiplied signal at the Tb interval (i.e. integration )
3. Compare the summation data for > 2 or < 2. If >2 make Symbol 1 and < 2 Make
Symbol 0.
98/129
0 500 1000 1500 2000 2500 3000 3500 4000 4500
0
5
10
15
20
25
30
35
40
45
50
Frequency content of modulated signal
frequency (Hz)
Plot for input sequence, Modulated and Demodulated
0 2 4 6 8 10 12 14 16
0
0.2
0.4
0.6
0.8
1
input sequence
0 100 200 300 400 500 600 700 800
-1
-0.5
0
0.5
1
output fsk
0 2 4 6 8 10 12 14 16
0
0.5
1
demodulated output
Plot for FFT:
99/129
4. Calculate FFT for signal
5. Plot the received bit and FFT.
Inference
• It has two basis function Φ1(t) and Φ2(t) .
• S1(t) and S2(t) is orthogonal, but not normalized to have unit energy.
• Transmitted signal frequency contain only f1 (f1=f1+0) or f2 (f2= f1+f)
• In demodulation, Input signal is product with two basis function and integrated
to
Detect symbol 1or 0.
Result
The Frequency shift keying Transmitter and Receiver understood and analyzed and
plotted
the FFT performance.
100/129
Block diagrams for (a) binary PSK transmitter and (b) coherent binary PSK receiver
101/129
Binary Phase Shift Keying (BPSK)
Using Mat Lab Software Simulation
Aim:
The Binary Phase shift keying studying and stimulation using Mat Lab Software and
plot
the Modulated, demodulated outputs and performance.
Requisites:
The Mat Lab Software installed Computer
Theory:
In a coherent binary PSK system, the pair of signals S1(t) and S2(t) used to
represent binary
symbols 1 and 0, respectively, is defined by
S1(t) = √2 Eb / Tb cos(2πfct) (1)
S2(t) = √2 Eb / Tb cos(2πfct + π) = - √2 Eb / Tb cos(2πfct) (2)
where 0 ≤ t < Tb, and Eb is the transmitted signal energy per bit. To ensure that
each transmitted bit
contains an integral number of cycles of the carrier wave, the carrier frequency
fc is chosen equal to
nc / Tb for some fixed integer nc. A pair of sinusoidal waves that differ only in
a relative phase-shift
of 180 degrees, as defined in Equations (1) and (2), are referred to as antipodal
signals.
From this pair of equations it is clear that, in the case of binary PSK, there is
only one basis function
of unit energy, namely,
Φ1(t) = √2 / Tb cos(2πfct) 0 ≤ t < Tb (3)
Then we may express the transmitted signals S1(t) and S2(t) in terms of Φ1(t) as
follows:
S1(t) = √ Eb Φ1(t) 0 ≤ t < Tb (4)
S2(t) = -√ Eb Φ1(t) 0 ≤ t < Tb (5)
102/129
Matlab Source code for Binary Phase shift Keying
clear ;close all;pack;
t=[0:1/1000:1]; no=10000;
numbits=input('Enter the number of data samples:');
%numbits=5;
fc=1;tb=1;
snr=[];ber=[];
carrier=cos(2*pi*fc*t);basis=sqrt(2/tb)*carrier;
for eb=1:numbits
mod=[];rxcode=[];demod=[];
data=randint(1,numbits);% Generating the bits of input sequence
data(find(data==0))=-1; % converting polar form
for j=1:numbits
mod=[mod sqrt(eb)*data(j)*basis];
end
Noise= sqrt(no)*randn(1,length(mod));% creating Noise
recdcode=mod+Noise;% adding Noise
for i=1:numbits
% Product modultion with basis function
demod=[demod sqrt(eb)*recdcode(:,(i-1)*length(t)+1:i*length(t)).*basis];
% ingration with time tb i.e sumation
rxcode=[rxcode sum(demod(:,(i-1)*length(t)+1:i*length(t)))];
end
% Decision Device
rxcode(find(rxcode>=0))=1;rxcode(find(rxcode<0))=-1;
%finding out the error
error(eb,:)=data-rxcode;numerror=nnz(error(eb,:));
%finding out the bit error
ber=[ber numerror/numbits];
%finding out the SNR
sigpower=cov(mod);snr=[snr 10*log10(sigpower/sqrt(no))];
end
dB=[];
for k=1:numbits
Pb=[];
dB=[dB snr(k)];
SNR = 10.^ (dB ./ 10);
Pb = [Pb 0.5*erfc(sqrt(SNR))]; % problity of error
end
t1=[0:1/1000:numbits];
figure(1);
subplot(3,1,1);stem(data(1:numbits));
title('Wave pattern in BPSK');ylabel('data');
carr=cos(2*pi*fc*t1);
subplot(3,1,2);plot(t1,carr);axis([0 numbits-1 -1 1]);ylabel('carrier');
subplot(3,1,3);plot(t1(1:numbits*1000),mod(1:numbits*1000));
axis([0 numbits-1 -5 5]);ylabel('transmitted code');
figure(2);
subplot(2,1,1);stem(data(1:numbits));ylabel('transmitted code');
subplot(2,1,2);stem(rxcode(1:numbits));ylabel('received code');
figure(3);semilogy (dB(1:numbits), Pb(1:numbits));
grid on;xlabel('SNR (dB)');ylabel('Bit error rate');
title('Performance of antipodal signal over AWGN channel');
103/129
FIGURE 1 Signal-space diagram for coherent binary PSK system. The
waveforms depicting the transmitted signals S1(t) and S2(t) , displayed in the
inserts,
assume nc = 2.
A coherent binary PSK system is therefore characterized by having a signal space
that is
one-dimensional (i.e., N = 1), with a signal constellation consisting of two
message points (i.e., M
= 2). The coordinates of the message points are
S11 = ∫ S1(t) Φ1(t) dt (6)
= + √Eb And
S21 = ∫ S1(t) Φ1(t) dt (7)
= - √Eb
The message point corresponding to S1(t) is located at S11=+√Eb, and the message
point
corresponding to S2(t) is located at S21 =-√Eb Figure 1 displays the signal-space
diagram for binary
PSK. This figure also includes two inserts, showing example waveforms of antipodal
signals
representing S1(t) and S2(t). Note that the constellation of Figure 1 has minimum
average energy.
Generation and Detection of Coherent Binary PSK Signals
To generate a binary PSK signal, we see from Equations (1)-(3) that represent the
input
binary sequence in polar form with symbols 1 and 0 represented by constant
amplitude levels of +
√Eb and - √Eb, respectively. This signal transmission encoding is performed by a
polar nonreturn-
to-zero (NRZ) level encoder. The resulting binary wave and a sinusoidal carrier
Φ1(t) whose
104/129
Plot for polar input sequence, carrier and BPSK wave pattern
1 2 3 4 5 6 7 8 9 10
-1
-0.5
0
0.5
1
Wave pattern in BPSK
data
0 1 2 3 4 5 6 7 8 9
-1
-0.5
0
0.5
1
carrier
0 1 2 3 4 5 6 7 8 9
-5
0
5
transmitted code
Plot for Transmitted code and received code
1 2 3 4 5 6 7 8 9 10
-1
-0.5
0
0.5
1
transmitted code
1 2 3 4 5 6 7 8 9 10
-1
-0.5
0
0.5
1
received code
105/129
frequency fc = (nc / Tb) for some fixed integer nc, are applied to a product
modulator, as in
Figure 2a. The carrier and the timing pulses used to generate the binary wave are
usually extracted
from a common master clock. The desired PSK wave is obtained at the modulator
output.
To detect the original binary sequence of 1s and 0s, we apply the noisy PSK signal
x(t) (at the
channel output) to a correlator, which is also supplied with a locally generated
coherent reference
signal Φ1(t) ,as in Figure 2b. The correlator output, x1, is compared with a
threshold of zero volts.
If x1 > 0, the receiver decides in favor of symbol 1. On the other hand, if x1 <
0, it decides in favor
of symbol 0. If x1 is exactly zero, the receiver makes a random guess in favor of
0 or 1
Algorithm
Transmitter or Modulation
� Generate the no of Random sequence bits as input given
� Generate the carrier and basis function
� Convert the binary sequence into polar non-return-to-zero (NRZ) level. i.e., for
Symbol
1 for 1 & symbol zero -1
� To generate the modulated output multiply basis function with input bit
sequence.
� Generate the random noise signal
� Add the noise with modulated signal
� Plot the polar input data , carrier and modulated carrier
Receiver or Demodulation
� The Received signal is multiply with the same basis function.
� sum the multiplied signal at the Tb interval (i.e. integration )
� Compare the summation data for > 0 or < 0. If >0 make Symbol 1 and < 0 Make
Symbol 0.
� Check the Error by transmitted bit – received bit.
� Calculate the SNR
� Calculate the bit Error Rate ( error/ no of bit)
� Plot the SNR verses BER ( Bit Error Rate)
� Plot the transmitted and received bit
106/129
Plot for BER verses SNR
-20 -18 -16 -14 -12 -10 -8
10
-0.48
10
-0.46
10
-0.44
10
-0.42
10
-0.4
10
-0.38
10
-0.36
SNR (dB)
Bit error rate
Performance of antipodal signal over AWGN channel
107/129
Inference
• The simple BPSK transmitter has only polar converter and product modulator.
• The simple receiver has correlator (product modulator with integrator) and
Decision device.
• The BER and SNR depend on the Channel noise.
Result
The Binary phase shift keying Transmitter and Receiver understood and analyzed and
plot the
BER, SNR performance.
108/129
Pure Aloha Network Configuration Screenshot:
109/129
Analysis of MAC Protocol - ALOHA
Aim:
To study and analysis of network MAC protocol - Aloha
Software Required:
Netsim 2.0 version Software
Theory:
Introduction
Protocols are strict languages used for communicating reliably between two
compatible
nodes. Each node must know how to interpret and send signals in accordance with
the rules of a
particular protocol.
One of the most basic protocol is the Aloha Protocol. It is used to solve the
channel
allocation problem. It uses ground based radio broad casting, the basic idea is
applicable to any
system in which un-coordinated users are competing for use of a single shared
channel.
Pure Aloha
With Pure Aloha station are allowed to access the channel whenever they have data
to
transmit and then waits for an acknowledgement is not received with in a short
amount of time.
The station assume that another station has also transmitted simultaneously
causing a collision in
which the combined transmission were distorted so that the receiving station did
not hear them and
did not return an acknowledgement and detecting a collision both transmission
station would
choose a random back of time and then retransmit their packet with a good
probability of success
however as traffic increased on the aloha channel, the collision rate would
rapidly increases as
well.
110/129
Simulated Output Screenshots:
Frames / Frame time: 0.25 Frames / Frame time: 0.5
Frames / Frame time: 0.75 Frames / Frame time: 1.0
111/129
Network Performance Parameter
Payload Delivered (Bytes)
Total number of data bytes in successful frames transmitted in network.
Overhead (Bytes)
The total number of overhead transmitted with successful data bytes in the network
during
simulation
Queuing time (Micro second)
This is calculated for successful frames.
Medium Access Time (Micro second)
This is calculated for successful frames.
Transmission Time (Micro second)
This is calculated for successful frames.
Dropped Frame
Number of frames dropped at the source without transmission due to retransmission
due to
retransmission limit
Error Frames
The Number of frames discarded due to error.
Total Attempts
Sum of all the attempts made by nodes in the network to transmit data
successfully.
Successful Attempt
Sum of all the attempts made by nodes in the network to transmit data frames
successfully.
Collision Counts
Total number of collision in the network.
Defer Counts
Total number of times the node have postponed transmission in the network.
112/129
Frames / Frame Time Vs Throughput
Frames / Frame Time Vs Mean Delay
Serial no. Transmitting
nodes
Frames / frame
time (second)
Throughput(%) Mean Delay
(micro second)
1 3 0.25 15.00118 7564438.521
2 4 0.5 13.47939 31265274.18
3 5 0.75 13.11574 51190881.89
4 6 1 12.53094 112968871
11
11.5
12
12.5
13
13.5
14
14.5
15
15.5
0.25 0.5 0.75 1
Frames/frame time(sec)
Throughput(%)
0
20000000
40000000
60000000
80000000
100000000
120000000
0.25 0.5 0.75 1
Frames/frame time (sec)
Mean Delay (us)
113/129
Simulation Time (Micro second)
Time for transmitting all the data frames generated also means the time for
draining the
queue of all nodes.
Data Frames Generated
Total number of data frames generated by all nodes put together.
Normalized Throughput
Also called as good put. Fraction of link’s capacity devoted to carrying non
retransmitted
frames excluding bytes due to protocol overhead, collision and retransmission.
Normalized Throughput (%) = (payload delivered x byte time x 100) /simulation end
time
Byte Time (Micro second)
Time taken for a byte to reach the destination. This value depends on the data
rate capacity
of physical medium
Throughput (%)
Fraction of links capacity devoted to carrying frames.
Throughput (%) = ((payload delivered + overheads) x Byte time)/simulation end time
x
100
Mean Delay
Mean time a frame waits at a station before being successfully transmitted
(queuing time
and medium access time and transmission time per frame).
Formula
Mean Delay = Queuing time + Medium access time + Transmission time in μsec/Frame
(pay load delivered / maximum data size performance)
Response Time (μ sec)
Sum of medium access time and transmission time per frame.
Formula
Response Time = medium Access time + Transmission time
(Payload delivered / maximum data size performance)
114/129
115/129
Probability of success
Ratio of successful data transmission to overall transmission
Formula
Probability of success = successful attempt / total attempt.
Average attempt
The average attempt made by a node to successfully transmit a frame in the
network.
Formula
Average attempt = (total attempt x slot time) / simulation end time
Procedure
1. Run NetsimVer2.0 Software. Select Simulation – New – LAN – ALOHA option in the
menu.
2. Select the nodes from the left side menu and drag it & place it in the
workspace provided in
the software.
3. Place minimum of 2nodes and maximum of 10nodes in the workspace.
4. Select a node and right click button in the mouse and select properties option.
5. Set the Configuration of the node as the Frames / frame time to 0.25 Sec.
6. Similarly set the Frames /frame time to 0.25 Sec to all nodes.
7. Run the simulation, save the simulation output to a file.
8. Repeat the same above procedure for different frames/ frame times 0.5, 0.75 &
1.
9. Save all the simulation output to files for all option.
10. Using the data stored in the simulation result file, Plot a graph by taking
the Frame / frame
time in X-axis & Throughput (%) in Y-axis.
11. Similarly Plot a graph by taking Frame / frame in X-axis & Mean delay in Y-
axis.
116/129
117/129
Result
Successfully studied and simulated the network MAC protocol - Pure Aloha.
Inference
The Following points are observed from the graph
i. When then Frame / frame time (data rate) increases, the throughput decreases
drastically.
ii. The mean delay is also increased lot with the increase in Frame / frame time.
Thus by considering the above points we can conclude pure aloha has low efficiency
event
though the protocol is simple.
Hence the protocol is not suitable for high speed networking and it is suitable
for low speed
network with less number of nodes.
118/129
CSMA/CD Network Configuration Screenshot:
119/129
Analysis of MAC Protocol – CSMA/CD
Aim:
To study the theory of MAC Protocol CSMA/CD and analyze network performance of
various simulations.
Software Required:
Netsim 2.0 version Software
Theory:
Carrier Sense Multiple Access (CSMA)
Ethernet uses a refinement of ALOHA, known as Carrier Sense Multiple Access
(CSMA),
which improves performance when there is a higher medium utilisation. When a NIC
has data to
transmit, the NIC first listens to the cable (using a transceiver) to see if a
carrier (signal) is being
transmitted by another node. The individual bits are sent by encoding them with a
10 (or 100 MHz
for Fast Ethernet) clock using Manchester encoding. Data is only sent when no
carrier is observed
(i.e. no current present) and the physical medium is therefore idle. Any NIC which
does not need
to transmit, listens to see if other NICs have started to transmit information to
it.
120/129
Simulated Output Screenshots:
Frames / Frametime: 0.25 Frames / Frametime: 0.5
Frames / Frametime: 0.75 Frames / Frametime: 1.0
121/129
However, this alone is unable to prevent two NICs transmitting at the same time.
If two
NICs simultaneously try transmit, then both could see an idle physical medium
(i.e. neither will
see the other's carrier signal), and both will conclude that no other NIC is
currently using the
medium. In this case, both will then decide to transmit and a collision will
occur. The collision will
result in the corruption of the frame being sent, which will subsequently be
discarded by the
receiver since a corrupted Ethernet frame will (with a very high probability) not
have a valid 32-bit
MAC CRC at the end.
Collision Detection (CD)
A second element to the Ethernet access protocol is used to detect when a
collision occurs.
When there is data waiting to be sent, each transmitting NIC also monitors its own
transmission. If
it observes a collision , it stops transmission immediately and instead transmits
a 32-bit jam
sequence. The purpose of this sequence is to ensure that any other node which may
currently be
receiving this frame will receive the jam signal in place of the correct 32-bit
MAC CRC, this
causes the other receivers to discard the frame due to a CRC error.
122/129
Frames/Frame Vs Mean Delay
Frames/Frame time 0.25 0.5 0.75 1
Mean Delay (sec) 0.00029 0.8388300 0.84819 0.147324
Frames/Frametime Vs Mean Delay (sec)
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
0.25 0.5 0.75 1
Frames/Frametime
Mean Delay (sec)
Frames/Frame Vs Throughput
Frames/Frametime Vs Throughput (%)
0
20
40
60
80
100
120
0.25 0.5 0.75 1
Frames/Frametime
Throughput (%)
Frames/Frame time 0.25 0.5 0.75 1
Throughput (%) 50.74352 75.03895 87.74781 99.20868
123/129
Procedure:
1. Using Netsim software, configure the network with number of nodes and switches
as
shown in the below screen shot.
2. For each simulation set different value of frames/frame time by changing the
properties of
nodes and note down all the readings.
3. Now network should be configured by clicking configure button in simulator.
4. Then simulate network by using simulate option in the simulator and take screen
shots for
output.
5. Graphs should be drawn between
i. Frames / Frametime Vs Mean Delay (sec)
ii. Frames / Frametime Vs Throughput (%)
Result:
Theory of MAC protocol CSMA/CD was studied and the network performance is also
analyzed.
Inference:
i. The variation in the mean delay for the number of frames generated is
approximately
linear for both protocols.
ii. The throughput (%) of CSMA/CD protocol is remarkably higher than CSMA
protocol.
iii. When two or more NICs attempt to transmit at the same time, the performance
of
Ethernet is less predictable. The fall in utilisation and throughput occurs
because some
bandwidth is wasted by collisions and back-off delays.
124/129
Token Ring Network Configuration Screenshot:
125/129
ANALYSIS OF MAC PROTOCOL – TOKEN RING
Aim:
To study the network performance of MAC Protocol Token ring using NETSIM
simulation
Software Required:
Netsim 2.0 version Software
Theory:
The token ring technique is based on the use of a small frame, called a token that
circulates
when all stations are idle. A station wishing to transmit must wait until it
detects a token passing
by. It then seizes the token by changing one bit in the token, which transforms it
from a token into
a start-of-frame sequence for a data frame. The station then appends and transmits
the remainder of
the fields needed to construct a data frame.
When a station seizes a token and begins to transmit a data frame, there is no
token on the
ring, so other stations wishing to transmit must wait. The frame on the ring will
make a round trip
and be absorbed by the transmitting station. The transmitting station will insert
a new token on the
ring when both of the following conditions have been met:
• The station has completed transmission of its frame.
• The leading edge of the transmitted frame has returned (after a complete
circulation of the ring) to the station.
If the bit length of the ring is less than the frame length, the first condition
implies the
second if not, a station could release a free token after it has finished
transmitting but before it
begins to receive its own transmission. The second condition is not strictly
necessary, and is
relaxed under certain circumstances. The advantage of imposing the second
condition is that it
ensures that only one data frame at a time may be on the ring and that only one
station at a time
may be transmitting, thereby simplifying error-recovery procedures.
126/129
Simulated Output Screenshots:
Frames / Frame time: 0.25 Frames / Frame time: 0.5
Frames / Frame time: 0.75 Frames / Frame time: 1.0
127/129
Once the new token has been inserted on the ring, the next station downstream with
data to
send will be able to seize the token and transmit. Figure illustrates the
technique. In the example, A
sends a packet to C, which receives it and then sends its own packets to A and D.
Note that under lightly loaded conditions, there is some inefficiency with token
ring
because a station must wait for the token to come around before transmitting.
However, under
heavy loads, which is when it matters, the ring functions in a round-robin
fashion, which is both
efficient and fair. To see this, consider the configuration in Figure. After
station A transmits, it
releases a token. The first station with an opportunity to transmit is D. If D
transmits, it then
releases a token and C has the next opportunity, and so on.
The principal advantage of token ring is the flexible control over access that it
provides. In
the simple scheme just described, the access if fair. As we shall see, schemes can
be used to
regulate access to provide for priority and for guaranteed bandwidth services.
The principal disadvantage of token ring is the requirement for token maintenance.
Loss of
the token prevents further utilization of the ring. Duplication of the token can
also disrupt ring
operation. One station must be selected as a monitor to ensure that exactly one
token is on the ring
and to ensure that a free token is reinserted, if necessary.
Procedure:
1. Using Netsim Software, Token Ring protocol is configured
2. The Network environment is opened
3. Nodes are selected, dragged, placed and interconnected in the Network
environment
4. The properties of Individual node Vs Frame size (200, 400, 400 & 500 kbs) are
configured by Right clicking the nodes
5. The Network environment is simulated.
6. The network performance of environment is obtained.
7. The effect of Frame size on Mean delay and Throughput in % are plotted
128/129
Frames/Frame Time Vs Throughput
Frames/Frame Time Vs Mean Delay
Frames Throughput Mean Delay
0.25 96.839839 104182.266
0.5 99.97791 4968629.547
0.75 99.977887 9975155.298
1 99.835105 99.977931
99.974
99.9745
99.975
99.9755
99.976
99.9765
99.977
99.9775
99.978
99.9785
99.979
99.9795
0.25 0.5 0.75 1
Frames/frame time(sec)
Throughput(%)
0
20000000
40000000
60000000
80000000
100000000
120000000
0.25 0.5 0.75 1
Frames/Frame time(sec)
Mean Delay(us)
129/129
Result:
The characteristics of Network environment with different component properties
i.e. the
effect of Frame size on Mean delay and Throughput in % of MAC Protocol Token Ring
is
analyzed using NETSIM
Inference:
When we increase the frame/frames time, throughout is decreased. Frame/frames time
is
indirectly proportional to throughput. When we increase the frame/frames time mean
delay is
increased. Frame/frames time is directly proportional to mean delay.

Das könnte Ihnen auch gefallen