Está en la página 1de 21

Chng 1: L thuyt thng tin v m ho

Chng 1

L THUYT THNG TIN V M HO

Hnh 1.1. S khi HTTT

1.1. Gii thiu m ho v thng tin


1.1.1. Khi nim m ho M ho l vic chuyn i cc phn t ca mt tp i lng ny thnh mt tp cc i lng khc (theo mi quan h 1-1), nhm mc ch tin li cho vic lu tr v trao i thng tin. M ho l php bin i cu trc tin ti ni pht nhm mc ch nhn c tin ti ni thu trung thc hn , c tin cy cao hn , kh nng chng nhiu cao hn , truyn i xa hn V d 1: Php ri rc ho ngun tin lin tc thnh ngun tin ri rc l mt php m ho V d 2: Tp hp cc s { 0, 1,, 9,A,B,C,D,E,F } m ho thnh { 0000, 0001,,1111 } Vic chn ( thit lp ) b m ho phi tho nguyn tc l c th gii m ra duy nht 1 kt qu ti ni thu tin

Chng 1: L thuyt thng tin v m ho

S pht trin ca m ho (Coding) M ho pht trin t trong t nhin, VD: ting h, vic lm du ca loi vt, thng bo cho ng loi bit v iu g , . Vi con ngi cng vy, vic m ho pht trin hnh thc cao hn loi vt l ting ni, ri sau l ngn ng. Vi s pht trin ca x hi loi ngi, nhu cu truyn tin, thng tin ngy cng tr nn quan trng, cng t m cc hnh thc m ho khc nhau c hnh thnh thch ng vi s pht trin . 1.1.2. Khi nim thng tin (information) Tin tc ( News ) phn nh s vt hin tng khch quan vi s nhn bit ca con ngi . Tin tc c tnh cht l s mi m ( bt ng ) ngha v tin cy Thng tin ( Information ) l tin tc c ngha, c s quan tm ca con ngi Thng tin trung bnh, Entropy Xt ngun tin XN gm N tin l x1 , x2 ,, xN c xc sut xut hin l p(1), p(2) ,, p(N) . Theo lut phn b xc sut , ta c
N

i=1

p(i) = 1

Nu cc tin l ng xc sut th p(i) = 1/N Khi 1/p(i) cng ln , th p(i) cng b , th bt ng ca tin cng ln , tin cng c ngha, lng tin ca xi cng ln. Khi 1/p(i) cng b , th p(i) cng ln , bt ng ca tin cng b , tin cng t c ngha, lng tin ca xi cng b.

Khi p(i) = 1 , th bt ng ca tin = 0 , tin nhn c khng c ngha lng tin ca xi = 0. Ta nh ngha lng tin ( information content ) ca xi l [bit] I(i) = log2 (1/p(i) ) = -log2 p(i) V d 1: Thng ip truyn tin dng nh phn, cc biu tng l (0,1) p0 =p1 = 0.5

I 0 = I 1 = log 2

1 =1 0 .5

V d 2: Thng ip truyn tin c 4 biu tng l (<*>, <->, <-->, < >) Cho

p<> = 0.1 , p<> = 0.2 , p< > = 0.3 , p<> = 0.4


6

Chng 1: L thuyt thng tin v m ho

I <> = log 2
. VD: I <> = log 2

Gi tr ca thng tin c th xem nh s bt nh phn cn th hin thng tin

1 = 3.32 , 0 .1

Lng tin trung bnh ca ngun tin X ( Entropy ca ngun tin X ) c nh ngha l
N N

1 = 3.32 bit. 0.1

H (X ) =

i=1

p(i)*I(i) = -

i=1

p(i)*log 2 p(i) [bit ]

V d 3 : Tnh lng tin v Entropy ca mt on tin di 12 ch s , mi ch s c 4 mc ( v d nh mi ch s ch c 1 trong 4 gi tr l 0,1,2,3 ). Cho xc sut 4 mc bng nhau . Cc ch s xut hin mt cch c lp nhau Gii S t hp khc nhau c th nhn c l N = 412. Xc sut xut hin mt t hp l p(i) = 1/N = 4-12 = 2-24 Lng tin nhn c t mt t hp l I(i) = -log 2p(i) = 24 [bit] Lng tin trung bnh (entropy) trong trng hp ng xc sut l
N N

