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.
- Installation
- Usage
- Defining an optimal control problem
MPCProblemMPCProblem.goal_stateMPCProblem.ineq_input_matrixMPCProblem.ineq_state_matrixMPCProblem.ineq_vectorMPCProblem.initial_stateMPCProblem.input_dimMPCProblem.nb_timestepsMPCProblem.stage_input_cost_weightMPCProblem.stage_state_cost_weightMPCProblem.state_dimMPCProblem.terminal_cost_weightMPCProblem.transition_input_matrixMPCProblem.transition_state_matrixMPCProblem.get_ineq_input_matrix()MPCProblem.get_ineq_state_matrix()MPCProblem.get_ineq_vector()MPCProblem.get_transition_input_matrix()MPCProblem.get_transition_state_matrix()MPCProblem.has_stage_state_costMPCProblem.has_terminal_costMPCProblem.update_goal_state()MPCProblem.update_initial_state()MPCProblem.update_target_states()
- Solving the optimal control problem
- Reading the solution
- Defining an optimal control problem
- Examples
- Developer notes