Skip to content

MathWorks-Teaching-Resources/Quadcopter-Modeling-Simulation

Introduction to Quadcopter Modeling & Simulation

Pranav Lad, Dhruv Chandel

View on File Exchange or Open in MATLAB Online

MATLAB Versions Tested

Curriculum Module

Created with R2025a. Compatible with R2025a and later releases.

Information

This curriculum module contains interactive MATLAB® live scripts that teach the fundamental principles behind how a quadcopter operates.

DroneScene.png

Background

You can use these live scripts as demonstrations in lectures, class activities, or interactive assignments outside class. Starting from the basics of mathematical modeling, we will build up to a full simulation of a quadcopter delivering a package. We will also look at different fidelities of simulation ranging from simple cuboidal navigation models to detailed physical models to photorealistic simulations suitable for testing sensing and perception algorithms. Further resources are provided for student projects, competitions and researchers looking to develop their skills further for industrial applications or research.

The instructions inside the live scripts will guide you through the exercises and activities. Get started with each live script by running it one section at a time. To stop running the script or a section midway (for example, when an animation is in progress), use the EndIcon.png Stop button in the RUN section of the Live Editor tab in the MATLAB Toolstrip.

Contact Us

Contact the MathWorks Educator Content Development Team if you would like to request assistance, provide feedback, or if you have a question.

Prerequisites

It is expected that students going through this course should be familiar with the basics of MATLAB programming and working with the Simulink environment. They should also have a basic understanding of ordinary differential equations, physics, and numerical simulations. Additionally, a knowledge of basic Control Systems and Physical Modeling with Simscape will also be helpful.

To help with the background requirements, Online Self-Paced Courses are available on MATLAB Academy, which the students can use to learn more:

Fundamental introductions to the tools and environments

Targeted learning for specific workflows

Quick introductions

Doing math with MATLAB

Physical modeling

Control Systems

Each of these courses awards a certificate upon completion. The courses can also be assigned as homework alongside the course.

Getting Started

Accessing the Module

On MATLAB Online:

Use the OpenInMO.png link to download the module. You will be prompted to log in or create a MathWorks account. The project will be loaded, and you will see an app with several navigation options to get you started.

On Desktop:

Download or clone this repository. Open MATLAB, navigate to the folder containing these scripts and double-click on UAV.prj. It will add the appropriate files to your MATLAB path, set up your starting directory, and open an app that asks you where you would like to start.

Ensure you have all the required products (listed below) installed. If you need to include a product, add it using the Add-On Explorer. To install an add-on, go to the Home tab and select AddOnsIcon.png Add-Ons > Get Add-Ons.

Products

MATLAB®, Simulink®, Stateflow®, Aerospace Blockset, and Simulink® Real-Time™ are used throughout. The RigidTransforms script also uses the Image Processing Toolbox™, and the Computer Vision Toolbox™. The Trajectory Generation script also uses the Robotics System Toolbox™. The QuadcopterBasics script and PropellerModel script also use the Symbolic Math Toolbox™.

Learning Materials

Mathematical Background

Introduction to numerical modeling & simulation of differential equations.

ParabolicEquation.png
In this script, students will...
$\bullet$ Practice creating numerical simulation models in MATLAB and Simulink.
Models referenced
$\bullet$ Projectile_1D.slx
$\bullet$ Projectile_1D_WithDrag.slx

Introduction to mathematical modeling with six degrees of freedom.

SixDOFBlock.png
In this script, students will...
$\bullet$ Learn about movement in 6 degrees-of-freedom.
Models referenced
$\bullet$ Modeling a Six Degree of Freedom Motion Platform

Modeling a Quadcopter

Create a simple propeller model using blade element theory and dimensional analysis.

PropellerBlock.png
In this script, students will...
$\bullet$ Construct a minimal physical model of a quadcopter propeller.
$\bullet$ Understand how rotor speed produces thrust and torque.
$\bullet$ Understand how thrust and torque depend on the width of a rotor.
Models referenced
$\bullet$ SimplePropellerModel.slx

