《電子技術(shù)應(yīng)用》
您所在的位置:首頁(yè) > 通信與網(wǎng)絡(luò) > 設(shè)計(jì)應(yīng)用 > 基于重傳的802.15.4網(wǎng)絡(luò)MAC層丟包率研究
基于重傳的802.15.4網(wǎng)絡(luò)MAC層丟包率研究
2016年電子技術(shù)應(yīng)用第4期
程宏斌1,,王曉喃1,王海軍2,,孫 霞1,,張雪伍1
1.常熟理工學(xué)院 計(jì)算機(jī)科學(xué)與工程學(xué)院,,江蘇 常熟215500;2.湖北第二師范學(xué)院 計(jì)算機(jī)學(xué)院,,湖北 武漢430205
摘要: 為了降低802.15.4網(wǎng)絡(luò)數(shù)據(jù)幀的丟包率,,分析了基于重傳機(jī)制的丟包率問(wèn)題,提出MAC層節(jié)點(diǎn)工作過(guò)程的數(shù)學(xué)模型,,并分析推導(dǎo)了節(jié)點(diǎn)主要工作狀態(tài)的穩(wěn)態(tài)概率,;然后對(duì)數(shù)據(jù)幀重傳概率和丟包率進(jìn)行數(shù)學(xué)分析;最后通過(guò)實(shí)驗(yàn)比較了MAC層參數(shù)minBE,、NB和網(wǎng)絡(luò)環(huán)境參數(shù)λ,、N、BER對(duì)重傳概率和丟包率的影響,。結(jié)果表明,,與無(wú)重傳機(jī)制的數(shù)據(jù)傳輸性能比較,節(jié)點(diǎn)丟包率平均降低了88.9%,,模型準(zhǔn)確反映了節(jié)點(diǎn)的數(shù)據(jù)傳輸特點(diǎn),,均衡的參數(shù)部署有效地提高了數(shù)據(jù)傳輸成功率,,理論研究為802.15.4標(biāo)準(zhǔn)的應(yīng)用提供了參考。
關(guān)鍵詞: 802.15.4 模型 丟包率 重傳概率
中圖分類(lèi)號(hào): TN926
文獻(xiàn)標(biāo)識(shí)碼: A
DOI:10.16157/j.issn.0258-7998.2016.04.029
中文引用格式: 程宏斌,,王曉喃,,王海軍,等. 基于重傳的802.15.4網(wǎng)絡(luò)MAC層丟包率研究[J].電子技術(shù)應(yīng)用,,2016,,42(4):103-105,110.
英文引用格式: Cheng Hongbin,,Wang Xiaonan,,Wang Haijun,et al. Research on packet lost rate of MAC layer for 802.15.4 networks based on the retransmission mechanism[J].Application of Electronic Technique,,2016,42(4):103-105,,110.
Research on packet lost rate of MAC layer for 802.15.4 networks based on the retransmission mechanism
Cheng Hongbin1,,Wang Xiaonan1,Wang Haijun2,,Sun Xia1,,Zhang Xuewu1
1.School of Computer Science and Engineering,Changshu Institute of Technology,,Changshu 215500,,China; 2.School of Computer,,Hubei University of Education,,Wuhan 430205,China
Abstract: In order to decrease the frame packet lost rate in 802.15.4 network, this paper analyzed the packet lost rate based on the retransmission mechanism, proposed the mathematical model for the working process of network node in MAC layer, and derived the steady-state probability of the main state. Afterwards, this paper carried out the mathematical analysis for the retransmission probability and the packet lost rate. Finally, the effect of MAC layer parameters minBE, NB and network environment parameter λ,、N,、BER on the retransmission probability and the packet loss rate was compared through the experimental analysis. Experimental results show that the node packet loss rate is reduced by 88.9%, compared with the data transmission performance without retransmission mechanism. And the model could accurately reflect the node data transmission characteristics. Furthermore, equilibrium parameter deployment could effectively improve the data transmission success rate, and theoretical research could provide the reference for 802.15.4 network standard.
Key words : 802.15.4;model,;packet lost rate,;retransmission probability

