【无人机任务分配】基于合同网协议(CNP算法)实现多无人机具有时间窗口和优先级约束任务分配及跟踪问题附matlab代码

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

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

🍊个人信条:格物致知。

更多Matlab仿真内容点击👇

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

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

⛄ 内容介绍

多无人机(UAV)协同目标分配是多无人机协同控制的重要内容之一.针对多无人机协同侦察问题,以提高作战效能,减少侦察代价和任务完成时间为目的进行目标分配,首先建立了目标分配问题的数学模型,在初始分配的基础上,使用基于合同网的目标分配方法,引入负载系数参数,最后通过迭代执行买卖合同与交换合同实现了任务的合理分配.由仿真结果可知,算法能够给出很好的优化效果的分配方案,并有很好的可扩展性.​

⛄ 部分代码

close all

clc

clear

num_of_UAVs = 4; % Num of UAVs

time = 1300;

sample_arena = Arena; % Arena , If you want to change the position of static 

% Obstacals, see the Arena.m file

tic

for i = 1:1:num_of_UAVs

    % Initialising the Aircrafts

    UAVs(i) = AirCraft(i);

end

sample_mission_planner = mission_planner(UAVs, sample_arena );

% Initialising the mission planner

N = time/sample_arena.dt;

%% Loop run

for i = 1:1:N

    

    for k = 1:1:numel(UAVs)

        

        sample_mission_planner.plan_mission(k);

        % Plan mission i,e get the new command for the k-th UAV

    end

    

    for k = 1:1:numel(UAVs)

        UAVs(k).move(sample_arena);

        % move the K-th UAV

    end

   

end

toc

%% Figure plots

figure (1);

hold on

for l = 1:1:num_of_UAVs

    X = [UAVs(l).vehical_log.x];

    Y = [UAVs(l).vehical_log.y];

    Z = [UAVs(l).vehical_log.h];

    if l == 1

        plot3(X , Y , Z,'y')

    elseif l == 2

        plot3(X , Y , Z , 'g')

           elseif l == 3

        plot3(X , Y , Z , 'k')

        

    end

    

end

buildings = sample_arena.static_object;

plot([buildings(1).x;buildings(2).x;buildings(3).x;buildings(4).x] , [buildings(1).y;buildings(2).y;buildings(3).y;buildings(4).y],'bs')

title('Routes followed by the UAVs','fontsize',7)

xlabel('East(m)')

ylabel('North(m)')

zlabel('Up(m)')

axis equal , grid on , pause(0.01),hold off;

for i = 1:1:num_of_UAVs

    

    speed(:,i) = [UAVs(i).vehical_log.v];

    heading(:,i) = [UAVs(i).vehical_log.psi];

    bank(:,i) = [UAVs(i).vehical_log.phi];

    height(:,i) = [UAVs(i).vehical_log.h];

    

end

figure(3)

subplot(4,1,1)

plot(speed)

xlabel('time (s)','fontsize',7)

ylabel('air spd (m/s)','fontsize',7)

subplot(4,1,2)

plot(heading)

xlabel('time (s)','fontsize',7)

ylabel('hdg (deg)','fontsize',7)

subplot(4,1,3)

plot(bank)

xlabel('time (s); solid - actual; dotted - cmd','fontsize',7)

ylabel('bank (deg)','fontsize',7)

subplot(4,1,4)

plot(height)

xlabel('time (s)','fontsize',7)

ylabel('ht (m)','fontsize',7)

⛄ 运行结果

⛄ 参考文献

[1] 钱艳平, 夏洁, 刘天宇. 基于合同网的无人机协同目标分配方法[C]// CNKI. CNKI, 2011:5.

[2] 常松, 贾子彦. 基于改进合同网算法的多无人机任务分配[J]. 物联网技术, 2020, 10(5):3.

⛳️ 代码获取关注我

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

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

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

打赏作者

matlab科研助手

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

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

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

打赏作者

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

抵扣说明:

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

余额充值