MPC

A MPC Controller for Quadrotor UAV

A dynamic model that considers both linear and complex nonlinear effects extensively benefits the model-based controller development. However, predicting a detailed aerodynamic model with good accuracy for unmanned aerial vehicles (UAVs) is challenging due to their irregular shape and low Reynolds number behavior. This work proposes an approach to model the full translational dynamics of a quadrotor UAV by a feedforward neural network, which is adopted as the prediction model in a model predictive controller (MPC) for precise position control. The raw flight data are collected by tracking various pre-designed trajectories with PX4 autopilot. The neural network model is trained to predict the linear accelerations from the flight log. The neural network-based model predictive controller is then implemented with the automatic control and dynamic optimization toolkit (ACADO) to achieve real-time online optimization. Software in the loop (SITL) simulation and indoor flight experiments are conducted to verify the controller performance. The results indicate that the proposed controller leads to a 40% reduction in the average trajectory tracking error compared to the traditional PID controller.


Currently, this MPC controller has been the main controller in our lab, and we open sourced it to the community (I only help with the maintenance). The included functions are: NL-MPC and SYS-ID. My collegue later on included backstepping controller and sliding mode controller. Feel free to try out our code!


GitHub


Video

IMAGE ALT TEXT HERE



References

2022

  1. mpc.jpg
    Neural network based model predictive control for a quadrotor UAV
    Bailun Jiang, Boyang Li, Weifeng Zhou, Li-Yu Lo, Chih-Keng Chen, and Chih-Yung Wen
    Aerospace, 2022