0 引言

    低功耗、低復(fù)雜度和短距離通信是無(wú)線傳感網(wǎng)絡(luò)協(xié)議設(shè)計(jì)的主要指標(biāo),。IEEE 802.15.4協(xié)議是無(wú)線傳感網(wǎng)應(yīng)用中采用的一個(gè)很成功的標(biāo)準(zhǔn),,其優(yōu)化研究和實(shí)際應(yīng)用受到學(xué)術(shù)界和工業(yè)界的廣泛關(guān)注[1-4]。由于網(wǎng)絡(luò)中數(shù)據(jù)傳輸無(wú)線信道的噪聲和信道競(jìng)爭(zhēng)采用時(shí)隙/非時(shí)隙載波監(jiān)聽(tīng)多址接入/沖突避免(Carrier Sense Multiple Access with Collision Avoid,,CSMA/CA)算法以便共享,,因此,802.15.4媒體接入控制(Media Access Control,,MAC)層數(shù)據(jù)傳輸可靠性問(wèn)題(如碰撞現(xiàn)象,、丟包問(wèn)題和重傳機(jī)制)成為802.15.4網(wǎng)絡(luò)需要優(yōu)化的重要方面之一,。

    文獻(xiàn)[5-9]通過(guò)構(gòu)建802.15.4 MAC協(xié)議的模型分別研究了數(shù)據(jù)發(fā)送、數(shù)據(jù)丟包,、數(shù)據(jù)碰撞和數(shù)據(jù)傳輸?shù)臎_突等性能問(wèn)題,, 但是所提出的模型都有待進(jìn)一步改進(jìn)。本文重點(diǎn)研究節(jié)點(diǎn)在基于重傳的數(shù)據(jù)傳輸過(guò)程中的狀態(tài)轉(zhuǎn)換動(dòng)態(tài)過(guò)程,,設(shè)計(jì)一個(gè)基于802.15.4協(xié)議的節(jié)點(diǎn)工作過(guò)程數(shù)學(xué)模型,,然后研究協(xié)議參數(shù)和網(wǎng)絡(luò)參數(shù)對(duì)數(shù)據(jù)幀碰撞、重傳和丟包的影響,。

1 基于重傳的丟包率

    隨著IEEE 802.15.4在無(wú)線傳感網(wǎng)的廣泛應(yīng)用,,實(shí)時(shí)可靠的MAC層數(shù)據(jù)傳輸成為評(píng)估802.15.4 MAC協(xié)議性能的重要指標(biāo)。而數(shù)據(jù)幀碰撞嚴(yán)重影響數(shù)據(jù)幀發(fā)送成功率,,所以減少M(fèi)AC層數(shù)據(jù)幀碰撞現(xiàn)象和降低丟包率成為優(yōu)化協(xié)議的一個(gè)重要方法,。

    為了解決碰撞造成的數(shù)據(jù)包丟棄問(wèn)題,在MAC協(xié)議中采用數(shù)據(jù)幀重傳機(jī)制,,基于重傳的丟包率是在數(shù)據(jù)幀的重傳次數(shù)達(dá)到最大重傳次數(shù)值后仍發(fā)送失敗的概率,。基于重傳的機(jī)制可以一定程度降低數(shù)據(jù)幀的丟包率,。

2 MAC建模

    在基于信標(biāo)使能的802.15.4網(wǎng)絡(luò)中,,采用超幀周期定時(shí)的節(jié)點(diǎn)工作周期中,通過(guò)合理設(shè)計(jì)節(jié)點(diǎn)的工作狀態(tài)轉(zhuǎn)換過(guò)程,,能夠優(yōu)化數(shù)據(jù)幀的丟包現(xiàn)象,。節(jié)點(diǎn)工作的超幀周期包含休眠期與活躍期兩部分。其中活躍期可以分為信標(biāo)期,、退避等待期和數(shù)據(jù)傳輸期,。為了降低數(shù)據(jù)幀發(fā)送的碰撞概率,規(guī)定網(wǎng)絡(luò)節(jié)點(diǎn)在以下?tīng)顟B(tài)及時(shí)進(jìn)入休眠,,以便改善數(shù)據(jù)傳輸性能:(1)退避等待期如果節(jié)點(diǎn)后退了最大的退避次數(shù)仍然傳輸失敗,。(2)活躍期內(nèi)網(wǎng)絡(luò)節(jié)點(diǎn)沒(méi)有傳輸任務(wù)后進(jìn)入休眠期。(3)按照超幀周期規(guī)定活躍期結(jié)束后進(jìn)入休眠期,。設(shè)網(wǎng)絡(luò)中各個(gè)節(jié)點(diǎn)的非飽和負(fù)載到達(dá)過(guò)程互相獨(dú)立,,服從泊松過(guò)程(速率為λ)。由于節(jié)點(diǎn)工作過(guò)程是一個(gè)動(dòng)態(tài)的離散過(guò)程,,所以下面利用二維馬爾科夫鏈對(duì)節(jié)點(diǎn)的工作狀態(tài)建模,,模型如圖1所示。

