【无人机】无人机UAV仿真研究(Matlab代码实现)

2023-05-16

 👨‍🎓个人主页:研学社的博客 

💥💥💞💞欢迎来到本博客❤️❤️💥💥

🏆博主优势:🌞🌞🌞博客内容尽量做到思维缜密,逻辑清晰,为了方便读者。

⛳️座右铭:行百里者,半于九十。

📋📋📋本文目录如下:🎁🎁🎁

目录

💥1 概述

📚2 运行结果

🎉3 参考文献

🌈4 Matlab代码实现


💥1 概述

未来UAM的应用中,视觉引导将能够辅助卫星导航、无线电导航完成飞行全过程的定位。起降过程中,依靠垂直起降场的特殊标识,可以辅助起降阶段的定位和引导;而在城市上空巡航过程中,由于城市环境图像特征和纹理非常丰富,视觉导航也是易于实现的。辅助导航系统可以设计为非安全关键设备,因此DAL-C级以下的研制保证等级即可满足要求。

📚2 运行结果

 

部分代码:

figure;
subplot(3,1,1);plot(Time,p_array);title('p');grid on;
subplot(3,1,2);plot(Time,q_array);title('q');grid on;
subplot(3,1,3);plot(Time,r_array);title('r');grid on;
figure;
subplot(3,1,1);plot(Time,u_array);title('u');grid on;
subplot(3,1,2);plot(Time,v_array);title('v');grid on;
subplot(3,1,3);plot(Time,w_array);title('w');grid on;
figure;
subplot(3,1,1);plot(Time,Phi_array,Time,Phi_ref_array);title('\phi');grid on;
subplot(3,1,2);plot(Time,Theta_array,Time,Theta_ref_array);title('\theta');grid on;
subplot(3,1,3);plot(Time,Psi_array,Time,Psi_ref_array);title('\psi');grid on;
figure;
subplot(3,1,1);plot(Time,Phi_est_array,Time,Phi_ref_array);title('\phi est');grid on;
subplot(3,1,2);plot(Time,Theta_est_array,Time,Theta_ref_array);title('\theta est');grid on;
subplot(3,1,3);plot(Time,Psi_est_array,Time,Psi_ref_array);title('\psi est');grid on;
figure
subplot(3,1,1);plot(Time,Phi_ref_array - Phi_array);title('\phi error');grid on;
subplot(3,1,2);plot(Time,Theta_ref_array - Theta_array);title('\theta error');grid on;
subplot(3,1,3);plot(Time,Psi_ref_array - Psi_array);title('\psi error');grid on;
figure
subplot(3,1,1);plot(Time,Phi_error_integer_array);title('\phi error integrated');grid on;
subplot(3,1,2);plot(Time,Theta_error_integer_array);title('\theta error integrated');grid on;
subplot(3,1,3);plot(Time,Psi_error_integer_array);title('\psi error integrated');grid on;
figure;
subplot(3,1,1);plot(Time,x_array,Time,GPS_n_array);title('x GPSx');grid on;
subplot(3,1,2);plot(Time,y_array,Time,GPS_e_array);title('y GPSy');grid on;
subplot(3,1,3);plot(Time,z_array,Time,GPS_d_array);title('z GPSz');grid on;
figure;
subplot(3,1,1);plot(Time,x_dot_array,Time,GPS_Vn_array);title('vx GPSvx');grid on;
subplot(3,1,2);plot(Time,y_dot_array,Time,GPS_Ve_array);title('vy GPSvy');grid on;
subplot(3,1,3);plot(Time,z_dot_array,Time,GPS_Vd_array);title('vz GPSvz');grid on;
figure;
subplot(3,1,1);plot(Time,x_array,Time,x_est_array);title('x vs x est');grid on;
subplot(3,1,2);plot(Time,y_array,Time,y_est_array);title('y vs y est');grid on;
subplot(3,1,3);plot(Time,z_array,Time,z_est_array);title('z vs z est');grid on;
figure;
subplot(3,1,1);plot(Time,x_dot_array,Time,x_dot_est_array);title('Vx vs Vx est');grid on;
subplot(3,1,2);plot(Time,y_dot_array,Time,y_dot_est_array);title('Vy vs Vy est');grid on;
subplot(3,1,3);plot(Time,z_dot_array,Time,z_dot_est_array);title('Vz vs Vz est');grid on;
figure;
plot3(x_array,y_array,-z_array);title('Trajectory');grid on;
figure;
subplot(2,1,1);plot(Time,Alpha_array);title('\alpha');grid on;
subplot(2,1,2);plot(Time,Beta_array);title('\beta');grid on;
figure;
subplot(3,1,1);plot(Time,D_array);title('D');grid on;
subplot(3,1,2);plot(Time,Y_array);title('Y');grid on;
subplot(3,1,3);plot(Time,L_array);title('L');grid on;
figure;
subplot(3,1,1);plot(Time,Ml_array);title('Ml');grid on;
subplot(3,1,2);plot(Time,Mm_array);title('Mm');grid on;
subplot(3,1,3);plot(Time,Mn_array);title('Mn');grid on;
figure;
plot(Time,T_array);title('Thrust');
figure;
subplot(2,1,1);plot(Time,Gamma_array);title('\gamma');grid on;
subplot(2,1,2);plot(Time,Chi_array);title('\chi');grid on;
figure;
subplot(4,1,1);plot(Time,Da_array);title('\deltaa');grid on;
subplot(4,1,2);plot(Time,De_array);title('\deltae');grid on;
subplot(4,1,3);plot(Time,Dr_array);title('\deltar');grid on;
subplot(4,1,4);plot(Time,DT_array);title('\deltat');grid on;
figure;
subplot(3,1,1);plot(Time,Wind_Vx_array);title('Wind_North');grid on;
subplot(3,1,2);plot(Time,Wind_Vy_array);title('Wind_East');grid on;
subplot(3,1,3);plot(Time,Wind_Vz_array);title('Wind_Dwon');grid on;

