Upload
timothy-hodges
View
213
Download
0
Tags:
Embed Size (px)
Citation preview
23/04/21 1
Error Correction Code (2)
Fire Tom Wada
Professor, Information Engineering, Univ. of the Ryukyus
223/04/21
Two major FEC technologies1. Reed Solomon code (Block Code)
2. Convolutional code
3. Serially concatenated code
SourceInformation
ReedSolomon
CodeInterleaving
ConvolutionCode
ConcatenatedCoded
Goes to Storage, Transmission
Concatenated
323/04/21
(n, k) Block Code
Time t information block it is coded to time t code wt. k : information length n : code length Code Rate : R=k/n
it-2
k bit
it-1
k bit
it
k bit
Information
code wt-2
n bit
wt-1
n bit
wt
n bitE
NC
OD
E
EN
CO
DE
EN
CO
DE
BLOCK
423/04/21
Convolutional Code
Time t code wt is determined by past K information. K : Constraint length Code Rate : R=k/n
it-2
k bit
it-1
k bit
it
k bit
Information
code wt-2
n bit
wt-1
n bit
wt
n bit
Constraint length K
523/04/21
Simple Convolutional Coder
210 iii121110 ccc
222120 ccc
ttttt
tttt
iDDiiic
iDiic
)1(
)1(2
212
221
D is delay operator
c1t, c2t depends on not only current it bu also past it-1, it-2
623/04/21
Simple Convolutional Coder(2)
Time t 0 1 2 3 4 5
it 1 1 0 0 1 0
F1=it-1 0 1 1 0 0 1
F2=it-2 0 0 1 1 0 0
c1t 1 1 1 1 1 0
c2t 1 0 0 1 1 1
If input information is “110010” then
Output code is “11 10 10 11 11 01”.
Constraint length K=3, R=1/2
723/04/21
State Transition Diagram Number of State: 4
Time t 0 1 2 3 4 5
it 1 1 0 0 1 0
F1=it-1 0 1 1 0 0 1
F2=it-2 0 0 1 1 0 0
c1t 1 1 1 1 1 0
c2t 1 0 0 1 1 1
823/04/21
State Transition Diagram(2)
Time t 0 1 2 3 4 5
it 1 1 0 0 1 0
F1=it-1 0 1 1 0 0 1
F2=it-2 0 0 1 1 0 0
c1t 1 1 1 1 1 0
c2t 1 0 0 1 1 1
t=0
t=1
t=2
t=3
t=4
t=5
In each time t, a traveler stays in one state.
And move to different state cycle by cycle.
923/04/21
Trellis Diagram Convert the State transition diagram to 2D diagram
Vertical axis : states Horizontal axis : time
states
time
00 00
01
00
01
10
11
00
01
10
11
00
01
10
11
00/0
11/1
11/0
00/1
01/0
10/1
10/0
01/1
00/0
11/1
11/0
00/1
01/0
10/1
10/0
01/1
00/0
11/1
01/0
10/1
00/0
11/1
00
01
10
11
00/0
11/1
11/0
00/1
01/0
10/1
10/0
01/1
1023/04/21
Encoding in Trellis Input information determines
a path in Trellis Each Branch outputs 2bit code.
Time t 0 1 2 3 4 5
it 1 1 0 0 1 0
F1=it-1 0 1 1 0 0 1
F2=it-2 0 0 1 1 0 0
c1t 1 1 1 1 1 0
c2t 1 0 0 1 1 1
00 00
01
00
01
10
11
00
01
10
11
00
01
10
11
00/0
11/1
11/0
00/1
01/0
10/1
10/0
01/1
00/0
11/1
11/0
00/1
01/0
10/1
10/0
01/1
00/0
11/1
01/0
10/1
00/0
11/1
00
01
10
11
00/0
11/1
11/0
00/1
01/0
10/1
10/0
01/1
00
01
10
11
00/0
11/1
11/0
00/1
01/0
10/1
10/0
01/1
t=0 t=1 t=2 t=3 t=4 t=5
11
10
10
1111
01
1123/04/21
Punctured Convolutional Code The example Encoder has Code Rate R=1/2 Punctured Convolutional Code means that one
or some code output is removed. Then Code Rate can be modified
lcn
ckR
cn
ck
n
kR
punctured
original
1223/04/21
Merit of Punctured Code Larger code rate is better. Using Punctured technology,
1. When communication channel condition is good, weak error correction but high code rate can be chosen.
2. When communication channel condition is bud, strong error correction but low code rate can be chosen.
3. This capability can be supported by small circuit change.One coder or decoder can be used for several code rate addaptively
1323/04/21
R=2/3 example
3210 iiii1413121110 ccccc
2423222120 ccccc
2313221221112010: CCCCCCCCpuncturedNon
232212212010: CCCCCCPunctured
3210 iiii
1423/04/21
Viterbi Decode Viterbi Decode is one method of Maximum likelihood
decoding for Convolutional code. Maximum likelihood decoding
Likelihood function is P(xi|r): Probability of seding xi under the condition of receiving r
N messagex1, x2, x3, …, xN
Sender take one message and send it out!
x? rReceiver find the maximum conditional Probability
)|( rxP i
1523/04/21
Viterbi Decode(2) Branch metric is the Likelihood function of
each branch. -Ln{p(xk|ri)}
High possibility small valueExample : Hamming distance
Path metric is the sum of branch metrics along the possible TRELLIS PATH.
1623/04/21
Viterbi Decoding Example R=1/2, Receive 11 10 11 01 11 01 Calculate Each Branch metric (This time Hamming distance)
00 00
01
00
01
10
11
00
01
10
11
00
01
10
11
00(2)
11(0)
11(0)
00(2)
01(1)
10(1)
10(1)
01(1)
00(1)
11(1)
11(1)
00(1)
01(0)
10(2)
10(2)
01(0)
00(1)
11(1)
01(2)
10(0)
00(2)
11(0)
00
01
10
11
00(2)
11(0)
11(0)
00(2)
01(1)
10(1)
10(1)
01(1)
00
01
10
11
00(1)
11(1)
11(1)
00(1)
01(0)
10(2)
10(2)
01(0)
t=0 t=1 t=2 t=3 t=4 t=5 t=6
11Rece-ived 10 11 01 11 01
1723/04/21
Viterbi Decoding Example(2) Calculate Path metric in order to find minimum path metric
path. Until t=2
00 00
01
00
01
10
11
00
01
10
11
00
01
10
11
00(2)
11(0)
11(0)
00(2)
01(1)
10(1)
10(1)
01(1)
00(1)
11(1)
11(1)
00(1)
01(0)
10(2)
10(2)
01(0)
00(1)
11(1)
01(2)
10(0)
00(2)
11(0)
00
01
10
11
00(2)
11(0)
11(0)
00(2)
01(1)
10(1)
10(1)
01(1)
00
01
10
11
00(1)
11(1)
11(1)
00(1)
01(0)
10(2)
10(2)
01(0)
t=0 t=1 t=2 t=3 t=4 t=5 t=6
3
3
2
0
5
2
Lower path has smaller path metric,Then Take it!
1823/04/21
Viterbi Decoding Example(3) Calculate Path metric in order to find minimum path metric
path. Until t=6
00 00
01
00
01
10
11
00
01
10
11
00
01
10
11
00(2)
11(0)
11(0)
00(2)
01(1)
10(1)
10(1)
01(1)
00(1)
11(1)
11(1)
00(1)
01(0)
10(2)
10(2)
01(0)
00(1)
11(1)
01(2)
10(0)
00(2)
11(0)
00
01
10
11
00(2)
11(0)
11(0)
00(2)
01(1)
10(1)
10(1)
01(1)
00
01
10
11
00(1)
11(1)
11(1)
00(1)
01(0)
10(2)
10(2)
01(0)
t=0 t=1 t=2 t=3 t=4 t=5 t=6
3
3
2
0 1
1
3
2
1
3
2
2
2
2
2
3
2
2
3
3
1923/04/21
Viterbi Decoding Example(4)
1 1 2 2
00 00
01
00
01
10
11
00
01
10
11
00
01
10
11
00(2)
11(0)
11(0)
00(2)
01(1)
10(1)
10(1)
01(1)
00(1)
11(1)
11(1)
00(1)
01(0)
10(2)
10(2)
01(0)
00(1)
11(1)
01(2)
10(0)
00(2)
11(0)
00
01
10
11
00(2)
11(0)
11(0)
00(2)
01(1)
10(1)
10(1)
01(1)
00
01
10
11
00(1)
11(1)
11(1)
00(1)
01(0)
10(2)
10(2)
01(0)
t=0 t=1 t=2 t=3 t=4 t=5 t=6
0
1
2
2
2
Select Minimum Path Metric and get original information In this example, two minimum path
Upper path : 1 1 0 0 1 0 Lower path : 1 1 1 1 1 1
If we increase the time, we might find ONLY ONE MINIMUM PATH.
2023/04/21
Received signal has many level In the previous example, we have assumed the received
sequence is 11 10 11 01 11 01
Usually, received signal is analog (Many Levels) such as
SIGNAL LEVEL
01234567
6 5 6 3 5 4 3 6 6 6 2 7
2123/04/21
HARD DECISION
LINE
Hard Decision
1 1 1 0 1 1 0 1 1 1 0 1
SIGNAL LEVEL
01234567
6 5 6 3 5 4 3 6 6 6 2 7
HARDDECISIONOUTPUTS
Highly reliable 1
Low reliable 1 We have to distinguish!
Loosing Reliability Information by Hard Decision!
2223/04/21
Soft Decision Use soft decision metric
One Example
LEVEL 0 1 2 3 4 5 6 7
Branch Metric for ‘0’ 0 0 0 0 0 1 2 3
Branch Metric for ‘1’ 3 2 1 0 0 0 0 0
Difference -3 -2 -1 0 0 1 2 3
No effect on Viterbi decoding!
Looks like Erased or Punctured!
Reliable ‘0’ Reliable ‘1’
00 00(branch metric = 1 + 2 = 3)
LEVEL= 65
HOW TO COMPUTE BRANCH METRIC
2323/04/21
Soft Decision Viterbi
00 00
01
00
01
10
11
00
01
10
11
00
01
10
11
00(1)
11(0)
11(0)
00(1)
01(1)
10(0)
10(0)
01(1)
00(2)
11(0)
11(0)
00(2)
01(0)
10(2)
10(2)
01(0)
00(2)
11(0)
01(2)
10(0)
00(3)
11(0)
00
01
10
11
00(4)
11(0)
11(0)
00(4)
01(2)
10(2)
10(2)
01(2)
00
01
10
11
00(3)
11(1)
11(1)
00(3)
01(0)
10(4)
10(4)
01(0)
t=0 t=1 t=2 t=3 t=4 t=5 t=6
65LEVEL 63 54 36 66 27
LEVEL 0 1 2 3 4 5 6 7
Branch Metric for ‘0’ 0 0 0 0 0 1 2 3
Branch Metric for ‘1’ 3 2 1 0 0 0 0 0
Calculate Branch Metric based on Soft-Table
2423/04/21
Soft Decision Viterbi(2)Calculate Path metric in order to find minimum path metric path.Until t=6
00 00
01
00
01
10
11
00
01
10
11
00
01
10
11
00(1)
11(0)
11(0)
00(1)
01(1)
10(0)
10(0)
01(1)
00(2)
11(0)
11(0)
00(2)
01(0)
10(2)
10(2)
01(0)
00(2)
11(0)
01(2)
10(0)
00(3)
11(0)
00
01
10
11
00(4)
11(0)
11(0)
00(4)
01(2)
10(2)
10(2)
01(2)
00
01
10
11
00(3)
11(1)
11(1)
00(3)
01(0)
10(4)
10(4)
01(0)
t=0 t=1 t=2 t=3 t=4 t=5 t=6
65LEVEL 63 54 36 66 273
0
5
3
0
2
1
0
3
2
1
3
2
0
3
3
0
0
3
3 4
4
2523/04/21
Soft Decision Viterbi(3)
00 00
01
00
01
10
11
00
01
10
11
00
01
10
11
00(1)
11(0)
11(0)
00(1)
01(1)
10(0)
10(0)
01(1)
00(2)
11(0)
11(0)
00(2)
01(0)
10(2)
10(2)
01(0)
00(2)
11(0)
01(2)
10(0)
00(3)
11(0)
00
01
10
11
00(4)
11(0)
11(0)
00(4)
01(2)
10(2)
10(2)
01(2)
00
01
10
11
00(3)
11(1)
11(1)
00(3)
01(0)
10(4)
10(4)
01(0)
t=0 t=1 t=2 t=3 t=4 t=5 t=6
65LEVEL 63 54 36 66 27
Select Minimum Path Metric and get original information In this example : 1 1 0 0 1 0
0
0
0
0
0
0
2623/04/21
Summary 2 types of FEC
Block code such as RS Convolutional Code
Convolutional Code Code Rate Punctured
Viterbi Decoder : Maximum likelihood decoding Trellis Hard Decision vs. Soft Decision Branch Metric, Path Metric