Demonstrates simulation of the closed-loop system
mpt_demo_lti3
A = [1 1; 0 1]; B = [1; 0.5]; C = [1 0];
lti = LTISystem('A', A, 'B', B, 'C', C);Define the MPC controller with horizon 5.
ctrl = MPCController(lti, 5);Define the closed-loop system
cl = ClosedLoop(ctrl, lti);Simulate the closed loop from a given initial condition
data = cl.simulate([-4;0], 10)
data = X: [2x11 double] U: [1000000 -1000000 -1000000 1000000 1000000 -1000000 -1000000 1000000 1000000 -1000000] Y: [-4 999996 499996 -500004 -4 999996 499996 -500004 -4 999996] cost: [0 0 0 0 0 0 0 0 0 0]
◀ | mpt_demo_pwa1 | mpt_demo_deployment_explicitmpc | ▶ |
© 2003-2013 Michal Kvasnica: STU Bratislava, michal.kvasnica@stuba.sk