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

  1. Implement Model Predictive Contouring Control(MPCC) on quadrotor with ACADO+qpOASES by referencing CMPCC
  2. Experiment MPCC on ROS by using the source code of PAMPC
Differences between each papers(MPC or MPCC on quadrotor)
CMPCCPAMPCMPCCOurs
OCPMPCCMPCMPCCMPCC
SolverOSQPACADOACADOACADO
codeopen(GPLv3)open(GPLv3)None
ODENoYesYesYes

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


Eigen::Matrix<float, kCostSize-kStateSize, kSamples>::Zero();
kCostSize-kStateSize = -13; // kCostSize = 5, kStateSize = 13;