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.

12050.022001000
22540.0153001500
33030.01100800

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.