1 内容介绍

现代社会的无人机成本造价低、不易损耗、轻巧灵便、易躲藏、能精确打击

目标这些特点,使其在一些高危任务中发挥了不可替代的作用[5]。无人机的用处主要有两种:民用和军事。在民用方面,我们可以运用无人机对一些可能出现隐患的事物进行监控,比如对震后灾区的地面勘探、森林火灾的检测、风暴中心的气象数据等。在 2014 索契奥运会上,无人机携带的摄像拍摄的画面更贴近运动员,画质更为清晰,2018 中国新年春晚上大量无人机组成的海豚造型惊艳了世界。在军事方面,我们可以运用无人机进行一些特殊任务的执行,比如对毒贩的监视工作,边境的巡防工作,无人机侦查、搜救、预警等。无人机的运用使我们在一些事情上实现了无人员伤亡。军事无人机是当今时代无人机技术的高水准体现。伴随着日益成熟的无人机技术,对航路规划的研究也愈加深入。航路规划的前提是在一定的约束条件下,然后寻求可飞行航路。对于无人机而言它自身的主要约束条件有:最大的载重量、可以上升的门限高度、空载时耗油量、起飞时承载的重量等,在飞行时要考虑地形存在的威胁和是否存在禁飞区等。相对国外研究,我国还没有比较成熟的航路规划体系,但是对航路规划的研究热情我国日益加强.飞行过程中有时会遇到一些突发事故,无人机在此时不能按照预先规划的航迹继续进行,需要无人机能够在当前的环境下动态的规划出一条满足要求的航路,也说明了航路规划的静态和实时动态规划相结合的算法是我们未来的一个研究趋势。

随着现代社会的不断发展,电子信息技术研究不断深入,无人机航路规划越

来越智能化。现代社会由于飞机的特殊性,其安全性一直是我们最为关心的话题,因为一旦发生一点点事故,往往伴随着生命的代价,所以在面对一些内部环境比较复杂的地方时,可以使用一些有着特殊功能的无人机,它们在无人的状态下可以将性能调整到最优,在执行任务的过程中不用担心其产生人员伤亡,而且无人机的活动区域比较广泛,不限单次使用,能够执行多种任务。现代战场上无人机的威力发挥很大程度上取决于航路规划的合理性。根据模型,航路规划通常会产生很多条满足条件的航路,而我们要做的就是快速、准确找到这些满足要求航路中的最优一条。随着无人机的硬件和软件技术的不断成熟,无人机航路规划技术也必将得到更好的发展和更广泛的应用.​

2 仿真代码

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% E150 Genetic Algorithm Evolution Visualizer
% Avery Rock, UC Berkeley Mechanical Engineering, avery_rock@berkeley.edu
% Written for E150, Fall 2019.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

function familyTree(Orig, parents, pop)
%%

% Inputs: 
%   Orig -- the indices of a sorted GA generation from before sorting (see sort() documentation), 
%   parents -- the number of parents, required for interpreting source
%   pop --  the number of performers to plot. Use pop >= parents. 

% Returns: 
% no variables, plots a representation of the evolution history to the current figure. 

% The function automatically ignores generations where no rank changes
% occur among the parents OR there are any repeated indices (indicating
% incorrect data). 

% Data visualization: This function can be used to visualize and interpret the performance of
% your GA iteration process. Gray lines represent "survival" with or
% without a rank change. Red lines represent breeding (e.g.,  a new string
% will be connected to its parents with red lines). New random strings have
% no connections. A surviving string will be represented with gray, a new
% string generated randomly will be a blue mark and a new string generated
% by breeding will be red.

% Performance interpretation: If your GA is working correctly, there should
% be lots of turnover (i.e., few generations where nothing happens),
% significant numbers of successful offspring and a moderate number of
% successful random strings. You can also spot stagnation (a parent
% surviving for many generations and continually producing offspring that
% stay in the top ranks). 

%%

Orig2 = Orig(:, 1:pop); % trim source to just relevant entries.
row = 0; changes = []; % initialize variables for determining relevant generations
children = parents; % assume nearest-neighbor with two children
rando = zeros(0, 2); inc = zeros(0, 2); kid = zeros(0, 2); % intialize empty storage arrays
G = size(Orig, 1); % total number of generations.
pts = 25; % number of points to plot in connections
c1 = [.6 .6 .6]; c2 = [1 .6 .6]; % line colors for surviving connections and children
lw = 1.5; % connection line weight
mw = 1.5; % marker line weight

incx = zeros(pts, 2); incy = zeros(pts, 2); % empty arrays for connecting line coordinates.
kidx = zeros(pts, 2); kidy = zeros(pts, 2);

