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

Numerical Assignment

Uploaded by

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

Numerical Assignment

Uploaded by

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

ss

SULAIMANI POLYTECHNIC UNIVERSITY


TECHNICAL COLLEGE OF ENGINEERING 2023-2024
COMMUNICATION DEPARTMENT THIRD STAGE

DIGITAL COMMUNICATION LAB


LINE CODING

SUPERVISED BY: PREPARED BY:


RAWAZ H.ABDULLAH TAZHAN MOHAMMED ALI
SHAIDA YASEN OTHMAN
MOHAMMED NAMIQ SHARIF
ZHIR NABAZ DHAIR
HSEN NASYAR HSEN
THEORY:
A line code is the code used for data transmission of a digital signal over a transmission line. This
process of coding is chosen so as to avoid overlap and distortion of signal such as inter-symbol
interference.

Properties of Line Coding


Following are the properties of line coding –

• As the coding is done to make more bits transmit on a single signal, the bandwidth used is
much reduced.
• For a given bandwidth, the power is efficiently used.
• The probability of error is much reduced.
• Error detection is done and the bipolar too has a correction capability.
• Power density is much favorable.
• The timing content is adequate.
• Long strings of 1s and 0s is avoided to maintain transparency.

Types of Line Coding


There are 3 types of Line Coding

• Unipolar
• Polar
• Bi-polar

Page | 1
Unipolar Signaling

Unipolar signaling is also called as On-Off Keying or simply OOK.

The presence of pulse represents a 1 and the absence of pulse represents a 0.

There are two variations in Unipolar signaling −

• Non-Return to Zero NRZ𝑁𝑅𝑍


• Return to Zero RZ𝑅𝑍

Unipolar Non-Return to Zero NRZ𝑁𝑅𝑍

In this type of unipolar signaling, a High in data is represented by a positive pulse called as Mark,
which has a duration T0 equal to the symbol bit duration. A Low in data input has no pulse.

The following figure clearly depicts this.

Advantages

The advantages of Unipolar NRZ are −

• It is simple.
• A lesser bandwidth is required.

Disadvantages

The disadvantages of Unipolar NRZ are −

• No error correction done.


• Presence of low frequency components may cause the signal droop.
• No clock is present.
• Loss of synchronization is likely to occur (especially for long strings of 1s and 0s).

Page | 2
Unipolar Return to Zero RZ

In this type of unipolar signaling, a High in data, though represented by a Mark pulse, its
duration T0 is less than the symbol bit duration. Half of the bit duration remains high but it
immediately returns to zero and shows the absence of pulse during the remaining half of the bit
duration.

It is clearly understood with the help of the following figure.

Advantages

The advantages of Unipolar RZ are −

• It is simple.
• The spectral line present at the symbol rate can be used as a clock.

Disadvantages

The disadvantages of Unipolar RZ are −

• No error correction.
• Occupies twice the bandwidth as unipolar NRZ.
• The signal droop is caused at the places where signal is non-zero at 0 Hz.

Page | 3
Polar Signaling

There are two methods of Polar Signaling. They are −

• Polar NRZ
• Polar RZ

Polar NRZ

In this type of Polar signaling, a High in data is represented by a positive pulse, while a Low in
data is represented by a negative pulse. The following figure depicts this well.

Advantages

The advantages of Polar NRZ are −

• It is simple.
• No low-frequency components are present.

Disadvantages

The disadvantages of Polar NRZ are −

• No error correction.
• No clock is present.
• The signal droop is caused at the places where the signal is non-zero at 0 Hz.

Page | 4
Polar RZ

In this type of Polar signaling, a High in data, though represented by a Mark pulse, its
duration T0 is less than the symbol bit duration. Half of the bit duration remains high but it
immediately returns to zero and shows the absence of pulse during the remaining half of the bit
duration.

However, for a Low input, a negative pulse represents the data, and the zero level remains same
for the other half of the bit duration. The following figure depicts this clearly.

Advantages

The advantages of Polar RZ are −

• It is simple.
• No low-frequency components are present.

Disadvantages

The disadvantages of Polar RZ are −

• No error correction.
• No clock is present.
• Occupies twice the bandwidth of Polar NRZ.
• The signal droop is caused at places where the signal is non-zero at 0 Hz.

Page | 5
Bipolar Signaling

This is an encoding technique which has three voltage levels namely +, - and 0. Such a signal is
called as duo-binary signal.

An example of this type is Alternate Mark Inversion AMI𝐴𝑀𝐼. For a 1, the voltage level gets a
transition from + to – or from – to +, having alternate 1s to be of equal polarity. A 0 will have a
zero-voltage level.

Even in this method, we have two types.

• Bipolar NRZ
• Bipolar RZ

From the models so far discussed, we have learnt the difference between NRZ and RZ. It just
goes in the same way here too. The following figure clearly depicts this.

The above figure has both the Bipolar NRZ and RZ waveforms. The pulse duration and symbol bit
duration are equal in NRZ type, while the pulse duration is half of the symbol bit duration in RZ
type.

Page | 6
Advantages

Following are the advantages −

• It is simple.
• No low-frequency components are present.
• Occupies low bandwidth than unipolar and polar NRZ schemes.
• This technique is suitable for transmission over AC coupled lines, as signal drooping doesn’t
occur here.
• A single error detection capability is present in this.

Disadvantages

Following are the disadvantages −

• No clock is present.
• Long strings of data causes loss of synchronization.

Page | 7
Procedure:
Test (A): Generation of Unipolar NRZ Signals.
1-We dragged the Scope block from Simulink > Commonly Used Blocks and Random Integer
Generator block from Communications Toolbox >Communication Sources > Random Data Sources,
into our model window.
Then we set up the experiment as follows:

