Skip to content

Source code of the paper "Priority-enhanced INDI for over-actuated systems: stability and robustness analysis"

Notifications You must be signed in to change notification settings

mengchaoheng/PINDI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PINDI

About

Priority-enhanced INDI (PINDI) is an INDI-based control scheme for over-actuated systems, in which performance enhancement is achieved through prioritized control allocation (PCA).

Our open-source flight control project, the DFUAV project, is forked from PX4-Autopilot. Its main contributions include maintaining and extending multiple DFUAV-specific development branches (e.g., df-1.1x.x) and implementing a variety of control algorithms to support high-performance flight of ducted fan UAV platforms.

This work is part of the DFUAV project and includes:

  1. Source code of the PINDI controller designed for DFUAVs equipped with four control vanes, provided in the form of a patch based on PX4 v1.12.3. More details of usage can be found in the readme. The controller can be directly deployed on flight controller hardware (e.g., Pixhawk) for real-world flight tests and also supports software-in-the-loop (SITL) simulation, enabling reproduction of the reported flight experiments.
  2. Experimental procedures for various flight tests conducted using PINDI.
  3. MATLAB source code for analyzing flight log files xx.ulog, the corresponding flight logs of the paper can be downloaded by clicking download.

The full code of PINDI can also be found in the DFUAV project (df-1.12.3 branch). The PCA algorithm depends on control_allocation, which is used to draw attainable sets and test control allocation algorithms. The MATLAB source code for analyzing flight log files depends on PX4_ulog_plottools, which is used to parse PX4 log files and generate plots in MATLAB.

Block diagram of the closed-loop system under the PINDI controller.

Reference

If our repo helps your academic projects, please cite the following publication:

[1] C. Meng, H. Pei, Z. Cheng, P. Huang, Priority-enhanced INDI for over-actuated systems: stability and robustness analysis, Aerospace Science and Technology 173 (2026) 111624. https://doi.org/10.1016/j.ast.2026.111624.


