SlideShare a Scribd company logo
1 of 25
EE436 Lecture Notes 1
EEE436
DIGITAL COMMUNICATION
Coding
En. Mohd Nazri Mahmud
MPhil (Cambridge, UK)
BEng (Essex, UK)
nazriee@eng.usm.my
Room 2.14
EE436 Lecture Notes 2
Convolutional Codes
Unlike block codes that operate on block-by-block basis, the
convolutional codes are based on message bits that come in serially
rather than in blocks.
The structure of a generic convolutional encoder can be written in a
compact form of (n, k, L) ; n= no of streams, or no of modulo-2 adder;
k=number of group of shift register; L=number of state of the shift register
The encoder takes an L-bit message sequence to produce a coded
output sequence of length n(L+M) bits, where n=no of stream of the
encoded bits, M=no of bits of message sequence
The encoder is implemented by a tapped shift register with L+1
stages.
EE436 Lecture Notes 3
Convolutional Codes
The message bits in the register are combined by modulo-2 addition
to form the encoded bit, cj
Cj = mj-L.gL + …..+ mj-1.g1 + mj.g0
=



L
i
i
g
i
j
m
0
.
cj
EE436 Lecture Notes 4
Convolutional Codes – Example
A (2,1,2) convolutional encoder with n=2, k=1 and L=2
c’j
c’’j
EE436 Lecture Notes 5
Convolutional Codes
To provide the extra check bits for error control, the encoded bits
from multiple streams are interleaved.
For example, a convolutional encoder with n=2 (ie two streams of
encoded bits)
Encoded bits from stream 1, c’j = mj-2 + mj-1 + mj
c’j
c’’j
Encoded bits from stream 2, c’’j = mj-2 + mj
interleaved
C= c’1c’’1c’2c’’2c’3c’’3………..
EE436 Lecture Notes 6
Convolutional Codes
Each stream may be characterised in terms of its impulse response
( the response of that stream to a symbol 1 with zero initial
condition).
Every stream is also characterised in terms of a generator
polynomial, which is the unit-delay transform of the impulse
response
       





 i
M
g
i
g
i
g
i
g ,........,
2
,
1
,
0
Let the following generator sequence denotes the impulse
response of the i-th path
The generator polynomial of the i-th path is given by
          





 



 M
D
i
M
g
D
i
g
D
i
g
i
g
D
i
g ........
2
2
1
0
Where D denotes the unit-delay variable
EE436 Lecture Notes 7
Convolutional Codes – Example
A convolutional encoder with two streams of encoded bits with
message sequence 10011 as an input
c’j
c’’j
Stream 1
Stream 2
First, we find the impulse response of both streams to a symbol 1.
Impulse response of stream 1 = (1 1 1)
Impulse response of stream 2 = (1 0 1)
Then, write the corresponding generator polynomial of both streams
          





 



 M
D
i
M
g
D
i
g
D
i
g
i
g
D
i
g ........
2
2
1
0
EE436 Lecture Notes 8
Convolutional Codes – Example
First, we find the impulse response of both streams to a symbol 1.
Impulse response of stream 1 = (1 1 1)
Impulse response of stream 2 = (1 0 1)
Then, write the corresponding generator polynomials of both streams
   




 

 2
1
1
D
D
D
g
   




 
 2
1
2
D
D
g
Then, write the message polynomial for input message (10011)
  




 

 4
3
1 D
D
D
m
Then, find the output polynomial for both streams by multiplying the
generator polynomial and the message polynomial
EE436 Lecture Notes 9
Convolutional Codes – Example
Then, find the output polynomial for both streams by multiplying the
generator polynomial and the message polynomial
       




  D
m
D
g
D
c .
2
2
       




  D
m
D
g
D
c .
1
1
= (1 + D + D2)(1 + D3 + D4)
= 1 + D + D2 + D3 + D6
= (1 + D2)(1 + D3 + D4)
= 1 + D2 + D3 + D4 + D5 + D6
So, the output sequence for stream 1
is 1111001
The output sequence for stream 2
is 1011111
Interleave
C = 11,10,11,11,01,01,11
Original message (10011)
Encoded sequence (11101111010111)
EE436 Lecture Notes 10
Convolutional Codes – Exercise
A convolutional encoder with two streams of encoded bits with
message sequence 110111001 as an input
c’j
c’’j
Stream 1
Stream 2
EE436 Lecture Notes 11
Convolutional Codes – Exercise
First, we find the impulse response of both streams to a symbol 1.
Impulse response of stream 1 = (1 1 1)
Impulse response of stream 2 = (1 0 1)
Then, write the corresponding generator polynomials of both streams
   




 

 2
