×

Autogenerating microsecond solvers for nonlinear MPC: a tutorial using ACADO integrators. (English) Zbl 1330.93100

Summary: Nonlinear model predictive control (NMPC) allows one to explicitly treat nonlinear dynamics and constraints. To apply NMPC in real time on embedded hardware, online algorithms as well as efficient code implementations are crucial. A tutorial-style approach is adopted in this article to present such algorithmic ideas and to show how they can efficiently be implemented based on the ACADO Toolkit from MATLAB (MathWorks, Natick, MA, USA). Using its code generation tool, one can export tailored Runge-Kutta methods – explicit and implicit ones – with efficient propagation of their sensitivities. The article summarizes recent research results on autogenerated integrators for NMPC and shows how they allow to formulate and solve practically relevant problems in only a few tens of microseconds. Several common NMPC formulations can be treated by these methods, including those with stiff ordinary differential equations, fully implicit differential algebraic equations, linear input and output models, and continuous output independent of the integration grid. One of the new algorithmic contributions is an efficient implementation of infinite horizon closed-loop costing. As a guiding example, a full swing-up of an inverted pendulum is considered.

MSC:

93B40 Computational methods in systems theory (MSC2010)
93C10 Nonlinear systems in control theory
Full Text: DOI

References:

[1] NocedalJ, WrightSJ. Numerical Optimization (2nd edn), Springer Series in Operations Research and Financial Engineering. Springer: New York, 2006. · Zbl 1104.65059
[2] WächterA, BieglerLT. On the implementation of a primal‐dual interior point filter line search algorithm for large‐scale nonlinear programming. Mathematical Programming2006; 106(1):25-57. · Zbl 1134.90542
[3] DiehlM, FerreauHJ, HaverbekeN. In Nonlinear Model Predictive Control, volume 384 of Lecture Notes in Control and Information Sciences, Chapter Efficient Numerical Methods for Nonlinear MPC and Moving Horizon Estimation. Springer: Berlin Heidelberg, 2009; 391-417. · Zbl 1195.93038
[4] KirchesC, WirschingL, SagerS, BockHG. Efficient numerics for nonlinear model predictive control. In Recent Advances in Optimization and Its Applications in Engineering, DiehlM (ed.), GlineurFF (ed.), MichielsJW (ed.) (eds). Springer: Berlin Heidelberg, 2010; 339-357.
[5] DiehlM, BockHG, SchlöderJP. A real‐time iteration scheme for nonlinear optimization in optimal feedback control. SIAM Journal on Control and Optimization2005; 43(5):1714-1736. · Zbl 1078.65060
[6] DomahidiA, ZgraggenA, ZeilingerMN, MorariM, JonesCN. Efficient interior point methods for multistage problems arising in receding horizon control. IEEE Conference on Decision and Control (CDC), Maui, HI, USA, 2012; 668-674.
[7] FraschJV, SagerS, DiehlM. A parallel quadratic programming method for dynamic optimization problems. Mathematical Programming Computations2013. Optimization online: http://www.optimization‐online.org/DB_HTML/2013/11/4114.html.
[8] AnderssonJ. A general‐purpose software framework for dynamic optimization. PhD Thesis, Arenberg Doctoral School, KU Leuven, Department of Electrical Engineering (ESAT/SCD) and Optimization in Engineering Center, Kasteelpark Arenberg 10, 3001‐Heverlee, Belgium, 2013.
[9] FrisonG, JorgensenJ. A fast condensing method for solution of linear‐quadratic control problems. Proceedings of the 52nd IEEE Conference on Decision and Control, Florence, Italy, 2013; 7715-7720.
[10] FerreauHJ. An online active set strategy for fast solution of parametric quadratic programs with applications to predictive engine control. Master’s Thesis, University of Heidelberg, Baden‐Württemberg, Germany, 2006.
[11] VukovM, DomahidiA, FerreauHJ, MorariM, DiehlM. Auto‐generated algorithms for nonlinear model predictive control on long and on short horizons. Proceedings of the 52nd Conference on Decision and Control (CDC), Florence, Italy, 2013; 5113-5118.
[12] FerreauHJ, KrausT, VukovM, SaeysW, DiehlM. High‐speed moving horizon estimation based on automatic code generation. Proceedings of the 51th IEEE Conference on Decision and Control (CDC 2012), Maui, Hawaii, 2012; 687-692.
[13] HouskaB, FerreauHJ, DiehlM. An auto‐generated real‐time iteration algorithm for nonlinear MPC in the microsecond range. Automatica2011; 47(10):2279-2285. · Zbl 1227.65054
[14] VukovM, Van LoockW, HouskaB, FerreauHJ, SweversJ, DiehlM. Experimental validation of nonlinear MPC on an overhead crane using automatic code generation. The 2012 American Control Conference, Montreal, Canada, 2012; 6264-6269.
[15] QuirynenR, VukovM, DiehlM. Auto generation of implicit integrators for embedded NMPC with microsecond sampling times. In Proceedings of the 4th IFAC Nonlinear Model Predictive Control Conference, Noordwijkerhout, Netherlands, 2012; 175-180.
[16] QuirynenR. Automatic code generation of implicit Runge‐Kutta integrators with continuous output for fast embedded optimization. Master’s Thesis, University of Leuven, Belgium, KU Leuven, 2012.
[17] QuirynenR, GrosS, DiehlM. Fast auto generated ACADO integrators and application to MHE with multi‐rate measurements. Proceedings of the European Control Conference, Zurich, Switzerland, 2013; 3077-3082.
[18] QuirynenR, GrosS, DiehlM. Efficient NMPC for nonlinear models with linear subsystems. Proceedings of the 52nd IEEE Conference on Decision and Control, Florence, Italy, 2013; 5101-5106.
[19] OhtsukaT, KodamaA. Automatic code generation system for nonlinear receding horizon control. Transactions of the Society of Instrument and Control Engineers2002; 38(7):617-623.
[20] MattingleyJ, BoydS. Convex Optimization in Signal Processing and Communications, Chapter Automatic Code Generation for Real‐time Convex Optimization. Cambridge University Press, 2009.
[21] FraschJV, GrayAJ, ZanonM, FerreauHJ, SagerS, BorrelliF, DiehlM. An auto‐generated nonlinear MPC algorithm for real‐time obstacle avoidance of ground vehicles. Proceedings of the European Control Conference, Zurich, Switzerland, 2013; 4136-4141.
[22] GrosS, ZanonM, VukovM, DiehlM. Nonlinear MPC and MHE for mechanical multi‐body systems with application to fast tethered airplanes. Proceedings of the 4th IFAC Nonlinear Model Predictive Control Conference, Noordwijkerhout, The Netherlands, 2012; 86-93.
[23] DebrouwereF, VukovM, QuirynenR, DiehlM, SweversJ. Experimental validation of combined nonlinear optimal control and estimation of an overhead crane. Proceedings of the 19th World Congress of the International Federation of Automatic Control, Cape Town, South Africa, 2014; 9617-9622.
[24] GeebelenK, VukovM, WagnerA, AhmadH, ZanonM, GrosS, VandepitteD, SweversJ, DiehlM. An experimental test setup for advanced estimation and control of an airborne wind energy systems. In Airborne Wind Energy, AhrensU (ed.), DiehlM (ed.), SchmehlR (ed.) (eds). Springer: Berlin Heidelberg, 2013.
[25] KrausT, FerreauHJ, KayacanE, RamonH, De BaerdemaekerJ, DiehlM, SaeysW. Moving horizon estimation and nonlinear model predictive control for autonomous agricultural vehicles. Computers and Electronics in Agriculture2013; 98:25-33.
[26] BockHG, PlittKJ. A multiple shooting algorithm for direct solution of optimal control problems. Proceedings 9th IFAC World Congress Budapest, Budapest, Hungary, 1984; 242-247. Pergamon Press.
[27] SargentRWH, SullivanGR. The development of an efficient optimal control package. In Proceedings of the 8th IFIP Conference on Optimization Techniques (1977), Part 2, StoerJ (ed.) (ed.). Springer: Heidelberg, 1978; 158-168. · Zbl 0385.49018
[28] AlbersmeyerJ, DiehlM. The lifted Newton method and its application in optimization. SIAM Journal on Optimization2010; 20(3):1655-1684. · Zbl 1198.90396
[29] BockHG. Recent advances in parameter identification techniques for ODE. In Numerical Treatment of Inverse Problems in Differential and Integral Equations, DeuflhardP (ed.), HairerE (ed.) (eds). Birkhäuser: Boston, 1983; 95-121. · Zbl 0516.65067
[30] Tran‐DinhQ, SavorgnanC, DiehlM. Adjoint‐based predictor‐corrector sequential convex programming for parametric nonlinear optimization. SIAM Journal on Optimization2012; 22(4):1258-1284. · Zbl 1273.49040
[31] HouskaB, FerreauHJ, DiehlM. ACADO toolkit – an open source framework for automatic control and dynamic optimization. Optimal Control Applications and Methods2011; 32(3):298-312. · Zbl 1218.49002
[32] ZanonM, HornG, GrosS, DiehlM. Control of dual‐airfoil airborne wind energy systems based on nonlinear MPC and MHE. European Control Conference, Strasbourg, France, 2014; 1801-1806.
[33] PapastavridisJG. Analytical Mechanics. Oxford University Press, Inc., 2002. · Zbl 1001.70001
[34] HairerE, NørsettSP, WannerG. Solving Ordinary Differential Equations I (2nd edn), Springer Series in Computational Mathematics. Springer: Berlin, 1993. · Zbl 0789.65048
[35] HairerE, WannerG. Solving Ordinary Differential Equations II - Stiff and Differential‐algebraic Problems (2nd edn). Springer: Berlin Heidelberg, 1991. · Zbl 0729.65051
[36] GriewankA, WaltherA. Evaluating Derivatives (2nd edn). SIAM: Philadelphia, PA, 2008. · Zbl 1159.65026
[37] AlbersmeyerJ. Adjoint‐based algorithms and numerical methods for sensitivity generation and optimization of large scale dynamic systems. Ph.D. Thesis, Ruprecht‐Karls‐Universitität Heidelberg, Baden‐Württemberg, Germany, 2010. · Zbl 1210.65003
[38] ZanonM, FraschJ, DiehlM. Nonlinear moving horizon estimation for combined state and friction coefficient estimation in autonomous driving. Proceedings of the European Control Conference, Zurich, Switzerland, 2013; 4130-4135.
[39] SerbanR, HindmarshAC. CVODES: the sensitivity‐enabled ODE solver in SUNDIALS. Proceedings of IDETC/CIE 2005, Long Beach, California, USA, 2005; 257-269.
[40] EnrightWH, JacksonKR, NørsettSP, ThomsenPG. Interpolants for Runge‐Kutta formulas. ACM Transactions on Mathematical Software1986; 12:193-218. · Zbl 0617.65068
[41] AllgöwerF, BadgwellTA, QinJS, RawlingsJB, WrightSJ. Nonlinear predictive control and moving horizon estimation – an introductory overview. In Advances in Control, Highlights of ECC’99, FrankPM (ed.) (ed.). Springer: London, 1999; 391-449.
[42] MagniL, De NicolaoG, MagnaniL, ScattoliniR. A stabilizing model‐based predictive control for nonlinear systems. Automatica2001; 37(9):1351-1362. · Zbl 0995.93033
[43] NicolaoGD, MagniL, ScattoliniR. Stabilizing receding‐horizon control of nonlinear time varying systems. IEEE Transactions on Automatic Control1998; AC‐43(7):1030-1036. · Zbl 0951.93063
[44] DiehlM, MagniL, NicolaoGD. Efficient NMPC of unstable periodic systems using approximate infinite horizon closed loop costing. Annual Reviews in Control2004; 28(1):37-45.
This reference list is based on information provided by the publisher or from digital mathematics libraries. Its items are heuristically matched to zbMATH identifiers and may contain data conversion errors. In some cases that data have been complemented/enhanced by data from zbMATH Open. This attempts to reflect the references listed in the original paper as accurately as possible without claiming completeness or a perfect matching.