Simulation of LTISystem
mpt_demo_lti1
A = [1 1; 0 1]; B = [1; 0.5]; C = [1 0];
lti = LTISystem('A', A, 'B', B, 'C', C)
LTISystem with 2 states, 1 input, 1 outputSet the initial state of the system
lti.initialize([1; 1.5]);Ask for the states
x = lti.getStates()
x = 1 1.5Update the system's state using some control action.
u = 0.5;The following updates the internal state
lti.update(u);Ask for the updated states
x = lti.getStates()
x = 3 1.75The state-update and current output can also be directly obtained from update():
u = -0.6;
[next_x, current_y] = lti.update(u)
next_x = 4.15 1.45 current_y = 3
◀ | mpt_demo_unions1 | mpt_demo2 | ▶ |
© 2003-2013 Michal Kvasnica: STU Bratislava, michal.kvasnica@stuba.sk