資源簡介
IEEE TRANSACTIONS ON VEHICULAR TECHNOLOGY 上一篇 Comprehensive Evaluation of the IEEE 802.15.4 MAC Layer Performance With Retransmissions的源代碼,很有幫助,對于研究wireless sensor network、MAC仿真很有幫助。
代碼片段和文件信息
%?Version?1.0
%?CSMA/CA?SIMULATOR?based?on?the?simplified?model?for?802.15.4?with?
%?acknowledgements?and?retransmissions?presented?in?the?following?paper:
%
%?A.?Faridi?M.R.?Palattella?A.?Lozano?Mischa?Dohler?G.?Boggia?
%?A.?Grieco?and?P.?Camarda?“Comprehensive?Evaluation?of?the?IEEE?
%?802.15.4?MAC?layer?Performance?with?Retransmissions“?IEEE?Transactions?
%?on?Vehicular?Technology?Vol.?59?No.?8?pp?3917-3932?Oct.?2010.
%
%?Which?is?available?at:
%?http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=5540318
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%?This?file?is?licensed?under?the?Creative?Commons?Attribution?3.0 %
%?Unported?license?(http://creativecommons.org/licenses/by/3.0/). %
% %
%?????You?are?free: %
%?????????*?to?share?:?to?copy?distribute?and?transmit?the?work %
%?????????*?to?remix?:?to?adapt?the?work %
% %
%?????Under?the?following?condition: %
%?????????*?attribution?:?You?must?attribute?the?work?in?the?manner %
% specified?by?the?author?or?licensor?(but?not?in?any?way %
% that?suggests?that?they?endorse?you?or?your?use?of?the %
% work). %
% %
%?To?attribute?please?cite?the?following?article?in?your?work: %
%?A.?Faridi?M.R.?Palattella?A.?Lozano?Mischa?Dohler?G.?Boggia??????%
%?A.?Grieco?and?P.?Camarda?“Comprehensive?Evaluation?of?the?IEEE???????%
%?802.15.4?MAC?layer?Performance?with?Retransmissions“?IEEE?Trans.?on??%
%?Vehicular?Technology?Vol.?59?No.?8?pp?3917-3932?Oct.?2010.????????%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
clear
close?all
t_start?=?clock
tt?=?6?%?the?simulation?will?run?for?10^tt?(recommended?value:?tt?=?8)
%?L?is?the?packet?length.?Always?set?minL?=?maxL.?See?explanation?for?LL.
minL?=?7;
maxL?=?7;
stepL?=?1;
%?N?is?the?number?of?nodes?in?the?network
minN?=?2;
maxN?=?30;
stepN?=?1;
aMinBE?=?3;
aMaxBE?=?5;
M?=?4;?%?max(NB)
R?=?3;?%?max?#?retransmission
W0?=?2^aMinBE;
d?=?aMaxBE?-?aMinBE;
L_Ack?=?2;
%?creating?filenames?for?saving?data
fsuffix?=?strcat(‘_BE‘num2str(aMinBE)‘_‘num2str(aMaxBE)‘_L‘num2str(minL)‘_‘num2str(maxL)‘_N‘num2str(minN)‘_‘num2str(maxN)‘_M‘num2str(M)‘_R‘num2str(R)‘_T‘num2str(tt));
fname_data?=?strcat(‘data/‘datefsuffix);
T?=?10^tt;?%nb?of?slots?simulation?runs
N?=?minN:stepN:maxN;
LL?=?minL:stepL:maxL; %?Note:?this?range?for?L?is?kept?from?an?older?
%?version?for?legacy.?However?LL?has?to?be?scalar?
%?otherwise?the?code?will?not?run?properly.?For?
%?running?for?vector?LL?the?code?has?to?be?modified.
%-------------------------------------------------------------------------
%?Initializing?variables?
%-------------------------------------------------------------------------
%?The?following?parameters?are?counted?for?node?1?only?(reference?node)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
nbBsuc?=?zeros(length(LL)length
- 上一篇:圖像的RGB特征提取代碼
- 下一篇:永磁直驅電機控制仿真simuli
nk模式
評論
共有 條評論