# On-board Model Predictive Control of a Quadrotor Helicopter: Design, Implementation, and Experiments

### Patrick Bouffard

###
EECS Department

University of California, Berkeley

Technical Report No. UCB/EECS-2012-241

December 13, 2012

### http://www.eecs.berkeley.edu/Pubs/TechRpts/2012/EECS-2012-241.pdf

This report describes work in applying model predictive control (MPC) techniques to the control of quadrotor helicopters, a type of micro aerial vehicle (MAV) platform that has gained great popularity in recent years both in research and commercial/military settings. MPC is a form of optimal control which is attractive in part because it allows engineering requirements to be addressed directly in the design of the controller in terms of costs to be minimized and constraints to be satisfied in an optimization problem. Furthermore, for many engineering problems of interest, the optimization to be performed is convex, meaning that a global optimum can be efficiently computed. MPC first found broad early application in the process industry, where the typically longer time scales were compatible with the time necessary to solve the optimization problem. More recently with both the exponential increase in available computing power and the development of more efficient solution techniques, MPC has become an option for control of systems with faster dynamics, such as quadrotors.

We bring together results from our application of two distinct variants of MPC. The common thread is that we seek advanced control algorithms that can be applied to an autonomous MAV like the quadrotor, ideally without requiring any external resources, i.e. we aim to perform all computations required for real-time closed-loop control on-board the vehicle.

The first variant is known as explicit MPC, where in a sense the heavy numerical work of solving optimization problems is done a priori and off-line, such that the on-line implementation requires minimal computation. In this report we describe the design and implementation of three explicit MPC controllers of increasing complexity, and experiments in which these controllers were executed on a quadrotor's on-board computer to control the vehicle in hovering flight. We describe the results of these experiments, with particular emphasis on the resulting performance, in terms of each controller's ability to maintain the quadrotor near a static hover condition.

The second variant is learning-based model predictive control (LBMPC). LBMPC seeks to combine techniques from statistical learning which can help improve performance, with tools and concepts from control theory which provide guarantees about safety, robustness, and convergence. Prior to this work, LBMPC had been implemented in systems quite different from the quadrotor, such as an air-conditioning testbed. Our LBMPC controller for the quadrotor helps demonstrate the formulation's versatility, and some of the particulars of this problem required extensions to LBMPC which we describe. Our main focus here is on demonstrating properties of LBMPC controllers on the quadrotor testbed, with an implementation of LBMPC that runs in real-time on the quadrotor's on-board computer. Robustness to “mis-learning” is one aspect of LBMPC that we demonstrate in an experiment where we deliberately mis-tune a learning algorithm. We also demonstrate the improvement in performance possible when a well-tuned learning algorithm is used, show learning used to update the model in a physically meaningful way, and demonstrate the use of the LBMPC controller in an integrated robotic task requiring speed and precision: we design a controller that enables the quadrotor to catch balls.

**Advisor:** Claire Tomlin

BibTeX citation:

@mastersthesis{Bouffard:EECS-2012-241, Author = {Bouffard, Patrick}, Title = {On-board Model Predictive Control of a Quadrotor Helicopter: Design, Implementation, and Experiments}, School = {EECS Department, University of California, Berkeley}, Year = {2012}, Month = {Dec}, URL = {http://www.eecs.berkeley.edu/Pubs/TechRpts/2012/EECS-2012-241.html}, Number = {UCB/EECS-2012-241}, Abstract = {This report describes work in applying model predictive control (MPC) techniques to the control of quadrotor helicopters, a type of micro aerial vehicle (MAV) platform that has gained great popularity in recent years both in research and commercial/military settings. MPC is a form of optimal control which is attractive in part because it allows engineering requirements to be addressed directly in the design of the controller in terms of costs to be minimized and constraints to be satisfied in an optimization problem. Furthermore, for many engineering problems of interest, the optimization to be performed is convex, meaning that a global optimum can be efficiently computed. MPC first found broad early application in the process industry, where the typically longer time scales were compatible with the time necessary to solve the optimization problem. More recently with both the exponential increase in available computing power and the development of more efficient solution techniques, MPC has become an option for control of systems with faster dynamics, such as quadrotors. We bring together results from our application of two distinct variants of MPC. The common thread is that we seek advanced control algorithms that can be applied to an autonomous MAV like the quadrotor, ideally without requiring any external resources, i.e. we aim to perform all computations required for real-time closed-loop control on-board the vehicle. The first variant is known as explicit MPC, where in a sense the heavy numerical work of solving optimization problems is done a priori and off-line, such that the on-line implementation requires minimal computation. In this report we describe the design and implementation of three explicit MPC controllers of increasing complexity, and experiments in which these controllers were executed on a quadrotor's on-board computer to control the vehicle in hovering flight. We describe the results of these experiments, with particular emphasis on the resulting performance, in terms of each controller's ability to maintain the quadrotor near a static hover condition. The second variant is learning-based model predictive control (LBMPC). LBMPC seeks to combine techniques from statistical learning which can help improve performance, with tools and concepts from control theory which provide guarantees about safety, robustness, and convergence. Prior to this work, LBMPC had been implemented in systems quite different from the quadrotor, such as an air-conditioning testbed. Our LBMPC controller for the quadrotor helps demonstrate the formulation's versatility, and some of the particulars of this problem required extensions to LBMPC which we describe. Our main focus here is on demonstrating properties of LBMPC controllers on the quadrotor testbed, with an implementation of LBMPC that runs in real-time on the quadrotor's on-board computer. Robustness to “mis-learning” is one aspect of LBMPC that we demonstrate in an experiment where we deliberately mis-tune a learning algorithm. We also demonstrate the improvement in performance possible when a well-tuned learning algorithm is used, show learning used to update the model in a physically meaningful way, and demonstrate the use of the LBMPC controller in an integrated robotic task requiring speed and precision: we design a controller that enables the quadrotor to catch balls.} }

EndNote citation:

%0 Thesis %A Bouffard, Patrick %T On-board Model Predictive Control of a Quadrotor Helicopter: Design, Implementation, and Experiments %I EECS Department, University of California, Berkeley %D 2012 %8 December 13 %@ UCB/EECS-2012-241 %U http://www.eecs.berkeley.edu/Pubs/TechRpts/2012/EECS-2012-241.html %F Bouffard:EECS-2012-241