1
1
D
D
D
g
   




 
 2
1
2
D
D
g
Then, write the message polynomial for input message (110111001)
  




 




 8
5
4
3
1 D
D
D
D
D
D
m
Then, find the output polynomial for both streams by multiplying the
generator polynomial and the message polynomial
EE436 Lecture Notes 12
Convolutional Codes – Exercise
Then, find the output polynomial for both streams by multiplying the
generator polynomial and the message polynomial
       




  D
m
D
g
D
c .
2
2
       




  D
m
D
g
D
c .
1
1
= 1 + D5 + D7 + D8 + D9 + D10 = 1 + D +D2 + D4 + D6 + D7 + D8 + D10
So, the output sequence for stream 1
is 10000101111
The output sequence for stream 2
is 11101011101
Interleave
C = 11 01 01 00 01 10 01 11 11 10 11
Original message (110111001)
Encoded sequence (11 01 01 00 01 10 01 11 11 10 11 )
EE436 Lecture Notes 13
Convolutional Codes – Code Tree, Trellis and State Diagram
Draw a code tree for the convolutional encoder below.
c’j
c’’j
Stream 1
Stream 2
EE436 Lecture Notes 14
Code Tree
EE436 Lecture Notes 15
Trellis
EE436 Lecture Notes 16
State Diagram
EE436 Lecture Notes 17
Maximum Likelihood Decoding of a Convolutional Code
Let m denotes a message vector
c denotes the corresponding code vector
r the received code vector (which may differ from c due to channel noise)
Given the received vector r, the decoder is required to make an estimate m^
of the message vector
Since there is a one-to-one correspondence between the message vector m and
the code vector c, therefore
m^ = m only if c^ = c , otherwise a decoding error is committed
The decoding rule is said to be optimum when the probability of decoding error is
minimised
EE436 Lecture Notes 18
Maximum Likelihood Decoding of a Convolutional Code
Let say both the transmitted code vector c and the received vector r represent
binary sequence of length N.
These two sequences may differ from each other in some locations because of
errors due to channel noise.
Let ci and ri denote the ith element of c and r respectively
We then have
   
i
i
N
i
c
r
p
c
r
p
1

 
The decoding rule is said to be optimum when the probability of decoding error is
minimised
EE436 Lecture Notes 19
   
i
i
N
i
c
r
p
c
r
p
1

 
Correspondingly, the log-likelihood is
   
i
i
N
i
c
r
p
c
r
p log
log
1

 
Let the transition probability be defined as
 
i
i c
r
p
   p
p
i
i c
r
p 
 1
If i
i c
r 
If i
i c
r 
The probability of decoding error is minimised if the log-likelihood
function is maximized (the estimate c^ is chosen to maximise the function)
EE436 Lecture Notes 20
Suppose also that the received vector r differs from the transmitted code vector c in
exactly d positions (where d is the Hamming distance between vectors r and c)
We may rewrite the log-likelihood function
   
i
i
N
i
c
r
p
c
r
p log
log
1

 
as
     
p
d
N
p
d
c
r
p 


 1
log
log
log
 
p
N
p
p
d 










 1
log
1
log
EE436 Lecture Notes 21
     
p
d
N
p
d
c
r
p 


 1
log
log
log
 
p
N
p
p
d 










 1