tx5-t1.gif

    圖1中,,單個(gè)獨(dú)立節(jié)點(diǎn)按照超幀周期安排節(jié)點(diǎn)的工作狀態(tài),,H、A,、E和D分別是節(jié)點(diǎn)休眠狀態(tài),、節(jié)點(diǎn)后退等待狀態(tài),、節(jié)點(diǎn)信道監(jiān)測(cè)狀態(tài)和節(jié)點(diǎn)傳輸數(shù)據(jù)狀態(tài)。概率h和r分別表示節(jié)點(diǎn)兩次信道檢查失敗的概率,。而Ai,,k表示節(jié)點(diǎn)第i次檢查信道為不空閑后第k個(gè)時(shí)隙的等待狀態(tài)(i∈[0,maxNB],,k∈[0,Wi-1]),。maxNB是節(jié)點(diǎn)退避等待輪數(shù)NB的極限值。每輪退避等待的時(shí)間區(qū)間逐步加長(zhǎng),,以減少信道沖突現(xiàn)象,,節(jié)點(diǎn)第一輪退避等待的時(shí)間區(qū)間W0=2minBE,其第i次退避等待的時(shí)間區(qū)間Wi為W0 2i,,maxBE-minBE≤i≤maxBE,,minBE和maxBE為后退指數(shù)的最大、最小值,。g1是節(jié)點(diǎn)發(fā)送一個(gè)數(shù)據(jù)幀后沒(méi)有任務(wù)的概率,,g2表示節(jié)點(diǎn)休眠期結(jié)束后仍沒(méi)有發(fā)送任務(wù)的概率,參考文獻(xiàn)[1]的計(jì)算,,tx5-gs1-s1.gifTservice為單位數(shù)據(jù)包的平均服務(wù)時(shí)間。

    節(jié)點(diǎn)工作過(guò)程模型中各個(gè)狀態(tài)的轉(zhuǎn)移概率和穩(wěn)態(tài)概率方程描述如下[9]: 

tx5-gs1-11.gif

3 基于重傳的丟包率分析

    基于上文對(duì)數(shù)據(jù)幀重傳概率和基于重傳的丟包問(wèn)題的研究,,通過(guò)實(shí)驗(yàn)來(lái)定量分析802.15.4網(wǎng)絡(luò)中參數(shù)minBE,、NB以及λ、重傳概率,、誤碼率和節(jié)點(diǎn)數(shù)N等網(wǎng)絡(luò)環(huán)境參數(shù)對(duì)MAC層丟包率的影響,,同時(shí)也對(duì)本文提出的節(jié)點(diǎn)傳輸數(shù)據(jù)幀的工作過(guò)程模型進(jìn)行評(píng)價(jià)。

    假設(shè)λ為0~100包/s,。NB值為4~6,,每輪退避后信道檢查次數(shù)CW為2,BE值為2~5,。N為15,,信標(biāo)指數(shù)BO值為6,超幀指數(shù)SO為4,,數(shù)據(jù)包長(zhǎng)L為6時(shí)隙,。BI值為960×0.016×2BO,超幀活躍期為960×0.016×2SO,。接收信標(biāo)幀時(shí)間為T(mén)b=0.3 slot,。1 slot時(shí)間值為0.32 ms[2]。下面分析802.15.4MAC子層數(shù)據(jù)幀丟包率性能[12],。

3.1 重傳概率

    依據(jù)節(jié)點(diǎn)工作過(guò)程模型的數(shù)學(xué)分析和推導(dǎo)計(jì)算,,對(duì)節(jié)點(diǎn)的數(shù)據(jù)幀碰撞概率和重傳概率進(jìn)行分析,。如果多個(gè)網(wǎng)絡(luò)節(jié)點(diǎn)同時(shí)檢測(cè)到信道空閑,隨后向目的節(jié)點(diǎn)傳輸數(shù)據(jù),,目的節(jié)點(diǎn)發(fā)生數(shù)據(jù)幀碰撞的概率為:p沖突=1-(1-s)N-1,,其中s為節(jié)點(diǎn)開(kāi)始傳輸數(shù)據(jù)幀的概率,即是πD,。節(jié)點(diǎn)重傳概率可以表示為p重傳=p沖突×(1-c(m+1)) ,,c為節(jié)點(diǎn)兩次信道監(jiān)測(cè)都忙碌的概率。

    圖2是數(shù)據(jù)幀重傳概率隨數(shù)據(jù)包到達(dá)速率變化的趨勢(shì)圖,。顯然,,隨著λ的增大,重傳概率緩慢地增加,。

