MathWorks - Mobile View
  • Sign In to Your MathWorks AccountSign In to Your MathWorks Account
  • Access your MathWorks Account
    • My Account
    • My Community Profile
    • Link License
    • Sign Out
  • Products
  • Solutions
  • Academia
  • Support
  • Community
  • Events
  • Get MATLAB
MathWorks
  • Products
  • Solutions
  • Academia
  • Support
  • Community
  • Events
  • Get MATLAB
  • Sign In to Your MathWorks AccountSign In to Your MathWorks Account
  • Access your MathWorks Account
    • My Account
    • My Community Profile
    • Link License
    • Sign Out

Videos and Webinars

  • MathWorks
  • Videos
  • Videos Home
  • Search
  • Videos Home
  • Search
  • Contact sales
  • Trial software
  Register to watch video
  • Description
  • Full Transcript
  • Related Resources

Simulating Unmanned Aerial Vehicles (UAV) with MATLAB and Simulink

Mihir Acharya, MathWorks

Simulate Unmanned Aerial Vehicles (UAV) in MATLAB and Simulink using the UAV Library for Robotics System Toolbox™. You can simulate fixed-wing or multirotor UAVs using a guidance model that approximates a closed-loop autopilot controller with a kinematic model. 

You can also implement a waypoint-following controller and tune its parameters using the low-fidelity model. Furthermore, you can use the same parameters to control the UAV with a high-fidelity model built with Aerospace Blockset™. This workflow is useful to simulate small off-the-shelf drones for various applications such as inspection, monitoring, surveillance, etc.

The UAV Library for the Robotics System Toolbox contains the following reference examples:

  • Tuning Waypoint Follower for Fixed-Wing UAV
  • Approximate High-Fidelity UAV model with UAV Guidance Model block

Unmanned aerial vehicles can fly autonomously for various applications such as inspection, monitoring, and surveillance across industries such as agriculture, mining, construction, and more. They can also be used for aerial photography or even to deliver your pizza.

One of the common workflows in all these applications is to have the UAV follow a set of waypoints using the guidance control algorithm. In this video we will learn about these workflows with Simulink.

Flying a UAV without modeling and simulation can cause failures leading to safety and cost issues. A common simulation workflow for UAVs involves 3 steps:

  1. Having a kinematic model of a UAV,
  2. Controlling and tuning the model using a waypoint-following algorithm,
  3. Visualizing the flight behavior and analyzing the flight data.

In the 2018b release, Robotics System Toolbox provides functions and blocks to model and simulate UAV algorithms in MATLAB and Simulink. ­Let’s talk about Simulink blocks and examples for UAVs, where you can use UAV Guidance Model block, Waypoint Follower block, and UAV Animation block to implement this workflow on either a multi-rotor or a fixed-wing UAV.

UAV simulation starts with tuning the control parameters with a low-fidelity simulation model, in which external disturbances like wind and turbulence are not considered. The UAV Guidance Model block is suitable for low-fidelity, but fast, simulation.

This inbuilt example consists of a fixed-wing path following model, where this part is the guidance model configuration. The UAV Guidance Model block includes the fixed-wing UAV aerodynamics and an autopilot. This lets you approximate the kinematic behavior of a closed-loop system. 

And this part is the waypoint-follower configuration, where the waypoint Follower block computes a desired heading for the UAV. It does so by giving a set of waypoints, current pose, and look-ahead distance as inputs.

The heading control block is a proportional controller that regulates the UAV’s heading angle. You can use the sliders to tune the look-ahead distance and heading control values.

To visualize the flight behavior, we use the UAV Animation block. We can see that a small look-ahead distance and a fast heading control results in a very curvy path. Whereas, a large look-ahead distance and a slow heading control gives the desirable path.

Once the flight behavior satisfies the design specifications in the low-fidelity model, we can test the same control parameters with a higher-fidelity aerodynamic model based on Aerospace Blockset.

Aerospace Blockset lets you represent the behavior of a UAV in a more realistic flight environment by including validated environment models for the atmosphere, gravity, wind, and more. This second inbuilt example consists of a plant model and a mid-level autopilot, in which you can:

  1. Switch between high- and low-fidelity model,
  2. Approximate high-fidelity model with low-fidelity guidance model and provide an input step signal to compare the responses for roll angle, air speed, and height,
  3. And finally, test the waypoint navigation model with both the low- and high-fidelity models and compare the flight behavior results.

We can see that the output responses for the low- and high-fidelity models are similar. Thus, we can tune the control parameters for different scenarios with the low-fidelity model and then tune the high-fidelity model accordingly for implementation in the real environment.

You can try these examples by installing UAV library with Robotics System Toolbox. And for more details, check out the links for the Robotics System Toolbox product page and the reference examples for UAV algorithms.

Related Products

  • Robotics System Toolbox
  • Aerospace Blockset

Learn More

Robotics System Toolbox™ UAV Library
UAV Algorithms

Feedback

Featured Product

Robotics System Toolbox

  • Request Trial
  • Get Pricing

Up Next:

28:23
Using MATLAB and Simulink for Robotics

Related Videos:

44:59
Developing Robotics Applications with MATLAB, Simulink, and...
40:53
Development and Testing of Robotic Applications Using...
1:59
Work with Mobile Robotics Algorithms in MATLAB
41:09
Modeling and Simulating Radar Systems Using MATLAB and...

View more related videos

MathWorks - Domain Selector

Select a Web Site

Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .

Select web site

You can also select a web site from the following list:

How to Get Best Site Performance

Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.

Americas

  • América Latina (Español)
  • Canada (English)
  • United States (English)

Europe

  • Belgium (English)
  • Denmark (English)
  • Deutschland (Deutsch)
  • España (Español)
  • Finland (English)
  • France (Français)
  • Ireland (English)
  • Italia (Italiano)
  • Luxembourg (English)
  • Netherlands (English)
  • Norway (English)
  • Österreich (Deutsch)
  • Portugal (English)
  • Sweden (English)
  • Switzerland
    • Deutsch
    • English
    • Français
  • United Kingdom (English)

Asia Pacific

  • Australia (English)
  • India (English)
  • New Zealand (English)
  • 中国
    • 简体中文Chinese
    • English
  • 日本Japanese (日本語)
  • 한국Korean (한국어)

Contact your local office

  • Contact sales
  • Trial software

Explore Products

  • MATLAB
  • Simulink
  • Student Software
  • Hardware Support
  • File Exchange

Try or Buy

  • Downloads
  • Trial Software
  • Contact Sales
  • Pricing and Licensing
  • How to Buy

Learn to Use

  • Documentation
  • Tutorials
  • Examples
  • Videos and Webinars
  • Training

Get Support

  • Installation Help
  • Answers
  • Consulting
  • License Center
  • Contact Support

About MathWorks

  • Careers
  • Newsroom
  • Social Mission
  • Contact Sales
  • About MathWorks

MathWorks

Accelerating the pace of engineering and science

MathWorks is the leading developer of mathematical computing software for engineers and scientists.

Discover…

  • Select a Web Site United States
  • Patents
  • Trademarks
  • Privacy Policy
  • Preventing Piracy
  • Application Status

© 1994-2021 The MathWorks, Inc.

  • Facebook
  • Twitter
  • Instagram
  • YouTube
  • LinkedIn
  • RSS

Join the conversation

This website uses cookies to improve your user experience, personalize content and ads, and analyze website traffic.  By continuing to use this website, you consent to our use of cookies.  Please see our Privacy Policy to learn more about cookies and how to change your settings.