Está en la página 1de 80

http://www.4tech.com.

vn/

Mc lc
CHNG 1................................................................................................................1 TNG QUAN V H THNG THNG TIN QUANG. ......................................1 1.1. Gii thiu chng ............................................................................................1 1.2. Gii thiu v thng tin quang...........................................................................2 1.2.1. S pht trin ca thng tin quang .............................................................2 1.2.2. Nhng u im ca h thng thng tin quang ..........................................3 1.2.3. Cu trc v cc thnh phn chnh ca h thng thng tin quang ..............5 1.3. Si quang..........................................................................................................7 1.3.1. Si dn quang ............................................................................................7 1.3.2. S truyn nh sng trong si quang. .........................................................8 1.3.3. Cc thng s ca si quang. ....................................................................10 1.3.3.1. Suy hao ca si quang......................................................................10 1.3.3.1.1. nh ngha ................................................................................10 1.3.3.1.2. c tuyn suy hao ....................................................................11 1.3.3.1.3. Cc nguyn nhn gy suy hao trn si quang ...........................12 1.3.3.2. Tn sc nh sng ..............................................................................13 1.3.4. nh hng ca tn sc n dung lung truyn dn trn si quang ........14 1.4. Kt lun chng .............................................................................................14 CHNG 2..............................................................................................................15 GII THIU MNG WDM. .................................................................................15 2.1. Gii thiu chng ..........................................................................................15 2.2. Nguyn l hot ng ca h thng WDM ......................................................17 2.3. u im ca h thng WDM .........................................................................18 2.4. Vn tn ti ca h thng WDM v hng gii quyt trong tng lai.......19 2.5. Chuyn mch quang .......................................................................................19 2.6. Cc thnh phn chnh ca h thng WDM ....................................................21 2.6.1. Thit b u cui OLT .............................................................................21 2.6.2. B ghp knh xen/rt quang OADM ......................................................22 2.6.3. B khuch i quang ...............................................................................26 2.6.4. Gii thiu v b kt ni cho quang OXC ..............................................29 2.6.4.1. Chc nng OXC ...............................................................................29 2.6.4.2. Phn loi OXC .................................................................................32 2.7. S chuyn i bc sng ...............................................................................34 2.8. Kt lun chng. ............................................................................................36 CHNG 3..............................................................................................................37 NNH TUYN V GN BC SNG. ..............................................................37 3.1. Gii thiu chng ..........................................................................................37 3.2. Gii thiu v nh tuyn v gn bc sng (Routing and Wavelength Assignment - RWA). .............................................................................................37 3.3. nh tuyn bc sng ....................................................................................39 3.4. nh tuyn (Routing) .....................................................................................41 3.4.1. Gii thiu.................................................................................................41

http://www.4tech.com.vn/

3.4.2. Phn loi nh tuyn ................................................................................42 3.4.3. L thuyt th ........................................................................................43 3.4.3.1. th v hng. ..............................................................................44 3.4.3.2. th c hng................................................................................44 3.4.3.3. th hn hp..................................................................................45 3.4.4. Cc thut ton c bn trong nh tuyn ..................................................46 3.4.4.1. Thut ton trng thi lin kt LSA ...................................................46 3.4.4.1.1. Bi ton .....................................................................................46 3.4.4.1.2. Thut ton..................................................................................47 3.4.4.1.3. Chng minh ...............................................................................47 3.4.4.1.4. Cc bc thc hin ...................................................................48 3.4.4.1.5. V d v thut ton Dijkstra ......................................................48 3.4.4.2. Thut ton nh tuyn vect khong cch DVA ..............................50 3.4.4.2.1. Thut ton..................................................................................51 3.4.4.2.2.Chng minh ................................................................................52 3.4.5. Kt lun ...................................................................................................53 3.5. Gn bc sng ...............................................................................................53 3.6. S thit lp ng o (Virtual path) ..............................................................55 3.7. Phn loi mng quang WDM .........................................................................56 3.7.1. Mng single- hop.....................................................................................56 3.7.2. Mng Multi- hop .....................................................................................57 3.8. Gii thut cho vn nh tuyn v gn bc sng vi lu lng mng thay i DRWA ............................................................................................................58 3.9. Kt lun chng .............................................................................................59 CHNG 4..............................................................................................................60 THC HIN M PHNG ....................................................................................60 4.1. Gii thiu chng ..........................................................................................60 4.2. Gii thiu v ngn ng Visual C++ ...............................................................60 4.3. Lu thut ton ...........................................................................................60 4.4. Kt qu m phng ..........................................................................................62 4.5. Kt lun chng. ............................................................................................66

http://www.4tech.com.vn/

A APD AS ATM B BGP C CDM D DVA Distance Vector Algorithm Thut ton Vector khong cch WDM mt cao Code Division Multiplexing Ghp knh phn chia theo m Border Gateway Protocol Giao thc nh tuyn vng bin Avalanche Photodiode Autonomous System Asynchronous Transfer Mode Diod tch sng quang thc l H thng c lp Kiu truyn bt ng b

DWDM Dense WDM E EDFA Erbium Doped Fiber Amplifier EIGRP Enhanced IGRP I IGRP ISDN Interior Gateway Routing Protocol Itegrated Servise Digital Network

B khuch i quang si c pha tp Erbium Giao thc IGRP nng cp

Giao thc nh tuyn bn trong Mng s tch hp dch v

http://www.4tech.com.vn/ L LD LED LP LSA O OADM Optical Add/Drop Multipler OLT OXC P PIN R RIP RWA S SOA T TDM W WDM Wavelength Division Multiplexing Ghp knh phn chia theo bc sng Time Division Multiplexing Ghp knh phn chia theo thi gian Semiconductor Optical Amplifier B khuch i quang bn dn Routing Information Protocol Routing & Wavelength Assignment Giao thc thng tin nh tuyn nh tuyn v gn bc sng Positive Intrinsic Negative Optical Line Terminator Optical Cross Connect B ghp knh xen/rt quang Thit b u cui quang B kt ni cho quang Diod Laser Light Emitting Diode Lightpath Link State Algorithm Diod pht quang ng i nh sng Thut ton trng thi lin kt

http://www.4tech.com.vn/

H thng thng tin quang ra i cng vi nhng u im vt tri ca n v ang p dng rng ri trn mng li thng tin ton cu. Hin nay, cc h thng thng tin quang truyn dn tt c cc tn hiu dch v bng hp, bng rng p ng yu cu ca mng s tch hp dch v ISDN. V th, h thng thng tin quang s l mi t ph v tc truyn dn v cu hnh linh hot cho cc dch v vin thng cp cao. i vi h thng thng tin quang, mi trng truyn dn chnh l si quang, n thc hin truyn nh sng mang tn hiu thng tin t pha pht ti pha thu. nh tuyn v gn bc sng tr thnh chc nng khng th thiu c trong mng quang WDM. Vn t ra l nh tuyn ng i cho nh sng v gn bc sng cho n trn mi tuyn nh th no t c mt mng ti u. Trong n k thut thng tin ny, em xin trnh by v ti nh tuyn v gn bc sng trong mng WDM (Routing and Wavelength Assignment). n c chia thnh bn chng: Chng 1: Tng quan v h thng thng tin quang. Chng 2: Gii thiu v h thng WDM. Chng 3: nh tuyn v gn bc sng trong mng WDM. Chng 4: Thc hin m phng nh tuyn cho ng i nh sng lightpath. ti nh tuyn v gn bc sng trong mng WDM ca n ny phn tch s cn thit ca chc nng nh tuyn v gn bc sng trong mng quang WDM, tr thnh chc nng khng th thiu trong vic iu hnh mng quang. Phng php nghin cu ca ti: da vo chc nng ca nh tuyn v gn bc sng trong WDM, thc hin m phng chc nng nh tuyn trong mng. nh sng i trong si quang phi i qua nhiu node mng trung gian ti node ch, tc l qua cc tuyn trung gian. Vic nh tuyn vi tiu ch ti u hm mc tiu l cc tham s quen thuc nh bng thng, tr, chi ph tuyn,... V th dng thut ton tm ng ngn nht Dijkstra thc hin m phng nh tuyn ti u mng.

http://www.4tech.com.vn/

Em xin chn thnh cm n thy gio Nguyn Vn Phng tn tnh hng dn, cung cp ti liu, ng thi ng vin trong thi gian em nghin cu ti ny. Em xin cm n tt c cc thy c gio trong khoa in T Vin Thng nhit tnh dy d, cung cp trang b cho em nhng kin thc qu bu, cm n gia nh ng vin em trong sut thi gian va qua, cm n cc bn gp nhng kin chn thnh gp phn gip em hon thnh n. Trong thi gian thc hin n kh ngn n, mc d c nhiu c gng nhng n khng khi trnh nhng thiu st. Knh mong cc thy c gio trong khoa cng cc bn tn tnh ch bo v gp kin n c hon thin hn. Em xin chn thnh cm n. Nng, ngy...thng...nm 2007

Chng 1: Tng quan v h thng thng tin quang

http://www.4tech.com.vn/

CHNG 1 TNG QUAN V H THNG THNG TIN QUANG.


1.1. Gii thiu chng Lng thng tin trao i trong cc h thng thng tin ngy nay tng ln rt nhanh. Bn cnh gia tng v s lng, dng lu lng truyn thng trn mng cng thay i. Dng d liu ch yu l lu lng Internet. S ngi s dng truy cp Internet ngy cng tng v thi gian mi ln truy cp thung ko di gp nhiu ln cuc ni chuyn in thoi. Chng ta ang hng ti mt x hi m vic truy cp thng tin c th c p ng mi lc, mi ni chng ta cn. Mng internet v ATM ngy nay khng dung lng p ng cho nhu cu bng thng trong tng lai.

Hnh 1.1: S gia tng lu lng d liu v ting ni qua cc nm. K thut thng tin quang c th c xem l v cu tinh ca chng ta trong vic gii quyt vn trn. Bi v h thng thng tin quang ra i vi nhng kh nng vt tri ca n: bng thng khng l (gn 50Tbps), suy gim tn hiu thp (khong 0.2dB/km), mo tn hiu thp, i hi nng lng cung cp thp, khng b nh hng ca nhiu in t, kh nng bo mt cao V vy thng tin quang c xem l k thut cho h thng thng tin bng rng. Cc h thng thng tin quang khng ch c bit ph hp vi cc tuyn thng tin ng di, trung k m cn c tim nng to ln trong vic thc hin cc chc nng ca mng ni ht v p ng mi loi hnh dch v hin ti v trong tng lai.

Chng 1: Tng quan v h thng thng tin quang

http://www.4tech.com.vn/

V vy vic pht trin v xy dng h thng thng tin si quang l cn thit cho nhu cu pht trin thng tin trong tng lai. Trong chng ny s ni r v h thng thng tin si quang v vic truyn nh sng trong si quang. 1.2. Gii thiu v thng tin quang Khc vi thng tin hu tuyn hay v tuyn - cc loi thng tin s dng cc mi trng truyn dn tng ng l dy dn v khng gian nh hnh 1.2 - th thng tin quang l h thng truyn tin qua si quang nh hnh 1.3. iu c ngha l thng tin c chuyn thnh nh sng v sau nh sng c truyn qua si quang. Ti ni nhn, n li c bin i thnh thng tin ban u.

Hnh 1.2: Thng tin hu tuyn

Hnh 1.3: Thng tin quang 1.2.1. S pht trin ca thng tin quang Cc phng tin s khai ca thng tin quang l kh nng nhn bit ca con ngi v chuyn dng, hnh dng v mu sc s vt qua i mt. Tip mt h thng thng tin iu ch n gin xut hin bng cch s dng cc n hi ng, cc n hiu. Sau , nm 1791, VC. Chape pht minh mt my in bo quang. Thit b ny s dng kh quyn nh l mt mi trng truyn dn, do chu nh hng ca cc iu kin v thi tit. gii quyt hn ch ny, Marconi sng ch ra my in bo v tuyn c kh nng thc hin thng tin gia nhng ngi gi v ngi nhn xa nhau. u nm 1880, A.G. Bell- ngi pht minh ra h thng in thoi ngh ra mt thit b quang thoi c kh nng bin i dao ng my ht thnh nh sng.

Chng 1: Tng quan v h thng thng tin quang

http://www.4tech.com.vn/

Tuy nhin, s pht trin tip theo ca h thng ny b b b do s xut hin h thng v tuyn. S nghin cu hin i v thng tin quang c bt u bng s pht minh thnh cng ca Laser nm 1960 v bng khuyn ngh ca Kao v Hockham nm 1966 v vic ch to si quang c tn tht thp. Bn nm sau, Kapron c th ch to cc si quang trong sut c suy hao khong 20dB/km. c c v bi thnh cng ny, cc nh khoa hc v k s trn khp th gii bt u tin hnh cc hot ng nghin cu v pht trin v kt qu l cc cng ngh mi v gim suy hao truyn dn, v tng di thng, v cc Laser bn dn c pht trin thnh cng trong nhng nm 70, tn tht ca suy hao c gim n 0.18dB/km. Hn na trong nhng nm 70, Laser bn dn c kh nng thc hin dao ng lin tc c ch to, tui th ca n c lng khong 100 nm v cho php to ra c ly truyn xa hn vi dung lng truyn ln hn m khng cn n cc b ti to. Cng vi cng ngh ch to cc ngun pht v thu quang, si dn quang to ra cc h thng thng tin quang vi nhiu u im vt tri hn hn so vi cc h thng thng tin cp kim loi. Hin nay cc h thng thng tin quang truyn dn tt c cc tn hiu dch v bng hp, bng rng p ng yu cu ca mng s lin kt a dch v ISDN. 1.2.2. Nhng u im ca h thng thng tin quang Thng tin si quang c nhng u im vt tri. Trong phn ny, em a nhng u im th hin tnh vt tri ca n: Bng thng khng l y tim nng: tn s sng mang quang trong khong1013 n 1016 Hz (thng gn vng hng ngoi quanh gi tr 1014 Hz), cung cp bng thng truyn ln hn nhiu so vi h thng cp kim loi (bng thng ca cp ng trc khong 500Mhz). Hin ti, gi tr bng thng ca h thng si quang cha s dng ht nhng vic mt vi GHz qua khong cch vi km v hng trm Mhz qua khong cch hng chc Km m khng cn s can thip v in (dng b lp) l c th. V th, dung lng mang thng tin ca h thng thng tin quang ln hn nhiu so vi h thng cp ng tt nht. Do suy hao ln bng thng rng, h

Chng 1: Tng quan v h thng thng tin quang

http://www.4tech.com.vn/

