You are on page 1of 18

Fundamentals of 5G NR

Lesson 5: Channel Coding -- Part I

Liangping Ma

© 2019 Liangping Ma. All Rights Reserved.


Channel Coding – Part 1
• Channel capacity
• Linear Block Code
• Repetition code
• Single parity check code

© 2019 Liangping Ma. All Rights Reserved. 2


Channel Capacity
• A channel distorts the transmitted signal

–p
0 0
Z
p

1
–p
1 X + Y

Additive White Gaussian Noise


Binary symmetric channel (BSC) (AWGN) channel

© 2019 Liangping Ma. All Rights Reserved. 3


Channel Capacity
How do we formally characterize a channel?
• We use the conditional distribution

where is the input to the channel and is the output of the channel
• We often use the shorthand to simplify the notation

p(y|x) x=0 x=1


• BSC:
y=0 1-p p
y=1 p 1-p

• AWGN:

© 2019 Liangping Ma. All Rights Reserved. 4


Channel Capacity
• The rate of a channel code is the number of information bits conveyed
per transmission
• Ex: to send k bits, we construct an n-bit sequence and send the sequence; R=k/n
• The maximum rate with an arbitrarily small decoding error probability is
the channel capacity, denoted as

• Channel coding theorem


• Discrete memory-less channel (DMC):

where

• AWGN: bits per channel use


T. Cover, J. Thomas, “Elements of Information Theory”, 1991.
© 2019 Liangping Ma. All Rights Reserved. 5
Linear Block Code

• Generator matrix Example:


𝑔11 𝑔12 … 𝑔1𝑛 𝒈1 Codeword x is in the subspace
𝐺= ⋮ ⋮ ⋮ ⋮ = ⋮ spanned by 𝒈1 and 𝒈2
𝑔𝑘1 𝑔𝑘2 … 𝑔𝑘𝑛 𝒈𝑘

𝒈1 , 𝒈2 , …, 𝒈𝑘 are linearly independent vectors of length 𝑛 g3


k information bits 𝒖 = (𝑢1 , 𝑢2 , …,𝑢𝑘 ) mapped to a 𝑛-bit codeword: g2
𝒙 = 𝒖 𝐺 = 𝑢1 𝒈1 + 𝑢2 𝒈2 + …+𝑢𝑘 𝒈𝑘
x
• Parity check matrix g1
𝐻: (𝑛 − 𝑘) × 𝑛 matrix, each row is orthogonal to rows of 𝐺
Any codeword 𝒙 satisfies: 𝒙𝐻 𝑇 = 0 H is one-dimensional – spanned by 𝒈𝟑

© 2019 Liangping Ma. All rights reserved. 6


Repetition Code
• A (3,1) repetition code
z
c Bits-to-symbol s y=s+z
+

>
m Encoder
mapping Decoder c
BPSK: s=1-2c
m=0; c=000; s=+1, +1, +1
m=1; c=111; s=-1, -1, -1
Coding rate
Noise power

Coded: As a comparison, for uncoded:

© 2019 Liangping Ma. All rights reserved. 7


Repetition Code
• Decoding: hard decision
If y > 0, =+1 -0.76

If y < 0, =-1 -1 0 +1

>
>

>
>
[s1, s2, s3] Symbol to bit c

+1, +1, +1 000 000


c [s1, s2, s3]
+1, +1, -1 001 000
000 +1, +1, +1
+1, -1, +1 010 000
111 -1, -1, -1
+1, -1, -1 011 100
-1, +1, +1 100 000
-1, +1, -1 101 111
-1, -1, +1 110 111
-1, -1, -1 111 111

© 2019 Liangping Ma. All rights reserved. 8


Repetition Code
• Decoding: soft decision

Bayes’ Rule:

c=000, c=111 equally likely

Log likelihood ratio (LLR)

© 2019 Liangping Ma. All rights reserved. 9


Repetition Code
• Decoding: soft decision

Soft decision rule

© 2019 Liangping Ma. All rights reserved. 10


Single Parity Check Code
• A (3,2) single parity check (SPC) code
z
m=[m1, m2] c=[c1, c2, c3]
Bits-to-symbol s y=s+z
+

>
SISO
Encoder
mapping Decoder c
c1=m1 BPSK: s=1-2c SISO: soft-in soft-out
c2=m2
c3=c1 + c2
Coding rate

Channel LLR for bit ci

© 2019 Liangping Ma. All rights reserved. 11


Single Parity Check Code
• A (3,2) single parity check (SPC) code
Given c3, y3 does not provide info
about y1, y2, assuming noises are i.i.d

Extrinsic information for c3

Taking conditional expectation yields

© 2019 Liangping Ma. All rights reserved. 12


Single Parity Check Code
• A (3,2) single parity check (SPC) code
c1 is independent of y2 (Why?)

Bayes’ Rule

© 2019 Liangping Ma. All rights reserved. 13


Single Parity Check Code
• A (3,2) single parity check (SPC) code

© 2019 Liangping Ma. All rights reserved. 14


Single Parity Check Code
• A (3,2) single parity check (SPC) code
Note
So,

• Generalization to (n, n-1) SPC

© 2019 Liangping Ma. All rights reserved. 15


Single Parity Check Code
• A second method
are independent

Note

Now treat as a single bit, and as a single observation

Amin Shokrollahi, “LDPC Codes: An Introduction”, 2003.


© 2019 Liangping Ma. All rights reserved. 16
Single Parity Check Code
• A second method (continued)

The LHS of above is what we need for a (n, n-1) SPC, where

Recall

Again, we get

Amin Shokrollahi, “LDPC Codes: An Introduction”, 2003.


© 2019 Liangping Ma. All rights reserved. 17
Repetition code and single parity check code put
together in a Tanner graph
• Graphical representation of parity check matrix
x1
1 0 1 0
𝐻= l1 x1+ x3 = 0 Single Parity Check Code
0 1 1 1
x3 = x 1
x2 l3, ext
Codeword x =[x1, x2, x3, x4]
l2
Repetition code x2 + x3 + x4 = 0 Single Parity Check Code
l’3, ext x3 = x2+x4
x3
l3

l4
x4

© 2019 Liangping Ma. All rights reserved. 18

You might also like