CS-2 Lab Manual
CS-2 Lab Manual
CS-2 Lab Manual
Laboratory Manual
20EC3281 Communication Systems-2 Laboratory
Page 1 of 35
Communication Systems-2 Lab
List of Experiments
1. Modulation and Demodulation of Amplitude Shift Keying (ASK).
2. Modulation and Demodulation of Frequency Shift Keying (FSK).
3. Modulation and Demodulation of Phase Shift Keying (PSK).
4. Simulation of BER performance of ASK over AWGN channels.
5. Simulation of BER performance of FSK over AWGN channels.
6. Simulation of BER performance of PSK over AWGN channels.
7. Simulation of BER performance of Digital modulation schemes over Rayleigh fading.
8. Study and analysis of Digital Communication techniques in real time Telecommunication systems.
9. Term Project.
Page 2 of 35
Communication Systems-2 Lab
EXPERIMENT-1
Aim:
To generate and demodulate Amplitude Shift Keying signal and observe the waveforms.
Apparatus:
1. Transistor
2. Resistors
3. Capacitors
4. IC 741 op-amp
5. Potentiometer
6. Diode
7. Function generator
8. Digital Storage Oscilloscope
9. Probes
10. Bread Board
11. Connecting Wires
Definition: ASK is a type of modulation where the digital signal is represented as a change in amplitude. In order to
carry out amplitude shift keying, we require a carrier signal and a binary sequence signal. It is also known as On-Off
keying. This is because the carrier waves switch between 0 and 1 according to the high and low level of the input
signal.
Page 4 of 35
Communication Systems-2 Lab
Demodulation:
The modulated ASK signal is given to the half-wave rectifier, which delivers a positive half output. The
low pass filter suppresses the higher frequencies and gives an envelope detected output from which the
comparator delivers a digital output.
Circuit Diagram:
Demodulation:
1. Choose the resistors and capacitor as per the calculation for demodulation circuit. (1/fc<RC <1/fm)
2. Connect the circuit as shown in the figure 2.
3. Apply the ASK Modulated signal to the circuit.
4. Connect the channel probe 1 at the demodulated output (pin 6 of op amp) and channel 2 should show the
modulated output.
5. Rotate the potentiometer until message frequency is seen
6. Observe and plot the wave forms. (With Amplitude and frequency readings)
Page 5 of 35
Communication Systems-2 Lab
Precautions:
1. Equipment must be handled properly
2. Avoid the loose and wrong connections.
3. Check the connections before switching ON supply.
4. Do not disturb the circuit while doing the experiment.
5. Switch off the power supply after completing experiment.
Result:
Page 6 of 35
Communication Systems-2 Lab
EXPERIMENT - 2
Frequency Shift Keying Modulation and Demodulation
Aim:
To generate and demodulate Amplitude Shift Keying signal and observe the waveforms.
Apparatus:
1. Transistor
2. Resistors
3. Capacitors
4. IC 741 op-amp
5. Potentiometer
6. Diode
7. Function generator
8. Digital Storage Oscilloscope
9. Probes
10.Bread Board
11. Connecting Wires
Theory:
In digital data transmission, this corresponds to Frequency Shift Keying (FSK). FSK is a type of FM
where the modulating signal assumes discrete values and shifts the output frequency to a set of predetermined
discrete frequency values.
In FSK systems two sinusoidal carrier waves of same amplitude AC but different frequencies fC1 and fC2
are used to represent binary symbols 1 and 0 respectively. i.e., S (t) = Ac Cos (2 П fC1t) symbol 1 = Ac Cos (2 П
fC2t) symbol 2 The FSK is essentially a superposition of two ASK waveforms one with frequency f C1 and the other
with fC2. Hence the PSD of FSK is the sum of two ASKS specter at frequencies fC1 and fC2. The bandwidths of
FSK are higher than that of PSK and ASK. The application of FSK signals is in low-speed digital data
transmission.
Generation of FSK:
The FSK signal can be generated by applying the incoming binary data to a frequency modulator and to
other input a sinusoidal carrier wave of amplitude AC and frequency fC is applied. As the binary data changes
form one level to another (but non zero being pear) the output changes its frequencies is the corresponding
manner.
Detection of FSK:
FSK can be demodulated using synchronous or coherent detector. This type of detection or digital
communication reception is also known as correlation reception. The coherent detection requires phase and time
synchronization
Page 7 of 35
Communication Systems-2 Lab
Model Waveforms:
Page 8 of 35
Communication Systems-2 Lab
Procedure:
Modulation:
1. Connect the circuit as shown in the figure 1.
2. Set the Function generators for the required Data signal and Carrier signal.
3. Note down the frequency and amplitude of the Data and Carrier signal. Apply the signal to the circuit.
4. Connect the DSO channel 1 probe at the data signal and channel2 at the output of the circuit to observe the
wave forms.
5. Plot the wave forms. (With Amplitude and frequency readings)
Demodulation:
1. Choose the resistors and capacitor as per the calculation for demodulation circuit. (1/fc< RC <1/fm)
2. Connect the circuit as shown in the figure 2.
3. Apply the FSK Modulated signal to the circuit.
4. Connect the channel probe 1 at the demodulated output (pin 6 of op amp) and channel 2 should show the
modulated output.
5. Rotate the potentiometer until message frequency is seen.
6. Observe and plot the wave forms. (With Amplitude and frequency readings)
Precautions:
1. Equipment must be handled properly
2. Avoid the loose and wrong connections.
3. Check the connections before switching ON supply.
4. Do not disturb the circuit while doing the experiment.
5. Switch off the power supply after completing experiment.
Result:
Page 9 of 35
Communication Systems-2 Lab
EXPERIMENT-3
Apparatus:
1. Transistor
2. Resistors
3. Capacitors
4. IC 741 op-amp
5. Potentiometer
6. Diode
7. Function generator
8. Digital Storage Oscilloscope
9. Probes
10.Bread Board
11. Connecting Wires.
Theory:
Definition: Phase Shift Keying is a type of digital modulation technique we transmit the data by modulating the
phase of the carrier signal. The modulation is carried out by changing the inputs at regular intervals of time. Here
we use finite phases and each of these phases can be represented by a unique pattern of bits. The number of bits
used is the same in each case. A demodulator is used to determine the phase of the signal and recover the original
data from it. Such a system is referred to as a coherent system.
We can represent the PSK method by using the constellations diagram. Uniform phase separation is offered
among nearby points and therefore it is the best protection to corruption.
Page 10 of 35
Communication Systems-2 Lab
QPSK uses quadrants or four different spaces. In this technique, different constellation points are used for
noise reduction. The constellation points also reduce the chances of error. In this kind of PSK, four different
phases are used which are 0, 90, 180 and 270 degrees. Two bits are used to represent the four different phases.
Circuit Diagram:
Demodulation:
1 For Synchronous detection, connect the carrier signal and modulated signal (PSK) to the OP-AMP (add/sub).
Observe the output (ask signal).
2. Choose the resistors and capacitor as per the calculation for demodulation circuit. (1/fc<RC <1/fm)
3. Connect the circuit as shown in the figure 2.
4. Apply the PSK Modulated signal to the circuit.
5. Connect the channel probe 1 at the demodulated output (pin 6 of op amp) and channel 2 should show the
modulated output.
6. Rotate the potentiometer until message frequency is seen.
7. Observe and plot the waveforms. (With Amplitude and frequency readings)
Precautions:
1. Equipment must be handled properly
2. Avoid the loose and wrong connections.
3. Check the connections before switching ON supply.
4. Do not disturb the circuit while doing the experiment.
5. Switch off the power supply after completing experiment.
Result:
Page 12 of 35
Communication Systems-2 Lab
EXPERIMENT-4
Apparatus
Name of the Software Specifications/Range Quantity
MATLAB, Computer installed 2018a 01
with Windows XP or higher
Version.
PREPARATION (PRE-LAB)
1. Given a bandwidth of 5000 Hz for an ASK signal, what are the baud rate and bit rate?
2. Find the minimum bandwidth for an ASK signal transmitting at 2000bps.
THEORY:
Amplitude Shift Keying (ASK) is a digital modulation scheme where the binary data is transmitted using a
carrier signal with two different amplitude levels. For binary 0 and 1, the carrier switches between these two
levels. In its simplest form, a carrier is sent during one input and no carrier is sent during the other. This kind of
modulation scheme is called on-off keying. Asimple ASK modulator circuit is shown in figure. Here a sinusoidal
high frequency carrier signal is sent for logic ‘0’ (-5V) and no carrier is sent for logic ‘1’ (+5V). The transistor
works as a switch closes when the input (base) voltage is +5V (logic ‘1’) and shorts the output. When the input
voltage is -5V (logic ‘0’), the switch opens and the carrier signal is directly connected to the output.
ASK is a form of modulation that represents digital data as variations in the amplitude of a carrier wave.
The amplitude of an analog carrier signal varies in accordance with the bit stream (modulating signal), keeping
frequency and phase constant.
On-off keying (OOK) the simplest form of amplitude-shift keying (ASK) modulation that represents
digital data as the presence or absence of a carrier wave. In its simplest form, the presence of a carrier for a
specific duration represents a binary one, while its absence for the same duration represents a binary zero.
In a ASK system, the pair of signal S1(t) used to represent binary symbols 1 & 0 are defined by
𝑆 (𝑡) = 2𝐸𝑏/𝑇𝑏 𝐶𝑜𝑠 2𝜋𝑓𝑐𝑡
0 where 0 ≤ t < Tb and
Eb = Transmitted signed energy for bit
The carrier frequency fc =n/Tb for some fixed integer n.
The input binary symbols are represented in polar form with symbols 1 & 0 represented by constant
amplitude levels 𝐸 & − 𝐸 . This binary wave is multiplied by a sinusoidal carrier in a product modulator. The
result is a ASK signal.
ASK Receiver:
ALGORITHM
ASK Modulation
1. Generate the carrier signal (Ø1 (t) = √2/Tb cos 2πfct )
2. Generate the base band data signal.
3. Multiply the polar form data signal and carrier signal. The resultant signal is a PSK signal.
4. Plot the carrier, data and PSK signal.
ASK Demodulation
1. Multiply the received PSK signal with the carrier signal (Ø1 (t) = √2/Tb cos 2πfct )
2. Integrate the resultant signal(x1) .
3. If x1 is greater than zero then choose 1 and if it is less than 0 choose 0.
4. Plot the demodulated signal.
TEST PROCEDURE
1. Open the MATLAB® software by double clicking its icon.
2. MATLAB® logo will appear and after few moments Command Prompt will appear.
3. Go to the File Menu and select a New M- file. (File NewM-file) or in the left hand corner a blank
white paper icon will be there. Click it once.
4. A blank M- file will appear with a title ‘untitled’
5. Now start typing your program. After completing, save the M- file with appropriate name.
To execute the program Press F5 or go to Debug Menu and select Run.
6. After execution output will appear in the Command window .If there is an error then with an
alarm, type of error will appear in red color.
7. Rectify the error if any and go to Debug Menu and select Run.
Page 14 of 35
Communication Systems-2 Lab
MATLAB Code:
BER_ASK
%BER_ASK
clc;
clear all;
close all;
num_bit=100;
data=randi (1, num_bit);
SNRdb=0:10;
SNR=10. ^(SNRdb/10);
For (k=1: length (SNRdb))
Y=awgn(complex(data), SNRdb(k));
error=0;
R=0;
M= [];
for(c=1:1:num_bit)
if(Y(c)>.5&&data(c)==0) ||(Y(c)<.5&&data(c)==1)
error =error+1;
M= [M ~ data(c)];
else
M= [M data(c)];
end
end
error=error/num_bit;
m(k)=error;
end
semilogy (SNRdb, m,'o','linewidth',2.5);
grid on;
hold on;
BER_th= (1/2) *erfc (.5*sqrt (SNR));
semilogy (SNRdb, BER_th,'r','linewidth',2.5);
grid on;
hold on;
title ('Curve for bit error rate versus SNR for binary ASK modulation');
xlabel ('SNR (db)')
ylabel ('BER');
legend('Simulation','thoeritical');
axis ([0 10 10^-5 1]);
Page 15 of 35
Communication Systems-2 Lab
Plots
RESULT
Page 16 of 35
Communication Systems-2 Lab
EXPERIMENT - 5
AIM:
To write and simulate program of FSK in MATLAB software and observe the curves of BER versus
SNR values with AWGN channel.
APPARATUS REQUIRED:
Name of the Software Specifications/Range Quantity
MATLAB, Computer installed with 2018a 01
Windows XP or higher Version.
PREPARATION (PRE-LAB)
1. Define modulation index.
2. Write a matlab program for generating PN sequence.
3. What is MSK and mention its significance.
4. Differentiate coherent and non-coherent FSK.
5. Give the expression for bandwidth of FSK scheme.
THEORY:
Frequency Shift Keying (FSK) is a digital modulation scheme where the digital data is transmitted using
a high frequency carrier signal. For logic ‘0’ and ‘1’ the carrier signal switches between two preset frequencies,
hence the name FSK.
Binary Phase Shift Keying (BPSK) is digital transmission scheme where the binary data is transmitted
using out of phase signals. During logic ‘0’ a preset number of cycles of a sinusoidal carrier signal is
transmitted and during logic ‘1’ the same number of cycles of the carrier signal is transmitted but with 180o
phase shift.
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.
Page 17 of 35
Communication Systems-2 Lab
The i/p binary sequence is represented in its on-off form, with symbol 1 represented by constant
amplitude of √Eb with & symbol 0 represented by zero volts. By using inverter in the lower channel,
we in effect make sure that when symbol 1is at the i/p, 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.
The receiver consists of two correlators with common inputs which are supplied with locally generated
coherent reference signals Ø1(t) and Ø2 (t).
The correlator outputs are then subtracted one from the other, and the resulting difference L is compared
with a threshold of zero volts. If L >0, the receiver decides in favour of symbol 1 and if L <0, the receiver
decides in favour of symbol 0.
ALGORITHM
BFSK Modulation
1. Generate two carrier signals (Ø1 (t) = √2/Tb cos 2πƒ1t and Ø2 (t) = √2/Tb cos2πƒ2 t)
2. Generate the base band data signal .
3. Convert the base band signal into on-off form.(i.e m(t))
4. Multiply the on-off form data signal m(t) and carrier signal 1 in one channel .
5. Invert the signal m(t) to get m1 (t)
6. Multiply the on-off form data signal m1 (t)and carrier signal 2in another channel
Page 18 of 35
Communication Systems-2 Lab
BFSK Demodulation
1. Multiply the received FSK signal with the carrier signal Ø1 (t) = √2/Tb cos 2πƒ1t in one channel and integrate
the resultant signal(x1)
2. Multiply the received FSK signal with the carrier signal Ø2 (t) = √2/Tb cos 2πƒ 2t in another channel and
integrate the resultant signal(x2)
3. Find x=x1-x2.
4. If x is greater than zero then choose 1 and if it is less than 0 choose 0 .
5. Plot the demodulated signal.
TEST PROCEDURE
1. Open the MATLAB® software by double clicking its icon.
2. MATLAB® logo will appear and after few moments Command Prompt will appear.
3. Go to the File Menu and select a New M- file. (File NewM-file) or in the left hand corner a blank white paper
icon will be there. Click it once.
4. A blank M- file will appear with a title ‘untitled’
5. Now start typing your program. After completing, save the M- file with appropriate name. To execute the
program Press F5 or go to Debug Menu and select Run.
6. After execution output will appear in the Command window .If there is an error then with an alarm, type of
error will appear in red color.
7. Rectify the error if any and go to Debug Menu and select Run.
BER_ FSK
% BER_ FSK
BER_ FSK
clear
N = 10^5 % number of bits or symbols
T = 8; % symbol duration
t = [0:1/T:0.99]; % sampling instants
tR = kron(ones(1,N),t); % repeating the sampling instants
for ii = 1:length(Eb_N0_dB)
% generating the bits
ip = rand(1,N)>0.5; % generating 0,1 with equal probability
freqM = ip+1;
% converting the bits into frequency, bit0 -> frequency of 1, bit1 -> frequency of 2
freqR = kron(freqM,ones(1,T)); % repeating
x = (sqrt(2)/sqrt(T))*cos(2*pi*freqR.*tR); %generating the FSK modulated signal
% noise
Page 19 of 35
Communication Systems-2 Lab
% coherent receiver
y = x + 10^(-Eb_N0_dB(ii)/20)*n; % additive white gaussian noise
op1 = conv(y, sqrt(2/T)*cos(2*pi*1*t)); % correlating with frequency 1
op2 = conv(y, sqrt(2/T)*cos(2*pi*2*t)); % correlating with frequency 2
% demodulation
ipHat = [real(op1(T+1:T:end)) < real(op2(T+1:T:end))]; %
nErr(ii) = size(find([ip - ipHat]),2); % counting the number of errors
end
simBer = nErr/N;
theoryBer = 0.5*erfc(sqrt((10.^(Eb_N0_dB/10))/2)); %theoretical BER
close all
figure
semilogy(Eb_N0_dB,theoryBer,'b-');
hold on
semilogy(Eb_N0_dB,simBer,'mx-');
axis([0 11 10^-4 0.5])
grid on
legend('theory:fsk-coh', 'sim:fsk-coh');
xlabel('Eb/No, dB')
ylabel('Bit Error Rate')
title('Bit error probability curve')
Plots
RESULT
Page 20 of 35
Communication Systems-2 Lab
EXPERIMENT-6
Aim:
To write and simulate program of PSK in MATLAB software and observe the curves of BER versus SNR
values with AWGN channel.
APPARATUS :
Name of the Software Specifications/Range Quantity
MATLAB, Computer installed 2018a 01
with Windows XP or higher
Version.
THEORY:
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/τb 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.
ALGORITHM
BPSK Modulation
1. Generate the carrier signal (Ø1 (t) = √2/Tb cos 2πfct )
2. Generate the base band data signal.
3. Convert the base band signal into polar form.
4. Multiply the polar form data signal and carrier signal. The resultant signal is a PSK signal.
5. Plot the carrier, data and PSK signal.
BPSK Demodulation
1. Multiply the received PSK signal with the carrier signal (Ø1 (t) = √2/Tb cos 2πfct )
2. Integrate the resultant signal(x1).
3. If x1 is greater than zero then choose 1 and if it is less than 0 choose 0.
4. Plot the demodulated signal.
Page 21 of 35
Communication Systems-2 Lab
TEST PROCEDURE
1. Open the MATLAB® software by double clicking its icon.
2. MATLAB® logo will appear and after few moments Command Prompt will appear.
3. Go to the File Menu and select a New M- file. (File NewM-file) or in the left hand corner a blank white paper
icon will be there. Click it once.
4. A blank M- file will appear with a title ‘untitled’
5. Now start typing your program. After completing, save the M- file with appropriate name. To execute the
program Press F5 or go to Debug Menu and select Run.
6. After execution output will appear in the Command window .If there is an error then with an alarm, type of
error will appear in red color.
7. Rectify the error if any and go to Debug Menu and select Run.
MATLAB Code:
BER_ PSK
% BER_ PSK
clear
N = 10^6 % number of bits or symbols
rand('state',100); % initializing the rand() function
randn('state',200); % initializing the randn() function
% Transmitter
ip = rand(1,N)>0.5; % generating 0,1 with equal probability
s = 2*ip-1; % BPSK modulation 0 -> -1; 1 -> 1
n = 1/sqrt(2)*[randn(1,N) + j*randn(1,N)]; % white gaussian noise, 0dB variance
Eb_N0_dB = [-3:10]; % multiple Eb/N0 values
for ii = 1:length(Eb_N0_dB)
% Noise addition
y = s + 10^(-Eb_N0_dB(ii)/20)*n; % additive white gaussian noise
% plot
close all
figure
semilogy(Eb_N0_dB,theoryBer,'b.-');
hold on
semilogy(Eb_N0_dB,simBer,'mx-');
axis([-3 10 10^-5 0.5])
grid on
Page 22 of 35
Communication Systems-2 Lab
legend('theory', 'simulation');
xlabel('Eb/No, dB');
ylabel('Bit Error Rate');
title('Bit error probability curve for BPSK modulation');
Plots
RESULT
Page 23 of 35
Communication Systems-2 Lab
EXPERIMENT-7
APPARATUS :
Name of the Software Specifications/Range Quantity
MATLAB, Computer installed 2018a 01
with Windows XP or higher
Version.
THEORY:
Fading:
In wireless communications, fading is considered as the deflection or attenuation induced by a
propagation media. Fading may vary with time, geographical position and radio frequencies. Fading may either be
due to multipath propagation, referred to as multipath induced fading, or due to shadowing from obstacles
affecting the wave propagation, sometimes referred to as shadow fading. In this paper, we are interested in two
types of fading due to multipath:
- Rayleigh Fading,
- Rician Fading.
Rayleigh Fading
In urban crossing buildings, vehicles and other objects, the transmitted, Tx, signals arrive at the receiver,
Rx, on different paths as presented in Fig.1. A Rayleigh channel is considered when there are different signal
paths between the transmitter and receiver, none of which dominates. This means that all the paths can vary and
affect the overall signal at the receiver.
𝒀 =𝒉∗𝑿+𝑽
Where X is BPSK signal and V is Gaussian noise N(, 2)
TESTPROCEDURE
1. Open the MATLAB® software by double clicking its icon.
2. MATLAB® logo will appear and after few moments Command Prompt will appear.
3. Go to the File Menu and select a New M- file. (File NewM-file) or in the left hand corner a blank white paper
icon will be there. Click it once.
4. A blank M- file will appear with a title ‘untitled’
5. Now start typing your program. After completing, save the M- file with appropriate name. To execute the
program Press F5 or go to Debug Menu and select Run.
6. After execution output will appear in the Command window .If there is an error then with an alarm, type of
error will appear in red color.
7. Rectify the error if any and go to Debug Menu and select Run.
MATLAB Code:
% Transmitter
ip = rand(1,N)>0.5; % generating 0,1 with equal probability
s = 2*ip-1; % BPSK modulation 0 -> -1; 1 -> 0
Eb_N0_dB = [-3:35]; % multiple Eb/N0 values
for ii = 1:length(Eb_N0_dB)
n = 1/sqrt(2)*[randn(1,N) + j*randn(1,N)]; % white gaussian noise, 0dB variance
h = 1/sqrt(2)*[randn(1,N) + j*randn(1,N)]; % Rayleigh channel
% equalization
yHat = y./h;
end
% plot
close all
figure
semilogy(Eb_N0_dB,theoryBerAWGN,'cd-','LineWidth',2);
hold on
semilogy(Eb_N0_dB,theoryBer,'bp-','LineWidth',2);
semilogy(Eb_N0_dB,simBer,'mx-','LineWidth',2);
axis([-3 35 10^-5 0.5])
grid on
legend('AWGN-Theory','Rayleigh-Theory', 'Rayleigh-Simulation');
xlabel('Eb/No, dB');
ylabel('Bit Error Rate');
title('BER for BPSK modulation in Rayleigh channel');
Plots
RESULT
Page 26 of 35
Communication Systems-2 Lab
EXPERIMENT-8
THEORY:
Fundamental to entire communication process is modulation; it is defined as the process of varying one or
more properties of a periodic waveform, with a baseband signal that typically contains information to be
transmitted. The main goal of modulation is to compress as much data into the least amount of spectrum
possible. This is known as spectral efficiency, measures how quickly data can be transmitted in an assigned
bandwidth. The unit is bit per second per Hz ((bit/s)/Hz). Multiple techniques have developed to achieve and
improve spectral efficiency. Nowadays most of wireless transmissions are digital, and with the limited spectrum
available.
In a digital communication system, the source to be transmitted is discrete both in time and amplitude. In
this system, the modulating signal may be represented as a time sequence of symbols or pulses, where each
symbol has ‘m’ finite states. Each symbol represents ‘n’ bits of information where n = log2m bits/symbol. The
major advantage of using digital modulation technique is that the use of digital signals minimize hardware,
provides greater noise exemption, easier multiplexing of various forms of information like voice, data and video.
LabVIEW (Laboratory Virtual Instrumentation Engineering Workbench) developed by National
Instruments (NI), is a data acquisition, instrumentation and control programming tool widely used in industry. It
is a graphical programming environment with many software features and hardware options is the main
reason for its increasing popularity. It can be used to communicate with hardware such as DAQ, Vision, and
motion control devices [2]. The basic forms of digital modulation techniques are Amplitude Shift Keying
(ASK), Frequency Shift Keying (FSK) and Phase Shift Keying (PSK). In this work basic digital modulations are
carried out using LabVIEW[3].
The paper [2] had demonstrated through some experimental outcome of the concepts, in the course on digital
communication using the ability of the LabVIEW programming environment. The graphical programming
environment is easy to learn and simple to transform an equation or concept to a working program. This work
failed to demonstrate digital detection technique using the LabVIEW software. The proposed work deals with
the identification of demodulation output and error is also calculated.
SOFTWARE DESCRIPTION
LabVIEW provides a single graphical design tool for algorithm development, embedded system design,
prototyping and interfacing with real-world hardware. Additional modules have been designed to expand the real
time operating system, DSP and FPGA programming. National Instruments is increasingly focusing on the
capability of deploying LabVIEW code onto an increasing number of targets including devices like Phar Lap or
Vx Works OS based LabVIEW Real-Time Controllers, FPGAs Pocket PCs and PDAs.
The LabVIEW graphical programming environment with the included examples and documentation, makes it
simple to create small applications. The practical benefit of the graphical approach is that it puts more focus on
data and the operations being performed on that data, and abstracts much of the administrative complexity of
computer programming such as memory allocation and language syntax. G Programming language is a Intuitive
and flowchart-like dataflow programming model.
Shorter learning curve than traditional text-basedprogramming.
Naturally represents data-driven applications withtiming and parallelism.
Page 27 of 35
Communication Systems-2 Lab
LabVIEW contains a powerful optimizing compiler that examines the block diagram and directly generates
efficient machine code, avoiding the performance penalty associated with interpreted or cross-compiled
languages. From a technical standpoint, G(Graphical) is a graphical dataflow language in which nodes
(operations or functions) operate on data as soon as it becomes available, rather than in the sequential line-by-
line manner that most programming languages employ. Fig. 1 shows the LabVIEW front panel with associated
block diagram.
SYSTEM IMPLEMENTATION
This section describes method of implementation in LabVIEW. There are many types of digital modulation
techniques and also their combinations depending upon the need. This work involves discussion about the
prominent ones such as OOK, FSK and PSK. In PSK different deviations are implemented such as BPSK, DPSK
and QPSK.
The basic modulations taken for explanation is On-Off keying, Frequency shift keying and Binary shift keying.
On- Off keying is a simplest form of ASK, where the carrier is selected based on the digital signal input. Here
the amplitude of carrier is varied according to digital input. If binary input is ‘1’ then the carrier signal of 2V is
selected. If the binary data is ‘0’ then output will be 0V [as explained in equation (1)]. OOK is most frequently
used to send Morse code over RF channel. It as high spectral efficiency than FSK but more susceptible to noise.
Fig.4 shows the flow diagram implementation in LabVIEW software. Identifying the data as ‘1’ or ‘0’ and
selecting the required carrier is achieved with ‘select’ function from block diagram pallet. It is available in
‘Express’ sub-palette. It returns the value wired to the ‘t’ input or ‘f’ input, depending on the value of ‘s’. If ‘s’ is
TRUE, this function returns the value wired to ‘t’. If ‘s’ is FALSE, this function returns the value wired to ‘f’.
The connector pane displays the default data types for this polymorphic function (shown in Fig.3).
Implementation of OOK in LabVIEW is explained in Fig.4. To recover original binary data in LABVIEW is
explained in Fig.5.
Page 28 of 35
Communication Systems-2 Lab
……(1)
….. (2)
Page 29 of 35
Communication Systems-2 Lab
……(3)
Differential PSK can afford the extended data rate of 2 Mbit/symbol. Modulation scheme is realized for encoded
Page 30 of 35
Communication Systems-2 Lab
data not for direct input data so it improves the security. DPSK is simple to implement than ordinary PSK, since there
is no need for the demodulator to have a copy of the reference signal to determine the exact phase of the received
signal (it is a non- coherent scheme).
Quadrature Phase-Shift Keying (QPSK) is a very important and special digital modulation because it actually
transmits two bits per symbol. In other prospective, QPSK symbols represents 00, 01, 10 or 11. Henceforth in
QPSK, the carrier wave diverges in four possible phase shifts [4]. Those are mapped to 450, 1350, 2250 and 3150
states respectively (shown in Fig.10). Fig.11 shows the constellation diagram for QPSK modulation. With four
phases, QPSK can encode two bits per symbol to minimize the BER (bit error rate).
Page 31 of 35
Communication Systems-2 Lab
Fig.12: Block diagram and Square wave ON-Off Keying/ASK, Filter, and Error measurement output
waveform in LabVIEW
Fig.13 illustrates the binary input/symbol for demonstrating same ON-OFF Keying modulation and
Page 32 of 35
Communication Systems-2 Lab
demodulation. Waveform charts and binary array are shown infront panel of LabVIEW.
Fig.13: Block diagram and Binary input ON-OFF Keying/ASK, Filter, demodulated output waveform in
LabVIEW
Fig.14 Shows the Front panel and Block diagram of FSK modulation and demodulation using LabVIEW. The
main logic of obtaining ASK from FSK because it helps to retain the same demodulation technique. The
obtained ASK should be of high frequency carrier signal. To obtain the desired ASK=FSK-ASK (of Low
frequency Carrier signal). Fig.13 shows the front panel and block diagram BPSK modulation and
demodulation techniques. Same methods of FSK demodulation is followed to obtain BPSK demodulated
signal.
Fig.14: Block Diagram and Binary input FSK, Filter, Demodulated output waveform in LabVIEW
Page 33 of 35
Communication Systems-2 Lab
Fig.15 shows the program in block diagram for BPSK implementation in LabVIEW. Only two phase shifts are
observed and clearly shown in front panel waveform window.
Fig.15: Block Diagram and Binary input BPSK, Filter, Demodulated output waveform in LabVIEW
Fig.16 shows the detailed implementation of DPSK modulation. The binary data is encoded using Exclusive-
Exclusive
OR gate. For the encoded data modulation is performed. The demodulation is implemented in simple possible
steps.
Page 34 of 35
Communication Systems-2 Lab
Page 35 of 35