thng cp ng trc gii hn khong cch truyn vi ch mt vi km bng thng trn 100Mhz. Si quang kch thc nh v nh: si quang c bn knh rt nh, thng bn knh ny khng ln hn bn knh si tc con ngi. V th, thm ch khi si quang c ph thm nhng lp bo v th chng vn nh v nh hn nhiu so vi cp ng. S cch li v in: si quang c ch to t thu tinh hoc i lc l cht do, l nhng cht cch in, v th khng ging vi dy dn kim loi, n khng cho thy nhng trc trc c bn. Hn na, c tnh ny lm cho vic truyn thng tin ca si quang tr nn ph hp mt cch l tng cho s thng tin trong nhng mi trng mo him v in. Khng b nh hng bi nhiu v xuyn m: si quang c ch to t cc cht in mi phi dn nn chng khng b nh hng bi nhiu in t, cc xung in t, nhiu tn s v tuyn. V th hot ng ca h thng thng tin quang khng b nh hng khi truyn qua mi trng nhiu in. iu c ngha l n c th lp t cung ng vi cp in lc v c th s dng trong mi trng phn ng ht nhn. Bo mt thng tin: nh sng t si quang b bc x mt cch khng ng k nn chng c tnh bo mt tn hiu cao. c tnh ny thu ht i vi qun i, ngn hng v cc ng dng truyn d liu. Suy hao thp: s pht trin ca si quang qua nhiu nm t c kt qu trong vic ch to ra si quang c suy hao rt thp. Si quang c ch to vi suy hao 0.2dB/km v c tnh ny tr thnh li th chnh ca thng tin quang. iu ny thun li cho vic t b khuch i cho mi khong cch trn ng truyn m khng cn chuyn sang tn hiu in bc trung gian, do gim c c gi thnh v c phc tp ca h thng. Tnh linh hot: mc d cc lp bo v l cn thit, si quang c ch to vi sc cng cao, bn knh rt nh. Vi li th v kch thc v trng lng, si

Chng 1: Tng quan v h thng thng tin quang

http://www.4tech.com.vn/

quang ni chung l tt hn trong vic lu tr, chuyn ch, x l v lp t d hn h thng cp ng. tin cy ca h thng v d bo dng: do c tnh suy hao thp ca si quang nn c th gim c yu cu s b lp trung gian hoc s b khuch i trn ng truyn. V th, vi mt vi b lp th tin cy ca h thng c th c nng cao hn hn h thng dn in. Hn na, tin cy ca cc thit b quang khng cn l vn , cc thit b quang c tui th rt cao, khong 20-30 nm. Gi thnh thp y tim nng: thy tinh cung cp cho thng tin quang c ly t ct, khng phi l ngun ti nguyn khan him. V th, si quang em li gi thnh thp. Thng tin quang cng cho php truyn ng thi cc tn hiu c bc sng khc nhau. c tnh ny cng vi kh nng truyn dn bng thng rng ca si quang sn c lm cho dung lng truyn dn ca tuyn tr nn rt ln. 1.2.3. Cu trc v cc thnh phn chnh ca h thng thng tin quang M ho Pht
Thit b pht

quang

B lp Si quang Si quang

Thit b thu quang

Gii m Thu

Hnh 1.4: Cu trc ca h thng thng tin quang

Cc thnh phn ca tuyn truyn dn quang bao gm: phn pht quang, cp si quang v phn thu quang. -Phn pht quang: c cu to t ngun pht tn hiu quang v cc mch iu khin lin kt vi nhau. Phn t pht x nh sng c th l: Diod Laser (LD), Diod pht quang (LED: Light Emitting Diode). LED dng ph hp cho h thng thng tin quang c tc bit khng qu 200Mbps s dng si a mode. LED pht x t pht, nh sng khng nh hng nn s dng LED tt trong h thng thng tin quang th n phi c cng sut bc x cao, thi gian p ng nhanh. LD khc phc nhc im ca LED, thng s dng LD cho truyn dn tc cao. LD c nhiu u im hn so vi LED: ph pht x ca LD rt hp (khong t 1 n 4nm nn

Chng 1: Tng quan v h thng thng tin quang

http://www.4tech.com.vn/

gim c tn sc cht liu), gc pht quang hp (5- 100), hiu sut ghp nh sng vo si cao. - Cp si quang: gm cc si dn quang v cc lp v bc xung quanh bo v khi tc ng c hi t mi trng bn ngoi. C th chn cc loi si sau: si quang a mode chit sut nhy bc, si quang a mode chit sut gim dn, si quang n mode. - Phn thu quang: do b tch sng quang v cc mch khuch i, ti to tn hiu hp thnh. Trong h thng thng tin quang, ngi ta quan tm nht i vi cc b tch sng quang l cc diod quang PIN v diod quang kiu thc APD c ch to t cc bn dn c bn Si, Ge, InP. Ngoi cc thnh phn ch yu ny, tuyn thng tin quang cn c cc b ni quang, cc mi hn, cc b chia quang v cc trm lp. Tt c to nn mt tuyn thng tin hon chnh. Tng t nh cp ng, cp si quang c khai thc vi iu kin lp t khc nhau, c th c treo ngoi tri, chn trc tip di t hoc t di bin,tu thuc vo cc iu kin lp t khc nhau m ch to ca cp cng khc nhau v cc mi hn s kt ni cc di cp thnh di tng cng ca tuyn c lp t. Tham s quan trng nht ca cp si quang tham gia quyt nh di tuyn l suy hao si quang theo bc sng. Ngun pht quang thit b pht c th s dng LED hoc laser bn dn. C hai ngun pht ny u ph hp cho cc h thng thng tin quang, vi tn hiu quang u ra c tham s bin i tng ng vi s thay i ca dng iu bin. Bc sng lm vic ca ngun pht quang c bn ph thuc vo vt liu ch to, on si quang ra ca ngun pht quang phi ph hp vi si dn quang khai thc trn tuyn. Tn hiu nh sng c iu ch ti ngun pht quang s uc lan truyn dc theo si quang ti phn thu quang. Khi truyn trn si dn quang, tn hiu thng b suy hao v mo do cc yu t hp th, tn x, tn sc gy nn. B tch sng quang phn thu thc hin tip nhn nh sng v tch ly tn hiu t hng

Chng 1: Tng quan v h thng thng tin quang

http://www.4tech.com.vn/

pht ti. Tn hiu quang c bin i tr li thnh tn hiu in. Cc Photodiod PIN v Photodiod thc APD u c th s dng lm cc b tch sng quang trong cc h thng thng tin quang. c tnh quan trng nht ca thit b thu quang l nhy thu quang. Khi khong cch truyn dn kh di, ti mt c ly no , tn hiu quang trong si b suy hao kh nhiu th cn thit phi c cc trm lp quang t trn tuyn. Nhng nm gn y, cc b khuch i quang c s dng thay th cho cc thit b trm lp quang. 1.3. Si quang 1.3.1. Si dn quang Si quang l nhng dy nh v do truyn cc nh sng nhn thy c v cc tia hng ngoi. Chng c li gia v c phn bao bc xung quanh li. nh sng c th phn x mt cch hon ton trong li th chit xut ca li phi ln hn chit sut o mt cht.

Hnh 1.5: Cu to si quang V bc pha ngoi o bo v si quang khi b Nm v n mn, ng thi chng xuyn m vi cc si i bn cnh v lm cho si quang d x l. bc ngoi ta dng cc nguyn liu mm. Li v o c lm bng thy tinh hay cht do (silicat, cht do, kim loi, Flour, si quang kt tinh). N goi ra chng c phn loi thnh cc loi si quang

Chng 1: Tng quan v h thng thng tin quang

http://www.4tech.com.vn/

n mode v a mode tng ng vi s lng mode ca nh sng truyn qua si quang. N goi ra chng cn c phn loi thnh si quang c ch s bc sng v ch s lp tu theo hnh dng v chit sut ca cc phn ca li si quang. 1.3.2. S truyn nh sng trong si quang. Si quang l mi trng truyn thng c bit so vi cc mi trng khc nh cp ng hay khng gian t do. Mt si quang cho suy hao tn hiu thp trn mt phm vi tn s ln, c tnh ny cho php tn hiu c truyn qua cc khong cch xa tc cao trc khi cn khuch i hoc ti lp li. Mt si quang gm c mt li hnh tr c bao quanh bi lp v. C phn li v phn v c lm ch yu t silica (SiO2), c ch s khc x (chit sut) xp x 1.45. Ch s khc x ca vt liu l t s vn tc nh sng trong chn khng so vi tc nh sng trong vt liu . n =
c v

n: chit sut ca mi trng, khng c n v. c: vn tc nh sng trong chn khng , n v : m/s


v : vn tc nh sng trong mi trng, n v : m/s.

V c v nn n 1 Trong qu trnh sn xut si, mt s tp cht no c a vo trong li hoc v cho ch s khc x trong li ln hn mt t so vi v. Cc nguyn liu nh Germani hoc Photpho lm tng chit sut silica v c dng thm vo phn li ca si quang, trong khi cht Bo hay Flo lm gim chit sut ca Silica nn c dng tp cht cho lp v. nh sng c th c xem nh mt chm tia truyn theo nhng ng thng trong mt mi trng v b phn x hoc khc x b mt gia hai vt liu khc nhau. Mt tia sng t mi trng 1 n mt phn cch ca mi trng 2, gc ti l gc gia tia ti v php tuyn vi b mt chung ca hai mi trng c biu th bng 1 . Phn nng lng b phn x vo mi trng 1 l mt tia phn x, phn cn

Chng 1: Tng quan v h thng thng tin quang

http://www.4tech.com.vn/

li i xuyn qua mi trng 2 l tia khc x. Gc phn x 1r l gc gia tia phn x v php tuyn, tng t gc khc x l gc gia tia khc x v php tuyn. Ta c:
1r = 1

Theo nh lut Snell: n1 sin 1 = n2 sin 2 Khi gc ti 1 tng ln th gc khc x 2 cng tng theo. N u 2 = 90 th sin 1 =
n n2 , lc ny gc 1 c gi l gc ti hn c gi tr c = sin 1 2 , vi n1 n1

n1 > n2 .

Vi nhng gi tr 1 > c , s khng c tia khc x v tt c nng lng t tia ti c phn x ht. Hin tng ny c gi l hin tng phn x ton phn.

Hnh 1.6: S phn x v khc x cc tia sng ti mt phn cch hai mi trng. iu kin xy ra hin tng phn x ton phn: Cc tia sng phi i t mi trng c chit sut ln sang mi trng c chit sut nh hn. Gc ti ca tia sng phi ln hn gc ti hn. nh sng truyn trong si quang do hin tng phn x ton phn xy ra gia b mt phn li v v.

Chng 1: Tng quan v h thng thng tin quang

http://www.4tech.com.vn/

Hnh 1.7: nh sng trong si quang Hnh trn cho thy nh sng c ghp t mi trng bn ngoi (khng kh vi chit sut n0) vo si. 1.3.3. Cc thng s ca si quang. xc nh tc truyn dn v khong cch trm lp ca h thng thng tin si quang, c hai tham s cn phi nghin cu l tn hao quang v rng bng truyn dn. o tn hao quang xc nh tn hao cng sut nh sng lan truyn trong si quang. 1.3.3.1. Suy hao ca si quang 1.3.3.1.1. nh ngha Cng sut quang truyn ti si cng gim dn theo c ly vi quy lut hm s m tng ng nh tn hiu in. Biu thc ca hm s truyn cng sut c dng: P(Z)= P(0)x 10 10 Trong : P(0): C cng sut u si. P(z): cng sut c ly z tnh t u si.
: h s suy hao.

- H s suy hao ca si c tnh theo cng thc: A(dB)= 10 lg


P1 P2

Trong : P1: Cng sut a vo si.

10

Chng 1: Tng quan v h thng thng tin quang

http://www.4tech.com.vn/

P2: Cng sut cui si. - H s suy hao trung bnh:


(dB / km ) =
A(dB ) L(km )

Trong : A: Suy hao ca si. L: Chiu di ca si. 1.3.3.1.2. c tuyn suy hao c tuyn suy hao ca si quang khc nhau tu thuc vo loi si. Hnh di cho thy suy hao trong si quang nh mt hm theo bc sng. Ta thy rng suy hao nh nht ba di bc sng dng trong thng tin quang: 0.8 m , 1.3 m v 1.55 m .

Hnh 1.8: c tuyn suy hao ca si quang .

11

Chng 1: Tng quan v h thng thng tin quang

http://www.4tech.com.vn/

1.3.3.1.3. Cc nguyn nhn gy suy hao trn si quang Suy hao do hp th: S hp th nh sng xy ra do cc nguyn nhn sau gy ra: suy hao do s hp th ca cc tp cht kim loi, s hp th ca ion OH, s hp thu bng cc tm v hng ngoi. S hp th ca cc tp cht kim loi: cc tp cht kim loi trong thu tinh l mt trong nhng ngun hp th nng lng nh sng, cc tp cht thng gp l st (Fe), ng (Cu), mangan (Mn), choromium (Cr), cobar (Co), niken (N i). Mc hp th ca tng tp cht ph thuc vo nng tp cht v bc sng nh sng truyn qua n. c si quang c d suy hao nh hn 1dB/km cn phi c thu tinh tht tinh khit vi nng tp cht khng qu mt phn t (10-9). S hp th ca ion OH: cc lin kt gia SiO2 v cc ion OH ca nc cn st li trong vt liu khi ch to si quang cng to ra mt suy hao hp th ng k. c bit hp th tng vt cc bc sng gn 950nm, 1240nm v 1400 nm. S hp thu bng cc tm v hng ngoi: ngay c khi si quang c ch to t thu tinh c tinh khit cao th s hp th vn xy ra. Bn thn thu tinh tinh khit cng hp th nh sng vng cc tm v hng ngoi. S hp th trong vng hng ngoi gy tr ngi cho khuynh hng s dng cc bc sng di trong thng tin quang. Suy hao do tn x: Suy hao do tn x bao gm tn x Rayleigh, tn x do mt phn cch gia li v lp bc khng hon ho. Tn x Rayleigh: khi sng in t truyn trong mi trng in mi gp nhng ch khng ng nht trong si quang do cch sp xp cc phn t thu tinh, cc khuyt tt nh bt khng kh, cc vt nt s xy ra hin tng tn x. Khi kch thc ca vng khng ng nht vo khong mt phn mui bc sng th chng tr thnh nhng ngun im tn x. Cc tia truyn qua nhng ch khng ng nht ny s to ra nhiu hng, ch mt phn nng lng nh sng truyn theo hng c, phn cn li truyn theo hng khc thm ch cn truyn ngc li ngun quang. tiu hao do tn x Rayleigh t l nghch vi lu tha bc bn ca bc sng.

12

Chng 1: Tng quan v h thng thng tin quang

http://www.4tech.com.vn/

Tn x do mt phn cch gia li v lp bc khng hon ho: khi tia sng truyn n nhng ch khng hon ho gia li v lp bc tia sng b tn x. Lc 1 tia ti c nhiu tia phn x vi nhiu gc phn x khc nhau. Suy hao do b un cong: bao gm suy hao do vi un cong v do un cong. Suy hao do vi un cong: si quang b chn p to nn nhng ch un cong nh th suy hao ca si cng tng ln. Suy hao ny xut hin do tia sng b lch trc i qua nhng ch vi un cong . Si n mode rt nhy vi nhng ch vi un cong nht l v pha bc sng di. Suy hao do un cong: khi b un cong vi bn knh cong cng nh th suy hao cng tng. 1.3.3.2. Tn sc nh sng Tng t nh tn hiu in, tn hiu quang truyn qua si quang cng b bin dng. Hin tng ny c gi l tn sc. S tn sc mo dng tn hiu analog v lm xung b chng lp trong tn hiu digital. S tn sc lm hn ch di thng ca ng truyn dn quang.

. Hnh 1.9: Dng xung vo v ra do tn sc Tn sc mode: trong si a mode, do xung nh sng vo mc d ch c mt bc sng nhng lan truyn vi vi mode khc nhau vi tc truyn khc nhau, n lm khong trng thi gian gia cc xung cnh nhau tr nn ngn hn v tng theo khNu s ca si. Hin tng ny gi l tn sc mode. Do , rng bng truyn dn ca n b gii hn ch yu do tn sc mode. Tn sc th: bao gm tn sc cht liu v tn sc dn sng. Tn sc cht liu: nh sng s dng trong thng tin quang khng phi l nh sng hon ton n sc. Chit sut ca thu tinh thay i theo bc sng nn vn