H=

i= 1

p(i)*I(i) =

i= 1

I(i)/ N = I(i) [bit ]

H = -log 2p(i) = 24 [bit] Tc truyn tin R l lng tin trung bnh do ngun pht ra trong mt n v thi gian

R =

H [bps ] T

T l thi gian cn gi mt on tin H l Entropy ca ngun tin Ch rng cc ngun tin lin tc , ta c th biu th gn ng bng cc ngun ri rc vi chnh xc kh cao 1.2. Phn loi cc hnh thc m ho : C 3 loi m ho V d : Minh ho mt h thng truyn d liu, bao gm cc hnh thc m khc nhau c s dng trong h thng.

Chng 1: L thuyt thng tin v m ho

S vt hin tng

M ha ASCI

Cc file vn bn, hnh v

M ha Winzip

Cc file nn

M ha Parity

Chui d M ha liu NRZ ng truyn

Hnh 1.2. S khi th t cc dng m ho 1.2.1. M ho ngun (Source coding) Mc ch ca m ho ngun l bin i mt tp i lng ngun ny thnh mt tp i lng ngun khc tin li cho vic lu tr v bo mt. V d: m ho ASCII, m nn Winzip, ... V d: cho ngun tin hom nay di hoc c 14 k t , nu m ho nh phn th cn 4 bit ( Do 24 =16 > 14 ) Da vo cc ng dng thc t ta c ba loi m ho ngun: 1. M ho th hin ( m ho ASCII ) 2. M ho nn ( m nn Winzip, MP3, JPEG ) 3. M ho bo mt 1.2.2. M ho knh (channel coding) M knh truyn l hnh thc bin i trn tp d liu ngun bng mt thut ton, nhm tin li cho vic kim tra v sa li ng truyn. V d nh m Parity c chc nng kim tra chn l cho khi d liu. 1.2.3. M ho ng truyn (Line coding) L hnh thc chuyn i mt tp i lng ngun thnh mt tp i lng in (u, i, f) tin li cho vic truyn dn thng tin. C 2 loi m ho ng truyn: m ho ng truyn dy nn, m ho ng truyn bng iu ch. M ho ng truyn dy nn (Base Band): bin i mc d liu ngun thnh dng sng vung v in p. V d : cc bt d liu ngun dng nh phn c truyn trn ng truyn vi dng in p nh hnh minh ho di.

HDB3

+ 0 -V

0 1 1 0 1 0 0 0 0 0 0 0 0 1 1 t

Hnh 1.3. Dng m ho ng truyn HDB3

Chng 1: L thuyt thng tin v m ho

M ho ng truyn bng iu ch: tn hiu ngun c truyn i vi khong cch xa bng cch iu ch vi sng mang. V d 1: tn hiu Audio c truyn i xa bng cch iu ch vi sng mang, bng k thut AM, FM, V d 2: ngun d liu s c truyn i vi khong cch xa bng cch dng cc k thut iu ch s, nh ASK, PSK, FSK 1.3. M ho ngun ( source coding) Da vo cc ng dng thc t ta c ba loi m ho ngun: M ho th hin, m ho nn, m ho bo mt M ho phi tho mn yu cu l c th gii m ra 1 cch duy nht 1.3.1. M ho biu hin s vt hin tng M ho ny nhm mc ch m t s vt hin tng bng cc ngn ng ca ch th V d 1: M ho ASCII dng m t s vt di dng vn bn con ngi c th hiu c. V d 2: M ho nh phn c s dng m t s vt bng ngn ng ca ca my tnh. Trng hp c 8 trng thi c biu din m nh phn ng u 3 bit, t 000 n 111 Ngi ta cng c th biu din m nh phn khng ng u, bng cch lit k. V d B m x1 00 x2 01 x3 100 x4 x5

1010 1011

Nh th ngun tin x1 x2 x3 x4 x5 s c m ho l 00 01 100 1010 1011 c th gii m ra 1 cch duy nht th b m phi c tnh Prefix ngha l trong b m khng c t m no ngn , li l phn u ca t m di hn n. B m v d trn c tnh Prefix . Ti ni thu khi nhn c dy bit 00 01 100 1010 1011 ta s gii m ra 1 cch duy nht l x1 x2 x3 x4 x5 1.3.2. M ho nn d liu a. c im S dng cc thut ton loi b cc thng tin d tha. Thng tin d tha th hin qua s lp i lp li cc on thng ip trong tp ngun tin. b. M ho Shanon-Fano c lp vi nhau , Shannon v Fano cng xy dng phng php thng k ti u da trn cng 1 c s : di t m t l nghch vi xc sut xut hin

