Soft inequality constraints in gradient method and fast gradient method for quadratic programming

  • Matija PerneEmail author
  • Samo Gerkšič
  • Boštjan Pregelj
Research Article


A quadratic program (QP) with soft inequality constraints with both linear and quadratic costs on constraint violation can be solved with the dual gradient method (GM) or the dual fast gradient method (FGM). The treatment of the constraint violation influences the efficiency and usefulness of the algorithm. We improve on the classical way of extending the QP: our novel contribution is that we obtain the solution to the soft-constrained QP without explicitly introducing slack variables. This approach is more efficient than solving the extended QP with GM or FGM and results in a similar algorithm than if the soft constraints were replaced with hard ones. The approach is intended for applications in model predictive control with fast system dynamics, where QPs of this type are solved at every sampling time in the millisecond range.


Model predictive control Quadratic programming First-order methods Soft constraints KKT optimality conditions 

Mathematics Subject Classification

90C20 49N05 93C05 65K10 49K20 



Research supported by Slovenian Research Agency (P2-0001). This work has been carried out within the framework of the EUROfusion Consortium and has received funding from the Euratom research and training programme 2014-2018 under grant agreement No 633053. The views and opinions expressed herein do not necessarily reflect those of the European Commission. The authors are grateful to the referees and Ðani Juričić for their helpful comments and useful suggestions that led to improvements in the manuscript.


  1. Afonso RJM, Galvo RKH (2012) Infeasibility handling in constrained MPC. In: Frontiers of model predictive control. InTech, pp 47–64.
  2. Bemporad A, Morari M, Dua V, Pistikopoulos EN (2002) The explicit linear quadratic regulator for constrained systems. Automatica 38(1):3–20. MathSciNetCrossRefzbMATHGoogle Scholar
  3. Borrelli F, Bemporad A, Morari M (2015) Predictive control for linear and hybrid systems. Cambridge University Press, CambridgezbMATHGoogle Scholar
  4. Boyd S, Vandenberghe L (2004) Convex optimization. Cambridge University Press, New York. CrossRefGoogle Scholar
  5. de Oliveira NMC, Biegler LT (1994) Constraint handling and stability properties of model-predictive control. AIChE J 40(7):1138–1155MathSciNetCrossRefGoogle Scholar
  6. Domahidi A, Zgraggen AU, Zeilinger MN, Morari M, Jones C (2012) Efficient interior point methods for multistage problems arising in receding horizon control. In: Proceedings of the 51st IEEE conference on decision and control, pp 668–674.
  7. Dorn WS (1960) Duality in quadratic programming. Quart Appl Math 18:155–162. MathSciNetCrossRefzbMATHGoogle Scholar
  8. Ferreau HJ, Bock HG, Diehl M (2008) An online active set strategy to overcome the limitations of explicit MPC. Int J Robust Nonlinear 18(8):816–830. MathSciNetCrossRefzbMATHGoogle Scholar
  9. Ferreau HJ, Kirches C, Potschka A, Bock HG, Diehl M (2014) qpOASES: a parametric active-set algorithm for quadratic programming. Math Program Comput 6(4):327–363. MathSciNetCrossRefzbMATHGoogle Scholar
  10. Gerkšič S, De Tommasi G (2016) ITER plasma current and shape control using MPC. In: 2016 IEEE conference on control applications (CCA), pp 599–604.
  11. Gerkšič S, Pregelj B, Perne M (2018) FPGA acceleration of model predictive control for ITER plasma current and shape control. In: 21st IEEE real time conference.
  12. Giselsson P, Boyd S (2015) Metric selection in fast dual forward–backward splitting. Automatica 62:1–10. MathSciNetCrossRefzbMATHGoogle Scholar
  13. Giselsson P (2014a) Improved fast dual gradient methods for embedded model predictive control. In: IFAC proceedings on 19th IFAC world congress, vol 47, No. 3, pp 2303–2309Google Scholar
  14. Giselsson P (2014b) QPgen., v0.0.2. Accessed 15 Mar 2015
  15. Giselsson P, Boyd S (2014) Preconditioning in fast dual gradient methods. In: 53rd IEEE conference on decision and control, CDC 2014, Los Angeles, CA, USA, 15–17 December 2014, pp 5040–5045.
  16. Hartley EN, Jerez JL, Suardi A, Maciejowski JM, Kerrigan EC, Constantinides GA (2014) Predictive control using an FPGA with application to aircraft control. IEEE Trans Control Syst Technol 22(3):1006–1017. CrossRefGoogle Scholar
  17. Hovd M, Stoican F (2014) On the design of exact penalty functions for MPC using mixed integer programming. Comput Chem Eng 70:104–113. (Manfred Morari Special Issue)CrossRefGoogle Scholar
  18. Jerez JL, Goulart PJ, Richter S, Constantinides GA, Kerrigan EC, Morari M (2014) Embedded online optimization for model predictive control at megahertz rates. IEEE Trans Automat Contr 59(12):3238–3251. MathSciNetCrossRefzbMATHGoogle Scholar
  19. Karush W (2014) Minima of functions of several variables with inequalities as side conditions. In: Giorgi G, Kjeldsen T (eds) Traces and emergence of nonlinear programming. Birkhäuser, Basel. Reproduction of Masters Thesis, Department of Mathematics, University of Chicago, Chicago 1939.
  20. Kerrigan EC, Maciejowski JM (2000) Soft constraints and exact penalty functions in model predictive control. In: Proceedings of the UKACC international conference (control). Accessed 30 Nov 2017
  21. Kouzoupis D (2014) Complexity of first-order methods for fast embedded model predictive control. Masters Thesis. Eidgenössische Technische Hochschule, Zürich.
  22. Kuhn HW, Tucker AW (1951) Nonlinear programming. In: Proceedings of the second berkeley symposium on mathematical statistics and probability. University of California Press, Berkeley, pp 481–492. Accessed 10 Aug 2017
  23. Maciejowski J (2002) Predictive control: with constraints. Pearson Education, LondonzbMATHGoogle Scholar
  24. Mattingley J, Boyd S (2012) CVXGEN: a code generator for embedded convex optimization. Optim Eng 13(1):1–27. MathSciNetCrossRefzbMATHGoogle Scholar
  25. Mattingley J, Wang Y, Boyd S (2011) Receding horizon control, automatic generation of high-speed solvers. IEEE Control Syst Mag 31:52–65. MathSciNetCrossRefzbMATHGoogle Scholar
  26. Nesterov Y (2003) Introductory lectures on convex optimization: a basic course. Applied optimization. Springer, New YorkzbMATHGoogle Scholar
  27. Patrinos P, Bemporad A (2014) An accelerated dual gradient-projection algorithm for embedded linear model predictive control. IEEE Trans Automat Contr 59(1):18–33. MathSciNetCrossRefzbMATHGoogle Scholar
  28. Patrinos P, Guiggiani A, Bemporad A (2015) A dual gradient-projection algorithm for model predictive control in fixed-point arithmetic. Automatica 55(C):226–235. MathSciNetCrossRefzbMATHGoogle Scholar
  29. Qin S, Badgwell TA (2003) A survey of industrial model predictive control technology. Control Eng Pract 11(7):733–764. CrossRefGoogle Scholar
  30. Rao CV, Rawlings JB (1999) Steady states and constraints in model predictive control. AIChE J 45(6):1266–1278CrossRefGoogle Scholar
  31. Richter S (2012) Computational complexity certification of gradient methods for real-time model predictive control. Dissertation. Eidgenössische Technische Hochschule, Zürich,
  32. Scokaert POM, Rawlings JB (1999) Feasibility issues in linear model predictive control. AIChE J 45(8):1649–1659CrossRefGoogle Scholar
  33. Ullmann F, Richter S (2012) FiOrdOs–MPC example. Automatic Control Laboratory, ETH Zurich, Zurich. Accessed 13 Jan 2017
  34. Wang Y, Boyd S (2010) Fast model predictive control using online optimization. IEEE Trans Control Syst Technol 18:267–278. CrossRefGoogle Scholar
  35. Wright SJ (2019) Efficient convex optimization for linear MPC. In: Raković SV, Levine WS (eds) Handbook of model predictive control. Springer, Cham, pp 287–303. CrossRefGoogle Scholar
  36. Zafiriou E, Chiou HW (1993) Output constraint softening for SISO model predictive control. In: Proceedings of the American control conference, San Francisco, pp 372–376. Accessed 21 Aug 2017
  37. Zeilinger MN, Morari M, Jones CN (2014) Soft constrained model predictive control with robust stability guarantees. IEEE Trans Automat Contr 59(5):1190–1202MathSciNetCrossRefGoogle Scholar
  38. Zheng A, Morari M (1995) Stability of model predictive control with mixed constraints. IEEE Trans Automat Contr 40(10):1818–1823. MathSciNetCrossRefzbMATHGoogle Scholar

Copyright information

© Springer Science+Business Media, LLC, part of Springer Nature 2018

Authors and Affiliations

  1. 1.Jožef Stefan InstituteLjubljanaSlovenia

Personalised recommendations