figure;
subplot(3,1,1);plot(Time,Acc_x_array,Time,u_dot_array,'--');title('Acc_x,u_dot');grid on;
subplot(3,1,2);plot(Time,Acc_y_array,Time,v_dot_array,'--');title('Acc_y,v_dot');grid on;
subplot(3,1,3);plot(Time,Acc_z_array,Time,w_dot_array,'--');title('Acc_z,w_dot');grid on;

figure;plot(Time,sqrt(Acc_x_array.^2+Acc_y_array.^2+Acc_z_array.^2), ...
            Time,sqrt(u_dot_array.^2+v_dot_array.^2+w_dot_array.^2),'--');title('Total Acc');grid on;

% figure;
% subplot(3,1,1);plot(Time,u_dot_array);title('u_dot');grid on;
% subplot(3,1,2);plot(Time,v_dot_array);title('v_dot');grid on;
% subplot(3,1,3);plot(Time,w_dot_array);title('w_dot');grid on;

figure;
subplot(3,1,1);plot(Time,Phi_array,Time,Phi_est_array);title('Phi est');grid on;
subplot(3,1,2);plot(Time,Theta_array,Time,Theta_est_array);title('Theta est');grid on;
subplot(3,1,3);plot(Time,Psi_array,Time,Psi_est_array);title('Psi est');grid on;

figure;
subplot(3,1,1);plot(Time,V_array);title('V_array');grid on;
subplot(3,1,2);plot(Time,V_error_array);title('V_error_array');grid on;
subplot(3,1,3);plot(Time,V_error_integer_array);title('V_error_integer_array');grid on;
% figure;
% subplot(3,1,1);plot(Time,Phi_est_array);title('Phi est');grid on;
% subplot(3,1,2);plot(Time,Theta_est_array);title('Theta est');grid on;
% subplot(3,1,3);plot(Time,Psi_est_array);title('Psi est');grid on;

tempstr = ['Max Phi error:   ',num2str(max(abs(Phi_array - Phi_est_array))*180/pi),'   Average error: ',num2str(mean(abs(Phi_array - Phi_est_array)))];disp(tempstr);
tempstr = ['Max Theta error: ',num2str(max(abs(Theta_array - Theta_est_array))*180/pi),'   Average error: ',num2str(mean(abs(Theta_array - Theta_est_array)))];disp(tempstr);
temp = Psi_array - Psi_est_array;
for i=1:1:idata
    if(temp(i)>pi)
        temp(i) = temp(i) - 2*pi;
    elseif(temp(i)<-pi)
        temp(i) = temp(i) + 2*pi;
    end
