Table of Contents
Fetching ...

Hardware Neural Control of CartPole and F1TENTH Race Car

Marcin Paluch, Florian Bolli, Xiang Deng, Antonio Rios Navarro, Chang Gao, Tobi Delbruck

TL;DR

This work addresses the computational burden of nonlinear model predictive control by training FPGA-accelerated neural controllers (nc ncnc) to imitate NMPC and run at high frequencies on onboard hardware. The approach trains on NMPC data and uses a quantized MLP implemented via hls4ml on a Zynq-7020, achieving sub-4 μs inference and enabling 1 kHz control for a cartpole and near-NMPC performance on an F1TENTH race car, with complete onboard control in the physical system. Key contributions include an open-source training/deployment framework, hardware NC implementations that match or exceed NMPC in real-time performance, and comprehensive evaluation across simulation and real hardware showing improved tracking and faster lap times versus Pure Pursuit. The work demonstrates practical, low-power, high-frequency control for agile robots and suggests future directions such as domain randomization to bridge Sim2Real gaps and expansion to recurrent architectures for broader generalization.

Abstract

Nonlinear model predictive control (NMPC) has proven to be an effective control method, but it is expensive to compute. This work demonstrates the use of hardware FPGA neural network controllers trained to imitate NMPC with supervised learning. We use these Neural Controllers (NCs) implemented on inexpensive embedded FPGA hardware for high frequency control on physical cartpole and F1TENTH race car. Our results show that the NCs match the control performance of the NMPCs in simulation and outperform it in reality, due to the faster control rate that is afforded by the quick FPGA NC inference. We demonstrate kHz control rates for a physical cartpole and offloading control to the FPGA hardware on the F1TENTH car. Code and hardware implementation for this paper are available at https:// github.com/SensorsINI/Neural-Control-Tools.

Hardware Neural Control of CartPole and F1TENTH Race Car

TL;DR

This work addresses the computational burden of nonlinear model predictive control by training FPGA-accelerated neural controllers (nc ncnc) to imitate NMPC and run at high frequencies on onboard hardware. The approach trains on NMPC data and uses a quantized MLP implemented via hls4ml on a Zynq-7020, achieving sub-4 μs inference and enabling 1 kHz control for a cartpole and near-NMPC performance on an F1TENTH race car, with complete onboard control in the physical system. Key contributions include an open-source training/deployment framework, hardware NC implementations that match or exceed NMPC in real-time performance, and comprehensive evaluation across simulation and real hardware showing improved tracking and faster lap times versus Pure Pursuit. The work demonstrates practical, low-power, high-frequency control for agile robots and suggests future directions such as domain randomization to bridge Sim2Real gaps and expansion to recurrent architectures for broader generalization.

Abstract

Nonlinear model predictive control (NMPC) has proven to be an effective control method, but it is expensive to compute. This work demonstrates the use of hardware FPGA neural network controllers trained to imitate NMPC with supervised learning. We use these Neural Controllers (NCs) implemented on inexpensive embedded FPGA hardware for high frequency control on physical cartpole and F1TENTH race car. Our results show that the NCs match the control performance of the NMPCs in simulation and outperform it in reality, due to the faster control rate that is afforded by the quick FPGA NC inference. We demonstrate kHz control rates for a physical cartpole and offloading control to the FPGA hardware on the F1TENTH car. Code and hardware implementation for this paper are available at https:// github.com/SensorsINI/Neural-Control-Tools.
Paper Structure (22 sections, 2 equations, 9 figures, 3 tables)

This paper contains 22 sections, 2 equations, 9 figures, 3 tables.

Figures (9)

  • Figure 1: A lightweight hardware accelerated neural controller replaces a conventional expensive nmpc nmpcnmpc controller. In this work, the nc ncnc is trained by data collected from the nmpc nmpcnmpc in simulation.
  • Figure 2: A: Physical cartpole and neural controller hardware. B: Cartpole state variables
  • Figure 3: A: F1TENTH car. B: Racetrack (RCA2) including an example of the 20 next waypoints of the race line. The suggested speed is color coded (green: faster, red: slower)
  • Figure 4: Maps recorded by the physical car with their minimum curvature race lines. A: RCA1, the map used for training, B: RCA2, the map used for experiments
  • Figure 5: Physical cartpole experiment. The cart and pole tip positions are plotted over time for a swing-up followed by changes in the target cart position. The cartpole is controlled by the hardware nc ncnc .
  • ...and 4 more figures