13

Chng 1: Tng quan v h thng thng tin quang

http://www.4tech.com.vn/

tc truyn ca nh sng c bc sng khc nhau cng khc nhau. Chnh v th, nh sng c phn b tc lan truyn khc nhau ca cc thnh phn bc sng nh sng khc nhau. Hin tng ny c gi l tn sc cht liu. Tn sc dn sng: s phn b nng lng nh sng trong si quang ph thuc vo bc sng. S phn b ny gy nn tn sc ng dn sng. 1.3.4. nh hng ca tn sc n dung lung truyn dn trn si quang Tn sc gy ra mo tn hiu v iu ny lm cho cc xung nh sng b gin rng ra khi c truyn dc theo si dn quang. Khi xung b gin ra s dn ti chng lp ln xung bn cnh. N u vt qu mt gi tr no th thit b thu s khng cn phn bit cc xung k nhau na v lc ny xut hin li. N h vy, cc c tnh tn sc s xc nh gii hn dung lng truyn dn ca si dn quang.

Hnh 1.10: nh hng ca tn sc. 1.4. Kt lun chng Qua chng ny, chng ta tm hiu tng quan v h thng thng tin quang vi nhng u nhc im ca n. H thng thng tin quang da vo nhng u im vt tri ca mnh ang pht trin mnh m p ng nhu cu thng tin bng rng hin nay.

14

Chng 2: Gii thiu mng WDM

http://www.4tech.com.vn/

CHNG 2 GII THIU MNG WDM.


2.1. Gii thiu chng K thut mng ghp knh phn chia theo bc sng WDM (Wavelength Division Mutiplexing) c coi l cuc cch mng v bng thng trong mng xng sng Internet v hn th na. N hu cu bng thng ang gia tng mt cch nhanh chng vi nhiu ng dng mi phong ph, chng hn nh thng mi in t, video theo yu cu, cc cng vic i hi hot ng ng b trn ton cu. Mng quang WDM a ra ha hn ht sc ngha cho nhu cu bc thit trn. Khi si quang c s dng truyn thng tin th thch thc c t ra i vi chng ta trong giai on mi trc nhu cu thng tin ngy cng tng mnh m ca con ngi. Khi m ngy cng c nhiu ngi bt u s dng cc mng d liu v c mi ln s dng cng chim mt bng thng ng k trong cc ng dng thng tin ca h chng hn nh c lt thng tin trn cc trang web, cc ng dng s dng Java, hi ngh truyn hnh, T cho thy nhu cu thng tin bng rng t ra ht sc bc thit, v nhu cu ny cn vt xa hn na trong tng lai. Hnh 2.1 cho thy s gia tng bng thng ca cc mng khc nhau qua cc nm. S pht trin mnh m ny ch yu l do s trin khai cc h thng thng tin quang.

Hnh 2.1: S gia tng bng thng ca cc mng khc nhau qua cc nm

15

Chng 2: Gii thiu mng WDM

http://www.4tech.com.vn/

thch ng vi s pht trin khng ngng v tho mn yu cu tnh linh hot v thay i mng, cc cng ngh truyn dn khc nhau c nghin cu, trin khai th nghim v a vo ng dng nh k thut TDM, CDM. Cng ngh ghp knh phn chia theo bc sng WDM c a chung hn c. iu ny l do cng ngh TDM c chi ph k thut v thit b lp t h thng tng i cao, c bit trong TDM gy lng ph mt s knh thng tin khi mi khe thi gian c d tr ngay c khi khng c d liu gi v pha thu kh khn khi phn bit cc khe thi gian thuc v knh no gii ghp knh tn hiu. Bn cnh , ghp knh phn chia theo m CDM cn tn ti nhng hn ch v k thut nh tc iu ch v suy hao trong m ho cng nh gii m cao. WDM l tin b rt ln trong cng ngh truyn thng quang, n cho php tng dung lng knh m khng cn tng tc bit ng truyn cng nh khng cn dng thm si dn quang.

Hnh 2.2: H thng TDM

Hnh 2.3: H thng WDM Vi WDM, mi knh vi mt bc sng khc nhau v cc bc sng nh sng ny khng nh hng ln nhau bi v chu k dao ng ca cc cc knh khc nhau l hon ton c lp nhau. Khc vi h thng TDM, mi phn t knh WDM c th hot ng tc bt k v mi knh cng c th mang y dung lng ca mi bc sng. Chng ny s trnh by r nguyn l hot ng ca h thng WDM v cc thnh phn ca n.

16

Chng 2: Gii thiu mng WDM

http://www.4tech.com.vn/

2.2. Nguyn l hot ng ca h thng WDM N gy nay, nhu cu ca con ngi v cc dch v thng tin bng rng ngy mt tng ln, th mng ghp knh a bc sng WDM tho mn c nhu cu . Theo k thut ny, cc lung nh sng vi cc bc sng khc nhau c truyn trn cng mt si quang. Mi bc sng mang mt dung lng in hnh, thung l 2.5Gbps.

Hnh 2.4: Nguyn l ghp knh phn chia theo bc sng N guyn l c bn ca ghp knh theo bc sng l ghp tt c cc bc sng khc nhau ca ngun pht quang vo cng mt si dn quang nh b ghp knh MUX v truyn dn cc bc sng ny trn cng si quang. Khi n u thu, b tch knh quang s phn tch thu nhn li cc bc sng . Vi cng mt nguyn l hot ng c hai loi truyn dn trong WDM, l: truyn dn mt chiu v truyn dn hai chiu mt si. H thng WDM mt chiu: c ngha l tt c cc knh cng trn mt si quang truyn dn theo cng mt chiu. H thng WDM hai chiu: c ngha l knh quang trn mi si quang truyn dn theo hai hng khc nhau, dng cc bc sng tch ri nhau thng tin hai chiu.

17

Chng 2: Gii thiu mng WDM

http://www.4tech.com.vn/

Knh 1 Knh 2

N gun 1 N gun 2 mt si quang

Thu 1 Thu 2

Knh 1 Knh 2

Thit b WDM

1 , 2 ,...,n

Thit b WDM

Knh n

N gun n (a)

Thu n

Knh n

Knh vo

N gun 1 Thit b WDM Mt si

Thu 1 Thit b WDM N gun 2

Knh ra

Knh ra

Thu 2

1 2

Knh vo

(b)

Hnh 2.5: H thng WDM theo mt hng (a) v hai hng (b) So vi h thng WDM mt chiu, h thng WDM hai chiu gim c s lng b khuch i v ng dy. Tuy nhin, h thng WDM hai chiu thng b can nhiu nhiu knh, nh hng phn x quang, vn cch li gia cc knh hai chiu, tr s v loi hnh xuyn m, ng thi phi s dng b khuch i quang hai chiu. 2.3. u im ca h thng WDM C kh nng to dung lng ln ch trn mt si quang, v c th t dung lng ln hn khi s dng k thut DWDM (Dense WDM: ghp knh phn chia theo bc sng mt cao).

18

Chng 2: Gii thiu mng WDM

http://www.4tech.com.vn/

H thng WDM thun tin khi cho php truyn dn ng thi tn hiu khng ng nht. C kh nng truyn dn tn hiu hai chiu. 2.4. Vn tn ti ca h thng WDM v hng gii quyt trong tng lai Vi h thng WDM, si quang cung cp cho chng ta tc truyn mong mun nhng bng thng mng li b gii hn bi tc x l cc nt, do tc x l cc nt c thc hin bng in t, m tc in t li thp hn rt nhiu so vi tc thng tin truyn trong si quang (khong vi Gbps). N h vy, tn hiu quang trn si khi n nt s c chuyn thnh tn hiu in thc hin x l in t (s chuyn i quang- in O/E), sau c chuyn li thnh tn quang truyn i. iu ny lm gim tc mng, gii php t ra l xy dng mng m trong tn hiu c x l hon ton trong min quang, gi l mng ton quang. Trong mng ton quang, d liu i t ngun n ch hon ton di dng quang m khng cn bt c s chuyn i quang- in no trn ng i, vic iu khin x l chuyn mch cng c thc hin di dng quang. Tuy nhin, mng ton quang hin ti vn cha c tin hnh thnh cng bi nhng tn ti ca n. Cc thit b logic hon ton trong min quang kh thc hin hn nhiu so vi cc thit b logic in t. Bi v, khc vi cc electron th cc photon khng tng tc nh hng ln nhau, thng th cc thit b logic phc tp u c to ra bng cch s dng cng ngh in t. Bn cnh , cc trm lp bng quang cng rt kh thc hin hn nhiu so vi cc trm lp in t mc d cc trm lp trong mng ton quang c t nhng khong cch nh k rt xa nhau. 2.5. Chuyn mch quang Hu ht cc thit b mng ngy nay u da trn tn hiu in, iu c ngha tn hiu quang cn chuyn i sang tn hiu in c khuch i, ti to hoc chuyn mch v sau c chuyn i tr li tn hiu quang. iu ny ni n s chuyn i optical-to-electronic-to-optical (O-E-O) v l cng vic ct li ht sc c ngha trong vic truyn tn hiu. S lng ln tn hiu i qua mng quang cn c chuyn mch qua cc im khc nhau, c gi l cc node. Thng tin n

19

Chng 2: Gii thiu mng WDM

http://www.4tech.com.vn/

node s c chuyn v pha trc theo hng n ni m n c gi ti qua ng tt nht c th, con ng ny c th xc nh bi cc yu t nh khong cch, chi ph, tin cy,bng thng ca tuyn . Cch chuyn i tn hiu thc hin chuyn mch l tch nh sng t nhng u vo si quang, chuyn i n sang tn hiu in v sau chuyn i tr li tn hiu nh sng laser, tn hiu ny c gi i trong si quang. Vn c bn ca chuyn mch quang l thay th s tn ti ca chuyn mch mng in bng mng ton quang, s cn thit ca vic chuyn i O-E-O c loi b. N hng thun li ca kh nng ny khi trnh c vic chuyn i O-E-O l iu ht sc ngha. u tin chuyn mch quang c th r hn bi v khng cn nhiu tn hiu in tc cao t tin. Cc b chuyn mch quang cho nhiu ng dng trong mng quang. Mi ng dng yu cu thi gian chuyn mch v s cng chuyn mch khc nhau. Mt ng dng ca chuyn mch quang l cung cp cc lightpath. Vi ng dng ny, chuyn mch c s dng bn trong b kt ni cho nhm cu hnh li chng cung cp cc lightpath mi. Mt phn mm c thm vo qun l mng t u cui n u cui. V th vi ng dng ny, cc b chuyn mch vi thi gian chuyn mch ms c th chp nhn, nhng cc b chuyn mch y i hi phi c kch thc ln. Mt ng dng quan trng khc l chuyn mch bo v. y cc chuyn mch c s dng chuyn cc lung lu lng t si chnh sang si khc trong trng hp si chnh gp s c. Ton b hot ng nh thi gian tm ra li, thng tin li n cc phn t mng iu khin vic chuyn mch v qu trnh chuyn mch thc s i hi phi hon thnh trong thi gian rt ngn. C th c nhiu dng chuyn mch bo v khc nhau, ph thuc vo phng php c s dng, s cc cng chuyn mch cn thit c th thay i t hng trm n hng ngn cng khi s dng trong cc b kt ni cho bc sng.

20

Chng 2: Gii thiu mng WDM

http://www.4tech.com.vn/

2.6. Cc thnh phn chnh ca h thng WDM Cu trc ca mng WDM gm c cc thnh phn: thit b u cui OLT, cc b ghp knh xen/rt quang OADM, cc b kt ni cho quang OXC lin kt vi nhau qua cc kt ni si quang. N goi ra cn c b khuch i b suy hao trn ng truyn. 2.6.1. Thit b u cui OLT Thit b u cui OLT (Optical Line Terminator) l thit b c dng u cui ca mt lin kt im ni im ghp v phn knh cc bc sng. Thit b u cui gm c ba phn t: b tip sng (transponder), b ghp knh cc bc sng (wavelength multiplexer) v b khuch i (optical amplifier). B tip sng lm nhim v thch ng tn hiu i vo t mt ngi s dng mng thnh mt tn hiu ph hp s dng trong mng. V hng ngc li n lm thch ng tn hiu t mng quang thnh tn hiu ph hp vi ngi s dng. Giao din gia ngi s dng v b tip sng c th thay i da vo ngi s dng, tc bt v khong cch hoc suy hao gia ngi dng v b chuyn tip. Giao din ph bin nht l giao din SON ET/SDH.

Hnh 2.6: OLT S thch ng bao gm nhiu chc nng, tn hiu c th c chuyn i thnh bc sng thch hp trong mng quang, n cng c th thm vo cc phn u header nhm qun l mng. B tip sng cng c th gim st t l li bit ca tn

21

Chng 2: Gii thiu mng WDM

http://www.4tech.com.vn/

hiu im i vo v i ra trong mng. V nhng l do ny nn b chuyn tip thc hin chuyn i quang- in- quang. hnh trn, s lm thch ng ch cho theo hng i vo v bc sng hng ngc li c gi trc tip n hng ngi dng. Trong mt s trng hp, ta c th trnh s dng b tip sng bng cch thc hin chc nng thch ng bn trong thit b ngi dng, nh phn t mng SON ET nh hnh trn, iu ny lm gim c chi ph ng k. Tn hiu ra khi b tip sng c ghp knh vi cc tn hiu khc cc bc sng khc nhau s dng b ghp knh theo bc sng trn mt si quang. Thm vo b khuch i c th c dng khuch i cng sut ln nu cn thit trc khi chng c a n b phn knh. N hng bc sng ny li c kt thc trong mt b tip sng nu c hoc kt thc trc tip trong thit b ngi s dng. Cui cng OLT cng kt thc mt knh gim st quang (OSC). OSC c mang bc sng ring l, khc vi cc bc sng mang lu lng thc s. N dng gim st vic thc hin ca cc b khuch i dc theo lin kt cng nh cho cc chc nng qun l khc. 2.6.2. B ghp knh xen/rt quang OADM B ghp knh xen/rt quang cung cp mt phng tin iu khin lu lng trong mng. OADM c th c dng cc v tr khuch i trong cc mng ng di nhng cng c th s dng nhng phn t mng c lp. hiu c li ch ca b xen/rt quang, ta xt mt mng gia ba node A, B v C nh hnh v di, lu lng mng gia A v C i qua node B, gi thit cc tuyn lin kt hon ton song cng. Gi s yu cu lu lng nh sau: mt bc sng gia A v B, mt bc sng gia B v C, ba bc sng gia A v C. By gi trin khai cc h thng WDM im ni im cung cp nhu cu lu lng ny. Vi gii php trong hnh (a), hai h thng im ni im c trin khai, mt gia A v B, mt gia B v C. Mi lin kt im ni im s dng mt OLT cui lin kt. N ode B c hai OLT, mi

22

Chng 2: Gii thiu mng WDM

http://www.4tech.com.vn/

