目录
1 概述
2 运行结果
3 参考文献
4 Matlab代码
基于无人机导航系统的自身特点,无人机在导航过程中会出现无法精确定位的情况,从而产生定位误差。如果不能及时校正随时间累积的定位误差,会使无人机无法到达预定目的地,从而导致飞行任务失败。为避免这种情况的发生,研究了考虑定位误差的无人机航迹快速规划问题。以航迹距离最短为目标,考虑定位误差校正约束与航迹约束,建立混合整数规划模型。根据深度优先搜索算法与回溯算法的特点,设计启发式深度优先搜索+回溯算法来求解问题,并在此算法基础上加入模拟退火机制对解的质量进行优化。以某飞行区域的数据为例进行仿真实验,结果表明启发式深度优先搜索+回溯算法可以快速有效地求解考虑定位误差的无人机航迹规划问题。
[1]李锐,刘占辰,荆献勇.基于启发式算法的无人机三维航迹规划仿真研究[J].电光与控制,2009,16(08):27-31.
主函数部分代码:
clear all
close all
load('HGS20_20.mat');
x_2020 = xa_HGS;
y_2020 = ya_HGS;
z_2020 = za_HGS;
load('HGS30_20.mat');
x_3020 = xb_HGS;
y_3020 = yb_HGS;
z_3020 = zb_HGS;
load('HGS40_20.mat');
x_4020 = x_HGS;
y_4020 = y_HGS;
z_4020 = z_HGS;
load('xi.mat');
T=0.05;
t = [0:T:40];
x_d = xi_d(1,:)';
y_d = xi_d(2,:)';
z_d = xi_d(3,:)';
phi_d = xi_d(4,:)';
theta_d = xi_d(5,:)';
psi_d = xi_d(6,:)';
figure
set(gcf,'position', [150,150,800,500])
x=x_HGS; y=y_HGS; z=z_HGS;
plot3(x_d,y_d,z_d,'k--',x_4020,y_4020,z_4020,'r-',x_2020,y_2020,z_2020,'b-.',x_3020,y_3020,z_3020,'g.','LineWidth',2);
xlabel('X [m]','Fontsize',18);
ylabel('Y [m]','Fontsize',18);
zlabel('Z [m]','Fontsize',18);
set(gca,'Fontsize',18)
legend('Desired trajectory ','40ind, 20 iter','30ind, 20 iter','20ind, 20 iter','AutoUpdate','off','Fontsize',18)
hold on
grid on
%%
clear xi_d
load('xiCircle.mat');
x_dC = xi_d(1,:)';
y_dC = xi_d(2,:)';
z_dC = xi_d(3,:)';
x_HGS_C = xi(:,4);
y_HGS_C = xi(:,5);
z_HGS_C = xi(:,6);
figure
set(gcf,'position', [150,150,800,500])
%x=x_HGS; y=y_HGS; z=z_HGS;
plot3(x_dC,y_dC,z_dC,'k--',x_HGS_C,y_HGS_C,z_HGS_C,'r','LineWidth',2);
xlabel('X [m]','Fontsize',18);
ylabel('Y [m]','Fontsize',18);
zlabel('Z [m]','Fontsize',18);
set(gca,'Fontsize',18)
legend('Desired trajectory ','20ind, 20 iter HGS','Fontsize',18)
hold on
grid on