没有合适的资源?快使用搜索试试~ 我知道了~
LEACH协议,全称是“低功耗自适应集簇分层型协议” (Low Energy Adaptive Clustering Hierarchy),是一种无线传感器网络路由协议。基于LEACH协议的算法,称为LEACH算法。
资源推荐
资源详情
资源评论
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![application/x-rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![application/msword](https://img-home.csdnimg.cn/images/20210720083327.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![m](https://img-home.csdnimg.cn/images/20210720083646.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![text/plain](https://img-home.csdnimg.cn/images/20210720083646.png)
![application/x-rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![application/x-rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![](https://csdnimg.cn/release/download_crawler_static/89479083/bg1.jpg)
Matlab Code for LEACH
NodeNums = 100; % the num of node
AreaR = 100 ; % the area of simulate
NodeTranR=10; % the transit Radius
Elec=50 * 10^(-9); %
Eamp=100*10^(-12);
Bx=50; % The Postion of Baseation
By=175;
MaxInteral =700; % the leach simulate time
Pch=0.05; % the desired percentage of cluster heads
InitEn=0.5; % the init energy of all node
Tr=30;
TDMA=100;
Kbit=2000; % the bits of a node transmiting a packet every time
BandWitch = 1*10.^(6); % Channel Bandwitch
TOS_LOCAL_ADDRESS = 0;
for i=1:(MaxInteral)
AliveNode(i)=NodeNums;
AmountData(i)=0;
end
sym alldata;
alldata=0;
LAECH = zeros(1,MaxInteral);
LAENO = zeros(1,MaxInteral);
for i=1:1:NodeNums
EnNode(i)=InitEn; % the init energy of all node
StateNode(i)=1; % the State of all node 1: alive 0:dead
ClusterHeads(i)=0; % the Set of Cluster Head ,1: cluster head 0 :node
Rounds=0; % the round
end
Threshold=0; % the threshold of node becoming a cluster-head
Node.x=AreaR*rand(1,NodeNums); % the position of node
Node.y=AreaR*rand(1,NodeNums);
Node.c=zeros(1,NodeNums);
Node.d=zeros(1,NodeNums);
Node.l=zeros(1,NodeNums);
Node.csize=zeros(1,NodeNums);
Node.initclEn=zeros(1,NodeNums);
% for i=1:NodeNums
% Node.c(i)=0; % the Cluster head of node
资源评论
![avatar-default](https://csdnimg.cn/release/downloadcmsfe/public/img/lazyLogo2.1882d7f4.png)
![avatar](https://profile-avatar.csdnimg.cn/default.jpg!1)
大雨淅淅
- 粉丝: 719
- 资源: 156
上传资源 快速赚钱
我的内容管理 展开
我的资源 快来上传第一个资源
我的收益
登录查看自己的收益我的积分 登录查看自己的积分
我的C币 登录后查看C币余额
我的收藏
我的下载
下载帮助
![voice](https://csdnimg.cn/release/downloadcmsfe/public/img/voice.245cc511.png)
![center-task](https://csdnimg.cn/release/downloadcmsfe/public/img/center-task.c2eda91a.png)
安全验证
文档复制为VIP权益,开通VIP直接复制
![dialog-icon](https://csdnimg.cn/release/downloadcmsfe/public/img/green-success.6a4acb44.png)