Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
State-Space Models
for LTI Systems
Joseph L. Hellerstein, Jie Liu
Microsoft
Feb. 4, 2008
Agenda
• State space Modeling
– States & state variables
– State space models
– State space and Transfer Function formats
– Realization Theory
• Model Analysis
– State trajectories
– Stability
– Steady state properties
– Transient properties
• Controllability & Observability
– State feedback control
– Observers
2
Motivation: why use State Space
models?
• High dimension systems
– Writing difference equations can become tedious
• MIMO (Multi-input, Multi-output) systems
• Realization ambiguity
3
Realization of Transfer Functions
Recall from last lecture: Decompose into a sum of geometrics
z z
0.5 z 0.3 z 0.2
2
1 0.3z 1 0.09z 2 ... 1 0.2 z 1 0.04z 2 ...
0.4 0.1z 1 0.05z 2 ...
1.5
0.3
Partial fraction expansion allows
u(k)
y(k)
1
0.2 rational polynomials to be
decomposed into a sum of
0.5
0.1 geometrics
Poles of the original polynomial
0
0 2 4
0
0 2 4
are the poles of the geometrics
k k
4
Realizations of TF
State Variables
u(k) y(k)
System
x(k)
6
State Variables Example: Tandem
Queue
7
State Variables Example: Apache
MIMO system
KA CPU
• MIMO System
• Control Inputs: KeepAlive (KA), MaxClients (MC)
• System Outputs: CPU, MEMory utilization
x1 (k ) CPU(k ) CPU
x (k )
• MEM(k ) MEM
x( k ) 2
State variables:
–Current & Past values of CPU, MEM x3 (k ) CPU(k 1) CPU
x4 (k ) MEM(k 1) MEM
8
State Space Models
• Canonical Representation consists of two
parts
1. State evolution dynamics
x(k 1) f (x(k ), u(k ))
9
State Space Model: Example
x1 ( k ) R1 ( k ) R1
x( k )
2
x ( k ) 2
R ( k ) R2
a11 0 x1 (k ) b
x(k 1) x ( k ) 0 u ( k )
21
a a 22 2
x (k )
y (k ) [1 1] 1
x2 ( k )
10
LTI State Space Model: General Form
x(k 1) f (x(k ), u(k ))
Ax (k ) Bu (k )
y (k ) g (x(k ))
Cx (k )
11
Comparing Scalar vs Matrix
Descriptions
• Advantages
– Compact notation
– Uniform format
– Analysis based on properties of A, B, and C
12
Realization Theory
• There are many ways to convert difference
equations to state space representations.
• The ones with minimum number of z-1 is
called minimum realizations.
– Control canonical form
– Observer canonical form
– Jordan canonical form
Example: Converting ARX models to
State Space
14
Controller Canonical Realization
Y ( z)
U ( z)
y
u xn x2 x1
0 1 0 0 0 0
0 0 1 0 0 0
A 0 0 0 B C [0,..., bm , bm 1 ,,b1 ]
1 0
an an 1 ... a2 a1 1
Observer Canonical Realization
x1 xn-1 xn
0 0 ... 0 an bn
1 0 ... 0 a b
n 1 n 1
A 0 1 0 ... an 2 B bn 2 C [0, 0,1]
0 0 ... 1 a1 b1
Jordan Canonical Realization
Y ( z ) b0 b1 z 1 ... bm z m
1 n
K H1 ( z ) H 2 ( z ) ... H p ( z )
U ( z ) 1 a1 z ... an z
H’s are first or second order systems.
u y
A1 B1
What are the A, B, C, D? A2 B
A B C [C1 , C2 ,...C p ] D K
2
Ap B p
State Space Analysis
• State trajectories
• Stability
• Poles
18
Linear Algebra Review
• Matrix 1 2 3
– rows, columns, left*, right* A 0 4 5
– Identity matrix, I
– transpose: AT 1 0 6
– complex conjugate: A*
– determinant 1 0 1
– rank: The number of linearly A* AT 2 4 0
independent rows (columns)
(how to check full rank?) 3 5 6
– singular matrix det( A) 22
– inverse (if not singular):
• AA-1=I, A-1A=I
12 / 11 6 / 11 1 / 11
A1 5 / 22 3 / 22 5 / 22
2 / 11 1 / 11 2 / 11
Eigenvalues
• For a square matrix A, there exist scalars l and
vectors v, such that
Av = lv, or (lI-A)v=0
– l is called an eigenvalue of A and v is the
corresponding eigenvector.
– If A is full rank, then there are n eigenvalues and n
linearly independent eigenvectors.
• Eigendecomposition:
A = PLP-1
State Trajectories
21
Vector/Matrix Z-Transform
• Straightforward extension of the scalar case:
i
1 x (i ) z
Z [ x1 (k )] i 0
Z [ x (k )] i
X( z ) Z [x(k )] 2 2 x ( i ) z
i 0
Z [ xn (k )]
xn (i ) z i
i 0
22
Solving State Space Equations using Z-
Transform
Collect terms:
Output equation:
23
Exercise: Solving State Space Equations
0
x ( 0) , U ( z ) 0
0.2
Y( z ) C( zI A) 1 ( zx(0) BU( z))
Hint: A, B, C ?
( zI A) 1 ?
Y( z ) ?
y (k ) ?
24
State Space Transfer Function Matrix
System Model: Z-transform:
x(k 1) Ax (k ) Bu (k ) Y( z ) C( zI A) 1 ( zx(0) BU( z))
y (k ) Cx (k )
If x(0)=0, then:
Y( z ) C( zI A) 1 BU( z)
So that:
Y( z ) G ( z ) U( z )
25
Poles and Stability
System Model: Z-transform:
x(k 1) Ax (k ) Bu (k ) Y( z ) C( zI A) 1 ( zx(0) BU( z))
y (k ) Cx (k )
Transfer Function: G( z) C( zI A) 1 B
Characteristic Polynomial:
BIBO Stability: All poles are inside unit circle [same as SISO systems]
26
Example: Apache Model
27
Steady-State Gain
Recall: Final-value theorem: ySS lim( z 1)Y ( z)
z 1
1 1
u (k ) , U( z )
Unit Step:
z
z 1
1 1
28
Controllability
• Idea: can we drive the system into any
(achievable) state?
[Assume x(0)=0]
Controllability matrix:
Controllability C is invertible
29
Example
Notes with sensor:
1. Determine Controllability.
2. Can drive the system to x=[1 1]’ ?
u x(k 1) Ax (k ) Bu (k ) y
y (k ) Cx (k ) Du (k )
Observer
x
Observability
• Idea: can we infer all states of system from
observing the output?
– Eg, consider Tandem Queue
Observability matrix:
Observability O is invertible
33
Example
Tandem Queue:
1. Determine Observability
2. What initial conditions when y(0)=1.22, y(1)=2 ?
34
Observer Canonical Form
• Observer canonical system is observable.
0 0 ... 0 an bn
1 0 ... 0 a b
verify: n 1 n 1
A 0 1 0 ... an 2 B bn 2 C [0, 0,1]
0 0 ... 1 a1 b1
u x y
B + z-1 C
A
H +
-
-
B + z-1 x̂ C
y
since yˆ (k ) y (k ) Ce (k )
note: C is a row vector, and H is column vector. Can we place the eigenvalues of
[A-HC] arbitrarily?
0 0 ... 0 an bn
1 0 ... 0 a b
n 1 n 1
A 0 1 0 ... an 2 B bn 2 C [0, 0,1]
0 0 ... 1 a1 b1
Complete Picture
v u x y
+ B + z-1 C
A
H +
-
-
x
B + z-1 C
y
k
Next lecture: controller design