Abstract: Optimal control holds great potential to improve a variety of robotic applications. The application of optimal control on-board limited platforms has been severely hindered by the large computational requirements of current state of the art implementations. In this work, we make use of a deep neural network to directly map the robot states to control actions. The network is trained offline to imitate the optimal control computed by a time consuming direct nonlinear method. A mixture of time optimality and power optimality is considered with a continuation parameter used to select the predominance of each objective. We apply our networks (termed G&CNets) to aggressive quadrotor control, first in simulation and then in the real world. We give insight into the factors that influence the 'reality gap' between the quadrotor model used by the offline optimal control method and the real quadrotor. Furthermore, we explain how we set up the model and the control structure on-board of the real quadrotor to successfully close this gap and perform time-optimal maneuvers in the real world. Finally, G&CNet's performance is compared to state-of-the-art differential-flatness-based optimal control methods. We show, in the experiments, that G&CNets lead to significantly faster trajectory execution due to, in part, the less restrictive nature of the allowed state-to-input mappings.
Introduction
Aggressive autonomous flight, characterized by high speeds and sharp maneuvers, requires solving complex nonlinear optimal control problems. Ideally, a quadrotor should calculate exact motor thrusts to reach a target in minimum time. However, these calculations are computationally intensive, typically requiring powerful workstations that exceed the capabilities of low-power, on-board CPUs found on most drones.
Current approaches often rely on simplifying physics through linear models or using differential flatness to generate smooth polynomial trajectories. While computationally efficient, these methods often fail to capture high-speed dynamics or fully exploit motor saturation limits, which are critical for true time-optimality. This work introduces G&CNets (Guidance and Control Networks) to bridge this gap, providing the speed of a simple lookup table with the performance of a complex nonlinear optimizer.
Methodology
The core of the approach is imitation learning. A high-fidelity nonlinear model of a quadrotor was used to generate a massive dataset of 250,000 optimal trajectories via direct transcription (Hermite-Simpson) and the SNOPT solver.
A hybrid cost function was employed, using a continuation parameter $\epsilon$ to balance time-optimality and power-optimality. The G&CNet architecture is a compact Multi-Layer Perceptron (MLP) with three layers of 100 units each. It maps the drone's state—position, velocity, attitude, and angular rate—directly to motor thrust commands. This direct mapping eliminates the lag inherent in traditional two-layer architectures where a network predicts a path for a separate controller to track.
Closing the Reality Gap
Transitioning from simulation to real-world flight on a Parrot Bebop 1 drone revealed the "reality gap," primarily driven by actuator lag—the delay in physical rotors reaching commanded speeds. Analysis showed the system remains stable with delays up to ~63ms. To mitigate real-world disturbances, the G&CNet outputs were integrated with an Incremental Nonlinear Dynamic Inversion (INDI) controller within the Paparazzi-UAV autopilot framework.
Results
Experimental results demonstrate that G&CNets effectively learn to imitate optimal control laws, including the "bang-bang" behavior required for time-optimality, where motors are driven to their saturation limits.
In real-world tests, G&CNets tuned for high aggressiveness ($\epsilon=0.2$) achieved targets up to 60% faster than state-of-the-art differential-flatness-based benchmarks. For instance, a 5-meter dash was completed in 1.96s by G&CNet versus 2.63s for the benchmark. While the aggressive network exhibited higher tracking errors (0.28m vs 0.07m) due to physical actuator constraints, it significantly outperformed standard methods in speed by fully utilizing the drone's physical capabilities.
Conclusion and Future Work
G&CNets provide a viable path for deploying aggressive optimal control on resource-constrained hardware. Future work aims to extend this framework to full 3D flight, incorporate motor inertia into the training loop to reduce the reality gap, and enable high-speed waypoint navigation without requiring a hover state at every target.
Summary updated