Modified DC
Modified DC
BECL504
V SEMESTER
2022 scheme
DEPARTMENT OF ELECTONICS
AND COMMUNICATION
ENGINEERING
Dr. Latha
Rajagoplan Head of
Department
2. Problem analysis: Identify, formulate, review research literature, and analyze complex
engineering problems reaching substantiated conclusions using first principles of
mathematics, natural sciences, and engineering sciences.
5. Modern tool usage: Create, select, and apply appropriate techniques, resources, and
modern engineering and IT tools including prediction and modeling to complex
engineering activities with an understanding of the limitations.
6. The engineer and society: Apply reasoning informed by the contextual knowledge to
assess societal, health, safety, legal and cultural issues and the consequent responsibilities
relevant to the professional engineering practice.
8. Ethics: Apply ethical principles and commit to professional ethics and responsibilities
and norms of the engineering practice.
11. Project management and finance: Demonstrate knowledge and understanding of the
engineering and management principles and apply these to one’s own work, as a member
and leader in a team, to manage projects and in multidisciplinary environments.
12. Life-long learning: Recognize the need for, and have the preparation and ability to
engage in independent and life-long learning in the broadest context of technological
change.
V Semester
Digital Communication Lab Semester 5
Course Code BECL504 CIE Marks 50
Teaching Hours/Week (L:T:P: S) 0:0:2:0 SEE Marks 50
Credits 01 Total SEE+CIE 100
Exam Hours 2 Hours
Examination type (SEE) Practical
Course objectives:
This laboratory course enables students to
Design of basic digital modulation techniques using electronic hardware.
Simulation of vector computations and derive the orthonormal basis set using Gram
Schmidt procedure.
Simulate the digital transmission and reception in AWGN channel
Simulate the digital modulations using software and display the signals and its vector
representations.
Implement the source coding algorithms using a suitable software platform.
Simulate the channel coding techniques and perform decoding for error detection and
correction.
Sl. Experiment
N s
O
Hardware Experiments
1
Generation and demodulation of the Amplitude Shift Keying signal.
2
Generation and demodulation of the Phase Shift Keying signal.
3
Generation and demodulation of the Frequency Shift Keying signal.
4
Generation of DPSK signal and detection of data using DPSK transmitter and receiver.
Simulation Experiments (Use MUKU:GO / MATLAB / Scilab /LabVIEW or any other suitable
software)
5 Gram-Schmidt Orthogonalization: To find orthogonal basis vectors for the given set of
vectors and plot the orthonormal vectors.
6 Simulation of binary baseband signals using a rectangular pulse and estimate the BER for
AWGN channel
using matched filter receiver.
7 Perform the QPSK Modulation and demodulation. Display the signal and its constellation.
8 Generate 16-QAM Modulation and obtain the QAM constellation.
11 For a given data, use CRC-CCITT polynomial to obtain the CRC code. Verify for the cases, a)
Without error
b) With error
12 Encoding and Decoding of Convolution code
Assessment Details (both CIE and SEE)
The weightage of Continuous Internal Evaluation (CIE) is 50% and for Semester
End Exam (SEE) is 50%. The minimum passing mark for the CIE is 40% of the
maximum marks (20 marks). A student shall be deemed to have satisfied the
academic requirements and earned the credits allotted to each course. The student
has to secure not less than 35% (18 Marks out of 50) in the semester-end
examination (SEE).
Continuous Internal Evaluation (CIE):
CIE marks for the practical course is 50 Marks.
The split-up of CIE marks for record/ journal and test are in the ratio 60:40.
Each experiment to be evaluated for conduction with observation sheet and
record write- up. Rubrics for the evaluation of the journal/write-up for
hardware/software experiments designed by the faculty who is handling the
laboratory session and is made known to students at the beginning of the
practical session.
Record should contain all the specified experiments in the syllabus and each
experiment write-up will be evaluated for 10 marks.
Total marks scored by the students are scaled downed to 30 marks (60% of
maximum marks).
Weightage to be given for neatness and submission of record/write-up on time.
Department shall conduct 02 tests for 100 marks, the first test shall be
conducted after the 8th week of the semester and the second test shall be
conducted after the 14th week of the semester.
In each test, test write-up, conduction of experiment, acceptable result, and
procedural knowledge will carry a weightage of 60% and the rest 40% for
viva-voce.
The suitable rubrics can be designed to evaluate each student’s performance
and learning ability. Rubrics suggested in Annexure-II of Regulation book
The average of 02 tests is scaled down to 20 marks (40% of the maximum marks).
The Sum of scaled-down marks scored in the report write-up/journal and average
marks of two tests is the total CIE marks scored by the student.
Semester End Evaluation (SEE):
SEE marks for the practical course is 50 Marks.
SEE shall be conducted jointly by the two examiners of the same institute,
examiners are appointed by the University
All laboratory experiments are to be included for practical examination. (Rubrics)
Breakup of marks and the instructions printed on the cover page of the answer
script to be strictly adhered to by the examiners. OR based on the course
requirement evaluation rubrics shall be decided jointly by examiners. Students can
pick one question (experiment) from the questions lot prepared by the internal
/external examiners jointly.
Evaluation of test write-up/ conduction procedure and result/viva will be
conducted jointly by examiners.
General rubrics suggested for SEE are mentioned here, writeup-20%, Conduction
procedure and result in -60%, Viva-voce 20% of maximum marks. SEE for
practical shall be evaluated for 100 marks and scored marks shall be scaled down
to 50 marks (however, based on course type, rubrics shall be decided by the
examiners).Change of experiment is allowed only once and 15% Marks allotted to
the procedure part to be made zero.
Digital Communication Lab BECL504
EXPERIMENT - 2
PHASE SHIFT KEYING GENERATION AND DETECTION
AIM: To study Phase Shift Keying generation and detection.
COMPONENTS REQUIRED: Transistor SL100, resistor, capacitor, OP Amp µA 741, signal
generator, diode.
THEORY: Phase shift keying is the digital modulation technique in which the phase of the
carrier signal is changed by varying the sine and cosine inputs at a particular time. PSK
technique is widely used for wireless LANs, bio-metric, contactless operations, along with
RFID and Bluetooth communications. PSK uses a finite number of phases, each assigned a
unique pattern of binary digits.
CIRCUIT DIAGRAM:
PSK MODULATOR:
PSK DEMODULATOR:
PROCEDURE:
WAVEFORMS:
RESULT:
EXPERIMENT - 3
FREQUENCY SHIFT KEYING GENERATION AND DETECTION
APPARATUS: Transistor SL100 and SK100, resistors, capacitors, op amp μA 741, 0A79
diode, Power supply, CRO.
CIRCUIT DIAGRAM:
FSK MODULATOR:
VRE = 2.5V
FSK DEMODULATOR:
C= 0.1µF
R = 15.9KΩ
fm = 100Hz
fc1 = 1 / 2 R1C1
fc1=1 kHz
R1 = 1.59
KΩ C1=
0.1µF
PROCEDURE:
Modulation:
Demodulation:
t
t
Modulated waveform
Demodulated waveform
RESULT:
EXPERIMENT - 4
DPSK GENERATION AND DETECTION
AIM: To conduct an experiment to generate DPSK signal and also design a circuit to
demodulate it.
.
CIRCUIT DIAGRAM:
PROCEDURE:
1. Refer the block diagram and carry out the following connections and switch settings.
2. Connect the power supply in proper polarity to the bit ADCL-0 I and switch to UN.
3. Select data pattern of simulated data using switch 1.
4. Connect SDAT A generator to DATA JN of differential encoder.
5. Connect NRZ-L data output to DATA JN of differential encoder.
6. Connect the north generator to S-CLK to CLK IN of the differential encoder.
7. Connect differentially encoded data to control input C 1 at carrier modulator.
12. Connect output of delay section. B(t-Tb) out of the input b(t-Tb) In of decision device.
13. Compare the DPSK decoded data at data out with respect to Input SDA TA
14. Input NRZ-L data in differential encoder.
15. Connect carrier components SIN 1 to IN 1 of carrier modulator.
16. Connect carrier components SIN2 to IN2 of carrier modulator.
17. Connect DPSK modulated signal MO DO UT to MODIN of BPSK demodulator.
18. Connect output of BPSK demodulator b(t) out to input of delay section b(t) and
input b(t)IN of decision device.
WAVEFORM:
RESULT:
EXPERIMENT - 5
Huffman Coding and Decoding
AIM: Write a program to encode binary data using Huffman code and decode it.
SOFTWARE: MATLAB
THEORY: Huffman Coding is a technique of compressing data to reduce its size without
losing any of the details. It was first developed by David Huffman.
Huffman Coding is generally useful to compress the data in which there are frequently
occurring characters. Huffman coding is widely used in applications where compression is
essential, such as file compression algorithms (e.g., ZIP) and image compression (e.g., JPEG).
1 Frequency Analysis
Huffman coding starts with a frequency analysis of the input data. The frequency of each
symbol (character or group of characters) in the input is determined. This step helps identify the
most common symbols, which will be assigned shorter codes.
2 Building the Huffman Tree
Once the frequencies are determined, a binary tree called the Huffman tree is constructed. The
tree is built in such a way that the more frequent symbols have shorter binary codes. The
process involves iteratively combining the two least frequent symbols into a new node until
only one node remains—the root of the Huffman tree.
3 Assigning Binary Codes
After constructing the Huffman tree, binary codes are assigned to each symbol based on their
position in the tree. Traversing left or right in the tree corresponds to appending '0' or '1' to the
code, respectively. The result is a set of variable-length codes for each symbol.
Program:
symbols:'); N=1:x;
N:'); disp(N);
disp (P);
[dict, avglen]=huffmandict(N,S);
disp (avglen);
H=0;
for i=1:x
end
disp('Entropy is:');
disp (H);
disp('bits/msg');
E=(H/avglen) *100;
disp('Efficiency is:')
disp(E);
codeword=huffmanenco(N,dict);
disp(codeword);
decode=huffmandeco(codeword,dict);
disp(decode);
12345
2.2000
Entropy is:
2.1219 bits/msg
Efficiency is:
96.4513
Columns 1 through 14
1 000 0 1 0 0 1 1 0 0 10
EXPERIMENT - 6
Hamming Coding and Decoding
AIM: Write a program to encode binary data using Huffman code and decode it.
SOFTWARE: MATLAB
The Hamming Code method is one of the most effective ways to detect single-data bit errors in
the original data at the receiver end. It is not only used for error detection but is also for
correcting errors in the data bit.
Redundancy: Hamming code uses redundant bits to add additional information to the data
being transmitted. This redundancy allows the recipient to detect and correct errors that may
have occurred during transmission.
Efficiency: Hamming code is a relatively simple and efficient error-correction technique that
does not require a lot of computational resources. This makes it ideal for use in low-power and
low-bandwidth communication networks.
Single Error Correction: Hamming code is capable of correcting a single-bit error, which
makes it ideal for use in applications where errors are likely to occur due to external factors
such as electromagnetic interference.
Program:
clear
n = 7%# of codeword bits per block k = 4%# of message bits per block
A = [ 1 1 1;1 1 0;1 0 1;0 1 1 ];%Parity submatrix-Need binary(decimal combination of
7,6,5,3)
G = [ eye(k) A ]%Generator matrix
%code(5)= ~code(5);
%code(6)= ~code(6);
%code(7)= ~code(7);
% DECODER%
find = 0;
for ii = 1:n
if ~find
errvect = zeros(1,n);
errvect(ii) = 1;
if search == syndrome
find = 1;
index = ii:
end
end
end
msg_decoded=correctedcode;
msg_decoded=msg_decoded(1:4)
Expected output:
n=7
k=
G=
1 0 0 0 1 1 1
0 1 0 0 1 1 0
0 0 1 0 1 0 1
0 0 0 1 0 1 1
H=
1 1 1 0 1 0 0
1 1 0 1 0 1 0
1 0 1 1 0 0 1
msg =
1 1 1 1
code =
1 1 1 1 1 1 1
recd =
1 0 1 1 1 1 11
syndrome =
1 1 0
Position of error in
codeword=2 correctedcode =
1 1 1 1 1 1 1
msg_decoded =
1 1 1 1
EXPERIMENT - 7
Convolution Coding and Decoding
AIM: Write a program to encode binary data using a ((3,1,2)/suitably designed) Convolution
code and decode it.
SOFTWARE: MATLAB
THEORY: In convolutional coding, the coder input and output are continuous streams of
digits. The coder outputs n output digits for every k digit input, and the code is described as 'a
rate k/n code'. If the input digits are included unmodified in the coder output the code is
described as systematic.
The convolutional coding technique is used to encode and decode a continuous stream of bits.
The basic concept behind the convolution is the overlapping of two signals to form the other
one. A convolutional code can be used to detect or correct infinite sequences of errors or to
correct infinite sequences of erasures. First, erasure correction is shown to be related to error
detection, as well as error detection to error correction.
A binary convolutional code of rate 1/v bits per symbol can be generated by a linear finite-
state machine consisting ofan L-stage shift register, v modulo-2 adders connected to some of
the shift registers, and a commutator that scans the output of the modulo-2 adders.
Program:
clc;
close all;
clear all;
k=3;
trel=poly2trellis(k,[G1 G2]);
disp(msg);
disp(coded);
tblen=length(msg);
decoded=vitdec(coded,trel,tblen,'trunc','hard');
disp(decoded);
Expected Output:
message sequence:
1 0 1 1 0
encoder output:
1 1 1 0 0 0 0 1 0 1
encoder output:
1 0 1 1 0
Introduction to Simulation
To study the network performance two things you can use. They are:
Emulator
Simulator
Emulator
A device on the [LAN], Real network, actual equipment, real software or a part of the real
system is replaced by a model. This model is called Emulator. Properties of an existing part are
simulated (only the part of the real system). A network emulator emulates the network, imitates
the behavior of application traffic.
Objective:
Advantage:
Disadvantage:
Simulator
Network simulators are typically programs which run on a single computer, take an
abstract description of the network traffic (such as a flow arrival process) and yield
performance statistics (such as buffer occupancy as a function of time).
To test and develop different solutions and finally to arrive at a best solution.
Advantage:
Cost effective
Flexible.
No risk involved. Extensive experiments can be done.
Easier to analyze
.
Disadvantage:
Not just a part but a complete network simulator needs to simulate networking
devices and application programs.
Needs network utility programs to configure and monitor.
Simulation model maintains its own simulation clock. When a decision is taken
within the model, the simulation clock does not advance until the necessary
calculations have been performed.
Results are not convincing.
REAQL
NS
OPNET
NCTUns
NCTUns
Open source,
high quality
support many type of networks
Extensible. Can be used as emulator also.
Uses real-life Linux’s TCP/IP protocol
Uses real-life UNIX network configuration.
Can simulate various networking devices.
Can simulate various network protocols
Simulation speed is high.
It uses kernel re-enter methodology. For this it uses tunnel network interface. Tunnel
devices are available in most UNIX machines.
NCTUns Architecture
components:
a. Simulation Engine
b. Protocol and job Dispatcher
c. Coordinator
d. Kernel modification
e. User-level daemon and real-world application program
f. Remote, concurrent and Parallel simulation
v. Kernel Modification
vi. User-level Daemon and real-world application program:
The NCTUns real-world application programs run at the user level to generate network
traffic, configure network, or monitor network traffic, etc. For example, the tcp dump
program can run on a simulated network to capture packets flowing over a link and the
trace route program can run on a simulated network to find out the routing path
traversed by a packet.
vii. Remote, concurrent and parallel simulations.
NCTUns uses a distributed architecture, by which simulation machines can be far
away from the machines where the GUI programs are run. For example, the simulation
service machines may reside at NCTU in Taiwan while the GUI users come from
many different places of the world. Multiple simulation jobs can be concurrently
simulated on different machines (one machine serves one job) to increase the total
simulation throughput. When the NCTUns simulation jobsare run on multiple
machines, we say that NCTUns is operating in the “multiple machine‟ mode [13].
This mode supports remote and concurrent simulations. In the “single-machine‟
STEP 1: # cd /usr/local/nctuns/bin
key>
Right click on the blank space of the screen and select open tab
Right click on the blank space of the screen and select open tab
There are 4 steps in doing the NCTUNS experiments. They are as below
4. Post analysis P
Select
D Draw topology
E Edit property
R Run Simulation
Play back
P
X Delete
Moving path
Hub
A user can draw a new network topology or change an existing simulation topology only in the
Draw topology mode. Draw topology mode is the default mode of NCTUNs.
Choose Menu File Operating mode and make sure that the “Draw Topology” mode is
checked.
A network node (device) may have many parameters to set. Some parameters are
Bandwidth
Queue size
IP address
The GUI automatically finds subnets in a network and generates and assigns IP and MAC
addresses to layer 3 network interfaces.
If the user switches the mode back to the “Draw Topology” mode and when the user
again switches the mode back to the “Edit topology” mode, node’s IP and MAC
addresses will be regenerated and assigned to layer 3 interfaces.
Therefore the application programs now may use wrong IP addresses to communicate with
their partners.
Start up
EXPERIMENT - 11
CRC
AIM: For a given data, use CRC – CCITT polynomial to obtain the CRC code. Verify the
program for the cases a) Without error b) With error.
THEORY: The cyclic redundancy checks or CRC, are a technique for detecting errors in
digital data, but not for making corrections when errors are detected. It is used primarily in data
transmission.
In the CRC method, a certain number of check bits, are appended to the message being
transmitted. The receiver can determine whether or not the check bits agree with the data,to
ascertain with a certain degree of probability whether or not an error occurred in transmission.
In this method, the message is divided by an agreed upon polynomial called generator
polynomial. The obtained reminder is called CRC and is appended with the message bits and
transmitted. If: x div y gives remainder c that means: x = n y + c
Hence (x-c) = n y, (x-c) div y gives remainder 0 E.g.: 14%3=2, therefore (14-2) =12, 12%3=0.
When the transmitted message is received by the receiver, the received message is divided by
generator polynomial. If the remainder is zero, the received data is error free else the received
data has errors.
STEPS:
1. Given a bit string, append 0s to the end of it (the number of 0s is the same as the degree
of the generatorpolynomial). Let it be (𝑥).
2. Divide (𝑥) by agreed on generated polynomial (𝑥) and determine the
remainder(𝑥).This division is to bedone using Modulo-2 Division.
3. Append the remainder to given data, using modulo-2 XOR operation let it
be (𝑥) = (𝑥)–(𝑥).
4. Transmit (𝑥). This is the data that is transmitted ((𝑥)⁄(𝑥) => remainder 0).
5. At Receiver: Let 𝑇 ′ represent the bit stream the receiver gets and 𝑇 ′ (x). The receiver
also will be knowing the generator polynomial. The receiver divides T1(x) by G(x). If
there is a 0 remainder, the receiver concludes 𝑇 = 𝑇 ′ has no error otherwise, the receiver
concludes an error occurred.
int a,e,c;
void xor()
{
for(c=1;c<N;c++)
cs[c]=((cs[c]==g[c])?'0':'1');
}
void crc()
{
for(e=0;e<N;e++)
cs[e]=t[e];
do
{
if(cs[0]== '1')
xor();
for(c=0;c<N-1;c++)
cs[c]=cs[c+1];
cs[c]=t[e++];
}
while(e<=a+N-1);
}
int main()
{
printf("\n enter
data:"); scanf("%s",t);
printf("\n generator polynomial: %s",
g); a=strlen(t);
VIVA QUESTIONS
2. What is simplex?
Ans: It is the mode of communication between two devices in which flow of data is
unidirectional. i.e. one can transmit and other can receive. E.g. keyboard and monitor.
3. What is half-duplex?
Ans: It is the mode of communication between two devices in which flow of data is bi-
directional but not at the same time. ie each station can transmit and receive but not at the same
time. E.g walkie-talkies are half-duplex system.
5. What is a network?
Ans: It is a set of devices connected by communication links. A node can be a computer or any
other device capable of sending and/or receiving data generated by other nodes on the network.
9. What is a topology?
Ans: Topology of a network is defined as the geometric representation of the relationship of all
the links and linking devices (node) to one another. Four basic topologies are star, bus, ring and
mesh. Star – Here each device has a dedicated point to point link only to a central controller
46. What do you mean by pipelining, is there any pipelining in error control?
Ans: The process in which a task is often begun before the previous task has ended is called
pipelining. There is no pipelining in stop and wait ARQ however it does apply in Go-Back-N
ARQ and Selective Repeat ARQ.
61. What are the factors for evaluating the suitability of the media ?
Ans: The factors are cost, throughput, attenuation, Electromagnetic interference (EMI),
security.
62. What do you mean by medium access control (MAC) sub layer?
Ans: The protocols used to determine who goes next on a multi-access channel belong to a sub
layer of the data link layer is called the multi-access channel (MAC) sub layer. It is the bottom
part of data link layer.
67. What do you mean by non persistent CSMA(carrier sense multiple access) ?
Ans: Here if no one else is sending the station begins doing so itself. However if the channel is
already in use, the station doesn’t continuously sense it rather it waits for a random period of
time and then repeats. It leads better channel utilization but longer delay.
87. Define IP ?
Ans: Internetwork protocol (IP) is the transmission mechanism used by TCP/IP protocol. It is an
unreliable and connectionless datagram protocol. It provides no error checking and tracking.
89. What are the information that a computer attached to a TCP/IP internet
must possesses?
Ans: Each computer attached to TCP/IP must possesses the following information
Its IP address • Its subnet mask • The IP address of the router. • The IP address of the name
server.
Subject code:BECL504
Semester: V
1. Conduct the experiment for Frequency Shift Keying generation and detection
2. Conduct the experiment for Phase Shift Keying generation and detection
3. Conduct the experiment for Amplitude Shift Keying generation and detection
4. Conduct the experiment for Differential Phase Shift Keying Transmitter and receiver
5. Write a program to encode binary data using Huffman code and decode it.
6. Write a program to encode binary data using a (7,4) Hamming code and decode it.
7. Write a program to encode binary data using a ((3,1,2)/suitably designed) Convolution
code and decode it.
8. For a given data, use CRC-CCITT polynomial to obtain the CRC code. Verify the program
for the cases a) Without error b) With error
STAR TOPOLOGY