for g = 1:G % for every generation
    if ~isequal(Orig2(g, 1:parents), 1:parents) && length(unique(Orig2(g, :))) == pop % if a change in survivors and valid data
        row = row + 1; % row on which to plot current state - counts relevant generations
        x1 = row - 1; x2 = row; % start and end points of connections
        changes = [changes; g]; % record that a change occured in this generation
        for i = 1:pop
            s = Orig2(g, i); y2 = i;
            if s == i && i <= parents && g > 1 % if the entry is a surviving parent who has not moved
                y1 = i;
                [xx, yy] = mySpline([x1 x2], [y1 y2], pts);
                incx = [incx, xx]; incy = [incy, yy];
                inc = [inc; [x2, y2]];
            elseif  s <= parents && g > 1% if the entry is a surviving parent who has been moved down
                y1 = s;
                [xx, yy] = mySpline([x1 x2], [y1 y2], pts);
                incx = [incx, xx]; incy = [incy, yy];
                inc = [inc; [x2, y2]];
            elseif s <= parents + children && g > 1 % if the entry is a child
                for n = 2:2:children
                    if s <= parents + n
                        y11 = n - 1; y12 = n;
                        [xx1, yy1] = mySpline([x1, x2], [y11, y2], pts);
                        [xx2, yy2] = mySpline([x1, x2], [y12, y2], pts);
                        kidx = [kidx, xx1, xx2]; kidy = [kidy, yy1, yy2];
                        kid = [kid; [x2, y2]];
                        break
                    end
                end
            else % if it's a new random addition.
                rando = [rando; [x2, y2]];
            end
        end
    end
end

p1 = plot(incx, incy, '-', 'Color', c1, 'LineWidth', 1.5); hold on
p2 = plot(kidx, kidy, '-', 'Color', c2, 'LineWidth', 1.5); hold on
p3 = plot(rando(:, 1), rando(:, 2), 's', 'MarkerEdgeColor', [.2 .4 .9], 'MarkerFaceColor', [.6 .6 1], 'MarkerSize', 10, 'LineWidth', mw); hold on % plot random
p4 = plot(inc(:, 1), inc(:, 2), 's', 'MarkerEdgeColor', [.3 .3 .3], 'MarkerFaceColor', [.6 .6 .6], 'MarkerSize', 10, 'LineWidth', mw); hold on % plot survival
p5 = plot(kid(:, 1), kid(:, 2), 's', 'MarkerEdgeColor', [.9 .3 .3], 'MarkerFaceColor', [1 .6 .6], 'MarkerSize', 10, 'LineWidth', mw); % plot children
h = [p3, p4, p5];
legend(h, "Random", "Incumbent", "Child")

xlabels = {};
for i = 1:numel(changes)
    xlabels{i} = num2str(changes(i));
end

ylabels = {};
for j = 1:pop
    ylabels{j} = num2str(j);
end

title("Family Tree");
set(gca, 'xtick', [1:row]); set(gca,'ytick', [1:pop]);
set(gca,'xticklabel', xlabels); set(gca,'yticklabel', ylabels);
xlabel("generation"); ylabel("Rank");
axis([0 row + 1 0 pop + 1]); view([90, 90])
end

function [xx, yy] = mySpline(x, y, pts)
% produces clamped splines between two points 

% Inputs: 
%   x -- 2-value vector containing the x coordinates of the end points
%   y -- 2-value vector containing the y coordinates of the end points
%   pts -- the number of total points to plot (ends plus intermediates)

% Returns: 
%    xx -- array of x coordinates to plot
%    yy -- array of y coordinates to plot

cs = spline(x, [0 y 0]);
xx = linspace(x(1), x(2), pts)';
yy = ppval(cs,xx);
end

UAV swarms have numerous applications in our modern world. They can facilitate mapping, observing, and overseeing large areas with ease. It is necessary for these agents to autonomously navigate potentially dangerous terrain and airspace in order to log information about areas. In this project, we simulate the motion of a swarm of drones, and their interaction with obstacles, and targets.

The goal of this project is to optimize this simulation using a Genetic Algorithm to maximize the number of targets mapped, minimize the number of crashed drones, and minimize the amount of time used in the simulation. To do this, we will use 15 design parameters to determine the dynamics and kinematics of each drone, using Forward Euler time discretization to update drone positions.

A Genetic Algorithm will be used to train this swarm of drones by generating random strings of design parameters, and breeding new strings to find the optimal string for this simulation.

In this paper, I will present relevant background information, and equations to describe the simulation. I will also describe the process by which I go about optimizing the Genetic Algorithm. Finally, I present the outcome of the simulation and Genetic Algorithm, and discuss the relevance of my results.

3 运行结果

4 参考文献

[1]杨军, 王道波, 渠尊尊,等. 基于元胞遗传算法的多无人机编队集结路径规划[J]. 机械与电子, 2018, 36(1):5.

[2]黄书召, 田军委, 乔路,等. 基于改进遗传算法的无人机路径规划[J].  2021.

[3]邵壮. 多无人机编队路径规划与队形控制技术研究[D]. 西北工业大学.

博主简介:擅长智能优化算法、神经网络预测、信号处理、元胞自动机、图像处理、路径规划、无人机等多种领域的Matlab仿真,相关matlab代码问题可私信交流。

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