OLT kt thc bn bc sng, v th cn yu cu bn b tip sng. Tuy nhin ch c mt trong bn bc sng l dnh cho node B, cc b tip sng cn li dng cung cp lu lng gia A v C. V th su trong tm b tip sng node B c dng iu khin lu lng. y l vic rt tn km. Vi gii php trong hnh (b), thay v s dng cc h thng WDM im ni im, ta trin khai mt mng nh tuyn bc sng. Mng s dng mt OLT node A v C, mt OADM node B. OADM rt mt trong bn bc sng, sau kt thc cc transponder. Ba bc sng cn li i xuyn qua trong min quang m khng cn kt thc trong cc transponder. iu ny thy c hiu qu l ch s dng hai transponder thay v s dng n tm transponder nh gii php (a), do gim c chi ph ng k.

Hnh 2.7: Vai tr ca OADM trong mng Cu hi t ra l ti sao cc b tip sng cn thit gii php (a) iu khin lu lng i qua. N i cch khc l ti sao chng ta khng n gin loi b cc b tip sng v thc hin kt ni trc tip cc b ghp knh v tch knh WDM gia

23

Chng 2: Gii thiu mng WDM

http://www.4tech.com.vn/

hai b tip sng node B nh trong hnh (b), hn l thit k mt OADM ring bit. iu ny l c th, cc OLT c thit k h tr kh nng ny. Lp vt l c xy dng trong cc mng phc tp hn nhiu cc h thng im ni im. C nhiu kin trc xy dng nn OADM, cc kin trc ny in hnh s dng cc b ghp/b lc. Ta xt OADM nh mt hp en c hai cng mang mt tp hp cc bc sng v mt s cng ni b. Cc thuc tnh chnh ca OADM gm c: Tng s bc sng c th cung cp c l bao nhiu. S bc sng ln nht c th xen/ rt l bao nhiu. C rng buc trn mt bc sng no c xen/rt. Mt kin trc ch cho php mt s bc sng xc nh no c xen/ rt ch khng phi bt k bc sng tu no cng c. C d dng xen/ rt cc knh thm vo. C cn thit ph v mt knh ang tn ti xen/ rt cc knh thm vo. Tnh n chi ph. Tnh phc tp ca vic thit k OADM lp vt l v khi thm vo cc knh mi th nh hng n vic thit k ny nh th no. Hnh di y cho ta thy cc kin trc ca OADM:

24

Chng 2: Gii thiu mng WDM

http://www.4tech.com.vn/

Hnh 2.8: Cc kin trc OADM hnh 2.8(a), mt s knh c chn c th c tch ra v nhng knh khc c i qua. V th khng c s rng buc trn cc knh c rt v xen. V vy cu trc ny p t nhng rng buc nh nht trong vic thit lp cc lightpath trong mng. N goi ra suy hao qua OADM c nh, c lp vi s knh c rt v xen l bao nhiu. Tuy nhin kin trc ny li khng hiu qu v chi ph trong vic iu khin mt s nh cc knh c rt, v bt k bao nhiu knh c rt, tt c cc knh u cn phi c tch v ghp li vi nhau. Do ta phi tn chi ph cho

25

Chng 2: Gii thiu mng WDM

http://www.4tech.com.vn/

vic tch v ghp cho tt c nhng knh i vo. iu ny cng dn n suy hao cao hn. Tuy nhin khi mt s lng ln s knh c rt v linh hot trong vic thm vo hoc ly ra bt c knh no th cu trc ny cng cho ta hiu qu kinh t. Hnh 2.8(b) l s ci tin ca hnh 2.8(a) nhm gim chi ph thit k trn, vic ghp v tch knh c thc hin qua hai giai on. Giai on th nht tch ring cc bc sng thnh nhng di (bands), giai on th hai tch nhng di thnh cc bc sng ring l. V d nh h thng 16 knh, c th thc hin s dng bn di, mi di gm bn knh. N u ch c bn knh c rt mt v tr, th 12 knh c th gi nguyn trong cc di, thay v phi tch xung thnh tng knh ring l. iu ny cho thy ta tit kim c chi ph cho b MUX v DEMUX. N goi ra, vic s dng cc di cho php tn hiu c i qua vi suy hao quang thp hn. Khi mng c s knh ln th cu trc hnh 2.8(b) ghp knh nhiu giai on tr nn cn thit. Trong cu trc hnh 2.8(c), mt knh ring l c tch v ghp t mt tp cc knh i vo. Ta gi thit b ny l b xen rt n knh (SC - OADM). tch v ghp nhiu knh th cc SC - OADM c ni lin tip nhau. Kin trc ny b sung cho kin trc ca hnh 2.8(a). Vic tch v ghp knh nh hung n cc knh ang tn ti, nn nhm gim ti thiu nh hng ny th ln k hoch tp bc sng no cn c ly ra tng v tr. Tuy nhin nu s knh cn c tch ra l ln th kin trc ny khng cn ph hp na, do chng ta phi s dng nhiu thit b ring l ni li vi nhau. iu cho thy n khng hiu qu v kinh t. N goi ra suy hao cng gia tng theo. 2.6.3. B khuch i quang N hm b li s suy hao tn hiu trn ng truyn si quang cng nh ti cc thit b (nh cc b ghp knh) th cc b khuch i c t gia cc kt ni si quang nhng khong cch nh k. Trc khi cc b khuch i quang ra i th la chn duy nht l ti to li tn hiu, ngha l nhn tn hiu v sau pht li n. Qu trnh ny c thc hin bng cc b lp ti sinh. Mt b lp chuyn tn hiu

26

Chng 2: Gii thiu mng WDM

http://www.4tech.com.vn/

quang thnh tn hiu in, khi phc sau chuyn li thnh tn hiu quang truyn tip. iu ny hn ch tnh trong sut v tng chi ph bo tr ca h thng. K thut khuch i quang chim u th hn nhiu cc b lp. B khuch i quang khng ph thuc vo tc bit v cc nh dng tn hiu. Mt h thng s dng khuch i quang c th d nng cp hn nhiu, v d n mt tc bit cao hn m khng cn phi thay th b khuch i. Hn na cc b khuch i quang c bng thng ln nn c th c dng khuch i ng thi nhiu tn hiu WDM. N u khng vi mi bc sng ta phi s dng mt b lp. Loi khuch i quang in hnh l b khuch i quang si EDFA (Erbium Doped Fiber Amplifier - khuch i quang si c pha tp Erbium). B EDFA thc cht l si quang c pha tp c chc nng khuch i c tn hiu nh sng, chng c th thay i cc c tnh vt l ca si theo nhit , p sut v chng c tnh cht bc x nh sng. c im ca si ny l chng c kh nng t khuch i hoc ti to tn hiu khi c kch thch ph hp.
u vo EDF u ra

WDM

B cch li

B cch li

Hnh 2.9: EDFA Theo hnh v th nh sng bm vo t laser c kt hp vi tn hiu vo nh s dng b ghp WDM trn h thng s dng mt b ghp. nh sng bm ny c truyn dc theo si c pha Eribium v tn hiu bm ny kch thch cc cc ion Eribium ln mc nng lng cao hn. S dch chuyn mc nng lng ca in t t cao xung thp s pht ra photon, c gi l bc x t pht nu khng c bt c tc ng no t pha bn ngoi, cn gi l bc x kch thch khi do s c mt cc

27

Chng 2: Gii thiu mng WDM

http://www.4tech.com.vn/

photon cha nng lng bng nng lng dch chuyn. Khi tn hiu d liu c truyn n EDFA, tn hiu d liu ny n gp cc ion Er3+ c kch thch mc nng lng cao. Qu trnh ny lm cho cc ion nhy t trng thi nng lng cao xung mc trng thi nng lng thp nn pht ra photon, do s khuch i cng sut tn hiu ln ri truyn i tip trong si quang. Thng thng, mt b cch li c dng trc ng vo hoc ng ra ca b khuch i tn hiu EDFA ngn s phn x vo trong b khuch i ny. EDFA cho h s khuch i ln, cng sut ra ln v nhiu thp, n lm vic bc sng 1550nm. Trong cc h thng thng tin quang, cho cc EDFA hot ng th cn c ngun bm. Cc ngun bm thc t l cc diod laser bn dn cng sut cao dng cung cp ngun nh sng cho EDFA. EDFA c cc c im sau: Khng c mch ti to thi gian, mch phc hi (b chuyn i O/E v E/O).Do mch s tr nn linh hoc hn. Cng sut ngun nui nh nn khi p dng cho cc tuyn thng tin vt bin, cp s c cu trc nh v nh hn cp thng. Gi thnh ca h thng thp do cu trc ca EDFA n gin, trng lng nh, khong lp v dung lng truyn dn c nng cao. N goi ra do EDFA c kh nng khuch i nhiu bc sng trong cng mt si nn n c kh nng tng dung lng tc ln n 20Gbps hoc cao hn khi s dng k thut WDM. N goi loi khuch i EDFA cn c dng khuch i SOA (Semiconductor Optical Amplifiers- b khuch i quang bn dn). V c bn, SOA l mt mi ni P-N . Lp gia c hnh thnh mi ni hot ng nh l mt vng tch cc. nh sng c khuch i do s pht x kch thch khi n lan truyn qua vng tch cc ny. i vi mt b khuch i, hai u cui ca vng tch cc c ph mt lp khng phn x loi b gn sng trong li b khuch i.

28

Chng 2: Gii thiu mng WDM

http://www.4tech.com.vn/

2.6.4. Gii thiu v b kt ni cho quang OXC 2.6.4.1. Chc nng OXC

Hnh 2.10: Mng WDM nh tuyn bc sng Trong mng nh tuyn bc sng WDM, hnh trn gm c hai loi node l: OXC v Edge node. OXC l node m ng vai tr kt ni cc si quang trong mng. Edge node ng vai tr cung cp giao din gia nhng h thng kt cui phi quang (nh l cc IP Router, chuyn mch ATM, hay cc siu my tnh) vi li quang. Cc Edge node thng nm u cui ca h thng v cc lightpath c thit lp gia hai edge node qua cc node trung gian nh hnh trn. y c mong i mang li cu trc ca mng ton quang, thng tin truyn i trn lightpath khng cn s chuyn i no t tn hiu in sang quang hoc ngc li t quang sang tn hiu in. OXC cung cp chc nng chuyn mch v nh tuyn h tr cc lin kt logic gia hai Edge. Mt OXC lm nhim v truyn thng tin trn mi bc sng mt u vo v n c th chuyn mch n mt cng ra ring bit. Mt OXC vi N cng vo- N cng ra m cc cng ny c kh nng x l W bc sng trn mi cng OXC ( optical cross connect) l thnh phn dng iu khin cc cu trc mt li phc tp v mt s lng ln cc bc sng. OXC l thnh phn mng chnh cho php cu hnh li mng quang, m cc lightpath c th thit lp v kt thc

29

Chng 2: Gii thiu mng WDM

http://www.4tech.com.vn/

khi cn thit m khng phi c cung cp c nh. OXC c cu trc vi mch tch hp rt ln v kh nng ni kt hng ngn u vo vi hng ngn u ra to nn chc nng chuyn mch v nh tuyn. Trong thng tin quang, bn mi knh quang c th c truyn i trong mt si n, OXC l thit b cn thit c th tip nhn nhiu bc sng khc nhau cc u vo v nh tuyn cc bc sng ny n cc u ra thch hp trong mng. thc hin iu ny, OXC cn thit xy dng cc khi chc nng: Chuyn mch si: kh nng nh tuyn tt c cc bc sng trn mt si quang u vo ti mt si quang khc ng ra. Chuyn mch bc sng: kh nng chuyn mch cc bc sng c th t mt si quang u vo ti nhiu si quang khc u ra. Chuyn i bc sng: kh nng nhn cc bc sng u vo v chuyn i chng thnh tn s quang khc ng ra, iu ny l cn thit tho mn cc kin trc bt ng khi khi s dng chuyn mch bc sng.

Hnh 2.11: Cc khi chc nng ca OXC Mt OXC c cc chc nng sau: Cung cp dch v: Mt OXC c th dng cung cp cc lightpath trong mt mng ln mt cch t ng, m khng phi thao tc bng tay. Kh nng ny tr nn quan trng khi gii quyt s bc sng ln trong mt nt hoc vi s nt trong

30

Chng 2: Gii thiu mng WDM

http://www.4tech.com.vn/

mng ln. N cng quan trng khi cc lightpath trong mng cn cu hnh li p ng vi s thay i lu lng ca mng. Bo v: Chc nng quan trng ca b kt ni cho l bo v cc lightpath khi si b t hoc thit b gp s c trong mng. B OXC l phn t mng thng minh m n c th pht hin s c trong mng v nhanh chng nh tuyn li cc lightpath. Trong sut i vi tc bit: kh nng chuyn mch cc tn hiu vi tc bit. Gim st thc hin, nh v li: OXC cho thy tham s ca mt tn hiu nhng nt trung gian, OXC cho php kim tra thit b v gim st cc tn hiu i xuyn qua n. Chuyn i bc sng: ngoi kh nng chuyn tn hiu t cng ny sang cng khc, OXC cn kh nng c th chuyn i bc sng bn trong. Ghp knh: cc OXC iu khin cc tn hiu ng vo v ng ra tc ng dy quang, tuy nhin n c kh nng ghp knh chuyn mch lu lng ni ti. Mt OXC c phn theo chc nng thnh mt trung tm chuyn mch v mt khu lin hp cng. Trung tm chuyn mch cha b chuyn mch m n thc hin chc nng kt ni cho thc s. Khu lin hp cng cha cc card c dng nh cc giao din lin lc vi cc thit b khc. Cc cng giao tip c th bao gm cc b chuyn i quang- in, in- quang hoc khng. Mt phn t kt ni cho c bn 2 x 2 gi cc tn hiu quang t hai ng vo n hai ng ra v c hai trng thi, l: trng thi cross v trng thi bar. Trong trng thi cross, tn hiu t cng vo pha trn c gi n cng ra pha di, v tn hiu t cng vo pha di c gi n ng ra pha trn. Trong trng thi bar, tn hiu t cng vo pha trn c gi n cng ra pha trn, v tn hiu t cng pha di c gi ti cng ra bn di.

31

Chng 2: Gii thiu mng WDM

http://www.4tech.com.vn/

Hnh 2.12: Trng thi ca OXC 2.6.4.2. Phn loi OXC OXC c chia lm hai loi: - Hybrid OXC (hay OXC khng trong sut): hin ang rt ph bin, n thc hin chuyn i tn hiu quang sang tn hiu in, thc hin kt ni bng cch s dng k thut kt ni in t v sau li chuyn i tn hiu in sang tn hiu quang.

Hnh 2.13: Hybrid OXC - All optical OXC (hay OXC trong sut): l cch kt ni trc tip cc knh quang trong min photonic. Tn hiu dng photonic trong sut qu trnh chuyn mch m khng cn thit qu trnh chuyn i O-E-O. OXC ny c th phn thnh cc thnh phn thit b chuyn mch quang Free Space, thit b quang trng thi rn v cc thit b gng c in. Trong s cc thit b chuyn mch ph bin nht kt ni nhiu u vo vi nhiu u ra l WRG. Vi thit b ny, mt bc sng cho trc

32

Chng 2: Gii thiu mng WDM

http://www.4tech.com.vn/