log
1
log
In general, the probability of error occurring is low enough for us to assume p < ½
And also that Nlog(1-p) is constant for all c.
The function is maximised when d is minimised. (ie the smallest Hamming distance)
“ Choose the estimate c^ that minimise the Hamming distance between
The received vector r and the transmitted vector c.”
The maximum likelihood decoder is reduced to a minimum distance decoder.
The received vector r is compared with each possible transmitted code vector c
and the particular one “closest” to r is chosen as the correct transmitted code vector.
EE436 Lecture Notes 22
The Viterbi Algorithm
The equivalence between maximum likelihood decoding and minimum distance
decoding implies that we may decode a convolutional code by choosing a path
in the code tree whose coded sequence differs from the received sequence in the
fewest number of places
Since a code tree is equivalent to a trellis, we may limit our choice to the possible
Paths in the trellis representation of the code.
Viterbi algorithm operates by computing a metric or discrepancy for every possible
Path in the trellis
The metric for a particular path is defined as the Hamming distance between the
Coded sequence represented by that path and the received sequence.
For each state in the trellis, the algorithm compares the two paths entering the node
And the path with the lower metric is retained.
The retained paths are called survivors.
The sequence along the path with the smallest metric is the maximum likelihood
Choice and represent the transmitted sequence
EE436 Lecture Notes 23
The Viterbi Algorithm -example
In the circuit beliow, suppose that the encoder generates an all-zero sequence and
that the received sequence is (0100010000…) in which the are two errors due to
channel noise: one in second bit and the other in the sixth bit.
We can show that this double-error pattern is correctable using the Viterbi algorithm.
c’j
c’’j
Stream 1
Stream 2
EE436 Lecture Notes 24
The Viterbi Algorithm -example
EE436 Lecture Notes 25
The Viterbi Algorithm -exercise
Using the same circuit, suppose that the received sequence is 110111.
Using the Viterbi algorithm, what is the corresponding encoded sequence
transmitted by the receiver? What is the original message bit?

More Related Content

Similar to Digital communication coding Lectures Slides.ppt

The International Journal of Engineering and Science (The IJES)
The International Journal of Engineering and Science (The IJES)The International Journal of Engineering and Science (The IJES)
The International Journal of Engineering and Science (The IJES)theijes
 
Digital Communication: Channel Coding
Digital Communication: Channel CodingDigital Communication: Channel Coding
Digital Communication: Channel CodingDr. Sanjay M. Gulhane
 
Design and Performance Analysis of Convolutional Encoder and Viterbi Decoder ...
Design and Performance Analysis of Convolutional Encoder and Viterbi Decoder ...Design and Performance Analysis of Convolutional Encoder and Viterbi Decoder ...
Design and Performance Analysis of Convolutional Encoder and Viterbi Decoder ...IJERA Editor
 
Introduction to communication system lecture5
Introduction to communication system lecture5Introduction to communication system lecture5
Introduction to communication system lecture5Jumaan Ally Mohamed
 
Chapter 10: Error Correction and Detection
Chapter 10: Error Correction and DetectionChapter 10: Error Correction and Detection
Chapter 10: Error Correction and DetectionJeoffnaRuth
 
Communication system lec5
Communication system  lec5Communication system  lec5
Communication system lec5ZareenRauf1
 
A method to determine partial weight enumerator for linear block codes
A method to determine partial weight enumerator for linear block codesA method to determine partial weight enumerator for linear block codes
A method to determine partial weight enumerator for linear block codesAlexander Decker
 
FYBSC IT Digital Electronics Unit IV Chapter I Multiplexer, Demultiplexer, AL...
FYBSC IT Digital Electronics Unit IV Chapter I Multiplexer, Demultiplexer, AL...FYBSC IT Digital Electronics Unit IV Chapter I Multiplexer, Demultiplexer, AL...
FYBSC IT Digital Electronics Unit IV Chapter I Multiplexer, Demultiplexer, AL...Arti Parab Academics
 
A Low Power VITERBI Decoder Design With Minimum Transition Hybrid Register Ex...
A Low Power VITERBI Decoder Design With Minimum Transition Hybrid Register Ex...A Low Power VITERBI Decoder Design With Minimum Transition Hybrid Register Ex...
A Low Power VITERBI Decoder Design With Minimum Transition Hybrid Register Ex...VLSICS Design
 
Performances des turbo codes parallèles pour un canal satellite non linéaire
Performances des turbo codes parallèles pour un canal satellite non linéairePerformances des turbo codes parallèles pour un canal satellite non linéaire
Performances des turbo codes parallèles pour un canal satellite non linéaireRachidz
 
A Nutshell On Convolutional Codes (Representations)
A Nutshell On Convolutional Codes (Representations)A Nutshell On Convolutional Codes (Representations)
A Nutshell On Convolutional Codes (Representations)alka swara
 

Similar to Digital communication coding Lectures Slides.ppt (20)

Lossy
LossyLossy
Lossy
 
Slides
SlidesSlides
Slides
 
