Digital Communication Notes
Digital Communication Notes
com
EC6501
DIGITAL COMMUNICATION
www.rejinpaul.com
OBJECTIVES:
To know the principles of sampling &
quantization
To study the various waveform coding
schemes
To learn the various baseband transmission
schemes
To understand the various Band pass signaling
schemes
To know the fundamentals of channel coding
Get useful study materials from www.rejinpaul.com
SYLLABUS www.rejinpaul.com
UNIT I SAMPLING & QUANTIZATION 9
Low pass sampling Aliasing- Signal Reconstruction-Quantization - Uniform & non-uniform
quantization - quantization noise - Logarithmic Companding of speech signal- PCM - TDM 56
UNIT II WAVEFORM CODING 9
Prediction filtering and DPCM - Delta Modulation - ADPCM & ADM principles-Linear Predictive
Coding
UNIT III BASEBAND TRANSMISSION 9
Properties of Line codes- Power Spectral Density of Unipolar / Polar RZ & NRZ Bipolar NRZ Manchester- ISI Nyquist criterion for distortionless transmission Pulse shaping Correlative
coding - Mary schemes Eye pattern - Equalization
UNIT IV DIGITAL MODULATION SCHEME 9
Geometric Representation of signals - Generation, detection, PSD & BER of Coherent BPSK,
BFSK & QPSK - QAM - Carrier Synchronization - structure of Non-coherent Receivers - Principle
of DPSK.
UNIT V ERROR CONTROL CODING 9
Channel coding theorem - Linear Block codes - Hamming codes - Cyclic codes - Convolutional
codes - Vitterbi Decoder
TOTAL: 45 PERIODS
www.rejinpaul.com
OUTCOMES
Upon completion of the course, students will be
able to
Design PCM systems
Design and implement base band transmission
schemes
Design and implement band pass signaling
schemes
Analyze the spectral characteristics of band
pass signaling schemes and their noise
performance
Design error control coding schemes
Get useful study materials from www.rejinpaul.com
www.rejinpaul.com
EC6501
DIGITAL COMMUNICATION
UNIT - 1
www.rejinpaul.com
INTRODUCTION
www.rejinpaul.com
www.rejinpaul.com
www.rejinpaul.com
www.rejinpaul.com
UNIT I
SAMPLING & QUANTIZATION (9)
www.rejinpaul.com
www.rejinpaul.com
Low
Pass
Filter
Sampler
Quantizer
Source
Encoder
Channel
Encoder
Multiplexer
Carrier
To Channel
Modulator
Pulse
Shaping
Filters
From Channel
DeModulator
Receiver
Filter
Line
Encoder
Detector
Carrier Ref.
Signal
at the
user end
Digital-to-Analog
Converter
Channel
Decoder
DeMultiplexer
12
www.rejinpaul.com
Key Questions
www.rejinpaul.com
www.rejinpaul.com
Nyquist Theorem
For lossless digitization, the sampling rate
should be at least twice the maximum
frequency of the signal to be sampled.
In mathematical terms:
fs > 2*fm
www.rejinpaul.com
Limited Sampling
www.rejinpaul.com
Limited Sampling
www.rejinpaul.com
www.rejinpaul.com
www.rejinpaul.com
www.rejinpaul.com
www.rejinpaul.com
www.rejinpaul.com
www.rejinpaul.com
Aliasing effect
LP filter
Nyquist rate
aliasing
www.rejinpaul.com
www.rejinpaul.com
Natural Sampling
www.rejinpaul.com
www.rejinpaul.com
Pulse-Amplitude Modulation
28
Fig.5
www.rejinpaul.com
Back
Next
29
Fig.6
www.rejinpaul.com
Back
Next
30
Fig.7
www.rejinpaul.com
Back
Next
31
Quantization Processwww.rejinpaul.com
Amplitude quantization
The process of transforming the sample amplitude m(nTs) of a
baseband signal m(t) at time t=nTs into a discrete amplitude
v(nTs) taken from a finite set of possible levels.
Fig. 9
v = g (m ) (18)
Fig. 10
33
Fig.9
www.rejinpaul.com
Back
Next
34
Fig.10
www.rejinpaul.com
Back
Next
35
www.rejinpaul.com
Linear Quantization
Applicable when the signal is in a
finite range (fmin, fmax)
The entire data range is divided
into L equal intervals of length Q
(known as quantization interval or
quantization step-size)
Q=(fmax-fmin)/L Interval i is
mapped to the middle value of this
interval
We store/send only the index of
quantized value min
www.rejinpaul.com
www.rejinpaul.com
Quantization Noise
Non-Uniform Quantization
www.rejinpaul.com
Many signals such as speech have a nonuniform distribution.
The amplitude is more likely to be close to zero than to be at higher levels.
Nonuniform quantizers have unequally spaced levels
The spacing can be chosen to optimize the SNR for a particular type of signal.
Output sample
XQ
6
4
-8
-6
-4
-2
2
-2
Input sample
X
-4
-6
39
www.rejinpaul.com
Non-Linear Quantization
The quantizing intervals are not of equal size
Small quantizing intervals are allocated to small
signal values (samples) and large quantization
intervals to large samples so that the signal-toquantization distortion ratio is nearly independent of
the signal level
S/N ratios for weak signals are much better but are
slightly less for the stronger signals
Companding is used to quantize signals
Get useful study materials from www.rejinpaul.com
www.rejinpaul.com
Function representation
www.rejinpaul.com
www.rejinpaul.com
Companding
Formed from the words compressing and
expanding.
A PCM compression technique where analogue
signal values are rounded on a non-linear scale.
The data is compressed before sent and then
expanded at the receiving end using the same
non-linear scale.
Companding reduces the noise and crosstalk
levels at the receiver.
Get useful study materials from www.rejinpaul.com
www.rejinpaul.com
Compressor
A particular form of compression law : -law
v=
www.rejinpaul.com
log(1 + m )
(5.23)
log(1 + )
d m log(1 + )
(1 + m ) (5.24)
=
dv
Am
1
m
,
0
1 + log A
A
(5.25)
v =
1 + log( A m ) , 1 m 1
1 + log A
A
1
1 + log A
,
0
m
d m A
A
=
(5.26)
Fig. 5.11
1
dv
(1 + log A) m , A m 1
Get useful study materials from www.rejinpaul.com 45
Fig.11
www.rejinpaul.com
Back
Next
46
www.rejinpaul.com
x[n]=speech /song/
0.5
0
-0.5
-1
1000
2000
3000
4000
5000
6000
7000
8000
9000
10000
1000
2000
3000
4000
5000
6000
7000
8000
9000
10000
y[n]=C(x[n])
Companded Signal
0.5
0
-0.5
-1
Segment of x[n]
0.5
0
-0.5
-1
2200
2300
2400
2500
2600
2700
2800
2900
3000
2300
2400
2500
2600
2700
2800
2900
3000
Segment of y[n]
Companded Signal
0.5
0
-0.5
-1
2200
Eeng 360
Get useful study materials from www.rejinpaul.com
47
Eeng 360
Get useful study materials from www.rejinpaul.com
48
www.rejinpaul.com
Quantization - why do we need such classification ?! - (3)
Comparison Uniform Vs. Non-Uniform Usage
Speech signals doesnt require high quantization resolution for
high amplitudes (50% Vs. 15%).
wasteful to use uniform quantizer ?
The goal is decrease the SQNR, more levels for low amplitudes, less levels for
high ones.
Maybe use a Non-uniform quantizer ?
Technical
Presentation
Page 49
Get
useful
study materials
from www.rejinpaul.com
Concepts
www.rejinpaul.com
Quantization
More About Non-Uniform Quantizers (Companding)
Uniform quantizer = use more levels when you need it.
The human ear follows a logarithmic process in which high amplitude sound doesnt
require the same resolution as low amplitude sounds.
One way to achieve non-uniform quantization is to use what is called as Companding
Companding = Compression + Expanding
Compressor
Function
Uniform
Quantization
Expander
Function
(-1)
Technical
Presentation
Page 50
Get
useful
study materials
from www.rejinpaul.com
www.rejinpaul.com
Pulse-Code Modulation
51
Fig.11
www.rejinpaul.com
Back
Next
52
www.rejinpaul.com
3. Encoding
1.To translate the discrete set of sample vales to a
more appropriate form of signal
Fig. 11
2.A binary code
The maximum advantage over the effects of noise in a
transmission medium is obtained by using a binary
code, because a binary symbol withstands a relatively
high level of noise.
The binary code is easy to generate and regenerate
Table. 2
53
www.rejinpaul.com
54
Fig.13
www.rejinpaul.com
Back
Next
55
www.rejinpaul.com
2. Reconstruction
1.Recover the message signal : passing the expander
output through a low-pass reconstruction filter
Get useful study materials from www.rejinpaul.com
56
www.rejinpaul.com
Categories of multiplexing
www.rejinpaul.com
www.rejinpaul.com
k6
Frequency
f
t
Time
Advantages:
Only one carrier in the medium at any given time
High throughput even for many users
Common TX component design, only one power amplifier
Flexible allocation of resources (multiple time slots).
Get useful study materials from www.rejinpaul.com
www.rejinpaul.com
Synchronization
Requires terminal to support a much higher data
rate than the user information rate therefore
possible problems with intersymbolinterference.
Application: GSM
61
62
www.rejinpaul.com
TDM-PAM: Transmitter
www.rejinpaul.com
TDM-PAM : Receiver
www.rejinpaul.com
Samples of Signal -1
g1(t)
time
0
Ts
2Ts
www.rejinpaul.com
Samples of signal - 2
g2(t)
Ts
Ts
www.rejinpaul.com
Ts
2Ts
www.rejinpaul.com
4
4
4
1
1
2
1
2
2
3
Time
www.rejinpaul.com
Problem
Two low-pass signals of equal bandwidth
are sampled and time division
multiplexed using PAM. The TDM signal is
passed through a Low-pass filter & then
transmitted over a channel with a
bandwidth of 10KHz.
Continued.
Get useful study materials from www.rejinpaul.com
www.rejinpaul.com
Problem (continued)
a) What is maximum Sampling rate for each
Channel?
b) What is the maximum frequency content
allowable for each signal?
www.rejinpaul.com
Problem: Solution
Channel Bandwidth = 10 KHz.
Number of samples that can be transmitted
through the channel = 20K
Maximum Sampling rate for each channel =
10K Samples/sec.
Maximum Frequency for each Signal = 5KHz
www.rejinpaul.com
End of Unit-1
www.rejinpaul.com
Unit II
Waveform Coding
www.rejinpaul.com
Syllabus
Prediction filtering and DPCM - Delta
Modulation - ADPCM & ADM principles-Linear
Predictive Coding
www.rejinpaul.com
www.rejinpaul.com
www.rejinpaul.com
www.rejinpaul.com
Prediction Filtering
Linear prediction is a mathematical operation
where future values of a discrete-time signal
are estimated as a linear function of previous
samples.
In digital signal processing, linear prediction is
often called linear predictive coding (LPC).
linear prediction can be viewed as a part of
mathematical modelling or optimization.
Get useful study materials from www.rejinpaul.com
www.rejinpaul.com
Where
is the predicted signal value, x(n-i)
the previous observed values, and the
predictor coefficients.
The error generated by this estimate is
Where x(n) is the true value.
Get useful study materials from www.rejinpaul.com
www.rejinpaul.com
www.rejinpaul.com
www.rejinpaul.com
www.rejinpaul.com
Principle of DPCM
www.rejinpaul.com
Delta Modulation
A Delta modulation (DM or -modulation) is an analog-to-digital
and digital-to-analog signal conversion technique used for
transmission of voice information where quality is not of primary
importance.
To achieve high signal-to-noise ratio, delta modulation must use
oversampling techniques, that is, the analog signal is sampled at a
rate several times higher than the Nyquist rate.
Derived forms of delta modulation are continuously variable slope
delta modulation, delta-sigma modulation, and differential
modulation.
Differential pulse-code modulation is the super-set of DM.
Get useful study materials from www.rejinpaul.com
www.rejinpaul.com
Features
the analog signal is approximated with a series of
segments
each segment of the approximated signal is compared to
the original analog wave to determine the increase or
decrease in relative amplitude
the decision process for establishing the state of
successive bits is determined by this comparison
only the change of information is sent, that is, only an
increase or decrease of the signal amplitude from the
previous sample is sent whereas a no-change condition
causes the modulated signal to remain at the same 0 or 1
state of the previous sample.
Get useful study materials from www.rejinpaul.com
www.rejinpaul.com
www.rejinpaul.com
www.rejinpaul.com
www.rejinpaul.com
www.rejinpaul.com
www.rejinpaul.com
www.rejinpaul.com
www.rejinpaul.com
VCA
www.rejinpaul.com
www.rejinpaul.com
www.rejinpaul.com
www.rejinpaul.com
www.rejinpaul.com
www.rejinpaul.com
www.rejinpaul.com
www.rejinpaul.com
|a1|
|a2|
|...|
|ap|
| R(1) |
| R(2) |
=
...
| R(P) |
www.rejinpaul.com
www.rejinpaul.com
www.rejinpaul.com
4. i = 1, k1 = r(1)
5. For i-p<=j<=p
qi(j) = qi-1(j) + ki *qi-1 (i-j)
ki = qi-1(j)/qi(0)
aj(i) = qi-1(i-j)
E(i) = E(i-1)(1-ki2)
6. If i<p, back to step 5
7. Stop
If we only calculate ki, then only first two expressions
in step 5 are enough. It is suitable for fix-point
calculation (r<=1) or hardware implementation.
Get useful study materials from www.rejinpaul.com
www.rejinpaul.com
www.rejinpaul.com
www.rejinpaul.com
www.rejinpaul.com
www.rejinpaul.com
= 0 Get useful
n<0study materials from www.rejinpaul.com
www.rejinpaul.com
www.rejinpaul.com
www.rejinpaul.com
www.rejinpaul.com
www.rejinpaul.com
www.rejinpaul.com
Thank you
www.rejinpaul.com
Unit 3
Baseband Transmission
www.rejinpaul.com
Syllabus
Properties of Line codes- Power Spectral Density of Unipolar /
Polar RZ & NRZ Bipolar NRZ - Manchester- ISI Nyquist
criterion for distortionless transmission Pulse shaping
Correlative coding - Mary schemes Eye pattern - Equalization
www.rejinpaul.com
Baseband Transmission
The digital signal used in baseband
transmission occupies the entire bandwidth
of the network media to transmit a single data
signal.
Baseband communication is bidirectional,
allowing computers to both send and receive
data using a single cable.
www.rejinpaul.com
Baseband Modulation
www.rejinpaul.com
www.rejinpaul.com
Line Codes
In telecommunication, a line code (also called digital baseband
modulation or digital baseband transmission method) is a code
chosen for use within a communications system for baseband
transmission purposes.
Line coding is often used for digital data transport.
Line coding consists of representing the digital signal to be
transported by an amplitude- and time-discrete signal that is
optimally tuned for the specific properties of the physical channel
(and of the receiving equipment).
The waveform pattern of voltage or current used to represent the
1s and 0s of a digital data on a transmission link is called line
encoding.
Get useful study materials from www.rejinpaul.com
www.rejinpaul.com
www.rejinpaul.com
www.rejinpaul.com
www.rejinpaul.com
Unipolar coding
Unipolar encoding is a line code. A positive voltage represents a
binary 1, and zero volts indicates a binary 0. It is the simplest line
code, directly encoding the bitstream, and is analogous to on-off
keying in modulation.
Its drawbacks are that it is not self-clocking and it has a significant
DC component, which can be halved by using return-to-zero, where
the signal returns to zero in the middle of the bit period.
With a 50% duty cycle each rectangular pulse is only at a positive
voltage for half of the bit period.
This is ideal if one symbol is sent much more often than the other
and power considerations are necessary, and also makes the signal
self-clocking.
Get useful study materials from www.rejinpaul.com
www.rejinpaul.com
The normalized power (power required to send 1 bit per unit line
resistance) is double that for polar NRZ.
For this reason, this scheme is not normally used in data
communications today.
Get useful study materials from www.rejinpaul.com
www.rejinpaul.com
www.rejinpaul.com
www.rejinpaul.com
Return-to-zero
Return-to-zero (RZ) describes a line code used in
telecommunications signals in which the signal
drops (returns) to zero between each pulse.
This takes place even if a number of consecutive
0s or 1s occur in the signal.
The signal is self-clocking. This means that a
separate clock does not need to be sent
alongside the signal, but suffers from using twice
the bandwidth to achieve the same data-rate as
compared to non-return-to-zero format.
Get useful study materials from www.rejinpaul.com
www.rejinpaul.com
www.rejinpaul.com
Polar RZ
www.rejinpaul.com
BiPolar Signalling
www.rejinpaul.com
Manchester Encoding
www.rejinpaul.com
www.rejinpaul.com
www.rejinpaul.com
www.rejinpaul.com
www.rejinpaul.com
www.rejinpaul.com
www.rejinpaul.com
www.rejinpaul.com
www.rejinpaul.com
www.rejinpaul.com
Disadvantages:
(a) an ideal LPF is not physically realizable.
(b) Note that
www.rejinpaul.com
www.rejinpaul.com
www.rejinpaul.com
www.rejinpaul.com
www.rejinpaul.com
www.rejinpaul.com
www.rejinpaul.com
www.rejinpaul.com
PI ( f ) Im[ ( 1) n P ( f n / T )] 0
n
www.rejinpaul.com
www.rejinpaul.com
( wt ) / 2
,
T
P ( w) sin( wT / 2)
0,
w
p(t )
/T
( wt / 2)
/ T
sin (wT / 2)
2 n1T
2
A 2 n1
2
1,
p(t )dt
0,
e jwt d w
n0
n0
www.rejinpaul.com
Eye Diagram
Eye diagram is a means of evaluating the quality of a received
digital a eform
www.rejinpaul.com
www.rejinpaul.com
www.rejinpaul.com
2nd Nyquist:
1st Nyquist:
2nd Nyquist:
1st Nyquist:
1st Nyquist
2nd Nyquist:
1st Nyquist:
2nd Nyquist:
1st Nyquist:
www.rejinpaul.com
www.rejinpaul.com
www.rejinpaul.com
Thank you
www.rejinpaul.com
UNIT IV
DIGITAL MODULATION SCHEME
www.rejinpaul.com
Geometric Representation of
Signals
si (t ) sij j (t ),
j 1
0 t T
i==1,2,....,M
4.1
(5.5)
coefficient
Energy signal
www.rejinpaul.com
Coefficients:
T
sij si (t ) j (t )dt ,
0
i=1,2,....,M
j=1,2,....,M
(5.6)
1 if i j
0 i (t ) j (t )dt ij 0 if i j
T
(5.7)
www.rejinpaul.com
www.rejinpaul.com
(a) Synthesizer for generating the signal si(t). (b) Analyzer for
generating the set of signal vectors si.
www.rejinpaul.com
So,
Each signal in the set si(t) is completely
determined by the vector of its coefficients
si1
s
i2
.
si ,
.
.
siN
i 1,2,....,M
(5.8)
www.rejinpaul.com
Finally,
The signal vector si concept can be extended to 2D, 3D
etc. N-dimensional Euclidian space
Provides mathematical basis for the geometric
representation of energy signals that is used in noise
analysis
Allows definition of
Length of vectors (absolute value)
Angles between vectors
Squared value (inner product of si with itself)
si
siT si
N
= sij2 ,
Matrix
Transposition
i 1,2,....,M
(5.9)
j 1
www.rejinpaul.com
Figure 5.4
Illustrating the geometric
representation of signals
for the case when N 2
and M 3.
(two dimensional space,
three signals)
www.rejinpaul.com
Also,
What is the relation between the vector
representation of a signal and its energy value?
start with the
definition of average
energy in a signal
Where si(t) is
Ei si2 (t )dt
(5.10)
si (t ) sij j (t ), (5.5)
j 1
www.rejinpaul.com
N
N
k 1
0 j 1
T
After regrouping: Ei
j 1
s s (t ) (t )dt
k 1
ij ik
(5.11)
N
j(t) is orthogonal, so
2
E
i
ij = s i
finally we have:
j 1
The energy of a
signal is equal to the
squared length of its
vector
(5.12)
www.rejinpaul.com
T
i k
(5.13)
www.rejinpaul.com
Euclidian Distance
The Euclidean distance between two points
represented by vectors (signal vectors) is equal
to
||si-sk|| and the squared value is given by:
si s k
= (sij -skj ) 2
(5.14)
j 1
T
= ( si (t ) sk (t ))2 dt
0
www.rejinpaul.com
Generation of BPSK:
Consider a sinusoidal carrier. If it is modulated
by a bi-polar bit stream, its polarity will be
reversed every time the bit stream changes
polarity.
This, for a sinewave, is equivalent to a phase
reversal (shift). The multiplier output is a BPSK 1
signal.
www.rejinpaul.com
www.rejinpaul.com
www.rejinpaul.com
www.rejinpaul.com
s1 (t ) A cos(2f c 2f )t 0 t Tb (bit 1)
s2 (t ) A cos(2f c 2f )t 0 t Tb (bit 0)
Discontinuous / Continuous Phase
www.rejinpaul.com
sBFSK(t)= vH(t)
=
binary 0
2 Eb
cos(2f H t 1 )
Tb
0 t Tb
sBFSK(t)= vL(t)
=
2 Eb
cos(2f Lt 2 ) 0 t Tb
Tb
www.rejinpaul.com
2 Eb
sBFSK(t) =
cos(2f ct (t ))
Tb
=
2 Eb
cos 2f c t 2k FSK m( )d
Tb
where (t) =
2k FSK m( )d
www.rejinpaul.com
FSK Example
Data
1
FSK
Signal
x
a0
a1
0
1
VCO
modulated composite
signal
cos wct
Get useful study materials from www.rejinpaul.com
www.rejinpaul.com
1
f 4
1
f 2
www.rejinpaul.com
www.rejinpaul.com
VH (t )VL (t )dt 0
VH (t )VL (t )dt 0
(t )VH (t )dt 0
www.rejinpaul.com
then
and
2 Eb
cos( 2 ( f c f )t )
Tb
Tb
Eb
0 Tb cos(4f ct ) cos(4ft )dt
Tb
2 Eb
cos( 2 ( f c f )t )
Tb
2Eb
cos( 2 ( f c f )t ) cos( 2 ( f c f )t )
Tb
Eb
=
cos(2 (2 f c )t ) cos(2 (2f )t )
Tb
vH(t) vL(t) =
VH (t )VL (t )dt
0
and vL(t) =
Tb 4f c
4f 0
Tb
4f c
4f
www.rejinpaul.com
QPSK
Quadrature Phase Shift Keying (QPSK)
can be interpreted as two independent
BPSK systems (one on the I-channel
and one on Q-channel), and thus the
same performance but twice the
bandwidth (spectrum) efficiency.
www.rejinpaul.com
Carrier phases
{0, /2, , 3/2}
Carrier phases
{/4, 3/4, 5/4, 7/4}
www.rejinpaul.com
Types of QPSK
Q
Conventional QPSK
Offset QPSK
/4 QPSK
www.rejinpaul.com
Quadrature Phase Shift Keying (QPSK):
Also a type of linear modulation scheme
Quadrature Phase Shift Keying (QPSK) has twice the bandwidth efficiency of
BPSK, since 2 bits are transmitted in a single modulation symbol.
The phase of the carrier takes on 1 of 4 equally spaced values, such as
where each value of phase corresponds to a unique pair of message bits.
The QPSK signal for this set of symbol states may be defined as:
www.rejinpaul.com
QPSK
The striking result is that the bit error probability of QPSK is identical to
BPSK, but twice as much data can be sent in the same bandwidth. Thus,
when compared to BPSK, QPSK provides twice the spectral efficiency with
exactly the same energy efficiency.
Similar to BPSK, QPSK can also be differentially encoded to allow noncoherent detection.
www.rejinpaul.com
www.rejinpaul.com
Quadrature amplitude modulation
www.rejinpaul.com
QAM Transmitter
www.rejinpaul.com
www.rejinpaul.com
QAM Receiver
www.rejinpaul.com
www.rejinpaul.com
Carrier Synchronization
Synchronization is one of the most critical
functions of a communication system with
coherent receiver. To some extent, it is the
basis of a synchronous communication
system.
Carrier synchronization
Symbol/Bit synchronization
Frame synchronization
Get useful study materials from www.rejinpaul.com
www.rejinpaul.com
www.rejinpaul.com
Modulator
Bandpass
filter
Add
s(t)
-asin(ct)
cos(ct)
/2phase
shift
www.rejinpaul.com
www.rejinpaul.com
DPSK
DPSK is a kind of phase shift keying which
avoids the need for a coherent reference
signal at the receiver.
Differential BPSK
0 = same phase as last signal element
1 = 180 shift from last signal element
www.rejinpaul.com
www.rejinpaul.com
Thank you
www.rejinpaul.com
Unit - 5
Error Controlling Codes
www.rejinpaul.com
ENTROPY
The e t op of a sou e is defi ed as the sou e hi h p odu es a e age
i fo atio pe i di idual essage o s
ol i a pa ti ula i te al .
Then the number of messages is given as
www.rejinpaul.com
Co t
Thus the total amount of information due to L
www.rejinpaul.com
Co t
www.rejinpaul.com
PROPERTIES OF ENTROPY
The entropy of a discrete memoryless channel
source
Property 1
1. Entropy is zero, if the event is sure or its impossible
Co t
www.rejinpaul.com
Property 2
2. Entropy H= log2 K when the symbols are equally likely for K
symbols PK= 1/K
Co t
www.rejinpaul.com
Property 3
3. Maximum upper bound on entropy is
Co t
www.rejinpaul.com
www.rejinpaul.com
Co t
www.rejinpaul.com
Cont..
www.rejinpaul.com
RATE OF INFORMATION
RATE OF INFORMATION
www.rejinpaul.com
SOURCE CODING
An important problem in communication system is the
efficient representation of data generated by a source, which
can be achieved by source encoding (or) source coding
process
The device which performs source encoding is called source
encoder
www.rejinpaul.com
www.rejinpaul.com
www.rejinpaul.com
www.rejinpaul.com
STATEMENT
Shanon first theorem is stated as Given a discrete memoryless source of
entropy H, the average codeword length L for any distortionless source
encoding is bounded as
L>= H
According to source coding theorem the entropy H represents as the
fundamental limit on the average number of bits per source symbol
necessary to represent a discrete memoryless source
It can be made as small as, but not smaller than the entropy H thus, with
Lmin=H, then is represented as
= H/L
www.rejinpaul.com
www.rejinpaul.com
Co t
Approach
The code rate is given as
www.rejinpaul.com
STATEMENT
Two parts
www.rejinpaul.com
Signal power
Noise power
www.rejinpaul.com
MUTUAL INFORMATION
www.rejinpaul.com
MUTUAL INFORMATION
www.rejinpaul.com
www.rejinpaul.com
CHANNEL CAPACITY
www.rejinpaul.com
CHANNEL CAPACITY
What is channel capacity?
Co t
www.rejinpaul.com
Transmission efficiency
Redundancy
www.rejinpaul.com
Error Control
Coding
www.rejinpaul.com
Introduction
Error Control Coding (ECC)
www.rejinpaul.com
Transmission Model
Error
Digital
Source
Source
Encoder
Control
Coding
Line
Coding
Modulator
X(w)
(Transmit
Filter, etc)
Hc(w)
Transmitter
N(w)
Channel
Noise
+
Error
Digital
Source
Sink
Decoder
Control
Decoding
Demod
Line
Decoding
(Receive
Filter, etc)
Y(w)
Receiver
Get useful study materials from www.rejinpaul.com
Error Models
www.rejinpaul.com
IN
0
OUT
p
1
1
1-p
Get useful study materials from www.rejinpaul.com
www.rejinpaul.com
Error Models
Many other types
Burst errors, i.e., contiguous bursts of bit
errors
output from DFE (error propagation)
common in radio channels
Insertion, deletion and transposition errors
www.rejinpaul.com
www.rejinpaul.com
www.rejinpaul.com
Block Codes
We will consider only binary data
Data is grouped into blocks of length k bits
(dataword)
Each dataword is coded into blocks of length n
bits (codeword), where in general n>k
This is known as an (n,k) block code
www.rejinpaul.com
Block Codes
A vector notation is used for the datawords
and codewords,
Dataword d = (d1 d2.dk)
Codeword c = (c1 c2..cn)
www.rejinpaul.com
Dataword length k = 4
Codeword length n = 7
This is a (7,4) block code with code rate = 4/7
For example, d = (1101), c = (1101001)
www.rejinpaul.com
1000
1000
Source code
data chopped
into blocks
Channel
Dataword
(k bits)
Dataword
(k bits)
Codeword
(n bits)
coder
Codeword +
possible errors
(n bits)
Channel
decoder
Channel
Error flags
Get useful study materials from www.rejinpaul.com
www.rejinpaul.com
www.rejinpaul.com
Hamming Distance
Error control capability is determined by
the Hamming distance
The Hamming distance between two
codewords is equal to the number of
differences between them, e.g.,
10011011
11010010 have a Hamming distance = 3
www.rejinpaul.com
Hamming Distance
www.rejinpaul.com
Hamming Distance
If Hamming distance is:
2 can detect single errors (SED); i.e., a single error
will yield an invalid codeword
XOXOXO
X is a valid codeword
O in not a valid codeword
See that 2 errors will yield a valid (but
incorrect) codeword
www.rejinpaul.com
Hamming Distance
If Hamming distance is:
3 can correct single errors (SEC) or can detect
double errors (DED)
XOOXOOX
X is a valid codeword
O in not a valid codeword
See that 3 errors will yield a valid but incorrect
codeword
www.rejinpaul.com
X
O
O
X
X is a valid codeword
O is an invalid codeword
www.rejinpaul.com
Hamming Distance
d min 1
That is the maximum number of correctable
errors is given by,
d min 1
t
www.rejinpaul.com
www.rejinpaul.com
www.rejinpaul.com
www.rejinpaul.com
.
.
...
. .
ak 2 study
akn fromwww.rejinpaul.com
... materials
ak
ak1Get useful
www.rejinpaul.com
c di a i
i 1
www.rejinpaul.com
i 1
i 1
i 1
i 1
c3 d 3i a i (d1i d 2i )a i d1i a i d 2i a i
c3 c1 c2
Get useful study materials from www.rejinpaul.com
www.rejinpaul.com
c 0 ai 0
i 1
www.rejinpaul.com
www.rejinpaul.com
0
1
0
1
a1 = [1011]
a2 = [0101]
www.rejinpaul.com
G 0
1
1
1
1
www.rejinpaul.com
Systematic Codes
1
0
G
..
R=n-k
0 .. 1 pk1 pk 2 .. pkR
www.rejinpaul.com
Systematic Codes
I is k*k identity matrix. Ensures dataword
appears as beginning of codeword
P is k*R matrix.
www.rejinpaul.com
Data
0
1
1
0
www.rejinpaul.com
www.rejinpaul.com
CYCLIC CODES
www.rejinpaul.com
www.rejinpaul.com
Definition
An (n,k) linear code C is cyclic if every cyclic
shift of a codeword in C is also a codeword in
C.
If c0 c1 c2 . cn-2
cn-1 c0 c1 . cn-3
cn-2 cn-1 c0 . cn-4
: : :
:
c1 c2 c3 . cn-1
www.rejinpaul.com
www.rejinpaul.com
1 0 1 1 1
G
0
1
1
0
1
0
1
C
0
1 0 1 0
Get useful study materials from www.rejinpaul.com
www.rejinpaul.com
Example 3
The (7,4) Hamming code discussed before is
cyclic:
1010001
1101000
0110100
0011010
0001101
1000110
0100011
1110010
0111001
1011100
0101110
0010111
1001011
1100101
0000000
1111111
www.rejinpaul.com
G0
g1
gnk 1
gnk
g0
g1
gnk 1
gnk
g0
g1
gnk 1 gnk
0
0
0
gnk
g0
gnk 1
r n
www.rejinpaul.com
c1 m0 g1 m1g 0
c 2 m0 g 2 m1g1 m2 g 0
c n 1 m0 g n k m1g n k 1 mn k g 0
Notice that,k 1
C m j g 1 ; where m j 0, if j 0 or j k 1
j 0
and .
www.rejinpaul.com
Code Polynomial
Let c = c0 c1 c2 . cn-1. The code polynomial
of c: c(X) = c0 + c1X+ c2 X2 + . + cn-1 Xn-1
where the power of X corresponds to the bit position,
and
the coefficients are 0s and 1s.
Example:
1010001 1+X2+X6
0101110 X+X3+X4+X5
Each codeword is represented by a polynomial of degree
less than or equal n-1. deg[ c(X) ] n 1
Get useful study materials from www.rejinpaul.com
ax j bx j (a b) x j
(ax j ).(bx k ) (a . b) x j k
www.rejinpaul.com
Example:
m( x ) m0 m1 x m2 x 2
g ( x ) g 0 g1 x
addition
www.rejinpaul.com
www.rejinpaul.com
www.rejinpaul.com
www.rejinpaul.com
For the (7,4) code given in the Table, the nonzero code
polynomial of minimum degree is g(X) = 1 + X + X3
Get useful study materials from www.rejinpaul.com
www.rejinpaul.com
Generator Polynomial
Since the code is cyclic: Xg(X), X2g(X),., Xn-r-1g(X)
are code polynomials in C. (Note that deg[Xn-r1g(X)] = n-1).
Since the code is linear:
(a0 + a1X + . + an-r-1 Xn-r-1)g(X) is also a code
polynomial, where ai = 0 or 1.
www.rejinpaul.com
www.rejinpaul.com
Code
0000000
1101000
0110100
1011100
0011010
1110010
0101110
1000110
0001101
Code polynomials
0 = 0 . g(X)
1 + X + X3 = 1 . g(X)
X + X2 + X4 = X . g(X)
1 + X2 + X3 + X4 = (1 + X) . g(X)
X2 + X3 + X5 = X2 . g(X)
1 + X+ X2 + X5 = (1 + X2) . g(X)
X+ X3 + X4 + X5 = (X+ X2) . g(X)
1 + X4 + X5 = (1 + X + X2) . g(X)
X3 + X4 + X6 = X3 . g(X)
Get useful study materials from www.rejinpaul.com
www.rejinpaul.com
Code
1100101
0111001
1010001
0010111
1111111
0111 0100011
1111 1001011
Code polynomials
1 + X + X4 + X6 = (1 + X3) . g(X)
X+ X2 + X3 + X6 = (X+ X3) . g(X)
1 + X2 + X6 = (1 + X + X3) . g(X)
X2 + X4 + X5 + X6 = (X2 + X3). g(X)
1 + X + X2 + X 3 + X 4 + X 5 + X 6
= (1 + X2 + X3) . g(X)
X + X5 + X6 = (X + X2 + X3). g(X)
1 + X 3 + X 5 + X6
= (1 + X + X2 + X3) . g(X)
Get useful study materials from www.rejinpaul.com
www.rejinpaul.com
Constructing g(X)
The generator polynomial g(X) of an (n,k) cyclic
code is a factor of Xn+1.
Xkg(X) is a polynomial of degree n.
Xkg(X)/ (Xn+1)=1 and remainder r(X). Xkg(X) = (Xn+1)+ r(X).
But r(X)=Rem[Xkg(X)/(Xn+1)]=g(k)(X) =code polynomial= a(X)g(X).
Therefore, Xn+1= Xkg(X) + a(X)g(X)= {Xk + a(X)}g(X). Q.E.D.
www.rejinpaul.com
www.rejinpaul.com
gr
gr-1
gr-2
g1
g0
Output
Input
Get useful study materials from www.rejinpaul.com
www.rejinpaul.com
g0
g1
g2
gr-1
gr
Output
Input
Get useful study materials from www.rejinpaul.com
www.rejinpaul.com
www.rejinpaul.com
www.rejinpaul.com
Output
g0
g1
g2
gr-1
gr
Input
www.rejinpaul.com
Encoder Circuit
Gate
g1
g2
gr-1
www.rejinpaul.com
Input
Register :
000
initial
+
1
110
1st shift
1
101
2nd shift
3rd shift
0
100
1
100
4th shift
Codeword: 1 0 0 1 0 1 1
Get useful study materials from www.rejinpaul.com
www.rejinpaul.com
Parity-Check Polynomial
Xn +1 = g(X)h(X)
deg[g(x)] = n-k, deg[h(x)] = k
g(x)h(X) mod (Xn +1) = 0.
h(X) is called the parity-check polynomial. It
plays the rule of the H matrix for linear codes.
h(X) is the generator polynomial of an (n,n-k)
cyclic code, which is the dual of the (n,k) code
generated by g(X).
Get useful study materials from www.rejinpaul.com
www.rejinpaul.com
www.rejinpaul.com
Syndrome Computation
Received word: r(X) = r0 + r1X +.+ rn-1Xn-1
If r(X) is a correct codeword, it is divisible by g(X).
Otherwise: r(X) = q(X)g(X) + s(X).
deg[s(X)] n-k-1.
s(X) is called
the syndrome polynomial.
s(X) = Rem[r(X)/g(X)] = Rem[ (a(X)g(X) + e(X))/g(x)]
= Rem[e(X)/g(X)]
The syndrome polynomial depends on the error pattern
only.
s(X) is obtained by shifting r(X) into a divider-by-g(X)
circuit. The register contents are the syndrome bits.
Get useful study materials from www.rejinpaul.com
www.rejinpaul.com
+
Shift
1
2
3
4
5
6
7
Input
0
1
1
0
1
0
0
Register contents
0 0 0 (initial state)
000
100
110
011
011
111
1 0 1 (syndrome s)
What is g(x)?
Find the syndrome using
long division.
Find the syndrome using
the shortcut for the
remainder.
www.rejinpaul.com
www.rejinpaul.com
Meggit Decoder
Shift r(X) into the buffer B and the syndrome
register R simultaneously. Once r(X) is completely
shifted in B, R will contain s(X), the syndrome of
r(X).
1. Based on the contents of R, the detection circuit
yields the output e (0 or 1).
2. During the next clock cycle:
(a) Add e to the rightmost bit of B while shifting
the contents of B. (The rightmost bit of B may be
read out). Call the modified content of B r1(1)(X).
Get useful study materials from www.rejinpaul.com
www.rejinpaul.com
www.rejinpaul.com
www.rejinpaul.com
www.rejinpaul.com
www.rejinpaul.com
More on Syndrome Computation
(contd)
Gate
r = 0010110
Gate +
Shift
Input
1
2
3
4
5
6
7
8 (input gate off)
9
0
1
1
0
1
0
0
-
Register contents
0 0 0 (initial state)
000
100
110
011
011
111
1 0 1 (syndrome s)
1 0 0 (syndrome s (1) )
0 1 0 (syndrome s (2) )
www.rejinpaul.com
www.rejinpaul.com
Worked Example
Consider the (7,4) Hamming code generated by 1+X+X3.
Error pattern
X6
X
X4
X3
X2
X1
X0
Syndrome polynomial.
1 + X2
1 + X + X2
X + X2
1+X
X2
X
1
101
111
011
110
001
010
100
Let c = 1 0 0 1 0 1 1 and r = 1 0 1 1 0 1 1
Get useful study materials from www.rejinpaul.com
www.rejinpaul.com
www.rejinpaul.com
www.rejinpaul.com
i
a
2 j mod n
www.rejinpaul.com
www.rejinpaul.com
Design Example
X15 + 1 has the roots 1= a0, a1 , ., a14.
Conjugate group
polynomial
a0)
(a, a2 , a4 , a8)
(a3 , a6 , a9 , a12)
X4
(a5 , a10)
(a7, a14 , a13 , a11)
Corresponding
f1X1 + X
f2X 1 + X + X4
f3X 1 + X + X2 + X3 +
f4X 1 + X + X2
f5X 1 + X3 + X4
www.rejinpaul.com
www.rejinpaul.com
Cyclic Codes
BCH Codes
Linear
Codes
Hamming Codes
www.rejinpaul.com
BCH Codes
Definition of the codes:
For any positive integers m (m>2) and t0 (t0 <
n/2), there is a BCH binary code of length n =
2m - 1 which corrects all combinations of t0 or
fewer errors and has no more than mt0 paritycheck bits.
Block length
2m 1
n k mt 0
d min 2t 0 1
www.rejinpaul.com
k
4
11
7
5
26
16
11
d (designed) d ( actual)
3
3
3
3
5
5
7
7
3
3
5
7
7
11
g(X)*
13
23
721
2463
45
107657
5423325
www.rejinpaul.com
www.rejinpaul.com
k
3
10
9
25
56
55
499
1010
b
2
2
3
2
2
3
4
4
g(X) (octal)
35 (try to find dmin!)
65
171
161
355
711
10451
22365
www.rejinpaul.com
Error Correction
Encoder
To
Error Correction
Decoder
CRC
Syndrom
e Checker
To
Info Sink
Transmitter
www.rejinpaul.com
1 2 r
Code
Coverage
CRC-12
0.999756
CRC-ANSI
0.999985
CRC-32A
0.99999999977
www.rejinpaul.com
Basic Definitions
www.rejinpaul.com
Generator Polynomial
A convolutional code may be defined by a set
of n generating polynomials for each input bit.
For the circuit under consideration:
g1(D) = 1 + D + D2
g2(D) = 1 + D2
www.rejinpaul.com
www.rejinpaul.com
www.rejinpaul.com
Decoding
A message m is encoded into the code
sequence c.
Each code sequence represents a path in
the trellis diagram.
Minimum Distance Decoding
Upon receiving the received sequence r, search
for the path that is closest ( in Hamming
distance) to r .
Get useful study materials from www.rejinpaul.com
www.rejinpaul.com
www.rejinpaul.com
www.rejinpaul.com
www.rejinpaul.com
This is the
survival
path in
this
example
Decoded
sequence is
m=[10 1110]
Add the weight of the
path at each state
from www.rejinpaul.com
www.rejinpaul.com
www.rejinpaul.com
www.rejinpaul.com
www.rejinpaul.com
www.rejinpaul.com
www.rejinpaul.com
.. 00 11 10 11 00 ..
a0 b c a1
(D2LN)(DL)(D2L) = D5L3N
=1, diverges from the allzero path by 3
.. 00 11 01 01 00 10 11 00 ..
a0 b d c b c a1
(D2LN)(DLN)(DL)(DL)(LN)(D2L) = D7L6N3
=3, diverges from the allzero path by 6
Get useful study materials from www.rejinpaul.com
www.rejinpaul.com
Transfer Function
Input-Output relations:
a0 = 1
b = D2LN a0 + LNc
c = DLb + DLNd
d = DLNb + DLNd
a1 = D2Lc
www.rejinpaul.com
www.rejinpaul.com
m
through the trellis diagram
What is the probability that the code sequence is sent and the
c
binary sequence
is received?
dH y,
c
mdH y,
c
Pr y |
c p
.(1 p)
www.rejinpaul.com
d y, c
c min
Pr y,
cCm H
cCm
Choose the code sequence through the trellis which has the
max
www.rejinpaul.com
www.rejinpaul.com
www.rejinpaul.com
Therefore we assign:
Z j 0 0
Z j 0 for all other states
www.rejinpaul.com
into state j at time i+1. We wish to find the most likely one.
ci
Let sc i be the state from which the code segment
emerged
ci
For each state j, we assume that
into
state j if:
Z s
c i i d
c ,y
H i
www.rejinpaul.com
i d c i , y
Z i 1 Z
s
ci
j
H
www.rejinpaul.com
c = (0 0 1 1
y
= (0 1 1 1
01
00
10
10
1 1) is sent
01
00
10
10
1 1) is received.
What path through the trellis does the Viterbi Algorithm choose?
www.rejinpaul.com
www.rejinpaul.com
SUMMARY
Learnt about the concepts of Entropy and the
source coding techniques
Statement and the theorems of Shanon
Concepts about mutual information and
channel capacity
Understand error control coding techniques
and the concepts about linear block codes,
cyclic codes, convolution codes & viterbi
decoding algorithm
Get useful study materials from www.rejinpaul.com
www.rejinpaul.com
Thank you