Module 5: Source and
Error Control coding
Renia Dias
Line coding
Line coding is the process of converting digital data into digital signals for
transmission over a communication channel.
This technique helps avoid overlap and distortion of signals, such as inter-
symbol interference. There are three main types of line coding
techniques: Unipolar, Polar, and Bipolar.
Line Coding Techniques
Unipolar Line Coding
In unipolar line coding, all signal levels are either above or below the axis.
The presence of a pulse represents a binary 1, and the absence of a pulse
represents a binary 0.
There are two variations of unipolar signaling: Non-Return to Zero (NRZ) and
Return to Zero (RZ).
Unipolar NRZ
In Unipolar NRZ, a high in data is represented by a positive pulse, while a low
in data has no pulse. This method is simple and requires lesser bandwidth but
has no error correction and may cause signal droop due to low-frequency
components.
Unipolar RZ
In Unipolar RZ, a high in data is represented by a pulse that lasts for half the
bit duration and then returns to zero. This method is simple and provides a
clock signal but occupies twice the bandwidth of Unipolar NRZ and has no
error correction1.
Unipolar NRZ, RZ
Polar Line Coding
In polar line coding, the voltages are on both sides of the axis. There are two
methods: Polar NRZ and Polar RZ.
Polar NRZ
In Polar NRZ, a high in data is represented by a positive pulse, while a low in
data is represented by a negative pulse. This method is simple and has no
low-frequency components but lacks error correction and a clock signal1.
Polar RZ
In Polar RZ, a high in data is represented by a positive pulse for half the bit
duration, and a low in data is represented by a negative pulse for half the bit
duration. This method is simple and has no low-frequency components but
occupies twice the bandwidth of Polar NRZ and lacks error correction1.
Bipolar Line Coding
Bipolar line coding uses three voltage levels: positive, negative, and zero. An
example is Alternate Mark Inversion (AMI), where binary 1s alternate between
positive and negative voltages, and binary 0s have zero voltage.
Bipolar NRZ
In Bipolar NRZ, the pulse duration and symbol bit duration are equal. This
method is simple, occupies less bandwidth than unipolar and polar NRZ
schemes, and is suitable for transmission over AC-coupled lines1.
Bipolar RZ
In Bipolar RZ, the pulse duration is half of the symbol bit duration. This
method is similar to Bipolar NRZ but has a shorter pulse duration1.
Bipolar NRZ, RZ
Source Coding
The redundant data bits are reduced by applying the concepts of information theory
in source encoder.
The device that performs source encoding is called a source encoder.
Source coding, in general, increases the data rate at which information may be
transmitted over a communications channel while maintaining the acceptable
information bit error rate.
The main objectives of source coding are
• to form efficient descriptions of information for a given available data rate.
• to allow low data rates to obtain an acceptable efficient description of the source
information.
Need of Source Coding
Source coding may be needed for analog sources as well as discrete sources.
For analog sources, the source coding is related to the amplitude distribution
and the autocorrelation function of the source waveform.
For discrete sources, the source coding is related to the information content
and the statistical correlation among the symbols of the source.
The conversion of analog information to digital data may not be optimum in
transmitting information to the receiver. This necessitates encoding of the
digitized analog information with source coding
Source Coding Technique
An efficient source encoder must satisfy the following two basic
requirements:
The codewords generated by the source encoder should be in binary form
The concept of variable-length code for each source symbol should be
applied.
If some source symbols are likely to occur more often than others, then short
codewords can be assigned to them. If some source symbols are likely to
occur rarely, then longer codewords can be assigned to them.
The source code should be uniquely decodable so that the original source
sequence can be reconstructed perfectly from the encoded binary sequence
Discrete Memoryless Source
1. A finite discrete source is the one which can be defined by the list of source
symbols, referred as the alphabet, and the probabilities assigned to these
symbols.
2. The source is assumed to be short-term stationary, that is, the probability
assigned is fixed over the observation interval.
3. A typical source encoding model depicts a discrete memoryless source.
Average Code word Length
Entropy Coding
Shannon Fano coding
Answer
Sum 2
Solution
Huffman Coding Algorithm
Sum
Solution
Sum
Solution
ERROR CONTROL AND CODING
It is essential to develop and implement appropriate error-control and coding
procedures in data communications in order to achieve low bit-error rate
after transmission over a noisy band-limited channel.
1. Data transmission errors occur due to electrical interference from natural
sources as well as from man-made sources.
2. Data transmission errors do occur in any type of transmitting medium.
3. The occurrence of errors in data transmission is inevitable.
Joint & Conditional Entropy
Mutual information
Mutual Information
Channel Capacity Theorem
• Nyquist formulation on channel capacity assumes noise-free communication channel.
• Shannon formulation includes signal-to-noise power ratio applicable to the type of
transmission media.
Proof
Shannon-Hartley Theorem
ERROR CONTROL AND CODING
1. Error detection technique can mainly indicate when an error has occurred.
2. It does not identify or correct bits in error, if any.
Linear Block Codes
Linear Block Codes
An (n, k) linear block code encodes k information data bits into n-bit codeword. A simple
operation of a linear block code
The information data sequence is divided into sequential information data blocks.
Each information data block is k bits long.
The error control bits (n – k) are derived from a block of k information data bits, where n is
total number of bits in encoded data block (n > k).
The encoder adds (n – k) error control bits to each k-bit information data block.
A block of n encoded bits (n > k) at any instance depends only on the block of data consisting
of k information bits present at that time. So there is no built-in memory.
When the k information data bits appear at the beginning of a codeword, the code is called a
systematic code.
The n-bit data block is called a codeword.
The number of error control bits depends on the size of the block of information data bits
and the error control capabilities required.
Odd & even Parity
Code rate is a measure of how much additional bandwidth is required to transmit
encoded data at the same data rate as would have been needed to transmit uncoded
data. For example, r = 1/2 means the requirement of double bandwidth of an uncoded
system to maintain the same data rate.
Code rate is a measure of how much additional bandwidth is required to transmit
encoded data at the same data rate as would have been needed to transmit uncoded
data. For example, r = 1/2 means the requirement of double bandwidth of an uncoded
system to maintain the same data rate.