Discretized Model Scalling
pulsipher opened this issue · 2 comments
pulsipher commented
I follow how the model dynamics are linearized/discretized to form Ad
, Bd
, and gd
. However, could you provide some more detail about the following scaling step that seems to lift the problem:
% constructing augmented system with state-input scaling
Ak = [MPC_vars.Tx*Ad*MPC_vars.invTx MPC_vars.Tx*Bd*MPC_vars.invTu; zeros(nu,nx) eye(nu)];
Bk = [MPC_vars.Tx*Bd*MPC_vars.invTu;eye(nu)];
gk = [MPC_vars.Tx*gd;zeros(nu,1)];
I don't quite follow why we increase the dimension of x by nu
.
alexliniger commented
Line 35 in 9499092
The idea is that the MPC does not compute the inputs but how much to change the inputs, this allows for rate constraints and rate costs, while still maintaining the structure necessary for hpipm.
pulsipher commented
Thanks, I missed that note.