cng vo bt k s xut hin mt cng ra xc nh nh hnh 2.13. Loi chuyn mch quang Free Space ny c bit nh l chc nng nh tuyn bc sng. Cc thit b chuyn mch quang Free Space: n c hiu l lm nhim v nh tuyn bc sng, mt loi khc th chm laser c chiu mt cch c hc vo mt trong nhng si quang. Trong trng hp ny, mt ma trn ca cc chm tia trn n kt hp mt ma trn ca cc si quang, lc mt trong nhng chm tia nng lng v mt si quang thu s c nh hng chng kt hp vi nhau t c mt kt ni trong khng gian. Cc thit b quang trng thi rn: l cc cp thit b bn dn nh hng, cc thit b ny c th thay i mt trong nhng c tnh quang trn ng i da vo cc ng dng iu khin tn hiu nh nhit , nh sng, dng in hay in p. Cc c tnh quang bao gm s phn cc, s truyn nh sng, s hp th, ch s khc x. H thng vi c in: da vo s phn x nh sng trn mt b mt sng bng lm thay i tnh nh hng ca nh sng. K thut ny da trn h thng gng c in (MEMS Micro Electro Mechanical Systems).

Hnh 2.14: OXC ton quang WGR Xt mt trung tm cung cp dch v ln, y c th kt thc nhiu kt ni, mi kt ni mang nhiu bc sng. Mt s bc sng ny khng cn c kt thc

33

Chng 2: Gii thiu mng WDM

http://www.4tech.com.vn/

v tr m mun i n node khc. OXC thc hin chc nng ny, n lm vic k bn cc phn t mng SON ET/ SDH, b nh tuyn IP v cc chuyn mch ATM, cc thit b u cui WDM v b ghp knh xen/ rt. Mt cch in hnh, mt s cng OXC c kt ni n cc thit b WDM, cc cng khc c ni n cc thit b kt cui. V th OXC cung cp dung lng hiu qu hn nhiu. 2.7. S chuyn i bc sng Chuyn i bc sng l kh nng chuyn tn hiu t bc sng ny( 1 ) trn mt ng vo sang bc sng khc ti ng ra ( 2 ). B chuyn i rt c ch trong vic gim xc sut tc nghn mng. N u cc b chuyn i c tch hp vo trong b kt ni cho quang trong mng WDM, cc kt ni c th c thit lp gia ngun v ch ngay c khi trn tt c cc tuyn ca ng i khng c sn cng mt bc sng. Cc b chuyn i bc sng gip loi tr s bt buc tnh lin tc v bc sng. B chuyn i bc sng y gip cho vic gim xc sut tc nghn tt hn nhng thc t b chuyn i ny rt kh thc hin bi cc l do v chi ph v gii hn k thut. Trong mt mng c rt t node mng c trang b b chuyn i bc sng, do cn phi c s la chn cc node t cc b chuyn i bc sng cc v tr thch hp sao cho ti u mng, thng t cc b chuyn i bc sng nhng node m lu lng mng xy ra cc i. tr-N ode A
1

N ode B

N ode C

Hnh 2.15: S chuyn i bc sng V d nh hnh trn, mt lightpath c thit lp gia N ode A v N ode B trn bc sng 1 , v mt ng lightpath khc c thit lp gia N ode B vi N ode C trn bc sng 2 . N u c mt yu cu N ode A n N ode C, yu cu khng th

34

Chng 2: Gii thiu mng WDM

http://www.4tech.com.vn/

thit lp c v s bt buc tnh lin tc v bc sng. N u c b chuyn i bc sng c t N ode B m n c kh nng chuyn i t bc sng 1 sang 2 , th yu cu c th thc hin thnh cng. R rng cc b chuyn i bc sng c th ci thin c hiu sut khi cc bc sng ri c sn trn cc tuyn, v mt bc sng chung th khng c. Chuyn i bc sng c chia ra lm hai loi: Chuyn i bc sng quang - in: theo phng php ny, tn hiu trc tin c chuyn sang tn hiu in s dng b tch sng. Lung bit c lu tr trong b m. Sau tn hiu in c dng li ng ra ca mt tunable laser to thnh mt bc sng mong mun ng ra. Phng php ny khng thch hp cho tc bit cao hn 10Gbps, tiu hao cng sut ln v thc hin phc tp hn cc phng php khc. Chuyn i bc sng ton quang: qu trnh chuyn i bc sng c thc hin hon ton trong min quang. Phng php ny da vo hiu ng trn bc sng to ra mt bc sng khc. Kh nng chuyn i bc sng c th thc hin qua nhiu mc khc nhau. Hnh di y minh ho s khc nhau gia u vo v u ra, trng hp nhiu cng th cng phc tp hn nhng cng tng t. Kh nng chuyn i bc sng hon ton tc l c th chuyn i mt bc sng ng vo thnh mt bc sng bt k ng ra. Kh nng chuyn i bc sng gii hn qui nh rng mi bc sng u vo c th c chuyn i thnh mt s bc sng xc nh trc ng ra. Trng hp c bit ca chuyn bc sng gii hn l chuyn i bc sng c nh khi m mt bc sng u vo ch c th chuyn i thnh mt bc sng c nh u ra. N u mi bc sng c chuyn i thnh chnh n th chng ta gi khng c s chuyn i no.

35

Chng 2: Gii thiu mng WDM

http://www.4tech.com.vn/

Hnh 2.16: Cc kh nng chuyn i bc sng 2.8. Kt lun chng. Qua chng ny, ta thy c ng lc thc Ny mng WDM hin nay. N hng mng ny cung cp cc lightpath t u cui ny n u cui kia qua cc node mng trung gian. Mt lightpath gm c mt knh thng tin quang, hoc bc sng, gia hai node mng m c nh tuyn qua nhng node trung gian. Cc node mng trung gian c th chuyn mch v chuyn i bc sng. V vy cc mng ny c xem l cc mng nh tuyn bc sng.

36

Chng 3: nh tuyn v gn bc song

http://www.4tech.com.vn/

CHNG 3 NNH TUYN V GN BC SNG.


3.1. Gii thiu chng Trong mng quang nh tuyn bc sng, ngi s dng lin lc vi nhau qua cc knh thng tin quang c gi l cc lightpath. Lightpath l mt ng i ca tn hiu nh sng t ngun n ch di dng quang thng qua cc kt ni trung gian. Mt lightpath c th ko di qua nhiu tuyn truyn dn cung cp mt kt ni chuyn mch mch gia hai node m c th cha mt lung lu lng ln gia chng. Khi cc lightpath thc hin vic mang thng tin t mt node ngun n mt node ch no th n cn c nh tuyn v gn bc sng. nh tuyn v gn bc sng cho lightpath l vn ht sc quan trng v xy ra thng xuyn trong mng. Chng ny s ni r v vic nh tuyn v gn bc sng cho cc lightpath, cc thut ton thc hin nh tuyn v cc phng php gn bc sng trong mng WDM. 3.2. Gii thiu v nh tuyn v gn bc sng (Routing and Wavelength Assignment - RWA). Khi mt lightpath c chn v xc nh, mi lightpath cn c nh tuyn v gn bc sng cho n. T t ra bi ton nh tuyn v gn bc sng. nh tuyn l vn tm ng gia hai node bt k trong mng tho mn mt mc ch no , thut ng gi l ti u hm mc tiu (cost function). Vn ny rt quen thuc v rt quan trng trong mng. Thng thng nh tuyn trong IP s dng thut ton tm ng Dijkstra, vi hm mc tiu l cc metric quen thuc nh bng thng, tr, chi ph tuyn, Trong mng quang, tm ng c hiu theo hai kha cnh, l tm ng vt l mang c mu lu lng yu cu (Routing) v a ra bc sng ph hp mang lu lng trn mi link dc path (Wavelength Assignment) trong s cc bc sng cho php (bi mi path gm mt s fiber, m trn mi fiber ny, bn c th c W sub-chanels, cng l W bc sng v W la chn cho yu cu kt ni hin ti). Vn

37

Chng 3: nh tuyn v gn bc song

http://www.4tech.com.vn/

ny c vit tt l RWA. Khi tm c mt path vt l v nh du bc sng trn cc link dc theo path , th chng ta c mt ng quang, cn gi l lightpath (LP). Rc ri t ra i vi bi ton RWA l n a ra hai iu kin sau: iu kin tnh lin tc bc sng: mt lightpath phi s dng chung mt bc sng trn tt c cc link dc theo ng i ca n t ngun n ch. iu kin ny c minh ho nh hnh di bng cch mi lightpath c th hin bng mt mu nht nh trong sut ng i.

Hnh 3.1: iu kin tnh lin tc bc sng iu kin tnh ring bit v bc sng: tt c cc lightpath s dng cng mt link (fiber) phi c gn cc bc sng ring bit. iu kin c minh ho nh (hnh 2.10) m n c tho mn khi hai lightpath cng chia s cng mt link c th hin bng hai mu khc nhau (hai bc sng khc nhau). Vn xy ra khi cc bc sng trn hai link k cn khc nhau, lc cn dng n b chuyn i bc sng, l ti nguyn t ca mng. Cc gii thut lun tm cch gim thiu chi ph ny. Bi ton RWA c th a ra nh sau: cho mt s hu hn cc lightpath c thit lp trn mng v mt s gii hn cc bc sng. Ta phi xc nh ng i cho mi lightpath v xc nh s bc sng nn c gn cho cho cc lightpath ny t c s lightpath c th thit lp l ln nht. Mc d nhng lightpath c ng i

38

Chng 3: nh tuyn v gn bc song

http://www.4tech.com.vn/

ngn nht c v ti u hn, nhng i khi ta nh phi loi b s la chn ny nhiu lightpath hn c th thit lp. V th cc gii thut thng cho php nhiu ng i thay phin nhau i vi mi lightpath c thit lp. Cc ng i nh sng (lightpath) m khng th c thit lp v nhng rng buc v ng i v bc sng c gi l nghn, do vy vn ti u mng tng ng hn ch n mc thp nht xc xut tc nghn ny. Khi hai lightpath m chng c tuyn truyn dn trng nhau th chng s khng c gn cng mt bc sng. Thng thng mt ng i nh sng (lightpath) hot ng vi cng mt bc sng trn nhng si quang m n i qua. Trng hp ny ta ni rng lightpath tho mn s rng buc v tnh lin tc bc sng. Tuy nhin nu mt nt chuyn mch/nh tuyn c trang b vi mt b chuyn i bc sng th iu kin rng buc v tnh lin tc bc sng khng cn na, lightpath ny c th chuyn sang nhiu bc sng khc nhau trn ng i t ngun n ch ca n. Mng li c m hnh bng Graph G(E,V) vi E (edge) l tp cc cnh v V l tp cc nh (vertical). Vi mi cp node bt k S-D trong mng (v tng ng trong Graph), tn ti mt tp cc ng i (path) vt l c th gia chng (mi path bao gm mt s fiber hay link, edge trung gian), k hiu: R. Tp cc ng i ny c th tm theo mt gii thut tm ng ph bin nh Dijkstra, Prim hay Mentor vi mt hm mc tiu tu chn. 3.3. nh tuyn bc sng Trong mt mng khng c b chuyn i bc sng, cc lightpath phi s dng cng mt bc sng t ngun n ch. Khi c nhu cu cho cuc gi, b nh tuyn bc sng WR phi s dng gii thut c thit lp t trc chn mt cng ra v bc sng tng ng. S la chn bc sng ng vai tr quan trng i vi ton b xc sut tc nghn. V vy mt WR phi tm ra ng i cho yu cu thit lp lightpath v thc hin gn bc sng sao cho ti thiu ho xc sut tc nghn. Chc nng ny c tm quan trng trong vic thit k cc mng ton quang. Bi ton RWA c chia lm hai loi nh sau:

39

Chng 3: nh tuyn v gn bc song

http://www.4tech.com.vn/

RWA dnh cho lu lng mng c nh (static traffic): vi loi ny th cc yu cu v lightpath c bit trc, tt c mi ng i v bc sng gn cho cc lightpath c thit lp c nh t trc ( v d nh yu cu truyn t Router ny n Router l khng i, tnh theo n v LP, xt trn ton mng ta c ma trn hng N *N ). Khi c yu cu i n, mt ng i v bc sng ch nh t trc c gn cho yu cu tng ng . V vy, qui trnh nh tuyn v gn bc sng l c nh, khng thay i theo thi gian. Vi loi ny, cng vic thc hin khng phc tp, n n gin l gn mt ng i no cho lightpath. Mc ch ca phng php ny l tng cc i ton b dung lng ca mng, tc l c th thit lp ng thi s lightpath l ln nht. y l bi ton trong mng khng c s chuyn i bc sng. RWA dnh cho lu lng mng thay i (dynamic traffic): trong mng quang nh tuyn bc sng, cc yu cu v lightpath i n theo mt qui trnh ring bit v thi gian chim bi cc yu cu ny cng theo mt qui lut ring. Vi dng lu lng mng thay i th cn c mt gii thut ng nh tuyn cc lightpath qua nhng ng i khc nhau da vo s tc nghn trn cc tuyn truyn dn. T gii thut cho bi ton RWA ng c a ra, n da vo trng thi hin thi ca mng xc nh ng i cho mi yu cu thit lp lightpath. Mt kt ni b nghn nu khng c ng i no c th dng mang n. Mt trong nhng thch thc gii quyt bi ton nh tuyn v gn bc sng vi lu lng mng thay i l pht trin cc gii thut v giao thc thit lp cc lightpath, nhm hn ch n mc thp nht xc sut tc nghn trong mng (tc l s yu cu kt ni s b t chi/ tng s yu cu), nng cao hiu sut s dng ti nguyn (cng mt lng fiber, node, b chuyn i bc sng,c th to ra nhiu lightpath nht) v ci thin hiu nng tng th ca mng (hiu nng = xc sut tc nghn ca mng + phc tp ca gii thut) . Mt phng php n gin l da vo gii thut tm ng i b nghn t nht thit lp cc lightpath ng. Trong gii thut ny, mt lightpath c thit lp trn ng i t b nghn nht t tp cc lightpath khc nhau gia cp ngun - ch. Bc

40

Chng 3: nh tuyn v gn bc song

http://www.4tech.com.vn/

sng c cp pht l bc sng u tin cn ri gia nhng tuyn lin kt trong ng ny. Bi ton RWA ( Routing and Wavelength Assignment) c chia lm hai phn: nh tuyn v gn bc sng. 3.4. nh tuyn (Routing) 3.4.1. Gii thiu nh tuyn c coi l thnh phn ct yu ca kin trc mng, thit k mng v iu hnh mng ca mi mng thng tin, l thnh phn khng th thiu trong mng vin thng. Cc yu t thc Ny cho qu trnh thay i v pht trin nh tuyn mng ch yu do nhu cu ci thin hiu nng mng, cc dch v mi a vo khai thc v s thay i cng ngh mng, v y cng l mt trong nhng thch thc khi xy dng v khai thc mng. Hu ht cc mng vin thng truyn thng c xy dng theo m hnh mng phn cp m hnh ny cho php s dng nh tuyn tnh trn qui m ln. Trong khi nh tuyn tnh vn cn tn ti th tnh cht c lp gia ngi s dng v mng vn mc cao; nh tuyn tnh ch yu da trn mong mun ca ngi s dng nhiu hn l tnh trng ca mng hin thi. Mng hin i hin nay c xu hng hi t cc dch v mng, yu cu t ra t pha ngi s dng l rt a dng v phc tp. Cc phng php nh tuyn ng c s dng nhm nng cao hiu nng mng ca mng mi ny, tng thm tnh ch ng, mm do p ng tt hn yu cu ngi s dng dch v. nh tuyn ch s la chn ng i trn mt kt ni mng thc hin vic gi d liu. nh tuyn ch ra hng, s dch chuyn ca cc gi (d liu) c nh a ch t mng ngun n ch thng qua cc node trung gian; thit b chuyn dng l b nh tuyn (router). Tin trnh nh tuyn thng ch hng i da vo bng nh tuyn, l bng cha cc l trnh tt nht n cc ch khc nhau trn mng. V vy vic xy dng bng inh tuyn, c t chc trong b nh ca router, tr nn v cng quan trng cho vic nh tuyn hiu qu.

