Error Correction Code (2)

Post on 08-Jan-2016

107 views 1 download

Tags:

description

Error Correction Code (2). Fire Tom Wada Professor, Information Engineering, Univ. of the Ryukyus. Two major FEC technologies. Reed Solomon code (Block Code) Convolutional code Serially concatenated code. Interleaving. Reed Solomon Code. Convolution Code. ConcatenatedCoded. - PowerPoint PPT Presentation

Transcript of Error Correction Code (2)

23/04/20 System Arch 2008 (Fire Tom Wada) 1

Error Correction Code (2)

Fire Tom Wada

Professor, Information Engineering, Univ. of the Ryukyus

System Arch 2008 (Fire Tom Wada) 223/04/20

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

System Arch 2008 (Fire Tom Wada) 323/04/20

(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

System Arch 2008 (Fire Tom Wada) 423/04/20

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

System Arch 2008 (Fire Tom Wada) 523/04/20

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

System Arch 2008 (Fire Tom Wada) 623/04/20

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

System Arch 2008 (Fire Tom Wada) 723/04/20

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

System Arch 2008 (Fire Tom Wada) 823/04/20

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.

System Arch 2008 (Fire Tom Wada) 923/04/20

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

System Arch 2008 (Fire Tom Wada) 1023/04/20

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

System Arch 2008 (Fire Tom Wada) 1123/04/20

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

System Arch 2008 (Fire Tom Wada) 1223/04/20

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

System Arch 2008 (Fire Tom Wada) 1323/04/20

R=2/3 example

3210 iiii1413121110 ccccc

2423222120 ccccc

2313221221112010: CCCCCCCCpuncturedNon

232212212010: CCCCCCPunctured

3210 iiii

System Arch 2008 (Fire Tom Wada) 1423/04/20

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

System Arch 2008 (Fire Tom Wada) 1523/04/20

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.

System Arch 2008 (Fire Tom Wada) 1623/04/20

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

System Arch 2008 (Fire Tom Wada) 1723/04/20

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!

System Arch 2008 (Fire Tom Wada) 1823/04/20

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

System Arch 2008 (Fire Tom Wada) 1923/04/20

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.

System Arch 2008 (Fire Tom Wada) 2023/04/20

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

System Arch 2008 (Fire Tom Wada) 2123/04/20

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!

System Arch 2008 (Fire Tom Wada) 2223/04/20

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

System Arch 2008 (Fire Tom Wada) 2323/04/20

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

System Arch 2008 (Fire Tom Wada) 2423/04/20

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

System Arch 2008 (Fire Tom Wada) 2523/04/20

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

System Arch 2008 (Fire Tom Wada) 2623/04/20

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