小学网站建设实施方案,广州公司注册网址,网站建设后如何修改,前端做网站难吗目录
#x1f4a5;1 概述
#x1f4da;2 运行结果
#x1f389;3 参考文献
#x1f468;#x1f4bb;4 Matlab代码 #x1f4a5;1 概述
无线传感器网络#xff08;WSN#xff09;由数十个、数百个甚至数千个自主传感器组成。这些传感器以无线方式嵌入环境中1 概述
2 运行结果
3 参考文献
4 Matlab代码 1 概述
无线传感器网络WSN由数十个、数百个甚至数千个自主传感器组成。这些传感器以无线方式嵌入环境中彼此相距一定距离进行通信其任务是发现和聚集环境信息并将其传输到监测中心。传感器节点的连续移动及其有限的电池功率会导致这些类型网络的路由问题。因此在无线传感器网络中提供可靠和安全的协议似乎至关重要。本文的主要重点是利用人工智能技术如聚类和粒子群优化PSO算法在无线传感器网络中找到安全高效的路由模型。 2 运行结果 主函数部分代码
function Init
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% PARAMETERS %%%%%%%%%%%%%%%%%%%%%%%%%%%%
%Field Dimensions - x and y maximum (in meters)
run1;
iteration1;
PopNum30;
VelocityLimit3.83;
xRank13.33;
RepLimit 100; % repository limitation number . we can not exceed this number of record in repository
ObjNum2;
R 6;
C1 [1.3 1.5 1.8 1.9 2]; % C1 nd C2 range
Weight [0.6 0.7 0.8 0.9 1]; % W range
%Energy Model (all values in Joules)
%Initial Energy
Eo8;
NodeNum400;
PlotSizeX100;
PlotSizeY100;
XPlotSizeX*rand(1,NodeNum);
YPlotSizeY*rand(1,NodeNum);
EEo*ones(1,NodeNum); %Initil Energy
sender.x0;
sender.y0;
%x and y Coordinates of the Sink
sink.xPlotSizeX/2;
sink.yPlotSizeY/2;
% % %Number of Nodes in the field
% % n300;
% % %Optimal Election Probability of a node
% % %to become cluster head
% % p0.2;
%EelecEtxErx
ETX50*0.000000001;
ERX50*0.000000001;
%Transmit Amplifier types
Efs10*0.000000000001;
Emp0.0013*0.000000000001;
%Data Aggregation Energy
EDA5*0.000000001;
%maximum number of rounds
rmax5;
%%%%%%%%%%%%%%%%%%%%%%%%% END OF PARAMETERS %%%%%%%%%%%%%%%%%%%%%%%%
%Computation of do
dosqrt(Efs/Emp);
MutualDominance1;
MobilityRate2;%movement rate of sink
Step150; %step of modeling
BsTrackX[sink.x];
BsTrackY[sink.y]; % save the track of x and y coordinate of sink
energy_values[];
fitness[];
clusters[];
index_energy1;
index_fitness1;
cluster_index1;
for w1:StepTrackSizesize(BsTrackX);[sink.x sink.y]NodeMovement(BsTrackX(TrackSize(2)),BsTrackY(TrackSize(2)),PlotSizeX,PlotSizeY,MobilityRate);BsTrackX[BsTrackX sink.x];BsTrackY[BsTrackY sink.y];SenderNumceil(rand()*7);for jj1:SenderNumIceil(NodeNum*rand());while (E(I)0)Iceil(NodeNum*rand());endsender.xX(I);sender.yY(I);for ii1:run[OutputParticleAC OutputParticleVal OutputFitness OutputRepSize Energy]PSO(iteration,X,Y,E,sink,sender,xRank,RepLimit,PopNum,C1(3),Weight(4),ETX,EDA,Emp,NodeNum,PlotSizeX,ObjNum,do,VelocityLimit,R,Efs,MutualDominance,I,MobilityRate);end endEEnergy;energy_values(index_energy,1:NodeNum)E;fitness(index_fitness,1)OutputFitness(1,1); clusters(cluster_index,1)-OutputFitness(1,2);cluster_indexcluster_index1;index_fitnessindex_fitness1;index_energyindex_energy1;disp([end of step ,num2str(w), ]);
end3 参考文献
[1]蒋溢. 无线传感器网络路由安全关键技术研究[D].电子科技大学,2015.
部分理论引用网络文献若有侵权联系博主删除。