0% found this document useful (0 votes)
26 views71 pages

Chapter 3 State-Variable Models

Uploaded by

Outis Wong
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
26 views71 pages

Chapter 3 State-Variable Models

Uploaded by

Outis Wong
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 71

Chapter 3 State-Variable Models

• State-Variable Models
• State equations
• State Variables of a Dynamic System
• The concept of State
• Form of the State Equations
• The State Differential Equation
• Transfer Function of a State Space Model
• The State Transition Matrix
• Characteristic Equation and Eigenvalues
• Controllability & Observability 1
State-Variable Models
Physical
system (effect)
(cause) Modeling
Differential
equations

Nonlinear& State-Variable
Time Varying Models
Lapalce Transform
Transfer State-Variable
Function LTI Models
Inverse
Lapalce Transform

• The time-domain is the mathematical domain that incorporates


the response and description of a system in terms of time, t.
2
State-Variable Models

Consider this system shown in the above Figure. A set of state variables
(x1 , x2 , …, xn ) for system is a set such that knowledge of the initial values
of the state variables[x1 (t0 ), x2 (t0 ), …, xn (t0 )] at the initial time t 0 and
of the input signals u1 (t ) and u2 (t ) for t > t0 will be sufficient to determine
the future values of the outputs and state variables.
The general form of a dynamic system is schematically shown as
x(0) Initial conditions

u(t) y(t)
System (x)
Input Output
3
State-Variable Models
• State differential equation is an alternative way to describe
a dynamic system (i.e. time-domain method).
• The state-variable model, or state-space model is a particular
differential equation model
• Equations are expressed as n first-order coupled differential
equations, but the choice of states is not unique
• All choices of state variables preserve the system’s input-output
relationship (that of the transfer function)
4
State Equations
• For LTI systems, it is routine to move between state and
transfer function representations i.e. between frequency
and time domains

• Any nth order differential equation can easily be converted


into a set of 1st order state equations for nonlinear or time-
varying systems, the transfer function approach often breaks
down.
• Most multivariable and many stochastic design methods are
based on state equations
5
State Variables of a Dynamic System
Definition: The state of a system at any time t0 is the minimum
amount of information at t0 that, together with all inputs for
t ≥t0 uniquely determines the behaviour of the system for all t ≥t0.

Mathematically this makes us think of a sufficient set of initial


conditions.

Physically, this makes us think about measuring the initial stored


energy (either is usually an acceptable choice of states)

Note that it is the minimum amount of information.


6
The Concept of State
•Because the choice of states for a given system is not
unique, we often choose states that represent physical
measurements – voltages, velocity, position, etc.

• However, it may also be convenient to choose states that


simplify the mathematical form of the state equations
– for example the output and its derivatives – but are not
easily measurable.

7
Form of the State Equations
The state description always consists of two sets of equations,
normally written in matrix form. The first set of equations describes
the dynamics, and is a set of first order differential equations, each
expressing the first derivative of a state as a function of all the (n)
states and the (m) inputs (with no derivatives):
x1 (t ) = f1 ( x1 (t ), x2 (t ) xn (t ), u1 (t ),um (t ))
x 2 (t ) = f 2 ( x1 (t ), x2 (t ) xn (t ), u1 (t ),um (t ))

x n (t ) = f n ( x1 (t ), x2 (t ) xn (t ), u1 (t ),um (t ))
or
x (t ) = f ( x (t ), um (t ))
8
Form of the State Equations
The second set of equations has no dynamics, and expresses
the outputs as a function of the states and inputs:
y1 (t ) = g1 ( x1 (t ), x2 (t ) xn (t ), u1 (t ),um (t ))
y2 (t ) = g 2 ( x1 (t ), x2 (t ) xn (t ), u1 (t ),um (t ))

y p (t ) = g p ( x1 (t ), x2 (t ) xn (t ), u1 (t ),um (t ))
or
y (t ) = g ( x (t ), u(t ))
x (t ) = f ( x (t ), u(t ))
y (t ) = g ( x (t ), u(t ))

9
Form of the State Equations
The state of a linear time in-varying system is described by the set of first
order differential equations written in terms of the state variables [ x1 x2 ... xn ]
and can be written in general form as:
x1 a11 x1 + a12 x2 +… a1n xn + b11u1 +  b1mum
=
x2 a21 x1 + a22 x2 +… a2 n xn + b21u1 +  b2 mum
=

