Implementing MPCC with ACADO
Todo
Update 이전 todo로 작성한 목록들을 업데이트
- Gauss-Newton Hessian approximation
- [-] Explicit Runge-Kutta (ERK) / Implicit Runge-Kutta (IRK)
- Variational Differential Equations (VDE)
- [-] LSQ에서 coefficient matrix를 어떤 식으로 설정하는지 → coefficient matrix는 Q-norm을 QP로 바꿔주면서 각 state vector에 맞도록 생긴다.
- 전체 time horizon 를 linear하거나 exponential하게 고려하는 것으로 알고 있는데, 이러한 경우에 scaling을 어떻게 하는지
Goal
Differences between each papers(MPC or MPCC on quadrotor)
CMPCC | PAMPC | MPCC | Ours | |
---|---|---|---|---|
OCP | MPCC | MPC | MPCC | MPCC |
Solver | OSQP | ACADO | ACADO | ACADO |
code | open(GPLv3) | open(GPLv3) | None | |
ODE | No | Yes | Yes | Yes |
As we can see above, the easiest way of implementing MPCC is migration solver of CMPCC to ACADO. But CMPCC does not consider quadrotor dynamic model on their control. the MPCC paper considered quadrotor dynamic model well, and they used ACADO for experiments. but they didn’t open their source code.
So based on CMPCC, we need to reformulate optimal control problem and the cost function of MPCC.
Brief Summarization of CMPCC
the Objective function
By introducing re-timing function , minimize tracking error between global trajectory and local trajectory .
the System
They used 3rd-order integral model instead of general quadrotor dynamic model.
The state and inputs of the system is given by
With linear state-transfer equation, they update their 3rd-oder inegral model to the next time step.
OCP Formulation
Most of MPCC suffers from getting the reference state of global trajectory . They solved this problem by introducing the equation (9) which linearizes using the result of the last horizon .
Detailed expansions from the equation (8) to (10) as follows.
and convert to form which is widely used in Quadratic Programming(QP).
this paper skips (may be consider as 0) and select in .
Now we can rearrange by selecting