RouthSearch: Inferring PID Parameter Specification for Flight Control Program by Coordinate Search
Open Access
- 22 June 2025
- journal article
- Published by Association for Computing Machinery (ACM) in Proceedings of the ACM on Software Engineering
- Vol. 2 (ISSTA) , 640-662
Abstract
Flight control programs are widely used in unmanned aerial vehicles (UAVs) to manage and maintain UAVs’ flying behaviors dynamically. These flight control programs include a PID control module that takes three user-configurable PID parameters: Proportional (P), Integral (I), and Derivative (D). Users can also adjust these PID parameters during flight to suit the needs of various flight tasks. However, flight control programs do not have sufficient safety checks on the user-provided PID parameters, leading to a severe vulnerability of UAV—input validation bug. It happens when the user misconfigures PID parameters and causes the UAV to enter a dangerous state, such as deviation from the expected path, loss of control, or even crash. Prior works use random testing approaches like fuzzing to identify invalid PID parameters from user input. However, they are not effective in the three-dimensional search space of PID parameters. Meanwhile, each dynamic execution of the UAV test is very expensive, further affecting the performance of random testing. In this work, we address the problem of PID parameter misconfiguration by combining the Routh-Hurwitz stability criterion with coordinate search, introducing a method called RouthSearch. Instead of identifying misconfigured PID parameters in an ad-hoc fashion, RouthSearch principledly determines valid ranges for three-dimensional PID parameters. We first leverage the Routh-Hurwitz Criterion to identify a theoretical PID parameter boundary. We then refine the boundary using an efficient coordinate search. The valid range of three-dimensional PID parameters determined by RouthSearch can filter out misconfigured PID parameters from users during flight and further help to discover logical bugs in popular flight control programs. We evaluated RouthSearch across eight flight modes in two popular flight control programs, PX4 and ArduPilot. The results show that RouthSearch can determine the valid ranges of the three-dimensional PID parameters with an accuracy of 92. 0% when compared to the ground truth. In terms of the total number of misconfigured PID parameters, RouthSearch discovers 3,853 sets of PID misconfigurations within 48 hours, while the STOA work PGFuzz only discovers 449 sets of PID misconfigurations, significantly outperforming prior works by 8.58 times. Additionally, our method helps to detect three bugs in ArduPilot and PX4.Keywords
All Related Versions
Funding Information
- National Key Research and Development Program of China (2022YFB4501803)
- National Natural Science Foundation of China (62472100)
This publication has 34 references indexed in Scilit:
- PID control of quadrotor UAVs: A surveyAnnual Reviews in Control, 2023
- Evolutionary design of marginally robust multivariable PID controllerEngineering Applications of Artificial Intelligence, 2023
- Search and rescue operation using UAVs: A case studyExpert Systems with Applications, 2021
- Particle Swarm Optimization aided PID gait controller design for a humanoid robotISA Transactions, 2021
- The Use of Unmanned Aerial Vehicle in Military Operations2020
- Learning-Guided Network Fuzzing for Testing Cyber-Physical System Defences2019
- PID controller design for second order nonlinear uncertain systemsScience China Information Sciences, 2017
- Coordinate descent algorithmsMathematical Programming, 2015
- An elementary derivation of the Routh-Hurwitz criterionIEEE Transactions on Automatic Control, 1998
- Towards Intelligent PID ControlIFAC Proceedings Volumes, 1989