qpmpc

Linear time-variant (LTV) model predictive control in Python. Solve a quadratic program of the form:

\[\begin{split}\begin{array}{rl} \underset{x_k, u_k}{\min} \quad & w_{t} \|x_N - x_{\mathit{goal}}\|_2^2 + w_x \sum_{k=0}^{N-1} \| x_k - x_{\mathit{goal}} \|_2^2 + w_u \sum_{k=0}^{N-1} \| u_k \|^2_2 \\ \mathrm{s.t.} \quad & x_{k+1} = A_k x_k + B_k u_k \\ & C_k x_k + D_k u_k \leq e_k \\ & x_0 = x_{\mathit{init}} \end{array}\end{split}\]

The library provides a one-stop shop solve_mpc() function that computes the Solution corresponding to such a Problem.