You are on page 1of 18

AI Lab for Wireless

Communications
Week2 - Syndrome decoding & maximum likelihood decoding
Speaker: Kuan-Yu Lin

1
A digital communication system over
wireless channel
Binary
source
Channel Up-
Modulation
encoder converter

Channel Down-
Demod Preprocessing
Decoded decoder converter
source

• Channel enc/dec allows error correction by adding redundancy


• Channel decoding is the part we focus on in the following courses

2
Recall: (7,4)-Hamming Coded
• 4-bit message 𝒎𝒎, 7-bit codeword 𝒄𝒄
• Relationship: 𝒄𝒄 = 𝒎𝒎𝑮𝑮, 𝒓𝒓𝑯𝑯𝑻𝑻 = 𝟎𝟎

• Generator matrix

• Parity check matrix

3
Recall: Idea of Hamming code
• The relationship of each bits in the codeword can be illustrated
by the following figure
• 𝒄𝒄 = 𝒎𝒎𝒎𝒎

𝑐𝑐5 𝑚𝑚2 (𝑐𝑐2 ) 𝑐𝑐7

𝑚𝑚4 (𝑐𝑐4 )
𝑚𝑚1 (𝑐𝑐1 ) 𝑚𝑚3 (𝑐𝑐3 )

𝑐𝑐6
where 𝒎𝒎 = (𝑚𝑚1 , 𝑚𝑚2 , 𝑚𝑚3 , 𝑚𝑚4 ) and 𝒄𝒄 = (𝑐𝑐1 , 𝑐𝑐2 , 𝑐𝑐3 , 𝑐𝑐4 , 𝑐𝑐5 , 𝑐𝑐6 , 𝑐𝑐7 )

4
Recall: Idea of Hamming code
• The relationship of each bits in the codeword can be illustrated
by the following figure
• 𝒓𝒓𝑯𝑯𝑻𝑻 = 𝟎𝟎

𝑟𝑟5 𝑟𝑟2 𝑟𝑟7

𝑟𝑟4
𝑟𝑟1 𝑟𝑟3

where 𝒓𝒓 = (𝑟𝑟1 , 𝑟𝑟2 , 𝑟𝑟3 , 𝑟𝑟4 , 𝑟𝑟5 , 𝑟𝑟6 , 𝑟𝑟7 ) 𝑟𝑟6

5
Recall Channel Model
• When transmit, we map coded bits to baseband signal
• Binary phase shift keying (BPSK)

𝑥𝑥𝑖𝑖 = 𝑃𝑃 2𝑐𝑐𝑖𝑖 − 1 , 𝒙𝒙 = [𝑥𝑥1 , … , 𝑥𝑥𝑛𝑛 ]

• Additive white Gaussian noise (AWGN) channel

𝑁𝑁0
𝑦𝑦𝑖𝑖 = 𝑥𝑥𝑖𝑖 + 𝑤𝑤𝑖𝑖 , 𝑤𝑤𝑖𝑖 ~𝑁𝑁(0, ), 𝒚𝒚 = [𝑦𝑦1 , … , 𝑦𝑦𝑛𝑛 ]
2

6
Syndrome decoding

7
Concept of syndrome decoding (1/2)
• We first do hard decision
𝑧𝑧𝑖𝑖̂ = 𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠 (𝑦𝑦𝑖𝑖 ) and 𝑑𝑑̂ 𝑖𝑖 = (𝑧𝑧𝑖𝑖̂ + 1)/2
• Assume 𝒆𝒆 is the error, we have
� 𝑇𝑇 = 𝒔𝒔
𝒅𝒅𝑯𝑯
⇒ 𝒙𝒙 + 𝒆𝒆 𝑯𝑯𝑇𝑇 = 𝒔𝒔
⇒ 𝒙𝒙𝑯𝑯𝑇𝑇 + 𝒆𝒆𝑯𝑯𝑇𝑇 = 𝒔𝒔
⇒ 𝟎𝟎 + 𝒆𝒆𝑯𝑯𝑇𝑇 = 𝒔𝒔
• We call s is the syndrome, if 𝒔𝒔 ≠ 𝟎𝟎, then there must exist error

