BQ GIAO DVC DAO T30
TRIreNG DAI HQC THANG LONG
-o0o--
CHUYEN DE TOT NGHIEP
DINH TUYEN TRONG MANG CAM
BIEN VA SO SANH BANG MO PIING
Gil° viOn htrang din : TS.Hoing Tryng Minh
Sinh vien tittle hi@ : Bei Tan Tung
MA sinh visa : Al2776
Chuyen ngInh : Mgng may finis - Viin thong
HA NQI - 2014
L61 NOI DAU
Ngay nay nhb ce nhOng lien be nhanh ch6ng trong khoa hoc vi ceding nghe sir
phat trier nhting mpg bao gem cic cam bien gia thinh re, tieu thu ft nang luting
v
103 trang |
Chia sẻ: huong20 | Ngày: 07/01/2022 | Lượt xem: 413 | Lượt tải: 0
Tóm tắt tài liệu Chuyên đề Định tuyến trong mạch cảm biến và so sánh bằng mô phỏng, để xem tài liệu hoàn chỉnh bạn click vào nút DOWNLOAD ở trên
vi da chtic nang di nhen duqc nhOng sir chit ding ke .Hien nay ngubi to dang top
twig trien kbai the mang cam bien de ap dung vio tong cuOc song hang ngiy. D6 11
cac vue ye y te, quan sir, m8i trubng, giao thong... Trong met Wang lai !thong xa,
cac img ding cos mpg cam bien se trer thinh met phAn !thong the thieu trong cuOc
song con ngtroi nett chting to phat huy dtrqc het cac diem manh ma khan phei mmig
Ili° ding c6 duqc nhu mang cam bien.
Tuy nhien mang cam (mg dang phai dOi met WA nit nhieu thach thirc, met trong
nhOng thich thirc len nhit d6 II ngute Ming luting bj gith han va Ichong the mp
nay rat nhieu nhi nghien cfru dang tep trung vio viec cii thien khit nang stl
dung hieu quit rang lucmg ci a mpg cam bien trong tung we khic nhau.Em de
thn hieu ve met s6 giao thtic djnh tuyin coo mpg cam bits nhu LEACH, GAF gift')
citi thien nhttng nhtrqc diem mitt the giao thitc truyen thong ring cao thlri gian sting
cue mung. Trong nOi dung tai lieu My em se giai thieu tong quan ve man cam bien
Idlong day (Wireless Sensor Network). Giao thirc vi cac phuong phip djnh My&
trong mang vai nhang tru va nhuqc diem de c6 the hieu re hon ve mpg cam bien dua
ra su ltra chon sing su6t pha hqp vai (mg dung cult mang de dirge tOi uu nat.
Di co the holm thinh dirge chuyen di tOt nghiep My, em da dirge hoc hat
nhftng kien thfrc qui bau tfr the they, c8 elm cua Trubng Dpi hoc Mang Long trong
suOt nam WW1 dal hoc .Em v6 ding biet on sir day d6, chi bito ten tinh cue cac they,
cac co trong thbi gian hoc Sp nay.
Em xin bity t6 long biet an ten TS.Hoang Trong Minh, they di ten tinh chi &to
vi djnh huOng cho em nghien cum di di nay.Thily di cho em nheng lbi lchuyen quan
trong trong suOt qua trinh hoin thenh chuyen di.
Cu6i cling, em xin cam an gia dinh vi ban be Von too dieu Iden thuon lqi, dOng
vien vi giitp der em trong suet thbi gian hoc tap, ming nhu qui trinh nghien ant, hoin
thinh chuyen di My.
Hi nOi, thing 12 nam 2013
Sinh ten
Bid Tien Tung
TOM TAT DO AN
Ngay nay oh& lien bO vtrqt bac trong khoa hqc va ceing nghe, mang cam bien a
fro thanh de tai nghien ciru !tong bong vi nhan duqc sq den b0 ding ke tong yid nam
qua.Mang cam bien la mang v8 tuyen bao g6m cac thiet N cam Men duqc phan b6 mOt
each ngiu nhien trong khong gian, nhim quan sat the hien twang vat ly , hay dieu hen
mai throng nhu nhiet dO, am thanh, star chin dung, ap suit, su chuyen dung, 8 nhilm
the vi tri 'chic nhau.
Su phat trien caa mpg cam bien ma diu la cac ling dung tong quan dOi vi du
nhu glum sat chi& tnemg. Tuy nhien bay gib mang cam bien con duqc sir dung trong
nhieu ltnh vuc din dung bao gam: quan sat m8i trubng sang, cham s6c sue khee, nha
to dOng hay dieu lchitin giao thong.
Cac con cam bien la cac thiet bi dien tfr nh6, thong thubng duce trang bj b0 thu
phut ve tuyen hoc cac thiet bi lchting day lchac, mOt b0 vi xir ly Who va mOt nguan
nAng lugng. Cac con cam bien nay ce lchi !tang thu thap, xt) lt va truyen thong thong
tin den cac not khac va ra the gith ben ngoai.
Mang cam Men la mOt linh we nit siu rung, chuyen de My se gieri thieu mOt
each khai quit nhit ve cac dac diem cart mpg cam lien va mOt so giao thirc dinh
tuyen trong mang cam bien.
DI in nAy gim co 4 diming:
Chuang 1: T6ng quan ye mang cam bien. Chuang My trinh bay nhttng khai
niem chung Whit ve WSN va dua ra caftu trim cos mang cam bien. D6ng thbi cling neu
ra cac img dung trong nhieu anh vuc cuOc song.
Chuang 2: M8 hinh !den trim mang cam bien. Cu the la tang vat 19, tang lien ket
clit lieu va cac giao thire dac trung ctia mang cam bien tong d6 c6 hai giao thirc dac
trung d6 la : (tong bO thEri gian va giao thirc vi tri.Chwmg nay cling la den de de di vao
dm hieu cite giao thin djnh tuyen trong lop mang b chuong 3.
Chuang 3: Dinh tuyen trong mpg cam lien. Chuang My phan loci cac giao
thirc dinh tuyen ra lam ba loci : trung tam dit lieu, phan cip vi djnh tuyin dua vao vi
tri dja bier la nghien elm hq cac giao thirc dinh tuyen LEACH.
Chuang 4:M8 phong va so simh 3 giao thirc djnh thy& Leach, Leach-C, Stat-
clus.Sau khi m8 phi:mg se cho ra ket qua duqc bleu dien bing d6 thi va Si cling la
nhon xet va so sash ye 3 yin de de 11 Wing luang lieu thu , theri gian sang va luang g6i
tin eita mang d6i vii tang giao thirc.
MVC LVC
CHITONG 1. TONG QUAN MANG CAM BltN KHONG DAY 1
1.1 Gioi thieu 1
1.2 06 Ink mpg cum bien 2
1.2.1 Clic yiu to anh httimg din cciu Ink mgng cam Min 2
1.2.2 Girl thieu yi nut cam biln• 3
1.2.3 Ddc diem ctia aiu &tic mgng cam 7
1.2.4 Hai cdu tnic dOc trong ciza mgng cam bien 10
1.3 l'ing ding 12
1.11 Ong dung trong qua dot 13
1.12 Ong dung trong m6i :meow 14
1.13 Ong dung trong chdm soc sec Moe 16
1.3.4 Tv dOng hod gkz din); va dien ddn dung 16
1.3.5 Gicim sat vd dieu khiin cOng nghiep 18
1.4 Ket luen 19
CHMING 2. KAN TRUC MO HINH PHAN LOP CUA MANG CAM BItN120
2.1 Kien frac giao thitc ming 20
2.1.1 lip wit 15, 21
2.1.2 Lop lien kit di, lieu viz thd tuc thorn nhdp mot Throng 25
2.1.3 Thu tyc canh tranh 28
2.1.4 Thu tyc 'cep lich 29
2.1.5 Chu& thd tuc thiim nhap mei trttimg IEEE 802.15.4 31
2.2 Giao than diing thbi gian 34
2.2.1 Ddng ha ccic nut cam Min ye sit chin!: vise 36
2.2.2 Diing b¢ thiti gian trong mgng cam Nan 37
2.2.3 Giao thtiv clang bO' girth bin nh(m yit ben ph& 38
22.4 Giao thtiv eldng b() giily bin Wm vit bin nhdn 44
2.3 Giao thin vj trf 48
2.3.1 Dinh vj Ara vao mdc co then 48
2.3.2 Dinh vi dya vao vj tri tucmg doi 49
2.4 Ket 50
CHUONG 3. DfNH TUYEN TRONG MANG WSN 51
3.1 then thieu 51
3.2 Phiin loui vi so sfinh clic giao thirc dint( tuyen 53
3.3 Giao thirc dinh tuyen ngang hang 56
3.4 Giao that trung tam de lieu 56
3.4.1 Flooding va Gossiping 56
14.2 Giao that thitung lityng SPIN 57
14.3 Giao that gein tuyin lien tie MR (Sequential Assignment Routing) 59
3.4.4 Giao that khuich tan tritc trip (Dirrected Diffusion) 60
3.4.5 Giao thus chuyin dip gia tei thilu (MCFA) 60
3.5 Nhem giao thik Olin cap 60
15.1 Giao thac dinh tuyen plan cdp twang thich ndng ltivng thap 60
15.2 Leach-C: thanh lap cum tram cc sa 69
3.5.3 Leach-F: nham co dinh, lwin phien cluster-head 70
3.5.4 Giao that stat-cluster 73
3.5.5 Giao that Giao that nguang ring hem hieu qua 73
3.5.6 PEGASIS (Power-Efficient Gathering in Sensor Information Systems) 73
3.6 Giao thirc dua ten vi tri 75
3.6.1 GO thuat chink xac theo dja ly (GAF : Geographic Adaptive Fidelity) 75
16.2 GEAR (Geographic and Energy-Aware Routing) 77
163 Kit 114n 78
CHU'ONG 4. M6 PRONG VA SO SANH GIAO Tait DJNH TUYEN
LEACH, LEACH-C, STAT-CLUS 79
4.1 T6ng quan ve NS2 79
4.1.1 Giai thieu vi NS2 79
4.1.2 Co c6u to char NS2 79
4.2 Gil thiet m8 phong 82
4.2.1 Gici 82
4.2.2 aiu lenh chgy mo' phong : 83
4.3 Ket quit m6 phong vi nhO 'cot 86
4.3.1 Thai gian sting cia ccic nodes 86
4.3.2 Ming hrong 87
4.3.3 Diss lieu 88
4.14 Khi tang mar ndng hem len 11 89
4.15 Khi thay deli tpa (16 tram cc so 90
4.4 Isllgin xet 92
CHUONG 5. KET LUAN VA. DV MEN TRONG TUONG LAI 93
5.1 Thu duqc ket qua 93
5.2 Dv kien trong tiremg lai 93
DANH SACH BANG BLEU VA HiNH VE
Hinh 1.1.Ciu trim mang elm bide 3
Hinh 1.2.Ciu tao net cam biEn 4
Binh 1.3.Nfit mpg ththc hu Mica Mote 5
Hinh 1.4.Net mang EYES 5
Hinh 1.5.Ciu trim phing cea mang cam bian 10
Hinh 1.6.Ciu trim ting cea mang cam lien 11
Hinh 1.7.1:Ing dpg trong quill dui 14
Hinh 1.8.1:ing dung theo dei sv di chuyin dm dOng 4 15
Hinh 1.9.1Ung dung trong moi trutmg 16
Hinh 1.10.1Tng dung trong chith s6c sec khoe 16
Hinh 2.1.Kien frac giao thirc mpg dm bien 20
Fah 2.2.Khea djch bien de ASK 23
Hinh 2.3.Khea djch pha PSK 23
Hinh 2.4.Khea djch tin s6 FSK 24
Hinh 2.5.M8 hinh vimg zing det gifts chc net mang 25
Hinh 2.6.The tic LEACH 29
Hinh 2.7.The tic TRAMA 31
Hinh 2.8.Ciu tnic si8u khung 32
Hinh 2.9.Xlc djnh g6c den Cult am thanh 6 xa b?ri mOt day sensor 35
Hinh 2.10.D6ng bO ben phat/been nhon vet ben nhon/bOn nhen 38
Hinh 2.11.Hoat ding dm viec ding bO bon phatiben nhin 40
Hinh 2.12.LTS multihop phin b6 43
Hinh 2.13.Vi du ve RBS 45
Hinh 2.14.Chuyen dap poi du lieu vh chuyen di thin then gian 47
Hinh 3.1.Phan lohi giao thin djnh tuyen trong WSN 55
Hinh 3.2.Phin lohi va so sanh chc giao thirc djnh tuyin trong man WSN 56
Hinh 3.3.Truyen g6i trong Flooding 57
Hlnh 3.4.Ba tin !lieu bit tay dm SPIN 58
Hinh 3.5.Hoat dung ctia SPIN 58
Hinh 3.6.M8 hinh Leach 61
Hinh 3.7.Chc giao thee Leach cho chc mpg ltrei 62
Hinh 3.8.Thoi gian hien thj host dung cua Leach 63
Hinh 3.9. Ltru d6 qui trInh thiet lap 64
Hinh 3.10.Qu6 trinh hinh thAnh hai nh6m khic nhau trong yang LEACH 66
Hinh 3.11.Ltru d6 giai down On dinh 67
Hinh 3.12.Tucmg tac gifts nhieu cum. 68
Hinh 3.13.Giai doan chi dat cua Leach-C 70
Hinh 3.14.Can thiep cua nhem khic 71
HInh 3.15.The hien dtrqc clang ke cac Whom can thiep khi giao tiep vai cac cluster-
head 71
Hinh 3.16.Vi du ve lueri ito tong GAF 76
Hinh 3.17.Chuyin flip dial, de quy trong GEAR 78
Hinh 4.1.M8 phong NS, Icheri tao va thiet lap 79
Hinh 4.2.Lueng cac sir hen cho file tcl chay trong NS 81
Hinh 4.3.Ca ciu t6 chirc the muc NS 82
Hinh 4.4.Topo mang 100 node m6 phong 83
HInh 4.5.Theri gian song cua the nodes d6i yeti mai giao thirc 86
Hinh 4.6.NAng luqng dui mang d6i veri mai giao thirc 87
Hinh 4.7.D0 lieu truyen colt mang 461 vii mai giao them 88
DANK SACH CAC Ti! VIET TAT
WSN Wireless Sensor Network
ID Identification
ADC Analog to Digital Converter
RF Radio frequency
MAC Media Access Control
UTC Coordinated Universal Time
GPS Global Positioning System
LTS Lightweight time synchronization protocol
RBS Reference broadcast synchronization).
RSS Received signal strength
TDOA Time of arrival
AOA Angle of arrival
TDOA Time difference of arrival
RSSI Receiver Signal Strength Indicator
PLF Perceptive localization framework
TDMA Time Division Multiple Access
CDMA Code Division Multiple Access
ARP Address Resolution Protocol
BS BaseStation
Del Hnr Th5ng I.nng Al 7776 Tian Ting
CHI O'NG 1. TONG QUAN MANG CAM BIEN KEIONG DAY
1.1 G161 thieu
Trong nhitng nom gin ctay, rit nhieu mang cam bien khong day da vi dang duqc
phit then vi then khai cho nhieu the irng dyng khic nhau nhu: theo d8i sly thay doi
cea mei trubng, !chi Mu, giim sit cic met ton van stir, phat hien vi do than viec tin
cong bang hat nhan' , sinh hoc vi hoi hoc, chuin doin sly hang hoc cita may mac, thief
N, theo diu vi giim sit cic bic sy, benh nhan cling nhu quitn 19 thu6c trong the benh
vien,theo dai vi dieu lchien giao thong, cic phucrng lien xe c0...
Han nita vii sty tien be c8ng nghe gin day vi hei ty cea hg thong cic cong nghe
nhu Icy thu$t vi dien tu, cong nghe nano, giao flip khong day, cong nghe mach tich
hqp, vi mach phin cam hien, xir 19 vi tinh town tin hieu...da tao ra nhang con cam hien
c6 kich think nhe, da chtic !tang, gii thimh thip, cong suit lieu thy thip, layn tang lchi
nang img dyng rOng rai dui mang cam hien khong day.
MOt mang cam hien !thong day li met mang bao gem nhieu mit cam hien nhe c6
gii thimh thip, vi tieu thy Wing lucmg it, giao dip thong qua the ket n6i !thong day, c6
nhiem vy cam hien, do doe, tinh win nhiim myc dick thu th$p, tip trung dit lieu a dua
ra the quyet djnh town cyc ve mei trueng ty nhien .
Nherng not cam bien nhe bet My bao gom cic thinh
Cic 130 vi zit 19 rat nhe, b0 nhe glen han,b0 phin cam bien, be thu phit khong
day, nguan nuoi. Kich thu6c cua cic con cam bien nay thay dei tir to nhu hap giiy cho
den nhe nhu hat byi, thy thuetc vio tang irng ding.
Khi nghien cuu ye mang cam bien Wag day, met trong nhUng dic diem quan
tong vi then chat de li th&i gian song cea the con cam lien hay chinh la sly gi6i han
ve nitng luqng cea chting. Cic nut cam bien nay you ciu lieu thy cong suit thip. Cic
nit cam bien hoot dOng c6 gi6i han vi n6i chung la khong the thay the duqc ngu6n
cung cip. Do de, trong khi mang truyen thong tap trung vio dat duqc cic djch vy chit
luqng cao, thl the giao thirc mang cam bien phii tap trung diu lien vio bio town ding
suit.
Mang cam hien c6 met so dic diem sau:
+ CO 'chi Wing tlr t6 chirc.
+ Yeu ciu ft hoac khong c6 sy can thiep Oa con ngu&i.
+ Truyen thong ves tuyen vi truyen da buerc.
+ Trion khai so luqng lan tren pham vi rOng.
Chuyen de tat nghiep 1
tai HQr Thing I.nng Al777F Tign Time
+ Nang lugng, b0 nh6, !chi Wing xir ly c6 ham
+ Cau hlnh thin:mg xuyen thay d8i do m8i truirng hoc nut mpg.
+ Quang ba trong phi= vi hgp va djnh tuyen multihop.
Cac gi6i han ve mat nitng lugng, cong suit phat, b0 nh6 va cong suit tinh toan.
Chinh nhfing dac firth nay da dua ra nhftng chien luqc mei va nhang yeu ciu thay d6i
trong thiet Ice mpg cam bien.
1.2 C.Iu trfic mang cam bign
1.2.1 Cdc yiu to" dnh hurting din cdu trac mom cdm bun
Cac ciu trec hien nay cho mang Internet va man ad hoc khong day lchting
dimg duqcho mang cam hien kh8ng day, do mOt s6 15 , do sau:
➢ S6 lugng cac nut cam bien trong mang cam hien c6 the ion gip nhieu lin s6
lugng nut trong mpg ad hoc.
➢ Cac nut cam bien a bi 16i.
➢ Ciu tic mpg cam bien thay d6i kha thtrimg xuyen.
➢ Cac nut cam bien chti yeu sir dtmg truyen thong kieu quang ba, trong khi hiu
het cac mpg ad hoc diu dtra tren viec truyen diem-diem.
➢ Cac nut cam bien bj gi6i han ye riling lugng, Icha riling firth town va b0 nh6.
➢ Cac nut cam hien c6 the khong c6 so nhon long town ciu (globalidentification)
(ID) vl chting c6 mOt so luqng len mio dau va mOt so lugng len cac nut cam
'nen.
Do v$y, ciu tnic !twig moi se:
➢ Ket hop yin de nimg lugng vi !chit Wing (firth tuyen.
➢ Tich hop da lieu va giao thirc
➢ Truyen nang lugng hieu qua qua cac phtrong lien khong day.
➢ Chia se nhiem vo gran cac nut lan c$n.
➢ Cac nut cam lien duqc phen b6 trong mOt sensor field nhu hinh (1.1). MOi mOt
nut cam hien ce khit fling thu dial) der lieu vi dinh tuyen lei den cac sink.
Chuyen di tot nghiep 2
Plait lane Thing I.nng A17776 Tien Wing
I Sink t
o Mit dm bitm
* SIddin
0 Treeing dm ban
Ngizbi skim
Hinh 1. Lau Thic ?ming cam biin
Dit lieu duqc djnh tuyen 13i den cat sink b?ri met cAu trim da diem nhu hinh ve
tren. Cac sink c6 the giao tiep van cac nut quitn It nhiem At (task manager node) qua
mpg Internet hoac ye tinh.
Sink 11 met thvc the, tui d6 th8ng tin duqc yeu citu . Sink c6 the la thvc the ben
tong mpg (la met nth cam bien ) hoac ngoiti ming. Thvc the ngoli mpg ce the 11
met thiet bj thvc sv vi dv nhu may tinh zilch tay ma tuong tac vai mpg cam bien,
hoac cling don than chi la met gateway ma n6i Arai mang khitc lan hon nhu Internet
nai ma cac you cAu thvc sv doi yea cac th8ng tin thy tie met vai nut cam bien trong
mung.
1.2.2 Glerri thitu ye wit aim biin:
a.Ciu to cda nit slim Min nhw mu:
Mai not cam bien ducrc cau thinh bei 4 thinh phAn co ban nhu ar hinh (1 2)•
don vj cam bien (a sensing unit), don vi zu ly (a processing unit), don vj truyin dan (a
transceiver unit) va be nguOn (a power unit). Ngoiti ra c6 the c6 them nhUng thilnh
phAn khic thy thuOc vio tang ling dung nhu 11 he thong djnh vj (location finding
system), bO phat ngu6n (power generator) va bO Oen di dOng (mobilizer).
Chuyen de tot nghiep 3
nal 14nr Thang i.nng Al 7776 —Phi Tian 'fling
HO thief dinh nj BO Phan di 4+14
Don si rim biOn
Dorn sit 13;. Don vi truyen dan
lit it
rim biOn ADC Bothuphit
Luti
Bo phat nmOn
B+ gain
Minh 1.2.Cau tgo nut cam bien
Cac don vj earn bien (sensing units) bao g6m cam bien va 1,0 chuyen doi tuong
tv-s6. Dva tren nhftng hien tuqng quan sit duqc, tin hieu Wang tv Mo ra bfri sensor
duqc chuyin sang tin hieu so beng b0 ADC, sau d6 duqc dua vao b0 xer ly. Dan vi xir
1S, thutmg duqc ket hqp v6i b0 luu trft nhe (storage unit), quyet djnh cac thit tuc lam
cho cac net ket hqp yeti nhau de thvc hien the nhiem vu djnh sAn. Phin thu phat v8
tuyen ket noSi cac nut do mang.
MOt trong s6 the phin quan tong that ciut mOt nit mang cam lien la bet nguon.
Cac b0 ngu6n thuerng duqc h6 try boi the be phOn loc nhu la to bao Wing luqng mjtt
trai. Ngoai ra cling c6 nhftng thenh phin phu lchic phv thuOc vao tong ling dung. Hiu
het cac ki °mot djnh tuyen va the nhiem va cam bien cis mang deu yeu cau c6 do
chinh the cao ye vj tri. Cac be phi') di dOng d8i lic can phiti djch chuyen cac nut cam
hien khi can thiet de thvc hien the nhiem vu di An djnh. Tit ca nhftng thinh phin thy
can phai phft hqp v6i ldch 0 tang module. Ngoai kich cdr ra cac nut cam hien con mOt
s6 rang buOc nghiem ngat khac, nhu la phai lieu thu rat it Wing lucmg, hops dOng 6 mot
dO cao, c6 gia thanh thip, c6 the qr hot dOng, va thich bien v6i sv hien d6i cia mai
tnremg.
Chuyen de tat nghiep 4
Dei 1-hr Thing I.nng Al 7778 -Rid Tan Wing_
b. MOt so lopi nut mpg:
Hinh 1.3.Ntit "King thuac hp Mica Mote
Ho nut inking nay nom trong clir an nghien ciru Mkt trutrng dai hoc california tCY
co& nem 1990, sir dung vi xir 19 cita Anne!, su dung he ditu hanh TinyOS.
Giao di.
kit cim
tart
Ames nvei
Amen da
'in
ara
SO*
Des led
Hinh 1.4.Ntit ngng EYES
Nig mpg nay phitt trien tai mOt to chim cita chau au trong dv an s* dung nang
Wong hieu quit cita mang cam hien - Energy efficient sensor network (EYES). Nit
mang sir dung vi dieu lchien MSP 430 clia Texas, cd khe riling ket nei them cam hien.
Nit mpg nay sir dung vi dieu khien CC1010 cita chipcon, tich hop thiet N troy& din
vo toy& vi cam bien nhiet do
c. Vi xtr 19
Vi xir lt la thiet bj quan bong nhit trong nut mang cam hien khong day, thqc hien
thu thap dit lieu HI cac not, sau de xt1 lt truck khi girl di, va nhan da . lieu tar cac nut
khic. Nguyen nhan nd ducat lira chon trong cac he theng nhang la mem deo trong ket
neli yeti cac thiet bj lchic nhu thiet bj cam hien, tieu thy Jiang ltrqng thip nhir lchi nang
chuyen sang the do nge khi de chi co mOt phlin caa vi dieu lchien hoot dOng, hon nita
Chuyen de tot nghiep 5
Dal I-Inr Thing I.nng Al 777h -Rid Tan Wing
thutmg c6 b0 nh6 tich hqp ngay ten b0 vi xir 19. MOt dtic diem rat duqc ngutri lop
trinh ye'u thich la khi tiling lop trinh bang ng6n net bOc cao (C, C++).
B6i v$y khi xay dung nut mung viec xem zit hieu suet cim vi xir 1St, hieu qua nang
Itrqng va gia thanh la rat quan trcmg.
d. Bi) oh&
Dirge sir dung de km tit de lieu thu tt7 cac nut cam Bien, hoc goi de lieu tir the
nut khae, ce 2 loci kien true b0 nh6 11: kien true havard va ld'en true von newman,
diem khic nhau ells 2 kien true nay la trong Id& true havard thi by nh6 der lieu va
chuong trinh tach biet nhau khi de de lieu thutmg dirge hira trong RAM can chuong
frith dtrqc chira trong ROM hotic b0 nhe FLASH, con trong kien true von newman thi
de lieu va chuong trinh dirge km cling v6i nhau, thin:mg la tren RAM, nhugc diem dm
n6 la dit lieu se bj mitt khi tit ngu6n, bOi vtiy chuong trinh hottc he dieu himh thuang
duqc luu tra ten ROM, EEPROM, hoc b0 nh6 flash ( gin tuang to nhu EEPROM).
Yeu eau kich thuOc b0 nh6 va Wing lugng lieu thu tuang ling vOi yeu eau ye di lieu
cua ling dung eM nut mpg.
e. Thiit bj giao dip
La thiet bj duge sir dung de trao d6i de lieu gifts cac nut don v6i nhau, trong d6
moi true:mg kitting day 11 duqc ua dung hcrn ca, do co the la song vo tuyen, truyen
thong quang, song sieu am, al trutmg cling duct sir dung trong mOt vai ling dung dtIc
biet. Trong d6 s6ng vo tuyen cung Dip dii thong 16n voi the dO di lieu cao a pith hqp
nhit cho hau het cac ling dung cim mpg thong day. Trong dO cac nut yeu eau ca chirc
nang nthim va truyen de lieu (dieu chi, gill dieu che, lchuech dui, lqc, trOn ...) sau de
chuyen luting bit, byte ho(te khung thinh song vo tuyen, thong thuong 2 thiet bj nay
thubng dirge kit hqp thinh mOt thiet bj duy nhat, bei vOy thutrng thi tai mOt thai diem
thong the thtrc hien dring then vita truyen vire nhOn de lieu, ma truyen va nh#n se dirge
luan phien nhau dirge dieu Ichien bOi he dieu himh nhong.
Khi lira chqn thiet bi truyen nhan can Itru y viii dtIc diem sau:
• rding phuc vu cho 16p ten (MAC), cho phep lop nay dieu !chi& goi
de lieu
✓ Tiet hem rding lugng vi sir dung nang lugng hieu quit do Ming lugng
tieu thu nhieu nhitt tong nut mong la do viec truyen nh3n vo tuyen.
✓ Tan s6 s6ng mang vi da kenh truyin tong tnty&t nhen phii phu hqp vei
yeu cau eM ling dung.
Chuyen d tot nghtep
Del Hey Thing I.nng Al 77Th -Rill Tian Wing
✓ Ric do da lieu Wang Ong v6i tin s6 song mang v8 bang tin cling v6i
viec dieu the va ma hOtt du lieu, tOc dO nay cO the thay d6i bang dieu the
holtc thay d6i toe dO ctia ky tv.
✓ Dieu the va ma hed
f. Cam Min
CO rat nhieu loai cam bien, tity vao loci (mg dyng tong mkutg cam bien ma ta ceo
cfic cam bien twang ling, that:mg la dva vito kieu host dOng dm cam bien, tich eve- thy
dOng, pham vi giam sat ... /tang Itrong tieu thy, gia thanh va kich thuerc. Thuerng thi
viec lira chyn cam hien Ichong phtic tap nhu b0 nh6 va vi air lt.
g. Nguen nuoi
Lit thitnh phan cot yeu cua mang cam bien, tong de 2 van de can quan tam li 'chi
Wing luu ter vi cung cap nang lugng , va Icha ruing thay the ngu6n.Thuting thi nguOn
day thuting li pin, vi !chi rang thay the tong net mpg la kh8ng the do dja hinh hien
khai va se nut mang len, do v$y phiti chqn nguem on djnh co lcha rang host dOng phi
hqp v&i ye'u cau cua ling dung vi m8i trubng host dOng.
h. Phin mom
He dieu hanh nhimg, dieu Ichien vi bio ve truy cop tai nguyen vi quan lt cho phep
phep ngtrei dimg cling nhu h8 trq thi kinh xir IY vi giao tiep gifta citc qui trinh. Tuy
nhien chirc Ming chit yeu la thi hinh lenh, bat vay he thong Ichong you cau quit nhieu
tai nguyen de h8 trq nhu met he dieu hitnh holm thien.
Han nfta he dieu hinh cho mpg cam bien khong day con c6 the h8 trq nhang tay
chon cho he thong, then hinh la quan ly su dung riling Itremg hieu qui, quan ly vi dieu
Ichien the thanh phan ngosi vi: cam bien, thiet bj vo tuyen, djnh that Bei v$y you cau
cho by dieu hanh cho mpg nhimg la caw trOc don gian vi ho trq quitn 11 nang luqng
ma Ichang ten nhieu tai nguyen he thong nhu b0 nhe vi thin gian xir
1.2.3 DOc diem cilia cdu franc myng aimblew
Nhu tren ta di biet 4c diem dm mpg cam bien la bao gOm met s6 limn len
cic nut cam bien, cac net cam bien c6 giOi hsn vi rang buec ve tai nguyen biet lit
Ming lucmg rat Wait khe. Do do, du true mpg mei co dac diem rat khac v6i cic mpg
truyen thong. Sau day ta se phan tich met s6 4c diem not Wit tong mpg cam bien
nhu sau:
Chuyen tdt nghiOp 7
Hai Hor Thing Long Al 777A -MI Tan Thng
• IChi Wing chju 161 (fault tolerance):
MOt s6 cic nut cim bien c6 the Wong hoot dOng era do thieu ning lucmg, do
nhftng hu h6ng vet 19 hok do inh huing cia m8i truting. Khi nAng chju 18i the hien a
viec mong van hoot dOng blnh thuing, duy tri nhftng chic nAng mia no ngay ci khi
mot so nut mong khong hoot dOng.
• Khi nAng me rOng:
Khi nghien cuu met hien tuong, s6 Wong cic nut cam bien duqc then khai ce the
den hang tram nghln nut, phi thuk vio ding img dong con so nay c6 the vuqt qui
hang trieu. Do d6 cau frac mpg mai phii c6 khi Wing ma rOng de c6 thE lim viec vii
s6 lugng 1&n cic nut nay.
• Gii thrinh sin xuat :
Vi cic numg cam bien bao gOm met s6 Itrog 16n cic nut cim bien nen chi phi con
m6i nut rat quan Mpg trong viec dieu chinh chi phi cirri toin mong. Neu chi phi coca
toin Truing dat han viec then khai sensor theo kieu truyen th6ng, nhu vey mong Ichong
co gii thinh hqp lt. Do voy, chi phi cia m8i nut cam bien phii gift 6 mire thap.
• Ring butjc ve phan cung :
VI s6 lucmg cic nut trong mpg rat nhieu nen the nut cam bien can phii c6 cic
ring buOc ve phan cung nhu sau : Kich tuck phii nhi, tieu the nth% lucmg thap, c6
khi nang hoot d'Ong 6 nhftng nol c6 mot dO cao, chi phi sin xuat thip, c6 khi ning to
tri vi hoot dOng !thong can c6 ngutri kiem soar, thich nghi v6i mei truing.
• Mai throng hoot dung:
Cic nit cim bien duqc thiet lip day dk, rat gin hok troc tiep ben trong cic hien
Prang de quan sit. Vi the, cherig thuang lim viec mi kh8ng can Om sit a nhing
vimg xa x8i. Cluing c6 the lim viec 6 ben trong cic may moc lan, 6 dueri day bien,
hok trong nhftng vimg 8 nhiem h6a hoc hok sinh hqc, a gia dinh hok nhftng tea nhi
16n.
• Phucmg tien truyen din :
(3 nhftng mpg cam bien multihop, cic nut duqc ket non bang nhftng phucmg tien
khang day. Cic dutmg ket nen nay c6 the to nen boi song vo tuyen, Wing ngooi hoc
nhftng phuang tien quang hqc. De thiet lip so hoot dOng th6ng nhat cia nhftng mpg
nay, cic phuong tien truyen din phii duce chop phii phi hqp tren toin the glen. Hien
tai nhieu phin cung dui the nut cam hien doa vio thiet ke mach RF. Nhftng thiet bj
cim bien !tang Iuqng thap ding b0 thu phit v8 tuyen 1 kenh RF hoot den a tin s6
Chuyen tot nghiep
Dal Thng Long Al 7776 -Rni Tien Tang
916MHz. Met each Ichic ma cac nut trong mang giao tiep vai nhau bang Wing
ngoai. Thiet ke may thu phat vo tuyen dimg hong ngoai thi gia thinh re vi de ding
han. Ca hai loci hung ngoai va quang deu yeu eau be phat va thu ram trong pham vi
nhin thiy, the la c6 the truyen anh sang cho nhau dirge.
• Cau hinh mpg cam hien (network topology):
Trong mang cam hien, hang tram den hang nghin nut dirge trien khai teal twang
cam bien. Chung dirge trien khai trong yang hang chuc feet cim nthi nut. Mat de cac
nut c6 the len tai 20 nut/m3. Do so lugng cac nut cam hien rat lbn nen can phai thiet
lap met au hinh On djnh. Chting ta c6 the kiem tra cac van de lien quan den viee duy
tri va thay doi ciu Hit 6 3 pha sau:
➢ Pha tien then khai vi trien lchai• cac nut cam bien c6 the dat len xen hofte xip
theo tat ti,r tren tnr&ng cam bien. Chang c6 the dupe trien khai bang each thi tir
may bay xueng, ten lira, hoc c6 the do con ngtrai hoc robot dSt tang cai met.
➢ Pha h3u trien khai: sau !chi thin khai, nhitng sv thay dei eau hinh phu thuec vio
viec thay d6i vi tri cac nut cam hien, Ichit Ming dal trang thai Ichong ket not (phu
thuec vio nhieu, viec di chuyin cac vet can...), nimg lugng thich hap, nhUng sv
va item vu ev the.
➢ Pha then khai lai: Sau ;chi then khai eau hinh, ta van co the them vio the nut
elm bien Ichic di thay the cac nut gap sv c6 hose thy thuec vito sv thay d6i
chirc Ming.
• St: fieu thy Ming lugng (power consumption) :
Cac nut cam hien Ichong day, c6 the coi la met thiet bj vi dien ter chi e6 the dirge
trang bj ngu6n Ming lugng gill han (<0,5Ah, 1.2V). Trong met s6 ung dung, viec 136
sung ngu6n wing lugng Ichong the dive hien dirge. VI the Ichoing that gian song cua
cac nut cam hien phu thuec manh vito tiled gian song cim pin. mang aim hien
multihop ad hoc, m6i met nut ding met vai tr6 kep vita Ich6i t3o vita djnh tuyen dry
lieu. Sv true tic cim met vai nut cam bien c6 the gay ra nhung thay ded ding ke trong
eau hinh ve yeu cau djnh tuyen lai cac g6i vb to chirc lai mpg. Vi voy, viec duy tri vb
quitn 1S, ngu6n Ming lugng &mg met vai tth quan tang. D6 IA 19 do vi sao ma hien nay
nguoi ta dang top trung nghien cuv ve cac gill thuot va giao thirc di thiet ke tip& cho
mang cam hien. Nhiem vu chinh cim cac nut cam hien trong taxiing cam bien la phat
hien ra cac sv Iden, thus hien xir 19 da lieu cuc be nhanh Chang, va sau de truyen aq
lieu di. VI the sr fieu thu nang lugng dirge chia ra litm 3 vimg: elm bien (sensing),
giao tiap (communicating), va xir 19 dit lieu (data processing).
Chuyen de tot nghiep
1)ei 1-inr Thing Inng Al 7776 -Rai Tan Tang
1.2.4 Hai can frac 40c dung cilia mgng cdm bit%
a. Gin tric phing
Trong ciu true phing (flat architecture) (hInh 1.5), tit ca cac nut deu ngang
hang vu thing nhit trong hInh clang ve chin Ming. Cac nut giao tiep vii sink qua
multihop sir clung cac nut ngang hang lam 1,0 tiep song. Vii phwn vi truyen c6 djnh,
cac nut gin sink hon se dam Igo vai tr6 cla 10 dip song dOi yid mOt sti Itrqng len
ngu6n. Gil thiet ring tit cl cac nguan deu dung cimg mOt tin s6 de truyen du lieu, vi
vkly c6 the this se thin gian. Tuy nhien each nay chi c6 hieu qui vii dieu kien ll c6
nguen chia se don le, vi du nhu thin gian, din so...
Mu"( • Twa con
Hinh 1.5.C6u Ink phang cua mgng cam biin
b. Ciu talc tang
Trong ciu true tang (tiered architecture) (hinh 1.6), cac cum duet to ra gulp
cac tai nguyen trong cimg mOt cum gui dit lieu single hop hay multihop ( toy thuOc
vim kick cer cua cum) den mOt net djnh sin, thubng gqi la nut chit (cluster head).
Trong ciu true nay cac nut to thlnh mOt he thong cap b$c ml 6 d6 m6i net Cr mOt mire
xlc djnh thirc hien cac nhiem vu da djnh sin.
Chuyen de tot nghiep 10
Dai 14nr ThAng I.nng Al 7776 -Rni Tign Ting
.. •
"All
Tr"( TIM COI • Tarn
Hinh 1.6.Cau Ink tang cita numg cam biin
Trong cau true tang thi chk nang cam hien, tinh than va phan phoi dfir lieu
khong dung deu giera cac nut. Nhitng chile niing nay co the phan theo cap, cap thip
nhat thvc hien tit ca nhiem vv cam hien, cep gifts thvc hien tinh than, va cep tr.& cimg
thvc hien phan phei di
Mcmg cdm biin xdy dung theo cau tnk tang hogt Ong hifu qud hen cau tnic
pitting, do cdc Ill do sau:
Cau trim ding co the gitim chi phi chi mang cam hien bang viec djnh vj cac tai
nguyen 6 vj tri ma chting hog dOng hieu qua nhat. RO ...tyc phdn
tong the tic dieu !chi& talp trung nut se giri you cau tai net trung tam va cher tra lai,
tong twang hqp duqc phep n6 se giri mOt ban tin ;tic nhon duqc phep tai net da giri
you eau cling WA thong tin tai nguyen n6 duqc phep sir ding, vi dv nhu so luqngva vi
tri cut ck khe than gian tong he thong TDMA. Trong trutmg hqp nay nut trung tam
thuang Mn nhieu nang luqng, bei v#y tong giao thirc nay thutmg thi nAng luqng cim
nhOng net trung tam duqc cung cap nhieu han cic net thong thutmg. Trong giao thirc
phan tan gin twang ti tiler the bai tong token bus. Khung token se lan luort luu hinh
tong mOt yang kin la mOt nhom cac nit man, mOt chuang trinh quan lSt yang dOc
Chuyen de tot nghiep 26
tai 1-19r Th5ng I.nng Al 777A Tin Wing
biet clang de phat hien 184 va tai tao the bai khi thy ra sv co, nhuqc diem coa no la cac
nut phai a trong tinh tang nhon dit lieu, them vito de viec bao tri va duy to tuyen khi
hinh ding ming thay d8i la kha phirc tip.
+ Thit tic troy cop new nhien cac nut hoitt dOng plan tan hoan town, phuong
phip diu tien va tai gib van dirge sir ding la ALOHA, trong thu tic ALOHA mot nit
khi truyen dcr lieu n6 girl di ngay Hip tic, lcheng he c6 sv lien he vii cac nit khac Uri
vay khi ruing thy ra xung dot la rat cao, khi phat hien xung dot phia nh$n se gai mot
xac nh$n cho thutic tinh ciut g6i tin nhOn, phia giri se cher mot thai gian ngau nhien va
bit dim truyen
c. Thu tyc them nh3p mai truang trong myn cam biin
Trong mang cam bien khang day yeu ciu diu tien va quan trong nhAt la can bing
nang lucmg glita cac nut mang, sir dung nang lacing hieu qua trong thiet ke, lva chip
thit tic them nh3p tad twang va kha nang thiet lap lii tuyen khi topo ming thay en.
Nhu da tim hieu a nhUng phin trtrac rang lacing cita nit tieu thu cha yen do
truyen hooc nhOn dit lieu. th8ng thueng quit trinh truyen th8ng gam 4 trang thai:
truyen, nlan, rai va the dO ngi. Trong d6 the dO truyen va nhOn la Mn nhieu rang
ltrong nhAt, dva vao hog dOng ciut giao thirc them nh$p men throng to c6 the nhOn Only
mat so van de va mic tieu thiet ke cita giao thirc MAC:
+ Xung dot: khi /ay ra xung dOt thi vita ton rang luqng tai ca nth Win va nai
thu va nang lam ding de phat lai g6i tin d6, bei v#y can phai loci be xung dOt, tuy
nhien nau c6 the dam bao luu luqng ctia mpg cam bien du thip thi xung dOt gin nhu
duqc be qua.
+ Nghe taping: mac du khung Unicast gui tir mot nguan tai met dich, tuy nhien
vi kenh vo tuyen la mai tnrbng chung cho tit ca cac nit hang xim ciia no boi v3y
chimg deu nhen duqc tin hieu tir cac nit di va be qua tau chung lchong phai la dich
tai, viec nay cling ten kha nhieu rang luqng. Tuy nhien d8i khi viec My la het sic can
thiet khi thu thap thong tin ve hang xi:5m de xac djnh luu lacmg Men tai h8 trq cho rime
dich quitn
+ Nghe ngOng a the de rai: khi mot nit 6 trang thai rai n6 sin sang nh$n dO
tuy nhien trong nfrang ming luu lucmg it thi thai gian cher nhOn do lieu ton kha
nhieu nang luong.
+ MOt th8ng s6 quan tong nem ngoiti nang lacing ra la you eau chuang trinh
Ichong phirc taw, xir ding it tai nguyen nhu b0 nha, vi xir 15r ...
Chuyen a tot nghtep 27
flan H9r Th5ng 1.nng Al 777A -RAI TiOn 'fling
Thu tic than nhap m8i throng mia mang cam bien thuemg duqc chia vio 2 nhem
thu tic chinh la: thu tic cash tranh, va thir tic 1#p lich.
2.1.3 Tha tyc cynh tranh
Trong thu tic conk tranh, cc( hei truyen de lieu chia deu cho tat ca cic nut hang
x6m. Neu chi c6 mot nut hang x6m an truyen du lieu thi khong van de gi, tuy nhien
neu c6 2 ho(ic nhieu nut mu6n truyen khi de chang phai cash tranh veri nhau de gianh
quy&I truyEn dtt lieu, 2 giao thirc quan tryng coa nh6m giao thirc nay la ALOHA va
CSMA ma ta da c6 dip de cep 6 phan truck.
* Thit tic CSMA: Trong thu tic da truy cap cam bien song mang Wirth xung dot
CSMA — CA(Carrier Sense Multiple Access with Collision Avoidance) MOt van de
gip phai v6i d6i turyng lam sit theo si kien, binh thutmg thi nut mpg 6 trang thai r6i
trong met then gian dal , n6 chi bit diu host dOng khi c6 sir kien ben ngoii tic dOng,
khi sir kien d6 xay ra gas nhu tat ca cac nut deu mu6n truy&I dft lieu met cich ding
then, do vOy se do ra nhieu xung dot, au nut c6 gang giri dft lieu theo chu kjr thi Icha
nang lap lai xung dOt la rat cao neu Wong c6 qui trinh them de xay ra. Sau day ta se
tim hieu nguyen ljr lam viec ca ban cua giao thirc da truy cap cam bien song mang nay.
Ban dau khi met nut nh#n gdi da lieu mei de truyen di, ne eh& met then gian tre new
nhien, mix dich cua viec lam nay nhim lim gam tinh d6ng be cim cac nut khi phit
hien sir kien say ra (vi neu khi 2 nut xay ra xung dot ma trong lan thir titp theo neu c6
ding then gian cher thi van khong trinh khdi xung dot), trong then gian chtr nem nhien
d6 nut c6 the at 6 hang thai neu , trong thbi gian nghe ng6ng nut se thirc hien cam
bien sting mang. Neu nhu m8i truling truyen dang bin, sau met s6 lean thir ma van
khong thinh ding n6 se dung lai va cher met then gian ngeu nhien, phi thuOc vio sot
lan thu va thai gian ngit ells nut, sau d6 ne lai titp tic nghe ngeng m8i trutmg, car nhu
vay khi ten met gi6i his ntio d6 ma van lch8ng thinh ding thi g6i se bj be qua. Trong
mem hqp m8i twang rei, nut se gin bin tin RTS va chuyen sang trang thai cher, trong
throng hqp khong nh#n duce bin tin CTS, hoci c6 ban tin CTS cho nut 'chic thi n6
se quay lai qui trinh cher mot thin gian ngiu nhien va thu lai. Con neu nh#ri duqc bin
tin CTS, ne se giri &Et lieu di vi cho ban tin ACK.
Tay tang trutmg hqp ma CSMA c6 the thay don then gian cher, thai gian nghe
ng6ng la ngiu nhien hay c6 djnh. MOt dieu can luu y la can phan biet thu tic CSMA —
CA trong mang khong day va thu tic CSMA — trong mpg c6 day, ve cc bin thi 2 thi
tic nay gi6ng nhau la deu dua vio viec aim bien sang mang, tuy nhien thu tic truy
cap CSMA — CA chi duqc gqi la trinh xung dot, do neo 'thong the phat hien khi ceo
xung dot xay ra, do the dO truyen la bin song c8ng, nut mang tai met then diem chi c6
Chuyen elt tot nghiep 28
Dei 1-inr Th5ng i.nng Al 7778 -Rid Tin Thng
the thu ho#c phit di? lieu. Do v#y trong lop trinh djnh tuyen sir dung thin Ate thim nhop
mOi tru?mg nay thutmg sir dung mOt then gian trg ngau nhien de giam tinh thing WO
giita cac nut, shim tang hieu qua tranh xung dOt.
Thiet bj duy tri ba thong so NB, CW va BE, trong d6 NB dem s6 thou diem rat lui,
CW chi ra kich thuerc elm cira s6 xung dOt hien tai, BE la so mil cua theri diem nit lui
hien tai. Khi c6 met gen du lieu de truyen di, cac th8ng so nay duce kheri tao Wong
img von: NB=O, CW=2 va BE=macMinBE (trong d6 macMinBE la thong so curt giao
thirc). Thiet bj se cher ngau nhien trong r th6i diem nit lui tiep theo trong khoing [0, 21'
— 1] , khi de n6 thuc hien cam bier song mang, tau moi trtrerng rOi n6 se giam CW, va
cher teri thai diem rot lui tiep theo va xem xet lei men trutmg truyen met lin nfta, neu
mai throng yin r6i thi thiet 1)] se bit Mu truyen du lieu cos no. Trong twang hqp phit
hien ra m8i truerng dang ban thl so then diem roi NB va so mu BE tang len va CW
duqc $t lui CW=2, neu NB vuqt qui ngtrCrng thl khung der lieu duqc be qua, qui trinh
truyen that bai. Cu nhu v#y cac bare duce lap lui.
2.1.4 The tyc xfp gch
Yu diem cita thit We nay la xip xep qui trinh truyen tai cac nut hang thorn di
lchong thy ra xung dOt tai dau thu. Tuy nhien no cfmg c6 mOt vai nhuqc diem d6 la
phirc tap tong thiet d(it va bio tri viec sip xep, lap ljch. (ki thuftt da truy cop phin chia
theo then gian TDMA thubng dugc sir dung veil loci thu tuc them nh#p m8i tniemg
nay)
a. Th6 Ale LEACH
Chills' dill ar tlinh
Pisa a; tilt Rut host Ong
l'Sn TS I
Quyit dials tbinb
nit ;Aft*
Hinh 2.6.77u tyc LEACH
Chuyen de tgt nghiep 29
1 tai Hnr Th5ng i.nng Al 77Th -Hui Tign Tiing
Thu tic nay thueng duqc sir dung trong mpg ma cite nut co fling Iuggg tieu thu
nhu nhau. NO phin yang the nut that'll the lien cung, moi lien cung do se chan ra melt
nut gqi la nut chinh se thuc hien viec zap zip va bao tri thong tin dm cic nut trong lien
cung, cic nut con loi trong lien cung de gqi la cic nut thinh vien duqc gin vac) khe
thin gian Wang img de trao d6i do lieu vOi nut chinh. Ntit chinh se tip hap dft lieu
trong cluster loi gAi true tiep hoc qua not trung gian de truyen dot lieu ve tram ca se.
Nhu voy Wing luang tieu thu trong raring nay la bat din xung, nut chinh se tieu ton
nhieu tiling luang han cic nit thanh vien, do ngoai viec girl dft lieu ve trim dr se n6
can awe hien chic ning lien lac va dieu lchien hoot dOng cua cic nut thanh vien.
Trong khi fling hong tieu thu tai cic not thanh vien se duce tiet hem rat nhieu do
khoing cich v6i nut chinh glut hon rat nhieu so voi tom co se. de lchic phtic tInh tong
tieu thu Wing hong bit can dOi nhu vOy c6 the cif sau mOt lchoing thin gian thi cic not
My to dinh gii fling lucmg va thay doi nut chinh Wan phien.
b. Thu tyc SMACS
Thu toe t r t6 chirc dieu khien troy cop mei trueng SMACS ve bin chat la su ket
hap gifta viec lchim phi clic nut lin On va pit chia TDMA cho the nut d6, giao thirc
nay duqc xity dung dtra ten mOt s6 gia thiet:
+ Dii tan sir dung duqc chia thimh nhieu kenh nho va nut co the sir dung de
trao d6i vai bit ky mot khitc.
+ Tit ca cic not trong mpg cam bien la c6 djnh.
+ Cie nut chia the khung dft lieu c6 dO dai c6 djnh, Ichong can thiet la tat ca
the nut deu gieng nhau.
Mix dich cim SMACS la phit hien ra cic mot hang xem va thitt l$p lien ket hoc
kenh truyen toi nut d6, trong de dit lieu chay theo mOt chieu, neu 2 nut deu mu6n
truyen do lieu cho nhau thi phai sir dung 2 kenh lien ket. viec nay se dam bio trinh
duqc xung dOt.
Gil sir nut x muon thiet dOt mOt lien ket de trao dOi dit lieu vol nut y, n6 se nghe
ngeng diti tin co djnh trong mOt khoing thin gian ngiu nhien, nen lchong nhin duqc gl
trong thin gian d6, n6 se girl mOt ban tin mei girl do lieu r6i thong bio tea the nut hang
xem. Khi nut hitng x6m z nhfut duqc ban tin mei ctia x n6 se che mOt thin gian nem
nhien va try lei china dja chi ctia no, dja chi dm not mbi va s6 hang xem n, khi xrthOn
duqc bin tin tri kri cua nut y, ne se mei y thiet lop lien keel. y se tra kin bing ban tin
chin thong tin ve khe thin gian va tan s6 sir dm.
Chuyen de tot nghiep 30
Del Mar Thing Lang Al 7776 Tign Time
Giao thirc nay cho phip thiet diit lien ket c6 djnh gifta cac nut ce djnh, do do viec
khirn phi thong tin ye cac nut hang xi:5m duqc thyc hien lien tic de Wang thich khi
eau hinh mpg thay doi. Hon the ctia thu tic nay la phirc top trong xir ly gifta cac nut,
do v#y khi lya chip thu tic nay an can nbirl gifta tong nitng luong can khi thyc hien
thu tic va truyen nhon der lieu so v6i cac phuang phap khic, uu diem coca phuong phip
nay nhu cac thu tic xep ljch khic la frith xung dot Mt.
c. thu tic Wang thich luu luqng truy c#p mei tru?mg
Thu tic TRAMA thyt hien vier phap ding cho phep cac nut truy &Op kenh truyen
de tranh xung dot, giao thirc nay gia sir tit ca cac nut du dOng b0 thtri gian va chia
thai gian thai gian dm:cc chia thanh thai diem truy cjip ngau nhien. MOt nut se quimg
bi thong tin cim no t6i cac nut hang xtrm, bao gOm ca thong tin ve lap ljch elm no. Dya
va cac thong tin nay cac nut se sir ding thu$t tan phan tan de xitc djnh khe thei gian
va ke hooch them nh#p de truyen - nh#n dft lieu va kt hoach chuyen sang tong thai
ngii cua nO. Nhuqc diem dui thu tic nay khi Ong ve tinh Win va b0 nher boi v$y yeu
eau mang co tai nguyen du lan.
Pt% Pt 79 Prlo 200
Plink 2.7.Thu tyc TRAMA
2.1.5 Chu& thd 4w thdm nh4p moi tnrd‘g IEEE 802.15.4
Phi= vi Ong ding cua thu tic IEEE 802.15.4 di:9c then khai cho mong cam bien
kheing day, mang trong nha, lc& nii that bj veri PC va bao mat hau hit nhttng ung
ding nay yew cau Mc dO thap, lchong dad hoi qua cao ve dO tre, d#c biet nang luyng
fieu thy that).
Chuyen de tot nghiep 31
Fla) /-19r Thing t.nng Al 777 Tign Titng
a. Min &tic m;ng vai tra vi Ulu nut mpg
Tren lap mpg co 2 id& nut: Nut da nang, nghia la no co the hog dOng dam
nhiem vai tre cua nhieu clam Ming khic nhau, Ideu nut tit* 2 la nut co chile nang gi6i
han n6 chi cep the hog dOng nhu mOt thiet bj.
MOt thiet bj phiti lien ket vai men dieu khien, trong mang hinh sao thiet bj dieu lchien c6
the hog dOng dva tree lien kit 1-1, hoc da lien ket nhu trong mang ca nhan MOt
thiet bj dieu hinh thuang thvc hien nhang nhiem vv sau:
+ NO Tidbit nhOng thiet bj lien ket yeti n6.
+ Cap dja chi cho nhang thiet bj do, tit ca ck nut IEEE 802.15.4 co 64 bit
dja chi, dja chi nay cfmg ea the ngin hon toy theo yeu au cita ung dung
+ Trong the dO bho hieu IEEE 802.15.4 no pith mOt khung bao hieu thong
bao cho the nut, va thiet bj dieu hinh co the rcfr 19 nhang you citu cua cac nut trong the
khe Mai gian duqc chi ra trong tin hieu Mang NM.
+ NO trao dOi dft lieu vai the thiet bj ngang hang vai no
b. Ciu tree sieu khung
Thai am &II ate 710i aim thy ging --el
Ipnh sianKlw sbbi
crank trny
11164 bto
Hinh 2.8.Cciu ink sieu khung
Tram dieu hank trong mang hinh sao khi hog dOng a the dO thong bho no to chile
kenh truy c#p va truyen dr lieu.
Mqi sieu khung deu co dO dal nhu nhau, tram dieu hanh bat du m64 sieu
khung bang each gin mOt khung dfi lieu canh Wm, khung canh bio nay se chira du lieu
m8 to thong tin dO dai va nhang thong tin lien quan khic a nhang sieu khung nip theo.
+ MOt sieu khung duqc chia Minh 2 khoing: host dOng va Ichong hog dOng.
Trong thai gian kh8ng hog dOng, tat ca the nut bao gom ca nut dieu khien se 6 tmng
thai ngit, khi thai gian Icheang hog dOng ket thAc n6 1$p Mc bj &nit thIrc de nhtin thong
Chuyen de tot nghiep 32
Dal Nor Thing Long Al 7776 -Rid Tiign Wing
tin thong bio tir net dieu hinh, that gian Ichong hog dOng nay ding co the duqc be
qua.
+ Thai gian hog dOng duqc chia thinh 16 khe, khe dau lien lit khung cinh
bio, nhftng khung con lai &Km chia thinh 2 vling, that diem canIt tranh truy cap sau
d6 ll cac khe that gian "dim bio". DO dii dm that gian hog dOng vi Ichong host dOng
ding nhu dO dii cita mai khe vi so khe that gian c6 the dieu chinh duqc bang chuong
tranh
Nut dieu bluth hog dOng trong toin be thin gian host dOng, n6 lien lac yeti cic
thiet bj hog dOng trong khe thin gian dim bio khi duqc phep. Trong hau het khe thin
gian dim big ne c6 the chuyen sang the dO net. Trong khoing thai gian canh tranh
truy cap, thiet bj c6 the tit the dO truyen nhOn nett Ichting co du lieu de truyen.
c. Quin I* thbi Wan dim bio
Nut dieu hanh se phin khe thin gian dam bio cho thiet bj khi c6 yeu cAu trong
ichoang thai gian quilt tranh, mOt c6 dugc sir dung de chi ra khe thai gian yeu ciu la
khe nhan hay truyen dCr lieu. Trong khe truyen de lieu thitt In se truyen g6i eh net
dieu hinh vl ngtrqc lai trong Outing hqp la khe nhan. Khi nhan duce g6i tin yeu cau
ngay lip tirc n6 se giri g6i tin ACK thong bio ring n6 di nhan &Km you ciu, khi net
dieu hinh dil tit nguyen n6 se phin Ichoing that gian bio hinh cho nut, ne se the
thong tin m8 tit ve Ichoting that gian bito hanh trong khung thong bio nip theo, phan
thong tin m8 a ve that gian bio hinh n6 se chi ra dja chi cea nut girt yeu ciu, so luqng
vi vi tri cea khe that gian trong khe that gian bio hinh trong siou khung. Vi thiet N c6
the sir dung khe that gian duqc phin de. Neu Ichong de tit nguyen no se giri mOt thong
bio la khe that gian di het, khi de thiet bj se cha giri lai yeti cau vio lan sau.
d. Thu tyc truyin de. Iltu
Gil sir thiet N c6 dft lieu main giri tai nut dieu hinh, neu nhu thiet b1 di duqc
phan khe that gian dam bio, no se hog dOng trtrec khi khe that gian bit diu vi ngay
lOp tire truyen de lieu mi IchOng he c6 thao tic them d6 tranh xung dqt. Trong tratmg
hqp thiet bj chua duqc phin khe that gian n6 se giri god de lieu tai thai diem canh
tranh truy cep sir dung giao thirc da truy 4p cam bien song mang, sau do net dieu
Unit giri ACK.
Trong throng hqp de lieu truyen ifs nit dieu hinh tot thiet bj, neu thiet bj cti duqc
phan trong khe that gian dim bio thi du lieu se ducat truyen ngay lOp tirc ml khong
can yeu can xic then.
Chuyen de tot nghiep 33
flat Hnr Th5ng I.nng Al 7776 -Rini Tan TAng
Trong twang hqp phO Win nhit khi nut dieu hanh !thong the sir dung de nhon
trong khoang then gian dam bito, thl mOt the tuc bit tay duqc thuc hien giaa thiet bj va
tram dieu hitnh, tram dieu hanh se giri met thong beo vimg dem da lieu cho thiet bi bao
gam ca dja chi ciut thiet 131 trong truang (lilt chi mkt khung thong bao. Trong thvc to khi
thiet bj tim thiy dja chi ells no trong twang dja chi n6 se giri mOt goi da lieu you au
doc biet trong khoang thbi gian canh tranh. Tram dieu hinh se tri leri bing ban tin
ACK va sin sang nh(in dtt lieu t6i. Trong trutmg hqp Ichong giri thanh cong thiet bj se
girl lai yeu ciu trong nhOng sie'u khung tiep theo.
e. Khe that gian trong giao they da tray cep cam biin song mang
Khi mOt nit giri dit lieu hok thong tin quirt ly, dieu lchien di trong khoimg thai
gian canh tranh truy cap n6 sir dung giao thtic da truy cep cam bien sang mang, de
giam xac suit xung dOt giao thirc da truy cep cam hien song mang frith xung dOt
(CSMA —CA) sir dung mOt thbi gian tre ngiu nhien. Khe thbi gian trong gian down
quilt tranh truy cep duqc chia thinh ck khe that gian nho hcm, gqi la tiled diem rot lui,
ttrcmg img vai dO dai cua khoang 20 kenh va khe thbi gian trong giao thirc CSMA —
CA ttrang img yea thbi diem rat lui.
f. Chi de 'thong cinh bin
Ben canh the dO citnh bao trong IEEE 802.15.4 can de suit giao thirc chi do
kh8ng canh bao, mOt vii diem Iduic nhau ca ban giaa 2 the do nay la:
+ Trong the dO khong canh bao tram dieu hanh lchong giri khung cinh bao, str
ving met al poi tin canh bao duqc thiet bj ton dung trong khoang then gian nay de
Clang b0 vOi tram dieu hanh.
+ Mai goi giri fir thiet bi !thong sir dung khe CSMA — CA. do kh6ng co clang
b0 trong thbi diem rut lui, them vao de thiet hi chi thi hanh duy nhat met lin them da
mai throng, neu kenh rei thl qua tranh thim nh#p thanh cong.
+ Tram dieu hanh pith boat dOng theo chu k5r nhung thiet bj thi co the hoot
dOng theo 1#p lich ciut rieng no, no chi host dOng khi, co goi da lieu hok goi dieu
lchien can guff di hoc co da lieu duqc giri tai chinh no fir tram dieu lchien.
2.2 Giao that (tong bt) thal gian
Vert de theri gian nit quan trong trong nhieu img dung va giao thirc trong mang
cam hien. Cac nut co the do that gian bing cach ding cac xung dang ha ctic b0 lay tir
ck b0 dao dOng. Boi vi cac pha ngiu nhien lam djch chuytn va lam tr8i toc do da b°
dao dOng, do v#y died gian cuc 130 ciut cac not se bit diu sai khk di lam cho mang mit
Chuyen de tat nghiep 34
Dei Hnr Th5ng I.nng Al 777h -Rhi Tian Ting
di st deng be. Do vjy viec deng be thai gian c6 vai to rat quan trong trong host deng
cua mang cam bien.
Deng be th&i gian la phucmg thirc cho phip cac thuc the rieng biet trong met
nhOm deng be xung ding he cua chting hoac ding be vai that gian Wan cau phei hqp
(UTC). Phan nay se giii thich tai sao an deng be that gian va dua ra met s8 giao thirc
ding be Witte nhau.
Tpi sao can ding bP thei gian trong mpng cam Nin ?
❖ Mang cam bien can lien ket vat the giai thuc de biet khi nio met hien ttrqng
xity ra.
❖ Djch vu ca bin chinh cua mang cam bien la tich ho de lieu. Do de can deng
be gifts cic nut de c6 the tich hqp da lieu truyen den Sink
❖ MOt vii giao thtic yeu eau ding be thai gian: quin 19 eau hinh mang.
❖ Cic nut cam bien thutmg nh6, gii thinh thip nen be dao gang thubmg khong
chinh xic, han naa chimg bj gioi han ve &Mg luqng nen thuang c6 the de sleep
de Het ldem nang luqng.
Sau day, ta xit vi du don giin minh hoa sir can thiet cia de chinh xic ve th&i
gian nhu sau (hlnh 2.9)
Hinh 2.9.Xdc clinh pie din cita Om thank a xa beri mat day sensor
Met sting am phit ra ttlr met nguim am 6. lchoing cich xa the gong den met day
cic sensor vi ta c6 the Ink doin g6c tai trong tnrbng hqp nay. m8i mot sensor deu
biet vi tri cult cltmg va luu lei thei gian den dm am thanh. Trong truang hqp cu the
Mar hinh ye, g6c 0 c6 the duqc xic djnh khi d va x da Net, dimg cong thirc luqng giitc:
x=d * sinO do de 0 = arcsin(d/x).
Chuyen de tot nghiep 35
Dal Mr Thing 1.nng A1777h Tign Time
Khoitng each gifta the sensor co the xic djnh tit cac vi tri da biet ctia cac sensor
vl x c6 the thu duqc tit dO loch thbi gian t A gifts cac Ian cam biAn cfla sensor va von
tac cita am thanh c 330m/ s , sir dung Ong dint :
x=c•At.
Cho d = lm ve At = 0.001s thi 0 ;--; 0336 (radians). Neu dang ha cira cac sensor
chinh xic den 5001.ts , sv sai loch ye thbi gian thvc c6 the 6 Ichoing gifta 500 va 1500
ps , va vi the gia tri cfra g6c 0 c6 the thay en tong lchoing 0 0.166 va 0 ez 0.518 . Vi
the, met sai so nh6 trong khi clang bo then gian c6 the clan ton dO loch clang 16 khi trerc
doan.
CAn phai chti y ring thtri gian dimg trong mang cam bien phii 11 theri gian tv
nhien (physical time), da la hai mit cam bien phii c6 sr cam bien nhu nhau ye is va is
cfra mOt mit cam bien cing gin \red Is trong thin gian thvc (real time) hok thbi gian
town cau phai hop (coordinated universal time — UTC) tang tat. Then gian to nhien
phai duqc phin biet v6i Ichai niem ve thbi gian logic (logical time) la thbi gian ma cho
phep quyet djnh viec sip xip cac sum kien trong ho thong phan ha tilumg !cluing can
thiat phai chi ra bat ki sv lien quan nao den then gian thvc.
2.2.1 Dow ha Sc mit cam blin va sr chthh sac
Hiu het cac thiet bj clang ha cita cac nut cam bien va may tinh diu c6 cau to
giOng nhau. Mai nut c6 mOt b0 dao dung 6 mOt tan so xac djnh va met may dem xung
dao dOng. Phan mem ctia cac nut chi truy nhklp tai gia trj cua b0 dem nay vi th&i gian
gifta hai lin tang nay quytt djnh each giiti quyet van de then gian: cac sv kien xay ra
gitta hai lin tang nay !thong the duqc ph$n bi'e't tir cac nhin thbi gian ctia chimg. BO
dao deng thutmg c6 dO tr8i, doll sv djch nglu nhien so v6i tan so ten danh nghia, hay
can gqi la do loch clang ha. Dieu nay phu thuOc vio sv khong tong suat cita tinh the,
hay cac dieu kien min twang nhu ap sat, nhiet de... do vey viec trier khai mpg cam
bien ten thvc to khic nhieu so yeti trong phOng thi nghiem. DO loch clang ha duqc do
bring ppm (parts per million), n6 dua ra con s6 ve s6 dao dOng them vio hok so dao
dOng N mit ma clang ha tao ra tong luqng thbi gian din cho 1 trieu dao dOng a toe dO
danh
Tan s6 dao dOng thay dui theo then gian. C6 2 kik thay
• Thay dai ngan hen: do thay &Si nhiet de, do thay dai tong din 1p nguen cung
cap, 1p suit Ichong khi...
❖ Thay dui din han: do sv lao h6a cita cac bO dao dOng
Chuyen a tot nglilOp 36
Dal 14nr Thing I.nng Al 7776 -Rhi Tan Ting
Ngu&i ta thuang gia dinh tan só cac be dao ding la on dinh vira phai trong pham vi
tir vii phitt den vii chuc phut. Dieu nay cling n6i len rang cac tilt* toil .' (long 1,0 thin
gian phai ding bo vii phid mOt lan de theo kip su thay dOi dm tan s6. Vi the giao
thirc tang thtri gian la nit can thiet.
MOt dieu can quan tam nfta la bao lau thl giao thirc dong be thtri gian chay mOt
Ian? Gia sir met nut chi dieu chinh de dich pha i 0 va thc do troi cua dao dOng la x
ppm co dinh, de chinh xac you cau la 8 s, thl sau khoang thoi gian khoang s
can thiet phai thing bij lai. V6i x = 20ppm, dO chinh xac la is thi sau 50s phai ding 1,0
lai. Cac mo hinh hien 41 ngay nay deu c6 ging ink Itrqng chinh xac khong chi N i ma
con Oi de keo dai chu Id truOrc khi phiti ding be lai. MOt Ian nUa phai nhan manh ring
quit trinh ding be met lan khong c6 hieu qua vi toc do troi thay clOi, va thutrng thi ta
gioi han duqc tOc dO ten len nhat pi > 0 ma thee man
1 d
H at) 1 + pi
1 + pi dt
Ging thirc nay con dung de xac dinh tan s6 ding be
222 Bong 6¢ theri gltm trong mon° cam Min
Trong mang cam Bien c6 mOt so disc diem ma anh hutmg den you eau thiet ke
cita cac thu$t toan dOng b0 then gian:
➢ Thuat tan phrli phit hop vOri pham vi mang mutilhop rang 16n, cac nut bi rang
buOc ve mat Wing luring. Yeu cau ve pham vi bao ham ca se, Wring cac nut
trong mang va mat do cac nat.
➢ Yeu cau ve do chinh xac c6 the thay doi khitc nhau tir mili gily cho den hang
gily.
➢ !Chong sir di,mg them phan cling chi gianh cho muc dich &mg bo vi ton chi phi
va neng luqng them vao cho phan phu do.
➢ Muc dO di dOng la rat thip.
➢ Hau nhu khong c6 gidi han tren c6 dinh ve tre truyen g6i v1 phu thuOc 16p
MAC, 161 cac g6i, va truyen lai.
➢ Tri troy& gifts hai nut hang x6m la khong ding ke. MOt khoitng cach 30m can
10^-7s vi van thc anh sang la c =3.10^8m/s.
CO rat nhieu giao thirc ang b0 thtri gian truyen thiing c6 ging gift viec ding bei
gift cac nut 6 moi thin diem nhung lai khong quan tar' n den !tang luqng va cau hinh
Chuyen de tot nghiep 37
nal 1-Inr Thane I.nng Al 7776 -Rai Tign Tang
mang cho nen khong the ap citing vao mang cam bien. VI disc diem cita mang cam bien
cho nen giao thirc eking b0 thei gian can cho y ve the yin de ve de chinh xac, chi phi
rang Itroug va cac you eau ye be ruin.
Phuong phap co ban de d8ng b0 thei gian tong mang cam bien la cong the gitta
cac nut trong town mang. Thiet lap moi lien he cop day (pair-wise) gifta cac nut trong
mang sau de me rOng ra toan mang.
CO hai cach thiet lap so cong tic gifta hai nut trong mpg de la deng be* gift ben
gfri va ben nhen (Sender-Receiver) va gifts ben nhon va ben nhOn (Receiver-Receiver).
D6ng b0 gifta ben gfri va ben nhan yeu can lien ket hai chieu gitta hai nut lan can.
Trong phucmg phap demg b0 gifta ben nhen va ben nhen, nhieu nut nhen cua the g6i c6
nhin thai gian nhu nhau d6ng b0 vei nhau ma khong you call thing be vOi ben gin
(n& gfri goi tin broadcast den hai nut A va B, sau de A va B to deog 1)0 v6i nhau
kitting an den Sc). Hai phuong phap nay duqc mieu to nhu hinh (2.10).
B
B
A 4‘
Ifinh 2.10.D ang ba ben phcit/ben *In vet ben nhdn/ben nhdn.
2.2.3 Giao that dong NI gift ben nh(ln vd ben phat
Trong giao thirc nay, mOt nut goi II ben nhan, trao dei gei du lieu vori net khic
goi la ben phit, lam cho ben nhan d6ng be WA ding he cfut ben phat. Giao thee ding
b0 gitta ben nhan va ben phat nbi chung la dei hen dtr?mg not 2 chieu gifta cac nut lan
cert.
Dien hinh cfut giao thirc clang b0 gift ben phat va ben nhOn la Lightweight time
synchronization protocol (LTS). Giao thirc nay dua ra bOi VAN GREUNEN va
RABAEY de deng b0 citing h6 cua mang voi ang h6 cfla cac nut tham chieu, vi do
nhu c6 the c6 1)0 nhOn GPS. Trong kin heat dOng n6 dieu lchien cac nut de sir clortg
Wing luqng hieu qua va dat duqc dO chinh xac cao, va dua ra nhang gioi hart tuang dui
chinh xac ye cac phin cfmg co se va the he thong. LTS kh8ng yeu au phai update
ding he eve be va ne cling khong tree luqng t6c dO tr8i thvc so.
Chuyen de tot nghiep 38
Dal Fine Thing Long Al 777h -RAI Tiln TAng
LTS chia qua trinh deing b0 lElm 2 giai down:
❖ Giao thirc d6ng b0 2 chieu de deng b0 2 nut Ian can.
+ De gitt cac nut hoc mOt tip hqp cac nut can quan tam Clang be theo met tham
chieu chung, LTS xay di,mg mOt cly phin tan tir cac not tham chieu den tat ca
cac nat. Neu Sic lei khi deng 1)0 single-hop la dOc lap, pit phei y het nhau va
c6 trung binh la 0 thi cac nut la cna thy cling dirqc ding b0 vei lei bing 0
nhung syr thay dei la tong the thay d6i dqc theo dubng truyen tir nut tham chi&
den nut la. VI vay su thay doi nay c6 the tai thieu hoa bang viec tim ra ciy phan
tan c6 chieu cao nhe that.
Ding b# 2 chau
Diu tien chung to se nghien cuv ye deng be hai chieu (hinh 2 1 1)
Sau khi qua trinh 6Mg b0 lei duqc Ichei dOng a not i, goi da lieu you &au dew
b0 &nye djnh clang tai thbi diem tl voi thbi gian Li(t1). Nat i dieu lchien cac gei qua he
thOng host dOng va cac nein xep. Tre dubng truyen c6 the bien thien rat nhieu. Khi nut
i gel bit diu tien tai thbi diem t2, nut j nhon bit cuoi ding ciia gei t.i t3 = t2 + T -F tp
,trong de T la tre debug truyen va tp la then gian truyen gei (chieu dai cua goi tinh theo
bit).
Chuyen CM tot nghiep 39
f)ei 1-Tor Thing 1.nng Al 7776 Tan Wing
I
bong b¢ Igi xung to
g6i bong be) djnh
g6i Ydri nh5n th&i gian Mt') ti
chuyin giao g6i 68 truyen
h4 th8ng host bong, truy nthip
kenh truyen
bat 68u truyin g6i -Ow
— &rang fruiter'
LAO thbi glen truyin g6i
t3—
14— nwing nhin g6i
ts— nh8n thbi giant( 1 5)
g6i phoc &fp dang b6 djnh clang(
I
16— e—nhin thbi giant...1 (t6)
4_chuy'in giao g6i d8 truyen
OS, truy nhig kenh truyen
bat au truyen g6i
L 06)
L101) LJ 5)
mating nh$n g6i —t7
nhin thbi giant,(18) —ow —is
Hinh 2.11.Hogt dung ctia viec (long b0 ben phcit/ben nhan
Sau da met thin gian, tai thai diem t4, g6i dif lieu den duqc bio hieu den ling
dung hoc he thOng host dOng cim nut j qua met qua trinh ngit, sau da duqc &nit du
tai then diem t5 yeti thbi gian Lj(t5). Tsi t6, not j djnh dkuig g6i phitc dap vii thai gian
Lj(t6), va dieu WU& gei do den he thong host dOng dm n6 va ngan xep numg. Goi nay
bao gbm ca thin gian truttc d6 11 Lj(t5) va Li(t1). Nut i ngirng nhan g6i vio th&i diem
t7 (t6 cOng vOi mao dau cim msng hotic he thOng host dOng) vi &nit deu tai thin diem
t8 yeti then gian Li(t8). Bay gib ta se Olin tfch vi sao not i nhat' m str hieu chinh ciut
no. De c6 , chting ta gia sir khang c6 bit 16 sir ten nil)
gitta cac clang ha trong khoang thbi gian tir tl den t8, do d6 0 = * ) vii cac nut
va tren thtrc to nut i u6c dotin 0 bang viec vat dofi...j giam sat vaqt qua nguemg
cimg lin dau tien ne luu lai va giri dig lieu di, viec Iva chop nguemg cimg lien quan tai
gilt trj de lieu mang quan tam. sau de nett gilt trj theo doi vuqt qua ngtreing ma gilt trj
nguang cimg cOng yeti nguemg mem thi der lieu meri duqc truyen di, viec nay nhiim
ft-anti giri lai nhttng g6i tin ma gilt trj kheng c6 su thay d6i lan so voi doi tucmg der lieu
can theo doi. Han the ala giao thirc nay la tong trubng hqp Ichong vuqt nguang nut
Ichemg bao gib gui der lieu ye mang.
3.5.6 PEGASIS (Power-Efficient Gathering in Sensor Information
Systems)
PEGASIS phan cip la mOt hp cac giao thirc djnh tuyen va tap twig thong tin
tong mang cam bien.
Giao thirc nay du lien h6 trq viec keo clai tiled gian sling ciut mang nha dat duqc
viec fieu thu Wing luqng ding Whit va hieu suit rang luqng cao qua tit ca cac nut
tong mang, thin hai lam giam tre truyen der lieu den sink.
Chuyen ett tot nghiep 73
tai Hnr Th5ng Long Al 77Th -Rhi Tien Thng
Giao thirc nay xem ;cot m8 hinh mang bao gam tap hqp cac mit &mg nhit duqc
trien khai qua mOt yang dia Cac nut nay c6 str hieu biet ve vi tri cac not Ichac tong
town mang va chting con c6 khit nang dieu lchien cong suit va bao phit mot vimg thy
'.Cac nut nay cling duqc trang bi be thu phut sang h6 trq CDMA. Trach nhiem cim
the nut nay la thu hrqm va truyen da lieu den the sink, th6ng thaw la cac tram co set
Mtic dich de ph& then mOt cau trim dinh tuyen va mOt so de trung du lieu de giam
thieu str lieu thu cling suit va truyen de lieu dime thp trung den tram ca sa voi tri
truyen din nhe nhit trong khi van can bing sit tieu thu cong suit gitra cac nut trong
mang.
Giai thuat nay sir dung m8 hinh ciu ink clang chuOi. Dtra hen m8 hinh nay cac
nut se giao tiep yea nut hang xem gan n6 nhAt. Ciu true chu8i bit du yeti nut xa sink
nhat, the not mang duqc them din vao chuii lam cht6i lan din len, bit dAu tir nut
hang x6m gin nut cuei nhitt. Cac nut se duqc gan vao chu8i theo cach greedy tir nut
lan can gan nhit cho tai cac nut can lai trong mpg. De )(tic dinh duqc nut lan can gin
nhit In& nut se sir dung ctr?mg dO tin hieu de do Ichoang cach tai cac nut lan can elm
n6. Sir clung de kik nay the nut se dieu chinh curing dO tin hieu sao cho chi c6 nut lan
can gin nhat nghe duqc.
MOt not trong chu6i se duqc On lam nut chit, trach nhiem cua nut chit la truyen
de lieu t#p hqp duqc tai tram ca sa. Vai tr6 not chit se bi dich chuyin vi tri trong chit&
sau m8i yang chu kS,. Chu Icji nay duqc wan boi sink va viec chuyen trang thai tir
Ong nay den yang tiep theo c6 the duqc khai tho tx% viec dua ra dau hieu cong suit
cao ben sink. Viec quay veng nut chit trong chuii nhiim dam bao cong bang trong tieu
thu thing luqng giea cac nut trong mpg. Tuy nhien cong can cha Sr ring viec thay d6i
c6 khi din den nut chit r&i xa tram co sa, sink, khi de nth nay lai can you can ding suit
cao de truyen den tram ca sa.
Viec thp trung de lieu tong mang dqc theo chuii. Diu ti'en chain leader se girl
met the bai tai nut cuOi cong ben phai cuei chu8i. Trong khi nhan duqc tin hieu nay
not cuOi se gai de lieu ne thu luqm duqc den nut lan can theo chieu xu8i trong chu6i,
sau da not nay tap Ming de lieu va lai tiep tuc gni den nut lk can gin n6 nhit, ca nhu
vay cho den khi gai den not chit. Sau Q6 not chi' se tai tap trung d>7r lieu va gin den
sink.
Moc du don gian nhung m6 hinh t$p thing clang chuOi de gay ra tre mrac khi de
lieu tap trung duqc truyen den sink. MOt phuong phap de giam dO tri nay la t#p thing
dim lieu song song dqc theo chuii, va se cling giitm nhieu ham nau cac not dirge trang bi
b0 thu phut sir dung CDMA.
Chuyen de tot nghiep 74
Bei Hoe Th5ng i.nng Al 777n -Rill Tien Thng
Dimg PEGASIS se giii quyet duqc van de ve mio diu gay ra boi viec hinh thinh
cic cum dOng tong LEACH vi giim duqc so lin truyen vi nh#n bang viec Sp hqp da
lieu. Tuy nhien PEGASIS loi ce dO tre duimg truyen lan doi voi cic nut 6 xa tong
chuiii. Han ntra b nut chinh c6 the xiy ra hien Wang that chai.
3.6 Giao thirc Ara fit vl tri
Mvc lieu chinh cOa giii thu$t djnh tuyen nay li due vio cic thong tin ve vj tri
cfla cic nut cam bien a um mOt dubng di hieu qui den dick. Lou djnh tuyen nay rat
phit hqp yeti mong dim bien nai ma viec top thing da lieu li Icy thuk ich de giim
thieu viec truyen bin tin den tom ca ser bang each looi b6 stir du thira gifra cic &Si den
tit cic nguOn khic nhau. Lou djnh tuyin niy cem yeu eau stir tinh toin vi luqng mho
deli truyen d o thip. Ta se xem xet mOt so giao thtic dinh tuyen dua ten vj tri nhu sau:
3.6.1 Gidi thigh chfnh xdc theo dia if (GAF: Geographic Adaptive
Fidelity)
Giai thuk chinh xic theo dja ly (GAF) dkra ten vi tri c6 hieu qui ve m#t /tang
lucmg duqc thiet ke chit yeu cho cic mang ad hoc di dOng, nhung cling c6 the ip dung
cho mang ckn bien. GAF khai thic viec du thira dit lieu tong mang bang etch coi mOt
top hqp cic net con tong mang li tuang duang nhau khi thin tit giao thirc lop ten.
GAF chia Wing quan sit thanh cac hinh vuong du nho, bit IcY cic nut nio tong hinh
vuong cling deli c6 the giao tiep vo tuyen yeti bat kt not nio nam tong hinh vuong ben
canh.GAF dq ttff nang lining bang each tit cic nut Ichong can thiet tong mang ma
khong inh huang den mire dO chinh xic ctia djnh tuyen. N6 to ra mot luoi io cho
yang bao phu. M6i nut dung GPS cua ne - vj ti xic djnh de ket hqp vai cling mOt
diem ten luoi mi duqc coi li tuang duang khi firth den gii cia viec djnh tuyen g6i.
Su tuang duang nhu vOy duqc gin dung de gift cic nut djnh vi tong vimg luOi xic
djnh tong tang thii nghi de tiet hem nftng Itrang.
VI vey GAF c6 the tang ding ke thei gian song cita mang cam bien khi mi s6
ltrcmg cic nut tang len. MOt vi du cu thiduqc dua ra b hinh (3 16)
Chuyen dl3 tot nghiep 75
Rai Hnr ThAng 1.nng Al 7776 Tign Tilng
r r r
A B C
r
r r r
r
HInh 3.16. Vi du vJ Wei ero trong GAF
Trong hlnh ve nay, nut 1 co the truyen den bit Id nut nio trong s6 the nut 2, 3 va
4 va cfic not 2, 3, 4 co the truyen toi nut 5. Do d6 cac nut 2, 3, vi 4 la Mang throng vi
2 tong s8 3 nut d6 co the 6 trang thai nghi.
Cac nut chuyen tang thii tit nghi sang hoat dOng lan luct de cho cfic tai duqc
can bang. CO ba tang thai duqc djnh nghia trong GAF, d6 la :
+ Phat hien (discovery), de xic djnh cac nut Ian can trong lutri.
+ Hoat dung (active), the hien stir tham gia vao qua trinh djnh tuyen.
+ Nghi (sleep) khi song duqc tit df.Nut nio nghi trong bao lau lien quan den cac
thong s6 duqc dieu chin' h tong qua With djnh tuyen. Di dieu Ichien dO di dOng, min
not trong ludi u6c doin tit gian reri Ichei lutri coa no va gin thong tin nay den nut lan
can.
Cac nut dang kh8ng boat dOng dieu chinh th&i gian nghi cua chting phe hqp cac
th8ng tin nh6n duqc tir cac not lk can do de giu cho viec djnh tuyen duqc chinh xic.
Tnr6c khi died gian rtri Ichoi ludi cita cac nut dang hoat dijng qua han, cac nut Bang
nghi thoitt Ichei tang thai do vi mOt trong s6 the nut d6 tr6 nen hoot dOng. GAF duqc
then khai cho ca nheng mang bao gom clic nut kitting di dOng (GAF co ban) vi mang
bao gom cac nut di dOng (GAF thfch ung di dung).
GAF c8 gAng gift mang hoot dung bAng cach gift cho cac nut dai dien luon
the de hoat dOng tong min yang 6 Judi lo cita no. Cac ket qua mo phting di chi ra
ring GAF thuc hien tOi thieu se duqc nhu giao thirc djnh tuyen tong mang ad hoc
thong cho vi tri, thutrng khi non den ton that &Si vi lam tang thtri gian song curt raking
bAng cach tiet hem niing luqng. Mac do GAF la met giao thfrc dua ten vi trf, no ding
Chuyen de tot nghiep 76
tai 1-1nr5ngl.nng Al 7776 -Hifi Tien Time
c6 the duqc coi la nhu met giao thirc phan cep khi ma cac cam dua tren vi tri dja 19.
Doi voi m8i vimg ludi xac dinh, m8i nut dai dien boat ding nhu met nut chit de truyen
dit lieu den cac nut khac. Tuy nhien nut clui thy kung thvc hien bit cu mOt nhiem
hap nhit hay tap trung di lieu nao nhu trong cac giao thirc pit cap thong thu6ng.
3.6.2 GEAR (Geographic and Energy -Aware Routing)
Yue et da dua ra viec sir ding thong tin ve dja 19 trong khi ph6 bien cac you
cau den cac vimg thich hqp vi cac yeu cau dft lieu thuang bao gam cac thutic firth dja
19.Giao thirc GEAR dung sq nhan biet ve Ming 'yang va cac phuong phap thong bao
thong tin ve dja 19 teri cac nut lan can. Viec djnh tuyen thong tin theo vimg dja 19 rat c6
fch trong cac he thong Vic djnh vi td, va 4c biet la trong mang cam bien Wang nay
han the s6 luqng cac yeu cau 6 Directed Diffusion bang each quan tam den mOt vimg
xac dinh han la gin cac yeu cau ten town mang .GEAR cai den han Directed Diffusion
6 diem nay va vi the dq tril duqc nhieu niing luqng han.
Trong giao thirc GEAR, m8i met not giix met estimated cost va mOt learned
cost trong qua trinh den dfch qua cac nut lan cat Estimated cost la sq ket hap clia
nang luang con du va khoing each den &ch. Learned cost la sq cai tien ciia estimated
cost giai thich cho viec djnh tuyen xung quanh cac hOc trong mang .H6c xay ra khi ma
met not kheong c6 bit ld mOt nut lan can nao gin han so v6i vimg dich han la chinh ne.
Trong tnamg hqp khong c6 malt hoc nao thi estimated cost bang yeti learned
cost. Learned cost duqc truyen nguqc lai 1 hop m6i Ian mOt g6i den dich lam cho viec
thiet lap dubng cho g6i tiep theo dtrat dieu chinh.
C6 2 pha trong giii thuat nay:
+ Chuyen tiep g6i den vimg dich: GEAR dung each to chqn nut lan can dud
tren so nhan biet ve rang luting va vi tri dja ljr de djnh tuyen g6i den vung dich. CO 2
baiting hqp can quan tam:
- Khi ten On nhieu han met nut lan can gin han so yeti dich: GEAR se chon hop
tiep theo trong so tit ca cac nut lin can gin dich han.
- Khi ma tit ca cac nut dew xa han: trong truang hap nay se c6 met 16 hang.
GEAR chan hop tiep theo ma lim tai thieu gia chi phi cim nut lin can may. Trong
tnxbng hap nay, mOt trong s6 cac nut Mtn can duqc chip de chuyen tiep g6i dqa tren
learned cost. Lqa chip nay c6 theduqc cap nhat sau theo sq hei to ctia learned cost
trong snot qua trinh truyen g6i.
+ Chuyen tiEp gel trong vdng : Neu g6i duqc chuyen den vimg, no c6 the truyen
clit lieu trong vung de c6 the bang each chuyen tiep dja 19 de quy hoac flooding co gidi
Chuyen CM tot nghiep 77
Deinrir Thing 1.nng Al 777A —Rini Titan Wing
han. Flooding c6 giai han ip dung tot trong throng hqp cic sensor trim khai lchong
day dac. nhing mang co mat de sensor cao, flooding dja 19 de quy lai hieu qui ve
mat ning luqng hon la flooding c6 giai Nut. Trong trutmg hqp da, nguai ta chia vimg
thanh 4 vimg nhe va tao ra 4 bin copy ctia ged deo. Viec chia nho nay va qui trinh
chuyen tiep tiep tuc cho den khi trong vimg chi can 1 nut, vi du nhu hinh (3.17).
O
o Nt, o , ! 0
‘-'
0 0 '' k
0
eri,- ‘
4‘..../ Ni
4
0
Hinh 3.17.Chuya'n tiep dja 13.5 de quy trong GEAR.
De thaa min cic dieu kien chimg ta dimg giii thutt chuyen tiep dja 19 de qui de
truyen g6i trong vimg nay.
Tuy nhien, vai nhitng yang mat dO thip, chuyen tiep dja ly de quy dai khi
khong holn thanh, djnh nay& vo tic dung trong met vang dich ring tnthc khi so hop
goi di qua vtrqt qui gioi han.Trong truang hqp nay chang ta dimg flooding c6 giai
Nut
3.6.3 Kft lu¢n
Chuang nay di tong kit va dua ra !chi nhieu cic giao thirc djnh tuyen dkic biet
tap trong trinh bay v 'e' giao thirc djnh tuyen LEACH. MOi giao thac deu c6 nhUng uu
vi nhuqc diem rieng. Hien nay, di c6 nit nhieu cic cii lien cita cic loci giao thirc nay
duqc dua ra, va cho ket qui rat khi quan. Viec Iva chqn loci giao that nio hoin town
phtt thueec vao ung dung ma chting ta trim khai. Mac dit sv hoat clang cia cic giai
djnh tuyen nay day hira hen trong yin de sti dung hieu qua rang ltrang, cic
nghien cuv sau nay can phii xic djnh re) cic vin de nhu chit luqng dich vu cis cic
ung citing cis cic cam bien hinh inh vi cic 1mg dung thin gian thvc.
Chuyen de tot nghiep 78
alai 1-inr Th5ng TAnng A17776 Tien Tiing
CHU'O'NG 4. MO PHONG VA SO SANH GIAO MOT DINH MAN LEACH,
LEACH-C, STAT-CLUS
4.1 T6ng quan ye NS2
4.1.1 Gi61 thqu ye NS2
NS2 la Olin mem m8 phong mang diet' khien stir ki'e'n rieng re huerng doi tuqng,
duqc ph& trien tni UC Berkely, viet Wing ngon ngt/ C ++ va Otcl .N6 thyme hien giao
thirc mang nhu TCP va UDP, luu luqng truy clip mA nguOn had' vi nhu FTP, Telnet,
Web, CBR, va VBR, co the quirt lt Ung dqi nhu Tail Drop, RED, djnh thy& cac
thu'at town nhu Dijkstra, va nhieu hop nfta. NS ret httu ich cho viec ma phong mang
din rung (WAN) va mpg local (LAN). 136n lei ich lern nhit caa NS2 phii ke den dim
tien la:
+ Kha Wing kiem tra tinh on djnh ciut cac giao thirc mang dang ton tai.
+ Kha rang dart gia cac giao thirc mang mei throe khi dua vao sir dung.
+ ICU Wing thyme thi nhitng mo With mpg 16n ma Ian War to khong the thyme
thi dtrqc trong thyme te.
+ KM Wing m8 phong nhieu loai mang khic nhau.
4.1.2 Co• cdu t6 char NS2
07d : Td iterwebr ♦ CA
with 00 abbe% ♦ Li AIWA
Ord kept
Sam NI SSW( Lk.y
• Brent &leaks Cbjecb >,
• Nave& Cayenne Objecb NAN
• None Sec Edpiw Ndwuk
Modules (Piffle Moab') Ambler
Hinh 4.1.M6 phong NS, khai tan va that lap
• OTcl Script : Kich bin OTcl.
• Simulation Program : Chuang With m8 phong.
• Otcl : BO bien dich Tcl mer rOng huang dtti ming.
Chuyen d13 tot nghiep 79
Dei flry Thing 1.nng Al 7776 Tien Tung
• NS Simulation Library : Thu vien m6 pheng NS.
• Event Schedulet Objects : Cac del tugng be lap ljch sir kien.
• Network Component Objetcs : Cac dei tugng thank phin mpg.
• Network Setup Helping Modules : Cac m8 dun trg giap thiet lap mang.
• Plumbling modules : Cac m6 dun Plumbling.
• Simulation Results : Cac ket qua m6 phemg.
• Analysis : Phan tich
• NAM Network Animator : Minh hga mang NAM.
Trong hinh tren, NS la be bien djch Tel ma Ong huemg dei tugng, bao gem cac doi
tugng : be lap ljch sir kien, cac din tugng thanh phan mang vet cac m6 dun trg &Kip
thiet lap mang ( hay cac m6 dun Plumbing).
De sir dung NS2, ngueri dung lisp trinh biing ngon ngit kjch ban Otcl.Ngutri dung c6
the them the ma ngulin Otcl vao NS2 bing each vitt the 16p dei tugng mai trong
Otcl.Nheng lop nay khi d6 se dirge bien djch ding veri ma nguen g6c.Kich bin Otcl co
the thuc hien nhieng viec sau:
+ Khoi tiro lx) lap lich str kien.
+ Thiet lap m8 hinh mpg dung cac del tugng thinh phan mang.
+ Bao cho nguon traffic khi nem bit diu truyen vit ngung truyen packet trong
be lap ljch sg kien.
Thuat ngt/ plumbing dirge dimg a chi viec thiet lap mpg, vi thiet lap met
mang nghia la xtly dung cac duimg de lieu giita the din tugng mpg bAng each thiet
lap con tr6 "neighbour" cho met doi tugng de chi den dja chi dm doi tugng Wang
img.M6 dun plumbing Otcl trong thvc to thqc hien viec tren rat don gian.Plumbing
lam nen sir manh ciut NS.
Thanh phin lern !chic cita NS ben cgith cac doi tugng thanh phiu. mang la be lap
ljch sir kien .BO lap ljch sir kien trong NS2 thvc hien nhfrng viec sau:
+ T6 chitc be djnh than me !long.
+ HU), cac sir kien trong hang dqi str kien.
+ Trieu gqi the thanh phin mpg trong m8 pheng.
Phu thuec vao mire dich siz dung ciut ngteri sir dung den veri kjch ban m8 pheng
Otcl ma kit qua ma phong co the dirge luu tre nhu file trace Dinh clang file trace se
dirge tai vao trong the img dung Ichac de thvc hien phan tich:
+ File nam trace (file.nam) duqc dimg cho cling cu minh hga mpg NAM
Chuyen a tot nghiep 80
Dei Hnr Thing I ling Al 7776 -Rin Tin Tiing
+ File trace (file.tr) &cc dimg cho cong cv Mn vet va giim set mo phong
XGRAPH hay TRACEGRAPH
Out nam
TCL NAM
tae Visual
Fikicl Simulation
NS
Tracing and
Monitoring
Simulation
Ent tr ;
Hinh 4.2.Luting ccic st kin cho file tcl cher trong NS
Mo phong NS2 dva tren hai ngon net : C / C ++ va Otcl.Tai sao lai dva tren hai
ng8n ngit? Ns2 sir dvng hai ng8n vl c6 hai loci mo pheng khic nhau ctia sv vat
can phii lam:
+ Tren mOt mat, mo phong chi tiet ciut giao thirc dei h6i mOt hg then lap trinh
bang non nit ma co the thao tic mOt cich hieu qui byte, gOi, tieu de, vi thvc hien
cic thuat toin ma chay b0 dO lieu km hon .D6i v6i nhung nhiem v i trong thin gian
chay toc dO la dieu quan tong va kim ng?ch khoang thei gian (chay m8 pheng, tim
they 18i, sira chits 16i, recompile, chay lai) li it quan trong.
+ Mat khitc, phan 16n railing lu6i nghien cfru hcri khic nhau hoac cic tham s6
cau hinh, hoac mOt cich nhanh ch6ng khai thic mOt s6 ltrong cfic kich bin.Trong
nhftng trutmg hop nay, then gian lap lai (thay doi cic mo hinh vi chay lai) la quan
tong hon.Tir cau hinh chay mOt Ian (vao dais ciut cic mo pheng), chay trong thin gian
nay, mOt phin ciut cong viec it quan trgng.
NS c6 dip img cic nhu cau ciut ca hai v6i hai nem ngft, C / C ++ va OTcl.0 / C
++ de chay nhanh, nhung chain de thay d6i, lam cho no thich hqp cho viec trim khai
thvc hien chi tiet ve giao thirc .OTcl chay nit chom nhung co the dugc thay doi rat
nhanh cheing (va lap 100, lam cho n619 Wang cho cic me pheng cau hinh.NS (thong
qua tc1c1) cung cap co cau ket not de lam cho cic d6i arcing bien vi xuat hien tren ca
hai nem nip.
Chuyen a tot nghiep 81
tai ficir TWAng i.nng Al 777A -Rill Tian Wing
Hinh 4.3.Ca cciu td chtic this myc NS
4.2 Gib thitt m8 phemg
Em di sit dung Olin mem NS2 de chay m8 pheng WSN va de so sinh ck quyen
lqi cua ck giao thirc djnh tuyin lchic nhau tong chuyen de nay.
4.2.1 GM tidal:
Nat mpg : 100 node
Kich thuac mpg : 100m x 100m
Dia diem tram ca sa : (50,50)
NAng lacing ban du m8i nut : 2J
DO lieu : Packet
Thtri gian m8 phong : 600 s
Topo mang : 100nodes.txt (file c6 san tga dO cac node)
Chuyen d tot nghiep 82
Hinh 4.4.Topo wing 100 node me phong
Gii sir clic nodes dIu ce nhu clu gel tin.
4.2.2 Mu lenh Sty m6 phony :
➢ M6 pithy Leach:
ns ns-2.34/tcl/ex/wireless.tcl -sc ns-2.34/mit/uAMPS/sims/nodescen -rp leach -x 1000
-y 1000 -nn 101 -stop 600 -eq_energy 1 -init energy 2 -filename LEACH1 -dirname
leach_dir -topo ns-2.34/mit/uAMPS/sims/100nodes.nct -num_clusters 5 -bs_x 50 -bsy
50 2> leachdir/LEACH1.err > leach dir/LEACHLout
➢ M8 phdng Leach-c:
ns ns-2.34/tcl/ex/wireless.tel -sc ns-2.34/mit/uAMPS/sims/nodescen -rp leach-c -x
1000 -y 1000 -nn 101 -stop 600 -eq_energy 1 -roil energy 2 -filename LEACH-C -
dirname leach-c_dir -topo ns-2.34/mit/uAMPS/sims/100nodesixt -num_clusters 5 -
bs_x 50 -bs_y 50 2> leach-c dir/LEACH-C.err > leach-c_dir/LEACH-C.out
> Af6 phdng Slat-clan:
ns ns-2.34/tcl/ex/wirelessicl -sc ns-2.34/mit/uAMPS/sims/nodescen -rp Leach -x 1000
-y 1000 -nn 101 -stop 600 -eq_energy 1 -init energy 2 -filename Stat-clus -dirname
Chuyen de tot nghiOp 83
Rai He Th5ng I.nng A17776 -Rill TiAn Timg
stat-clus_dir -topo ns-2.34/mit/uAMPS/sims/100nodes.txt -num_clusters 5 -bs_x 50 -
bs_y 50 2> stat-clus_dir/stat-clus.err > stat-clus_dir/stat-clus.out
Cdc tham s6 &or I* b diu cda met me phdng.
+ Wireless.tcl: d#t ra met s6 the tham só m8 pheng va cac nguen tip tin
TCL/mobitily/leach.tcl (ho(ic Leach-c.tcl, mte.tcl hoc ke-clus.tcl). Nhung gip tin nay
dirge lien kat den tip tin vei cang met ten trong mit / uAMPS / Sims. Mai tip tin nay
d#t ra nhOng thong s6 cu the cho giao thirc vi cac ngu6n gip tin
mit/uAMPS/Sims/uamps.tcl, trong de cal chin cac tham se nhu nhau cho tit ca cac
giao thac djnh tuyen (vf du nhu, kenh bang thong, kich thu6c tin hieu di lieu, vv) .
+ -sc nodescen: top tin c6 china dja diem node.
+ -rp: giao thirc djnh tuyen.
+ -x 100: kich c6 x coa mang Iv& .
+ -y 100: kich ca y colt mang
+ -nn101: s6 mit (bao gem ca nut co sdr )
+ -stop 600 : chieu dai mo phong (600 giay)
+ -eq_energy 1: tit ca the nut bit du vei Wing luqng bing nhau ( nett bAng 1 :
tat ca cac nut bit du vai Wing luqng bang nhau vi bang 0 thi ngtrqc lai) .
+ -init_energy 2: se luqng ruing !um ban du (J) .
+ -Topo leach_topo: ban du ten Topo .
+ -filename leach_file: ten tip tin du ra se, lieu thong ke .
+ -dirname leach_dir: thu muc cho cac tap tin du ra s6 lieu thong ke .
+ -num_clusters 5: so luqng cum mong muen (k tham se) .
+ -bs_x 0: vi tri x cita tram co se.
+ -bs_y 0: vi tri y caa tram co se.
Sau khi chay m8 phong ket qua li cac file luu vet (c6 duoi .tr , .data , .enegry,
,alive, .txt vs...) se dirge ltru tai cac thu mix da tao ra a tau lenh tren.Cic file nay cho
to s6 lieu thong ke qua thai gian ve rang luqng , lieu , s6 nut song ,v.v...
De bleu dien citt lieu trong the file nay bang de thi can pith tito ra cac file.awk
de dqc cac file nay va clang XGRAPH de ye de thj to cac file du ra.Trong chuang nay
em di tao ra 3 file.awk la energy.awk, data.awk, alive.awk de dqc the 3 file du ra
(data,energy,alive) caa the giao thirc Leach, Leach-c,Stat-clus.V1 de ve de thj bang
XGRAPH em da be sung cac cau lenh sau vac, him "finish" trong file Wireless.tcl :
Chuyen di3 t6t nghiep 84
tai nne Thing t.nng Al 777h -Rill Tign Wing
exec awk -f data.awk LEACH-C.data > data-c.tr
exec awk -f energy. awk LEACH-C. energy > energy-c. tr
exec awk -f alive.awk LEACH-C.alive > alive-c.tr
exec awk -f alive.awk LEACH Lalive > alive.tr
exec awk -f energy.awk LEACHLenergy > energy.tr
exec awk -f data.awk LEACHI.data > data.tr
exec awk -f data.awk Stat-clus.data > data-s.tr
exec awk -f energy. awk Stat-clus.energy > energy-s.tr
exec awk -f alive. awk Stat-clus.alive > alive-s.tr
# Ve do thi bang ham Xgraph:
exec xgraph 100nodes.txt -geometry 800x400 -m -M -nl &
exec xgraph data. tr data-c. tr data-s. tr -geometry 800x400 -t " Du Lieu "
-x "Time (sec) " -y "Packet "&
exec xgraph energy.tr energy-c.tr energy-sir -geometry 800x400 -t "
Nang Luong " -x " Time (sec) " -y " Nang Luong Toan Mang " &
exec xgraph alive.tr alive-c.o. alive-s.tr -geometry 800x400 -t " Node
Song " -x "Time (sec) " -y "So Nut Song "&
Chuyen 0 tot nghiep 85
4.3 Ket qua m6 phOng Id nhen set
4.3.1 Thol gian sing cda cdc nodes
HIM 4.5.7'hoi gian sing cid: Sc nodes dal vet mai giao thsic
C6 the they vei mirc fling luting ban du bin 2J thi thoi gian sting dui fling
deli Writ mai phuang pluip djnh tuyen c6 sq khec nhau rat re rat.
+VOi Leach-C thbi gian sting cna cic nodes mang 11 cao nhit.Tai Way this 380
bit du xuk hien node chit va den Way 580 hiu het clic nodes deu chit do het Mug
Wong.
+We Leach tai giiy thin 200 bet diu suit hien node chit va den giay 452 cec
nodes hiu hit di chat do het fling luting.
+V6i Stat-clus thee gian sting Ma mung la the!) nhet din Way the 45.7 cec
nodes chit hoer, Wen .Vi n6 chi chon cec cluster-head 1 lin duy Mit , ma cec cluster-
head nay cling c6 giei hen nAng Wong Ii 21 nen khi cec cluster-head My het &big
hrqng thi toan mung ngfrng hout Ong mic de ning luting toan mang con rat nhieu.
Chuyen de tot nghiep 86
4.3.2 Ndng lirrng
Mak 4.6.1Cmg lutmg mkt mgng clof viti m6i giao that
+ V6ri 100 node mung va mtri node ban diu c6 gia tri 2J to co deg Sing luqng
t6i da mpg la 200J. Ta c6 the they Leach-C de se dung riling luqng theo each hieu
qua nhit.Ta cling eh the they chimg tieu thu riling luqng nit deu , ruing luqng tieu thu
duqc chia deu cho cite node trong mpg.
+ V6i Stat-clus nhu de not b tren du n>ing luvng town mpg m6i tieu ton khoang
20J thy nhien de ng*ng hoot dOng vi khong co node cluster-head de troy& tai de lieu
cho tram co sir.
+ Vol Leach Wing luqng ban diu khi mei thanh cic gun t6n it riling Itrqng
hon Leach-C mOt chOt.Tuy nhien Leach-C v6i viec truyen de lieu Oa dti t6i trum co
sir de tich kiem dirge nIng luqng mOt each toi uu nhet.Ngai ra viec thenh lop cum cos
Leach-C dam &to dung 5 cum cho m8i lin chia cum ( v6i 100 node) con Leach thl
khOng dam bao viec nay vi the de lieu thy ruing luqng 1 each khang diu cho town
man S din viec khOng su dtmg 8 Sung hieu quit bang Leach-C.
Chuyen de tik nghiep 87
4.3.3 DOP lieu
Hirsh 4.7.D1? lieu iruyjn cda mong did vat mai giao time
+ C6 the duly &it lieu truyIn cult Leach-C dot mitt cao nhht, qua d6 thAy dirge
viec sir dung tiling luqng theo Leach-C c6 hieu suit cao nhAt voi khoting 2300000 g6i
fin.
+ \Teri Leach co kholing 750000 g6i tin dirge girl .Ngotli ra cling 1 don vj thbi
gian Leach-C con gni dugs nhieu g6i tin hon veri chi phi Wing luqng thip hon .
+ Voi Stat-clus nhir di n6i b tren do man ngfmg hoot Ong lit sem nen chi giri
dirge met lugng g6i tin ret nh6.
Chuyen de tot nghiep 88
4.3.4 Kid tang mar nag° bring lin 3J
Chuyen 0 tat nghiep
4.3.5 Khl thay 461 tpa df trym co. sek
Thay dei Ma de tram ca se til (50;50)-4 (101;101).
Ina de (101;101) la diem nem ngoali mans .
Chuyen de tot nghiep 90
Leach-C vin cho thhy viec sir dung ruing Wong hiOu quit hon Leach vi Stat-clus.
Chuyen de tot nghiep 91
tai 1-Ine Thing I.nng Al 777h Tign Wing
4.4 Nh#n xet
Tir ket qui m6 pheng, em c6 the nh$n they la Leach-C c6 lqi the ve tit ca cac
linh we .Leach-C c6 the cung cap them de lieu hieu qui km Leach mOc du viec lfinh
thanh nham la ton kern hcm bpi vi the thuat town tftp trung c6 the sir dung mpg luai
th8ng tin vao bieu mslu Topology c6 yeu du ft nang luqng hcm cho the hoot dOng cis
thuet town phap ph6i Leach .Tuy nhien, giao thirc nay sir dung cho cac nut phi '. biet dja
diem. Dieu nay deli hoi met giao thee GPS hoc thiat bj djnh vj Ichac theo doi cac
va bit du len giai do?n phin phai rang luqng cho the phuong phap tie!) con thong tin
tir cac hlnh thirc m6i nut phii duqc truyen vao tram ca ser tai deu cua mei vong. Doi
yeti Leach, rang luqng khai dOng nay bao gam nhung ning luqng cho thong diep
thong bao cue m8i cluster-head, cac nut non-cluster-head thaw gia yeu eau ctia the
thong diep, va truyen / nhon ljch trinh TDMA trong mil cum. 90i vai Leach-C, viec
khai dOng bao gom viec truyen rang lugng ens mOt thong diep nhe c6 china vi tri nut
hien toi va nang lucmg tir m6i nut den the trim ca s6 (bing each sir dung CSMA) va
tiep nhkin cac thong tin tir tom co so .Tuy nhien, bit chip nay bit d'au tang len nang
luqng fieu thu chung, Leach-C la nhieu Ming luqng hieu qui han-Leach vi tOp trung
Mtge town c6 the xac djnh tot hen so vol thuet town phin tan .Tucmg fir, Leach-F MIK
hien tot, nhung giao thirc nay lchong the dieu chinh cac dieu kien mai, ching hen nhu
not duqc them vao mpg hoc cac nut di dOng .V1 vOy, giao that thy hien Wong thich
img vol cac thin nghiem khi then khai mong WSN. Stat-clus cung cep de lieu cho m6i
darn vi Ming luqng cue tit ca cac giao thin, nhung tang s6 deli he thong ngin hon rat
nhieu vol cac phuang phap tiep cOn khac .Stat-clus lchong the giri met s6 luqng lcm di
lieu din cite tom co ser vi nut cluster-head trong stat-clus hen the viec sir dung nang
luqng mOt each nhanh ching, ket thitc nhung thOng tin lien loc cilia tat ca cac nut trong
cum.
Chuyen de tat nghiep
tai Hnr Thing Long Al 7776 'Men Tung
CHUO'NG 5. ICtT WAN VA DV KIfN TRONG TU'O'NG LAI
5.1 Thu duct kit qua
Hien thi nhftng Icien thirc ve tong quan cia mang WSN, met so diem mph va
kliiin.Tem tit lai met so thach thirc djnh tuyin va thiet ke the vin de c6 hieu qua
djnh tuyen trong WSN.Nghien ciru chi tiet ve met s6 thuot town dinh tuyen .Sau de,
danh gia hieu qui dm thu$t toan do.
Thvc hien thanh cong mo phi:mg ve ba giao thirc djnh tuyen cia NS2, sau d6
denh gia stir manh va yeu cia moi giao thirc
Cac ky thuit djnh tuyen cho thiy 8 tren, hiu het nhDng giao thirc nay gii djnh
ring cac nut cam hien va BS khemg chuyen dOng.Tuy nhien, c6 rat nhieu cac *rig dvng
nhu thu thip du lieu m8i twang not ma cac BS va !than nut cam bien can pith di
dOng.VI viy, cluing to an pith nghien cuu thuit town dinh tuyen mai c6 the xir It va
Topology thay doh trong ngueng luqng ctia moi tru?mg.
Minh giti vOi cac phin mem m8 pheng:
- MIT va NS2 cung cep cho cac d6i tuqng dies hlnh de c6 the m8 ph6ng cho
mang WSN.
- Tracefile di duqc cai tien de lam cho chi net cac tham s6 cho danh gia nhu:
th&i gian song, riling luqng, di? lieu...
- Xgraph va cac file.awk ye d3 thi theo der lieu tong cac file trace.
5.2 Dty kiln trong twang Jai
Nghien ciru va chi thien kha ning djnh tuyen cho cac giao thirc nkri de tao ra cac
limit town cc ban NS2 va MIT, m8 phong cac node di dOng va cac giao thirc Ichk...
Thi hanh tip tin Nam gulp cho viec me phi:mg hinh anh.
Chuyen de tot nghiep 93
Del liar Thing Lang A17776 -Rid Tign Tiing
TAI HSU TRAM KHAD
[1] Holger Karl Andreas Willig, Protocols and Architectures for Wireless Sensor
Networks, Wiley, 2005.
[2] Jamal N. Al-Karaki Ahmed E. Kamal, Routing Techniques in Wireless Sensor
Networks, Dept. of Electrical and Computer Engineering Iowa State University, Ames,
Iowa 50011.
[3] Ian F. Akyildiz, Weilian Su, Yogesh Sankarasubramaniam, and Erdal Cayirci, A
survey on Sensor Networks, Georgia Institude of Technology.
[4] Wendi Beth Heinzelman, Application-Specific Protocol Architectures for Wireless
Networks, Department of Electrical Engineering and Computer Science, 2000.
[5] Kazem Sohraby, Daniel Minoli, Taieb Znati, Wireless Sensor Networks
Technology, Protocols, and Applications, Wiley, 2007
[6] The MIT uAMPS ns Code Extensions, Massachusetts Institute of Technology
Cambridge, MA 02139, August 7, 2000.
[7]Kumar Mrinal, Amit Ruri, Routing in Sensor Network.
[8]Wendi Rabiner Heinzelman, Anantha Chandrakasan, and Han Balakrishman,
Energy-Efficient Communication Protocol for Wireless Sensor Network,
Massachusetts Institude of Technology Cambrifge, MA 02139.
Chuyen de tot nghiep 94
Các file đính kèm theo tài liệu này:
- chuyen_de_dinh_tuyen_trong_mach_cam_bien_va_so_sanh_bang_mo.pdf