@article{mengPriorityenhancedINDIOveractuated2026,
	title = {Priority-enhanced {INDI} for over-actuated systems: stability and robustness analysis},
	volume = {173},
	issn = {1270-9638},
	url = {https://www.sciencedirect.com/science/article/pii/S1270963826000052},
	doi = {10.1016/j.ast.2026.111624},
	language = {en-US},
	urldate = {2026-01-30},
	journal = {Aerospace Science and Technology},
	author = {Meng, Chaoheng and Pei, Hailong and Cheng, Zihuan and Huang, Peiye},
	month = jun,
	year = {2026},
	keywords = {Robustness, Stability, Control allocation, Feedback linearization, Over-actuated systems, INDI},
	pages = {111624},
}

Usage

Flight-controller source code

More details can be found in /source_code_patch/readme.md or in the df-1.12.3 branch of the DFUAV project. This paper conducted multiple experiments, with each experiment's ulg file recording detailed contents, including code version, parameter changes, and system response. Open-source tools flight_review can also be applied to analyze the flight logs. The detailed implementation process and parameter settings of all experiments are provided in setting file.

Compiling the code and running the software-in-the-loop simulation is straightforward:

  1. Clone the DFUAV project.
git clone https://github.com/mengchaoheng/DuctedFanUAV-Autopilot.git
cd to DuctedFanUAV-Autopilot
  1. Make sure you're on the df-1.12.3 branch. You can use git status to check it.
git checkout df-1.12.3
  1. Ensure that the required submodules for loading the df-1.12.3 branch are loaded.
git submodule update --init --recursive

When switching branches or wishing to recompile, you can use

make distclean

To keep a clean compilation, and then run

git submodule update --init --recursive

again to rebuild, The compilation command is as follows.

  1. Building the code and start the simulation.
make px4_sitl gazebo_ductedfan4 # For start SITL simulation (gazebo-classic)
make px4_fmu-v5 upload # For the Pixhawk 4 controller

MATLAB plotting scripts

  1. Download data from data

  2. In test_vview.m, df4_vview.m, compare_ca.m, Change the dependency path to the path of your control_allocation library:

addpath(genpath('~/Proj/control_allocation')); % Replace with your path 

If you need to analyze your log, change the path of ulog2csv (see PX4_ulog_plottools):

ulog2csv_path = '~/Library/Python/3.9/bin/ulog2csv';
  1. Plot file and its corresponding generated images
  • compare_ca.m -> Figure_2
  • df4_vview.m -> Figure_6
  • test5_2_1_1.m -> Figure_9-Figure_11
  • test5_2_2.m -> Figure_14-Figure_16
  • test5_2_2RMS.m -> Figure_17
  • test5_2_1_2.m -> Figure_12
  • test5_2_1_3.m -> Figure_13
  • realflight5_3.m -> Figure_20-Figure_22
  • (Additional) test5_2_2_for_rate_loop_alone.m: Flight test with only angular velocity loop, corresponding to 5.2.2. The reference signal is changed to the heading angular velocity square wave signal, $\omega^{B}_{sp}=[0,0,\frac{\pi}{2}square(0.5\pi t)]^T$. The test process is the same as 5.2.2, and the results are similar to Figure_14-Figure_16

Results

Flight test using a complete control loop

Flight control architecture.

Tracking performance under the PINDI controller in simulation.

Real-world flight tests.

For more details, simulation and real-world flight test videos can be viewed on YouTube, or accessed by clicking the images below:


Simulation Video.


Real-World Flight Video.

The UAV is hovered at a fixed point at a certain height, and after adding constant disturbance, the UAV tracks the heading reference square wave signal. The simulation and real-world flight test results are as above.

The running time of each part of the control strategy used for comparison on the pixhawk 4 mini controller (using STM32F765) is divided into the following three parts:

Allocator running time (µs).

Based on the test data in above, the average running time is calculated, where the INV allocation method pre-calculates the pseudo-inverse of the control effect matrix (average running time of 8.8712 µs). If the pseudo-inverse is calculated online, the average running time is 31 µs.

Allocation method Avg. Time (µs) Allocation method Avg. Time (µs)
INV 31 WLS 105.4750
DIR 207.6368 PCA 171.4553

Note: Please note that the runtime of the allocation algorithms depends on the problem dimension, test signals, and specific implementation details, but the overall order of magnitude remains stable. We can collect data during normal flight operations and compute the average runtime. Results from real flight experiments show that the variation in execution time does not exceed the order of magnitude. That is, the pseudo-inverse method typically takes on the order of a few tens of microseconds, while optimization-based allocation methods take approximately 100–300 microseconds.

Rate controller running time (us).

The INDI runtime is evaluated using plot_setpoint_response.m with the log file log_43_2025-8-6-17-51-54.ulg.

Control method Avg. Time (µs)
PID 2.3653
INDI 2.9966

Controller+Allocator running time.

Based on the experimental data in section 5.3, we have:

Control scheme Avg. Time (µs) Control scheme Avg. Time (µs)
INDI+INV 31+2.9966=34 INDI+WLS 2.9966+105.4750=108
INDI+DIR 2.9966+207.6368=211 PINDI 2.9966+171.4553=174

Flight test using only angular velocity control

To address the reviewer's concerns, we add this section to show flight tests of only the angular velocity loop. In order to make the experiment repeatable, we use simulation as an example to demonstrate. For more information on this aspect, please refer to our other article titled "Attitude Control of Ducted Fan UAV Based on INDI and Priority Control Allocation".

In the simulation, we adopt similar operational steps as in the previous section, first adding external disturbances after the aircraft hovers and then observing the angular velocity tracking response.

Flight control architecture.

Angular rate tracking performance under the PINDI controller in simulation.

Similarly, the simulation using only the angular velocity loop can be viewed on YouTube or accessed by clicking the images below:


Simulation Video.

Similar to the analysis in sections 5.2.2 and 5.3 of the paper, we present the flight test results with only angular velocity loop control in the simulation as follows. Figures 14*-Figure 16* correspond to Figures 14-Figure 16 in the paper.

Figure 14*. Attitude response and angular velocity tracking error under different control schemes (rate loop alone).

Figure 15*. Allocation error and allocation result under different control schemes (rate loop alone).

Figure 16*. Position response under different control schemes (rate loop alone).

About

Source code of the paper "Priority-enhanced INDI for over-actuated systems: stability and robustness analysis"

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published