Skip to content

Flight Control software with natural looking algebraic syntaxes for 4th-gen Teensy

Notifications You must be signed in to change notification settings

animeshshastry/quadx_software

Repository files navigation

quadx_software

Made for self-calibration, system-identification and gust rejection demonstration. Tested on Teensy 4.0

A user-friendly software designed for testing advanced control and estimation algorithms. Relieves the headache of modifying PX4, Ardupilot, Betaflight or other firmwares. It uses C++ templates and matrix class, through which standard operators are overridden and used naturally in algebraic expressions, which results in simplistic Matlab-type syntaxes. But, currently the code is dirty and more cleaning is needed. Microcontroller version of Eigen is also present in the libraries with unscented Kalman filter (UKF) and square-root unscented Kalman filter (sq-UKF) implementations.

This software is in experimental release state and is currently being built and tested on a quadcopter / quadrotor. To use the geometric SE(3) controller, VIO data input through rosserial is required. More documentation on this is coming soon.

To use this software follow these 4 easy steps:

  1. Clone this repository in your Arduino folder.
  2. Clone the libraries from https://github.com/animeshshastry/quadx_firmware_libraries and place the library sub-folders in your Arduino/libraries.
  3. Open and compile the main file "quadx_firmware.ino".
  4. Upload to Teensy 4.0.

This software contains Implementations of

Control: SE(3) | Status: Complete
Control: SO(3) | Status: Complete
Estimator: UKF | Status: Complete
Estimator: sq-UKF | Status: Complete

This software was developed to satisfy the following objectives:

Primary Goal 1: Demonstration of self-calibration | Status: In Progress
Primary Goal 2: Demonstration of unsteady wind rejection | Status: Complete

Secondary Goal 1: Nonlinear control testing | Status: Complete
Secondary Goal 2: Dynamical Estimation testing | Status: Complete
Secondary Goal 3: Localization indoors using VIO | Status: Complete

For mathematical details and derivations, please read the following paper:
A. Shastry and D. A. Paley, "UAV State and Parameter Estimation in Wind Using Calibration Trajectories Optimized for Observability," in IEEE Control Systems Letters, vol. 5, no. 5, pp. 1801-1806, Nov. 2021, doi: 10.1109/LCSYS.2020.3044491.

Acknowledgements:

Radio and LED functions of this software was built upon https://github.com/nickrehm/dRehmFlight

About

Flight Control software with natural looking algebraic syntaxes for 4th-gen Teensy

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published