tx5-t2.gif

    如圖2所示,,NB和BE對(duì)重傳概率影響較小,BE越大重傳概率越小,,這說(shuō)明初始后退指數(shù)大時(shí),,節(jié)點(diǎn)檢查信道之前后退等待的時(shí)間稍長(zhǎng),網(wǎng)絡(luò)節(jié)點(diǎn)評(píng)估信道狀態(tài)不空閑的概率稍小,,MAC層碰撞概率稍低,。另外,后退次數(shù)NB越大時(shí),,重傳概率越小,。這是因?yàn)樵O(shè)置大的NB時(shí)節(jié)點(diǎn)后退等待的次數(shù)增多,其后退等待時(shí)間也相對(duì)長(zhǎng)些,,節(jié)點(diǎn)嘗試接入信道的概率降低,,信道發(fā)生沖突的概率自然減小。

3.2 重傳丟包率

    圖3為基于重傳機(jī)制的數(shù)據(jù)幀丟包率隨數(shù)據(jù)幀到達(dá)速率的變化趨勢(shì),。從圖中看出,,隨著λ的逐漸增大,數(shù)據(jù)幀的丟包率逐漸變大,,說(shuō)明節(jié)點(diǎn)數(shù)據(jù)發(fā)送負(fù)載比較小時(shí)MAC層的丟包率很低,。另外,最小后退指數(shù)minBE越大,,有重傳的數(shù)據(jù)幀丟包率越小,,這是因?yàn)楣?jié)點(diǎn)后退等待時(shí)間變長(zhǎng)之后,一定程度降低了信道的沖突概率,,有重傳的丟包率也相應(yīng)降低,。而后退次數(shù)NB越大,數(shù)據(jù)幀丟包率越小,這說(shuō)明節(jié)點(diǎn)檢查信道前的退避時(shí)間越長(zhǎng),,越可能降低信道沖突,,丟包現(xiàn)象相應(yīng)減少。圖3反映出在同等負(fù)載情形下,,NB對(duì)丟包率的影響比BE大,。

tx5-t3.gif

    圖4描述了基于重傳機(jī)制的數(shù)據(jù)幀丟包率隨重傳次數(shù)的變化趨勢(shì)。顯然,,重傳次數(shù)越多,,丟包率越小,說(shuō)明多次重傳會(huì)提高數(shù)據(jù)幀的成功發(fā)送幾率,,這符合網(wǎng)絡(luò)節(jié)點(diǎn)的工作特點(diǎn),。而且,重傳次數(shù)對(duì)丟包率的影響較大,。

tx5-t4.gif

    從圖5中看出,,隨著信道誤包率的增大,數(shù)據(jù)幀的丟包率快速的增大,。這說(shuō)明信道質(zhì)量對(duì)MAC層的影響很大,。另外,圖5反映出在同等信道質(zhì)量狀態(tài)時(shí),,BE 和NB對(duì)丟包率的影響不是很大,。例如minBE越小時(shí),節(jié)點(diǎn)后退等待時(shí)間相對(duì)縮短在一定程度上加重了數(shù)據(jù)幀的碰撞,,增大了數(shù)據(jù)丟包率,。并且NB越小,數(shù)據(jù)幀丟包率越大,。這是因?yàn)檩^小的NB減少了節(jié)點(diǎn)的后退避讓時(shí)間,,相應(yīng)加劇了信道沖突,。

tx5-t5.gif

    圖6是有無(wú)重傳機(jī)制的數(shù)據(jù)幀丟包率比較,。從實(shí)驗(yàn)數(shù)據(jù)看出,相對(duì)于無(wú)重傳機(jī)制,,有重傳機(jī)制的丟包率明顯低得多,,數(shù)據(jù)幀丟包率降低了88.9%左右,這說(shuō)明加入重傳過(guò)程后,,MAC層的數(shù)據(jù)發(fā)送成功概率增加幅度很大,,有效提高了信道中數(shù)據(jù)傳輸?shù)目煽啃浴?/p>

tx5-t6.gif

    基于上述重傳概率和丟包率性能的分析,說(shuō)明802.15.4協(xié)議參數(shù)對(duì)MAC層的數(shù)據(jù)傳輸有重要的影響,?;诒疚奶岢龅墓?jié)點(diǎn)工作過(guò)程模型能夠科學(xué)地分析和配置網(wǎng)絡(luò)參數(shù),為802.15.4 網(wǎng)絡(luò)的具體應(yīng)用提供優(yōu)化依據(jù),。