41

Chng 3: nh tuyn v gn bc song

http://www.4tech.com.vn/

Khi c nhu cu cho cuc gi n, b nh tuyn xc nh ng i cho yu cu thit lp lightpath. N h vy bi ton nh tuyn l xc nh ng i cho mi yu cu thit lp lightpath. Mi ng i l mt chui cc tuyn truyn dn t im ngun n im ch. N hm gim s phc tp trong tnh ton, ng thi bi ton n gin hn, ta s xt ng i ngn nht gia hai im u cui ny. thc hin iu ny, ta s dng mt gii thut tm ng i ngn nht da trn gii thut Dijkstra. hiu r v thut ton dng trong nh tuyn, ta tm hiu v l thuyt th. 3.4.2. Phn loi nh tuyn C nhiu cch phn loi nh tuyn, c th a ra mt s loi nh tuyn nh sau: Da vo chc nng thch nghi vi trng thi hin thi ca mng phn loi thnh: nh tuyn tnh v nh tuyn ng nh tuyn tnh: vi nh tuyn tnh, ng dn c chn trc cho mi cp ngun ch ca cc node trong mng. Cc gii thut nh tuyn chi ph ti thiu c th c s dng. K hoch nh tuyn tnh c s dng hu ht cc mng truyn thng, trong k hoch nh tuyn ny ch yu vi mc ch lm gim cc h thng chuyn mch phi i qua vi yu cu kt ni ng di. K thut nh tuyn tnh bc l mt s nhc im nh: quyt nh nh tuyn tnh khng da trn s nh gi lu lng v topo mng hin thi. Cc b nh tuyn khng pht hin ra cc b nh tuyn mi, chng ch c th chuyn thng tin n ti cc cc b nh tuyn c ch nh trc ca nh qun l mng. nh tuyn ng: nh tuyn ng la chn tuyn da trn thng tin trng thi hin thi ca mng. Thng tin trng thi c th o hoc d on v tuyn ng c th thay i khi topo mng thay i hoc lu lng mng thay i. nh tuyn ng th hin tnh linh hot v d dng m rng mng. Da vo phm vi nh tuyn, ta phn loi thnh: nh tuyn trong v nh tuyn ngoi. nh tuyn trong: nh tuyn xy ra bn trong mt h thng c lp (AS Autonomous System), cc giao thc thng dng l RIP (Router Information

42

Chng 3: nh tuyn v gn bc song

http://www.4tech.com.vn/

Protocol), IGRP (Interior Gateway Routing Protocol), OSPF (Open Shortest Path First), EIGRP (Enhanced IGRP), nh tuyn ngoi: nh tuyn xy ra gia cc h thng c lp (AS), lin quan ti dch v ca nh cung cp mng s dng giao thc nh tuyn ngoi rng v phc tp. Giao thc thng dng l BGP (Border Gateway Protocol).

Hnh 3.2: nh tuyn trong v nh tuyn ngoi 3.4.3. L thuyt th Trong ton hc v tin hc, th l i tng nghin cu c bn ca l thuyt th. Mt cch khng chnh thc, th l mt tp cc i tng gi l nh ni vi nhau bi cc cnh. Thng thng th thng c v di dng tp cc im (nh, nt) ni vi nhau bi cc on thng (cnh). Tu theo ng dng m mt s cnh c th c hng.

Hnh 3.3: L thuyt th

43

Chng 3: nh tuyn v gn bc song

http://www.4tech.com.vn/

C 3 loi th: th c hng, th v hng v th hn hp. 3.4.3.1. th v hng. th v hng hoc th G l mt cp c th t (order pair) G=(V,E), trong : V l tp cc nh hoc nt. E l tp cc cp khng th t cha cc nh phn bit, c gi l cnh. Hai nh thuc mt cnh c gi l cc nh u cui ca cnh .

Hnh 3.4: th v hng 3.4.3.2. th c hng.

Hnh 3.5: th c hng th c hng G l mt cp c th t G=(V,A), trong : V l tp cc nt hoc nh. A l tp cc cnh c th t cha cc nh, c gi l cc cnh c hng hoc cung.

44

Chng 3: nh tuyn v gn bc song

http://www.4tech.com.vn/

Mt cnh e=(x,y) c coi l c hng t x n y, x c gi l im u/gc v y c coi l im cui/ngn ca cnh. T ta phn loi ra: th n v a th. th n: l th m gia hai nh ch c ti a mt cnh. a th: l th m gia hai nh c th c nhiu hn mt cnh. a th c hng l mt th c hng m trong nu x v y l hai nh th th c php c c hai cung (x,y) v (y,x). th n c hng l mt th c hng, trong , nu x v y l hai nh th th ch c php c ti a mt trong hai cung (x,y) v (y,x). 3.4.3.3. th hn hp th hn hp G l b ba c th t G=(V,E,A) vi V,E,A c nh ngha nh trn. 3.4.3.4. V d

Hnh 3.6: V d

Vi hnh trn, ta c cc gi tr sau: - V={1,2,3,4,5,6} - E={{1,2},{1,5},{2,3},{2,5},{3,4},{4,5},{4,6}} i khi thng tin ni t nh 1 n nh 2 c k hiu l 1~2.

45

Chng 3: nh tuyn v gn bc song

http://www.4tech.com.vn/

Bi ton nh tuyn gn bc sng c lin h cht ch vi bi ton t mu cho cc nt trong th. Bi ton ca chng ta l t mu cho cc nt thuc G sao cho hai node k cn nhau phi mang mu khc nhau th hin mi trng thi ca node. 3.4.4. Cc thut ton c bn trong nh tuyn Cc mng chuyn mch gi v internet da trn quyt nh nh tuyn ca n t cc tiu ch ti thiu. y ta xt n chi ph tuyn c s dng nh tham s ng vo ca thut ton nh tuyn chi ph ti thiu m c th pht biu n gin nh sau: Cho mt mng gm cc node c ni bi cc tuyn song cng, trong , mi tuyn c mt chi ph c gn cho mi hng, nh ngha chi ph ca ng dn gia hai node l tng chi ph ca cc tuyn hp thnh ng dn. Vi mi cp node, tm ng dn vi chi ph ti thiu. Hu ht cc thut ton chi ph ti thiu ang s dng trong cc mng chuyn mch gi v internet l Dijkstra hoc Bellman-Ford. Ta s xt hai thut ton ny di y. 3.4.4.1. Thut ton trng thi lin kt LSA Trong thut ton trng thi lin kt, cc node mng qung b gi tr lin kt ca n vi cc node xung quanh ti cc node khc. Sau khi qung b, tt c cc node u bit r topo mng v thut ton s dng tnh ton con ng ngn nht ti node ch l thut ton Dijkstra. Thut ton Dijkstra, mang tn ca nh khoa hc my tnh ngi H Lan Edsger Dijkstra, l mt thut ton gii quyt bi ton tm ng i ngn nht trong mt th c hng khng c cnh mang trng s m. 3.4.4.1.1. Bi ton Cho mt th c hng G=(V,E), mt hm trng s w: E [0, ) v mt nh ngun s. Cn tnh ton c ng i ngn nht t nh ngun s n mi nh ca th. V d: chng ta dng cc nh ca th m hnh cc thnh ph v cc cnh m hnh cc ng ni gia chng. Khi trng s cc cnh c th xem nh di ca cc con ng hay c th l chi ph (v do l khng m). Chng ta cn vn chuyn t thnh ph s n thnh ph t. Thut ton Dijkstra s gip ch ra ng i ngn nht chng ta c th i.

46

Chng 3: nh tuyn v gn bc song

http://www.4tech.com.vn/

Trng s khng m ca cc cnh ca th mang tnh tng qut hn khong cch hnh hc gia hai nh u mt ca chng. V d, vi 3 nh A, B, C ng i A-B-C c th ngn hn so vi ng i trc tip A-C. 3.4.4.1.2. Thut ton Thut ton Dijkstra c th m t nh sau: Ta qun l mt tp hp ng S. Ban u S={s}. Vi mi nh v, chng ta qun l mt nhn d[v] l di b nht trong cc ng i t ngun s n mt nh u no thuc S, ri i theo cnh ni u-v. Trong cc nh ngoi S, chng ta chn nh u c nhn d[u] b nht, b sung vo tp S. Tp S c m rng thm mt nh, khi chng ta cn cp nht li cc nhn d cho ph hp vi nh ngha. Thut ton kt thc khi ton b cc nh nm trong tp S, hoc nu ch cn tm ng i ngn nht n mt nh ch t, th chng ta dng li khi nh t c b sung vo tp S. Tnh cht khng m ca trng s cc cnh lin quan cht ch n tnh ng n ca thut ton. Khi chng minh tnh ng n ca thut ton, chng ta phi dng n tnh cht ny. 3.4.4.1.3. Chng minh tng c chng minh nh sau: Chng ta s ch ra, khi mt nh v c b sung vo tp S, th d[v] l gi tr ca ng i ngn nht t ngun s n v. Theo nh ngha nhn d, d[v] l gi tr ca ng i ngn nht trong cc ng i t ngun s, qua cc nh trong S, ri theo mt cnh ni trc tip u-v n v. Gi s tn ti mt ng i t s n v c gi tr b hn d[v]. N h vy trong ng i, tn ti nh gia s v v khng thuc S. Chn w l nh u tin nh vy. ng i ca ta c dng s - ... - w - ... - v. N hng do trng s cc cnh khng m nn on s - ... - w c di khng ln hn hn ton b ng i, v do c gi tr b hn d[v]. Mt khc, do cch chn w ca ta, nn di ca on s - ... - w chnh l

47

Chng 3: nh tuyn v gn bc song

http://www.4tech.com.vn/

d[w]. N h vy d[w] < d[v], tri vi cch chn nh v. y l iu mu thun. Vy iu gi s ca ta l sai. Ta c iu phi chng minh. 3.4.4.1.4. Cc bc thc hin Thut ton Dijkstra dng trong giao thc nh tuyn 0SPF i qua cc bc sau: 1. B nh tuyn xy dng th ca mng v xc nh cc node ngun ch, v d nh V1 v V2. Sau n xy dng mt ma trn, c gi l ma trn lin k. Ma trn ny th hin trng s ca cc cnh, v d nh [i,j] l trng s ca cnh ni Vi vi Vj. N u khng c kt ni trc tip gia Vi v Vj, trng s ny c xc nh l v cng. 2. B nh tuyn xy dng bng trng thi cho tt c cc node trong mng. Bng ny gm cc phn: Chiu di: th hin ln ca trng s t ngun n node . N hn ca node: th hin trng thi ca node, mi mt node c th c mt trong hai trng thi l c nh hay tm thi. 3. B nh tuyn gn thng s ban u ca bng trng thi cho tt c cc node v thit lp chiu di ca chng l v cng v nhn ca chng l tm thi. 4. B nh tuyn thit lp mt T-node. V d nh V1 l node ngun T-node, b nh tuyn s chuyn nhn ca V1 sang c nh. Khi mt nhn chuyn sang c nh, n s khng thay i na. 5. B nh tuyn s cp nht bng thi trng thi ca tt c cc node tm thi m cc node ny lin kt vi node ngun T-node. 6. B nh tuyn nhn vo cc node tm thi v chn mt node duy nht m node ny c trng s n V1 l nh nht. N ode ny sau tr thn node ch T-node. 7. N u node ny khng phi l V2 th b nh tuyn tr li bc 5. 8. N u node ny l V2 th b nh tuyn tch node trc ca n khi bng trng thi v c thc hin iu ny cho n khi n node V1. Mt lt cc node ch ra tuyn ti u nht t V1 n V2. 3.4.4.1.5. V d v thut ton Dijkstra Di y ta s tm ng ngn nht gia A v E.

48

Chng 3: nh tuyn v gn bc song

http://www.4tech.com.vn/

Bc 1: Theo hnh sau, node A lm node ngun T-node, nhn ca n chuyn sang c nh v c nh du bng

Bc 2: Trong bc ny, ta s thy c bng trng thi ca cc node ni trc tip vi node A l cp node (B,C). ng t A n B l ngn nht (c trng s nh nht), do n c chn lm T-node v sau nhn ca n chuyn sang c nh.

Bc 3: ging nh bc 2, da trn bng trng thi ca cc node kt ni trc tip vi node B l cp node (D,E).Tng t nh th, node D kt ni vi node B l ng ngn nht (mang trng s 2 nn nh hn trng s ca cnh BE), do node D c lm T-node, v sau nhn ca n chuyn sang c nh.

Bc 4: trong bc ny chng ta khng c node tm thi no, v th ta ch c th chn T-node tip theo. N ode E c chn vo th, cnh DE c trng s nh nht.

49

Chng 3: nh tuyn v gn bc song

http://www.4tech.com.vn/

Bc 5: N ode E l node ch nn chng ta kt thc qu trnh nh tuyn ny. 3.4.4.2. Thut ton nh tuyn vect khong cch DVA L mt thut ton nh tuyn tng thch nhm tnh ton con ng ngn nht gia cc cp node trong mng, c bit n nh l thut ton Bellman-Ford. Cc node mng thc hin qu trnh trao i thng tin trn c s ca a ch ch, node k tip, v con ung ngn nht ti ch. Mi node trong mng c bng nh tuyn cho thy ng tt nht n mi ch v mi node ch gi bng nh tuyn ca n n cc node lng ging. Vn tn ti ca thut ton DV l n thc hin m n v cng khi c mt kt ni b hng. Vn ny c th thy r v d sau:

Hnh 3.8: V d ca thut ton DVA Vi hnh 3.8 cho thy c duy nht mt tuyn gia node A n nhng node khc. Gi s trng s trn mi cnh u bng 1, mi node (Router) u cha bng nh tuyn. By gi, nu ta ct kt ni gia A v B th node B s hiu chnh li bng nh tuyn ca n. Sau khong thi gian, cc node trao i thng tin bng nh tuyn v B nhn bng nh tuyn ca C. Khi C khng bit g xy ra vi kt ni gia kt ni gia A v B, n s cho rng c mt tuyn kt ni vi trng s l 2 (1 cho kt ni C-B v 1 cho kt ni B-A), n khng bit rng kt ni A-B b ct. B nhn bng nh tuyn ny v ngh rng c mt tuyn khc gia C v A, v th n sa li bng nh tuyn v thay i gi tr trng s ca kt ni B-A v 3 (1 cho kt ni B-C, 2 cho kt C-A). Mt

50

Chng 3: nh tuyn v gn bc song

http://www.4tech.com.vn/

