# Simulink Drone Reference Application [![View Simulink Drone Reference Application on File Exchange](https://www.mathworks.com/matlabcentral/images/matlab-file-exchange.svg)](https://www.mathworks.com/matlabcentral/fileexchange/67625-simulink-drone-reference-application)
This Simulink® Project shows the implementation of a Remotely Piloted Radio-Control fixed-wing aircraft (i.e. Drone, UAV), an autopilot for flight stabilization, and an operator interface to control its trajectory.
## Components
The model consists of three main components:
### Plant model
A Six-Degree-Of-Freedom (6-DOF) dynamics model for a foam-built, 65-inch wingspan, Multiplex Mentor hobby radio controlled aircraft. It consists of models for the aircraft dynamics, the weather, the motor, the actuators and the sensors. The plant receives commands for the four actuator channels: (1) Throttle, (2) Ailerons, (3) Rudder, and (4) Elevator. In turn, it produces a set of readings as those that a sensor suite would produce on board this type of aircraft.
The plant model uses a flat-earth approximation and therefore it will only work for flights which have a range of approximately 20 Km..
### Autopilot model.
The autopilot controller is a classical lateral/longitudinal channel flight controller which includes Guidance, Navigation and Control (except attitude estimation as this is assumed to be obtained directly from the sensor suite). The autopilot, based on the ground control station commands and the sensor readings, produces control commands for the control surfaces and also reports telemetry back to the ground station. This block stabilizes the aircraft to keep it in-flight.
It allows the operator to command it to fly in four different modes:
- Waypoint guidance.
- Circular Guidance.
- Return to Base.
- Mid-level contro commands (Uc, phi_c, H_c)
### Aircraft operator interface.
This represents the console operating the RC Aircraft in flight. It issues commands sent from the ground to the aircraft (waypoints, airspeed, height, etc...).
The block receives telemetry reported by the aircraft such as attitude, sensor readings, and overall aircraft status. This will allow to set the desired behavior of the aircraft while in-flight.
This model has the option to interact with the well-know, publicly available Open Source Micro Air Vehicle ground station software [QGroundControl](http://qgroundcontrol.com/). To communicate with QGroundControl, the model uses the [MAVLink](https://mavlink.io/) communications protocol.
## Functionality
This Simulink Project exercises several common workflows in flight control development. Its purpose is to show a recommended approach to a Model-Based Design (MBD) process to develop a proof of concept Drone flight controller (autopilot). Particularly we show the following workflows:
1. **Flight Controller Design** Develop a fixed-wing drone autopilot and test its behavior in a reasonably realistic 6DOF aircraft simulation.
2. **Simulate the Flight Controller Under Different Conditions**: Rapidly asses the performance of an autopilot under many simulated flight conditions, using local parallel simulations.
3. **Flight Envelope Characterization** Rapidly characterize the Aircraft’s performance by doing a wide range of environmental and initial conditions sweep using MATLAB Distributed Computing Server.
4. **UAV SME Capabilities Assessment** Demonstrate to a Subject Matter Expert (SME), early in the design process, the Drone’s capabilities and gather feedback on usability and its functionality, via co-simulation between Simulink and QGroundControl Ground Station Software.
5. **Test Correctness of the Fight Controller’s Generated Code** Test the code behavior using Simulink's Software-In-the-Loop on the development computer for same results (within bounds) of the designed autopilot.
6. **Deploy and Test Correctness of the Flight Controller’s Generated Code** Test the code’s behavior on a development board (a Raspberry Pi) for same results (within bounds) using Simulink's Processor-In-the-Loop.
7. **System Integration Test (Hardware-In-the-Loop)** Test the flight controller deployed in the development board (Raspberry Pi) with a 6DOF aircraft simulation running in a [Speedgoat®](https://www.speedgoat.com/) Real-Time computer with [Simulink Real-Time™](https://www.mathworks.com/products/simulink-real-time.html).
8. **Run Regression Tests** Run Regression tests locally.
## Co-Simulation and Control Interface
This model can interact with the Open Source QGroundControl ground station software to control the aircraft while "in flight":
![QGC Co-Simulation](./documentation/images/cosim_overview.png)
## Getting Started
To run the model clone the repository into your own working directory and, from the MATLAB command line:
```matlab
>> openProject('pathToYourProject/MBDRI.prj');
>> configSim;
>> runShortFlight;
```
This should produce five plots, the first being an XY plot of a complete mission around 6 waypoints, as shown below:
![XY Mission Plot](./documentation/images/runShortFlight_xyPlot.png)
## Setup
To get the full functionality, you will need a computer running MATLAB®, Simulink® and a supported compiler plus the following products depending on the workflow:
### For Flight Control Design
- [Control Systems Toolbox™](https://www.mathworks.com/products/control.html)
### Simulate the Flight Controller Under Different Conditions
- [Parallel Computing Toolbox™](https://www.mathworks.com/products/parallel-computing.html)
### Flight Envelope Characterization
- [Parallel Computing Toolbox™](https://www.mathworks.com/products/parallel-computing.html)
- [MATLAB Parallel Server™](https://www.mathworks.com/products/matlab-parallel-server.html)
### SME Assesment and Connectivity to QGroundControl
- [QGroundControl](http://qgroundcontrol.com/) 3.1.3 or higher.
### For Testing and Deploying the Behavior of the Fight Controller’s Generated Code
- A Raspberry Pi 2 or 3 board.
- MATLAB Coder™
- Simulink Coder™
- [Embedded Coder™](https://www.mathworks.com/products/embedded-coder.html)
- [Simulink Support Package for Raspberry Pi](https://www.mathworks.com/help/supportpkg/raspberrypi/)
### For System Integration Test (Hardware-In-the-Loop)
- A host computer running Windows
- [Simulink Real-Time™](http://www.mathworks.com/products/simulink-real-time.html)
- A supported Speedgoat target computer with two ethernet ports
- A Raspberry Pi 2 or 3 board
- MATLAB Coder™
- Simulink Coder™
- [Simulink Support Package for Raspberry Pi](https://www.mathworks.com/help/supportpkg/raspberrypi/)
### For Automated Tests (Back-to-Back and Regression Tests)
- [Simulink Test™](https://www.mathworks.com/products/simulink-test.html)
## License
The license is available in the [License file](license.txt) within this repository.
# Contributing
If you are interested in contributing we are definitely interested in hearing from you. There are many open tickets and we are sure this list will only grow, so feel free to contribute by owning one of those tickets and send us a pull request.
If you would like to suggest an enhancement please create a new issue and apply the _enhancement_ label. This is no guarantee that we will get to it, but we will definitely take it into consideration.
If you have encountered a bug, please create a new issue and apply the _bug_ label.
# Community Support
[MATLAB Central](https://www.mathworks.com/matlabcentral)
Copyright 2021 The MathWorks, Inc.
没有合适的资源?快使用搜索试试~ 我知道了~
遥控无线电控制固定翼飞机(即。无人机,无人机),飞行稳定自动驾驶仪,以及控制飞行轨迹的操作界面simulink.rar
共400个文件
xml:162个
h:161个
m:27个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 50 浏览量
2024-09-10
21:54:29
上传
评论
收藏 91.29MB RAR 举报
温馨提示
1.版本:matlab2014/2019a/2024a 2.附赠案例数据可直接运行matlab程序。 3.代码特点:参数化编程、参数可方便更改、代码编程思路清晰、注释明细。 4.适用对象:计算机,电子信息工程、数学等专业的大学生课程设计、期末大作业和毕业设计。
资源推荐
资源详情
资源评论
收起资源包目录
遥控无线电控制固定翼飞机(即。无人机,无人机),飞行稳定自动驾驶仪,以及控制飞行轨迹的操作界面simulink.rar (400个子文件)
testsuite.h 491KB
common.h 93KB
mavlink_msg_rc_channels.h 39KB
mavlink_msg_high_latency.h 37KB
mavlink_helpers.h 36KB
mavlink_msg_set_position_target_global_int.h 34KB
mavlink_msg_set_position_target_local_ned.h 32KB
mavlink_msg_servo_output_raw.h 31KB
mavlink_msg_position_target_global_int.h 30KB
mavlink_msg_sys_status.h 29KB
mavlink_msg_sim_state.h 29KB
mavlink_msg_control_system_state.h 28KB
mavlink_msg_gps_input.h 28KB
mavlink_msg_hil_state_quaternion.h 28KB
mavlink_msg_position_target_local_ned.h 28KB
mavlink_msg_autopilot_version.h 27KB
mavlink_msg_hil_optical_flow.h 26KB
mavlink_msg_optical_flow_rad.h 26KB
mavlink_msg_set_home_position.h 26KB
mavlink_msg_hil_rc_inputs_raw.h 25KB
mavlink_msg_camera_settings.h 25KB
mavlink_msg_mission_item_int.h 25KB
mavlink_msg_rc_channels_scaled.h 25KB
mavlink_msg_hil_sensor.h 24KB
mavlink_msg_home_position.h 24KB
mavlink_msg_highres_imu.h 24KB
mavlink_msg_gps2_rtk.h 24KB
mavlink_msg_hil_state.h 24KB
mavlink_msg_gps_rtk.h 24KB
mavlink_msg_rc_channels_raw.h 24KB
mavlink_msg_camera_capture_status.h 23KB
mavlink_msg_adsb_vehicle.h 23KB
mavlink_msg_mission_item.h 23KB
mavlink_msg_rc_channels_override.h 23KB
mavlink_msg_hil_gps.h 23KB
mavlink_msg_command_int.h 22KB
mavlink_msg_param_map_rc.h 22KB
mavlink_msg_altitude.h 22KB
mavlink_msg_local_position_ned_cov.h 22KB
mavlink_msg_global_position_int_cov.h 21KB
mavlink_msg_follow_target.h 21KB
mavlink_msg_battery_status.h 21KB
mavlink_msg_camera_information.h 21KB
mavlink_msg_estimator_status.h 21KB
mavlink_msg_gps2_raw.h 21KB
mavlink_msg_set_attitude_target.h 21KB
mavlink_msg_command_long.h 21KB
mavlink_msg_camera_image_captured.h 20KB
mavlink_msg_gps_raw_int.h 20KB
mavlink_msg_global_position_int.h 19KB
mavlink_msg_hil_controls.h 19KB
mavlink_msg_safety_set_allowed_area.h 19KB
mavlink_msg_nav_controller_output.h 18KB
mavlink_msg_storage_information.h 18KB
mavlink_msg_manual_control.h 18KB
mavlink_msg_v2_extension.h 18KB
mavlink_msg_data_transmission_handshake.h 18KB
mavlink_msg_distance_sensor.h 18KB
mavlink_msg_scaled_imu3.h 18KB
mavlink_msg_scaled_imu2.h 18KB
mavlink_msg_attitude_target.h 17KB
mavlink_msg_optical_flow.h 17KB
mavlink_msg_scaled_imu.h 17KB
mavlink_msg_set_actuator_control_target.h 17KB
mavlink_msg_local_position_ned_system_global_offset.h 17KB
mavlink_msg_landing_target.h 17KB
mavlink_msg_wind_cov.h 17KB
mavlink_msg_gps_status.h 17KB
mavlink_msg_attitude_quaternion.h 17KB
mavlink_msg_raw_imu.h 17KB
mavlink_msg_global_vision_position_estimate.h 16KB
mavlink_msg_collision.h 16KB
mavlink_msg_attitude_quaternion_cov.h 16KB
mavlink_msg_manual_setpoint.h 16KB
mavlink_msg_logging_data_acked.h 16KB
mavlink_msg_terrain_report.h 16KB
mavlink_msg_resource_request.h 16KB
mavlink_msg_safety_allowed_area.h 15KB
mavlink_msg_vision_position_estimate.h 15KB
mavlink_msg_change_operator_control.h 15KB
mavlink_msg_vicon_position_estimate.h 15KB
mavlink_msg_file_transfer_protocol.h 15KB
mavlink_msg_vibration.h 15KB
mavlink_msg_logging_data.h 15KB
mavlink_msg_request_data_stream.h 15KB
mavlink_msg_radio_status.h 15KB
mavlink_msg_param_value.h 14KB
mavlink_msg_heartbeat.h 14KB
mavlink_msg_param_request_read.h 14KB
mavlink_msg_local_position_ned.h 14KB
mavlink_msg_actuator_control_target.h 14KB
mavlink_msg_param_set.h 14KB
mavlink_msg_attitude.h 14KB
mavlink_msg_serial_control.h 14KB
mavlink_msg_mission_request_partial_list.h 14KB
mavlink_msg_mission_write_partial_list.h 14KB
mavlink_msg_flight_information.h 14KB
mavlink_msg_raw_pressure.h 13KB
mavlink_msg_hil_actuator_controls.h 13KB
mavlink_msg_vfr_hud.h 13KB
共 400 条
- 1
- 2
- 3
- 4
资源评论
matlab科研社
- 粉丝: 2w+
- 资源: 1867
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- map_mode_escape_1.28.13.12700.pak
- androidx.multidex.MultiDexApplication.apk.1
- 丑子金装美化32(1).zip
- 基于Visual Basic .Net及Python技术的学校需求解决方案设计源码
- 基于Java语言的Web开发学习Demo设计源码
- 基于Java的医院排队叫号系统界面原型设计源码
- 基于Java语言的Himalaya仿喜马拉雅设计源码
- 基于PHP+HTML+CSS+JavaScript的智能电车管家设计源码
- 基于Emscripten编译的纯H5直播流播放器jessibuca设计源码
- 基于react-native的Android隐私合规配置与代码集成设计源码
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功