[Paper Review] Neuroflight: Next Generation Flight Control Firmware
Neuroflight introduces the first open-source, neural network-based flight control firmware for quadcopters and fixed-wing aircraft, replacing traditional PID control with a reinforcement learning-trained controller. It achieves stable, high-performance flight—including aerobatics—at over 2kHz on an ARM Cortex-M7, demonstrating real-world viability of end-to-end neuro-flight control on embedded systems.
Little innovation has been made to low-level attitude flight control used by uncrewed aerial vehicles (UAVs), which still predominantly uses the classical PID controller. In this work we introduce Neuroflight, the first open source neuro-flight controller firmware. We present our toolchain for training a neural network in simulation and compiling it to run on embedded hardware. Challenges faced jumping from simulation to reality are discussed along with our solutions. Our evaluation shows the neural network can execute at over 2.67kHz on an Arm Cortex-M7 processor and flight tests demonstrate a quadcopter running Neuroflight can achieve stable flight and execute aerobatic maneuvers.
Motivation & Objective
- To develop a neuro-flight control firmware that replaces classical PID control in the inner attitude control loop of small-scale UAVs.
- To close the sim-to-real gap in training deep reinforcement learning controllers for flight control by improving simulation fidelity and transferability.
- To enable deployment of trained neural networks directly on resource-constrained embedded microcontrollers, not just high-performance onboard computers.
- To provide a complete, open-source toolchain for training, compiling, and deploying neuro-flight controllers on real hardware.
- To establish a foundation for next-generation flight control firmware that outperforms PID in dynamic and uncertain environments.
Proposed method
- Trained a deep neural network using Proximal Policy Optimization (PPO) in a modified GymFC-v1.5 simulation environment to learn attitude control from raw sensor inputs.
- Designed a custom simulation environment (GymFC-v1.5) with enhanced realism, including sensor noise, actuator dynamics, and environmental disturbances to improve sim-to-real transfer.
- Implemented a full toolchain to compile the trained neural network into C code and deploy it on an ARM Cortex-M7 microcontroller.
- Used a lightweight neural network architecture with ReLU activations and bounded output distributions (e.g., beta function) to ensure real-time performance and stability.
- Integrated the neural network directly into the flight control firmware to replace PID and motor mixing logic in the inner control loop.
- Validated the controller through real-world flight tests on a quadcopter, comparing performance against a manually tuned PID controller.
Experimental results
Research questions
- RQ1Can a deep neural network trained via reinforcement learning in simulation achieve stable and high-performance flight on real micro-UAVs without relying on PID?
- RQ2What modifications to the simulation environment are necessary to ensure successful transfer from simulation to real-world flight for neuro-flight controllers?
- RQ3Is it feasible to deploy a trained neural network controller directly on a low-power, embedded microcontroller (e.g., ARM Cortex-M7) at high control rates (>2kHz)?
- RQ4How does the performance of a learned neural network controller compare to a manually tuned PID controller in terms of tracking accuracy and robustness during aerobatic maneuvers?
- RQ5What are the key challenges and solutions in transitioning from simulation-based training to real-world deployment of neuro-flight control systems?
Key findings
- The neural network controller achieved real-time execution at over 2kHz on an ARM Cortex-M7 microcontroller, meeting the stringent timing requirements for stable flight.
- Flight tests demonstrated that the neuro-flight controller enabled stable flight and successful execution of complex aerobatic maneuvers, including rolls, flips, and Split-S maneuvers.
- The neural network controller outperformed the manually tuned PID controller across all evaluated metrics, including tracking accuracy and response to dynamic inputs.
- The NN controller required no manual tuning, unlike PID, which took approximately 30 minutes to tune across nine gains using the Ziegler-Nichols method.
- The performance gap between simulation and reality was reduced through the use of a high-fidelity simulation environment (GymFC-v1.5), which included realistic sensor noise and actuator dynamics.
- The controller showed superior tracking performance on the pitch axis during a Split-S maneuver, with visibly reduced overshoot and improved response compared to PID.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.