Mobile Lbc

26
8/13/2019 Mobile Lbc http://slidepdf.com/reader/full/mobile-lbc 1/26 II. Linear Block Codes

Transcript of Mobile Lbc

Page 1: Mobile Lbc

8/13/2019 Mobile Lbc

http://slidepdf.com/reader/full/mobile-lbc 1/26

II. Linear Block Codes

Page 2: Mobile Lbc

8/13/2019 Mobile Lbc

http://slidepdf.com/reader/full/mobile-lbc 2/26

© Tallal Elshabrawy 2

Digital Communication Systems

Source ofInformation

User ofInformation

Source

Encoder

ChannelEncoder

Modulator

Source

Decoder

ChannelDecoder

De-Modulator

Channel

Page 3: Mobile Lbc

8/13/2019 Mobile Lbc

http://slidepdf.com/reader/full/mobile-lbc 3/26

© Tallal Elshabrawy 3

What are Linear Block Codes?

Information sequence is segmented into message blocks of

f ixed leng th .

Each k-bit information message is encoded into an n-bit

codeword (n>k )

Linear Block Codes

Binary BlockEncoder2

k

k -bit Messages 2k

n -bit DISTINCTcodewords

Page 4: Mobile Lbc

8/13/2019 Mobile Lbc

http://slidepdf.com/reader/full/mobile-lbc 4/26

Page 5: Mobile Lbc

8/13/2019 Mobile Lbc

http://slidepdf.com/reader/full/mobile-lbc 5/26

© Tallal Elshabrawy 5

Linear Independence

 A set of vectors g0, g1,…, gk -1 are linearly independent if

there exists no scalars u0, u1,…, uk-1 that satisfy

0 1 10 1 k-1v g g g 0k u u ... u   

Unless u 0=u 1=…= u k- 1=0

Examples

[0 1 0 ], [1 0 1], [1 1 1] are ………  Linearly Dependent

[0 1 0 ], [1 0 1], [0 0 1] are ……… 

Linearly Independent

Page 6: Mobile Lbc

8/13/2019 Mobile Lbc

http://slidepdf.com/reader/full/mobile-lbc 6/26

© Tallal Elshabrawy 6

Why Linear?

Encoding Process

Store and Index 2k

codewords of length n Complexity

Huge storage requirements for large k

Extensive search processing for large k

Linear Block Codes Stores k  linearly independent codewords

Encoding process through linear combination of codewords g0,g1,…, gk - 1 based on input message u=[u0 , u1,…, uk-1]

00 01 0 10

10 11 1 11

1 0 1 1 1 11

g

g

.G=

.

.

g

 ,n 

 ,n 

k , k , k ,n  k 

g g ... g  

g g ... g  

. . .

. . .

. . .

g g ... g  

 

  Generator Matrix

v=u.G

Page 7: Mobile Lbc

8/13/2019 Mobile Lbc

http://slidepdf.com/reader/full/mobile-lbc 7/26© Tallal Elshabrawy 7

Example

0

1

3

1 1 0 1 0 0 0

0 1 1 0 1 0 0

1 1 1 0 0 1 0

1 0 1 0 0 0 1

2

g

gG=

g

g

         

Message Codeword

0000 0000000

0001 1010001

0010 1110010

0011 0100011

0100 0110100

0101 1100101

0110 10001100111 0010111

1000 1101000

1001 0111001

1010 0011010

1011 1001011

1100 1011100

1101 0001101

1110 0101110

1111 1111111

g0 

g1 

g2 

g3 

u= [0 1 1 0]

Linear BlockEncoder (v=u.G)

v= g1+g2 v= [1 0 0 0 1 1 0]

Page 8: Mobile Lbc

8/13/2019 Mobile Lbc

http://slidepdf.com/reader/full/mobile-lbc 8/26© Tallal Elshabrawy 8

Example

0

1

3

1 1 0 1 0 0 0

0 0 1 0 1 1 1

1 1 1 1 1 1 1

1 0 1 0 0 0 1

2

g

gG=

g

g

 

       

u= [0 1 1 1]

Block Encoder(v=u.G)

v= g1+g2+g3 

v= [0 1 1 1 0 0 1]

LinearlyDependent

u= [1 0 0 1]

Block Encoder(v=u.G)

v= g0+g3 v= [0 1 1 1 0 0 1]

NOT DISTINCT

Page 9: Mobile Lbc

8/13/2019 Mobile Lbc

