CODE
Convolutional codes
• Pada channel coding menggunakan kode konvolusi :
• Mengkodekan data stream ke dalam sebuah codeword.
• Tidak memerlukan pengubahan data stream kedalam suatu
blok yang ukurannya tetap.
Channel
Input sequence
Codeword sequence
Proses encoder
• Inisialisasi memori shift register sebelum proses encoding dengan mengisi semua
shift register dengan bit nol (all-zero)
• Tambahkan bit nol diakhir data bit setelah proses encoding agar semua isi shift
register menjadi nol. Bit nol yang ditambahkan ini disebut tail-zero bit atau bit tail
L
Reff Rc
n( L K 1)
Modul 11 - Siskom 2 - Convolutional Code
6
g1 = (1 1 1)
u1 First coded bit
(Branch word)
Input data bits Output coded bits
m u1 ,u2
u2 Second coded bit
g2 = (1 0 1)
Modul 11 - Siskom 2 - Convolutional Code
7
Contoh encoder konvolusi dengan rate = 1/2
Output Output
(Branch word) (Branch word)
u1 u1
Time Time
u1 u2 u1 u2
t1 1 0 0 t2 0 1 0
1 1 1 0
u2 u2
u1 u1
u1 u2 u1 u2
t3 1 0 1 t4 0 1 0
0 0 1 0
u2 u2
Modul 11 - Siskom 2 - Convolutional Code
8
Contoh encoder konvolusi rate = ½ …..cont
u1 u1
u1 u2 u1 u2
t5 0 0 1 t6 0 0 0
1 1 0 0
u2 u2
Convolutional
Contoh Encoder:
ImplementasiExample
dengan g1 = (1 0 1) dan g2 = (1 1 1)
Rate ½ Convolutional Encoder
g2 = (1 1 1) 1
+
u2
Input Output
101 0 0
u1
+
g1 = (1 0 1)
1
Modul 11 - Siskom 2 - Convolutional Code
10
Convolutional
Contoh Encoder:
ImplementasiExample
dengan g1 = (1 0 1) dan g2 = (1 1 1)
Rate ½ Convolutional Encoder
g2 = (1 1 1)
1
+
u2
Input Output
101 1 0
11
u1
+
g1 = (1 0 1) 0
Modul 11 - Siskom 2 - Convolutional Code
11
Convolutional Encoder: Example
Contoh Implementasi dengan g1 = (1 0 1) dan g2 = (1 1 1)
Rate ½ Convolutional Encoder
g2 = (1 1 1)
0
+
u2
Input Output
101 0 1
1011
u1
+
g1 = (1 0 1) 0
Modul 11 - Siskom 2 - Convolutional Code
12
Convolutional
Contoh Encoder:
ImplementasiExample
dengan g1 = (1 0 1) dan g2 = (1 1 1)
Rate ½ Convolutional Encoder
g2 = (1 1 1)
+
u2
Input Output
101 1 0
001011
u1
+
g1 = (1 0 1)
Modul 11 - Siskom 2 - Convolutional Code
13
Diagram State
• Menyatakan perubahan isi / kondisi (state) dari memori shift register
• Isi memory shift register selanjutnya akan diprediksi berdasarkan data
input yang masuk dan isi memory saat ini
• Terdapat state
2 K 1
g1 = (1 1 1) 0/00
+
00
Input Output
a
SR0 SR1 1/11
0/11
01 1/00 10
+
c b
g2 = (1 0 1)
0/01
0/10 1/10
11
States (SR0 SR1) d
a 0 0
b 1 0
c 0 1 1/01
Input 0
d 1 1 Input 1
Modul 11 - Siskom 2 - Convolutional Code
15
Trellis Representation of 0/00
0/01
Input 0 0/10 1/10
d
Input 1
Input 0
1/01 Input 1
00 00 00 00 00 00
a (0 0)
11 11 11 11 11 11
b (1 0) 11 11 11 11
00 00 00 00
01 01 01 01 01
c (0 1) 10 10 10 10 10
10 10 10 10
d(1 1) 01 01 01 01
Modul 11 - Siskom 2 - Convolutional Code
16
Trellis Representation of 0/00
0/01
0/10 1/10
Input: 101 Output: 110100 d
Input 0
1/01 Input 1
00 00 00 00 00 00
a (0 0)
11 11 11 11 11 11
b (1 0) 11 11 11 11
00 00 00 00
01 01 01 01 01
c (0 1) 10 10 10 10 10
10 10 10 10
d (1 1) 01 01 01 01
Modul 11 - Siskom 2 - Convolutional Code
17
Input m Output
1 11 10 11
0 00 00 00
1 11 10 11
Modulo-2 sum: 11 10 00 10 11
Modul 11 - Siskom 2 - Convolutional Code
19
Representasi Encoder Menggunakan Polynomial
Optimum decoding
• If the input sequence messages are equally likely, the
optimum decoder which minimizes the probability of error is
the Maximum likelihood decoder.
• Hence, its output is only zero or one (the output is quantized only to two
level) which are called “hard-bits”.
• Decoding based on hard-bits is called the “hard-decision decoding”.
Modul 11 - Siskom 2 - Convolutional Code
23
The Viterbi(algorithm
0, t ) 0 i 2. - cont’d1
ti
1. Set and
2. At time , compute the partial path metrics for all the paths entering each
S (ti ), ti
state. ti
3. Set equal to the best partial path metric entering each state at
time .
Keep the survivor path and delete the dead paths from the trellis.
i LK i
4. If , increase by 1 and return to step 2.
t L K
C. Start at state zero at time . Follow the surviving branches
backwards through the trellis. The path thus defined is unique and
correspond to the ML codeword.
Modul 11 - Siskom 2 - Convolutional Code
27
Maximum Likelihood Decoding of
Convolutional Codes
Maximum Likelihood Decoding:
What is the transmitted sequence that will most likely result in the
received sequence at the decoder side?
Viterbi Decoding of Convolutional Codes:
Maximum likelihood decoding algorithm
Hard Decision:
•The receiver makes a firm hard decision whether one or zero is
received
•The receiver provides no information to the decoder characterizing
reliability of its decision
•The input to the decoder is only zero or one
Viterbi Decoder Hard
Modul 11 - Siskom 2 - Convolutional Code
28
Decision
t
Assume received (Hard Decision) vector is 01 11 00 10 11 01
10 11 01 00 11 10
t
00 1 00 00 00 00 00
a (0 0)
11 11 11 11 11 11
1
b (1 0) 11 11 11 11
00 00 00 00
01 01 01 01 01
c (0 1) 10 10 10 10 10
10 10 10 10
d (1 1) 01 01 01 01
Viterbi Decoder Hard
Modul 11 - Siskom 2 - Convolutional Code
29
Decision
t
Assume received (Hard Decision) vector is 01 11 00 10 11 01
10 11 01 00 11 10
t
00 1 00 3 00 00 00 00
a (0 0)
11 11 11 11 11 11
1 1
b (1 0) 11 11 11 11
00 00 00 00
01 01 01 01 01
c (0 1) 10 10 10 10 10
2
10 10 10 10
d (1 1) 01 01 01 01
2
Viterbi Decoder Hard
Modul 11 - Siskom 2 - Convolutional Code
30
Decision
t
Assume received (Hard Decision) vector is 01 11 00 10 11 01
10 11 01 00 11 10
t 4
1 3 3
00 00 00 00 00 00
a (0 0)
11 11 11 11 11 11
1 4
1
3
b (1 0) 11 11 11 11
00 00 00 00
01 01 1 01 01 01
c (0 1) 10 10 4 10 10 10
2
10 10 10 10
d (1 1) 01 01 01 01
2 3
2
Viterbi Decoder Hard
Modul 11 - Siskom 2 - Convolutional Code
31
Decision
t
Assume received (Hard Decision) vector is 01 11 00 10 11 01
10 11 01 00 11 10
t
1 3 3
00 00 00 00 00
a (0 0)
11 11 11 11 11
1 1
3
b (1 0) 11 11 11 11
00 00 00 00
01 01 1 01 01 01
c (0 1) 10 10 10 10
2
10 10 10
d (1 1) 01 01 01 01
2 2
Viterbi Decoder Hard
Modul 11 - Siskom 2 - Convolutional Code
32
Decision
t
Assume received (Hard Decision) vector is 01 11 00 10 11 01
10 11 01 00 11 10
t 3
1 3 3 3
00 00 00 00 00
a (0 0)
11 11 11 11 11
1 5
1
3 1
b (1 0) 11 11 11 11
00 00 00 00
01 01 1 01 4 01 01
c (0 1) 10 10 3 10 10
2
10 10 10
d (1 1) 01 01 01 01
2 2 4
3
Viterbi Decoder Hard
Modul 11 - Siskom 2 - Convolutional Code
33
Decision
t
Assume received (Hard Decision) vector is 01 11 00 10 11 01
Two Equivalent Paths:
Eliminate one of them at random
10 11 01 00 11 10
t 3
1 3 3 3
00 00 00 00 00
a (0 0)
11 11 11 11
1 1
3 1
b (1 0) 11 11 11 11
00 00 00 00
01 01 1 01 01
c (0 1) 10 3 10 10
2
10 10 10
d (1 1) 01 01 01 01
2 2 3
Viterbi Decoder Hard
Modul 11 - Siskom 2 - Convolutional Code
34
Decision
t
Assume received (Hard Decision) vector is 01 11 00 10 11 01
10 11 01 00 11 10
t
1 3 3 3
00 00 00 00 00
a (0 0)
11 11 11 11
1 1
3 1
b (1 0) 11 11 11
00 00 00 00
01 01 1 01 01
c (0 1) 10 3 10 10
2
10 10 10
d (1 1) 01 01 01 01
2 2 3
Viterbi Decoder Hard
Modul 11 - Siskom 2 - Convolutional Code
35
Decision
t
Assume received (Hard Decision) vector is 01 11 00 10 11 01
10 11 01 00 11 10
t 5
1 3 3 3 3
00 00 00 00 00
a (0 0)
11 11 11 11
1 3
1
3 1 5
b (1 0) 11 11 11
00 00 00 00
01 01 1 01 2 01
c (0 1) 10 3 10 4 10
2
10 10 10
d (1 1) 01 01 01 01
2 2 3 2
4
Viterbi Decoder Hard
Modul 11 - Siskom 2 - Convolutional Code
36
Decision
t
Assume received (Hard Decision) vector is 01 11 00 10 11 01
10 11 01 00 11 10
t
1 3 3 3 3
00 00 00 00
a (0 0)
11 11 11 11
1 3
1
3 1
b (1 0) 11 11 11
00 00 00
01 01 1 01 2 01
c (0 1) 10 3 10 10
2
10 10
d (1 1) 01 01 01
2 2 3 2
Viterbi Decoder Hard
Modul 11 - Siskom 2 - Convolutional Code
37
Decision
t
Assume received (Hard Decision) vector is 01 11 00 10 11 01
10 11 01 00 11 10
t 4
1 3 3 3 3 3
00 00 00 00
a (0 0)
11 11 11 11
1 3 4
1
3 1 3
b (1 0) 11 11 11
00 00 00
01 01 1 01 2 01 5
c (0 1) 10 3 10 10 2
2
10 10
d (1 1) 01 01 01
2 2 3 2 3
4
Viterbi Decoder Hard
Modul 11 - Siskom 2 - Convolutional Code
38
Decision
t
Assume received (Hard Decision) vector is 01 11 00 10 11 01
10 11 01 00 11 10
t
1 3 3 3 3 3
00 00 00
a (0 0)
11 11 11
1 3
1
3 1 3
b (1 0) 11 11 11
00 00 00
01 01 1 01 2
c (0 1) 10 3 10 10 2
2
10 10
d (1 1) 01 01
2 2 3 2 3
Viterbi Decoder Hard
Modul 11 - Siskom 2 - Convolutional Code
39
Decision
t
Assume received (Hard Decision) vector is 01 11 00 10 11 01
Message (0 1 1 0 1 0) Decoded vector is 01 01 00 10 11 00
10 11 01 00 11 10
t
1 3 3 3 3 3
00 00 00
a (0 0)
11 11 11
1 3
1
3 1 3
b (1 0) 11 11 11
00 00 00
01 01 1 01 2
c (0 1) 10 3 10 10 2
2
10 10
d (1 1) 01 01
2 2 3 2 3
Modul 11 - Siskom 2 - Convolutional Code
40
Latihan soal: Hard decision Viterbi
decoding
m (10100) U (11 10 00 10 11)
Z (11 10 11 10 01)
c (0 1) 0/10 0/10
1/01 1/01
0/01 0/01
d(1 1)
t1 t2 t3 t4 t5 t6
Free distance …
The path diverging and remerging to Hamming weight
All-zero path
all-zero path with minimum weight of the branch
df 5
0 0 0 0 0
2 2 2
2 2 2
1 0
1 1
1 1
1 1
t1 t2 t3 t4 t5 t6
Hard Decision Vs Soft Decision Performance:
Example 1/3 Repetition Code
-1
10
Soft Decision Decoding
Hard Decision Decoding
-2
10
-4
10
-5
10
-6
10
-7
10
0 1 2 3 4 5 6 7 8 9
2 2
SNR = 10*log
(dB) 10(a / ) (dB)
Modul 11 - Siskom 2 - Convolutional Code
44
Tugas, Dikumpulkan !
Exercise 2