Topic#7 State Space Analysis and Design
Topic#7 State Space Analysis and Design
Topic#7
State Space Analysis & Design
Prof. Wahied Gharieb Ali
Outline
State space: The n-dimensional space whose axes are the state
variables.
4
State Space Representation
5
State Space Representation
x 1 (t ) f1 ( x, u, t )
x 2 (t ) f 2 ( x, u, t )
…
x n (t ) f n ( x, u, t )
6
State Space Representation
Linear Time Invariant System
Y CX DU
Y ( s ) C[ SI A]1 BU ( s ) DU ( s )
C[ SI A]1 B D U ( s )
Y (s)
C[ SI A]1 B D
U (s)
9
Transfer Function to State Space
With Constant Term in the Numerator
Consider the system defined by the following transfer function:
Y (s) b0
G (s) n
U ( s ) s an 1s n1 ... a0
We convert the transfer function into the following nth -order linear
time-invariant differential equation:
d n -1 y(t)
xn
dt n -1
10
Transfer Function to State Space
dy (t ) And differentiating both sides yields
x 1 x2
dt
d 2 y(t)
x 2 2
x3
dt
3
d y(t)
x 3 x4
dt 3
....
d n -1 y(t)
x n -1 xn
dt n -1
x n a0 x1 a1 x2 .... an 1 xn b0u
x 1 0 1 0 .... 0 0 x 1 0
:In vector-matrix for x 0
x2 0 0 1 .... 0 0
2
x Ax Bu u
x
n -1 0 0 0 .... 0 1 x n -1 0
x n - a0 a1 a2 .... an 2 an 1 x n b 0
11
Transfer Function to State Space
x1
x
2
y 1 0 0 .... 0 0
x n -1
x n
In this case
D 0
12
Transfer Function to State Space
Example of Transfer function Constant Term in the Numerator
Consider the following control system
R(s) 24 Y(s)
s 3 9s 2 26s 24
x1 y x 1 x2
x 2 y x 2 x3
13
Transfer Function to State Space
Example (contd.)
x 1 0 1 0 x 1 0
x 0 0 1 x 2 0 u
2
x 3 24 26 9 x 3 24
:In vector-matrix for
x Ax Bu 0 1 0 0
A 0 0 1 ;
B 0
24 26 9 24
Note that the third row of the matrix A is has the same coefficients as
the denominator of the transfer function but negative and in reverse
order. yx 1 x1
y 1 0 0 x 2 where C 1 0 0and D 0
x 3
14
Transfer Function to State Space
Consider the system defined by the following transfer function:
Y (s) b2 s 2 b1s b0
G (s) n
R ( s ) s an 1s n1 ... a0
x3
dt 2
15
Transfer Function to State Space
We convert the first block into a state-space representation using the state
variables x2(t) and x3(t),in which x1 is the output. The second transfer
function in the time domain is:
d 2 x1 d 2 x1
y (t ) b2 2 b1 2 b0 x1 b0 x1 b1 x2 b2 x3
dt dt
The second block simply forms the output as a specified linear combination
of the state variables developed in the first block.
16
Transfer Function to State Space
Example :Consider the system defined by the following transfer function
Y (s) s 2 7s 2
G (s) 3
U ( s ) s 9 s 2 26s 24
x1 x1
dx1 (t)
x2
dt U(s) 1 X1(s) Y(s)
s 2 7s 2
d 2 x1 (t) s 3 9s 2 26s 24
x3
dt 2
17
Transfer Function to State Space
Example (contd.)
x 1 0 1 0 x 1 0
x 0 0 1 x 2 0u
2
x 3 24 26 9 x 3 1
For the second block we can express the output of the system as:
Y ( s ) ( s 2 7 s 2) X 1 ( s )
Taking the inverse Laplace transform with zero initial condition, we get:
y (t ) x1 7 x 1 2 x1, where x 1 x2 and x1 x3 y (t ) x 7 x 2 x
3 2 1
Definition
The state transition matrix is defined as the matrix that satisfies the linear
:homogenous state equation
x (t ) A. x(t ) (1) x (t ) A. x(t ) Bu (t ) where u (t ) 0
d (t )
A. (t ) (2)
dt
x(t ) (t ) x(0) (3)
:Taking the Laplace transform of (1) we get
sX ( s ) x(0) A. X ( s )
[ sI A] X ( s ) x(0) X ( s ) [ sI A]1 x(0)
Definition
The sate transition Matrix (t) represents the free response of the system
.(response due to initial conditions only)
The sate transition Matrix (t) completely defines the transition of the
.state from the initial t=0 to any time t
20
State Transition Matrix
Properties
(0)=I
-1(t)= (-t)
[(t)]k= (kt)
21
State Transition Matrix
0 1
Example: A , compute (t)
- 3 - 4
( s ) ( sI A) 1
1
s 0 0 1
( s )
0 s - 3 - 4
1
s - 1
( s )
3 s 4
22
State Transition Matrix
1 0 .5 0.5
12 ( s )
( s 3)( s 1) s 1 s 3
23
State Transition Matrix
3 1 .5 1 .5
21 ( s )
( s 3)( s 1) s 1 s 3
s 0.5 1.5
22 ( s )
( s 3)( s 1) s 1 s 3
x(t ) (t ) x(0)
24
State Transition Matrix
d
x(t ) Ax(t ) Bu (t )
dt
By taking Laplace transform
s x( s ) x(0) Ax ( s ) Bu ( s )
x( s ) ( sI A) 1 x(0) ( sI A) 1 Bu ( s )
x( s ) ( s ) x(0) ( s ) Bu ( s )
t
x(t ) (t ) x(0) ( ) Bu (t )d
By taking inverse 0
Laplace transform t
x(t ) (t ) x(0) (t ) Bu ( )d
0
25
State Transition Matrix
0 1 0 x1 (0) 0
A , B , x (0) 1
- 3 - 4 1 2
Free response
x1 (t ) 0.5e t 0.5e 3t
x2 (t ) 0.5e t 1.5e 3t
Forced response
t
1
x1 (t ) [0.5e ( t )
0.5e 3( t )
]d (1 e 3t )
0
3
t
x2 (t ) [0.5e (t ) 1.5e 3(t ) ]d e 3t
0
dx(t)
A
dt X(t)
Uncontrollable system
28
Controllability
dx(t)
A u(t) X(t)
dt
Controllable system
29
Controllability
Uncontrollable soil?
30
Controllability
E [ B AB A2 B An1 B ]
is of rank n. Rank ( E ) n
31
Controllability
x1 (t ) 1 0 0 x1 (t ) 0
d 0 x (t ) 1 u (t )
x (t ) - 2 0
dt 2
2
x3 (t ) 0 0 - 3 x3 (t ) 2
33
State Feedback Control Design
d
x(t ) Ax(t ) Bu (t )
dt
y (t ) Cx (t ) Du (t )
u (t ) Kx(t ) G yd (t )
34
State Feedback Control Design
D
yd(t) u x + y
+ +
G
-
B
+
C
+
K-
Regulation Tracking
35
State Feedback Control Design
Pole-placement Technique
Desired characteristic equation
( s 1 )( s 2 )....( s n ) (1)
Closed loop system d
x(t ) Ax(t ) B[ kx(t ) Gyd ]
dt
y (t ) Cx (t ) D[ kx(t ) Gyd ]
d
x(t ) ( A BK ) x(t ) BGyd
dt
y (t ) (C DK ) x(t ) DGyd
36
State Feedback Control Design
d d
x(t ) ( A BK ) x(t ) BGyd x(t ) Ax(t ) B yd
dt dt
y (t ) (C DK ) x(t ) DGyd y (t ) C x(t ) D yd
Where
A ( A BK ), B BG
C (C DK ), D DG
37
State Feedback Control Design
38
State Feedback Control Design
GCL ( s ) s 0 C ( sI A) 1 B D 1
s 0
39
Observability
41
Observability
42
Observability
43
Observability
C
CA
O
n 1
CA
44
Observability
46
Observer Design
47
Observer Design
48
Observer Design
49
Observer Design
50
Observer Design
51
Observer Design
52
Observer Design
53
Observer Design
54
Observer Design
tf2ss(num,den) = ]a,b,c,d[
( s z1 )( s z 2 ).....(s z n )
H (s) k
( s p1 )( s p2 ).....(s pn )
zp2ss(z,p,k) = ]a,b,c,d[
E=ctrb(a,b) O=obsv(a,c)
rank(E) rank(O)
55
Remember That!
56