http://slidepdf.com/reader/full/mobile-lbc 9/26© Tallal Elshabrawy 9

Linear Systematic Block Codes

Redundant CheckingPart

MessagePart

n -k bits k bits

00 01 0 1

10 11 1 1

1 0 1 1 1 1

1 0 0

0 1 0

0 0 1

 

G= P I

 

 ,n k 

 ,n k 

k , k , k ,n k  

p p ... p   ...

p p ... p   ...

. . . . . .

. . . . . .

. . . . . .

p p ... p   ...

 

p-matrix kxk- identity matrix

Page 10: Mobile Lbc

8/13/2019 Mobile Lbc

http://slidepdf.com/reader/full/mobile-lbc 10/26© Tallal Elshabrawy 10

The Parity Check Matrix

For any k x  n matrix G with k linearly independent rows,

there exists an (n-k ) x  n matrix H (Parity Check Matrix),such that

G.HT=0

00 01 1 0

01 11 1 1

0 1 1 1 1 1

1 0 0

0 1 0

0 0 1

T

 

H= I P

 

k ,

k ,

 ,n k ,n k k ,n k 

p p ... p  ...

p p ... p  ...

. . .. . .

. . .. . .

. . .. . .

p p ... p  ...

 

Page 11: Mobile Lbc

8/13/2019 Mobile Lbc

http://slidepdf.com/reader/full/mobile-lbc 11/26© Tallal Elshabrawy 11

Example

1 1 0 1 0 0 00 1 1 0 1 0 0

1 1 1 0 0 1 0

1 0 1 0 0 0 1

G

1 0 0 1 0 1 10 1 0 1 1 1 0

0 0 1 0 1 1 1

H

Page 12: Mobile Lbc

8/13/2019 Mobile Lbc

http://slidepdf.com/reader/full/mobile-lbc 12/26© Tallal Elshabrawy 12

Encoding Circuit 1 1 0 1 0 0 0

0 1 1 0 1 0 0

1 1 1 0 0 1 0

1 0 1 0 0 0 1

G

u 0   u 1   u 2   u 3  

Input u

To channel

+ + +

v 0   v 1   v 2  

Parity Register

Message Register

[u0 u1 u2 u3] [v0 v1 v2 u0 u1 u2 u3]

Output v

Encoder Circuit

Page 13: Mobile Lbc

8/13/2019 Mobile Lbc

http://slidepdf.com/reader/full/mobile-lbc 13/26© Tallal Elshabrawy 13

Syndrome

Characteristic of parity check matrix (H)

Tv.H 0

Tv.H 0

v C

v C

Channelv r

+v r=v+e

e Error Pattern

Syndrome

Ts=r.H

Page 14: Mobile Lbc

8/13/2019 Mobile Lbc

http://slidepdf.com/reader/full/mobile-lbc 14/26© Tallal Elshabrawy 14

Error Detection

s 0   r Cr is NOT a codeword

 An Error is Detected: What Options do we have?  Ask for Retransmission of Block

Automatic Repeat Request (ARQ)

 Attempt the Correction of Block

Forward Error Correction

Page 15: Mobile Lbc

8/13/2019 Mobile Lbc

http://slidepdf.com/reader/full/mobile-lbc 15/26© Tallal Elshabrawy 15

Undetectable Error Patterns

Can we be sure that r=v ?? NO! WHY?

s 0   r C

e C r C

How many undetectable error patterns exist? 2k -1 Nonzero codeword means

2k -1 undetectable error patterns

Page 16: Mobile Lbc

8/13/2019 Mobile Lbc

http://slidepdf.com/reader/full/mobile-lbc 16/26© Tallal Elshabrawy 16

Syndrome Circuit

1 0 0

0 1 0

0 0 1

1 1 0

0 1 1

1 1 1

1 0 1

T

H

0 0 3 5 6

1 1 3 4 5

2 2 4 5 6

s r r r r  

s r r r r  

s r r r r  

r 1   r 2   r 3   r 4   r 5   r 6  r 0  

+ + +

s 0   s 1   s 2  

Page 17: Mobile Lbc

8/13/2019 Mobile Lbc

http://slidepdf.com/reader/full/mobile-lbc 17/26

© Tallal Elshabrawy 17

Hamming Weight and Hamming Distance

Hamming Weight w(v):

The number of nonzero components of v

Hamming Distance d  (v,w):

The number of places where v and w differExample:

v= (1 0 1 1 1 0 1):  w(v)=5

