0% found this document useful (0 votes)
58 views

Line Codes

This document provides instructions for an experiment on implementing linear block codes using MATLAB. The experiment aims to introduce and implement different line coding techniques for digital communication. It describes the theory of line codes, provides algorithms and flowcharts for implementing unipolar NRZ, polar NRZ, unipolar RZ, polar RZ, and Manchester line codes. The document also includes program code examples and questions for students to answer after completing the experiment.

Uploaded by

Rutik Panchal
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
58 views

Line Codes

This document provides instructions for an experiment on implementing linear block codes using MATLAB. The experiment aims to introduce and implement different line coding techniques for digital communication. It describes the theory of line codes, provides algorithms and flowcharts for implementing unipolar NRZ, polar NRZ, unipolar RZ, polar RZ, and Manchester line codes. The document also includes program code examples and questions for students to answer after completing the experiment.

Uploaded by

Rutik Panchal
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

Department of Electronics Engineering 

(NBA ACCREDIATED) 
Digital Communication Laboratory 
Academic Year 2019-2020 
 
Odd Semester 
 
 
Course Code  ELXL 502 
Subject Professor In-charge  Prof. Rakshak P. Sood, Prof. Ulka Padwalkar 
Lab Assistant  Ms. Ankita Angarkhe 
Student Name    
Roll Number   
Class  T.E - ETRX 
Division   
Batch   
Date of Performance   
Date of Submission   

EXPERIMENT NO. 1 
 
Line Codes  
 
 
Practical  Writing 
Total 
Performance  Presentation  Sign 
(10 Marks) 
(5 Marks)  (5 Marks) 
 
   
     
 
     
   
 
 
 

Digital Communication Lab Manual – Sem V – ETRX


2019 - 2020
Experiment No. 1 
 
Aim:   
Implementation of Linear Block Code Using MATLAB.  
 
Estimated time to complete this experiment:​ 2 hours 
 
Objective:  
To introduce and implement different Line coding technique for digital communication. 
 
Apparatus/Resources:  
Hardware:​ Compatible Computer System 
Software​: MATLAB 
 
Theory:  

Binary  data  can  be  transmitted  using  several  different  types  of  pulses.  The  choice  of  a  pair  of 
pulses  to  represent  the  symbols  1  and  0  is  called  Line  Coding  /  Transmission  Coding  /  Digital 
Baseband  Signalling. Line coding is the process of converting binary data, a sequence of bits to 
a  digital  signal.  It  is  in  a  line  code  that  a  binary  stream  of  data  takes  on  an  electrical 
representation  and  the  choice  is  generally  made  on  the  grounds  of  one  or  more  of  the 
following considerations: 
– Presence or absence of a DC level. 
– Power Spectral Density- particularly its value at 0 Hz. 
– Bandwidth. 
– BER performance  
–   Transparency  (i.e.  the  property  that  any  arbitrary  symbol,  or  bit,  pattern  can  be 
transmitted and received). 
– Ease of clock signal recovery for symbol synchronisation. 
– Presence or absence of inherent error detection properties. 
 

 
   
Algorithm​:  
 

Digital Communication Lab Manual – Sem V – ETRX


2019 - 2020
Initialization commands  
 
1. For UNIPOLAR NRZ: 
1. Start 
2. Define the amplitude of the plot(A) 
3. Define input data (R) 
4. Display input data 
5. Define bit time (T​b​) 
6. Initialize ‘i’ in a loop for interval of 1 to 6 
7. If R(i) = 1 i.e if the i​th​ element of R = 1 then the amplitude of the plot defined amplitude A 
for the specified bit period. If the i​th​ element of R = 0 then the amplitude of the plot 
defined amplitude 0 for the specified bit period. 
8. Display the unipolar NRZ plot by plotting the amplitude with respect to bit time 
9. Stop 
 
2. For POLAR NRZ: 
1. Start 
2. Define the amplitude of the plot(A) 
3. Define input data (R) 
4. Display input data 
5. Define bit time (T​b​) 
6. Initialize ‘i’ in a loop for interval of 1 to 6 
7. If R(i) = 1 i.e if the i​th​ element of R = 1 then the amplitude of the plot is defined amplitude 
A for the specified bit period.  
8. If the i​th​ element of R = 0 then the amplitude of the plot is defined by negative 
amplitude -A for the specified bit period. 
9. Display the polar NRZ plot by plotting the amplitude with respect to bit time 
10. Stop 
 
