一种改进多旋翼无人机动态仿真的模块化仿真环境研究(Matlab代码实现)
💥💥💞💞欢迎来到本博客❤️❤️💥💥
🏆博主优势:🌞🌞🌞博客内容尽量做到思维缜密,逻辑清晰,为了方便读者。
⛳️座右铭:行百里者,半于九十。
📋📋📋本文目录如下:🎁🎁🎁
目录
💥1 概述
📚2 运行结果
🎉3 参考文献
🌈4 Matlab代码、Simulink实现
💥1 概述
多旋翼无人机(UAV)由于其多功能性和机械简单性而在研究和商业应用中都获得了极大的普及。然而,尽管有这些优势,多旋翼系统在设计保证安全可靠飞行性能的强大控制架构方面仍然是一个相当大的挑战。按照今天的惯例,制导、控制和导航算法(GNC)的设计主要在仿真中进行。为了保证在仿真环境中生成的控制解决方案与真实飞行性能之间的无缝转换,仿真应以足够的保真度再现真实世界的行为。
该仿真包括任意多旋翼无人机的改进动态模型。仿真非常模块化,允许用户指定几乎任何可以想象的多旋翼机身,无论对称性或特定布局如何。与在室外飞行真正的无人机相比,所包含的环境效果也有助于使模拟行为更自然。模拟包括随附论文文本中描述的所有场景。其中包括:任意非对称机身,改变机身质量或惯性矩或在飞行过程中引入执行器故障的能力,机身上的空气动力阻力,动态推力产生,不同的空气动力学螺旋桨模式,如涡环状态和叶片拍打效应。如果需要,用户可以关闭所有这些效果。
当前实现的控制器仅是内环角速率控制。由用户决定实施他们选择的更高级的控制方案。
📚2 运行结果











