QP Problem Examples
Circular paraboloid with a single constraint
Let's visualize and solve a very simple QP problem of minimizing and for an objective function in the form of a circular paraboloid and a single linear inequality constraint.
Mathematical model
Canonical form
Code
Economic dispatch
We have three power plants each producing electricity to satisfy the demand of MW. Each of the power plants has a minimum and maximum capacity and and a quadratic cost model associated with its power output . The capacity limits and cost coefficients are provided in the table bellow.
1 | 20 | 5 | 0.02 | 200 | 1000 |
2 | 25 | 4 | 0.015 | 300 | 1500 |
3 | 30 | 3 | 0.01 | 100 | 800 |
Mathematical model
OSQP form
Code
Model Predictive Control (MPC)
Optimal control of linear systems on a finite horizon can be more often than not stated as a QP. Formulation of these problems is a topic of future chapters.