8
Concept of syndrome decoding (2/2)
• How to recover the signal?
⇒ Define the error pattern 𝒆𝒆� that 𝒆𝒆� + 𝒆𝒆 𝑯𝑯𝑇𝑇 = 𝟎𝟎
• We can have

� + 𝒆𝒆�
� = 𝒅𝒅
𝒙𝒙
⇒ � = (𝒙𝒙 + 𝒆𝒆) + 𝒆𝒆�
𝒙𝒙
⇒ � = 𝒙𝒙
𝒙𝒙

9
Procedure of syndrome decoding
• Do hard decision
• Construct the standard array
� 𝑇𝑇 = 𝒔𝒔
• Compute the syndrome 𝒅𝒅𝑯𝑯
• Decide 𝒆𝒆� = coset leader(𝒔𝒔)
• Decode to 𝒙𝒙 � + 𝒆𝒆�
� = 𝒅𝒅

10
Example
• We have
𝒚𝒚𝒚 = 𝒙𝒙𝒙 + (0000100)
(1101000) = (1101010) + (0000010)

• Doing syndrome decoding


𝒚𝒚𝑯𝑯𝑇𝑇 = 𝒔𝒔
⇒ 𝒙𝒙 + 𝒆𝒆 𝑯𝑯𝑇𝑇 = 𝒔𝒔
⇒ 𝒙𝒙𝑯𝑯𝑇𝑇 + 𝒆𝒆𝑯𝑯𝑇𝑇 = 𝒔𝒔
⇒ 𝟎𝟎 + 𝒆𝒆𝑯𝑯𝑇𝑇 = 𝒔𝒔
11
Example
• Then 𝒔𝒔 = (100)
• By 𝒆𝒆𝑯𝑯𝑇𝑇 = 𝒔𝒔, there are several e that makes the equation holds
𝒆𝒆𝟏𝟏 = 0000100 , 𝒆𝒆𝟐𝟐 = (00011100)
• 𝒆𝒆 = (0000100) is the most possible case since the probability of each
bit flips is p

12
Standard Array
Syndrome Error pattern 𝒆𝒆�
𝒔𝒔 = 𝒓𝒓𝑯𝑯𝑻𝑻
(0,0,0) (0,0,0,0,0,0,0)

(0,0,1) (0,0,0,0,0,0,1)

(0,1,0) (0,0,0,0,0,1,0)

(0,1,1) (0,0,1,0,0,0,0)

(1,0,0) (0,0,0,0,1,0,0)

(1,0,1) (0,1,0,0,0,0,0)

(1,1,0) (1,0,0,0,0,0,0)

(1,1,1) (0,0,0,1,0,0,0)
13
Performance evaluation
• Block error rate (BLER) – If the received block has one or even
more bits error, we say that this Block (codeword) is error. The
block error rate is the number of block errors per unit block.

• Bit error rate (BER) – If any bit of a block is wrong, we say that
there is an error. The bit error rate is the number of bit errors
per unit bit.

14
Performance evaluation (2/2)
• Signal to Noise Ratio – The ratio of signal power to the noise
𝑃𝑃𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠
power. ( 𝑆𝑆𝑆𝑆𝑆𝑆 = 10 log10
𝑃𝑃
)
𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛

• Go through all codewords and compare whether 𝒎𝒎 � = 𝒎𝒎


• In communication system, we usually evaluate decoding scheme
by observing block or bit error rate over different 𝐸𝐸𝑏𝑏 /𝑁𝑁0
• Take (7,4) hamming code and SNR=𝜂𝜂 as example,
We transmit 7 bits (𝑃𝑃𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠 = 7 ⋅ 𝜂𝜂) per signal
However, there only contains 4 information bits
⇒ Each information bit uses 7/4 ⋅ 𝜂𝜂

15
Maximum Likelihood
Decoding

16
ML Decoding
MLD:
𝒄𝒄� = 𝑎𝑎𝑎𝑎𝑎𝑎m𝑖𝑖𝑖𝑖 | 𝒚𝒚 − 𝒙𝒙| 2
𝒄𝒄∈𝐶𝐶
• This is optimal

• Complexity is very high, especially when n is large

17
ML Decoding Steps
• Construct all possible codeword

• Calculate the norm of received codeword and possible codeword

• Find the codeword which has the minimum norm

• Calculate the BER and BLER

18

You might also like