4 結(jié)語(yǔ)

    為了提高802.15.4網(wǎng)絡(luò)數(shù)據(jù)傳輸成功率,,本文重點(diǎn)分析基于重傳的數(shù)據(jù)幀丟包問(wèn)題,,研究節(jié)點(diǎn)在MAC層傳輸數(shù)據(jù)的工作過(guò)程。通過(guò)對(duì)該過(guò)程建模中節(jié)點(diǎn)主要狀態(tài)的概率分析,,分析基于重傳機(jī)制下的丟包率,,研究協(xié)議參數(shù)和網(wǎng)絡(luò)環(huán)境參數(shù)對(duì)丟包率的影響。研究表明:提出的模型能正確分析節(jié)點(diǎn)的工作特點(diǎn)和丟包率性能指標(biāo),,參數(shù)的均衡配置能夠降低數(shù)據(jù)幀丟包率,。下一步針對(duì)協(xié)議的核心退避算法,設(shè)計(jì)優(yōu)化策略,,深入研究協(xié)議的性能和推廣應(yīng)用,。

參考文獻(xiàn)

[1] RAMACHANDRAN I,DAS A K,,ROY S.Analysis of the contention access period of IEEE 802.15.4 MAC[J].ACM Transactions on Sensor Networks,,2007,3(1):319-321.

[2] HE J,,TANG Z,,CHEN H H,et al.An accurate Markov model for slotted CSMA/CA algorithm in IEEE 802.15.4 networks[J].IEEE Communications Letters,,2008,,12(6):420-422.

[3] Wen Hao,Lin Chuang,,Chen Zhijia,,et al.An improved Markov model for IEEE 802.15.4 slotted CSMA/CA mechanism[J].Journal of Computer Science and Technology,2009,,24(3):495-504.

[4] PARK P,,ERGEN S C,F(xiàn)ISCHIONE C,,et al.Duty-cycle optimization for IEEE 802.15.4 wireless sensor networks[J].ACM Transactions on Sensor Networks(TOSN),,2013,10(1):739-751.

[5] 陸陽(yáng),,方梅,,官駿鳴,等.非飽和態(tài)802.15.4網(wǎng)絡(luò)吞吐量建模分析[J].系統(tǒng)仿真學(xué)報(bào),,2010,,22(4):1037-1041.

[6] 程遠(yuǎn),張?jiān)?,高西?差錯(cuò)信道下無(wú)線局域網(wǎng)丟包率性能分析[J].通信學(xué)報(bào),,2007,28(5):126-131.

[7] 周祥云,錢(qián)慧,,余輪.低丟包率無(wú)線傳感器網(wǎng)絡(luò)S-MAC協(xié)議的研究[J].計(jì)算機(jī)科學(xué),,2011,38(10A):367-369.

[8] 李志華,,連彬,,魏忠誠(chéng),等.無(wú)線傳感器網(wǎng)絡(luò)能效和延時(shí)性能分析[J].計(jì)算機(jī)應(yīng)用研究,,2014,,31(8):2473-2476.

[9] PRASAD Y,PACHAMUTHU R.Analytical model of adaptive CSMA-CA MAC for reliable and timely clustered wireless multi-hop communication[C].Internet of Things(WF-IoT),,2014 IEEE World Forum on.IEEE,,2014:212-217.

[10] PARK P,MARCO P D,,F(xiàn)ISCHIONE C,,et al.Modeling and optimization of the IEEE 802.15.4 protocol for reliable and timely communications[J].IEEE Transactions on Parallel and Distributed Systems,2013,,24(3):550-564.

[11] 郭寧,,毛劍琳,王瑞,,等.基于M/G/1/K排隊(duì)理論的IEEE 802.15.4網(wǎng)絡(luò)吞吐量分析[J].計(jì)算機(jī)應(yīng)用,,2014,34(3):619-622.

[12] 程宏斌,,王曉楠,,孫霞,等.6LoWPAN網(wǎng)絡(luò)節(jié)點(diǎn)信道接入延時(shí)性能研究[J].計(jì)算機(jī)應(yīng)用研究,,2013,,30(1):246-248.

此內(nèi)容為AET網(wǎng)站原創(chuàng),未經(jīng)授權(quán)禁止轉(zhuǎn)載,。