mpt_demo_lti1

Purpose

Simulation of LTISystem

Syntax

mpt_demo_lti1

Description

Simulation of LTI systems.

Example(s)

Example 1

Define an LTI system ../../../fig/mpt/demos/mpt_demo_lti11.png, ../../../fig/mpt/demos/mpt_demo_lti12.png
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 output
Set the initial state of the system
 lti.initialize([1; 1.5]); 
 Ask for the states 
 x = lti.getStates() 
x =

                         1
                       1.5

Update 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.75

The 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

See Also

mpt_demo_lti2, mpt_demo_lti3, mpt_demo_lti4, mpt_demo_lti5


© 2003-2013 Michal Kvasnica: STU Bratislava, michal.kvasnica@stuba.sk