Chng 1: L thuyt thng tin v m ho

y chnh l bc khi u cho s pht trin ca cc k thut m ho nn d liu pht trin sau ny. Cc bc lp m: 1. Sp xp ngun tin theo th t gim dn ca xc sut xut hin 2. Chia ngun tin thnh 2 nhm sao cho xc sut xut hin mi nhm xp x bng nhau. 3. Gn cho mi nhm k m 0 hay 1 4. Coi mi nhm nh ngun tin mi , quay tr li lm bc 2 , cho n khi mi nhm ch cn cha duy nht 1 tin 5. T m ng vi mi mi lp tin l t hp cc k m cc nhm , ly tng ng t nhm ln n nhm nh ( t tri sang phi ) V d 1 : cho ngun tin sau , lp bng m Shanon-Fano

Phng php chung thc hin Bc1: Xc nh cc k hiu (symbols, characters c s c trong tp m ngun, v xc sut xut hin ca n. Bc 2: Lp bng m c s, cc k hiu c s c sp theo th t xc sut gim dn. dng thut ton chia i xc sut vit t m c s Bc 3: Da vo bng m c s, vit m ngun V d 2 : Cho tp ngun tin sau:"hom nay troi nang, ngay mai troi mua", Dng m ho Shanon-Fano, lp bng m c s cho tp ngun tin trn.

10

Chng 1: L thuyt thng tin v m ho

Gii Bc 1: Cc k hiu c s:{h, o, m, n, a, y, t, r, i, g, u, _}. Xc sut tng ng l Ph = Pu = 1/35, Po = Pm = Pi = 3/35, Pn = 4/35, Pa = 5/35, Py = Pt = Pr = Pg = 2/35, P_ = 7/35. Bc 2: Lp bng m c s STT K t 1 2 3 4 5 6 7 8 9 10 11 12 _ a n o m i y t r g h u Xc sut 7/35 5/35 4/35 3/35 3/35 3/35 2/35 2/35 2/35 2/35 1/35 1/35 0 0 0 1 1 1 1 1 1 1 1 1 0 1 1 0 0 0 1 1 1 1 1 1 0 1 0 1 1 0 0 1 1 1 1 0 1 0 1 0 1 1 1 0 1 1 0 1 T m 00 010 011 100 1010 1011 1100 1101 1110 11110 111110 111111

Tng s bit truyn i khi m ho l 2.7+ 3.12+ 4.12+ 5.2+ 6.2 = 120 Tng s bit truyn i nu khng m ho l 7.35 = 245 c. M ha Lempel-Zip c im y l phng php nn d liu trc tip, t m hin ti c xc nh da vo cc t m trc . Phng php m ha ny rt hu hiu khi dng trong my tnh, v vi nhng tp ngun d liu ln th vic xc nh xc sut th rt tn thi gian. Trong thut ton Lempel-Ziv, mt dy cc k hiu ca ngun ri rc c chia thnh cc khi c di thay i v c gi l cc cu ( chui c s).

11

Chng 1: L thuyt thng tin v m ho

Mt cu mi c to ra gm 2 phn : phn u l 1 cu c m n tng xut hin trc , phn sau l 1 bit mi b xung thm. Trong bng m c s, mt cu c lit k tng ng vi v tr (a ch) duy nht m n xut hin. V tr (a ch) ny bt u t 1 v tng dn dn ln Khi u, v tr (a ch) 0000 dng tng ng cho mt cu cha tng xut hin trong t in. M ha mt cu mi, to ra 1 t m mi, ta ghp v tr (a ch) ca 1 cu no c trc trong t in vi gi tr ca bit mi vo pha cui. V d 1 : Ta xt dy k hiu nh phn sau: 10101 10100 10011 10101 00001 10011 10101 10001 1011 ( c 44 bit ) Hay 1 0 10 11 01 00 100 111 010 1000 011 001 110 101 10001 1011 Chia dy k hiu trn thnh cc cu c ngn cch bi cc du , nh sau: 1,0,10,11,01,00,100,111,010,1000,011,001,110,101,10001,1011 Ta thy rng mi cu trong dy l ghp ca ca 1 cu c v mt k hiu mi. m ho cc cu, ta xy dng mt bng m c s (t in) nh bng di. Cc v tr ca cc cu trong t in lin tip nhau, bt u bng 1 v tng dn, trong trng hp ny ln n 16. Bng m c s (t in) V tr (a ch) Ni dung trong t in cc cu 0000 0001 1 0010 0 0011 10 0100 11 0101 01 0110 00 0111 100 1000 111 1001 010 1010 1000 1011 011 1100 001 1101 110 1110 101 1111 10001 1011 44 bit

STT

T m

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 TS bit

0000 1 0000 0 0001 0 0001 1 0010 1 0010 0 0011 0 0100 1 0101 0 0111 0 0101 1 0110 1 0100 0 0011 1 1010 1 1110 1 80 bit

12

Chng 1: L thuyt thng tin v m ho

gii m cn phi xy dng li t in pha thu ging nh pha pht v sau l gii m ln lt cc t m nhn c. Ta nhn thy rng qu trnh m ho trong v d trn m ho 44 k hiu nh phn ca ngun thnh 16 t m, v mi t m c di 5 bit. Nh vy l trong v d ny khng thc hin nn s liu, l do chui k hiu c quan st qu ngn. Nu chui k hiu c quan st di ra thm th thut ton s tr nn hiu qu hn v s nn c s liu ca ngun. Vn by gi t ra l ln ca ca t in l bao nhiu. Ni chung, ln ca t in ch ph thuc vo b nh dng trong lu tr. Thut ton Lempel-Ziv c s dng rng ri trong vic nn s liu cc file trong my tnh. Cc tin ch nh compress v uncompress trong h iu hnh Unix v DOS xut pht t thut ton ny. Tm tt phng php thc hin: Bc 1: Xc nh chui k hiu c s Bc 2: Lp bng m c s bng cch Lit k cc chui k hiu c s, nh s th t tng ng t 1 v tng dn Vit m nh phn ng vi s th t v tr xut hin. T m c s c to ra bng cch ghp t m nh phn ca chui k hiu c s trc vi bt cn li. Bc 3: Vit m ngun V d 2: cho chui ngun "0100111010100000100000010000000000011000000000000000". Hay "0 1 00 11 10 101 000 001 0000 0010 00000 000001 100 000000 0000000". Dng m ho lempel-Zip, xc nh m ngun. Gii Bc 1: Xc nh cc chui k hiu c s ( cc cu) {0,1,00,11,10,101,000,001,0000,0010,00000,000001,100,000000,0000000}

13

Chng 1: L thuyt thng tin v m ho

Bc 2: Lp bng m c s STT 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 M nh phn 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1011 1100 1101 1110 1111 chui c s 0 1 00 11 10 101 000 001 0000 0010 00000 000001 100 000000 0000000 T m 0000 0 0000 1 0001 0 0010 1 0010 0 0101 1 0011 0 0011 1 0111 0 1000 0 1001 0 1011 1 0101 0 1011 0 1110 0

1.3.3. M ho bo mt c im: y l hnh thc m ho bng mt thut cho php lm m i ni dung ngun tin khi truyn tin, i tng nhn nu khng c thut ton gii m s khng c c ni dung. VD: Cho tp tin ngun "hom nay troi nang" c th m ho bo mt thnh "gnan iort yan moh", . 1.4. M ho knh M ho knh cho php pht hin li v sa li. N lm tng cht lng tin nhn c, gim t s bit li BER , do tnh cht ny nn ta cn c th gi l m chng nhiu

14

Chng 1: L thuyt thng tin v m ho

gim li nhn c ni thu , ngi ta dng mt trong hai k thut chnh sau y: Yu cu lp li t ng (ARQ ) Sa li trc ( FEC ) 1.4.1. Yu cu lp li t ng (ARQ Automatic Repeat request ) Khi pht hin thy li , my thu s yu cu truyn li khi s liu ARQ thng dng trong h thng c tnh cht sau Knh truyn song cng tr ng truyn nh Truyn tin dng s liu ( Data ) . Khng cn thi gian thc ARQ khng dng trong h thng c tnh cht sau Knh truyn n cng tr ng truyn ln Truyn tn hiu cn thi gian thc 1.4.2. Sa li trc - Forward error correction (FEC) S liu c m ho trc khi truyn i, cho my thu sau khi nhn c, gii m c th pht hin ra li v sa li FEC thng dng trong h thng c tnh cht truyn tin dng thoi ( Voice ) v cn thi gian thc Nu truyn k bit c thm (n-k) bit pht hin ra li v sa li th t l m FEC l k/n V d : Nu truyn 7 bit c thm 1 bit kim tra chn l th t l m FEC l 7/8 Nu truyn 9 bit c thm 4 bit sa sai th t l m FEC l 9/12 = Thng thng , t l m FEC l t n 7/8 Cc m c biu th l (n,k). T l m FEC l k/n Nu s bit thm vo cng nhiu , th thng thng m c c tnh pht hin sai v sa sai cng mnh , nhng li lm gim lu lng tin tc FEC s dng 2 nhm m ho knh ch yu sau 1. Nhm M khi tuyn tnh (Linear block codes- M khng nh ) : L nh x t k k hiu nh phn u vo sang n k hiu nh phn u ra. Vi cc k hiu u ra ch ph thuc vo k k hiu u vo

15

Chng 1: L thuyt thng tin v m ho

2. Nhm m xon, cun, kt hp ( Convolutional codes - M c nh ) : L nh x t k k hiu nh phn u vo sang n k hiu nh phn u ra . Vi cc k hiu u ra ph thuc vo k k hiu u vo v v k hiu ca b nh Nhm m khi ( M khng nh ): bao gm m Hamming, m vng (Cyclic code ), BCH, Reed-Solomon, Maximal-Lengths V d sau minh ho r v tnh cht pht hin li v sa li Khong cch d gia 2 t m l s v tr m chng c gi tr khc nhau . Gi s cn truyn mt b m gm 2 t m 110 101 v 011 001 c d=3 v chng khc nhau ti 3 v tr th 1,3,4. Pht hin sai : Nu ti ni thu , nhn c mt t m 6 ch s bt k m khc 2 t m trn (110 101 v 011001 ) s b xem l t m sai. Sa sai : Nu t m sai nhn c ch sai ng 1 bit th my thu s sa sai a v c t m ng. Nu t m sai nhn c sai trn 1 bit th my thu s sa sai , nhng c th a ra t m sai. V d khi truyn t m 110 101 , n ni thu b sai 2 bit ti v tr 1 v 3 , nn t m nhn c s l 011 101 . Ni thu s pht hin sai v hiu chnh v t m c khong cch gn nht l 011 001 bng cch hiu chnh bit ti v tr 4. y l kt qu sai.

Hnh 1.4. S dng FEC ci thin r rt cht lng ng truyn

16

Chng 1: L thuyt thng tin v m ho

1.5. M ho ng truyn ( line coding ) Mc ch m ho ng truyn Xt trng hp thng tin c truyn i trn ng dy cp ng. Gi s c 1 tn hiu to ra t cc thit b truyn dn nh sau

5V 0V

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

Hnh 1.5. Tn hiu TTL. Tn hiu gc ny truyn trn cp ng s gp phi mt s bt li: Mc in p nhn c u thu thp do b suy hao, tc ng ca nhiu tr nn mnh hn. Mc DC trung bnh kh ln. Khi xut hin mt chui bit 0 hay chui bit 1 ko di lin tip th kh nng ng b bit (clock thu theo clock pht) km i v c th mt ng b. khc phc cc bt li trn, thng tin phi c bin i dng thch hp c th truyn ti trn ng truyn cp ng. Vic ny c gi l m ho ng truyn. Vic bin i tn hiu sao cho n c dng sng ph hp vi c tnh knh truyn vt l v thit b thu c gi l m ho ng truyn ( line coding ). Cc m ng truyn ( line codes )

Line code

Unipolar

Polar

Bipolar

NRZ

RZ

Biphase

AMI

B8ZS

HDB3

NRZ-L

NRZ-I

Manchester

Differential Manchester

Hnh 1.6. Cc m ng truyn thng dng.

17

Chng 1: L thuyt thng tin v m ho

1.5.1. M Unipolar - xung n cc M Unipolar rt n gin v c nhiu khuyt im nn hu nh khng cn dng trong cc trong cc ng dng ngy nay. H thng truyn dn gi cc xung in p dc theo ng dy (hnh 1.3). Thng thng, ch mt mc in p (dng hoc m) tiu biu cho bit 1 v 0 Vn tiu biu cho bit 0. m ny, mc DC trung bnh kh cao v khi c mt chui bit 0 hay chui bit 1 ko di lin tip th kh nng ng b bit rt km.

Bien o V 0
Hnh 1.7. M ho Unipolar. 1.5.2. M Polar. Phng php m ho ny dng hai mc in p dng v m. Thnh phn DC trung bnh gim ng k, c bit vi m Manchester v Manchester vi sai th Thnh phn DC trung bnh bng 0. a. NRZ (Non Return to Zero) NRZ c thi gian tn ti ca xung in p bng rng ca mt bit, tn hiu ch c 2 mc +V v V , khng c mc 0. C hai loi NRZ l NRZ-L v NRZ-I Vi NRZ-L mc in p dng tiu biu cho bit 0 (hoc c th ngc li). mc in p m tiu biu cho bit 1 (hoc c th ngc li). Vi cch m ho ny vic ng b bit s kh khn khi nhiu bit 0 hoc bit 1 truyn lin tip.

0 1 0 1 0 0 1 1 0 1 1 1 0 0 1 t

Hnh 1.8. M ho NRZ-L c bit 0


Vi NRZ-I

+V ; bit 1

-V

mc in p s thay i (t mc in p m sang mc in p dng hoc ngc li) i vi mi bit 1.

18

Chng 1: L thuyt thng tin v m ho

Mc in p gi nguyn i vi bit 0. Vi cch m ho ny vic ng b bit s kh khn khi nhiu bit 0 truyn lin tip.

Hnh 1.9. M ho NRZ-I bit 0 gi nguyn mc; bit 1 o mc b. M RZ

RZ

+ 0 -V

0 1 0 1 0 0 1 1 0 1 1 1 0 0 1 t

Hnh 1.10. M ho RZ. bit 0 M RZ dng 3 mc dng, m v zero.

-V ; bit 1

+V

Bit 1 c m ho thnh xung in p dng. bit 0 c m ho thnh xung in p m. M RZ c thi gian tn ti ca xung in p nh hn (v thng thng bng ) rng ca mt bit tn hiu Vi m RZ, vic ng b bit rt tt do lun c qu ti mi bit. Nhng c nhc im l i hi mt bng thng ng truyn rng hn. c. Biphase. m Biphase, tn hiu chuyn mc ti im gia ca mi bit nhng khng tr v zero nh RZ. C hai loi m Biphase l Manchester v Manchester vi sai (Differential Manchester) Mc DC trung bnh trong m ho Manchester v Manchester vi sai bng 0, ng b bit tt, nhng cng i hi mt bng thng ng truyn rng hn. Vi m Manchester: chuyn mc t m sang dng tiu biu cho bit 0

19

Chng 1: L thuyt thng tin v m ho

chuyn mc t dng sang m tiu biu cho bit 1. Vi m Manchester vi sai: chuyn mc ti im gia mi bit 1 chuyn mc ti u mi bit 0 v ti im gia mi bit 0

Manchester

+ 0 -V

0 1 0 1 0 0 1 1 0 1 1 1 0 0 1 t

+ Differential 0 Manchester -V

0 1 0 1 0 0 1 1 0 1 1 1 0 0 1 t

Hnh 1.11. M ho Manchester v Differential Manchester. 1.5.3. Bipolar Trong m Bipolar, bit 0 c m ho thnh mc in p 0 volt, bit 1 c m ho thnh cc xung in p dng v m lun phin xen k nhau. Thi gian tn ti ( rng) ca xung in p nh hn hoc bng thi gian tn ti ca mt bit. Trn thc t thi gian ny thng bng thi gian tn ti ca mt bit. Trong cc hnh v cho m Bipolar, xem xung in p cho bit 1 c rng bng thi gian tn ti ca mt bit. Cc m Bipolar thng dng nht l AMI, B8ZS, HDB3. a. AMI (Alternate Mark Inversion) Trong m AMI bit 0 m ho thnh 0 volt, bit 1 l cc xung in p dng v m lun phin xen k nhau M ho AMI c mc DC trung bnh bng 0, nhng ng b bit km khi truyn lin tip mt chui bit 0.

20

Chng 1: L thuyt thng tin v m ho

Hnh 1.12. M ho AMI bit 0

0 Volt ; bit 1

o cc

b. B8ZS (Bipolar 8-Zero Substitution) (chun Bc M ) B8ZS cng tng t AMI nhng khc phc tnh trng mt chui bit 0 lin tip ko di. Mt chui 8 bit 0 c m ho thnh mt chui khc v c gi l s vi phm (violation). 8 bit 0 s c m ho thnh 000+-0-+ nu xung in p ca bit 1 trc l dng. Ngc li, 8 bit 0 s c m ho thnh 000-+0+- nu xung in p ca bit 1 trc l m

B8ZS

+ 0 -V

0 1 0 0 1 0 0 0 0 0 0 0 0 1 1 t

Hnh 1.13. M ho B8ZS lut 000V B0VB


Bng 1.1. Qui lut m ho 8 bit 0 lin tip trong m B8ZS. Cc tnh bit D liu vo ra 1 ng trc + 0 0 0 0 0 0 0 + 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 + 0 + 1 0000 000 0 + 000+ -0- + - 000- +0+ Khi gii m: Khi b thu pht hin hai xung c cc tnh ging nhau bao quanh 3 bit 0 lin tip th b thu hiu l s vi phm (th nht),

Vo Ra Vo Ra

0 + 0 -

21

Chng 1: L thuyt thng tin v m ho

K tip b thu s tm vi phm mong i th hai, l hai xung c cc tnh ging nhau (nhng khc vi cc tnh ca vi phm th nht) bao quanh 1 bit 0. Lc ny b thu s din dch d liu l mt chui 8 bit 0 lin tip. 3. HDB3 (High-Density Bipolar 3). (Chun Chu u v Nht Bn) Trong HDB3, 4 bit 0 lin tip s c m ho thnh 4 bit khc. Lut m ho 4 bit 0 lin tip nh sau: Nu tng s xung (bit 1) trc k t ln thay th sau cng l l v o Nu bit 1 ngay trc l dng th 4 bit 0 c m ho thnh 000+. o Nu xung bit 1 ngay trc l m th 4 bit 0 c m ho thnh 000-. Nu tng s xung (bit 1) trc k t ln thay th sau cng l chn v o Nu bit 1 ngay trc l dng th 4 bit 0 c m ho thnh -00-. o Nu xung bit 1 ngay trc l m th 4 bit 0 c m ho thnh +00+.

Bng 1.2. Qui lut m ho 4 bit 0 lin tip trong m HDB3. Vo + 0 0 0 S bit 1 trc k t ln Ra + 0 0 0 thay th sau Vo 0 0 0 cng l l Ra 0 0 0 Vo + 0 0 0 S bit 1 trc k t ln Ra + 0 0 thay th sau Vo 0 0 0 cng l chn Ra + 0 0

0 + 0 0 0 +

HDB3

+ 0 -V

0 1 1 0 1 0 0 0 0 0 0 0 0 1 1 t

Hnh 1.14. M ho HDB3, lut 000V or B00V 1 0000 000 0 + 000+ -00 - 000- +00 + 1.5.4. nh gi cc m ng truyn

22

Chng 1: L thuyt thng tin v m ho

nh gi cc loi m ho (c cho trn bng 3) da trn cc tiu chun Mc DC trung bnh. Kh nng ng b bit (phc hi xung clock). Bng thng cn thit truyn tn hiu m ho. Bng 1.3. nh gi cc loi m ho ng truyn. DC Kh nng ng b trung bnh Ln Km khi truyn chui bit 0 hoc chui bit 1 Thp Km khi truyn chui bit 0 Thp Tt 0 Tt 0 Km khi truyn chui bit 0 0 Tt 0 Tt

M ng truyn Unipolar NRZ-I RZ Manchester AMI B8ZS HDB3

Bng thng Thp Thp Cao Cao Thp Thp Thp

Mi m c u v nhc im ring. Loi m c 2 mc in p th ch cn 1 ngun cung cp , nhng yu cu ng truyn phi truyn c mc DC. Loi m c lng cc th cn n 2 ngun cung cp , nhng khng yu cu ng truyn phi truyn c mc DC. M Manchester c tnh cht l thnh phn DC lun bng 0 , nhng bng thng li tng gp i Cc tnh cht mong mun ca m ng truyn: Thnh phn DC gim xung 0 T ng b: Nu tn hiu gm mt chui di cc bit 1 hay mt chui di cc bit 0 u khng nh hng xu n vic khi phc d liu Ph ph hp vi knh truyn Di thng truyn dn cng nh cng tt Tc li bit (BER- Bit Error Rate ) thp 1.5.5. M ha bng diu ch Truyn tn hiu s, do tn hiu c dng xung nn bng thng BW kh ln (v l thuyt c th t 0 ln n ), bng thng BW ny thng khng nm lt trong BW ca mi trng truyn lm cho tn hiu thu b bin dng do b ct 2 pha tn s cao v thp. khi truyn tn hiu i xa, s mo dng ny cng ln hn, do suy hao khng ng u trn sut di tn. Kt qu ni thu s kh khi phc tn hiu gc.

23

Chng 1: L thuyt thng tin v m ho

Truyn tn hiu bng tn gc ( Base Band - di nn ) l 1 cch bin i tn hiu sao cho n c dng sng ph hp vi c tnh knh truyn vt l v thit b thu. C th hn, gip thu hp li BW kh nhiu, gip tn hiu suy hao ng u hn, khi truyn i xa, nn gim mo ni thu truyn tn hiu i xa hn, ngi ta phi iu ch tn hiu. Tn hiu iu ch ( thng gi l tn hiu iu ch) lun dng tng t (Analog). Ti ni thu , ta gii iu ch khi phc tn hiu. Tn hiu iu ch phi c tn s v bng thng ph hp vi cc c tnh ca mi trng truyn vt l ( nh trong cp) C th hn, bng thng BW tn hiu ny nu nm lt trong BW ca mi trng truyn th tn hiu thu khng b mo dng khi truyn i, do suy hao ng u trn ton b BW, khi phc tn hiu s d dng do khng b mo. Vic iu ch cn tng kh nng chng nhiu ( do bng thng BW ca tn hiu Analog hp so vi BW ca tn hiu s nn nhiu xm nhp vo s b lc b d dng trn c s BW ) Thng thng, trc khi gii iu ch, tn hiu iu ch c a qua b lc thng di lc nhiu, tng chnh xc khi gii iu ch. Vic chn tn s iu ch cng cn ch nhm gim thiu suy hao (lin h v tinh - ca s tn s) Ngoi ra khi truyn tn hiu qua khng gian th phi bt buc iu ch ln tn s cao hn . V ch tn hiu dng sin vi tn s ln mi thch hp cho vic bc x ra ngoi khng gian iu ch tng t : tn hiu trc iu ch dng tng t (Analog). i vi tn hiu lin tc , ta thng iu ch bin AM , iu ch n bin SSB , iu ch tn s FM , iu ch pha PM.

iu ch s : tn hiu trc iu ch dng s (data). i vi tn hiu ri rc (


data - d liu ) , ta thng iu ch kho dch bin ASK, iu ch kho dch tn FSK , iu ch kho dch pha PSK , iu ch QAM

Hnh 1.14. iu ch QPSK

24

Chng 1: L thuyt thng tin v m ho

Hnh 1.14. Quan h gia Eb/N0 vi BER

Bi tp Bi 1. Trong v d v m ho Shanon-Fano trn, nu ngun tin c 1000 k t. Tnh dung lng b nh cn lu tr ngun tin. Bi 2. Cng trong v d trn nhng dng m ho nh phn. Nu ngun tin c 1000 k t, tnh dung lng b nh cn lu tr ngun tin. Bi 3. So snh kt qu ca bi 1 v bi 2, tnh t s nn ca m ho Shanon-Fano so vi m ho nh phn Bi 4: Cho tp ngun tin c 26 k hiu c s {a, b, c,..., _}, vi xc sut xut hin tng ng u bng nhau, ngoi tr k t <_> c xc sut l 0.25. Dng m Shanon xc nh bng m c s. Bi 5: Xc nh m Lemp-Zip cho cc tp ngun tin sau a. X="100011011001111101111111110101111111111} b. Y="1000000100101000000000100000000000010000000000000} c. Z="110101011010000100000000100000000111111110"

25