Modul 14 Source Coding
Modul 14 Source Coding
TEORI INFORMASI
Digital modulation
Channel
Digital demodulation
Sumber Informasi
Kandungan Informasi
Entropy
Joint Entropy
Conditional Entropy
Mutual Information
Yang didefinisikan sebagai fungsi Peluang / Distribusi Peluang
Kapasitas kanal
1
I (si ) log2 log2 p(si )
p(si )
Satuan yang digunakan adalah bits
I(s1)=log22=1 bits
I(s2)=log24=2 bits
I(s3)=I(s4)=log28=3 bits
Example 2:
S={s1, s2, s3, s4}, p1= p2= p3= p4=1/4.
I(s1)=I(s2)=I(s3)=I(s4)=log24=2 bits
Properties of I(s)
1) I(s) 0 (a real nonnegative measure)
2) I(s1s2) = I(s1)+I(s2) for independent event.
3) I(s) is a continuous function of p.
4) I(s) = 0 for p(si)=1
5) I(s1) > I(s2) if p(s1) < p(s2)
Intuitively, property 2 tells us that each
outcome, e.g., coin or die, has no
influence on the outcome of the other.
0.80
0.60
H(P)
0.40
0.20
0.00
0.00 0.20 0.40 0.60 0.80 1.00
P
Modul 8 - Siskom 2 - Teori Informasi 12
SOURCE CODING
Adalah konversi output dari DMS ke bentuk binary
sequence, devicenya disebut SOURCE ENCODER
discrete Source
memoryless encoder
sources Si
Binary sequence
S={s1, s2,.., sq} X={x1, x2}
Lmin L
Lmin adalah nilai L minimum yang mungkin muncul. Apabila = 1 maka
kode dikatakan efisien.
Sedangkan redundansi dari kode didefinisikan: 1
Modul 8 - Siskom 2 - Teori Informasi 14
TEOREMA SOURCE CODING
Teorema Source Coding menyatakan bahwa untuk DMS dari S dengan
entropy H(S), maka panjang codeword rata-rata dibatasi oleh:
L H (S )
H(S)
Apabila Lmin = H(S), maka:
L
Secara umum: L Lmin dan 1
Suatu Source Coding dikatakan optimal jika panjang kode minimal
(memiliki Lmin)
1
2 ni
i 1
Modul 8 - Siskom 2 - Teori Informasi 15
CONTOH SOURCE CODING (1)
SHANNON FANO CODING
PROSEDUR:
1) Urutkan sumber simbol berdasarkan probabiltas dari yang
terbesar ke yang terkecil
2) Bagi sumber simbol menjadi 2 set dimana masing-masing
set mempunyai probabilitas yang hampir sama. Beri tanda
bit 0 untuk set yang tinggi dan bit 1 untuk set yang lebih
rendah
3) Ulangi proses di atas sampai tidak mungkin sumber simbol
dibagi lagi
Contoh:Tentukan keluaran Source Coding dengan prosedur
Shannon-Fano untuk keluaran DMS sebanyak 6 simbol
dengan peluangnya 0,05; 0,08; 0,12; 0,20; 0,25; 0,30
Modul 8 - Siskom 2 - Teori Informasi 16
Solusi:
Step 5
Si P(Si) Step 1 Step 2 Step 3 Step 4
Codeword
S1 0,30 0 0 00
S2 0,25 0 1 01
S3 0,20 1 0 10
S4 0,12 1 1 0 110
S5 0,08 1 1 1 0 1110
S6 0,05 1 1 1 1 1111
Buktikan bahwa:
H(S) = 2,36 bits/simbol
L=2,38 bits/simbol
=0,99
Modul 8 - Siskom 2 - Teori Informasi 17
CONTOH SOURCE CODING (2)
HUFFMAN-CODING
Source coding ini adalah salah satu
kode yang optimum dan mempunyai
efisiensi yang tinggi
PROSEDUR: D.A. Huffman
1. Urutkan simbol berdasarkan probabilitasnya dari terbesar ke terkecil
2. Jumlahkan probabilitas 2 buah simbol dari probabilitas terkecil dan
urutkan kembali probabilitasnya mulai yang terbesar
3. Beri tanda bit 0 untuk probabilitas yang lebih besar dan tanda bit 1
untuk probabilitas yang lebih kecil
4. Ulangi langkah di atas sampai jumlah probabilitasnya = 1
1
1 0 Si codeword
0,40 0,60 S0 00
1 0 1 0 S1 01
0,19 0,21 0,25 0,35 S2 11
S2 1 0 S1 S0 S3 101
0,10 0,11 S4 1000
S3 1 0 S5 1001
0,05 0,06
S5 S4
Modul 8 - Siskom 2 - Teori Informasi 19
Tugas, dikumpulkan !
1. Diketahui simbol-simbol keluaran DMS sebagai berikut:
Simbol Probability
a. Dengan menggunakan prosedur Shannon-
Fano, tentukan simbol-simbol (codeword)
S0 0,4
output Source Coding !
S1 0,2 b. Tentukan efisiensi codeword yang
S2 0,2 dihasilkan (bag a)!
S3 0,1 c. Dengan menggunakan prosedur Huffman,
S4 0,1 tentukan simbol-simbol (codeword) output
Source Coding !
d. Tentukan efisiensi codeword yang
dihasilkan (bag c)!
2. Diketahui simbol-simbol keluaran DMS sebagai berikut:
Simbol S0 S1 S2 S3 S4 S5
Probability 0,3 0,25 0,20 0,12 0,08 0,05
Pertanyaan sama spt soal no 1
1 p p
P[Y / X ]
p 1 p
K -1 J 1 1
p( x j | yk ) p( yk ) log 2
k 0 j 0 p( x j | yk )
K -1 J 1 1
p( x j , yk ) log 2
k 0 j 0 p( x j | y k
)
Maka MUTUAL INFORMATION didefinisikan:
I ( X ; Y) H(X) H X|Y
Modul 8 - Siskom 2 - Teori Informasi 26
Mutual Information
MUTUAL INFORMATION merepresentasikan kandungan informasi dari
X apabila output kanal sudah diketahui I(X;Y)
H(X , Y)
H(X|Y) H(Y)
H(X) I(Y|X)
I(X ; Y)
Channel Channel
Modul 8 - Siskom 2 - Teori Informasi 28
Property of Mutual Information:
H(X) H(Y)
H(X) H(Y)
H(X)
p( x ) 1
i
i
p x0 , y0 p y0 | x0 p( x0 ) (1 p) ( x1 , y1 )
1
2
p x1 , y0 p y0 | x1 p( x1 ) p p x0 , y1
1
2
1 1
p( y0 ) p( y1 )
2 2
Modul 8 - Siskom 2 - Teori Informasi 31
KAPASITAS KANAL
Contoh kasus BSC Binary Simetric
Channel 1 1
C (1 p) log2 2(1 p) 2 p log2 2 p 2
2 2
(1 p)1 log2 (1 p) plog p 1
1 (1- p)log2 (1 p) p log2 p
Dari Grafik:
Jika kanal bebas noise (p=0), C akan
maksimum yaitu 1 bits/ch; tetapi
entropinya akan minimum [H(p)=0]
Jika kanal ada noise dgn p=1/2, C akan
minimum yaitu 0 bits/ch; tetapi entropinya
akan maksimum [H(p)=1] kondisi ini
disebut useless
Kondisi inverting Channel, Jika kanal
bebas noise (p=1), C akan maksimum
yaitu 1 bits/ch
C Eb C
log 2 1
B N0 B
Eb 2 C B 1
N0 C B
Eb Eb 2C B 1
lim lim ln 2 0.693 1.6dB
N0 B
N0 B C B
P P
C lim C lim B log 2 1 log 2 e
B B
N0 B N0
trade off
vertical line : for fixed Eb /N0 , Pe Rb /B
Note!
M = 2k
PE Rb
Rb log 2 M M Eb N 0
but
B 2 B
Eb / N 0 dB
Modul 8 - Siskom 2 - Teori Informasi 37
M-ary FSK
Lihat pula figure 9.17 Buku Simon Haykin 4th Edt: Pe vs Rb/B, pd Pe =10-5
Note!
M = 2k
PE
Rb 2 log 2 M Rb
M & Eb / N0
B M B
Eb / N 0 dB
Modul 8 - Siskom 2 - Teori Informasi 38
Modul 8 - Siskom 2 - Teori Informasi 39