Skip to content
Open access

A Real-Time Hybrid Machine Learning–Based Adaptive PID Controller for Fixed-Wing UAV Lateral Stabilization with a Unified Validation Framework

Oct 2026 · Engineering, Technology & Applied Science Research · 0 citations · 23 references

Abstract

Traditional Proportional–Integral–Derivative (PID) controllers are the dominant solution for Unmanned Aerial Vehicle (UAV) attitude stabilization due to their simplicity and low computational cost. However, their fixed tuning parameters limit performance under nonlinear dynamics, rapidly varying flight conditions, and external disturbances. This study proposes a Hybrid Machine Learning–Based Adaptive PID (HML-A-PID) control framework that combines neural gain scheduling with a practical bounded and smoothed gain-update mechanism. Unlike prior ML-based PID schemes that apply neural predictions directly, the proposed controller blends the predicted gains with the previously applied gains using a tunable smoothing factor and constrains them within admissible intervals to promote smooth and bounded gain evolution. This results in a structured gain-conditioning mechanism intended to mitigate neural inference noise and improve practical real-time behavior under varying operating conditions. A lightweight Multilayer Perceptron (MLP) is trained offline using high-fidelity Software-in-the-Loop (SIL) simulations in X-Plane 12, leveraging a large dataset of flight states, control actions, and expert-tuned reference PID gains across diverse mission profiles. The trained model and the hybrid adaptation law are deployed on an STM32 microcontroller using TensorFlow Lite Micro, achieving deterministic 100 Hz operation with sub-millisecond inference latency. The complete framework is evaluated through a unified Software-in-the-Loop, Hardware-in-the-Loop, and Physical-in-the-Loop (SIL–HIL–PIL) test platform, including an actuated UAV physical demonstrator that replicates the simulated aircraft’s geometry and control-surface dynamics. Experimental results indicate that the proposed HML-A-PID controller improves lateral-tracking performance, reduces peak transient deviations, and lowers control effort relative to a fixed-gain PID baseline. The hybrid update law supports smooth, bounded gain evolution in practical operation and improves real-time behavior under varying operating conditions. By integrating data-driven learning with a practically constrained adaptive mechanism, this work provides a real-time-capable, lightweight, and practical adaptive PID framework suitable for next-generation UAV autopilots.

Read PDF

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.