Set-Point Control in MPC example

13 views (last 30 days)
Sebastian Starke
Sebastian Starke on 5 May 2021
Hello,
i am currently experimenting with the follwing example:
Now i am interested how i can, for example make the system follow a reference trajectory. I tried to change the 2nd line of:
for ct = t_constrained
[u,status,iA] = mpcActiveSetSolver(Linv,F*x,Ac,b0,[],zeros(0,1),iA,opt);
uMPC(ct+1) = u(1);
x = A*x+B*uMPC(ct+1);
yMPC(ct+1) = C*x;
end
to
[u,status,iA] = mpcActiveSetSolver(Linv,F*(x-set),Ac,b0,[],zeros(0,1),iA,opt);
I chose this line, because it seems it is the only point where the actual state is coming into the optimization process and i studied some literature where that made sense when looking at the block chart of general mpc controls. My idea was to input the deviation of the state x with the setpoint set with same dimensions (and later on a moving vector).

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!