zl程序教程

您现在的位置是:首页 >  其他

当前栏目

基于犹豫模糊逻辑的无线传感器网络温度自适应多属性睡眠调度算法(Matlab代码实现)

2023-09-14 09:14:28 时间

 👨‍🎓个人主页:研学社的博客  

💥💥💞💞欢迎来到本博客❤️❤️💥💥

🏆博主优势:🌞🌞🌞博客内容尽量做到思维缜密,逻辑清晰,为了方便读者。

⛳️座右铭:行百里者,半于九十。

📋📋📋本文目录如下:🎁🎁🎁

目录

💥1 概述

📚2 运行结果

🎉3 参考文献

🌈4 Matlab代码实现


💥1 概述

FL-Sleep 算法允许传感器节点智能地决定合适的状态转换。该算法负责环境以及不同的节点属性,并使用犹豫模糊逻辑和多准则决策(MCDM)技术做出合适的睡眠调度决策。该算法在无线传感器网络的网格拓扑和螺旋拓扑上进行了测试,并将各自的性能与最先进的技术进行了比较。

📚2 运行结果

 

部分代码:

f1=figure;
f2=figure;
Temperature=xlsread('dayTemp-80','A4:A27');
PacketDeliveryRatio_FL_Sleep=xlsread('FL-Sleep_new','Spiral','E43:E66');
PacketDeliveryRatio_BMAC=xlsread('FL-Sleep_new','Spiral','C43:C66');
PacketDeliveryRatio_SOPC=xlsread('FL-Sleep_new','Spiral','B43:B66');
PacketDeliveryRatio_RL_Sleep=xlsread('FL-Sleep_new','Spiral','D43:D66');

EnergyConsumed_FL_Sleep=xlsread('FL-Sleep_new','Spiral','J43:J66');
EnergyConsumed_BMAC=xlsread('FL-Sleep_new','Spiral','H43:H66');
EnergyConsumed_SOPC=xlsread('FL-Sleep_new','Spiral','G43:G66');
EnergyConsumed_RL_Sleep=xlsread('FL-Sleep_new','Spiral','I43:I66');

ActiveNodeRatio_FL_Sleep=xlsread('FL-Sleep_new','Spiral','O43:O66');
ActiveNodeRatio_BMAC=xlsread('FL-Sleep_new','Spiral','M43:M66');
ActiveNodeRatio_SOPC=xlsread('FL-Sleep_new','Spiral','L43:L66');
ActiveNodeRatio_RL_Sleep=xlsread('FL-Sleep_new','Spiral','N43:N66');

Remain_Energy_RL_Sleep=xlsread('SPIRAL_FL-Sleep','REM_E','S6:S572');
Remain_Energy_BMAC=xlsread('SPIRAL_FL-Sleep','REM_E','T6:T484');
Remain_Energy_SOPC=xlsread('SPIRAL_FL-Sleep','REM_E','R6:R557');
Remain_Energy_FL_Sleep=xlsread('SPIRAL_FL-Sleep','REM_E','U6:U600');
figure(f1);
figure_size = [900, 700, 450, 420];
plot(Remain_Energy_RL_Sleep,'-*g','Linewidth',1)
hold on
plot(Remain_Energy_BMAC,'-ob','Linewidth',1)
hold on
plot(Remain_Energy_SOPC,'-dk','Linewidth',1)
hold on
plot(Remain_Energy_FL_Sleep,'-sr','Linewidth',1)
title('Remain_Energy of nodes')
ylabel('Remaining Energy (J)','FontSize',18)
xlabel('Number of rounds','FontSize',18)
legend({'RL-Sleep', 'BMAC', 'SOPC', 'FL-Sleep'})
set(gca, 'FontSize',9, 'FontName','Times New Roman')
set(gcf, 'Position', figure_size )
hold off
%saveas(gcf, '../results/FL_sleep_SPIRAL/fig1.png')

hold off

figure(f2);
subplot(6,1,1)
plot(Temperature)
% subplot(6,2,2)
% plot(Temperature)
subplot(6,1,2)
plot(PacketDeliveryRatio_RL_Sleep,'-*g','Linewidth',1)
hold on
plot(PacketDeliveryRatio_BMAC,'-ob','Linewidth',1)
hold on
plot(PacketDeliveryRatio_SOPC,'-dk','Linewidth',1)
hold on
plot(PacketDeliveryRatio_FL_Sleep,'-sr','Linewidth',1)
title('PacketDeliveryRatio_SPIRAL')
hold off

subplot(6,1,3)
plot(EnergyConsumed_RL_Sleep,'-*g','Linewidth',1)
hold on
plot(EnergyConsumed_BMAC,'-ob','Linewidth',1)
hold on
plot(EnergyConsumed_SOPC,'-dk','Linewidth',1)
hold on
plot(EnergyConsumed_FL_Sleep,'-sr','Linewidth',1)
title('EnergyConsumed_SPIRAL')
hold off


subplot(6,1,4)
plot(ActiveNodeRatio_RL_Sleep,'-*g','Linewidth',1)
hold on
plot(ActiveNodeRatio_BMAC,'-ob','Linewidth',1)
hold on
plot(ActiveNodeRatio_SOPC,'-dk','Linewidth',1)
hold on
plot(ActiveNodeRatio_FL_Sleep,'-sr','Linewidth',1)
title('ActiveNodeRatio_SPIRAL')
legend({'RL-Sleep', 'BMAC', 'SOPC', 'FL-Sleep'})
set(gcf, 'Position', figure_size )
hold off
%saveas(gcf, '../results/FL_sleep_SPIRAL/fig2.png')

%%########-----SPIRAL NETWORK SIMULATION GRAPH UPTO HERE----########
%%########-----SPIRAL NETWORK SIMULATION GRAPH UPTO HERE----########
%%########-----SPIRAL NETWORK SIMULATION GRAPH UPTO HERE----########

🎉3 参考文献

部分理论来源于网络,如有侵权请联系删除。

[1]Partha Sarathi Banerjee, Satyendra Nath Mandal, Debashis De, Biswajit Maiti (2022) FL-Sleep: Temperature Adaptive Multi-Attribute Sleep-Scheduling Algorithm using Hesitant Fuzzy Logic for Wireless Sensor Networks

🌈4 Matlab代码实现