部分代码:
clear all;close all;clc
%--------------------------------------------------------------------------
t_control = 1/500; % Controller/state estimation frequency 500Hz [s]
t_sim = t_control/2; % Simulation frequency 1000Hz [s]
sim_time = 10.0; % Duration of simulation [sec]
r2d = 180/pi; % Conversion factor radians to degrees [deg/rad]
d2r = pi/180; % Conversion factor degrees to radians [rad/deg]
g = 9.80665; % Acceleration of gravity [m/s^2]
rpm2radpersec = 2*pi/60; % Conversion factor RPM to rad/sec [rad/(s*rpm)]
rho = 1.225; % Density of air [kg/m^3]
%--------------------------------------------------------------------------
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Quad specific configuration parameters %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% The coordinate system used in this model is defined as follows:
% X: pointing forward, Roll axis
% Y: pointing to the right, Pitch axis
% Z: pointing down, Yaw axis
% To define the geometry of the airframe, the following convention is used:
% - the base airframe is assumed to be somewhat symmetric
% - the CoG for the base airframe coincides with the geometric center in X/Y plane (but is shifted along Z axis)
% - the motor arm length in X/Y plane is defined as the distance to the geometric center of the base airframe
% - motor thrust is generated at the prop, which is offset a distance (along Z) from the geometric center
% - motor thrust vector may be misaligned from purely Z direction, so a set of rotation angles is given for each motor
% - real position of CoG is given as a position vector from geometric center
% - everything is expressed in body coordinate system described above
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Noise_flag = 0; % Set to 1 for sensor/estimation noise, to 0 for no noise
Coriolis_correction = 1; % Set to 1 to cancel omega x (J*omega) term in control law, 0 if not
Dyn_thrust = 0; % Set to 1 to engage dynamic thrust effects, to 0 to disengage
Blade_flapping = 0; % Set to 1 to engage blade flapping effects, to 0 to disengage
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Initial conditions
Att_init = [0;0;0] * d2r; % Initial airframe attitude in Euler angles Roll/Pitch/Yaw for 6DOF block [deg]
omega_init = [0;0;0]; % Initial angular rates in Body frame for 6DOF block [rad/s]
Vb_init = [0;0;0]; % Initial velocity in Body frame for 6DOF block [m/s]
Xi_init = [0;0;0]; % Initial position in Inertial frame for 6DOF block [m]
rpm_init = 3104.5025852; % Initial motor speed [rpm]
q_init = rpy2quat(Att_init); % Compute the initial attitude quaternion
R_IB_init = rpy2rot(Att_init); % Compute the initial rotation matrix R_IB
Vi_init = R_IB_init' * Vb_init; % Compute the initial velocity in Inertial axes
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Parameters for aerodynamic drag computation
a = 0.060; % Surface area of airframe visible along the Body x axis [m^2]
b = 0.060; % Surface area of airframe visible along the Body y axis [m^2]
c = 0.060; % Surface area of airframe visible along the Body z axis [m^2]
C_D = 0.40; % Drag coefficient [dimensionless]
Surface_params = [a;b;c]; % Combine the surface area parameters
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Parameters for dynamic thrust computation
v_h = 4.0; % Induced aerodynamic velocity at hover [m/s]
kappa = 1.00; % Value for induced power factor in hover (chosen to make transition from different states continuous)
k1 = -1.125; % Empirical values taken from Hoffmann_2011
k2 = -1.372; % Empirical values taken from Hoffmann_2011
k3 = -1.718; % Empirical values taken from Hoffmann_2011
k4 = -0.655; % Empirical values taken from Hoffmann_2011
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Parameters for blade flapping computation
k_a1s = 1.5 / 4.0; % Gain in linear relationship between wind velocity and flapping angle [deg/(m/s)]
k_beta = 0.23; % Stiffness of the propeller blades [Nm/rad]
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Real airframe data
CoG_real = [0;0;0.001]; % Location of center of gravity w.r.t. geometric center (in Body axes) [m]
mass_real = 0.550; % Complete airframe mass [kg]
Jxx = 0.003960; %
Jxy = 0; %
Jxz = 0; %
Jyx = 0; %
Jyy = 0.003845; % Moment of inertia for multirotor w.r.t center of gravity [kg*m^2]
Jyz = 0; %
Jzx = 0; %
Jzy = 0; %
Jzz = 0.007350; %
J_real = [Jxx Jxy Jxz;Jyx Jyy Jyz;Jzx Jzy Jzz]; % Moment of inertia matrix
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% MotorMatrix_real holds all the information about the actual performance
% of each actuator. The data is arranged as one row per motor/prop combo:
% 1 : Motor arm angle measured clockwise (looking from above) from the positive X axis (forward direction) [deg]
% 2 : Distance of prop/motor in X/Y plane from the geometric center of the airframe [m]
% 3 : Distance of prop/motor in Z direction from the geometric center of the airframe [m]
% 4 : Direction of prop rotation: -1 for CW, +1 for CCW [unitless]
% 5 : Control effectiveness of the actuator (nominally 1.0)
% 6 : First-order motor transfer function time constant [sec]
% 7..8 : Two coefficients that describe the RPM to thrust [N] transfer function for static conditions [a1 a2]
% Thrust = a1 * RPM + a2 * RPM^2
% 9..10 : Two coefficients that describe the RPM to torque [Nm] transfer function for static conditions [b1 b2]
% Torque = b1 * RPM + b2 * RPM^2
% 11 : Minimum RPM value of the actuator
% 12 : Maximum RPM value of the actuator
% 13..15 : Rotations of thrust vector around Body-fixed axes away from nominal direction [deg]
% Nominal direction of thrust vector is [0;0;-1]
% Rotation order from body to motor axes is Yaw/Pitch/Roll (Euler angle sequence (1,2,3))
% 16 : Propeller diameter [m]
% 17 : Propeller mass [kg]
MotorMatrix_real = [045 , 0.170 , -0.028 , -1 , 1.0 , 0.010 , [9.6820 , 0.010872]*1e-5 , [1.4504 , 0.0016312]*1e-6 , 0000 , 6000 , [0.0 , 0.0 , 0.0] , 8*2.54/100 , 11/1000; ...
135 , 0.170 , -0.028 , +1 , 1.0 , 0.010 , [9.6820 , 0.010872]*1e-5 , [1.4504 , 0.0016312]*1e-6 , 0000 , 6000 , [0.0 , 0.0 , 0.0] , 8*2.54/100 , 11/1000; ...
225 , 0.170 , -0.028 , -1 , 1.0 , 0.010 , [9.6820 , 0.010872]*1e-5 , [1.4504 , 0.0016312]*1e-6 , 0000 , 6000 , [0.0 , 0.0 , 0.0] , 8*2.54/100 , 11/1000; ...
315 , 0.170 , -0.028 , +1 , 1.0 , 0.010 , [9.6820 , 0.010872]*1e-5 , [1.4504 , 0.0016312]*1e-6 , 0000 , 6000 , [0.0 , 0.0 , 0.0] , 8*2.54/100 , 11/1000];
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Nominal airframe data (without disturbance/uncertainties)
CoG_nominal = [0;0;0.001]; % Location of center of gravity w.r.t. geometric center (in Body axes) [m]
mass_nominal = 0.550; % Complete airframe mass [kg]
Jxx = 0.003960; %
🎉3 参考文献
文章中一些内容引自网络,会注明出处或引用为参考文献,难免有未尽之处,如有不妥,请随时联系删除。
[1] Vervoorst J W .A modular simulation environment for the improved dynamic simulation of multirotor unmanned aerial vehicles[J]. 2016.
🌈4 Matlab代码、Simulink实现
相关文章:
一种改进多旋翼无人机动态仿真的模块化仿真环境研究(Matlab代码实现)
💥💥💞💞欢迎来到本博客❤️❤️💥💥 🏆博主优势:🌞🌞🌞博客内容尽量做到思维缜密,逻辑清晰,为了方便读者。 ⛳️座右铭&a…...
02-请解释一下Java的内存模型和happens-before规则?【Java面试题总结】
请解释一下Java的内存模型和happens-before规则? 概念:Java内存模型,简称JMM,是一种定义了多线程程序中内存访问行为的规范。它定义了线程如何与主内存和工作内存进行交互,以及如何保证多线程程序的正确性和可见性。J…...
PVE 8 出现CPU 100% 冻结(卡死)
最近在研究PVE,然后下载官方最新版本系统8.x安装好后出现卡死问题,就连开个软件CPU也能飙到100%,开始我以为是硬件问题可能是资源不够,但是将系统切换回裸机(不用PVE启动)一点问题也没有,后来逐…...
【高效编程技巧】编程菜鸟和编程大佬的差距究竟在哪里?
🎬 鸽芷咕:个人主页 🔥 个人专栏: 《高效编程技巧》《C语言进阶》 ⛺️生活的理想,就是为了理想的生活! 文章目录 📋 前言1.如何写出好的代码?1.2 如何分析一个函数写的怎么样 2. 代码板式的重要性2.1 代码…...
继承【C++】
文章目录 继承的概念继承的定义继承方式和访问限定符继承基类成员访问方式的变化 默认继承方式 基类和派生类对象赋值转换继承中的作用域派生类的默认成员函数继承与友元静态成员菱形继承及菱形虚拟继承继承的方式 菱形虚拟继承菱形虚拟继承原理 继承的概念 继承(inheritance)…...
ORB-SLAM3复现过程中遇到的问题及解决办法
在复现过程中遇到的问题的解决过程 1. 版本检查1.1 Opencv版本的检测1.2 Eigen版本的检测1.3 查看Python版本1.4 其他 2. 编译过程中遇到的问题及解决办法2.1 ./build.sh遇到的问题2.2 ./build_ros.sh遇到的问题 因为环境比较干净,所以遇到的问题相对少一些…...
vue开发桌面exe应用
vue开发桌面exe应用 Electron-vue 参考 Electron-vue搭建vue全家桶Element UI客户端(一) 如何使用Vue.js构建桌面应用程序...
C# 实现PictureBox从随机选择的文件夹内对图像进行随机播放
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System...
腾讯云国际代充-GPU服务器安装驱动教程NVIDIA Tesla
腾讯云国际站GPU 云服务器是基于 GPU 的快速、稳定、弹性的计算服务,主要应用于深度学习训练/推理、图形图像处理以及科学计算等场景。 GPU 云服务器提供和标准腾讯云国际 CVM 云服务器一致的方便快捷的管理方式。 GPU 云服务器通过其强大的快速处理海量数据的计算性…...
【python爬虫】9.带着小饼干登录(cookies)
文章目录 前言项目:发表博客评论post请求 cookies及其用法session及其用法存储cookies读取cookies复习 前言 第1-8关我们学习的是爬虫最为基础的知识,从第9关开始,我们正式打开爬虫的进阶之门,学习爬虫更多的精进知识。 在前面几…...
原神剑冢三层封印怎么解开 原神剑冢三层封印在哪里打
在原神游戏中原神探索剑冢封印并解开三层封印,玩家可以去蒙德城接取一个隐藏任务,这项任务需要玩家去解开剑冢三层封印,才能完成任务。然而,许多玩家可能还不知道如何解开这个封印,今天小编为大家整理了一份详细的攻略…...
Papers with Semi-supervised Learning for Medical Image Segmentation(SSL4MIS)
Papers_with_SSL4MIS CVPR2023 DateCategory标题TitleCodeBlog2023-06半监督医学图像分割用于半监督医学图像分割的伪标签引导对比学习Pseudo-Label Guided Contrastive Learning for Semi-Supervised Medical Image SegmentationLinkLink2023-06半监督图像分割SemiCVT&#…...
c#继承(new base)的使用
概述 C#中的继承是面向对象编程的重要概念之一,它允许一个类(称为子类或派生类)从另一个类(称为父类或基类)继承属性和行为。 继承的主要目的是实现代码重用和层次化的组织。子类可以继承父类的字段、属性、方法和事…...
【办公自动化】使用Python批量处理Excel文件并转为csv文件
🤵♂️ 个人主页:艾派森的个人主页 ✍🏻作者简介:Python学习者 🐋 希望大家多多支持,我们一起进步!😄 如果文章对你有帮助的话, 欢迎评论 💬点赞Ǵ…...
手机怎么剪视频?分享一些剪辑工具和注意事项
视频剪辑是一种将多个视频片段进行剪切、合并和编辑的技术,它可以帮助我们制作出精彩的视频作品。如今,随着智能手机的普及,我们可以随时随地使用手机进行视频剪辑。本文将为大家介绍一些手机剪辑工具和注意事项,帮助大家更好地进…...
面试题汇总
文章目录 一. 腾讯二. 华为三. 快手1. Long 的长度和范围,为什么要减 1 (Java基础)2. 线程池配置无界队列了之后,拒绝策略怎么搞,什么时候用到无界队列 (JUC并发) 四. 美团五. 阿里六. 百度七. 字节八. 大疆1. 为什么创建进程开销比线程大? …...
LLVM系列:1.设计思想和LLVM IR简介
文章目录 背景介绍内容简介LLVM库的集合以及模块化设计LLVM优化器的模块化设计LLVM代码生成器的模块化设计LLVM IRLLVM编译流程LLVM IR的设计思想LLVM的形式LLVM IR的结构组成指令格式和变量示例参考文献:背景介绍 LLVM项目于2000年创立于伊利诺斯州大学,原本是一个为了静态…...
mysql中间件Atlas
Mysql 的 proxy 中间件有比较多的工具,例如,mysql-proxy(官方提供), atlas , cobar, mycat, tddl, tinnydbrouter等等。 而Atlas是由 Qihoo 360公司Web平台部基础架构团队开发维护的一个基于MySQL协议的数据中间层项目。它在MySQL官方推出的MySQL-Pro…...
ChatGPT 实现动态地图可视化展示
地图可视化分析有许多优点和好处: 1.直观理解:地图可视化使得复杂的数据更易于理解。通过地图可视化,人们可以直观地看到地理位置、地区之间的关系以及空间分布的模式。 2.提高决策效率:地图可视化可以帮助决策者快速理解和解释数据,从而提高决策效率。 3.高效的数据整…...
Vue.js安装步骤和注意事项
安装完node.js后开始安装和部署Vue在检查webpack的下载版本时出现错误出现错误的原因是之前下载时未指定对应的版本号导致版本不兼容先卸载掉之前下载的版本 cnpm uninstall webpack-cli -g cnpm install webpack-cli4.9.2 -g 最后检查版本是否对应...
Python爬虫实战:研究MechanicalSoup库相关技术
一、MechanicalSoup 库概述 1.1 库简介 MechanicalSoup 是一个 Python 库,专为自动化交互网站而设计。它结合了 requests 的 HTTP 请求能力和 BeautifulSoup 的 HTML 解析能力,提供了直观的 API,让我们可以像人类用户一样浏览网页、填写表单和提交请求。 1.2 主要功能特点…...
C++初阶-list的底层
目录 1.std::list实现的所有代码 2.list的简单介绍 2.1实现list的类 2.2_list_iterator的实现 2.2.1_list_iterator实现的原因和好处 2.2.2_list_iterator实现 2.3_list_node的实现 2.3.1. 避免递归的模板依赖 2.3.2. 内存布局一致性 2.3.3. 类型安全的替代方案 2.3.…...
2025年能源电力系统与流体力学国际会议 (EPSFD 2025)
2025年能源电力系统与流体力学国际会议(EPSFD 2025)将于本年度在美丽的杭州盛大召开。作为全球能源、电力系统以及流体力学领域的顶级盛会,EPSFD 2025旨在为来自世界各地的科学家、工程师和研究人员提供一个展示最新研究成果、分享实践经验及…...
linux 错误码总结
1,错误码的概念与作用 在Linux系统中,错误码是系统调用或库函数在执行失败时返回的特定数值,用于指示具体的错误类型。这些错误码通过全局变量errno来存储和传递,errno由操作系统维护,保存最近一次发生的错误信息。值得注意的是,errno的值在每次系统调用或函数调用失败时…...
Java 加密常用的各种算法及其选择
在数字化时代,数据安全至关重要,Java 作为广泛应用的编程语言,提供了丰富的加密算法来保障数据的保密性、完整性和真实性。了解这些常用加密算法及其适用场景,有助于开发者在不同的业务需求中做出正确的选择。 一、对称加密算法…...
【Zephyr 系列 10】实战项目:打造一个蓝牙传感器终端 + 网关系统(完整架构与全栈实现)
🧠关键词:Zephyr、BLE、终端、网关、广播、连接、传感器、数据采集、低功耗、系统集成 📌目标读者:希望基于 Zephyr 构建 BLE 系统架构、实现终端与网关协作、具备产品交付能力的开发者 📊篇幅字数:约 5200 字 ✨ 项目总览 在物联网实际项目中,**“终端 + 网关”**是…...
如何在最短时间内提升打ctf(web)的水平?
刚刚刷完2遍 bugku 的 web 题,前来答题。 每个人对刷题理解是不同,有的人是看了writeup就等于刷了,有的人是收藏了writeup就等于刷了,有的人是跟着writeup做了一遍就等于刷了,还有的人是独立思考做了一遍就等于刷了。…...
Mac下Android Studio扫描根目录卡死问题记录
环境信息 操作系统: macOS 15.5 (Apple M2芯片)Android Studio版本: Meerkat Feature Drop | 2024.3.2 Patch 1 (Build #AI-243.26053.27.2432.13536105, 2025年5月22日构建) 问题现象 在项目开发过程中,提示一个依赖外部头文件的cpp源文件需要同步,点…...
Linux C语言网络编程详细入门教程:如何一步步实现TCP服务端与客户端通信
文章目录 Linux C语言网络编程详细入门教程:如何一步步实现TCP服务端与客户端通信前言一、网络通信基础概念二、服务端与客户端的完整流程图解三、每一步的详细讲解和代码示例1. 创建Socket(服务端和客户端都要)2. 绑定本地地址和端口&#x…...
【笔记】WSL 中 Rust 安装与测试完整记录
#工作记录 WSL 中 Rust 安装与测试完整记录 1. 运行环境 系统:Ubuntu 24.04 LTS (WSL2)架构:x86_64 (GNU/Linux)Rust 版本:rustc 1.87.0 (2025-05-09)Cargo 版本:cargo 1.87.0 (2025-05-06) 2. 安装 Rust 2.1 使用 Rust 官方安…...

