Main Content

Design and Tune Controller for VTOL UAV

This series of examples shows you have to design and tune a vertical takeoff and landing (VTOL) UAV using a reference application template as a MATLAB® Project. This page provides a brief overview of the VTOL controller Simulink® model before providing detailed instructions on how to tune the controller. For more information about MATLAB Projects, see Create Projects.

A VTOL UAV is an UAV that has both fixed wings and multirotors. This image shows a VTOL UAV with two rear fixed rotors and two front tilt rotors. These rotors combined with the fixed wings enable VTOL UAVs to take off and landing vertically and transition to fixed wing flight.

Tune Control Design for VTOL in Simulink

The multirotors enable the UAV to take off and land in areas without a runway and transition to fixed-wing flight for faster movement. This example series breaks down the controller design into five steps:

Continue to VTOL Controller Model Overview to get an overview of the VTOL controller or get started by navigating to any of the examples in this example series.

Deploy VTOL Controller to PX4 Hardware

To deploy the VTOL controller to PX4 hardware, see PX4 Hardware-in-the-Loop (HITL) Simulation with VTOL Tilt-Rotor Plant in Simulink. To visualize the HITL simulation over urban environment, see Visualize VTOL Hardware-in-the-Loop (HITL) Simulation over Urban Environment

VTOL Controller Model Overview

First open the MATLAB Project.

prj = openProject("VTOLApp/VTOLRefApp.prj");

This MATLAB Project uses shortcuts to set up parameters needed for the VTOL model and to switch between different tuning modes.

VTOL project shortcuts

Click the Getting Started button to initialize VTOL controller parameters. Before running the model, you must set the current testing configuration to either manual mode or guidance mode by clicking Manual Mode or Guidance Mode, respectively. Manual mode enables you to manually adjust the controller parameters during flight simulations to see the performance of the controller. Guidance mode uses autopilot with the set parameters to fly through the predefined mission.

The VTOLTiltrotor Simulink® model contains these six subsystems that enable you to customize the VTOL UAV template:

  • Ground Control Station – Manages the VTOL UAV flight mission to enable the VTOL UAV to execute a set of maneuvers.

  • Guidance Test Bench – Enables you to test either using manual-control test bench or a guidance test bench. The manual-control test bench uses sliders to set parameters mid-flight. The guidance test bench consists of guidance logic that can be used to architect specific missions and test out control robustness.

  • Autopilot VTOL flight controller.

  • Digital Twin – Customize control system of VTOL plant model. Includes dynamics, such as aerodynamics propulsion, and wind modeling.

  • Estimator – Estimates the states of the VTOL aircraft based on sensor data and sends the state information to the ground control station and autopilot controller.

  • Visualization – Visualize the VTOL UAV mission trajectory.

Open the VTOLTiltrotor Simulink model.

open_system("VTOLTiltrotor")

Explore the model. See Tune Control Design for VTOL UAV in Hover Configuration when you are ready to continue.