Set-Point Control in MPC example
16 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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).
0 Kommentare
Antworten (0)
Siehe auch
Kategorien
Mehr zu Code Generation finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!