The International Journal of Engineering and Science (The IJES)
The International Journal of Engineering and Science (The IJES)The International Journal of Engineering and Science (The IJES)
The International Journal of Engineering and Science (The IJES)
 
Digital Communication: Channel Coding
Digital Communication: Channel CodingDigital Communication: Channel Coding
Digital Communication: Channel Coding
 
Research Paper
Research PaperResearch Paper
Research Paper
 
Channel Coding (Error Control Coding)
Channel Coding (Error Control Coding)Channel Coding (Error Control Coding)
Channel Coding (Error Control Coding)
 
Design and Performance Analysis of Convolutional Encoder and Viterbi Decoder ...
Design and Performance Analysis of Convolutional Encoder and Viterbi Decoder ...Design and Performance Analysis of Convolutional Encoder and Viterbi Decoder ...
Design and Performance Analysis of Convolutional Encoder and Viterbi Decoder ...
 
Introduction to communication system lecture5
Introduction to communication system lecture5Introduction to communication system lecture5
Introduction to communication system lecture5
 
error control coding
error control coding error control coding
error control coding
 
Chapter 10: Error Correction and Detection
Chapter 10: Error Correction and DetectionChapter 10: Error Correction and Detection
Chapter 10: Error Correction and Detection
 
Turbo Code
Turbo Code Turbo Code
Turbo Code
 
dsp
dspdsp
dsp
 
Communication system lec5
Communication system  lec5Communication system  lec5
Communication system lec5
 
A method to determine partial weight enumerator for linear block codes
A method to determine partial weight enumerator for linear block codesA method to determine partial weight enumerator for linear block codes
A method to determine partial weight enumerator for linear block codes
 
Unit-1.pptx
Unit-1.pptxUnit-1.pptx
Unit-1.pptx
 
FYBSC IT Digital Electronics Unit IV Chapter I Multiplexer, Demultiplexer, AL...
FYBSC IT Digital Electronics Unit IV Chapter I Multiplexer, Demultiplexer, AL...FYBSC IT Digital Electronics Unit IV Chapter I Multiplexer, Demultiplexer, AL...
FYBSC IT Digital Electronics Unit IV Chapter I Multiplexer, Demultiplexer, AL...
 
A Low Power VITERBI Decoder Design With Minimum Transition Hybrid Register Ex...
A Low Power VITERBI Decoder Design With Minimum Transition Hybrid Register Ex...A Low Power VITERBI Decoder Design With Minimum Transition Hybrid Register Ex...
A Low Power VITERBI Decoder Design With Minimum Transition Hybrid Register Ex...
 
Performances des turbo codes parallèles pour un canal satellite non linéaire
Performances des turbo codes parallèles pour un canal satellite non linéairePerformances des turbo codes parallèles pour un canal satellite non linéaire
Performances des turbo codes parallèles pour un canal satellite non linéaire
 
Lecture-10.pptx
Lecture-10.pptxLecture-10.pptx
Lecture-10.pptx
 
A Nutshell On Convolutional Codes (Representations)
A Nutshell On Convolutional Codes (Representations)A Nutshell On Convolutional Codes (Representations)
A Nutshell On Convolutional Codes (Representations)
 

Recently uploaded

Unsatisfied Bhabhi ℂall Girls Ahmedabad Book Esha 6378878445 Top Class ℂall G...
Unsatisfied Bhabhi ℂall Girls Ahmedabad Book Esha 6378878445 Top Class ℂall G...Unsatisfied Bhabhi ℂall Girls Ahmedabad Book Esha 6378878445 Top Class ℂall G...
Unsatisfied Bhabhi ℂall Girls Ahmedabad Book Esha 6378878445 Top Class ℂall G...Payal Garg #K09
 
Computer Networks Basics of Network Devices
Computer Networks  Basics of Network DevicesComputer Networks  Basics of Network Devices
Computer Networks Basics of Network DevicesChandrakantDivate1
 
analog-vs-digital-communication (concept of analog and digital).pptx
analog-vs-digital-communication (concept of analog and digital).pptxanalog-vs-digital-communication (concept of analog and digital).pptx
analog-vs-digital-communication (concept of analog and digital).pptxKarpagam Institute of Teechnology
 
Fundamentals of Structure in C Programming
Fundamentals of Structure in C ProgrammingFundamentals of Structure in C Programming
Fundamentals of Structure in C ProgrammingChandrakantDivate1
 