【无人机】基于遗传算法实现无人机编队位置规划附matlab代码相关推荐

  1. 【机械】基于简化几何解法的六轴机械臂位置规划附matlab代码

    1 内容介绍 基于简化几何解法的六轴机械臂位置规划附matlab代码 2 部分代码 clc; clear; %载入数据 importfile('shuiping.mat'); theta_shuipi ...

  2. 【路径规划】基于遗传算法求解灾情巡视路径问题附matlab代码

    1 内容介绍 灾情巡视属于旅行商问题,具有广泛的应用价值.假定有若干巡视组,分工协作对所辖区域内的各灾民聚集地进行巡视,需要对各巡视组的巡视任务,巡视路线进行合理的分配和设计.在现实生活中,各被巡视地 ...

  3. 【优化布局】基于遗传算法实现风电场集电系统优化附matlab代码

    1 内容介绍 为了使风电场并网结构性能提高且经济损耗在可行范围内,将阻抗最小.经济最优相结合对风电场集电线路进行优化,建立目标函数求解.针对本文目标函数的求解,提出了基于遗传算法风电场集电线路结构的优 ...

  4. 【优化配煤】基于遗传算法实现配煤问题优化求解附matlab代码

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

  5. 【车间调度】基于遗传算法求解柔性生产调度问题GA-FJSP附matlab代码

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

  6. 基于YOLOv4的目标检测系统(附MATLAB代码+GUI实现)

    摘要:本文介绍了一种MATLAB实现的目标检测系统代码,采用 YOLOv4 检测网络作为核心模型,用于训练和检测各种任务下的目标,并在GUI界面中对各种目标检测结果可视化.文章详细介绍了YOLOv4的 ...

  7. Caputo 分数阶一维问题基于 L1 逼近的空间二阶方法(附Matlab代码)

    Caputo 分数阶一维问题基于 L1 逼近的空间二阶方法 Caputo 分数阶一维问题基于 L1 逼近的快速差分方法(附Matlab程序) 文章目录 Caputo 分数阶一维问题基于 L1 逼近的空 ...

  8. 【无人机】基于蒙特卡洛和控制算法实现四旋翼无人器拾物路径规划附matlab代码

    1 内容介绍 四旋翼无人机飞行器(Unmanned Aerial Vehicle, UAV)是一种旋翼式直升机,它具有四个控制输入和六个控制输出,因此四旋翼无人机是一个欠驱动的旋翼直升机.四旋翼无人机 ...

  9. 【路径规划】侦察无人机搭载SAR设备对区域进行覆盖搜索侦察的路径规划附matlab代码

    1 内容介绍 无人机(unmanned aerial vehicle, UAV)是一种无人驾驶的飞行器,一般具有动 力装置和导航模块,可以在一定范围内,依靠无线电遥控设备或嵌入式计算机预编程序 自主控 ...

最新文章

  1. PHP 使用 Memcached
  2. 仿真RM码,及在高斯信道下的译码性能,对RM采用大数逻辑译码算法
  3. 【springboot中使用aop的具体步骤和示例】
  4. maven使用OracleDB jdbc Driver
  5. 七步从Angular.JS菜鸟到专家(1):如何开始【转】
  6. 百度否认退市;微信官方回应「个人影响度报告」;微软公布 C# 9.0 计划 | 极客头条...
  7. 判断 Map 中是否包含指定的 key 和 value
  8. virtual关键字
  9. R语言实现PVAR(面板向量自回归模型)
  10. 数据分析之方差分析(ANOVA)
  11. 阿里云注册域名,购买云服务器,备案,域名解析教程
  12. eregi php7.0,关于php:已弃用:函数eregi()已弃用
  13. SpringBoot中怎么访问静态图片
  14. dcos - marathon - 有的时候健康检查不是绿条
  15. Lora模块(SX1278)
  16. 在网页中内嵌视频,例如优酷
  17. C语言实现二叉排序树
  18. 题目 1018: 有规律的数列求和
  19. 这后台管理系统,有逼格!(附源码)
  20. 十六进制转字符串或char字符数组

热门文章

  1. 轮播图的多种实现及原理
  2. 2.3 关系数据库---关系代数2
  3. 编译 cp2k 7.1 简略记录
  4. 桑拿lt是什么意思_lt是什么意思
  5. 面试官问我MySQL事务的底层原理?幸亏我总结了全套八股文
  6. [单片机框架][drivers层][cw2015/ADC] fuelgauge 硬件电量计和软件电量计(一)
  7. SAP ABAP 物料主数据(MM01/MM02/MM03)屏幕增强
  8. webgl学习之路(三)——透视投影矩阵的推导过程
  9. 《和声学教程》学习笔记(三):六和弦和经过/辅助的六四和弦
  10. 全网独家!!!全网首发!!!iOS 16降级15.5或15.6白苹果,完美救砖保数据教程,白苹果有救了~