Home

Awesome

Examples for the Library for Aircraft Dynamics And Control (LADAC)

This repository contains multiple examples to demonstrate the usage of LADAC. There are multicopter, airplane and eVTOL flight dynamic models as well as flight controllers for the specific vehicles. The flight dynamic models and the flight controllers are based on LADAC and written in MATLAB/Simulink. Moreover, there are interfaces to external programs like FlightGear (for visualization) and ArduPilot (for software in the loop tests and flight tests).

<div align="center"> <h3>Quadrotor Flight Path Control Demo</h3> <a href="https://youtu.be/NKl482yJtZI"> <img src="https://img.youtube.com/vi/NKl482yJtZI/0.jpg" alt="Quadrotor Flight Path Control Demo" style="width:50%;"> </a> </div>

Motivation

It is sometimes not clear how to get new aircraft configurations to fly with existing software such as ArduPilot or PX4. With such software, you usually have no insight into the dynamics of the open and closed loop of the aircraft and are limited to an empirical controller design through flight tests or simulations. This project provides the opportunity to design controllers specifically in MATLAB/Simulink. First, you can quickly parameterize existing aircraft models or easily create new aircraft models based on LADAC building blocks. Then you can analyze the dynamics of the aircraft and design controllers. Then it is possible to translate the created controller into C/C++ code (code generation) and implement it in software like ArduPilot. Finally, you can test your software in a software-in-the-loop simulation before running your code on a Pixhawk for flight testing.

Installation

Examples

How to use?

General use of the MATLAB/Simulink files

There are initialization m-files in multiple subfolders (e.g. Copter/Bebop2/init_...) to initialize the parameters of the physical model as well as of the controller. There are simulation slx-file (e.g. Copter/models/QuadcoterSimModel_...) for different kinds of vehicles and different types of controllers.

General use of ArduPilot SITL

Standard ArduPilot flight modes will only work if you load appropriate parameters for you vehicle. The default parameters (e.g. -f gazebo-iris) only work for similar quadcopters (e.g. IRIS quadcopter). For other vehicles you have to load different parameters using the --add-param-file option. For some vehicles you find the parameters in modules/ladac-examples-data/ArduPilot_params. You can use these parameter files as a basis for your own configuration and add your joystick configuration, for example.

Use of LADAC

Please have a look at the LADAC readme.

Design INDI controller for quadrotor

Have a look at the LindiCopter autopilot.

Implement controllers in ArduPilot:

You can implement your controllers in ArduPilot to quickly proceed to flight tests, see ArduPilot Custom Controller.

Contribute

Fix or report bugs

Before reporting a bug, please try the following:

Create an issue and provide the following information: