无人驾驶飞行器 (UAV) 以飞行基站 (FBS) 的形式辅助 5G 通信附matlab代码

✅作者简介:热爱科研的Matlab仿真开发者,修心和技术同步精进,matlab项目合作可私信。

🍎个人主页:Matlab科研工作室

🍊个人信条:格物致知。

更多Matlab仿真内容点击👇

智能优化算法       神经网络预测       雷达通信       无线传感器        电力系统

信号处理              图像处理               路径规划       元胞自动机        无人机 

⛄ 内容介绍

调查无人驾驶飞行器(UAV)以飞行基站(FBS)的形式辅助5G通信。所部署的技术包括评估、改进和开发优化方法,以引导携带飞行基站(FBS)的无人机增强地面5G网络基础设施。一种方法是通过视线(LoS)通信有效地收集和传输数据,以支持闪光的人群,机器类型的通信(IoT),分析能源消耗,和完成任务的总时间。

⛄ 部分代码

theta = 0; %initial angle

d=zeros(100,18)% to get cost of the 2opt for 100 which is the monte carlo iterations and 18 which is the number of time the angle is shifted

dist=zeros(100,1)%to get cost of the 2opt for 100 which is the monte carlo iterations at each iteration of kmean clustering

j=0

for mc= 1:100

    j=j+1

    n=50% n was tested to be 5 20 50 90 number of nodes

    % number of points that you want

    center = [2 ,2]; % center coordinates of the circle [x0,y0]

    radius = 2; % radius of the circle

    angle = 2*pi*rand(n,1);

    rng(j)%fixing the point for the whole experiment in each generation

    r = radius*sqrt(rand(n,1));

    x = center(1)+r.*cos(angle) ;

    y = center(2)+r.*sin(angle);

    x(1)=2;

    y(1)=2;

    v=[x,y]

    opts = statset('Display','final');

    [cidx, ctrs,dis] = kmeans(v, 4, 'Distance','city', ...

        'Replicates',5, 'Options',opts);

    figure(1)

    plot(v(cidx==1,1),v(cidx==1,2),'r.', ...

        v(cidx==4,1),v(cidx==4,2),'y.', ...

        v(cidx==3,1),v(cidx==3,2),'g.', ...

        v(cidx==2,1),v(cidx==2,2),'b.', ctrs(:,1),ctrs(:,2),'kx');

    legend('first cluster group','second cluster group ','third cluster group ','fourth cluster group ','centroid')

    %running 2opt on the kmean clustering

    X = v(cidx==1, :);

    s = size(X,1);

    [p,d11] = tspsearch(X,s);

    figure(2)

    tspplot(p,X,1)

    legend('UAV route','cluster points ');

    X = v(cidx==2, :);

    s = size(X,1);

    [p,d22] = tspsearch(X,s);

    figure(3)

    tspplot(p,X,1)

    legend('UAV route','cluster points ');

    X = v(cidx==3, :);

    s = size(X,1);

    [p,d33] = tspsearch(X,s);

    figure(4)

    tspplot(p,X,1)

    legend('UAV route','cluster points ');

    X = v(cidx==4, :);

    s = size(X,1);

    [p,d44] = tspsearch(X,s);

⛄ 运行结果

⛄ 参考文献

⛳️ 代码获取关注我

❤️部分理论引用网络文献,若有侵权联系博主删除

❤️ 关注我领取海量matlab电子书和数学建模资料

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

matlab科研助手

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值