Beruflich Dokumente
Kultur Dokumente
Instructor: Zhang
Instructor: Zhang
A : nxn B: nxm
C: pxn D: pxm
Difference: dimensions of the vectors and matrices.
(2) Uniform method of solution:
Laplace: different equations, different input function different solution!
State: Different solution method for different inputs? No difference !
Different solution method for different systems (with different
orders)?
No! The same!
uniform form, uniform methods for analysis and design!
Fundamental Characteristic
Laplace Transform, differential equation, , convolution:
external inputs external outputs!
State equation (state-variable technique):
External inputs internal state variables (as a bridge)
external outputs
help to understand the system better because of use of internal state!
Whats the state of a system?
7-2 State-Variable Concepts
(1) Example: Universitys rank (simplified and idealized)
Whats the fundamental measurement of university system (dynamic system)?
Money? Very important, not a direct measurement of
university with great inertia!
What are the direct measurement which need long time to build
and change?
Faculty quality
Student quality
Good faculty => Research , Teaching
Reputation , Good student
Good students => student Reputation
Graduate quality
Good Faculty
Faculty quality and student quality:
Page 7-2
Instructor: Zhang
x
x f
xs
(state vector)
State Space:
x f
x
x (2000)
x f
x s (2000)
x (2001)
x f
x s (2001)
Page 7-3
Instructor: Zhang
In general
x1
x
x n
x 2 a 21 x1 a 22 x 2 b21u1 b22u 2
x Ax Bu
x
x 1 ,
x2
a12
a
A 11
,
a
a
21
22
b
b
B 11 12
b21 b22
y
y 1,
y2
c
c
C 11 12 ,
c21 c22
d12
d
D 11
d 21 d 22
u
u 1
u 2
Page 7-4
Instructor: Zhang
In general :
x1
x ,
x n
x Ax Bu
y cx du
A: nn
C : pn
( x : n 1 ,
u1
u ,
u m
y1
y ,
yp
state equation
output equation
B : nm
D:cm
u : m 1 ,
y : p 1)
Page 7-5
Instructor: Zhang
x Ax Bu
y cx du
Homework
1. Given x (t ) Ax(t ) Bu (t ) with initial condition x(t0 ) x0 where x0 is the
given initial state. Construct an algorithm (recursive equation) to calculate
x(t0 (k 1)t ), (k 0,1,...) based on x(t0 kt ) and u (t0 kt ) where
t 0 is a small time interval.
2. Given the initial condition problem
x Ax Bu
x(t0 ) x0
It is known that the solution of this problem is unique. Prove that the unique
solution of this problem is
x(t ) e
A( t t 0 )
x0 e A(t ) Bu ( )d
t0
d
f ( , t )
f ( , t )d f ( , t ) t
d )
(Note:
dt a
t
a
t
x (t ) Ax (t ) Bu (t ),
when
y(t ) Cx(t ) Du(t )
x(0) 0
Page 7-6
Instructor: Zhang
x Ax Bu
x(t0 ) x0
x0 given
1. Mathematical Preparation
(1) Matrix Exponential eAt
Scalar Exponential
e at 1 at
a2 2 a3 3
t t
2!
3!
Introducing Notation
e At I At
where :
1 2 2 1 33
A t A t
2!
3!
A : n n matrix
0
1
n
I : n n Identity matrix
0
1
2
A : AA
n n
Aj : nn
n n
n n
j = 0,1,2,
t: scalar
e At : n n
Properties of eAt
de At
Ae At
dt
e At I At
1 2 2 1 33
A t A t
2!
3!
Page 7-7
Instructor: Zhang
de At
2
3
0 A A 2 t A3 t 2
dt
2!
3!
1
A( I At A2t 2 )
2!
Ae At
e A0 I
1 2 2
A 0 I
2!
*
(Inverse of n n matrix eAt is e-At)
(e At ) 1 e At
1
1
I ( A)t ( A) 2 t 2 ( A)3 t 3
2!
3!
1
1
I At A2t 2 A3t 3
2!
3!
1
1
I A(t ) A2 (t ) 2 A3 (t )3
2!
3!
t
t
d
f ( , t )
(2)
f
(
,
t
)
d
f
(
,
t
)
t d )
t
dt a
a
e A0 I A 0
A( t )
Bu ( )
If f ( , t ) e
t
d t
f ( , t )
f ( , t )d f ( , t ) t
d
Then
dt t
t
t
0
But
f ( , t ) t e A(t t ) Bu (t ) IBu (t ) Bu (t ) ,
f ( , t )
Ae A(t ) Bu ( )
t
t
d
A( t )
Bu ( )d Bu (t ) A e A(t ) Bu ( )d
Therefore dt e
t0
t0
Page 7-8
Instructor: Zhang
t
Z (t ) e A(t ) Bu ( )d
Denote
t0
=>
t
d
Z (t ) e A(t ) Bu ( )d
dt t
0
AZ (t ) Bu (t )
Z (t ) AZ (t ) Bu (t )
i. e.
x Ax
x(t 0 ) x0
zero-input response
df (t )
=Af(t)
dt
(2) f (t ) t 0 x0
for example, if we assume x(t)=At
then x A A( At ) Ax(t )
x(t)=At is not a solution of x (t ) Ax(t )
x Ax
question : Is x(t ) e x0 a solution of
?
x(t 0 ) x0
At
x (t )
d At
(e x0 ) Ae At x0 Ax(t )
dt
Page 7-9
=> x Ax
Instructor: Zhang
x Ax
satisfies the first of
x(t 0 ) x0
However,
x(t0 ) e At 0 x0
If t0 0 and A 0 , e 0 I
=> x(t0 ) x0
At
Therefore,
x Ax
x(t 0 ) x0
x Ax
Question: If we find a solution for
x(t 0 ) x0
Can we find a second different solution for it?
x Ax
No! The solution for
is unique
x(t 0 ) x0
when A = constant matrix!
x Ax
Lets find any solution for
. It will be the unique solution!
x(t 0 ) x0
Suggested solution
x(t ) e A(t t 0 ) x0
verification:
de A(t t 0 ) x0
Ae A(t t 0 ) x0 Ax
(1) x
dt
A( t t )
(2) x(t0 ) e 0 0 x0 Ix0 x0
=> x(t ) e
A( t t 0 )
x0 : unique solution
Page 7-10
4. Analytic solution of
Instructor: Zhang
x Ax Bu
x(t 0 ) 0
(a)
(b)
(zero-state response)
t
Verification:
From mathematical preparation:
t
=>
z(t ) Az (t ) Bu (t )
Further, x(t0 ) e
A( t 0 )
x (t ) Ax(t ) Bu (t ) (a)
Bu ( )d 0 (b)
t0
x Ax Bu
5. Solution of x(t ) x
0
0
(Given problem)
x(t ) e
A ( t t 0 )
x0 e A(t ) Bu ( )d
t0
x(t ) e A(t t 0 ) x0 (t t0 ) x0
7. Output
t
Page 7-11
Instructor: Zhang
x Ax Bu ,
(t0 0)
1. Solution
sX ( s) x0 AX ( s ) BU ( s)
( sI A) X ( s ) x0 BU ( s)
X ( s ) ( sI A) 1 x0 ( sI A) 1 BU ( s)
x(t ) L1 [( sI A) 1 x0 ] L1 [( sI A) 1 BU ( s)]
2. What is ( sI A) 1 ?
L1[(sI A) 1 ] e At (t )
( sI A) 1 : Laplace transform of the state transition matrix or of eAt.
Denote: ( s) ( sI A) 1
What is ( sI A) 1 BU ( s) ?
(s)( BU (s)) ---- product of (s) and BU (s) !
L1[(sI A) 1 BU ( s)] : convolution of
L [(sI A) BU ( s)] (t ) * Bu (t ) (t ) Bu ( )d
1
Y ( s) CX ( s) DU ( s)
C ( sI A) 1 x0 c( sI A) 1 BU ( s) DU ( s)
When x0 0
Y ( s) C ( sI A) 1 BU ( s) DU ( s)
[C ( sI A) 1 B D]U ( s)
Page 7-12
Instructor: Zhang
( p m)
C (sI A) 1 B D
Denote H (s)
H (s)
H p1 ( s) H p 2 ( s) H pm ( s )
Hij(s) : transfer function between the jth input and ith output.
4. Impulse Response Matrix H(t)
H (t ) L1 [ H ( s )]
H (t ) L1 [C ( sI A) 1 B D]
Ce At B D (t )
(t ) is m 1 vector impulse
5. Is that all for state equation technique?
No! We have not found effective way for eAt yet!
7-6
1. Based on Definition
(t ) e At I At
(Note:
1 2 2 1 33
A t A t
2!
3!
1 k
A must go to 0 n n as k ; otherwise, eAt does not exist)
k!
1 k
A
k!
(t ) L1[(sI A) 1 ]
Page 7-13
Instructor: Zhang
1
0
6 5
Example 7-3 A
1 s 1
s 0 0
( sI A)
0 s 6 5 6 s 5
a11
a
21
a12
a22
a22 a12
a
a11
21
s 5 1
6 s
s 1
1
( sI A)
s ( s 5) 6
6 s 5
s 5 1
s5
6 s
( s 2)( s 3)
6
( s 2)( s 3)
( s 2)( s 3)
1
( s 2)( s 3)
( s 2)( s 3)
s5
3
2
3e 2t 2e 3t
( s 2)( s 3) s 2 s 3
1
1
1
e 2t e 3t
( s 2)( s 3) s 2 s 3
6
1
1
6
6[e 2t e 3t ]
( s 2)( s 3)
s 2 s 3
s
2
3
2e 2t 3e 3t
( s 2)( s 3) s 2 s 3
At
e =
(sI-A)-1 : Systematic way exists! But very complex operation!
Page 7-14
Instructor: Zhang
3. Diagonalization
nn
A PP
P : nn
: nn
diagonal
e : easy to
matrix
find
A k ( PP 1 )( PP 1 ) ( PP 1 ) Pk P 1
A2 2
e I t
t
2!
1
PP 1 PP 1t P2 P 1t 2
2!
1
P[ I t 2 t 2 ]P 1
2!
t 1
Pe P
At
(t ) e At 0 (t ) I 1 (t ) A 2 (t ) A2 n 1 (t ) An 1
nXn
This method will be simple if the eigenvalues of A( j ) are distinct:
Replacing A by j and I by 1 in the above equation.
Replacing by 1 : e1t 0 (t ) 1 (t )1 2 (t )1 n 1 (t )1
n 1
n 1
Replacing by n : e n 0 (t ) 1 (t )n 2 (t )n n 1 (t )n
(mention (1) 0 (t ), 1 (t ), 2 (t ) are the same in each of the n equations.)
(2) j ' s are given numbers! )
2
1
0
A
6 5
(1) Find eigenvalues : easy by using Matlab
Page 7-15
Instructor: Zhang
a = [0 1 ; -6 5];
eiga = eig(a);
eiga
eiga =
-2
-3
Analytic Method:
| I A |
1
( 5) 6 2 5 6 0
6 5
1 2,
(2)
2 3,
1 2 e 2t 0 (t ) 1 (t )(2)
(1)
2 3 e 3t 0 (t ) 1 (t )(3)
(2)
(1) (2) e 2t e 3t 1 (t )
0 (t ) e 3t 31 (t ) e 3t 3e 2t 3e 3t
3e 2t 2e 3t
Page 7-16
Instructor: Zhang
(3)
e At 0 (t ) I 1 (t ) A
3e 2t 2e 3t
0
0
0
3e 2t 2e 3t 6e 2t 6e 3t
3e 2t 2e 3t
e 2 t e 3t
2t
3t
2e 2t 3e 3t
6e 6e
e 2 t e 3t
5e 2t 5e 3t
iL
and
vC
as state variables.
Algorithm
Step 1: Select each iL and vc as state variables
Step 2: For each iL , write a KVL ( iL
diL
will be included)
dt
Page 7-17
Instructor: Zhang
Example 7-7
Step 1: Label vc as x1
iL as x2
Step 2: For vc , write KCL :
iR1 Cx1 x2
(1)
x1 Lx2 iR2 R2
(2)
iR1
v x1
s
R1
Must be expressed in
terms of state
variables and sources!
i R 2 i L x2
vs x1
Cx1 x2
(1)'
R1
x Lx R x
1
2
2 2
1
1
1
vs
1
2
1
CR1
C
CR1
x 1 x R2 x
2 L 1 L 2
1
1
x1 1
x1 CR1
C
CR1 vs
R x
x2 1
2 2 0
L
L
Step 4 : Output equation y = v0
Page 7-18
Instructor: Zhang
x
y R2 x2 0 1 1
x2
Y ( s) bm s m bm 1s m 1 b1s b0
Given
n
U ( s)
s an 1s n 1 a1s a0
Find
x Ax Bu
y Cx Du
( m n)
1
Such that C (sI A) B D equals the given transfer function.
1. Basic solution
Example :
Y ( s)
4
4
4
4U (S ) 4U (s)
Y ( s)
4 X 1 ( s) 4 X 2 ( s)
U (s) (s 1)(s 2) s 1 s 2
s 1 s 2
U (s)
x1 x1 u
s 1
U (s)
X 2 (s)
x 2 2 x2 u
s2
x1 1 0 x1 1
x 0 2 x 1u
2
2
X 1 (s)
x
y 4 4 1
x2
General Case
Y ( s) bm s m bm 1s m 1 b1s b0
U (s)
( s p1 )( s p2 ) ( s pn )
Page 7-19
Instructor: Zhang
Bn
B1
B2
Y ( s)
U ( s) s p1 s p 2
s pn
Y ( s)
B U ( s)
B1U ( s ) B2U ( s )
n
s p1
s p2
s pn
B1 X 1 ( s ) B2 X 2 ( s ) Bn X n ( s )
x1
x
y (t ) B1 , B2 , Bn 2 ---- output equation
xn
U ( s)
x j p j x j u (t )
)
s pj
0 x1 1
u (t ) ---- state equation
pn xn 1
X j ( s)
x1 p1
xn 0
Y ( s)
A
B
U ( s)
( s pi ) 2 s pi
Denote:
Yi ( s)
AU ( s)
BU ( s)
AX i1 ( s) BX i2 ( s)
( s pi ) 2 s pi
Page 7-20
Instructor: Zhang
X i2 ( s )
U ( s)
s pi
x i2 pi xi2 u (t )
X i1 ( s)
X i2 ( s )
s pi
x i1 pi xi1 xi2 ( s)
Sub-block :
xi1 pi
x
i2 0
1 xi1 0
u
pi xi2 1
xi
yi A B 1
xi2
How to incorporate this method into system realization, see examples.
Example 7-9
Y ( s)
s 2 3s 9
U ( s ) 5s 5 8s 4 24 s 3 34 s 2 23 s 6
3.5
4.75 5.875
7
1.125
Y ( s)
3
2
s 1 s 2 s 3
( s 1)
( s 1)
0
0
0 x1 0
x1 1 1
x 0 1 1
0
0 x 2 0
2
x3 0 0 1 0
0 x3 1u (t )
x
0
0
0
2
0
4
x4 1
x5 0 0 0
0 3 x5 1
Page 7-21
Instructor: Zhang
x1
x
2
y (t ) 3.5 4.75 5.875 7 1.125 x3
x4
x5
(3) Matlab Use
From state-equation => Transfer Function
[num, den] = ss2tf [A, B, C, D]
to
From transfer Function => state-equation
[A, B, C, D] = tf2ss [num, den]
Page 7-22