Set-Point Control in MPC example
14 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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 comentarios
Respuestas (0)
Ver también
Categorías
Más información sobre Code Generation en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!