楊旭 周國(guó)祥
摘要:隨著嵌入式技術(shù)、傳感器技術(shù)、無線射頻技術(shù)、自組網(wǎng)等技術(shù)的進(jìn)步,無線傳感器網(wǎng)絡(luò)得到飛速發(fā)展。由于無線傳感器網(wǎng)絡(luò)具有十分廣闊的應(yīng)用前景,因此它已經(jīng)成為了一個(gè)重要的研究領(lǐng)域。該文分析設(shè)計(jì)了一種無線傳感器網(wǎng)絡(luò)網(wǎng)關(guān),對(duì)網(wǎng)關(guān)節(jié)點(diǎn)的通信性能及網(wǎng)關(guān)的WEB應(yīng)用做了相關(guān)測(cè)試。測(cè)試結(jié)果表明,網(wǎng)關(guān)節(jié)點(diǎn)符合預(yù)定的設(shè)計(jì)目標(biāo),設(shè)計(jì)較為合理,有良好的實(shí)用價(jià)值。
關(guān)鍵詞:無線傳感器網(wǎng)絡(luò);網(wǎng)關(guān);ARM;嵌入式系統(tǒng);Linux操作系統(tǒng)
中圖分類號(hào):TP393文獻(xiàn)標(biāo)識(shí)碼:A文章編號(hào):1009-3044(2012)16-3829-05
Design of Wireless Sensor Network Nodes for Environment Monitoring
YANG Xu1,2, ZHOU Guo-xiang1
(1.School of Computer&Information, Hefei University of Technology, Heifei 230009, China ; 2.Anhui Vocational college of Electronics& Information Technology, Bengbu 233000, China)
Abstract: Recent advances in embedded technology, sensor technology, wireless radio frequency and ad hoc network have motivated the development of wireless sensor networks. Because wireless sensor network is being used in a wide variety applications,it becomes a new re? search area of modern technology. The system of gateway are tested the communication performance and WEB applications in the end of paper. Test results show that the design of the gateway have meet the intended design goals and have extensive application foreground and value of utilization.
Key words: Wireless Sensor Network(WSN); Gateway; ARM; Embedded System; Linux Operation System
無線傳感器網(wǎng)絡(luò)(WSN,Wireless Sensor Networks),是一種新興的環(huán)境信息感知技術(shù),作為溝通客觀物理世界和主觀世界的載體與橋梁,無線傳感器網(wǎng)絡(luò)將是一種全新的信息獲取和處理技術(shù)。
在無線傳感器網(wǎng)絡(luò)中,物理節(jié)點(diǎn)主要可以分為兩種:普通傳感器節(jié)點(diǎn)和網(wǎng)關(guān)節(jié)點(diǎn)。
普通傳感器節(jié)點(diǎn),一般情況是一個(gè)微型嵌入式系統(tǒng),通過攜帶能量有限的電池進(jìn)行供電,因此其處理能力、通信能力、存儲(chǔ)能力和生存能力相對(duì)較弱。
與普通節(jié)點(diǎn)相比,網(wǎng)關(guān)節(jié)點(diǎn)的計(jì)算處理能力、通信能力、存儲(chǔ)能力及生存能力較強(qiáng)。網(wǎng)關(guān)節(jié)點(diǎn)主要負(fù)責(zé)連接無線傳感器網(wǎng)絡(luò)與Internet等外部網(wǎng)絡(luò),從而實(shí)現(xiàn)異構(gòu)網(wǎng)絡(luò)之間的通信。傳感器網(wǎng)絡(luò)的網(wǎng)關(guān)節(jié)點(diǎn)是一種特殊的節(jié)點(diǎn),它負(fù)責(zé)連接無線傳感器網(wǎng)絡(luò)與其他異構(gòu)網(wǎng)絡(luò),并使傳感器網(wǎng)絡(luò)可以與其之外的骨干網(wǎng)絡(luò)進(jìn)行通信。
一般來說,網(wǎng)關(guān)是傳感器網(wǎng)絡(luò)中最大的匯聚點(diǎn),需要處理大量的數(shù)據(jù),并按照相應(yīng)的要求把數(shù)據(jù)轉(zhuǎn)發(fā)到不同的通信模塊上去。因此,網(wǎng)關(guān)節(jié)點(diǎn)對(duì)數(shù)據(jù)計(jì)算處理能力和信息的存儲(chǔ)能力的要求比普通傳感器節(jié)點(diǎn)更高。該文設(shè)計(jì)了一種基于嵌入式系統(tǒng)的無線傳感器網(wǎng)絡(luò)網(wǎng)關(guān)節(jié)點(diǎn),使傳感器網(wǎng)絡(luò)中的各種數(shù)據(jù)信息可以通過Internet網(wǎng)絡(luò)傳輸?shù)竭h(yuǎn)程終端,用戶還可以遠(yuǎn)程登錄位于網(wǎng)關(guān)節(jié)點(diǎn)上的嵌入式WEB服務(wù)器查詢相關(guān)信息。因此,本網(wǎng)關(guān)節(jié)點(diǎn)能夠改善無線傳感器網(wǎng)絡(luò)的遠(yuǎn)程數(shù)據(jù)傳輸及匯聚問題,使管理人員能夠及時(shí)準(zhǔn)確地在遠(yuǎn)程終端上獲取無線傳感器網(wǎng)絡(luò)的數(shù)據(jù)信息,并通過遠(yuǎn)程終端即可以對(duì)數(shù)據(jù)進(jìn)行分析、處理等操作。
1嵌入式網(wǎng)關(guān)節(jié)點(diǎn)的設(shè)計(jì)相關(guān)技術(shù)
1.1網(wǎng)關(guān)節(jié)點(diǎn)的設(shè)計(jì)原理
網(wǎng)關(guān)節(jié)點(diǎn)[1]是一個(gè)特殊并且及其重要的節(jié)點(diǎn),傳感器節(jié)點(diǎn)可以通過它與外部網(wǎng)絡(luò)進(jìn)行通信。同樣,外部網(wǎng)絡(luò)中的用戶也可以通過網(wǎng)關(guān)節(jié)點(diǎn)來對(duì)傳感器網(wǎng)絡(luò)內(nèi)部的各個(gè)傳感器節(jié)點(diǎn)進(jìn)行查詢和操作。因此,網(wǎng)關(guān)節(jié)點(diǎn)最重要的任務(wù)就是負(fù)責(zé)兩個(gè)不同網(wǎng)絡(luò)之間的數(shù)據(jù)轉(zhuǎn)換,實(shí)現(xiàn)傳感器網(wǎng)絡(luò)與外部網(wǎng)絡(luò)之間的信息交互。
在無線傳感器網(wǎng)絡(luò)中,節(jié)點(diǎn)之間的數(shù)據(jù)傳輸一般采用短距離的無線通信技術(shù),因此傳感器節(jié)點(diǎn)與網(wǎng)關(guān)通信時(shí),使用的是基于共享信道的無線通訊方式。
ZigBee是一種新興的短距離、低功耗、低速率、低成本的無線通信技術(shù)。它既有IEEE802.15.4省電、簡(jiǎn)單、成本低的優(yōu)點(diǎn),又增加了網(wǎng)絡(luò)層、安全層和應(yīng)用層,應(yīng)用前景廣闊。
圖8網(wǎng)關(guān)Ping PC的演示圖
兩個(gè)圖的對(duì)比表明,網(wǎng)關(guān)節(jié)點(diǎn)的以太網(wǎng)性能比較優(yōu)秀,在單個(gè)數(shù)據(jù)包為65500字節(jié)的較重負(fù)載下,沒有丟包,時(shí)延平均且較小,沒有產(chǎn)生過大的抖動(dòng)。圖9網(wǎng)關(guān)節(jié)點(diǎn)WEB平臺(tái)歡迎頁面
圖9為網(wǎng)關(guān)節(jié)點(diǎn)WEB服務(wù)器的登陸頁面。我們?cè)诎咽孪仍O(shè)置的用戶名和密碼輸入進(jìn)去就可以看到傳感器網(wǎng)絡(luò)中各個(gè)節(jié)點(diǎn)的相關(guān)信息了。
圖10為網(wǎng)關(guān)節(jié)點(diǎn)WEB平臺(tái)查詢頁面。在這個(gè)頁面,遠(yuǎn)端用戶可以看到傳感器網(wǎng)絡(luò)里面每個(gè)節(jié)點(diǎn)的信息采集數(shù)據(jù)和網(wǎng)關(guān)節(jié)的相關(guān)信息。圖10網(wǎng)關(guān)節(jié)的WEB查詢頁面
我們通過對(duì)網(wǎng)關(guān)節(jié)點(diǎn)的WEB登陸頁面重復(fù)刷新來驗(yàn)證WEB平臺(tái)的穩(wěn)定性。測(cè)試結(jié)果表明,重復(fù)刷新40次,WEB平臺(tái)正常登陸,未出現(xiàn)死機(jī),查詢數(shù)據(jù)較快。這些都說明網(wǎng)關(guān)節(jié)點(diǎn)的WEB平臺(tái)完全達(dá)到了預(yù)期目標(biāo)。
[1]匡興紅,邵惠鶴.無線傳感器網(wǎng)絡(luò)網(wǎng)關(guān)研究[J].計(jì)算機(jī)工程,2007,33(6):228-230.
[2]霍宏偉,牛延超,部帥,等.一種IPv6無線傳感器網(wǎng)絡(luò)以太網(wǎng)接入網(wǎng)關(guān)的設(shè)計(jì)[J].傳感技術(shù)學(xué)報(bào),2007,20(2):398-403.
[3]蔡皓,馮仁劍,萬江文.具有多種通信方式的無線傳感器網(wǎng)絡(luò)網(wǎng)關(guān)[J].傳感技術(shù)學(xué)報(bào),2008,01:30-34.
[4]趙建華.無線傳感器網(wǎng)絡(luò)節(jié)點(diǎn)嵌入式操作系統(tǒng)的研究與應(yīng)用[D].電子科技大學(xué), 2007.
[5]張萬松,王立松. WSN操作系統(tǒng)可生存性技術(shù)的研究與實(shí)現(xiàn)[J].計(jì)算機(jī)工程, 2009(18):98-102.
[6]趙飛.基于嵌入式操作系統(tǒng)的無線傳感器網(wǎng)絡(luò)研究[D].大連理工大學(xué), 2009.
[7] Park S. Jin Won Kim, Lee Kwangyong,et al. Embedded sensor networked operating system[C]. Ninth IEEE International Symposium on Object and Component-Oriented Real-Time Distributed Computing, 2006.
[8]孫紀(jì)坤,張小全.嵌入式Linux系統(tǒng)開發(fā)技術(shù)詳解—基于ARM[M].北京:人民郵電出版社,2006.
[9] Yang Jian-feng, Xie Yin-bo, Chen Tian-zhou. Research on webserver application on multi-core embedded system[C]. Proceedings -2009International Conference on Embedded Software and Systems, ICESS 2009,2009:412-416.