xn an1 x1 + an 2 x2 +… ann xn + bn1u1 +  bnmum
=
or in matrix form as follows:
 x1   a11 a12  a1n   x1 
 x  a     b11  b1m   u1 
 a2 n   x2  
+        
 2  21 a22
      
       bn1  bnm  um 
 xn   an1 an 2  ann   xn 
Form of the State Equations
 x1   a11 a12  a1n   x1 
 x  a     b11  b1m   u1 
 a2 n   x2  
+        
 2  21 a22
      
       bn1  bnm  um 
 xn   an1 an 2  ann   xn 

n: number of state variables, m: number of inputs.


The column matrix consisting of the state variables is
called the state vector and is written as
 x1 
x 
x=  2


 
 xn 
Form of the State Equations
 x1   a11 a12  a1n   x1 
 x  a     b11  b1m   u1 
 a2 n   x2  
+        
 2  21 a22
      
       bn1  bnm  um 
 xn   an1 an 2  ann   xn 

x A x + B u
=
 x1   a11 a12  a1n 
x  a  b11  b1m   u1 
a22  a2 n     =  ,u   
=x = 2
, A  21 = ,B     
      
     bn1  bnm  um 
 xn   an1 an 2  ann 

= =
y Cx C [c1 c2  cn ]
Example:
d 2 y (t ) dy (t )
M 2
+b + ky (t ) = u(t )
dt dt
State variables=?
dx2 (t )
M + bx2 (t ) + kx1 (t ) = u(t )
dt
Thus the following two first-order DE’s
dx1 (t )
= x2 ( t )
dt
dx2 (t ) b k u (t )
= − x2 (t ) − x1 (t ) +
dt M M M
 0 1  0
 x1   k   x1   
= x  b    +  1  u (t )
 2 − −  x2 
 M M M  13
Example:
d n y (t ) d n −1 y (t ) dy (t )
How about an dt n + an −1 dt n −1 +  + a1 dt + a0 y (t ) = u(t ) ?
dx1 dxn −1
Let= x1 y=, x2 ,=, xn .
dt dt
dx1
= x2
dt

dxn −1
= xn
dt
dxn 1
= ( − an −1 x n −1 −  − a0 x1 ) + u (t ))
dt an
 x1   0 1  0   x1 
   0     0 
d  x2   0  0   x2  +    u
dt           
      1/ an 
 −a0 / an1 −a1 / an  −an −1 / an   xn  14
 xn 
Series RLC Circuit
∑ v i = 0 : v (t ) = vL (t ) + vR (t ) + vC (t )
di
v (t ) = L + i (t ) R + vC (t )
dt
dvC dvC i (t )
i (t ) = C ⇔ =
dt dt C
dvC
i (t ) = C How to determine the singe of the current?
dt dvC
The singe of i (t ) is the same as the singe of .
di dt
ODE: L = −i (t ) R − vC (t ) + v (t )
dt
dvC i (t ) dx1
= let x = i x = v (Notice that : x2 ≠ )
dt C 1 2 c dt
dx1 R 1 1
= − x1 − x2 + v (t )
dt L L L
dx2 x1
= 15
dt C
Series RLC Circuit
dx1 R 1 1
let x1 = i x2 = vc = − x1 − x2 + v(t )
dt L L L
dx2 x1
=
dt C
 R 1

 L −   1 
 x1  L  x1   
 x      + L v (t ) x Ax + Bu
=
 2  1   x2    u
 0  0
x  C  x 
 B
A  x1 
= = [ 0 1]  = x=
If we let vC as the output, then C = [ 0 1] , 
y Cx 2 vC
 x2 
 x1 
If we let i (t ) as the output, then C = [1 0] , y= Cx= [1 0]  =  x=1 i (t ).
 x2  16
An RLC circuit.
∑ ii = 0 : u(t ) = ic + iL
∑ vi = 0 :
diL
vc = v L + vo = L + iL R
dt
dvc dvc 1 1
ic = C = u ( t ) − iL = − iL + u ( t )
dt dt C C
diL
L = vc − i L R diL 1 R
= vc − RiL
dt dt L L
let x1 = vc x2 = i L dx1 1 1
= − x2 + u ( t )
dt C C
dx2 1 R
= x1 − x2
dt L L 17
An RLC circuit.
dx1 1 1
let x1 = vc x2 = i L = − x2 + u ( t )
dt C C
dx2 1 R
= x1 − x2
dt L L
 1
 0 −   1
 x1  C  x1   
=  x   1    + C u
 2  R   x2    u
(t )
x Ax + Bu
=
−  0
x  L L  x 
 B

(t ) Rx2 ⇒ c = [ 0 R]
A
If we want y=
(t ) vo=
 x1 
= =
y Cx [0 R]  =  Rx=
2 Ri=
L v0
 x2 
What happen if vL is the output? 18
An RLC circuit.
let x1 = vc x2 = i L
 1
 0 −   1
 x1  C  x1   
=  x   1    + C u (t )
 2  R   x2    u
−  0
x  L L  x 
 B
What happen if vL is the output? A


 x1 = x1* 
let v= x= x1 
⇔

c 1 1 1 * * 
 x2 = (x1 + x2 )= (x1 + x2 ) 
*
vL = x2∗ = vc − vo = x1 − RiL = x1 − Rx2  R R 

 x1 
y = Cx = [1 − R ]   = x1 − Rx2 = vc − v0 = vL ⇒=
c [1 −R]
 x2 
19
State Equation to SFG
1 1
dvc 1 1
= − iL + u ( t ) x1 =
− x2 + u (t )
dt C C let x1 = vc C C
diL 1 R
= vc − RiL
x2 = iL =
x2
1 R
x1 − x2
dt L L L L

Output: y1 (t ) = vo (t ) = Rx2 . (Time domain)


R
SFG( Laplace domain) −
L
1 1
x1
1
C s x
L 2
1
R
U(s) s
x1 Vo(s)
x2
1

C

20
Inverted Pendulum on a Cart

State variables?
T = MgLθ

21
d θ
2
Inverted Pendulum on a Cart
ml
dt 2
The sum of the forces in the horizontal direction:
d2y d 2θ
( M + m) 2 + mLcosθ 2 − u (t ) =0
dt dt
d2y d 2θ
( M + m) 2 + m= L 2 − u (t ) 0 for small θ cosθ ≈ 1
dt dt
d 2θ d 2 y
← mL( 2 + 2 )
dt dt
The sum of the torques about the pivot point:
mg d2y d 2
θ
mL 2 + mL2
2
− mLg θ =
0
dt dt
dy (t ) dθ (t )
x1 = y (t ) x2 = x3 = θ ( t ) x 4 =
dt dt 22
Inverted Pendulum on a Cart
The state variable for the second-order equations are:
dy dθ
( x1 , x2 , x3 , x4 ) = ( y , ,θ , )
dt dt
The sum of the torques about the pivot point:
d2y d 2
θ
mL 2 + mL2
2
− mLg θ =
0
dt dt
dy (t ) dθ (t )
x1 = y (t ) x2 = x3 = θ ( t ) x 4 =
dt dt
dx2 dx4
+L − gx3 = 0
dt dt 23
Inverted Pendulum on a Cart
(horizontal direction) dx2 dx4
( M + m) +m L − u (t ) =
0
dt dt
(about the pivot point) dx2 + L dx4 − gx = dx4 dx2
3 0 L = gx3 −
dt dt dt dt
dx2 dx4 dx2
( M + m) +m L − u (t ) =
0 M + m g x3 = u(t )
dt dt dt
dx2 m 1 (horizontal direction)
=− g x3 + u (t )
dt M M
1
≈ u (t ) (for M >> m)
M
24
Inverted Pendulum on a Cart
dx2
(horizontal direction) M + m g x3 = u(t )
dt
dx2 1
≈ u (t ) (for M >> m)
dt M
(about the pivot point)
dx2 dx4
+L − gx3 =
0
dt dt
1 dx4
u (t ) + L − g x3 =
0
M dt
dx4
ML − Mg x3 + u (t ) =
0
dt
25
Inverted Pendulum on a Cart
The four first-order differential equations:
dx1
= x2 x = Ax + Bu
dt
dx2 mg 1
y = Cx
= − x3 + u (t )
dt M M 0 1 0 0  0 
0 0 − mg
0  1 
dx3 A= B=  
M M
= x4 0 0 0 1  0 
dt
 g   −1 
dx4 g 1 0 0 L 0  ML 
= x3 − u (t )
dt L M L C = [0 0 1 0]
26
Transfer Function of a State Space Model
x (t ) = Ax (t ) + Bu(t )
y (t ) = Cx (t ) + Du (t )
Taking the Laplace transform (assume zero initial conditions)

sX ( s ) = AX ( s ) + BU ( s )
Y ( s ) = CX ( s ) + BU ( s )
So,
[sI-A]X ( s ) = BU ( s )
[ ]−1
X ( s ) = sI-A BU ( s ) ( s = σ + jω )

27
Transfer Function of a State Space Model
Substituting
X ( s ) = [sI-A]−1 BU ( s )
into the output equation
Y ( s ) = CX ( s ) + BU ( s )

Y ( s ) = {C [sI-A] B + D}U ( s ) = G ( s )U ( s )
−1
yields

Therefore, for single variable case, the transfer function of the system is

G( s) = Y ( s) / U ( s)
For multivariable case,
Gij ( s ) = Yi ( s ) / U j ( s )

28
TF from State Space Model Example
0 1   0
x =   x +  u G( s) = ?
 − 3 − 4  1 
y = [10 0]x

(a) A,B,C and D √

Y ( s ) = {C [sI-A]−1 B + D}U ( s ) = G ( s )U ( s )

Y (s) 10
G (s) = = 2
U ( s) s + 4s + 3

29
TF from State Space Model Example
0 1   0
G( s) = ?
x =   x +  u
 − 3 − 4  1 
y = [10 0]x
(b)
x1 = x2
x1 = y / 10
x 2 = −3x1 − 4 x2 + u
y = 10x1 x2 = x1 = y / 10
Dynamics equation: x2 = x1 = y / 10
x 2 = −3x1 − 4 x2 + u
y + 4 y + 3 y = 10u

s 2Y ( s ) + 4 sY ( s ) + 3Y ( s ) = 10U ( s ) Y (s) 10
G (s) = = 2
( s 2 + 4 s + 3)Y ( s ) = 10U ( s ) U ( s) s + 4s + 3
30
Two ways of obtaining TF from dynamic equation
d n y (t ) d n −1 y (t ) dy (t )
an +1 + an n −1
+  + a2 + a1 y (t ) = u(t )
dt n dt dt

 Y ( s)
 = LF : dyanmic eqaution
G( s) =  U ( s)
C [sI-A]−1 B + D
 State equation
L.F:
(an +1s n + an s n −1  + a1 )Y ( s ) =
U (s)

Y ( s) 1
G ( s) = =
U ( s ) an +1s n + an s n −1  + a1

31
Obtaining TF using State Space Model Example
d n y (t ) d n −1 y (t ) dy (t )
an +1 n
+ a n n −1
+  + a 2 + a1 y (t ) = u(t ) ?
dt dt dt
State equation: Let x1 = y x1 = x2
x= 2 x=
1 y 
x= 3 x=2 
y 1
xn = (−a1 x1 − a2 x2  − an xn + u );
 an +1
d n −1 y y = x1
=xn x=  n −1
dt
 0 1  0   0 
 0 0  0   0 
A=  B=  C = [1 0  0] D=?
 0 0  1    
   

 1 n+1
a / a − a 2 / a n +1  − a n / a n +1  1 / an +1 

Y (s )
= C [ sI - A] B + D ⇒
−1 1
G (s=
) G (s ) =
U (s ) an +1s n + an s n −1 +  + a1
32
Realization of a Transfer Function
• A state description x =
Ax + Bu , y =
Cx + Du is a
realization of G(s) if C[sI − A]−1 B + D =
G (s)
• A realization of G(s) is minimal if there exists no
realization of G(s) of less order
• An LTI systems is observable if the initial state x(0) can
be uniquely deduced from knowledge of u(t) and y(t) for
t Є [0 T]

• An LTI system is controllable if for every x(t0) and


every T >0, there exist u(t0+t), 0<t ≤ T such that
x(t0+T) =0 33
From Transfer Function to State Space

−1 Why & How?


5( s + 1) 5 + 5s
Gc ( s ) = = x3 x2 x1
s+5 1 + 5s −1

1
+5
T (s ) =
∑ P Δk
k k
= s
5
=
5(s + 1) 1
P1 = 5, P2 = 5 , Δ1 = Δ 2 = 1, Δ = 1 + 5
1
Δ 1+ 5
1 s+5 s s
s 1
1 G( s) 1
T ( s) = s = = ⇔ G( s) = , H ( s) = 2
1 s + 2 1 + H ( s )G ( s ) s
1+ 2
1 s
s 6 G( s) 1
T ( s) = 6 = =6 ⇔ G( s) = , H ( s) = 3
1+ 3
1 s+3 1 + H ( s )G ( s ) s 34
s
From Transfer Function to State Space

5( s + 1) 5 + 5s −1 1
=
s −1 6 s −1
Gc ( s ) = = =6
s+5 1 + 5s −1 s + 2 1 + 2 s −1 s + 3 1 + 3s −1

35
From Transfer Function to State Space
x2 x1
x3

Node equals sum of all incomings.

x2 x1
x3

State-variable differential equation:


x1 = −3x1 + 6 x2 + 0 x3
 x1  − 3 6 0   x1  0
x2 = 0 x1 − 2 x2 + 5 x3 + 5[ r (t ) − 5 x3 ] X =  x2  =  0 − 2 − 20  x2  + 5 r (t )
      
x3 = 0 x1 − 0 x2 − 5 x3 + r (t )  x3   0 0 − 5   x3  1
y = x1 y = [1 0 0]X
36
From Transfer Function to State Space

Y ( s) 30( s + 1) q( s ) Y ( s)
= T ( s) =
k1
+
k2
+
k3
= T ( s) = =
R( s ) ( s + 5)( s + 2)( s + 3) ( s − s1 )( s − s2 )( s − s3 ) R( s) ( s + 5) ( s + 2) ( s + 3)

k1 = −20 k2 = −10 k3 = 30
x1

x2
Node equals sum of all incomings.
x3
State-variable differential equation:

 x1   − 5 0 0   x1  1  x1 
 x  =  0 −2 0   x2  + 1 r (t ) y = [- 20 - 10 30] x2 
 2       
 x3   0 0 − 3  x3  1  x3 
diagonal canonical form 37
State Variables of a Dynamic System
Definition: The state of a system at any time t0 is the minimum
amount of information at t0 that, together with all inputs for
t ≥t0 uniquely determines the behaviour of the system for all t ≥t0.

38
The State Transition Matrix Φ(t)

x (t ) ∈ R n

How to compute this matrix?


39
The State Transition Matrix (u=0)
x = Ax + Bu u=0 x (t ) = Ax (t )
• The state transition matrix satisfies the homogenous
(i.e. zero-input) state equation.
• It represents the evolution of the system’s free response to
non-zero initial conditions:
x (t ) = φ (t) x (0) =? “zero input response”
x(0) is initial condition.
x dx / dt dx
x Ax(if x ∈ R ) ⇒ = A
= 1
= A = Adt
x x x
dx
∫x ∫ = = − = x(0) t0 =
At
Adt ln x / x0 A (t t 0 ) x (t ) e 0
φ (t ) = e At 40
The State Transition Matrix (u=0)
x ( t ) = φ ( t ) x ( 0)
• If x (t ) ∈ R n, there is another way to find x(t) using Taylor
series expansion
• Successive differentiation of gives:
x = Ax
x = Ax = A2 x
x (3) = A2 x = A3 x

x ( k ) = Ak x
At time t = 0 41
The State Transition Matrix
1 1 (k )
x (t ) = x (0) + x (0)t + x(0)t +  + x (0)t k +
2
2! k!
1 1
= x (0) + Ax (0)t + A2 x (0)t 2 +  + Ak x (0)t k +
2! k!
1 2 2 1 k k
= ( I + At + A t ++ A t + ) x (0)
2! k!
This series converges for all finite t. It is called the
matrix exponential
1 22 1 k k
e At
= I + At + A t +  + A t + 
2! k!

x (t ) = e At x (0) 42
The Matrix Exponential
e A0 = I
A( t1 + t2 )
e =e At1 At2
e =e At2 At1
e
At −1 − At
(e ) =e
T
i.e. the matrix exponential
e A t
= (e ) At T
behaves very much like the
familiar scalar exponential
Ae At = e At A
function. Note that A must
d At be square (nxn).
e = Ae At
dt
43
State Transition Matrix (u≠0) Φ(t)
x = Ax + Bu
x − Ax = Bu

e − At ( x − Ax ) = e − At Bu
d − At
( e x ) = e − At Bu
dt
t d t
− Aτ
∫ (e x )dτ = e − At x (t ) − e − A0 x (0) = ∫ e − Aτ Bu(τ )dτ
0 dt 0
t t
− A( t −τ )
At
x ( t ) = e x ( 0) + ∫ e Budτ = Φ(t ) x (0) + ∫ Φ(t − τ ) Bu(τ )dτ
0 0
t
x (t ) = Φ(t ) x (0) + ∫ Φ(t − τ ) Bu(τ )dτ
0 Φ(t ) = e At 44
State transition Matrix (u≠0) –Φ(s)
x = Ax + Bu
sX ( s ) − x (0) = AX ( s ) + BU ( s )
( sI − A) X ( s ) = x (0) + BU ( s )
X ( s ) = ( sI − A) -1 x (0) + ( sI − A) -1 BU ( s )
Let Φ ( s ) = ( sI − A) -1 Can it exist? ( s = σ + jω )
X ( s ) = Φ ( s ) x (0) + Φ ( s ) BU ( s )
Which compares with the time domain solution:
t
x (t ) = Φ (t ) x (0) + ∫ Φ (t − τ ) Bu(τ )dτ
0
Φ(t ) = e At
45
State Transition Matrix
x = Ax + Bu
t Φ(t ) = e At
x (t ) = Φ (t ) x (0) + ∫ Φ (t − τ ) Bu(τ )dτ
0 Φ ( s ) = ( sI − A) -1
• Note that the system response has two components:

• Natural response – “zero input response”


due to initial conditions
• Forced response – “zero state response”
due to input

• Overall response is the sum of the two components

46
Characteristic Equation and Eigenvalues
• Recall that, for a transfer function G(s)=N(s)/D(s),
the roots of the characteristic equation D(s)=0 are
the poles of the system.

• Recall that the denominator of the transfer function


of a state-space representation is det(sI-A)
Y ( s ) = {C [sI-A]−1 B + D}U ( s ) = G ( s )U ( s ) ( s = σ + jω )

• The characteristic equation is then det(sI-A)=0


• The roots of this equation are the eigenvalues of
the matrix A.
For the stable system, what must the egenvialues be ?
For the stable system, the real parts of all the eigenvalues
47
must be negative.
Eigenvectors
A nonzero vector pi which satisfies

(λi I − A) pi = 0
is called eigenvector associated with the eigenvalue λi

If A has distinct eigenvalues, eigenvectors can be found


directly.

For the stable system, the real parts of all the eigenvalues
must be negative.

48
Controllability
x = Ax + Bu Theorem: This system is controllable if
and only if the following controllability
y = Cx + Du matrix has rank n:

S = [B AB A B  A
2 n−1
B]

Note that for a single input system S will be an [n × n]


square matrix and the rank test is that
∆[S]≠0

49
Controllability Example
− 2 1  1 
A=   B= 
 0 − 1  0

controllability matrix :
 1 −2 
S = [B AB ] =  ? 
0 0 
det S= 0
50
Observability
x = Ax + Bu
y = Cx + Du
Theorem: This system is observable if and only if
the following observability matrix has rank n:

n −1 T
V = [C CA CA 2
 CA ]

51
Observability Example

− 2 0  1 
A=   B =   C = [1 0]
 0 − 1  0
observability matrix :
 C  1 ? 0
V = = 
CA −2 0

det V= 0
52
Controllability and Observability

C: Controllable, O: Observable, UO: Un-observable, UC: Un-controllable. 53


Control Canonical Form (TF->State EQ)
Y ( s ) bn −1s n −1 + bn − 2 s n − 2  + b1s + b0
=
G (s ) =
U (s) s n + an −1s n −1 +  + a1s + a0

If ( s ) (bn −1s n −1 +  + b1s + b0 ) Z ( s )


Y=
U ( s ) = ( s n + an −1s n −1 +  + a0 ) Z ( s )

Phase variables
Then
Y ( s ) (bn −1s n −1 + bn − 2 s n − 2  + b1s + b0 ) Z ( s )
=
G (s ) =
U (s) ( s n + an −1s n −1 +  + a1s + a0 ) Z ( s )
bn −1s n −1 + bn − 2 s n − 2  + b1s + b0
= n
s + an −1s n −1 +  + a1s + a0
54
Control Canonical Form (TF->State EQ)
Y ( s ) bn −1s n −1 + bn − 2 s n − 2  + b1s + b0
=
G (s ) =
U (s) s n + an −1s n −1 +  + a1s + a0
Imply: ( s ) (bn −1s n −1 +  + b1s + b0 ) Z ( s )
Y=
n −1 Phase variables
U ( s ) = ( s + an −1s
n
+  + a0 ) Z ( s )
d n −1 z (t )
y (t ) = bn −1 +  + b0 z (t )
dt
d n z (t ) d n −1 z (t )
Let u (t ) = + an −1 +  + a0 z ( t )
dt dt
x1 = z
x2 = x1 = z y (t ) = bn −1 xn −1 +  + b0 x1 C, D
x3 = x2 = z u (t ) = xn + an −1 xn +  + a0 x1

d n −1 z x n = − an −1 xn −  − a0 x1 + u(t )
xn = xn −1 =
dt A,B 55
Control Canonical Form (TF->State EQ)
bn −1s n −1 + bn −2 s n −2  + b1s + b0
G( s) = n
s + an −1s n −1 +  + a1s + a0
TF: x n −1 = xn
x n = − an −1 xn −  − a0 x1 + u(t )
y (t ) = bn −1 xn −1 +  + b0 x1
SS:
(controllable)

56
Control Canonical Form (TF->SFG)
bn −1s n −1 + bn −2 s n −2  + b1s + b0
G( s) = n n −1
s + an −1s +  + a1s + a0

x n = − an −1 xn −  − a0 x1 + u(t ) y (t ) = bn −1 xn −1 +  + b0 x1

57
Observer Canonical Form (TF->SFG)
bn −1s n −1 + bn −2 s n −2  + b1s + b0
G( s) = n
s + an −1s n −1 +  + a1s + a0
bn −1s −1 + bn −2 s −2  + b1s −( n −1) + b0 s −n
=
1 + an −1s n −1 +  + a1s −( n −1) + a0 s −n

Y (s ) = G (s )U (s )
(1 + an −1s −1 +  + a1s − (n −1) + a0 s − n )Y=
(s ) (bn −1s −1 + bn − 2 s −2  + b1s − (n −1) + b0 s − n )U (s )
(s ) (bn −1s −1 + bn − 2 s −2  + b1s − (n −1) + b0 s − n )U (s ) − (an −1s −1 +  + a1s − (n −1) + a0 s − n )Y (s )
Y=

s ) (bn −1U − an −1Y )s −1 +  + (bU


Y (= 1 − a1Y )s − (n −1)
+ (b0U − a0Y )s −n

n n
Y (s=
) ∑ Y=i
=i 1 =i 1
∑ i
C s=i
(bn −1U − an −1Y )s −1
+  + (bU
1 − a1Y )s − (n −1)
+ (b0U − a0Y )s −n

58
Observer Canonical Form (TF->SFG)
n n
Y (s=
) ∑ Y=i
∑ Ci s=i
(bn −1U − an −1Y )s −1
+  + (bU
1 − a1Y )s − (n −1)
+ (b0U − a0Y )s −n

=i 1 =i 1
Yn=(s ) (b0U − a0Y )s − n
Linear system satisfies the rule of superposition.

s −1 s −1 s −1 s −1
(s ) (b0U − a0Y )s − n
Yn=
b0 s −1

U Y

(b0U − a0Y )

Y= x=
n xn −1
59
Observer Canonical Form (TF->SFG)
bn −1s n −1 + bn −2 s n −2  + b1s + b0
G( s) = n
s + an −1s n −1 +  + a1s + a0
n n
Y (s=
) ∑ Y=i
=i 1 =i 1
∑ i
C s=i
(bn −1U − an −1Y )s −1
+  + (bU
1 − a1Y )s − (n −1)
+ (b0U − a0Y )s −n

Y1 (s ) (bn −1U − an −1Y )s −1


=

60
Observer Canonical Form (TF->SFG)
n n
Y (s=
) ∑ Y=i
=i 1 =i 1
∑ i
C s=i
(bn −1U − an −1Y )s −1
+  + (bU
1 − a1Y )s − (n −1)
+ (b0U − a0Y )s −n

u
y

y = xn
x1 = −a0 xn + b0u
x2 = x1 x2 =−a1 xn + x1 + b1u
x3 = x2 ,  xn =
−an xn + xn −1 + bn −1u

xn = xn −1 61
Observer Canonical Form (TF->State EQ)
bn −1s n −1 + bn −2 s n −2  + b1s + b0
G( s) = n
s + an −1s n −1 +  + a1s + a0
x1 = −a0 xn + b0u
TF: y = xn xn = x n −1
x 2 = − a1 xn + x1 + b1u

x n = − an xn + xn −1 + bn −1u
SS: (observable)

T
Aobserver _ canonical = Acontrol _ canonical

eig ( A) = eig ( AT )

62
Observer Canonical Form (TF->SFG)
bn −1s n −1 + bn −2 s n −2  + b1s + b0
G( s) = n
s + an −1s n −1 +  + a1s + a0

Input forward

63
Control vs Observer Canonical Form
bn −1s n −1 + bn −2 s n −2  + b1s + b0
G( s) = n
s + an −1s n −1 +  + a1s + a0

64
Basic Idea of State Feedback
x = Ax + Bu
Consider the state feedback controller where is a constant
feedback gain matrix u = − Kx + r
Then one can write
x = Ax + B ( -Kx + r )
= ( A − BK ) x + Br
Whereas the poles of the open-loop system are given by
the eigenvalues of A, the poles of the closed-loop system
are given by the eigenvalues of (A-BK).

65
State Feedback Design
x = Ax + B( -Kx + r )
= ( A − BK ) x + Br

Control system with state feedback

•The poles of the closed-loop system can be arbitrarily


assigned if and only if the system is controllable

66
State Feedback Design
•Often, states are not all measurable. Hence, it is
necessary to design an observer to construct them
from the output vector.

• Such an observer can be designed if and only if the


system is observable.
• The observed state is then used instead of the true
state to generate the feedback.
67
State Variable Feedback
• Choice of feedback matrix gains allows the eigenvalues
(or poles) to be assigned as we choose.

• Note that we have not addressed (yet) the issue of a


reference input r.

• We shall be returning to state variable design later.

………and now back to transfer functions............

68
MECH3610 HOMEWORK 4
P 4.1 A dynamic system can be modeled by using differential equations. A
mechanical system is shown in Fig 3.3, use differential equation obtained
in Home Work 2 problem P 2.1, write down state space model of the
system.

Fig 4.1

Hint: you can use differential equations or signal flow graph to obtain state space model. But, the
simple way is based on the differential equation obtained in HW 2 and introducing new state
variable to obtain the state equations. Total four first order equations are needed for this problem.
P 4.2 Many control systems must operate in two dimensions, for example, x and y
axes motion control. A two-axis control system is shown in Fig. 4.2, where a set of
state variable is identified. Two gains K1 and K 2 are used to manipulate the system
respectively.
a) Obtain the state differential equation.
b) Draw the corresponding block diagram based on signal flow graph.
X AX + BU
=
?
Y = CX =  x1   R1   y1 
X = ,U = x  ,Y R  y 
 2  2  2
?
Node equals sum of all incomings. (Slides 18-19 Ch2.3)

Fig. 4.2 X 1= K1 ( R1 − X 1 ) − K 2 ( R2 − X 2 ) Y1 = X 1
Y2 = X 2
X 2 = ?
Hint: a)
X 1

X 2
What is A,B,C?
b) Follow the definition of SFG.
P 3.5 The transfer function of a system is
Y (s) ( s 2 + 2 s + 5)
T=
(s) =
R( s ) ( s 3 + 2 s 2 + 3s + 10)
Sketch the signal flow graph and obtain the state variable models for:
Control Canonical Form
Observer Canonical Form

Hint: Follow the slides 54-64 of Chapter 3 lecture notes.

You might also like