w=(0 1 1 0 1 0 1): d  (v,w)=3

Important Remark: In modulo(2)

d  (v,w)=w(v+w)

In the example above v+w=(1 1 0 1 0 0 0)

Page 18: Mobile Lbc

8/13/2019 Mobile Lbc

http://slidepdf.com/reader/full/mobile-lbc 18/26

© Tallal Elshabrawy 18

Minimum Distance of a Block Code

Minimum Distance of a block code (dmin

):

The minimum Hamming distance between any two

code words in the code book of the block code

mind min v, w : v, w C, v w d  

 

min

min

min min

d min v w : v, w C, v w

d min x : x C, x 0

d w (minimum weight of the code)

Page 19: Mobile Lbc

8/13/2019 Mobile Lbc

http://slidepdf.com/reader/full/mobile-lbc 19/26

Page 20: Mobile Lbc

8/13/2019 Mobile Lbc

http://slidepdf.com/reader/full/mobile-lbc 20/26

© Tallal Elshabrawy 2006-02-16Lecture 9 20

Linear block codes  – cont’d 

Standard array and syndrome tabledecoding

1. Calculate

2. Find the coset leader, , corresponding to .

3. Calculate and corresponding .

Note that

If , error is corrected.

If , undetectable decoding error occurs.

T rHS

iee ˆ   S

erU   ˆˆ   m̂

)ˆˆ(ˆˆ e(eUee)UerU   ee ˆ

ee ˆ

Page 21: Mobile Lbc

8/13/2019 Mobile Lbc

http://slidepdf.com/reader/full/mobile-lbc 21/26

© Tallal Elshabrawy 2006-02-16Lecture 9 21

Linear block codes  – cont’d 

Example: Standard array for the (6,3) code

010110100101010001

010100100000

100100010000

111100001000

000110110111011010101101101010011100110000000100000101110001011111101011101100011000110110000010

000110110010011100101000101111011011110101000001

000111110011011101101001101110011010110100000000

Coset leaders

coset

codewords

Page 22: Mobile Lbc

8/13/2019 Mobile Lbc

http://slidepdf.com/reader/full/mobile-lbc 22/26

© Tallal Elshabrawy 2006-02-16Lecture 9 22

Linear block codes  – cont’d 

111010001

100100000

010010000

001001000

110000100

011000010

101000001

000000000

(101110)(100000)(001110)ˆˆ

estimatedisvectorcorrectedThe

(100000)ˆ

issyndromethistoingcorrespond patternError

(100)(001110):computedisof syndromeThe

received.is (001110)

ted. transmit(101110)

erU

e

HrHSr

r

U

T T 

Error pattern Syndrome

Page 23: Mobile Lbc

8/13/2019 Mobile Lbc

http://slidepdf.com/reader/full/mobile-lbc 23/26

© Tallal Elshabrawy 23

Hamming Codes

For any positive integer m≥3, there exists a Hamming

code such that:

- Code Length: n = 2m-1

- No. of information symbols: k = n-m =2

m

-m-1- No. of parity check symbols: n-k = m

- Error correcting capability: t = 1 (i.e., dmin=3)

Page 24: Mobile Lbc

8/13/2019 Mobile Lbc

http://slidepdf.com/reader/full/mobile-lbc 24/26

© Tallal Elshabrawy 24

Example: (15,11) Hamming Codes

- Code Length: n = 24

-1 = 15- No. of information symbols: k = 15-4 = 11

- No. of parity check symbols: 15-11 = 4

- Error correcting capability: dmin = 3

1 0 0 0 1 1 1 0 0 0 1 1 1 0 1

0 1 0 0 1 0 0 1 1 0 1 1 0 1 1H0 0 1 0 0 1 0 1 0 1 1 0 1 1 1

0 0 0 1 0 0 1 0 1 1 0 1 1 1 1

4 columns ofweight 1

11 columns ofweight >1

Page 25: Mobile Lbc

8/13/2019 Mobile Lbc

http://slidepdf.com/reader/full/mobile-lbc 25/26

Page 26: Mobile Lbc

8/13/2019 Mobile Lbc

http://slidepdf.com/reader/full/mobile-lbc 26/26

© T ll l El h b 26

- Number of cosets = 2n-k= 215-11 = 16

- Number of error patterns of weight 1 = 15

- If the coset leaders are chosen to be the 0 vector and all

the error patterns of weight 1. The (15,11) code corrects

ONLY error patterns with single error

The (15,11) Hamming Code is a Perfect Code