8th International Conference on Soft Computing, Mathematics and Control (SMC ...
8th International Conference on Soft Computing, Mathematics and Control (SMC ...8th International Conference on Soft Computing, Mathematics and Control (SMC ...
8th International Conference on Soft Computing, Mathematics and Control (SMC ...josephjonse
 
TMU_GDSC_20240509.pdfTMU_GDSC_20240509.pdf
TMU_GDSC_20240509.pdfTMU_GDSC_20240509.pdfTMU_GDSC_20240509.pdfTMU_GDSC_20240509.pdf
TMU_GDSC_20240509.pdfTMU_GDSC_20240509.pdfssuserded2d4
 
litvinenko_Henry_Intrusion_Hong-Kong_2024.pdf
litvinenko_Henry_Intrusion_Hong-Kong_2024.pdflitvinenko_Henry_Intrusion_Hong-Kong_2024.pdf
litvinenko_Henry_Intrusion_Hong-Kong_2024.pdfAlexander Litvinenko
 
Call for Papers - Journal of Electrical Systems (JES), E-ISSN: 1112-5209, ind...
Call for Papers - Journal of Electrical Systems (JES), E-ISSN: 1112-5209, ind...Call for Papers - Journal of Electrical Systems (JES), E-ISSN: 1112-5209, ind...
Call for Papers - Journal of Electrical Systems (JES), E-ISSN: 1112-5209, ind...Christo Ananth
 
INTERRUPT CONTROLLER 8259 MICROPROCESSOR
INTERRUPT CONTROLLER 8259 MICROPROCESSORINTERRUPT CONTROLLER 8259 MICROPROCESSOR
INTERRUPT CONTROLLER 8259 MICROPROCESSORTanishkaHira1
 
PE 459 LECTURE 2- natural gas basic concepts and properties
PE 459 LECTURE 2- natural gas basic concepts and propertiesPE 459 LECTURE 2- natural gas basic concepts and properties
PE 459 LECTURE 2- natural gas basic concepts and propertiessarkmank1
 
Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayEpec Engineered Technologies
 
Introduction to Geographic Information Systems
Introduction to Geographic Information SystemsIntroduction to Geographic Information Systems
Introduction to Geographic Information SystemsAnge Felix NSANZIYERA
 
Electromagnetic relays used for power system .pptx
Electromagnetic relays used for power system .pptxElectromagnetic relays used for power system .pptx
Electromagnetic relays used for power system .pptxNANDHAKUMARA10
 
Working Principle of Echo Sounder and Doppler Effect.pdf
Working Principle of Echo Sounder and Doppler Effect.pdfWorking Principle of Echo Sounder and Doppler Effect.pdf
Working Principle of Echo Sounder and Doppler Effect.pdfSkNahidulIslamShrabo
 
Post office management system project ..pdf
Post office management system project ..pdfPost office management system project ..pdf
Post office management system project ..pdfKamal Acharya
 
Introduction to Artificial Intelligence ( AI)
Introduction to Artificial Intelligence ( AI)Introduction to Artificial Intelligence ( AI)
Introduction to Artificial Intelligence ( AI)ChandrakantDivate1
 
21P35A0312 Internship eccccccReport.docx
21P35A0312 Internship eccccccReport.docx21P35A0312 Internship eccccccReport.docx
21P35A0312 Internship eccccccReport.docxrahulmanepalli02
 
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdfAldoGarca30
 
Scouring of cotton and wool fabric with effective scouring method
Scouring of cotton and wool fabric with effective scouring methodScouring of cotton and wool fabric with effective scouring method
Scouring of cotton and wool fabric with effective scouring methodvimal412355
 
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptxHOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptxSCMS School of Architecture
 

Recently uploaded (20)

Unsatisfied Bhabhi ℂall Girls Ahmedabad Book Esha 6378878445 Top Class ℂall G...
Unsatisfied Bhabhi ℂall Girls Ahmedabad Book Esha 6378878445 Top Class ℂall G...Unsatisfied Bhabhi ℂall Girls Ahmedabad Book Esha 6378878445 Top Class ℂall G...
Unsatisfied Bhabhi ℂall Girls Ahmedabad Book Esha 6378878445 Top Class ℂall G...
 
Computer Networks Basics of Network Devices
Computer Networks  Basics of Network DevicesComputer Networks  Basics of Network Devices
Computer Networks Basics of Network Devices
 
analog-vs-digital-communication (concept of analog and digital).pptx
analog-vs-digital-communication (concept of analog and digital).pptxanalog-vs-digital-communication (concept of analog and digital).pptx
analog-vs-digital-communication (concept of analog and digital).pptx
 
Fundamentals of Structure in C Programming
Fundamentals of Structure in C ProgrammingFundamentals of Structure in C Programming
Fundamentals of Structure in C Programming
 
8th International Conference on Soft Computing, Mathematics and Control (SMC ...
8th International Conference on Soft Computing, Mathematics and Control (SMC ...8th International Conference on Soft Computing, Mathematics and Control (SMC ...
8th International Conference on Soft Computing, Mathematics and Control (SMC ...
 
TMU_GDSC_20240509.pdfTMU_GDSC_20240509.pdf
TMU_GDSC_20240509.pdfTMU_GDSC_20240509.pdfTMU_GDSC_20240509.pdfTMU_GDSC_20240509.pdf
TMU_GDSC_20240509.pdfTMU_GDSC_20240509.pdf
 
litvinenko_Henry_Intrusion_Hong-Kong_2024.pdf
litvinenko_Henry_Intrusion_Hong-Kong_2024.pdflitvinenko_Henry_Intrusion_Hong-Kong_2024.pdf
litvinenko_Henry_Intrusion_Hong-Kong_2024.pdf
 
Call for Papers - Journal of Electrical Systems (JES), E-ISSN: 1112-5209, ind...
Call for Papers - Journal of Electrical Systems (JES), E-ISSN: 1112-5209, ind...Call for Papers - Journal of Electrical Systems (JES), E-ISSN: 1112-5209, ind...
Call for Papers - Journal of Electrical Systems (JES), E-ISSN: 1112-5209, ind...
 
INTERRUPT CONTROLLER 8259 MICROPROCESSOR
INTERRUPT CONTROLLER 8259 MICROPROCESSORINTERRUPT CONTROLLER 8259 MICROPROCESSOR
INTERRUPT CONTROLLER 8259 MICROPROCESSOR
 
PE 459 LECTURE 2- natural gas basic concepts and properties
PE 459 LECTURE 2- natural gas basic concepts and propertiesPE 459 LECTURE 2- natural gas basic concepts and properties
PE 459 LECTURE 2- natural gas basic concepts and properties
 
Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power Play
 
Introduction to Geographic Information Systems
Introduction to Geographic Information SystemsIntroduction to Geographic Information Systems
Introduction to Geographic Information Systems
 
Electromagnetic relays used for power system .pptx
Electromagnetic relays used for power system .pptxElectromagnetic relays used for power system .pptx
Electromagnetic relays used for power system .pptx
 
Working Principle of Echo Sounder and Doppler Effect.pdf
Working Principle of Echo Sounder and Doppler Effect.pdfWorking Principle of Echo Sounder and Doppler Effect.pdf
Working Principle of Echo Sounder and Doppler Effect.pdf
 
Post office management system project ..pdf
Post office management system project ..pdfPost office management system project ..pdf
Post office management system project ..pdf
 
Introduction to Artificial Intelligence ( AI)
Introduction to Artificial Intelligence ( AI)Introduction to Artificial Intelligence ( AI)
Introduction to Artificial Intelligence ( AI)
 
21P35A0312 Internship eccccccReport.docx
21P35A0312 Internship eccccccReport.docx21P35A0312 Internship eccccccReport.docx
21P35A0312 Internship eccccccReport.docx
 
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
 
Scouring of cotton and wool fabric with effective scouring method
Scouring of cotton and wool fabric with effective scouring methodScouring of cotton and wool fabric with effective scouring method
Scouring of cotton and wool fabric with effective scouring method
 
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptxHOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
 

Digital communication coding Lectures Slides.ppt

  • 1. EE436 Lecture Notes 1 EEE436 DIGITAL COMMUNICATION Coding En. Mohd Nazri Mahmud MPhil (Cambridge, UK) BEng (Essex, UK) nazriee@eng.usm.my Room 2.14
  • 2. EE436 Lecture Notes 2 Convolutional Codes Unlike block codes that operate on block-by-block basis, the convolutional codes are based on message bits that come in serially rather than in blocks. The structure of a generic convolutional encoder can be written in a compact form of (n, k, L) ; n= no of streams, or no of modulo-2 adder; k=number of group of shift register; L=number of state of the shift register The encoder takes an L-bit message sequence to produce a coded output sequence of length n(L+M) bits, where n=no of stream of the encoded bits, M=no of bits of message sequence The encoder is implemented by a tapped shift register with L+1 stages.
  • 3. EE436 Lecture Notes 3 Convolutional Codes The message bits in the register are combined by modulo-2 addition to form the encoded bit, cj Cj = mj-L.gL + …..+ mj-1.g1 + mj.g0 =    L i i g i j m 0 . cj
  • 4. EE436 Lecture Notes 4 Convolutional Codes – Example A (2,1,2) convolutional encoder with n=2, k=1 and L=2 c’j c’’j
  • 5. EE436 Lecture Notes 5 Convolutional Codes To provide the extra check bits for error control, the encoded bits from multiple streams are interleaved. For example, a convolutional encoder with n=2 (ie two streams of encoded bits) Encoded bits from stream 1, c’j = mj-2 + mj-1 + mj c’j c’’j Encoded bits from stream 2, c’’j = mj-2 + mj interleaved C= c’1c’’1c’2c’’2c’3c’’3………..
  • 6. EE436 Lecture Notes 6 Convolutional Codes Each stream may be characterised in terms of its impulse response ( the response of that stream to a symbol 1 with zero initial condition). Every stream is also characterised in terms of a generator polynomial, which is the unit-delay transform of the impulse response               i M g i g i g i g ,........, 2 , 1 , 0 Let the following generator sequence denotes the impulse response of the i-th path The generator polynomial of the i-th path is given by                       M D i M g D i g D i g i g D i g ........ 2 2 1 0 Where D denotes the unit-delay variable
  • 7. EE436 Lecture Notes 7 Convolutional Codes – Example A convolutional encoder with two streams of encoded bits with message sequence 10011 as an input c’j c’’j Stream 1 Stream 2 First, we find the impulse response of both streams to a symbol 1. Impulse response of stream 1 = (1 1 1) Impulse response of stream 2 = (1 0 1) Then, write the corresponding generator polynomial of both streams                       M D i M g D i g D i g i g D i g ........ 2 2 1 0
  • 8. EE436 Lecture Notes 8 Convolutional Codes – Example First, we find the impulse response of both streams to a symbol 1. Impulse response of stream 1 = (1 1 1) Impulse response of stream 2 = (1 0 1) Then, write the corresponding generator polynomials of both streams             2 1 1 D D D g            2 1 2 D D g Then, write the message polynomial for input message (10011)            4 3 1 D D D m Then, find the output polynomial for both streams by multiplying the generator polynomial and the message polynomial
  • 9. EE436 Lecture Notes 9 Convolutional Codes – Example Then, find the output polynomial for both streams by multiplying the generator polynomial and the message polynomial               D m D g D c . 2 2               D m D g D c . 1 1 = (1 + D + D2)(1 + D3 + D4) = 1 + D + D2 + D3 + D6 = (1 + D2)(1 + D3 + D4) = 1 + D2 + D3 + D4 + D5 + D6 So, the output sequence for stream 1 is 1111001 The output sequence for stream 2 is 1011111 Interleave C = 11,10,11,11,01,01,11 Original message (10011) Encoded sequence (11101111010111)
  • 10. EE436 Lecture Notes 10 Convolutional Codes – Exercise A convolutional encoder with two streams of encoded bits with message sequence 110111001 as an input c’j c’’j Stream 1 Stream 2
  • 11. EE436 Lecture Notes 11 Convolutional Codes – Exercise First, we find the impulse response of both streams to a symbol 1. Impulse response of stream 1 = (1 1 1) Impulse response of stream 2 = (1 0 1) Then, write the corresponding generator polynomials of both streams             2 1 1 D D D g            2 1 2 D D g Then, write the message polynomial for input message (110111001)               8 5 4 3 1 D D D D D D m Then, find the output polynomial for both streams by multiplying the generator polynomial and the message polynomial
  • 12. EE436 Lecture Notes 12 Convolutional Codes – Exercise Then, find the output polynomial for both streams by multiplying the generator polynomial and the message polynomial               D m D g D c . 2 2               D m D g D c . 1 1 = 1 + D5 + D7 + D8 + D9 + D10 = 1 + D +D2 + D4 + D6 + D7 + D8 + D10 So, the output sequence for stream 1 is 10000101111 The output sequence for stream 2 is 11101011101 Interleave C = 11 01 01 00 01 10 01 11 11 10 11 Original message (110111001) Encoded sequence (11 01 01 00 01 10 01 11 11 10 11 )
  • 13. EE436 Lecture Notes 13 Convolutional Codes – Code Tree, Trellis and State Diagram Draw a code tree for the convolutional encoder below. c’j c’’j Stream 1 Stream 2
  • 14. EE436 Lecture Notes 14 Code Tree
  • 15. EE436 Lecture Notes 15 Trellis
  • 16. EE436 Lecture Notes 16 State Diagram
  • 17. EE436 Lecture Notes 17 Maximum Likelihood Decoding of a Convolutional Code Let m denotes a message vector c denotes the corresponding code vector r the received code vector (which may differ from c due to channel noise) Given the received vector r, the decoder is required to make an estimate m^ of the message vector Since there is a one-to-one correspondence between the message vector m and the code vector c, therefore m^ = m only if c^ = c , otherwise a decoding error is committed The decoding rule is said to be optimum when the probability of decoding error is minimised
  • 18. EE436 Lecture Notes 18 Maximum Likelihood Decoding of a Convolutional Code Let say both the transmitted code vector c and the received vector r represent binary sequence of length N. These two sequences may differ from each other in some locations because of errors due to channel noise. Let ci and ri denote the ith element of c and r respectively We then have     i i N i c r p c r p 1    The decoding rule is said to be optimum when the probability of decoding error is minimised
  • 19. EE436 Lecture Notes 19     i i N i c r p c r p 1    Correspondingly, the log-likelihood is     i i N i c r p c r p log log 1    Let the transition probability be defined as   i i c r p    p p i i c r p   1 If i i c r  If i i c r  The probability of decoding error is minimised if the log-likelihood function is maximized (the estimate c^ is chosen to maximise the function)
  • 20. EE436 Lecture Notes 20 Suppose also that the received vector r differs from the transmitted code vector c in exactly d positions (where d is the Hamming distance between vectors r and c) We may rewrite the log-likelihood function     i i N i c r p c r p log log 1    as       p d N p d c r p     1 log log log   p N p p d             1 log 1 log
  • 21. EE436 Lecture Notes 21       p d N p d c r p     1 log log log   p N p p d             1 log 1 log In general, the probability of error occurring is low enough for us to assume p < ½ And also that Nlog(1-p) is constant for all c. The function is maximised when d is minimised. (ie the smallest Hamming distance) “ Choose the estimate c^ that minimise the Hamming distance between The received vector r and the transmitted vector c.” The maximum likelihood decoder is reduced to a minimum distance decoder. The received vector r is compared with each possible transmitted code vector c and the particular one “closest” to r is chosen as the correct transmitted code vector.
  • 22. EE436 Lecture Notes 22 The Viterbi Algorithm The equivalence between maximum likelihood decoding and minimum distance decoding implies that we may decode a convolutional code by choosing a path in the code tree whose coded sequence differs from the received sequence in the fewest number of places Since a code tree is equivalent to a trellis, we may limit our choice to the possible Paths in the trellis representation of the code. Viterbi algorithm operates by computing a metric or discrepancy for every possible Path in the trellis The metric for a particular path is defined as the Hamming distance between the Coded sequence represented by that path and the received sequence. For each state in the trellis, the algorithm compares the two paths entering the node And the path with the lower metric is retained. The retained paths are called survivors. The sequence along the path with the smallest metric is the maximum likelihood Choice and represent the transmitted sequence
  • 23. EE436 Lecture Notes 23 The Viterbi Algorithm -example In the circuit beliow, suppose that the encoder generates an all-zero sequence and that the received sequence is (0100010000…) in which the are two errors due to channel noise: one in second bit and the other in the sixth bit. We can show that this double-error pattern is correctable using the Viterbi algorithm. c’j c’’j Stream 1 Stream 2
  • 24. EE436 Lecture Notes 24 The Viterbi Algorithm -example
  • 25. EE436 Lecture Notes 25 The Viterbi Algorithm -exercise Using the same circuit, suppose that the received sequence is 110111. Using the Viterbi algorithm, what is the corresponding encoded sequence transmitted by the receiver? What is the original message bit?