Sunteți pe pagina 1din 21

EE 422G Notes: Chapter 7 Instructor: Zhang

Chapter 7 State-Variable Technique

7-1 Introduction

What is it about? Another method for system description and analysis.


What we already have?

(Why introduced Laplace Transform? to avoid the complexity of solving


high-order
differential equations!)
Is Laplace Transform method good enough or do we need more or other
techniques?
(1) How effective Laplace Transform is in solving high-order differential
equations with non-zero initial conditions?
(2) How effective Laplace Transform is in handing multivariable (multi-input
multi-output) system?
(3) Classical control theory: Laplace Transform based
Modern control theory: state equation based
Many modern control system design methods require state equation
description
of system to apply!

Characteristics of state-variable technique


(state equation description based):
(1) Uniform structure (form) for all linear-systems:
despite the order, the numbers of inputs and outputs,
and forms of the input functions.
Always : x  Ax  Bu state equation
y  Cx  Du output equation
x : state vector, x = (x1, … xn)T
xjs : state variable
u = (u1, …, um)T : input vector
ujs : inputs
y = (y1,…yp)T : output vector
yjs : outputs

Page 7-1
EE 422G Notes: Chapter 7 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”!

What’s the state of a system?

7-2 State-Variable Concepts

(1) Example: University’s rank (simplified and idealized)


What’s 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
EE 422G Notes: Chapter 7 Instructor: Zhang

State of university (dynamic system)

State equations:
UK’s ranking: output  c1 x f  c 2 x s ------- output equation
(xf Faculty quality , xs: student quality)

State equation:
Change of faculty quality:
x f  a11 x f  a12 xs  a13  salary
Change of student quality:
x s  b21 x f  b22 xs  b23  Scholorship  b24  Bashetball

At 2000: x f (2000), xs ( 2000) : initial state


At and after 2000: (state appreciation, private donations)
=> (salary, scholarship)
Administration, basketball: future inputs
=> UK’s ranking
(determined by initial state and future inputs)
(2) State, state-variables, state-space, trajectory:

State of a system at t 0 : includes the minimum information necessary to specify


completely the condition of the system at t0 and allow determination of all
system outputs at t>t0 when inputs up to time t are specified.

State : a set of state variables


x 
State: x f (state vector)
 xs 
State Space:
f x 
Set of all possible x   x  (All possible paired values
 s
( x f (1), x s (1)); ( x f ( 2), x s ( 2));...) )

Trajectory of the state


 x (2000)  x (2001)
x f  x f  ……
 x s ( 2000)   x s (2001) 

a curve in two-dimensional space.

Page 7-3
EE 422G Notes: Chapter 7 Instructor: Zhang

 x1 
In general x    
 x n 

7-3 Form of the state equations

1. Form

Example :

x1  a11 x1  a12 x2  b11u1  b12u2



x 2  a21 x1  a22 x2  b21u1  b22u2
 x  Ax  Bu
 y1  c11x1  c12 x2  d11u1  d12u2

 y2  c21x1  c22 x2  d 21u1  d 22u2
 y  Cx  Du

x  a a12  b b 
x   1 , A   11 , B   11 12 
 x2  a21 a22  b21 b22 

y  c c  d d12 
y   1, C   11 12  , D   11 
 y2  c21 c22  d 21 d 22 

u 
u   1
u 2 

Page 7-4
EE 422G Notes: Chapter 7 Instructor: Zhang

In general :
 x1   u1   y1 
 
x     , u     , y   ,
 x n  u m  yp 
 

x  Ax  Bu state equation
 y  cx  du output equation

A:nn B :nm
C : pn D:cm

( x : n 1 ,

(2) Simulation example


u : m 1 , y : p 1 )

x1  a11x1  a12 x2  b11u1  b12u2



x 2  a21x1  a22 x2  b21u1  b22u2
y  c1x1  c2 x2  d1u1  d2u2

Page 7-5
EE 422G Notes: Chapter 7 Instructor: Zhang

(3) Block Diagram of state equation

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(t 0  (k  1)t ), (k  0,1,...) based on x(t 0  kt ) and u (t0  kt ) where t  0 is a
small time interval.

2. Given the initial condition problem


x  Ax  Bu

x(t0 )  x0

Page 7-6
EE 422G Notes: Chapter 7 Instructor: Zhang

It is known that the solution of this problem is unique. Prove that the unique
solution of this problem is
t
x(t )  e A( t  t 0 )
x0   e A( t   ) Bu ( ) d
t0

f ( , t )
t t
d
(Note: dt a
f ( , t )d  f ( , t )  t  
a
t
d )

3. Use Laplace transform to prove


Y ( s )  [c( sI  A) 1 B  D ]U ( s )

x (t )  Ax(t )  Bu(t ), x(0)  0


when 
 y(t )  Cx(t )  Du(t )

