您现在的位置:首页 >> 网络协议 >> 内容

基于TPC算法的WSN网络资源分配matlab仿真

时间:2023/3/15 21:40:33 点击:

  核心提示:A519,包括程序操作录像...

1.完整项目描述和程序获取

>面包多安全交易平台:https://mbd.pub/o/bread/ZJaYlJdu

>如果链接失效,可以直接打开本站店铺搜索相关店铺:

点击店铺

>如果链接失效,程序调试报错或者项目合作可以加微信或者QQ联系。

2.部分仿真图预览



3.算法概述

       资源及资源分配、网络架构、信息交互是移动通信系统运行的三大要素。移动通信业务质量的高低往往也取决于可分配资源的多少及资源分配的效率、网络架构的优劣、信息交互的效果。

4.部分源码

............................................................................

for ij=1:20

    for NU=1:40

        [ij,NU]

        P_bar         = ones(1,NU*4)/500;

        Gamma_hat     = ones(1,NU*4)/10;

    

        [D,Users, BS] = wsns(NU);

        H             = Pathloss_Gain(D,0.09,-3);

    

        initial_power = ones(1,NU*4).*(rand(1,NU*4)*10^-3);

............................................................................

        Outage_Probability1(NU,ij) = TPC_SR_Outage_probability;

        Outage_Probability2(NU,ij) = TPC_Outage_probability;

        

        Aggregate_Power1(NU,ij)    = TPC_SR_Aggregate_power; 

        Aggregate_Power2(NU,ij)    = TPC_Aggregate_power; 

    end

end

L1=length(H(:,1));

L2=length(H(1,:));

 

iteration=50;

 

figure;

subplot(211)

for i=1:4:L2

    plot(1:iteration,P_TPC_SR(:,i));

    grid on;

    xlabel('Iterations');

    ylabel('TPC-SR Powers');

    hold on;

end

 

subplot(212)

for i=1:4:L2

    plot(1:iteration,P_TPC(:,i));

    grid on;

    xlabel('iterations');

    ylabel('TPC Powers');

    hold on;

end

 figure;

 subplot(121)

 plot(4:4:NU*4,mean(Outage_Probability1(1:NU,:),2),'-bs',...

    'LineWidth',1,...

    'MarkerSize',6,...

    'MarkerEdgeColor','k',...

    'MarkerFaceColor',[0.9,0.0,0.0]);

 hold on;

 plot(4:4:NU*4,mean(Outage_Probability2(1:NU,:),2),'-r>',...

    'LineWidth',1,...

    'MarkerSize',6,...

    'MarkerEdgeColor','k',...

    'MarkerFaceColor',[0.9,0.9,0.0]);

 grid on;

 legend('TPC-SR','TPC');

 xlabel('用户数量');

 ylabel('停机概率');

 subplot(122)

 plot(4:4:NU*4,mean(Aggregate_Power1(1:NU,:),2),'-bs',...

    'LineWidth',1,...

    'MarkerSize',6,...

    'MarkerEdgeColor','k',...

    'MarkerFaceColor',[0.9,0.0,0.0]);

 hold on;

 plot(4:4:NU*4,mean(Aggregate_Power2(1:NU,:),2),'-r>',...

    'LineWidth',1,...

    'MarkerSize',6,...

    'MarkerEdgeColor','k',...

    'MarkerFaceColor',[0.9,0.9,0.0]);

 grid on,;

 legend('TPC-SR','TPC');

 xlabel('用户数量');

 ylabel('总功率(W)');

a519

作者:我爱C编程 来源:我爱C编程
本站最新成功开发工程项目案例
相关评论
发表我的评论
  • 大名:
  • 内容:
本类固顶
  • 没有
  • FPGA/MATLAB商业/科研类项目合作(www.store718.com) © 2025 版权所有 All Rights Reserved.
  • Email:1480526168@qq.com 站长QQ: 1480526168