End-to-end Neural Network Based Quadcopter control

Robin Ferede, Guido de Croon, Christophe De Wagter, Dario Izzo · DOI

Abstract

Developing optimal controllers for aggressive high-speed quadcopter flight poses significant challenges in robotics. Recent trends in the field involve utilizing neural network controllers trained through supervised or reinforcement learning. However, the sim-to-real transfer introduces a reality gap, requiring the use of robust inner loop controllers during real flights, which limits the network's control authority and flight performance. In this paper, we investigate for the first time, an end-to-end neural network controller, addressing the reality gap issue without being restricted by an inner-loop controller. The networks, referred to as G&CNets, are trained to learn an energy-optimal policy mapping the quadcopter's state to rpm commands using an optimal trajectory dataset. In hover-to-hover flights, we identified the unmodeled moments as a significant contributor to the reality gap. To mitigate this, we propose an adaptive control strategy that works by learning from optimal trajectories of a system affected by constant external pitch, roll and yaw moments. In real test flights, this model mismatch is estimated onboard and fed to the network to obtain the optimal rpm command. We demonstrate the effectiveness of our method by performing energy-optimal hover-to-hover flights with and without moment feedback. Finally, we compare the adaptive controller to a state-of-the-art differential-flatness-based controller in a consecutive waypoint flight and demonstrate the advantages of our method in terms of energy optimality and robustness.

Introduction

Most neural network (NN) controllers for drones are "hybrid" systems. Because it is difficult to perfectly simulate real-world physics—a phenomenon known as the "reality gap"—researchers typically have the NN output high-level commands like desired attitude or thrust. A traditional, hand-tuned "inner-loop" controller then translates those into actual motor speeds.

While safe, this approach limits the drone's potential. The inner loop acts as a filter that prevents the NN from fully exploiting the drone's non-linear dynamics and actuator limits. To achieve truly aggressive or energy-optimal flight, the controller needs direct "end-to-end" authority over the motors. However, previous attempts at end-to-end control often failed in the real world because small errors in the physics model, such as unmodeled aerodynamic drag or weight imbalances, lead to catastrophic instability. This paper presents a significant step forward by moving away from these traditional safety nets, demonstrating a neural network that controls a quadcopter's motors directly.

Methods: The Adaptive G&CNet

The researchers from TU Delft and the European Space Agency (ESA) developed the Guidance and Control Network (G&CNet), an architecture designed for direct RPM control.

Coordinate systems and motor configuration for the quadcopter model.

Optimal Control as a Teacher

The team formulated an energy-optimal control problem using a high-fidelity 3D quadcopter model. They utilized Nonlinear Programming (specifically the SNOPT solver) to generate a training set of 90,000 "perfect" energy-optimal trajectories. These trajectories covered a wide range of initial positions, velocities, and orientations.

Imitation Learning and Adaptation

A deep neural network with three hidden layers (120 neurons each) was trained to imitate the optimal state-feedback policy. The network maps the quadcopter's state—including position (p), velocity (v), orientation (λ), angular velocity (Ω), and motor speeds (ω)—directly to motor RPM commands.

To bridge the reality gap, the authors introduced an Adaptive G&CNet. They identified that unmodeled moments (pitch, roll, and yaw) were the primary cause of instability during real-world tests. By training the network on trajectories affected by randomized external moments ($M_{ext}$), they created a policy capable of re-optimizing in real-time. During flight, the drone estimates these unmodeled moments onboard by comparing actual gyro readings to model predictions and feeds this mismatch back into the network.

Key Results and Performance

The Adaptive G&CNet was tested against a state-of-the-art Differential-Flatness-Based Controller (DFBC) in various flight scenarios.

The Adaptive G&CNet framework and experimental results, including the circular waypoint flight comparison.

Energy Efficiency and Robustness

In waypoint-to-waypoint flight tests, the Adaptive G&CNet proved more energy-efficient than the DFBC. While the traditional controller followed smooth, pre-computed circular paths, the G&CNet took tighter corners and managed velocity more effectively by acting as a dynamic state-feedback policy.

One of the most striking results was the system's robustness to physical perturbations. Researchers attached a weight to one side of the Parrot Bebop drone to create a significant center-of-gravity imbalance. While the standard DFBC controller crashed under these conditions, the Adaptive G&CNet sensed the resulting moment mismatch and successfully completed the flight. Furthermore, the network demonstrated an ability to generalize, successfully navigating waypoints 1.0m higher than its starting point despite being trained on a narrower altitude range.

Conclusion and Future Work

This work demonstrates that end-to-end neural network control is not only feasible but can outperform traditional architectures in efficiency and robustness when paired with an adaptive strategy. Future research will focus on expanding this adaptation to include errors in thrust, drag, and actuator delays. Additionally, the team aims to explore time-optimal control for applications like drone racing, where high-speed aerodynamics make the reality gap even more pronounced. Training the network with a multi-waypoint lookahead could also further refine cornering strategies and overall flight optimality.

Reference: Ferede, R., de Croon, G., De Wagter, C., & Izzo, D. (2023). End-to-end Neural Network Based Optimal Quadcopter Control. arXiv:2304.13460v2 [cs.RO].

Summary updated

BibTeX
@article{ferede2024end,
  author = {Robin Ferede and Guido de Croon and Christophe De Wagter and Dario Izzo},
  title = {{End-to-end Neural Network Based Quadcopter control}},
  journal = {Robotics Auton. Syst.},
  year = {2024},
  doi = {10.1016/j.robot.2023.104588},
}
Figure