Page 7-7
EE 422G Notes: Chapter 7 Instructor: Zhang

7-4 Time-Domain solution of the state equations


Focus: Find x(t) (t  t0) which satisfies
x  Ax  Bu

x(t0 )  x0 x0 given
1. Mathematical Preparation
(1) Matrix Exponential eAt
Scalar Exponential
a2 2 a3 3
e at  1  at  t  t 
2! 3!

Introducing Notation
1 2 2 1 33
e At  I  At  A t  A t 
2! 3!

where : A : n  n matrix
1 0 
  n
I : n  n Identity matrix 


0 1 

             
             
A2 : AA     
     
    
      
     
 
   
  
  

 
 
 
n n n n n n

Aj :nn j = 0,1,2,…
t: scalar
e At : n  n

Properties of eAt
de At
  Ae At
dt
1 2 2 1 33
e At  I  At  A t  A t 
2! 3!

de At 2 3
 0  A  A 2 t  A3t 2  
dt 2! 3!
1 2 2
 A( I  At  A t  )
2!
At
 Ae

Page 7-8
EE 422G Notes: Chapter 7 Instructor: Zhang

 e A0  I
1 2 2
e A0  I  A  0  A 0   I
2!
* (e At ) 1  e  At (Inverse of n  n matrix eAt is e-At)
1 1
 I  (  A)t  (  A) 2 t 2  (  A) 3 t 3  
2! 3!
1 1
 I  At  A 2t 2  A3t 3  
2! 3!
1 2 1
 I  A( t )  A ( t ) 2  A3 ( t ) 3  
2! 3!
t t
d f ( , t )
(2)
dt  f (  , t ) d  f ( , t )   t  
t
d )
a a

If f ( , t )  e A( t  ) Bu ( )

t t
d f ( , t )
Then dt  f ( , t )d  f ( , t )   t   t
d
t0 t0

But f ( , t )  t  e A( t t ) Bu (t )  IBu (t )  Bu (t ) ,

f ( , t )
 Ae A( t   ) Bu ( )
t

t t
d
dt t0
Therefore e A( t   ) Bu ( ) d  Bu (t )  A e A( t  ) Bu ( ) d
t0

t
A( t   )
Denote Z (t )  e Bu ( ) d
t0

d t A( t   )
dt t

Z (t )  e Bu ( )d
=> 0

 AZ (t )  Bu (t )

i. e. Z (t )  AZ (t )  Bu (t )

2. Numerical solution of state equations


(Eq. (7-9)----Eq. (7-15))

Page 7-9
EE 422G Notes: Chapter 7 Instructor: Zhang

3. Analytic solution of homogeneous equaiton


 x  Ax
 zero-input response
 x(t 0 )  x0
question : what do we mean that x(t) = f(t) is a solution of a differential
equation with a
given initial condition ?
df (t )
(1) x  =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 At
a solution of  ?
 x(t 0 )  x0
d At
x (t )  (e x0 )  Ae At x0  Ax(t )
dt

x  Ax
=> x  Ax satisfies the first of 
x(t 0 )  x0
However,
x(t0 )  e At 0 x0

If t0  0 and A  0 , e At 0  I
=> x(t0 )  x0

 x  Ax
At
Therefore, x(t )  e x0 is not a solution of 
 x(t 0 )  x0

Page 7-10
EE 422G Notes: Chapter 7 Instructor: Zhang

 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
Let’s find “any” solution for  . It will be the unique solution!
x (
 0 0t )  x
Suggested solution
x(t )  e A(t  t 0 ) x0

verification:
de A(t  t 0 ) x0
(1) x   Ae A(t  t 0 ) x0  Ax
dt
(2) x(t0 )  e A(t 0  t 0 ) x0  Ix0  x0

=> x(t )  e A(t  t 0 ) x0 : unique solution

x  Ax  Bu (a)
4. Analytic solution of  .
x(t0 )  0 (b)
(zero-state response)
t
A(t   )
Suggested solution : x(t )  e Bu ( ) d
t0

Verification:
From mathematical preparation:
t
z (t )   e A(t   ) Bu ( )d  our suggested x(t)
t0

=> z (t )  Az (t )  Bu (t )

Page 7-11
EE 422G Notes: Chapter 7 Instructor: Zhang

Hence, suggested solution x(t) satisfies x (t )  Ax(t )  Bu (t ) (a)


t0
A( t   )
Further, x(t0 )   e 0 Bu ( )d  0 (b)
t0

x  Ax  Bu
5. Solution of  (Given problem)
x(t0 )  x0
Solution: zero-input response + zero-state response
t
x (t )  e A( t t0 ) x 0   e A( t  ) Bu ( ) d
t0

6. State Transition Matrix  (t )  e At


No input, x(t) is a transition of x0 at t0 to t>t0:
x(t )  e A(t  t 0 ) x0   (t  t0 ) x0

