91lecture3-SSModel

Download Report

Transcript 91lecture3-SSModel

Modeling in the Time Domain State-Space
Mathematical Models
• Classical or frequency-domain technique
• State-Space or Modern or Time-Domain
technique
Classical or Frequency-Domain
Technique
• Advantages
– Converts differential
equation into algebraic
equation via transfer
functions.
– Rapidly provides
stability & transient
response info.
• Disadvantages
– Applicable only to
Linear, Time-Invariant
(LTI) systems or their
close approximations.
LTI limitation became a
problem circa 1960 when
space applications
became important.
State-Space or Modern or TimeDomain Technique
• Advantages
– Provides a unified
method for modeling,
analyzing, and
designing a wide range
of systems using
matrix algebra.
– Nonlinear, TimeVarying, Multivariable
systems
• Disadvantages
– Not as intuitive as
classical method.
– Calculations required
before physical
interpretation is
apparent
State-Space Representation
An LTI system is represented in state-space format by the
vector-matrix differential equation (DE) as:
x (t )  Ax(t )  Bu(t )
y(t )  Cx(t )  Du(t )
Dynamic equation(s)
Measurement equations
with t  t 0 and initial conditions x(t 0 ).
The vectors x, y, and u are the state, output and input vectors.
The matrices A, B, C, and D are the system, input, output, and
feedforward matrices.
Definitions
• System variables: Any variable that
responds to an input or initial conditions.
• State variables: The smallest set of linearly
independent system variables such that the
initial condition set and applied inputs
completely determine the future behavior of
the set. Linear Independence: A set of variables is linearly
independent if none of the variables can be written as a
linear combination of the others.
Definitions (continued)
• State vector: An (n x 1) column vector
whose elements are the state variables.
• State space: The n-dimensional space
whose axes are the state variables.
Graphic representation
of state space
and a state vector
The minimum number of state
variables is equal to:
• the order of the DE’s describing the system.
• the order of the denominator polynomial of
its transfer function model.
• the number of independent energy storage
elements in the system.
Remember the state variables must be linearly independent!
If not, you may not be able to solve for all the other system
variables, or even write the state equations.
Example 1:
Epidemic Disease
Discrete State Space Model
(Linear System)
Discrete State Space
(Nonlinear System)
Case Study: Pharmaceutical Drug
Absorption
Advantages of the state-space
approach are the ability to focus on
component parts of the system and to
represent multiple-input, multipleoutput systems.
Pharmaceutical Drug Absorption
Problem
We wish to describe the distribution of a drug in the body by
dividing the process into compartments: dosage, absorption site,
blood, peripheral compartment, and urine.
Each x i is
the amount of drug
in that particular
compartment.
Pharmaceutical Drug Absorption
Solution
1. Assume dosage is released at a rate proportional to concentration.
d
x   K1 x1
dt 1
2. Assume rate of accumulation at a site is a linear function of the
dosage of the donor compartment and the resident dosage. Then,
d
dt
d
dt
d
dt
d
dt
x 2  K1 x1  K 2 x 2
x 3  K 2 x 2  K 3 x 3  K 4 x 4  K5 x 5
x 4  K5 x 3  K 4 x 4
x5  K 3 x 3
Pharmaceutical Drug Absorption
Solution
3. Define the state vector as the dosage amount in each
compartment and assume we measure the dosage in each
compartment. Then,
 x1   K1
x   K
2
1
d   
 x3    0
dt   
 x4   0
 x5   0
y  Ix
0
 K2
K2
0
0
 ( K 3  K5 )
0
0
K4
0
0
K5
K3
 K4
0
0  x1 
0  x 2 
 
0  x 3 
 
0  x 4 
0  x5 
Converting a Transfer Function
to State Space
• State variables are not unique. A system can
be accurately modeled by several different
sets of state variables.
• Sometimes the state variables are selected
because they are physically meaningful.
• Sometimes because they yield
mathematically tractable state equations.
• Sometimes by convention.
Phase-variable Format
1. Consider the DE
dny
d n 1 y
d y
 a n 1 n 1 
 a 0 y  b0 u
dt n
dt
dt
where y is the measure variable and u is the input.
2. The minimum number of state variables is n since the DE is
of nth order.
3. Choose the output and its derivatives as state variables.
x1  y
x 2  y  x1  x 2
First row of state equations

d n 1 y
x n  n 1  x n 1  x n
dt
dny
x n  n  a 0 x1  a1 x 2 a n 1 x n  b0 u Last row of state equations
dt
Phase-variable Format
(continued)
4. Arrange in vector-matrix format
 x1   0
x   0
2 

d 
   
dt 
 
x
 n 1   0
 x n   a 0
1
0
0
1

0
 a0

0
 a0
 x1 
x 
 2 
y 1 0 0  0  


x
 n 1 
 x n 


0   x1   0 
0   x2   0 

  

       

  
 1   x n 1   0 
  a 0   x n  b0 


Note the transfer function format
b0
Y ( s)

U ( s) s n  a n 1 s n 1 a1 s1  a 0
Example 3.4
equivalent
block diagram showing
phase-variables.
Note: y(t) = c(t)
Transfer Function with
Numerator Polynomial
Transfer Function with
Numerator Polynomial
(continued)
1. From the first block: X 1 ( s)

R ( s)
2. Therefore,

 x1   0
d   
x  0
dt  2   a 0
 x 3  
 a 3
1 / a3
a 2 2 a1
a0
3
s 
s  s
a3
a3
a3
1
0
a1

a3

 
0   x1   0 
   
1   x 2    0 u
a2   
1


x

 3
a 3 
 a 3 
Transfer Function with
Numerator Polynomial
(continued)
3. The measurement (observation) equation is obtained from
the second transfer function.
C ( s)  Y ( s)  b2 s 2  b1 s  b0  X 1 ( s)  b2 s 2 X 1  b1 sX 1  b0 X 1
But, sX 1  X 2 and sX 2  X 3
So, Y ( s)  b2 X 3  b1 X 2  b0 X 1

y  b0
b1
 x1 
 
b2  x 2 
 x 3 

Example 3.5
Converting from State Space to a
Transfer Function
x (t )  Ax(t )  Bu(t )
y(t )  Cx(t )  Du(t )
with t  t 0 and zero initial conditions.
Taking the Laplace transform,
s X ( s)  A X ( s)  BU ( s)  X ( s)   sI  A BU ( s)
1
1
Y ( s)  C X ( s)  DU ( s)  C sI  A BU ( s)  DU ( s)


 C sI  A B  D U ( s)
1
In the case of SISO (Single - Input, Single - Output) systems:
Y ( s)
Cadj sI  A B  det sI  A D
1


 C sI  A B  D 
U ( s)
det sI  A
Example 3.6 p.p.152-153
• Solve by hand
• Solve using MATLAB’s ‘ss’ and ‘tf’
commands
Linearization
• Demonstration of how to linearize a
nonlinear state space model about a nominal
solution.
• Application of linearization to guidance and
control of a lunar mission.