Describe the basic components of a quadcopter and explore a simple physical model.

QuadcopterSchematics.png
In this script, students will...
$\bullet$ Learn the fundamental components of a physical quadcopter
$\bullet$ Learn how to balance forces to model a quadcopter hovering

Explore the implications of moving in a 3D world.

PitchRollYaw.png
In this script, students will...
$\bullet$ Learn the fundamentals of quadcopter movement: elevation, pitch, roll, and yaw
Models referenced
$\bullet$ UAV_Sim.slx

Investigate using PID control systems on a quadcopter.

PIDScope.png
In this script, students will...
$\bullet$ Learn how to implement hover control in a Simulink model.
$\bullet$ Learn how to implement directional controls in a Simulink model.
$\bullet$ Practice tuning a PID controller.
Models referenced
$\bullet$ QuadcopterPID_Vertical.slx
$\bullet$ UAV_Hover_Sim.slx
$\bullet$ XY_Control.slx

Improving Fidelity

Improve the fidelity of a quadcopter model with Simscape elements.

SimscapeFamily.png
In this script, students will...
$\bullet$ Use pulse width modulation on a DC motor
$\bullet$ Model a propeller in Simscape
Models referenced
$\bullet$ Build and Simulate a Simple DC Motor
$\bullet$ Propeller_Model.slx
$\bullet$ Propeller_Ref_Speed.slx

Explore two documentation examples on trajectory generation

MinimumJerk.png
In this script, students will...
$\bullet$ Explore the effects of planning trajectories to minimize jerk
$\bullet$ Learn about Simscape Results Explorer, spatial contact forces and applications of multibody modeling
Models referenced
$\bullet$ Generate Minimum Jerk Trajectory
$\bullet$ Package Delivery Quadcopter Example

Quadcopter.png
In this script, students will...
$\bullet$ Explore the fully implemented model to see the various subsystems - electrical, mechanical and maneuver controller.
$\bullet$ Work on exercises on motor sizing, testing stability and range, integrating a 3D propeller, and more.
Models referenced
$\bullet$ Quadcopter Drone Model in Simscape

Explore two documentation examples on trajectory generation

GroundTruth.png
In this script, students will...
$\bullet$ Learn about combining measurements from different sensors to estimate the location
$\bullet$ Design a Kalman Filter to estimate the angular position of a pendulum
$\bullet$ Design an Extended Kalman Filter to estimate the angular position of the nonlinear pendulum system
Models referenced
$\bullet$ IMU and GPS Fusion for Inertial Navigation
$\bullet$ virtualPendulumModel.slx (Kalman Filter Lab)

Explore a variety of high- and low-fidelity scenarios.

SimpleCity.png
In this script, students will...
$\bullet$ Explore building low-fidelity scenarios to test trajectories
$\bullet$ Explore the capabilities of Unreal Engine for building high-fidelity, photo-realistic scenarios
$\bullet$ Consider how much fidelity is necessary to answer different modeling questions
Models referenced
$\bullet$ UAV Scenario Tutorial
$\bullet$ Plan Minimum Snap Trajectory for Quadrotor
$\bullet$ Simulate Simple Flight Scenario and Sensor in Unreal Engine Environment
$\bullet$ UAV Package Delivery System

Suggest additional directions that students may be interested in exploring including Advanced Control, Working with ROS and Gazebo, and the Challenge Projects.

License

The license for this module is available in the LICENSE.md.

Related Courseware Modules

EngProbSolve.png
Available on:
OpenInFX.png
OpenInMO.png
GitHub

Introduction to Robotics - University of Cape Town

CapeTown.png
Available on:
OpenInFX.png
OpenInMO.png
GitHub

Or feel free to explore our other modular courseware content.

Educator Resources

Contribute

Looking for more? Find an issue? Have a suggestion? Please contact the MathWorks Educator Content Development team. If you want to contribute directly to this project, you can find information about how to do so in the CONTRIBUTING.md page on GitHub.

© Copyright 2026 The MathWorks, Inc

About

An introduction to quadcopter modeling and simulation from first principles to a fully detailed model.

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages