Beruflich Dokumente
Kultur Dokumente
Unit 5
State
State
State
State
State
State Variable
Representation
V t
1
M
F t dt
1
M
t0
F t dt
1
F t dt
M t0
Similarly
1
V t V t0
F t dt
M t0
t
t0
t0
x t v t dt v t dt v t dt
t
1
x t x t 0 t t 0 v t0
d F t dt
M t0 t0
13
x1 t , x2 t , xn t
u t , u2 t , un t
y1 t , y2 t , yn t
u1 t
u t
2
In Vector Form
u t
, y t
y1 t
y t
2
um t
, x t
x1 t
x t
2
y p t
xn t
15
dx1
x1 f1 x1 , x2 , xn ; u1 , u 2 , u m
dt
dxn
xn f1 x1 , x2 , xn ; u1 , u 2 , u m
dt
xi t xi t 0 f i x1 , x2 , xn ; u1 , u 2 , u m
t0
16
t f x t , u t
t f x t , u t , t
t g x t , u t
For Time-varying systemy t f x t , u t , t
17
State Model
State Model
A is nn system matrix,
B is nm INPUT matrix,
State Model
State Model
C is pn output matrix,
D is pm transmission matrix,
State Variable
Representation
Types:-
Y (S )
b
T (s)
U (S )
a n s n a n 1 s n 1 a1 s a0
( n )
an y an 1
( n 1)
By Considering
y a1 y a0 y bu
differential
equation
x1 y
x1 x2
x2 x3
x2 y
xn
( n 1)
x n1 xn
a0
a n1
a1
xn
x1
x2
x1
an
an
an
x 1
x
2
x
n 1
x n
0
a1
an
0
a2
an
0
a0
an
0 x1 0
0
0
0 x2
u
0
1
0
x
an 1 n 1
an xn b
y 1 0 0 0
x1
x
2
x
n1
xn
0
0
0
0
u
b m s b n 1 s
b1 s b0
Y (S )
T ( s)
U (S )
a n s n a n 1 s n 1 a1 s a0
The Transfer function may be divided into two
parts.
Y (s)
X 1 (s) Y (s)
G (s)
U (s)
U (s) X 1 (s)
where
X 1 (s)
1
n
n 1
U (s)
a n s a n 1 s
a 1 s a0
and
Y (S )
T ( s)
b m s m b n 1 s m 1 b1 s b0
X 1 (S )
X 1 (s)
1
U (s)
a n s n a n 1 s n 1 a1 s a0
The state equation
x 1
x2
x n1
x
n
Output equation
y 1
0
0
1
0
0
1
0
a
0
an
0
a
1
an
0
a
2
an
x1
x
2
0
0
x
n 1
xn
x1 0
x
2 0
u
0
1
an1 xn1 0
an xn b
0
0
0u
Y (S )
T (s)
b m s m b n 1 s m 1 b1 s b0
X 1 (S )
Output equation
y b m x n b m1 x n1 b1 x 1 b0 x1
x 1 x2
x1 x3
x n1 xn
a0
a n1
a1
x n
x1
x2
x1
an
an
an
a0
a n1
a1
y bm
x1
x2
xn bu b m1 xn1 b1 x2 b0 x1
an
an
an
a0
a n11
a1
y b0
bm x1 b1
bm x2 bm1
bm xn bu
an
an
an
Output equation
a0
y b0
bm
an
b1
a1
bm
an
a n1
bm1
an
x1
x
2
bm
b0 u
xn1
x
n
Advantages:1.
state variable
formulation.
Limitation:1.
Problem No-I
Represent the following differential equation in state model using
phase variable approach.
y 6 y 11 y 6 y 8u
By inspection,
x 1
0
x2 0
x 3
6
y 1 0
1
11 6
1
0
x1
0 x 2 0 u
x3
x1
0
x 2 0 u
x3
8
Problem No-II
Represent the following differential equation in state model using
phase variable approach.
y 6 y 11 y 6 y u 8u
17u 8u
By inspection,
1
x
0
x2 0
x
6
3
y 2
1
0
11
0 x1
0
1 x 2 0 u
8
6 x3
x1
2 x2 0u
x3
Problem No-III
Ri t
i (t )dt v(t )
1
d
y t i (t )dt
&
C y t i (t )
C
dt
Problem No-III
d
RC
y t y t v (t )
dt
RC
d
1
1
y t
y t
v t
dt
RC
RC
The matrix coefficient
State Model
x (t ) 1
1 RC v(t )
x1 (t )
RC
x1 (t )
1
A a0
RC
1
B b0
C 1 D 0
y (t ) 1
RC
Problem No-IV
d y (t ) R dy (t ) 1
1
y (t )
v(t )
2
dt
LC
LC
L dt
Problem No-IV
0
A
a0
1
0
a1 1 / LC
0 0
B
b
1
/
LC
0
C 1 0 D 0
1
R / L
State Model
0
1
x 1 (t )
x (t ) 1 / LC R / L
2
x1 (t )
y (t ) 1 0
x
(
t
)
2
x1 (t ) 0
x (t ) 1 / LC v(t )
b m s m b n 1 s m 1 b1 s b0
Y (S )
T ( s)
U (S )
a n s n a n 1 s n 1 a1 s a0
Assume that the denominator known in factored form and the poles
of the transfer function, located at 1, 2, n. are all distinct.
n
ci
Y (s)
T (s)
bm
U (s)
i 1 s i
i i xi u , i 1,2,3......n
The state equation in canonical x
form
x 1
x2
x
0
n
0
0
1
1
1
u
n x n
1
0
x1
x
2
y c1 x1 c2 x2 L L cn xn bmu
In vector Matrix form.
y c1
c2
cn
x1
x
2
M
bmu
M
xn
Problem No-I
T (s)
s 8s 17 s 8
s 6s 11s 6
1
2
1
T ( s) 1
s 1 s 2 s 3
ci
T ( s)
bm
U (s)
i 1 s i
x 1
x2
1
x1
1
x
1
u
x
1
n
y c1
c2
cn
x1
x
2
M
bmu
M
xn
Problem No-I
Then the overall State
Model,
x 1
1
0
2
x 3
0
y 1
0
2
0
0
3
x1
1
1
u
2
x3
1
x1
2 1 x2 1u
x3
Controllability
Observability
STATE
x& Ax Bu
Qc B M AB M L
MA B
n 1
Problem No-I
Consider the system with state equation to check
system is controllable or not.
x&1
x&
2
x&3
1
0
0
0
6 11
0
1
6
0
x1
x 0 u
2
x3
1
1
0
0
0
A 0
0
1 & B
0
6 11 6
1
Problem No-I
Then
1
0
0
AB 0
0
1
6 11 6
0 0
0 1
1 6
1
0
0
2
A B 0
0
1
6 11 6
0 1
1 6
6 25
Problem No-I
Then the composite matrix
Qc B M AB M L
MA B
n 1
0 0 1
Qc 0 1 6
1 6 25
Then
det Qc 0
Its rank is r=n=3. the system is therefore
completely controllable.
y Cx
Qo C M A C M L
MA
n 1
Problem No-I
Consider the system with state equation to check
system is observable or not.
x&1
x&
2
x&3
0 1
0 0
0 2
0
1
3
x1
y 3 4 1 x2
x3
0
x1
x 0 u
2
x3
1
Problem No-I
Let us now test observability of this system by the
Kalman test
0 0 0
T T
A C 1 0 2
0 1 3
3
4
1
0 0 0
2
T
T
A C 1 0 2
0 1 3
0
1
0 0
1 2
1 2
Problem No-I
Qo C M A C M
MA
3 0 0
Qc 4 1 2
1 1 2
The rank of the matrix Q0 is r=2 while n=3.
hence one of the state variable is un-
dx
ax;
dt
x(0) x0
x(t ) e at x0
a 2t 2 a 3t 3
I at
K x0
2!
3!
2!
3!
o solve these equations, we will need a few mathematical tools.
First:
At
e A ( t ) e At e A
k
e A ( t ) where
e At e At I is
I an NxN identity matrix. A is simply AxAxA.
For any real numbers t and :
d At d
A 2t 2 A 3t 3
A 3t 2
2
e I At
A A t
Further,
setting
=
-t:
dt
dt
2
!
3
!
2
!
A 2t 2 A 3t 3
At
A
I
A
t
A
e
Next:
2!
3!
x
(t ) Ax(t )
x(t ) e At x(0), t 0
o e
A0
t e e
At
or
At
t t
t1 t2 e
A t1 t2
At1 At2
t1 t2 t2 t1
2!
3!
where I is an NxN identity matrix. Ak is simply AxAxA.
)
At A numbers t and :
For
e A ( t any
ereal
e
t At
Further,
e A ( t ) e Asetting
e I = -t:
Next:
d At d
A 2t 2 A 3t 3
A 3t 2
2
e I At
A A t
dt
dt
2!
3!
2
!
A 2t 2 A 3t 3
A I At
Ae At
2!
3!
x
(t ) Ax(t )
At
We can use these results to show that the solution
x(t ) eto
x(0), t 0
is:
sI A X(s) x(0) Bu ( s)
1
1
X( s ) sI A x(0) sI A Bu ( s )
x(t ) e x(0) e A t Bu ( )d , t 0
At
reveals that:
1
e At L1 sI A
Continuing with the output equation:
y (t ) Cx (t ) Du (t )
Y ( s ) CX( s ) Du ( s )
sI A
x(0) C sI A
B D u ( s )
Y( s ) H ( s ) X( s ) where H ( s ) C sI A B D
1
The transfer
function can be
computed directly
from the system
parameters.
x ax bu
Where x(t) and u(t) are scalar functions of time. We expect an
exponential solution of the form eat. Taking the Laplace transform of
both sides, we have
x (0)
b
X(s)
U(s)
sa sa
The inverse Laplace transform of X(s) results in the solution
t
x ( t ) e at x (0) e a ( t ) b u () d
0
e At
A2t 2
Ak t k
I At
2!
k!
which converges for all finite t and any A. Then the solution of the
state differential equation is found to be
t
x ( t ) e At x (0) e A ( t ) B u () d
0
x ( t ) ( t ) x (0) ( t ) B u () d
0
CONTROLLABILITY:
a system must be completely controllable and completely
observable to allow the flexibility to place all the closed-loop
system poles arbitrarily. The concepts of controllability and
observability were introduced by Kalman in the 1960s.
x Ax Bu
we can determine whether the system is controllable by examining
the algebraic condition
rank B AB A 2 B A n 1B n
The matrix A is an nxn matrix an B is an nx1 matrix. For multi input
systems, B can be nxm, where m is the number of inputs.
For a single-input, single-output system, the controllability matrix P c
is described in terms of A and B as
Pc B AB A 2 B A n 1B
Example:
Consider the system
0
0
a0
0
0
a0
1
0
a1
1 x
a 2
1 , B
a 2
1
0
a1
0
0 u
1
y 1 0 0 x 0 u
0
1
0
0 , AB 1 , A 2 B a 2
a 2
a 22 a 1
1
0
Pc B AB A 2 B 0
1
0
1
a2
1
a 2
a 22 a1
Example.
Consider a system represented by the two state equations
x 1 2 x1 u , x 2 3 x 2 d x1
The output of the system is y=x2. Determine the condition of
controllability.
2 0
1
x
x u , y 0 1 x 0 u
d 3
0
1
2 0 1
2
B and AB
0
d
3
0
d
1 2
Pc
0
0
, A
500
500
20.5
50
20000 20000
0
1
0
8.2
Pc =
clc
clear
A=[0 0 1 0;0 0 0 1;-500 500 -20.5
0;20000 -20000 0 -8.2];
B=[0;0;50;0];
Pc=ctrb(A,B)
rank_Pc=rank(Pc)
det_Pc=det(Pc)
1.0e+007 *
0 0.0000 -0.0001 -0.0004
0
0
0 0.1000
0.0000 -0.0001 -0.0004 0.0594
0
0 0.1000 -2.8700
rank_Pc =
4
det_Pc =
-2.5000e+015
The system is
controllable.
OBSERVABILITY:
All the poles of the closed-loop system can be placed arbitrarily in
the complex plane if and only if the system is observable and
controllable. Observability refers to the ability to estimate a state
variable.
x Ax Bu
and
y Cx
PO
C
C A
n 1
CA
Example:
Consider the previously given system
0
0
a0
1
0
a1
0
1 , C 1 0 0
a 2
Dorf and Bishop, Modern Control Systems
CA 0 1 0
, CA 2 0 0 1
Thus, we obtain
1 0 0
PO 0 1 0
0 0 1
The det P0=1, and the system is completely observable. Note that
determination of observability does not utility the B and C matrices.
2 0
1
x
x
u
1 1
1
and
y 1 1 x
1
B
1
and
2
AB
2
1
Pc B AB
C 1 1 and CA 1 1
Therefore, the observability matrix is determined to be
C 1 1
Po
CA
1
1
y x1 x 2
However,
x 1 x 2 2x1 x 2 x1 u u x1 x 2
Thus, the system state variables do not depend on u, and the system
is not controllable. Similarly, the output (x 1+x2) depends on x1(0) plus
x2(0) and does not allow us to determine x1(0) and x2(0)
independently. Consequently, the system is not observable.
The observability matrix PO can be constructed in Matlab by using
obsv command.
From two-mass system,
Po =
clc
clear
A=[2 0;-1 1];
C=[1 1];
Po=obsv(A,C)
rank_Po=rank(Po)
det_Po=det(Po)
1
1
1
1
rank_Po =
1
det_Po =
0
Dorf and Bishop, Modern Control Systems