EC3461 Comm Sys LAB MANUAL
EC3461 Comm Sys LAB MANUAL
CHENNAI
DEPARTMENT OF
ELECTRONICS AND COMMUNICATION ENGINEERING
(Regulation - 2021)
PREPARED BY
ASSISTANT PROFESSOR/ECE
1
DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEERING
COURSE OBJECTIVES :
COURSE OUTCOMES:
At the end of the laboratory course, the student will be able to understand the:
CO1:Design AM, FM & Digital Modulators for specific applications.
CO2:Compute the sampling frequency for digital modulation.
CO3:Simulate & validate the various functional modules of Communication system.
CO4:Demonstrate their knowledge in base band signaling schemes through implementation of digital
modulation schemes.
CO5:Apply various channel coding schemes & demonstrate their capabilities towards the improvement of the noise
system.
2
GENERAL GUIDELINES AND SAFETY NSTRUCTIONS
List of Experiments
TOTAL = 45 PERIODS
4
EC 3461 COMMUNICATION SYSTEMS LABORATORY
TABLE OF CONTENTS
5
BLOCK DIAGRAM
AM MODULATOR:
Message
Signal
Generator Amplitude
Modulated
AM output
Modulator
Carrier
Generator
AM DEMODULATOR:
Amplitude Demodulated
Envelope
Filter Amplifier
Detector
Modulated Output
I/P
^^
Ex.No:1 AM MODULATOR AND DEMODULATOR
DATE:
AIM:
To amplitude modulate the given message signal and to recover the message signal by demodulation.
APPARATUS REQUIRED:
1. AM Modulation Kit
2. AM Demodulation Kit
3. Connecting probes
4. CRO
THEORY:
Changing the characteristics of carrier signal in accordance with the message signal is called modulation.
In AM modulation, the amplitude of carrier signal is changed in accordance with the message signal. Both
message and carrier signal is are analog signal. The carrier frequency remains same, but its amplitude varies
according to amplitude variations of the modulating signal. Modulation index = m = Em / EC = maximum
amplitude of modulating signal / carrier signal
Value of Em < EC to avoid any distortion in the modulated signal.
Maximum value of m = 1 when Em = Ec
Minimum value of m = 0
If m > 1 is called over modulation, m < 1 is called under modulation.
Modulation index is calculated from the equation m = ( Emax - Emin) / (Emax + Emin)
Bandwidth = 2fm
AM signal has three components; un modulated carrier, lower sideband and upper sideband.
Total power P = Pc (1 + m2 / 2)
AM modulation is done by
1. Transistor modulator of base, emitter and collector type
2. Low level modulator
3. Medium power AM modulator
AM demodulation is done by
Envelope detector (or) diode detector.
^^
MODEL GRAPH: -
V Message signal
time (t)
Carrier signal
AM – Modulated signal
time (t)
Demodulated signal
time (t)
PROCEDURE:
CALCULATION:-
Emax Emin
Modulation Index =
Emax Emin
TABULATION:
RESULT:
The amplitude modulation and demodulation operations were performed with the given message and
carrier signals and the observed waveforms were plotted in the graph.
BLOCK DIAGRAM
FM MODULATOR:
Message
Signal
Generator
Frequency
Modulated
Frequency output
Modulator
Carrier
Generator
FM DEMODULATOR:
Frequency Demodulated
Modulated VCO
Signal Signal
Ex. No: 2 FM MODULATOR AND DEMODULATOR
DATE:
AIM:
To frequency modulate the given message signal and to recover the message signal by demodulation.
APPARATUS REQUIRED:
1. FM Modulation Kit
2. FM Demodulation Kit
3. Connecting probes
4. CRO
THEORY:
Frequency of the carrier signal varies in accordance with the message signal is called frequency
modulation. Amplitude of the modulated carrier remains constant.
Modulation index m = K1 Em / Wm
Modulation index of FM is directly proportional to peak modulating voltage.
m = / fm = Maximum frequency deviation / Modulating frequency
m < 1 is called narrow band FM. FCC allows of 75KHz and fc = 100MHz. Angle modulated signal contains
large number of sidebands depending upon the modulation index.
Bandwidth = 2fm HZ = 2 = 2nfm
Where ‘n’ is the number of significant sidebands obtained from Bessel table.
Based on Carson’s rule, Bandwidth = 2[ + fm (max)] HZ.
Total power = E c2 / 2R. It is constant in FM.
Since, amplitude of FM is constant the noise interference is minimum in FM.
The frequency modulation is done by
i) Direct FM using
a) FET reactance modulator; b) Varactor diode
ii) Indirect FM – Armstrong method
The demodulation is done by
1. Balanced slope detector (or) Round Travis detector
2. Foster seeley discriminator (phase discriminator)
3. Ratio detector
The FM detector should be able to produce the signal whose amplitude is proportional to the deviation in
the frequency of FM signal.
PROCEDURE:-
Message Signal
time (t)
Carrier Signal
time (t)
FM Output
time (t)
TABULATION:
RESULT:
The frequency modulation and demodulation operations were performed with the given message and
carrier signals and the observed waveforms were plotted in the graph.
CIRCUIT DIAGRAM:
DE EMPHASIS DIAGRAM :
EX.NO: 3 PRE –EMPHASIS AND DE-EMPHASIS
DATE :
AIM:
To design a pre emphasis circuit to boost the input signal level for a FM transmitter for a cut off
frequency of 1KHz. Attenuate the boosted high frequency signals at the receiver side using a
deemphasis circuit with a cutoff frequency of 1.6KHz. Analyze t he frequency response
characteristics of pre emphasis and de emphasis circuits.
COMPONENTS REQUIRED:
NAME OF THE
S.NO. EQUIPMENT / RANGE QUANTITY
COMPONENT
1 Cathode Ray Oscilloscope (0 – 20MHz) 1
THEORY :
During the transmission over a channel, the received signal contains interference (high frequencynoise).
For demodulated FM signals, the interference power increases as the frequency goes up. Thus, De -
emphasis is applied to the demodulated signal to decrease the power of the int erference in high
frequency. However, in order to keep the high frequency component of the demodulated message,
preemphasis must be applied to the message before going through the FM modulator.
PRE-EMPHASIS
Pre-emphasis refers to boosting the relative amplitudes of the modulating voltage for higher
audiofrequencies. Pre-emphasis is done at the transmitting side of the frequency modulator. Signals with
higher modulation frequencies have lower SNR. In order to compensate this, the high frequency signals
are emphasised or boosted in amplitude at the transmitter section of a communication. That is, the pre-
emphasis network allows the high frequency modulating signal to modulate the carrier at higher level,
this causes more frequency deviation. The circuit consist of a transistor, resistor and an inductor. It is
basically a high pass filter or Differentiator. A pre-emphasis circuit produces a constant increase in the
amplitude of the modulating signal with an increase in frequency.
MODEL GRAPH
The cut off frequency is determined by the RC or L/R time constant of the network. Normally, the cut
off frequency occurs at the frequency where capacitive reactance or inductive reactance equals R. The cut
off frequency is given by the formula.By the use of an active pre-emphasis network we can reduce the
signal loss and distortion with the increase of SNR. Also the output amplitude of the network increases with
frequencies above cut off frequency.
DE-EMPHASIS
De-emphasis is the complement of pre-emphasis, in the anti-noise system called emphasis. This circuit is
used to attenuate the high frequency signal that is boosted at the transmitter section. The circuit is placed
at the receiving side. It acts as a low pass filter. The cut off frequency is given by the formula The cut off
frequency is given by the formula.The circuit consists of a passive network consisting of a resistor and a
capacitor. It is basically a low pass filter or integrator. The pre- emphasis network in front of the FM
modulator and a de-emphasis network at the output of the FM demodulator improves the Signal to Noise
Ratio
SAMPLER
Message
Signal
Generator
SAMPLE
AND Sampled signal
HOLD
CIRCUIT
Sampling
Pulse
Generator
(Astable)
RECONSTURCTION CIRCUIT
AIM:
To get the samples of the given message signal by natural sampling method and to reconstruct the
message signal from the samples.
APPARATUS REQUIRED:
1. Analog signal sampler kit
2. Reconstruction Kit
3. CRO
4. Connecting probes
THEORY:
The sampling process is defined as converting the analog signal into a digital signal by using the sampling
and hold circuit.
Types of sampling is
i. Natural sampling
ii. Impulse sampling
Sampling is performed based on sampling theorem:
A band limited signal having no spectral components above fm HZ can be determined uniquely by values
sampled at uniform intervals of
TS 1/2fm sec.
Nyquist rate fS ≥ 2fm which gives the minimum sampling frequency needed to reconstruct the analog
signal from sampled waveforms.
The sampling is implemented by a circuit sampler is most commonly done with a Sample and Hold
circuit.
If we under sample fS < f Nyquiset then aliasing occurs. Aliasing means overlapping adjacent spectrum
replicates. It leads to loss of information. So, antialiasing filters are used to overcome it.
MODEL GRAPH
V Message Signal
(time) t
Sampling Pulse
(time) t
Sampled signal
Amplitude
(Volts)
(time) t
Demodulated Signal
(time) t
PROCEDURE:-
TABULATION:-
RESULT:
The message signal was sampled and transmitted and the same message has been reconstructed is
obtained at the receiving end. The observed waveforms were plotted in graph.
BLOCK DIAGRAM
Sine Wave
500 Hz TDM
4X1
Output
Multiplexer
Sine Wave
1 KHz
Sine Wave
2 KHz
TDM DEMULTIPLEXER
Y0
Y1
Low Pass Filter Demultiplexed
1X4 Y2 output
& Amplifier
TDM Y3
Demultiplexer
input
Ex.No:4(b) TIME DIVISION MULTIPLEXING (TDM)
DATE:
AIM:
To obtain time division multiplexed signals for given 3 or 4 signals and also to demultiplex it.
APPARATUS REQUIRED:
1. TDM – multiplexing Kit
2. TDM – demultiplexing Kit
3. CRO
4. Connecting probes
THEORY:
The sampling theorem provides a basis for transmitting the information of band limited signal as
sequence of samples uniformly at a rate slightly higher than the Nyquist rate. The important feature of the
sampling process is a conservation of time.
The principle of TED:
The principle of TDM is sharing common communication channel by independent message sources
without mutual interference among them.
The basic operations of TDM system is:
i) Filtering
ii) Selection of samples
iii) Pulse modulation
iv) Demodulation
v) Distribution of narrow samples
Each input message signal is restricted in bandwidth by a filter. Selection of samples is the function of
commentator. Then it is modulated and transmitted via channel. In the receiver, the demodulated signal is
distributed by decommentator.
Merits:
i) It can easily accommodate both analog and digital sources.
ii) TDM has immune to non-linearity’s in the channel.
Demerits:
It is highly sensitive to amplitude, phase variations in the channel.
MODEL GRAPH:-
TDM INPUT
time (t)
time (t)
time (t)
Amplitude
(Volt)
time (t)
PROCEDURE:-
V TDM Output
time (t)
time (t)
time (t)
Amplitude
(Volt)
time (t)
Transmitter section:
Sine wave (250 Hz)
Sine wave (500 Hz)
Sine wave (1K Hz)
Sine wave (2 KHz)
Receiver section:
Sine wave (250 Hz)
Sine wave (500 Hz)
Sine wave (1K Hz)
Sine wave (2 KHz)
RESULT:
The time division multiplexing and demultiplexing operations were performed with the given multiple
number of message signals and the waveforms were observed and plotted.
BLOCK DIAGRAM
Parallel
Modulating Analog Sample & to serial
PCM
signal Compander Hold DAC
Convert
Output
Generator Circuit er
PCM – DEMODULATOR:-
PCM
Signal Serial to
Recovered
Analog
Parallel DAC LPF
Expander Output
Converter
Clock Pulse
Ex.No:5 Pulse Code Modulation and Demodulation
DATE:
AIM:
To obtain the PCM – Modulated and Demodulated signal for give message signal.
APPARATUS REQUIRED:
1. PCM – Modulation Kit
2. PCM – Demodulation Kit
3. CRO
4. Connecting probes
THEORY:
In PCM, a message signal is represented by sequence of coded pulses. So the signal is discrete in both time
and amplitude.
The basic operations performed in PCM system are
(i) Sampling (ii) Quantizing (iii) Encoding
The incoming message signal is sampled with a train of rectangular pulses. To ensure perfect reconstruction at
the receiver, sampling rate fs > 2w is used. The rounding off sampled signal is called quantization. So that
quantized signal is discrete in both time and amplitude. Then, the quantized signal is translated into a more
appropriate form of code format by encoding. In the channel regenerators are used to increase the immunity of
signal against noise. The receiver has to regenerate, reshape the received pulses and then regroup them into a
recovered signal.
MODEL GRAPH:-
V
Message Signal
time (t)
Sampling Pulse
time (t)
Sampled output
PCM output
time (t)
time (t)
time (t)
PROCEDURE:-
TABULATION:-
RESULT:
The Pulse code modulation and demodulation has been performed with the given message signal and
the observed waveforms was plotted in graph.
BLOCK DIAGRAM
Audio Frequency
Signal Generator
Monostable
Multivibrator PAM O/P
Astable Multivibrator
DEMODULATOR
PAM
Demodulated Low Pass
modulated Signal Demodulated
Amplifier
Signal Signal
TABULATION:
PROCEDURE:-
V
Message Signal
time (t)
time (t)
Amplitude
(Volt)
Pulse Amplitude
Modulated wave
time (t)
Demodulated Signal
time (t)
RESULT:
Thus for given message signal PAM modulation and demodulation is obtained. It is plotted in graph.
BLOCK DIAGRAM
Audio Frequency
Signal Generator
TABULATION:
AIM:
To obtain the pulse position modulated waveform for given message signal.
APPARATUS REQUIRED:
1. PPM Modulation Kit and Demodulation Kit
2. CRO
3. Connecting probes
THEORY:
The positions of the regularly spaced train of pulses are varied in accordance with the message signal. Bandwidth
of transmission channel depends on rising time of the pulse.
BT ≥ 1 / 2tr
PPM has minimum noise interference. This modulation is similar to PM. It requires less transmitting power.
PT (PPM) << PT (PWM).
PROCEDURE:-
RESULT:
Thus for given message signal PPM modulation and demodulation is obtained. It is plotted in graph.
BLOCK DIAGRAM
Audio Frequency
Signal Generator
TABULATION:
AIM:
To obtain the pulse width modulation for given message signal.
APPARATUS REQUIRED:
1. PWM Modulation Kit and Demodulation Kit
2. CRO
3. Connecting probes
THEORY:
The widths of regularly spaced train of pulses are varied in accordance with the message signal.
Bandwidth of transmission channel depends on rise time of the pulse.
BT >> 1 / 2tr
PWM has less noise interference. This type of modulation is similar to FM.
Transmitting power PT (PWM) >> PT (PPM).
PROCEDURE:-
Message Signal
time (t)
Sampling pulse
(Train of
rectangular pulses)
time (t)
Pulse width
modulated wave
Amplitude
(volt)
time (t)
Demodulated wave
time (t)
RESULT:
Thus for given message signal PWM modulation and demodulation is obtained. It is plotted in graph.
BLOCK DIAGRAM
ASK MODULATOR
ASK DEMODULATOR
Ex No:8(a) GENERATION AND DETECTION OF ASK
DATE:
AIM
To construct and generate Amplitude Shift Keying signal and detect the message signal.
APPARATUS REQUIRED
THEORY
ASK or ON-OFF key is the simplest digital modulation technique. In this method there is only
one unit energy carrier it is switched ON/OFF depending upon the input binary sequence to transmit
symbol 0 & 1. No pulse is transmitted output contains some complete no of cycle of carrier
frequency. The disadvantage of ASK is the modulated carrier signal is not continuously transmitted.
The peak power requirement is also high. The bit error probability rate is also not required in this
technique.
PROCEDURE
TABULAR COLUMN
1 Modulating Signal
2 Carrier Signal
3 Modulated Signal
4 Demodulated
Signal
RESULT
Thus the Amplitude Shift Keying signal was generated and the message signal was reconstructed
BLOCK DIAGRAM
FSK MODULATOR
FSK DEMODULATOR
Ex.No :8(b) GENERATION AND DETECTION OF FSK
DATE:
AIM
To generate a Frequency Shift Keying signal using FSK modulator and detect the
message signal from FSK signal using FSK detector.
APPARATUS REQUIRED
THEORY
Frequency Shift Keying is the process generating a modulated signal from a digital data
input. If the incoming bit is 1, a signal with frequency f1 is sent for the duration of the bit. If the
bit is 0, a signal with frequency f2 is sent for the duration of this bit. This is the basic principle
behind FSK modulation.
Basically a 555 timer is used as an Astable multivibrator, which generates a clock pulse
of frequency determined by the values of R and C in this circuit. This is divided by 2, 4, 8 and
16 using 74163 IC, and two of these outputs are used in a NAND logic gates circuit, to generate
a FSK modulated wave. To this NAND gates circuit a binary data sequence is also supplied. The
circuit operation causes a frequency f1 for bit 1, and f2 for bit 0.
In the demodulator circuit, the FSK modulated signal is applied to a high Q tuned filter.
This filter is tuned to the frequency of either 0 or 1. This filter passes the selected frequency and
rejects the other. The output is then passed through a FWR (Full Wave Rectifier) circuit and the
output is now above zero volts only. It is then passed through a comparator; if the input to the
comparator is greater than threshold value, the output is 1, else it is 0. This digital output of the
comparator is the demodulated FSK output.
PROCEDURE:
TABULAR COLUMN
1 Modulating Signal
2 Carrier Signal 1
3 Carrier Signal 2
4 Modulated Signal
5 Demodulated
Signal
RESULT
Thus the Frequency Shift Keying signal wag generated using FSK modulator and the
message signal was detected from FSK signal using FSK detector.
BPSK MODULATOR
BPSK DEMODULATOR
Ex:No: 8(c) GENERATION AND DETECTION OF PSK
DATE:
AIM:
To construct and generate Phase Shift Keying signal and detect the message signal.
APPARATUS REQUIRED
THEORY
PSK is a digital modulation scheme which is analogues to phase modulation. In binary
phase shift keying two output phases are possible for a single carrier frequency one out of phase
represent logic 1 and logic 0. As the input digital binary signal change state the phase of output
carrier shift two angles that are 180o out of phase.
In a PSK modulator the carrier input signal is multiplied by the digital data. The input
carrier is multiplied by either a positives or negatives consequently the output signal is either
+1sinwct or - 1sinwct. The first represent a signal that is phase with the reference oscillator the
latter a signal that is 180o out of phase with the reference oscillator. Each time a change in input
logic condition will change the output phase consequently for PSK the output rate of change equal
to the input rate range and widest output bandwidth occurs when the input binary data are
alternating 1/0 sequence. The fundamental frequency of an alternate 1/0 bit sequence is equal to
one half of the bit rate.
PROCEDURE
TABULAR COLUMN
1 Modulating Signal
2 Carrier Signal
3 Modulated Signal
4 Demodulated
Signal
RESULT
Thus the Phase Shift Keying signal wag generated using PSK modulator and the
message signal was detected.
BLOCK DIAGRAM
DM – MODULATOR
Delta
ANALOG 1 – BIT Modulated
SIGNAL SAMPLER COMPARATOR QUANTIZER
Out put
GENERATOR
INVTEGRATOR
DM – DEMODULATOR
Delata Demodulated
Σ LPF
Modulated Signal
Signal
DELAY TS
Ex.No:9 Delta Modulation and Demodulation
DATE:
AIM:
To obtain delta Modulated and Demodulated signal for give message signal.
APPARATUS REQUIRED:
1. Delta Modulation Kit
2. Delta Demodulation Kit
3. CRO
4. Connecting probes
THEORY:
Delta modulation is a 1 bit version of PCM. It transmits only one bit per sample. That is the present
sample value is compared with the previous sample value. The input signal x(t) is approximated to step signal
by the delta modulator. This step size is fixed. The step size has two levels + and - .
i) If the difference between the input signal is positive, then step size is increased by one step.
ii) If the difference is negative, then step size is decreased by one step.
+ means ‘1’ is transmitted
- means ‘0’ is transmitted
The basic building blocks of delta modulator is
i) One bit quantizer ii) Accumulator iii) Summer
At the receiver, i) the accumulator ii) filter are used.
Advantages:
i) Signaling rate and transmission channel bandwidth is quite small.
ii) Simple modulation and demodulation circuits are used.
MODEL GRAPH:
V
Message signal
time (t)
Sampling pulse
time (t)
Amplitude
(Volt)
time (t)
DM-Demodulated signal
time (t)
TABULATION:
RESULT:
The delta modulation and demodulation were performed with the given message signal and the
observed waveforms were plotted.
SIMULATION WAVEFORM
Exp.No:10(a) SIMULATION OF ASK GENERATION AND DETECTION SCHEME
DATE:
AIM:
To generate and demodulate amplitude shift keyed (ASK) signal using MATLAB.
THEORY
Generation of ASK
Amplitude shift keying - ASK - is a modulation process, which imparts to a sinusoid two or more
discrete amplitude levels. These are related to the number of levels adopted by the digital message. For
a binary message sequence there are two levels, one of which is typically zero. The data rate is a sub-
multiple of the carrier frequency. Thus the modulated waveform consists of bursts of a sinusoid. One of
the disadvantages of ASK, compared with FSK and PSK, for example, is that it has not got a constant
envelope. This makes its processing (eg, power amplification) more difficult, since linearity becomes
an important factor. However, it does make for ease of demodulation with an envelope detector.
Demodulation
ASK signal has a well defined envelope. Thus it is amenable to demodulation by an envelope
detector. Some sort of decision-making circuitry is necessary for detecting the message. The signal is
recovered by using a correlator and decision making circuitry is used to recover the binary sequence.
ALGORITHM
Initialization commands
ASK modulation
1. Generate carrier signal.
2. Start FOR loop
3. Generate binary data, message signal(on-off form)
4. Generate ASK modulated signal.
5. Plot message signal and ASK modulated signal.
6. End FOR loop.
7. Plot the binary data and carrier.
ASK demodulation
1. Start FOR loop
2. Perform correlation of ASK signal with carrier to get decision variable
3. Make decision to get demodulated binary data. If x>0, choose ‘1’ else choose ‘0’
PROGRAM
%ASK Modulation
clc;
clear all;
close all;
%GENERATE CARRIER SIGNAL
Tb=1; fc=10;
t=0:Tb/100:1;
c=sqrt(2/Tb)*sin(2*pi*fc*t);
%generate message signal
N=8;
m=rand(1,N);
t1=0;t2=Tb
for i=1:N
t=[t1:.01:t2]
if m(i)>0.5 m(i)=1;
m_s=ones(1,length(t));
else
m(i)=0;
m_s=zeros(1,length(t));
end
message(i,:)=m_s;
%product of carrier and message
ask_sig(i,:)=c.*m_s;
t1=t1+(Tb+.01);
t2=t2+(Tb+.01);
%plot the message and ASK signal subplot(5,1,2);
axis([0 N -2 2]);
plot(t,message(i,:),'r');
title('message signal');
xlabel('t--->');
ylabel('m(t)');
grid on
hold on
subplot(5,1,4);
plot(t,ask_sig(i,:));
title('ASK signal');
xlabel('t--->');
ylabel('s(t)');grid on
hold on
end
hold off
%Plot the carrier signal and input binary data
subplot(5,1,3);plot(t,c);
title('carrier signal');xlabel('t--->');ylabel('c(t)');grid on
subplot(5,1,1);stem(m);
title('binary data bits');xlabel('n--->');ylabel('b(n)');grid on
% ASK Demodulation
t1=0;t2=Tb for
i=1:N
t=[t1:Tb/100:t2]
%correlator
x=sum(c.*ask_sig(i,:));
%decision device
if x>0
demod(i)=1;
else
demod(i)=0;
end
t1=t1+(Tb+.01);
t2=t2+(Tb+.01);
end
%plot demodulated binary data bits
subplot(5,1,5);stem(demod);
Result
The program for ASK modulation and demodulation has been simulated in MATLAB and
necessary graphs are plotted.
SIMULATION WAVEFORM
Ex.No:10(b) SIMULATION OF BPSK GENERATION AND DETECTION SCHEMES
DATE:
AIM:
To generate and demodulate Binary phase shift keyed (BPSK) signal using MATLAB
Generation of PSK signal
PSK is a digital modulation scheme that conveys data by changing, or modulating, the phase of a
reference signal (the carrier wave). PSK uses a finite number of phases, each assigned a unique pattern of
binary digits. Usually, each phase encodes an equal number of bits. Each pattern of bits forms the symbol
that is represented by the particular phase. The demodulator, which is designed specifically for the
symbol-set used by the modulator, determines the phase of the received signal and maps it back to the
symbol it represents, thus recovering the original data.
In a coherent binary PSK system, the pair of signal S1(t) and S2 (t) used to represent binary
symbols 1 & 0 are defined by
S1 (t) = √2Eb/ Tb Cos 2πfct
S2 (t) =√2Eb/Tb (2πfct+π) = - √ 2Eb/Tb Cos 2πfct where 0 ≤ t< Tb and
Eb = Transmitted signed energy for bit
The carrier frequency fc =n/Tb for some fixed integer n.
Antipodal Signal:
The pair of sinusoidal waves that differ only in a relative phase shift of 180° are called antipodal signals.
BPSK Transmitter
PROGRAM
% BPSK modulation
clc;
clear all;
close all;
%GENERATE CARRIER SIGNAL
Tb=1;
t=0:Tb/100:Tb; fc=2;
c=sqrt(2/Tb)*sin(2*pi*fc*t);
%generate message signal
N=8;
m=rand(1,N);
t1=0;t2=Tb
for i=1:N
t=[t1:.01:t2]
if m(i)>0.5 m(i)=1;
m_s=ones(1,length(t));
else
m(i)=0;
m_s=-1*ones(1,length(t));
end
message(i,:)=m_s;
%product of carrier and message signal
bpsk_sig(i,:)=c.*m_s;
%Plot the message and BPSK modulated signal
subplot(5,1,2);axis([0 N -2 2]);plot(t,message(i,:),'r');
title('message signal(POLAR form)');xlabel('t--->');ylabel('m(t)');
grid on; hold on;
subplot(5,1,4);plot(t,bpsk_sig(i,:));
title('BPSK signal');xlabel('t--->');ylabel('s(t)');
grid on; hold on;
The input binary symbols are represented in polar form with symbols 1 & 0 represented by constant
amplitude levels √Eb& -√Eb. This binary wave is multiplied by a sinusoidal carrier in a product modulator.
The result in a BSPK signal.
BSPK Receiver:
The received BPSK signal is applied to a correlator which is also supplied with a locallygenerated
reference signal c1 (t). The correlated o/p is compared with a threshold of zero volts. If x> 0, the receiver
decides in favour of symbol 1. If x< 0, it decides in favour of symbol 0.
Algorithm
Initialization commands
BPSK modulation
1. Generate carrier signal.
2. Start FOR loop
3. Generate binary data, message signal in polar form
4. Generate PSK modulated signal.
5. Plot message signal and PSK modulated signal.
6. End FOR loop.
7. Plot the binary data and carrier.
BPSK demodulation
1. Start FOR loop
2. Perform correlation of PSK signal with carrier to get decision variable
3. Make decision to get demodulated binary data. If x>0, choose ‘1’ else choose ‘0’
4. Plot the demodulated binary data
t1=t1+1.01; t2=t2+1.01;
end
hold off
%plot the input binary data and carrier signal
subplot(5,1,1);stem(m);
title('binary data bits');xlabel('n--->');ylabel('b(n)');
grid on;
subplot(5,1,3);plot(t,c);
title('carrier signal');xlabel('t--->');ylabel('c(t)');
grid on;
% PSK Demodulation
t1=0;t2=Tb
for i=1:N
t=[t1:.01:t2]
%correlator
x=sum(c.*bpsk_sig(i,:));
%decision device
if x>0
demod(i)=1;
else
demod(i)=0;
end
t1=t1+1.01;
t2=t2+1.01;
end
%plot the demodulated data bits
subplot(5,1,5);stem(demod);
title('demodulated data');xlabel('n--->');ylabel('b(n)');
grid on;
Result
Thus the program for BPSK modulation and demodulation has been simulated in MATLAB
and necessary graphs are plotted.
SIMULATION WAVEFORM
Ex.No:10(c) SIMULATION OF FSK GENERATION AND DETECTION SCHEME
DATE:
AIM
To generate and demodulate frequency shift keyed (FSK) signal using MATLAB
THEORY
Generation of FSK
Frequency-shift keying (FSK) is a frequency modulation scheme in which digital
information is transmitted through discrete frequency changes of a carrier wave. The simplest FSK is
binary FSK (BFSK). BFSK uses a pair of discrete frequencies to transmit binary (0s and 1s) information.
With this scheme, the "1" is called the mark frequency and the "0" is called the space frequency.
In binary FSK system, symbol 1 & 0 are distinguished from each other by transmitting one of the two
sinusoidal waves that differ in frequency by a fixed amount.
Si (t) = √2E/Tb cos 2πf1t 0≤ t ≤Tb
0 elsewhere
Where i=1, 2 &Eb=Transmitted energy/bit
Transmitted freq= ƒi = (nc+i)/Tb, and n = constant (integer), Tb = bit interval
Symbol 1 is represented by S1 (t)
Symbol 0 is represented by S0 (t)
BFSK Transmitter
The input binary sequence is represented in its ON-OFF form, with symbol 1 represented by constant
amplitude of √Ebwith & symbol 0 represented by zero volts. By using inverter in the lower channel,
we in effect make sure that when symbol 1is at the input, The two frequency f1& f2 are chosen to be
equal integer multiples of the bit rate 1/Tb.By summing the upper & lower channel outputs, we get
BFSK signal.
PROGRAM
% FSK Modulation
clc;
clear all;
close all;
%GENERATE CARRIER SIGNAL
Tb=1; fc1=2;fc2=5;
t=0:(Tb/100):Tb;
c1=sqrt(2/Tb)*sin(2*pi*fc1*t);
c2=sqrt(2/Tb)*sin(2*pi*fc2*t);
%generate message signal
N=8;
m=rand(1,N);
t1=0;t2=Tb
for i=1:N
t=[t1:(Tb/100):t2]
if m(i)>0.5
m(i)=1;
m_s=ones(1,length(t));
invm_s=zeros(1,length(t));
else
m(i)=0;
m_s=zeros(1,length(t));
invm_s=ones(1,length(t));
end
message(i,:)=m_s;
%Multiplier
fsk_sig1(i,:)=c1.*m_s;
fsk_sig2(i,:)=c2.*invm_s;
fsk=fsk_sig1+fsk_sig2;
%plotting the message signal and the modulated signal
subplot(3,2,2);axis([0 N -2 2]);plot(t,message(i,:),'r');
title('message signal');xlabel('t --- >');ylabel('m(t)');grid on;hold on;
BFSK Receiver
The receiver consists of two correlators with common inputs which are supplied with locally
generated coherent reference signals c1(t) and c2 (t).
The correlator outputs are then subtracted one from the other, and the resulting difference x is
compared with a threshold of zero volts. If x >0, the receiver decides in favour of symbol 1 and if x <0,
the receiver decides in favour of symbol 0.
ALGORITHM
Initialization commands
FSK modulation
1. Generate two carriers signal.
2. Start FOR loop
3. Generate binary data, message signal and inverted message signal
4. Multiply carrier 1 with message signal and carrier 2 with inverted message signal
5. Perform addition to get the FSK modulated signal
6. Plot message signal and FSK modulated signal.
7. End FOR loop.
8. Plot the binary data and carriers.
FSK demodulation
1. Start FOR loop
2. Perform correlation of FSK modulated signal with carrier 1 and carrier 2 to get two decision
variables x1 and x2.
3. Make decisionon x = x1-x2 to get demodulated binary data. If x>0, choose ‘1’ else choose ‘0’.
4. Plot the demodulated binary data.
subplot(3,2,5);plot(t,fsk(i,:));
title('FSK signal');xlabel('t --- >');ylabel('s(t)');grid on;hold on;
t1=t1+(Tb+.01); t2=t2+(Tb+.01);
end
hold off
%Plotting binary data bits and carrier signal
subplot(3,2,1);stem(m);
title('binary data');xlabel('n --- >'); ylabel('b(n)');grid on;
subplot(3,2,3);plot(t,c1);
title('carrier signal-1');xlabel('t --- >');ylabel('c1(t)');grid on;
subplot(3,2,4);plot(t,c2);
title('carrier signal-2');xlabel('t --- >');ylabel('c2(t)');grid on;
% FSK Demodulation
t1=0;t2=Tb for
i=1:N
t=[t1:(Tb/100):t2]
%correlator
x1=sum(c1.*fsk_sig1(i,:));
x2=sum(c2.*fsk_sig2(i,:));
x=x1-x2;
%decision device
if x>0
demod(i)=1;
else
demod(i)=0; end
t1=t1+(Tb+.01);
t2=t2+(Tb+.01);
end
%Plotting the demodulated data bits
subplot(3,2,6);stem(demod);
title(' demodulated data');xlabel('n --- >');ylabel('b(n)'); grid on;
Result
Thus the program for FSK modulation and demodulation has been simulated in MATLABand necessary
graphs are plotted.
PROGRAM
% QPSK Modulation
clc;
clear all;
close all;
%GENERATE QUADRATURE CARRIER SIGNAL
Tb=1;t=0:(Tb/100):Tb;fc=1;
c1=sqrt(2/Tb)*cos(2*pi*fc*t);
c2=sqrt(2/Tb)*sin(2*pi*fc*t);
%generate message signal
N=8;m=rand(1,N);
t1=0;t2=Tb
for i=1:2:(N-1)
t=[t1:(Tb/100):t2]
if m(i)>0.5 m(i)=1;
m_s=ones(1,length(t));
else
m(i)=0;
m_s=-1*ones(1,length(t));
end
%odd bits modulated signal
odd_sig(i,:)=c1.*m_s;
if m(i+1)>0.5
m(i+1)=1;
m_s=ones(1,length(t));
else
m(i+1)=0;
m_s=-1*ones(1,length(t));
end
%even bits modulated signal
even_sig(i,:)=c2.*m_s;
%qpsk signal
qpsk=odd_sig+even_sig;
%Plot the QPSK modulated signal
subplot(3,2,4);plot(t,qpsk(i,:));
title('QPSK signal');xlabel('t ---->');ylabel('s(t)');grid on; hold on;
t1=t1+(Tb+.01); t2=t2+(Tb+.01);
end
hold off
%Plot the binary data bits and carrier signal
subplot(3,2,1);stem(m);
title('binary data bits');xlabel('n --- >');ylabel('b(n)');grid on;
subplot(3,2,2);plot(t,c1);
title('carrier signal-1');xlabel('t --- >');ylabel('c1(t)');grid on;
subplot(3,2,3);plot(t,c2);
title('carrier signal-2');xlabel('t --- >');ylabel('c2(t)');grid on;
Ex:No:11 Simulation of DPSK, QPSK and QAM Generation and Detection Schemes
DATE:
AIM
To generate and demodulate quadrature phase shifted (QPSK) signal using MATLAB
THEORY
QPSK is also known as quaternary PSK, quadriphase PSK, 4-PSK, or 4-QAM. It is a phase
modulation technique that transmits two bits in four modulation states.
Phase of the carrier takes on one of four equally spaced values such as p/4, 3p/4, 5p/4
and7p/4.
ALGORITHM
Initialization commands
QPSK modulation
Result
The program for QPSK modulation and demodulation has been simulated in MATLAB and
necessary graphs are plotted.
LINEAR BLOCK CODE
PROGRAM: 1
clc;
w=[1 1 1 1 1 1 1 0 1 0 0];
fprintf('The original code is:');
disp(w);
P=[1 1 0;0 1 1;0 0 1];
I=[1 0 0;0 1 0;0 0 1];
pt=P';
H=[pt,I];
ht=H';
disp('The value of ht matrix is');ht
for(i=1:3)
s1=0;
for(j=1:6)
s1=xor(s1,ht(j,i)*w(j));
end
s(i)=s1;
end
fprintf('The syndrome is:');
disp(s);
for(k=1:6)
if(s==ht(k,:))
temp=k;
end
end
fprintf('The error is in the position %d\n',temp);
w(temp)=xor(w(temp),1);
disp('corrected code is:');
disp(w);
1 1 0
0 1 1
0 0 1
1 0 0
0 1 0
0 0 1
AIM:
To generate various error control coding technique using MATLAB and to decode it.
APPARATUS REQUIRED:
1. Personal Computer
2. MATLAB software
THEORY:
Source coding is used to reduce all the redundant bits in the encoded data signal by applying the
information theory concepts. As a result, it is not possible to arrive at a system with low error rate.
So, we go for channel coding. It builds redundancies in the signal so that the error can be rectified.
Various channel codes are error control codes.
They must have
i) The capability to detect and correct errors.
ii) Work in a fast and efficient way.
Types of error control methods are
a) Error detection and retransmission (ARQ)
b) Error detection and correction (ECC)
Error – correction codes are divided as
a) Block codes and
b) Convolution codes.
Algorithm:
Data is given as input(m).
Generator matrix G=[ P IK] is generated by using parity (P) and identity matrix (IK).
Code word is generated using C=mG matrix operation. It is transmitted through channel.
The received vector has one error means it is detected using the syndrome(S)
S=rHT
H is the parity check matrix H=[ PT In-k ]
Syndrome matches with the row of H. So, the error present in which bit is detected.
Correcet code word C=r EX-OR e[error pattern]
PROGRAM: 2
clc;
clear;
w=[1 0 0 0 1 0];
fprintf('The original code is:');
disp(w);
P=[1 1 0;0 1 1 ;0 0 1];
I=[1 0 0 ;0 1 0 ;0 0 1 ];
pt=P';
H=[pt,I];
ht=H';
disp('The value of ht matrix is');ht
for(i=1:3)
s1=0;
for(j=1:6)
s1=xor(s1,ht(j,i).*w(j));
end
s(i)=s1;
end
fprintf('The syndrome is:');
disp(s);
for(k=1:6)
if(s==ht(k,:))
temp=k;
end
end
fprintf('The error is in the position %d\n',temp);
w(temp)=xor(w(temp),1);
disp('corrected code is:');
disp(w);
ht =
1 1 0
0 1 1
0 0 1
1 0 0
0 1 0
0 0 1
1 1 1
1 1 0
1 0 1
0 1 1
1 0 0
0 1 0
0 0 1
The syndrome is: 1 0 1
The error is in the position 3
corrected code is: 1 0 0 0 1 1 1
Result:
The Linear and cyclic coding scheme is simulated and the output is obtained.