end
tempstr = ['Max Psi error:   ',num2str(max(abs(temp))*180/pi),'  Average error: ',num2str(mean(abs(Psi_array - Psi_est_array)))];disp(tempstr);
tempstr = ['Max x error: ',num2str(max(abs(x_array-x_est_array))),'   Average error: ',num2str(mean(abs(x_array-x_est_array)))];disp(tempstr);
tempstr = ['Max y error: ',num2str(max(abs(y_array-y_est_array))),'   Average error: ',num2str(mean(abs(y_array-y_est_array)))];disp(tempstr);
tempstr = ['Max z error: ',num2str(max(abs(z_array-z_est_array))),'   Average error: ',num2str(mean(abs(z_array-z_est_array)))];disp(tempstr);
tempstr = ['Max vx error: ',num2str(max(abs(x_dot_array-x_dot_est_array))),'   Average error: ',num2str(mean(abs(x_dot_array-x_dot_est_array)))];disp(tempstr);
tempstr = ['Max vy error: ',num2str(max(abs(y_dot_array-y_dot_est_array))),'   Average error: ',num2str(mean(abs(y_dot_array-y_dot_est_array)))];disp(tempstr);
tempstr = ['Max vz error: ',num2str(max(abs(z_dot_array-z_dot_est_array))),'   Average error: ',num2str(mean(abs(z_dot_array-z_dot_est_array)))];disp(tempstr);

🎉3 参考文献

部分理论来源于网络,如有侵权请联系删除。

[1]林彤.燃煤电站锅炉巡检无人机飞控及三维规划研究[J].电站系统工程,2023,39(01):31-34.

🌈4 Matlab代码实现

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