ln na cc node thay i bng nh tuyn ca n. Khi C nhn bng nh tuyn ca B, n thy rng bng B thay i trng s ca tuyn B-A t 1 thnh 3, v th n cp nht bng nh tuyn v thay i trng s ca tuyn C-A thnh 4 (1 cho kt ni C-B v 3 cho kt ni B-A). Qu trnh ny c xy ra mit cho n khi tt c cc node tm ra trng s ca tuyn n A l v cng. Thut ton Bellman-Ford l mt thut ton tnh cc ng i ngn nht trong mt th c hng c trng s (trong mt s cung c th c trng s m).Thut ton Dijksta i hi trng s ca cc cung phi c gi tr khng m. Do thut ton Bellman-Ford thng dng khi c cc cung vi trng s m. 3.4.4.2.1. Thut ton Gii thut Bellman-Ford c th pht biu: Tm cc ng dn ngn nht t node ngun cho trc vi rng buc ch cha mt tuyn, sau tm ng dn ngn nht vi rng buc ch cha ti a hai tuyn v c th tip tc. N u ng dn trc l ngn nht th li cn khng th cp nht ng dn mi. Thut ton c tin hnh qua cc tng c biu din nh sau: function BellmanFord (danh_sch _nh, danh_sch_cung, ngun) // hm yu cu th a vo di dng mt danh sch nh, mt danh cung // hm tnh cc gi tr khong_cch v nh_lin_trc ca cc nh, sao cho cc //gi tr nh_lin_ trc s lu li cc ng i ngn nht. // bc 1: khi to th for each v in danh_sch_nh: if v is ngun then khong_cch (v) := 0 else khong_cch (v) := infinity nh_lin_trc (v) := null // bc 2: kt np cnh for i from 1 to size (danh_sch_nh) : for each (u, v) in danh_sch_cung :

51

Chng 3: nh tuyn v gn bc song

http://www.4tech.com.vn/

if khong_cch (v) > khong_cch (u) + trng_s (u, v) : khong_cch (v) := khong_cch (u) + trng_s (u, v) nh_lin_trc (v) := u // bc 3: kim tra chu trnh m for each (u, v) in danh_sch_cung : if khong_cch (v) > khong_cch (u) + trng_s (u, v) : error th cha chu trnh c trng s m 3.4.4.2.2.Chng minh Tnh ng n ca thut ton c th chng minh bng qui np. Thut ton c th pht biu chnh xc theo kiu qui np nh sau: nh l: Sau i ln lp vng for: 1. N u Khong_cch(u) khng c gi tr v cng ln, th n bng di ca mt ng i no t s ti u; 2. N u c mt ng i t s ti u qua nhiu nht i cung, th Khong_cch (u) c gi tr khng vt qu di ca ng i ngn nht t s ti u qua ti a i cung. Chng minh: Trng hp c bn: Xt i =0 v thi im trc khi vng for c chy ln u tin. Khi , vi nh ngun khong_cch (ngun) := 0, iu ny ng. i vi cc nh u khc, khong_cch (u) := infinity, iu ny cng ng v khng c ng i no t ngun n u qua 0 cung. Trng hp quy np: Chng minh cu 1: Xt thi im khi khong cch ti mt nh c cp nht bi cng thc khong_cch (v) := khong_cch (u) + trng_s (u,v). Theo gi thit quy np, khong_cch (u) l di ca mt ng i no t ngun ti u. Do , khong_cch (u) + trng_s (u, v) l di ca ng i t ngun ti u ri ti v. Chng minh cu 2: Xt ng i ngn nht t ngun ti u qua ti a i cung. Gi s v l nh lin ngay trc u trn ng i ny. Khi , phn ng i t ngun ti v l ng i ngn nht t ngun ti v qua ti a i-1 cung. Theo gi thuyt quy np,

52

Chng 3: nh tuyn v gn bc song

http://www.4tech.com.vn/

khong_cch (v) sau i-1 vng lp khng vt qu di ng i ny. Do , trng_s (v, u) + khong_cch (v) c gi tr khng vt qu di ca ng i t s ti u. Trong ln lp th i, khong_cch (u) c ly gi tr nh nht ca khong_cch (v) + trng_s (v, u) vi mi v c th. Do , sau i ln lp, khong_cch (u) c gi tr khng vt qu di ng i ngn nht t ngun ti u qua ti a i cung. Khi i bng s nh ca th, mi ng i tm c s l ng i ngn nht ton cc, tr khi th c chu trnh m. N u tn ti chu trnh m m t nh ngun c th i n c th s khng tn ti ng i nh nht (v mi ln i quanh chu trnh m l mt ln gim trng s ca ng). 3.4.5. Kt lun C hai thut ton ny u hot ng di iu kin tnh ca topo mng v chi ph tuyn th c hai hi t v mt nghim. Khi mng c nhiu s thay i th thut ton s c gng bm theo s thay i, tuy nhin, nu chi ph tuyn ph thuc vo lu lng, tc l n li ph thuc vo ng dn c chn th vi p ng lm cho mng khng n nh. 3.5. Gn bc sng Vic gn bc sng l nhn t chnh nh hng n xc sut tc nghn v tnh thc thi ca mng. Gn bc sng thch hp c th lm gim s bc sng s dng hoc khng cn dng n b chuyn i bc sng, nn ta c th gim c chi ph ca mng xung rt nhiu. Gn bc sng c chia lm hai loi cho lu lng mng c nh v lu lng mng thay i. Khi lu lng mng c nh th php gn c nh, cng mt bc sng c gn nu( nu c sn) cho mi yu cu c to ra mt nt, nu khng th yu cu b chn. Khi lu lng mng thay i, lc c yu cu n mt nt mng no th nt s dng mt gii thut chn mt bc sng ring bit cn ri nt v gn cho lightpath nh tuyn n, nu khng th yu cu khng c gii quyt. Gii thut cho phng php gn qun l mt danh sch cc bc sng c s dng, cc bc sng cn ri mi nt. Cc phng php gn bc sng c chia lm cc loi nh sau:

53

Chng 3: nh tuyn v gn bc song

http://www.4tech.com.vn/

Kiu gn Random: khi c yu cu n mt nt, nt s xc nh nhng bc sng cn hiu lc ( tc l cn ri) v chn ngu nhin mt i trong nhng bc sng gn cho yu cu . Cc bc sng cn ri mi nt c xc nh bng cch loi b bc sng i s dng ra khi danh sch bc sng cn ri; khi cuc gi kt thc, i c loi ra khi danh sch bc sng b bn v c thm vo tr li danh sch bc sng ri ban u. Phng php ny khng cn i hi nhng thng tin v ton b trng thi ca mng khi thc hin gn bc sng. Php gn ny phn phi lu lng mt cch tu , do vy s tn dng bc sng c cn bng v tranh chp bc sng thp nn xc sut tc nghn cng thp hn. Kiu gn First - Fit: php gn ny s tm v gn nhng bc sng theo mt trnh t c nh. Tt c cc bc sng c nh s t thp n cao v cc bc sng c chn gn cng theo ch s t thp n cao, tc l bc sng u tin c chn l bc sng c ch s nh nht trong s bc sng ri v gn cho yu cu. Cng tng t nh phng php gn Random, php gn ny khng cn bt k thng tin no v thng tin trng thi mng. Hn ch ca phng php ny l cc bc sng c ch s nh hn c dng nhiu, trong khi nhng bc sng c ch s ln hu nh khng c s dng. Hn na s gia tng s bc sng trong si cng khng mang li hiu qu no bi v nhng bc sng c ch s cao rt t khi c dng. Do s tranh chp i vi nhng bc sng c ch s nh tng ln, lm xc sut tc nghn cng tng ln. Php gn ny cho chi ph thp hn so vi php gn Random bi v n khng cn phi kim tra tt c cc bc sng trong mi tuyn, v th n c a chung hn. Php gn Least - used: Php gn ny chn nhng bc sng m nhng bc sng ny t c s dng nht trong mng. Mc ch ca php gn ny l cn bng ti trn tt c nhng bc sng. Php gn ny i hi thng tin trng thi v mng tm ra bc sng t c s dng nht. Tuy nhin phng php ny phi tn km cho chi ph lu tr v tnh ton. Php gn Most - used: n l php gn ch l ngc vi php gn Least-used, n tm chn nhng bc sng c s dng nhiu nht trong mng. Php gn ny

54

Chng 3: nh tuyn v gn bc song

http://www.4tech.com.vn/

phi i hi nhng thng tin v trng thi mng tm ra bc sng c s dng nhiu nht. N cng tn nhng chi ph tng t nh trong php gn Least- used, tuy nhin n thc hin tt hn so vi php gn Least- used. Vi cc php gn bc sng k trn, phng php Random v First - Fit l thc t hn v d thc hin. Khng ging nh hai phng php Least- used v Most- used i hi phi c cc thng tin v mng. N n gin ch da vo trng thi nt lc v chn mt bc sng t nhng bc sng ri kt ni ng ra . Mt cch tng i, phng php ngu nhin Random cho hiu qu tt hn phng php First - Fit. thc hin hai phng php gn Least - used v Most - used, mi nt cn trang b thng tin ton b mng. N n nhng phng php ny ph thuc vo s thng minh v hiu bit chnh xc ca cc nt. V trng thi mng thay i mt cch nhanh chng nn kh c th bit c mt cch chnh xc thng tin mng tt c cc thi im, do vy nh hng n vic gn bc sng. Hn na cc nt trao i thng tin vi nhau v mng sau mi khong thi gian c nh v nhng thng tin ny s tiu th mt bng thng ng k, v th lm gim bng thng sn c truyn d liu. 3.6. S thit lp ng o (Virtual path) Mt ng o c xem nh mt ng i ca nh sng t ngun n ch. Khi c yu cu cuc gi c to ra nt, nt s dng gii thut nh tuyn v gn bc sng tm ra mt ng i v mt bc sng cho cuc gi . N t s gn bc sng c chn cho cuc gi v nh tuyn n n nt k tip. mi nt trung gian ca ng i, bc sng ca lightpath i ti c kim tra xem c sn c gn v t c th i tip hay khng. N u bc sng khng c sn, v nu nt c b chuyn i bc sng, n c th chuyn sang bc sng khc nh tuyn lightpath. ng i va thit lp c gi l ng o, c thit lp sn trc khi bt k d liu no c truyn qua. Mt ng vt l bao gm tt c cc tuyn truyn dn (link) hnh thnh trn l trnh t ngun n ch, nhng ng o c th cha cc bc sng ging hoc khc nhau t ngun n ch. Hai yu cu cho cuc gi c cng chung im u cui ch v ngun c th c cng ng vt l nhng c cc ng o khc nhau. Hnh sau ch

55

Chng 3: nh tuyn v gn bc song

http://www.4tech.com.vn/

ra s hnh thnh ca mt lightpath. y hai cuc gi c to ra t nt 1 v ng o cho mi cuc gi to thnh c v ra. i vi cuc gi th nht, nt 1 gn bc sng 1 v gi n n nt 2. Gi s nt 2 c mt b chuyn i bc sng nhng khng c sn bc sng 1 , v th n chuyn sang bc sng 2 v gi n nt 3. N t 3 gn tip 2 v n c sn v nh tuyn lightpath n ni. Bng cch ny ng o th nht c thit lp. N u cuc gi th hai c to ra nt 1 ngay sau , th mt ng o th hai c to ra tng t. Ta thy rng ng vt l th ging nhau nhng cc ng o th khc nhau. Tng s cc ng o c thit lp t ngun n ch ph thuc vo s bc sng sn c trn si. S ng o c thit lp tht s ph thuc vo tc cuc gi i n. Cc b chuyn i bc sng gip thit lp c nhiu ng o hn.

Hnh 3.9: S thit lp ng o 3.7. Phn loi mng quang WDM 3.7.1. Mng single- hop Trong mng quang WDM single- hop, mt khi lung d liu c pht i di dng nh sng s n c ch trc tip m khng cn phi chuyn sang dng in nhng node trung gian. truyn dn mt gi, mt trong nhng laser pht ca nt gi v mt trong nhng b thu ca node nhn phi c chnh n cng mt bc sng trong khong thi gian truyn dn gi. Trong cc mng chuyn mch mch, tc iu chnh ca cc b thu pht thng yu cu thp. N gc li trong cc mng chuyn mch gi, cc b thu pht cc node

56

Chng 3: nh tuyn v gn bc song

http://www.4tech.com.vn/

cn c chnh n cc bc sng khc nhau mt cch nhanh chng gi v nhn cc gi tin khc tip theo. Bn cnh vn k thut ca vic chuyn i bc sng nhanh, mt thch thc quan trng khc na l pht trin cc giao thc phi hp hiu qu nhng kt ni cc bc sng khc nhau trong mng. mt h thng single- hop hot ng hiu qu, bng thng c cp pht gia cc node ang tranh chp phi c qun l linh ng. Cc h thng ny c th phn thnh hai loi: c phi hp trc khi truyn dn v khng yu cu phi hp trc khi truyn dn. Cc loi phi hp dng mt knh iu khin n dng chung gia cc node v s truyn d liu tht s xy ra thng qua mt s cc knh d liu. Cc node ri cn gim st knh iu khin. Trc khi pht hoc thu gi d liu, mt gi chnh b pht hay bt thu ca n n knh d liu thch hp. N gc li trong h thng loi th hai, khng c s tn ti ca knh iu khin v cc node pht hoc thu t cc knh c nh trc. 3.7.2. Mng Multi- hop Mng multi- hop khc phc c nhc im ny bng cch trnh s dng b thu pht iu chnh bc sng. Mi node c trang b mt s cc b thu pht quang c chnh c nh. Mi b pht trong mng c chnh n mt bc sng khc nhau. Kt ni trc tip single- hop gia hai node ch c th xy ra khi nu nt n c mt trong nhng b thu ca n c chnh n mt trong nhng bc sng ca node gi. S kt ni gia mt cp node bt k trong mng t c bng cch nh tuyn thng qua cc node trung gian. knh thng tin quang c chuyn thnh dng in, a ch n ca gi c gii m, sau gi c chuyn mch in v c pht li trn bc sng n node ch hoc n cc node trung gian khc m qu trnh ny c lp li. V vy, mt gi s tri qua nhiu bc sng thng qua mt s node trung gian trc khi n c node ch.

57

Chng 3: nh tuyn v gn bc song

http://www.4tech.com.vn/

3.8. Gii thut cho vn nh tuyn v gn bc sng vi lu lng mng thay i DRWA Bn c th hnh dung cc vn m mt gii php cho DRWA cn phi gii quyt, mc ch ca n l ti thiu tc nghn ti node mng (tc l s yu cu kt ni s b refuse/tng s yu cu), nng cao hiu sut s dng ti nguyn (cng mt lng fiber, node, chuyn i bc sng,...c th to ra nhiu LP nht) v ci thin hiu nng tng th ca mng (hiu nng = xc sut tc nghn + phc tp ca gii thut). Gii thut c trnh by nh sau: Gi s mi LP c ti a H hop (link). Trn mi link (fiber) s dng W bc sng (sub-channel). Tp cc ng i c th gia hai node bt k l R*. Trng thi ca mi bc sng trn link (fiber) c m ho bng hai bit b0b1. Khi c yu cu LP, node ngun s gi bn tin cp nht trng thi dc theo cc path tim nng tp hp thng tin trng thi ng truyn (bn tin c th nhng trong giao thc bo hiu no ) Hai bit trng thi nh sau: b0b1= 00: bc sng ang bn. b0b1= 01: c th dng lin tc khng cn chuyn i bc sng. b0b1= 10: mun dng phi chuyn i bc sng b0b1= 11: c th dng c hai cch Ti mi node trung gian thuc LP, 2*W bt trng thi bc sng c ghi (tagged) vo sau bn tin ny, v gi n ch. N u thi im node khng th thit lp knh (do ht bc sng chng hn), n loi b (discard) gi tin bo hiu v gi bn tin thng bo (notification) ti ngun hoc ch x l. Ti ch, thng tin trong mi bn tin cp nht trng thi c a ra dng ma trn: Ton b hnh nh v trng thi ti nguyn ng truyn t node 0 n node H-1 c phn nh trn ma trn ny. Gii thut nh du bc sng thc hin da trn cc ma trn (thnh cng) t R* path tim nng ca mi cp node. K hiu CS ca bc sng lamda(m) l bc lin tc ca bc sng, tc l c th dng n lin tc trong dy lin tip cc node no dc theo path. Gii thut nh sau:

