Process Dynamics: Modeling, Analysis, and Simulation
Process Dynamics: Modeling, Analysis, and Simulation
Process Dynamics: Modeling, Analysis, and Simulation
Wayne Bequette
....
Process Dynamics
Modeling,
Analysis,
and
Simulation
AnVISORY E1JJTORS
B. Wayne Bequette
Rensselaer Polytechnic Institute
Bequette, B, Wayne.
Process dynamics: modeling, analysis, and simulation / B, Wayne
Bequette.
p. ern.
Includes bibliographical references and index,
ISBN O,-11-206889~3
1. Chemical procc%es. I. Tille.
TPI55,7.B45 1998
(j6()',2X4'OI185---dc21 97 36053
elP
ISBN: 0-13-206889-3
Preface XVII
1 Introduction 3
1.1 Motivation 3
1.2 Models 4
1.2.1 How Models Are Used 5
1.3 Systems 10
1.3.1 Simulation 10
1.3.2 Linear Systems Analysis 11
1.3.3 A Broader View of Analysis 11
1.4 Background of the Reader 12
1.5 How To Use This Textbook 12
1.5.1 Sections 12
1.5.2 Numerical Solutions 13
1.5.3 Motivating Examples and Modules 13
1.6 Courses Where This Textbook Can Be Used 13
Summary 14
Further Reading 14
Student Exercises 15
vii
viii Contents
2 Process Modeling 16
2.1 Background 17
2.2 Balance Equations 17
2.2.1 Integral Balances 18
2.2.2 Instantaneous Balances 20
2.3 Material Balances 20
2.3.1 Simplifying Assumptions 25
2.4 Constitutive Relationships 27
2.4.1 Gas Law 27
2.4.2 Chemical Reactions 27
2.4.3 Equilibrium Relationships 28
2.4.4 Flow-through Valves 29
2.5 Material and Energy Balances 30
2.5.1 Review of Thermodynamics 31
2.6 Distributes Parameter Systems 34
2.7 Dimensionless Models 35
2.8 Explicit Solutions to Dynamic Models 36
2.9 General Form of Dynamic Models 37
2.9.1 State Variables 37
2.9.2 Input Variables
2.9.3 Parameters 38
2.9.4 Vector Notation 38
Summary 40
Further Reading 40
Student Exercises 41
3 Algebraic Equations 51
3.1 Notations 51
3.2 General Form for a linear System of Equations 51
3.3 Nonlinear Functions of a Single Variable 54
3.3.1 Convergence Tolerance 55
3.3.2 Direct Substitution 55
3.3.3 Interval Halving (Bisection) 58
3.3.4 False Position (Reguli Falsi) 60
3.3.5 Newton's Method (or Newton-Raphson) 60
3.4 MATLAB Routines for Solving Functions of a Single Variable 63
3.4.1 fzero 63
3.4.2 roots 64
3.5 Multivariable Systems 64
3.5.1 Newton's Method for Multivariable Problems 66
3.5.2 Quasi-Newton Methods 69
Contents ix
4 Numerical Integration 80
4.1 Background 80
4.2 Euler Integration 81
4.2.1 Explicit Euler 81
4.2.2 Implicit Euler 82
4.2.3 Numerical Stability of Explicit and Implicit Methods 83
4.3 Runge-Kutta Integration 88
4.3.1 Second Order Runge-Kutta 89
4.3.2 Fourth-Order Runge-Kutta 93
4.4 MATlAB Integration Routines 94
4.4.1 ode23 and ode45 95
Summary 97
Further Reading 97
Student Exercises 98
Summary 279
Student Exercises 280
Index 617
PREFACE
xvii
xviii Preface
An important feature of this text is the usc of MATLAB software. A set of In-files
used in many of the examples and in the learning nlodules is available via the world wide
wcb at the following locations:
http:/wwwhpi.cdu/-hel}ueb/Process_Dynamics
hHp:/www.mathworks.com/education/thirdparty.htm I
B, Wayne RequeUe
SECTION I
PROCESS MODELING
INTRODUCTION
1
This chapter provides a motivation for process modeling and the study of dynamic chemi-
cal processes. It also provides an overview of the structure of the textbook. After studying
this chapter, the student should he able to answer the following questions:
1.1 MOTIVATION
Robert Reich in nze Work {~lNations has classified three broad categories of employment
in the United States. In order of increasing educational requirement these categories are:
3
Introdu ction Chap. 1
4
. Process enginee rs
Engineers (and particularly process enginee rs) are s)'mholic analysts
that charact erize
usc fundamental scientif ic principles as a hasis for mathem atical models
physical variables, such
the behavio r of a chemic al process. Symbol s are used to represe nt
d and numerical al-
as pressure, tempera ture or concentration. Input informa tion is specifie
. Process: enginee rs
gorithm s arc llsed to solve the rnodels (simula ting a physical system)
endatio ns regarding
analyze the results of these simulat ions to make decisions or recomm
the design or operation of a process.
es in one way
Most chemic al enginee rs work with chemic al manufactUling pmcc:':is
l troubles hooting in
or another. Often they arc process ergince rs responsible for technica
~Ire respons ible 1'01' de-
the day-tn-deiY operatio ns nf a particld ar chemic al process. Some
as tempera ture or pre.s-
signing feedback control systems so that process variables (such
ihle for redesigning a
.sure) can he maintai ned at desired values. Others may be respons
ibilities require an un-
chemica l process to provide more profitahility. All of these respons
processes.
derstan ding of the time-de penden t(dynam ic) behavio r of chemic al
1.2 MODELS
an underst anding of
'fhe primary objectiv e of this textboo k is to assist you in develop ing
g the dynami c be-
the dynami c behavio r of c1\<?mical processes. A require ment for assessin
under conside ra-
havior is a time~dcpendent mathematical model of the chemic al process
ries for a def'ini-
tion. Before proceed ing, it is worth consult ing with two differen t dictiona
tion of !nodel.
Notice that both definitions stress that a model is a representation of a system or ohject. In
this textbook, when we usc the term model, we will be referring to a mathematical model.
We prefer to usc the following definition f~)r model (more specifically, a process model).
The emphasis in this text is on the development and lise offundamental or first-principles
models. By fundamental, we mean models that are based on known physical-chemical rc~
lationships. This includes the conservation of mass and conservation of energy, I as well
as reaction kinetics, transport phenomena, and thermodynamic (phllse equilibrium, etc.)
relatiomdlips.
Another common model is the empirical model. An empirical model might be used
if the process is too complex for a fundamental model (either in the fonnulation of the
model, or the numerical solution of the model), or if the empirical model has satisfactory
predictive capability. An example of an empirical model is a simple least squares fit of an
equation lo experimental data.
Generally, we would prefer to use models based on fundamental knowledge of
chemical-physical relationships. Fundamental models will generally he accurate over .a
mueh larger range of conditions than empirical models. Empirical models may be useful
for "interpolation" but are generally not useful lilr "extrapolation"; that is, an empirical
model will only be useful over the range of conditions used for the "fit" of the data.
It should be nOled that it is rare for a single process model to exist. A model is only
an approximate representation of an actual process. The complexity of a process model
will depend on the final usc of the model. If only an approximate answer is needed, then a
simplified model can often be lIsed.
As we have noted, given a set of input data, a model is used to predict the output "re-
sponse." A model can be used to solve the following types of problems:
Marketing: If the price of a product is increased, how much will the demand de-
crease?
• Allocation: If we have several sources for raw materials, and several manufacturing
101' course, the real conservalioll law is that of mass-energy, but we will neglect the inter-
change of mass and energy due to nuclear reactions.
6 Introduction Chap. 1
plants, how do we distrihute the raw materials among the plants, and decide what
products each plant produces?
Synthesis: What process (sequence of reactors, separation devices, etc.) can he used
to manufacture a product?
• Design: What type and size of equipment is necessary to produce a product?
Operation: What operating conditions willmaxirnizc the yield of a product?
Control: How can a process input be manipulated to maintain a measured process
output at a desired value?
Safety: If an equipment failure occurs, what will he the impact on the operating per-
sonnel and other process equipment?
Environmental: IIow long will it take to "biodegrade" soil contaminated with haz-
ardolls waste?
Many or the rnodels cited above arc based on a steady-state analysis. This book will
cxtend the steady-state material and energy balance concepts, generally prescnted in an
introductory textbook on chemical engineering principles, to dynamic systems (systems
where the variables change with time). As an example of the increasing importance of
knowledge of dynamic behavior, consider process design. In the past, chemical process
design was based solely on steady-statc analysis. A problem with performing only a
steady-state design is that it is possible to design a process with desirable steady-state
characteristics (minimal energy consumption, etc.) but which is dynamically inoperable.
Hence, it is important to consider the dynamic operability characteristics of a process dur-
ing the design phase. Also, batch processes that arc commonly used in the pharmaceutical
or specialty chemicals industries arc inherently dynamic and cannot bc simulated with
steady-state models.
In the previous discussion we have characterized models as stcady-state or dy-
namic. Another characterization is in ter111s 01" lumped porarneter system.)· or distributed
parameter systems. A lumped parameter systcm assumes that a variable or interest (tem-
perature, for example) changes only with one independent variable (time, For cxamjJlc,
but not space). A typical example of a lumped parameter system is a perfectly mixed
(stirred) tank, where the temperature is uniform throughollt the tank. A distrihuted para-
meter system has more than one independent variable; for example, temperature may vary
with both spatial position and time.
Hot Cold
iii
Outlet
Consider now the ~leady-stale behavior of this process. If the only stream was the hot fluid,
thell the outlet temperature wOl/ld be eqllal to the hot fluid temperature if the tank were per-
fectly insulated. Similarly, if the only stream was the cold stream, then the outlet temperature
would be equal to the cold lluid temperature. A combination of the two streams yields an out-
let tClJlpcrutufc that is intermediate between the cold and hot temperatures, as shown in Fig-
ure ] .2.
60
o
f? 50
'0
@
.2 40
~
'"
Q.
~ 30
l-
ID
8 20
_~~------.l.- ------l~~~~~~~~
10
o 0.2 0.4 0.6 0.8
Hot Flow, fraction
We sec that there is a linear steady-state relationship between the hot flow (fraction) and the out-
let temperature.
Now we consider the dynamic response to a change in the fraction of hot flow. Figure 1.3
compares outlet temperature responses for various step changes in hot flow fraction at t :::: 2.5
8 Introduction Chap. 1
minutes. We sec that the changes afC symmetric, with the same speed of response. We will find
later that these responses afC indicative of a lincar system.
45 +20%
40
o
'" 35 f-~"-~~~~----Q~-o~---~-~~
~ . .- ----
ci:
E
230
-20%
25
,.--'-----
20 , ..
o 5 10 15 20 25 30
time, min
FIGlJRE 1.3 Response of temperature to various changes in the hoI llow fraction.
~I-------F=:
Water in
Steam in
ature gradient rOf heat transfer decreases as the water temperature increases. The outlet water
temperature as a function of inlet water temperature is shown in Figure 1.6.
100
80
0
'"
""ci. 60
E
JE
40
20
a 0.2 0.4 0.6 0.8
Z, distance
100
98
96
0
'" 94
"'"
J-'
E~
92
0
90
88
86
a 20 40 60 80 100
inlet temperature, deg C
Algebraic equations
Ordinary differential equations
Partial differential equations
The emphasis in this textbook is on developing models that consist of ordinary dif-
ferential equations. These equations generally result from macroscopic balances around
processes, with an assumption of a perfectly mixed system. To find the steady-state solu-
tion of a set of ordinary differential equations, we must solve a set of algebraic equations.
Partial ditTerential equation models result from microscopic b<tlanccs and arc not covered
in this textbook. One of the main techniques for solving partial differential equations is
!:nlsed on converting a partial differential equation to a set of ordinary differential equa-
tions. Techniques deYeloped in this textbook can then be lIsed to solve these problems,
1.3 SYSTEMS
We have been using the term system yery loosely. Consider the following definition.
Dctinition: Svstem
A combination of several pieces of equipment integrated to perform a specific function; thus a fire
(arlillery) control system may include a tracking radar, computer, and gun (McGraw-Hill Dictio-
limy (?f5;ciellt!fic and Technical Tenns).
The example in the definition presellted is of interest to electrical, aeronautical, and rnili-
tary engineers. I'or our purposes, a system witl be composed of chemical unit operations,
such as chemical reactors, heat exchangers, and separation devices, which arc used to pro-
ducc a chemical product. Indeed, we will oftcn consider a single unit operation to be a
system composed of inputs, states (to be defined later) and outputs. A series of modules in
Section V of this textbook cover the behavior of a number of specific unit operations.
1.3.1 Simulation
One of the goals of this textbook is to develop numerical analysis techniques that allow liS
to "simulate" the behavior of a chemical process, Typically, steady-state simulation of a
lumped parameter system involves the solution of algebraic equations, while dynamic
simulation involves the solution of ordinary differential equations. We must be careful
when using computer simulation. First of all, we must he able to say, Do the results of this
Sec. 1.3 Systems 11
simulation make sense? Common sense and "back of the envelope" calculations will tell
us if the numerical results arc in the ballpark.
The mathematical tools that arc lIsed to study linear dynamic systems problems me
known as linear systems analysis techniques. Traditionally, systems analysis techniques
have been based on linear systems theory_ Two basic approaches arc typically used:
(i) Laplace transforms afC lIsed to analyze the behavior of a single, linear, nth order o("cii-
nary differential equation, and (ii) state space techniques (based on the linear algebra
techniques of eigenValue and eigenvector analysis) arc used to analyze the behavior of
multiple first-order linear ordinary differential equations. If a system of ordinary difreren~
tial equations is nonlinear, they can be linearized at a desired steady-state operating point.
In this textbook we usc analysis in a broader context than linear systems analysis that may
be applied to a model with a specific vallie for the pararnetcrs. Analysis means seeking a
deeper understanding of a process than simply performing a simulation or solving a set of
equations for a particular set of parameters and input values. Often we want to understand
how the response of system variablc (tempera.ture, for example) changes whcn a parame-
tcr (c.g., heat transfer coefficient) or input (fJowrate or inlet temperature) changes. Rather
than trying to obtain the understanding of the possible types of behavior hy merely run-
ning many simulations (varying parameters, etc.), we must decide which parameters (or
inputs or initial conditions) are likely to vary, and use analysis techniques to determine if
a qualitative change ofhehavior (number of solutions or stability of a solution) can occur.
This qualitative change is illustrated in l';'igure 1.7 below, which shows possihle
steady-state behavior for ajackcled chemical reactor. In l<'igure 1.7a there is a monotonic
a. Monotonic b. MUltiplicity
relationship between jacket temperature and reactor temperature, that is, as the s(cady~
state j;:lckct temperature increases, the steady-state reactor temperature increases. Figure
1.7b illustrates behavior known as output multiplicity, that is, there is a region of stcady-
state jacket temperatures where a single j'H.:kct temIJcraturc can yield three possible reac-
tor temperatures. In Chapter 15 (and module 9) we show how to vary a reactor design pa~
wllleter to change from one type of behavior to another.
Engineering problem solving can be a comhination of art and science. 'rile com-
plexity and accuracy of a solution will depend on the information available or what is dc~
sired in the final solution. If you arc simply performing a rough (back of the envelope)
cost estirnatc for a process design, perhaps a simple stcady~state material and energy bal~
ance will suffice. On the other hand, if an optimum design integrating several unit opera-
tions is required, then a more complex solution will be involved.
It is assumed that the reader of this textbook htls a sophomore- or jUllior~levcl chemical
engineering background. In addition to the standard introductory chemistry, physics, and
mathematics (including dilTerential equations) eourse,S, the 'student has taken an introduc-
tion to chemical engineering (material and energy haJ;:mces, reaction stoichiometry)
cour,Se.
This textbook can also be used by an engineer in industry who nceds to develop dy~
namic models to perform studies to improve a process or design controllers. Although a
few years may have lapsed since the engineer took a differential equations course, the re-
view provided in this text should be sufficient for the development and solution of models
based on differential equations. Also, this textbook can serve as review material for first-
year graduate student who is interested in process modeling, systems analysis, or numeri-
cal methods.
The ultimate objective of this textbook is to be able to model, simulate, and (more impor-
tantly) understand the dynamic behavior of chemical processes.
1.5.1 Sections
In Section I (Chapters ] and 2) we show how to develop dynamic models for simple
chemical processes. Numerical techniques for solving algebl'<ric and differential equations
are covered in Section II (Chapters 3 and 4). Much of the textbook is based on linear sys-
tem analysis techniques, which arc presented in Section III (Chaptcrs 5 through l2). Non-
linear analysis techniques are prescnted in Section IV (Chapters 13-17). Section V (Mod~
Sec. 1.6 Courses Where This Textbook Can Be Used 13
uks 1 through lO) consists or a number of learning modules 10 reinforce the concepts dis-
cussed in Sections I through IV.
It is much casier to learn a new topic by "doing" rather than simply reading about it. To
understand the dynamic behavior of chemical processes, one needs to he able 10 solve dif-
ferential equations and plot response curves. We have used the MATLAB numerical
analysis package to solve equations in this text. AMATL.AB learning module is in the set
of modules in Section V (Module I) for readers who arc not l~ulliliar with or need to be
reintroduced to MATLAB. MATLAB routines arc detailed within the chapter that they
arc used. Many of the examples haveMA"rLAB m-files associated with them. It is recom~
mended that the reader modify these Ill-files to understand the effect of parameter changes
on the numerical solution.
This textbook contains III any process examples. Often, new techniques arc introduced in
the examples. You are c.ncouraged to work through each example to understand how a
palticular technique can be applied.
There is a limit to the complexity of an example that can he used when introducing
a new technique; the examples presented in the chapters tend to be short and illustrate one
or two numcricaltcchniqucs. 'fhere is a set of modules of t11odeb, in Section Y, that treats
process examples in much more dclail. The objective of these modules is to provide a
more complete treatment of modeling and simulation of a specific process. In each
process modehng module, a numher of the techniques introduced in various chapters of
the text arc applied to the problem at hancL
This textbook is based on a required course that 1 have taught to chemical and environ-
mcntal engineering juniors at Renssclaer since 1991. This dynamic systems course (origi-
nally titled lumped parameler syslems) is a prerequisite to a required course on chemical
process control, normally taken in the second semester of the junior year. This textbook
can be used for the first term of a two~tcrm sequence in dynamics and control. I have not
treated process control in this text because 1 feci that there is a need for more in-depth
coverage of process dynamics than is covered in most process control textbooks.
This textbook can also be lIsed in courses such as process modeling or numerical
methods for chemic111 engineers. Although directed towards undergraduates, this text can
also be used in a first-year graduate course on process modeling or process dynamics; in
this case, much of the focus would be on Section IV (nonlinear analysis) and in-depth
studies of the modules.
14 Introduction
SUMMARY
At this point, the reader should be able to define or characterize the following
• Process model
Lumped or distributed parameter system
Analysis
Simulation
FURTHER READING
The textbooks listed below are nice introductions to material and energy balances. The Rus-
sell and Denn book also provides an excellent introduction to models or dynamic systems.
A comprehensivc tutorial and reference for MA'fLAB is provided by Hanselman and Lit-
tlefield. Thc books by l~ttcr provide many excellent examples Llsing MATLAB to solve
engineering problems.
lIanselman, D., & B. Littlefield. (1996). Maslerill,\!. MATLAB. Upper Saddle River,
NJ: Prentice-Hall.
[~lter,
n.M. (199]). Engineering ProlJlem Soh'ing Ivilh MATLAB. Upper Saddle
River, NJ: Prenticc-Ilall.
E~tter,
D.M. (t096). Introduction to MA TLAU ,Ii)r engineers (/nd c)'CiCllfists. Uppcr
Saddle Rivcl', NJ: Prentice-rlalt.
The following book by Dcnn is a graduate-level text that discusses the more philosophical
issues involved in process modeling.
Luyben, \V.L. (1990). Process Modeling, 5'imulatioll alld Control for Chemical EI1-
Rineers, 2nd cd. New York: McGraw-HilL
Student Exercises 15
Seborg, D.E., TJ'·. Edgar, & D.A. Mellichamp. (1989). Process Dynamics and COIl-
trol. New York: Vhley.
Stephanopmdos, G. (l9X4). Chemical Process Control: An Introduction to Theory
and Pract{(·e. r':nglewood Clift's, NJ: Prentice-Hall.
Bisio, A., & R.I.. Kabel. (1985). S'c'oleujJ (~l ('hemicol Processes. Nc\v York: V.,Iilcy.
The following book by Reich provides an excellent perspective on the glohal ecollomy
and role played by U.S. workers
Reich, R.B. (1991). The Work qFNatiolls. New YOJ'k: Vintage Books,
STUDENT EXERCISES
2.1 Background
2.2 Balance Equations
2.3 Material Balances
2.4 Constitutive Relationships
2.5 Material and Energy Balances
2.6 DistribulcdParamclcr Systems
2.7 DimcllsionlcssModels
2.8 Explicit Solutions loDynamic Models
2.9 General ItOI'm or Dynamic Models
16
Sec. 2.2 Balance Equations 17
2.1 BACKGROUND
Many reasons for developing process modeLs were given in Chapter 1. Improving or un-
derstanding chemical process operation is a m(~jor overall objective for developing a dy-
namic process model. These models arc often used for (i) operator training, (ii) process
design, (iii) safely system analysis or design, or (iv) control system design.
Safety. Dynamic process models can aLso be used to design safety systems. For
example, they can be llsed to determine how long it will takc after a valve Ltils for a sys-
tem to reach a certain pressure.
I a systcm (l systcm
F~qlU1tion
(2,1 )is deccptively simple becausc there may be many ins and outs, particulmly
for component balances. The in and out terms would then include thc gcneration and con-
18 Process Modeling Chap. 2
version of species by chemical reaction, respectively. In this text, we arc interested in dy-
namic balances that have the form:
The rate of mass accumulation in a system has the form dM/dl where M is the total
mass in the system. Similarly, the rate of energy accumulation has the form dEJdt where
E is the total energy in a system. H Hi is llsed to represent the moles of component i in a
system, then dN/dt represents the molar rate of accumulation of component i in the
systclll.
\Vhcn solving a problem, it is important to specify what is meant by system. In
some cases the systcl1lmay be microscopic in nature (a e1i/Terential clement, for example),
while in othcr cases it may be macroscopic in naturc (the liquid content of a mixing tank,
for example). Also, when developing a dynamic model, we can take one of two general
viewpoints. One viewpoint is based on an ifltegral balance, while the other is based on an
instml{(lIIcoll.\· balance. Integral balances arc particularly useCul when developing models
for distributed parameter systems, which result in partial differential equations; the focus
in this text is on ordinary differential equation-based models. Another viewpoint is the in-
stantaneous balance where the time rate of change is written directly.
The rnean-value theorems of integral and differential calculus are thcn used to reduce the
+ tJ.1
mOUf (f)
n~ass contained
III the system
I rn~ass
- In
contained
the system
I
=
mass culcI ing
the system
Ir
-
mass ICdving
the system
I
all+Llt all
r from t to ( j- D., hom I to t -I nl
where M represents the total mass in the system, while filill andli1()111 represent the mass
rates elltering and leaving the system, respectively. We can write the righthand side of
(2.4), using the mean value theorem of integral calculus, as:
f,
1+ !:J./
(';/ill - filma> dl
dividing by dt,
MI"",__
D..f
MI, = ( . . II 111'-1/ - lJlo"t l!nM
and using the mean value theorem of dUferentia! calculus (0 < ~ < I) for the Icfthand side,
which yields
dM
~i;- I I ~ lIj.f
. .
= (1l1 iJi - In""J II<d.l
I
Taking the limit as At goes to zero, we find
dM . .
dl = mill - 111,,,,( (2.5)
and representing the total mass as M = VP"h ifl as FillPill andlilo!ll as FOII/p, where p is the
mass density (mass/volume) and F is a volumetric nowrate (volume/time) we obtain the
equation:
(2.6)
Note that we have assumed that the system is perfectly mixed, so that the density of mate-
rial leaving the system is equal to the density or material in the system.
Here we write the dynamic balance equations directly, based on an instantaneous ratc~of~
change:
I
I
the laic 01 I · rate of ] 1.. rate of .1
l accumulatIOn of
mass III the system
=.::
I
mass entering
the system
- mass leaving
the system
(2. 7)
'l'he simplcst modeling problems consist of material halances. [n this section we usc sev-
eral process exarnples to illustrate the modeling techniques used,
Sec. 2.3 Material Balances 21
_ _ _ _ _- L •• F
The system is the liquid in the lank, the liquid surface is the top boundary of the system. 'rile fol-
lowing notation is used in the modeling equations:
Integral i\'lethod
Consider a fillite time intcrval, !J.l. Performing a material balance over that time interval,
Jr:p dt
,
J
,
Fpdl (2.10)
ESCOL/\ Dc Ei
CIULlO i
22 Procoss Modeling Chap.2
J(r,:p
1;"\/
We can lise the mean value theorem of integral calculus to write the righthand side of (2.11)
(where 0 So: 0' :::; 1) as:
I !j{
,
J(1';1' --- I'p) dl (2.12)
dVp
(2.15)
dt
InstantaneOllS Method
Here we write the balance equations based on an inslautancOU:i rate of-change:
The total mass of water tn fhe tank is Vp, the rate of change is dVp/dt, <:Inc! the density of the out-
let stream is equal to the tank contents:
dyp (2.16)
dt
which is exactly what we derived using the intcf{ral method. Given the same set of assumptions
the two methods should yield the sam<.~ rnodel. You should usc the approach (integral or instanta-
neous) that makes the most sense to YOL!o In this. text we generally usc the illstantaneous ap-
proach since it requires the fewest number of steps.
Notice the implicit assumption that the density of water in the tank docs not depend upon
position (the perfect mixing assumption). This ai>sumption allows an ordinary differential cqlJa~
tion (ODE) formulation. \Ve refer to any system that can be modeled by ODEs as lumped para-
meIer systems. Also notice that the outlet stream density must be equal to the density of water in
the tank. This knowledge also allows us to say that the density terms in (2.16) arc equal. This
equation is then reduced 101
lit might he tempting to the reader to begin to direuly write "volume balance" exprt'ssions that look
similar to (2.17). We wish to make it clear that therc is llO such thing as a volume balance and (2017) is only
correct hecause of the constant density assumption. It is a good idea to always write a mass balance expn:s-
sion, such ::1S (2.16), before making as~;umpti()ns about the fluid density, which Jllay lead to (2.17).
Sec. 2.3 Mntcrial Balances 23
dV
1-; -- F (2.17)
dt
Equation (2.17) is it lineDr ordinary dilTcwntial equation (ODE), which is trivial to solve if we
know the inlet and outlet flowmtes as a fllnction of time, and if we know all initial condition for
the volume in the wnk. In equation (2.17) we refer to Vas a slale variable, and F; nnc! F as input
variah!cs (even though Fis an outlet stream flowratc). If dellsity remained in the equatioll, \VC
would refer to it as a /NlrWJlctcF.
tn order to solve this problem \ve nlUst specify the inputs F/t) andF(t) and the initial con·
dition \1(0).
Exanlple 2.1 provides all introduction to the notion of states, inputs, and parameters. This
cxarnple illustrates how an overall material balance is llsed to find how the volume of a
liquid phase system changes with time. It may he desirable to have tank height, II, rather
than tank volume as the slate variable. If we aSSUlllC a constant tank cross-sectional area,
ll, we call express the tank volumc as V = Aft and the modeling eqU<:ltion as
dli F
(2.18)
dl A it
If we also know that the flowrate out of the tank is proportional to the square ront of the
height of liquid in the tank, wc can usc the relationship (sec student exercisc 21)
F = [3VIi (2.19)
F.
I
C
I
F
C
(2.21)
ASSlIIllption: The liquid phase density, p, is not a function of concentration, The tank (and out-
let) density is then cqllallo the inlet density, so:
Pi P (2.22)
The component material balance equations are (assuming no component P is in the feed to the
reactor):
(Ive A
(2.24)
dt
dVC II
(2.25)
dl
dVC,.
(2.26)
dl
Sec. 2.3 Material Balances 25
Where 1~4' rr;, and I'p represent the rate of generatioll of species;\, II, and P per unit volume, and
(~li and C'/li represent the inlet coneentallons of species A and N. Assume that the rate of reaction
of A per unit volume is second-order and 11 function of the concentration of both A and B. The
reaction rate can be written
(2.27)
where k is the reaction rate constant and the minus sign indicates that A is consumed ill the reac-
tion. Each mole of A reacts with two moles of If (frotH the stoichiometric equation) and produces
olle mote of I), so the rates of generation of Band P (per unit volume) arc:
(2.2X)
(2.29)
dVC A f' C dV
'/I dt (2.30)
df
(2.31)
dell
(2.32)
df
(2.33)
This model consists of four differential equations (2.23, 2.31, 2.32, 2.33) and, therefore, four
state variables (V, c~\, C n. and C,,). To solve these equations, we must specify the initial condi-
tions (V(O), CA(O), C/:I(t», and C,,(O)), the inputs (Fi . C Ai, and e/li) as a function of time, and the
parameter (k).
The reactor model presented in Exalnple 2.2 has four differential equations. Often other
simplifying assumptions arc made to reduce the number of differential equations, to make
theln easier to analyze and faster to solve. For example, assmning a constant volume
(dVldt:::: 0) reduces the number of equations by one. Also, it is common to feed an excess
of one reactant to obtain nearly completc conversion of another reactant. If species B is
maintained in a large excess, then CHis nearly constant. The reactioll rate cqual'101l can
then be expressed:
I'.1 (2.34)
26 Process Modeling Chap. 2
where
kl = kel/ (2.35)
The resulting differential equation~ are (since we assumed dVldt and dClldt::: 0)
de" (2.36)
cit
(2.37)
Notice that if we only desire to know the concentration of species A we only need to solve
one differential equation, since the concentration or
A is not dependent on the concentra-
tion of P.
q.
I { p
)-- q
Let V = voJurne of the drum and V::: molar volume of the gas (volome/mole). 'rhe total amount
of gas (moles) in the tank is then VI\/.
Assumption: The pressure-volume relationship is characterized hy the ideal gas law, so
PV= NT (2.3H)
where P IS pressure, T is temperature (absolute scale), and R is the ideal gas constant. Equation
(2.38) can be written
1 P
(2.39)
if RT
and, therefore, the total amount of gas in the tank is
v PV
NT = total amount (moles) of gas in the tank (240)
V
the rate of accumlation of gas is then d(PV/NT)/dt. Assume that T is constant; since Vand Rare
also constant; then the molar rate of accumlatioll of gas in the tank is:
Sec. 2.4 Constitutive Relationships 27
V tiP
RT dt ~ 'Ii - 'I (2.41)
where q,: is the molar rate of gas entering the drum and q is the molar rate of gas leaving the
drum. Equation (2.41) can be written
dP RT
V (qi-q) (2.42)
dt
To solve this equation for the state variable P, we must know the illfJll1s lfi and q, the parameters
R, 1; and V, and the initial condition P(O). Once again, although (j is the molar rate Ollt of the
drulll, we consider it an input in terms of solving the model.
Examples 2.2 and 2.3 required Illore than simple material balances to define the modeling equa-
tion::;. These required relationships are known as constiflltive equations; several examples of con-
stitutive equations are shown in this section.
Process systems containing a gas will normally need a gas-law expression in the model.
The ideal gas law is commonly used to relate molar volume, pressure, and temperature:
PV= RT (2.43)
The van del' Waars FVT relationship contains two parameters (a and b) that are systcm~
specific:
For other gas laws, sec a thermodynamics text such as Smith, Van Ness, and Abholl (1996).
The rate of reaction pCI' unit volumc (mollvolume*timc) is usually a function of the con~
centration of the reacting species.I;or example, consider the reaction A + 2B --> C + 3D. If
the rate of the reaction of A is first-order in both A and B, we use the following expression:
(2.'15)
where
rA is the rate of reaction of A (mol A/volume*time)
k is the reaction rate constant (constant for a given temperature)
CA is the concentration of A (mol A/volume)
CjJ is the concentration of B (mol B/volume)
28 Process Modeling Chap.2
Reaction rates arc normally expressed in terms of generation of a species. The minus sign
indicates that A is consumed in the reaction <:lbovc. Il is good practice to associate the units
with all parameters in a model. For consistency in the units for 1"1\> we find that k has units
of (vol/mol B* time). Notice that 2 mols of B react for each mol of A. Then we can write
1'8 ,-- 2rA = - 2k C~,Cll
rc ~ r/! = k C't\C: n
rf) -- JrA c. 3 k C"C"
Usually, the reaction rate coefficient is a function of temperature. The most commonly
used representation is the Arrhenius rate law
where
The frequency factor and activation energy can be estimated data of the reaction constant as
a function of reaction temperature. Taking the natural log of the Arrhenius rate 1mv, we find:
in k = InA - F'
/I
(I)T (2.47)
and we sec that A and E can be found from the slope and intercept of a plot of (In k) ver-
sus (117).
The relationship between the liquid and vapor phase compositions of component i, when
the phases arc in equilibrium, can be represented by:
. v, (2.48)
where
Xi ::;: liquid phase mole fraction of component i
Yi :;;: vapor phase mole fraction of component i
Ki :;:;: vapor/liquid equilibrium constant for component i
In a binary system, the relationship between the vapor and liquid phases for the
light component often used is:
(xx
l' = (2.49)
. I + (<Y-I)x
x :::: liquid phase mole fraction of light component
y ::;: vapor phase mole fraction of light component
(X :::: relative volatility Co. >. I)
The rate or heal transfer through a vessel wall separating two fluids (a jacketed reador,
for example) can be described by
(2.50)
where
Q :::: rate of heat trallsfcrcd from the hot tluid to the cold fluid
U ;:;;;; overall heat transfer coefficient
;\ ::::: area for heat transfer
fiT = difference between hot and cold fluid temperatures
The heat transfer coefficient is onon estimated from experimental data. At the design
stage it can be estimated from correlations; it is a function of fluid properties and veloci-
ties.
Three common valve characteristics arc (i) linear, (ii) equal-percentage, and (iii) quick-
opening.
30 Process Modeling Chap. 2
0.8
~ quick-opening
0 0.6
~
15
c
0 0.4
t linear
.:g
02 equal·percentage
Section 2.3 covered models that consist of material balances only. These arc useful if
thermal effects arc not important, \vhere systcm properties, reaction rates, and so 011 do
not depend on temperature, or if the system is truly isothennal (constant temperature).
Many chemical processes have important thermal effecls, so it is necessary to develop
material and energy balance Illodels. One key is that a basis must always be selected when
evaluating an intensive property such as enthalpy.
Sec. 2.5 Material and Energy Balances 31
Developing correct energy balall(:c equations is not trivial and the chemical engineering
literature contains many incorrect derivations. Chapter 5 of the book by DCl1Il (1986)
points out numerous examples where incorrect energy balances "vert used to develop
pnlCcss models.
The total energy erE) or a system consists of internal (U), kinetic (KE) and poten-
tial energy (Pf{):
TE U -I KE + PI'
where the kinetic and potential energy terms arc:
1 ,
2 111\'-
I'E mgh
no""~ U + KE -I 1'10'
TE U -I K I,' -I I' E
where II and represent per mole and per mass, respectively. The kinetic and potelltial ell-
ergy terms, on a mass basis, arc
1 ,
KE 2u
PE ~ gil
[,'or most chemical processes where there arc thermal effects, we will neglect the kinetic
and potential energy terms because their contribution is generally at least two orders of
inagnitude less than thai of the internal energy tcnn.
When dealing with flowing systems, we willuslIally work with enthalpy. Total en-
th;:Jlpy is defined as:
II U -I pV
p
II If -I pV U I·
i'
we will make usc or these relationships in the following example.
32 Process Modeling Chap. 2
F.
I
T.
I
~
V T
F
T
Q
Material Balance
accumulation =--= in - out
dVp
(252)
dt
Energy Balance
accumulation = in by flow - out by flow -+- in by heat transfer -+- work done on system
dTE
•• r;p,T Ei -FpTE + Q + W,
df
Here we neglect the kinetic and potential energy:
dU
dt ~ FIIlI-
., I · I FI'U , f).'
~
WI (2.53)
We write the total work done on the system as a combination or the shaFt work and the energy
added to the system to get the-fluid into the tank and the energy that the system performs on the
surroundings to force the fluid out.
(254)
<III dpV
"'Pi Hi -- Fp 11 -I- Q -1-- W, (2.56)
tit tit
Since, rip Vld, = V dpldl + P dVldt, if the 1'011111/(-' is cOl/slall! and tile mean pressure change can be
neglected (a good assumption for liquids), we can write
(2.57)
We must remember the assumptions that went into the development of (2.57):
II Vp 11
and assullling no phase change, we select an arbitrary reference temperature U:_,j) for enthalpy:
r
ii(T) ~. Jc,,<lT
'.
Often we aSSU!llc that the heat capacity is constant, or calcuated at an average temperature, so
II c,,(7' 1;,,) (2.58)
d(Vpc"CI' T",))
(2.(>0)
dt
lIsing the asslIIJlplio/ls of constant density and volume (so Fi 0:: F; from (2.52». we filld
V'"
f .f!
<I(T tit 1;,/) =' F pc'I(T
)·
-- Trei.) - (T-- T rei )1 + /il
~ (2.61 )
l j .
or
<I(T- 7;4) F Q w
V (/;- T) I -I (2.62)
<It Vpcf ! Veep
but T,-(fis a constant, so d (7 --Trct)!dt 0:: dTidt. Also, neglecting WI' we can write
<I'J' F /i
(1-1')1" (2.63)
dt V ' . \fpc"
In ordcT to solve this problem, we must specify the parameters \I, p, c[J' the inputs F. Q, and Ti
(as a function of time), and the initial condition '1(0),
34 Process Modeling Chap. 2
In this section we show how the balance equations can be used to develop a model for a
distributed parameter system, that is, a system where the state variables change with re~
spect to position and time.
Consider a tubular reactor where a chemical reaction changes the concentration of
the fluid as it moves down the tube. Here we usc a volullle clement 6. V and a time clement
Lll. The total moles or species A contained in the clement 6. V is written (6. V)Ck The
amount of species A entering the volume is FcAI v and the amount of species leaving the
volume is FC) F-,-:.W' The rate of A leaving by reaction (assuming a first-order reaction) is
( k C~,)n v.
The balance equation is then:
I + ill
Using the mean value theorem of integral calculus and dividing by D.f, wc find:
(2.64)
g(~A av_c,
--'--'- - kC (2.66)
iJt iJz A
If the fluid is at a constant density (good assumption for a liquid), then we can write the
species balance as
'1'0 solve this problem, we must know the initial condition (concentration as a function of
distance at the initial time) and one boundary condition. For example, the following
boundary and initial conditions
C~,(z, t = 0) = CAO(Z)
(2.69)
CA(O, t) = CA;,,{t)
Sec. 2.7 Dimensionless Models 35
indicate that the concentration of A initially is known as a function of distance down the
reactor, and that the inlet concentration as a function of time must be specified.
In deriving the lubular reactor equations we assumed that species A left a volume
element only by convection (bulk now). In addition, the molecules can leave hy virtue or
a concentration gradient. For example, the amount elltering at V is
(2.70)
where is the diffusion coefficient. The reader should be able to derive the following
reaction-diffusion equation (sec exercise 19).
(JC~\
(27])
at
Since this is a second-order PDE, the initial condition (C~\ as a function of z) and
two boundary conditions must be specified.
Partial differential equation (PDEs) models are much more difficult to solve than
ordinary differential equations. Generally, PDEs arc converted to ODEs by discretizing in
the spatial dimension, then tcchniques for the solution of ODEs can be used. 'rile rocus of
this text is on O[)Es; with a grasp or the solution of ODr~s, one can then begin to develop
solutions to PDEs.
Models typically contain a large number of parameters and variables that may differ in
value by several orders of magnitude. It is orten desirable, at least for analysis purposes,
to develop models composed of dirnensionless parameters and variables. 'To illustrate the
approach, consider a constant volume, isothcnnal CSTR moue led by a simple first-order
reaction:
x ~ C/C,,/0
where Xj= CN/CAIO ' It is also natural to choose a scaled time, T = //1< where I'" is a scal-
ing parameter to be
determined. We can usc the relationship df = f"'dT to write:
36 Process Modeling Chap. 2
dx
{:;:dr
A natural choice for 1*' appears to be VIF (known as the residence time), so
dx =x·-
dT I
(Vk)
1+ .···x
F
The term VklF is dimensionless and known as a Damkholcr Ilmnber in the reaction engi-
neering literature. Assuming that the feed concentration is constant, .'j::;: I, and letting
Ci;::: Vk/F, we can write:
dOl
I ~X -+- (Xx
(IT
which indicates that a single parameter, (X, can be used to characterize the behavior of all
first-order, isothermal chemical reactions. Similar results arc obtained if the dimension-
less state is chosen to be conversion
Explicit solutions to nonlinear differential equations can rarely he obtained. The most
common case where all analytical solution can be obtained is when a single differential
equation has variables that are separable. This is a very limited class of problems. A main
objective of this textbook is to present a number of techniques (analytical and numerical)
to solve more general problems, particularly involving many simultaneous equations. In
this section we provide an example of problems where the variahles are separable.
dh
df
\Ve can see Ihat the variables are separable, so
tilt Il d/
v'h i\
Sec. 2.9 General Form of Dynamic Models 37
II dll ! IJ
(
Vii
-j A ell
h,.
which has the solution
~
2 v'Ji ,- 2\/h" A (1- U
or
letting t,,;::: 0, and squaring both sides, \ve obtain tile solution
iI(I)
I fl'
"
vii --~ "
0 2/\ .
This analytical solution call be used, for example, to determine the lime that it will take for the
tank height to reach a certain level.
The dynamic models derived ill this chapter consist of a set of first-order (tncaning only
first derivatives with respect [0 time), nonlinear, explicit, initial value ordinary differential
equations. A representation of" a sel or
first-order differential equations is
where Xi is a state variable, IIi is an input variable and Pi i:-; a parameter. The notation.< is
used to represent drldt. Notice that there arc II equations, II state variables, III inputs, and r
parameters.
A stale variable is a variable that arises naturally in the accumulation tefm of a dynamic
material or energy balance. A state variahle is a Tncasurable (at least conceptu;dly) quan-
tity that indicates the state of a systelll. For example, tern perature is the COll'lIllOn state
variable that arises from a dynamic energy balance. Concentration is a state variahle that
arises when dynamic component balances are written.
38 Process Modeling Chap. 2
An input variable is <l variable that normally must be specified before a problem can be
solved or a process call be operated. Inputs arc normally specified by an engineer based
on knowledge of the process being considered. Input variables typically include Ilowratcs
of streams entering or leaving a process (notice that the l10wratc of an outlet stream might
be considered an input variablc~). Compositions or temperatures of streams entering a
process arc also typic"ll input variables. Input variables arc often manipulated (by process
cOlltrollers) in order to achieve desired pcrfonnancc.
2.9.3 Parameters
The set of differential equations shown as (2.72) above can be written more compactly ill
vector form.
x =, f(x, II, II) (2.73)
\vhere
x::;;: vector of n state variables
u = vector of In input variables
p :::: vector of r parameters
Notice that the dynamic models (2.73) can also be used to solve steady-state probJenls, since
x= () (2.74)
that is,
f(x,u,p) =. () (2.75)
for steady~state processes. Numerical techniques (such as Newton's method) to solve al-
gebraic equations (2.75) will be presented in Chapter 3.
The steady~state state variables from the solution of (2.75) arc often used as the ini-
tial conditions for (2.73). F'requently, an input will be changed froni its steady-state value,
and (2.73) will be solvcd to understand the transient behavior of the system. 'rhe numeri-
cal solution of ordinary differential equations will bc prescllted in Chapter 4. In thc exam-
ple helow we show Example 2.2 (chcmicalrcactor) in state variable form.
Sec. 2.9 General Form of Dynamic Models 39
dV
~F-F (2~23)
dl j
(2.31 )
(2.32)
(2~33)
There are four states (V, C~\, Cu' and C p ), four inputs (Fi , F, CAi, ('/Ii), and a single parameter
(k). Notice that although F is the outlet fJowrate, it is considered all input to the model, because
it must be specified in order to solve the equatiolls.
v
CA
F
Ii (CHi -- Cli) - 2 kC,C"
F
VC/, + kCAC/I
or
II, I'I(X,II,P)]
X2 Xl (lI J - x 2) -" P.X2 X;l
___ ti x,U,IJ)
- [ f,(X,II,p)
x, i: (11 4 -- x.,) -- 2 P,X 2X3
J 4(x,u,p)
11, .
i, x4 + l)l X1X;;
40 Process Modeling Chap. 2
SUMMARY
A number or material and energy balance examples have been presented in this chapter.
The classic assumption of a perfectly stirred tank was generally used so that all models
(except Section 2.6) were IUlTlped-parameter systems, Future chapters develop the analyti-
cal and Ilmllcrical techniques to analyze and sinudatc these models.
The student should now understand:
that dynamic models or lumped parameter systems yield ordinary differential equa-
tions.
that steady-state models of lumped parameter systcrns yield algebraic equations.
The notion of a state, inpul. output, parameter.
A plethora of models arc presellted in modules in the final section of the textbook. More
specifically,. the following modules arc of interest:
Module 5. IJcatedMixing'rank
Module 6. LillcarEquilibrium Stage Models (AbsorpLioll)
Module 7. Isothermal Continuous Stirred 'Tank Reactors
Module 8. Biochemicall<cactor Models
Module 9. Diabatic Reactor Models
Module 10. Nonlinear Equilihrium Stage Models (Distillation)
Each of these modules covers Illodel development and presents examples for analyt-
ical and nUlllerical calculations.
FURTHER READING
Fogler, H.S. (1992). Elements (d' Chcmh'ol ReaUiol/ Engineering, -'.l1d eel. Engle-
wood Cliffs, NJ: Prentice-Ilall.
Smith, 1.M., ftC. Vall Ness, & M.M. Abbott. (1996). Chcmhxd Engineering Ther·
fIlorfvllomics, 5th cd. New York: McGraw-HilI.
The following paper provides an advanced treatment of dimensionless variables and para-
meters:
'I'he relationships for mass and heat transport arc shown in textbooks on transport phe-
nomena. The chernicaI engineer's bible is
Bird, R.B., WJ~. Stewart, & E. Lightfoot. (1960). Transpurt Phcl/oIJ/('!la. New
York: Wiley.
The predator-prey model in student exercise 16 is also known as the Lotka- Volterra e(lua-
tions, after the researchers that developed them in the late 1920s. A presentation of the
equations is in the following text:
Bailey, J .E., & DJ<'. Ollis. (1986). Biochemical Engilleerinf!, Fundamentals, 2nd cd.
New York: McGraw-HilI.
STUDENT EXERCISES
I. In r~xaJ1lple 2.1 it was assumed that the input and output f10wratcs could he inde-
pendently varied. Consider a situation in which the outlet flow rate is a function of
the height of liquid in the tank. Write the modeling equation for tank h~ight assum-
ing two different constitutive relationships: (i) F:::: f3h, or Oi) F:::: f3 \/h, where [3 is
known as a flow c;oefficicnL You will orten sec these relationships expressed as
F = h/R or F =V/ZIR, where R is a flow resistance. List the state variables, parame-
ters, as well as the input and output variables. Give the necessary information to
complete the quantitative solution to this problem. If the f10wrate has units of
liters/min and the tank height has units of meters, find the units of the flow coeffi-
cients and flow resistances for (i) and (Ii).
2. Consider a conical water lank shown below. Write the dynamic material balance
equation if the flow rate out gr the tank is a function of' the square root of height of
water in the tank (Fo :::: f3Yh). List state variables, input variables and parameters.
(Hint: Usc height as a state variable.)
ESCOLA Dc Et'-JGEi'-IHARIA
BIBLI01ECA
42 Process Modeling Chap, 2
R
• •
F,
i
H
~ • Fa
3. Extend the model developed ill Example 2.2 (isothermal reaction) to handle the fol-
lowing stoichiometric cqu;:llion: A + B --> 21'. Assume that the volume is constant,
but the change in concentration of component B cannot be neglected.
4. 13xtcnd the model developed in Example 2.2 (isothermal with first-order kinetics) to
handle multiple reactions (assume a constant volume reactor).
A + B - -> 21' (react;on I)
2A + I' - -> Q (reaction 2)
Assume that no P is fed to the reactor. Assume that the reaction rate (generation) of
A per unit volume for reaction I is characterized by expression
fA -k1 C'A en
where the minus sign indicates that A is consumed in reaction 1. Assume that the re-
action rate (generation) of A per unit volume for reaction 2 is characterized by the
expreSSIon
I'll = - k2 c/\ C/,
[I' the concentrations are ex.pressed in gmolllitcr and the volume in liters, what arc
the units of the reaction rate constants?
If it is desirable to know the concentration or component Q, how many equa-
tions must be solved? If our COncern is only with P, how many equations must be
solved? Explain.
5. Model a mixing tank with two reedstreams, as shown below. Assume that there arc
two components, A and B. C represents the concentration of A. (C, is the mass con-
centration 01';\ in stream I and C2 is the mass concentration of A in stream 2).
Model the following cases:
F
C
Student Exercises 43
•
h,
to. F,
h2
:b=L F
2
A material balance around the first tank yields (assuming constant density and
P, ~ (3,11,)
7. Two liquid smge tanks (with constant cross~seclional area) arc placed in series.
Write the modeling equations for the height of liquid in the tanks assmning that the
f!owrate from the first tank is a function of the difference in levels of the tanks and
the f10wrate from the second tmik is a funclion of the level in the second tank. Con-
sider two cases: (i) the function is linear and (ii) the function is a square root rela-
tionship. State all other assumptions.
8. A gas surge drurn has two components (hydrogen and methane) ill the rcedstreHlll.
Let Yi and y represent the mole fraction of lnethanein the feedstream and drum, re-
spectively. Find dP/df and dy/dt if the inlet and outlet f]owrates can vary. Also as~
sume that the inlet concentration can vary. Assume the ideal gas law for the effect
of pressure and composition on density.
9. Consider a liquid surge drum that is a sphere. Develop the modeling equation using
liquid height as a state variable, assuming variable inlet and outlet /lows.
10. A car tire has a slow leak. The fJowratc or air out or the tire is proportional to
the pressure of air in the tire (we ;Ire using gauge pressure). The initial pressure is
30 psig, and after five days tile pressure is down to 20 psig. flow long will it take to
reach 10 psig?
11. A car lire has a slow leak. The flowratc of air out of the tire is proportional to the
square root of the pressure of air in the tire (we arc using gauge pressure). 'rhe ini-
tial pressure is 30 psig, and after 5 days the pressure is down to 20 psig. How long
will it lake to reach 10 psig? Compare your results with problem 10.
44 Process Modeling Chap. 2
12. A small room (IOn X Ion X lOft) is perfectly scaled and contains air at I atm
pressure (absolute). There is a large gas cylinder (100 nJ ) inside tbe room tha( con-
tains helium viith an initial pressure of 5 atm (absolute), Assume that the cylinder
valve is opened (at t = 0) and the molar f10wratc of gas leaving the cylinder is pro~
portional to the difference in pressure helween the cylinder and the room. Assume
HUll room air docs not diffuse into the cylinder.
Write the differential equations that (if solved) would allow you to find how
the cylinder pressure, the room pressure and the roorn mole fraction of helium
change with time. Slate all assumptions and show all of your work.
13. A balloon expands Or contracts in volume so that the pressure inside the balloon is
approximately the atlllOspheric pressure.
a. Develop the mathematical model (write the differential equation) for the V01UIllC
of a balloon that has a slow leak. Lct V rcpresenllhe volume of the balloon and
q represent the molar flowratc of air leaking from the balloon. State all assump-
tions. List state variables, inputs, and parameters.
h. The following experimental data have been obtained for a leaking halloon.
t (minutes) r (em)
o I (J
5 7.5
Predict when thc radius of the balloon will reach 5 cm using two different assump-
tions for thc molar rate of air leaving the halloon:
(i) ·rhe molar rate is constant.
(ii) 'fhe molar rate is proporlionallo the surface area or the balloon.
Reminder: The volumc of H sphere is 4IJ 'ITr 3 and the ,1rea of a sphere is 47Tr2.
14. Often liquid surge tanks (particularly those containing hydrocarbons) will have a
gas "blanket" of nitrogen or carbon dioxide to prevent the acculllulation of cxplo-
sive vapors above the liquid, as depicted below.
liqUid
• F
Develop the modeling equations with gas pressure and liquid volume as the state
vari'lble;.;. Lel Cfr(lnd Cf repre;.;cnt the inlet and outlct gas molar flowrates, F"rand F the
liquid volumetric f1owratcs, V the constant (total) volume, Vjthe liquid volume, and
P the gas prcssure. Assume thc ideal gas law. Show that lhe modeling equations arc:
riP P
dl
V~V(Ff-F)
I
15. Most chemical process plants have a natural gas header that circulates through the
process plant. A siInplified version of such a header is shown below.
P
I V,
From valve i
source
Plant piping, represented Gas drum for To furnaces
as a perfectly mixed drum a boilerhouse
unit
Here, the natural gas enters the process plant from a source (the natural gas
pipeline) through a control valve. It fltnvs through the plant piping, which we have
represented as a perfectly mixed dnnH for simplicity. Another valve connects the
plant piping to the gas drum for a boi!erhouse unit. Gas passes through another
valve to the boilerhouse furnaces.
Write modeling equations asslllning that the pressures in drums I and 2 arc
the state variables. Let the input variables be h J (valve position 1),11 2 (valve posi-
tion 2), and Pi (source pressure).
16. 'file Lotka- Volterra equations \Vere developed to mode! the behavior of prcdator-
prey systems, making certain assumptions about the birth and death rates of each
species. Consider a system composed of sheep (prey) and coyotes (predator). In the
following Lotka- Volterr~1 equations Xl represents the number of sheep and X2 the
number of coyotes in the system.
Discuss the meaning of the parameters 0', ~, -y, E and the- assumptions made in the
model.
17. Consider a perfectly mixed stirred-tank heater, with a single liquid feed stream and
a single liquid product stream, as shown below.
F
i _
T; ~
L j - - - - t - ' - - - - -.. F
T
46 Process Modeling Chap. 2
Develop the material and energy balance equations that describe this process. Fi is
the volumetric nowrate into the tank, F is the volumetric rJOWfi:ltC oul of the lank, '1;-
is the temperature or the fluid entering the lank, r is the lcrnperalurc or the fluid in
the tank, II is the height of liquid in the tank, and Q is the rate of energy added to the
tank. State assumptions (such as constant density, etc.). _
Assume that the volume Call vary with time and that F is proportional to \1/1.
How lllany differential equations docs it take to model this system? What arc the
state variables'! What afC the parameters? What <:11"( the inputs? List the information
necessary to solve this problem.
18. Consider a gas surge drum witb variable inlet and outlet molar flowratcs, {jr and q,
res[Jectively. Asslilne that heat is being added to the tank at a rate, Q. \Vrite the
modeling equations lhat describe how the temperature, 1:
and pressure, fl, vary with
time. r)o not neglect the p V tenn in the energy balance.
19. Derive the reaction~dilJusionequation
dC.\
= - v
neil
at ilz.
using the same method to derive lhe tubular reactor model in Section 2.6. As:mme
that a chelnical species enters a v()lllIne clement via convection (bulk flow) and a
concentration gradient (diffusion):
"II F, 13 VII
"I A A
tmd define the dimensionless variables II :::: F/F:I . and x:::: hlhs.. 'Where Fs and h. 1 are
the stcady-stateflowrale and height. respeclively (VI' :::: ~\Ih). Definc the dimeIl+
sionless limc, T, that will yield the follO\ving dimensionless equation:
dx
= -- \/x + U
elT
21. I)erive the constitutive relationship F:::: fjVh by considering a steady-state energy
balance around a tank with a constant flowrate. Use P :::: 1\, + pgh for the pressure al
the bottom of the lank, where Po is the atmospheric pressure (pressure at the top
surface), 11 is the height of liquid in the tank, p is the density of fluid. Assume lhat
Student Exercises 47
the cross-sectional area at the surface is much larger than the cross-sectional area of
the exit pipe.
22. Consider the isothermal CSTR Inodel with first-order kinetics:
dC,
dt
Use T =- kl as the dimensionless time. [)evclop the dimensionless cquation for t\",O
cases: (i) _y ;;;:;: C,/(\l' and (ii) x =- I --- C,/(~\r Compare and contrast the resulling
equations with the example in Section 2.7.
23. Semibatch reactors are operated as a cross between batch and continuous reactors.
A semibatch reactor is initially charged with a volume of material, and a continous
feed of reactant is started. There is, however, no outlet stream. !)eve(op the model-
ing equations for a single first-order reaction. The state variables should be volume
and concentration of reactant A.
24. Pharmacokinetics is the study of how drugs infused to the body are distributed to
other parts of the body. 'rhe concept of a cOlnpartmental model is orten used, where
it is assumed that the drug is injected into compartment I. Some of the drug is elim-
inated (reacted) in compartmcnt I, and somc of it diffuses into cmnpartrnent 2 (the
rest accumulates in compartment I). Similarly, some of the drug that diffuses into
compartment 2 diffuses back into compartment I, while some is eliminated by reac~
tion and the rest accumulates in compartment 2. Assume that the rates of diffusion
and reaction arc directly proportional to the concentration of drug in the compart-
menl or interest Show thal the following balancc equations arise, and discuss the
meaning of each parameter (k{i' units of min-I)
dX I
dt
df
The purpose of this chapter is to introduce rllcthods to solve systems of algebraic equa-
tions. Arter studying this module, the student should be able to:
3. J Introduction
3.2 General r,'onn for a Lincar System of Equations
3.3 Nonlinear Functions of a Single Variable
3.4 MATLAB Routines for Solving Functions of a Single Variable
3.5 MuJtivariablc Systems
3.6 MATLAB Routines for Systeills of Nonlinear Algehraic Equations
3.1 INTRODUCTION
In Chapter 2 we discussed how to develop a model that consists of a set of ordinary differ-
ential equations. To solve these problems we need to know the initial conditions and how
the inputs and parameters change with time. Often the initial conditions will be the
steady-state values of the process variables. To obtain a steady-state solution of a system
of differential equations requires the solution of a set of algebraic equations. The purpose
of this chapter is to review techniques to solve algebraic equations.
51
52 Algebraic Equations Chap. 3
The objective is to solve f\1r the set of variables, Xi' that force all of the functions, .fi, to
zero. A solution is called aJixed point or all. equilibrium poinf,
Vector notation is used for a compact representation
I'(x) ~ (} (3.2)
where rex) is a vector valued function. Notice that these can be the same functional rela-
tionships that were developed as a set of differential equations, with x:= rex) := O. The SO~
lution x is then a steady-state solution to the system of differential equations.
Before we cover techniques for systems of nonlinear equations, it is instructive to
review systems of linear equations.
Consider a linear system with n equations and 11 unknowns. The first equation is
The coefficient, aU' relates the jilt dependent variahle lo the itlt equation.
XJ b,
a 12 au Xz b2
a21 bJ
I" "1
an aLl llZIl x:'\
(3.3)
XII
The goal is to solve for the unknowns, x. Notice that (3.3a) is the same form as (3.2), with
f(x) ~ Ax - b
Sec. 3.2 General Form for a Linear System of Equat'lons 53
provided thallhe inverse of A exists. [I' the rank or A is less than 11, then A is singular and
the matrix inverse docs not exist. If the condition number of A is vcry high, then the solu-
tion may he sensitive to model error. The concepts of rank and condition number are re-
viewed in Module 2 in Section V.
Equation (3.4) is used for conceptual purposes to represent the solution of the sel of
linear equations, In practice the solution is not obtained by finding the matrix inverse.
Rather, equation (3.3a) is directly solved Llsing a numerical technique such as Gaussian
elimination or LU decomposition. Since the codes to implement these techniques are
readily availahle in any Ilumericallibrary, wc do not rcview thcm hcrc.
The next example illustrates how MATLAli can he used to solve a system of lincar
equations.
O=1\x+llu
or
Axc;::-~HII
a
-0.3250 O.12'SO o a o
0.2000 -0.3250 0.1250 o o
0 0.2000 -0.3250 0.1250 o
0 0 0.2000 --0.3250 0.1250
0 0 o 0.2000 -0.3250
b
0 .2000 0
0 0
0 a
0 0
0 0.2500
u -
0
0 .1000
54 Algebraic Equations Chap.3
x
0.0076
0.0]98
0.0392
0.0704
0.1202
Usc of the MArLAB left-division operator (\) yields the same resull more efficiently
(faster computation time), using the LU decomposition technique:
Functions of a single variable Call be solved graphically by ploUing./(x) for many values
of.t and finding the values of x whcrcj(x) :::;; O. This approach is shown in Figure 3. J. An
interesting and challenging characteristic of nonlinear algebraic equations is the potential
for mnltiple solutions, as shown in Figure 3.1 b. In fact, for a single nonlinear algebraic
equation it is often not possible to even know (without a detailed analysis) the number of
solutions that exist. The situation is easier for polynomials because we know that an nth
order polynomial has 11 solutions. Fortunately, many chemical process problems have a
single solution that makes physical sense.
Numerical techniques for solving nonlinear algebraic equations arc covered in the
next section. A graphical representation will be used to provide physical insight for the
numerical techniques.
Numerical methods to solve nonlinear algebraic equations are also known as itera-
tive techniques. A sequence of guesses to the solution are made until we arc "close
enough" to the actual solution. To understand the concept of "closeness" we must use the
notion of convergence tolerance.
f(Xi f(Xi
x
° x
The solution
a. Single Solution b. Multiple Solutions
where 1::: is a tolerance that has been specified, !/(xk)! is lIsed to denote the absolute value
of fUllctionJ(x) evaluated at iteration k, and x k is the variable value at iteration k. At times
it is useful to base convergence on the variable rather than the function; for example, a so-
lution can be considered converged at iteration k if the change in the variable is less than a
certain absolute tolerance, E(I:
'I'he absolute tolerance is dependent on the scaling of the variable. so a relative tolerance
specification, l,;r' is orten lIsed:
The iterative methods that we present for solving single algebraic equations are: (i) direct
substitution, (Ii) interval halving, (iii) false posilion, and (iv) Newton's Jnethod.
Perhaps the simplest algorithm for a single variable nonlinear algebraic equation is known
as direct substitution. We h.ave been writing the relationship for a single equation in a sin-
gle unknown as
f(x) = 0 (3.5)
x = g(x) (3.6)
this means that our "guess" ft.)!' x at iteration k+ 1 is based on the evaluation of M(X) atitera-
tion k (subscripts arc used to denote the iteration)
x* = g(x*) (3.8)
If not formulated properly, (3.7) may diverge or converge to physically unrealistic solll~
tions, as shown by the following example.
56 Algebraic Equations Chap. 3
The dynamic model for an isothermal, constant volume, chemical reactor with a single sccond-
order reaction is:
~{~;,
df
Find the slcady~statc concentration for the following inputs and parameters:
At steady-state, riCA/til := n, and substituting the parameter and input vatues, we find
I ~ Clis ~ C'As ~ 0
where the subscript s is used to denote the steady-state solution. For notational convenience, let
.r:;;: CA" and write the algebraic equation as
We can directly solve this equation using the quadratic formula to find x:::: -·1.6IX and 0.61X to
be the solutions. Obviously a concentration cannot be negative, so the only physically meaning-
ful solution is x::;;: 0.618. Although wc know the answer llsing the quadratic formula, our objec-
tive is to illustrate the behavior of thc direct substitution method.
To use the direct substitution method, we can rewrite the function in two different ways:
0) x 2 :;;;; ~J_- + I and Oi) x:;;;; --x 2 + J. We will analyze (I) and leave (Ii) as an exercise for the reader
(see student exercise 4).
(i) Here we rewrite JCi,.:) to fino the following direct substitution arrangement
x ~ v=:;:-+) ~ g(x)
x, ~ V - 0.5 + 1 ~ 0.7071
x, ~ 0.7071 + I ~ 0.5412
XJ ~ 0.5412 + 1 ~ 0.6774
X4 ~ 0.6774 + I ~ 0.5680
0.75
0.7
0.65
'"
.".
0.6
0.55
0.5
0 5 10 15 20
k
Notice that an initial guess of xo:::O () or ! oscillates between 0 and 1, never converging or
diverging, as showil in Figure 3.3.
0.8
0.6
'".". 0.4 I \
I \
I \
0.2 I \
I \
0
0 2 4 6 10
As noted earlier, this problem has two solutions (x* :;:::; --1.618 and x~: :;;:: 0.(18), since il
is a second-order polynomial. This tall be verified by plotting x versus J{x) as shown in
58 Algebraic Equations Chap.3
Figure 3.4. From phy:;ical reasoning, we accept only the positive solution, since a concentration
cannot be negative.
a/V ~
3: / \
-1 f··················· , . . ,............ . \[\
-2
Example 3.2 illustrates that certain initial guesses may oscillate and never yield a
solution, while other guesses may converge to a solution. It turns out that the way that a
direct substitution problem is formulated may eliminate valid solutions from being
reached (sec student exercise 4).
These problems exist, to a certain extent, with any numerical solution technique.
The potential prohlems appear to be worse with direct substitution; direct substitution is
not generally recommended unless experience with a particular problem indicates that re-
sults arc satisfactory, Direct substitution is often the easiest numerical technique toformu-
late for the ,,,>olution of a single nonlinear algebraic equation.
If a numerical technique does not converge to a solution when the initial guess is
close to the solution, we refer to the solution as unstable. The stability of iterative meth-
ods is discussed in the appendix.
The interval halving technique only requires that the sign of the function value is knowll.
The following steps arc used in the interval halving technique:
1. Bracket the solution by finding two values of x, one wherej{x) is less than zero and
another whereJ{x) is greater than zero.
2. Evaluate the function,./C-r), at the midpoint of the bracket.
3. Replace the bracket limit that has the same sign as the function value at the midpoint,
with the midpoint value. Check for convergence. If llot converged, go back to step 2.
Sec. 3.3 Nonlinear Functions of a Single Variable 59
f(x)
initial
lower
limit
x
2
initial
upper
limit
You can see that the midpoint between x5 and x4 will yield a positive value for}(x(), so
that the x4 point will be thrown out. You can also see that this process could go on for a
very long time, depending on how close to zero you desire the sol11tion. Engineering
judgement must be used when making a convergence tolerance specification.
The advantage to interval bisection is that it is easy to understand. A disadvantage is
that it is not easily extended to multi variable systems. Also, it can take a long time to
reach the solution since it only uses information about the sign of the function values. The
next technique is similar to interval bisection but uses the function values to determine the
variable value for the next iteration.
60 Algebraic Equations Chap.3
The false position or rcguli falsi technique uses the function values at two previous itera-
tions to determine the value for the next iteration. The technique of false position consists
of the foJlowing steps:
The most commonrnethod for solving nonlinear algebraic equations is known as New-
ton's method (or Newton-I<aphson). Newton's method can be derived by performing a
Taylor series expansion ofJCr):
f(x)
initial
lower
limit
X2
initial
upper
limit
------------------~~~-
Sec. 3.3 Nonlinear Functions of a Single Variable 61
where
and so 011.
Neglecting the second-order and higher derivative terms and solving for 1{,I:+~t) = 0, we
ohtain
-/(x)
L'.x = F(x) (3.10)
Since this is an iterative procedure, calculate the guess YOI x at iteration k+l as a function
of the value at iteration k:
defining (3.11 )
from (3.1 0) dX k + I
=At,) (3.12)
f'(x,)
}\x,)
= x, -/"(
_ x.k )
(3.14)
I(x)
I(x,)
I(x)
I(x,)
I(x,)
~ 'SlOpe" f'(x,)
-1-------",'"""'7."---,----
Flf;{JRE 3.7 Illustration of NeWlon's
x, x, mclhod.
ESCOLA Dc ENC:::NHARIA
BIBLIOTLCA
62 Algebraic Equations Chap. 3
0.5
f(x) a
______ .>-..-L~_"' _
-0.5 horizon1al 1arlgel
never meet! x-axis
-1
-1.5 -1 -0.5 o 0.5 1 1.5
x
FIGURE 3.8 Problem with NeWlon's method whcllf'(r)::;;: O.
Sec. 3.4 MATLAB Routines for Solving Functions of a Single Variable 63
0.5
,
l' -....... ~_
f(x) a l ,
'~_ J,I
,
-0.5
-1
-1.5 -1 -0.5 a 0.5 1 1.5
x
FIGURE 3.9 OscillatIon of solution between two values.
MA'fLAB has two routines that can solve for the zeros of a function or a single v.:triable.
FZERO is lIsed for a general nonlinear equation, while ROOTS can be used if the nonlin-
ear equation is a polynomial.
3.4.1 FZERO
The first routine that we usc for illustration purposes is [zero. [ZI<;1:'O uses a combina-
tion of interval halving and false position.
In order to usc f ZE,;ro, you must first write a MATL,AB m-filc to generate the func-
tion that is being evaluated. Consider the function.!(x):::: x 2 - 2x ~ 3 :::: O.
The following MATLAB m-filc evaluates this function (the Ill-file is named
fcnl . m):
function y := fcnl(x)
y ~ x A 2 - 2*x 3;
After generating the m-filc tcnl. m, the user must provide a guess for lhc solulion
to the fzero routine. The following command gives an initial guess of x:::: O.
y fzero{'fcnl' ,0)
64 Algebraic Equations Chap.3
These results arc consistent with those of Example 3.2, where we found that there were
two solutions to a similar problem (we could usc the quadratic rOl11mla to find theln).
Again, the solution obtained depends on the initial guess.
A third argument allows the user to select a relative tolerance (the default is the ma-
chine precision, eps). A fourth argument triggers a printing of the iterations.
3.4.2 ROOTS
Since the equation that we were solving was a polynomial equation, we could also lise the
MATLAB routine roots to find the zeros of the polynomiaL Consider the polynomial
function:
The user must create a vector of the coefficients of the polynomial, in descending order.
e~[1-2-3]'
Tn the previous sections we discussed the solution of a single algebraic equation with a
single unknown variable. We covered direct substitution, bisection, reguli falsi, and New-
ton's method. In this section, we will discuss the reduction of a multivariab1e problem to a
single-variable problem, as well as the multivariab1c NeWlon's method.
Consider a system of 1l nonlinear equations in Jl unknowns
f(x) = 0
Sec. 3.5 Multivariable Systems 65
'There arc some special cases where 11 - 1 variables can he solved in terms of one vari~
ablc----lhen a single variable solution technique can be llsed. This approach is shown in
the following example.
(3.16)
-'2:;:;;1-4x 1 (3.17)
I +3x,-ZBxf::::O (3.18)
which has the two solutions 1'1)] XI (from the quadratic formula)
.
solutIOn 1 is X.co"
[0.25].
.
.
0 . ' while solution 2IS x =
-0.1429]
[ 1.5714
Observation: We can also see by inspection that the origin (sometimes cJlled the trivial so-
lut'lOn), x =: tgl, is also a solution. Another solution that is slightly Jess obvious is x;::;; [~]. which
we can see by inspection satisfies (3.15) and (3.16).
Observation: Perhaps we will find the olher solutions if we solve (3.16) for Xl in tCrIns of
-\2' then substitute this result into (3.15) to solve for x 2 . When this is done, we obtain the result
that
x-i -- 4 x2 + 4 = 0
4 /116-16
dnd llSlllg the l(UMh,ttlC 100nJuid \} ~ 2 :1: \ --2 2
which gives us the solution x:;::: l~l. Notice that we are still missing the trivial solution, x ;::;; rgl.
66 Algebraic Equations Chap. 3
The mistake that we made was back at the fifst step, when we solved (3.15) for J.-2 in terms of xl
to find (3.17). We must recognize that (3.15) is quadratic in Xl' therefore there arc two solutions
for Xl in terms OLt2' This is more dear if we write (3.15) .'lS
~4 x7 + xI (1 - x2) + 0 ::: 0
and solve for xl to find xl -:;:;:. 0 or Xl ::: 1/4 (I - x2). The reader should show that substituting these
values into (3. 16) will1cad to the four solutions:
x·~ 1.°'
°11°.11°.25.].
2 ' . ° ' dnd
1- 01.5714'
.1429.1
The previous example illustrates the care that must be taken when using reduction tech-
niques to solve several nonlinear algebraic equations.
If a problem cannot be reduced to a single variable, then a general multivariablc
strategy (such as that discussed in the next section) must be used,
Now, since we wish 10 solve for Ax such that r(x + Ax):::: 0, then (from 3.22)
f(x) + J Ax ~ 0 (3.24)
(3.25)
but Ax is simply the change in the x vector from the previolls iteration
AX k = xkl- 1 - xk (3.26)
Substituting (3.26) into (3.25)
(3.27)
Remember that xI, is a vector of values at iteration k. Notice that for a single equation
(3.27) is:
. _. f(x k )
x, , I xk
- -"(
j x, )
which is the result that we obtained in Section 3.3.4.
Comment: In practice the inverse of the Jacobi;:l11 is not actually used in the sollilion
of (3.25). Actually, (3.25) is solved as a set of linear algebraic equations, using Gaussian
elimination or LU decomposition.
JJI =
ill;
.. = 1 - 8x 1 ~ X2
fJ/;
J?·""'·······=-x
()J: L iJx .l
r 2
Consider all initial guess of ,:rj :;:; ; --1 and x2 ;;;;; ---J. Let x(O) represent the vector for this initial
guess
10
.I(x(O)) ~_
[ 3
~I]
1
.I I(X(O» ~13
[ .3 10
13 .
13 13
[-~]
- -- 1 4 I[
f(x(O» ~ [ 2 (- I) I +3
and the guess for x( I), \-vherc x( I) represents the vector at iteration I, is
r~610
1
~ r~ I [ ~ [.. 3 :-.d]
~I U
x( I) 10
13 13
~053851
x(1 ) [ 0.3846
Iteration XI x,
0 ~I - ]
1 ~0.5385 0.3846
2 ~0.3104 1.0688
3 0.2016 1.3952
4 ~0.156] 1.5317
5 -0.1439 1.5683
6 -0.1429 1.5714
7 --0.1429 1.5714
Sec. 3.5 Multivariable Systems 69
Iteration x, X2
0 1 1
1 0.6190 0.0476
2 0.3893 0.0081
3 0.2870 0.0008
4 0.2542 0.0000
5 0.2501 0.0000
6 0.2500 0.0000
The previous example illustrates that, for systems that have ITIuhip1c solutions, the
solution obtained depends on the initial guess.
Most computer codes actually implement some variant of Newton's method; these arc re-
ferred to as quasi-Newton methods. Remember that Newton's method is guaranteed to
convcrge only if thc system is nonsingular and we arc "close" to the solution.
DAMPING FACTOR
Often it is desirable to "dampen" the change in the guess for xk+l' to make Newton's
method more stahlc. Applying a damping factor, a, to (3.27), we write
(3.29)
value for the next iteration. If the Jacobian is singular, it cannot he inverted. One method
that avoids this problem is known as the L,evcnhcrg~Marquardl method:
_ T
xk + t ~ xk ~ (J k J k + [31) .... ] Jk T f(x k ) (3.30)
where T represents the matrix transpose and [3 is an adjustable parameter llsed to avoid a
singularity. The single variable equivalent to (3.30) is
(3.31 )
(3.32)
where oxJ-(k) is a small perturbation in variable x·.I at iteration k. A problcrn with this ap-
proaeh is that an n-variabfc problem requires 11 + 1 evaluations of the function vector at
each iteration. There are other techniques that rely on infrequent function evaluations to
update the Jacobian matrix.
'fhe MATI,AB routine fsolve is used to solve sets of nonlinear algebraic equations,
using a quasi-Newton method. The user must supply a routine to evaluate the function
vector. It is optional to write a routine to evaluate the gradient of the function vector. As
another option, the user can select tbe Levenburg-Marquardt method.
x = [0.2500 0.0000] ,
'fhe following function file gcnerates the analytic,tI Jacobian for this problem.
[unction gf '=' gradnle(x)
gf(1,1)=1~8'x(1)-x(2);
gf(l,2)=-x(1) ;
gf(2,l)=3'x(2);
gf(2,21=2-2*x(2)+3*x(1);
which we place in all Ill-file called gradnle. m. We can then solve this problem by entering
xO = [l 1]';
options (5) c-,-O;
x fsolve( 'nle' ,xO,options, 'graclnle')
'fhe options vector can be used 10 seleel the Levcnberg-Marquanlt method by setting
options(5)'='1;
SUMMARY
try a numher of techniques, with a number of initial guesses, to find all of the solutions to
a problem. It is recommended that you generally lise commcrically availahle routines for
solving these problems.
The numerical techniques covered were
Direct substitution
Interval bisection
Rcguli falsi
Newton's method
Newton's method (and some variants) is the most commonly llsed multi variable tech-
nique. The reader should he able to understand the notions of
• Jacobian
Fixed or equilibrium points
• COllvergence and stability
Tolerance
Ilcration
A I1lnnber of other numerical rOlltines are availiable through thcMATLAB NAtj Tool-
box.
FURTHER READING
More detailed treatments of numerical methods given in the textbooks by Davis, Fin-
layson, and Riggs:
Felder, R.M., & R.W. Rousseau. (1986). Elementary Principles (~r Chemical
Processes. 2nd cd. New Yark: Wiley.
STUDENT EXERCISES
1. Real gases do not normally behave as ideal gases except at low pressure or high
tcmpcrature. A number of equations of state have been developed to account for the
non-idealities (van del" Waal's, RedliclyKwong, Peng-Robinson, etc.). Consider the
van cler Waal's (YO T relationship
where Pis pressure (absolute units), R is the ideal gas constant, T is temperature
(absolute units), {, is the molar volume and a and b arc van der Waa!'s constanls.
The van der Waal's constants are often calculated from the critical conditions for a
particular gas.
Assume that a, h, and R are given. We find that if P and T arc given, there is an iter-
ative solution required for V.
a. How many solutions for V arc there? Why? (Hint: Expand the PVT rclationshlp
to form a polynomial.)
b. Recall that direct substitution has the form Vk+J :::: gV k)' Write three different
direct substitution formulations for this problem (call thcse 1, H, and Ill).
c. What would be your first guess for V in this prohlem?Why?
d. Write the MATLAB m-files to solve for V using direct substitution, for each or
the three formulations developed in b.
Consider the following system: air at 50 atm and -1 ()(PC. The van der
Waal's constants arc (Felder and ROllsseau, p. 201) a :::: 1.33 altn Iitcr2/gmo!2,
b = 0.0366 Iitc/Jglllol, and R = OJl8206 liter alm/glllol K. Solve the I{Jl1owing
problems numerically.
e. Plot V as a function of iteration number for each of the direct substitution meth-
ods in b. Usc 10 to 20 iterations. Also usc the first guess that you calculated
in c. Discuss the stability of each solution (think about the stability theorem).
74 Algebraic Equations Chap. 3
f. H.carrangc (I) to the form of/CO") :::: O-and plot./n/ ) as a function of V. How
many sol uti OilS arc there? Docs this agree with your solution for a? Why or why
not?
g. Usc the MA'rLAB function roots to solve for the roots of the polynomial de-
veloped in a.
h. Write and lise an m-fi1c to solve for the equation in a using Newton's method.
The nUlllerical Solulion is eonsidercd converged when IVk~ Vk11 < ". Lel
k-- [
,,~ 0.0001.
2. Consider the van der Waals relationship for a gas without the volume correction
lerm (Ii ~ 0)
(P + V2a) V·
A
A
RT
a. IIow many solutions for if arc there? Show the solutions analytically.
b. Which solution is correct?
3. A process furnace is heating 150 Ibrllol/hr of vapor~phase mllmonia. The rate of
heat addition to the furnace is 1.0 x J 0 6 Btu/hI'. The ammonia fcedstrcam tempcra~
ture is 550 0 R. Use Newton's method to find the tcmperature of the aJl1monialeav~
ing the furnace. Assumc ideal gas and use the following equation for heat capacity
at constant pressurc:
ell = a + bT + cT- 2
Xk I c= g(x k ) = - x~ + I
Try several different initial conditions and show whether these convcrge, diverge,
or oscillate bctwcen values. Discuss the stability of the two sollitions .x*:;:: 0.618 and
x*:;;:: -1.618, based on an analysis ofg'(.I;*).
5. Show why the graphical Newton's method is eqlJivalent to xk+l = x k ~-J(xJ.Yf(xk)'
6. Develop an algoritlnl1 (sequence of steps) to solve an algebraic equation using intcr-
val halving (bisection).
Student Exercises 75
F
0= C- kc'
V
F Ibmol ftC>
where V 0.1 min " Cj" .= 1.0 and k = 0 . 0 5 , .
IbmoV ITIm
a. How many steady-state solutions arc there?
b. Write two different direct substitution methods and assesS the convergence of
each.
c. Perform two iterations of Newton's method using an initial guess of C:::: 1.0.
9. Consider the following direct suhstitution problem, which results from all energy
balance problem
T
k+ I -
-I' 15.04
0.716 _ 4.257 X 10 7~
'I'
Willlhis method converge to the solution or T = 443.571? Why or why not?
IO. Consider the following steady-stale model for an exothermic zero-order reaction in
a continuous stirred-tank reactor. The variable x is the dimensionless reactor tem-
perature.
x
lex) 0.42204 cxp
x
-1.3x=O
+
20
I'here arc two solutions to this equation, as illustrated in the figure below. The solu-
!ions mc x = 0.55946 and 2.00000.
a. Formulatc a direct substitution solution to this problcm. Will your direct substi-
tution tcchnique converge 10 0.55946'1 Will your direct substitution technique
converge 10 x::: 2'1 Use a rigorous mathematical argument in each case.
h. For an initial guess of x = 1.35, would you expect Newton's method to have any
trouble with this problem? Explain.
c. What is the next guess from the reguli falsi lechnique if your first guess was
x;:;: I and your second guess was x:::::; 2.5 (show this mathematically)?
d. Write a function routine to solve this problem using theMATLAB function
f zero. Also show the commands that you would give in the MATLAB com-
mand window to run fzera.
76 Algebraic Equations Chap. 3
~ 0
-0.5
a 0.5 1.5 2 2.5
x
11. A component material balance around a chemical reactor yields the following
steady-state equation
o VF C';,,- FV C -
c
k(·25
F Ibmol If'5
where V = IU min'!, C;" = 1.0 1 - and k = 0.05 . ..... I '
fl' lbmol "- min
Write two different direct substitution methods and assess the convergence of
i:1.
each to the steady-state concentration of 0.75354.
b. Perform two iterations of Newton's method using an initial guess of C:::: 1.0.
12. Consider the dimensionless equations for an exothermic CSTR (continuous stirred
tank reactor) shown in a module in the final section of the textbook.
where K(X )
2
= exp (_X 2 .)
1 + x,I'Y
Uscft (x['X2) to solve for xl in terms of x 2 and substitute intoh(xl,x2) to obtain the
single equation
I«X,) - (1 + o)x, = 0
I) ~ .
Consider the parameter values ~ :::: 8, (V : :;: 0.072, 'Y :::: 20, 0 = 0.3. Determine the
number of solutions to this problem (graphically), Find the xI and .x2 values for each
solution, using the single variable Newton's method.
Appendix 77
Multivariable Methods
13. Use the multivariabJe Newton's method to solve the following problem. Solve this as
a two-variable problem. Do not reduce it to a single-variable problem via substitution.
f,(x) = 2x,-x2 -5 = 0
b. Perform a detailed analysis by hand (hinl: the trivial solution xl ~ 0 and X2 ~ '\j
should be easy to show.)
15. For the dimensionless CSTR problem (module 9 in Section V), use the MATL,AB
routine fso1 ve to find the solutions. Show lhe initial guesses and the solu-
tions that £sol ve converges to. Show your function routine as well as the calls to
MATLAB.
13 = 8 (I' = 0.072
'Y = 20 1\ = 0.3
78 Algebraic Equations Chap.3
APPENDIX
If the iterates (xk) from a numerical algorithm converge to a solution, we refer to thal solu-
tion ns being stable.
-----._----------~----_ .. _--~-~--~---~-_._--------~
Definition 3.1
Let x''' represent the solution (fixed point) of x* =: S(x'''), or get''') yO" =: O.
--------~-
Theorem 3.1
\Vc continue with Example 3.2 to illustrate the numerical stability of direcl sub-
stitution.
- - - - - - - - - - - - - - - - . _ - -. ._ - - -
EXAMJ'LE 3.2 Contimlcd. Stability of din~ct substitution
Consider the Case I formulation,
x ~ g(x) x+1
which has the derivative
ag - I
. g' -
ax x I 1
1. For xo;' := 0.618, we find that lex ") :::;0 O.X090 I.Sox''':=O.6ISisa
O.61X +- I
stable solution, that is, all initial "guess" for X o close to 0.618 will convergc 10 xO;o 0:::: 0.618.
-I
2. [-'or x'" 0:::: -1.618, wc find I g'(x"') I 0:::: 0.30(]O,' 1. So _y*' :::; . . ~ 1.618 should
.618 f J
be a stable solution, that is, an initial "guess" frw Xu close to - 1.61 g should converge to
x'"0:::: -1.618.
c
Appendix 79
Question: Why did we find previollsly that an Initial guess close to -1.61 Xdid not converge?
Observation: We must realize that the square root of a positive number has two values. For
example, the square rooL of I call either be + I or -I (after all (-1)2 ::0:: In.
---------
You may be questioning the utility of a stability test for the direct substitution method,
which requires that the solution be known to apply the test. Our purpose is mainly to show
that the direct substitution method can he unstable. Newlon's rncthod guarantees stable
solutions, if the "guess" is close to the solution.
Here we use 'rhcorcm 3.1 to show that Newton's method is stable. 'to/e see that NewLon's
lllcthod can be written in the form of
where
fix,)
f'(x,J
Then we can find that tbe derivative, //Ctk) is
or
g'(x,) ~
lex,) n\,)
II' (\,J I'
At the solution, x"" we sec that
/(x*) r(x"')
g' (x*)
II'(x*)]'
And sincc.f(x*') ::::: 0, we find that the stability constraint is satisfied
g'(x*) = ()
as long as/ex"~') *- O. This shO\vs that Newlon's method will converge to the solution, pro-
vided an initial guess close to the solution.
NUMERICAL INTEGRATION 4
Most chemical process models arc nonlinear and rarely have analytical solutions. This
chapter introduces numerical solution techniques for the integration of initial value ordi~
nary differential equations. After studying this material, the student should be able to:
4.1 BACKGROUND
Thus far we have developed modeling equations (Chapter 2) and solved for the steady
states (Chapter 3). One purpose of developing dynamic models is to be able to perform
"what if' types of studies. For example, you may wish to determine how long a gas stor-
age tank will take to reach a certain pressure if the outlet valve is closed. This requires in-
80
Sec. 4.2 Euter Integration 81
tegrating the differential equations from given initial conditions. If the dynamic equations
are linear, then we can generally obtain analytical solutions; these techniques will be pre-
sented in Chapters 6 and 8 through 10. Even when systems are linear, we may wish to use
numerical methods rather than analytical solutions.
At this point itis worth reviewing the difference between linear and nonlinear dif-
ferential equations. An example of a linear ordinary differential equation is:
dx
= -r
dt •
since the rate of change of the dependent variable is a linear function of the dependent
variable. An example of a nonlinear differential equation is:
dx 2
= ~-x
dt
since the rate of change of the dependent variable is a nonlinear function of the dependent
variable. Although this particulary nonlinear equation has an analytical solution, this will
not normally be the case, particularly for sets of nonlinear equations. Notice that the fol-
lowing equation is linear:
dx. ( ) (4.1 )
dl = x =f x
If we use a forward difference approximation for the time derivative of (4, I), we find
dx + I _.
= (4.2)
dl t(k + I) ~ t(k)
82 Numerical Integration Chap. 4
where k represents the kth discrete time step of the integration. Now, assume that)(.\:) is
evaluated at x(k). We will refer to this fuuclion ast(x(k)), and can write (4.1) and (4.2) as
Where x(k) is a vector of state variable values at time step k and f(x(k» is a vector
of functions evaluated at step k. Equations (4.4) and (4.5) are explicit because the statc
variable value at time step k + 1 is only a function of the variahle values at step k. 'I'his
method is straightforward and easy to program on either a handheld calculator or a corn-
puter. A major disadvantage is that a small step size must he llscd for accuracy. llowevcr.
if too small of a step size is used, then numerical truncation problems may result. Explict
Euler is not often used in practice, but is covered here for illustrative purposes.
This method uses a backwards difference approximation for the derivative in (4.1). The
function (or vector of functions) is evaluated at time step k + 1 rather than time step k:
+I)-x(k)
6.1' = j(x(k + 1)) (46)
Equation (4.7) is implicit because the value x(k + I) must be known in order to solve for
x(k + 1). What this generally requires is a nonlinear algebraic solution technique, slIch as
Newton's method. For a linear system, equation (4.7) can be explicitly solved to obtain
the form
x(k + 1) = g(x(k))
The following section compares the explicit and implicit methods for a single linear ordi-
nary differential equation. In particular, we compare how the integration step size (At) af-
fects the stability of each method.
Consider the tank height problem covered in Example 2.1. There was no inflow, and the
outlet flowratc was assumed to be linearly related to height, which gave us the following
equation:
dx 1
x co Ax = f(x) (4.8)
dt T
where 'T = A/13, A = - lIT and the state variable x is the tank height. Since the variables
are separable, the reader should show that the analytical solution is:
x(t) = x(O)e,j· = x(O)e" (4.9)
Next, we compare this analytical solution with the explicit and irnplicit Euler solutions.
EXPLICIT EULER
The function value at step k is:
J
f(x(k») Oc - x(k)
T
and the state variable value at the next time step is:
IMPLICIT EULER
The implicit Euler method evaluates the function at k + 1 rather than k:
I
I(x(k + 1)) = - x(k + 1)
T
ill
x(k + I) ~ x(k) + - x(k + I) (4.1 J)
T
Notice that, since this is a linear problem, a nonlinear algebraic equation solver is not
needed for (4.11). We can rewrite (4.11) as
1
x(k + I) ~ ill x(k) (412)
+
T
In the next section we compare the numerical stability of the explicit and implicit Euler
methods.
NUMERiCAL 5TABILITY
The explicit Euler solution, written in terms of the initial condition, is (from (4.10»):
x(k + I) ~ (1 - flt)"
T I x(O)
which will be stable if 11- AlIT 1< 1. This is the same re~Htlt if we usc the representation:
x(k + i) = g(x(k)) ~ (I - ~1)X(k)
and the stability requirement that Ig' I< I. The explicit Euler method is then stable if:
ill
-1<1- <I
T
and will oscillate for:
The implicit Euler solution, written in terms of the initial condition, is (from (4.12)):
'"
x(k +
( )
I)~ I;~I x(O)
th
Sec. 4.2 Euter Integration 85
which will be stable if II/l+~t,'T1 < 1. This is the same result if we usc the representation
and the stability requirement that 11/ ::to < 1. Notice that the implicit Euler method is sta-
ble for any value of D.f (as long as the sign of D.l is corrcct) and will not oscillate.
The results shown in Tahle 4.1 are illustrated graphically by the curves in Figure 4.2.
implicit
explicit
FIGlJRE 4.2 Comparison of the exact solution with the explicit and implicit Euler for
D.t = I.
86 Numerical Integration Chap,4
Larger Integration Step Size. We have seen the well-behaved response for I at : : :
(which is 7/5). Consider now a larger D..t. We cun sec from (4.10) that the explicit l-:u1cr
method predicts.r::::: 0 for all time after time 0, if at;;:::; T. Indeed, the explicit Euler solu-
tion is oscillatory for fj,t > 7, for this process. For example, let at = 6 for this problem.
The results arc shown in 'fable 4.2. These results arc illustrated more graphically by
the curves plotted in Figure 4.3. The implicit Euler techniquc has monotonic behavior
and more closely approximates the exact solution. We sec that the implicit Euler
method call tolerate it larger integration step size than the explicit Euler technique.
4,0000
6 ° 4JJOOO
U04S
4JJOOO
-II-SOOO LSIS2
12 03629 0,1600 11-8264
IS 0-1093 ,(HmO IU757
24 (W329 OJI064 IU70S
2
~ implicit
exact
0
explicit
-1
0 5 10 15 20 25 30
FIGURE 4.3 Comparison of exact solution with implicit and explicit Euler for D.l;;o. o.
We have seen that thcre is a limit to how large a step size can bc tolerated by the explicit
Euler method before it goes unstable, while the Implicit Euler Inethod rcmains stable for
any step size. This is true for a simple linear ordinary differential equation. The following
example illustrates an important issue when solving nonlinear equations. That is. the im-
plicit Eulcr method requircs an iterativc solution at each time step.
Sec. 4.2 Euter Integration 87
fix
(4.13a)
dl
where x is the tank height and (/:::;; WA (:::: flow coefficicntJcross-scctional area).
Next, we compare tbis solution with the explicit and implicit r~Lllcr solutions.
Explicit Euler. The explicit Euler method yields the following equation
l<'or the numerical example of ([;;;; 0.8, curves for 3 different D.ts are shown in Figure 4.4.
2 3 4 5
F1G{][{E 4.4 Explicit Euler solution. !:1t:::: O.()I, 0.1, and LO. The 0.01 and 0.1 step
sizes yield virtually identical results. while there is a significant error ill a step size of 1.0.
Implicit Euler. The implicit Euler method yields the following equation
,(k + I) ~ x(k) -- uta\lx(k + 1) (4.15)
R.ecall that when we were dealing with a linear equation we were able to rewrite the implicit
Euler equation to yield an explicit calculation of the state variable at the next time step. Here we
sec that this is impossible for a nonlinear equation. Rewriting (4.15),
we sec that (4.16) requires an iterative solution. That is, at time step k + I we must usc a numeri-
cal method that \vill solve a nonlinear algebraic equation. We know from Chapter 3 that a num-
88 Numerical Integration Chap.4
bel' of techniques, including Newton's method, can be used. To illustrate clearly one approach
that we can take, let y represent tbe value of x at step k + I for which we desire to find the solu-
lion. We can rewrite (4.16) as
y + b\/v - c = 0 (417)
where y -= x(k + I), b "" 1:11 (/, and c :;;: x(k). If Newton's method is used, we can write:
MCr(i» c. y(i) + 1,v)'O) - c (4.18)
iJ
g'(y(i» ~ 1 + --7' (420)
2VY(I)
We call write (4.19) as (from (4.18), (4.19), and (4.20»
yO+ I),~y(i)-
Iln,'(i) -
iJ
(\1)'0)] (4.21 )
\lv(i) + 2
This technique is an extension of the Euler method. In the Euler method, the derivative at
time step k was used to predict the solution at step k+ 1. Runge~Kutta methods use the
Euler technique to predict the x value at intermediate steps, then use averages of the
slopes at intcmediatc steps for the full prediction from the beginning of the time step.
Sec. 4.3 Runge-Kutta Integration 89
The first Rungc-Kutta approach that we discuss is the second-order Rungc-Kutta method,
which is also known as the midpoint Euler method, for reasons that will become clear.
The Euler technique is first used to predict the state value at I:3.t12. The derivative is evalu-
ated at this midpoint, and used to predict the value of x at the end of the step, l:i.t, as shown
in r'igufc 4.5.
Let Tnj represent the slope at the initial point and lJl 2 represent the slope (dddt) at
the midpoint:
n1, ~ I(t (k), x()) (4.22)
At At)
n1, = [ ( t(k) + 2' x(k) + 2 n1, (4.23)
(4.23a)
or
x(k)
----------~
t k+ 1
It should be noted that the second-order RUllgc- Kutta is accurate to the order of :i1 2 ,
while the explicit Euler is accurate to the order of dt.
I
Ill, ~ r(x(k)) ~ ( -" T x(k) ) ~
-I
T x(k) (4"25)
(4"26)
Thus far, we have used single variable examples. The next example is for a two~statc vari~
able system.
Sec. 4.3 Runge-Kutta Integration 91
(4.27)
dh
c] i t ' . ) [ , ! ·.----
1-0.5vh,-h, ]
~
1,(h"h 2 (4.28)
dh,
[ dt 11;(h"h 2) 1 = 2< _I _1. ;,-
O. -, '2 2\16 \ h,
Since this system is autOnomous (no explicit dependence on time), we can leave (oul of the ar-
guments:
m, =
. I
];(h,(k), h2(1e))]
j(h(le)) = j;(h,(k), h,(k))
111 ~
.ti(h,(Ie) + at2 ""I' h,(k) +2
at] fI1 21 )
2
[1;(h,(k) + at2 Ill", h2(k) + 2
M
fI1 21 )
92 Numerical Integration Chap. 4
Let the initial conditions be 11 1(0) = 12 ft and hiD):= 7 ft. Also. let!J.! 0::: 0.2 minutes.
Por k = 0, we find
. 05 YI2-~7 I .. -0.118034.]
-7-,IY7- 1. 0.018955
2v6
so
~ 1-0.5vI1.988197-7.001896 ~ -0.116501
::~
10
1 - - - -
gL
81
7r--------
61o 20 --==========~!
40 60 80 100
time (minutes)
FIGlJUE 4.7 Transient response of the interacting lank example, using second-order
Runge- Kutta.
The idea behind the second-order Runge-Kutta can be extended to higher-orders. The
most commonly used method is the .f(Jllrth-order Runge-KaNa method as outlined in the
next section.
Using this method, the approximations arc more accurate than explicit Euler or sccond-
order Runge-Kutta. The idea is to use the initial slope (m J ) to generate a first guess for the
state variable at the midpoint of the integration interval. This first guess is then used to
find the slope at the midpoint (m 2 ). A "corrected" midpoint slope (m 3 ) is then found by
using mz. A final slope (m 4 ) is found at the end of a step using 111 3- A weighted average of
these slopes is then used for the integration. The algorithm is
fill ~ [(I(k), x(k)) (4.29)
t
94 Numerical Integration Chap.4
x(k + i) ~ x(k) j I
~!lL
11
-I- IJ}z
3
+ tn, + m•4
3 11
!,
uf (433)
To become rnore familiar with integration techniques, yOll should solve sOllle of
your initial problems using the explicit Euler method. Make certain that your step size is
small enough so that the errors do not build up 100 rapidly. As you find a need for more
accuracy, you should then lise the fourtlHlrdcr Runge-Kulla method. In Section 4.4 we in-
troduce the MAI'LAB routines that arc available for numerical integration.
Thc primary purposc of thc previous sections in this chapter was to review simple numcr-
ical techniqucs for integrating initial valuc ordinary differential equations. We havc illus-
trated the techniques with some simple numcrical examples, implemcnted as m-files in
MATLAB. In practicc, we do not recOlnmend that you write your own integration rou-
tincs. You will spend much tinle debugging these routines and they will generally not be
as po\verful as existing academic or commcricalintegration routines. Your goal should bc
to providc the correct formulation of the model, spccifying the corrcct initial conditions
and parameters. You should generally usc a well-documented, commerical or public do-
main integration code to implement your simulation.
MATLAB has several routincs for numerical integration; two arc ode23 and
ode45. ode2:3 uses second-order and odC'4:) uses founh-order RLlngc~Kutta integra-
tion. Both routines usc a variable integratioll step size (Lit is not constant). The integration
Sec. 4.4 MATLAB Integration Routines 95
step size is adjusted by the routinc to provide the necessary accuracy, witholll taking too
!llllch computation limc-,
To usc od(-~23 or ode4~-), the reader must first generate an m-filc 10 evaluate the state
variable derivatives. Theil the student gives the cOlllmand:
where
xprimc is a string variable containing the Halne of the Ill-file for the derivatives
to is the initial time
t t is the fjnal time
xO is the initial condition veclor for the state variables (usually a column
vector)
For example, jf the lillle vector has 50 elements, and there arc three state variables,
then the stale variable vee lor has the 50 rows and three columns. After the integration is
performed, if the student wishes to plot all three variables as a fUllction of time, she/he
simply types
plot(t,x)
If you only want to plot the second state variable. then the command
plot (t, x ( : ,2) ) is given.
consL~(1/{2*sqrtI6)));
'fhcn, the following command is entered ill the !VIATLAB command window:
Notice lhat we arc generating two arrays, ( and h, and using ode45. The function file is named
twotnk. m. The initial time is to :; :;: 0 and the final time is ~r:;;:: 100. The initial condition IS
110:;;:;: fl2 Tj'. At the MATI,AB prompt (») the following commands were given:
plot(t,hl"l))
12
11.5
£ 11
10.5
10
o 20 40 60 80 100
time (minutes)
a. Height of Tank 1
7.2
6.8
N
-c 6.6
6.4
6.2
6
0 20 40 60 80 100
time (minutes)
a. Height of Tank 2
Notice the tremendous reduction in effort when compared with generating your own Runge-
Kuua code.
Further Reading 97
Often it is desirable to know the state variable valucs at a particular timc or at fixed time
steps. A variable stcp size algorithm yields variable valucs that are not at a fixed step
sizes. One has two options. If the variable step size is smaller than that of the variable
step, then we could reduce the step slze. The major disadvantage is that computation time
will increase.
The best option (and that recommended by MATLAB) is to use a spline fit to inter-
polate or extrapolate the values to desired points. The routine used is interpl.
SUMMARY
It is important for the student to understand the Euler, as well as the second and fourth
order Runge-Kutta integration techniques. When using your own fixed step size integra-
tion code, be careful with the selection of !1t. In practice, it is preferable to use a commer-
cial integration code, which automaticalJy selects the integration step size.
The MATLAB routines llsed were
FURTHER READING
Parker, T.S., & L.O. Chua. (J 989). Practical Numerical Algorithms .ftJr Chaotic
S'.vstems. New York: Springer- Verlag.
STUDENT EXERCISES
dy,
··-=a(l-y)y
dt .2 I
dy,
;il = -13(1 - y,)y,
The parameters are <X = r3 = 1.0 and the initial conditions arc ."1(0) :;;;; 1.5 and
y,(O) = 0.75. The time unit is days.
a. Solve these equtions using explicit Euler integration. Compare various integra-
tion step sizes. What b.t do yOll recommend? In addition to transient responses
(t versus y, and Y2), also plot "phase-plane" plots (y, versus yz).
b. Solve these equations using the MATLAB integration routine ode45. Compare
the transient response curves with the Euler results.
c. How do the initial conditions effect the response of YI and Y2? Please elahorate.
2. Consider a CSTR with a second-order reaction. Assurne that the fate of reaction
(per unit volume) is propottional to the square of the concentration of the reacting
component. Assuming constant volumc and constant density, show that the modcl~
ing equation is:
dC
dt
t
Student Exercises 99
4. A gas surge drum has two componcnts (hydrogen and methane) in the feedstream.
Let Yi and y represent the mole fraction of methane in the fcedstream "mel drum, re-
spectively. Find dP/dt and {I,v/dt if the inlet and outlet now rates can vary. Also as-
sume that the inlet concentration can vary. Assume the ideal gas law for the effect
of pressure and composition on density.
Assume that the gas drum volume is 100 liters. The temperature of the drum
is 3 J.5 deg C (304.65 K).
At steady-state the drum pressurc is 5 atm, the molar flow rate in and out is
2 gmollmin and the concentration is 25Cff! mcthane, 75% hydrogen.
Usc Eulcr integration and ode45 to solve the following prohlems. Discuss
the effect of integration step size when using Euler integration. In all cases, you arc
initially at steady-state.
a. Assume that the molar llowrates remain constant, but the inlet methane concen-
tration is changed to 509h. F'ind how pressure and composition change with
time.
b. Assume that the molar f10wrate out of the drum is proportional to the difference
in pressure between the drum and the outlet header, which is at 2 atm pressure.
Perform a step change in inlet concentration to 5(Y./o methane, simultaneously
with a step change in inlet tlowrate to 3 gmollmin.
c. Assume that the MASS f10wrate out of the drum is proportional to the square
root of the difference in pressure between the drum and the outlet header
(which is at 2 atm pressure). Again, perform a step change in inlet concentra-
tion to 501ft" methane, simultaneously with a step ch;:mgc in inlet flowratc to
3 gmol/min,
d. Assume that the MASS rlowrates in and out are proportional to the square root
of the pressure drops. Assume that the steady-state inlet gas header is at 5 atm.
Perform a step change in inlet concentration to 50W" methane, simultaneously
with a step change in inlet pressure to 6 atm.
5. Pharmacokinetics is the study of how drugs infused to the hody arc distributed to
other parts of the body. The concept of a compartmental model is often used, where
it is assumed that the drug is injected into compartment I. Some of the drug is elim-
inated (reacted) in compartment 1, and some of it diffuses into compartlnent 2 (the
rest accumulates in compartment 1). Similarly, some of the drug that diffuses into
compartment 2 diffuses back into compartment 1, while some is eliminated by reac-
tion and the rest accumulates in compartment 2. The rates of diffusion and reaction
arc directly proportional to the concentration of drug in the compartment of interest.
The following balance equations describe the rate of change of drug concentration
in each compartment.
100 Numerical Integration Chap. 4
weight), and u = rate of drug input to compartment 1 (scaled by the patient weight.
[Lg/kg min).
Experimental studies (of the response of the compartment I concentration to
various drug infusions) have led to the following parameter values:
(k lO + k 12 ) = 0.26 mini
(k 20 + k21 ) = 0.094 min-I
k l2 k 21 = O.(1I5 mio- I
for the drug atracurium, which is a I1lll.<';clc relaxant. Notice that the parameters have
not hccnindcpcndcntly determined. Show (through numerical simulation) that all of
the following values lead to the same results for the behavior of xl' while the results
for x2 afC different. Let the initial concentration he 0 for each compartment and as~
slime a constant drug infusion rate of 5.2 fLg/kg min.
a. kJ2~k2l
b. k 12 =2k 21
C. k l2 = 0.5 k21
(i). If C",I(O) = 0.3833 and C",2(0) = 0'()9005, fine! how the concentrations
change with time.
(ii), [I' C",I(O) = 0.3333 and C",2(0) = 0.14005, find how the concentrations
change with time.
7. Consider a batch reactor with a series reaction where component A reacts to form
the desired component B reversibly. Component B can also react to form the unde-
sired component C. The process objective is to maximize the yield of component B.
A mathematical model is used to predict the time required to achieve the maximum
yiele! of B.
The reaction scheme can be characterized by
Here k]fand k tr represent the kinetic rate constants for the forward and reverse reac-
tions for the conversion of A to B, while k2 represents the rate constant for the con~
version of B to C.
Assuming that each of the reactions is first-order, the reactor operates at con-
stant volume, and there arc no feed or product streams, the modeling equations arc:
Many dynamic chemical processes arc modeled by a set of nonlinear, first-oruer differen-
tial equations that generally arise from material and energy balances around the system.
Common analysis techniques arc based on linear systems theory and require a ,\·tate~space
model. Also, most control system design techniques are based on linear models. The pur-
pose of this chapter is to provide an introduction to state-space Inodcls and linearization
of nonlinear systems. After studying this chapter the reader should be able to:
105
106 Linearization of Nonlinear Models: The State-Space Formulation Chap. 5
Thus far in this text we have discussed dynamic models of the general form:
x= f(x,u) ('ill
Fo
t
h1
tbi. F1
tt=L.
h2
A material balance around the first tank yields (assuming constant density and F] :;;; [1 IlIl)
(5.21
where A J is the constant cross-sectional area (parameter), I) I is the flow coefficient (paranlt'((TL
Po is the fJowrale into the tank (input), and hi is the tank hcight (state).
Writing a materi<l.1 balance around the ~econd lank (since Ii~l :;::- [)2ItZ)
F. J- _ ../3)' II
A, A, 2
Sec. 5.1 State-Space Models 107
where A 2 is the constant cross-sectional area for tank 2 (parameter), ~2 is the now coefficient
(parameter), F J is the flowratc into the tank, and /1 2 is the tank height (state). In this case, F I is
not an independent input variable that can be manipulated, since F 1 =. {3Jh J " We can write the
previous equation as
Notice that we can write (5.2) and (5.3) in the following matrix form:
(5.4)
x=Ax+Bu (5.5)
where:
/3,
A,
/3,
A2
The state and input vectors arc (notice that the input is a sC:;llar):
x = r~:J anel II = Fo
The additional equation that is nonnally associated with a state space model is
y"c:Cx+[)u (5.6)
where y is a vector of output variables. Generally, output variables arc variables that can he mea-
sured (at least conceptually) or arc of particular interest in a siumlation study. Here, we will con-
sider the case where both tank heights arc outputs. Let output I be the first tank height and out-
put 2 be the second tank height
y [I 0] [h'l
~ o I h,
cc ex
where:
c I
[o I
oj
108 Linearization of Nonlinear Models: The State-Space Formulation Chap, 5
/fwe also consider the input, F o' to be the third output variable, we have the following relation-
ship:
y ~ 'l I []
1
0
o
0
1 [;;'] +
0 2
' ()
0
1
[F;,]
which has n state variables (x), m input variables (ll) and r output variables (y). This rela-
tionship is normally written in the matrix form:
x~Ax-l-Bu
(5.7)
y~Cx -I-Du
where the dot over a stale variable indicates the derivative with respect to time. A~ shown
in Section 5.4, the eigenvalues of the Jacobian matrix (A) determine the slabihty of the
system of equations and the "speed" of response.
The aij coefficient relates state variable j to the rate of change of state variable i. Sillli~
larly, the bij coefficient relates inputj to the rate of change of state variable i. Also, cij relates
state j to output i, while dij relates input) to output i. We can also say that the klh row of C
relates all states to the ktll output, while the kth column of C relates state k to all outputs.
In this section we have shown how to write modeling equations that arc naturally
linear in the state-space form. In the next section we show how to linearize nonlinear
models and write them in the state-space form. Linear models are easier to analyze for
stability and expected dynamic behavior.
Most chemical process models are nonlinear, but they arc orten linearized to perform a
stability analysis. Linear models are easier to understand (than nonlinear models) and are
necessary for most control system design methods.
Before we generalize our results, we will illustrate linearization for a single variable
problem.
The function of a single variable, j(x), can be approximated by a truncated Taylor senes
approximation around the steady-state operating point (.-r):
. ~ f(xJ -I- ..
j(x) iif I (x - xJ -I- I ..,a rI (x - x,)' -I- hIgher
dx x,
2
2 dx x,
. order terms (5.9)
. = j(xJ
j(x) . . I (x - xJ
-I- af (5.10)
dx x,
Note that:
dx y ~jx,
()
~O (5.11 )
dl
110 Linearization of Nonlinear Models: The State-Space Formulation Chap. 5
dx = f(x) == 'iii
. I (x- x,)
dt rh .1,
where the notation 0f1(}ti.t is used to indicate the parlial derivative ofJ(x) \vith respect to .t,
s
evaluated at the steady-state. Since the derivative of a constant (1;) is zero. we call write:
dx d(x - 'J I) 13)
dl dl
ThcTcaSOll for using the expression above is that we arc orten interested in deviations in '-1
stale from a steady-stale operating point. Sometimes the symbol is llsed to represellt dc
I
viat;rm variu!JIes, x' ::::: X -'_:y We can sec that a deviation variable rcprcscllls the CIWll).!C
or perturhation (dcviatirm) 1'1'0111 a stcady-state value.
() 1)1
Similarly, consider a function with one state variable and one input variable
dx
x ~ f(X,II) () 171
dl
x .
/(X"II,) + ;'ill I
d.x .t,.Il,
(x - xJ .'ill I. (II - IIJ
+ {iu .1,.1/,
.iY'/1
.: (x - X,)(II - II,) + l ;i'il 2 1
(II ~.1
II,)'
dxtJU .1,.11, 2 rJlr .\\.11\
b
Sec. 5.2 Linearization of Nonlinear Models 111
x. ~~
,
. It )
fix
s, s.
iI f
+.
(Jx
I
.\",.(1,
(x - x )
- S t- ()ll
ill I
IJ',
(It - ItJ (5.18)
dx'
= (/ x' j-- b u' (5.19)
dt
If there IS a single output that is a function of the states and inputs, then:
Y g(x.lI) (5.20)
Again. performing a Taylor series expansion and truncating the quadratic and higher
terms:
(5.21 )
Since g(x,I"u\) is simply the stcady-state value of the output Cv), we can write:
(5.22)
or
y - y, ~ co (x - xJ + d (li - lIJ
where c:::: aJ;J{)xi.\. \" /I s and d = dg/au:,_'-
.\',II.\'
dh I· 13 \ II
<il .1 .'1
\vhcrc Ii i\ tlie sjalC \ariilhlc. F is the input \'ariahlc. 13 Hild A arc parameters. The riglJlhand side is:
I(ld)
r
A
1(l1F)
I ,
\
Ij \
,I
hi' I-
[3
2/\ \ h,
III (:,),251
I
rile ftl'\l terll] ell] the righthand side is lern. because the lincari/<ltioll is ahout a slcady~swtc
point. That is.
I
<ih I ()
dl!' J .1
hJ
II, 11.1
d(h I
I' + II
<il 1,,\ \ II A
!--'\)r \:UIl\CllicllCC (simplicl1;' in llotatj()!11 we often urlJJ! the (') notation and assume that x ~l!1d II
arc dc\j,Hi(1I1 \(lriahles Cr:::: Ii - h,. /I:::: r (,i dIld write:
til: IJ I
dl 2/\ \' h, I "
which i" in the :sta!('-sp;\l'l' form
dr
ux-l-bu (527)
dr
The prC\ious cx,-ullples sho\\ed how to linearize single-stale vari~lhlc systems. In this sec-
lion \VC geJlcralizc the technilJue for any' I1umber slates. lkfnre vvc generalize the tech- ur
niquc. it is worthv,hile to consider an example system with Ivve) states, olle input and OIlC
output.
~ . ._ - - - - - - - - - - - - _ -
••
Sec. 5.2 Linearization of Nonlinear Models 113
(5.29)
(5.30)
Performing a Taylor series expansion of the nonlinear functions, and neglecting the quadratic
and higher terms:
,II,
,ll""1
(Ju
f- _.
[ df e
(JII (5.311
, I <lg
d.t] t .. " . "
dg
ilx, I· ,II~' XI,
t"
J
5.2.4 Generalization
NO\\ consider the tll'ncral nonlinear Illodel \\'hcrc x is <l \cdor of II state v<triable,,_ lJ is (j
xn ..
1;,(x 1 ... .x/I·u I' , .. lI m )
In \-ector notation:
f( X,II) 15 ..\.11
g(x,u) (';,\41
F killen!" of the linearization matrices arc defined III the follll\ving fashion:
/\ 1.1
"1.1
(lX,' __ Ii
<11/, I .. "
b
Sec. 5.2 Linearization of Nonlinear Models 115
c,'.I = iJu
~
dAj
'''i I
.1,_1<,
(5.37)
i)u
D = -"-" I (538)
II aU
j
"/'>
AsslIlne that the flowratc out of tanks is a nonlinear function of tank height. The f]owratc out of
tank one is a function of the difference in levels between tank I and lank 2.
116 Linearization of Nonlinear Models: The State-Space Formulation Chap. 5
Also, assume that only the second tank height is measured. The output, in deviation variable
form is
Notice that there arc two state variables, one input variable, and one outptH variable.
Let
u = F- F,
The clements of the A (Jacobian) and R matrices «5.35) and (5.36» arc:
"fl
lJil 1
I
hJ;
IJ I
2A I Vhl,\~--h~;
Au =
ilf
ah'}
2
I
h F
".<
2A1VhL\-=7i~\
~I
~J ~2
2A2v'hl;~-li;_; 2A,vh"
li
II
= illi
I
ilF hJ', Al
1
=0
Since only the height of the second tank is measured, y 0::: g(h 1,h 2,F)::o::: h 2 -- ilL, (from (5.37)):
Il,
--- 2/tl\,/h l:;- :~)17s
(!li'] cc
Il,
[{fJ:}
dt
2A2V/hl,--~-h2'
t Ul}UI
y [O!] 1~:1
where:
In this section we have shown how to linearize a nonlinear process model and put it in
slate-space form. The states in this model arc in deviation (perturbation) variahle form;
that is, the states arc perturbations from a nominal stcady~stat:c. A stale-space moclel pro-
vides a good approximation to the physical system when the operating point is "close" to
the linearization point (nominal steady-state).
In Section 5.2 we illustrated the method of linearization of models into slalc~space form.
The objective of this section is to illustrate what is meant hy linearization of a function.
Consider the single tank height problem, which has the following model:
dh F f3 ...
~ J(h,l')·c - vh (5.39)
dl A II
for a system with A -= 1 n2 , !Is :::: 5 ft, and fj ;;:; I/V5
ft L5 /min the steady-state f10wrale is
3
F s ;;;;: I ft /min. To focus our analysis 011 the meaning of the linearization with rcspect to
the statc variable, consider the ease where the input is constant. Then, from (5.39) and the
given parameter valucs:
1
f(hYJ c.c I ~ vh (5.40)
0,5
~ linear
"'"
o
-a,s
o 2 4 6 8 10
x
(h,FJ '" 0 + (h - hJ
2\15
or
I
('(hF)=O--(h-h)
. 's . 10' (54 I)
10
6
'"
1"
'"
'q;
.' ..
.c 4 '
a
o 10 20 30 40 50
lime, min
FIGURE 5.4 Comparison of linear and nonlinear responses for two different
initial conditions.
Sec. 5.4 Solution of the Zero~lnput Form 119
We can see how good tbe linear approximation is by ploning both the nonlinear function
(5.40) and the linear function (5.4l), as shown inlijgurc 5.3 011 p. liS. Here we have used
x to represent tank height and .f(x) to represent the nonlinear and linear functions. Notice
that the linear approxiruation works well between roughly 3.5 to 7 feet. or course, the two
functions arc exactly equal at the steady-state value of 5 [eet, which was the point at
which the Taylor series expansion was performed. H.calizc that .f(x) is dx/dt, which is the
rate of change of tank height. It makes sense that the rate of change is positive at a tank
height less limn 5 feet, because the system "seeks" to achieve a steady-state level of
5 feel. Similarly, for a tank height greater that 5 feet, the rate of change of tank height is
negative, because the level "desires" to decrease to 5 feet. We can also see that the linear
system wiJl be slower than the nonlinear syslem, if the tank height is less that 5 feet, but
will be faster if the height is greater than 5 feet, as shown in Figure 5.4.
We have previously written the general state space Inodel in the following form:
x~Ax+llll
where x and u are deviation variable vectors for the stales and inpulS, respectively. In this
section we assume Ihat the inputs are held constant at their steady-state values, but thaI
the states may be initially perturbed from steady~state. The "zero-input" form of the state
space model is then:
[.j
\1
[ all {/lll
·]
XI
or
t'/I {lnl (/1I2 llll/l 1r
.fn
x Ax (542)
This form is used to analyze the stability of a system and to understand thc dynamic be-
havior of a system that has had its statcs perturbed from the steady-state values.
Recall that the single variable equation:
X ax
There arc many differenl ways to calculate the exponential of a matrix; in this chap-
ter we discuss only the similarity tr{[n.~1"orm method.
Recall that the eigenvector/eigenvalue problem is written (sec Module 2 for a re-
view):
AV=V;\ (5.44)
;\ =
I I 0 1..0
I..,
2
(5.46)
where (5.49)
and we sec imlllediately why Ai < () is required for a stable solution. The solution for x(t) is
x(t) = V e'" V-I x(O) (5.50)
An interesting result is that an initial condition vector in the same direction as ~i has a re-
sponse in the direction of ~i with a "speed or response" of Ai" This is shown by the foll{)w~
ing analysis.
x= Ax (5.42)
x = Vz (5.51 )
Sec. 5.4 Solution of the Zero-Input Form 121
or
z = V--- J X (5.52)
and notice that (from (5.51 )):
x= V Z (5.53)
Substituting (5.53) and (5.51) into (5.42):
Vz=AVz (5.54)
or, left multiplying by V-I
z = Vi A Vz (5.55)
But, from (5.44) A V = V A
so we can write:
V'AV=!\ (5.56)
which yields (from (5.55) and (5.56)):
z= !\ z (5.57)
But A is a diagonal matrix (sec (5.46», so we have:
z] = "-IZ\ (5.59)
12 = "-2 Z2 (5.60)
[ ZI(t)1
z,(t) = "e'0 " e',1O][Z](O)]
.Z2(O)
(5.63)
or
z(t) = eAl z(O) (5.64)
(5.65)
ESCOLA Dc EHGENHARIA
BIBLIOTECA
122 Linearization of Nonlinear Models: The State-Space Formulation Chap. 5
then:
z(t) (5.66)
(').67)
then,
(568)
that is. initial condition,,; of z{O) ::: will yield a ';spced of response" associated with
AI' v\ihile initial conditions ofz(O)::: " will yield a "speed of response" associated with
Al •
'I'llis means that state variable initial conditions in the "direction" of the first eigen-
vector will have a speed or response associated with the first eigenvalue:
(569)
and state variable initial conditions in the "direction" of the second eigenvector will have
a speed or response associated with the second eigenvalue
x(t) v z(t)
(5.71l)
Knowing the effect of the initial condition "direction" is impOitant. If a randOlll case
study approach was taken, then we might arbitrarily select initial conditions that \verc
'"fast.'" \vhilc other (missed) initial conditions could cause a much slo\\'cr response.
We \vill show two examples of tbe c-free! of initial condition: Example 5.5, where
the syS!elll is stable, and r':xample 5.6, \\'here the system is unstable.
t
Sec,5A Solution of the Zero-Input Form 123
XI = - 0.5 XI + x2 (5,71 )
(5,72)
A + 05 - 1 J) + 05)(A + 2) ~ °
det ([.
° A+ 2
= (A
so
A, - 0,5 A, = - 2
and the eigenvectors are
<, = [-11.5547
0,8321
'1
Note that Sl is the "slow" subspace, since it corresponds to Al = -0.5 and ~2 is the "fast" sub-
space, since it concsponds to'\2 :::;::-2,
The numerical values of (5.50) for this problem are
X(I) = V e'" V 'x(O)
O
-0,5547J[.e 011' 0,6667] x(O)
0,8321 ° "
e" °
1.2019
(5,74)
X(O) = I. - 0.5547.1
0,8321
(5,77)
124 Linearization of Nonlinear Models: The State-Space Formulation Chap. 5
- 0.5547
X(f) (5.781
0.8321
Note that x(O) :::; ~l"'" f.lll is the slow initial condition and x(O) :;; ~2 :::;; I---~;_:~-_:~ I is the fast
initial condition, as shown in Figures 5.4 and 5.5. The initial conditions in the fast subspace IWH'
reached the steady-state in roughly 2.5 minutes (Figure 5.6), while the initial conditions in the
slow subspace afC roughly 7SCYo complete in 2.5 minutes (J-'igurc 5.6').
The expm (matrix exponential) function from MATLAB can be llsed to verify these simula-
tions. Using t :;; 0.5 and the fast initial condition, we find
t
Sec. 5.4 Solution of the Zero-Input Form 125
fa.:H suospace
x(O) = [- 0.5547 ]
0.8321
-1
o'-------------------='
2 345
The previous example was a stable system. The next example is an unstable system.
<1 = o.R719]
I
...
0.270:1 .1
-O.962g . <2 - l0.4896
since Al < 0, s[
is a stable subspace; since A2 >. 0, S2 IS an unstable suhspace.
The solution for this system is:
O,'7(H!
x(O)
-- O.~h2-f-; I
we find the fulJrming :--1,l1C SolUli(l1l
O.270J ('
xl t)
- O,9h28 ('
stable sUbspace
~
o ~~-~--===-------I
x ~~
f /,. ~[
-0 5
1/ " x(O)
-0.2703]
0 9628
-I'L----:----------::---;;------
o 2 3
x(lI) 0 X7191
[ (l'-iS96
o
o 02 O~ 06 08
Il should be noted lhal if the initial conditioll is Ill)! ('.Y(lU/\' in the stahle slIh"pacc. the solUliull
\\'illl.w~jll to di\l'I'!,!c and hCCOllll' unslahk. Thut is. if thl' initlal cunditi()11 i" olT by. "a;, 10 !p.
thl' rl'Sp()Il"l~ \\,ill l'\,cntually lxconw Llllbuumkd.
t
Sec. 5.6 MATLAB Routines step and initial 127
;.]
Now, consider the general form:
b 12 ",-
"T] l"
at?
x=a.\l-bu (5.80)
b
X(I) ~c en, x(O) I (e'" - I) 1/(0) (5.8 I)
a
where
(583)
F:quation (5.82) can be used ttl solve f{}I' a system where the inputs change from time step
to time step by using:
where k represents the kth time step. Often a general purpose nuttlcrical integration tcch~
niquc (such as one presented in Chapter 4) will be used to solve (5.79).
We show the usc of step and 1. nit i a 1 by way of the following example.
128 Linearization of Nonlinear Models: The State-Space Formulation Chap. 5
x=Ax-fBu
)'=Cx+Du
where:
A= o 009056-]
- 0.7500 2.5640
B _[- 1.5302 [
_ 1.8255
[oI 0]I
J) - [~;I
Enter the state space model:
<::1
o 0.9056
-0.7500 -2, 'j640
» b co:: [--1.5302;3.8255)
b c
-1.5302
3.8255
>-,.c [l,O;l,OJ
1 0
o 1
»c1 [0;0)
d
o
o
t
Sec. 5.6 MATLAB Routines ~;tep and initiiJl 129
» eig(a)
ans : :; :
~().3000
-2.2640
The MATLAB step [unction assumes a deviation variable form (the initial conditions
are zero). The cOlllmands arc.:
» [y,x, t] stcp{a,b,c,d,l);
" plol(t.,y)
which yields the plot shown in Figure 5.9.
Notice that the ::3 te-p function automatically determined the length of the Ii me vec-
tor. You may also provide an equal~spaccd time vector and usc the following command
[y,x] = step(a,b,c,d,l,t)
The MATLAB ini t ial function assumes a deviation variable form, with the initial
conditions perturbed from zero. The commands arc:
» [Y,x,tJ = initial(a,b,c,d/l);
» ploL(t,y)
Notice that the band d matrices are not really used by' the initial function. since it is as-
sUllled that there is no input change.
SUMMARY
In this chapter we have developed a statc~spacc model of a chemical process thm is in..
hcrcntly linear (e.g., the tank height example). \\ic have also \ho\vn I1mv to linearize
models that are nonlinear. The models obtained in this fashion arc based on r/eriulioll
l'ariables, that is. the states and inputs arc perturhotiolls from the steady-state operating
point where the linearization is pcrfonncd. The stahility of a nonlinear syqcrn is deter-
mined from the eigellvalues of the Jacobian matrix in the linearized model (statc-sracc
form ).
Several important concepts were presented in this chapter.
For unforced systems (zero input). the initial conditiclll vector \vil! determine the
"speed" (If response. For stable systems (all A 0), the eigenvector associated \vith
the largest rnagnitude A is the fast direction, while the eigenvector associated with
the smallest A is the s\()\v direction.
Although it is possible for a system with both Ilegatin; (stable) and positi\e (unsta-
ble) eigenvalues to have stable behavior if the initial condition is In the stable sub-
space, this is impossible in practice. Any perturhation from the stable trajectory \-vill
cause lhe solution to become unbounded (unstable).
state-space
Jacobian
deviation or perturbation variable
eigenvalue
Student Exercises 131
eigenvector
linearization
stability
Taylor series
FURTHER READING
Luyben, W.L. (1990). Process Modeling, Simulation and Control for Chelnical En-
gineers, 2nd Ed., New York: McGraw-Hill.
Marlin, T.E. (1995). Process Control. Designing Processes and Control Systems for
Dynamic Performance, New York: McGraw-HilI.
Ogullnaike, B.A. and W. H. Ray (1994). Process Dynamics, Modeling and Control,
New York: Oxford University Press.
Seborg, D.E., T.F. Edgar, and D.A. Mcllichamp (1989). Process Dynamics and
Control, New York: Wiley.
Stephanopoulos, G. (1984). Chemical Process (:ol1trol: An Introduction to Theory
and Practice, Englewood Cliffs, NJ: Prentice-Hall.
STUDENT EXERCISES
Assume that the density of the streams remains constant (independent of con-
centration). The reaction is a first-order (irreversible) decomposition (11 --> B).
Molar rate of decomposition of A (per unit volume) = k CA
132 Linearization of Nonlinear Models: The State-Space Formulation Chap. 5
d('., F ,
V ((",1/ - CAl - k. (", - k, (":,
dl
dC" F
V ( .. ("/1)1 (k, (A - k: elll
dl
5 5 . I liters
nlln- I k, =----:-
I
where k, min Ie
6 ] , 6 mol min
10 mol mol
(" ~ .,-~
(Ii I iter
liter ii' .
a. Find the steady-state dilution raIl' UIVj and concentration of B (show all units).
h. Linearizc and put in state-space hlrm (find the numerical values of the A. B, and
(' matrices), assuming that the manipulated vari,l!,!e is dilution rate (F/I/) , and
the output variable is CI).
c. r;'ind the eigenvalues (shmv units).
d. Find perturbations in initial conditions that arc in the fastest and slo\-vcsl directions.
h
Student Exercises 133
4. A chemical reactor that has a singlc second-ordcr reaction and an outlct r10wrate
that is a linear function of hcight has the following model:
dVC 2
--
dt
= Fe In III
- FC - WC (5.87)
dV
= F -F (5.88)
dt III
where the outlct f10wratc is linearly related to the volume of liquid in the reactor
(F == 13V). The parameters, variables and thcir steady-state values are shown below.
Equations (5.87) and (5.88) can be written in physical state variahle form as
dC = Fi" (C _ C) _ kC 2 (5.89)
dt V - (1l
dV
dt = F - "V
t..J 11/
(5.90)
H. l---ist the states, outputs, inputs and parameters for the nonlinear equations (5.89)
and (5.90).
b. Linearizc (5.89) and (5.90) and write the state space modcl (find the numeric_al
values for the A, B, and C matrices), assuming that thc inlet tlowratc is the input
variable and that both states arc output variables. Define thc deviation variahles
for states, inputs, and outputs.
5. Find the "fast" and "slow" initial conditions for the foJlowing model
6. Find the stable and unstable subspaccs for the following system of equations
Plot the transient responses for initial conditions in both the stable and unstable sub-
spaces. Show that a small perturbation from the stable initial condition will lead to
an unstable solution.
134 Linearization of Nonlinear Models: The State-Space Formulation Chap, 5
1
13 0 I" I ]
"-
AI,
13 1
_
13,,
1
["1\
",'.
+ AI,
0
I';,
I
A, A, . .
Consider a system where the stcady~statc f10wratcs arc 5 ftJ/min, and the following
cross-sectional areas and steady-state heights:
Al ~ 2n' A, ~ lon'
hi ~ 2.5 It h, ~ 5 It
1,
--1
0,2 - OJ
0 '1Ihh, ,I+[05I Fl
0 "
dl'
dl
" 'Y hp- 13 I'
Student Exercises 135
b. Usc the scaled variables, tv and z, to find thc following scaled modeling equations
Ii p
ll' z=
rill'
,,(I ~z)w
d/
dz
=~ fl (1 ~ w) Z
d/
c. [<'ind the eigenvalues of the Jacobian matrix for the scaled equations, evaluated
at W s and zr Realize that ll'.I ' and z,\. are 1.0 by definition, Find the eigenvalues in
terms of ct and f3.
d. "rhe parameters arc (~ :::0 f3 ;:; : 1.0 and the initial conditions arc w(O) ;:;;: 1.5 and
z(O) = 0.75.
i. Linearize and write the state-spacel~ml1 (let the state variables be Xl :::0
HI ,- It\- and );:, ;;;;; Z - z).Find the initial condition vector xo ;;;;; [,,".,«0)) [, to use
. ~ . 'x,D
with in.it_ial. -
ii. Solve the state space model from (I) lIsing lsim and plot the transient re-
sponse of Xl and x2 as a function of time (plot these curves on the same
graph), simulating to at least t ;:;;: 20.
iii. Show a phase-plane plot, placing Xt on the x-axis and x2 on the y-axis.
iv. WhItt is the "peak-to-peak" time for the bacteria? By how much time docs
the protozoan "lag" the bacteria?
9. Consider the state-space model
Ii'l I. ~ 1.0
"2 4.0
a. Find the "fast" and "slow" initial condition directions.
~
0.011 X'i
5.0 .\,
~
136 Linearization of Nonlinear Models: The State-Space Formulation Chap. 5
Assullle a firsHmJcr decornpositi()tl of ;\-->8. Assume that all flo\\TatC\ arc C(lll·
stant (volumes arc consUlllt).
a. \\;'ritc the moueling equations for concentration or A, using either the instanta-
neous or integral method.
h. \Vritc these in state-space form:
X~AX4 Bu
c. Given the following constants. calculate the steady-slale concentrations:
I·;, =
_ kgnlOl
cu .j L
111
IJ.3.1.13.1 hr I
d. Find the eigenvalues of the A matrix. Discuss the swbility of this Sy'stClll.
e. The inlet concentration. ('Ii' is changed from 1.5 to 1.75 at {:::: O. Usc ,:;l:cp tel
simulatc the behaVior of this system.
11. ;\ stirrc,d lank heater is used to supply a chemical proct:~ss \vith a fluid at a constant
temperature. The heater receives fluid from an upstrcam pnll'l'SS unit \vhich may
cause the f10wrate or tcmperature to change.
Consider the diagram of the stirred tailk heater sho\vn belt)\:!". \vhere the tank
inlet stream is received from another process unit. /\ heat transfer fluid is circulated
through ajacket to heat the fluid in the tank, Assume that no change of phase nccurs
in either the tank liyuid or the jacket liquid.
---
Tank F,
~
inlet
T, Jacket inlet
~ r-
V T
Tank F
Jacket T
Jacket
outlet Tank outlet
Part 1
a. Write the dynamic modeling equatiolls to find the tank ami jacket tcmperaturcs.
Do not usc any numerical values----Jeavc these equations in terms of the process
parameters and variahles. State any additional assumptions needed [0 sol ve the
problem.
Student Exercises 137
Part 2
Assume that both the tank fluid and the jacket fluid are water. The steady-state val~
ues of this system variables and some parameters arc:
u= input variables
Part 3
h. Simulate the system of state-space equations for a step change in the jacket
flowratc from F:i =: 1.5 ft 3/min to l'j =1.75 ft 3/rnin F at time::: 5 minutes (work
in deviation variables, but remember to convert back to physical variahles be-
fore plotting). What is the final value of the states, in the physical variables
(T and 7/? Plot the response.
i. Perform some simulations with step changes on some of the other input vari-
ables. Comment on any different behavior that yOll Illay observe.
12. Consider the following model of 2-stagc ahsorption column:
dzdl ~, (L)
MM·
w _ (L + Vii) "+ V ".
M'I
where IV and z arc the liquid concentrations on stage I and stage 2, respectively.
L and V arc the liquid and vapor molar flow rates. 'Zr is the conccntration of the vapor
strcam cntering the column.
Thc steady-state input values arc L := 80 gmol incrt liquid/min and V:::: 100
gmol inert vapor/min.
'fhe paramcter values arc M:::: 20 glnol inert liquid, a = 0.5, and 7f= 0.1 gmo]
solutc/gmol inert vapor.
H. Find the steady-state values of wand z.
h. Lincahzc and find the stale space model, assuming that L and V arc the inputs.
c. Find the cigenvalucs and eigenvectors of A (Jacobian).
d. l,'ind thc expected "slowest" and "fastcst" initial conditions (perturbations from
steady-statc).
13. Most chemical proccss plants have a natural gas header that circulates through the
process plant. A simplified version of such a header is shown below.
Pi
From valve i
source
Plant piping, represented Gas drum for To furnaces
as a perfectly mixed drum a boilerhotlse
unit
Here, the natural gas enters the process plant from a source (the natural gas
pipeline) through a control valve. It flows through the plant piping, which we have
represcnted as a perfectly mixed drum for simplicity. Another valve connects thc
Student Exercises 139
plant piping to the gas drum for a hoilerhouse unit. Gas passes through another
valve to the hoilerhouse furnaces.
The objective of this problem is to develop a linear model that relates changes
in valve position to changes in drum pressures.
a. Write modeling equations assuming that the pressures in drums I and 2 arc the
state variables. Let thcinput variables- be (I) valve position I, (2) valve position
2, and (3) sourcc prcssure.
b. Solve for the steady-state conditions and write the modeling equations in lincar,
deviation variable form.
x=Ax+Uu
y = ex
x=
,
rP2p , -- 1"'1
Ph
= state variables
\I :;::
change in valve position 1
change ~n v<.llve position 2
J = input variables
[
change III sourCe pressure
y output variables
c. Study the effect of step changes in each input on each tank pressure.
HINTS: For simplicity, assume that the following equations can be used for the flow
through the valves:
where the f10wrate is in Ibmol/min, h is the fraction that a valve is open (varies be-
tween 0 and I), and Ct is a valve coefficient.
CONSTANTS:
V, ~ I 135 n3, V, ~ 329 ft3, Temperature ~ 32 "F
psia ft J
R (gas constant) ~ 10.73
IbmoloR
Make separate step changes of 0.1 (10(*)) in the valve openings, and! 0 psia in the
inlet pressure. Simulate for t:::; 0 to I = 15 minutes.
14. A strealll contains a waste chemical, W, with a concentration of 1 mol/liter. To Illeet
EPA and slale standards, at least 9()fJ{) of the chemical must be removed by reaction.
The chemical decomposes by a second-order reaction with a rale constant of
1.5 liter/(mol hr). The stream nowratc is 100 Iiter/hr and two available reactors
(400 and 2000 liters) have been placed in series (the smaller reactor is placed before
the larger onc).
a. Write the modeling equations for the concentration of the waste chemical. A')-
sumc constant volume and constant density. Let
where:
u~
f. The system is not initially at steady-state. Solvc the following for the linearized
model, using the MATLAI3 function initial (first, convert the physical vari-
ables to deviation variablcs)
i. If Cw,(O) = 0.3833 and C w2 (0) = O.(J9005, find how the concentrations change
with timc.
ii. If Cw,(O) = 0.3333 and CwiO) = 0.14005, find how the concentrations
change with time.
Relate these responses to the eigenvalues/eigenvector analysis of c. Discuss the dif-
ferences in speeds of response (you should find that a perturbation in the first reac-
tor concentration responds more rapidly and a perturbation in the second reactor
concentration).
The MATL.AB ini tial function needs you to create the following matrices
before using it:
ESCOLA Dc ENGENHARIA
BIBLIOTLCA
SOLVING LINEAR nTH 6
ORDER ODE MODELS
The purpose of this chapter is to review methods to solve solve linear 11th order ()[)F~s,
After studying this material, the student will be able 10:
Transform a linear state-space model with 1/ states to a single nth order ordinary
differential equation.
Solve an 11th order constant coefficient coefficient homogeneous ODE.
Solve an 11th order constant coefficient coefficient heterogeneous ()DE.
Solve a first-order ()DE with a time-varying coefficient.
Usc the H.outh stability criterion for stability analysis.
6.1 Background
6.2 Solving Homogeneous, Linear ODEs with Constant Coefficients
6.3 Solving Nonhomogeneous, Linear OIJEs with Constant CocfTicicnts
6.4 Equations with Time- Varying Parameters
6.5 Routh Stability Criterion ,.. Determining Stability without Calculating l:':igen-
values
142
Sec. 6.1 Background 143
6.1 BACKGROUND
A model composed of a single, nth order linear ordinary differential equation has the fol~
lowing form:
dx
... + {/,(t) + ",,(I) x
til (6.1 )
du
+ b,(I) til + b,,(I) It
where the state variable is x and the input variable is u. 'rhis general model is linear be-
cause the state (x) and input (ll) and all of their derivatives with respect to time appear lin-
early. Notice thallhc coefficients do not have to be linear functions of time, however.
Models of the form of (6.1) do not arise naturally when chemical processes arc
modeled. As shown in previous chapters, dynamic chemical process models arc generally
sets of first-order (either linear or nonlinear ordinary differential equations. The advan-
tage of the form of (6.1) is that there exist a number or·tcchniques to obtain analytical
solutions.
In this chaptcr we show how t(? transform scts of lincar, first-order differclltial equa-
tions to a single nth order differential equation. We then review several techniques for
solving this type of equation. For motivation, we use Hbatch reactor example to illustrate
each of the tcdllliques. It should be noted that there arc many good mathematics tcxts that
covcr each of these techniques in more depth (see Boyce andlJiPrima, 1992, for cxam-
pic). Our goal here is to provide a concisc overview of some morc lIscful tcchniques to
solve dynamic chemical process problems.
Cunsidcr a hatch chemical reactor, where there is no flow in or out of the vessel. The reactor is
initially charged \vith a liquid of volume \I and an initial concentration (mol/liter) of reactant A
of" C~,IO'
We consider a series reaction where component A reacts to lImn the desired component
B. Component B call rurther relet to form the undesired component C. Each of the reactions is
irreversihle, so A can react 10 rorm R, hUI B does not react to form A.
k k
A --,>1 11 -}- C
Here k l represents kinetic rate constant (lime l ) for the conversion of /\ to Ii, while k] represents
the rale constant II)r the conversion of U to C.
Since component 8 is the desired product, we would like to know how long to run the fe-
action in order to maximi/.c the amount of 8 produced. If the reaction time is too long, all or B
will eventually be converted to C,
Develop the Modeling Equations. Assume that each of the reactions is first-order. Since
the volume is constant (dVldt ;:;:; 0), and there is no flow in or out, the modeling equations arc
(the reader should be able to derive these, based on material balances on each component);
144 Solving Linear nth Order ODE Models Chap. 6
dC""j
k 1 Cit (6.2)
dt
~{_Cll (6.3)
dt
dec _ . '
-'--- Ie, (II (6.4)
f
{/
where C.',\' C'fj, Hnd C( represent the concentrations (mol/volume) of components A. fl, and C, re-
spectively. The units for the rate constants (k 1 and "-2) arc LIllie' I.
Notice that the time faLl' of change of component A is only a fUllction of the COllccntnllion
of /\. 'fhcH equation (6.2) call be solved, since C~4 and t arc separable, (0 find
(6.5)
where C;\O is the initial condition for the concentration of 1\. If we define the conversion of A as
\: :;;:; (CAO - C;\)/('"o and the dimensionless time T :::: kJt. (6.5) can be represented by the single
curve shown in r;igurc 6.1 (x:::: [ ~ ('7).
0.8
0.6
c
.Q
"'>
ill
c
g0.4
0.2
o
o 2 3 4 5
dimensionless time
Reduce to a Single Equation for CB. Here we have (wo different ways to solve for ell'
Method I, Substitute (6.5) into (6.3) to obtain the expression
(6.6)
Sec. 6.2 Solving Homogeneous, Linear Odes with Constant Coefficients 145
(6.7)
(6.8)
Substituting (6.7) and (6.8) into (6.2), we find the second-order equation:
(!2~~'-'i deft
{It
' + (k, + k,) + k,k, ('/I C 0 (6.9)
til
(6.10)
d/lx {pr--1x dx
lin tit'f + an _ I dt'l-l + ... + ", {/
I + aox = 0 (6.11)
(6.12)
Equation (6.12) is called the characteristic equation. The n roots of the characteristic
equation are called eigenvalues (in control textbooks the rools are often called poles). The
eigenvalues arc used to solve (6.1 I). Two related methods are used, depending on
whether the eigenvalues are distinct (all are different) or repeated (some are the same),
146 Solving Linear nth Order ODE Models Chap. 6
We sce that (6.12) is ,jJl nth order polynomial that will have JI roots, Ai' If all of the roots
arc distinct (not repeated), the solution to (6.11) is
(6.11)
where each or the constants ('I through en is found from the initial conditions, \iO).
!lx ll " I (0 l!dIIl··1 .
In (lrder [0 find the coefficients, c i' \VC rl)ust know the illitia/ cOlldifiollS for r and its
derivatives.
A+ k] II
and [he eigenvalue is A:o: -- k l The solution is then
C\(I) =c J
C k! (6.16)
\\hich is the ",[llle result nhlaillcd in (h.)) usil1g Sl'lMratioll of variablcs and integnilioJ1.
Now. let's cuntilluc and use lhe gel]cnd procedure 10 so!vc a sccond-order differential
eqllalion
(I
(h.! 01
t
Sec. 6.2 Solving Homogeneous, Linear Odes with Constant Coefficients 147
(6.19)
We need two initial conditions, ell(O) and dCjj(O)Jdt, to evaluate the constants, (:1 and ("2'
We assumed that there is no component B in the reactor initially, so ell(O) :::: O. From
(6.20) we then find:
(6.22)
Taking the derivative of (6.20) and using (6.21) and (6.22), we find:
C,,(t) (623)
This expression can be used, for eX<llnple, to solve for the amount of time that will yield the
maximum amount or ell (see student exercise J 5).
Dimensionless Equation, It should also be noted that (6.23) call he made dimensionless by
defining the following variables:
x Cfic'!W = conversion of A to B
= dimensionless time
to find:
I
[expCT) _. exp(-uT)1
n ~- 1
which is shown in Figure 6.2, for a "'" 0.5 and 2. Notice that when the first rcw:tion is faster than
thc sccond (ex "'" 0.5), there is a highcr concentration of B than when the first reaction is slower
148 Solving Linear nth Order ODE Models Chap. 6
than the second (0: = 2). When the second reaction is faster than the first, component B reacts
further to form C before a substantial amount of H is formed.
0.5
............ _-~
-alpha ~ 0.5
co 0.4 - - alpha 0 2.0
'0
C
"'"c0 0.3
""'
"'
'"
:'~~~~,
C
.Q 0.2 .:
,
"' ..
"'c , '.
'"
E :' ",
'6 : ",
0.1 " ....
0
0 2 345 6 7
dimensionless time
FIGLJRE 6.2 Concentration of B as a function of time. When the rate for the second
reaction is faster than the first «(~ = 2), the peak concentration of B is lower.
We notice in the previous example that (6.23) cannot be used if k 2 :::: k l . This is a case
where the eigenvalues are repeated. The procedure for repeated eigenvalues is shown
next.
If a particular root in the solution of (6.12), Ai' occurs r times, then the corresponding
terms in the solution to (6.11) are:
(6.24)
~t':~_:.11_ (6.25)
2
rIl
Sec, 6,2 Solving Homogeneous, Linear Odes with Constant Coefficients 149
A' + 2 k A + k2 ~ 0 (6,26)
(A + k) (A + k)c., 0
A, ~ A2 ~ -k
Notice that we can find cl from the initial condition for C n- From (6.27) at t = 0,
at t = 0,
"e,,(O) ,
dt - k CAO
so:
If we define lhe conversion or A to H as x = c,/eAO ' ilmllhe dirncnsionlcss tiulC as T;::: kt. then
(6.29) can be written:
which is shown ill Figure 6.3. The reader should be able to find the 1l.1<1xiunJJn value for the COI\~
version of A to n and the reaction time required for this conversion.
0.4 ----,.-
0.35
0.3
0.25
0.2
0.15
0.1
005
o ________-' -'-- L.
o 2 3 4 5
dimensionless time
FIGURE 6.3 Conversion of A to B as a fUllction of dimensionless time (T "" kt), for the
case of equal rate constants.
The previolls example illustrated the solution for systems with real roots. The next cxam~
pie illustrates a system with complex roots.
- - - - - _.. _ ~ -...
A' + A+ I o (6.32)
Solving for the roots lIsing the quadratic formula, we find that the rools mc complex:
± -4
2
A~_l±V.3.
2 2 J
Sec. 6.2 Solving Homogeneous, Linear Odes with Constant Coefficients 151
,(t) c .1 e(-
- 2I 2 j t + c 1 e (J
+ V3) ,- 2 - Vi)
--2'-- j t (6.33)
and the property that eXtI' "" eXe Y to write (6.33) as:
x(t) 1
'
10
ce'-cos 1 _ •
V3
2
(--I J'sill
.
Vii
2 c ('. '/'"cos
t -1- ' [Vi Vi I
. 2 1-- J" .sin 2 I (6.36)
x(t) = e l ., [c 1 COS V3
/- 2 t (6.37)
x(t) e 2
lie;>[V
cos 2i t + c 4 sin Vi
2 t I (6.39)
Again, initial conditions for x(O) and ~\:(O) can be used to determine {'3 and ('4- The student should
verify that jf x(O}:::: 1 and ~~(O) = I, then c J :::: \.0 and (.'4 ::::1.5. A plot is shown in Figure 6.4.
1.5
::.:; 0.5
0.5
o 2 4 6 8 10
Chemical process system models with complex roots include some exothermic chemical
reactors. Also, models including feedback control will often have complex roots (leading
to oscillatory behavior).
We can now generalize the results of Example 6.2 for any equation that has pairs of com-
plex roots. For each pair of complex roots, A ;: : ; At ±j Ai' where Ar and Ai arc the real and
imaginary portions, the solution is:
In the previous example the real part of the complex roots was negative (stable).
Notice that the state variables decayed to zerO with time. Notice from (6.40) that there
will be no decay (simply a continuous oscillation) if the real portion is O. We can also sec
from (6.40) that a positive real portion of the complex root will lead to an ever growing
(unstable) solution. This behavior is shown by studellt exercise 19.
Most chemical processes are stable; however, some exothermic chemical reactors
have unstable operating points. Also, improperly tuned feedback control systems call be
unstable.
Thus far in this chapter we have solved the homogeneous problems. Homogeneolls
problems result from models that are "unforced," that is, there is no input. This usually
occurs when the process model is in deviation variable form, and there is no change in the
input variable. They are based on a perturbation from steady~state in the state variable
values.
In Section 6.3 we will solve nonhomogeneolls problems llsing the rnethod of undc-
tcnnined coefficients. These types of problems arise when there arc input changes to a
process.
(6.41)
In this section we will solve nonhomogeneous problems with the following form:
2. Solve for the particular solution by determining the coefficients of a trial function (sec Table
6.1) that satisfy the non!1o!11ogcncOlls equation
X,,(I)
:t Combine the two solutions for
X(I) ~ Xu(l) + X,.(I)
A (a constant) B (a constant)
Ac(~(
BeHI
A cos ca or A sin at 8] cos ctl + B} sin of
A ttl 11,/1/ + Bn_1lll--J + ... + flo
(6.43)
Step 2. Since the forcing function is k] CAU e k,I, we use c2 e k,f (Table (),1) as our trial func-
tion for the particular solution:
Xp(t) c). e kl ! (6.45)
c, k,
c-- (6.47)
k2 ~ k,
(' (f)
;\
= c e
1
I..,,' + k, __ k e kit (6.48)
l
(.'\ =
which, of course, is the same result obtaineu previously (0.23) by solving the second-order ho-
mogeneous equation in CII _
We have lIsed a single first-order equation to illustrate the procedure for heterogeneous
equations. The same procedure is used for higher-order equations.
Notice that the coefficient is timc~varying and the equation is heterogeneous. One
approach to solve thiS type of problem is to use an illtcf.iratingfactor.
Let the integrating factor be represented by 1J.(r)
I
exp lJ l'(t) dt «11; -+ exp If p(t) dtl p(t) x ~ exp If pet) dtl q(t) (6.52)
Notice that the lefthand side of (6.52) is simply the expansion of:
(~t [X(t) exp {Jp(t) dt}] ~ exp lJp(t) dtl (:;; -+ exp lJp(l) dt] p(I)X (6.53)
b
Sec. 6.4 Equations with Time-Varying Parameters 155
so we can write:
x(t) exp [f pet) dl] = fq(t) exp IJP (I) dtl ill + C (6.55)
X(t) = exp [- f pet) dl] {X(O) + fq(t) exp II p(t) dt] ill} (6.56)
(6.57)
(6.5X)
dve 1
---~.
dV + v-_·_
= c., _. dell
_ ··· (6.59)
dt A dt dt
we find:
(6.60)
and:
(6.62)
Let:
exp IJ pet) ilt] = exp [In t + kit + c,l ~ exp [In t] exp [kltl exp [cd
= c, I exp [kll] (6.64)
156 Solving Linear nth Order ODE Models Chap. 6
Multiplying through on each side of (6.64) by ('2! ('xp Ik1tl and dividing by c_'
to find
V(T)
, 11 - exp [ ,II (6.69\
1 - _ . . ~--- ,----
« 0.8
o
o
c
o
~ 0.6
~
~
co
~
~ 0.4
E
is
0.2
o
o 2 4 6 8
dimensionless time
t
Sec. 6.5 Routh Stability Criterion 157
The stability of the characteristic equation is determined from the values of its roots
(eigenvalues). This is easy for first and second order equations (and not too hard for third)
since there is an analytical solution for the roots of polynomials through third order. If the
polynomial is fourth order or higher, the roots must be determined numerically. There is a
method for determining if any of the roots arc positive (unstable) without actually calcu-
lating the roots (RoLlth, 1905} This method involves all analysis of the coefficients of the
characteristic polynomial by setting up the Rowh Array. The test of the coefficients in the
ROllth Array is called the Routh ,S'tability C'riterioll.
The Routh Stability Criterion is based on the characteristic equation that has the fol-
lowing polynomial form
(670)
We can arbitrarily assume that all > O. If an < 0 then multiply (6.73) by ~1. A neces-
salT condition for stability is that all of the coefficients in (6.70) Inust be positive. If any
of the coefficients are negative or zero then at least one eigenvalue (root of the character-
istic equation) is positive or 7.ero, indicating that the equation is unstable. I~ven if all of
the coefficients are positive, we cannot slate that the system is stable. What is needed is a
sl4licicllt condition for stahility. To determine that the system is stable, we must construct
the ROLlth array and use the ROllth stability criterion, which provides necessary and suffi-
cient conditions for stability.
Sometimes we simply wish to determine if a particular system is stable or nOl, with-
out actually evaltltlting the eigenvalues. This is partieuJtlrly true if we wish to determine
values of system parameters that will cause a systelll to lose stability. This approach will
be useful in performing a bifurcation analysis in later chapters, <lndin tuning control sys-
tems in chemical process control.
If "lll of the coeffients of the characteristic eq uation (6.70) arc PO"ilive, the llccessaJ)' con-
dition for stability is satisfied. The following Routh array (Seborg, Edgar, & Mcllichamp,
1989) is developed to test for the s/!llfcicnt conditions for stability:
Row
an (/11 ___ '2 a n--4
2 {[Il-! {[n-3 an 5
3 h, h2 h3
4 ci c2
n+l
158 Solving Linear nth Order ODE Models Chap.6
where II is the order of the characteristic polynomial. Notice that the first two rows consist
of the coefficients of the characteristic polynomial. 'fhe clemenls of the third row arc cal-
culated in the following fashion:
and so 011. Elcments of the fourth and larger rows arc calculated in a similar fashion:
If all of the coefficients (12' (II' and (10 arc positive, then the necessary condition is satisfied. We
call form the ROllth array to test for the sufficient condition:
ROll'
a) (10
2 (ll
3 an
Since the left column consists of the pc}lynomial coclTicienls, if all of the coefficients in the sec-
ond order system are positive, the. system is stahle.
Notice that, for second-order sysLems, a lesL for positive coetJicienLs is necessary and sufficient for
stability.
Sec. 6.5 Routh Stability Criterion 159
rex (Px dx
+2 +3 +x = 0
riP dP dt
ROH'
j 3
2 2 I
3 5/2
4 I
All of the coefficients of the characteristic polynomial arc positive and all of the elements in the
left column of the Routh ,-trray afC positive, so the system is stable.
- - - _ . ~ ~ ~ ~ - - ~ -_._---~-~
The Routh array is particularly useful for determining how much a parameter call vary before a sys-
tem loses stahility. The following cxan1pJe illustrates such a system.
where 1.1 is a parameter that may vary. The Routh array is:
I 3
2 2 f-C
3 h,
4 ('I
160 Solving Linear nth Order ODE Models Chap. 6
where b l :::: J -- f.L/2 and c j ::::: IJ... From the characteristic polynomial, we sec that /L > 0 is required.
The same result holds true for the requirement of c) > O. We notice that h] will be posj~
live only if f.L < 6.
F'rom these conditions, we find that the stability requirement is 0 < /L < 6.
for complex, high order (3 or greater), it is not uncommon for a system to have parame-
ters that stabilize the system only over a certain range of parameter values. 'rhis is particularly
true of feedback control systems.
SUMMARY
Homogeneous problems arc solved using the roots of the characteristic equatioll,
forming the solution IIS a sum of exponential terms. Homogeneous equations gener-
ally occur if the system is unforced, but there is an initial deviation from steady-
state in the state variables.
The method (~l undetennilled c()(dlicients is lIseful for solving nonhomogeneous
(heterogeneolls) problems. These generally occur if the system is forced by a chang~
ing input.
The integrating factor method was useful for solving a first-order heterogeneous
equation with a time-varying coefficient.
The Routh array was llsed to test for the stahility of a differential equation. This is
lIseful for finding vailles of a paranletcr that cause a system to lose stability, such as
in feedback control system design or bifurcation analysis.
The type of dynamic behavior of an nth order differential equation is a function of
the eigenvalues (roots of the characteristic equation). Eigenvalues that arc further in
the left half plane arc "fast." The larger the ratio of the imaginary portion to real
portion of a complex eigenvalue, the more oscillatory the response. Stability is de-
tennined by the real portion of the complex eigenvalue. If all eigenvalues have a
real portion that is negative, then the system is stable. If any single eigenvalue has a
real portion that is positive, then the systern is unstable.
Often engineers study the dynamic hehavior of processes by starting out at stcady~state,
then applying a changing input to the process. Although the method of undetermined co-
efficients can be used to solve these problems, the Laplace transform technique is used
more often. The Laplace transform method is introduced in Chapter 7.
Student Exercises 161
FURTHER READING
Boyce, W., & R. DiPrima. (1992). Ordinary Differential Equations and BoundmJ Value
Problems, 5th cd. New York: Wiley.
Routh, EJ. (1905). Dynamics ofa 5'ystern (~lRigid Bodies, Part Il. London: Macmillan.
Seborg, D.E., TF. Edgar, & D.A. Mellichamp. (1989). Process Dynamics and Control.
New York: Wiley.
STUDENT EXERCISES
Ix,
Ix,
I 1- 1I .~ 211 XI]
0 x2
a. Find the second order ODE in terms of XI'
b. Find the second order ODE in tenns,-of x'2'
c. For xI(O)::::: ~l and x2(O)::::: 1, ohtain the analytical solution for xl(t) and x 2(t)·
d. Usc ode45 or initial to solve the set of two differential equations, given
the initial conditions in part c.
2. Consider the following linearized form of a hioreactor model with substrate inhibi-
lion kinetics (sec Module 8 for delails):
x=Ax+8u
y=Cx+DtI
where:
I
0 ·.~ 1.53021
A~
~.
I-0.7500
0.9056.·.1
-2.5640 3.8255
C = 0
1 0I
1 D= I;:]
1
a. Find the second-order ODE 1n terms of XI' assuming u::::: O.
b.Find the second-order ODE in terms of x 2 , assuming u::::: O.
c. For x,(O) =- I and x 2(O) = I, oblain the analytical solution for x, (I) and xP)·
d. Use ode45 or initial to solve the set of two differential equations, given
the initial conditions in part c.
3. Consider the slate space model for a two-state system:
x= Ax
[Xl] = .1 all
'-\:2 (121
det(H - A) = 0
4. Solve the following differential equation with the given initial conditions:
d 2y dy
,+5········+6y=O
dx dx
dy(O)
yeO) = 0 and I
dx
d'y dy .
~i.~' - 3 ;I:;' - 4 y = 2 sm x
,l'x dx
····--3-+3x=O
2
dt dt
dx
3 + x = 2(1 - e''')
dt
a. Write the characteristic equation for the homogeneous part of this ODE.
b. Find the solution to the heterogenous problem. Show all steps. The initial condi-
tion is x(O) = 2.0.
8. Consider the following state-space model that results from a linearization of the
predator-prey equations:
Student Exercises 163
-1.0]
0.0
[XII
X2
-(Py. . + 1.5,
d'y dy
+ .... + Zy = 0
dt' dt- dt
°
show that {lj > 0 and ([la2 ~ {loa 3 > are necessary and sufficient for stability.
11. For a general fourth-order polynomial:
4
([4 Po. + llJ Po. 3 -I- a2 Po. 2 -I- a l Po. -I- ao = 0
show that aj > 0, a2a3 ~ {l\a 4 > 0, and {l1{l2{l3 - (l4ar ~ aoaj > 0 are necessary and
sufficient for stability.
12. Consider the following third-order ODE:
d'y d 2y dy
;/ti + Ziti + (0: -I)d{ + o:y = 0
where ('{ is a parameter. Find the range of ('{ that will cause this equation to he
stable.
13. Consider the «lllowing second-order ODE:
d'y dy
- + Z-- + Z Y = 0
dt2 dt
which has eigenvalnes of -I ± Ij and initial conditions y(O) = 2 and y(O) = -Z. Find
y(t).
164 Solving Linear nth Order ODE Models Chap, 6
14. Consider the series of two tanks, where the levels interact.
O
F - - .
tHJ21~h2 F,
. F2
a. Assuming that the flow from the first tank is linearly proportional to the differ-
ence in the tank heights (P'l :::.: ~l (h t - h 2 )), the flowrate from tank 2 is propor-
tional to the height in tank 2 (F2 ;:;;; rJ 1 liz), and the tanks arc or COllstant cross-
sectional area (A I and A 2 ) show that the modeling equations arc
dh
.... 2 '0
13J (h _ h ) -13,
' h
dl A2 I 2 A
. 2
2
and that the maximum occurs when the condition den/dt:::: 0 is satisfied.
b. For k j ::::: I and k 2 :::o 5 min-I, find the maximum conversion of A to B (express as
Cn/CAo) and the tinle required for this conversion.
c. In practice there is uncertainty in the rate constants. If the actual vallie of k, is
7.5 min-I, and the reaction time from b is used, find the actual c()nvcrsion~or
A to Ii,
d. Use the MATLAB routine ode4 5 to integrate the three state variable equations
and solve for C;\> C n' and C c as a function of time, for the parameter values in
Student Exercises 165
h, with C~\O := 1.5 and em> Ceo::::: 0 mol/liter. Make a comparative plot for the
:0;:
k ll
--> B 1<, C
A f--
-->
k lr
Here kjr"nd k 1r represent: the kinetic rate constants for the forward and reverse reac-
tions for the conversion of A to H, while k 2 represents the rate constant for the con-
version of B to C
Assuming that each of thc reactions is first-order and constant volumc, tbe model-
ing equations are
(Px) I) dX 2
+ (1:\ + <X +
(/72 d'T
and that the roots of the characteristic equation can never be complex or ullsta-
ble (assuming that the rate constants arc positive).
h. Solve the previous equation to find x2 as a function of T and ex and r3.
c. For kif:::: 2, k 1r = ], and k2 :::: 1.25 hr"], find the maximum conversion or A to lJ
and tlie reaction time required for this conversion.
d. Usually there is some uncertainty in the rate constants. If the real value of k 2 is
15 11I~1 and the reaction is fun for the time found in c, what will be the actual
conversion of A to B?
18. Consider the series reaction:
le l
A-lIJ-j k~
k? C'~--->'f)
[Hint: Solve for en fWln the third equation and take the derivative to find
deBldt.1
h. Assuming that all of the kinetic parameters are positive, show that this system is
stable.
19. Consider the second-order equation:
Por initial conditions x(()) = I and x(O) =1, find the analytical solution and shm\'
that the following plot describes how x changes with time.
Student Exercises 167
150
100
50
K 0
50
-100
150
2 4 6 8 10
20. Consider a semibatch reactor (Example 6.3) with a first-order kinetic parameter of
k:::: I hr- I . I\x a nowrate of 10 liters/hour, a feed concentration of 5 mol/liter, and
arced time of 2 hours, find (and plot) how the concentration changes fronl 0 to
10 hours.
AN INTRODUCTION 7
TO LAPLACE TRANSFORMS
7.1 Motivation
7.2 I.kfinition of the Laplace Transform
7.3 Ex,unples of Laplace 'rransforllls
7.4 Final and Initial Value Theorems
7.5 Application Examples
7.6 T;:lblc of Laplace Transforms
7,1 MOTIVATION
In this chapter \vc introduce {\ mathematical tnoL the Lllp/ace fnlllsji irlii , which i:-; \cr.\
useful ill the analysis of linear dyn,unic -.;y-.;terns. crill' purpose of tile Laplace transform.
as used in this textbook, is to converl linear differential equations inLo algehraic equa,
168
------ , ~ d'i i t
Sec. 7.2 Definition of the Laplace Transform 169
lions. Algebraic equations arc much easier to manipulate than differential equations. An
analogy is the usc of logarithms to change the operation of multiplication into that of
addition. Laplace transforms arc lIseful for solving jinear dynamic systems problems,
particularly nonhomogeneous (heterogeneolls) problems (Le., where the input to the
process system is changed), and are commonly used in process cOlltrol system design
and analysis.
This operation transforms a variable from the time dornain to the s (or Laplace) domain.
Note that some texts use an overbar or capital leucrs for the transformed variahle. In this
initial development wc will let/C!) represent the time dOlnain function and F(s) represent
the Laplace domain function. Later we may be more relaxed in our notation and let .f(s)
represent the Laplace domain function.
The Laplace transform is a linear operation, as shown below.
Oc ]a,I;(t)
(J
e~" <it + Ja,/;(t) e" tit
()
(72)
= aJ'f(t) e" tit + a,!/;(t) e" tit
() , 0
L'IF(s)1 =/(1)
Although not emphasized in this text, Laplace transforms can also be used to solve linear
partial diffcrenlial equations (PDEs).
170 An Introduction to Laplace Transforms Chap.7
In this section we develop transforms of some functions that commonly occur in the solu-
tion of linear dynamic problems. These functions afC: 0) exponential function, (ii) step
function, (iii) time-delay, (iv) derivatives, (v) integrals, and (vii) impulse.
Exponential functions commonly arise in the solutions of linear, constant coefficient. or-
dinary difTcrcntial equations:
J(t) = e,n'
= _ I [(((.\'+O)lj'''' = 1 I
'-[0-1]=-
S + (l 0 s+a s+a
I
LIe ,a] .-
s+a
E\pOllential
0.8
0.6
1ji
0:
x
w OA I
i
0.2
0
0 2 3 4 5
at
Notice that the way we have solved for the limits of integration is only rigorously true for
{/ > O. For a < 0 the solution still holds for s >
-a; we will assume that this condition is
always satisfied.
The step function is used to solve dynamic problems where a sudden change in an input vari-
able occurs (a flowratc could he rapidly changed from one value to another, for example).
The step function is defined as 0 before t = 0 and A after [ = 0, as shown in Figure 7.2,
Ofort<O}
}(I) = { A f{)f 1 > 0
We must use the "more precise" definition of the Laplace transform, because of the dis-
continuity at t = 0:
T
L[t(t) I = lim +
1'---+0
I }(t) e-" dt
T----'>7;
"
L[A] = J Ae-·" dt =
0'
-
A
s
[0 - i]
A
s
L[A] = ;\
s
5;tep
Notice that the same expression is used for the Laplace transform of a constant.
Step Function
t = 0
This is important for systems with transport delays (flow through pipes, etc.), or delays
due to measurements. l"ct ttl represent the time delay. If the undclayed time domain func-
tion isj(t), then the delayed function is/(t - l<f)' as shown in Figure 7.3.
TheL,aplace transform of the delayed function is:
Notice that the lower limit of integration did not change with the change of variable, be-
cause the function/ttl is dehned as jet) = 0 for 1 < 0,
The transform of a delayed function is simply c---stt! times the transform of the undclaycd
function.
I(t)
function
delayed function
~-----------_.
Sec. 7.3 Examples of Laplace Transforms 173
7.3.4 Derivatives
LI.tiM]."
. dt_
1 dl(dtt) e "dt
0
dl(t)] .
L [ ' . = [0 - j (0)] + s JJ j '
(t) . .,
e'" dt ,. shes) - flO)
dt . 0
Derivative
dIet)
t, 'lsF(s) -f(O) 1
fit
7.3.5 Integrals
This is often used in process control, since many controllers use information about the in-
tegral of the error between the desired value (sctpoint) and the measured value:
I
F(s) Integral
s
R(/Illp
L 'IINI
7.3.7 Pulse
Consider the pulse function in Figure 7.5, which consists of a step from () to A at [::::: 0, and
a slep back to 0 at t;;::;; tp.fiind lhe Laplace transfer function for this pulse.
There arc two ways to solve this problem.
ONE METHOD
The pulse function is defined over the following two time intervals:
, A
f A e" dl + fOe" dl- ~ [e"I'"
o ~ s 0
A. A
F(s) = ~ [e""~ I] = [I ~e "'I
s s
A SECOND METHOD
Consider that the pulse is simply the sum of two step changes, as shown in Figure 7.6.
1'hat is, it is the sum of a positive step change at f = 0 and a negative step change at
t ::::: tv Lctfl(t) fcprCScllt the step change at t :::: 0, and lit) represent the negative step
change at I :::: If!>
TL o
/, (I)
-(' 1.-" A
.I'
/1
SO \VC call \vrite 1'(.1') [] .. e'·']
s
In Figure 7.7, consider the pulse function as the pulse time is decreased, but the pulse area
remains the same, as ShOVv'1l by the dashed lines below.
l'he unit impulse fUllction is a special case of the pulse function, with zero width
(t/J -t 0) and unit pulse area (so A ::::. llt/,'!. Taking the limit and applying L' llnpiLa]'s
rule:
~
, ,
~ :- .. ~ .
~,-' -'--'------'---- - - - - - - -
-I
L[o] lim - c".'] .... lim I -sc "1"1
11')0 (!'--.,o S
Unit Impulse
7.3.9 Review
'rhus far we have derived the Laplace transform of a number of functions. f:;'or example,
we found:
LIe "'] ~
s+a
If we have a LapJace domain function, such asl/(s + a), we can "invert" it to the time do-
main.For example,
LII, I al.~e'"
Althollgh the student should he able to derive Laplace transforms of any lillle domain
fUllction, that is not our major objective. Our major objective is to usc Laplace transforrns
as a tool to solve clynarnic problems. The l-,aplacc transforms of many time-domain func-
tions have been derived and compiled in various tables and handbooks. Already, we can
construct a table of eight (exponential, step, time-delay, derivative, integral, ramp, pulse,
and impulse) time-domain functions along with their Laplace domain functions. Addi-
tional Laplace transforms aJ'e provided in Table 7.1 in Section 7.6.
The following theorems arc useful for determining limiting values in dynamics studies.
They will be used frequently to find the shortAenn and long-term behavior. The 1011g term
(final valuc) of a timc domain function can be found hy analyzing the Laplace domain be-
havior in the limit as the s variable approaches zero. Thcinilial value of a time domain
function can be found by analyzing the Laplace domain behavior in the limit as s ap-
proaches infinity.
If we have lransforlnc<J a time domain function to the s domain, \ve Call still find out the
value of the time domain function as it goes to steady~statc (l -~) (0) by finding the value
or the Laplace dornain fUllction as S _Nt O. All application of the final and initial value the-
orems is shmvn in L~xaTl1ple 7.1.
EXA1VIPLE 7.1 Applkatioll of Final and Initial Valu(' Thl'on'UlS to the Exponential Function
(\lllsider the exponential function:
j(1)
\" + (/
Finu/ Vulue Theorem. \Vc first find:
lim s F(s)
;(1
lim
>it,- ()
o
which checks 'Ivith
as IOllg as 1/ is positive.
~I
\ t- II
One pOJl1lnot often made in texthouks is that the final value theorem only hold", for stahle
sy,'",tems (0 > 0).
crhe following is a checklist for solving dynamics probkms using Laplace transt'onns.
Stcp I. Start \vith a linear ordinary differential equatioll and initial conditiolls.
Stcp 2. Transform each of the tiJ\le domain fUllctions to the Laplace dumain. gen~
erally by using a tabk of Laplace transforms.
Sec. 7.5 Application Examples 179
Step 3. Usc algebraic manipulations to solve for the transformed variable. The
partial fraction expansion approach is particularly useful.
Step 4. "Invert" to the time domain, by using a table of Laplace transforms.
The partial fraction expansion approach is based on representing a ratio of two polynomi-
als as a sum of simpler terms. L,ct N(s) and D(s) represent numerator and denominator
polynomials, respectively.
N(s) C
+ +
D(s) D,(s) D,(s) .. UJs)
II ~; I + 2Lix] ~0
s Xes) - x(O) + 2 Xes) -, 0
s X(s) - 4 I 2 X(s) ~ 0 (7.7)
4
X(.,) - (7.8)
.I' j-- 2
180 An Introduction to Laplace Transforms Chap.7
CII .s+ 2.
41 ~4e" 17.10)
Indeed, using the lllcl!lod in Example 7.2, \VC can show that the general first-order
equation:
dr
+ax cc;:()
tit
with initial condition x(O)
which, of course, is the same solution ohtained by separating the variables and integrat-
ing. The real power of Laplace transfonns is in· solving heterogeneous problems, as illus-
trated in Example 7.3.
x(O) ~ 4 17.1\1
4.5
s X(s)- x(O) + 2 Xes) ~
s
4.5
(sl 2) Xes) -c 4'
s
Step 3. Solving for the transformed varlahle
4 4.5
Xes) ~ + (7.14)
s f 2 s(s + 2)
Sec. 7.5 Application Examples 181
We would like to invert (7.14) to the time domain, however we do not know how to invert the
last term 4.5/s(s + 2).
We will use the approach known as apartialFaetion expansion. That is, write:
4.5 A Ii
+ (7.15)
s(s \ 2) .\' S +2
to find A, finit multiply (7.15) by s:
4.5
"C A + lis
s-+-2 s+ I
then set s:::o;: 0 and solve for A:
A ~ 2.25
4.5 A(s + 2) + IJ
s s
and set s = -2 to solve for B:
IJ ~. 2.25
which yields:
4.5 2.25 - 2.25
+ (7.16)
.I(S + 2) s s -+- 2
and We can write (7.15) as:
4 2.25 - 2.25
Xes) ~ \ + (7.17)
s +- 2 s s +2
Step 4. Inverting element by clement ill (7. J7) we find
x(t) = 4 C- 21 +- 2.25 +- - 2.25 ell
or
Examples 7.4 and 7.5 provide additional illustration of the partial fraction expansion tech-
nique.
.\
--u h
(/ - h
The Illl'thod in the prc\iou" c\i1lllple failed ir the rouLS n( the LttpLICC domain rlll1l~!i()l1
were equal. "fhc ldhming c\arnplc "IH'\'" hO\\ 10 pl~rrorll1 a partial fraction C\\"KlIbioll fur
I"Cj)('(lfcd I"oofs.
EX';\\IPLE 7.5 Consider the Following Transfer Function with Repealed Roofs
(s ([) :'{.\ hi
\ (
(7,231
(s 101 \-+-i! (s
Here we C,lll!lU{ llluitiply b;. \ -+- (I ,p1(1 set S =-i1, because we \'\luld find 11l1buUlllkd (nULS. Fir"L
multiply 0,20)1 by (s -+- (1)2.
C(s
i\( ,\ 01 I' --'-- h
Ii
11 (/
--------------------- ....
Sec. 7.5 Application Examples 183
Notice that we have solved for two of the coefficients of (7.23). Now, we can solve for olle
equation in one unknown, by setting s:;:;: any valuc-. For simplicity, choose s = O. Froln (7.23):
A 1 I
a (b - (a bJ'h
-I
we can reduce the solution for A to A =
(a-b)'
We have solved for A, H. and C' in (7.23), So we can perform an clcmcilt-by-clemcnt inversion of
(7.23) to find the time domain function:
, ,,11/
L 'I (, + + b) I (il '
e"l -+
b~a
t c-- il ' -+- (
(a-b)'
(7.24)
As an alternativc-, we tan JJnd a COllUllon denominator for the right hand side of (7.23) and write:
A(s+ a)(s + b) + B(s 1 b) I· e(s + (I)'
(725)
+ b) (s + a)'(s 1 b)
then expand the numerator and solve for the coeJTicienls A, lJ, and C such that the righthand side
is equal to the Ie-niland side. See student exercise 13.
L.- ~ . , ~
The previous examples were for ODEs with real roots. This next example is a problem
with complex roots.
d~r dx
i+ +x~O (7.26)
dt' dt
with the initial conditions:
\(0) ,(0) (7.27)
L',
I
d"J ~ S2 XeS) - ,\' x(O) - x(O)
dt
dx
L [.. ··
df . l = sX(s)-x(O)
We can now write the Laplace transform of (7.26) as:
,\' 2
Xes) = +s+ + +s+ (7,28)
s 2
Xes) = ( 1); (\(3)-; + -(-'1-)2(\/3);
s+'+--- s+-+················
2 2 2 2
s+
2 I.S
X(S) (7.31)
(SI i)'1 (\~7
and we invert each clement of the RHS of (7.31), using (7.29) and (7.30):
1.5
:..:: 0.5
-0.5
o 2 4 6 8 10
time
For your convenience, selected Laplace transforms arc presented in Table 7.1. If yOll de-
sire to transform a function from the time domain to the Laplace domain, then look for the
time dOlnain ('unction in the first column (j(t» and write down the corresponding Laplace
domain function in the second column (F(s)). Similarly, if you arc trying to "invert" a
Laplace domain function to the time domain, then look for the Laplace domain function
in the second column and write down the corresponding time domain function from the
first column.
186 An Introduction to Laplace Transforms Chap, 7
fit) 1'(.1')
A (constant) Ah
f(t--O) (time delay) cos F(s)
1
t (ramp)
-I
.v"
df
(derivative) .1'1'(.1') -.1(0)
dt
d'~f
sllFCs) ~ SIl-l.!W) - s"-2j'(I)(())
dtil
- .1./,"-21(0) -.I''' "(0)
e-- il !
s+a
I
(e--Oll -- e- Ojl )
aj - {/2 (.I' + "')(.1' + "2)
~~L_=~lJ c,,,,r +~lJ - (12 e"/ s -J-
(J2~al al~a2 Cs -+- llj)(S -+- (/2)
I
s(n + I)
W
sin wt
s2 +
S
cos wt
+
(,)
(.I' C [J)' +
s+a
e-Il! cos (UI
(.I' + f
1
1+ (1'1 e- t/ T
, ~ 1'2 e---Il,,)
1'2 - 1'1 .1'(7,.1' + 1)(7,.1' + I)
(1 _ 1 I
+ 2;; 7S + I)
.1'(7".1' j-
1
I)
___________________ •• TtII'"
Student Exercises 187
SUMMARY
We have defined the Laplace transform and applied it to several functions that commonly
appear in the solution of chemical process dynamics problems. Although the Laplace
transform concept seems quite abstract at this point, in the chapters that follow you will
find it extremely llseful in solving differential equation models. The final (7.3) and initial
value (7.4) theorems will be useful for checking the long-term (steady-state) behavior and
the initial conditions for a particular problem.
A number of examples were provided to illustrate the power of the Laplace trans-
form technique for solving ordinary differential equations. We noted that the tcchnique al-
lows us to convert the ODE problem to an algebraic problem, which is casier for liS to
solve. After performing algebraic manipulations in the Laplace domain, often with the usc
of a partial fraction cxpansion, we then look up inverse transforms to obtain thc time do-
main solution.
In the chapters that follow, we use Laplace transforms to analyze the dynamic be-
havior of different types of linear process models.
FURTHER READING
Many differential equations and process control textbooks provide details on Laplace
transforms. Some examples arc:
Boyce, W.• & R. DiPrima. (1992). Ordinary Differential Eqaatiolls alld BOlll/dary
Value Problems, 5th cd. New York: Wiley.
l~uyben, W.L. (1990). Process Modeling, Simulation and Controlf(Jr Chernical En"
R;,/{:ers, 2nd cd. New York: McGraw-HilI.
Seborg, I).E., T.P. Edgar, & D.A. Mellichamp. (1989). Process D.vnmnics {{nd Con-
frol. New York: Wiley.
Stephanopoulos, G. (J 984). Chemical Process Control: An Introduction 10 ThcOf)l
and Practice. Englewood Cliffs, NJ: Prentice Hall.
STUDENT EXERCISES
1-5. The student should derive the Laplace InmsfoJ'm for the following functions;
d'~l
L
dt"
2, '/(1) ~ bl
3, '/(1) ~ t2
188 An Introduction to Laplace Transforms Chap.7
(flilll: Although you can solve question:) using integration by pans. you may \vish
10 usc the Euler identity cos (I){:::; 1/2 (ei'dl + e-F'II).)
6. Find the Laplace transform, u(sL o!' the following input function:
u(11
o 10 20 35
7. Find the Laplace transform of the function y(l) lhal satisfies the differential equation
,md initial conditions:
d\ d\"
4 .) -'- 2y 2
dt' dl dl
d\(O) d\(O)
,(OJ dt,1 0
dt
\ (0) 2.0
\ C
S S
I
Y(s) = ,
S(T"S' + 2~TS + I)
11. Derive the time domain solution yet) for the Laplace domain transfer function:
+1
1)(T,s+l)
12. Derive the time domain solution y(l), for the Laplace domain transfer function:
+1
Y(s) =
.'(TI'+I)
"
13. Consider Example 75, involving the following transfer function with repeated
roots:
A Ii C
=--+ +--
(.I' + + h) s + a (.I' + a)2 .I' + h
Find a common denominator for the righthand side:
A(s + a)(s + h) + B(s + h) + C(s+ af
(.1'+ +b) (.I' + a)2(s + h)
then expand the numerator and solve for the coefficients A, B, and C such that the
righthand side is equal to the lefthand side.
TRANSFER FUNCTION
ANALYSIS OF FIRST-ORDER
8
SYSTEMS
8. [ Perspective
82 Responses nf First-Order Systems
B.3 l':xarnplcs of Sdf-J{cgulmillg Processes
SA Integrating Processes
B.5 Lcwl-[,ag rVlodcls
190
Sec. 8.2 Responses of First~Order Systems 191
8.1 PERSPECTIVE
One of the powers of the-Laplace transform technique is the ease with which it handles
heterogeneous (forced input) problems. It is most uscftl1 when the models arc separate
fronl the type of input imposed (step, ramp, etc.). The models that arc developed arc
called tl'mqlerjl/I/('lioll models and will be llsed frequently in control system design.
Process engineers often learn ITlLlch about the behavior of a process by changing the
inputs and seeing how the outputs respond. The goal of this chapter is to illustrate the typ-
ical responses of first-order models to step changes in inputs. Knowledge or these types of
responses will allow an engineer to determine a good approximate model for the process,
including the best parameter values, based on measured data fronl the process.
The equation for a linear first~order process is generally written in the folIo\\ling form
dy
T..... -+- Y ~. ~ k u (8.1 )
dt
where the parameters (T and k) and variables (y ;:lnd u) have the following nailles:
The rllodel (8.1) is sometimes derived by linearizing a nonlinear model about a given
steady~state and then placing the resulting linear Illodel in deviation variable fortlL For
this reason, we assume that the initial conditions arc y(O) ::;: 0 <mel u(O) ::;: O. The input, U
and the outputy afe functions of time; uU) must be specified to solve for y(t).
In the next example, we show how a standard first~ofdcr process model arises,
F
C
;
F
C
dV
= F - F = 0 (from problem statement)
dt
where Csis the steady-state tank outlet concentration and Cis is the steady-state tank inlet con-
centration. Now, since -FiV Cis + FIV C s ::::: 0, we can add this to (8.2). Also, since C~ is a con-
stant. dC/elf = d(C - C)/dt, and we can write:
d( C - C,) F _. F. .
----,It' ~v (C, - C,J - V (C - C,) (X.3;
or
vF d(C=
dt
S,) + (C- C).\ ~ (C- C) I J.\
(X.4)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ " ~~fPI
Sec. 8.2 Responses of First-Order Systems 193
Notice that for linear systems, we can directly write the deviation variable Illodel directly
from the physical model, skipping several intermediate steps. Also. since deviation vari-
ables arc defined on the basis of a steady~st:ate operating condition, if the process is ini-
tially at steady-state. then yeO) = 0 and lI(O) = O.
Taking the Laplace transform of (8.]) we find:
or,
yes) g(s) lI(s) (8.7)
Ie
where: g(s) (88)
'fhc reader should become familiar with this type or representation. In general terms, /:(s)
is known as a !ral1.~Ierfimc[i()lI. In this specific case. g(s) is a first-order transfer fUllction.
You \vill often see a block diagram representation of Ut7) as shown in Figure 8.2
One nice thing about (8.6) is that it holds for any rirsHmJer process (with zero ini~
tial conclitions)- -we have not had to usc any knowledge (yet) about the input u as a fUllc-
tion of time. Once we know u(t), we can usc Laplace transforms to find U(s) to solve the
problem. We will sec later that block diagrams and transfer functions arc easy [0 work
with, when we have a complex system that is composed of a number of subsystems. Be-
fore we deal with such systems. we will first understand the behavior of first-order sys-
tems to different types of inputs.
Themosi common input forcing function is the step input. For this problem, asSUllle a
step input of magnitude 6.U altimc I ~ O. We know that the Laplace transform of a step
input is (from Chapter 7):
M!
LIMII (8.9)
s
I
I I
5 0.8 _~_~_~l _ I
I~~-----I------T------
I
S- I
I I I
I
"0 I I
I
I
I
I
I
00
0.6 ------1-------1------1------
00 I I I
ill
I I I
C I I I I
0
·w 0.4 ---r------l-------r -T------
c I I I I
ill I I I I
E I 1 I I
'5 0.2 -----r------l-------r------1-
I I
I
0
0 2 3 4 5
Vlau
L I [. I] = 1_ 1'-';' (812)
S(TS + 1)
and the solution to (8.11) is then:
y(t) = k",U[I-e 'I'] (8.13)
Notice that we can represent the solution of (8.13) with a single plot, by dividing (8.13)
by k!1U to obtain the dimensionless output:
(8.14)
A plot of (8.14) is shown in Figure 8.3, where we have used fIT as a dimensionless time.
I 'X,,,,,.'" ~,,'~.
As a numerical example, consider the case where V:;;;:: 5 ft\ F:;;;:: 1 f(\/min, and the steady~state
concentration (inlet and olltlet) is 1.25 Ihmol/ftJ . Consider a step change in inlet concentration
from 1.25 UHno]/ft J to] .75Ibmol/ft J . Theil:
Sec. 8.2 Responses of First-Order Systems 195
!>.if 0.5
U(s) ~ ~ (illl(t) ~ J .75 ~ 1.25 ~ 0.5 Ibll1ol/ll')
s s
Y(s) .~ 1 0.5 (8.15)
5s + I s
which has the time domain solution:
y(l) ~ 0.5 [1 ~ e '/5/ (8.16)
Since we desire to find the actual concentration, we can convert back to the physical variables,
froHl the relationship:
Notice that C(t -----0> DO) """ J .75, as expected. This can also be obtained by applying the Final Value
Theorem to (8.16) (mel using (8.18). A plot of (8.18) is shown in Figure 8.4.
1.7
1.6
f'
~0 1.5
E
.0
G 1.4
1.3
0 5 10 15 20 25
I(min)
Process engineers often find process gains and time conslanls by performing step
tests Oilprocesses.
196 Transfer Function Analysis of First-Order Systems Chap. 8
GAIN ESTIMATION
\VL' '-;l'l' 1'rOn] (0.1-+) thaI :lftCI I» T. the eli, ternl approachc" O. 'fhe \aluc or t:. can he de-
termined:
\(1) as I -) (large)
k.. = (~I'J)
::,.C
ie.,. the pn)("cs" gain ie., thL' clldllgC in output {as it appnwcl1('"
lililt it nC\\ stead\ -stall') di-
\id('d hy the c1wngl' ill illpLll.
You "Iwuld 1)(' ('~Hd\tI. Ik'l';HIS(' t11l'; is onl) trllc fur firsl un!.:'r jll\)(\:>SI.:''' \Iith Ill) tillll'-lkl;l) ~Illd :1
\I<:'p Illput at I ::;: U, If till' PI'UCl'S\ j" \ccolld·unlct PI" the input is 11111 a Sll'll Ch;lll,~L, elL:.. thi" 6.\.2 1,;
\alul' \\ill nul hc currcct
rOll s!wuld get ill Ilu' !whil of i1ssocioring ullits \I·/tli ({II (~r f/ie \'(/rioblcs, ()[l\iou"ly. the
pmccss time cOlhlan!. •. 1T1ll\1 h,\\c units or limc hecausc c 1/7 must he diull'llsionk"s.
/\ho, thc prOl'css gain, k. must havc units of Oulput/input to he dimcIlsioll;dl)- C01FistCili.
SLOPE METHOD
All allnnali\T Illethod or
c"tinl(llil1~ the tilllc COllstant is to rcnli/c tl1<lt the initial slope 01
till'output step response for a I'jrst-urdcr Im1ce;-.,s is k~l{h. as "how!1 \x'](1\\. 'raking the cit'
ri\,lti\t' of (S.13):
dl(1) k::"( .
[,'
ill 7
ilql II)
ill
Sec. 8.2 Responses of First-Order Systems 197
'5
Q.
'5
0
0.6
"'"'
ill
C
0
'ii; 0.4
c
ill
E
'6 0.2
0
0 2 3 4 5
tltau
If we extrapolate this slope to the final value of the output that is achieved, we find
the time constant 1", as shown in Figure 8.5. This is a dimensionless plot, so the intersec-
tion at tIT::;: I indicates an intersection at t::;: 'T in physical time.
Parameter estimation for first~ordcr processes llsing a step response is illustrated by
the next example.
56
55
0> 54
'ii;
Q.
'5
53
Q.
'5
0 52
51
50
0 5 10 15 20 25
time, min
\Ve call inlll1cdialely calculate the process gain from k =' .lr/:J.u "'" 55 SO psig/17.5
20 gplll ::;: --2 psig/gpl1l. \VC can cdculatt' the time constant in a 1ll11l1hcJ' uj' different \"a)'s. (lnt'
\\,<1Y is to find thl' time where the output change is 6_~2(;'i (If tht' rinal ch;lI1gc. I'hi:,> occurs v.. hen
the output is SO + 0.632())::;: :'13.2 psig. From the plo\. this occurs at I :::::.5 minutes. Another \\it)
10 find the time constant is to e\lWPOJatc the initial slope of the response III the final \,due. This
occurs at r:::=:'1 minutes, as Sh(1\\'I1. Th.' identified pnKcss transff'l" function is thell:
-- 2
Ss + I
NOlin: thallhc gain (-2 pSig/gpllll and timc cOIIQanl C'1 min) haH' units associated with tilt'llL
Dividing by kit \ve find the dimc.nsionlcs:-; OUq1ul respollse shO\\'n ill the 1-"igUl\~ 8,7
belo\\. The prime characteristic of a first-order :-;)-,':-;tem is that there is an immediate rc-
spome to an impulse input.
In practice it is difficult to actually implement an impulse function. /\ close approx-
imatioll can be made by implementing a pul:-;e input over a shon period of time. as SI1O\\11
in the next cxamp1t:'"
0.8
"i
<l
"i
0
~
0.6
~
~
c0
~
0.4
c
w
E
D 0.2
0
0 2 3 4 5
t/tau
I
o
FIGURE 8.8 Pulse jnpuL
Frolll Chapter 7 we find that:
!:111
U(s) ~ [I - e "'I
s
So, the output for a firsHmJer process with unit gain, is:
llu e li,"'j
I
yes) -
S
11 TS+1
D.ll !lll e (,.'
yes) =
s(Tsf I) s(Tsf I)
which has the time-domain solution (Chapter 7):
where fl(t)::: 0 for l < '" nnd I for t 2 11' and the total input applied over the If! lillle units is !:if( fV
The i rnpuJ sc response i,~:
yet) (impulse) (8.231
The pulse and impulse responses are compared in Figure 8.9 for tf'::;:; O. IT and A .:0: 1.
1!
0.8 :;
0.6 'i
0.4
'!:
02 ; ".
,i
o
o 2 3 4 5
Vlau
FIGURE 8.9 Comparison of pulse (dashed, tp .:0: O.1T) and impulse (solid)
responses,
200 Transfer Function Analysis of First-Order Systems Chap, 8
The standard first-order rnodel presented in the previous section is a typical scir-rcglllat~
ing process. If the input is changed to another value. the output eventually comes to a Ile\\'
steady-state. Contrast this "vilh \lon-self-regulating systems \vhcrc the output continues 10
change forC\'cr after a step input change. Self-regulating hehavior is shown by the systems
presented in the following example. One key idea to nntc is that a chemical reaction
changes the time constant of a standard mixing 1,mk model.
d\ (
FC, F( F, \'
cit
\\'hcrc f:. j ie; the rcadlr1!1 r;llc constant. SlllCC V Je; c()n.~1;1ll1
dC r(
rtt \'
I'
V
I
I'
d(( ,I
df
OJ
l
1
d( ( ~ ( 1
r (It
IC ~ (,) ~
I
(C~c,,) (S.27)
V k.;
I'
\' I
F I' I
I ;]llt! I,
F I' r C
V 1 "' r k, \
1\1
r k)
C ~
C and 11 C ~
(
Sec. 8.3 Examples of Self-Regulating Processes 201
,mel thCldOlC, we know the soluuon tOJ d step change IllIllJet cOllccnlldllOn dt I:::: 0 I
Notlcc IhM the gdlllS and tlme consldnls 10] stilled ldnk wIth ICdcllOll ,Ile less thdll those
<1
to! d stilled !dllk WIthout lCdC!1{)/l TillS means tlMI dB 1Iliel composltlon chdllgC has d L1S(CI dy
nalHlC eltcelIll a system \Vah ChCI1llCdl lCdClltHl 'Ihlll III d system With Just mlXll1g
~~--~~---
Note that the previous examples \vcrc linear because the flow rate was constant. If the
tlowratc weJ'e changing (i.e., was considered an input), the models \vollid be nonlinear
(actually bilinear), because of the terms where an input llluitiplics a slate variable. The
linearization techniques developed ill Chapter 5 must then be llsed before a j,aplacc trans-
form analysis can he performed. fn the following example, linearization must hCLIsed be~
cause of the second-order reaction term.
dve
FC,- FC-k, VC' (B.2B)
d/
where k2 IS the reaction rate constant. Since V is constant,
dC
(B.2~)
d/
,md we can calculate the steady-state concentrations from dC/rtf;:;;o 0
F
k ~ C' ,~
-, V Cs (B.JO)
Notice that (X.30) is LJuadratic in C\_, <lud will always have olle positive and one negativc foot
(the rC<lder should verify this by using the quadratic formula). Obviously, only the positive root
makes physical seusc.
Now, the problem with obtaining an analytical solution to (g.29) is the nonlinear tenn.
We can use the lineariz.<.llion technique from Chapter 5.
d(C - CJ .
dl
"II.
de .<\
(C - C,) +iill. (C,~ C,J
dC'.H
to find that:
/'
I d(C-CJ+(C V
CJ (C, C,J (B.J I)
F+ ,C)
( V 2k ,-,
d/ 2 k, C,)
202 Transfer Function Analysis of First-Order Systems Chap,8
prucess grlln , -
I'
I'
2" C, /,J
\,
I I
time COnsli\nt
(I
I'
t lk, C ')
",
(I
- - - - - - -,~~--~
SUllllllarizin§!. the pmCll1lcters for each of the previolls cxalnplcs arc shown in Table R.],
I
PnlCCY'; Crain. k
\'
F
,I
\'
\' I
Prnccss Time (~onslal1L ..
I \'
F 1;1
For all of the example s, assume that a step change in thcinJet concentr
ation occurs at t:::: O. Tbat
is, Cj changes from 1.25 lbmol flu] to 1.75 IbmoJ fr J at t::;: 0 minutes.
In terms of deviatio n vari-
ables, this means that u increase s from 0 to 0.5 Ihmol ft-3 at t::;: O.
Recall that the solution for a fifst~order system with it step input
change of magnitu de
A is:
Y(I) kA [J - e'hl
und since y(t) -, C(t) - C,
our solution is C(t) ~ C, +kA II _e'h] (8.32)
r"or the CSTR with first-ord er Rxn C(I) 0.625 + 0.25 [I - e -,j' 5] (8.34)
For tile CS'fR with second-o rder Rxn e(r) = 0.625 + 0.25 [I
-- c 1/).51 (8.35)
Notice that solution s for the 11lixing tank (8.33) and the CSTR
with first-ord er Rxn (8.34) are
exact because these systems arc inherent ly linear. The solution to
the CSTR with second-o rder
Rxn (835) is only approxim ate, because it is based on a Iincarize
d approxim ation to a nonlinea r
model.
The actual rcsponse of the nonlinea r model (using ode45) is
compare d with the linear
solution (8.35) in Figure 8.10. Notice that the initial response
is similar, but the long-ter m rc-
0.9 linear
t) 0.8 nonlinear
0.7
0.6
o 5 10 15 20
t(min)
7
204 Transfer Function Analysis of First-Order Systems Chap. 8
spO!1se of the lincar model deviates significantly from the nonlinear model. Indeed, we can cal"
culatc the long-term response without doillg any lllllllcricaJ integration, as showll below,
InF;x<llllple X.6 we were able to find the new steady-state for the nonlinear system by
solving a single quadratic equation. }-;'or the general case, with a model composed of a set
or nonlinear equations, one would need to solve a sct o!" nonlinear algebraic equations.
'fhis would he done twice, once to find the initial steady-statc, thcn again to find thc final
stcady-state after a new input change.
where 0 is known ,'IS the time delay. A.ssul1lc that )'(0);;;;; 0 and 1/(0);;;;; O. The input. II lind the OLlt~
put yare functions of timc; 1/(1) must be specified to solve for I'{t).
To understand how this equation might arise, sec r;igure 8.11.
c',
F
c,
F
C
Notice that if the inlet pipe Iws a sigllit'icant volume, there will be a delay between a change in
the concentration at the inlet pipe and the concentration at the outlet of the pipe. The delay can
be calculated as:
Sec. 8.3 Examples of Self~Regulatjng Processes 205
H ,- V"
F
where Vp is the volume of the pipe. The relationship between the concentration at the exit of the
pipe and the inlet of the pipe can be found by:
C; (t) ~ Cj(t - 0)
That is, the concentration at the exit of the pipe is equal to what the conccntnllion at the outlet of
the pipe was () time units in the past. The modeling equation is:
dC F F
V C , V q(t)
dl
which can be written:
1(" F F
( ..~ - C + Cit - 0)
cit V V I
or,
k C---- fl ,
where: K(S) - (X.40)
TS + I
Assume a step input of magnitude flu at time t::;;:; O. We know that:
Clu
L IClu] - (XAI)
s
and we can then write (8.38) as:
keos 0/1
Y(s) ~ TS , I s
(XA2)
kou elf,
Vis) ~ (XA3)
S(TS + I)
~ [Is ~
Vis) Mu c'"
'TS
T
+- . 1,,] (XA4)
206 Transfer Function Analysis of First-Order Systems Chap. 8
I'{t) () fOJ U H
\!uticc lh:ll (x ....J-."i) 1\ merely a traml~lri(ln urlhe first-(lnkr n>,p(ln~l' h~ 0 time Ul1ll\.
Cumidcr till' (olhl\\in,'; pin! (FIgure S.121 of lile reSpmlS(' nt" ~\ -.y\tcrn [I) a step input
Ch:Ulf'-l~ o( llwgnitude U,S at lilll<.' I ~: O. VV'L' '.t'e illll1lClIiaiely that the llllw ,klu) i\ 0 =::; Illinlllt..'\
Sinn' tile d1aIl~~' ill \)utpUI ,rfrer (l long penoel of time i\ ..1" = I k ..111, \\C \C'C thaI I. :: (ulli(\ Dj
il1put/(-'UlpU[), The' prUCl'\" lime COIl\!<lIl[ l'UTl ht' lktcrlllill('d from r!1l: <llll11llllt IlllullC. :ll"kr til('
dt'1:ly, that it [il!..;t'\ fp[ h,i.2 1( ol' tl)(' change (ll occur In this Cht'. th,' ril1lv COI1".t:lJH 1\ ,lppru,\i
matl'l: 5 minutc",
0.8
06
~
0.4
02
0
0 5 10 15 20 25
'rhe P1T\ioLiS e\~l!llplcs were for sclr-re,~ula[il1g proCCSSL:", If ,Ill input changed. [!lC)] Illl'
pnJCc"" output camc [0 a Ill'\\ Slc<ldy-stalc, Another L~OIT11TlO!l cheJ1ljc;lI proccs:, is [he in(('-
gr,Hing proccss, a;-; ;-;!lo\\'11 in thc cxample hc](m.
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ z ....
Sec. 8.4 Integrating Processes 207
dV
~ P, ~ E':, (8.46)
cit
where F j and F o arc the inlet and outlet flowratcs, and V is the tank volume. Assuming a constant
cross-sectional area:
d1l
(8.47)
dt
To satisfy steady-slate relationships Fis :;;:; Fps ' so we can L1SC the following deviation variable
form:
hJ
~ (P,
d(h '. 1 • •
P,,) ( E' ~f) (8.48)
dl A " m
where y:;;:; Ii ~ hI' k:;;; 1//\ and 1/:;:: Pi ~ Pi,I" Taking Laplace transforms, we find:
Using the notation D.U for tllC magnitude of the step increase:
Lll/
U(s) ~ (8.53)
s
Liu
and yes) ~ k (8.54)
(8.57)
208 Transfer Function Analysis of First-Order Systems Chap. 8
I
nr. h. I j,F I
II '
(6 ~ 5) ai/min
1t=.:J.ft
100 ft' [
100 ft'
( lOft 4 ft) . . \ 60n ruinutcs
(6~5)n/mjIl
10 hnms
Since the step change was madc at I :00 pm. the tank \vill overflo\\' at II :O(j pm.
i\ plot of tank height versus time is slwwn in r;igurc 8.IT
10
8
S
7
"
6
4
0 100 200 300 400 500 600
time (min)
Some dyuarnic systems. particularly involved \vith process controL have the follO\ving
fonn for a lrallSfcr fUllction modcl:
T S -I- I
Y(s) k" U(s)
i,r" + 1
Consider a slt'p input change or magnitude t111
TIlS + I All
Y(s) ~ k (8.59)
7,/'. + I s
The reader should find that time domain response is (see student exercise II)
A plot of (8.60) is shown in Figure 8.14, for kAu :::: I. Notice if 'Til> T d the immediate in~
!
crease in the OlItput is greater than the ultimate steady-state increase, while if 'III < 'T d > the
immediate increase in the Olltput is less than the ullimatc steady-state increase.
We have derived the step response for a IcadlIag transfer function. This transfer function
does not usually arise in the modeling of a physical system, but it often arises in control
system design. Our desire in this section is to show how to convert a lead/Jag transfer
function to state-space form, so that a general simulation package can be used to integrate
the corresponding ordinary differential equation.
Multiplying through by the denominator term in (8.58), we find:
(T,t' + 1) Y(s) ~ (T"S + 1) 1I(s) (8.61 )
2
10 Lead-Lag for 'd = 5
1.5 7.5
Various values of 'n
5
I
2.5
Y
0.5 1
kt>.u
0
-5
-0.5
-1
0 5 10 15 20 25
and we KllO\\ that to obtain the tr,\llsfer function fu rill , the illiti,tI conditions of aJI \'ari,
abies \\('fC, ,!'isul1ll'd to he I(TO. so:
,/\
I, f Y !!
" til
We canllol sohc (XJd) 11) using a gc'ncra] purP{hC integrator. because it j" not in the "tall
LIard forlll uf dr/dl ;::: j(x). Our gual Jl{)\\ is tn ddinc a !lC\V variahle that ,,,,'ill ,illow LIS to
usc' ,I standard intci2r;llur
Rl'arrangc (:-\.63) [0 rind:
ill' (111
'II dr
= - \' !! (x 6-1!
and "incc ',t (lud '11 ;11'(' CUI1\t<ulh. \'1t' call Lake the c!cl"j\aLi\t' oj 18,(5) with rcspccIlO lIl1h.'
to find:
dr rill
T (8.661
<II ! dt ., dl
Suhstitutill,l! the righthand side of (8,66) for the Icftiwild sidc of (8.6..J-). wc find:
\ t- II (S.671
r = (8.681
~
dr
dr
- .\ + rI .. : ) II (S J}<)I
I,i ". 1<1
x=cAx 1I11
ex Du
----------------- "-
Student Exercises 211
dx
cc=aX+bll (X.70)
dt
y-=cx+du (8.71 )
where
a= h (I Td )
- ~d
T"
Tn
C d
Td T"
We wilJ sec in Chapter II how (8.70) and (8.71) can be used within the context o1'a block
diagram.
SUMMARY
'We have studied the response of a number of processes that have denominators of transfer
function models that arc first-order in the Laplace variable, s. The systenls were: first-
order, first-order + deadtime, integrating, andleadllag. Most chelnical processes can be
represented by a cascade of these types or modes. We found that stilTed lank chemical re-
actors arc linear first-order processes, as long as they have first-order kinetics (or no reac-
tion) and the input 1'lowrate is not changing.
For first-order and first-order + time-delay transfer functions, we disclissed how to
e!ilimatc the parameters (which always have units associated with theJ,n) by applying a
known step input to the process and observing the response. First-order + tirne-dclay
models arc commonly used in control system design.
In lhe next chapter we study the transient response behavior of seconcl- and higher-
order systems.
STUDENT EXERCISES
1. As a process engineer, you are attempting to estimate the model parameters for a
process that you believe is first-order (with no deacltime). At 3:00 pm, you lnake a
step input change to the process. At 4:00 pm, the process output has reached 8(v;,{;
of its final change.
What is the time COllstant of the process?
2. Consider a water storage tank with inlet and outlet streams that can be illdepen~
dently adjusted. The storage tank has a cross-sectional area of 100 1'f2. Initially, the
flow in is equal to the flow out, which is 5 ft:'ljlnin. The initial height of water in
the lank is 4 I't and the height of the tank is J 0 1'1. At 1 ::::- 0 a ramp increase in the inlet
flowrate is made, so that Fi(f) ::::- 5 + 0.251 where the nowrate units are nJ/rnin.
212 Transfer Function Analysis of First-Order Systems Chap 8
Hm\' long docs it take the tank to overlhm"? Solve using Laplace transforms.
()bti.lin a general CXjJl'cssioll for SystClllS llJO(ll'lcd in Lin iatic)11 \ ,niahlt' (orlll hy:
dy
<II
\\'here: III I) (l [
Tn,\" I I
\(s) k II(S)
',jS I I
4. Consider a chemical reactor that has fern-order kinetics. that is. the rate of reactioll
per unit volume is a constant (a fero-order Kinetic pararnell'r) that does not depend
on concentration. Compare this model with that of a stirred tank mixer. and a stirred
tanK reactor with first-order kinetics. Perform a numerical study'. related to ExamplL'
X.5. by finding the 7ero-order paramcter thal yields the sanK' slcad;..'-statc conc(':l1tra-
tion as the first-order kinctic modeL
5. A process operator rnakes a step change on an input variable at 2:00 pIll and discu\,-
ers no output response is observcd until aflcr 2,10 p111. She finds that the output i"
tHY>;: or
the way to its final steady-state aL 2:4::1 pm. YULl beliCH' Lbat this is a fir"L
order + dcadtirnc process.
F,
F
C, F,
C,
c, C3
9. Compari.wm qllmpulse and Pulse Re.s])(JIlses. Consider a tank with constant cross-
sectional area, At::::: 1 m 2 , and assume that the flow out of the tank is a linear func-
tion of the height of liquid in the tank. 'The steady-state values of tank height and
flowrate are I meter and 1 m3/hr, respectively. Find the impulse response of tank
height if 1 m 3 (in addition to the constant steady-state flow) is instantanollsly
dumped in the tank. Compare this with several pulse responses, where the addi-
tional I m3 is added over 0.05,0.1, and 0.15 hour periods.
IO. Consider a chemical reactor where a step change in coolant flow rate frolll 10
gal/Inin to 12 gal/min (at t::::; 0) causes the change in reactor temperature shown in
the figure below.
214 Transfer Function Analysis of First-Order Systems Chap.S
155
150
u..
145
'"
ill
"0
ci
E 140
2'
135
130
0 20 40 60 80 100 120
time, minutes
I"inel the gain, lime constant, and time-delay for this system.
U. For step response of the lead/lag transfer function:
+
Y(s) = k
T,t', + s
v( I) = k "" [I _
...
(I _T,,)
T,j.
TRANSFER FUNCTION ANALYSIS
OF HIGHER-ORDER SYSTEMS
9
215
216 Transfer Function Analysis of Higher-Order Systems Chap. 9
The dYJ1atnic behavior of./lrSHJI"dc!" systems was studied in Chapter R. In this chapter, \ve
present results for higher-order systems and shmv I1mv to usc standard nutlll'l"ical integra-
tion routines for tinlc domain sirllulation of these ITHldcls. V,ic first study second-order
s)'ste111s, thcll generalize our results to higher-onler systems.
We discussed in Chapter () that single nth order ODEs do not naturally arise in chemical
processes, The second-order model shmvn in (l).l) or (9.2.) gCllerally m'ist's by changing a
set of t\)".'o first~()rder equations (state-space model) to a single second-order equ;ltioll.Fol
a given second-order ODE, there are all infinite numher of scts of two firSl--nrdcr (statc~
space) models that arc equivalellt.
Taking the Laplace transform of (9.21:
Y(v) (9.3)
\: \: V\:2_ I
1', ~
+ 2
·1 -_.. _ - - - - - (9.5)
T 27 T T
fJ 2 ...
\: v\:' .. I (9.6)
T T
The following analysis assumes that ~ > 0 and T > O. This implies that the real portions
of PI ancljJ z arc negative and, therefore, the system is stable. The three possible cases arc
shown in Table 9.1.
Now, we consider the dynamic response of second-order systems to step inputs (U(s) :::;
!>u/s):
k !>u
Yes) ~, , . (9.7)
TT + 2\:TS + I s
where Llu represents the magnitude of the step change.
(98)
We sec immediately from (9.8) that the poles (values of s where the polynomial,;: 0) arc;
1', (9.9)
which gin:::-- the following \allle fur the second time cunstant-
T
(911 )
T1 "
(i). 1.:1-)
2\ Oi"'
\Ve call derivc (sec student excrcisc la) the fuIIO\\'ing solution 1'01 step ["eSpll!1SeS ()fllVenlalllpcd
SystClllS
fhcnlmnpl'cl. S> ]
T
v,here and T,--
"
( - \
Nlltc thaL as in thl' case llf first-order systems. we can divide hy k":'l1 to develop a dimensionless
UUlpUL Also, the dimctl\ioliJcss timc is th and we can plu( Cllr\'es f(n dimellsionless outPUl as a
fUllction of i;. Thi:-- IS donc III Figure 9. I. \v-hich includes the critically damped l:asc. as discllssed
ncxt. \los( chcmical processes t'xhihit ovcnJalllped behav-ior. The critIcally dampl'd .step l'e-
SpUIlSC is also .ShUV..-rl ill ['igurc 9.1 (curn: with ~:::: I).
0.8 1.5
0.6
0.2
Various values 01 damping factor
o
o 5 10 i5
t/lau
(9.16)
Notice that the main difference between overdampcd (or critically damped) step responses and
first-order step responses is that the second-order step responses have an "S" shape with a rnaxi-
mum slope at an inflection point, whereas the first-order responses have their maximum slope
initially.
The initial behavior for a step change is rcally dictated hy the relative order of the system.
The relative order is the difference betwccn the orders of the numcralor and denominator
polynomials. If the relative order is I, then output response has a non-zero slope at the
linle of the stcpinput; the step response of a system wilh a relative order greater than I
has a zero slope at the time of the step input.
fJ= .. ~I
T T
where: ex = ~ f) ~
T T
We can derive the following step response for all undcrdamped system (sec student exercise I):
V'( - I
where f) = T <I' = tan
~
220 Transfer Function Analysis of Higher-Order Systems Chap. 9
Again, dividing by kD.lI, we can produce the plot shown in Figure 9.2.
1.4
/
/:~ varia JS values 0 I factor
1.2
/ I?': ,\\
//og 75'\>" . "
...
'/. /.
! \
.0
\
...
)/
i 08
\
/
/
./
1/ /
•
0.6
0.4
t,\ •
·
i
t
•
0.2
o
o 2 4 6 8 10 12 14
Utau
A number of insights call be obtained from r;igure 9.2 and an analysis of the step response
equations. Notice that the poles for the second-order SystCll1 can be wrillen:
. .. _ I
P - [-( + jV(I-(')! T
Observe that, for smaller S, the respollse is more oscil1atory. For S < I, the ratio of the imaginary
portion to the real portion of the pole is:
imaginary
real S
As the imaginary/real ratio gets larger the response hecomes more oscillatory. We also notice
that a decreasing T corresponds to a larger negative value for the real portion. As the real portion
becomes larger in magnitude (more negative) the response becomes faster. We use these insights
to interpret po1cl7.ero plots in Section 9.3.
Sec. 9.1 Responses of Second~Order Systems 221
time to first
peak
l c rise time
period of j
I.-oscillation
. b
decay mIlO = -
•
overshoot ratio = % FIGURE 9.3 Step response character-
istics of undcrdamped second-order
Time processes.
The following C0111mon measures of underdampcd second-order step responses arc shown
on r7 igurc 9.3 and defined below: (I) risc timc, (2) timc to first peak, (3) overshoot,
(4) decay ratio, (5) period of oscillation.
Rise lime. The amount of timc it takes to first reach the new steady-state value.
Time to jirst peak. The timc required to reach the first peak. Notice that there arc an
infinite number of peaks.
Overshoot. The distance between the first peak and the new steady-state. Usually
expressed as the overshoot ratio, as shown in the figure.
Decay ratio. A measure of how rapidly the oscillations are decreasing. A h/a ratio
of 1/4 is commonly called "quarter wavc damping".
Period (d'osc'illation. The tilnc betwecn successive peaks.
The following example shows how to usc Figure 9.2 to estimate these values.
ESCOLA Dc H,GENHARIA
BIBLIOTECA
222 Transfer Function Analysis of Higher-Order Systems Chap,9
Our first step is tu calculalt' the system parameters. \Ve Cilll sec that;
k~5
7 2 ::;: 4 so T ::: 2
II.K D,S
2i::'T
-
:= 0.8 so t::: '" ::: ----- : : : 0.2
-.!T.:.1-
\VC usc Figure 9.2 as lhe lJasis for the follmvil1g calculatio!ls,
I
1. rhe risc lime fur ~ = 0.2 is' 1)1, so II"::::;; l,g T = J.6 minutes
1"
2. The time to first peak for ~ ::: 0.2 is'~ 1.2. so 'II::: 3.2 .. ;.c; 6.4 Illinu(t's
15J
3. The o\Trsh()()( ratio is =--:: (l.5J.
I
I 15 I
4. The decay ratio is lSI I ~ IJ,\
I
5. The ptTiod or oscillation is';' 9.6 - 3.3. so f(,,, :::: 6.3 ... ;;;; ] 2.h rninutt's.
,
(.. rile \'aluc pf YUf,l is k~1I = J .53. so \' = 1 5.1 kJII::: 1.53(5) ::: 7,(\5.
Although equation (1).17) C<ltl be used to solve the previous <;.'xarnple. it is often easier to
usc the dimensionless plot (Figure 0.21.
NO\v, \ve cO[l;-.;idcr the dynamic response of second-order systems to impulse inputs.
k
Y(s)
-+- 2~7S + J
CASE I O\'crdamped (~ 1)
The lime domain solution for the ovcrdamped C<.l.SC is (see sludent exercise 2a):
\I,'hne dt)/k/\ is the dimensionless output and lIT is thl~ dimensionless rimt'.
Sec. 9.1 Responses of Second-Order Systems 223
y(t)/kA = - 7 e liT
T
CASE 3 Vndcrdampcd (t / 1)
The time domain solution for the nnderdamped case is (see student exercise 2(~):
Y(I)/kA
T
e-U/' sin (VII
The impulse responses as a function of {are shown in F'igure 9.4.
0.8
'5 0.4
%
0
w
w
0.2
'"
C
0
'wc
'"E
i5
0
·0.2
·0.4
o 2 4 6 8 10
tltau
FIGURE 9.4 hnpulse response as a function of~.
224 Transfer Function Analysis of Higher-Order Systems Chap. 9
Consider the case where the input is a sine fUllction. with amplitude A and frequency (,):
when applied to the second-order transfer function and inverted [0 the lillle domain. the
response after a long period of lime is the periodic function:
kA
y(l) sin (rof + (l)) (9181
\ +
\vhcrc:
(9191
kA
and the phase angle is (b. Often, system behavior is discussed in tenns of an amplitude
ratio, which is the amplitude of the output eli vided hy the amplitude of the input. The am-
plitude ratio is:
k
"'--~-I
I
g(s)
\.: -+- n,:?:s +- 1
A Imv frequency sine forcing ((,) ::::; 0.1 min-- I) yields the input/output response shown 111 Fig-
ure 9.5.
Notice that the output lags slightly behind the input. and the amplitude of the output is
slightly smaller than the input amplitUde. Contrast this result with the folhnving case 01" a higll
frequency input.
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ."':,£'"ifi
Sec. 9.1 Responses of Second-Order Systems 225
1.5
-0.5
-j
-1.5
a 20 40 60 80 JOO
time, min
A high frequency sine forcing (l') 0::: 5 min I) yields the input/output response shown ill Fig-
Ufe 9.6.
0.5 u
y
" a
"
~
-0.5
-j
a 2 3 4 5
time, min
Notice that the output lap significantly behind the input, and the amplitude of the output is
much smaller than the input amplitude.
A particularly interesting type of behavior that can occur with second-order undcrdamped
systems is known as reSOll(///(.'C pe(lking, which occurs in intermediate frequency ranges as
shown in Figure 9.7, where a frequency of 1 fad/min is llsed.
Here the output amplitude is significantly higher than the input amplitude although the
input/output gain is I. At lower ([;igme 9.5) and higher (Figure 9.6) frequencies the output had a
lower amplitude than the input, while al an intermediate frequency (Figure 9.7) the output had a
higher amplitude than the input. This phenomcna can only happen in systcms with complex
roots.
226 Transfer Function Analysis of Higher-Order Systems Chap.9
5 10 15 20
time, min
The concept of phase angle is illustrated by Figures 9.5 through 9.7. At low frequencies (Figure
9.5) the output barely lags the input, and therefore has a phase lag of almost {) deg. At inlt'Tmcdi-
ate frequencies (Figure 9.7) the output Jags the input by (jO", and ill high frt'qucncics IFigure 9.(l)
the output lags the input hy almost ISO". Also noll' that the notion of "high,"' "intcnncdialc.'· and
"lil"/' frequencies is relative (dependent Oil T). Lm',!, medium. and high frt'ljUCJKit'S cnllcspol1d
roughly to (,jT 0::; 0.1, J, and 10. re::;pcctivcly.
T'he method of sinc-forcing a system is llsed in the analysis of feedback control systel11s
and is knO\vn as frequency response analysis. Bode diagrarns arc llsed 10 plot the ampli-
tude and phase angle as a function of rrcqlll~ncy. Vv'e do not provide further analysis here.
but refer the reader to any textbook on process control for 1110re detai 1.
"rhe previous discussion involved pure second-order systems. COil sider \10\\'. a sccond-
order system with numerator dynamics with the gain/time constant form:
k(T"S + J)
s(s) .//(1) W201
(",.1+ 1) (T!S+ I)
The pole-zero form is:
s(S) //(s)
(s -1',)(.1 - 1',)
Sec. 9.2 Second-Order Systems with Numerator Dynamics 227
where:
PI =
The gainltimc constant form has the following time domain response to a step input (sec
student exercise 4):
(9.21 )
The reader should show that, if Til:::: T2' the response is the same as a first~ordcr process.
+J
yeS) lI(S) (9.22)
(3s + 1)(15, + I)
The step responses are shown in Figure 9.X. Notice that negative numerator time constants yield
a step response that initially decreases hefore increasing 10 the final steady-stale. This type of re-
sponse is known as inverse n\"jJollse and causes tough challenges for process control systems.
"1 = 3
"2 15
varying "n
60
FIGURE 9.8 Step responses of a second-order system with numerator dy-
namics.
Notice also that a numerator time constant that is greater than the denominator timc con-
stant causes ovcrshoot before settling to the hnal steady-state. Also notice that the inverse
response becomes "decr>er" as the process zero (-117 11 ) approaches a value of zero from
the right.
228 Transfer Function Analysis of Higher-Order Systems Chap. 9
There (lfC it numher 01 difkrcnt \va)'s to represent process tra/lsfer [unctions. The "t!,lin-
time constant" form is:
The \'alues of \' that cause the numerator oj' (9.23) or (9.24) [0 equal zero arc known as the
"zen},,·' of the transfer function. 'fhe val LIes of s tll,l! cause the denominator of (CJ.23) or
(lJ.24) to equal /cro arc knowll as the "poles" of the transfer function.
The "pole-/el'o" for111 is:
C, )(.1 cJ ("- cm )
g/,(I)
II, )(" - pJ (" p.,l
\\Ilcrc:
.
II I', )
k i J
, i'i , (-:)
The notation il ( fl,) is shorthand for ( -fll)( -P2) ··(Plll.
Notice ~ll~() Ihm the poles ;m:
Ill::: - (l).271
I,ll
(9.281
and that complex poles (or Zt~ros) must occlIr in cornplcx conjugate pairs.
~~~~~ ~ "'_-Itj-:.l;:~
Sec. 9.3 The Effect of Pole-Zero Locations on System Step Responses 229
4) (, - io)
(
N,Js) ~- 9 (s +1)(s + I)
3 15
The zero is O. J, and the poles are 1/3 and -1 lIS.
Notice that the zero for Example 9.4 is positive. A positive zero is called a right-half-
plane (RHP) zero, because it appears in the right half of the complex plane. Right-half-
plane zeros have a characteristic inverse response, as shown in r'igurc 9.9.
Also notice that the poles are negative (left-half-plane), indicating a stable process.
Right-half-plane poles (positive poles) arc unstable. Recall that complex poles will yield
an oscillatory response. A pole-zero plot of the transfer function in Example 9.4 is shown
in Figure 9.10 (the pole locations arc (-1/3.0), (-1115,0) and the zero location is (0.1,0);
the coordinatc~ arc (reaJ,imaginary)). For this system, there is no imaginary component
and the poles and zeros lie on the real axis (Figure 9.10).
1.5
0.5
'"
0
0.5
-1
0 20 40 60 80 100
Imaginary axis
Real axis
As poles move further 10 the left they yield a ra...;ter rcspnnsc. while illcrcclsing the
n1<lglliludc of the illlagillar.y porti 1 11 makes the rcspcH1S(' mure oscillatory, 'fhis bchavim j"
slllllillaril.l~d in Figure 0.11. RcC<.·q also that a process with a pole at the origin (and nOlle
in the right-halt'-planc) is kllO\vn ,-IS an intcgmting system. that is the sy-stcrn nevCl setllts
[() a stcady-state when a step input change is made.
Mulli[J1c right-hair-pjtmc zeros «lUSt' multiple "changes in direction" for e\ample.
\vilh two RIIP leros. the step respollse is initially ill nile dirceti(HL switches dirL'ctioll.
then ::-witches back to the initial direClion.
Recall eJat the Laplace transfer function rllr a pure linl(>dela) is (,-HI where 0 is the tinH>
delay'. This i::- an irrational transfer function: an approximation that is rational and often
pro\'idcs an ad'LJuak representation of the deadtilllt' is known as the Pack approxilnaliol1.
Imaginary
aXIs
more oscillatory
faster response
r x
Inverse response zeros
Real axis
unstable poles
1
FIGUHE 9.11 [(Teet of polc-/l'J'o location (lJ) dynamic hd1avlor (\-P(llt"'.
n-/cm). As poles hCc(l1l\t' more negative. !Ill' rt'SPC1I1SC is la\lt'l'. As the
111Ia~il1dry/n::nl ratio increa'ics. lhe response becomes mme uscill~llor:
Sec. 9.4 Pads Approximation for Deadtime 231
1.5
1
Second-Order Pade'
Approximatlon
.J
0.5
y
0 Pure Time-Delay
-0.5
Fir.ll-0rder Pade' Approximation
-1 r-
0 5 10 !,::>
time
FIGURE 9.12 Comparison of step responses for pure time-delay with rirst~
order and second-order Pade approximations. Dcadtimc::: 5,
2.0SJJ\: -- 2S1
1041 j 1-1-.58.\3,' -+ 7.51'
a cOlllparison {If the step response.s (If ~(s). gl(s) and g~l(S) is "llUwn in [:igurc 9.] J. Notice tllat
the first-urdcr aPllW\llllati(Hl has an inverse response. while the sl'l'())Jd~ordcr appmximatill)l has
a "double inverse 1'l:.'SP(1!1"t'." The reader should I'ind that th,'I\' 1\ it sin,!,'Jc Ilo\itin,' len) fur NI{S)
and there arc t\\'() po.siti \'c. complex-conjugate lcros of the J111I11Cra\(lr tr,lIlSfcr functi(lI1 \)f g ~(.\).
0.5
y
o 5 10 15 20 25
Most ordinary dirferenti,ll equation llurllcrical illtcgrat()rs (including c)(le4~-)) fCCjU1IT pure
differcntialcquations (with no time-delays). II' yCIl! h,H-e a system of differential equations
\vhich has time-delays, the Pack approximation call bc used to convert them tll delay-frec
dillerentiaI equations, \vhieh call then be numerically inll'grmed. See studeIlt exercise 2S
as an example.
One urthe mallY advant<lf!cs to using SI!'vlULINK is that time delays are easily han-
dled so that no approximation is required,
Til this section \ve sho\-v One way to convert the input-output transfer fuul'liOll model to st;lte-
space form. Although the Laplace domain is llsed for mwlysis, the state-space form \-\'ill nor
mally be used for tillle domain simulaliolls. Consider the transfer function relationship:
Sec. 9.5 Converting the Transfer Function Model to State~Space Form 233
k
y(S) = _I 2{7S 1_ I lI(s)
d'y
+.2{ dy.. +
dt 2 1" tit
which we can write as:
2{ dy I k
._- ;Y+,U(I)
'T dt 'T~ . 'T
or,
and since:
(935)
y = [1 0] 1::1 (936)
The student should show that defining y::;;: x 2 leads to the following state-space model:
. 2{ 1 . k
l.xll +
I.
XII
X,
=
I - 7
I
-7'
()
I I].',
7' [u]
()
(937)
(9.38)
234 Transfer Function Analysis of Higher-Order Systems Chap. 9
J'vlATLAH has routines for converting fron] transfer function fonn to stalc-spi.]CC form
(tf2ss) and vice versa (ss2tf). tL2ss is llsed in LxarnpJe 9.5.
num - J
den ). 0.7071
a 0.3535 -0.5000
i.(lOUO 0
b --: ]
(1
c- (J 1.S000
c.1 ()
Notice that the slale space models ill Exmnplc 9.5 are dif{l~rent than the malices that arc
obtained from (9.3."1) and (9.36) or (9.:n) and (9.38), hut the differellt forms vvould all yield
the same results for the output variable via simulation. Rcmcmber that a transfer function
relates inputs to outputs but docs not represent the actual stales of the s)'stern. There arc an
infinite number of statc-space models that \vill yield the sank' input/output lllodel.
After finding the state-spacc form for a transfer function, we can use any available
numerical integrator to solve problems. MATLAB rOlltines of interest include od(:, 4 (),
in.itiaL and step.
MAITAB has routines for step and ilnpulse response of either transfer function models or
state-space models. In the following, we sllmV' hmv these routines arc used for transfer
function models.
9.6.1 step
A quick \vay to generate stCJ1 responses is 10 use the MATLAB function step. This call
be used \vith either a state-space or a Laplacc domain model.
Sec. 9.6 MATLAB Routines for Step and Impulse Response 235
g(s) ~ ---
2(IOs + I)
50 s' + 15 s + 3
The following MATLAB commands arc llsed to generate the response shown in I-;ig-
ure9.J4.
Dum = [20 2] i
den ,0: [50 15 3J;
[Y,x,L] = step{num,den)
plot(t,y)
Notice that a tinlC vector is automatically generated, wilh a length close to the settling
lime of the process.
The same plot could be generated from the state-space form by using:
[y,x,tJ = step(A,B,C,D,l)
pIot(t,y)
where A, n,C, and f) arc the Slate-space matrices and' I' indicates the first input. Al-
though state variables arc calculated, only the output variables arc of interest.
We could supply an equally spaced time vector and use:
[y,x] = step(num,deD,t)
12
0.8
0.6
"
OA
02
0
0 10 20 30 40
time
0.4
0.3
0.2
" 0.1
01
0 10 20 30 40
time
for tilt.' Sll'p response of a transfer fllllction IllUdel. The nUlllhet' or urguJl1CnL" determine,,>
\\'hether a tntl1.';fcr function or statc space rnodel is used by lllC step function, and whether
the lime \ ('c\(X has hel-'ll specified or not.
9.6.2 impulse
plot (t,Y)
'rhe plot is SIl0\Vll in Figure 0, 15 above. Notice that an impulse has an immediate (disl'(Hl-
titlllOlIS) dfcct Oil the output. because this is a relative order olle sy'slcm.
\Vc could also supply an equally spaced time Vl'([Or and usc:
[y,x] = impulse(num,den,t);
SUMMARY
The step responses of the classical seconu order system (o\'erdampcd, critically' damped,
and undcrdampedl were presented. In addition. \ve sho\ved the effect of ll11rncrator dy-
namics (and particularly right-half-plane zeros) 011 the rc-"ponse or a sccond-order sy'stenL
The Pad0 approxilnations for dL'<ldtiJl)c \vere presellted. You should understand the effect
of the location ()r poles and /eros 011 the speed and quality of response of a transfer fUllC-
tion model. The process gain is sllnply the ultimate change in OLltput divided by the
change in input.
Student Exercises 237
damping factor
natural period
numerator dynamics
Padc approximation for time~dclay
relative order
STUDENT EXERCISES
where the time unit is hours. The initial steady-state value for the output is 20 psig
and the input is 4 gpnl.
At t::;;: 0, a step input decrease is made, from 4 gpm to 3 grm.
238 Transfer Function Analysis of Higher-Order Systems Chap, 9
d\ d\'
(T -I- T,) f k /I
'II' dt' l - ill
with the initial conditioll" ,,'(OJ::: dO) ::: 1f'(O) =:: u(()) ::: ()
a. Find the Laplace lransfmm of the elitTerential equatioll. \Vrilc this cxprC'\SI(ll1 in
the form of \'(s) ::::: ,l,'(s) II(S}
b. Nnw. assullle that a step clwngc of magnitude .-\ !l1 tilt' variahk /I Dccur" at
tinlc::: 0, Find the lime domain resulL y(l),
c. Nm\'. assume that a step change or lllaf,:JliWc!c ,\ in the \<triahle ({ OCClII', at
time::: O. Find the time domain re"ult. y(lJ. hy lhing a parti,lI fraction c\jI<llhio1]
and sol\ing for the iJl\er"c Laplace transform by ll'lllti.
d. Plot tilL' tirOL' domain respullse. yUl from p;lr! c. Llsing 11ll' t()lh1\\ing parallkllT
\',due" k:::::: I. '1:::0; J.,~::::; 10. and try s('v('l-al plots. \arying III from J to 10
c. Plot the time domain re::.potlsc. r(f) from part c. u"ing the follc)\\ing p;lr,II1WtL'I
\allil'S k::;::: I. II::: 3.,~:::: 10. and lry sl'\l'ral plots. \arying from 10 to () 'II
7. C:ollsider the fol]()\\'ing two first-ordcl' ODE'.;:
'[
d.r I
til
I ,[ ,[ II
dr,
+ ell
" til "
and the static rclation"hip y:::::: XI + x:~
where XI and x::, arc two state \'ariahles. r is the output \,lriable, and II is ;m input
\ariahlc.
a. Show that the twn equations call he combined to yield a single ODL in the Corm
of problem 6. Find k and I I I a" a rUlIction of k I' k::.. 'I' '::,.
b. No\\'. assume that a step change of magnitude ~u in the \ariahlc II OCCULS :H
time:::: O. Find the time domain result. y(fl. hy ming a partial fraction l'.\jlaIlSloll
and solving for the iJl\erse Laplace transform by hand.
c. Plot_l.'t(l). x:,(t) and YU.l if j,l/:::: I. k 1 :::: ~I. k 2 :::: 2. 11:::0; J. and '2:::; 10.
R. As a proct'ss engineer with the Complex Pole Corporation. you arc as"igned a unit
\vitll an cxotlll'nnic chemical reactor. In order to learn Innre ahout the dynilll1ic" of
the process, ),'OLJ decide to make a step change in the input variable. which is ('()ulant
lenlperaturc. from 10"e to [SOC, Assume that the reactor \vas inItially at a srl'~ldy
slate. You obtain the follmvingplot for the outpUl variable. \vhich is reactor tCJllpcr~
aturc (notice that the reactor temperature is in OF).
---- ~~rg.iF,r
Student Exercises 239
290 I I
I I I
I I I
285 -...J--____ ----~- --~t-----
I I I
I I I
u. 1 I I 1
280 --- --- l-----~---r--------I---------f----
'"
ID
"0
I
I
I I
also, assume that at time 1 := 0, the input begins to increase with the following rela-
tionship
1 2
U(I) 2I
input. Explain. F,'ind the transfer function and verify these results assuming a gam of
one.
(1,0.5)
x (0.5,0)
x
(-1,-0.5)
[ ~: I [
2AOS
0.833
o
-2.238
II x, [ + [
x,
7 [
-1.117 /I
Y - 10 11 [x,'[
Xl.
13. The output of a sccond~order, 1I1lderdamped system has a rise time 01" I hour. and a
maximum value of 15°[" (in deviation variables), aner a stcp change at time { =: o.
After a long period of lirne. the output is 12"F' (again ill deviation variables).
a. What is the value of 7'1
b. What is the value of C
c. What arc the poles? (also, show their location in lhe complex plane)
14. A step change of magnitude 2lb/min is applied to the input of a process. Thc result-
ing oulput response, in dcviation variables, is shown in the figure below.
_____________________________ ~_,=_jf-_-_kLl'*;1t
Student Exercises 241
40
30
20 / \ >,,_/ /
/- ----.....
10
/
o
o
17 50
,
100
.............
150
time (min)
200
--
250 300
a. Pind the period of oscillation, rise time, and time to first peak, for this system.
Show your work.
h. Find parameters (show the units) in the transfer function, g(s) :::::: k/(T 2S2 + 2~TS
+ I), by using the dimensionless plot, Figure 9.2. Show your work.
IS. Consider the following third-order transfer function, where ~ is a parameter. Find
the conditions on the parameter [3 that will give an inverse response.
(2.1'2+.1'+/3)
g(s)c
(5.1' I- 1)(3.1' + 1)(2.1' + I)
Show your work and explain your answcr.
16. Consider the following transfer function:
S2 +s- 2
11(.1')
s2+4s+3
a. Find the poles and zeros for this transfer function.
b. A unit step change is made at f = O. Find thc value of the outpul, using the final
and initial value theorems:
i. After a long timc.
ii. Immediately after the step change.
c. Verify your results in b by finding (analytically) the time domain solution.
d. Verify the results in h using the MATLAB function step.
17. Consider the following state-space model:
I~; I I -6.5
2.511 X'I
4 - 6.5 x, + 10.00155111
0.00248
ESCOLA Dc ENGE~~HARIA
B I BL I 01 cCA
242 Transfer Function Analysis of Higher-Order SystElms Chap. 9
Find the lrallsfn l"unctiulls n.·lating the input tu c<lch output. Find the step rc"poll_sc
01" l'<ldl output.
IS. A unit step change in input is lTl<ldc 011 a 11lJlnhcr of processes (f--lV), rile '\~'illjtillg
outputs arc shown ill the plot below. Associate each process with a rCSpn!1Sl' ClIl'\t'
21'
L <';(,\)
2\
II C:(.\ )
.:s I
III .l::(.\) = I
-1-(.\ 2\ - !)
IV. (;'(.1) = Is
2
d
a
15
" 0.5
05
0 2 4 6 8 10
11(' )
I)
let 11 represent the qmtlkr denominator time constant. ,,\S';';\lllle a step change ill
inpuL. Shc)\\' thal a max.imulll ill \'(l)/kj./{ occlirs if 'II T, and tkJl a llliIllJ1lLl111 (ill-
dicating ill\ erst' rcspllllsC) occur.., if Til O. i\l..,o 'ibmv th,lt there is IlO L'.\lrellW ill
Lhe '-tep respoll"e if 0 '11 To. (llim: Reali/e LhaL a lTw.\imUIll or rninilllllill oel'I.I!""
at \/1/1 ~ 0.)
12.\1 2
20. ('ol1sidcr the tran"fer fU1Jction g,,(s)
-L I
Student Exercises 243
k(T"S + I)
a. Write the gain-polynomial form gJs)
r\,l + 2STS +
Use long division of the first- and second-order Pade approximations and cOinmenl
on the number of terms thai arc consistent with the Taylor series expression.
22. Consider the following interacting lank problem. Assume that the flow between
tanks 2 and I is linearly proportional (rJ 1) to the difference in lank heights and that
the outlet flow from tank 2 is proportional (f3 2 ) to tank height 2. Develop the trans-
fer function models relating the inlet Ilowrate to both tank heights.
23. Consider an exothermic chemical reactor that has the f{Jllowing transfer function re-
lationship hetween the inlet flowrate (input) and the reactor tcmpcrature (output).
2( - 2.5.1' I- I)
~ v = '.' •.
() ......
<' 9s 2 + 3s ,I, I
The units of the input arc liter/min and the output is in deg C.
a. Find the values of the zeros and poles. Is tbis systcm lIndcrdamped or over-
damped?
b. For a step input change of +3 liter/min, find how the Olltput changes with time.
How much docs the temperature decrease before increasing? Compare plots of
your analytical solution with those obtained using the MATLAB function
step.
c. What is the ultimate change in temperaturc aftcr a long period or time'!
d. If the steady-state input and output values (in physical terms) arc 10 liter/min
and 75°C respectively, what arc the physical values of thc results in band c'!
244 Transfer Function Analysis of Higher-Order Systems Chap. 9
c. If a step decrease in the input of ~3 liter/min is made, what would he the results
in b, c, and d?
24. Consider a CSTR with a first-order irreversible reaction A --> B. The modeling
equations are:
dCA~_ (F)
·+kCA + FCAr
dl V V
dC" F
dl ~ k C" ~ V CII
The following parameters and steady-state input values characterize this system:
F
= 0.2 min- l
V
k cc-c: 0.2 min-- '
gmol
1.0
liter
The input is CAl and the output is Cn. You should be able to show that the stcady-
state values of (~ and CjJ arc 0.5 gmolliitcr.
a. Show that the transfer function relating the feed concentration of A to the COIl-
centration of B is:
0.5
y(.I") =
(5.1" + 1)(2.5.1" + I)
Using Laplace transforms, find how the output varies with time.
c. Compare your results in b with the integration of the modeling equations using
the MATLAB integration routine ode45. Remember to use the correct initial
conditions. Also, remember that the transfer function results arc in deviation
variable form and must be converted back to physical variable values.
d. Discuss how the amplitude of the output changes if thc input frequcncy is
changed to 5 mitr-- t .
25. Oftcn higher-order process transfer functions arc approximated by lower-order
transfer fUllctions. Considcr the following sccond-order transfer function:
Student Exercises 245
1
1)(11 1)
Find the value of 'T in a first-order transfer function, Ij('TS + 1), which best approxi-
mates the step response of this second-order transfer function, in a least-squares sense.
(Hint: Define an error as a function of time as e(t):::: Y2(t) - YI(I), where }'2 and
YI are the step responses of the second- and first-order responses respectively. Find I
\vhich minimizes e2(t) when t --> inf'.)
26. Consider a criticaIJy damped second-order system:
1
~(\) "
" (71 + 1)( TI + 1)
a. POI' a unit step input change (Au = 1), find the time at which the rate of change
of the output is greatest (i.e., find the inflection point).
b. Compare this rate of change with a unit step response of a first-order systelll
with the following transfer function:
1
g(l) ~ (27,V + I)
c. Plot the step responses for a and h, for 'T = I. COinpare and contrast the n>
sponses.
27. Pharmacokinetics is the study of how drugs infused to the body are distributed to
other parts of the body. The concept of a cOinpartmental model is often used, where
it is assumed that the drug is injected into compartment 1. Some of the drug is elim-
inated (reacted) in compartment I, and some of it diffuses into compaltment 2 (the
rest accumulates in compartment I). Similarly, some of the drug that diffuses into
compartment 2 diffuses back into compartment I, while some is eliminated by reac-
lion and the rest acculllulates in compartment 2. Assuming that the rates of diflu~
sion and reaction are directly proportional to the concentration of drug in the COI11-
partment of interest, the following halance c<.J.uations arise:
~ -(k,o + k 12 ) x, + k 21 x, + II
/-Lg/kg min).
Experimental studies (of the response of the compartment I concentration to
various drug infusions) have led to the following parameter values for the drug
atracurium, which is a muscle relaxant:
246 Transfer Function Analysis of Higher-Order Systems Chap.9
~ 0.015 min I
a. [,'inc! the poles and zeros of the transfer function that relate the input, II, to the
olltput, xl'
b. Find the response of the concentration in compartment I, Xl' to a step input (If
I /-Lg/kg mill. What is the value at 10 minutes? What is the value after a long pc~
rind of time?
c. Find the response of the concentration in compartment I, Xl' to an iII/pulse input
of 10 f.Lg/kg. What is the value at [::: 0'1 'What is the value at 10 minutes'!
28. Consider the following delay-differential equations:
dX 1
~ -x,(1 - 8) I 1/(1)
dl
dx)
... ~ -2x
dt J
using the first-order Pacte approximation for dcadtimc, write the corresponding (ap-
proximate) pure differential equations. (llin!: define a new variable x3;:;;: xz(t - H).)
Solve the equations using ode45, for an initial condition or ()
in all states,
and a value of 1 for the input
MATRIX TRANSFER 10
FUNCTIONS
Chapter 6 presented simple examples for transforming a state-space model to a single 11th
order ditlcrcntial equation. Once the single differential equation was obtained, the meth-
ods of characteristics and undetermined coefficients (Chapter 6) or Laplace transforms
(Chapters 7-9) could be used to obtain a solution. A general method for converting a
slate-space model directly to the Laplace domain is presented in this chapter. With the
transfer function representation, one can easily obtain the corresponding single nth order
differential equation. After studying this chapter, the reader should be able to:
247
248 Matrix Transfer Functions Chap, 10
x Ax+Bu
y~CxjUll
dX I
= (111'\"1 -+ (1 1.',1.":, -+ hi] II ( I0 I ,
dl
dr")
{ 10.21
dl
( IO.JI
III order [0 generalize this procedure later. we \vritc (10.7) and (10.8) in matrix form:
(,,)]_.] 0"
.. (/: 1
11,",1 \ (1)1 ~
(/., I I.\:,',,(.,) 1hill U(s)
h"
or,
~~~~-~~----- ~,
Sec. 10.1 A Second-Order Example 249
yes) = [e"
X,es) I
e 12 ] [X,(s) + <1" U(\") (10.10)
or,
In this example, since there is a single input and a single output. G(s) is a single transfer
function, which we call g(s). The transfer function is the ratio of a numerator and a de-
nominator polynomial:
H(s)
g(s) •..• (IO.l7)
D(s)
The reader should show that the polynomials in (10.17), based on (10.15) afC (sec student
exercise 4):
(lO.19c)
(lO.19d)
Nix) .
Y(s) lJ(s) lis)
till
II,
dl
V·'/e no\\ have all automated procedure to find the transfer function for a single-input.
single-output. two-slate S}'stel\1. An example is shmvl1 below.
c ~ [II I]
[) II
I
!O.7~O(J
O.9().')()
(sl A)
s + 2.."640_
s j 2.:'i640
(s) A)'
I IJ.7SIII1 2..'1640 s f 0.67920
( (d A) J o 7';00\ I, U.6792(J
\ 2.:'1640 s
0.7';011 II [ "l;l~21 S
. .).XL).J
' t 2.5640 s I O.h7920
Sec. 10.2 The General Method 251
3.RZ55.\ 1 1.14765
C(sl-A) 'I!
" 2.5640 s + 0.67920
so,
3.RZ55 sl 1.14765
yes) ~ U(s)
s/ -t-- 2.5640 s
t- 0.67920
d\' dy dll
, + Z.5640 ' ,j 0.67920 \' ~ 3.RZ55 + 1.14765 II
de dt -- dt
Consider a general slate-space model with 11 stales, JJ1 inputs, and r outpuls (see Chapter 5):
tit"1
= (lIIX I + (/I2X2 -+- ... +- Ol/J·T" -+- h ll u 1 -I ... + bllJlu m
dt
(10.20)
I.~"
.,
i, I
=
[all
_a",
a'''.lx,
a"" x"
I [""
+ -"",
(10.21 )
where the dot over a slale variable indicates the derivative with respect to time. Recall
from Chapter 5 that the eigenvalues of the Jacobian matrix (A) determine the stability of
the system of equations and the "speed" of response. Now, taking the IJaplacc transform
of (10.22):
Xes) (.II ~ A) 'lIli(s)
Y(I) ~. lC (.II ~ A) 'II + DIV(s)
If D ; : ; 0 we can write:
gll(S) g pes)
g'm(s) I
G(s)
The routine ss2 t £ can be used to convert a state-space model to a transfer function
model. After entering the A, 13, C, and D matrices, the command:
[num,denJ~ss2tf(A,B,C,D,m)
will generate the numerator and denominator Laplace domain polynomials for the transfer
function between input number m and the outputs, in descending order of s.
A -
a 0.9056
-0.7500 -2.5640
» B=- [-'1.5302,0;3.8255,0.3]
13
··1.5302 o
3.825'3 0.3000
" c - [1,0; 0, ] ]
c c:o
1 0
0 1
D [0,0; 0,0]
"
D ""
0 0
0 0
Input I
The numerator and denominator polynomials relating the first input to the two outputs arc found
using the following command:
num =
[] -1 .5302 -0.4591
0 J .8255 1.1476
den
1.0000 2.5640 0.6792
where the first row of the num matrix is the coefficients of s in the gil (s) polynomial. in dccreas~
ing order from left to right. Similarly, the second row of the num matrix is the coefficients of s in
the 1;'21(8) polynomial, in decreasing order from left to right:
3.8255.1' + 1.14765
)',(.1') ~ g2l(s) "l') ~ .1" + 2.5640.1'1- 0.67920 ",(.I')
We realize that the eigenvalues of the A matrix and the poles of the transfer fUllctions will be the
same. 'fhis is verified by the rooLs and eig cOll1mands
254 Matr"ix Transfer Functions Chap. 10
((lot-,; (den)
dll;:;
O.30()O::1
» eiq (al
an,;
. 3 () CJ CJ
.) . /. 6 ,} ~J
I ,,"iJ02 (s +- O.J)
III(S)
(s +- 2.2(40)(0" +- 0.3)
3)Q55 (s 0._')
1- !J'''. ',-.11 1(,\)
is + ~.jA(I)(., 11.,1
\\herc \~C ha\'c the interesting result (11:11 tile lern canccl~ (jill' uf the pll1cs ttl yield firsHll'clc1
sy"kIl1S
).5J02
/I (s)
(s j. 2.2(40) 1_
3./{255
II,(S)
(s + 2.1(40)
0.6759
0.4417.1'1 1 11 1(.1')
1.()S()7
1/, (s)
(1·)·)17 \ 1
\Vi.-' \I.ould notice the Il'ro-pok cancellation if we ;\Is() lIsed the TOC)t~3 cOll1llwnd \() find the
fOOls of the IHlIJ1Crator polynomial
q'Tot:-? (nurc(l,:))
- () . 3 C1 (I 0
-().~jOCC
and \\"l' sec that tbe rool of the Jlllll1craloJ pulynomi;l! is the same a" one of the nl(l!s of the de-
nOlllinalor p()Jynomial.
Sec. 10.3 MATLAS Routine ",,2tf 255
Input 2
The numerator and denominator polynomials relating the second input to the two outputs arc
found using the following command:
»[num,den]=ss2tf(a,b,c,d,2)
num : : :
o o 0.2717
o 0.3000 o
den
1.0000 2.5640 0.6792
,-tnd we have the result that;
0.2717 ( )
v,(s) = g,,(s) lI,(s) + 2.5640.':1 -t- 0.67920 1/
2
s
0.3 s ( )
y,(s) = gn(s) lI,(s) + 2.5640 s _ 1/, s
I ().t,7 ')7l)
The relationship between the second input and the second output is particularly interesting. The
secoodinput has no steady-stale effect on the second output, as can he seen from the final value
theorem. Assume a step change of magnitude !YJ.u z in input 2.
0.3 s au}
y(t-, ~) = s yes -) 0) -- 0
( 2.5640 s I 0.67Y20 s
1.5
y,
:;,.., 0.5
o
-0.5
-1
o 0.5 1.5 2
time
or,
- 0.6759
y,(s) = 0.4417 s + I LI,(S)
1.6897
y,(s) ~ 0.4417 s + I fl,(S)
The step responses for a unit step input change are shown in Figure 10.1.
0.4
y,
0.3
2: 0.2
"
0.1
a
0 5 10 15 20
FIGURE 10.2 Unit step change in input 2. Notice that the- steady-state value
of Y2 docs not change.
Student Exercises 257
Dum
0 0 0.2717
0 0.3000 o
d.en
1.0000 2.5640 0.6792
»[y,x,t]=step(nuffi,den)
plot(t,Y)
SUMMARY
We have shown how to converl a state-space model to a transfer function model, for IllUI-
tiple inputs and outputs. We have also seen some interesting results regarding pole-zero
cancellation. One has to be particularly careful with pole-zero cancellation if a pole is UIl-
stable (positive), as will beshowll in Section 11.3.
The following MATLAB routines were used:
STUDENT EXERCISES
- 0.325 OJ25 0 0 0
0.2 -0.325 0.125 0 0
A= 0 0.2 - 0.325 OJ25 0
0 0 0.2 - 0.325 O. I25
0 0 0 0.2 0.325
0.2 0
0 0
B= 0 0
0 0
0 0.25
a. Convert this model to transfer function form, assuming that all of the states arc
outputs, using ss2tf.
b. Find the response of all of the states to a unit step in input I. Usc the fUllction
step.
c. Find the response of all of the states to a unit step in input 2. Usc the function
step.
d. Compare and contrast the curves from band c.
3. Consider the following model f()f an isothermal CSTR with a single ltTcvcrsi ble re-
action (sec Module 7). Find the transfer function matrix relating bOlh inputs to both
states.
dX,]
ai x,
~ O.2IU + 1- 0.5
-OA O' 0.5
0.211'
o //'.1
I dX2
dt
= [ 0.2 II)
-OA
A= D.3.1
I3 -4.5
B_[0
- SD
-7.5
D
D.l
D
D
1.5
I
C= [Io
Student Exercises 259
[
at-
<It I
'h 2
III =
5
_ 1
OJ
1
\,
[\,1 + [
5
7 ]
2 II
<It 10 2 25
}'::::: x 2
Show that the eigenvalues of the A matrix are -liS and 112, so the system is unsta~
hie. Also, plot the step response. Derive the transfer function relating u(s) to yes)
and show that the unstable pole is cancelled hy the positive zero. This problem will
be analyzed in more detail in Chapter 11.
7. Consider a chemical reactor with bypass, as shown helow. Assume that the reaction
rate (per unit volume) is first-order (r = kC 1) and C 1 is the concentration in the reac-
tor (the reactor is perfectly mixed). Assume that the volume in the reactor (V) and
the feed fJowrate (F) remain constant. The fraction of feed bypassing the reactor is
(l ~ a)F and that entering the reactor is of. Assume that the fraction bypassing the
reaclor docs not change. 'l'he inlet concentralion (C in ) is the input variable and the
mixed outlet stream composition (C2 ) is the output variable. Write this lllodel in
state-space form, using deviation variahles.
x'-:::Ax--I-Bu
y=Cx+Du
(1_(<) F
F
(X F
C, C2
8. Consider the follmving set of series and parallel reactions (from Module 7)
kj
A+A~f)
Material balances OIl components A and B yield the following two equations:
dell F
.. ~ ('C 1,) + (k l C..I 'k,'cI')
dt V '
\vhcrc the rate constants are:
'i liters
k = ' 1nio' j Itllll k,
I 6 .1 6 mol min
and the steady Slate feed and reactor concentration of component A arc:
IlHl] mol
III CA\ 1
liter . liter
a. Find the steady-state dilution rate U/V) and concentration of (shO\v all unih). n
h. Linearize and put in state-space form (find the numerical values of the A, B, and
C matrices), assuming that the manipulated variables afC dilution rate (FIV) and
feed concentration and that hoth states are outputs.
c. l~'ind the eigenvalues (show units).
d. Find the transfer functions relating each output to each input. Find the poles and
zeros for each transfer function and make plOlS of the responses to unit step
changes in each input. Comment on your results.
BLOCK DIAGRAMS 11
The objective of this chapter is to introduce block diagram analysis. After studying this
chapter, you should he able to:
261
ESCOLA DE ENGEN HARIA
13IBLIOTECA
262 Block Diagrams Chap. 11
\\'\, han: shown 110\\- Laplace transforms (irc Llsed to reduce differcntialcljuatiollS to
algehraic l"clatiullships. Algehraic equations arc mllch casier to Irlanipul ethan dif-
rl'rt'l1liall~qll{\tiol1s. Similarly, hlock diagrams allO\v us to easily Illanipu . complex
modds that ,Ire cumpo...;cd of subset'; of simple illudels.
!lr(i)
T + r(l) k 11(1) ( I I. I I
!II
g(s) ( 11.31
'TS+
!'!'()CCSS engineers usually try' ,1Ilel solve problems b) 'ike-telling diagrams to undC)";-,lal1d
lilpLiL-OUlpUI rL'1iltionships. Process control engineers usually lise block diagrams to urllkr-
.:;lllIJ the illpu["output relation"hip" in a dynamic system, A block cli,lgrarn represcntation
\1!'(11.2)isshowninFigure 11.1.
\\\~ can sec that II(S) is tIll' input to the trallsfer functiun block <lnd yes) is the output
i'i(lillthc transfL'r function block. Block. diagr,un" \vill he particularly useful \vhell analyzing
\'ulllpkx dynamic sy'slellls. which may be represellted as hlocks ill serics or parallel and
'-illl kedhack. Tiley are particularly,' mcful for feedback cOI11rol Sy"tClll design and analysis.
('ullsidcr 1l0\\ the block diagram rcprc"entation of t\\'o prucesses in "eric" ,IS shown ill
i ;gme 11.2.
y(s) 0
g,(s) z(s) cO g,(s) g,(s) 1/(.\)
or,
where:
(Iii)
and
( 118)
'rhe same idea can be continued for any Dumber of transfer functions in series. The ~~;tl!~
dent should notice that the poles of 1.1 system composed of many lran:':lfcr functions in se-
ries arc simply the poles of each transfer function. This leads to the following conclusion
about tbe stability ofsysfems lvi/II tran.~ler.fllnctirms in series:
If([ system is composed (?(traJl.~r('rli/ll('ti()lIsin series, (llId ifal! r?!'t!wse tralls(cr/il1l(,t;o/iS (/ie s/(/-
ble, then the overall system ;,<, stable,
Also, the 7.eros of a system or transfer functions in series are simply the zeros of the inch-
vidual transfer functions.
Again, in this section we consider two blocks in series, as shown in Figure 1 J .2:
If WC ;lre not careful. we Gill O\t'rIUUK possihle prublems \\ith sy'>lCllh in scries, if \\c
look onl> at the u\'crilil input/output rclati()lhiJip. 111 the Ile\! cX<JI11pic \\c slw\\' problems
\\-jtll f)ofL <em ('(f!lcellu{ioJ).
---------
EX"'IPLE 11.1 Lead/Lag in St'ril's with Lnstahle First-Order Systl'lll
Cu[]sidt'f the' follO\\illg lead/la~ in s(Tic" \\ itll <111 L11l.\['lhk' first-order' ": :'lCllI
2.\ I
g:(s) (11.11 )
)., I
( Il.l .2)
2\ -
'I 1/(\)
I·
\\'(' Intl"t ['caJIIl' Ill:]! tllese tr,lIlsl"cT fUJlctiolh UllimiltL'l: ['cprt'SC111 (l phY\lcd )'r'uccss III pracrin'.
ph) "iedl j!iH,II11('tCI'S <.-'annul hl' kll(1\\'ll pnl't~(11) Whal tillS I11C,II1S h Ill,]l gt'll(~r(lll) the 1l1l111Cf<.llu]
llf g (\\ \,ill I1Pl ('\;It:ll) cmCc'l the dCllOminatur of g~(sl. in pr:lctin'.
COllsjtkr II n:ali:-li . . . (,;dSI:\ \\ h.. . re .t.':(si ha) ,[ sl,iglH t:rrOl in the \'alul' (If till' poll'
I
t;,(s) ill 14)
-- :U)()O!l -'--- I
2\
I'{s)
.:.()OUll
I J I I ~I
I{S) "---' g(s) 11(\)
--.:\
I (),()Ons\~
'\Olll..:(' th,ll \\ IlL'll \\l' do nnt 11d\<" pnfcd p\lkllt:n\ Cdlll..:l'llilIHlIl. thnc i~ :111 ull\labk pok in tlh'
illput!PlItPlit relationship. \(sl= ,L:II) 11(1 I. Our goal t1ll\\ i\ \(J C()lllp;tl'l: tll(' I"l'SPOIlSC\ 01 thc 1\\0
11HldL'I\ I 11 1J) dllt! ( I 1.1,"'\), LCl II (\ ) I"cpl"CS,'lll lhl: (lutpul ill ( 1 I.I,~I ;\Ild \'JI) rl']1rL'~cnt tile \lUl-
pUl in I 11 I:' I \\~lllllillg:l unll \kP illpUl. 11(1);;:: Ill.
I I I 1(1)
\(5s I)
Also,
-2\' +]
y,(s) ~ s( ~I (J.60lJSs' -:;: 2.9999s + I) (lUg)
Y1' stable
0.5
-0.5
o 5 10 15 20 25
time
FIGUREl1.3 Comparisollof(11.17)and(1119).
Note that if we had used the state-space form for the model represented by equations
(ll.JO) through (Il.J 2), we would have discovered the instahility, cven for the perfect pa-
rameter case. The following example analyzes the state-space form of l~xamplc 11.1.
z;::~ x+'T!'u
'Trt 'T(/
266 Block Diagrams Chap.11
T"S +
, so:
T,t\ + [ 5s ~ . I
dl." 7
)
\ + )
II (11.20j
dl
2
,\ II (11.2 J)
) 5
(Illd lhe stall' space rcali/ation of the ullstable lag is:
dv
dl
,I \'
dy I
\' x + II ( 11.23J
dl 2 III )
rf we usc notation
r 1 :=:.\
Xl c::;;: Y
\\c can \\rile ( II 20) and (11 2J) in the following form:
dt j 7
II (1 J .24)
dt 5 5
dx-. I
2 x, 10 Xi
II ( 11.2'1)
dl )
x Ax Bu
Y (.' xl l) u
\Ve \tTlle
I
~]i:' I
(hi 7
dl :"
dx,
1_ dl
I
I() 1J II
( Il.2hl
\\it' c<lsily' find Lhat the eigenvalues of the /\ matrix arc --1/5 and Ill. The positive eigenvalue in
dicatcs thatlhis S.ySlCJll is llllst;\hlc.
Sec. 11.4 Systems in Series 267
The previous example illustrates the importance of not cancelling an unstable pole with a
right-half-plane zero. It also shows how slalc~space analysis can always be used to ad-
dress the stability of a system.
The dynamic behavior of chemical processes can often be represented as a scries of sim-
ple models, such as first-order transfer functions. As an cxmnplc, consider the following
process, which is characterized as II first-order processes with a gain of 1 and a time con-
slant of 5:
I
g(s)c (5.1 + I)" (I 1.27)
The step responses for 11 I to 5 arc shown in Figure 11.4. Notice the characteristic
::::;0
S-shape for all orders greater than 1 and the additional lag associated with each higher
order.
Although we analyze processes lIsing transfer functions, to obtain time domain responses
we must usc a IllHllcrical integration package. Consider a system of II first-order processes
in series, as shown in Figure! 1.5.
IJere we write the sct of ordinary differential equations that describe this process.
'fhe ODE describing the first process is:
dX 1 k,
Xl + u ( I 1.28)
dl T, T,
1
(53 + 1)'
o~L.L~~~~--c:::---:'::------:c:::------:l
o 5 10 15 20 25 30
time
XIL-lS)r----'XIL(S)
gutS) )~S)
Notice that we can think of the output of the first process as the input to the second
process:
k
72
x) + 7 z X' j ( 11.29)
2
( 1130)
To solve (Il.28) through 01.30) we can lise the numerical integration techniques devel-
oped in Chapter 4 or the analytical expressions developed in Chapter 6.
We can also write (11.28) through (! 1.30) in the following state-space form:
dX j
dt
- 1
0 0 0 x, k ,
T, T,
dx z k2 1 0 0 x2 0
dt T2 T2
+ u ( 11.26)
dX n , 0 0
1
Tn , 0
dt
dX n 0 0
kl/ X" , 0
,Ii Tn Tn
- X" 0
In Example 11.2 we show how to usc the MATI,AB routines series and conv to find a
transfer function that represents two blocks in series.
We use the following MATLAB commands (0 enter the numerator and denominator polynomi-
als for each transfer function:
»numl [1.5] j
>:> denl [2 1] j
»num2 [3];
» den2 - [4 l];
the series command generates the llurucrator and denominator polynomials for the transfer
function g(s):
Dum :::
o 0 4.5000
den : : :
8 6 1
4.5
M(s) ~ 0
gs~ 1- 6s 1- 1
cony
cony is llsed to multiply two polynomials. Using the previous example, we multiply the numer-
ator polynomials to find:
nwn -
4.5000
den ~
861
y, (5)
9, (5)
+
u(s) Y(5)
+
9, (5)
Y2 (5) FIGLREI1.6 System" In parallcl.
For this sy.'stem \\'C can \\Tite the total output. r(sL as the sum of two outputs, \'1(.1) + Y:::(.I),
(II ,I)
{1112}
or,
\\'here:
( 11 ,3~1
Consider the case \vhere gl(s) and g2(s) arc fir'>t-ordcr lramJcr functions:
(1115)
( II,ft)
'loS -+ 1
so
fl..
g(s) (1117)
TjS
(] J .38)
where:
" ",
~
I 1<2 (I lAO)
", j k2T l
T"
", I
"2
We will assume thallhc transfer functions gl(s) and g2(s) arc stable, so Tl and T2 >, O. The
(I IAI)
goal of this section is to show a system where inverse response (discussed in Chapter 9
and Example 9.3) behavior can occur.
Recall that a transfer function will have inverse response only if there is a right-half-plane
(positive) zero. Since the zero is "-117/1' this system will have inverse response only if
Til < O. We find that Til <:; 0 only if k j and k2 are of opposite sign. We can arbitrarily as-
sume that k 1 :> 0, which means that k2 <: 0 is necessary for inverse response. For inverse
response, the condition:
+ k 2T l
means that <0
kl + k]
or,
"
", + ",
<:
", + ",
which yields the following conditions for inverse response.
1. If k J + k2 ::> 0, thcn k[I2 < k211' which implies thal 12 fT [ musl be./ kzlk[ for m~
verse response.
2. If k J + k 2 -< 0, then kJI2 ::> ~~k211' which implies that 7/11 must be -:> -kik] for in~
verse response.
Physical examples of systems with inverse response include: steam drum level, rcboilers
in distillation columns, chemical and biochemical reactors. A reason that inverse response
behavior is important is that it creates tremendous challenges for tight process control.
We can usc theMA'fLAB routine parallel to simulate lwo systems in parallel,
as shown by the next cxample.
-I
8,(S) -
lsi 1
2 -1
g(s) ~ f
5s + Is +1
»num! [2] ;
» denl = [5 1];
» num2 - [~lJ;
» den2 [1 1];
nulU =
0 -3 1
den
5 6 1
» [y,x, t] stE~p(num,c1en);
»[yl/xl] sLep(numl,denl,t);
»[y2,x2] step(num2,den2,L);
» p1ot(t,y,t,yl,t,y2)
y,
y,
2
o 5 10 15 20 25 30
FIGURE U.7 Two systems in parallel that have an inverse response when
added together.
••..•__••• 1
Sec. 11.6 Feedback and Recycle Systems 273
This previous example has shown that inverse response occurs in systems where the gain
of the "s(ow process" (larger time constant) is larger in magnitude (but opposite in sign)
than the "fast process" (smaller time constant).
r,'ccdback systems arc common in engineering. Examples include chemical and biochcllli~
cal reactors, where a certain portion of the product stream may be recycled to the fccd-
stream. Feedback naturally occurs in most "self-regulating" models where, for example,
the rate of change of a state variable (say, concentration of A) is a function of the same or
another state variable (say, concentration of B).
The entire field of process control is based on the concept and theory of feedback
systems. Our goal with this section is to introduce feedback analysis and, in particular,
stability analysis of feedback systems. A block diagram of a feedback system is shown in
I·'igure 11.8.
In this figure, the input to the feedback system is res) and the output is yes). Here we
develop the relationship between res) and yes).
yes) ~ g lv) /1.(.1') (I 1.44)
but 1/(.1') ~ r(s) + z(s) (l1.4S)
and z(s) ~ g,(s) yes) (I 1.46)
g (\) ~
g,(s)
----------
where (11.50)
" ' I - g,(s)g,(s)
u(s)
r(s) g (s) I--
+ ~ 1
+
'--
z(s)
g2(s) f4-
FIGURE t 1.8 Feedback diagram.
274 Block Diagrams Chap. 11
u(s)
r(,) g (,) y(')
+ 1
+
L....-
z(,)
gz(,) f-
and we know that if the poles of gcl(s) arc stable, then the feedback system is stahle. \Vc
realize that the two block diagrams shown in l·'igurc 11.9 arc equivalent.
(11.51 )
k2
( 11.52)
'2S _of
glv)
1i,(s)Ii,(·I)
kl(.;s I
(T,S ,- I )(T)S I) - k,k)
k, (T).I , I)
(11.5.1 )
('1T,S2 -1 ('I -j '2)sl k1k!)
and Xd(s) is stable if the roots of '1'2S2 + ('I] + T2 )S + J - k 1k 2 arc stahle. We recall frum the
I{outh stahility criterion that aJi of the roots of a quadratic polynomial afC negative if the l'oelli
cients of the polyllOlniaJ are positive. If we assume that 'I and 1"2 arc positive, then (11.53) will
be stable if I k1kz is positive. For stability, then, k 1k 2 must be less than I. [,d's consider the
folJowing IlUinerical example:
Sec. 11.6 Feedback and Recycle Systems 275
k]
g,(s)
lOs 1
Since k l ;;;;; 2, then k 2 must be less than 0.5 for stability.
As a Ilumerical chc(k, lei k 2 :;;:; ~ I. Solving for the roots of
T1lzS
l
+ (T I + 7))S -j 1 k/<2 0
we find
50."J + 15s-1 3 0
which has the roots (using the quadratic formula)
-- 0.151 0.1936j
(we can verify this result using the MATLAB routine roots)
Since the real part of the rools is negative. the system is stable. This is verified in the
MA'rLAB simulation presented in Figure I J.I 0, where the response of the output to a unit step
change in r is presented.
1.2
0.8
0.6
'"
0.4
0.2
0
0 10 20 30 40
time
We can also Lise the MATLAI:3 feedback function to obtain the closcd"Joop transfer
function, as shown below.
2
5s
-I
lOs +
276 Block Diagrams Chap, 11
numl - ] ;
»den] = [5 1];
" [nurn,c]cn]
nUllt -
den
S (j T ') 3
Recall from Cb,OIptcr A that the purpose of the Routh stability criterion IS t() determine if a
polynomial with the following form has any positin:' roots:
II
Since trallsfer functions that have dCIl()lllinator polynomials in the Laplace transform vari-
able (s) are arc the S,lIl1C form (IS (I J .54). \VC can lise Routh i1naly'sis tu determine the S[d-
bility or transfer rUlltioJ1s. As before, assume that (/11 > O. If (//1 < 0, then rmtltiply' (J 1.54)
by ~ I. A nccl?sswy condition for stability is that all of the l'{)efficicnts in (11.54) must Ix
positive. If any of the coefficients arc negative or zero, then at !cast onc pole (root of the
characteristic equation) is positive or lero, indicating that the equation is unstable, Even if
all of the coefficients arc positive. \vc cannot state that the systcnl is stahle. \Vhat i"
needed is a sl{/I/cient condition fur stability'. 'ro deterrnine that the system is stahlc. \\('
must construct the Routh alTay and llSC the Routh stability' criterioll. which provides ncc-
essary and sufficient conditions for stability.
Sometimes we simply \vish to determinc if a particular systcm is stable or noL \vith-
out actually evaluating the eigenvalues. This is particularly true if we Vv,'ish to determine
valucs of system panlll1ClCTS that \vill cause a SYSll'll1 to lose sUlbility 'Thi::; appnl,lCh will
be useful in performing a bifurcation analysis in later chapters (14 and 15), and in LUlling
control systems for chemical processes.
Sec. 11.7 Routh Stability Criterion Applied to Transfer Functions 277
11.7.1 RouthArray
rf all or the coetlients or the characteristic equation (11.54) are positive, then develop the
following ROllth array:
Ro\v
I an (In- __ 2 (ln4
2 {fll_! an -3 (111_ )
3 ", 172 h3
4 '" (;2
J/+I
where 1/ is the order of the polynomial. Notice that the first two rows consist of the coeffi-
cients of the polynomial. The clements of the third row arc calculated in the following
hlshion:
({n-2 -- a/PII (lll_'_ !
{In __ ]
and so on. [~lcmcnts of the fourth and larger rows arc calculated in a similar fashion:
and so 011.
A sufficient condition for an rools of the characteristic polynomial to have negative real paris is that
ali of the elements in the first colunm of the Routh array arc positive.
yes) -
or,
( )S I )(1, ~ I)
A
lOs
Our g(lal h ((i r-Iml k, til (lSSUrl' __ lahility nl the clnscd-luup s~'-.tl'1ll
We e:lsil) find the traw,fci l'ullclinil. gi.\):
"111h I}
g(s)
( I50s' 9).\" ISs --~ 2/,;,)
150 IN
\)5 I 2L
, 1>1 II
4 cl
rile C()I1c1lliull is that all (II > n, Ilhidl is sari'-Jit'd if J - 2k, > 0, u!" k, ().:'i.
ilCCC,I.\UrI
'I'll(' sufficient conditiull is s<lli:·Jiec! d' all uf the cudfkiClIl'- in till' fil-\( ('Ohllllil (\1 111<.'
Routh array arc pmitilt'.
(u/ - 1/,11" ISO
h IX II 2k ,) II
a 90
hi (1,-, a)) ,
1."1 (III - 2k II
hi
The hi l'lillditioll is satisfied if k~ > :=;) while the ('I cUlldlljOI] is the \(lillt' as the necessary l'(lll
ditioll. \Ve then kl\l? the folluv,'illg rcstrictioll on k, fur st;lhility'
5.2 0.5
11.8 SIMULINK
III the prC\ious sections \VC 11;\\c shown hO\\ \1XfLAB routines can be' usnJ for hlod; dl
agr,iIll analysis and simulation. The ohjeetJ\"c of this sec-tirHl is to Lise the bind dl<l~rall1
simulation features 01" SIMULINK.
Summary 279
Clock time
ff------j
Step input ;=;G~s---I~ .J'J
output
g2(s)
Consider the block diagram system from Example 11.3. A SlMLILJNK block dia-
gram is shown in l~'igure 11.1 I, Notice the use of step, transfer function, sum, workspace
and clock blocks to generate the nccessary input and output information.
The parameters menu is used to specify the intcgration type (L1NSIM), final time
(30), and minimnll (0.01) and maximum (I) step sizes. The results arC the same as shown
in r'igure J 1.7. More information on SIMULINK is provided in Module 4 in the final sec-
tion of the text.
SUMMARY
STUDENT EXERCISES
1. Consider a first-order process that has a positive pole (Ilcgati\c tilne co]]stant). indi-
cating that the process is open-loop ullstahle.
5s +
It is desirable to design a feedback cOTnpcnsatOJ g2(s), so that the feedback systl'rn
is stable. Assume that g2(S) is simply a gain:
A'~(s) J,:,
Find the range of gains that \vill make the following feedback system stable.
u(s)
r(,)-..-~ g (s) y(s)
+ 1
+
,(s)
g,ls) c. k
Find the values or II. (if allyl that \vil! ensure stahility of the system. Shmv )'OUT wurk
and explain y'our reasoning.
u(s)
r(s) g (s) y(s)
+ 1
+
-
z(s)
gz (s) r.-
3. Find the analytical solution for a unit step applied to the following process:
ge,)
(5.1 1)'
4. Consider the recycle system shO\vn belm\', \vhere:
Student Exercises 281
u(,)
r(') g (3)
+ 1
+
Z(3)
g2(3) I--
Discuss how the values of k2 and 1'2 effect the dynamic behavior of y with respect to
a unit step input change in r. Use SIMULfNK and show compare plots for various
values or k 2 and 1'2 to illustrate your points.
LINEAR SYSTEMS SUMMARY 12
One purpn-;c or thi" chapter i\ to summari/c the technique'> LhaL ha\c been dnelc)pcd ill
Chapters:) through I I to :-,ol\c lincar ordinary dilfCfl'lltial equation;.,. Since the focus 11:1"
beell on initial \;due problems. \Vc also intrntlucc techniques to soh'C huundary \U]Ul'
()[)I:: problems ..Also. since the emphasis has hCl'll on cOlllinoLls (dilTncJltial equatiun
h<lsed) rnodcls. dJlothn objccti\c is to introduce discrete IllDdcls. ,After Slutly'ing tIlis chap-
ter. the student \llOUld he able to:
Lsc till' dl~Haclcri"'lic equation lT1Cl1lOd to \ol\c hound;uy \alut' linear ODE
prublclllS
Select all appropri,l1c technique to sohc a particular linear initial \<.tlucproblcllJ
r:onnulalc lint'ar discrete-time lllodcb
I':stinlalc parameters for linl'ar di~crcte time mo(\eh
12.1 Background
12,2 Linear Boundar) V<lluc Prublcms
12.3 Rc\ic\\ of \kLhods for Linear Initial Value ProlJ!cms
12.-1- lntruduction lo Discrctc~ rime i\lodcls
12.) Parameter J-~sLilllaLioll of Discrete Linear Systems
282
Sec. 12.2 Linear Boundary Value Problems 283
12.1 BACKGROUND
Thus far in this text, all of the problems that we have solved have been initial value ordi-
nary differential equations. '1'0 solve these problems we simply need to know the initial
values of the state variables, and how the inputs change with lime. The models arc then
integrated to find how the states change with time. Ordinary differential equation models
may be constrained to satisfy boundary conditions. Boundary value problems often arise
when solving for the steady-state behavior of a dynamic system modeled by a partial dif~
ferential equation. 'T'ypically, a boundary value prohlem has distance as the independent
variable and the boundary conditions lhat must be satisfied are tbe values of the state vari~
abies at different locations (typically at each "end" of the system).
Recall that in Chapter 11 we required ninitial conditions to solve an nth order ini-
tial value ODE. Similarly, we require n boundary conditions to solve an nth order bound-
ary value ODE. Most chemical processes that can be modeled as second-order boundary
value problems (e.g., the reaction-diffusion equation) arc two-point boundary value prob-
lems. A second-order split boundary value prohlem has a boundary condition at one end
and another boundary condition at the other end. If both boundary conditions were at the
front end, then our problem would be an inital value problem. U' both boundary conditions
were at the rear end, then we would have an initial value problem by simply redefining
the independent vari'lble and forming an initial value problem in the opposite direction.
In this chapter, \ve first cover linear boundary value problems in Section 12.2 and
review methods to solve linear initial value problems in Section 12.3. We provide an in-
troduction to discrete-time models in Section 12.4 and show how to estimate parameters
for discrete-time models in Section 12.5.
An analytical solution to boundary value ordinary conditions can be obtained lIsing the
method of characteristics when the ODE and the boundary conditions arc linear. Consider
the following second order ODE
+ aox = 0 ( 12.1)
where £1 0 _ at and 02 arc constant coefficients, _r is the state variable (dependent) and z is
the independent variable (often distance). The solution to (12.1) will have the form
( 12.2)
llsing the method discussed in Chapter 6. The constant coefficients (e J and ( 2 ) are ob-
tained [rom the boundary conditions.
-----------------------------------------_.--------------- -
EXAMPLE 12.1 Second-order Soundar)' Value Problem
Consider the following second··order equation:
d)x dx 7
j 4 I x o ( 12.-1.1
dz 4
subject to the boundary conditions 'II each end;
x(z ~ 0) 2 ( 12,))
x(z=-I)=1 { 12,hl
A' + 4A + : _. 0 ( 12.7)
AI 3.5 (J 2.SI
A, - 0.5 ( 12.91
Substituting the boundary conditions results in two equations and two unknowns:
2 = c1 + c;~ ( 12111
C e:1.S
j
I- (2 eO' S (12, J 2)
which yields:
C 1 "" 0.36968
", - 1.63032
A plot of the solution, x:;:;; 0.36968 e -35z + 1.63032 eO. 5z , is shown ill figure 12.1.
1.8
1.6
1.4
1.2
1
a 0.2 0.4 0_6 0_8
z
More generally, the boundary conditions may consist of some function of the state vari-
able and its derivative. The more general linear boundary condition is the form:
dx
", I<"ox=d
dz
7
+ 4x = 0 (124)
dx
+x=1 al z ,. 0 (12.13)
dz
dx
=0 at z (12.14)
dz
( 12.15)
dx
(12.16)
elz
( 12.17)
Solving these two equations for c 1 and c2' we obtain the solution:
0.1
X; 0.1
-0.2
0.3
o 0.2 0.4 0.6 0.8
z
We have illustrated how the method of characteristics is llsed to solve lincar bOllndar)
value problems. 'rhe solution to nonlinear boundary value problems generally in\'llIH':-' it
crativc methods. For example, consider a single second-order nonlinear problem \vitll
boundary conditions at each end. 'We know that the second-order equation can be COI1-
verted to two first-order equations. Typically, one boundary condition will fix an '"inititd
condition" for one of the states. A second initial condition can be iteratively guessed
(lising a Quasi-Newton method, for example) until the equations, when integrated. yield
the correct value for the end boundary condition. This approach is shol,vn in l~xalllpl(' 12.,~
for the linear system considered in l':xamp1e 12.1.
EXAiVlPLE 12.3 Formulating a Boulldal'Y Value Problem as an Itcnttive Initial Valuc ProblcHl
Consider the secolld~ordcr bOllndary valuc problem:
7
x~O ( 12.-1-1
4
with thc boundary conditions:
x(z ~ 0) 2 ( 12.5)
x(z cc 1) (12,61
It can be shown that (sec student exercise I), by defining xl'"" X and '\'2 = dy/d:. the follu\\'il1!!
equations arc obtained:
Sec. 12.3 Review of Methods for Linear Initial Value Problems 287
( 1220)
(1221 )
x= f(x,u) (12.23)
y ~ g(x,u) (12.24)
12.3.1 Linearization
() .. -
II
_rJg'l
allj X"II,
where X,I" H,I" and Y.I, represent the steady-state values of the states, inputs, and outputs,
which solve:
() = f(x"uJ ( 12.25)
y, = g(x"uJ ( 1226)
After linearization, we have the state space form:
x' = A x' + B u' ( 12.27)
y' = ext + Dn' (J2.2n
where the deviation variable vectors are:
X' = x - x, ( 12.29)
II' = U ~ II , ( 12.10!
Generally, the (') notation is dropped and it is understood that the model is in deviation
variable form:
x=Ax+BII (12.31)
y=Cx+DII (\ 2.32)
c. For inputs that are constant over each time step (from t to t + Cit) (Chapter 5):
x(t + !J.I) .~ e A'" X(I) + (CAM - I) Al B lI(t) (1216 )
where k represents the ktll time step_ This represents a discretc~timc model, which is
discussed in more detail in Section 12.4.
dx
+ ... + (lJ tit + u() J: =--= 0 ( 12.38)
and solving for the roots (eigenvalues) of the nih order polynomial. 1f the roots arc
distinct, the solutionis of the form:
( 12.40)
(12.42)
ii. Solve for the particular solution by determining the coefficients of a trial func-
tion (see Table 6.1, Chapter 6) that satisfy the nonhomogeneous equation:
xl'(t) (12.43)
c. Use Laplace transforms to solve the nth order equation (most useful for nonhomo-
geneous equations) (Chapters 7-1 I):
(1245)
(12.46)
(12.47)
dllu ri"-Iu du
= b----
/I dtll
+ b II-I J+ ... +b J dt +bou (12.48)
dt ll --
For physically realizable systems, b ll = 0, Onen many of the leading hi terms arc
zero. If the leading r terms in the b polynomial arc zero, then the systcnl is referred
to as relative order r.
Previously we have assumed that: the state-space model has already been converted to a
single nth order differential equation. We can also transform the set of n firsl-ordcrlincar
state space equations directly using:
Generally, the Laplace transforms technique is used for nonhomogeneolls problems, that
is, systems that have an input forcing function (such as a step).
XI
. + Ib.
l1
([1,,]
. lX1]
. . .
{{/Ill _~XJ! _nhlll
or,
x~~Ax+Ru (1231 )
x-::;:ax+!Ju ( 12.50)
has the solution:
iJ
X(I) = eal X(O) + (eM - 1) U(O) (12.51 )
({
Continuous time models transfer function models arc characterized by the Laplace tran-
form variable, s. Similarly, for discrete transfer function models, a discrete transform vari-
able, 7., is uscd:
Y(z) c.c G(z) U(z) ( 12.58)
where:
f,'or the case of a single input""single output system, (;(7.) consists of a numerator and de-
nominator polynomial of the form:
.( ) = bnz
lJ
+ bl/_Izl( I ... + h1z + h" ( 12.60)
g Z Ii. II I
anz + ali jZ + .., + alz + a"
292 Linear Systems Summary Chap. 12
The transfer function is normally written in terms of the bachvards shUt operator, ;-1.
Multiplying the transfer function by Z'--II/t---II , we find:
+ hoz- n
(1261 )
+ {loZ-n
The backwards shift operator is defined as;
y(k ~ 1) = z' y(z) ( 12(2)
so y(k ~- 2) := [l.V(Z), etc. The discrete transfer function notation:
__. b ll -t- -I- ... -I- {'IZ.---n+ 1 f /, Z····f{
y(z) 1 . " __ 11 t 1(") ( 12(3)
+ ... + {lIZ'-n j
--f- aoZ
4.
then represents:
(an + {l1l_IZ-1 + ... + (ljZ-n+l + ((OZ'-II) Y(2)
(hI] + b ll _12 j + ..- + btZlll1 + buz I!) u(z) ( 12(4)
y(k -I- 1) -I- {["ly(k) -I- ... -I- a,y(k ~ n -I- 1) -I- {[oy(k ~ 11)
( 12(6)
= "ou(k +1) -I- "o,u(k) -I- ... + ",a(k ~ 11 ~ 1) + "ou(k ~ 11)
Also, for rnost systems there is not an immediate effect of the input on the output, so
h n ;;;;: O.
The most common discretc~til11c model is fin..;t-order:
boz- J
y(z) = 1 ( 126~)
+ lloZ-
Physically realizable systems will always have at least a z -I factor (unit time delay) in the
numerator.
A first-order discrete system with N additional units of lime-delay is written
y(k + 1) -I- I/"y(k) = hol/(k ~ N) ( 12N))
or,
Sec. 12.4 Introduction to Discrete-Time Models 293
( 12.70)
A = 1- 2.404R
0.R3:n
o
- 2.23Rl
1
II 1 7.00001
- 1.11 70
c·~ [0 I[
J) 1~I
For a sample lillle of 0.1 the discrete Slate-space model is (using (12.52)-( 12.54), or the MAT-
LAB c2d function):
O.7R63 0 1
(I) =-0
r0.0661 0.7995
6222
1'- 0. 1
··0.OR49
and the discrete inpul-outpulmodcl is (using (l2.59), or the MATLAB ss2tL function)
- 0.0751 z I I 0.100 I? '
g(z)~ I '
1 - I.oR57z -I 0.62R6z -
which has poles of 0.7995 and O.7g63 (which have a magnitude less than J, sO the system is sta-
ble). The zero of the numerator polyllOll1iai is 1.3339.
The step responses of the continuous and discrete systems arc compared inr'igure 12.3.
For a sample time orO.?5, the discrete Slate-space model is (using (12.52) -(12.54), or the
MAfLAB c2d function):
(I)
10. [647 o ]
OJ 096 n.1 k66
2 43
r 1 . [4J
0.1164
Linear Systems Summary Chap. 12
0.6
05
04 continuous
o de It := 0.1
S 0.3
0.
S
o 0.2
0.1
o
~~~~~~~~L~ _ _
0.1
o 2 3 4
time
FIGURI'; 12.3 Step respOllse of continous and dis<:rete (0.1::::; 0.1) models.
,old thl~ discrete input-output model is (using (12.59), or the MA"llJ\B ~3E;2tt funClion):
whidl has pole; at 0.1866 and 0.1647, indicating stability. The zero of the numerator polynomial
IS 15199.
A comparisoll of the step responses of the continuous and discrete models is ShO\Vll in
Figure 12.4. Notice that the discrete sample time is too large to capture the "inverse respollse"
hehavior of the continuous systelll.
0.6
05
0.4
r-.. continuous
[OdeJt 0.75
:=
0.3
S
0.
S
0 0.2
0.1
-0.1
0 2 3 4
time
FIGURE 12.4 S1l'p response of continolls :md discrete (.::\.1::::; 0.75) models.
Sec, 12,5 Parameter Estimation of Discrete~LinearSystems
Often when discrete linear models arc developed, they afC based on experimental ,-:y.';[CllJ
responses rather than converting a continuous model to a discrete model. The e~;tillla{ioi1
of parameters for discrete dynamic models is no different than the linear regression ,maly
sis presented in Module J. Please review Module 3 to understand the not:ctioll ,mel ideas
hehind linear regression.
The measured inputs and outputs arc the independent variables, and the dependent
variables arc the outputs. For simplicity, consider the folIowing single inpllt~singlc output
model:
where,
. -", I
Y~
<p(k)J
l Y(I).J
,
y(N)
.
ellee
['1'0)1.'] 0
,
<p(N) ,
( 12.74)
_ .. ~ ~ - - ~ . _ ~ - - ~
. ._ ~ ~ ~ - -~ . .
k r(k)
o 0
I 0,1564
2 0.45l2
3 11,5513
4 0.5770
5 0.5830
296 Linear Systems Summary Chap. 12
0.6
o
0.5
o
0.4
'5
J3.
0.3
"0
0.2
0
0.1
o 2 3 4 5
sample time
y
y(2)
J.'(
y(3)
I) I O 15fJ4
0.4522
0.5513
. 1
1'(4)
1'(5) r 0.5770
0.5830
o IJ
y(O) y( ·1) 1/(0)
1/(-1)]- O.15fJ4 o
0.4522 0.1564
0.5513 0.4522
y(4) y(3) u(4) 11(:)
IJ.5770 0.5513
:::,]
hi
[- ~:~~~]~]
0.1564
ho __ 0.2409_
which afC the same parameters that we found for the discrcle transfer function model thal W:lS
converted from the contiullOU\' Illodel with a sample time of 0.75.
References 297
This sirnplc cxample illustrated the step response of a perfectly modeled system (no mea-
surement noise). The approach can also be applied to a systenl with arbitrary inputs and
with noisy measurements. The data was analyzed in a batch fashion, that is, all of the data
were collected before the parameter estimation was performed.
There are other approaches that are useful for estimating model parameters in real
time, often using the model parameters to modify feedback control laws. These ap-
proaches arc beyond the scope of this textbook. The MATLAB System Identification
Toolbox is useful for these types of problems. A good reference is the text hy Ljung.
SUMMARY
There were multiple objectives to this chapter. The first was to introduce analytical solu-
tion techniques for boundary value ordinary differential equations. The second was to
provide a concise review of techniques to solve linear initial value ordinary differential
equations. The final ohjective was to introduce discrete-time modcls and discuss parame-
ter cstimation for these models.
For continuous-time models, the eigenvalues of the state-space model must have
negative real portions for the system to be stable. Equivalently, the poles of the continu~
ous transfer function models must be negative (the eigenvalues of the state-space m(){icl
are equal to the poles of the transfer function model). Analogollsly, the eigcllvalues of the
discrete state-space model mLlst have a magnilUde less than one to be stable. Also, the
poles of a discrete transfer function model must have magnitudes less than one to be
stable.
Continuolls-timc input/olltput (transfer function) models with zeros that arc positive
exhibit inverse response. Similarly, discrete transfer function models with /,cros that have
a magnitudc greater than one (yet have a negative real portion) exhihit inverse response.
REFERENCES
The following text provides methods to solve houndary value ordinary differential equa-
tion models.
Rameriz, W.P. (1989). Computational Methods j(Jr Process SimulatioN. Boston:
Butterworths.
Many process control textbooks provide coverage of linear discrete-time models. Sec, for
example:
Ogunnaike, B.A., & W.H. Ray. (1994). Process Dynamics, Modeling and Control.
New York: Oxford.
System identification (model parameter estimation) is covered in the text by Ljung
Ljuog, L. (1987). System fdent{flcati()Il-,~The()ry for the User. Englewood Cliffs,
NJ: Prentice-Hall.
298 Linear Systems Summary Chap. 12
STUDENT EXERCISES
dx,/dz cc
x2
7
dx,/dz ~ ~
.. =
4 x, 4x 2
We see that x2(;: = 0) must he "guessed," then the two equations can be integrated
(using ode4 ~j) from? :::: 0 to ? :::: I. The value of x I at z ::::: 1 is then checked: if
xIV:::: I) is not equal to J (within an acceptable tolerance) then value,,> ofx2L~ :::;: 0)
arc iteratively guessed until the final value is satisfied. This method is known as the
"shootingmclhod". Usc [zero to solve for the initial condition that satisfies the
end boundary value.
2. Consider the reaction/dispersion equation
ac;\
iJl
CA
let: = dimensionless concentration
C'AO
z
and: y = dimensionless axial distance
I,
D.,/{
define: 'T -::: dimensionless time
I}
p = Peclct Illllnber
" /),,/
k /,'
and: D II
--- Damkohler number
J),l7
ilC ilC
to show that: PI' + (1221
ay
Student Exercises 299
-3.6237
o )
A 0' 1. 0.8333 - 2.9588
5.50511
Ii=
I. -- 1.2660
C . = [0 II
D = 0
1.2 o c.;---
o 0
o
o o o
o 0 0 0 o 0 0
o
0.8
'5
0
-50,6
0
0.4
0
02
0
_._.L _ ------.-1- L
0
0 20 40 60 80 100
sample time
300 Linear Systems Summary Chap. 12
k 0 I 2 3 4 5 6 7 8 9 10 II
Y 0 0.1044 0.3403 0.6105 0.8494 1.0234 1.1244 1.1616 1.1531 1.1184 1.0746 I.OJ3h
k 12 13 14 15 16 17 18 19 20
y 1.0023 0.9828 0.9744 0.9742 0.9790 0.9860 0.9929 0.9985 1.0022
Estimate the parameters for a discrete linear model with the fonn:
-f- boz--- 2
g(z) ~I _ - ({oZ2
SECTION IV
NONLINEAR SYSTEMS ANALYSIS
PHASE-PLANE ANALYSIS
13
'rhe objective of this chapter is to introduce the student to phase-plane analysis, which is
one of the most important techniques for studying the behavior of nonlinear systems.
After studying this chapter, the student should be able to:
Usc eigeIlvalues and eigenvectors of the Jacobian matrix to dUlracterizc the phasc-
plane behavior
Predict the phase-plane behavior close to an equilibrium point, hased on the
linearit.ed model at that equilibrium point
Predict qualitatively the phase-plane behavior of the nonlinear system, when there
arc multiple equilibrium points
(3.1 Background
13.2 Linear System Examples
13.3 Gcncralit,ation of Phase-Plane Behavior
13.4 Nonlinear Systems
303
304 Phase-Plane Analysis Chap. 13
13.1 BACKGROUND
Techniques to find the transient (time domain) behavior of linear state-space models \verc
discussed in Chapter 5, Recall that the response characteristics (relative speed of re-
sponse) for unforced systems were dependent on the initial conditions. Eigellvalue/eigen-
vector analysis allO\vcd us to predict the fast and slow (or stable and unstable) initial COIl-
ditions. If we plotted the transient responses based on a number of initial conditions, there
would soon be an ovcnvhclming Ilumber of curves on the transient response plots. An-
other way of obtaining a fecI for the effect of initial conditions is to usc a pIUlS('~p/(/IiC
plot. A phase-plane plot for a two~slatc variable system consists of curvcs of OIlC-SUltC
variable versus thc state variable (xl(t) versus xi!)), where each curve is hased on a dif~
fercnt initial condition. A phase-space plot can also be made for three-state variahks.
where each curve in 3~spacc is based on a different initial condition.
Phase-plane analysis is one or the most important techniques for studying the be-
havior of nonlinear systems, since there is usually no analytical solution for a nonlinear
systcm. It is obviously important to understand phase-plane analysis for lincar sysll'!1E
before covering nonlinear systems. Section 13.2 discusses the phase-plane behavior of
linear systems and Section 13.3 covers nonlinear systems.
Nonlinear systems often have multiple steady-state solutions (sec Modules X and l) for ex-
amples). Phase-plane analysis or nonlinear systcms provides an understanding oC \vhicll
steady-state solution that a particular set of initial conditions will converge to. The local
behavior (close to one of the steadY-SUite solutions) c,Im be understood from a lincar
phase~plane analysis of the particular steady-state solution (equilihriwIl point).
In this section \\le show tile different types of phase-plane behavior that can be CX~
bibilCcl by linear systems. The phase-plane analysis approach will be shown by \vay (ll' a
number of examples.
( 11.2)
The reader should find lhat the solution [0 (13.1) and ( 13.2) is:
xl(r) = Xl" ('I
(13,4 )
5r.
Sec. 13.2 Linear System Examples 305
where xI" and x 20 arc the initial conditions for xI and x2' We could plot Xl and x 2 as a function of
time for a large Humber of initial conditions (requiring a large number of time domain plots), hut
the same information is contained 011 a pllase-plane plot as shown in Figure 13.1. Each curve
corresponds to a different initial condition. Notice that the solutions converge to (0,0) for all ini-
tial conditions. The point (0,0) is a stahle equilibrium poiot for the system of equations (13.1)
and (13.2)~thc plot shown in Figure 1:1.1 is often called a ,I'table node.
'1
FIGURE 13.1 Phase-plane plot for Example 13.1. The point J:T :;:: (0,0) is a
stable node.
X, (13.5)
-tl = 4 Xl (13.6)
'fhe student should find that the solution to (13.S) and (13.6) is:
l
X1(1) = x lo e (13.7)
xit) x 20 e"l (13.8)
The phase~plane plot is shown in Figure 13.2. If the initial condition for the x2 state variable
was 0, thell it trajectory that reached the origin could be obtained. Notice if the initial condition
x2(1 is just slightly different than zero, then the solution will always leave the origin. The origin is
an unstable equilibrium point, and the trajectories shown in Figure 13.2 represent a saddle point.
306 Phase-Plane Analysis Chap. 13
The x j axis represents a stahle subspace and the Xl axis represents an unstable subspace ["or Ihi\
problcrn. 'l'he term saddle can he understood if you view the x J axis as the line (ridge) hct\\ccn
the "horn" and rear of a saddlc. A baJJ starting at the horn could cOllceptually roll d(l\vn the sdd-
die and remain exactly on the ridge between the horn and the rear of the saddlc. In practice, d
small perturbation from the ridge would calise the ball to begin rolling to olle "stirrup" or [Ill'
other. Similarly, a small perturbation in the initial condition from the Xl axis in l~xal1lpk L\2
would cause the solution to diverge in the unstable direction.
FIGUnE 13.2 Phase-plane plot for Example 11.2. The point xl' ::::: (OJ)) is a
saddle point.
Figures 13.1 and 13.2 clearly show the idea of separaticcs. A separatrix is a line in the
phase-plane that is not crossed by any trajectory. In l-<'igure J 3,1 the sepnF{/liccs are the C\l-
ordinate axes. A trajectory that started in any quadrant stayed in that quadrant. This is he
cause the eigenvectors arc the coordinate axes. Similar behavior is observed in Figure
13,2, except that the xJ coordinate axis is unstablc.
Solving the cquations for Examples 13.1 and 13.2 and the phase-plane lrajccl(ll'il's
were straight-forward and obvious, because the eigenvectors where simply the cnordin,th'
axes. [n general, eigenvalue/eigcnvector analysis must be llsed to determine the stahle dnd
unstable "suhspaccs." The eigenvectors arc the separaticcs in the general case,
Examplc 13.3 shows how eigenvaluc/eigenvector analysis is used to rind the swllie
and unstable subspaccs, ,md to define the separatices,
Sec. 13.2 Linear System Examples 307
Unstable Subspace
Stable Subspace
X(I ~
)
I 0.2703
0.9628
(U~Tl91
0.4896
Ie LS(,I(,t
0
011 00.9907
.
('2.561(;/
5038 - o. 81J72 1 x(O)
0.2782
Recall that the solution 10 (13.[4), if.\'(O) "" ~l,isx(l):::: ~Ie'\ll, so
if x(O) 0.2703
_
I - 0.9628
Ithen ( I
xt)=
0.2703 ]
._
_- 0.9628
e
The phase-plane plot is shown in F'igure 13.4, where the separatrices clearly define the phasc-
plane behavior.
'fhe previous examples were for systems that exhibited stable node or saddle point
behavior. In either case, the eigenvalues and eigenvectors where real. Another type of be-
havior that can occur is a spiral focus (either stable or unstable), which has complex
eigenvalues and eigenvectors. Example 13.4 is an unstable focus.
XI =x l 1 2 x., ( 13.15)
(13.16)
i\~
I I
-- 2
with eigellvalues I ± 2j. This systenl is ullsfablc because the real portion of the complex eigen-
values is positive.
'file phase-plane plot is shown in r:igufc 13.5.
Another type of linear system behavior occurs when the eigenvalues have a zero real portion.
That is, the eigenvalues arc on the real axis. This type of system leads 10 closed Cllnes in
the phase-plane, and is known as ccnter behavior. Example 13.5 illustrates center beha\'ior.
--Xl X( (1117 )
iLUS)
The Jacobian matrix is:
~ I
;1~
I
_ 4
and the eigenvalues arc () ± 1.732 Ij. Since the real part of the eigenvalues is zero. there is a peri
odic solution (sine and cosine), resulting in a phase-plane plot where the equilibriul11 point j" ~\
cenlcr, as shown in Figure 13.6.
FIGURE 13.6 Example 13.5, eigenvalues with l,cro real portion arc centers.
Sec. 13.3 Generalization of Phase~Plane Behavior 311
Examples 13.1 to 13.5 we have provided an introduction to linear system phase-plane be-
havior. We noted the important role of eigenvectors and eigenvalues, and how these relate
to the concept of a separatrix. Section 13.3 provides a generalization of these examples.
We wish now to generalize our results for second-order linear systems of the form:
(13.19)
{[II
A= ( 13.20)
Ian
Recall that the eigenvalues arc found by solving det(A./- A) = 0:
del(A! - A) = (A - ",,)(A - aD) - {/" a 2l CC
() ( 13.21)
We can then usc Figure 13.7 to find the phase-plane behavior for second-order linear or-
dinary differential equations as a function of the trace and detenninanl of A. In Figure
312 Phase-Plane Analysis Chap. 13
de1(A)
Center
node node
sink source
saddle
13.7, the x-axis is the trace orA and the .v-axis is the determinant of A. For example, COlJ-
sider Example 13.1, where
- I
A
1 () °1
-4
tr(A) -'i
dct(A) c= 4
'fhe point (-5,4) lies in the second quadrant in the node sink sector, as expected. since the
two real eigellvalues arc negative (indicting stable node behavior).
Sec. 13.3 Generalization of Phase-Plane Behavior 313
l<jgurc 13.8 shows the phasc~planc behavior as a function of the eigenvalue loca-
tions in the complex plane. For example, two negative eigenvalues lead to stable node be-
havior.
1m
""i.. . ~ 3table node
iRe
1m
~
x i .... 3table fOCIJ3
~e
f~ ~ unstab1JJ tocos
~e
~
Jm
saddle
He
~e
r m
_
"
( /3.24)
X2 = all x I + an x 2 ( 13.25)
We call divide (13.25) by (/3.24) to find how x 2 changes with fCS]lcotto x,:
dX 2 a 21 Xl -I-
(/326)
dx] al1xj+1l12X2
±LA
Sec. 13.3 Generalization of Phase~Plane Behavior 315
and we can plot "slope marks" for val lies of xl and x2 to determine an idea of how the
phase plane wil! look. Let us revisit Example 13.3. The slope marks can be calculated
from (13.27):
dX 2 2x,
( 13.27)
dXj 2 Xl + x 2
Figure J 3.9 shows the slope marks for Example 13.3. These arc generated by forming a
grid of points in the plane, and finding the slope associated with each point; short line seg~
mcnls with the slope calculated arc then plotted for each point. Notice that one can lise the
slope marks to help sketch state variable trajectories, as shown 111 Figure 13.10. Saddle
point behavior found in Example 13.3 is clearly shown in l<'igurc 13.10.
Phase-plane analysis can be used to analyze autonomous systcms with two statc variablcs.
Notice that state variable trajectories cannot "cross" in the plane, as illustrated by the fol-
lowing reasoning. Think of any point of a trajectory as being an initial condition. The
model, when integrated from that initial condition, must have a single tn~jectory. If two
tn~jcctories crossed, that would he the equivalent of saying that a single initial condition
could have two different tnyectories. If a system was nOlH1utonomous (for examplc, if
there was a forcing function that was a function of time) then state variable trajectories
could cross, because a model with the same initial conditions but a different forcing func-
tion would have different tn~jectories.
An autonomous (unforced) system with n stale variahles cannot have tn~jectories
that cross in n-space, hut may have trajectories that cross in less than n-space. For exam-
FIGURE 13.9 Slope marks for the vector field of Example 13.3.
316 Phase-Plane Analysis Chap. 13
pic, a third-order autonomous system cannot have trajectories that cross in 3-spacc, but
the trajectories Illay cross when placed in a two-dimensional plane.
In the previous sections we discovered the types of phase-plane behavior that could be ob-
served in linear systems. In this chapter we will find that nonlinear systems v,'ill orten
have the same general phase-plane behavior as the rnodellincarizcd about the equilibrium
(steady-state) point, when the system is close to that particular equilibrium point.
In this section we study two examples. Example 13.6 is based on a simple bilinear
model, while Example 13.7 is a classical bioreactor model.
z,(z, + I) ( 13.28)
rtf
dZ 2
(13.29)
tit
Sec. 13.4 Nonlinear Systems 317
F'rJllilihrillm I: trivial 1. 2s 0
Equilibrium 2: nontrivial
Linearizing (13.28) and (13.29), we find the following Jacobian matrix:
A Zl'~ + ]j
<-'1.1' .
Equilibrium 1 (Trivial)
0.5j
The stable eigenvector is:
I.0.866 _
The unstable eigenvector is: ~, 0.5 I
I0.866
The phase-plane or the JincarJ/cd model around eqnilibriulll point one is a saddle, as shown in
I"igurc D.l I. The linearized model is
x 0 11 x
1 3 0
where x = z - z,
Equilibrium 2 (Nontrivial)
-3
'rhe Jacobian matrix is: ;1
0 011
the eigenvalues arc: AI ·3 A2
So, we know from linear system analysis that equilibrium point [\\10 is a stable /lode, since both
eigenvalues arc stable.
The phase-plane of the linearized model around cquilhrium point two is a stable node, as shown
in Figure 13.12.
The phase--plane diagram of the nonlinear model is shown in r;'igllrc /3.13. Notice h()\\,
the linearized models capture the behavior of the nonlinear model \Vhell close to one of the equi-
Ibrium points. Notice, however, that initial conditions inside the "right" saddle "blow up," while
initial condititllls inside the left saddle are attracted to the stable point. Slope-field marks are
shown in F'igurc 13.14.
Sec. 13.4 Nonlinear Systems 319
,~~
FIGURE 13.14 Slope-field marks and some trajectories for Example 13.6.
320 Phase-Plane Analysis Chap. 13
... _---~---~-
dx(
tit
D) x, 03.3(1)
/-lX 1
(.'i - x,) IJ (13.31 )
Y
JJ-m;nXI
(13 ..J2)
km + ~y!
where:
/-tIll:)X == 0.53 k", == 0.12
y ~ 11.4 4.11
Xj is the biomass concentration and x2 is the substrate concentration. There arc (wo steady-state
(equilibrium) solutions for this set of pararneters.
/-L,\
where we have defined I-l'
X:!.\( kIll ·f x1.J
E()uilihrium t (Trivial)
0.3714]
Sl
The unstahle eigenvector is:
I. - 0.9285
The stable eigenvector is:
I~I
This steady-state is known as the "wash-out" steady-state, because no hiomass is produced and
the suhstrate concentralion in the reactor is equal to the feed suhstrate concentratioll.
Sec. 13.4 Nonlinear Systems 321
Equilibrium 2 (Nontrivial)
0.99241
The "slow" stable eigenvector is ~, ~ 1
- 0.11234
[.°.0.9285
3714
The "fast" stable eigenvector is 1
The phasr>plunc plot of Figure 13.15 sbows that the trajectories leave unstable point I (0,4) and
go to stable point 2 (1.4523,0.3692). More detal! of the phase-plane around the unstable point is
sho\Vn in Figure 13. J 6, while Figure 13.17 shows more detail around the stable point.
4.0
3.0
2.0
1.0
2.0
x
1.0
ESCOLA Dc ENCEi'JHARIA
BIB L 10 'I L '"" 1\
322 Phase-Plane Analysis Chap. 13
0.0 - - - - - - - - - - - - - - - - - - - 0.05
FIGUIU~ 13.16 Phase~planc behavior ncar the unstable point (0,4) (L:quiJi-
britlln 1).
0.4
0.3
1.4 - - - - - - - - - - 1.5
FIGURE 13.17 Phase-plane behavior ncar the stable point (1.4523, 0.36(2)
(Equilibrium 2).
Sec. 13.4 Nonlinear Systems 323
0.5
x, 0
-0.5
·1
··1.5
··1 0
FIGURE 13.18 Example of center
X2 behavior.
In the previous examples the system trajectories "left" an unstable point and were "at~
tracted" to a stable point. Another type of behavior that call occur is limit cycle or peri-
odic behavior. This is illustrated in the following section.
In Section 13.2 we noticed that linear systems that had eigenvalues with zero real portion
formed centers in the phase plane. The plwsc-planc trajectories of the systems with cell-
tel's depended on the initial condition values. An example is shown in Figure 13.18. A
somewhat related behavior that can occur in nonlinear sYStCll1S is known as limit cycle be-
havior, as shown in Figure J3.19.
The major difference in center (Figure 13.1 R) and limit cycle (Figure 13.1 <)) hehav-
ior is that limit cycles are isolated closed orbits. By isolated, wc mcan that all inital pcr~
1.5 r-~------~--,
0.5
x,
o
0.5
-1
1.5 L- --'
1 0
FIGlJRE 13.19 Example of limit
x, cycle behavior.
324 Phase~Plane Analysis Chap. 13
wrbatiol1 from the closed cycle eventually returns to the closed cycle. Contrast that ,",vith
center behavior, where a perturbation leads to a different closed cycle.
Limit cycle behavior will he discussed in more detail in Chapter 16.
SUMMARY
As j10tcd earlier, phasc~plane analysis is a useful tool for observing the behavior or llOll~
linear systems. We have spent. time analyzing autonomous linear systems, because the
nonlinear systems will behave like a linear system, in the vicinity or
the equilibriulll point
(where the linear approxiIl1ation is most valid). A qualitative feci for phasc~planc bdl<lv-
ior can be ohtained by plotting slope marks.
Notice that: we have shown examples of nonlinear systems that have multiple equi-
librium points (steady~state solutions). Phase-plane analysis can be used to determine re-
gions of initial conditions where a system Illay converge to one (stable) equilbrium point
and regions where the initial conditions Inay converge to another (stable) equilibriulll
point
By sketching the linear behavior around a particular equilibrium point and by using
slope marks, we can qualitatively sketch the phase-plane behavior of a given nonlinear
system,
Clearly the phase~planc approach is limited to systems with two state variables.
Analogous procedures can be used to develop phase-space plots in three dimensions for
threc~state systcllls.Linearization and analysis of the locally linear behavior in terms of
eigcnvalues and eigenvectors can still be used for higher~order systems, but the phase be-
havior cannot be viewed for these higher-order systems.
FURTHER READING
Strogatz, S.ll. (1994). Nonlinear Dynmnics and Chaos. Reading, MA: Addisoll
Wesley.
STUDENT EXERCISES
linear Problems
r~<or the following linear systems, usc l'igurc 13.7 to determine the phasc~planc bchaviOl
Also, calculate the eigenvalues and lise Figure 13.8 to verify your results. Develop your
own phase-plane diagrams for any situations not covered in Figures 13.7 and 13.8.
~I
1. x
l °1
_2 x
Student Exercises 325
2. x I·· ~ -2
31 x
3. x
I~ ~IX
4. x
I: ~] x
5. x=
1: ~IX
-I
6. x ,::.~. -2J
1 -2 x
I~ -0. 25 1
-.0.251 x with x. ,,--
7. Compare x··· [-: -2 2 x
8. x
-I -OSI x
1 2 1
~I _~] x
-I
9. x
2
0
10. x
r; -3":
0
2
0
o x
r: ]
0 0
It. x
_~
=:- 2
x
0 0
12. A process engineer has linearizcd a nonlinear process model to obtain the following
state-spacc model and given it to your boss. Your boss has forgotten everything he
learned on dynarnic systcms and has asked you to study this modcl using linear
systcm analysis techniques.
x Ax
where:
A 10 - 1.0 1
1.0 0.0 .
326 Phase-Plane Analysis Chap. 13
'itl
cit = axz
dx
_____ f. = ~ bx
dt '
where a and b arc positive parameters. Show that this model has center behavior
and discuss the meaning from a romance perspective.
15. Consider a more general formulation of the RomcolJuliel problem in 14 above. In
this case, let:
dX J
dt
Hf
Student Exercises 327
wherc the paramcters lljj can bc either positive or negative. The choice of signs
specifics the romantic "styles." For each of the following cases (parameters a and b
arc positive), determine the phase-plane behavior. Interpret the meaning of the re-
sults in terms of romantic behavior.
(i~L
a. ::0; a x] + b x2
ill
dx, ~ b x
dl t
dx]
b. ::o;~ax]+hx2
ill
dx')
4::o;bx-ax
dt 1 2
dx]
e.
ilt
(L'lz
rll
Nonlinear Problems
1(). As a chemical engineer in the pharmaceutical industry you are responsible for Ii
process that uses a bactcria to produce an antihiotic. The reactor has been contami-
nated with a protozoan that consumes the bacteria. Assume that predator-prey equa-
tions are used to model the system (x1 ~ bacteria (prey), x2 ~ protozoa (predator)).
The time unit is days.
=axI-'YxIXZ
Yt = -~ Y2 ~
X
Z,
dYI
,,(I~y,)y,
"I
dh
,11= ~13(I-y,)y?
c. l·'ind the eigenvalues of the Jacobian matrix for scale equations, evaluated at YJs
and Yzs. Rcali:r,c that Yt.v and Y2s arc 1.0 by definition. [,'inc! the eigenvalues in
teflllS of (X and ~3.
d. The parameters are (X :;::: ~1 ::::: 1.0 and the initial conditions arc )'1 (0) : : : ; 1.5 and
Y2(0) = 0.75.
i. Plot the transient response of)'J and )'2 as a function of time (plot these
curves on the same graph using MA'l'LAB). Using your choice of integra-
tion methods, simulate to at least ( ::::: 20.
ii. Show a phase-plane plol, placing)'1 on the x-axis and)'2 011 the y-axis.
iii. \Vhal is the "peak-tn-peak" lime for the bacteria? By how much time docs
the protozoa "lag" the bacteria?
c. Now consider the trivial sleady-state (xis::: -r2.1':;:::: 0). Is it stable? Pcrfonn simula-
*
tions when xj(O) 0 and x2CO)"* 0, What do yOll find?
f. What if" (0) " 0 and x2(O) = 0'1
g. What if,,(O) = 0 and '2(0)" 0'1
17. Consider the bioreactor Illodelused in Example 13.7 with substrate inhihition rather
than MOllod kinetics (sec Module 8 I'or more detail)
"X.'• (iL~ I ) )
"I = X
'
where:
J-Lma\:
'-'- 0.53 km 0.12
y 0.4 Sf 4.0
k, 0.4545
c. Construct a phase plane plot. What do you observe about the unstable steady-
stale?
d. What would you do if it was desirable to operate the reactor at an unstable
steady-state?
18. Perform some time domain plots related to the phase-plane plots for Example 13.7.
Discuss how these plots relate to the phase-plane results.
19. A chemical reactor that bas a single second-order reaction and has an outlet
f10wrate that is a linear function of height has the following model where the outlet
f10wrate is linearly related to the volume of liquid in the reactor (F:;:; f3 \I).
dC F
~'(Ci" ~ C) ~ kC'
dl
dV
= F ~ '"V
Lit 1/1 t-'
The parameters, variables and their steady-state values arc shown below:
Fill :;;:inlet flowrate (I liter/min)
('ill = inlet concentration (I gmollliter)
C::::: reactor concentration (O.S gllloi/liter)
V = reacto volume (I liter)
k = reaction rate constant (2 Iiter/(gmol min))
f3:;:: I min-]
Perform a phase-plane analysis and discuss your results.
20. Consider two interacting tanks in series, with outlet flowrates that arc a fUllction of
the square root of tank height. The flow from tank I is a function of \/h l -ill' while
the tlowrate out of tank 2 is a function of \Ih}
dh'
dl . f,(h"h,,!'}
dh, = IMh' ,h,,Ii) I
I dl
330 Phase-Plane Analysis Chap_ 13
[('
and the input F -~~ 5
111m
The steady-slale height values arc
hJs 10
''['his chapter provides an introduction to bifurcation theory and chaos. After studying this
chapter, the reader should be able to:
Sec the similarity between discrete time dynamic models and lluillcric;:1! methods
Dctcnninc the asymptotic stability of a solution to the quadratic map
Unclcrstand the concept of a hi fllrcation
Understand how to find pcriod-2, pcriodA, .. _, period-a solutions
• Understand the significance or the universal number 4.6691 96223
When a parameter of a discrclc~timc model is varied, the llUlnbcr and character of solu~
lions may changc---lhc parameter that is varied is known as a bU;tfcutiol1 parameter. For
some values of the bifurcation parameter, the dynamic model may convcrgc to a singlc
valuc aftcr a long valuc of timc, while a slnall change in the bifurcation parameter may
yield periodic (continuous oscillations) solutions. For some discrete equations, valucs of
the parameter may yield solutions that appear random --these are typically "chaotic" solu-
tions. Chaos can occur in a single nonlincar discrete equation, whilc threc autonomous
(no explicit depcndencc Oil time) ODEs arc required for chaos in continuous models.
The major sections in this chapter arc:
14.1 Background
14.2 A Simple Population Growth Modcl
14.3 A More Rcalistie Population Model
14.4 Cobweb Diagrams
331
332 Introduction to Nonlinear Dynamics: A Case Study Chap. 14
14.1 BACKGROUND
Many engineers and scientists have assumed (at least. until roughly twenty years ago) [hill
simple models have simple solutions and simple behavior, and lhat Ihis behavior is pre-
dictable.lndeed, the main objective for developing a rnodel is Llsually to be able to predict
behavior or to match observed behavior (measured data). During the past thirty years, a
nurnhcr of scientists and engineers have discovered simple 11lOLlcis \v!lerc the short-term
behavior is predictable, hut sensitivity to initial conditions make the long~tertlJ predictillil
impossible. By initial conditions. \\,ie mean the value of the variables at the beginnillg of
the integration in time. All example is the simple weather prediction model of Loren/.
(1963). which is a system of three nonlinear ordinary differential equations; the Lorell/.
1l1Odcl is covered in more detail in ChaptGr 17. Another example is the population grO\vth
model used by May (1976), which is a single nonlinear discrete time equation. ·fhis popu-
lation lllodel is the topic of this chapter.
The cOllllllonly accepted term for the dynamic hehavior or
a system that exhibits
sensitivity to initial conditions is clwos.Tcrms for the branch of mathematics related to
chaos include nonlinear dynamics, dynamical systems theory. or nonlinear science. \in\'
chaos books, written for a general audience, appear frequently: some of the more interest-
ing olles arc referenced at the end of this chapter.
This chapter will not make you an expert on nonlinc.'lr dyn<1111ics, but it will help
you understand what is meant by sCl1sitil'itr to initiol ("ollditiollS and practical limits to
long-term [Jredictability.
Assume that the population of a species during one time period is a functioll of the prcvi~
nus time period. Perhaps we are interested ill the number of bacteria cells that arc gnnving
in a petri dish. or mayhe we arc concerned ahout the population of the United States. In
either case. the Inathematical model is:
(14.1 )
Now assume that the number of births and deaths during tillle period k is proportional to
the population at the beginning of time period k.
Sec. 14.2 A Simple Population Growth Model 333
( 14.2)
(14.3)
where (Xli and (Xd arc birth and death constants. Then:
llk+1 (14.4)
where r;::: (Yb ~ eXd' Eqn. (14.6) call be simply written as:
where ex ::::; I + r;::: I + ex/} - c"-r/ (obviously, 0' > 0 for a physical system)
The analytical solution to (14.7) is:
( 148)
if (X < 1 The population decreases during each lime period (converging to 0).
if (X > I The population increases during each time period (-----+ 00).
if ex;::: I The population remains constant during each time period.
2.5
+
D alpha 1.1 +
<D 2
<ii +
0
~
+
+
c 1.5 +
0
+
~ + alpha 10
"3 +
0-
0
0-
0.5
alpha
0
0 2 4 6 8 10
time step
These results arc easily rationalized, since births<dcaths, births>dcalhs, and births ==
deaths for the three cases. The result for 0: > I is consistent with Malthus. who in the nine-
teenth century predicted an exponential population growth.
The result that the population increases to ex) for (X > J is a bit unrealistic. In prac-
tice, the amount of natural resources available will limit the total population (for the bac-
teria case, the mnounl of nutrients or the size of the Petri dish will limit the maximum
number of bacteria that can be grown). In the next example, we show a simple model that
"constrains" the maximum population.
A common model that has been used to predict population growth is known as the logistic
equation or the quadratic map (May, 1976).
( 14.9)
Here, .r" represcnts a scaled population variablc (sec student excrcise 3).
Note the similarity of (14.9) with the numerical methods presented in Chapter 3:
Xk , I ~ g(x k ) ( 14.10)
Recall that direct substitution is sometimes used to solve a nonlinear algebraic equation.
The next guess (iteration k+ 1) for the variable that is being solved for (x) is a funetioll of
the current guess (iteration k). Equation (14.9) shows how the population changes from
time period to time period--·--that is, it is a discrete dynamic equation. Since (J4.9) is the
same f011n as (14.10), we will learn a lot about the quadratic map frOTH analysis of the di-
rect substitution technique and vice versa. You will also note that many numerical inte-
gration techniques (Euler, Rungc-Kutla) have the fOHn of (14. [0).
Since (14.9) is a discrete dynamic equation, we can determine the steady-state be-
havior by finding the solution as k ------;. 00. Writing (14.9) ill a more explicit form,
(X xlc. (14.11 )
We can use the quadratic formula to find the steady-state (fixed-point) solutions:
u 1
x, ~ 0 and (14.14)
(y
It is easy to see from (14.9) that if the initial population is zero, it will renwin at zero. For
a n0I1-2erO initial condition, one would expect convergence (steady-state) of the popula-
tion to (0.' - l)/cl'_. We will use a case study approach to show that the actual long-term
Sec. 14.3 A More Realistic Population Model 335
Case X ,-
" I
I 2.95 0.6610
2 3.20 0.6875
3 3.50 0.7143
4 3.75 O.n33
(stcady~statc) behavior can be quite complex. Table 14.1 shows the (X parameter and the
non-zero stcady~stalc that
is expected from (14.14).
Each case presented in Table 14.1 has distinctly different dynamic behavior. As shown in
the following sections, case 1 illustrates asymptotically stable hehavior, cases 2 and 3 il-
lustrate periodic behavior, and case 4 illustrates chaotic behavior.
Stepk xk Xk+!
0 0.1 0.2655
1 0.2655 0.5753
2 0.5753 0.7208
3 0.7208 0.5937
4 0.5937 0.7116
5 0.7116 0.6054
w 0.6610 0.6610
The transient response for case 1 is plotted in Figure 14.2 for an initial condition of 0.1.
Notice that the responsc converges to the predicted steady-state of 0.6610. This type of rc-
sponse for continuous models is usually called asymptotically stable hehavior since the
output converges to the steady-state (fixed-point) solution.
PERIODIC BEHAVIOR
The transient response curve forcase 2 is shown in Figure 14.3. The curve oscillates be-
tween 0.513 and 0,800, while the predicted resull (equation 14.14 and Table 14.1) is
336 Introduction to Nonlinear Dynamics: A Case Study Chap. 14
0.7
c
0
.~ 0.6
-S
0-
0 0.5
0-
m
m
"
C
0
0.4
.~
c
"E
'5
0.3
0.2
01
0 10 20 30 40 50
time step
0.7
c
0 0.6
~
-S
0-
0 0.5
0-
m
m
"
C
0
0.4
.~
c
0.3
"E
'5
0.2
0.1
0 10 20 30 40 50
time step
0.6875. 'This type of response is known as pcriod-2 behavioL In case 3 the transient re-
sponse oscillates between 0.383, 0.827, 0.501, and runs as shown in r'igurc 14.4. This is
known as pcriod-4 behavior, since the system returns to the same slale value every fourth
time step.
CHAOTIC BEHAVIOR
For Case 4, the transient response never settles to a consistent set of values, as shown in
Figure 14.5; rather the values appear to be somewhat "random" although a dctcnninislic
equation has been used to solve the problem. Figure 14.6 shows that a slight change in
initial condition from 0.100 to O. J 0 J leads to a significantly different poinHo-poinl rc-
sponsc--this is known as sensitivity to initial conditions and is characteristic of chaotic
systems.
0.8
co 0.7
0.
.~
"5
0. 0.6
0.
0.
w 0.5
w
'"0.
C
0.4
.~
co
'"
E
'6
0.3
0.2
0.1
0 10 20 30 40 50
time step
0.8
c
0
~
"3
0.
0
0. 0.6
"'"'
ill
C
0
iii
c 0.4
ill
E
'5
0.2
o
o 20 40 60 80 100
time step
1\
c 0.8
0
:g
"3 \ ! I
I I
0.
0 0.6 I
I
0. ! I
I
!
\1 \
"'"'ill I \ I
\
I
C 0.4
I \ I !
0
iii
c
, I
1/
\ I
" "
ill \i \'
E
'5 0.2
0
75 80 85 90 95 100
time step
Xn + 1
1
0,75
°5
0,25
Xn +l
1
0,75
0,5
0,25
FIGlIlU: 14.8 C"se I (n ~ 2,95)
rnap, convergence to a single solution
o i<:: --'- -' "- --l x (x = 0.6(1); corresponds to the transient
n
o 0.25 0.5 0.75 1 response in Figure 14.2.
340 Introduction to Nonlinear Dynamics: A Case Study Chap. 14
Xn +l
I
0.75
0.5
Xn +l
1
0.75
0.5
0.25
FIGlJRE 14.10 Case 2 (0 ~ 3.201
map, oscillates het\Vccll x = 0..') l_lO and
o "-----'-----'-----"'-----' xn 0.7995; initial condition or Xo = n.5130
o 0.25 0.5 0.75 1 (period-2 behavior).
Xn+l
I
0.75
0.5
Xn +l
I
0.75
05
0.75
0.5
0.25
341
ESCOLA D2 tNGENHARIA
IJIt3L10Tt:CA
342 Introduction to Nonlinear Dynamics: A Case Study Chap. 14
vYhcn a parameter of a discrete-time model is varied, the number <ind character of solu-
tions may change; the parameter that is varied is known as a bUilrcatioll parameter-For
the quadratic map, ex is a bifurcation parameter. We have seen that somewhere bet ween
CI' = 2.95 and 3.2, the behavior of the quadratic map changes from asymptotically stable to
period-2 behavior.
A single diagram can be developed that represents the solutions for a large range of
0: values, We arc most interested in the long-IeI'm behavior a system, so for a single (Y or
value, we call run a simulation and throw out the initial transient data points (say, the first
250 points). '['he next points (say, the next 250) should then adequately represent the long-
term behavior of the system. We can then move on to another value of (Y and do the same.
This is exactly the technique used to generate Figure 14.14, which is an orbit diagram for
the quadratic map (sec student exercise 7).
There is a single steady-state solution untillY::;:: 3, where a bifurcation to two solutions oc-
curs. 'fhe next bifurcation point is {Y ;:: 3.44949, where four solutions emerge. A period~X
bifurcation occurs at 0' ::: 3.544090, period-J6 at (X ::: 3.564407, j"Jeriod-32 (:It Ct :::
3.568759, and period-64 at (X ;:: 3.569692. Chaos occurs at 0'. :::;; 3.56995. Notice that there
are some interesting "windows" of periodic behavior, after the onset of chaos. For exam-
ple, at (X ;:: 3.83 we find a window of period-3 behavior. The period-3 behavior occurs
after approximately 60 time steps, with an initial condition of 0.1, as shown in Figure
14.15. This behavior is shown more clearly in Figure 14.16 which is simply the data from
0 9
o. 8
0 .7
/-~/'---~~
1----.
o. 6 ' .....--.......--.......
x 0 .5 ~---------./-----~
0 .4 '~-
o. 3
0.2
o.
0
2 9 3 3.2 3 4 3.6 3.8 4
U.
FIGURE 14.14 Orbit diagram for the quadratic map. 0' is the bifurcation parametcl".
Sec. 14.5 Bifurca tion and Orbit Diagram s 343
C
0.
'fg
S
0.
0.
0.
if>
if>
ill
C
g
if>
C
ill
E
i3
0.1
o 20 40 60 80 100
time step
3.83, initial
FIGUR E 14.15 Period-3 behavior (after inllial transient) for Ci. =0
;;:;; 0.1. Periodic values are x;:;;: 0.15615 ,0.50466 , and 0.95741 7.
condition
+ i' t t tI +
!I \'
I 1\ 'I /
I, ," Ii
c I I I' '\
0.8 I \ I I
I I
0.
I
~ I \ I /
I
S I I I
0. f I
0. I I / \
0.
if>
0.6
I \ I I , , I I
if>
ill
C
0.
+
I
i
/
I
I
+
/
'"
/ \
I
+
/ \ + \
\ /
I
+
/
ijj 0.4 I I
I I I \ I
I
C I \ I \ I
ill / I I I I
I I I I
I I \
E
i3
/ \
/
/
\f \/
"
" I
"/
/
I'
\ /
0.2 'I I
+ Y "
+ + ~ + 4- t
0
75 80 85 90 95 100
time step
FIGlJR E 14.Hj Pcriod-3 behavior for (~ ::;: 3.lB. Values arc x ;:;: 0.15615,
0.50466, and 0.957417 .
344 Introduction to Nonlinear Dynamics: A Case Study Chap. 14
Xn +l
1
0.75
05
0.25
Figure 14.15 plotted between 75 and 100 time ;.;tcps. The cobweb diagranl of Figure 14.17
also shows the pcriod-3 behavior. Research has shown that pcriod-:, behavior implies
chaotic hehavior.
When we performed our case study, we found that case I converged to the predicted fixed
point, while the other cases had periodic (or chaotic) solutions that were not attracted to
the fixed points. We wish now to usc an analytical method to determine when the solu-
tions will converge to the fixed-point solution ~ -that is, when is a fixed-point stable? The
follo\ving stability theorem is identical to the stability theorem used for the numerical
analysis in Chapter 3.
'~~"'-'--"
Definition Let x'~ represent theJixed-fJoillf solution of x'o: :;::: g(x*'), or g(x''') -- x~':;::: O.
Here we will make lISe of this theorem to determine the stability or a solution to the qua-
dratic map:
g(x) ~ (XX( I - x) = (l'X - (U' (14.15)
Sec. 14.6 Stability of Fixed,Point Solutions 345
So,
iJg
.=<¥-2,xx=<¥(1 2x)
dx
For simplicity in notation, we will usc g' to represent i)g/(Jx. r~valLJatcd at x*, we have:
Therefore, from (14.16) and the stability theorem, if the following condition is satisfied:
x* c. 0 or x* =
<¥
Momentarily we will generalize the stability results !()r any value of cc First, we will
study the four specific cases.
CASE 1 (Y = 2.95
At one fixed point solution, x* := 0, we find:
At the other fixed point solution, x*:::: 0' - I/O':::: 2.95 - 112.95 = 0.6610, we find:
Notice thai we have been quite limited in our study, since we have only considered four
ca~:;cs
with 2.95 S ex :S. 3.75. Now we will consider the general results for any ('( > O.
Again, recall that there arc two fixed-point solutions for a given value of (X
x* ~ () or x*
(X-
and xI = lX
Our goal is to determine how the stability of x{~ 01 .'.:;" changes as a function of 0',
STABILITY OF x~ AS A FUNCTION OF lX
SincexT~(lX-I)/lxandg'(xT~lX-ZlY(lX-I)lcx~lY-Z(lY-I)~-lX+Z
The theorem states that if lag/ax I at the fixed point, the fixed point is stahle. Further, if
ag/ox is negative, then the fixed point solution is oscillatory. If dg/ax is positive, the be~
Sec. 14.6 Stability of Fixed-Point Solutions 347
bifurcation diagram
lr---r---,----r---.-----,----.---~-...._,
0.5 "I
.. ...------- --- UIlBtable
stable
..
Xo
..
X
o
x 0
stable 1
1---------------------------------
UIlBtable
I
f
I
I
-0.5 I
I UIlBtable
I ..
IXI
I
I
-11..---'---~--~-~~-~--~--~---'
o 0.5 1 1.5 2 2.5 3 3.5 4
FIGlJRE 14.18 Bifurcation diagram based on linear stability analysis.
havior is monotonic. We can then develop the fo]Jowing table of results from the stability
theorem
i)g
itr stability response
Although the linear stahility analysis is useful for determining if a fixed-point is stable, it
cannot he used directly to understand possible periodic behavior. This is the topic of the
next section.
348 Introduction to Nonlinear Dynamics: A Case Study Chap. 14
We have noted that there appears to be a series of period doublings in route to chaos. The
limitation to the method presented in Section 14.6 showed that it could predict that a par-
ticular fixed point was unstable, but could not identify the type of periodic behavior that
might occur. In this section we will show how to find these period-doubling bifurcation
points and the respective branches shown in Figure 14.13.
14.7.1 Period-2
When period doubling occurs, the [lopulation value at time step k is equal to the value at
time step k -- 2. This can be represented by
(141 X)
or
then
(14.20)
(14.2 I)
(14.22)
Warning: Do not confuse the g2(rk ) notation with that or the square of the operator Ig(xk ) ]2.
r:or the quadratic map, we call develop the relationship shown in (14.22):
Expanding (14.25),
( 14.26)
or
g'(x,) ~ a' [---a x/ + 2ux", - (1 + u)x,' + x,l (1427)
Notice that there arc four solutions to the fourth-order polynomial. We can find the solu-
tions graphically by plotting g2(x) versus x, as shown in Figure 14.19 (for (X 3.2). ;:0;;
If you closely observe the plot, you will find the following four solutions for pcriod-
2 behavior:
x" ~ 0,0.5130,0.6875, and 0.7995
We can sec graphically that the solutions x* ::::: 0 and 0.6875 arc unstable, since the slope
of g2(x*) is greater than L (A period-2 solution is stable if 1()(;;2(x»/d.\:1 < 1.) Also, notice
that the solution for x ::::: g(x) will always appear as one of the solutions for x ::: g2(x). If a
solution for x ::::: g(x) is unstable, it will also be unstable for g2(x). We can sec that
x ;::; 0.6875 is the solution for both .Y ::::;; g(x) and x : : ; g2(x), by observing [!igure 14.20.
At this point it is worth showing the results of x versus g(g(.:r) for case I, which we
know has a single, asymptotically stable solution. Figure 14.21 shows that there is a sin~
gle stable solution of X ::::;; 0.6610. This makes sense, because as k -) we know that00,
1, /.
/f\
,""
~
08!
0.4' I
('
I ~ j1".
/ /Vi
. ," \ A
unstable \
.I I //~
./ stable \
I I
!
0.2;J
X /
/
i'
il
Ii
0,8
0,6
"'"
CT
""
0;
>{
0.4
02
0,8
0,6
"'"
CT
""
0;
>{
0.4
02
x pcriod-2 behavIor.
Sec. 14.7 Cascade of Period-Doublings 351
0.8
s: 0.6
'&
0
"
0; 0.4
"
0.2
0
0 0.2 0.4 0.6 0.8
FIGURE 14.22 Plot of g(x) aod g'(x)
x ven,lIs x for n "'" 3.0.
14.7.2 Period-4
When pcriodA behavior occurs, the population value at time step k is equal to the value at
lime step k - 4. This can be represented by:
X k +4 = xk (14.28)
Using the same arguments that we used for pcriod-2 behavior, we can find that since
xk+ I :;;;; g(..r k),
(14.29)
~ g(g(x kU »
~ g(g(g(xk+'»)
= g(g(g(g(x k))))
. _g'(x )
Xk-I-4 -- k ( 14.30)
We can obtain the solutions to (14.30) by plotting g4(x) verSllS x as shown in Figure 14.23
for C/. = 3.5. Again, do not confuse g4(x) with Ig(x)]4 g4(x) is an eighth-order polynomial
with eight solutions as shown in Figure 14.23.
Figure 14.24 shows that the solutions for x:::: g(x) and x :::;: g2(x) arc also solutions
(although unstable) for x = g4(x).
352 Introduction to Nonlinear Dynamics: A Case Study Chap. 14
alpha:= 3.5
u
s
0.8 s
u
0.6
-;;-
;,-
'"~ 0,4 u
s
0.2
u
0
0 0.2 0.4 0.6 0.8
x
FIGURE 14.23 Plots of g4(x) versus x to find the pcriod-4 values for Ci "" 3.5.
alpha = 3.5
,
"
-;;-
0.8
'\ ..,, ::
t; \ .,, ,
C5 0.6 '~;\ ::'I
:s
'0, ...."
\.
;,
,
\
\
~OA
•
'" 0.2
~-x
-g(x)
V\
·••••..·9'(x)
._-- 9"(x)
______ ___ L._
FIGURE 14.24 Plot.s of R(X), !,:lex) and ,t,JA-(x) versus x for (.~ 0::: 3.5.
Sec. 14.7 Cascade of Period-Doublings 353
14.7.3 Period-n
By analogy to tnc pcriod-2 and pcriod-4 hehavior, we call sec that for any period 1/, we
have the following relationship
(14.31 )
v
Ak -lll .~ ""(.",.)
() ./i ( 14.32)
Note that gll(Xk) will he a polynomial that is order 2n, and there will be 2n solutions, n of
which arc stable.
The quadratic map exhihits a period doubling route to chaos. As the hifurcation paralnetcr
0'. is increased, model goes through a series of period doublings (IJcriod-2, perindA,
period-S, period-16, etc.). Feigenbaum noticed that the quadratic map had a consistent
change ill the bifurcation parameter between each period doubling. Indeed, he found that
any "one-hump" (sec any plot of g(x) for the quadratic map) model will have a cascade of
bifurcations which will yield the /"'·eif;cn!Jaum nurnbcr. The r"eigenbaum Humbcr is calcu-
latcd by comparing (X valucs at each sllccessivc hifurcation point in the following fashion
-" Ct
lim '1 ~ 4.669196223 ( 14.33)
C'ii+ [ - O:i
where C'ii represents thc parameter value at thc i th period doubling point, where the period
is 11 ::::: 2 i . To obtain a rough cstimate of the Feigcnbaum number, usc thc valucs of (X for
period-16 (2 4 ), pcriod 32 (2 5 ) and pcriod-M (2 6 )
e
3.56R759 ~ 3.5044IJ7
~ 4.6045
3.569692 ~ 3.56R759
period
"
I 2 3.0
2 4 3.44949
3 8 3.544090
4 16 3.564407
5 32 3.568759
6 64 3.569692
,j'j oc 356995
354 Introduction to Nonlinear Dynamics: A Case Study Chap. 14
We have llsed the quadratic map (a model of population growth) to introduce you to non-
linear dynamic behavior. This model consisted of a single discrete nonlinear equation.
Dynamic behavior similar to period-2 call result from a sct of two nonlinear ordinary dir~
fcrential equations. Exanlplcs of period behavior in continuous systems include the
Lotka-Voltcrra model used to predict the populations of predator and prey species. The
change in a bifurcation parameter that causes a limit-cycle to form in a 2 OIJE system is
known as a !ioplb{fllrcatiOIl, and will be covered in Chapter 16. Chaos is possible in a sd
of three autonomous nonlinear ordinary difJcrcntial equations. This behavior was discov-
ered by Lorenz in a simple (reduced~order) model of a \veather system (really a model of
natural convection heat transfer) and will he detailed in Chapter 17. Lorenz coined the
phrase "butterfly effect" to describe a system of equations that is sensitive to initial condi-
lions (hence chaotic). He stated conceptually that a butterfly flapping its wings in ·froy.
New York could cause a monsoon in China several months later (<Jr something similar~l.
Some of the earliest results of what is now known as chaos were really discoverclJ
by Poincare in the late nineteenth century, involving the three-body problem. He found
that it was easy to determine the planetary motions due to gravity in a system \\lith t\VO
bodies, but when three bodies were considered, the system of equations became nonintc-
grable-leading to the possibility of chaos.
We sec turbulence throughout our daily lives, from the waleI' flowing from our
hlUcels, to the effect of wind blowing through our 11;:\ir as we ride our bicycles. to the boil,
ing \vater on our stoves. Many researchers have tried to model turbulence by adding sto-
chastic (random) terms to our models of physical behavioL It has only been realized in the
past three decades that a good physical (nonlinear) model can simulate the effects of tur
hulence through chilDS.
Nwnerical mcthods arc used to solve thc vast majority of chemical process models.
Angclo Lucia (sec references) has found that chaos can occur in the solution of some tiler
Inodynamic equations of state if the numerical lllethods arc not formulated carefully. It is
likely that many people have obtained similarly bad solutions before reformulating thcll1
correctly.
SUMMARY
A lot of material has been presented in this chapter. You may be wondering how discretc
maps and bifurcatiolltheory tics in with applications in chemical engineering. There arc at
leastlwo important reaSOns for studying this material:
We have shown that the quadratic map problem is conceptually identical [0 numer!
cal methods that can be used to solve a nonlinear algcbraic equation. Since lhe qua
dratic map problem cxhibits exotic behavior undcr certain values of the paramcter n.
this tells liS that a poorly posed I1lHllerieal method lllay have silnilar problcms. f3c
can~/ltl when llsing J/umerical methods.'
References and Further Reading 355
The prinlary reference for the behavior of the quadratic map is (this has been reprinted in
a number of sources) is by -May.
May, R.M. (1976). Simple mathematical models with vcry complicated dynamics,
Nalure 261: 459-467.
'rhe general field of chaos theory was introduced to much of the public in thc popular
hook hy Gleick:
Lorenz, E,N. (1963). Deterministic non periodic flows. }ourJ/o! (!{ Atmospheric Sci-
ellce. 20: 130-141.
Software for the MacintosllO that was packaged with the following hook was used to gen-
erate some of the quadratic map diagrams. ·fhis book also docs an excellent job of dis-
cussing tbe quadratic map and dynamical systcms theory.
Chaos can appear in numerical solutions to chemical engineering problems, such as phasc
equilibrium calculations, as shown in the following paper:
I.ucia, A., X. Guo, PJ. Richey, & R. Dercbail. (1990). Simple process equatiot/s.
.fixed [Join! methods, and chaos. American Institute of Chemical Engincers Jour-
nal (lIICI1£.I.), 36(5): 641~654.
356 Introduction to Nonlinear Dynamics: A Case Study Chap. 14
Strogatz, S.H. (1994). Nonlinear Dynamics and Chaos. Reading, MA: Addison
Wesley.
STUDENT EXERCISES
I. \Vhy arc the results for the simple quadratic map problem important to understand,
when chemical and environmental process models arc obviollsly much more com-
plex (hascd 011 ODEs)')
2. Usc MATLAB to generate transient responses for the quadratic map, for various
values of n. Explore regions of single st:cady~statc solutions, as well as regions of
periodic and chaotic behavior. Use Figure 14.14 to try and find regions of periodic
behavior in the midst of chaotic behavior.
3. Derive the scaled logistic equation (14.9) from the following unscaled model for
population growth.
where r and I. arc constants (Hint: [)efinc the scaled variablc, x::::: nr/( I + 1')1.). What
is the physical significancc of L'!
4. Consider the "constant harvesting" model for population growth, where 'Y is a term
that accounts for a constant removal rate per unit timc period (e.g., hunting deer or
removing cells from a petri dish),
How docs 'Y effect the cquilibrium population values? (Show calculation, and COll-
sider stability of the equilibrium.)
tAct tV ::::: 3.2. What 'Y values <Irc required for () (the trivial solution) to be a sta-
hlc cquibrium solution? What 'Y valucs are required for a stablc nontrivial solution'?
5. Consider the "proportional harvesting" model for population growth, whcre the re-
moval rate per unit timc pcriod is proportional to the amount of population
How docs 'Y cffect the equilibrium population values? (Show calculation, and con-
sider stahility of the cquihbriuln.)
Let (\' ::::: 3.2. What 'Y valucs arc required for 0 (the trivial solution) to bc a sta-
ble equibriul11 solution? What 'Y valucs are required for a stable nontrivial solution'?
6. Consider the pcriod-2 behavior that occurs at a value of 0' ;:::: 3.2. Show that the val-
ues of x ~ 0 and x ~ 0.6875 are unstahle. (flint: Let h(x) ~ X(X(x» and show thai
I/{(x) I ;:> I at those values.)
Student Exercises 357
7. Using MATLAB construct the orbit diagram (Figure 14.14) for the quadratic map.
S. F'ind the (real) fixed points 01'.\""+1::: \/t/,' and analyze their stability. Also, develop a
cobweb diagram for this problem.
9. Consider the nonlinear algebraic equation, .f(x) ::: _.1;2 - X + I ::: O. Using the direct
substitution method, formulated as x::: _.r 2 + I ::: g(x), the iteration sequence is
x kl J ::0::: g(x k ) = - xl --j- 1
Try several different initial conditions and show whether these converge, diverge or
oscillate between values. Discuss the stability of the two solutions x';: ::: 0.618 and
x* :::;; 1.618, based on an analysis Of{I,/(x~:).Deveiop a cobwcb di<-:tgram for this SYStCllL
10. Consider the nonlinear algebraic equation,f(x)::: -x 2 - x + I ::: O. Usillg Newton's
method,
Try several different initial conditions and show whether these converge, diverge,
or oscillate between values. Discuss the stability or the two solutions .r:t: ::: 0.618 and
x":::: 1.618, based on an analysis ofg'(x*'). Develop a cobweb diagranl for this system.
11. Consider the scaled Lotka-Volterra (predator (Y2)-prey (VI» equations, \vhere
dv
•• , = a (I ~ v») V,
til .- .
The parameters are O~ ::: ~ ::: 1.0 and the initial conditions arc Yj(O) ::: 1.5 and
YiO) ::: 0.75. The time ullit is days. Integrate these equatioJls lll11ncrically (using
odc4 5, for example) to show the periodic behavior.
12. The I--Icnon Inap is a discrete model that can exhibit chaos:
x, (k + I) x)(k) -j I ~ax,(k)'
x,(k + I) h x,(k)
For a value of!J::: 0.3, perform numerical simulations for various values of u. Try to
rind values of a (try a > 0.3(75) that yield stahle period-2 behavior. Show that
chaos occurs at approximately a:= 1.06.
13. Read the paper by Lucia ct al. (1990) and use cobweb diagrams to show different
types of periodic behavior that can occur when direct substitution is llsed 10 find the
volume roots of the SRK equation-of-stale for the multicomponent mixture (CH"I'
C ZH4, and C,H(,(J).
358 Introduction to Nonlinear Dynamics: A Case Study Chap. 14
g3(i) ~ alpha*g2(i)*(1-g2(i));
g4(i) - alpha*g3(i)*(1-g3(i));
end
% can plot, for example
% plot(x,x,x,g,x,g2, 1~I,x,g4, '_, ')
BIFURCATION BEHAVIOR
OF SINGLE ODE SYSTEMS
15
The goal of this chapter is to introduce the student to the concept of bifurcation behavior.
applied to systems modeled by a single ordinary differential equation, Chapters 16 and 17
will involve systems with more than one state variable.
After studying this chapter, the student should be able to
15.1 Motivation
15.2 [IIustratioll of Bifurcation Behavior
15.3 Types of Bifurcations
15.1 MOTIVATION
Nonlinear systems can have "exotic" 11chaviof such as multiple stcady~statcs'and transi-
tions from stable conditions to unstahle conditions. In Chapter 14 we presented the qua-
dratic map (logistic map or population model), which showed how a discrete-time systeln
could move from a single stable steady-state to periodic hehavior as a single parameter
was varied. This would he considered a dynamic bifurcation of a discretc-tinle system,
where the behavior changed from ()symptotically stable to periodic.
360
Sec. 15.2 Illustration of Bifurcation Behavior 361
Here a simple polynomial equation will be used to illustrate what is meant by h(jllrcafio!l
behavior. Assume that the following cubic polynomial equation describes the steady-state
behavior of a system.
1'he types of bifurcations that will be presented hy way of examples include: 0) pitchfork,
Oi) saddle-node, and (iii) transcritical. We will also cover a form of h.vsteresis behavior
and show that it involves two saddle-node hifurcations. Before we cover these specific hi-
furcations, we will present the general analysis approach.
Consider the general dynamic equation:
(15.1 )
where x is the slale variable and !.L is the bifurcation parameter. The steady-slale solution
(also known as an equilibriulll point) of (15.1) is:
() f(.qL) ( 15.2)
A bifurcation point is where the both the function and its first derivative are zero:
iJf
.I(X,fL) = iJx = ()
(15.3 )
Notice that thcrirst-dcrivalivc is also the Jacobian for the single-equation model. Also,
the eigenvalue is simply the Jacobian for a single equation syslem, so the eigenvalue is ()
at a bifurcation point. The number of solutions of (15.2) can be determined from cafastm-
ehe t!lcory. [~quatioll (15.2) has k solutions, if the following criteria arc satisfied:
f(X,fL) = ()
af ... a'f (15.4)
()x - ax?
and
( 15.5)
In Example 15.1 this method is applied to a system thaI exhibits a pitchfork bifurcation.
-r,,() = 0
x,.j = V;~
x,<! = V~
Sec. 15.3 Types of Bifurcations 363
Notice that if 11, < 0, then xl' ;;::: 0 is the only physically meaningful (real) solution, since \/~ is
complex if fJ. < O.
The Jacobian is
Since the Jacobian i.o, a scahH, then the eigenvalue is equal to the Jacobian:
If Po. < 0, then the systcm is stahle. If Po. > 0, then the systcm is unstahle. NO\v, we can find the sta
bility of the system, as a function of the hifureation panunetcr, /-L.
I. ~ < O. The only real equilibrium solution is '\,0;;::: 0, so the value of the cigenvalue is:
A - fL"
which is stahle, since fJ. < O.
II. ~ > O. POI' this case, there are threc real solutions; we will analyze each one separately. We
lise the notation X/'ll' X;'I' ami x e2 to indicate the three different solutions.
\1 fJ'
-:1- .r e2
2 I-l" - stable
- VfL
-3 -+- IL,.
.J I-l" -+- ~,. 2 J.-l" - stable
It is eomOlon to plot the equilihriulll solutions on a bifurcation diagram, as shown in Figure 15.2.
For I-l <0, therc is a single real solution, and it is stable. r"m I-l > 0 there arc three real solutions;
two arc stablc and one is unstable. A solid line is used to represent the stable solutions, while a
dashed line indicates the unstable solution. Notice that a change ill the number of equilibrium so-
lutions and the type of dynamic behavior oecured at 1.L;::;: O--the hUim'atioll poinl. The bifurca-
tion point satisfies the conditions in (15.3):
ax
iJ/1 \,.l'
j -I
1.L" 0
364 Bifurcation Behavior of Single ODE Systems Chap. 15
The slalc and parameter values that satisfy these conditions simultaneollsly are:
fl.,. ()
and
X" =0
The higher-order derivatives at the bifurcation point are:
a'I? I =6x""'0
ax""!,,
and
alII (, I ()
ax}~",l'~
This analysis indicates that the mnnber of solutions is three in the vicinity of the bifurcation
point (sec (15.4) and (15.5)),
x
x~ /.5
A~ -21'
stable
x~ 0
-----+---- -------------- ---- -- -- ---- --- --- ------ -- - I'
A~ I' unstable A= I'
stable
It should be noted that there arc actually three solutions to the steady-state equation
throughout the entire range of l..L values. For fJ... < 0, two of the solutions for Xc arc C'Hllplcx
and uncis real. r:or fJ.. = 0, all three solutions for J:e arc zero. For f.L > 0, all three solutions
for Xc are real.
Sec. 15.3 Types of Bifurcations 365
2 r -_ _~_-=E:::xam=p<.:le:..l:..:.~)l'-...-=_-..:l
_ _~_ _...,
-2 L-_-~----....-.,---:-----,J
o 2 3 4 5 FIGURE 15.3 Transient response for
time Example 15.1, /.L::::-1.
Figure 15.3 shows the transient response for fJ,::;;: -I for two different initial conditions;
both initial conditions converge to the equilibrium solution of x = I. Figure 15.4 shows
the transient response for JJ, = 1 for two different initial conditions; the final steady-state
obtained depends on the inlial condition. Notice that an initial condition of X o :::: 0 would
theoretically stay at x = 0 for all time, however, a small perturbation (say J 0--9 ) would
eventually cause the solution to go to onc of the two stable steady-states.
Example 15.1 illustrates pitchfork bifurcation behavior, where a single real (and sta-
ble) solution changes to threc real solutions. Two of the solutions are stable, whilc one is
lln~table, It is easy to find cases where a (subcritical) pitchfork occurs, that is, where a sin-
gle unstable solution branches lo two unstable and OIlC stable solution. For example, con-
sider the system
j: j(x,!-'l = fL< + x3
Example 1 J' = I
"0 = 0.Q1
0.5 1
x 0
-0.5
-I
i
"0 = - 0.01 FIGlJRJ1: 15.4 Transient response for
-1.5 Example 15.1, IJ. =: l. The final steady-
0 2 ~ 6 8 10
state reached depends ()n the initial
time condition.
366 Bifurcation Behavior of Single ODE Systems Chap. 15
The reader is encouraged to find the bifurcation behavior of this system shown below (see
student exercise 5).
2 r-----.,-
~ 0
--1
2
-21.5 --1 ·0,5 0 0.5 1.5 2
rou
Also, a perturbation of the pitchfork diagram can occur with the following system:
i "0 f(x,/L,u) ,~ u + /LX -- x 3
which can have a diagram of the form shown below (see student exercise 7).
u;;:: 1
4
~ 0
4
6 o
rou
x,,): = -- YJJ.
The Jacobian (and eigenvalue) is:
IJ.,. = x" = 0
Sec. 15.3 Types of Bifurcations 367
which indicates that there are two solutions in the vicinity of the bifurcation point. Now, we can
find the stability of the system, as a function of the bifurcation parameter, j..t,
I. /.l < O. From Xci = ± V~, we see that there is no real solution for !J- < O.
II. !J- > O. There are now two real solutions; we will analyze the stability of each one.
a. For solution J;
the eigenvalue is
which is stable.
b. For solution 2:
the eigenvalue is
which is unstable.
L,
X= JlO.~
>-
,,-- 2 Jl 0.5
.1l>.ble
,
Jl = a
uns1l>.ble
Notice that there are actually two steady-state solutions for .:re throughout the entire range of f.-l'
For f.-l < 0 both solutions for xI' arc complex; for f.-l;;;; 0 both solutions for xI' flrc 0; for f.-l > () both
solutions for xl' arc real.
Dynamic Responses. Transient response curves for /L:= 1 are shown in Figure 15.6, for two
different initial conditions. Initial conditiolls .ro > -1 converge to a steady-slate of x;;;; I, \vhilc
.:ro < ~-1 approach x = ~oo. It should he noted that a consistent physical (or chemit:al) ~bascd
model will not exhibit this sort of unbounded hehavior, since the variables will have some physi-
cal meaning and will therefore be bounded.
Example 2. Jl =1
"0= - 0.99
0
1
_I
•
-2 i
"0=- 1.01
-3
0 2 3 4 5
time
FIGURE 15.6 Transient response for Example 15.2, !L;;;: 1. Initial conditions
or Xo > -I converge to a steady-state of x;;;: 1, while Xo < -I "blows up",
The Jacobian is
Sec. 15.3 Types of Bifurcations 369
-2 *0
which indicates that there are two equilibrium 1'>0Iu60I1s. Now, we can find the stabil1ty of the
system, as a function of the bifurcation parameter, IJ-.
with an eigenvalue:
II. >0
jJ.
a. One solution is
which is unstable.
b. Another solution is:
These results are shown in the bifurcation diagram of Figure J5.7, which illustrates that the num-
ber of real solutions has not changed; however, there is an exchange of stability at the bifurca-
tion point.
370 Bifurcation Behavior of Single ODE Systems Chap. 15
L, x= j!,
,\ =-j!,
stable
x=o x=o
----------of------------------
,\=j!,
,\=j!,
stable UIl.'ltable
,\ =-j!,
UIl.'ltable
Dynamic Responses. Transient response curves for the transcritical bifurcation arc shown
in Figures 15.g and 15.9. Notice that the transient behavior is a strong function of the initial con-
dition for the slate variable. For some initial conditions the state variable eventually settles at a
stable steady-state, while for other initial conditions the state variable blows up.
Example 3. j!, = -I
"0=- 0.99
-0.5
-1
1
X -1.5
i
"0 = - 1.01
-2
-2.5
-3
0 2 6 8 10
time
Flf;(JRE 15.8 Transient response for Example 15.3, J.-L ---I. Notice the
importance of initial conditions.
Sec. 15.3 Types of Bifurcations 371
-1
time
FIGUH.E 15.9 Transient response for Example 15.3, fJ. ;:;;; 1. Notice the im-
portance of initial conditions.
The next example is significantly dille-rent from the previolls examples. Here we allow Iwo para-
meters to vary and determine their effects on the system behavior.
which has Iwo parameters (u and /1-) that can be varied. We think of If as an adjustable input
(manipulated variable) and f.L as a design-related parameter. We will construct steady-state
input-output curves by varying II and maintaining /1. constant. We will then change /L and see if
the character of the input-output curves (x versus II) changes. We first work with the case
fL ~-1.
ill I
ax XJl c
which is always negative, indicaling that there arc no bifurcation points and that all equilibrium
points are stable for this system. Contrast this result with that for /L 0;;; I, shown next.
372 Bifurcation Behavior of Single ODE Systems Chap. 15
,pie 3. )l =1
01
6 8 10
time
Notice that this is a cubic equation that has three solutions for xI' for each value of ll. For exam-
ple, consider u ;:;;; O.
At u;:;;; 0:
so,
x" = 1,0, or I.
The stability of each solution can be determined from the Jacobian:
Now we can vary the input, If, ovcr a range of values and construct a steady-state input-output
curve. These results are shown on the diagram of Figure 15.10 (the easiest way to generate this
figure is to create an Xc vector, and then solve Itt' = ~xc + x;. See student exercise 2).
Sec. 15.3 Types of Bifurcations 373
mu ~ 1
2 -~-- ---- ---,. r----------T---- - --------.------- .. - ----,----- .. - ~------- ....-.-----.--------
'" O· \ \
-1
~~
/
-2 .~
-4 -3 -2 -1 0 2 3 4
u
Notice that r<'igurc 15.11 cOiltains two saddle-node (or turning poioI) bifurcatio!l points
(sec Example 15.2), The bifurcation (singular) points can be determined frolll the solution of:
( 15.12)
1
3
whicll call he seen to be the x values at the upper and lower fuming points. Substituting (1:=;,13)
into (15.11), we find thal the bifurcation points oc;_<;ur at the inp~!! values of lie ::::; ± 2/3\1\ as
shown in Figure 15.10. N~)lice that for II. < -2/3V3 or II > 213\/3 there is only a single,. stable
solution, while for -2/3"'/3 < II < 213Y'3 there arc three solutions; two arc stable and one is Ull-
stable.
We have referred to the behavior of this cxarnplc as hysteresis behavior now let us show
why.
Starting at Low Values ofu. Notice that if we begin with a low value of If (say, -3) a sin-
gle, stable, steady-state value is achieved. If we increase II a slight amount (to say, -2.9), we will
achieve a slightly higher steady-state value for x. As we keep increasing It, we will cO!l.!illue to
achieve a new stahle steady-state valuc for x for each u. This continues untilll :::0 213V3, where
we find that the stable solution "jumps" to thc top curve. Again, as we slowly increase II, the sta-
ble steady-state solution remains on the top eurvc.
374 Bifurcation Behavior of Single ODE Systems Chap.15
Starting at High Values of u. Notice that if we begin with a high value of u (say, 3) a sin-
gle stable steady-state value is achieved. If we decrease Ii a slight amount (to say, 2.9), we will
achieve a slightly lower steady-state value for x. As we keep decreasing Il, we will con~inuc to
achieve a new stable steady-state value for x for each u. This continues until /l = -2/3Y...1 where
we find that the stable solution "jumps" to the bottom curve. As we slowly decrease Ii further,
the stable steady~state solution remains on the bottom curve.
This is termed hysteresis behavior, because the trajectory (path) taken by the state vari-
able (x) depends on how the system is statted-up. Ajump discontinuity occurs at each "limit" or
"turning" point (the saddle-node bifurcation points).
Discussion. Notice that there is a signific.1I)t difference between the inpUH)utput behavior
exhibited in Figures 15.10 and 15.11. For fJ.'::::: ~1 (Figure 15.9), there is monotonic relationship
between the input (Ii) and the output (x). For fJ.:::: 1 (Figure 15.10), there is a region of multiplic-
ity behavior, where there are three values of the output (x) for a single value of the input (u).
There has been a qualitative change in the behavior of this system as fJ. varies from ~ I to L The
value of fJ. where this occurs is a hystersis bifurcation point. At this point the following condi-
tions are satisfied (since there are three solutions in the vicinity of the bifurcation point):
f(x,l") ~ 0 ~ .•af
) .. ~
<X
and
a'f
iJ.tj *0
The equations are:
fJ. ~ 3x~ ~O
~6xe ~
0
-6
*0
It is easy to show that, for a value of Ii :::: 0, the bifurcation conditions are satisfied at:
x" = /L" = 0
which yields the plot in Figure 15 12, which is clearly a transition between Figures 15.10
and 15.1 L
A three~dimensional plot of x versus u as a function of /L is shown in Figure 15.13. The
behavior represented by this diagram is commonly known as a cusp catastrophe. At low values
Sec. 15.3 Types of Bifurcations 375
mu= 0
T~~--'·l-----~U--.-------
" 0
-1
2
1
" 0
-1
-2
-2
o
mu
u
:FIGURE 15.13 "Cusp catastrophe" diagram for Example 15.4.
376 Bifurcation Behavior of Single ODE Systems Chap. 15
achieve this hifurcation (Stwgatz, 19(4). The reader is encouraged to construct this diagrmn (sec
student exercise 6).
1.5
one fixed-point
0.5
three fixed-points
~ a
0.5
-1
-1.5
-1 -0.5 a 0.5 1.5 2
mu
FIGURE 15.14 Two~pannnctcr (f.-l,1I) bifurcation diagram for Example 15.4.
I
SUMMARY
We have studied the bifurcation behavior of some example single nonlinear ordinary dir~
ferential equations of the form.i: c= f(x,f.l), where x is the state variable ancl is the bil'llr-
f.l
cation parameter. The equilibrium (steady-slate) points afC found by solving ./(X,.,/-L,.) = O.
The stability is determined by finding the eigenvalue, 'A, which is simply the Jacobian,
~flax lx,,,tLe' for a single equation system, JJ A is negative, the equilibrium point is stable. If
"A.. is positivc, thc equilibrium point is unstable.
A bifurcation diagram is drawn by plolting the equilibrium value of the state variahle
as a function of the 11ifurcation parameter. [rthc c(]uilibrium ])oint is stable ("A..;:o;: D//fh
.
I.r,_·I.\·(
< 0), a solid line is drawn. IT the equilibrium point is unstable, a dashed line is dr;'l\vn.
The bifurcation points can be found by solving for i)/IJx.I.Y,.,jL" = 0 where l(x",J.-l,,) O.
Thcse same techniques can also be applied to systems of several equations, particularl)
if the cquations can be reduced to a single steady~slate algebraic equation (in a single stale
variable). This can he done for many simple chemical and hiochemical reactor problems.
Hale, J.K., & H. Kocak. (1991). Dynamics and BUitrca{;o/ls. New York: Springcr~
Verlag.
Student Exercises 377
Jackson, E.A. (1991). Perspectives (~f Nonlinear Dynamics. Cambridge, UK: Cam-
bridge University Press.
Strogatz, S.H. (1994). Nonlinear Dynmnics and Chaos. Reading, MA: AddisoIl-
Wesley.
STUDENT EXERCISES
S. Show that the following system exhibits a pitchfork bifucation, with three real
solutions (one stable, two unstable) for iJ- < 0 and a single unstable real solution for
fL > O.
,
,
o -------~-------------,---------------------
-1
-2
2 1.5 -1 -0.5 o 0.5 1.5 2
mu
.5
one fixed-point
0.5
three fixed-points
" 0
-0.5
-1.5
1 -0.5 o 0.5 1.5 2
mu
u ::;: 1
4
~ 0
-2
-4
·4 -2 0 2 4 6 8 10
mu
APPENDIX
h cusp diagram
% b.w. bcqucLtc
'I. 1~ dec 96
clear x;
clc,ar u;
clear rnu;
x -2;{)'05:2;
u x. "3 +2*x;
plot3 (u, - 2 "'ones (size (u)) ,x, 'w' )
hold on
380 Bifurcation Behavior of Single ODE Systems Chap. 15
mu ~ ~1.875:0.125:2;
for i "" 1:32;
u = x. A 3 - mu(i) .*x;
plot3(u,mu(i)*ones(size(u») ,x, 'w'}
end
hold off
»view(15,-30)
BIFURCATION BEHAVIOR
OF TWO-STATE SYSTEMS
16
The goal of this chapter is to introduce the reader to limil cycle behavior and the HopI" bi-
furcation. After studying this chapter, the reader should be able to
Find that many of the same types of bifurcations that occur in single-state systems
also occur in two-state systems (pitchfork, saddle-node, transcritical)
Understand the difference between limit cycles (nonlinear behavior) and centers
(linear behavior)
Distinguish between stable and unstable limit cycles
Determine the conditions for a Hopfbifurcation (formation of a limit cycle)
Discuss the differences between suhcritical and supcrcritica.1 HopI' bifurcations
16.1 Background
16.2 Single-Dimensional Bifurcations in the Phase-Plane
16.3 Limit Cycle Behavior
16.4 The Hopf Bifurcation
16.1 BACKGROUND
381
382 Bifurcation Behavior of Two-State Systems Chap. 16
types of bifurcations can also occur in highcr~order systems. This is the subject of Section
16.2. In Section 16.3 we review limit cycle behavior, which was initially presented in
Chapter 13 (phase-plane analysis). In Section 16.4 we present a type of bifurcation that
can only occur in second- and higher-order systems. In a Hopi' bifurcation, we find that a
stable node can h(furcate to a stahle limit cycle if a parameter is varied; this is an example
of a supercritical Hopf bifurcation. This phenomena has been shown to occur in a number
of chemica! and biochemical reactors. Before turning to the interesting Hopf bifurcation
phenomena, we will discuss single dimensional bifurcations in the phase plane.
Consider the two-variable system (notice that the two equations are decoupled):
XI = f,(X,fL) = fLXI - xi (16.1 )
XI' =
and
Xc = [~;:] = [ - :~I
Notice that only the trivial solution exists for j.J.. < 0, since we will assume that equilibrium
values must be real (not complex).
We can detenninc the stability of each equilibrium point from the Jacobian,
which is:
°1
-I
which has the following eigenvalues:
Al = fL - 3xj"
A2 = -I
Sec. 16.2 Single~Dimensional Bifurcations in the Phase~Plane 383
Since the second eigenvalue is always stable, the stability of each equilibrium point is de~
termincd by the first eigenvalue. Here we consider three cases, fJ, < 0, f.L:::::: 0, and fJ, > o.
J.L<O
The only equilibrium solution is the trivial solution (xli'::::: 0), so:
II J.L =0
The equilibrium solution is x k ::::: 0, so:
~I = J.L - 3xt = 0
which is stable; the system can be shown to exhibit a slow approach to equilibrium by ob-
serving the analytical solution to the differential equations.
and
So the nontrivial solutions arc stable for f.L> O. This means that a saddle point (trivial so-
lution) is bounded by two stable nodes for this case, since the three solutions are:
x ,. =
Ix"1
x" = IOJ·1
0 I~'J
~ =~2
WIt 1 = [J.L]
_I, = .
saddle pomt
IxX".j
., =
2,<
IV~].
0
WIth A = [~11, =
~2,
I' -2J.L1
_
I
= stable node
We notice the following phase-plane diagrams (Figure 16.1) as f.L goes from negative to
positive.
384 Bifurcation Behavior of Two-State Systems Chap. 16
0.5 0.5
~~ a ~~ a
-0.5 -0.5
-1 -1
x, x,
a. IJ < a b. u > a
FIGURE 16.1 Pitchfork bifurcation behavior in the plane. There is a single
stahle node for /L < 0, and two stable (0) nodes and a saddle point (+, unstable)
for 1-1 > 0,
In Chapter 13 we noticed that linear systems that had eigenvalues with zero real portion
formed centers in the phase-plane. The phase-plane trajectories of the systems with cell-
ters depended on the initial condition values, as shown in Figure 162 below. Different
initial conditions lead to different closed-cycles.
In this section, and the rest of this chapter, we are interested in limit cycle behavior,
as shown in Figure 16.3. The major difference in conter (Figure 16.2) and limit cycle
0.5
x,
-0.5
-1
-1.5
-1 a FIGURE 16.2 Example of center be-
x, havior.
Sec. 16.3 Limit Cycle Behavior 385
0.5
x,
0
-0.5
-1
-1.5
1 0 FIGURE 16.3 Example of limit
x, cycle behavior.
(Figure 16.3) behavior is that limit cycles are isolated closed orbits. By isolated, we mean
that a perturhation in initial conditions from the closed cycle eventually returns to tbe
closed cycle (if it is stable). Contrast that with center behavior, where a perturhation in
initial condition leads to a different closed cycle.
of I - 3 r'
ar
We see then that tbe trivial solution (r:::;: 0) is unstable, because the eigenvalue is positive (+1).
The nontrivial solution is stable, because the eigenvalue is -~2. Any trajeeto'·y that starts out
close to r"'" 0 will move away, while any solution that starts out close to r;o;; I wiH move towards
r;o;; I. The time domain behavior for x [ is shown in Figure 16.4, Notice that we have convelicd
the states to rectangular coordinates (XI r cos 0, x2 "'" r sin 0). The phase-plane behavior is
;0;;
shown in Figure 16.5. Initial conditions that are either "inside" or "outside" the limit cycle con-
verge to the limit cycle.
386 Bifurcation Behavior of Two-State Systems Chap. 16
1.5
··0.5
-1
o 10 20 30 40
time
1.5
0.5
.;;: 0
-0.5
·1
The previous example was for a stable limit cycle. It is also possible for a limit cycle to be
unstable, as shown in Example 16.2.
Again, notice that these equations are decoupled. The second equation indicates that the angle is
constantly decreasing. The stability of this system is then determined 0"0111 an analysis of the
first equation.
Sec. 16.3 Limit Cycle Behavior 387
1.5
................
...-
/
l ~!
0.5
-0.5
The steady-state solution of the first equation yields two possible values for r. The trivial
solution is r ::;: 0 and the nontrivial solution is r::;:: I.
The Jacobian of the first equation is:
iif
~1+3r2
()r
We sec then that the trivial solution is stable, because the eigenvalue is negative (--1). The non-
trivial solution is unstable, because the eigenvalue is positive (+2), Any trajectory that stalts oul
less than r = I will converge 10 the origin, while any solution that starts out greater than r ::::1
will increase at an exponential rate. This leads to the phase~planc behavior shown in Figure 16.6.
The time domain behavior is shown in Figure 16.7.
1.5 --
0.5
o _-------1...--._ .. L L..
o 2 3 4 5 6
time
FIGURE 16.7 Time domain behavior for an ullstable limit cycle. An initial
condition of 1'(0) = 0.9 converges 10 0, while an initial condition of r(O) = 1.05
blows up.
388 Bifurcation Behavior of Two-State Systems Chap. 16
Examples 16.1 and 16.2 have shown the existence of two different types of limit cycles.
Tn the first case (16.1) the limit cycle was stahle, meaning that all trajectories were "at-
tracted" to the limit cycle. In the second case (16.2) the limit cycle was stahle, and all tra-
jectories were "repelled" from the limit cycle. Although hoth of these examples yielded
limit cycles that were circles in the plane, this will not normally be the casco Usually the
limit cycle forms morc of an ellipse. Now that we have covered limit cycle behavior, we
arc rcady to determine what types of system parameter changes will cause limit cycle be-
havior to occur. That is the subject of the next section.
o~ -I (16.10)
Since these equations are decoup1cd, thc stability is dctcrmined from the stability of:
;. = fer) = r (fJ. - ,2)
the Jacobian is:
af /.L - 3,.2
ar
The equilibrium (stcady-statc) point is/{r):;;:; 0, which yields,
r(fJ.-r 2 ) = ()
Sec. 16.4 The Hopf Bifurcation 389
r ,= 0 (trivial solution)
For /-L < 0, only the trivial solution (r:;::: 0) exists. For I-l < 0,
·3 r'
iJ{ "
. ' = p, -- 3 r' -2f-L
(),.
1.5 1.5~~······
~\.
-~)/
0.5
-0.5
1.5 -1.5
·1 0 1 0
x, x,
a. f"~-1 b'I.c~ 1
F1G-lJRE 16.8 Phase-plane plots. As J.-l goes from -1 to I, the behavior changes from
stable node to a stahle limit cycle.
390 Bifurcation Behavior of Two-State Systems Chap. 16
1.5
l.... 0.5
o··_~-~- -----------------------
-0.5
FIGURE 16.9 Bifurcation diagram. Indicates that the origin (r 0) is stahle :;:;;0
when I-l < O. When I-l > 0 the origin becomes unstable, but a stable limit cycle
(with radius r::::: \/iL) emerges.
Here we analyze this system ill rectangular (xI - coordinates. The only' steady~stalc (fixed-
point or equilibrium) solution to (16.7) and (16.8) 15:
atl _
__~~1-l-3Xl-X2
2 2
~ 2 Xl {,
dX j ax,
=-1-2x x; J
dX)
2
Sec. 16.4 The Hopf Bifurcation 391
We see that when ~ < 0, the complex eigenvalues are stable (negative real portion); when f.L::::: 0,
the eigenvalues lie on the imaginary axis; and when f.L> 0, the complex eigenvalues are unstable
(positive real portion). The transition of eigenvalues from the left~half plane to the right-half
plane is shown in Figure 16.10.
Example 16.3 was for a supercritical Hopf bifurcation, where a stable limit cycle was
formed. We leave it as an exercise for the reader (student exercise 6) to show the forma-
tion of a subcritical Hopt" bifurcation, where an unstable limit cycle is formed.
We have found that the Hopf bifnrcation occurs when the real portion of the com-
plex eigenvalues became zero. In Example 16.3 the eigenvalues crossed the imaginary
axis with zero slope, that is, parallel to the real axis. In the general case, the eigenvalues
will cross the imaginary axis with non-zero slope.
We should also make it clearer how an analysis of the characteristic polynomial of
the Jacobian (A) matrix can be used to identify when a Hopf bifnrcation can occur. For a
two-state system, the characteristic polynomial has the form:
a 2(fl.) ),,2 + a,(fl.) )" + ao(fl.) = 0
where the polynomial parameters, ai' are shown to be a function of the bifurcation para-
meter, fl. (It should also be noted that it is common for a2 = I). Assume that the a/fl.) pa-
rameters do not become 0 for the same value of fl.. It is easy to show that a Hopf bifurca-
tion occurs when a,(fl.) = 0 (see student exercise 7).
Thus far we have discuss Hopf bifurcation behavior of two-state systems. Hopf bifurca-
tions can occur in any order system (n ;:::: 2); the key is that two complex eigenvalues cross
the imaginary axis. while all other eigenvalues remain negative (stable). This is shown in
Figure 16.11 for the three state case.
392 Bifurcation Behavior of Two-State Systems Chap. 16
o
o
p < 0
+ ~t := a
~f--
p > 0
SUMMARY
In this chapter we have shown that the same bifurcations that oeemed in single-state sys~
tems (saddle-node, transcritical, and pitchfork) also occur in systems with two or more
states. We have also introduced the Hopf bifurcation, which occurs when cmnplcx cigcn~
values pass from the left-half plane to the right-half plane, as the bifurcation parameter is
varied. A HopI' bifurcation can also occur ill systems with more than two stales. F,'or a Sll-
pcrcriticalHopf bifurcation, two complex conjugate eigenvalues cross from the left-hall' to
the right-hall' plane, while all of the other eigenvalues remain stable (in the left-half plane).
FURTHER READING
Hale, 1., & H. Kocak (1991). DYl/mnics and H{flfrcatiol1s. Nc\v York: Springer-
Verlag.
Strogatz, S.H. (1994). Nonlinear Dynamics and Chaos. Reading, MA: Addison-
Wesley.
'I'he following textbook shows a complete exmnplc of the occurance of I[opf bifurcations
in a 2-state exothermic chemical reactor model:
STUDENT EXERCISES
x, = f,(x,fL) = -x,
exhibits tnmscritical behavior in the phase plane.
3. Show that the two-variable system:
x, = f,(x,fL) = Ii + x, - xi
x, = J;(X,fL) = -x,
exhibits hysteresis behavior in the xl state variable. This means that, as u is varied,
x\e folJows an S-shaped curve, which exhibits the ignition/extinction behavior
shown in Chapter 15.
4. Show that:
can be written:
;. = ,. (fL - r')
0=-1
is a l (!J-) = O. This is easy to do if you realize that a HopI' bifurcation occurs when
the roots have zero real portion and write the polynomial in factored t~)rll1.
394 Bifurcation Behavior of TWQ+State Systems Chap. 16
You can assume, without loss of generality, that a 3 (/-L) = 1. How do the conditions
on the polynomial coefficients relate to the conditions on the Jacobian matrix (trace,
determinant, etc.)?
INTRODUCTION TO CHAOS:
THE LORENZ EQUATIONS
17
The objective of this chapter is to present the Lorenz equations as an example of a system
that has chaotic behavior with certain parameter values. After studying this chapter, the
reader should be able to:
17.1 Introduction
17.2 Background
J 7.3 The Lorenz Equations
J 7.4 Stability Analysis of the Lorenz Equations
J 7.5 Numerical Study of the Lorenz Equations
(7.6 Chaos in Chemical Systems
17.7 Other [ssucs in Chaos
395
396 Introduction to Chaos: The Lorenz Equations Chap. 17
17.1 INTRODUCTION
In Chapter 14 we presented the quadratic ll1i:lp (logistic equations) and found that the tran~
sient behavior of the population varied depending on the growth parameter. Recall that
when the qualitative behavior of a system changes as a function of a certain parameter, we
refer to the parameter as a b(lurcalion parameter. As the growth parameter was varied, the
population model went through a series of period-doubling behavior, finally becoming
chaotic at a certain value of the growth parameter. At that time we noted that chaos is pos~
sible with onc discrete nonlinear equation, but that chaos could only occur in continuous
(ordinary differential equation) models with three or more equations (assuming the model
is autonomous). In this chapter we study a continuous model that has probably received
the most attention in the study of chaos-the Lorenz equations. Before we write the equa-
tions, it is appropriate to give a brief historical perspective on the Lorenz model. For a
more complete history, sec the book Chaos by James Cjlcick (1987).
17.2 BACKGROUND
T,
Consider a Huid maintained between two parallel plates, as shown in Figure 17.1.
When the top plate temperature (T2) is equal to the hottom plate temperature (T,), there is
no flow and the system is in equilibrium. Now, slowly increase the bottom temperature.
At low temperature di ffcrcnces, there is still no llow because the viscous forces are greater
than the buoyancy forces (the tendency for the less dense Huiet at the bottom to move to-
ward the top and the more dense lluid to move toward the bottom). Finally, at some criti-
(al temperature difference, the buoyancy forces overcome the viscous forces and the nuid
begins to move and form convection rolls. As the temperature difference is increased, the
fluid movement becomes more and more vigorous. Although the following point may be
less clear to the reader, for some systems there 1sa value of temperature difference that
will cause the smooth convection rolls to break up and become turbulent or chaotic-.
One can think of the speed of these convection rolls as wind speed in a miniature
"weather model" and the direction of the convection rolls as wind direction.
In the next section, we analyze the Lorenz equations, which attempt to model the
ilow pattern of Figure 17.1.
galP!::.T
The Rayleigh number is: Ra =
vI<
where:
a = coefficient of expansion
11 = distance between plates
g gravitational acceleration
!::.T = temperature difference between the plates (T 1 ~ T 2)
v = kinematic viscosity
I< = thermal conductivity
The Lorenz equations have three steady-state (equilibrium) solutions under certain condi~
tions. First, we present the trivial solution, then the nontrivial solutions. In Section 17.4
we will determine the stability of each equilibrium solution.
TRIVIAL SOLUTION
By inspection we find that the trivial solution to (17.1 )-(17.3) is XL, = x2, = Xl.> = 0 (17.4)
The trivial condition corresponds to no convective flow of the fluid.
NONTRIVIAL SOLUTIONS
From (17.1) we find that:
(175)
Nontrivial I Nontrivial 2
State Variable Trivial Solution (r> 0 required) (I' > 0 required)
o Vb (r ~ I) Vh(r~ 1)
o Vj)~ -Vb(~-~ I)
o r -- I r 1
(17.7)
and substituting (17.7) into (17.6) and using tbe results of (17.5):
For rcal solutions to (17.8), condition r ~ I must be satisfied. This Incans that for r < 1,
there is only one real solution (the trivial solution), while for r > I there arc three rcal so-
lutions. This is an example or a pitchfork bifurcation. For Ra < Rae' there is no convective
flow. The equilibrium behavior is slIlllllwrizcd in Table 17.1.
Linearizing (17.1 )-(17.3) around the stcady-statc we find the following Jacobian matrix:
j
( 17.9)
For the trivial solution, XIs = x2.\,:::: x:h:::: 0 , the Jacobian matrix is:
(17.10)
(17.14)
Clearly, the first eigenvalue is always stable, since b > O. It is also easy to show that the
second and third eigenvalues can never he complex. The second eigenvalue is always
negative and the third eigenvalue is only negative for r < I. We then sec the following
eigenvalue structure for the trivial (no flow) solution
For,. > I, then f{o > Rae' which means that flow will occur. Notice that Ra is proportional
to b.T. This mcans that once fj,T is increased beyond a certain critical fj,1~:, convective
flow \vill begin.
Here we find the roots of det(AJ - A) = 0 for the nontrivial solutions. Starting with:
AI- A
I:,' ';
-- ):2s
-<r
A+ I
~XIs
XIs
A+ h
o ] ( 17.15)
where:
b2 -lr(A) IT+b+1 ( 17.17)
b,'··(r+lr)b (17.18)
bo = ~- det(A) = 2lrb(r - I) ( 1719)
Recall that real nontrivial solutions only exist for r > I.Thc coefficients b 2 , hi' and ho arc
then all positive, satisfying the necessm)' condition for stability. The Routh array must be
lIsed to check the sl{1I1Cienf condition for stability. As derived in the appendix, the critical
r for stability is:
r·11 =-
<T + h +
(17.20)
(IT ~ b - I)
If r > /)/, then the stability condition is not satisfied. This is an interesting result, because
it Incal1s that nOlle of the cquibrium solutions (trivial, nontriviall, nontrivial 2) is stable
for r> rl!- The subscript His llsed in (17.20), because a Hopf bifurcation forms at that
value (sec student exercise 1). If a supercritical Hapf bifurcation occurred, a stable limit
cycle would form, yielding periodic behavior for the nontrivial solutions. It turns out that
.<1 suhcrificalllopf birfurcation is formed, that is, the limit cycle is unstable (sec Strogatz
for a nice discussion). Since there arc no stable equilibrium points for r > 1'/1, and no sta-
hle limit cycles, the solution "wanders" in phase space, never repeating the same trajec-
tory. This behavior is known as chaos and the solution is said to be a strange atfracfor.
We have seen that for r < 1 there is only one real solution, the trivial solution, and it is sta-
ble. When r =1 there is a pitchfork bifurcation, yielding three real solutions for r> 1. The
trivial solution is unstable for r > 1, while the nontrivial solutions arc stable for 1 < r < rHo
This behavior is shown clearly by the bifurcation diagram shown in 1,'igurc 17.2. The for-
mation of the unstable limit cycle at I' = 1'/1 is discussed by Strogatz.
15
unstable limit cycle
10
5
c: . .•. •.•. .•. . . .•.•.•~..• -
" 0
5 -----
----- ~7----
-10
unstable limit cycle
15
25 30
r
FIGURE 17.2 Bifurcation diagram for the Lorenz equations. Based on para-
meters in Section 17.5.
402 Introduction to Chaos: The Lorenz Equations Chap. 17
Lorenz used the following values to illustrate the chaotic nature of the equations
IT ~ ]()
8
b~
3
r c. 28
from (17.22) we calculate that I'll ::;: 470/19 ; : : ; 24.74, indicating that all of the equilibrium
points arc unstable, since the value of r::::: 2S is greater than rJl"
Before we continue with the set of parameters that Lorenz used to illustrate chaotic
behavior, we will first pcrfonn sinlulations for two other cases. ]n the first, we show a set
of conditions where the trivial solution is stahle. In the second, we show a set of condi-
tions where the nontrivial solutions are stable.
We have found that the trivial steady-state is stable for 0 s: r < I. l-lerc we use the u and b
parameters used by Lorenz, but set r:::: 0.5 ror a stable trivial steady~state.
X
(J ~ 10 /, ~ r ~ 0.5
3
As in future simulations, we assume an initial condition oLto ;;;: 10 1 Ol"r, A time dornain
plot for all three-state variables is shown in Figure 17.3, and a phase-plane plot (x3 vs. tl)
is shown in r<'igure J7.4. The convergence to equilibrium occurs rapidly.
0.8
0.6
~
0.4
0.2
0
0 2 4 6 8 10
FIGURE 17.3 Lorenz equations under conditions for a stable trivial solution.
Sec. 17.5 Numerical Study of the Lorenz Equations 403
0.15
'P 0.1
0.05
o
o 0.1 0.2 0.3 0.4 Q5 0.6 0.8 0.9
Xi
FIGURE 17.4 Phase-plane under stable conditions for the trivial solution
(x] - xJ plane).
We have found that the nontrivial steady-states arc stable for 1 < r < r l1 " I-Icrc we use the
ITand b pannnctcrs used by I"orenz, but set r::: 10 (recall that r ll ::: 24.74 for these values
of (J and b) to show that the nontri vial steady-states arc stable.
8
iT = to h=
3
r = 21
15
10
5
0
" ~5
10
~ 15
20
0 5 40
time
8. r 21, Xo =- [0
0:;:. OjT.
10
5
-5
10
-15
chaos. Thc initial trajcctory appears chaotic, but eventually the tr(~jectory converges to an
equilibrium point. In othcr systems thc systcm can exhibit transient chaos and settle into
periodic behavior.
The phase plane diagram of Figure 17.6 also clearly shows the effect of two dif-
ferent initial conditions. In curve a thc trajectory almost immediately goes to the equili-
brium point on the right (positive value of xl)' In curve b the trajectory first winds
around the left equilibrium point, switches to the right equilibrium point, and (after
going back and folth a fcw times) evcntually winds around the left equibriulll point,
slowly converging.
Sec. 17.5 Numerical Study of the Lorenz Equations 405
r= 21. Xo = [0;-1;01
35
30
25
20
15
10
,
5
o -----~~~~-~
-20-15 10 -5 o 5 10 15
Xi
r = 21. Xo = [-20;10;1 OJ
35 ~ .~~~.
30
25
20
!i'
15
10
o
-20 --·-:-15-----:--.,lnO~~--5"---O ·--5~·-~-TD---t5---- -20 FIGURE 17,6 Phase plane under sl<t"
Xi
ble conditions for the nOlltrivial
b.r=21.xo =[20 10 10l T solutions.
8
(f ~ lO b~ r ~ 28
3
Recall that all of the equilibrium points are unstable, since the value or r::::: 2X is greater
than FJ!>
406 Introduction to Chaos: The Lorenz Equations Chap. 17
20
Lorenz E<lualiOllS,I = a 10 I = 50
15
10
5
a
" 5
10
-15
20
a 40 50
time
40
30
20
10
o
20 --15 --10 -5 a 5 10 15 20
x,
FIGlJRE 17.8 Phas<>plane or Lorenz equations under chaotic conditions.
'rhe development of the curve in FigUfC17.8 is shown more clearly in the phase-
plane plots in Figure 17.9, which show varies "pieces" of time.
A three-dimensional plot (phase cube) of this trajectory is shown in Figure 17.10.
The reader is encouraged to perform simulations of the Lorenz equations, to be un-
derstand concepts such as sensitivity to initial conditions. MATI,AB has a demo titled
lorenz. m (simply enter lorenz in the command window) that traces a three-dimen-
sional plot of solutions to the Lorenz equations. Each new run uses a new set of random
initial conditions. If you write an m-file to simulate the [,orenz equations using ode45,
remember to use a name lhat is different than lorenz .m, to avoid conniels with the
MATLAB clemo.
The Lorenz equations provide a nice example of chaos, because the equations arc reason-
ably simple to analyze. An even simpler set of equations was developed by Rossler to
demonstrate chaotic behavior (sec student exercise 3). Chaos has also been shown to ap-
pear in models or chemical process systems, particularly exothermic chemical reactors.
Reactors that arc forced periodically Uacket temperature is a sine wave, for example) have
been shown to exhibit chaos. Also, a series or reactors with heat integration can exhibit
chaotic behavior. [t appears that chaotic reactors may have had low amplitude "oscilla-
tions" (say in temperature) that may have been interpreted as measurement and process
noise in the past. A comprehensive review of nonlinear dynamic behavior in chemical re-
actors is provided in the article by Razoll ami Schmitz (1987).
408 Introduction to Chaos: The Lorenz Equations Chap. 17
-,
'"
'"
()~---,,-
-7.11 -1.\ -111 III l~ 211
"
(~O (0 5 (~5 (010
"'1-
41)
T
'"
:10
'm
'~
-111
'"
0--
_}II -15 -10 IS JII
"
'"
(~1O(015 (~15 (020
II ---~~--, --~--~-
"
(~20(025 (~25(o30
.10
In
"
(~ 30 (035 (~ 35 (040
5H
'"
)11
11)
'"
'" '"
t=
"
40 to 45 t
"
= 45 to 50
FIGURE 17.9 C'ol/iit/lled
Chaos is a complex field with ITiany books and conferences devoted to this simple topic.
Clearly, it is impossible to give this topic adequate coverage in a single chapter. Our goal
is to provide an introduction {tl, and motivation for, the topic. 'rhe reader is encouraged to
consult the many books and articles available 011 the topic.
r =: 28, Xo [0;1;OJ
60
40
20
o
-50
~--~20
o ~ 10
~ 0
-10
50 -20
x,
How docs onc detect chaos experimentally? One method is to lise experimental data
to calculate Lyapwwv exponents. See Strogatz for example.
Chaos can be used to encode secret messages. See Cuomo and Oppenheim (199.)).
who used ideas presented by Pecora and Carroll (1990).
SUMMARY
A nice book on the history at' chaos, written for the general public, is by Gleick,
The first paper to develop the notion of sensitivity to initial conditions is by Lorenz.
Strogatz, S.H. (1994). NOlllinear Dynainics and Chaos. Reading, MA: Addison-
Wesley.
Razon, L.l'., & R.A, Schmitz. (1987). Multiplicities and instabilities in chemically
reacting systems--A Review. Chel1l. Eng. Sci., 42(5): 1005-1047.
A large number of papers on chaos have been collect in the following book:
Hao, Bai-Lin. (Ed,). (1990), Chaos fl. Singapore: World Scientific Press.
Student Exercises 411
Papers that develop a way of encoding secret messages using chaos arc:
Pecora, L.M., & T.L. Carroll. (1990). Synchronization in chaotic systems. Physical
Neview Leflers, 64: 821.
Cuomo, K.M., & A,v. Oppenheim. (1993). Circuit implementation of synchronized
chaos, with applications to communications. Physical Reviell Leflers, 71: 65.
J
STUDENT EXERCISES
" ~ 10
r ~ f, ~ 470/19 ~ 24.74
8
b ~--
3
For the nontrivial solution, show that a supercritical Hopf bifurcation occurs at this
value of r. That is, for r < r e, all eigenvalues arc stahle, for r::::: r c' two eigenvalues
arc on the imaginary axis, and for r > rc' two eigenvalues have crossed into the right
half plane.
2. Show the sensitivity to initial conditions of the Lorenz equations. Run two simula-
tions with the parameter values shown in the numerical study
" ~ .10
r ~ 28
b ~ 8/3
For the first simulation use the initial condition xo ;;::; [0 I OIT, For the second sim-
ulation lise the initial condition Xo ::::: [0 1.0 I Orr. When do the simulations begin
to diverge?
Run some more simulations with smaller perturbations in the initial concli-
tions, Also, make perturbatiollsin the initial conditions for the other state variables.
What do you find?
3. Consider the Rossler equations (see Strogatz, for example):
Xl = -x2 - x J
x2 = x l +ax2
x, = b + x,(x\ ~ c)
which have a single nonlinear terlll. Let the parameters a and h be constant with a
value of 0.2. Usc simulations to show that this system has period-I (limit cycle), pc-
riod-2, and periodA behavior for c::::: 2.5, 3.5, and 4, respectively. Show that chaotic
behavior occurs for c :::: 5,
412 Introduction to Chaos: The Lorenz Equations Chap_ 17
APPENDIX
Row
I I
2
"2
hi)] - b o
3 ()
h,l.
4
Where
"0
"0 =2 ,,"(r - I) hi ~(r+,,)" b2 =<r+h+1
Since the nontrivial steady-state only exists for 1';:: I, then bo is ahvays positive. It also
follows that hi and b 2 will always he positive. The only entry from the Routh array that
we must check is the first column in row 3. This entry will he positive if:
The purpose of this module l is to review MATLAB for those who have used it before and
to provide a brief introduction to MA'fLAB for those who have not used it hefore. This is
a hands-on tutorial introduction. Arter using this tutorial, you should be able to:
r';nter I1latriccs
Make plots
Write script files
Perform Inatrix operations
Usc MATLAB functions
Write function files
MI.l Background
MI.2 Using This Tutorial
M1.3 Entering Mali"ices
MIA The MATLAB Workspace
MI.5 Complex Variahles
MI.6 Some MA'rLAB Operations
IGood references include Introductioll to 11.1;\ 7V\U for E'flf;ineers (ind Scicntisfs by D.M.
EtLer (Prentice-Hall, 19(6), and Mas/eriflg MArLA/; byD. Hanselman and 13. Littlefield (Prcnticc-
Hall, 1996).
415
416 Introduction to MATLAB Module 1
M1.7 Plotting
MI.R More Matrix Stuff
MJ.9 FOR Loops and IF-THEN Statements
M I.J() m-filcs
MI.II Diary
MI.12 Toolboxes
MI.13 Limitations to Student MATI,AB
MI.J4 Contacting MATHWORKS
M1.1 BACKGROUND
This tutorial provides a hrief overview of essentialMATLAB commands. You will leal'll
this material morc quickly ({YOll use MATLAS interactively as you are reviewing this {lf~
(orial. The MATLAB commands will be shown in the following font style:
Monaco font
MATLAB has an extensive on-line help facility. For example, type help pi at the
prompt
)) help pi
» help exp
sometimes you do not know the exact command to perform a particular ope-rallon. In this
case, one can simply type
» help
and MATI-,AB will provide a list of commands (and m~files, to he discussed later) that are
available. If you do not know the exact command for the function that you arc after, an-
other useful cOllltnand is lookfor. This command works somewhat like an index. If you
did not know the cOlnmand for the exponential futlction was exp, yOli could type
» lookfor exponential
EXP Exponential
EXPM Matrix exponential.
EXPMl Matrix exponential via Pade' approximation.
EXPM2 Matrix exponential via Taylor series approximation.
EXPM3 Matrix exponential via eigenvalues and eigenvectors.
EXPME Used by LINSIM to calculate matrix exponentials.
The basic entity inMATLAB is a rectangular matrix; the entries can be real or complex.
Commas or spaces are used to delineate the separate values in a lnatrix. Consider the fol-
lowing vector, x (recall that a vector is simply a matrix with only one row or column):
»x = [1,3,5,7,9,11]
x
1 3 5 7 9 11
Notice that a row vector is the default inMATLAB (in contrast to the default column vec-
lor lL"lcd by this and most other texts). We could have used spaces as the delimiter be-
tween columns:
»x [1 3 5 7 9 11]
x
1 3 5 7 9 11
There is a faster way to enter matrices or vectors that have a consistent pattern. ['or exam-
ple, the following command creates the previous vector:
» X = 1:2:11
x
1 3 5 7 9 11
418 Introduction to MATLAB Module 1
Transposing a row vector yields a column vector (, is the transpose command in MAT-
LAB):
y x'
"
y ~
1
3
5
7
9
11
" x ~ [1;3;5;7;9;11]
x
1
3
5
7
9
11
» X 0= x'
Say that we want to creale a vector z, which has clements from 5 to 30, by 5s:
» Z :::: 5:5:30
5 10 15 20 25 30
If we wish to suppress printing, we can add a semicolon (i) aftcr any MA TLAB com-
mand:
» Z ::::; 5:5:30;
The z vector is generated, but not printed in the command window. We can find the value
of the third clement in the z vector, Z (3) , by typing
Sec. M1.4 the MATLAB Workspace 419
" 2(3)
ans
15
» who
ans x y z
leaving 621420 bytes of memory free.
More detail abollt the size of the matrices can be obtained by typing:
» whos
Name Size Total Complex
ans 1 by 1 1 No
x 1 by 6 6 No
Y 6 by 1 6 No
2 1 by 6 6 No
» [m,n};;;:size(x)
n ~
where ill represents the number of rows and n represents the number of columns. If we do
not put place arguments for the rows and columns, we find:
420 Introduction to MATLAB Module 1
» size (x)
ans
1 6
" length(x)
ans
6
It should be noted that MATLAB is case sensitive with respect to variable names. An X
matrix can coexist with an x matrix.
You may wish to quit MATLAB but save your variables so you don't have to re-
type or recalculate them during your next MATLAB session, To save all of your vari-
ables, usc:
» save file~Dame
(Saving your variables does not remove them from your workspace; only clear call do
thall
You can also save just a few of your variables:
» save file__name x y z
Sometimes it is desirable to clear all of the variables in a workspace. This is done by sim-
ply typing:
» clear
» clear x
This is particularly true if you arc performing a new calculation of x and the new vector is
shorter than the old vector. If the new vector has length fl, then all of thc clemcnts of thc
new x greater than x(n) will contain values of the previous x vector.
Sec. M1.6 Some Matrix Operations 421
ans
o + 1.0000i
» j
ans
o + 1. OOOOi
» sqrt (-3)
ans ;=
o + 1.'73211
Note that these variables (i and j) can he redefined (as the index in a for loop, for CX~
ample), as will be shown later.
Matrices can be created where some of the clements arc complex and the others arc
real:
a
2.0000 1.0000
o + 2.00001 -5.0000
» b ~ [1 2 3;4 5 6J
b
1 2 3
4 5 6
» C ;:;, a *b
c
6.0000 9.0000 12.0000
-20.0000 + 2.0000i -25.0000 + 4.0000i -30.0000 + 6.0000i
» d:::o c. *b
1.0e+02 *
0.0600 0.1800 0.3600
-0.8000 + 0.0800i -1.2500 + 0.2000i -1.8000 + 0.3600i
(Notice the scaling that is performed when the numbers arc displayed.)
Similarly, clement by clement division, b(i\i)Ic(iJ), can be performed using. /:
e
0.1667 0.2222 0.2500
-0.1980 - 0.0198i -0.1950 - 0.0312i -0.1923 - 0.0385i
Other matrix operations include: (i) taking matrix to a [lower and (ii) the matrix exponen-
tial. These arc operations on a square matrix:
» f = a/,2
f
4.0000 + 2.0000i -3.0000
o - 6.0000i 25.0000 + 2.0000i
»g expm{a)
9 ~
1\11.7 PLOTTING
» plot (x, z)
Sec. M1.7 Plotting 423
»x 1:2:11;
»z 5:5:30;
30
25
20
~
15
10
5
0 2 4 6 8 10 12
x
» xlabel ('x')
» ylabel ( , z ' )
» help plot
If we wish to plot discrete points, using + as a syrnbol, we can usc the following:
» plot(x,z,'+')
30 - _..
25 +
20 +
15 +
10 ) +
i
5' +
0 2 4 6 8 10 12
x
» t :::: 0:1:50;
» y 4 * exp ( ~ 0 . 1 * t) ;
" p1ot(t,y)
" p1ot(t,4*exp(~O.1*t))
~ 2
o
o 10 20 30 40 50
Sec. M1.7 Plotting 425
» Y = t.*exp(-O.l*t);
" plot(t,Y)
» gLexL('hey, this is the peak! ')
" xlabel ( , t ' )
" ylabel ('y')
4
islhe
o
o 10 20 30 40 50
axis ( square ') will place the plot in a square box, while axis ( normal') will
I I
" v ~ [0 50 0 4];
» axis(v);
Multiple curves can be pJaccd on the same plot in the following fashion.
,,,
2 . ,
,
,,,
,
,,
I
»subp1ot(2,1,1), p1ot(t,4*exp(-O.1*t))
»subp1ot(2,1,2), p1ot(t,t.*exp(-O.1*t))
4 ~-----~- - - - ,- , I
:l_~__~
o
__~ ~ 10 20 30
",=_
40
- __
50
:Ln.~. .::..
o 10 20 30 40 50
lIcre, subplot(iJ,k) means that there are i "rows" of figures,.i "columns" of figures. and
the current plot is the kth figure (counting right to left and top to bottom).
To rctum lO single plots, simply enter subplot (1,1,1).
A matrix can be constructed from two or more vectors. If we wish to create a lnatrix \'.
which consists of two columns, the first column containing the vector x (in colunlll fonn)
and the second column containing the vector z (in column form), we can usc the J'olhm-
lI1g:
»vo::o[x',z']
v
1 5
3 10
5 15
7 20
9 25
11 30
~----------------~-_ .....
Sec. M1.9 For Loops and If-then Statements 427
» V ( : J 1)
ans
1
3
5
7
9
11
" v (: ,2)
ans
5
10
15
20
2o"j
30
And we can construct the same plot as before, by using (' -- I gives a dotted line):
25
>
0 20
0J
C
E 15
=>
<3
" 10
5
0 2 4 6 8 10 12
column 1 of v
» [or k l:~)OOl;
tlk) (k1)*0.01;
ylk) sinltlk));
end
»k 0
» for t ~ 0:0.01:50;
k = k + 1;
y(k) = sin(t);
end
The developers ofMATLAlj highly recommend that you usc the vectorizcd version of
the above for loops:
t 0:0.01:50;
y - sin I I) ;
since the computation time for this method is over 200 tilnes faster than the nonvcc{(lrized
methods.
Ml.l0 M-FILES
'I'hus far we have shown the interactive features of MATL.AB by entering one command
at a time. One reason that MA'rLAB is powerful is that it is a language, and programs of
MATLAB code call he saved for later lise. There arc two ways of generating your own
MATLAB code: (1) script files and (2) function rOlltines.
A script file is simply a sequence of commands that could have been entered interactively
in the MATLAB command window, When the sequence is long, or must be performed a
nurnbcr of times it is much casier to generate a script file.
The following example is for the quadratic map population growth model:
where xk represents the value of the population (dimensionless) at the kth time step. We
have titled the file popmod. ill and stored it in our directory.
Sec. MUO M-Files 429
% poprnod.m
% population model, script file example
%
clear x,k
n input ( 'input final time step ') i
alpha input('input alpha ');
xinit input('input initial population ') i
x(l) - xiniti
time ( 1 ) ,. O'
for k;::: 2:n+l;
time(k) - k-l;
x(k) alpha*x(k-l)*(l-x(k-l));
end
plot(time,x)
% end of script file example
Notice that we have used the MATLAB input function to prompt the user for data. Also
note that a percent sign (%) may be used to put comments in a script or function file. Any
text after a % is ignored.
T'he file is run by simply entering:
» popmod
A more powerful way of wiving problems is to write MATLAB function routines. Flllle·
tion routines are similar to subroutines in FORTRAN. Consider the previous example.
We can now "run" this functioll routine (using alpha:::;: 2.8, xini t :::;: 0.1, n :::;: 30) by
typing
» [tstep,xpop]=pmod(2.8,O.1,30);
» plot(tstep,xpop)
Introdu ction to MATLA B Module 1
430
0.7
0.6
0.5
0-
0
0-
0.4
x
0.3
02
0.1 30
0 5 10 15 20 25
tstep
M1.11 DIARY
the sequenc e or COl11-
When preparin g homew ork solution s, it is oftell necessa ry to save
ork. The diary com-
mallels and output results in a file to be turned in with the homew
mand allows lhis.
and most of the
diary f i le._nam e causes a copy of all subsequ ent terminal input
off sllspends it.
resulting output to be written on the file namcd file__ name. diary
statc. Diary riles may be
diary on turns it back OIl. diary, by itself, toggles the diary
n entries.
edited latcr \\'ith a text editor to add comme nts or renlove mistake
Often the consult ants wish to See a diary file of your session to assist them in trou-
bleshoo ting your MATL.AS problems.
M1.12 TOOLBOXES
to solve speciali zed
MATLA B toolbox es arc a collection of function routines writtcn
the Student Edition of
problem s. The Signals and Sy.<;lems Toolbo x is distribu ted with
s the Symbol ic Algcbra
MATL.AB. The newcst edition of Student MATLA B also contain
analytic al solution s to
toolbox , which is a collecti on of routines that allows onc to obtain
in chemica l process
algebnd c and differcntial calculu s problem s. One toolbox orten used
control is the Control System s Toolbo x.
The Student Edition of MATLAB has a few limitations compared with the Professional
version. For example, Student MATLAB (4.0) is limited to 8 I92-element alTays.
MATHWORKS has aholncpagc on the \Vorld Wide Web. The URL, for this home page
IS:
http://www.mathworks.com/
You can find answers to frequently asked questions (FAQ) on this homcpagc. Also, there
arc a number of technical notes that give more inf<Jnnation on using MA'fL,AB function
routines. Suggestions arc made for modifying these routines for specific problcrns.
There is also a MATLAB ncwsgroup (bulletin board) that has up-tn-date questions
(usually supplied by MA'fLAB users) and answers (supplied by other users as wel! as
MATHWORKS personnel). The newgnmp is:
Berore posting questions on this ncwsgroup it is a good idea to read the FAQ from the
MATlIWORKS.
STUDENT EXERCISES
1. Plot the following thrcc curves On (i) a single plot and (ii) multiple plots (using the
subplot command): 2 cos(t), sin(t) and cos(t)+sin(t). Usc a timc period such that
two or three peaks occur for cach curvc. Use solid, dashed, and '+' symbols for the
dilTcrent curves. Usc roughly 25-50 points for each curvc.
2. a. Calculatc the rank, detenninant and matrix inverse oUhe following matriccs (usc
help rank, help det, and help inv):
Student Exercises 433
-~J
I 2
A = [
- I 2
2 4
[- ~ -n
2
B 4
4
[-~
2
e 4
4 iJ
3. Find eel, where:
D~:
2 ()
3 I
Io o ()
with
A~
[~ 3 ]
-1
B ==
[:1
...- 2(~.3281
G ~]
[ - 11.896
Q _. K~
-17.192 -18.856
Solve for R.
434 Introduction to MATLAB Module 1
7. Find the solutions to the equation j(x) ::::: Jx 3 + x 2 + 5J: - 6 ::::: O. Usc roots alld
fzera.
8. Integrate the following equations from t::::: 0 to I ::::: 5:
dX 1
-~ xJ + Xz
dl
dX 2
dl
with the initial condition .1:1(0):= x 2(O) =:; I. Usc ode45 and plot your results.
9. Write your own function file for the following equation:
c
k(T) ~ a cxp b
(
~ 'I' ~ In dT ~ e 'I' + IT 2 )
for(/~3.33,h~ 13,148,c~5639.5,d~ 1.077,e~5.44x lO-4,I~ 1.125x 10-7
T is in units of Kelvin.
Plot k as a function of l' for temperatures from 373 to 600 K. (we suggest 50 points)
V ~ b '["'V (V + b)
for P ~ 13.76 har, b ~ 44.891 cm 3/gmol,T ~ 333 K, (/ ~ 1.56414 x 10'
cm(i bar/gmol 2 KO.5, R::::: ideal gas constant in appropriate units.
...
L
MODULE
REVIEW OF MATRIX
ALGEBRA 2
The purpose of this module is to provide a concise review of matrix operations and linear
algebra.
After studying this module the reader should be able to:
Multiply lnatrices
Find the transpose of a matrix
Find the eigenvalues and eigenvectors of a matrix
Understand concepts of rank and singularity
In this module we review only the essentials of matrix operation necessary to understand
material presented in the chapters of this textbook. For more detailed explanation:'! and
more advanced concepts, please consult any textbook on matrices or linear algebra.
MATLAB is very useful for performing matrix operations. Module 1 provides a review of
MATLAB.
435
436 Review of Matrix Algebra Module 2
In the study of dynamic systems it is comillon to usc l1l<:ltrix BoUllion. The usc of matrix
notation allows the compact representation of a system composed of many variables and
equations.
Matrices are two-dimensional arrays that contain scalar elements that can be either
real or complex. In this module most or our examples involve real matrices. Consider the
]
following matrix, which consists of n rows and In columns:
",.
{{II
A
r'"a 2l
{ll/!
(/n
{[n2
([211I
{fl/Ill
where (lij represents the scalar clement in the ilh row andjth column of matrix A.
It is a good habit to denote the numbers of rows and columns beneath the matrix as
(n,rn) or (n x tn). For example, the following is a 2 x 3 matrix:
A .~ I~ ~ ~I
(2 X 3)
A vec!oris a special case of a two~dimcnsionall1latrix. Normally, the use of the tcnn vec~
tor implies a column vector. The following is an example of a column vector of length :;
(a 3 x I matrix), where Vi is an element of the vector:
The convention of this textbook is to usc lower-case bold leUers to represent vectors and
upper-case bold letters to represent matrices. Unless stated otherwise, it is assumed that a
vector is a column vector.
Two matrices can be added by simply adding the individual elements of the matrix. The
matrices must have the same number of rows and columns. The operation:
C=A+B
Sec. M2.2 Common Matrix Operations 437
c= I: 2
5
31 [7
6 + 10
X
II
91
12 =
IX
14 16
10
Clearly the order of matrices docs not matter for the addition operation (A + n : :; B -I- A).
C ::: II A
(r x 111) (rxn)(nxm)
Notice th:'ll the number of columns of B must be equal to the number of rows of A. The cl-
clnenl in the ith row andjth colulllll of Cis:
Notice that we can view this as an operation on row and column vectors within the matri-
ces. That is, the ith clement in the jth column of C is equal to the scalar value that is ob-
tained from "multiplying" the ith row of B times the jth column of A.
C = H A
(",111) (r.lI) (1I,1J1 )
Cd Crm
[,'or example,
c ,= [ ~ 1~)j /: 2
5
11 12
(rows,cols)
==
[
(3,2)
7(1) + X(4)
9(1) + 10(4)
(2,3)
7(2) + X(5)
9(2) + 10(5)
7(3) + X(6)
9(3) + 10(6)
j
11(1) + 12(4) 11(2) + 12(5) 11(3) + 12(6)
(3,l)
~
[
39
49
59
54
6X
X2
69
X7
lOS
j
Clearly the order of the matrices arc important in multiplication. In the example above,
BA is a consistent multiplication, while An is not Even for square matrices (where the
number of rows is equal to the number of columlls), AU -::F- HA in general.
M22.3 Transpose
til} = {iji
Columns become rows and rows become columns. For example,
2
5 63..1 A
f
~ [~ ~j
3 6
It caIl he shown that the following property holds:
(ABC)f = CTBTA T
As noted earlier, we normally think of vectors as being column vectors. The transpose of a
column vector is a row vector. Consider an n-dimensional vector x. The transpose of x is xT .
and
X tl
Sec. M2.2 Common Matrix Operations 439
The vector transpose is often used to calculate a scalar function of two vectors. [)or CXHrll-
pic, if wand z are column vectors, of length 11, the operation wTz results in a scalar value:
2:
;,,--1
'/l};Zj
Notice that multiplication in the opposite order, zw1~ results in ann x n matrix:
21
2 2103
Z2~Vl
""'·1
23 Zz'!D2. z
Z 1DI/
['w, 'W 2 'W 3 IlJ tl l
Zn
r 2,,'10 1 ZII'W Z Zn?D j Zll1IJ il
Diagonal matrices arc commonly used in weighted least squares (regression) problems.
Matrix Q is diagonal if
Qij 'Iifor i ~ j
~ 0 for; i j
For example, Q = diag( I,3, 12) represents the following matrix:
o
3 oOJ
o 12
IDENTITY MATRIX
An identity matrix, I, is a diagonal matrix with ones on the diagonal and zeros off'~diagonal.
[ii ~ I if ; ~ j
o it' ; * j
'fhe 5 x 5 identity matrix is:
1 0 000
o 1 000
[0= diag(l,I,I,J,I) o 0 I 0 0
o 0 010
o 0 001
440 Review of Matrix Algebra Module 2
A number of the important matrix operations lIsed in this textbook involve square (num-
ber of rows equal number of columns) matrices.
M2.3.1 Trace
The trace of an n X n (square) matrix is simply the sum of its diagonal clements,
tr A :;0: 2:"
; 1.
{lii (M13)
M2.3.2 Determinant
One of the most important properties of a square matrix is the determinant. Consider <l
2 X 2 matrix:
A ::::0 la"
a
{/ 1
an.
21
'.2..
The determinant of A is
Sometimes the det A is written as IAI. An algorthim for finding the determinant of a larger
matrix involves matrix cofactors and is shown below.
The matrix formed by deleting the ith row and the jth column of the matrix A is the m;,/or
of the clement aU' c1cnolcdM ,j" Consider the 3 x 3 matrix:
A o [:::
•.1'
au
an {I'll
an
(l31 (f-12 aD
The minor of (lj2 of the matrix is obtained by deleting the first row and the second col-
umn. In this case:
ani
o:u__
The determinant of a matrix call be found hy expanding ahout any row or column (this ap-
proach is sometimes called the Laplace expansion).
(i) Expanding around any columu j:
The matrix inverse is conceptually useful when finding x to solve the following problem:
Ax~y
wbich yields:
Tx~A ' y
or,
x ~ A ly
An algorithm for finding the inverse of an 11 x n matrix is known as Cramer's rule:
A I
--, adjA (M2.9)
del A
where the a(~i()int matrix of A (adj A) is the transpose of the matrix of cofactofs of A.
(M2.IO)
ESCOLA DE E,,~CENHARIA
L,,,LI0Tt-:A
442 Review of Matrix Algebra Module 2
In practice, this procedure is not used because the computational time is quite large t()r
large matrices. Generally, a method such as Gaussian Elimination or LU decomposition is
used.
A = [all all]
a 21 an
I adj A
A -
detA
cn = (-ti l2
det Mn = all
A - [~ b]
d
d
-bA ]
- b] 1 ~ d...ct A.
det
a . det A ~
[ E ....... 0 ...
det A detA
where de! A 00:; ad - be
That is, ~wap the diagonal terms, take the negative of the off-diagonal terms, and divide
by the determinant.
Sec. M2.3 Square Matrices 443
A singular matrix cannot be inverted. A matrix A is singular if det A :::: O. Also, a singular
matrix has a rank that is lower than the dimension of the matrix. The rank of a matrix is
the number of independent rows or columns. For example, the matrix:
A = I~ ~]
has rank = I, because the second row is linearly dependent on the first row. The matrix is
singular, because
det A = 4 - 4 = 0
We note that the matrix inverse of a singular matrix does not exist. For this example, note
the division by 0 in the following calculation
The rank of a square matrix is equal to the number of nonzero eigenvalues. Eigenvalues
of a square matrix arc disclissed next
where:
Normally, we will usc the notation ~i to rcpresent the eigenvector that is associated v"ith
eigenvaluc Ai' There are n eigenvalues and n eigenvectors associated with an II X 11 matrix.
The interesting thing about equation (M2.11) is that a matrix times 11 vector is equal
to a scalar times a vector. A scalar multiplying a vcctor docs not change its "direction" in
n-dimensional space, only its magnitude. In this case, a matrix A times the cigenvector ~
yields the eigenvector ~ hack, scaled by A.
Equation (M2.11) can be written as
(AI - A)~ = () (M2.12)
444 Review of Matrix Algebra Module 2
where A must be a scalar value for which Al --- A IS singular, otherwise ~ :;;;; 0 (the trivial
vector). A requirement for AJ - A to be singular is dctCAJ ~ A) :;;;; 0, where the notation
det(AI - A) is used to represent the dctcnninant of l\!- A.
EIGENVALUES
The eigenvalues of an n X n matrix A arc the n scalars that solve:
det(l\! - A) •.. 0 (M2.13)
Equation (M2.13) is also known as the characteristic polynomial for the matrix A~ the
eigenvalues arc the 1'001,0;; of the c1Ulractcristic polynomial. For an 11 X 11 matrix A, the char-
acteristic polynomial will he nth order, so there will be II roots (n eigenvalues).
EIGENVECTORS
The corresponding 11- eigenvectors (~) can be found from
A ~i l\j ~i (M2.14)
~i is the eigenvector associated with the eigenvalue Ai-
For example, consider the general 2 x 2 matrix:
A 1I'.l (Jizi
1(In (/22_
l\-II 11
l\I-A
1.. ~(/Zl
triA) = all + a 22
dct(A) = allan - anll n
Equation (M2.16) is the characteristic polynomial for a 2 x 2 matrix.
It can easily he shown that, if tr(A) < 0 and det(A) > 0, the roots (eigenvalues) of (M2.16)
will be negative. Also, if det(A) '= 0, then one root (eigenvalue) will be zero.
The reader should derive the following characteristic polynomial for a 3 x 3 matrix.
(see student exercise 7).
Sec. M2.3 Square Matrices 445
where:
tr(A) = (/Il + (/" + {/11
The ROllth stability criterion (Chapters 5 and 9) can be Llsed to find the conditions on the
polynomial coefficients that will yield negative roots (eigenvalues). The necessary condi-
tion is that all of the polynomial coefficcnts arc positive. The necessary condition is then
tr(A) < 0, M > 0, and dct(A) < O. The reader can usc the Routh stahility criterion to deter-
mine the sufficient conditions for negative roots.
A
~ I~ -\ I
dCl(,.I~A) ~ A' -[2~ 1[,. 1-[2(-1)-2(1)[ ~ IJ
A! ,.~4cO
and
A, ~ 2.5616
The first eigenvector is found from (M2.14):
(M2.1X)
where we have lIsed the notation:
446 Review of Matrix Algebra Module 2
I~ II
1.5616 v 11
'V 21
2V 11 +V 21 1.56J6v 11
2V 11 -- 021 = - 1.5616 'On
which yield:
1J 21 3.561 5 ~/)]l
If we wish, we call arbitrarily select VII 1.0 and '/)21 = 3.56J5
~, cc II" I [ 1.0
c I 1M2. J9)
1} } n - - - 3..l 6 !5
Most complltcl:pal:kag~:"\~il] report cigyllycctors that have a unit norm (length:o:: J). If we divide
1M2. J 9) by V(
1)" V+
(1',,)2 VI-:,
12.6841 3.6992, we rind that:
o.W)})
0.9628
An (~qllivalent solution is:
- O.2703j.
1 0.9628
The reader should show that:
leads to:
I. '~I !]
0.8719]
~2 -
tv 1 0.4896
Eigenvector problems arc easily solved used the eig [unction in MA'T'LAB (sec Mod-
uleJ), as shO\vn below.
a =
2 1
2 -1
v =
0.8719 -0.2703
0.4896 0.9628
d
2.:')616 o
o -1. 5616
Sec. M2.3 Square Matrices 447
Column i in the v matrix is the eigenvector associated with the ilh eigenvalue (which is
the ith diagonal clement ill the d matrix). The trace and determinant can also be f(lUnd
using MATLAB commands:
» trace(a)
an~; -
1
» det (a)
ans
··4
The similarity tran.~I()nn is uscful for understanding the dynamic behavior or linear sys-
[ellls (sec Chapter 5). Recall the eigenvector/eigenvalue problem for a 2 x 2 matrix:
(M2.20)
(1112.21 )
Notice that equations (M2.20) and (M2.2l) can be written in the following form:
AV VA (1112.22)
(M2.23)
where:
1/)".1
1)21. and ~2 = 1/)"1
v)~
;\
°1
A} .
(1112.24)
A' V A V I (111225)
r~quation (M2.25) will he useful when developing analytical solutions for sets of Iincar
differential equations, and can be used for any n x II (square) matrix.
448 Review of Matrix Algebra Module 2
It is quite natural to think of vectors as having a "length" property. This property is called
a vector norm. The most common norl11 is the Euclidean norm. In two-dimensional space,
the Euclidean norm is:
notice that the sum of the squares can be written as xTx , lhalis:
IlxI12=~
M2.4.2 Orthogonality
Notice that orthogonal vectors arc "perpendicular" to each other, as depicted below.
z (0.5,1)
w (1,-0.5)
M2.4.3 Normalized or Sl'aled Vectors
Many times, we will scale vectors, so that they are !1onna/ized. A vector is normalized if
it has a norm (length) of 1.0. Normalization is pcrformed by multiplying each c1ement_ or
thc vector by I/vector norm. For a givcn vector, x, the scaled vector, U is u:::: X l/~
1. x:;t: 0 4 I xI > 0
2. II (XX I I III xii
(X Where CI.. is a scalar
3. I X YiI j .,; I xI + I y I 'rriallglc inequality
SUMMARY
In this module we have provided a concise review of matrix operations. This material
should be sufficient for most of the matrix operations used in the textbook. It is partiCLI-
larly important that the reader understand:
Matrix notation
How to multiply matrices
That an n X 11 matrix has n eigenvalues, which arc the 11 roots to the characteristic
equation: det(~[ - A) ~ 0.
That a matrix A is singular if the dct(A):::: O. A singular matrix docs not have an in-
verse. A singular matrix is not full mnk.
That the rank of a square matrix is equal to the number of nonzero eigenvalues
STUDENT EXERCISES
A ~
3
B~ [79 6
a. FindC ~ All
f1 5
b. Find [) ~ IliA
c. Find E A 'll
7. Derive the characteristic polynomial (del (1\.1- A)) for a general 3 x 3 matrix:
1112 11
11 ]
A ...
an
[""
{/21
([-\I {lJ2
((21
{lJl
Student Exercises 451
a.A=[~J :31
h. B = [-11 :21
MODULE
LINEAR REGRESSION
3
The objective of this module is to review linear regression analysis, with a focus on a ma~
tfix algebra formulation and MATLAB routines for linear regression, After reviewing this
module, the reader should be able to:
M3.1 Motivation
M3.2 Least Squares Solution for a Line
M3.3 Solution for the Equation of a Line Using Matrix~ Vector Notation
M3.4 Generalization of the Linear Regression Technique
M3.5 MATLAB Routines polyf i t and polyval
M3.1 MOTIVATION
The models developed in this text require the values of many parameters such as reaction
rate coefficients, etc. It is common to use linear regression (also known as I1near least
squares analysis) to estimate thc values of these parameters. To illustrate the basic princi-
ples of linear regression analysis, we first consider the equation of a linc. Consider the
452
Sec. M3.1 Motivation 453
y
0
0
0
0
- A
Y a x + b
data shown as open circles in Figure M3.1. We would like to find a line that provides a
best fit to the data.
Let xi and Yi represent the independellt variable and measured dependent variable
for the itil experimental data point. Also, let "Vi represent a lnodel prediction or the depen-
dent variable, given the experimental value of the independent variahle, xi' 'rile sets of de-
pendent and independent variables can be represented as vectors:
Xl
X2 Y2
X = Y
XN
(M3.1)
The major disadvantage to this approach is that there is not a simple, closed-fonn, analyti-
cal solution to this problem. An alternative approach is to minimize the SUlll the qr
squares of the errors. That is, find a and b such that (M3.2) is JniniruizecL
454 Linear Regression Module 3
(M.'2)
l<'or N data points, we can represent (M3,2) using the more compact notation in (M3.3):
N
2.: (y, - yJ' (MDl
i= J
Besides the analytical solution thal will follow, another advantage to the Slllll or the
squares formulation is that large errors arc penalized 1110re heavily than small errors.
N
f(a,b) 2.: (y, - ax, - b)2 (M.'.5)
i····· 1
We know from calculus tbe necessary condition for a mininmm of a function I.\lith respect
to a variable. The minimum ofj(a,b) is satisfied by (M3,6) and (M3.7),
af(ll,b)
da
o (M.'6)
a/(a,h)
ah
o (M.'.7)
From (M.'.6)
N
a/(a,h)
22.: (y, - ax, - h) (x,) 0 (MU)
ria i'cl
Rcmoving the conslanl value -2, wc find that (M3.8) and (M3.9) call he written as
(M.'.I 0) and (M3.11):
N
2: (yeti - ax/ - bxi ) = 0 (M.'.IOl
i"l
N
2.: (y, - ax, - b) - 0 (M.'.ll)
i"l
Sec. M3.3 Solution for the Equation of a Line Using Matrix Vector Notation 455
Notice that we have two equations «M3.12) and (M3.13)) and two unknowns (a and b).
We can easily solve for b in terms of {[ from (MJ.13) to obtain:
1 INN
N.2: Yi - a 2: Xi
j (M3.14)
./-1 1""1-
Of course, we sec that the terms in (M3.14) arc merely the mean values of y and x.
I N
x··
N;"J
2: Xi
so that:
b co:c).i - ax (M3.1S)
(M3.17)
~I' t xj
y} .x::!
I;; I (M320)
Yv_ \'
(Nx I) (Nx 2; (2 x 1)
and V·iC can sec that the dimensioning of the rnalrices and vectors is consistent. lIsing
compact t1latrix~vector notation, \ve write (M3.20) as:
Yoe'I_O (M321)
whcrcj(O) is the objective function, 0 arc the decision variables. and (1\13.21) is the cqllal~
ity constraint equation. Since the constraint equations arc linear and arc equality con-
straints, and the objective fUllction is quadratic, there IS an analytical solution to this prob-
lem. 'rhe solution is (l::dgar and Ifilllmciblau, 19RR):
(M324)
It should be noted that the only requirement for parameter estimation using the least
squares solution (M3.24) is that the model must be linear with respect to the parameters.
"rhere is no limitation to the functionalities with respect to the independent variables. As
an example, consider;
.
_ _ _ _ _ _ _ _ _ _ _ _ _ _ ~. •••• ? • ~
•• b.;.
......
Sec. M3.4 Generalization of the Linear Regression Technique 457
y(k) = 'I'(k)le
where:
'I'(k)' = [xl(k) x 2 (k)'
OT = [a b c d]
Now; for the system of N data points we caIl write:
where:
The solution to this problem is (M3.24) and the generalization to any system that is linear
in the parameters is clear. A common formulation is the least squares fit of a polynomial.
Consider a general nth-order polynomial equation, where Pi is a parameter (coeffi-
cient) to be found as a best fit to data:
0=
Pn
PIl+l
yeN)
458 Linear Regression Module 3
where x(i) and ~v(i) represent the independent and dependent variables at the ith data point.
The solution to this problem is equation (M3,24).
'The MA'rLAB routine polyfit is lIsed to fit data to an 11th order polynomial, and the
routine polyval is Llsed to evaluate an nth order polynomial. I,et x ::: independent vari-
able vector, y ::: dependent variable vector, and n := order of polynomial. The best-fit
polynomial cocflkientB arc found from:
p = polyfit(x,Y,n)
where the clements of the p vector are ordered from the highest power 011 down. Given a
polynomial p and an independent vector xl, the resulting dependent vector yl caB be
found from:
dCA
til
where CA = concentration of A, k:;:; rate constant, and l:;:; time. Separating variables and integrat-
1l1g:
dC;1
k dt
C /l
In (.'11 = In CAO - k t
where C;\o is the initial concentration of A. Notice that this is the equation for a line. If we let
y In C A
1'(1) ~ -k
p(2) = In CAn
and we have the form:
y C~ 1'(1)1 + 1'(2)
Now we lise polyf:i t [0 find the best linear fit of the data. The hatch reactor data are shown in
Table M3.1 and Figure M3.2.
Sec. M3.5 MATLAB Routines polyt i t and polyval 459
time, min o I 2 3 4 5
(~, kgn101/m J 8.47 5.00 2.95 I.X2 LOS 11.7 1
10
6
'c"
u
I o
0
u 4
o
2 o
o
0 ---~
0 2 3 4 5
time, min
»L::: 0:1:5;
» t c-:; t';
" CA c [8.47;5.00;2.95;1.82;1.05;0.711;
» y ::: log (CA) ;
» p ::: polyfit{L,y,l)
p
--0.5017 2.1098
'The same values for the parameters call be obtained from equation (M3.24), by performing the
following:
» phi [t ones ( 6 , 1) ] ;
» p ::: inv (phi' *phi) *phi' *'y
P "
~0.5017
2.1098
The parameters from the linear regression arc converted back to the physical parameters:
k •• -pCI) ~ 0.502 min I
CAll cxp(p(2)) ~ 8.24 kgnlOl/mJ
Now, we wish to compare the experimental data with the best fit line (model). The line is gener-
ated using the polyval function. The model and expcrirnent are compared in Figure M3.3.
» ymod polyval(p,t);
:=0:
2.5
1.5
..
0
E
0.5
0 o
___ L_
-0.5
0 2 3 4 5
time, min
FIGURE M3.3 Semilog plot of concentration data and best fit line.
We also wish to compare the experimental data with the model on a time-concentration plot.
» tl ::0: 0:0.25:5; % notice that more point::, are used for mnoot~hness
»CA_illOd 8.24*exp(~O.502*tl);
» plot (tI, CA__ffiOd, t, CA, '0' )
o
c
8
time, min
Good coverage of least squares analysis, and optimization in general, is provided by the
following text:
Edgar, T.E, & D.M. Himmelblau. (1988). Optimization (~f Chemical Processes.
New York: McGraw-HilL
STUDENT EXERCISES
1. Note that a different solution for the best fit of a line is obtained if it is assumed that
h is known; this becomes a single parameter estimation problem. Derive the follow-
ing result for the estimate of a if it is assumed that b is known.
a=
2. Use the matrix algebra approach to solve for the slope of a line, if the intercept b is
known. You should obtain the same result as problem ( above.
3. The Arrheniu~ rate expression is used to find reaction rate constants as a function of
temperature:
k ~ A exp( -EIR1)
Taking the natural log (In) of each side of the Arrhenius rate expression, we find:
In k ~ In A - (EIR) (liT)
where Ris the ideal gas constant (1.987 cal/gmol K). }jnear regression analysis can
be used to find A and E.
Rate constants as a function of temperature for a first-order decomposition of
benzene diazonium chloride are shown below: I
k, min I 0.026 0.062 00108 0.213 0.43
T,K 313 319 323 328 333
Find A and E using least squares analysis (show units). Show that polyfit and
the matrix algebra approach (M3.24) yield the same results. Compare model and
experiment by (i) plotting In k versus lIT and (ii) k versus T
IThis data is from Example 3.1 in Fogler, I-LS. (1992). Elements (?l ChemicaL Reaction
Engineering, 2nd ed. Englewood Cliffs, NJ: Prentice Hall.
/--Lm<lX x
kill + x
where f.L is the specific growth rate, /Llllax and kill arc parameters, and x is the sub-
strate concentration. The growth rate relationship can be rearranged to:
I)ata for a particular reactor are shown below. Use linear regression to solve for the
pararneters (/-Llllax and kllJ
IJ., hr···· 1 0.25 0.31 0.36 0.43 0.45 0.47 0.50 0.52
x, g/Iiter 0.1 0.15 0.25 0.50 0.75 1.00 1.50 3.00
Show that polyfit and the matrix algebra approach (M3.24) yield the saIne re~
suits.
6. The growth rate expression for a biochemical reaction, using a substrate inhibition
model, is
fL ~ -- _ P'!lJ'IX X
km + x + k1
where /-L is the specific growth rate, I-1 milx and kl/l are parameters, and x· is the sub-
strate concentration. The growth rate relationship can he rearranged to
Data for a particular reactor arc shown below. Use linear regression (M3.24) to
solve for the parameters (/-LnHlX' kin' and k,).
fL, hI' I 0.24 0.27 0.34 0.35 0.35 0.34 0.33 0.22
x, g/litcr 0.1 0.15 0.25 0.50 0.75 1.00 1.50 3.00
Student Exercises 463
Note that:
x(l) l/x(l)
x(2) l/x(2)
y
x(8) l/x(8)
and the solution is H «1>'1'(1») I(J)Ty
Compare the model and experimellt by plotting IL verSUS.L
MODULE
INTRODUCTION
TO SIMUUNK 4
'rhe purpose of this module is to introduce SIMULINK, a block diagranl environment for
simulation. After studying this module, the reader should be able to;
M4.! Introduction
M4.2 'fransfcr Function~Bascd SilTiulation
M4.1 INTRODUCTION
'[here arc limitations to using the standard MATLAB environment 1'01' simulation. Engi-
neers (and particularly control engineers) tend to think in terms of block diagrams. Al-
though MA'fLAB functions slIch as parallel, s(.:;ries, and feedback allow the
simulation of block diagrams, these functions arc not visually pleasing. SIMULINK pro-
viclcs a much more natural environment (a graphical user interface, (lUI) for simulating
systems that arc described by block diagrams. SIMULINK also provides integration
464
Sec. M4.1 Introduction 465
~~~~~~~
Sources Sinks Discrete Linear Nonlinear Connections Extras
methods that call handle systems with timc~dclays (rather than making a Pad6 approxima-
tion for dcadtimc).
We will illustrate the use of SIMlJLlNK by way of example.
[n the MATLAB command window, enter "simulink" (small letters):
» simulink
The SIMlJLINK block library window appears, as shown in Figure M4.1.
Th~re arc many possible SIMULINK functions (icons) available. You will find
it very llseful to use the most commonly used blocks, which can be found by doublc-
clicking on the Frtras icon. 'fhc resulting window is shown in Figure M4.2.
B SIMULINK
Demos
Block
Library
Most commonly
used blocks
~ ~ ~ ~
Conversion Flip-Flops PIO Controllers Analyzers
~~~~~~
Controllers Filters System 10 Robust
Control
MuTools
Demos
Neural
Networks
Demos
~ ill >~
00
B
Signal
generator
Demux
[i}
Inport
>/2»
Gain
Transfer Fen
~ yout
To Workspace
I
Auto-Scale
Graph
E B
Scope
Mux
{2]
Cutpar!
~
Sum
~Sin(U[IJ+
Fcn OJ ~
Dis. Transfer Fen XY grapl
~
Derivative
)
(s-1 )
s(s+ 1)
Zero-pole
G
PID controller
@
Integrator
~
From Workspace
Dis. Zero-Pole
1 1;22- 1 ~ ~ l/z
Unit Delay
p
Full Block
Library
Filter
Slmullnk
Double-clicking on the Block Lihmlyicon then reveals a window for the most com-
monly lIsed blocks, shown in l~'igurc M4.3. AltcrJl<ltivcly, you can simply enter h!ocklib in
the MA'l'LAI3 command window.
Here we provide an exalnple simulation of a first-order process. 'fhe first step is to drag
icons frorn the most commonly lIsed block library, as shown in Figure M4.4. 'rhe clock
icon is llsed to create a time vector. The To Workspace icons allow the vectors to be writ~
len to the MATLAB workspace for later manipulation or plotting.
Notice that each of the variable names, as well as the icon names, can be changed
by the lIser, as shown in riigurc M4.5. The variahle namcs are changed by dOllble~clicking
on the icon and changing the name in the variable space.
Sec. M4.2 Transfer Function-Based Simulation 467
C91----~~1 yout I
Clock To Workspace
rnf---..~ITlI------~1
Step input ~
yout
To Workspace1
FIGlJH.E lVJ4.4 Blocks for transfer
Transfer Fen function simulation.
C91----l~~1 ~t~
Clock Time
rnf---.~ITlf---~~1
Step input~
::::::!Y=:=
Output
FIGlJRE !\i14.5 Blocks for transfer
function simulation- -variables and
Transfer Function icons renamed.
Notice that the default transfer function has a pole at zero, that is, a simple integra-
tor. This is changed by double~clicking on the icon and entering numerator and denomina-
tor coefficients. An example or a SystClll with a gain of 2 and a lillie constant of 5 is
shown in Figure M4.6.
The default step input is to step the input: from 0 to 1 at I :;:;: L This can easily be
changed by double-clicking on the 5'tep input icon and changing the specifications.
The simulation parameters (start time, stop timc, integration method, etc.) arc
changed by using the simulation pulldown menu and selecting Parameters. It is particu-
larly important to change the stop tilllc l which is 999999 by default (this is because
SIMlJLINK was initially developed for usc by electrical engineers who often usc a COIl~
tinuous oscilloscope function). Also, you will usually want to change the maximum inte-
gration step size; if the step size is too large, the simulation may still be accurate (particu-
larly Lor linear systelns), but the resutting plots may be jagged. 'rhe default integration
method is RK-45 (Runge-Kutta), which you may wish to change to Linsim 10 irnprovc the
computational speed. You may wish to try severalclifferent integration methods, depend-
ing 011 the type or system you arc attempting to simulate.
'fo begin the simulation, simply select Start from the simulation pulldown menu.
The t and }' variables are stored in the MATLAB workspace. 'fhe resulting responsc is
C91----------~1 t
Clock Time
rn---.~[ifuJf----.~1
Step input
5s+1
y
Output
FIGURE IVI4.() Transfer function
Transfer Function sinwlation--first-order process.
468 Introduction to SIMULINK Module 4
-~--- -
1.5
'5
Q.
'5
o
0.5
___-------.l.--__ _ ----l
0-
o 5 10 15 20
time
FIGlJRE M4.7 SirHulation result for firsHmJer example with a step input at
t;e::. I.
shown in Figure M4.7. Notice that the input was stepped from 0 to 1 at t = I, that is, the-
default values were used.
A major advantage of SIM1JLINK over the standard MATLAB integration routines
is the ability to handle systems with liIlle delays. This is dono using the Transport Delay
block shown in Figure M4.8. Here we use a timo-delay of 5, obtained by modifying the
default value of 1. It should also be noled that the user must supply an initial input value
for the transport delay block. In this case the initial value is 0, because we arc dealing
with a system in deviation variable form (that is, all or the initial conditions arc 0).
The resulting simulation is shown in Figure M4.9. Notlcc that no output change oc-
curs before [ = o. This is duc to the step input changing at t::::: 1, combined with the 5 unit
time delay (I + 5 = 6).
Although the block diagram feature of SIMULINK is very handy, it would be time-
consuming (and tiring) if every time you wanted to change a set of parameters you had to
double-click on the related icons. You can place variahle names, such as k, tau, theta, for a
first-order + time delay system directly in the blocks, then simply change the values (of k,
(9----..1 t
Clock Time
rnr--~·f2]--'·1~
Step input ~ I-~·I:::ry~ Output
Transfer Function Transport Delay
1.5
'3
Q.
'3
0
0.5
a
a 5 10 15 20 25
time
tau, theta) in the MATLAB cOllunand window before pcrforrning a new simulation. This
block diagram is shmvil in 17igurc M4. J O.
When using a PC or Mac it is casy to print a \vindow directly to the default printer simply
by selecting print from thcJile pulldown mellu. If you arc lIsing a Unix-based version of
MAll"AB/SIMULJNK, or you wish to create a postscript file for a window, you need to
enter a command directly in the MATLAB connnand window.
Let's say that you titled the example simulation window "tLcxamp" and you want
to print the window from a Unix-based workstation. The command that you \vmlld use is:
print: stf_ examp
C9----...~1 t
Clock Time
rnr--~~I ~
Step input '
I
Transfer Function
~I ~ I~~I
Transport Delay
y
Output
FIGURE [\'14.10 Transfer function simulation. "fhe values of k, fan, and theta
can be entered in the MATLAB command window before beginning the SilllU~
Jation.
470 Introduction to SIMULINK Module 4
SUMMARY
The purpose of this module was to provide a brief introduction to the usc or
SIMULINK
for block diagram programming. Other inputs (sources) such as sine waves or ramps can
be lIsed. Also, other "sinks" such as an "XY graph" can be Llsed; we generally recommend
that variables he written to the MATLAB workspace, allowing the user to usc standard
MATLAB plotting functions. There are many options for "systems" to simulate, includ-
ing ;'statc space" models and s-functions which describe nonlinear systems. The lIscr is
encouraged to experiment with state space models, and to read the SlMULINK User's
Guide for more advanced usage.
EXERCISES
Usc SIMULINK to perform the following. Show the SIMULINK diagram used for your
5i Illul ations.
3(--3.1 I- I)
g,(s)=·, ..
25s· + 5s -1- 1
3(~3s I- I
I: (s) =
2 25.\' -t 5s I-
Usc a step input change of 2 at I::::: I.
3. Compare the following firsHH"der + timc-dclay system
3e----~s
I:,(s) co
lOs I- I
with it's first-orderPaciC approximation
3( -- 22.5s I-
I:,(s) = (2.5s I- I)(lOs I- I)
Develop the Ilonlinear dynamic model of a perfectly mixed stirred lank heater
Find the state-space and transfer function form of a linearized stirred lank heater
Compare the dynamic responses of the nonlinear and linear models
Usc MATLAB for linear and nonlinear simulations
Analyze phase-plane behavior
M5.1 Introduction
M5.2 [)eye-loping the Dynamic Model
M5.3 Steady-State Conditions
M5.4 State-Space Model
M5.5 Laplace-Domain J\1.odcl
M5.6 Step Responses: Linear versus Nonlinear ivlodels
M5.7 Unforced Systcnl Responses: Perturbations in Initi:::ll Conditions
M5.1 INTRODUCTION
Mixing vessels arc used in Illany chemical processes. Often these mixing vessels are
healed, either by a coil or a jacket surrounding the vessel. For example, a mixing vessel
rnay serve as a chemical reactor, where two or more components arc reacted to produce
471
472 Stirred Tank Heaters Module 5
Tank F;
~
nlet Ti
Jacket F T
Jacket Fj
outlet Tj
Olle or more products. Often this reaction lllust occur at a certain temperature to achieve a
desired yield. The temperature in the vessel is maintained by varying the fJowralc of a
fluid through the jacket or coil.
Consider a stirred lank heater as shown in Figure MS.l, where the tank inlet slream
is received from another process unit. The objcCLive is 10 raise the temperature of the inlet
stream to a desired value. A heat transfer fluid is circulated through a jacket to heat the
fluid in the tank. In some processes steam is used as the heat transfer fluid and most of the
energy transported is due to the phase change of steam to water. In other processes a heat
transfer fluid is used where there is no phase change. In this module we assume thaI no
change of phase occurs in either the tank fluid or the jacket fluid.
In this section we write the dynamic modeling equations to find the tank and jacket tcm~
pcraturcs. 'fhis methodology was developed in ~~hapter 2. We make the following as-
sumptions:
The volullle and liquids are constant with constant density and heat capacity.
Perfect mixing is assumed in both the tank and jacket.
The tank inlet flowrate, jacket flowrate, tank inlet temperature. and jacket inlet
temperature lllay change (these arc the inputs).
The rate of heHt transfer from the jacket to the tank is governed hy the equation
Q:::::; UAClj - 1), where U is the overall heat transfer coefficient and A is the area for
heat transfer.
Variables Subscripts
The first step is to ~ritc a material balance around the tank, assuming constant density:
dVp . .
, = Fp - [op
dt I
The next step is to neglect the kinetic and potential energy and write the total work donc
on the systcm as a combination of the shaft work and the energy added to the system to
get the fluid into the tank and the energy that the system performs on the surroundings to
force the fluid out. This allows liS to write the energy balance as (sec Chapter 2 for the
details):
474 Stirred Tank Heaters Module 5
Note that dpV/dt:::: V dp/dt + P dVldt, and the volume is constant. Also, the mean pressure
change can be neglected since the density is constant:
dJI
dt = Fp' ff-Ff>J!
I
+ f)
~~.I"
+ W
Neglecting the work done by the mixing impeller, and assuming single phase and a COI1-
!IT
V pc" !It = Fpc"Cli - 1) + Q
or
!IT P - Q
=V (1;- 1) + (MS. f)
til VPC p
We must also perform a material and energy balance around the jacket and use the con-
necting relationship for heat transfer between the jacket and the tank
Next, we write an energy balance around the jacket. Making the same assumptions as
around the tank:
We also have the relationship for heat transfer from the jacket to the tank:
Sec. M5.4 State-Space Model 475
Q ~ UA Uj- T) (M5})
Substituting (MS.3) into (MS.I) and (M5.2) yields the two modeling equations for this
system:
dT F UA (T- T)
~ (T - T) + ' . (M5.4)
dt V t Vpc p
,17; _ (M5.5)
dt
Before linearizing the nonlinear model to find the state-space form, we must find the state
variable values at steady-slale. The steady-state is obtained by solving the dynamic equa-
tions -for dxldl ;::: n. The stcady~stalc values of the system variables and some parameters
for this process arc given below.
1~s = 50"1" T I
, 125"1" V 10ft3
7~'is ~
20t)" I" TJS 150T V, I It'
Notice that the values or UA and Fis have not been specified. These values can be ob-
tained by solving the two dynamic equations «M5.4) and (MS.S» at steady-state.
From dTldl:= 0 at steady-state, solve (M5.4) to ol.1tain UA:= 183.9 I3tutF min
I<rom dT/til:= 0 at steady-state, solve (MS.5) 1.0 obtain 1",',,;:= 1.5 rtJ/min
J
I-Icre we linearize the nonlinear modeling equations to find the state-space form:
xooAx+Hu
y ~ ex
where the state, input, and output vectors arc in deviation from:
476 Stirred Tank Heaters Module 5
XC-"
I II."~- I1'..
J j.\
1 = state variables
y,-II-I'I . Ij-IjI
= output variables
dl
(MS.4)
dt
dl; FJ (T _ T) _ VA (T- I)
dt 'l,(T:Ij,F;,F:I;:Ii,,,) Vj Jil
J .
V '
(MS.5)
jf~'Cpj
= al; F, VA
~0.4
a(1 - I,) aT V Vpc p
af; = at; VA
= 0.3
a(1; - '0,) ali vpc p
A =~f2 ab VA
= 3,0
21 aX j acr - T,) aT V;P/;pi
af, ilf,
lJ 14 - 0 =0
(Ju 4 acri, - 7jiJ alji
Sec. M5.5 Laplace Domain Model 477
lJcilh~ ilt, - 0 ~
0
" ' eli,
'j., '('/'i - '/'.)
U H ill;
ill; ill; FI.Y
Ii", " 1.5
il", ilUi, - Ij,J J7ji Vi
Since both states arc measured, the (' lnatrix is I. The numerical values for the matrices arc:
\ .... OA 03
A~
3 -4..') 1
B-
- 1 50
0 -7.5
0
0.1
0
o
1.5
I
C
I(~ ~I
M5,5 LAPLACE DOMAIN MODEL
Recall that a transfer function matrix relates the inputs and outputs:
y(s) •..• G(s) II(S)
The input/output transfer function Inatrix is found from:
[
15 (7.5s- 33.75) (O.ls + OA5) OA5 I
G(s) ~ (50s + 20) - 22.5 0.3 (1.5s + 0.6)
s' + 4.9s + 0.9
The poles of the characteristic polynomial (8 2 + 4.9s + 0.9) arc -0.191 and -4.709. The
transfer function relating output I (tank temperature) to input I (jacket f1owratc) is:
15
~ (,) ~ (MS.7)
,II' s2+4.9s+0.9
Dividing (MS.7) hy 0.9, we find:
16.6667
(MS.X)
1.111 + SA444s +
478 Stirred Tank Heaters Module 5
16.6667
~ (\) ~ (M5.9)
• II . (0.21236.1' + 1)(5.23207.1' + 1)
which is the gain-time constant form. Any of these forms can be used, however \vc will
generally LIse the gain-lime constant form.
The transfer function relating output 2 (jacket temperature) to input I (jackel
l1owralc) is:
50s +- 20
(M5.10)
+ 4.9.1' + 0.9
22.2 (2,.5.1' + I
1:" (.1') cO (M5.11)
1.1 Ills' + 5.4444.1' " 1
Also, (M5.] I) can be l~lCtored into:
22.2 (2.5.1 + 1
1:,,(.1') (M5.12)
(0.212361' 1- 1)(5.2307.1' + I)
In this section we will compare the step responses of the nonlinear model with those pre-
dicted by the linearized model. For cOlnparison purposes, we will plot the physical vari-
ables,
r'or the linear model. \vhich is in deviation variable form, we convert to physicnl
values hy realizing that:
x,(t) ~ T(I) - T,
X,(I) c- fj(t) - Ii,
So, for the linear model:
'1'(1) ~ T, + .\,(1)
",(I) F(t)
J
- .FI"
We will consider step changes of different magnitudes and differellt directions for this
system.
Sec. M5.6 Step Responses: Linear Versus Nonlinear Models 479
Consider a step change of 0.1 (from the steady-stale value of 1.5 to 1.6 t'('I!min) in the
jacket flowratc. 'fhe responses of the nonlinear and linear models arc shown in Figure
M5.2. For hoth the tank temperature and the jacket temperature, the linear model closely
approximates the nonlinear process.
Consider a step change of I J) (from 1.5 to 2.5 n3/min) in jacket f1owratc. '['he responses
of the linear and nonlinear Illodels arc shown in Figure MS.3. The linear response is quali~
127
linear
LL 126.5 nonlinear
af
D
cL 126
E
2
x
c
~ 125.5
5 10 15 20 25 30
time, min
a. Tank Temperature
152.5
linear
152 nonlinear
151.5
151
150.5
150
o 5 10 15 20 25 30
time, min
b. Jacket Temperature
145
linear
lL
140
g> nonlinear
D
ci 135
E
J!l
'"c
J'l
125
o 5 10 15 20 25 30
time, min
a. Tank Temperature
175
linear
170
165
nonlinear
160
155
150
o 5 10 15 20 25 30
time, min
b. Jacket Temperature
tativcly the same as the nonlinear response, hut the magnitude of change is different. 'fhe
gain (change in olltpul/change in input) of the lincar model is greater than the gain of the
nonlinear model.
Consider a step decrease of -- t J) (from 1.5 to 0.5 ft 3/min) in jacket flowrate. The re-
sponses of the Iincar and Ilonlincarmodcls arc shown in Figure M5.4. Notice that gain of
the linear model is now less than the gain of the nonlinear modeL This is the opposite ef-
fect from what we observed for a large increase in the jacket f1owralc.
Sec. MS.6 Step Responses: Linear Versus Nonlinear Models 481
125
120
LL
0>
'"
u 115
<i
E 110 linear
j!)
x
c 105
J'l
100
nonlinear
95
0 5 10 15 20 25 30
time, min
a. Tank Temperature
150
140
130 linear
120
nonlinear
110
o 5 10 15 20 25 30
time, min
b. Jacket Temperature
Consider a step change of ~O.l (from 1.5 to 1.4 ft3 /min) in jacket floWratc. The responses
of the linear and nonlinear models arc shown in FigUfCM5.5. Since the the change in
input was small, the linear model provides a good approximation to the nonlinear model.
For the nonlinear model, the gain (change in oulputlchangc in input) varied as a function
of both the input magnitude and direction. If small input changes were made, the gain did
482 Stirred Tank Heaters Module 5
125
LL
0) 124.5
-15
0:
E
2
x
c
J'l
123.5 linear
nonlinear
123
o 5 10 15 20 25 30
time, min
a. Tank Temperature
150
LL
149.5
'"
'"
u
0: 149
E
2
"
x
0
."'-
148.5
148 linear
nonlinear
147.5
0 5 10 15 20 25 30
time, min
b. Jacket Temperature
not change much from the linear model case. For large input changes, the gain of the non-
linear system was less than the linear system for incrc;:lscs in jacket flowratc, but more
than the linear system for decreases in jacket rlowralc.
The response of the jackel temperature is faster than tbat of the tank temperature.
This makes sense fro III a physical point of view, because the jacket volume is one-lenth of
the heater vollllnc. Also, the jacket flowratc has a direct effect of jacket temperature and
an indirect effcct on tank tcmperature. Noticc that the numerator timc constant partially
"canccls" the slow denominator time constant for the transfer function relating jacket
flowrate to jacket temperature.
Sec. M5.7 Unforced System Responses: Pert Urbations in Initial Conditions 483
The eigenvalues of the A matrix in the state-space model provide information about sta-
bility and the relative speed of response. The eigenvectors provide information about the
directional dependence of the speed of response, The MATLAB eig routine is used for
eigenvalue/eigenvector calcuations, Rend I that a positive eigenvalue is unstable, while a
negative eigenvalue is stable. A large magnitude eigenvalue is "faster" than a small mag-
nitude eigenvalue.
The eigenvalues for this system arc (sec appendix):
AI - 0.191 1 slow
1,2 ~ -4.7089 fast
12 -10.82071 slow
I - 0.5714
The second eigenvalue and eigenvector tell us that a perturbation in the initial condition
of the second state variable will have a fast response. The first eigenvalue and cigcllvector
tell us that a perturbation in thc direction of VI will have a slow response.
Consider an initial perturbation in the slow direction. Let the perturbation be of Inagni-
tude 5:
.'. 4 035
0 = 5"'v)
x () ~ y."1.0.82071 .~. 1 .1 1
- 0.5714 2.R57
The physical state variables (tank and jacket temperature) arc:
Consider an initial perturbation in the fast direction. Let the pertubation be:
x (0). = .'.
5·"12 •.• 5·'"·I·-o.O()95j = 1.-0.34751
2 0.9976 4.9RR
484 Stirred Tank Heaters Module 5
130
LL 129
en
'"
u 128
<i
E
2
127
'"J'!c
126
125
0 5 10 15 20 25 30
time, min
3. Tank Temperature
153
152.5
151
150.5
150
o 5 10 20 25 30
time, min
b. Jacket Temperature
125
~ 124.9
w
D
ci
E 124.8
2
~
:"'l
124.7
124.6
0 0.5 1.5 2 2.5 3
time, min
a. Tank Temperature
155
LL
154
D '"w
ci 153
E
2
ill 152
'"
"
.<;!.
151
150
0 0.5 1.5 2 2.5 3
time, min
b. Jacket Temperature
The phase-plane behavior is shown in Figure M5.S, where the Tank Temperature is plot-
ted on the x~axis and the Jacket Temperature is plotted on the .v-axis. Notice that initial
conditions in the !i.1iii"ij
direction respond much more slowly than initial conditions in the
--0.3475] direction
1. 4.lJ88 -.
486 Stirred Tank Heaters Module 5
SUMMARY
In tbis 11lOdu1c we have developed the dynamic modeling equations for a perfectly mixed
stirred tank healer. We solved for the steady-state conditions, linearized to obtain the
state-space model, and found the transfer function model. We compared the step re-
sponses of the lincar and nonlinear models. We also showed the importance of the '"direc-
tion" of initial conditions. PC11urbations in certain directions cause a fast response, while
perturbations in other directions yield a slow response.
FURTHER READING
The following text is a good reference for chemical process modeling, with a particularly
nice presentation of energy balances:
STUDENT EXERCISES
"I. In the heater example we performed stcp tests on the jacket ftowmte. Perform step
tests on the other inputs: (i) Tank flownlte, (ii) tank inlettelnperature, (iii) jackel
inlet temperature. l"ind the transfer functions relating the inputs and OlltputS. Dis-
cuss the linear versus nonlinear efTects.
2. Show that a decrease in jacket volmne will cause the difference in magnitude be-
tween the fast and slow poles to increase.
Appendix 487
3. [;iud the nonlinear stcady~stalc relationships between jacket flowrate and the two
temperatures (tank and jacket). Plot the input (jacket flowratc) versus the outputs
for the physical parameters given. Discuss how the gain changes with coolant
fJowratc.
4. Develop 11 simple model with imperfect mixing on the jacket side. Assume that the
jacket can be modeled as two compartments, where the flow is from one cOlllpart~
Illen! to another, as shown in the diagram below.
Tank ~.
inlet T;
~ Jacket inlet
;-- f--
V T
Tank 1j1
Tj2
Tank outlet
Jacket Fj ~ F T
outlet 7]2
APPENDIX
a
~O.4000 0.3000
3.0000 -4.5000
b
0 ~7.5000 0.1000 0
50.0000 0 0 1.5000
c
1 0
0 1
c1
0 0 0 0
0 (] 0 0
numl =
o 0.0000 15.0000
o 50.0000 20.0000
den
1.0000 4.9000 0.9000
»[num2,c1en] ss2tf(a,b,c,d,2)
Dum2 =
o -7.5000 -33.7500
o -0.0000 -22.5000
num3 -
0 0.1000 0.4500
0 0.0000 0.3000
dE-;Il
1.0000 4.9000 0.9000
»(num4,den] ss2tf(a,b,c,d,4)
num4 ~
0 0.0000 0.4500
0 1.5000 0.6000
den
1.0000 4.9000 0.9000
v ~
0.8207 0.0695
0.5714 0.9976
laml)(ia
-0.1911 o
o -4.7089
Appendix 489
xO : : :
124.6525
154.9880
»( t, xl :::;: ode45 ( 'heater I ,0,5, xO) ;
»plot (t, x ( : , 1) )
MODULE
ABSORPTION
An Example of a Linear 6
Equilibrium Stage System
M6.1 Background
M6.2 T'he Dynamic Model
M6.3 Steady-State Analysis
M6.4 Step Responses
M6.5 Unforced Behavior
M6.1 BACKGROUND
490
Sec. M6.2 The Dynamic Model 491
Liquid
Feed
L
Xf
-. 1
I
v
Gas
Product
Liquid t Gas
Product L v Feed
FIGliRE M6.J Gas absorption
x" YIJ+l
column, II stages.
Consider the gas ahsorption column shown in I"igurc M6.1. COinponcnts that enter the
boltom of the column in the gas feed stream arc absorbed by the liquid stream, so that the
gas product stream (leaving the top of the column) is more "pure." An example is the usc
of a heavy oil stream (liquid) to remove benzene from abellzene/air gas feed stream. Ab-
sorption columns often contain "trays" with a liquid layer flowing across the tray; these
trays arc often lnodc'lcd as equilibriulll stages.
An objective of this module is to develop a dynamic (time dependent) model of a
gas ahsorption colunm. We will :"ihnw how to solve [or the steady-state stage composi-
tions llsing matrix algebra. We will then place the dynamic model in the lincar state-space
form. Dynamic results for stage compositions will he shown for step changes in the inlet
feed compositions.
We assume that the major comIJonent of the liquid stream is "inert" and docs not ahsorb
into the gas stream. We also assurne that the Inajor component or the gas stream is "inert"
and does not absorb into the liquid stream. It is assumed that each stage of the process is
an equilibrium stage, that is, the vapor leaving a stage is in thermodynamic equilihriulll
with the liquid on that stage.
moles li9l!_~~~
M = liquid molar holdup per stage
stage
moles\,(~v()_r
w- stage
vapor molar holdup per stage
moles solute i)
mole inerlliquid (stage i)
moles solute i)
y,
mole inert vapor (stage i)
The concept of an equilibrium stage is important for the development of a dynamic model
oCthe absorption column. An equilibrium stage is represented schematically in Figure M6.2,
The lotal amount of solute on stage i is the sum of the solute in the liquid phase and
the gas phase (that is, MX i + WyJ The rate of change of the amount of solute is then
d(Mx i + Wy)/dt. The component material balance around stage i can now he written (ac-
cumulation = in - out):
il(M" + W y) _ ,
- LX i _ l + VYil1 - LXi~ VYi (M6.1)
ilt
Since liquid is much more dense than vapor, we can assume that the major contribution to
the accumulation term is the MX i tcrm. Equation (M6.1) can now be written:
il(Mx,)
= L X i_ i + V Yi+ I ~ f, Xi ~ VYi (M62)
ilt
LXi__ j VYi
Our next assumption is that the liquid InolaI' holdup (M) is constant, then we can write
(Mo.2) as:
L V L V
lW XiJ + M Yill -Mx;-M Yi (Mo.3)
The solution to this problem will be easier if we can develop an explicit relationship be-
tween vapor phase composition and liquid phase composition. We will assume that the
vapor on each stage is in equilibrium with the liquid on that stage.
Substituting the vapor/liquid relationship from (MG.4) into the material balance (MG.])
yields:
dX i _
(Mo.5)
ill
which can be written in the following form:
dX i L + Va) Va
Jt,-c-=M- ri + 1 - M xi -!- M Xi + 1 (Mo.o)
It should be noted that (M6.6) will yield a matrix with a tridiagonal structure.
----------------
dX I + I
Va L
(stage I)
Xl ;Yf X 2 - /1,1/ x/
til M
L + Va
Xj - x2 M );3
(Slage 2)
tit M M
tL"r J L (L I Va) Va
M X1 - .rl X4 (stagcJ)
r!t M M
dX,j L (L I Va) Va
tit
M X :; - X4 + M
);5 (stage 4)
M
dX 5 L (L I Va) V
t - X5 M Y() (slage 5)
tit AI' 4 ,"vI
'I'he state variables arc _\ (i;=o I to 5), and the input variables are xrC1iquid feed composition) and
V6 (vapor feed composition). If is assl/llwd thaI the liquid and voporjlolFmtes are COIlSIOl/f.
These equations can be written in matrix form as (notice the tridiagonal structure):
(LI- Va) Va
M M
0 () 0
L (L I Va) Va
M M lvl
() 0
I:"I ~
X2
L (L I Va) Va
0 M M M 0 x,
,Xs 0 0
L
M
(L I Va)
M
L (L
Va
M
I Va)
>1X4
_ X,;_
0 0 ()
M M
L
M 0
0 0
+ 0
()
()
()
I_Y6_I
XI
V
()
M
which is the so~called statc-space form
x Ax+Hu (M6.IO)
Sec. M6.3 Steady-State Analysis 495
We have shown that the form of the dynamic equations for the absorption column arc:
x=Ax+Bu (M6.IO)
0.325 0.125 o o o
0.2 - 0.325 0.125 o o
A o 0.2 0.325 0.125 o (M6.13)
o o 0.2 0.325 0.125
o o o 0.2 -0.325
~;
0,2
o
II o o (M6.14)
[ o o
o 025
The steady-state Input is:
00
US =Y6S
1
X"I·--= . ]
1JU.
(M6.ls)
which is simply a vector or the liquid phase compositiolls. The liquid product composition (leav-
ing stage 5) is x'):;;:; 0.1202.
The vapor product composition (leaving stage I) is obtained from the lincar equilibrium
___rC~'h~\'~i(~)(~lS~h~ip~.~\·I~~_()~.5~.~rl~~_()~.5_«(~L~O(~I7~(~')~~_()~.()~O~3~X~I~b~m~O~1
~b~CJ~ll~,CI~lC~/~lb~)(~)(~)t~'~\il~
.. ~ ~
I
Here we will usc the MATLAB fUllction s Lcp to find the responses to a step change in
feed compostioll. 'T'hc step function requires a linear state space model in deviation vari-
able fonn.
Ax~AAx + H Au
At time t ::: 5 minutes, the composition of the vapor stream entering the column changes
('rmn Y6 ::: n.] kgn101 bCl1zcl1c/kgmol air to )'6 ::: 0.15 kgmol bCIlZcllc/kgrnol air. Usc the
MATLAB step function to find how the compositions of the liquid and vapor streams
(x() and )'1) leaving the COIUllll1 change with time. How do the transient responses for all of
the stage liquid compositions (XI through x:,,) diller?
step is used to solve the following equations
A x = A Ax + H Au
and
Ay ~ C Ax + D Au
where Lly is the output vector (deviation form). }·'Ol' this problem, we consider x'j (COl1lPO~
sition of liquid leaving the bottom of the eolulTm) and)'1 (composition of the vapor stream
leaving the top of the column) as the outputs.
C~I 0 0 o o
O.S 0 o o
D~IOo 01
0
[y,x, tl step(A,B,C,D,u.2)
where the 2 in the final column indicates that the second input is being step changed.
A comparison of 1<iguresM6.3 and M6A shows that the boHom composition
responds more quickly to the vapor feed change than the top vapor composition (VI)'
Sec. M6.4 Step Responses 497
0.06
0.05
0.04
"',I
0.03
0.02
0.01
o
o 20 40 60 80 100
t(min)
makes physical sense, because the disturbance must propagate through six stages (from
the bottom to the lOp of the colmlln) to affect the top composition.
figure M6.5 shows that the magnitude of the change in stage composition is great-
est on the bottom stage. Deviation variables (xi(l) ~ xi(O)) have been llsed for case of com-
parison. 'fhe relative "speed of response" is faster the closer a stage is to the bottom of
1.5
0-
ro
>
,.:
0.5
___J,
-j--
0
0 20 40 60 80 100
t(min)
0.07
0.06 5
0.05
0.04
'"ill'"
,,' 0.03
0.02 3
--------- _---
..
0.01
0
~::-;;;;-~
0 20 40 60 80 100
'(min)
the column, as shown in l<'igurc M6.6. Scaled deviation variables (xJt) ~ x/O))I
xi(t;:;;;: 1(0) ~ x,{O) have been llsed for case of comparison.
At time t ;:;;;: 0, the composition of the liquid stream entering the column changes from
.\/~0.0 kgmol hCllzcne/kgmol inert oil to "j;:;;;: OJ)25 kgmol henzcnc/kgmoJ inert oil. Find
how the compositions of the liquid and vapor streams (.\:5 and .1'1) leaving the column
5
0.8
D 0.6
'"
<ii
u
~
,,' 0.4
0.2
40 60 80 100
'(min)
!
----------------------~-~ .... . --.........
Sec. M6.4 Step Responses 499
0.01 ----,~-----
.--_.__ --_.
.....•
~-~
0.008
0.006
'"~I
0.004
0.002
o
o 40 60 80 100
t(min)
change with time. How do the transient responses for all of the stage liquid compositions
(xl through .r() differ?
A comparison of Figures M6.7 and M6.8 shows that the bottom composition (x:J
responds more slowly to the liquid feed change than the top vapor composition (VI)' This
makes physical sense, because the disturbance Illust propagate through six stages (from
the lop to the bottom of the column) to affect the bottom composition.
0.014
0.012
0.01
0.008
~
0.006
0.004
0.002
0.025
0.02
0.015
w
g'
175
>(I 0.01
0005
-----'------
20 40 60 80 100
t(min)
Fi'igure M6.9 shows that the magnitude of the change in stage composition is great-
est 011 the top stage. Deviation variables (A)t) ~ xi(O» have been used for case of compari-
son. The relative "speed of response" is faster the closer a stage is to the top of the
column, as shown in Figure M6.1O. Scaled deviation variahles (x,(I) - x,(O))/(x,(I = 150)
- x/O» have been used for case of comparison.
0.8
'0
0.6
w
<ii
u
w
~I 0.4
0.2
100
t(min)
The reader should lise the MATLAB function ss2tf to find the transfer functions relat-
ing each input to each stale (student exercise I). Show that the order of the numerator
polynomial gets smaller the farther that the state is from the input variable. Also, find the
zeros and poles for each transfer function and explain why the speed of response is faster
the closer a state is to the input, in terms of the trans!Cr functions.
cl
--0.59886127875258
-0.05113872124742
-0.32500000000000
-0.16688611699158
-0.48311388300842
The first eigenvalue is the fastest, while the second is the slowest. The first and second
eigenvectors arc associated with the fast and slow directions, respectively.
Columns 1 throuqh 4
Column ')
-0.27472527472528
0.34750303957894
0.00000000000000
-0.55600486332631
0.70329670329670
The reader should show (see student exercise 2) that the following perturbation in
initial condition:
502 Absorption Module 6
0.1693
03710
XII - 05418 ··0.025
O.s935
- OA335
yields it response tll,1! is u\'cr ten times faster than the follmving penurhation in inilial
condition:
o I m,
IU710
XII ~ 0.5418 '·0.025
0.5935
OA335
SUMMARY
In this module we developed a linear model for an absorption column and Llsed lhe
i\ilATLAB step fUllction to study the erfect or input composition changes. T'hc magnillilk
of composition change was greatest on the stages closest to the step input change, and the
"speed" of composition change, \v{\s faster on the stages closest to the step disturbance.
For example, for a step change in the vapor feed composition {\vhich enlers the bottom ()f
the column) the crfect was greatest (magnitude largest and speed fastest) Oil the composi-
tions of the stages close to the bottom of the colunlll,
FURTHER READING
LuJ'belL \V.L, & L.A. V'/eIlzcl. (I 9X8). Chemical Process Analysis: J\.4oss and Ei1~
ergy Ba/aJ/ces. Englewood Cliffs, NJ: Prentice {Iall.
EXERCISES
I. Usc the t'vlATLAB function ss2 t: f to find the transfer functions rehlting each input
to each state. Show that the order of the numerator polynornial gels smaller the far-
the I' that the state is from the input variable. Find thc zcros and P(lIeS for cach trans-
fer functioll. Explain why the speed of response is faster the closer a state is to the
input- in terms of the transfer functions and the pole-zero values.
Appendix 503
2. Use the MATLAB initial function to show the effect of the "direction" of a
perturbation in initial condition. Use plots to compare the "fast" and "slow" <.lircc-
tions.
96absorp C'x. m
absorption example - Process Dynamics
5[,
% orginal version - 29 June 93
% (c) B. Wayne Bequette
% revised - 7 June 1997
n~3 5;
liq 80/60;
vap 100/60;
mho1d - 2013;
xfeed 0;
yfeed 0.1;
aeq :; : 0.5;
.,
"
amat zeros(nS,ns)i
bmat zeros(ns,2);
%
% calculate ratios
%
Ivratio -(liq+vap*aeq)/mhold;
lratio - liq/mhold;
vratio - vap*aeq/mholdi
amat(l,l) lvratioi
amat(1,2) vratio;
for i 2:ns-1;
amat(i,i~l)
- Iratio;
amat (i, i) lvratio;
amat(i,i+l) vratio;
end
arnat(ns,ns-l) - lratioi
amat: (ns, ns) Ivratioi
504 Absorption Module 6
ploL(L,y(o,l), 'w')
xlabel (' t (min) , )
ylabel ('x_liq')
%
pause
pause
yL:dx'l ( r X sL_a~Jc')
pause
nt - lC'nqth(t);
Appendix 505
plot(tl,ylj:,2))
%
pause
% plot each stage liquid composition (deviation)
plot (tl,xl, 'w')
xlabel ( ' t (min) , )
ylabel ( 'x_st<Jge' )
pause
M7.1 Introduction
M7.2 First-Order Irreversible Reaction
M7.3 Van de Vusse Reaction
M7.1 INTRODUCTION
Chemical reactors arc generally the most important unit operations in a chemical
Chemical reactors come in many forms, but two of the most common idealizations arc
continuous stirred tank reactor (CSTR) and the plug flow reactor (PFR). These two
serve as limiting hounds for the behavior of many operaling reactors. The CSTR is
506
Sec. M7.2 First~Order Irreversible Reaction 507
used in dynamic modeling studies, because it call be modeled as a lumped parameter sys-
tem. A dynamic model of a plug flow reactor consists of partial differential equations
(also known as a distributed parameter system).
Consider the continuous stirred lank reactor shown in Figure M7.1. In this module
we will assume that the reactor is operating at a constant temperature (it is isothermal), so
we do not need an energy balance (and can also assume that the reaction rate parameters
are constant). In addition, we will assume that the volume is constant. The standard single
irreversible reaction system is presented in Section M7.2. The Van de Vusse reactor, a re~
action scheme with a number of interesting characteristics is presented in Section 1\17.3.
Recall that a model of a CSTR for a first-order irreversihle reaction was developed in
Chapter 2. Here we provide a quick review of the model ing equations, before presenting a
detailed analysis.
Consider a single irreversible reaction A ~ B. Assume that the rate of reaction per
unit volume is first-order with respect to the concentration of A:
molar rate of reaction of A per unit volume:::::: r A ::::: kCA
Each mole of A reacted creates a mole of B, sO we have the following relationship for the
rate of formation of B:
molar rate of formation of B per unit volume::::: I"n::::: kC;\
Our first step is to write the dynamic modeling equations for the reacting component, A:
rate of (rate) (rate) (rate)
accumulation = in by flow - out by flow - out by reaction
dVC A
dt = F CA/- F C,l - V k C A
508 Isothermal Continuous Stirred Tank Chemical Reactors Module 7
F .
VeA(
which we can write as:
dC A
(M7.1)
dt
It is natural to assume that there is no B in the fccdstrcam, which yields the following
modeling equation:
dVCJ3
tit
where again, k is the reaction rate constant. Since V is constant:
dC'/) F
til V Cli + Ie C,\ (M7.2)
The two dynamic modeling equations arc (M7.l) and (M7.2). Notice that the concentra-
tion of B docs not playa role in equation (M7.1), so equation (M?I) can be solved inde-
pendently of (M7.2).
Before analyzing the dynamics of this system, it is important to understand the
steady-state behavior.
Assume that FIV is the input variable of interest. In the reaction engineering literature F/V
is known as the "space velocity." Similarly, VIF is known as the "residence time" or
"space time," that is, the amount of time that it takes for the reactor volume to be "swept
out" by the flow. Equation (!'vI7.1) in steady-state form can be arranged to solve for the
steady-state concentration (here we lise the subscript s to indicate steady-state value):
Fs('
V ~Afl'
(M7.J)
F
S _I k
V
Notice in (M7.3) that CAs is a monotonic function of F/V. As F/V gets large (-----t 00), then
CAs approaches C Als ' That is, the fluid is flowing so fast through the reactor thaI there is
no time for allY cOllversion of A to B. As FJV gels very small (-----t 0), then C A .I. approaches
0, indicating complete conversion to B. This makes sense hecauscf:./V:= 0 corresponds to
a batch reactor, and at steady~state we would expect complete conversion since we have
an irreversible reaction.
Sec. M7.2 First-Order Irreversible Reaction 509
The sleady~s[atc gain between the input P/V and the output (e A ) is simply the de-
rivative of the output with respect to the input. l1'fom (M7.3) we find:
(M7.4)
We call also find the steady-state gain between the input «('.v) and the output «('A) from
(M7.3) by:
kV
dC/Is (M75)
DC(I/I' kV
+k
F,
Notice that we can rnakc a general plot of the solution of (M?3) by dividing by C"VI' to
find
F
kV
(M7.6)
F
·1 +
kV
CA.JC~v:\, can be considered the dimensionless concentration of A. The relationship in
(M7.6) is shown plotted in Figure M7.2.
We can also plot the relationship in equation (M7.6) as shown in r;jgurc M7.3. No-
tice that, if we consider F to be the manipulated variable and C A to be the output variable.
then we sec that the steady-slate gain (change in output I change in input) decreases as the
r10wralc increases. That is, the gain is high and low nowrates and low at high rlowrates.
0.8
0.6
J
J 0.4
0.2
0
0 2 4 6 8 10
kVIF
0.8
~
0.6
cJ
J 0.4
0.2
0
0 2 4 6 8 10
FlVk
This result is consistent with (M7.4).Wc will find the same results when using the
Laplace transfer function analysis.
Notice from Figure M7.3 that to react most of A we need a large volume/feed ratio
(residence time), which would require large vessels for a given nowratc. I'his indicates
that economics must he used to guide the reactor design, and a trade-off must be made be-
tween the capital cost of the reactor versus the operating cost (which includes the differ-
ence in values of the reactants and products). The residence time is also related to the
process time constant, which ultimately effects the quality of control that is possible.
Solving (M7.2) for Ihe sicady-siare value of Ii we find:
k CA~' (M7.7)
17\.
V
subsriruring (M7.5) into (M7.7):
I"
k V elf, k CeVi'
(M7S)
I"
(J) V t k V
+k
C.lt>'
I" CArs
y +
kV
Notice in (M7.8) that the dimensionless concentration of B is also a monotonic function
of the space velocity. As F./V gels large (-----) 00) then C'ns approaches O. That is, the fluid is
Sec. M7.2 First-Order Irreversible Reaction 511
0.8
."
<J
0.6
J 0.4
0.2
0
0 2 4 6 8 10
F/kV
rtowing so fast through the reaclor that there is no time for any conversion of A to B. As
F/V gets very small (~) 0) then CBs approaches C~W' indicating complete conversion of
A to B (sec Figure M7.4). Notice that this figure is lIie mirror image ofFigurcM7.3.
The state space model (by linearizing (M7.1) and (M7.2») is then:
dX J
(M7.IOa)
ell
d''(2
(M7.IOb)
ell
or,
dx]
(M7. lOa)
ell
dX 1
= an Xl -+- an X2 -+- b 2 ! llJ (M7.IOb)
ell
512 Isothermal Continuous Stirred Tank Chemical Reactors Module 7
!J"II"II
o '"
we can see that the eigenvalues of A arc simply (J I J and ([22 (the reader should show this).
Since the eigenvalues arc negative, the system is stahle.
Since dx1/dt is not a function of _:1: 2 , we find (from the Laplace transfonn of
(M7.IOa)):
(M7.lla)
k"
/.'Jl. '= [CA!'oO~('AO'J
F =
k
(M7.12)
a .\ + k F
( V'+ k
o
. ) '
" V
Notice that k ll is consistent with (M7.4).
T
I
a" [ JI J Ie (~)( 2"'11,:) (M713)
Notice that k l2 is consistent with (M7.5). From (M7.1l) we sec that the process gain for
output I decreases as the llowratc increases. We sec that T[ is always less than the reactor
residence time from (M? J 2). Also notice that decreases as the reactor flowrate incrcases.
From (M7.14) wc sec that k J2 is always less than L
Taking the Laplace transform of (M7.lOa) and (M7.IOb), we find:
ky)
.1.) uIC') + (TIS + I )(~,s + I) 1l,(S)
where:
(M7.15)
(M7.16)
(M7.17)
h I2 {{:n
kl) (M7.18)
(lll(ll1
Notice that Tn 0:::: 72' so there is pole-zero cancellation in gZI(s) and the transfer function be-
comes first-order. Also, since the eigenvalues are always negative (the time constants arc
always positive), the system is always stable.
gmol
CAj, = 1.0 liter
[
clXll
cI/ - 0.4
I
clx,= 0.2
oO.2h
XI II I I
O.S O.21I UI
+ - O.S o 11., .1
cit
The following figures compare responses of the nonlinear and linear systems
514 Isothermal Continuous Stirred Tank Chemical Reactors Module 7
0.515
0.51 A
0.505
0
c 0.5
0
0
0.495
0.49 B
0.485
0 5 10 15 20
time, min
.FIGURE M7.5 Small (0.01) step change in FlV. Solid = nonlinear, dotted
-= linear.
0.8
0.7 A
0.6
0
c 0.5
0
0
0.4
,,
0.3 B
0.2
0 5 10 15 20
time, min
FIGURE M7.6 Large (0.2) slep change in FIV. Solid =: nonlinear, dotted
= linear.
Sec. M7.2 First~Order Irreversible Reaction 515
B
0.8
--- ----_.~----
0.6
0
c
0
u
0.4
0.2
A
0
0 5 10 15 20
time, min
To determine the important directions for this system, we find the eigenvalues and eigen-
vectors of the A matrix: The slow eigenvalue is -0.2, which has the associated cigcnvcc~
tor ~l := I~J· The fast eigenvalue is ~O.4 with an eigenvector ~2 = I_;::~;:::;:!. These results in-
dicate that an initial perturbation in the second state variable (concentration of B) will
respond slowly, while an equal magnitude pertubation in both state variables will respond
twice as fast.
We can make some interesting observations about the behavior of this simple system. We
notice that both reactor concentrations have first-order transfer functions with respect to
the dilution rate, FIV. 'l'he concentration of A is also first-order with respect to (~\fi but a
second-order transfer function relates eN to the concentration of B. The response ·of B to
a change in the feed composition of A· is slower than the response of A for the same
change.
516 Isothermal Continuous Stirred Tank Chemical Reactors Module 7
Often reaction schemes will exhibit a maximum in the concentration of product versus
nowratc curve. Here we will consider such a reaction. It turns out this this type of system
cail have significantly different input/output characteristics, depending on the operating
condition chosen. Consider the reaction scheme consisting of the following irreversible
reactions:
A --7 B --7 C
k2
21\ --7
" D
"
This scheme was presented by Van de Vussc (1964). Engell and Klatt (1993) note that the
production of cyciopcntinol from cycJopcntadiene is based on such a reaction scheme,
where:
A ~ cyclopcnladdicnc
B : : : cyclopcntcnol
C:::::: cyclopcntancdio}
f) :::::: dicyetopcl1tadicnc
In the following development, we assume that the feedstream contalI1s only componeIlt A.
COMPONENT A BALANCE
The balance on Ais:
accumulation = in - out by flow - out by reaction 'I -- out by reaction 2
d(VCA )
dt
Since V is constant:
d(CA )
(M7.19)
dt
Sec. M7.3 Van de Vusse Reaction 517
COMPONENT B BALANCE
Similarly, we can write:
d( ell)
(M7.20)
dl
COMPONENT C BALANCE
Also, for component C:
d(C e )
(M7.2! )
dl
COMPONENT 0 BALANCE
And component D:
d(Cu)
(M7.22)
dl
Look at equations (M7.!'!) through (M7.22). Notice that (M7.!'!) ami (M7.20) do not dc·
pend on Cc or Cf). If we arc only concerned ahout CA and Cu' we only need to solve equa-
tions (M7.!9) and (M7.20).
d(CA)
(M7.!'!)
dl
d( ('ilL
(M7.20)
dl
Solving for the steady-slate for (M7.19), we find a quadratic equation in C~h:
\ I( k, + r)'
~ " + 4k, (r)
~
+
2k,
and solving for Cns:
v + k2
These results lead to the input/output curves presented in Figure M7.8.
518 Isothermal Continuous Stirred Tank Chemical Reactors Module 7
.m
so
E
o
o 2 3 4 5 6 7 8 9
Fs1V,1/mJn
1.4
1.2
.&
~
E
<Ii
.0
0
0.4
0.2
0
0 2 3 4 5 6 7 8 9
FsIV, 1/min
STATE-SPACE MODEL
Here we linearize the nonlinear modeling equations to find the statc~spacc form:
x=Ax+Bu
y = ex
Sec. M7.3 Van de Vusse Reaction 519
where the state, input, and output vectors arc, jn deviation form:
X CA --
:0--;,,'
C"'J '"= slate vanables .
I.C B ~ C/J.I'
II c [G -~I ~ inplIt variable
y 7~-1 C: A
- C: AS
,') = output variables
",en - C B.1·,
Recall that our two dynamic functional equations arc:
The clements of the state-space A matrix arc found by: AU::::: ~t;/aXj
_ elI; ~ I elI P; ,
A lI -_) . .)(
(XI (C A - '(
A'
)"
oC,1
y-k l -2k'(A'
eli; eli;
A I2 ~ ;);2 el( CII - C II,.) ~ JEll ~ 0
A
_ eli; _
- - - '---",C'-'
aj; _ aj; _ k
- ,., -
21 ax, a(CA - CA ,) ae" I
A ~ a;; ~ ai;
22 aX 2 il( C II - Cfi") dC"
all , ,
= ------ii = C Afl' - CAs
Dy
ili;
F
Dy
and the state-space model is:
520 Isothermal Continuous Stirred Tank Chemical Reactors Module 7
llcre we will consider several different steady-state <ipcrating points. Case 1 illustrates in··
verse response behavior, while Case 2 does not. Case 3 will illustrate operation at the
maximum production point for compound B.
CASE 1
Consider a dilution rate of F/V = 4/7 min I, which is on the left side of the peak shown in
«'igure M7.8b. The steady-state concentrations are:
mol
3 .
liter
lOS alOl
CHI' = 94 1.117 .
liter
which yields the following stale-space model:
-2.4048 o I
A-
r 0.8333 "2.2381
B C" 7.00001
1.1170
3.1472
zero = ~" 2.8175
1.1170
0.5848( 0.3549.1' +1
O.1858.l + 0.8627 .I' +
CASE 2
Consider now the following dilution rate F.JV:::: 2.8744 min-- I , which is on the right side
of the peak in [<igure M7.8b. This yields the following operating conditions:
mol
C A , = 6.0870 .
hter
105 11101
1.117
94 liter
Sec. M7.3 Van de Vusse Reaction 521
A [-5.7367
0.K333
o
~4.5411
I
B = I-1.1170
3.
9130
1
The transfer function relating input I to output 2 is:
1.1170 s - 3.1 472
1O.277K s + 26.050K
which has a zero in the left-half plane:
3.1472
zero = - ,= - 2B175
1.1170
Notice that cases 1 and 2 arc based on the same concentration of component B. Also note
that case 1 has a right-half plane zero, while case 2 has a left-half plane zero of the same
magnitude. This means that case I exhihits inverse response, while case 2 does not. The
different types of behavior arc shown in the following figures. Figures M7.9 and M7.JO
arc characteristic of a system with a positive gain and inverse response (right-half plane
zero). I-'igure M7.9 shows that, for a small step change, the linear model is a good approx-
imation to the nonlincar model. FigureM7.IO shows that the gain of the nonlinear model
is significantly lower than the linear model, when a largc step input is made.
Figures M7, 11 andM7 .12 are characteristic of a system with a negative gain. Fig-
ure M7.11 shows that, for a small stcp change, the linear model is a good approximation
1.123
linear
1.122
nonlinear
1.121
2
~ 1.12
E
.0
0 1.119
1.118
1.117
1.116
0 2 3 4 5
time, min
FIGURE M7.9 Small step changc «WI) in space velocity, Case I conditions.
ESCOLA D~ ENGENHARIA
BIBLIOTECA
522 Isothermal Continuous Stirred Tank Chemical Reactors Module 7
linear
.~ ,
"o , )
I
E
.ci ,
I
nonlinear
o I
I
I
time, min
FIGIJRE M7.10 Response to a large step change (doubling. from 4/7 to 8/7
min-- I ) in space velocity. Case 1 conditions.
to the nonlinear model. Figure M7.12 shows that the gain of the nonlinear model is lower
than the linear model, when a large step input is made.
It is interesting to note that all operating points to the left of the peak in the
input/output curvc-<Figurc M7.Rb) have right-half-plane zeros (inverse response) while all
operating points to the right of the peak do not.
1.1
1.1
1.114
;~
1.112
~
E
1.11
.ci
0
1.108
1.106
1.104
1.102
0
time, min
1.2
1.1
2
~
E
.ci
0
0.9
nonlinear
0.8
,,
\
linear
0.7
o 2 3 4 5
time, min
F
-, = 1.2921 min I
V
which yields the composition:
mol mol
C,,, = 4.4949 . C", = 1.2660
lIter liter
and the state-space model:
- 3.6237
A
l O.R333
o
--2.95RR
I
I ~:~~~{I) I
The transfer function relating input I and output 2 is:
-- 1.2660 S
g.'l(s)-
- s' + 6.5R25 s + 10.7217
which has a zero at the origin.
524 Isothermal Continuous Stirred Tank Chemical Reactors Module 7
1.266
i linear nonlinear
I
21.265 j
~ ,
E i
i
I
tf j
1.265
1.264
a 2 3 4 5
time, min
Notice that there is no steady-state change in the concentration of B Cor a small step
change in space velocity, as shown in Figure M7.13; this behavior is consistent with the
zero gain in the ,l;2J transfer function.
SUMMARY
Two example isothermal reactor systems were presented in this chapter. We noted that V/F
(residence lime; or equivalently, FlY, space velocity) is a common design parameter
chemical reactors. We noted that a first-order reaction system has a monotonic rela""""",
(no input or Olltput multiplicity) between output concentration and reactor nowrate.
lower reactor nowrate leads to a higher gain with respect to the concentration of A.
The Van de Vusse reactor had the interesting characteristics of input
and right-half plane zeros (inverse response). At the maximum in the concentration
nowrate curve the gain was zero.
The following reference presents a more detailed study of an exothermic reactor that
the same reaction scheme as the Van de Vusse reactor.
There arc a Ilumber or good reaction engineering texts. Most of the emphasis of these
texts is on the stcady-stale behavior.
Fogler, H.S. (1992). Elements q{ Chemical Reacthm !-':ngineering, 2nd cd. Engle-
wood Cliffs, NJ: Prentice-Hall.
l"roment, G.P., & K.B. Bischoff. (1990). Chetl/feal Reactor Analysis and Design,
2nd cd. New York: Wiley.
[,evcnspicl, O. (1972). Chemical Reaction/:;nghzeering, 2nd cd., New York: Wiley.
Smith, 1M. (1981). Chemical Engineering Kinetics, 3rd cd. New York: McGraw-Hill.
STUDENT EXERCISES
APPENDIXES
% 25 july 94
% (c) b.w. bequette
%
% finds the steady~state input/ouLpuLcurves for
~6 the vand de vusse reactor
%
% fsov st:eady"-state space velocity, fs/v
% cas st:eac1y--state concentration of a
% cbs steady~staLe concentration of b
% cats feed concentratioon of a
%
fsov O;O.LIO;
526 Isothermal Continuous Stirred Tank Chemical Reactors Module 7
%
casl -(k1 I fsov)/(2'k3);
cas2 - sqrt ((k1+fsov) ,A2 + 4*k3*fsov "leafs) / (2*k3) ;
cas casl + cas2 i
%
% cas - O.Ol*ca£s:cafs/100:O.80*ca£s;
%
% [sov::: (k3.*cas.*cas + kl*cas) ./lcafs - cas);
%
cbs::: kl*cas./(fsov + k2);
A2 Van de Vusse Function File {vanmax.m} for Finding the "Peak" in the
Input/Output Curve
l·'inding the maximum in the input/output curve for the Van de Vussc reaction:
Use [min
ea xl]) ;
eb x(2) ;
%
% modelin~J equations
%
dcadt - fov*(caf ~ ca) ~kl*ca ~ k3*ca*caj
dcbdt ~fov*cb + kl*ca - k2*cb;
528 Isothermal Continuous Stirred Tank Chemical Reactors Module 7
al
-2.4048 a
0.8333 -2.2381
»[vl,dl] = eig(al)
vI
() 0.1962
1.0000 -0.9806
d1 -
··2.2381 o
o -2.4048
cl2
~).'j367 o
0.8333 ~4.5411
»[v2,d2]= eig(a2)
v2
o 0.8204
1.0000 -0.5718
d2
-4.5411 o
a -::i.7367
a3 -
-3.6237 a
0.8333 -2.9588
»[v3.d3] - eig(a3)
v3 -
a 0.6237
1.0000 -0.7817
c13 -
-2. 9~:i88 a
a -3.6237
MODULE
BIOCHEMICAL REACTORS
8
MS.I Background
MS.2 Modeling l~quatiolls
M8.1 BACKGROUND
Biochemical reactors arc used to produce a large number of intermediate and final procl~
ucts, including pharmaceuticals, food, and beverages. Biochemical reactor models arc
similar to chemical reactor models, since the same type of material balances are per-
529
530 Biochemical Reactors Module 8
F
X1l
x"
.-
X,
x2 F
V X,
formed. In the simplest reaclor we consider two components: biomass and substrate. The
biomass consists of cells that consume the substrate. Onc exmnplc would be a wastewater
treatment system, where the biomass is lIsed to "cat" waste chemicals (substrate). Another
example is fermentation, where cells consuille sugar and produce alcohol.
Consider the schematic of a biochemical reactor shown in Figure Mg.l.
In this module we aSSlllllC that the reactor is perfectly mixed and that the volume is
constant. We usc the following notation:
mass of cells
Xl = biomass concentration
volume
mass of substrate
X2 = substrate concentration
volume
mass ofc~II~_g?ncrated
1'1 = rate ofceH generation
vol lImc -time
The dynamic model is developed by writing material balances on the biomass (cells) and
the substrate (feed source for the cells). Biomass grows by reeding on the substrate.
where ,x lf is the concentration of biomass in the feed stream and F is the volumetric
flowratc.
The reaction ratc (mass of cells generatedlvolume time) is nonnally written in the follow-
ing form:
where /.L is the specific growth rate coefficient. We can think of /-l as being sitnilar (0 a
first-order reaction rate constant; however, jJ. is not constanl-·-it is a fUllction of the sub-
strate concentration as shown in Section M8.2.6. The units of /L arc time·- I ,
M8.2.4 Yield
There is a relationship between the rate of generation of biomass and the rate of COnS1l1l1p~
tion of substrate. Define Yas the yield, that is, the mass of cells produced per mass of sub-
strate consumed:
y~
mass of cells produced 1',
(M8A)
mass of substrate consumed
I'"rom (MBA) we can write:
(M8.5)
r = P'~~J (M8.6)
) Y
Assuming a constant volume reactor, we can write (M8. J) and (M8.2) as:
532 Biochemical Reactors Module 8
dX I F
V Xjf - (MS.7)
dl
F F
VX2f- V XZ - r2 (MS.S)
Defining F/Vas D, the dilution rate, and using the rate expressions in (MS.J) and (M8.6),
we find:
dX I
(MS.9)
dl
dx]
D x_21 - D..~tJ
.\,-
. y (MS.IO)
dl
Generally, it is assumed that there is no biomass in the fecd stream, so xlJ':::;: O. The biore-
actor modeling equations arc then norrnally written in the following form:
dX 1
(MS.II)
dl
(MS.12)
The dilution rate (D) is the same as the space velocity in the chemical reaction engineer-
ing literature. It is also the inver,",c of the reactor re.,;idence time and has units of time·-- l .
The expressions for jJ- (specific growth rate) are developed in the following section.
The growth rate coefficient is usually not constant. A numbcr of functional relationships
hetween the growth rate coefficient: and substrate concentration have been developed. The
lllost common are (i) MOJ/od and (ii) Substrate inhibition.
MONaD
The growth rate coefficient oftcn varies in a hyperholic fashion. The following forin
was proposed by MOl1od in 1942. Notice that jJ- is first-order at low x2 and zcro order at
high x2'
(MS.I3)
Notice lhat jJ- is firsl-order at low x 2 and zero order at: high x 2 . That is, when x2 is low:
Sec. M8.2 Modeling Equations 533
rl /LY 1
this lncans that the Monod description is similar to a second-order (bimolecular) reaction
when x 2 is low, since
r ~_.
1'1 = !Lilla;; Xl
[~quation (MB.l3) is the same form as the Langmuir (u.Jsorption isotherm and the sl2uHJ;Jrd
rate equation for enzyme-catalyzed reactions with a single substrate (Michaclis-l'viclllC'1l
kinetics).
SUBSTRATE INHIBITION
Sometimes the growth ra.le coefficient increases at low substrate concentration. but de-
creases at high substrate concentratioll. The physical reason may be that the suhstrate has
a toxic effect on the biomass cells at a higher concentration. This effect is called suhstrate
inhibition and is represented by the t()llowing cquation:
0.6
Monad
0.5
0.4
E 03
0.2
0.1
0
0 2 3 4
x2
fL~ (MBI4)
kill + x 2 + 1<1
Notice that the Monod equation is a special case of (M8.14), with k 1 = O.
In this section, the MATLAB function fsolve will be used to solve for the steady-slate
values or the biomass and substrale concentrations. The nUlllerical values used in our silll~
ulations are shown in Table MR.I.
We \vill study the following cases:
x =
O.99 tj1
1.5122
Different initial guesses resuil in two other solutions for the substrate inhibition model. Also. the
MOJlod model has two steady-slate solutions. "fhe reader should find the following results using
[sol vc and bio_s~;, m, by entering different initial guesses.
Notice that EC]uilibriUl,11 3 on the Sf model is ahnosl identical to Equilibrium 2 for the
Monad model. In this section we have discussed case 1 results (D :;:: 0.3) only. Cases 2
and 3 will be discussed in Section M8.?
In the next section we will analyze the dynamic behavior of this systeln, and in Sec-
tion MS.7 we will show how multiple steady-state solutions arise.
In the previous section we found that the Monod and substrate inhibition models had t\V()
and three steady-state solutions, respcctively, for the Case 1 paramcler values. In this sec-
tion we perform simulations or the dynamic behavior of this system. A function file
named bio. m is shown in Appendix 2.
'rhe initial simulation is with the substrate inhibition parameters under Case I conditions
(D:;::0.3). The simulations for two different initial conditions arc shown ill f,'igurc M8.3.
a
a 5 10 15 20 25 30
time
"I 2
o ~---, _ .... -
o 5 10 15 20 25 30
time
FIGlJIU~ iVI8.J Substrate inhibition, Case I. xO:::o II, I] (solid), xO 0:;;: [0.75,2]
(dashed),
Although both initial conditions arc reasonably close to the Equilibriufll 2 solution
found in section 3, one simulation converges to Equilibriulll I (dashed line) while the
other converges to Equilibriulll :3 (solid line). We find in the next section that F~quiJih
rillm 2is unstable: Furtber simulations will be performed and analyzed in the phasc-
plane (section 6),
M8.5 LINEARIZATION
In this section we find the linear state-space and transfer function models. So that there is
no confusion in notation, we will usc the following fonn:
i Az+BII
y ~ Cz
where:
21 = XI-XIs
2 2 = Xl - x 2s
II, ccc f) - D,
il Z x 2I -- Xl/i-
where it is assumed that both states are output.s. The notation tL,; is used in the A matrix to
represent the derivative of growth rate with respect to substrate concentration, evaluated
at steady-state:
aILs
rb: 2s
For the MOl/od model:
dr<, IJomaJ(m
(MS. IS)
(}X;:'I (kill + x::"J 2
and for the substrate inhibitioH model:
~ klxI,·)
1- ,_')2
k 1-'-2.1
Here we analyze the substrate inhibition model under Case I conditions. A MATLAB
m-file, bio..._jac.m (Appendix 1), is used to generate the A matrix and the eigenvectors
and eigenvalues.
EQUILIBRIUM POINT 1
The sleady-slale value (seclion 3) is (x".x,) = (0,4).
The following command is entered:
where j ac is the Jacobian (A matrix), evec is the eigenvector matrix and lambda arc
the eigenvalues.
jac :; :;
-0.1139 o
-0.4652 -0.3000
evec ;::;;
o 0.3714
1.0000 -0.9285
lambda ~
-0.3000 o
o -0.1139
so,
A ~ r.~O.1l39
~0.4652 - OU.300]
"j ~ ~O.3 ~j ~ [~]
"2 ~ ~ 0.1139
"
~2 ~-O.9285
I
0.3714 "I
Since both eigenvalues are negative, the system is stahle at equilibrium point 1, verifying
the simulation results shown in Section M8A.
EQUILIBRIUM POINT 2
The steady-state value is (xb,x,) ~ (0.995 I, 1.5 I22).
jac :; :;
0.0000 -0.0679
-0.7500 -0.1302
evec ;: ;
0.3714 0.2209
-0.9285 0.9753
lambda ~
0.1698 o
o -0.3000
EQUILIBRIUM POINT 3
The steady-state is (x b ,x2,) = (1.5302,0.1746).
»[jac,evec,lambda] = bio~jac([1.5302;0.1746])
jac :::0
0.0000 0.9048
-0.7500 -2.5619
evec =:::
0.9492 -0.3714
-0.3147 0.9285
lambda =
-0.3000 o
o -2.2619
The m-filc bio~phas_gen.m (Appendix 2) was llsed to generate the following phase-
plane plot for the substrate inhibition model under Case I conditions (sec Figure M8.4).
Notice that all initial conditions converge to either the washout steady-state (trivial solu-
2
o
1 -
o
o 0.2 0.4 0.6 0.8 1.2 1.4 1.6
x1
FiG-URE M8.4 Phase-plane plot for suhstrate inhihitioll model, Case I con-
ditions (x:;;:: stable steady-state, 0 = unstable steady-state).
540 Biochemical Reactors Module 8
In this section we find analytically the steady-state solutions for the biorcactor model and
determine their stability.
The stcady-slate solutions (djdt = d,,1dt = 0) of (MH.!!) and (MH.12) arc:
l:;'rorn (M8.I?) and (M8.IS) we can immediately sec one solution, llslli111y called llw trivial
solution.
x" 0
x2_~ = X2{I' (MHIl)1
This is also known as the washout condition, since the reactor concentrations arc equal to
the feed concentrations; that is, there is no "reaction." Since there is no biomass in the
feed stream, then there is no biomass in the reactor under these conditions; all of the cells
have been "washed out" of the reactor.
which indicates that the specific growth rate is equal to the dilution rate, at steady-state.
From (MH.IH) we find thai:
(ivlH.211
y
and from (MH.20) and (MH.21):
X 1.\ (M8.22J
"'This section contains a detailed analysis which the reader may wish to skip on a first reading.
Sec. MS.7 Understanding Multiple Steady-States 541
We can solve for x 2s ' by llsing the relationship for IJ. s as a function of x 2s (either Monod or
substrate inhibition), since we kllow that IJ.- s =- D s (from (M8.20». Let !J..Jx2.\') represent
this general functionality. Then, we tHust solve:
"(c)··D
rs - 2.\ S
(M8.2.1)
for x 2s ' then substitute this value into (M8.22) to solve for .1: 1.1" The specific cases of
Monoc! and substrate inhibition arc shown in the subsections below.
MONOD
From (MS.13), the dilution rate at steady-state is
I-LJ!laxXh'
(M8.24)
kllJ + x 2s
(M8.25)
k ll!_ D.
I,
(M8.26)
iJ-max -- D,,_
For (M8.26) to be feasible, we note that D,I' < /L ma :c Actually, there is a more rigid require-
ment than that. 1'1'0111 (M8.22) we note that the highest value thal x2.1' can be is x 2f.i' other-
wise Xis will he less than zero. Thc maximum /).1' in reality is thcn f.1,Jx 2 ,..,J, (Jr (from
(M8.22), letting x2s ;;::; x 2JJ: .
ILJn'IX ..\:2D:
(Mollod) (M8.27)
kill + x2(\'
We also see from (M8.26) that there is a single solution for x2.\' as a function of D,I. 'rhis
means that there is a total of two steady-state solutions for the Monod model, since there
is also the washout (trivial) steady-state.
SUBSTRATE INHIBITION
We found in the previous subsection that there are two possible steady-stales for the
Monod model, for a given dilution rate. [11 this subsection we find the number or possible
steady-states for the substrate inhibition mode1.
From (M8.14) at steady-state:
/-Lmilx
j..L.\' (M8.28)
kill + x2. + 1, k JX~.I'
ESCOLA Dc E~:C;'!I'li\IW\
BIBLlQI60/\
542 Biochemical Reactors Module 8
, , +
{(lXiI' (1 fL"'''')
,,-,
D,
+ I(m
X 21' - = () (M8.30)
Since (M8.30) is a quadratic equation, there will he two solutions for x2S" This means that
there arc three stcady~state solutions for substrate inhibition, since there is also the
washout (trivial) steady-state.
We sec from (M8.30) that for positive values of X2s the coefficient multiplying x 2.\
must be negative. The implication is that l.1 max must be greater than D s (the same result as
the Monod equation). This implication can be seen more clearly frolll the solution of the
quadratic formula for (M8.30):
_ fL"'''')'
D,
_ 4k I k III
(M8.31)
2k,
So, for solutiolls with physical significance:
D, > 4k 11/1
( 1 _fL""")' k (M8.32)
and (M833)
Because of (M8.33), \vc know that the tefm inside the hrackets in (M8.32) is negative. For
(M8.J2) to be satisfied, then we know:
_J-ll.!!<lX
Ds < 1 (substrate inhibition) (M8.3S)
+ 2'v(,:k
1\ 1/11
We could have found the samc result from viewing Figure M8.2. Notice that there is
a peak in the J..Ls curve, and again recall lhat D.I , ;::;: f.L r The steady-Slate dilution rate, D s
canuot be abovc the peak in the x2s versus J..Ls curve. We can find the peak by finding
ilfL,Idx2' ~ n. From (M8.16):
d/-1 s
(M8.36)
dX 2s
Sec. M8.7 Understanding Multiple Steady-States 543
(MS.37)
ik;"
fLlll(lx l 1
\X
(MS.3S)
km + !em k + 1 +- k m
'"
__ }l..l!1~1-"' __
fL., ~I (MS.3,)
+ 2 VX,k,,,
sO the maximum dilution rate (for the nontrivial steady-state) is:
f.111l<lX
D, 1+2'r.-;-
Vkkl/(m
kI/lD,\.
(MS.26)
f.Lm<lx - '[)",
with the requirement that D s < IJ. max 'Y~f.Jklll + x~/.i' (that is D.I, < f.L.lr2j.J)
1(
\ .1 _ D 1:'',' ' )' - 41\1 1(/II
(M8.31)
2/(,
unci the associated biomass concentration is:
(MX.32)
The stability of each steady-stale solution is determined from the eigenvalues of the Jaco-
bian matrix (matrix A in the state-space form), For a two-state system we know that the
eigenvalues are found by:
i!/-L,\ (M8A4)
c)x:2y
We will usc (M8AS). (M8A6), and the eouditions shown in (M8AI) and (M8A2) 10 dc-
termine the stability of each steady-state.
Sec. MS.7 Understanding Multiple Steady·States 545
fL,-D,-D,<O (MXA7)
Notice that f..L s is evaluated at the substrate feed concentration for the washollt condition.
Perhaps the expression I-L,lx2/) should be llsed to designate this relationship. Comparing
(M8.49) and (MS.50), we sec that (MS.50) is the more rigorous requirement for stability
of the washout steady-state.
'fhe growth rate expression for Monod kinetics is:
(MX.51)
(MX.52)
Notice that IJ-.lr 2j:) is simply a shorthand expression for the specific growth rate evaluated
at the suhstrate feed concentration. We must use (MS.50) along with either (M8.51) or
(MS.52) to determinc the stability or the washout steady~state. Notice that the washout
steady~state will only bc stable if D.I , is high enough. Wc can think of D.I , as a dynamic bi~
rurcation parameter, becausc the stability of the washout steady-state will depcnd on the
valuc of the dilution ratc.
Stability of Washout Steady-State for Monad. From (MX.50) and (M8.51 l. Iht
washout stcady-statc will be stable if:
(MX.54)
546 Biochemical Reactors Module 8
(MS.56)
NONTRIVIAL STEADY~STATES
For the nontrivial steady-states, D s = fL.\.. The stability requirerncnts for the nontrivial
steady-states arc then:
II f t:
- D _~·\~L>: <0 (MS57)
s Y
(MS.5S)
from the det(A) specification. Since D.I. (and therefore 1J..), xis' and Yare positive, (MS.57)
and (MS.58) rcdu~c to the requirement that:
The x2s that is on the left side of the peak, and is therefore slable, is (from (MS.31»:
Also, recall that Ds < fJ-ma/1 + 2Vk--I)~::: (which is equivalent to requiring a real nontrivial
solution).
M0I10d
Substrate Inhibition
Equilibrium i-washout .t Is =0 X2, = 4.0 stable
Equilibrium 2-l1ol1trivial xL, = 0.9951 x2, = 1.5123 unstable (saddle point)
Equilibrium 3-nontrivial xl.> = 1.5302 x2, = 0.1745 stahle
M8.7.6 Case 2
For a steady-state dilution rate of D.).::::: 0.15, the reader should find the following results:
Monod
Equilibrium l~washout XLI' =0 X2.\' = 4.0 unstable
Equilihrium L~nontrivial Xli = 1.5811 x" = 0.0474 stable
Snbstrate Inhihition
Equilibrium I-~washout XL, =0 4,0
X2.\':::;: unstable
Equilihrium 2~nontrivial Xli = -0.6104 x2, = 5.5261 not feasible
Equilibrium 3-nontrivial XL, = 1.5809 x" = 0,()478 stahle
M8.7.7 Case3
r'or a steady~statc dilution rate of D s ::::: 0.6, the student should find the follmving results:
Mouod
Equilibrium l~~washout XIs:::: 0 X2, ~ 4.0 stable
Equilibriulll 2-nontrivial x",~2.0114 xl., ~ ~ I J)286 not feasible
Substrate Inhihition
EquilihriuI11 l,,--,washout XIs::::: 0 X2., ~ 4.0 stable
Equilibrium 2-11ontl"ivial x'" ~ 4.13 -
0.20j x2, ~-0.13 + 0.50j not feasible
Equilibrium 3-nontrivial x,-,~4.13 +0.2(lj x,., ~ -0.13 - 0.50j not feasible
The second and third steady-states (Irc not feasible because the concentrations for both the
biomass and the StJbslratc are complex.
There <Irc some vcry interesting changes ill the dynamic behavior of these lnodcls as
we vary the dilution rate (again, we can think of dilution rate as a bifurcation parameter).
Let us discuss this in order of the lowest dilution rate to the highest dilution rate.
The conditions for stahility developed in Section MS.7 can be used to develop stcady-
state input-output diagrams for the numerical example presented in the previous sections.
The diagram for the Monod model is shown in Figure M8.5. As calculated, the Monod
model has two steady-states for dilution rates that arc less than the specific growth rate
under the Iced conditions, D.I, < l-L.Jx2J-). The nontrivial steady-state is stable under those
conditions, while the washout steady-slate is unstable. For Ds > fL/:t2f.J there is a single
steady-stale, lhe washoul steady-state, and it is stable. '
The diagram for the substrate inhibition model is shown in Figure M8.6. At low dilu-
tion rates, where D s < fL,JX 2f.i.) , there are two steady-slales (like the Monod model). The
nontrivial steady-slate is stable under those conditions, while the washout steady~_~t~~!C
is unstable. Por tbe intermediate dilution rate range, 1J-./or2j) < D s < /--L rna Jl + 2Vk 1k/ll'
Monad Model
5
unstable stable
4r----------------....--j
3
o-------~
o 0.1 0.2 0.3 0.4 0.5 0.6
dilution rate
\
,,
3 ,,
2 ,
'\. unstable
" "-
"-
"-
0'L- stable - .->
o 0.1 0.2 0.3 0.4 0.5 0.6
dilution rate
there arc three stcady~statcs. Two of these arc stable, while one is unstable. The stable
steady-slate that is attained will depend upon the initial conditions of the concentra~
lions, or on the way that the process is started lip. When the dilution rate meets the con-
dition that D,I_ > f.1.Jx 2j ), there is a single steady-state, the washout steady-state, and it is
stable.
It is interesting to note that the way that the biorcactor is started up will determine the
steady-state concentrations that the reactor achieves.L,ook at Figllre M8.6. NotiC\.,~ that if
we start at a very low dilution rate we will have only one stable steady-state, so the reactor
IIltl:;;! operate at that condition. If we slowly increasc tJ.l~~tilution ratc, we relnain on the
lowcr curve of r'igure M8.6. When V,I' > ~ll1a/1 + XVk1kl/i (1\ : ;: 0.36126 for this exam-
ple), the stable solution suddenly "leaps" to the upper stahle steady~state (washout cOIl(Ii~
tions). As we increase Ds Luther, we remain on the washout curve.
Now, assume that we arc starting out at a high dilution rate along the upper curve,
the washout conditions. As we slowly decrease the dilution rate, we remain on the
washout curve until D,I' ::::: ~,Jx2Jj')' which is D,I' ::::: 0,186] for this example. The stahle
steady-state then "jumps" down to the lower curve. As we continue to deCl'case the dilu-
tion rate further. we remain on thc lower curve.
The type of behavior shown in Figure M8.6 is known as hysteresis and is exhibited
by a number of processes, including exothermic chemical reactors and valves that "stick."
The chemical reactor example is discussed further in Module 9,
The student should be able to show how the phase-plane behavior changes as a
function of dilution rate, for the example shown in Figure M8.6.
Student Exercises 551
SUMMARY
The modeling equations for a biochemical reactor were developed for Monod and sub~
strate inhibition kinetics. We found that the Monod lnodel normally has two stcady~state
solutions, while the substrate inhibition model normally has three steady-state solutions.
At low dilution rates the substrate inhibition model behaves similarly to the Monod
mode], with a single stable steady~state. Washout will not be a problem at the low dilution
rates.
At medium dilution rates the substrate inhibition model behaves quite differently
from the Monod model. Depending on the initial conditions, the reactor will either con~
verge to a high conversion or to washout conditions for the substrate inhibition model. II
has not been discussed thus far, but if we wish to operate at an intermediate (unstable)
conversion level, then feedback control must be llsed. Notice that the Monod model still
has only one stable point, and there is no danger of wash-out.
At high dilution rates, both reactor models have only one feasible solution---
washout. The flow is simply too high (residence tinle too low) for any cell growth.
FURTHER READING
STUDENT EXERCISES
fh, hrA-1
o o
0.1 0.38
0.25 0.54
552 Biochemical Reactors Module 8
0.5 0.63
0.75 0.66
I 0.68
1.5 0.70
3 0.73
5 0.74
For both the Monod and substrate inhibition models present(~din this modale, find
the dilution rate that maximizes the production rate of cells. Analyze the stability of
the reactor under this condition.
5. Consider a biochemical reactor where the consumption of substrate (\2) promotes
the growth of biomass (Xl) and formation of product (x 3 ). The three modeling eqlla~
lions arc:
dX I
lit
lil
where the specific growth rate is a function of both the biomass concentration and
the product concentration:
Appendixes 553
H. Compare and contrast this rnode! with that of the two-state model with substrate
inhibition kinetics presented in this module.
h. Verify that the steady-state values for Xl' x 2 , and x] presented in the table above
are correct. For a steady-state input of f):::;: 0.202 (and all of the other parameters
constant), arc there (my additional solutions for the states (for example, the triv-
ial solution?). Analyze the stability of all steady~state solutions obtained.
c. Perform dynamic simulations of the nonlinear model, with step changes of
± 10(#) in the dilution rate. Discuss the resuIts or your step changes (Le., docs an
increase or ~lecrease in f) have a greater effect on the biomass concentralion?).
Compare your results with linear simulations.
APPENDIXES
IThis model is from Chapter 4 of the following Illonograph:Henson, M.A., & D.E. Seborg
(cd.). (1997). Nonlinear Process Conlrol. Upper Saddle River, NJ: Prentice-Hall.
554 Biochemical Reactors Module 8
% x(l) biomas,;.>
~8 x (2) substrate
%
% biomass ("bugs") consumes the substrate
96 parameter values
D ~ 0.3;
mumax 0:: 0.53;
Y ~ 0.4;
km 0.12;
sf 4.0;
kl 0.4545;
% steady-state equations
% [solve varies xll) and x(2) to drive f(l) and f(2) to Zero
% b.w. bequett.e
% (c) 18 ~July 96
%
5(, dynamic equations for biorcactor, integrated using ode4.5,
(i; usiuq the following command
I zeros(2,1);
%
% param(~t~(,~r values
%
D O . 3;
mumax 0.53;
Y = 0.4;
km 0.12;
sf - 4.0;
kl 0.4545;
%
% Substrate Inhibit_ion expression for specific growth rate
:6
'A b.w. bequett.e
'6 (e) 19 July 96
%
% generates phase-plane plots for the bioreactor
556 Biochemical Reactors Module 8
%
% set-up the axis limits
%
axis{[O 1.75 0 5]);
%
% stable and unstable points for substrate
% inhibition model
%
xlu [0.9951];
x2u [1.5122];
xls [0;1.'j302J;
x2 s [4; 0 . 1'146] ;
%
% place an 'x' on stable points
% place a 'a' on unstable points
%
plot{xlu,x2u, 'wo' ,xls,x2s, 'wx')
hold on
%
% select different initial conditions
% xl ranges from 0.1 to 1.5 (every 0.35)
:!, x2 ranges from a to 5 (every 1.25)
% total of 16 initial conditions
%
xlinit [0.1 0.45 0.8 1.15 1.5 0.1 0.45 0.8 1.15 1.5];
x2 ini t [0 0 0 0 0 5 5 5 5 5] ;
xlinita [1.5 1.5 1.5 0.1 0.1 O.lJ;
x2 lni ta = [1.25 2. 5 3.75 1.25 2. 5 3.75] i
%
xG = [xlinit xlinita;x2init x2inita] ;
%
% ncol = number of initial conditions
%
[mrow,ncol] size(xO) i
______________.L !
Appendixes 557
(MXA5)
(MXA6)
11-,;'X 1,1'
(r(A) c= -D, - Y (MX.AI)
X Is 11-,~. 11-.1'.
I (A) ,-
(cl (MX.A2)
Y
The rools of (MXAO) arc:
- 4 de( A
A- (MX.A3)
2
(MX.A4)
A=
± ~(=;L, - x';:r (MX.A7)
2
y ± (I~'_ x'p:)
A= (MX.AX)
2
and our roots are:
558 Biochemical Reactors Module 8
and since /1-.1' ::::: D,I" we are assured that one pole will always he negative. The second root
will only be positive if /1-.: is negative. Since /1-.: is positive for the Monod model, the
nontrivial solution is stahle as long as the solution is feasible (D.I, < /1-./x2f~.)). The fL; can
be either positive or negative for the substrate inhibition model, so a J1()[]trivial slcady-
state may either be slable or unstable.
MODULE
DIABATIC CONTINUOUS
STIRRED TANK REACTORS 9
The purpose of this module. is to understand the steady-state and dynamic behavior of
jacketed continuous stirred tank reactors (CSI'Rs), also referred to as diabatic CSTRs.
After reviewing this rnodulc the student should be able 10
M9.1 Background
M9.2 The Modeling [~quatiolls
559
560 Diabatic Continuous Stirred Tank Reactors Module 9
r- ~ r-
TjlrJ
Fi
LU
CA T
F
T,
M9.1 BACKGROUND
The most important unit operation in a chclnical process is generally a chemical reactor.
Chemical reactions arc either exothermic (release energy) or endothermic (require energ)
input) and therefore require that energy either be removed or added to the reactor for d
constant temperature to he maintained. Exothermic reactions arc the most interesting sys-
tems to study because or potential safety prolJ]cll1s (rapid increases in tcrllpcraturc, S(HllC-
times called "ignition" behavior) and the possibility of exotic behavior such as Illultiple
steady-states (for the same value of the input variable there may be several possible val~
ues of the output variable).
In this Illodule we consider a perfectly mixed, continuously stirred tank reactor
(CSl'I<-),l shown in Iiigure M9.1. The case of a single, first-order exothermic irreversible
reaction,;1 -> 11, will be studied. We will find that very interesting behavior can arise in
such a simple system.
In I<'igure M9.1 we see that a fluid stream is continuously fed to the reactor and an-
other fluid stream is continuously removed from the reactor. Since the reactor is perfectly
mixed, the exit stream has the same concentration and temperature as the reactor fluid.
Notice that a jacket surrounding the reactor also has feed and exit streams. The jacket is
assumed to be perfectly mixed and at a lower temperature than the l'C<lCtOL [':nergy thell
passes through the reactor walls into the jacket, removing the heat generated by reaction.
ISomctimes this type or reactor is called "non-adiabatic'" The term adiabatic means "no he,ll
loss," so the term nOli-adiabatic cOllstitu{es a double negative (This point has been disclissed h)
Barduhn, Chelll. Eng. Education, 19, J 71 (19X5)). We prefer to usc- diabatic to describe this reactor.
Sec. M9.2 The Modeling Equations 561
There are many examples of reactors in industry similar to this olle. Examples in-
clude various types of polymerization reactors, which produce polymers that arc lIsed in
plastic products such as llOlystyrcnc coolers or plastic bottles. The industrial reactors typi-
cally have more complicated kinetics than we study in this module, but the characteristic
behavior is similar.
For sitnplicity we assume that the coolingjackct temperature call be directly manipulated,
so that an energy balance around the jacket is not required. We also make the following
assumptions:
Perfect mixing (product strcanl values arc the same as the bulk reactor fluid)
Constant volume
COnsl,lI1( parameter values
The constant volume and parameter value assumptions can easily be relaxed by the reader
for further study.
The parameters and variables that will appear in the modeling equations arc listed below
for convenience.
The rate of accumulation of material in the reactor is equal to the rate of rnatcrial in by
flow - the material out by flow.
Assuming a constant amount ofrnatcrial in the reactor (dVp/dt:::::: 0), we find that:
F and dV/dt ~ 0
V (11191)
dt
where r is the rate of reaction per unit volume.
The energy balance, assuming constant VOIUlllC, heat capacity and density, is:
dT
Vpc" ~ FjlC,,("/"t- T) + (-t:.!IWr- UA("/"- "Ii) (1119.2)
dt
where (-liB) VI' is the rate of energy contributed by the exothermic reaction.
We can write (M9.1) and (M9.2) in the following state variable form:
dCII F
t(C;\' T) ~
,1 V (CAl (1119.1 a)
dl
i/1'
IV" (1;- T) + (...- !1II) r - UA (1' 7i) (1119.2,,)
dt pc!, Vpc p
2It should he noted that the dellsity of all streams docs not need to remain constant for the
modeling equations to holtL F'-or example, DCllJl (1986) shows that as long as the density is a lincar
function of concentratioll, the final modeling equations are correct.
Sec. M9.3 Steady-State Solution 563
r (- !1F)
= k o exp!, i C" (M9.3)
The steady-state solution is obtained when dC,//dl ::: 0 and dlldl :::: 0, that is:
(M9.1 s)
VA (T- T) ("19.2s)
Vpc p I
To solve these two equations, all parameters and variables except for two «(~\ and T) must
be specified. Given numerical values for all of the parameters and variables we can lise
Newton',,; method (Chapter 3) to solve for the steady~sLatc values of C~l and T. l<'or conve-
nience, we usc an "s" subscript to denote a steady-state value (so we solve for CAs and [,J.
In this module we will study the set of parameters showll for Case 2 conditions in
'Table M9.1. Cases I and j arc left as exercises for the reader.
The function nl~file for the steady~state equations is cstr_ss . m and is shown in Appen~
dix I. The command to run this file is
where xO is a vector or the initial guesses and x is the solution. lkfore issuing this com~
mand the reactor parameters must be entered in the global parameter vector CS'I'R PAR.
FlV. hr 1 I I I
ko, hr l 14,825*3600 9,703"'3600 18,194*'3600
(~-!J.H), kcallkgrno! 5215 5%0 Xl95
E, kcal/kgmol 11,:-\43 11,843 11,843
pC'f" kcaJ/(m:'\QC) 500 500 500
I"(~J'"Ckgltlollm J
25
10
25
10
25
10
UA/V, kcal/(m:\oC hr) 250 150 750
'Ij, "C 25 25 25
564 Diabatic Continuous StIrred Tank Reactors Module 9
We find that different initial guesses for the concentration and temperature lead to diffcr~
cnt solutions.
When choosing initial guesses for a numerical algorithm, it is important to usc
physical insight about the possible range of solutions. For example, since the feed concen-
tration of A is 10 kgmollm 3 and the only reaction consumes A, the possible range for the
concentration of A is 0 < Ct\ < 10. Also, it is easy to show that a lower bound for tempera-
ture is 298 K, which would occur if there was no reaction at all, since the feed and jacket
temperatures arc 298 K. Notice also that there should be a correlation betwc-en concentra-
tion and temperature. If the concentration of A is high, this means that not much reaction
has occurred so Iittlc energy has been released by reaction and therefore the temperature
will not be rtlllch different than the feed and jacket temperaturcs.
GUESS 1
l1if.:h cOll(..entratioll (1011' conversion), Ienv temperature. lIciT we consider an initial guess
of (, =') and T = 300 K.
x
8.5636
311.1710
GUESS 2
Intermediale concentration and temperature.
x
5.5179
339.0971.
GUESS 3
Lmv concentration and high temperature.
x
2.3589
368.0629
Sec. M9.4 Dynamic Behavior 565
xO ( 1 ) , C~\ guessed 9 5 I
xO (2 ) , T guessed 300 350 450
x ( 1 ) , C~\ solution 8.564 5.518 2.359
x (2), T solution 311.2 339.1 368.1
We noted in the previous section that were three different steady-state solutions lo the
Case 2 parameter set. Here we wish to study the dynamic behavior under this same para-
meter set. Recall that nlilIlerical integration techniques were presented in Chapter 4.
The m-file to" integrate the modeling equations is cstr_ dyn.m, shown in Appen-
dix 2. The command to integrate the equations is
[L,x] = ode45( 'cstr__ dyn', to,tf,xO);
where to is the initial time (usually 0), tf is the final time, xO is the initial condition
veClor, t is the time vector, and x is Ihe slate variable solution vector. lJcfore performing
the inlegration it is necessary 10 define the global parameter veclor CSTl{ PAR. '1'0 plot
only concentration or temperature as a function of time, use plot (L, x ( : ,1)) and
plot (t, x ( : 2) ), respectively.
J
Here we use initial conditions that arc close to the low temperature steady-state, The ini-
tial condition vector is [conc, temp] :;:: [9,300]. The curves plotted in r,'igure M9.2 show
that the state variables converge lo the low temperature steady-stale.
Here we usc initial conditions that arc close to the intermediate temperature steady-state.
The initial condition veclor ror the solid curve in Figure M9.3 is [conc, temp] :;;: [5,350],
which converges to the high temperature steady-slale. The initial condition vector for the
566 Diabatic Continuous Stirred Tank Reactors Module 9
9.5
"c
0 9
" 8.5
0 2 4 6 8 10
time, hr
320
"'"
ID
"0: 310
E
'"- 300
0 2 4 6 8 10
time, hr
FIGURE l\iI9.2 State variable responses with initial condition xO::::: [9;300j.
dotted curve in Figurc M9.3 is leonc, tcmpl 0::::: fS,32Sl, which converges to the low tem-
perature steady-state.
If we perform lllallY simulations with initial conditions close to the intermediate
temperature steady-state, we find that the telnpcraturc always converges to either the low
temperature or high temperature steady-states, but not the intennediate temperature
steady-slate. This· indicates to us that the intermediate tcmperature steady-state IS
lIflstable. This will be shown clearly by the stahility analysis in Section M9.5.
10
"
c
0 5
" 0
0 2 4 6 8 10
time, hr
400
"'"
"'"0: 350
E
'"- 300
0 2 4 6 8 10
time, hr
FIG1JRE 1\19.3 Stale variable responses with initial condition ~\"O :;: 15;3501
(solid) and xO:;;: [5;325] (dashed).
Sec. M9.5 Linearization of Dynamic Equations 567
4
u
c 2
0
u
0
0 2 4 6 8 10
time, hr
400
"
'"'"0:
'0 380
E
2 360
0 2 4 6 8 10
time, hr
FIGURE 1\'19.4 State variable responses with initial condition xO ::00 [I ;400].
Ilere we usc initial conditions that arc close to the high temperature steady-state. The ini-
tial condition vector is [COile, temp-l -= f 1,4001. The curves plotted in P'igureM9A show
that the state variables converge to the high temperature stcady~statc.
In this section we have pcrfonncd several simulations and presented several plots.
In Section M9.6 we will show how these solutions can be compared on the saille "phasc-
plane" plot.
The stability of the nonlinear equations can be dClcnnincd by finding the following statc-
space form:
x=Ax+BII (M9.11)
dC.,
(M9.1 a)
dt
dT
dt
( p;',;I) k C ~ CT.
el
UII
vpe"
T+ UII T
VIIC I
+ FT
V f
(M9.2a)
"
568 Diabatic Continuous Stirred Tank Reactors Module 9
L,ct the state and input variables be defined in dcviittiou variable form:
J
T- TJS
II =-~
r C:'ilf - CilI~'
Ii - Ii,
M9.5.1 Stability Analysis
il/; il/, -
F
- ks
All
ax, ile., V
.11 12
aI, at, .. - C A /<
ax} aT
/\21
ai, a/; (- 6./1)
ks
ax! aCA pCI'
An
a/; il/; F (fA
+
(6.11)
CA,lk:
ax') aT V VpC~) pCp
k, .= k exp
() ( RT6.F). 1
·
(- 6.1') (6.E
ih'? )
ak,
aT k" exp . fiT,
or,
F
V ·-k\
A = (-6.11), (M9.12)
[ ' J(\
p,p
(
The stability characteristics arc determined by the eigenvalues of A, which are obtained
by solving del('\' I - A) ;::; o.
Sec. M9.5 Linearization of Dynamic Equations 569
A-A"
A1- A
I,.. -An
det()" 1- A) ()" - A,,)(A - A 22 ) - A"A 2I
'fhe stability of a particular operating point is determined by finding the A matrix for that
particular operating point, and finding the eigenvalues of the A matrix.
Here we show the eigenvalue..., for each of the three case 2 steady-state operating
points. We usc the function routine cstx_"amat. ill shown in appendix 3 to find the A
matrices.
OPERATING POINT 1
The concentration and temperature arc 8.564 kgmol/m 3 and 31 J.2 K, respectively.
amat =
-1.1680 -0.0886
2.0030 -0.2443
lambda : : ;
-0.8957
'-0.5166
Both of the eigenvalues arc negative, indicating that the point is stable, whieh is consis-
tent with the results ol'Figure M9.2.
OPERATING POINT 2
The concentration and temperature arc 5.51 Hand 339.1, respectively.
amat =
--1.8124 -0.2324
9.6837 1. 4697
lambda =
-0.8369
0.4942
570 Diabatic Continuous Stirred Tank Reactors Module 9
One of tile eigenvalues is positive, indicating that the point is ullstable. This is consistent
with the responses presented in Figure M9.3.
OPERATING POINT 3
»[amat,lambda] ~ cstr_amat(2.359,368.1)
amat :::;
~4.2445 ~O.3367
38.6748 2.7132
lambda :::;
~O.7657 + O.9584i
~O.7657 ~ O.9584i
The rcal portion of each eigenvalue is negative, indicating that the point is stable; again,
this is consistent with the responses in Figure M9.4.
iJj; = aj; =0
all, a'lj
a/2 = aI,
= -_ = VA
dU l aTj VpCp
The reader should find the elemenls of the B matrix that correspond to the second and
third input variables (sec studcnt cxercise 8).
llerc wc show only the transfer functions for the low temperature steady~state for
Case 2. Thc input/output transfer function relating jacket tcmperature to reactor concen-
tration (state I) is:
-0.0266 - 0.0575
+ l,4123s + 004627 (1.I165s + 1)(l,9357s + 1)
and the input/output transfer function relating jacket temperature to reactor temperature
(state 2) is
O.3s + 0.3504 07573(0 856s + I]
g2l(S)
+ 104123.1' + 004627 (1.1165.1' + 1)(1.9357.1' + I)
Notice that the transfer function for concentration is a pure second-order system (no nu-
merator polynomial) while the transfer function for temperature has a first-order nutllcra-
Sec. M9.6 Phase-Plane Analysis 571
tor and second-order denominator. This indicates that there is a greater "Jag" bCl\vCen
jacket temperature and concentration than between jacket temperature and reactor temper-
ature. This Inakcs physical sense, because a change in jackel temperature must first affect
the reactor temperature before atTccling the reactor concentration.
In Section M9.4 we provided the results of a fc\v dynamic simulations, noting that diffcr~
cnl initial conditions caused the system to converge to different steady-state operating
points. In this section we construct a phase-plane plot by performing simulations for a
large nUlubcr of initial conclitions.
The phase-plane plot shown in Figure M9,5 was generated using cstr_]un. m
and cstr.m [rom the appendix. Three steady-state values arc clearly shown; two are
stable (the high and low temperature steady-states, shown as '0'), while one is unstable
(the intennediate temperature steady-state, shown as '-t'). Notice that initial conditions
of low concentration (0.5 kgmolhn-1) and relatively low-to-intermediate temperatures
(300 to 365 K) all converge to the low-telnperature steady-state, When the initial temper~
ature is increased above 365 K, convergence to the high-temperature steady-state is
achieved.
Now, consider initial conditions witb a high concentration (9.5 kglllollm 3) and 1m\'
temperature (300 to 325 K); these converge to the low-temperature steady-state. Once the
initial temperature' is increased to above 325 K, convergence to the high-temperature
steady-state is achieved. Also notice that, once the initial temperature is increased to
around 340 K, a very high overshoot to above 425 K occur;.;, before the system settles
down to the high-temperature steady-state. AHhough not shown on this phase-plane plot,
higher initial temperatures can have overshoot to over 500 K before settling to the high-
temperature steady-state, This could cause potential safety prohlenls if, for example, sec-
ondary decomposition reactions occur at high temperatures. The phase-plane analysis
then, is able to point out problem initial conditions.
Also notice that no initial conditions have converged to the intermediate telnpcra-
ture steady-state, since it is unstable. The reader should perform an eigenvalue/eigenvec-
tor analysis for the A matrix at each steady-state (low, intermediate, and high tempera-
ture) (sec student exercise 3). You will find that the low, intermediate, and high
temperature steady-states have stable node, saddle point (unstable), and stahle focus be-
havior (sec Chapter 13), respectively.
It should be noted that fcedback control can be used to operate at the unstable inter-
mediate temperature steady~state. The feedback controller would measure the reactor tem-
perature and manipulate the cooling jacket tcmperature (or f1owrate) to m8intain the inter-
mediat.e temperature steady-state. Also, a feedback controller could be used to make
certain that the large overshoot to high temperatures docs not occLir from certain initial
conditiclIls.
572 Diabatic Continuous Stirred Tank Reactors Module 9
420
400
380
'"
'"
ID
"0
*~ 360
iiiID
"-
~
- 340
320
300
o 2 4 6 8 10
concentration, kgmol/ml\3
FIGURE M9.5 Phase-plane plot for Case 2. Stable points (conditions I and:1)
arc marked with '0'. The unstable point (condition 2) is marked with '+'.
In previ()us sections we found that there were three steady-state solutions for Case 2 para-
meters. The objective of this section is to determine how multiple steady-slates might
arise. Also, we show how (0 generate steady-state input-olltput curves that show, for ex-
ample, how the steady-Slate reactor temperature varies as a function of the steady-state
jacket temperature.
In Section M9.3 we used numerical methods to solve for the steady-states, hy solving two
equations with two unknowns. In this section we show that it is casy to reduce the two
equations in two unknowns to a single equation with one unknown, This will give us
physical insight abollt the possible occurrence of Illultiple steady-states.
Sec. M9.7 Understanding Multiple Steady-State Behavior 573
(M9.15)
We can rearrange this equation to rind the steady-state concentration t{)r any given
steady-state reactor temperature, 7:1,:
(M9.16)
UA
II (. ( ,
F -(11)
("'f-~(~~)
--- k
0
((j.{')
ex') """.
1
- C
R J~' As
(M917)
p ""
The tcnns in (M9.17) arc related to the energy removed and generated. IT we ll111hiply
(M9.17) by VpC/J. we find that:
Fe
P - fI (F.\ - F)
',' Js I- UA(F.\ ]- . F.)
1
~. (M9.18)
Q[':ell
(M9.19)
Notice that this is an equation for a line, \vhcrc the independent variable is reactor temper-
ature (T\). The slope or the line is I UA +- FpCpl and the intercept is [-UA Tj.\. -
Fre,/I:,]' Changes in jacket or feed tempen.llllre shirt the intercept, but not the slope.
Changes ill [fA or F affect both the slope and intercept.
Now, consider the Qgen term:
(M921l)
k"
cx p ( /:/)
-Mf V '
(& C,v,) (M9.21)
I' +
V
k Cxp( RT
()
-!J.F)
j
[~qLlalion(M9.21) has a characteristic "S·, shape for Q"ell as a function of reactor temperature.
From equation (M9.18) we sec that a stcadY~~late solution exists when there is all
intersection of the QIClIl and Qgcll curves.
In FigureM9.6 we show different possible intersections of the heat removal and heat gen-
eration curves. If the slope of the heat removal curve is greater than the maximum slope
of the heat generation curve, there is only Olle possible intersection (sec Figure M9.6al.
As the jacket or feed temperature is changed, the heat removal lines shifts to the len or
right, so the intersection can be at a high mlow temperature depending on the value of
jacket or feed temperature.
Notice that as long as the slope of the heat removal curve is less than the maxinlllm
slope of the heat generation curve, there will always be the possibility of three intersec-
tions (see l<'igure M9.6b) with proper adjustment of the jacket or feed temperature (inter-
cept). If the jacket or feed temperature is changed, the removal line shifts to the right or
left, where only one intersection occurs (either low or high temperature). This case is ana-
lyzed in more detail in Section M9.7.3.
In Figure M9.7 we superimpose several possible linear heat removal curves with the
S-shaped heat generation curve. Curve A intersects the heal generation curve at a low
temperature; curve n intersects at a low temperature and is tangent at a high temperature:
Q Q
E
9
Temperature
curve C intersects at Imv, intermediate, and high lclnpcraturcs; curve D is tangent to a hl\\
temperature and intersects at a high temperature; curveE has only a high temperature in
tersection. Curves A, B, C, D, and E arc all based on the same system parameters. except
that the jacket temperature increases as we move from curve A to E (from equatioll
(M9.7) we sec that changing the jacket temperature changes the intercept but not the slope
of the heat removal curve). We can usc Figure M9.7 to construct the steady-state input-
output diagram shown in !-<"igurc M9.8, where jacket temperature is the input and rC<lCtur
temperature is the output. Note that r''igure M9.X exhibits hysteresis behavior, \vhich was
first discussed in Chapter 15.
The tenn hysteresis is used to indicate that the behavior is clifferellt depending on
the "direction" that the inputs are Illovecl. For example, if we stan at a low jacket tempera-
ture the reactor operates at a low temperature (point I). As the jacket ternperature is in-
creased, the reactor temperature increases (points 2 and 3) ul1ti!thc low tempcnlturc "Ijillit
poinC{ (point 4) is reached. If the jacket temperature is slightly increased further, the rc
actor temperature jumps (ignites) to a high temperature (point 8); further jacket tempera-
ture increases result in slight reactor temperature increases.
Contrast the input-output behavior discussed in the previous paragraph (starting aL a
low jacket temperature) with that of the case of starting at a high jacket temperature. It
A B c o E
9
8
7
T 6
3
2
Jacket Temperature
one starts at a high ja~ket temperature (point 9) there is a single high reactor temperature,
which decreases as the jacket temperature is decreased (points 8 and 7). As we move
slightly lower than the high temperature limit point (point 6), the reactor temperature
drops (also known as extinction) to a low temperature (point 2). Further decreases in
jacket temperature lead to small decreases in reactor temperature.
The hysteresis behavior discllssed above is also known as ignition-extinctioll behav-
ior, for obvious reasons. Notice that region he tween points 4 and 6 appears to be unstable,
because the reactor docs not appear to operate in this region (at least in a steady-state
sense). Physical reasoning for stability is disclissed in the following section.
Consider the system described by the energy removal curve C in Figure M9.7. Notice that
the steady-state energy balance is satisfied for the operating points 3, 5, and 7, that is,
there are three possible steady-slates. What can we observe about the stability of each of
the possible operating points, solely froTH physical reas(Hling?
alllte begills to risc··---cvenlually moving to 1:-". If we start at T] + 0[, more energy is being
rcrnovcd than we are generating, so the temperature hegins to dccrcasc~cvcntually Inov-
ing to 7'-3'
'fhe open-loop stability cannot be assured until an eigenvalue analysis is pcrl<mncd (sec
Section M9.5).
Here the steady-state analysis is enough to determine that point 5 is an unstable operating
point.
Again, the stability or the upper steady~state can only be determined by eigenvalue analy-
sis (SectionM9.5).
We h;:IVC used physical reasoning to determine the open.. loop characteristics solely
frOill steady-state analysis. Recall that when we studied the Case 2 conditions in SeLlion
MY.S, we used eigellvalue analysis to find that the lower and upper temperature steady-
states were stable, while the intennediate steady-state was unstable,
578 Diabatic Continuous Stirred Tank Reactors Module 9
There arc two different ways to find how the steady-state rcaclOt temperature varies with the
jacket temperature. One way is to solve the nonlinear algcbn1ic (steady-state) equations for a
large number of different jacket temperatures and construct the curve rcl;1ling jacket to reac-
lor temperature. It turns out that there is another, simpler, way for this particular problem.
lIcre we can easily solve for concentration as a function of reactor temperature. \Vc
can also directly solve for the jacket tcmpcrallirc required for a particular reaCl(lr tempera-
ture. Then we simply plot reactor temperature versus jacket temperature. We show the
calculations in detail below.
As in Section M9.7.1, we can find the steady-state concentration for any steady-
state reactor temperature, 7~\, (frotH the material balance equation for reactant A):
F
V C'Ah
F
V
+ I< exp (-111\)
()
-- ---
RT\
Prom the steady-state temperature solution (dTldt =: 0) we can solve for the steady-state
jacket temperature, Z:.s:
Similarly, if we assume that the jacket temperature remains constant, we can solve for the
required feed temperature:
The function file csU','_io.m shown in Appendix 4 is used to generate the input-output
curves for the Case 2 parameters shown in l<'igures M9.9 and M9.IO.
In Chapter 15 we presented a simple example of a cusp catastrophe that occurs when the
input-output behavior Illoves from monotonic through a hysteresis bifurcation to multiple
steady-state behavior. This can be shown clearly in Figure M9.11 where we find thaL as
we increase PIV, we move from monotonic to multiple steady-state behavior.
Sec. M9.7 Understanding Multiple Steady-State Behavior 579
380
370
"0>
~
"0
360
1" 350
~
~
340
0-
E
2 330
g
~ 320
~
310
300
275 280 285 290 295 300 305 310 315 320
jacket temperature, dog K
380
370
"
0>
~
"0
360
~
"
];;
350
~
0-
E 340
2
~
~
330
~ 320
310
300
290 292 294 296 298 300 302 304 306
feed temperature, dog K
400
380
360
~
I
0. 340
E
w
f-
320
300
280
0.2
0.4
0.6
0.8
FIV Temp..1
FIGURE 1\/19.11 Cusp catastrophe for the diabatic CSTR, Case 2 conditions.
The input/olltput (jacket tcmpcraturc/rcaclor temperature) behavior changes as
a functioh of the space velocity (NV).
In this module we have only been able to cover only a slllall part of the interesting behav-
ior that can occur in CSTRs due to nonlinear dynamics. In this section we provide a COII-
cise overview of other interesting topics in CSTR analysis. First (Section M9.8.1), we will
draw a connection between our physical-based approach (heat removal and generation
curves) for analyzing Illultiplicity behavior and the more mathematical bifurcation theory.
'rhen (Section M9.8.2), we will discuss the cffect of cooling jacket flowrate 011 the behav-
ior of a CSTR. l<'inally (Section M9.8.3), we discuss limit cycle behavior and HopI' bifur-
cations.
r"irsi, recall the lnathcmatical conditions for a bifurcation. Let x represent the sLate
variahle, p., a bifurcation parameter, and gCq..l) a single nonlinear algebraic equation thai
must be satisfied at steady~state. If the following bifurcation cOJ1(litions arc satisfied:
iJ'g
dx::' --- ...
and
then there exists k steady-state solutions in the vicinity of the bifurcation point.
In our case, we were ahle to write a single nonlinear algebraic equation that must he
satisfied for a steady-stale solution:
CXI1'-
Mo')
(-
j ()
V () - HI', _
where 7~\, is the slate variable (steady-stale reactor temperature) and /-L is used to represent
the vector of physical parameters that can possibly be varied.
The ~teady-slalc solution is obtained by solving:
or,
which is simply the intersection of the heat relllOvaJ and heat generation curves. 'rhc first
derivative condition:
is simply
iJQ",,,U:,JL) iJQ""U:,JL)
iJT, iJ'I',
These conditions arc satisfied hy curves Band J) in FigureM9.12 below. The slope condi-
tions arc satisfied at a high temperature for curve B anc! a low temperature for curve D,
and we directly see how a "limit point" on the input-output curve (Figure M9.12b) corrc-
582 Diabatic Continuous Stirred Tank Reactors Module 9
B 0 B o
Q
Tr
sponds to the heat generation and removal curves (f~'igurc M9.12a). We also note that the
following conclition also holds:
J2g(r,.I~)
I ()
aJ}
Since, although the sc.cond derivative of the heat rClllovallinc is always zero,
a2 QJl,m(T ,/.L)
1
en}
the heat generation curve is not at an inflection point:
()! Q"c.,J·(.iL)
t ()
DT\2
and we see that the conditions for saddle-node behavior arc satisfied.
Now we illustrate the conditions for a hysteresis bifurcation, which are:
(J)g(T"iL)
()
aT}
All of these conditions arc satisfied in f<igure M9.l3b on the next page. We show Figures
M9.13a and M9.13e to illustrate the progression to satisfying the bifurcation comlitions.
The progression shown in r'igure M9.13 involved a decrease in the heat transfer ca-
pability from a to c. 'fhis is also shown in the cusp diagram of Figure M9.l4, where there
is no hysteresis at high lJA values, the onset of hysteresis (bifurcation point) at an inter~
mediate value oflJA, and complete hysteresis behavior at low values ofUA.
Sec. M9.8 Further Complexities 583
Q
Tr
a.
Q Tr
b.
Q Tr
c.
0.8
0.6
d
~ 0.4
I-
0.2
o
1
0.5 --------.......
~---~~0-6--~O.8 1
0.4 .
UA o o 0.2
Temp-J
"rhe CSTR modeling equations have a large number of parameters. It is clear that these
parameters afC not independent. For cxarnplc, the behavior is dependent on the ratio FIV,
which call be considered a single parameter. Most of the analysis of CSTR bchavi~)r has
been performed on dimensionless equations, with a minimum number of dimensionless
parameters involved. One possible set of dimensionless parameters is shown in student
exercise 6. For a more complete discussion of the development and lise of dilncnsionlcss
equations, sec Aris (1994).
SUMMARY
Diabatic CS'l'Rs afC perhaps the most studicd unit opcration in thc chcmical process dy-
namics literaturc. They can exhibit exotic and interesting steady-state and dynamic behav-
ior, including: steady-state multiplicity, HopI' bifurcations, periodic behavior, and chaos.
In this module we have pnwided an elementary introduction to the steady-state and dy-
namic behavior of these systellls.
The reader is encouraged to usc MATLAB to "play with" the model (particularly
for the parameter sets for Cases I and 3) presented in this chapter.
Student Exercises 585
The following book docs an excellent job of developing the modeling equations for a dia-
bat;e CSTR:
[)iabatic CSTRs have been analyzed for complex behavior (multiple steady-slates, llopf
bifurcations, quasi-periodic, chaos) more than ;:my other chemical process. An excelleot
review of the literature on these topics is presented in the following paper:
The following book provides an excellent discussion of the lise of dimensionless models,
with adiabatic CSTR as a 1l1;:~jor example.
STUDENT EXERCISES
(- !:llJ)C Af F;) E
f3 ~~
7 -
V
1 'I ~
IU,,,
pC[l7j'o
UA V F
I) ~
4, ~ koe--Y q -~
dx)
,IT
dX 2
(IT
Student Exercises 587
where K(X,)
.. cc CX P (
1
and if the inputs arc at their steady-state values, the modeling equations arc:
dX I
d'T
dr)
{!'T
7. Consider a system with the following parameters. Show that steady-state tempera-
ture is 350 K, and the corresponding steady-state concentration is 0.5 gmolliiter.
Determine the number of steady-state solutions and their stability characteristics.
Generate a phase-plane diagnun.
Consider the response to ± 5 K changes in the jacket temperature. 1"01' one di-
rection you should find oscillatory behavior, while the other direction is stable. This
indicates thal a Hopf bifurcation (Chapter 16) occllrsfor some value of Tj between
295 K and 305 K. Find the value of Tj where this occurs (recall that a IJopf bifurca-
tion occur whell the complex eigenvalues have zero real portion.
F J 00 liters/min
\I ]00 liters
T ]00 K
I . __ J
ko' 111111 7.2 x 10 10
(cD.H), J/gll1o] 50000
EIR. K 8750
rei" JIIiter K 239
if. K ]50
CAl' kgmol/m:1 10
UA, J/min K 50000
8. C\msider the input-output transfer function matrix for a CSTR, G(s), from Section
M9.5.2. Find the clements of the lJ matrix corresponding to inputs 2 and 3, and the
resulting transfer functions for each of the Case 2 operating conditions. For the sta~
hie steady-states (low and high temperature) compare the step responses of
the transfer functions with those of the nonlinear SyStCIll. Use input changes of
± 0.1 molllll J and ± I deg K in inputs 2 (feed concentration) and 3 (feed tempcra-
ture), respectively. Remclnbcr that for comparison Oil the same plots you must con-
vert from deviation to physical variables ror the transfer function responses.
9. Orten cOllcentration measurements arc not available in chemical reactors. Show
how a steady~state energy balance around the reactor can be llsed to infer the rate of
reactioll, and therefore the "heat flow" of the reaction, til":::: rV(-6Jf). Think of two
ways: (a) assuming UA is known and the jacket outlet temperature is available, and
(b) assuming UA is unknown, but the jacket flowrate and jacket inlet and outlet
temperatures arc available.
588 Diabatic Continuous Stirred Tank Reactors Module 9
APPENDIXES
function £ = cstr_ss(x)
"o
% 2-state diabatic CSTR model
% Use [solve to find st<C?ady-state concentration and
temperature
kG eSTRPAR Ij
% frequency factor (9703*3600)
) ;
H_rxn - eS1'RJ'AH (2) ; % heat of reaction (5960)
E_act eS'I'R_PAR (3) ; % activation energy (11843)
rhocp eSTR_PAR (4) ; % density*heat cap. (500)
UA eSTR]AR(5) ; % ht trans coeff k area (150)
R eSTRPAH (6) ; % gas constant (1.987)
V cs'm PAR (7) ; % reactor volume (1)
F eSTR PAR(8); ~~ feed flowrate (1)
caf eSTR_PAR I ')) ; ;6 feed concentration (10)
Tf C:STRPAR (1 G) ; % fc;~ed temp(?rature (298)
cI'j es'm_pAR (11) ; % jacket temperature (298)
%
% ratios used in the equations
%
fov F/V;
UAoV - UA/V;
%
% modeling equations:
%
rate:::: kO*exp{--E_ act/(R*Temp)))'ca;
%
f (1) dcadt;
f (2) - dTdt;
qlobal
- CSTR- PAR
fov - F/V;
UAoV UA/V;
3 cstramat.m
°6 states
(b ca conCE~ntration of A, kqffiol/m"3
~6 Tc'mp - reactor temperature, deq K
% pararnet~er values
% cas(~ 2:
fov -;c: 1j
kO - 9703*3600;
H_rxn ~)960j
E __ act 11843 ;
rhocp 500i
'1'f 298;
caf - 10;
UAoV 150;
R 1.98'7;
1'j 298;
ks kO*exp(-E_act/IR*Temp));
592 Diabatic Continuous Stirred Tank Reactors Module 9
[t3,x3J - ode4S('cstr',O,lO,x03);
[t4,x4j oclo4S( 'cstr' ,0,lO,x04);
[t.5, x5] ode45 ( , C~3 tr ' , 0, 10, xO 5) ;
[t6,x6] ocle45 ('cstr' ,0, lO,x06);
[t'l,x'l] ode4S( 'cstr' ,0,lO,xO'l);
[tS,x8] ode4S('estr' ,O,lO,xOS);
[t9, x9] odc,4S (' cstr' ,0, 10,x09) ;
[tl0,xlO] ocle4'i('cstr',0,10,xOl0);
[tlI,xlI] odo4'i ('estr' ,0, 10,xOlI);
[lU,xl2] - ode4S( 'cstr' ,0, 10,x012);
[L12a,x12a] ::= ode45( 'cstr', O,lO,x012a);
[tU,xU] ocle45 ( 'estr' ,O,lO,x013);
lt14,x14] ocle45('cstr',0,10,x014);
[t15,x15] - ode4~)( 'cstr' ,0, 10,x015);
[U6,xl6] ocle4S('cstcr',0,lO,xOl6);
[tl'l,x17] ode4S('est:r' ,0,JO,x017);
[tIS,xlS] ocle4S( 'estr', O,lO,xOlS);
[tl9,x19] ode45( 'estr', 0,10,x019);
[t20,x20] ocle4S('estr',0,10,x020);
[t21,x2l] - ode4S('estr',0,10,x02J);
[t22,x22] - ocle4S( 'estr', 0, 10,x022);
x040 = [0.5;3'10];
x041 [0.5;372.5];
x049 [9.S;320];
xOSO = [9.S;326.2S];
xOSl [9.'5;32'7.S];
x052 [9.5;330];
xOS3 - [9.si332.S];
[t40,x40] = ode4S( 'estr', 0,10,x(40);
[t41,x4l] ode4S( 'estr', 0, JO,x04l);
[t49,x49] ode4S( 'estr' ,0, 10,x049);
[tSO,x50] ode45 ( 'estr', O,10,xOSO);
[t51,x51] ode45( 'cst,r' ,O,lO,x051};
[t~52,x52] - ode45 ('cstr' ,O,lO,x052);
[t53, x53] ode45 ( 'cstr' ,0,10, x053) ;
% phase-plane plot
plot ( [8 . 564] , [31] .2] , 'wo' , [S. 518] , [339. 1] , 'w+ ' , [2 .3 S 9 ] ,
[368.1], 'wo')
%
% some initial conditions noL used
1; x030 [5.768;339.1];
% x031 = [S.368;339.1l;
% x032 (5.518;338.5];
% xG33 [5.518;339.71;
'I) [t30,x30J ode4~)( 'cf-;tr' ,0, lO,x030);
9(, [t_3l,x31] ode45('cstr' ,O,IO/x(31) i
% [t32,x32] - ode4[j{ rest.r' ,O,lO,x032) ;
% [t33,x33]" ode45('csLr',O,lO,x033);
%
plot (x4 0 ( : , 1) ,x4 0 ( : ,2I, 'w' ) ;
plot (x41 ( : ,1) ,x41 ( : ,2) , 'w' ) ;
plot(x49 (: ,1) ,x49 (: ,2), 'w');
plot(xSO(:, 1) ,xSO(: ,2), 'w');
plot(x'51(:, 1) ,xSl(: ,21, 'w');
plot(x52.(: ,1) ,x52 (: ,2) I 'w');
plot (x53 ( : ,1) Jx53 ( : ,2) , 'w I ) ;
% cst.r cusp.m
% generates the cusp diagram, based on case 2 parameters
%
case2;
%
clear 'I'empr Tj s 'rfs cones;
Tempr ~ 280:5:400;
'is vary UA or F
npts c= length (Tempr) ;
CSTR]AR(81 ~ 0.1;
F--pI t = ones (npts) *CS~'ICPAR(8 I ;
[T] S 'ris cones J : : : c8tr io (Tempr) ;
I I
p1ot3(F_plt,Tjs,Tempr, 'w-'I
hold on
for kindex = 1:9;
CSTR_PAR(8) 0.1+ O.l*kindex;
F_plt = ones (nptsl *CSTR_PAR(8);
[Tjs,Tfs,concs] ~ cstr_io{Tempr);
plot3 (F_Vlt,Tjs,Tempr, 'w-')
end
hold off
% axis([0.25 1.375 260 360 300 380JI
axis([O.l 1.0 220 400 280 400J)
view(60,20)
xl abel ('F/V')
ylabc,I ( , Temp~j , )
zlabe1 ( 'Temp_r' I
MODULE
IDEAL BINARY DISTILLATION
10
M10.1 BACKGROUND
Distillation is a common separation technique for liquid slre-anlS cOlltaining two or more
components and is one of the more important unit operations in chl~mical manufacturing
processes. Design and control of distillation is important in order to produce product
streams of required purity, either for sale or for lise in other chemical processes.
597
598 Ideal Binary Distillation Module 10
vapor
y
x
FIGlJH:E !VItO. I Closed system \vith
liquid
liquid and vapor in cquiJibrililn.
O.B
w
00
'"
cQ 0.6
"'"
0,
> OA
:';;
02
0.5
FIGURE i\:IlO.2 Vapor/liquid
x, liqUid phase light component equilibrium diagram.
Sec. Ml0.2 Conceptual Description of Distillation 599
For ideal mixtures, it is cOlllmon to model the phase equilibriulll relationship based
on constant relative volatility
o:x
}'= (MIO.I)
. I + (o:-I)x
where (~is known as the relative volatility. FigurcMIO.2 was generated based 011 equa-
tion (M 10.1) with (X ~ 2.5.
Condenser
(Heat removed from condenser)
Overhead receiver
_...-'::=r=::.-=-----...
Reflux Distillate Product
Feed
Stream -----1>1 NF
Vapor Boil-up
NS (Heat added
to Reboller)
Bottoms Product
W
E
8c
,
o
o
FIGUIU: 1\'110.4 Schematic diagraol
for it distillation C()lumn tray.
centratcd amount of the heavy component), while the rest is vaporized in the rcboiler and
returned to the column.
'file liquid from one tray goes over a weir and cascades down to the next tray
through a downcomcr. As the liquid moves across a tray, it comes in contact with the
vapor from the tray below. The schematic diagram for a sieve tray is shown in Figure
MUlA.
Generally, as the vapor from the tray below comeS in contact with the liquid, turbu-
lellt mixing is promoted. Assuming that the mixing is perfect, allows one (0 IlHldcl the
stage as a lumped parameter system, as shown in !·'igurc M 10.5. Notice that the vapor
fronl stage i is modeled as a single stream with molar flowrate Vi and light component
vapor composition (mole fraction) Yi' The liquid leaving stage i through the downcomer is
modeled as a single stream with molar fJowrate Li and light component liquid composi-
tion (mole haction) xi'
The conceptual diagram for the feed stage is shown in Figure MIO.6. It differs from
Figure M 10.5 in that an additional input to the stage is from the feed to the column.
The component balance for the liquid phase of a lypical stage as shown in Figure
MIO.S is:
accumulation liquid frolll vapor from liquid vapor
tray above tray below leaving leaving
dNlrt i
(M 10.2)
dl
(MI0.3)
and that the liquid leaving the stage is equal to the liquid flowing from olle stage ahove:
(MIOA)
Let {{F' represent the quality of the fccdstrcam. If the feed is a saturated liquid, thcn qF =: (,
while 'iF ~ 0 fbr a saturated vnpor. The vapor molar f10wratc leaVing the feed stage is
(where NF =: number of the feed stage)
(M 10.5)
Similarly, the liquid molar nowrate of the slrcanl leaving the feed stage is:
(M I0.6)
M10.3.3 Condenser
A total condenser removes cnergy from the overhead vapor, resulling in a saturated liq-
uid. Assuming a constant molar holdup in the distillate receiver, the total liquid nowrate
from the distillate receiver (reflux + distillate flows) is equal to the nowrate of the vapor
frotH the top tray:
V2 (MI0.7)
where Lv and D represent thc reflux and distillate molar nowratcs, respectively.
602 Ideal Binary Distillation Module 10
M10.3.4 Reboiler
Ii = L NS _ 1 - Vrehoi1er (MIO.8)
where Vreboilcr is the reboiler molar llowrate and B is the bottoms product molar flow rate.
The rectifying section (top section of column, above the feed stage) liquid molar nowrates
arc:
L R = L{) (MIO.9)
The stripping section (bottom section of column, below the feed stage) liquid molar
flowratcs are
(MIO.IO)
The stripping section vapor molar flow rates are:
(MIO.II)
The recti fying section vapor molar flowrates arc:
(MIO.l3)
dX j =
dX NF
(MIO.IS)
dl
The rectifying section component balance is (from i = NF+l to NS-I):
"Xi 1 [
dt = M Lx 'S i
(MIO.16)
r
And the rehoiIer component baLance is:
dxNS' = 1
c
Sec. M10.4 Solving the Steady-State Equations 603
EQUILIBRIUM RELATIONSHIP
It is assumed that the vapor leaving a stage is in equilibrium with the liquid on the stage.
The relationship between the liquid and vapor phase concentrations on a particular stage
can be calculated using the constant relative volatility expression:
O'X i
y-= (MIO.18)
, I + (IX - I )x,
To obtain the steady-state concentrations we must solve the system of equations, f(.\') :;:: O.
From the overhead recci vcr component balance:
I, ~ y,~X, ~ 0 (M 10.19)
ex 1.5
F ::: 1 mol/min
zr 0.5 mole fraction of light component
R 2.706 mol/min
D "'" 0.5 mol/min
qF 1 (sat'd liquid feed)
604 Ideal Binary Distillation Module 10
The resulting compositions are shown in Figure M 10.7. Notice the strong sensitivity to rellux
flowrate.
nominal
_-J
08 [_~ __:_ ~11 O~O,, _
0.0.6
E
8
:c
£>04
0.2
5 10 15 20 25 30 35 40
stage
'Che overhead composition (stage I) is 0.90 and the bolJOllls composition (stage 41) is 0.0 I for
tile nominal rcllux rate (2.706mollmin).
but small when the reflux is greater than 2.71 1l1OlImin. 'T'hc opposite relatiollship holds for bot-
toms composition, where the gain is small when reflux is Jess than 2.7 mol/min, but large for n.>
flux greater than 2.71 mol/min. This sensitivity has important nnnificati{)HS for control system
design.
~ 0.95
0.06
~ 0.04
0.02
Equations (M IO.I3)--(M 10.17) arc a set of initial value ordinary equations, which can he
solved using numerical integration techniques. 'rile next example L1ses the variable step
size MATLAB routine ode4 5 to perform the intcgratiOlL
To illustrate the nonlinear behavior we compan.' the results of J-, I (j{ step changes in the reflux
rate at time t:;:: 5 minutes.
Note that the currenl version of ode4 5 docs 1101 allow model p,lnullClerS to be passed through
the argument list, so global parameters afC defined in the m-filc dis L_dyn. m shown in the Ap-
pendix.
The following results arc shown in l;'igurc MIO.9. A positive lr;::- step change in the reflux
rate yields a snlal! increase in the distillate composition; tbis makes since because the maximum
possible increase in distillate purity is (J.()J (the composition cannot he greater than I mole hac
lion) while it call decrease much more than that. A negative J (J{ step change ill reflux causes a
larger change in the distillate purity. 'fhe opposite effects arc observed l~)r bottoms composition,
where a positive reflux change yields a large bottoms composition change. A negative reflux
change yields a small bottoms composition change.
0.98
~
0.96
0.94
o 50 100 150 200 250 300 350 400
time, min
0.06
0.04
?
0.02
o
o 50 100 150 200 250 300 350 400
time, min
Linear state space models arc useful for slability analysis and control system design. Here
we develop models of the (orm:
x ,- A x' t n u' (M 10.24)
where! is used to represent the deviation variables. Xl :;:;: X -- x~, u' ;:;;: u -- u.\ (the subscript S
indicates the steady-state values). Defining
I( =
av.' = 0'.
(MIO.26)
, ilx; (I+«I-I)x)'
and linearizing the dynamic equations (M IO.13)--(M IO.I?)
(M 1(27)
V/JC
(M 1(28)
A11)
.;01' i = 2 to NF-] :
ill; (M 10.29)
JX i 1 M[
(M 10.30)
ill; VnJ(; I
(MI031)
Au I I = -)
(-t'i+ 1 I'vf/
illy/
ANF,NF I (MI032)
JXA'V_I
ill" (MIO.33)
()x NP
ill,,· V)<',/
(M I 0.34)
A,V/<Nr+ I
dX,vF' I M,
Fori=NF+1 toNS-I:
(If; (ivlIO.35)
ax; 1 M[
(M 10.36)
A NS,NS-l ."C:_-
at; (M 10.38)
O.li_ I Mil
ANS,NS
_(13 + V,K N ,)
(M 10.39)
MlJ
Now, for the derivatives with respect to the inputs; ttl ;;;;: LR ;;;;: L! and Ill:::: Vii'::::: VrehoJler:
aj, 0 (M IOAO)
B,.2
au?
For i = I to NS-I:
.
aj; Yil
-
(MIOAI)
Mr B'.2 OllZ Mr
anel for the bottom stage:
Even simple ideal binary distillation columns have been shown recently to have interest-
ing steady~state and dynamic behavior, including multiple steady-states. Nice cxalnples
are shown by Jacobsen and Skogestad (1991, 1994). The key assumption that must be
made for this behavior to occur is that mass flows, rather than molar flows, arc manipu-
References and Further Reading 609
lated. The reader is encouraged to read these papers and modify the MArLAB m-files
presented in this chapter to illustrate the behavior shown by Jacobsen and Skogestad.
SUMMARY
In this chapter wc have dcveloped modeling equations to dcscribe tile steady-state and dy-
namic behavior of ideal, binary distillation COIUlllllS. The 41-stagc column example shows
that stcady-statc distillate and bottom compositions arc a nonlinear function of the manipu-
lated inputs (distillate and vapor boil~up flows). Also, the dynarnic responses or these COll1-
positions depends on the magnitude <lnd direction of changes in the manipulated inputs.
The following undergraduate chelnical engineering texts develop the steady-state model-
ing equations ror ideal binary distillation:
King, C,J. (1980). 5,'cparatiolls Processes. 2nd cd. New York: McCiraw-l-lill.
McCabe, W.L., & J.e. Smith. (1976). Un;f Operations (?F Chemlt.-ol EJlgineering,
3rd cd. New York: McGraw-Hill.
L.uyben, W.L. (J 990). Process A1odding, Simulation 01/(1 COlltrol.!iJr Chemical h,'l1-
gineers, 2nd cd. New York: McGraw-HilI.
More advanced treatments of stcady-st::lte and dynamic distillation models arc prescnted by:
The panlllleters for Example M I0.1 are presented in the following two references:
Skogestad, S., & M. Morari. (1988). Understanding the dynamic hehavior of disljl~
lation columns. /ild. 6·lIg. Choll. Res., 27( 10): 1848-1862.
Morari,M., & E. Zafirioll. (1988). Robust Process Control. Englewood Cliffs, NJ:
Prentice-Hall.
The possibility of multiplc steady-state behavior in ideal binary distillation is presented by:
Jacobsen, E.W., & S. Skogestad. (199 J). Multiple steady~stales in ideal two~product
distillation. A/ChE.I., 37(4): 499-511.
Jacobsen, E.W., & S. Skogcstad. (1994). Instability or distillation columns. A/ChE
.1.,40(9): 1466-1478
610 Ideal Binary Distillation Module 10
STUDENT EXERCISES
1. Consider a simple I tray (3 stage) column with the overhead condenser as stage I,
the feed tray as stage 2 and the reboilcr as stage 3. Usc the following parameters and
inputs:
5
R = 3 mol/min
ifF = I
F 1 mol/min
lJ = 0.5 mol/min
Zp = 0.5 mole fraction of light component
Find the bottoms product Jlowratc, the stripping section flowratc and the vapor boil-
up rate (stripping section vapor Ilowrate). Usc fsolve and dist_ss.m to find
the resulting compositions:
0.78
0.08
0.7
S 10 is
time time
APPENDIX
%
% DIST~PAR is a vector of distillation column parameters
% used by both dist sS.m and dist~dyn.m
%
if 1engthIDIST_PAR) < 8;
disp ( not enough parametlC':rs given in
I DIST~PAR ')
disp (' ')
disp (' check to SQe that global DIS'I' PAR ha;" bCE"n defined ')
return
end
%
alpha DIST_PAR(l) ; 96 relative volatility 12. OJ)
ns DIST_PAR(2) ; % total number of stages (3 )
nf DIST~PAR(3) ; % feed stage (2 )
feed DIS'r_PAR (4) ; % feed flowrate (1 )
zfeed ~ DIST_PAR('j) ; % feed cc)mposition, Liqht comp (0.5)
qf IJIST_PAR I 6) ; % teed quality ( l sat'd liqd,
% 0 = sal'd vapor) (1)
reflux DIST PAR(7) ; % reflux flowrate (3 )
vapor - D151'.. PAR(8) ; ~) rE'-"boiler vapor flowrat.e ( 3 . 'j )
%
% DIS'I'_PAR(9:19) used by dist_dyn.m (distillation dynamics)
% dist = distillate product flowrate
612 Ideal Binary Distillation Module 10
return
end
1;
% zero the function vector
%
f :::;: zeros(ns,l) i
%
% calculate the equilibrium vapor compositions
%
for i=l:nsi
y(i)=(alpha*x(i))/(l.+(alpha-l.l*x(i));
end
9"
% material balances
%
% overhead receiver
%
f (1) = (vr*y(2) - (dist+xeflux) *x(I));
%
% rectifying (top) section
Appendix 613
'r,
for i";2:nf-l;
flil=lr*xli-ll+vr*yli+ll-1r*x(il-vr*yli) ;
end
%
% feed stage
f Infl lr*x{nf-l)+vs*y{nf+ll-ls*x(nfl-
vr*y(nf)+feed*zfeed;
%
% stripping (bottom) section
~;
for i=n£+1:n5-1;
flil ls*x(i-l)+vs*Yli+l)-ls*xli)-vs*y(il;
end
%
% reboiler
%
f(ns)=(ls*xlns-l)-lbot*x(ns)-vs*y(ns));
dist dyn.m
%
7; DIST _PAR is a vector of distillation column parameters
% used by both dist 88.m and dist_dyn.m
614 Ideal Binary Distillation Module 10
reflux reflux,i;
else
refLux refluxi + sLepr;
('Ond
if t < tstepv;
vapor vapor i;
else
ViJ.por vapori sLepv;
end
if t: < tsLepzf;
zfeed. - zf(:,-cdi;
else
zfeed - zfeedi + stepzf;
end
%
if t < tstepf;
feed feec1i;
else
feed feec1.i t- SLOpr
end
if di;:3t: < 0
disp('error in specifications, distillate flow < D')
return
end
if lbat < 0
disp{'error in specifications, strippin9 section ')
disp (' 'I
disp ( 'liquid flowrate is Df:~gative ')
return
end
617
618 Index
Washout, 540
Taylor series, 60, J 09
'fhcrmodynamics, 31 Zeros
Tolerance, 55 algebraic equation, 63
absolute, 55 of a transfer function, 22R
relative, 55 righ{~half plane, 229
plug into
Thank you for purchasing this Prentice Hall VIR book. As a professionaC we know
that having information about the latest technology at your fingertips is essential.
Keep up-to-date about Prentice Hall PTR 011 the World Wide Web.
Each month, subscribers to our mailing lists receive two ('-mi.lil messages high-
lighting recent releases, author events, }1('\V content on the Prentice [Iall p'rR web
sill\ and \vhcre to meet us at professional meetings. Join one, a few, or all of our
mailing lists in targeted subject areas in Computers and Engineering.
Process Dynamics
Modeling, Analysis, and Simulation
B. , Wayne Bequette
With an emphasis on numerical methods and the dynamic nature of chemical processes,
Process Dynamics covers:
Special review and learning modules further integrate the software applications with the
key text concepts. End-of-chapter exercises complement the more extensive case studies
at the end of the book. Practical, comprehensive, and easy to use, Process Dynamics:
provides a thorough treatment of this complex subject.
ISBN 0-13-206889-3
90000
PRENTICE HALL
Upper Saddle River, NJ 07458
http://www.phptr.com 9780132 068895