3. For UNIPOLAR RZ: 
1. Start 
2. Define the amplitude of the plot(A) 
3. Define input data (R) 
4. Display input data 
5. Define bit time (T​b​) 
6. Initialize ‘i’ in a loop for interval of 1 to 6 
7. If R(i) = 1 i.e if the i​th​ element of R = 1 then the amplitude of the plot is defined amplitude 
A for half of the specified bit period and remaining half is defined by zero amplitude.  
8. If the i​th​ element of R = 0 then the amplitude of the plot is defined zero amplitude for 
the specified bit period. 
9. Display the unipolar RZ plot by plotting the amplitude with respect to bit time 
10. Stop 
 
4. For POLAR RZ: 
1. Start 
2. Define the amplitude of the plot(A) 
3. Define input data (R) 
4. Display input data 
5. Define bit time (T​b​) 
6. Initialize ‘i’ in a loop for interval of 1 to 6 
7. If R(i) = 1 i.e if the i​th​ element of R = 1 then the amplitude of the plot is defined amplitude 
A for half of the specified bit period and remaining half is defined by zero amplitude.  

Digital Communication Lab Manual – Sem V – ETRX


2019 - 2020
8. If the i​th​ element of R = 0 then the amplitude of the plot is defined negative amplitude 
-A for half of the specified bit period and remaining half is defined by zero amplitude.  
9. Display the polar RZ plot by plotting the amplitude with respect to bit time 
10. Stop 
 
4. For Manchester: 
1. Start 
2. Define the amplitude of the plot(A) 
3. Define input data (R) 
4. Display input data 
5. Define bit time (T​b​) 
6. Initialize ‘i’ in a loop for interval of 1 to 6 
7. If R(i) = 1 i.e if the i​th​ element of R = 1 then the amplitude of the plot undergoes 
transformation from positive amplitude to negative amplitude for half the specified time 
period. 
8. If the i​th​ element of R = 0 then the amplitude of the plot undergoes transformation from 
negative amplitude to positive amplitude for half the specified time period. 
9. Display the polar RZ plot by plotting the amplitude with respect to bit time 
10. Stop 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Flow Charts:  

1. ​For UNIPOLAR NRZ: 

Digital Communication Lab Manual – Sem V – ETRX


2019 - 2020
2. ​For POLAR NRZ: 

3. ​For UNIPOLAR RZ: 

Digital Communication Lab Manual – Sem V – ETRX


2019 - 2020
4. ​For POLAR RZ: 

5. ​For Manchester: 

Digital Communication Lab Manual – Sem V – ETRX


2019 - 2020
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Program Code​:  

1. ​For UNIPOLAR NRZ: 

Digital Communication Lab Manual – Sem V – ETRX


2019 - 2020
2. ​For POLAR NRZ: 
 

3. ​For UNIPOLAR RZ: 


 

Digital Communication Lab Manual – Sem V – ETRX


2019 - 2020
4. ​For POLAR RZ:

5. ​For Manchester: 

Digital Communication Lab Manual – Sem V – ETRX


2019 - 2020
 
 
 
Result:  
Draw all the above-mentioned Line Codes neatly on graph paper for R = 1 0 1 1 0 1 
 
Conclusion:  
 
Thus, we have simulated different types of Lines Codes using MATLAB software. 
 
Advantages: (Mention for each type of Line Code) 
 
 
 
Disadvantages: (Mention for each type of Line Code) 
 
 
 
 
Real Life Application:   
 
 
Digital Communication Lab Manual – Sem V – ETRX
2019 - 2020
 
 
 
 
 
 
 
Post Lab Questions: ​(to be answered by student after experiment is completed) 
 
1. What is the necessity of line codes for data transmission? 
2. What is self-clocking capability in line codes? 
3. What are the desirable properties of Line Codes? 
 

Digital Communication Lab Manual – Sem V – ETRX


2019 - 2020

You might also like