2-We set up the Random Integer Generator settings for binary digital message as follows:

3-We set the stop time to 4/1000 s:

Page | 8
4-We opened Scope and ran the simulation:

5-We then set the Random Integer Generator block settings as follows to get a multilevel digital
message:

6-we clicked on scope and ran the simulation:

Page | 9
Test (B): Generation of Polar NRZ Signals.
1. We dragged the Scope block from Simulink > Commonly Used Blocks, Random Integer Generator
block from Communication Toolbox > Communication Sources > Random Data Sources and
Unipolar to Bipolar Converter block from Communication Toolbox > Utility Blocks, into our
model window. Then we set up the experiment as follows:

2. We set up the Random Integer Generator settings for binary digital message as follows:

3. We set the Unipolar to Bipolar Converter settings as follows:

Page | 10
4.We set the stop time to 4/1000 s.
5.We opened Scope and ran the simulation:

6. We then set the Random Integer block settings as follows to get a multilevel digital message.

7. We set the Unipolar to Bipolar Converter settings as follows:

Page | 11
8. We clicked on Scope and ran the simulation.

Test (C): Generation of Unipolar RZ signals.


1. We dragged the Scope and Product blocks from Simulink > Commonly Used Blocks, Random
Integer Generator block from Communications Toolbox > Communication Sources > Random
Data Sources and Pulse Generator block from Simulink > Sources, into our model window. Then
we set up the experiment as follows:

2. We set up the Random Integer Generator settings for binary digital message as follows:

Page | 12
3. We set up the Pulse Generator settings as follows:

4. We set the stop time to 4/1000 s.

5. We clicked on Scope and ran the simulation:

Page | 13
6. We then set the Random Integer Generator block settings as follows to get a multilevel digital
message.

7. We clicked on Scope and ran the simulation:

Page | 14
Test (D): Generation of Polar RZ Signals.

1. We dragged the Scope and Product blocks from Simulink > Commonly Used Blocks, Random
Integer Generator block from Communication Toolbox > Communication Sources > Random
Data Sources, Unipolar to Bipolar Converter block from Communication Toolbox > Utility
Blocks and Pulse Generator block from Simulink > Sources, into our model window. Then we
set up the experiment as follows:

2. We set up the Random Integer Generator settings for a binary digital message as follows:

3. We set up the Unipolar to Bipolar Converter settings as follows:

Page | 15
4. We set up the Pulse Generator settings as follows:

5. We set the stop time to 4/1000 s.

6. We clicked Scope and ran the simulation.

Page | 16
Test (E): Spectra of Line Codes:

1. We dragged the Scope and Product blocks from Simulink > Commonly Used Blocks, Random
Integer Generator block from Communication Toolbox > Communication Sources > Random
Data Sources, Unipolar to Bipolar Converter block from Communication Toolbox > Utility
Blocks, Pulse Generator block from Simulink > Sources, rate transmission Simulink > signal
attributes > Sinks, into our model window. Then we set up the experiment as follows:

2.we set the integer generator settings as the following:

Page | 17
3.we set the pulse generator settings as:

4.we set ZOH settings like:

5.we made the stop time 0.2s.


6.we set the rate transmission settings as the following:

Page | 18
7.we ran the simulation and saw the results:
a-unipolar NRZ

bandwidth=first null=Rb=1Khz

Page | 19
b-polar NRZ

bandwidth=first null=Rb=1khz

Page | 20
c-unipolar RZ

bandwidth=second null=2Rb=2Khz

Page | 21
d-polar RZ

bandwidth=second null=2Rb=2Khz

Page | 22
2-discuss your results:

1. Unipolar NRZ (Non-Return to Zero):


In unipolar NRZ, a positive voltage represents a binary 1, while zero voltage represents a binary 0. The
spectrum of unipolar NRZ tends to have a large low-frequency component due to the absence of signal
transitions during long sequences of 1s or 0s. This can result in a significant amount of power concentrated at
the lower frequencies.

2. Unipolar RZ (Return to Zero):


Unipolar RZ encoding also uses a positive voltage to represent a binary 1, while zero voltage represents a
binary 0. However, in unipolar RZ, the voltage returns to zero after a certain duration to indicate the end of a
bit. This introduces additional transitions in the signal, resulting in a broader spectrum with more energy at
higher frequencies compared to unipolar NRZ.

3. Polar NRZ:
In polar NRZ encoding, both positive and negative voltage levels are used to represent binary 1 and binary 0,
respectively. Since polar NRZ includes signal transitions for each bit, the spectrum tends to have a wider
bandwidth compared to unipolar NRZ. The presence of both positive and negative voltage levels also
contributes to a balanced spectrum with energy distributed across a range of frequencies.

4. Polar RZ:
Polar RZ encoding, similar to unipolar RZ, utilizes both positive and negative voltage levels to represent binary 1
and binary 0. However, in polar RZ, the voltage returns to zero halfway through the bit duration. This results in
a spectrum with a narrower bandwidth compared to polar NRZ, as the transitions occur only once per bit.

In our practical observations, the differences in the spectra of these line coding schemes can be attributed to
the varying number and timing of signal transitions they employ. The spectrum provides important insights into
the frequency components and bandwidth requirements of each scheme. It is crucial to consider these
characteristics when selecting a line coding scheme for a specific communication system, taking into account
factors such as channel capacity, noise immunity, and transmission distance.

It's worth noting that the observed spectra may also be influenced by factors such as the specific
implementation, signal quality, and the presence of noise or interference in the experimental setup. These
factors can further impact the performance and characteristics of each line coding scheme.

Overall, our results demonstrate the distinct spectral characteristics of different line coding schemes,
highlighting the importance of selecting an appropriate scheme based on the requirements and constraints of
the communication system.

Page | 23

You might also like