【无人机】无人机UAV仿真研究(Matlab代码实现) 的相关文章

  • MATLAB:涉及大数的计算

    如何在 MATLAB 中执行涉及大量数字的计算 举一个简单的例子 任意精度计算器将显示 1 120 132 370 260 约为 1 56 但 MATLAB 无法执行此类计算 power 120 132 factorial 370 fact
  • 朴素分类器 matlab

    在 matlab 中测试朴素分类器时 即使我在相同的样本数据上进行训练和测试 我也会得到不同的结果 我想知道我的代码是否正确 是否有人可以帮助解释这是为什么 dimensionality reduction columns 6 U S V
  • 使用 lsqcurvefit 进行拟合

    我想将一些数据拟合到洛伦兹函数 但当我使用不同数量级的参数时 我发现拟合存在问题 这是我的洛伦兹函数 function value lorentz x x0 gamma amp value amp gamma 2 x x0 2 gamma
  • 如何在Matlab脚本中将泰勒级数系数存储到数组中

    这个问题是在 m 脚本的上下文中 我知道如何获取函数的泰勒级数 但我没有看到任何命令允许将级数的系数存储到数组中 sym2poly似乎不起作用 如何将系数存储到数组中 例如这个函数 syms x f 1 x 2 4 x 9 我们怎样才能得到
  • MATLAB 链表

    有哪些可能的方法来实现链表MATLAB http en wikipedia org wiki MATLAB 注意 我问这个问题是为了教学价值 而不是实用价值 我意识到 如果您实际上在 MATLAB 中滚动自己的链表 那么您可能做错了什么 然
  • MATLAB 是否已有 YAML 库/解析器?

    我想使用 YAML 跨多种语言交流一些数据 将其视为 与语言无关的序列化 其中一种语言是 MATLAB 但我似乎找不到该语言的 YAML 库 我在 Google 上检查了 matlab yaml 和 matlab yaml parse 似乎
  • 将输出从符号数学 (sym) 转换为浮点型

    我的问题类似于这个问题 https stackoverflow com questions 11114101 how to convert mupad symbol i sqrt 1 to i in matlab 11114959 1111
  • Matlab 的快速 JSON 解析器

    您知道 Matlab 中有一个非常快速的 JSON 解析器吗 目前我正在使用JSONlab http www mathworks com matlabcentral fileexchange 33381 jsonlab a toolbox
  • 在 Matlab 中对列进行排序

    我有 2 列使用 textscan 导入的数据 数据看起来像这样 其中U is undetect and D is detect mydata 51 U 57 D 48 U 47 D my data 4x1 double 4x1 char
  • 图像增强 - 从书写中清除给定图像

    我需要清理这张照片 删除 清理我 的字样并使其变亮 作为图像处理课程作业的一部分 我可能会使用 matlab 函数 ginput 来查找图像中的特定点 当然 在脚本中您应该对所需的坐标进行硬编码 您可以使用 conv2 fft2 ifft2
  • matlab矩阵中求子矩阵的通用方法

    我正在寻找一种 好 方法来在更大的矩阵 任意维数 中找到矩阵 模式 Example total rand 3 4 5 sub total 2 3 1 3 3 4 现在我希望这样的事情发生 loc matrixFind total sub 在
  • 如何读取 10 位原始图像?其中包含 RGB-IR 数据

    我想知道如何从我的 10 位原始 它有 rgb ir 图像数据 数据中提取 RGB 图像 如何使用 Python 或 MATLAB 进行阅读 拍摄时的相机分辨率为 1280x720 室内照片图片下载 https drive google c
  • 在 MATLAB 中用两个值替换向量值

    我必须创建一个以向量作为输入的函数v和三个标量a b and c 该函数替换了的每个元素v等于a有一个二元素数组 b c 例如 给定v 1 2 3 4 and a 2 b 5 c 5 输出将是 out 1 5 5 3 4 我的第一次尝试是尝
  • 整数的十进制表示形式中的分隔数字

    例如 我想将用户输入作为整数输入 45697 并将前两位数字存储在数组 向量或其他内容中 例如 4 5 6 9 7 这样我就可以使用一些函数调用来检查前两个值 4 5 并对它们进行计算 问题 我不知道如何存储恢复前两个值 有没有简单的函数调
  • 如何从绘图处理程序中绘图?

    我有绘图的处理程序或图形的处理程序 例子 h plot 1 0 2 10 xx get h xx DisplayName Annotation 1x1 handle Color 0 0 1 LineStyle LineWidth 0 500
  • 傅里叶变换定理 matlab

    我目前正在尝试理解二维傅里叶位移定理 根据我到目前为止所了解到的情况 图像空间中的平移会导致相位差异 但不会导致频率空间中的幅度差异 我试图用一个小例子来演示这一点 但它只适用于行的移位 而不适用于列的移位 这是一个小演示 我只在这里显示幅
  • 在 Matlab 中显示有理数

    我有两个整数 m n 它们一起形成 m n 形式的有理数 现在我只想以这种理性的形式在 Matlab 中显示它们 我可以通过这样做来做到这一点 char sym m n 所以 如果 例如m 1 n 2 Matlab将显示1 2 然而 如果m
  • MATLAB 图中轴标签与轴之间的距离

    我正在使用 MATLAB 绘制一些数据 我想调整轴标签与轴本身之间的距离 但是 只需向标签的 位置 属性添加一点即可使标签移出图窗窗口 是否有 保证金 属性或类似的东西 在上图中 我想增加数字和标签 Time s 之间的距离 同时自动扩展数
  • Matlab Solve():未给出所有解决方案

    我试图找到两条曲线的交点 syms x y g x 20 exp x 30 3 5 1 sol x sol y solve x 22 3097 2 y 16 2497 2 25 y g x x y Real true 它只提供一种解决方案
  • 如何每次使用按钮将数据添加到 MATLAB 中的现有 XLSX 文件?

    我有一个函数可以生成一些变量 例如分数 对 错 未回答 使用按钮调用此功能 问题是如何每次将函数生成的这些值添加 附加到 XLSX 文件中 或者 如何创建 MAT 文件以便可以添加它 可能的解决方案是什么 附加到 xls 文件所涉及的挑战是

随机推荐