7. Output
t
y (t )  C (t  t 0 ) x0   C (t   ) Bu ( ) d  Du (t )
t0

7-5 Frequency-Domain solution of the State Equation


x  Ax  Bu , x (0)  x0 (t 0  0)

1. Solution
sX ( s )  x0  AX ( s )  BU ( s )
( sI  A) X ( s )  x 0  BU ( s )
X ( s )  ( sI  A) 1 x0  ( sI  A) 1 BU ( s )
x(t )  L1 [( sI  A) 1 x0 ]  L1 [( sI  A) 1 BU ( s )]

2. What is ( sI  A) 1 ?
L [( sI  A) 1 ]  e At   (t )
1

 ( sI  A) 1 : Laplace transform of the state transition matrix or of eAt.

Denote:  ( s )  ( sI  A) 1

Page 7-12
EE 422G Notes: Chapter 7 Instructor: Zhang

What is ( sI  A) 1 BU ( s ) ?
 ( s )( BU ( s )) ---- product of  (s ) and BU (s ) !
1 1
 L [( sI  A) BU ( s )] : convolution of
L1 [( sI  A) 1 ]   (t ) and L1[ BU ( s )]  Bu (t ) !

Hence
t
L1 [( sI  A) 1 BU ( s )]   (t ) * Bu (t )    (t   ) Bu ( )d
0

3. Output Laplace Transform and Transfer Function Matrix

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 )

Denote H ( s) ( p  m)
 C ( sI  A) 1 B  D
=> Y ( s )  H ( s )U ( s)
H(s): Transfer function matrix
 H11 ( s ) H12 ( s )  H1m ( 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 )  L1 [ H ( s )]
 H (t )  L1 [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 Finding the state Transition Matrix

1. Based on Definition

Page 7-13
EE 422G Notes: Chapter 7 Instructor: Zhang

1 2 2 1 33
 (t )  e At  I  At  A t  A t 
2! 3!
1 k
(Note: A must go to 0 n n as k   ; otherwise, eAt does not exist)
k!

1 k
Why numerical calculation possible? Convergence of A
k!
Example 7-1 Easy example
Example 7-2 Not easy example. I can not do it!
2. Based on  ( s )  ( sI  A) 1
 (t )  L1[( sI  A) 1 ]
Key : (1) Find ( sI  A) 1 ;
(2) For each element of ( sI  A) 1 , obtain partial-fraction expansion

 0 1 
Example 7-3 A
 6  5

s 0  0 1  s 1 
( sI  A)    
0 s    6  5 6 s  5

 a22  a12 
 a11
1
a12   a a11 
  21
a a22  a11a22  a12 a21
 21
 s  5 1
1 
1   6 s
s
( sI  A) 1      
 6 s  5 s ( s  5)  6
 s  5 1  s5 1 
  6 s   2)( s  3) ( s  2)( s  3) 
    ( s
 
( s  2)( s  3)  6 s 
 ( s  2)( s  3) ( s  2)( s  3) 

s5 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
eAt = …

Page 7-14
EE 422G Notes: Chapter 7 Instructor: Zhang

(sI-A)-1 : Systematic way exists! But very complex operation!

3. Diagonalization
A nn
P : nn
1
A  PP  : nn diagonal matrix
t
e : easy to find
A  ( PP )( PP )  ( PP )  Pk P 1
k 1 1 1

A2 2
e At  I  t  t 
2!
1
 PP 1  PP 1t  P2 P 1t 2  
2!
1 2 2
 P[ I  t   t  ]P 1
2!
t 1
 Pe P

4. Cayley – Hamilton Theorem Based Method

 (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 : e 1t   0 (t )  1 (t )1   2 (t )12     n 1 (t )1n 1


……
Replacing by n : e  n t   0 (t )  1 (t )n   2 (t )n 2     n 1 (t )n n 1
(mention (1) 0 (t ), 1 (t ),  2 (t ) … …are the same in each of the n equations.)
(2)  j ' s are given numbers! )

Example 7-4 The same A in examples 7-2, 7-3.


 0 1 
A
 6  5

(1) Find eigenvalues : easy by using Matlab


a = [0 1 ; -6 –5];
eiga = eig(a);
eiga

Page 7-15
EE 422G Notes: Chapter 7 Instructor: Zhang

eiga =
-2
-3
Analytic Method:
 1
| I  A |   (  5)  6  2  5  6  0
6  5
1  2, 2  3,

(2)
1  2  e 2t   0 (t )  1 (t )(2) (1)
2  3  e  3t   0 (t )  1 (t )(3) ( 2)
 2t  3t
(1)  (2)  e e  1 (t )
 3t
  0 (t )  e  31 (t )  e  3t  3e  2t  3e  3t
 3e  2t  2e  3t

Page 7-16
EE 422G Notes: Chapter 7 Instructor: Zhang

(3)
e At   0 (t ) I   1 (t ) A
3e  2 t  2e 3t 0   0 e  2 t  e  3t 
  3t 
 
 0 3e  2e   6e  6e 3t
 2t 2t
 5e  2 t  5e 3t 
 3e  2t  2e 3t e  2t  e 3t 
 2t  3t 
 6e  6e  2e  2t  3e 3t 

The same as obtained in Example 7-2 and 7-3.

Question: What about some repeated eigenvalues?


Method can be modified! EE611

7-7 State Equation of Electrical Networks

Obtain State Equations for Systems


Two examples: From electrical networks
From transfer functions (system realization)

For electrical network: select iL and vC as state variables.

Algorithm
Step 1: Select each iL and vc as state variables
diL
Step 2: For each iL , write a KVL ( iL  will be included)
dt
For each vc , write a KCL ( v C will be included)
Step 3: Other KCL and KVL, and element relation to eliminate “other”
variables (other than states (iL, vc ) and sources (input).
=>state equation.
Step 4 : Output equation

Page 7-17
EE 422G Notes: Chapter 7 Instructor: Zhang

Example 7-7

Step 1: Label vc as x1
iL as x2
Step 2: For vc , write KCL :
iR1  Cx1  x2 (1)
For iL , write KVL
x1  Lx 2  iR2 R2 ( 2)

Step 3 : Other variables (undesired): iR1 , iR2


vs  x1 Must be expressed in
iR1 
R1 terms of state variables
i R 2  i L  x2 and sources!

 vs  x1
  Cx1  x2 (1)'
  R1
x  Lx  R x
1 2 22
 1 1 1
  
 1 CR 1 C 2 CR vs
x x x 
 1 1

 x  1 x  R2 x
 2 L 1 L 2
 1 1
    x  1 
 1
x
 CR C  1 
  1
    CR1  vs
 x2   1 R x  
 2  2   0 
 L L 

Step 4 : Output equation y = v0

Page 7-18
EE 422G Notes: Chapter 7 Instructor: Zhang

x 
y  R2 x 2   0 1  1 
 x2 

7-8 State Equation from Transfer Functions

State Equation => Tell how to realize and simulate (system


realization) the systems

Problem in this section :


Y ( s ) bm s m  bm 1s m 1    b1s  b0
Given  n ( m  n)
U (s) s  an 1s n 1    a1s  a0

x  Ax  Bu
Find y  Cx  Du (u --- scalar, y --- scalar)

Such that C ( sI  A) 1 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)
X 1 (s)   x 1   x1  u
s 1
U (s)
X 2 ( s)   x 2  2 x2  u
s2
 x1   1 0   x1  1
 x    0  2  x   1u
 2   2   
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 )
Assumption: No repeated poles
No zero-pole cancellation
Partial-Fraction Expansion:

Page 7-19
EE 422G Notes: Chapter 7 Instructor: Zhang

Y ( s) B1 B2 Bn
  
U ( s ) s  p1 s  p 2 s  pn
B1U ( s ) B2U ( s ) B U ( s)
Y (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   ---- output equation
2
 
 
 xn 

U (s)
( X j ( s)   x j  p j x j  u (t ) )
s  pj
 x 1   p1 0   x1  1
         u (t )
  

    ---- state equation
 x n   0 pn   xn  1

Drawback (not serious): Complex pole


 Complex coefficients!
There are ways to fix it!

2. Repeated pole : No zero-pole cancellation


Y (s) A B
    
U (s) ( s  pi ) s  pi
2

Denote:
AU ( s ) BU ( s) 
Yi ( s )    AX i1 ( s )  BX i2 ( s )
( s  pi ) 2 s  pi
U ( s)
X i2 ( s ) 
 s  pi
x i2  p i  xi2  u (t )
X i2 ( s )
X i1 ( s ) 
s  pi
x i1  pi  xi1  xi2 ( s )
Sub-block :

Page 7-20
EE 422G Notes: Chapter 7 Instructor: Zhang

 x i1   pi 1   xi1  0
 x      u
 i2   0 pi   xi 2  1
 xi 
yi   A B   1 
 xi 2 

How to incorporate this method into system realization, see examples.

Example 7-9
Y (s) s 2  3s  9
 5
U ( s ) 5s  8s 4  24s 3  34s 2  23s  6
3.5  4.75 5.875 7 1.125
Y (s)     
( s  1) 3
( s  1) 2
s 1 s  2 s  3

 x 1   1 1 0 0 0   x1  0
 x   0  1 1 0 0   x 2  0 
 2     
 x 3    0 0  1 0 0   x3   1u (t )
      
 x 4   0 0 0  2 0   x4  1
 x 5   0 0 0 0  3  x5  1

 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-21

S-ar putea să vă placă și