Chapter 10 - 2.doc
-
Upload
eng-mohammed-kayed -
Category
Documents
-
view
225 -
download
0
Transcript of Chapter 10 - 2.doc
-
8/13/2019 Chapter 10 - 2.doc
1/26
10.4 Linear analysis as an aid to simulation
Proper choice of the step size t is essential for successfully
applying numerical simulation methods. When there is
insufficient physical insight to choose an appropriate value fort , we can use sometimes use a linear analysis of the model to
estimate the required value of t . The analysis techniques for
linear and linearized models can be used when:
1. The model to be simulated is linear, but the order is high
enough or the input functions are complicated enough to
discourage a closedform solution.
!. The model to be simulated is nonlinear. "n this case, the
model can be linearized for nominal values of the system#svariables that represent the simulation conditions.
"n either case, a linear analysis can be used to estimate the
smallest time constant and the smallest oscillation period of the
model. The initial choice for the time step t is then ta$en to be
a small fraction of the smallest of these. The situation is
illustrated in %igure 1&.'. "n 1&.'a the smallest oscillation periodPis less than the smallest system time constant . "n this case,a reasonable initial choice for 1&&(Pt= , assuming that 1&&
points are sufficient to identify the form of the oscillatory
function for one period. "n 1&.'b, the opposite is true, and we
might choose 1&(=t , since a decaying curve with a time
constant can be plotted well with 1& points. The reason for
these choices is that the time step t must be small compared to
the time span over which significant changes occur in the
system variables.
191
-
8/13/2019 Chapter 10 - 2.doc
2/26
%igure 1&.' )sing the linear response to choose the step size t .
*a+ The oscillation period Pdetermines t . *b+ The time
constant determines t .
192
-
8/13/2019 Chapter 10 - 2.doc
3/26
Example 10.4
)se simulation to compute the time it will ta$e to fill a tan$ with
liquid to a height of ft if the input flow rate is tq -= ft-(min.
The initial height is 1+&* =h ft.
olution:
The hight h of liquid in a tan$ with an orifice as in the
following figure can be described by a model of the form:
gAChAqAhd !,
1
11==
uppose the given parameter values are ==11A .
%or the given values, the model is:
+,* qhfhqh ==
*1&.'1+
%rom the linearized analysis of the /0ample, the tan$#s time
constant is != when 1=h and = when =h . We can chooset to be 1&(1 of the smallest 2 that is, !.&+!*1.& ==t . The
results using the 3unge4utta method are shown in %igure 1&.5,
and they were chec$ed for accuracy by using onehalf the
original value of t . The results were essentially the same, so
we can ta$e !.&=t to be an appropriate value. The time to raise
the height to ft can be seen from %igure 1&.5 to be
appro0imately !. min.
193
-
8/13/2019 Chapter 10 - 2.doc
4/26
%igure 1&.5 3amp response of the nonlinear tan$ model.
10.5 Simulation and step inputs
The step function models a sudden change in the system#s input
and as such represents perhaps the most severe test of system
performance. "t is commonly used for that reason, but because it
signifies an instantaneous change in the input, we must be sure
that our system model is valid for such an input.
6ere are four ways of finding the step response of a model withinput derivatives. The first two will wor$ only with linear
models.
1. %ind the response with 7aplace transform. This is the most
direct approach, but care must be used to interpret the results
realistically from a physical viewpoint.
!. )se artificial initial conditions to allow elimination of the
input derivatives from the model. The resulting model can
then be handled by any conventional solution method.
194
-
8/13/2019 Chapter 10 - 2.doc
5/26
-. 3edefine the system#s state variables to convert the model
into one without input derivatives.
'. 8odel the step input with a more realistic function that
does not possess discontinuities.
Laplace transform solution
9onsider the following model:
vvbyy +=+
1& *1&.51+&+&* =y *1&.5!+
"f +*tv is a unitstep input and 1=b , then
1&
.&1.&1
1&
1+*
++=
+
+=
ssss
ssY *1&.5-+
and
tety 1&.&1.&+* += *1&.5'+
This is plotted in %igure 1&.. otice that *1&.5'+ implies that1+&* =+y . This represents an instantaneous ;ump in the value of
y at &=t , which is impossible if y represents a physical
variable.
195
-
8/13/2019 Chapter 10 - 2.doc
6/26
%igure 1&. )nitstep response of equation *1&.51+.
Using artificial initial conditions
The 7aplace transform of *1&.51+ with a step input of
magnitude m and initial condition cy =+&* gives:
cs
mbm
cs
mbscsVbssYs
++=
=++=++=+
+1*+*+1*+*+1&*
*1&.55+
%rom this, we see that the effect of the derivative term
vb for
step input can be represented by a proper choice of initial value+&*y . That is, if we pic$ cbmy +=+&* , then the following model
can be used to replace *1&.51+ as long as the input is a stepfunction.
vyy =+
1& *1&.5+
cbmy +=+&* *1&.5
-
8/13/2019 Chapter 10 - 2.doc
7/26
Redefining the state variables
The model *1&.51+ can be converted into the equivalent form
vbxx +1&1*1& =+
*1&.5=+
bvxy += *1&.5+
+&*+&*+&* = bvyx *1&.51&+
%irst, we solve *1&.5=+ by any method to obtain the
intermediate variable +*tx . Then we use *1&.5+ to obtain the
variable of interest +*ty . %or &+&*,1 == yb and a unitstep input,
*1&.51&+ gives &+&* =x . /quation *1&.5=+ gives:
1&
.&.&1
1&
+*
++
=
+
=
sssssX
or
tetx 1&.&.&+* +=
%rom *1&.5+ for +&t ,
tety 1&.&1.&+* ==
which agrees with *1&.5'+.
197
-
8/13/2019 Chapter 10 - 2.doc
8/26
-
8/13/2019 Chapter 10 - 2.doc
9/26
+*+>*?
ass
matvL
+= *1&.51-+
as
ma
dt
vdL
nn
n
n
+
=
+1+1*>? *1&.51'+
The larger the constant a is in *1&.'11+, the closer +*tv
resembles a pure step function. This is illustrated in %igure 1&.
-
8/13/2019 Chapter 10 - 2.doc
10/26
1&
1
+*
+*
+
+=s
bs
sV
sY*1&.51+
%rom *1&.51-+,
+*+*
ass
masV
+= *1&.51
-
8/13/2019 Chapter 10 - 2.doc
11/26
%igure 1&.= 3esponse of the model *1&.511+ to a pure step
input, and to the practical step function for two values of the
parameter a .
201
-
8/13/2019 Chapter 10 - 2.doc
12/26
10. !ector"matri# methods
The state variable form of a linear model can be e0pressed
compactly using vectormatri0 notation. This compactness can
be e0ploited by simulation and analysis techniques.
!ector"matri# form of the state e$uations
The general form of the secondorder linear model in terms of
the state variables 1x and !x is:
!1!111!1!1111 ububxaxax +++=
*1&.1+
!!!1!1!!!1!1! ububxaxax +++=
*1&.!+
where we have assumed that two inputs +,* !1 uu act on the
system. This is the state variable form of the model. @ssume
also that there are two outputs +,* !1 yy , which are linear
combinations of the state variables and the inputs. Then
!1!111!1!1111 ududxcxcy +++= *1&.-+
!!!1!1!!!1!1! ududxcxcy +++= *1&.'+
We can form a twodimensional column vector # with two state
variables 1x and !x 2 that is,
=
!
1
x
x# *1&.5+
The vector # is the state vector. imilarly, the input vector is:
=
!
1
u
uu *1&.+
and the output vector is:
=
!
1
y
yy *1&.
-
8/13/2019 Chapter 10 - 2.doc
13/26
%rom the rules of matri0vector multiplication, the state
equations and the output equations *1&.1+*1&.'+ can be
written as:
+
=
!
1
!!!1
1!11
!
1
!!!1
1!11
!
1u
u
bb
bb
x
x
aa
aa
x
x
+
=
!
1
!!!1
1!11
!
1
!!!1
1!11
!
1u
u
dd
dd
x
x
cc
cc
y
y
or
%u# +=
*1&.=+'u(#y += *1&.+
where
=
!
1
x
x# *1&.1&+
ija=& *1&.
-
8/13/2019 Chapter 10 - 2.doc
14/26
*1&.'+. This diagram is called the state diagram, because it is
constructed from the state variable form of the model and thus
graphically shows how the state variables are generated.
Example 10.5
Araw the state diagram for the following model:
!!!
1!11
5-
'!'
uxx
uxxx
+=
++=
The output variables are
!!
1!11 -
xy
uxxy
=
++=
@ssuming zero initial conditions, we transform the model and
divide the first two equations by s to obtain:
+*+*
+*-+*+*+*
+>*5+*-?1
+*
+>*'+*!+*'?1
+*
!!
1!11
!!!
1!11
sXsY
sUsXsXsY
sUsXs
sX
sUsXsXs
sX
=
++=
+=
++=
)sing the guidelines for the inputs and outputs of the two
integrators, we obtain the diagram in %igure 1&.=.
204
-
8/13/2019 Chapter 10 - 2.doc
15/26
%igure 1&.= tate diagram for /0ample 1&.5.
The state equations and output equations need not be linear to be
represented in vector form. The general vector form is2
)uf*#+# t,=
*1&.15+u)g*#+y = *1&.1+
,umerical simulation methods in vector form
The compactness of *1&.15+ and *1&.1+ ma$es it easy to
describe a numerical simulation method in a completely general
way. %or e0ample, the /uler method applied to *1&.15+ yields
>+,*+,*?+*+* 1 kkkkk tttttt u### +=+ *1&.1
-
8/13/2019 Chapter 10 - 2.doc
16/26
Euler predictor+,,*1 kkkkk tt u#f#- +=+ *1&.1=+
Trapezoidal corrector+>,,*+,,*?5.& 1111 ++++ ++= kkkkkkkk ttt u-fu#f## *1&.1+
where we have suppressed the kt notation by letting +* kk t## = .
The 3unge4utta algorithm can be e0pressed in vector form in
li$e manner.
Transfer function methods
The transfer function describes the effect of a given input on a
given output. "t does not describe the effects of other inputs orinitial conditions on that output. Therefore, the other inputs and
all initial conditions are set to zero when deriving a transfer
function. That is, the transfer function between the output iy
and the input ju is
kxjksUj
i
ij
kk
sU
sYsT
allfor,&+&*,,&+*+*
+*+*
==
= *1&.!&+
ote that the derivative *or integral+ of a vector or matri0 is the
vector or matri0 of the derivatives *or integrals+ of the elements.
Therefore, since the 7aplace transform is an integration
operator, the transform of a vector is the vector consisting of the
transforms of the elements2 namely,
=
+*
+*+*
!
1
sX
sXsX *1&.!1+
Therefore,
+&*+*+&*+*
+&*+*+*
!!
11#. =
=
ssxssX
xssXxL *1&.!!+
Transforming *1&.=+ and *1&.+ and using this result, we
obtain
206
-
8/13/2019 Chapter 10 - 2.doc
17/26
+*+*+&*+* ssss %U&.#. += *1&.!-++*+*+* sss 'U(./ += *1&.!'+
The first of these can be arranged as
+*+&*+*+* sss %U#.&0 += *1&.!5+
where the identity matri0 0 has been used to allow +*s. to be
factored out of the e0pression. The matri0
&0R =ss+* *1&.!+
is the resolvent matri0. "ts properties will tell us much about thesystem#s behavior.
The transfer function is defined for zero initial conditions. With&+&* =# , *1&.!5+ gives
+*+*+*1
sss %U&0. = *1&.!
-
8/13/2019 Chapter 10 - 2.doc
18/26
Example 10.6
)se *1&.!+ to find +*1! sT for the model
!!!
1!11
5-
'!'
uxx
uxxx
+=
++=
The output variables are
!!
1!11 -
xy
uxxy
=
++=
olution:
%or this model,
=
=
=
=
&&
&-
1&
11
5&
&'
-&
!'
'(
%&
Thus,
+
+=
=
+-*&
!+'*
-&
!'
1&
&1
s
sss &0
The inverse of *!0!+ matri0 is:
=
11!1
1!!!
!11!!!11
1 1
mm
mm
mmmm *1&.-&+
7etting &0 =s , we see that
+
+++
=
+
+
++=
-
1&
+-+*'*
!
'
1
+'*&
!+-*
+-+*'*
1
+* 1
s
sss
s
s
sss &0
and
+
+
+++
=
&&
&-
5&
&'
-
1&
+-+*'*
!
'
1
1&
11+*
s
ssssT
The transfer functions are obtained by carrying out the indicatedmultiplications.
208
-
8/13/2019 Chapter 10 - 2.doc
19/26
They are:
-
5+*
&+*
+-+*'*+*5
-5
+-+*'*1&+*
'
1--
'
'+*
!!
!1
1!
11
+=
=
++ +=++++=
+
+=+
+=
ssT
sT
sss
ssssT
s
s
ssT
The state vector notation also allows a compact description of
the system in graphical form, called the state vector diagram.
This can be either a bloc$ diagram or a signal flow graph. Both
are shown in %igure 1&. for the system described by *1&.=+and *1&.+. The reduced transfer function diagram is shown in
%igure 1&.c. "n the vector diagram, the signals *now multiple or
vector quantities+ are shown with a doublelined arrow.
209
-
8/13/2019 Chapter 10 - 2.doc
20/26
-
8/13/2019 Chapter 10 - 2.doc
21/26
The transition matri#
The 7aplace transformation for the state equation %u# +=
is:
+*+&*+*+* sss %U#.&0 += *1&.-1+
%or the freeresponse calculation we can ta$e +*tu to be zero.
This gives:
+&*+*+* #.&0 = ss *1&.-!+
or+&*+*+*
1#&0. = ss *1&.--+
This says that the inverse of the resolvent matri0 can be
considered as the transfer function matri0 relating the free
response +*t# to the initial condition +&*# . ince +&*# is a
vector of constants, *1&.--+ shows the free response to have
the form
+&*+*+* #2# tt = *1&.-'+
where the matri0 +*t2 is given by:
>+?*+* 11 = &02 sLt *1&.-5+
The matri0 +*t2 is the transition matri0.
211
-
8/13/2019 Chapter 10 - 2.doc
22/26
Example 10.7
9ompute the transition matri0 given the state equations:
!1!
!1
5' xxx
xx
=
=
olution:
The resolvent matri0 is:
+
=
+5*'
1
s
ss &0
and
+
++=
+
++==
s
s
sss
s
ssss
'
1+5*
+'+*1*
1
'
1+5*
'+5*
1+*+* 1&02
*1&.-+
Thus, with a partial fraction e0pansion,
'
1
-
1
1
1
-
'
+'+*1*
+5*+*D11
+
+=
++
+=
ssss
ss
ortt
eet'
11-
1
-
'+*D
=
Performing the same procedure with the other three entries in
the matri0, we obtain:
tt
tt
tt
eet
eet
eet
=
=
=
-
1
-
'+*D
-'
-'+*D
-
1
-
1+*D
'
!!
'!1
'
1!
212
-
8/13/2019 Chapter 10 - 2.doc
23/26
Example 10.8
9ompute the transition matri0 for the system of the previous
e0ample, given the state diagram shown in %igure 1&.1&a.
%igure 1&.1& *a+ tate diagram for /0ample 1&.. *b+ Partially
reduced diagram with &+&*! =x .
This approach considers the elements of +*s2 to be the transfer
functions between the two outputs +*1 s. and +*! s. , and the twoinputs +&*1x and +&*!x . et &+&*! =x temporarily, and reduce the
diagram to find the transfer functions between +*1 sX , +*! sX and+&*1x . %rom %igure 1&.1&b, the result is:
'+5*
'
+&*
+*+*D
'+5*
5
+&*
+*+*D
1
!
!1
1
1
11
++
==
++
+==
ssx
sXs
ss
s
x
sXs
These are the entries in the first column of +*s2 , as given by
*1&.-+. imilarly, with &+&*1 =x , we can reduce the diagram to
obtain +*D1! s and +*D!! s . The rest of the procedure follows as in
/0ample 1&.< in order to obtain +*t2 .
213
-
8/13/2019 Chapter 10 - 2.doc
24/26
(alculating the forced response from +*t2
"f &+* tu , the resulting response can be found from *1&.!5+ as
follows.
+*+*+&*+*+*11
ssss %U&0#&0. += *1&.-*+*? %u%U2 *1&.-+
ince >+?*+* 11 = &0sLt , *1&.-+ must be the forced response.
Therefore, the complete response from *1&.-
-
8/13/2019 Chapter 10 - 2.doc
25/26
3roblems
1&.1 )se the /uler method to solve the equation 1! +=
yy , with&+&* =y for 1& t using *a+ 1.&=t and *b+ &1.&=t . 9ompare
the results with the e0act solution tty tan+* = .
1&.! 3epeat Problem 1&.1 using the modified /uler method.
1&.- 3epeat Problem 1&.1 using a version of the 3unge4utta
algorithm.
1&.' )se a numerical method to find the response of the model
ttyy =+
! for !& t if &+&* =y .
1&.5 Civen the following transfer functions, find a state variable
model for each. @lso, obtain the e0pressions relating the initial
values +&*ix of the state variables to the initial values of y and
its derivatives.
*a+ -'
!
+*
+*
!++
+=
ss
s
sV
sY
*b+-'
1-
+*
+*!
!
++
++=
ss
ss
sV
sY
1&. )se a numerical method to compute the time it will ta$e to
fill a tan$ with liquid to a height of 1& feet, if the input flow rate
is ==q ft-(minute. The initial liquid height is 1+&* =h ft. The
tan$#s model is hqh !=
.
215
-
8/13/2019 Chapter 10 - 2.doc
26/26
1&.< Civen the following model:
!!!
1!11
'
!-5
uxx
uxxx
+=
++=
and the output equations
!!
1!11 !-
xy
uxxy
=
++=
Araw the state diagram.