【无人机导航】复杂环境下的无人机编队路径规划matlab源码
2021/8/16 9:06:20
本文主要是介绍【无人机导航】复杂环境下的无人机编队路径规划matlab源码,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!
clear; matlabrc; clc; close all; addpath(genpath('controllers')) addpath(genpath('dynamics')) addpath(genpath('tools')) % Initial Control gains: k_ria = 20; %(inter-agent position) k_via = .26; %(inter-agent velocities) k_rvl = .5; %(virtual-leader position) k_vvl = .25; %(virtual-leader velocity) k_obs = 10; %(obstacle position) exp = 4; gains = [k_ria,k_via,k_rvl,k_vvl,k_obs]'; % Optimize: options = optimoptions('fmincon','FiniteDifferenceStepSize',1e-1); % A = [4 0 0 0 30/31.5]; % b = 0; A =[]; b = []; Aeq = []; beq = []; lb = [0 0 0 0 0]; ub = []; x = fmincon(@simulate, gains, A,b,Aeq,beq,lb,ub,[], options); %% gains = x; [ts, total_error, broke] = simulate_dev(gains,1); total_error(total_error == 0) = []; dt = 1e-1; num_steps = length(total_error); tfinal = num_steps*dt; tspan = dt:dt:tfinal; %% figure() plot(tspan,total_error); hold on xlabel('Time (sec)') ylabel('Total Error') yl = ylim; plot([broke broke],[yl(1) yl(2)],'--k')
这篇关于【无人机导航】复杂环境下的无人机编队路径规划matlab源码的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!
- 2024-11-23Springboot应用的多环境打包入门
- 2024-11-23Springboot应用的生产发布入门教程
- 2024-11-23Python编程入门指南
- 2024-11-23Java创业入门:从零开始的编程之旅
- 2024-11-23Java创业入门:新手必读的Java编程与创业指南
- 2024-11-23Java对接阿里云智能语音服务入门详解
- 2024-11-23Java对接阿里云智能语音服务入门教程
- 2024-11-23JAVA对接阿里云智能语音服务入门教程
- 2024-11-23Java副业入门:初学者的简单教程
- 2024-11-23JAVA副业入门:初学者的实战指南