58

Chng 3: nh tuyn v gn bc song

http://www.4tech.com.vn/

1. Tm tp tt c cc t hp CS ca mi bc sng, trn mi path, k hiu CSij 2. Tm tp cc t hp CS* thuc {CSij} (i =1: W; j =1:R*) ph kn LP vi s phn t ti thiu (tc l t on CS nht, iu ny tng ng t phi dng b chuyn i bc sng nht) 3. p dng hm mc tiu (trong gii thut l tng chi ph) cho mi t hp CS tm thy trong bc 2 chn ra t hp c tng chi ph ti thiu. 3.9. Kt lun chng Qua chng ny, chng ta tm hiu v phng php nh tuyn v gn bc sng trong mng WDM, khi c yu cu thit lp lightpath t node ngun n node ch th b nh tuyn bc sng c nhim v xc nh ng i v gn bc sng cho lightpath . Trong mng quang WDM, vic s dng thut ton nh tuyn bc sng t c ti u mng l iu ht sc ngha. Thut ton Dijkstra vi vic nh tuyn tm ng ngn nht c nhiu u im trong mng tp trung nn em s s dng m phng vic nh tuyn trong mng quang.

59

Chng 4: Thc hin m phng

http://www.4tech.com.vn/

CHNG 4 THC HIN M PHNG


4.1. Gii thiu chng nh tuyn l cng vic ht sc quan trng trong mng quang WDM, n thc hin tm ng cho lightpath mang lu lng thng tin t ngun n ch vi mc ch ti u mng. Trong chng ny, da trn phn mm Visual C++, em m phng phn nh tuyn cho cc lightpath vi hm mc tiu chng ta c th tu chn nh chi ph, tr, lng lu lng qua cc tuyn t ngun n ch. Thut ton s dng thc hin nh tuyn l thut ton Dijkstra. Cc trng s trn cc tuyn khng ch l di ng i ca tuyn m tu theo mt tiu ch no ca mng nh chi ph tuyn, tr, bng thng, lu lng thng tin... N u ly theo tiu ch l chi ph thp nht th trng s trn cc tuyn (cnh) l ch ph ca tuyn . 4.2. Gii thiu v ngn ng Visual C++ Visual C++ l ngn ng lp trnh da trn nn tng c bn ca C++, l lp trnh hng i tng. N u cc bn lp trnh trn C++ th vic xy dng cc ng dng trn Visual C++ rt thun li. Khi thc hin lp trnh C/C++, to cc giao din phc tp, trnh by p hon ton khng n gin. N hng i vi Visual C++ th vic kh n gin. Bn ch cn s dng cc iu khin hay xy dng mt menu a vo ng dng ca mnh m cc m lnh cn vit khng qu di dng v phc tp nh trong C/C++. Trong chng trnh m phng ca em c th s dng bt k ngn ng lp trnh no. Em chn ngn ng Visual C++ do kh nng ca n to giao din d dng hn C/C++. 4.3. Lu thut ton Gi s b nh tuyn m phng tm ng i vi ng i ngn nht qua cc tuyn gia node ngun v node ch. Cc trng s trn cc cnh l di ca tuyn thng tin t node ny n node kia.

60

Chng 4: Thc hin m phng

http://www.4tech.com.vn/

Bt u

Xc nh node ngun v ch nh V1 v V2

Thit lp V1 l T-node

Thit lp nhn ca T-node sang c nh, sau cp nht bng trng thi cc node ln cn. Xc nh node tm thi ni vi V1 m c trng s nh nht v thit lp thnh T-node NO T-node c phi l V2 YES

Da vo thng tin trong bng trng thi, lm nh th cho n khi ti node V1, dy cc node l ng i ngn nht

Kt thc

61

Chng 4: Thc hin m phng

http://www.4tech.com.vn/

Thut ton s thc hin tm nh u trong tp hp Q m c gi tr d[u] nh nht. nh ny c loi ra khi Q v c a vo tp S. Tp S cha mt bng cc nh to thnh mt trong nhng ng i ngn nht t s n node ngun t no . 1 function Dijkstra(G, w, s) 2 for each vertex v in V[G] 3 d[v] := infinity // Gn cc gi tr ban u 4 previous[v] := undefined 5 d[s] := 0 // Khong cch t s n s bng 0 6 S := empty set // Thit lp S l tp hp rng 7 Q := V[G] // Tp Q cha tt c cc node ca th 8 while Q is not an empty set 9 u := Extract_Min(Q) 10 S := S union {u} 11 for each edge (u,v) outgoing from u 12 if d[u] + w(u,v) < d[v] 13 d[v] := d[u] + w(u,v) 14 previous[v] := u 4.4. Kt qu m phng Thut ton Dijkstra tm ng i ngn nht t node ngun n node ch c thc hin nh sau: 1.Click vo biu tng THEM N ODE ly node ra nh sau:

62

Chng 4: Thc hin m phng

http://www.4tech.com.vn/

2.Click vo biu tng THEM CAN H ni cc cnh li vi nhau.

63

Chng 4: Thc hin m phng

http://www.4tech.com.vn/

3.Click vo biu tng DUON G N GAN N HAT thc hin tm ng ngn nht gia hai cp node bt k.

64

Chng 4: Thc hin m phng

http://www.4tech.com.vn/

4.Click OK nhn c kt qu.

65

Chng 4: Thc hin m phng

http://www.4tech.com.vn/

4.5. Kt lun chng. Ta thy c thut ton nh tuyn Dijkstra c ng dng hiu qu trong vic nh tuyn cc lightpath trong mng WDM tm c ng i ti u vi cc hm mc tiu (cost function) ca mng m ta c th p t cho n. Hm mc tiu ny ta c th theo tiu ch no ca mng nh l chi ph tuyn, lng lu lng, bng thng S p t ny thc hin bng cch t trng s trn cc tuyn l gi tr ca cc hm mc tiu trn. Sau qu trnh nh tuyn n cc node mng, cc node mng thc hin gn bc sng cho lightpath. Vic gn bc sng phi tho mn iu kin lin tc bc sng nu khng node mng phi s dng b chuyn i bc sng.

66

http://www.4tech.com.vn/

ti nh tuyn v gn bc sng trong mng quang WDM cho thy c vai tr quan trng ca nh tuyn v gn bc sng trong mng quang WDM, hiu c mt s gii thut nh tuyn v cc phng php gn bc sng cho cc lightpath trong mng quang. ng thi chng trnh m phng th hin qu trnh nh tuyn ca cc lightpath t node ngun n node ch c mt ng i ti u theo mt hm mc tiu no . Kt thc qu trnh nghin cu ti, em a ra mt s nhn xt nh sau: Chng trnh m phng thc hin nh tuyn vi mc ch tm ng i ti u t node ngun n node ch, y l ng i duy nht. Tuy vy, tng cng hiu nng mng th khng th n thun chn duy nht mt tuyn ti u m phi nh gi c cc tuyn cn li thc hin phn ti, trnh tnh trng mt tuyn hot ng ht cng sut trong khi c nhng tuyn kh thi cn ri. Sau khi thc hin nh tuyn cho lightpath, phi thc hin gn bc sng cho n. N u ton b node mng khng s dng b chuyn i bc sng th ton b cc tuyn trn ng i t ngun n ch ch c gn mt bc sng duy nht. Tuy nhin, ti nguyn s bc sng trn mi node mng c hn, iu ny lm xc sut tc nghn rt cao khi mt node mng khng cung cp bc sng rng buc t trc. V th, cc mng hin nay lun tm cch thc hin nh tuyn v gn bc sng sao cho t c ti u mng l gim xc sut tc nghn. N gy nay, ngi ta ang hng ti mng ton quang m mi cng vic x l u thc hin hon ton trong min quang. Mng ton quang ha hn s em li tc cao, gi thnh mng s c gim xung mt cch ng k. n c hon thnh trong thi gian hn ch, t nn mng cho vic nghin cu v pht trin sau ny, v th khng th trnh khi nhng thiu st. Hi vng trong thi gian ti vi kinh nghim thc tin, em s c gng hon thin hn ti ca mnh.

http://www.4tech.com.vn/

[1] N guyn c N gha- N guyn T Thnh, Ton Ri Rc, N h xut Bn i Hc Quc Gia H N i_2004 [2] http://www.2cool4u.ch/ [3] Senior, John.M, Optical fiber communications, Library of Congress Cataloging in Publication Data. [4] George N . Rouskas, Routing and Wavelength Assignment in Optical WDM N etworks, Department of Computer Science_2000. [5] Krishna M.Sivalingam, Suresh Subramaniam, Optical WDM N etworksPrinciples and Practice, Kluwer Academic Publishers_2000. [6] http://HowStuffWork/HowRoutingAlgorithmsWork [7] H thng thng tin quang/V tuyn, LG Information and Communication LTD (LGIC) [8] N guyn Duy N ht Vin, K thut chuyn mch trong mng din rng, i hc Bch Khoa N ng [9] Regis J. BUD Bates, Optical Switching and N etworking Handbook, McGrawHill Companies [10] http://en.wikipedia.org/wiki/Dijkstras algorithm [11] http://vi.wikipedia.org/wiki/ [12] Jun Zheng, Hussien T. Mousftah, Distributed lightpath control for wavelength-routed WDM network, University of Ottawa [13] Jin seek Choi, N ada Golmie, Francois Lapeyrere, Frederic Mouveaux and David Su, A functional Classification of Routing and Wavelength Assignment Shemes in DWDM networks: Static Case, N ational Institute of Standards and Technology, Gaithersburg, MD, USA

http://www.4tech.com.vn/

PH LC
Thc hin thm bin v thc hin m lnh sau: void CAlgorithmsView::OnAddN ode() { m_Dijkstra.StartAddN odes(); } void CAlgorithmsView::OnAddEdge() { m_Dijkstra.StartAddEdges(); } void CAlgorithmsView::OnShortestPath() { CShorthestPath dlg; if(dlg.DoModal()==IDOK) // { m_Dijkstra.ShortestPath(dlg.m_node1, dlg.m_node2); } } Thc hin v cc node v cc cnh bng m nh sau: class CGraph { public: long GetN rN odes(); CGraph(); virtual ~CGraph(); VTYPE_N ODE m_nodes; // dy cc node

http://www.4tech.com.vn/

VTYPE_EDGE m_edges; // dy cc cnh VTYPE_N ODE_P d; // array of longs that contain // the shortest path at every step VTYPE_N ODE_P pi; // array of longs that contain // the predecessor of each node for the shortest path }; // // // // // // // // // // // // // // class CN ode { public: CN ode Copy(); double m_cost; // gia tri trong so long m_N odeN r; // so node POIN T m_p; // diem do hoa cho node CN ode(); virtual ~CN ode(); }; // // // // // // // // // // // class CEdge { public: bool m_red; // ve duong di ngan nhat // (neu mot canh la mot phan cua duong di ngan nhat thi no duoc ve mau do) double m_cost; // trong so cua canh (lay gia tri ngau nhien tu 0-9) long m_secondN ode; long m_firstN ode; POIN T m_secondPct; POIN T m_firstPct; CEdge();

http://www.4tech.com.vn/

virtual ~CEdge(); }; // ve canh bat dau tu node dau den node cuoi Thut ton Dijkstra: // The Dijkstra's algorithm STDMETHODIMP CDijkstra::ShortestPath(long node1, long node2) { ReleaseGraph(); InitializeSource(g, g.m_nodes[node1-1]); // Thiet lap S ve rong VTYPE_N ODE S; // Dat cac node vao Q VTYPE_N ODE Q; VTYPE_N ODE::iterator kl; for(kl=g.m_nodes.begin(); kl<g.m_nodes.end(); kl++) { CN ode node = (*kl).Copy(); Q.push_back(node); } // Algorithm while(Q.size()) { CN ode nod = ExtractMin(Q); // tach node tim duoc ra khoi tap Q // dua node nay vao tapS S.push_back(nod); VTYPE_N ODE::iterator kl; for(kl=g.m_nodes.begin(); kl<g.m_nodes.end(); kl++) { if(ExistEdge(nod, (*kl)))

http://www.4tech.com.vn/

{ bool gasit = false; VTYPE_N ODE::iterator kll; for(kll=Q.begin(); kll<Q.end(); kll++) { if((*kll).m_N odeN r == (*kl).m_N odeN r) gasit = true; } if(gasit) Relax(nod, (*kl), GetEdgeVal(nod, (*kl))); } } } RefreshDone(node1, node2); return S_OK; } Lnh thc hin v: // Draw HDC dc = ::GetDC(m_hWnd); HPEN pen=CreatePen(PS_SOLID,0,RGB(0,0,0)); HPEN penred=CreatePen(PS_SOLID,2,RGB(255,0,0)); HBRUSH brush=CreateSolidBrush(RGB(0,0,0)); HPEN oldpen; HPEN oldbrush; oldpen=(HPEN )SelectObject(dc,pen); RECT rc; ::GetClientRect(m_hWndCD, &rc); Rectangle(dc, rc.left, rc.top, rc.right, rc.bottom);

http://www.4tech.com.vn/

HFON T OldFont = (HFON T)::SelectObject(dc, m_lmfont); long nr = 0; VTYPE_N ODE::iterator kl; for(kl=g.m_nodes.begin(); kl<g.m_nodes.end(); kl++) { char s[5]; ltoa((*kl).m_N odeN r, s, 10);; Ellipse(dc, (*kl).m_p.x-10, (*kl).m_p.y-10, (*kl).m_p.x+10, (*kl).m_p.y+10); if(nr<9) TextOut(dc, (*kl).m_p.x-5, (*kl).m_p.y-8, s, 1); else TextOut(dc, (*kl).m_p.x-8, (*kl).m_p.y-8, s, 2); nr++; } oldbrush=(HPEN )SelectObject(dc,brush); VTYPE_EDGE::iterator kll; for(kll=g.m_edges.begin(); kll<g.m_edges.end(); kll++) { HPEN temp; if((*kll).m_red) temp=(HPEN )SelectObject(dc,penred); MoveToEx(dc, (*kll).m_firstPct.x, (*kll).m_firstPct.y, N ULL); LineTo(dc, (*kll).m_secondPct.x, (*kll).m_secondPct.y); Ellipse(dc, (*kll).m_secondPct.x-5, (*kll).m_secondPct.y-5, (*kll).m_secondPct.x+5, (*kll).m_secondPct.y+5);

http://www.4tech.com.vn/

POIN T po; po.x = ((*kll).m_firstPct.x+(*kll).m_secondPct.x)/2; po.y = ((*kll).m_firstPct.y+(*kll).m_secondPct.y)/2; char s[5]; ltoa((*kll).m_cost, s, 10); TextOut(dc, po.x, po.y, s, 1); if((*kll).m_red) SelectObject(dc,temp); } ::SelectObject(dc, OldFont); SelectObject(dc,oldpen); SelectObject(dc,oldbrush); DeleteObject(pen); DeleteObject(brush); ::ReleaseDC(m_hWnd, dc); } } void CDijkstra::ReleaseGraph() { g.d.clear(); g.pi.clear(); VTYPE_EDGE::iterator kll; for(kll=g.m_edges.begin(); kll<g.m_edges.end(); kll++) { (*kll).m_red = false; } Refresh(); }