Vous êtes sur la page 1sur 632

..

..
B. Wayne Bequette
Process Dynamics
Modeling,
Analysis,
and
Simulation
Prentice Hall International Series
in the Physical and Chemical
Engineering Sciences
PRENTICE IIALL INTERNATIONAL SERIES
IN THE PHYSICAL AND CHEMICAL ENGINEERING SCIENCES
NEAL R. !\i\lUNDSON, SE!{IES liDITOR, Un/verst!.\' t?!1foIlS!Ofl
AnVISORY E1JJTORS
ACRIVOS, S{(l!!(oI'r! Unil-'ersify
JOHN DMII,ER, University (d'IVlillllesO{{/
H. SC'(rlT FOGIJ]{, Unil'CI"sity
'T'1l0MAS J. IIANKATTY, University (?( fllil/oi,\'
JOHN M. Univcrsily (?FCa!i;(omia
L. E::. SCRIVEN, University 1?(Minl/csota
Bi\LZlllSER, S;\:-'IUEJ.S, Mm 1-::l.uASSEN Chemical !'.lIgilleaing ThennodYl/tllllics
Br',QUFTrl:: Process Oynamics: A1odcling, Analysis, and Simulatio/l
BWUU.:R, CiROSS\-\i\NN, AND WESTERBERG Sy.l"tcmafh' iHethods rd' Chemica! Process J)esij{11
CROWL and 1,()(JVA1{ Chemica! Process Sq(ety
DFNN Process' Fl/lid lvlec!wlI/c"S
[;'OGLER {:lemcfI!s q(Cllcmical Rcaction Engineering, 2nd
HANNA AND SANDA[J COll/putatiolla! Methods ill ChclIIical Engineering
Basic Principles {{lid C(llcl/larions ill Chemical Engincering, 6th editioll
HINES i\!>il) MADDOX Mass Tnl/lsjt'r
KYLE Chemical and Proces..,. '1henllodyl1amics, 2nd edition
NEWMAN Efectmchc/Ilical Systcms, 2nd edition
PR;\tJSNll/., LICIITFNTI-lMJ',R, and DL A/.l'VEDO Molecular Thermodynamics
Eqlli/ihria, 2nd cdition
PHrNTlC:E Elec!rochcmical Ellgincering Principles
STEPHANOI'OULOS Chemical Process COlltrol
AND MOllF.!J. Thermodynamics (lnd Its /\pplicatio/ls, 3rd edition
TURTON Analysis, SrI/thesis, and Design Processes
PROCESS DYNAMICS
Modeling, Analysis, and Simulation
B. Wayne Bequette
Rensselaer Polytechnic Institute
To join a Prentice Hall PTR Internet mailing list, point to:
http://www.prenhall.com/maiUists/
Prentice Hall PTR
Upper Saddle River, New Jersey 07458
97 36053
elP
Library of Congl'l'ss Data
Bequette, B, Wayne.
Process dynamics: modeling, analysis, and simulation / B, Wayne
Bequette.
p. ern.
Includes bibliographical references and index,
ISBN
1. Chemical procc%es. I. Tille.
TPI55,7.B45 1998
(j6()',2X4'OI185---dc21
Acquisitions editor: Bernard M. Coodwin
Cover design direcloc Jerry Votta
Manufacturing manager: Alexis R. Heydt
lvlilfketing Jnanllger: tvli1es Williams
Compositor/Production services: Pinc Tree Composition, Inc.
(D 1998 by Prentice Hall PTR
Prentice-Hall, Inc.
A Simon & Schuster Company
Upper S,\dd\c River, Nnv Jersey 07458 .
Prentice Hall books arc widely"used by corporations anu
govel'lllllent agencies for training, marketing, and resale.
The publisherofkrs discoullts on this hook when ordered
in bulk quantities. For more information contact:
Corporate Sales Department
Phone: 800-382-3419
Pax: 201-236-7141
E-mail: corpsalcs@prenhall.com
Or write:
Prentice I-fall PTR
Corp. Sales Dept
One Lake Sircet
Upper Saddle Rivcr, New Jersey 07458
AI! rights reserved. Nl.J part of this book mily be rcpf(l(luced, ill any forlll
or by any means, without permission in writing from the publisher.
Printed in the United St,l!cs of Alllerica
10 9 8 7 6 5 4 J 2
ISBN: 0-13-206889-3
Prentice-Hall Intcrnational (UK) Limited, LOlldoll
Prcnticc-Hall oj" Australia Ply. Limited, Sydlley
Prenlice-Hall Canada Inc.. Toronto
Prcntiee--Flall HispanOimlcricana, 5.A., Mexico
Prentice-Hall of India Private Limited. N('\\, IJdhi
Prenlice-Hall of Japan, Inc" lilkyo
Simon & Schuster Asia Pte. Ltd., Singapore
Editora Prcnticc--Hall do Brasil. LtdH., Rio de .falleiro
CONTENTS
Preface XVII
SECTION I PROCESS MODELING 1
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
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
SECTION II NUMERICAL TECHNIQUES 49
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
Contents
3.6 MATlAB Routines for Systems of Nonlinear Algebraic Equations 70
Summary 71
Further Reading 72
Student Exercises 73
Appendix 78
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
SECTION III LINEAR SYSTEMS ANALYSIS 103
5 linearization of Nonlinear Models: The State-Space Formulation 105
5.1 State Space Models 106
5.5.1 General Form of State Space Models 108
5.2 Linearization of Nonlinear Models 109
5.2.1 Single Variable Example 109
5.5.2 One State Variable and One Input Variable 110
5.2.3 Linearization of Multistate Models 112
5.2.4 Generalization 114
5.3 Interpretation of Linearization 117
5.4 Solution of the Zero-Input Form 119
5.4.1 Effect of Initial Condition Direction
(Use of Similarity Transform) 120
5.5 Solution of the General State-Space Form 127
5.6 MATlAB Routines step and initial 127
5.6.1 The MATLAB step Function 129
5.6.2 The MATLAB initial Function 129
Summary 130
Further Reading 131
Student Exercises 131
ix
x Contents
6 Solving Linear nth Order ODE Models 142
6.1 Background 143
6.2 Solving Homogeneous. Linear ODEs with Constant Coefficients 145
6.2.1 Distinct Eigenvalues 146
6.6.2 Repeated Eigenvalues 148
6.2.3 General Result for Complex Roots 152
6.3 Solving Nonhomogeneous. Linear ODEs with Constant Coefficients 152
6.4 Equations with Time-Varying Parameters 154
6.5 Routh Stability Criterion-Determining Stability Without Calculating
Eigenvalues 157
6.5.1 Routh Array 157
Summary 160
Further Reading 161
Student Exercises 161
7 An Introduction to laplace Transforms 168
7.1 Motivation 168
7.2 Definition of the Laplace Transform 169
7.3 Examples of Laplace Transforms 170
7.3.1 Exponential Function 170
7.3.3 Time-Delay (Dead Time) 172
7.3.4 Derivations 173
7.3.5 Integrals 173
7.3.6 Ramp Function 174
7.3.7 Pulse 174
7.3.8 Unit Impulse 176
7.3.9 Review 177
7.4 Final and Initial Value Theorems 177
7.5 Application Examples 178
7.5.1 Partial Fraction Expansion 179
7.6 Table of Laplace Transforms 185
Summary 187
Further Reading 187
Student Exercises 187
8 Transfer Function Analysis of First-Order Systems 190
8.1 Perspective 191
8.2 Responses of First-Order Systems 191
8.2.1 Step Inputs 193
8.2.2 Impulse Inputs 198
8.3 Examples of Self-Regulating Processes 200
8.4 Integrating Processes 206
Contents
8.5 Lead-Lag Models 208
8.5.1 Simulating Lead-Lag Transfer Functions 209
Summary 211
Student Exercises 211
9 Transfer Function Analysis of Higher-Order Systems 215
9.1 Responses of Second-Order Systems 216
9.1.1 Step Responses 217
9.1.2 Underdamped Step Response Characteristics 221
9.1.3 Impulse Responses 222
9.1.4 Response to Sine Inputs 224
9.2 Second-Order Systems with Numerator Dynamics 226
9.3 The Effect of Pole-Zero Locations on System
Step Responses 228
9.4 Pade Approximation for Deadtime 230
9.5 Converting the Transfer E;unction Model to State-Space Form 232
9.6 MATLAB Routines for Step and Impulse Response 234
9.6.1 step 234
9.6.2 impulse 236
Summary 236
Student Exercises 237
10 Matrix Transfer Functions 247
10.1 A Second-Order Example 248
10.2 The General Method 251
10.3 MATLAB Routine ss2tf 252
10.3.1 Discussion of the Results from Example 10.2 255
Summary 257
Student Exercises 257
11 Black Diagrams 261
11.1 Introduction to Block Diagrams 262
11.2 Block Diagrams of Systems in Series 262
11.3 Pole-Zero Cancellation 263
11.4 Systems in Series 267
11.4.1 Simulating Systems in Series 267
11.5 Blocks in Parallel 269
11.5.1 Conditions for Inverse Response 271
11.6 Feedback and Recycle Systems 273
11.7 Routh Stability Criterion Applied to Transfer Functions 276
11.7.1 Routh Array 277
11.8 SIMULINK 278
xi
xii Contents
Summary 279
Student Exercises 280
12 Linear Systems Summary 282
12.1 Background 283
12.2 Linear Boundary Value Problems 283
12.3 Review of Methods for Linear Initial Value Problems 287
12.3.1 Linearization 187
12.3.2 Direction Solution Techniques 288
12.3.3 Rewrite the State-Space Model as a Single nth Order Ordinary
Differential Equation 289
12.3.4 Use Laplace Transforms Directly on the State-Space Model 290
12.4 Introduction to Discrete-Time Models 290
12.4.1 Discrete Transfer Function Models 291
12.5 Parameter Estimation of Discrete Linear Systems 295
Summary 297
References 297
Student Exercises 298
SECTION IV NONLINEAR SYSTEMS ANALYSIS 301
13 Phase-Plane Analysis 303
13.1 Background 304
13.2 Linear System Examples 304
13.3 Generalization of Phase-Plane Behavior 311
13.3.1 Slope Marks for Vector Fields 313
13.3.2 Additional Discussion 315
13.4 Nonlinear Systems 316
13.4.1 Limit Cycle Behavior 323
Summary 324
Further Reading 324
Student Exercises 324
14 Introduction Nonlinear Dynamics: A Case Study of the Quadratic Map 331
14.1 Background 332
14.2 A Simple Population Growth Model 332
14.3 A More Realistic Population Model 334
14.3.1 Transient Response Results for the Quadratic
(Logistic) Map 335
14.4 Cobweb Diagrams 339
14.5 Bifurcation and Orbit Diagrams 342
14.5.1 Observations from the Orbit Diagram (Figure 14.14) 342
Contents
14.6 Stability of Fixed-Point Solutions 344
14.6.1 Application of the Stability Theorem
to the Quadratic Map 344
14.6.2 Generalization of the Stability Results
for the Quadratic Map 346
14.6.3 The Stability Theorem and Qualitative Behavior 346
14.7 Cascade of Period-Doublings 348
14.7.1 Period-2 348
14.7.2 Period-4 351
14.7.3 Period-n
14.7.4 Feigenbaum's Number 353
14.8 Further Comments on Chaotic Behavior 354
Summary 354
References and Further Reading 355
Student Exercises 356
Appendix: Matlab M-Files Used in This Module 358
15 Bifurcation Behavior of Single ODE Systems 360
15.1 Motivation 360
15.2 Illustration of Bifurcation Behavior 361
15.3 Types of Bifurcations 362
15.3.1 Dynamic Responses 365
Summary 376
References and Further Reading 376
Student Exercises 377
Appendix 379
16 Bifurcation Behovior of Two-State Systems 381
16.1 Background 381
16.2 Single-Dimensional Bifurcations in the Phase-Plane 382
16.3 limit Cycle Behavior 384
16.4 The Hopf Bifurcation 388
16.4.1 Higher Order Systems (n > 2) 391
Summary 392
Further Reading 392
Student Exercises 392
17 Introduction to Chaos: The Lorenz Equations 395
17.1 Introduction 396
17.2 Background 396
17.3 The Lorenz Equations 397
17.3.1 Steady-State (Equilibrium) Solutions 398
xiii
xiv Contents
17.4 Stability Analysis of the Lorenz Equations 399
17.4.1 Stability of the Trivial Solution 399
17.4.2 Stability of the Nontrivial Solutions 400
17.4.3 Summary of Stability Results 301
17.5 Numerical Study of the Lorenz Equations 402
17.5.1 Conditions for a Stable Trivial (No Flow) Solution 402
17.5.2 Stable Nontrivial Solutions 403
17.5.3 Chaotic Conditions 405
17.6 Chaos in Chemical Systems 407
17.7 Other Issues in Chaos 409
Summary 410
References and Further Reading 410
Student Exercises 411
Appendix 412
SECTION IV REVIEW AND LEARNING MODULES 413
Module 1 Introduction to MATlAB 415
M1.1
M1.2
M1.3
M1.4
M1.5
M1.6
M1.7
M1.8
M1.9
M1.10
M1.11
M1.12
M1.13
M1.14
Background 416
Using This Tutorial 416
Entering Matrices 417
The MATLAB Workspace 419
Complex Variables 421
Some MATLAB Operations 421
Plotting 422
More Matrix Stuff 426
FOR Loops and IF-THEN Statements 427
m-files 428
Diary 430
Toolboxes 430
Limitations to Student MATLAB 431
Contacting Mathworks 431
Student Exercises 432
Module 2 Review of Matrix Algebra 435
M2.1 Motivation and Notation 436
M2.2 Common Matrix Operations 436
M2.3 Square Matrices 440
M2.4 Other Matrix Operations 448
Summary 450
Student Exercises 450
Contents
Module 3 Linear Regression 452
xv
M3.1
M3.2
M3.3
M3.4
M3.5
Motivation 452
Least Squares Solution for a Line 454
Solution for the Equation of a Line Using
Matrix-Vector Notation 455
Generalization of the Linear Regression Technique
MATLAB Routines polyfit and polyval 458
456
Module 4 Introduction to SIMUlINK 464
M4.1
M4.2
M4.3
Introduction 464
Transfer Function-Based Simulation
Printing SIMULINK Windows 469
466
Module 5 Stirred Tank Heaters 471
M5.1
M5.2
M5.3
M5.4
M5.5
M5.6
M5.7
Introduction 471
Developing the Dynamic Model 472
Steady-State Conditions 475
State-Space Model 475
Laplace Domain Model 477
Step Responses: Linear versus Nonlinear Models
Unforced System Responses: Perturbations
in Initial Conditions 483
478
Module 6 Absorption 490
M6.1 Background 490
M6.2 The Dynamic Model 491
M6.3 Steady-State Analysis 495
M6.4 Step Responses 496
M6.5 Unforced Behavior 501
Module 7 Isothermal Continuous Stirred Tank Chemical Reactors 506
M7.1
M7.2
M7.3
Introduction 506
First-Order Irreversible Reaction
Van de Vusse Reaction 516
507
Module 8 Biochemical Reactors 529
M8.1 Background 529
M8.2 Modeling Equations 530
M8.3 Steady-State Solution 534
M8.4 Dynamic Behavior 535
xvi
M8.5 linearization 536
M8.6 Phase-Plane Analysis 539
M8.7 Understanding Multiple Steady-States 540
M8.8 Bifurcation Behavior 549
Module 9 Diabatic Continuous Stirred Tank Reactors 559
Contents
M9.1
M9.2
M9.3
M9.4
M9.5
M9.6
M9.7
M9.8
M9.9
Background 560
The Modeling Equations 561
Steady-State Solution 563
Dynamic Behavior 565
linearization of Dynamic Equations 567
Phase-Plane Analysis 571
Understanding Multiple Steady-State Behavior
Further Complexities 580
Dimensionless Model 584
572
Module 10 Ideal Binary Distillation 597
M10.1 Background 597
M10.2 Conceptual Description of Distillation 599
M10.3 Dynamic Material Balances 601
M10.4 Solving the Steady-State Equations 603
M10.5 Solving the Nonlinear Dynamic Equations 605
M10.6 State-Space Linear Distillation Models 606
M10.7 Multiplicity Behavior 608
Index 617
PREFACE
An understanding of the dynamic behavior of chemical processes is ilnportant from bolh
process design and process control perspectives. It is easy to design a chemical process,
based on considerations, which is practically uncontrollable when the process
dynamics arc considered. The current status of computational hardware and software has
made it easy to interactively simulate the dyo<:unic behavior of chemical processes.
It is comJllon for process dynamics to he included as the introductory portion of a
process control textbook, however, there afC a number of limitations to this approach.
Since the emphasis of most or the textbooks is on process control, there is too little space
to give adequate depth to modeling, analysis, and sinwlatioll of dynamic systems. The
focus tends to he on transfer models that arc used for control systenl de-
sign. The prime motivation for my textbook is then to provide a more comprehensive
treatment of process dynamics, including modeling, analysis, and simulation. This text-
book evolved from notes dcvelopcd for a course on dynamic systems that I have becn
teaching at Rcnsselaer since 199 I. Vie have been fortunate to have a
qucnee in dynamics and control, allowing more depth to the coverage of each topic.
Topics covered here that arc not covered in a traditional text include nonlinear dy-
namics and the usc of MATLAB for numerical analysis and simulation. Also, a
cant portion of the text consists of review and learning modules. learning module
provides model development, solutions, nonlinear dynamic results,
ization, state space and transfer function analysis and simulation. The motivation for this
approach is to allow the student to all of the concepts, rather than
ing theIII independently (and not understanding the connections between the different
methods).
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.htmI
Additional learning modules will also be available at the RPI location.
A few acknowledgments arc in order. A special thanks to Professor Jim Turpin at
the University of Arkansas, who taught me the introductory course in process dynamics
and control. I-lis love of teaching should be an inspiration to us all. Many thanks to one of
my graduate students, Lou Russo, who not only made a numher of suggestions to improve
the text, but also sparked an interest in many of the undergraduates that h;:lVe taken the
course. The {(Isk of developing a solutions manual has heen carried out by Venkatcsh
Natarajan, Brian Aufderheide, l<amcsh Rao, Vinay Prasad, and Kevin Schott.
Prelinllnary dratls of' many chapters werc developed over cappuccinos at the Daily
Grind in Albany and Troy, Bass Ale served at the El Dorado in ~ y promoted discus-
sions about tcaching (and other somewhat unrelated topics) with my graduate students;
the effect of the many Buffalo wings is still unclear. Final revisions to the textbook were
done under the influence of cappuccinos at Cafe Avanti in Chicago (while there is a lot or
effort in devcloping interactive classroom environments at Rensselaer, my ideal study en-
vironment looks much like a cofree shop),
Teaching and learning should be dynamic processes. r would appreciate any com-
ments and suggestions that yOll have on this textbook. I will use the WWW site to provide
updated examples, additional problems with solutions, and suggestions for teaching and
studying process dynamics.
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:
What is a process model?
Why develop a process model?
What is the difference between lumped parameter and distributed parameter sys-
toms?
What numerical package forms the basis for the examples in this text?
What arc the major objectives of this textbook?
The major sections arc:
1.1 Moti valion
1.2 Models
1.3 Systems
1.4 Background or the Reader
1.5 How to Use This Texthook
1.6 Courses Where This Textbook Can Be Used
1.1 MOTIVATION
Robert Reich in nze Work has classified three broad categories of employment
in the United States. In order of increasing educational requirement these categories are:
3
4
Introduction Chap. 1
routine production services, in-person services, and symbolic-analytic services. To di-
rectly quote from Reich:
"Symbolic analysts solve, identify, and broker problems by manipulal1ng symbols. They sim-
plify reality into abstract inmges that call be rearranged, juggled, experimented with, COlll-
municatcd to other spc<:iaJists, and then, eventually, transformed hack into reality. The ma-
nipulations arc done with analytic tools, sharpened by experience. The tools Illay be
lIlathematical algorithms, legal argmllcllts, financial gimmicks, .rcief/rifle princiules, psycho-
logical insights ahoUl how to persuade or to amuse, systems of induction or deduction, or any
other sct of techniques for doing conceptual puulcs." (italics added for emphasis)
Engineers (and particularly process engineers) are s)'mholic analysts. Process engineers
usc fundamental scientific principles as a hasis for mathematical models that characterize
the behavior of a chemical process. Symbols are used to represent physical variables, such
as pressure, temperature or concentration. Input information is specified and numerical al-
gorithms arc llsed to solve the rnodels (simulating a physical system). Process: engineers
analyze the results of these simulations to make decisions or recommendations regarding
the design or operation of a process.
Most chemical engineers work with chemical manufactUling pmcc:':ises in one way
or another. Often they arc process ergincers responsible for technical troubleshooting in
the day-tn-deiY operations nf a particldar chemical process. Some responsible 1'01' de-
signing feedback control systems so that process variables (such as temperature or pre.s-
.sure) can he maintained at desired values. Others may be responsihle for redesigning a
chemical process to provide more profitahility. All of these responsibilities require an un-
derstanding of the time-dependent(dynamic) behavior of chemical processes.
1.2 MODELS
'fhe primary objective of this textbook is to assist you in developing an understanding of
the dynamic behavior of c1\<?mical processes. A requirement for assessing the dynamic be-
havior is a mathematical model of the chemical process under considera-
tion. Before proceeding, it is worth consulting with two different dictionaries for a def'ini-
tion of !nodel.
Didionary Definitions: Mode!
Model is derived fro1l11he Latin modus, which means a measure. Used as a noun, it means "a small
representation of a pl<lIllled or existing object" (Webster's New World Dictiof/wy).
"/\ mathematical or physical system, obeying certain specified conditions, whose behavior is
used to understand a physical, biological, or social system to which it is analogous in some
way" (McGraw-lIill Dietiof/ar.v and Techn;cal
Sec. 1.2 Models 5
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).
Working Definition: Pmccss Model
A process model is a set of equations (including the necessary input data to solve the equations) that
allows us to predict the behavior of a chemical process system.
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 r ~
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.
1.2.1 How Models Are Used
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.
EXAMPLE 1.1 A Lumped Parameter System
Consider a perfectly insulated, well-stirred tank where a hot liquid stream at 60
u
C is mixed with
a cold liquid stream at lone (Figure 1.1). The assumption means that the fluid tem-
perature in the tank is uniform and equal to the temperature at the exit from the t<mk. This is all
example of a lumped parameter system, since the temperature docs not vary with spatial pOSition.
Sec. 1.2 Models
Hot Cold
iii
Outlet
FIGURE 1.1 Stirred lank.
7
Consider now the 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
820
10
o

0.2 0.4 0.6
Hot Flow, fraction
0.8
FIGURE 1.2 Relationship between hot flow and outlet temperature.
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 ...-----
ci:
E
230
-20%
25
20
o 5 10 15
time, min
, .. ,.--'-----
20 25 30
FIGlJRE 1.3 Response of temperature to various changes in the hoI llow fraction.
EXAMPLE 1.2 A Histributed Parameter System
A simplified representation of a counterflow heat exchanger is shown in Figure lA. A cold
water stream flows through one side of the excbanger and is heated by energy transfcrcd fro!ll a
condensing steam ,,,trcam. This is a distributed parameter systcnl because the tClnperature of the
water stream can change with lime and position.
Water in
Steam in
FIG-URE 1.4 Counterflow heat exchanger.
The tell1perature profile (water temperature as a function of position) is shown in
Figure 1.5. Notice that rate of change of the water temperature \vith respect to distance decreases
as the water tcmpenlturc approaches the steam teinpcrature (I OOOe). This is because the tcmper-
Sec, 1,2 Models 9
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
'"
"
" 60
ci.
E
JE
40
20
a 0.2 0.4
Z, distance
0.6 0.8
Flf;LJlU: 1.5 W::tter temperature as it function of position.
100
98
96
0
'"
'"
94
"
J-'
E
92

0
90
88
86
a 20 40 60
inlet temperature, deg C
80 100
FIGURE 1.6 Outlet water temperature;Is a function of inlet water temperature.
10 Introduction Chap. 1
Mathematical models consist of the following types of equations (including combina-
tions)
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.
1.3.2 linear Systems Analysis
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 i f r r n ~
tial equations is nonlinear, they can be linearized at a desired steady-state operating point.
1.3.3 A Broader View of Analysis
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
Jacket Temperature
a. Monotonic
Jacket Temperature
b. MUltiplicity
FIGlJRE l.7 Two qualitatively differclll types of input/output behavior.
Steady-slale reactor temperature as a function of steady-state jackct lelnpera-
lurc.
12 Introduction Chap. 1
relationship between jacket temperature and reactor temperature, that is, as the
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
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
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 material and energy
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.
1.4 BACKGROUND OF THE READER
It is assumed that the reader of this textbook htls a sophomore- or 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
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.
1.5 HOW TO USE THIS TEXTBOOK
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
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.
1.5.2 Numerical Solutions
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 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
mended that the reader modify these Ill-files to understand the effect of parameter changes
on the numerical solution.
1.5.3 Motivating Examples and Modules
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
1.6 COURSES WHERE THIS TEXTBOOK CAN BE USED
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 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
SUMMARY
Introduction
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.
Felder, R.M., & R. ROllsseau. (1986). ElementalY Principles ql Chemica!
Processes, 2nd cd. New York: 'Wiley.
Hinmlclblau, D.M. (1996). Basic Principles and Colclllation.'; ill Chemical E'/lJ;i-
/leering, 6th cd. Upper Saddle River, NJ: Prentice-Hall.
Russell, T.R.F., &M.M. Denn. (1971). Introduction to Chemico! !'.'nginecrin/!.
Ihudysis, New York: Wiley.
A comprehensivc tutorial and reference for MA'fLAB is provided by Hanselman and Lit-
tlefield. Thc books by provide many excellent examples Llsing MATLAB to solve
engineering problems.
lIanselman, D., & B. Littlefield. (1996). Maslerill,\!. MATLAB. Upper Saddle River,
NJ: Prentice-Hall.
n.M. (199]). Engineering ProlJlem Soh'ing Ivilh MATLAB. Upper Saddle
River, NJ: Prenticc-Ilall.
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.
Denn, M.M. (1986). Process iV/odcling. New York: Longman.
An undergraduate control textbook with significant modeling and sitnulation is by Luy-
ben. Numerous FORTRAN examples are presented.
Luyben, \V.L. (1990). Process Modeling, 5'imulatioll alld Control for Chemical EI1-
Rineers, 2nd cd. New York: McGraw-HilL
Student Exercises
15
A nmnber or control textbooks contain a limited amount of Illodeling. include:
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.
The following book by Rameriz is more of all advanced undergraduHtelfirst-ycar graduate
student text on numerical methods to solve chemical engineering problems. The emphasis
is on FORTRAN subroutines to be used with the IMSL nmlleriea! package.
Rameriz, W.F, (1989). Computational 111ethods for Process SiJllulalioJl. Boston:
Butterworths.
Issues in process modeling are discllssed by IIimlllelblau in Chapter :1 or the following
book:
Bisio, A., & R.I.. Kabel. (1985). S'c'oleujJ ('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
1. Review the matrix operation:-; module (Section V).
2. \Vork through the MATLAB module (Section V),
3. Consider example 2. If there is a sudden increase in stearn prc.l-;surc (and therefore,
temperature) sketch the expected temperature profilel-; at 0, 25, 50, 75, and
loor;;;) or the distance through the heat exchanger.
PROCESS MODELING
2
In this chapter, a methodology for developing dynamic models of chcmicL11 processes is
presented. After studying this chapter, the student should be able to:
\Vritc balance equations using the integral or instantaneous methods.
Incorporate appropriate constitutive relationships into the equations.
Determine the state, input and output variables, and parameters for a particular
model (set of equations).
Determine the necessary to solve it system of dynanlic equations.
Define dinlcnsionlcss variables and parameters to "scale" equations.
'file major sections arc:
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 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.
Operator Training. The people responsible for the operation of a chemical
manufacturing process arc known as process operators. A dynanlic process model catl be
lIsed to perform simulations to train process operators, in the same fashion that flight
ulators arc used to train airplane pilots. Process operators call learn the proper response to
upset conditions, before having to experience theill on the actual process.
Process Design. A dynamic process model call be llsed to properly design
chcmical process equipment for a desired production rate. F'or example, a model of a
batch chemical reactor can be used to determine the appropriate size of the reactor to
duce a certain product at a desired rate.
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.
Control System Design. Feedback control systenls arc used to maintain
process variables at desirable valucs. For cxample, a control system may measure a prod-
uct temperature (an output) and adjust the steam Ilowratc (an input) to maintain that de-
sired temperature. r'or complex systems, particularly those with many inputs and outputs,
it is necessary to base the control system design on a process model. Also, before a COI11-
plex control system is implemented on a process, it is normally tested by simulating the
expected performance computer simulation.
2.2 BALANCE EQUATIONS
The emphasis in an introductory matcrial and energy balances tcxtbook is on steady-state
balance cquations that have the rollowing form:
I
mass 01 energy]
cntcnng -
a systcm
--mass or e'l1crgy :
leaving = 0
(l systcm
(2. I )
(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:
[
rate of mass
accumulation 111
a system
[
rate of mass or 1-, ale of mass or)
= .energyentering - enelgy leavmg
a system a system
(2.2)
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.
2.2.1 Integral Balances
An integral balance is developed by viewing a system at two different Sll<l!-'S!lots in timc.
Consider a finite time interval, D.t, and perform material balance over that time interval
[
mass or energy I [mass or energy I
.
inside the system - inside the system
atl+tJ.1 all
r 1
mass or energy
entering the system -
from t to t --I- 6.t
mass or energy ]
leavmg the system
It om I to I + tJ.1
(2.3)
The rnean-value theorems of integral and differential calculus are thcn used to reduce the
equations to differential equations.
F'or example, consider the system shown ill F'igure 2.1 below, where one boundary
represents thc mass in the systcm at time t, while the other boundary represents the mass
in the system at t + i1t.
An integral balance 011 thc total mass in the system is writtcn in the form:
Sec. 2.2 Balance Equations
mass in system at time =: t
)If mass in system
,r at time:= t+!\ t
m
OUf
(f)
FIGURE 2.1 Conceptual material
balance prohlem.
19
contained I contained I
III the system - In the system
all+Llt all
Mathematically, this is written:
r
mass culcI ing I rmass ICdving I
= the system - the system
from t to ( j- D., hom I to t -I nl
fiLii I I
MI, '"' - MI, J ';'i" iiI - J11/"", lif
or
1-1-,1/
MI'i"' - MI, = J(,izi" - ,iz,,,,,l dl
,
(2.4)
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:
1+ !:J./
f (';/ill - filma> dl
,
where 0 < (X < 1. Equation (2.4) can now be written:
dividing by dt,
MI"",__ MI, (.. II
D..f = 111'-1/ - lJlo"t l!nM
and using the mean value theorem of dUferentia! calculus (0 < < I) for the Icfthand side,
MI,
/>1
,1M,
;it [+IUI
20
which yields
Process Modeling
dM
I
.. I
I lIj.f = (1l1iJi - In""J II<d.l
Chap. 2
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.
2.2.2 Instantaneous Balances
Here we write the dynamic balance equations directly, based on an instantaneous
change:
I the laic 01 I
I accumulatIOn of
lmass III the system
which can be written directly as,
or
I
] 1..
1
.
rate of rate of
=.:: mass entering - mass leaving
the system the system
dM
df --- J11
in
.- l1I
o
l1!
(2. 7)
(2.8)
dVp
d/
(29)
which is the same result obtained using an intcgral balancc. Although the integral balancc
takes longer to arrivc at the same resull as the instantaneous balancc method, the integral
balance method is probably clearer whcn dcvcloping distributed parameter (partial differ-
ential equation-hased) models. An cxnmplc is shown in Section 2.6.
Section 2.3 covers material balances and Section 2.5 covers material and energy
balances. Section 2.4 discusses constitutive relationships.
2.3 MATERIAL BALANCES
'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
----
EXAIVIPLE 2.1 Liquid Suq.:e Tank
Surge tanks arc often Llsed to "smooth" f10wratc fluctuations in liquid streams f!mvillg between
chemical processes. Consider a liquid surge tank with one inlet (flowing from process I) and one
outlet stream (flowing to process Ii) (Figure 2.2). Assume that the dellsity is constant. Find how
the volume of the tank varies as a function of time, if the inlet and outlet flowratcs vary. List the
s((ltc variables, [Jarometers, as weI! as the il/fJut and oll/Im/voriables. Give the necessary infor-
mation to complete the quantitative solution to this prohlem.
v
F
_____-L
FIGUnE 2.2 L,iquid surge tank.
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:
F
,
F
V
P
inlet volumetric r10wrate (volume/time)
outlet volumctric f10wratc
volumc of liquid in thc tank
liquid dcnsity (mass/volullle)
Integral i\'lethod
Consider a fillite time intcrval, !J.l. Performing a material balance over that time interval,
J11dSS 01 \Vdlel] [tlldSS 01 WdtCl ]
lllslde the lank - lllSldc the td.nk -
<it I I !J.t elt I
mass of water] [lllass of walcr
entering lank - leaving tank
from I to t 1- ill froJ11 ( to I -f- !:it
which we can write InalhcmaticaHy as:
(', .3.1
Jr:p dt
,
1\':'1
JFpdl
,
(2.10)
ESCOL/\ Dc Ei
CIULlO i
22
Bringing the righthand side terms under the same integral
1;"\/
vpl, ..\< .- vpl, - J(r,:p I-i,) rlr
Procoss Modeling Chap.2
(2.11 )
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
,
Substituting (2.12) into (2.11)
Vpll'''' vpll
Dividing by f),.t, we obtain
(2.12)
(2.13)
vpl, ,', __ JlPI, (r- r 11
b.t IP PI","
and using the lucan value theorem of differential calculus. as !\.r' ;. 0
(214)
dVp
dt
InstantaneOllS Method
(2.15)
Here we write the balance equations based on an inslautancOU:i rate of-change:
1
-the rate of of -I = I.mass (}C..I Imass flowratc of-I
mass of water III tank _water lllln tank water out of tank_
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
dt
(2.16)
which is exactly what we derived using the intcf{ral method. Given the same set of assumptions
the two methods should yield the 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
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 about the fluid density, which Jllay lead to (2.17).
Sec. 2.3 Mntcrial Balances
dV
dt
1-; -- F (2.17)
23
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
dl A
F
it
(2.18)
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)
where 13 is a J'lmv coefficient, to find
dli
dt
F = [3VIi
[3VIi ,(
-I
A A
(2.19)
(2.20)
For tbis model \ve refcr to h as the stole variablc, inlet nowrate (F) as the input
variable and f3 and A as parameters.
Notice that a single system (ill this case, the liquid surge tank) can have slightly dif-
ferent modeling equations and variables, depending on assumptions and thc objectives
used whcn dcve-Jopiug the model.
EXAi\iIPI.,E 2.2 An Isothernwl Chemi<:al Rcactor
Assume that two chemical species,;\ and 8, arc in a solvent feedstream entering a
chemical reactor that is maintained at a constant tcmperature (l"igurc 2.3). The two spec'lc::, react
irreversibly to form a third species, F. Find the reactor concentration of each species as a ftlllC-
lion of time.
24
F.
I
Process Modeling Chap. 2
C
I
F
C
Overall Material Balance
FIGlJRE 2.3 Isothermal chemical reactor.
The overall mass balance is (since the tank is perfectly mixed)
(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:
and we can write (2.21) as:
Component IVIaterial Balances
dV
tit
Pi P (2.22)
(2.23)
It is convenient to work in molar units when writing component balances, particularly if chemi-
cal reactions arc involved. Let (,'1\' ('/I. and C" represent the molar concentrations of A, H, and P
(moles/volume).
Assume that the stoichiometric equation for this reaction is
The component material balance equations are (assuming no component P is in the feed to the
reactor):
(Ive
A
dt
dVC
II
dl
dVC,.
dl
(2.24)
(2.25)
(2.26)
Sec. 2.3 Material Balances 25
(2.30)
(2.31)
(2.29)
(2.27)
(2.32)
(2.2X)
(2.33)
f' C dV
'/I dt
Where rr;, and I'p represent the rate of generatioll of species;\, II, and P per unit volume, and
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
Expanding the [cftlland side of (2.24),
dVC
A
df
dell
df
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:
Similarly, the concentrations of naud P call be written
combining (2.23), (2.24), (2.27), and (2.30) we find:
This model consists of four differential equations (2.23, 2.31, 2.32, 2.33) and, therefore, four
state variables (V, 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 (F
i
. C
Ai
, and e/li) as a function of time, and the
parameter (k).
2.3.1 Simplifying Assumptions
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
where
Process Modeling Chap. 2
k
l
= kel/
The resulting differential are (since we assumed dVldt and dClldt::: 0)
(2.35)
de"
cit
(2.36)
(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.
EXAMPLE 2.3 Gas Surge Drum
Smgc drums are oncn used as intermediate storage capacity for gas streams that arc lransfclTcd
hctween chemical process units. COl1::-idcr a drum depicted in Figure 2.4, where (fi is the inlet
Inola!" Ilowratc and q is the outlet molar tlowrate. Here we develop a model that describes how
the pressure in the tank varies with time.
q.
{
p
)--
q
I
FIGliRE 2.4 Gafi surge drum,
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
if
P
RT
(2.39)
and, therefore, the total amount of gas in the tank is
v
V
PV
NT = total amount (moles) of gas in the tank (240)
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
V tiP
RT dt ~ 'Ii - 'I (2.41)
27
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
dt
RT
V (qi-q)
(2.42)
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.
2.4 CONSTITUTIVE RELATIONSHIPS
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.
2.4.1 Gas law
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 s y s t ~
specific:
(
a) ,
P + \12 (V - b) = RT
(2.44)
For other gas laws, sec a thermodynamics text such as Smith, Van Ness, and Abholl (1996).
2.4.2 Chemical Reactions
The rate of reaction pCI' unit volumc (mollvolume*timc) is usually a function of the o n ~
cent ration 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
r
A
is the rate of reaction of A (mol A/volume*time)
k is the reaction rate constant (constant for a given temperature)
C
A
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 ,-- 2r
A
r
c
~ r/!
rf) -- Jr
A
= - 2k ~ l l
= k C't\C:
n
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
k(T) = A expC-10/ /IT) (2.46)
k(T) :::: reaction rate constant, as a function of temperature
A ;::; frequency nlctor or prccxponcntial factor (sanle units as k)
10 = activatioll ellergy (cai/glllol)
R :;:;: ideal gas constant (1.987 caJlgmol K. or another set of consistent units)
T :::; absolute temperature (dcg K or dcg R)
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:
F (I)
in k = InA - '
/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).
2.4.3 Equilibrium Relationships
The relationship between the liquid and vapor phase compositions of component i, when
the phases arc in equilibrium, can be represented by:
v . ,
where
Xi ::;: liquid phase mole fraction of component i
Yi :;;: vapor phase mole fraction of component i
K
i
:;:;: vapor/liquid equilibrium constant for component i
(2.48)
The equilibrium constant is a fUllction of composition and temperature, Often, wc
\vill sec a ('otis/an! relative volatility aSSUlllption made to simplify vaporlliquid equilib-
rium models.
Sec. 2.4 Constitutive Relationships 29
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)
2.4.4 Heat Transfer
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.
2.4.5 Flow-through Valves
The flow-through valves are often described by the following relationship:
where
F
(
' t.( ') JAP,.
,. .\ \1
, s.g.
(2.51 )
F :::: volumetric f10wrate
Cl' valve coefficient
x fraction of valve opening
0./\ :::: pressure drop across the valve
s.g. :::: specific gravity of the fluid
J(x) :::: the flow characteristic (varies from () to 1, as a function of .r)
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 equalpercentage
0
0 0.2 0.4 0.6 0.8
fraction open
For a linear valve
f(x) 0" x
For an equal-percentage valve
f(x) ,,' 1
For a quick-opening valve
f(x) ',Ix
FIGURE 2.5 characteristics of
control valves. (I::::::::' 50 for cqual-
percentage valve.
The three characteristics arc compared in Figure 2.5.
Notice that for the valve. the sensitivity of flow to valve position
(fraction open) is high at low openings and low at high openings; the opposite is true for
an valve. 'fhe sensitivity of a linear valve docs not change as a function
or valve position. The equal-percentage valve is commonly used in chemical processes.
because of desirable characteristics when installed in piping systems where ;:1 significant
piping pressure drop occurs at high Ilowrates. Knmvledgc of these characteristics \vill be
important when developing !cedback control systems.
2.5 MATERIAL AND ENERGY BALANCES
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
2.5.1 Review of Thermodynamics
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
Often we will lise cncrgyltnolc or energy/mass and write the following
A A
o ~ U + KE -I 1'10'
TE U -I KI,' -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
KE
1 ,
2 u
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
while the enthalpy/mole is
11 U I pV
and the enthalpy/mass is (since p::::: 1/( \I)
II If -I pV
p
U I
i'
we will make usc or these relationships in the following example.
32
EXAMPLE 2.4 Stirred Tank Heater
Process Modeling Chap. 2
Consider a perfectly mixed stirred-tank heater, with a single feed stream and a single product
stream, as shown in Figure 2.6. Assuming that the f10wratc and temperature of the inlet stream
can vary, that the tank is perfectly insulated, and that the rate of heat added per unit time (Q) can
vary, develop a modcllo find the tank temperature as a function of time. Slate your assumptions.
Material Balance
F.
I
T.
I
~
V T
Q
FIGlJRE 2.6 Stirred tank h l ~ t e
F
T
Energy Balance
accumulation
dVp
dt
=--= in - out
(252)
accumulation = in by flow - out by flow -+- in by heat transfer -+- work done on system
dTE
r;p,T E
i
-FpTE + Q + W,
df
Here we neglect the kinetic and potential energy:
dU
~ FIIlI- FI'U , f).' WI
dt ., I I ~
(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.
This allows us to write (2.53) as:
(254)
j. Pi) _l'jJ(Uj p) + Q + W,
Pi P
(2.55)
Sec. 2.5 Material and Energy Balances 33
and since II "= U + P\/, we can rewrite (2.55) as
<III dpV
tit tit
"'Pi Hi -- Fp 11 -I- Q -1-- W, (2.56)
Since, ripVld, = 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):
'fhe kinetic and polential energy effects were neglected.
The change in p\l term was neglected. This is a good assumption for a liquid system, pro-
vided I\p is not too large and constant volume is assumed.
The total enthalpy term is:
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;,,)
ll; = c>( T; - 7 ~ -
We now write the energy balance (2.57) In !he following fashion:
(2.58)
(2.59)
d(Vpc"CI' T",))
dt
(2.(>0)
lIsing the asslIIJlplio/ls of constant density and volume (so F
i
0:: F; from (2.52. we filld
V'" <I(T 1;,/) =' F 'I(T -- T .) - (T-- T )1 + /il
f .f! tit pc
l
) j . rei rei ~
or
<I(T- 7;4) F Q
w
V (/;-
T) I -I
<It Vpc
f
! Veep
but T,-(fis a constant, so d (7 --Trct)!dt 0:: dTidt. Also, neglecting WI' we can write
(2.61 )
(2.62)
<I'J'
dt
F /i
(1-1')1"
V ' . \fpc"
(2.63)
In ordcT to solve this problem, we must specify the parameters \I, p, c[J' the inputs F. Q, and T
i
(as a function of time), and the initial condition '1(0),
34 Process Modeling Chap. 2
2.6 DISTRIBUTED PARAMETER SYSTEMS
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
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. Vand a time clement
Lll. The total moles or species A contained in the clement 6. V is written (6. V)C
k
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 v.
The balance equation is then:
Using the mean value theorem of integral calculus and dividing by D.f, wc find:
Normally, a tube with constant cross-sectional area is used, so elV;:::: Adz and F :::: Av
z
'
where V
z
is the velocity in the z-dircction. Then the equation can be written:
(2.64)
(265)
(2.66)
(2.67)

iJz
aFC
--" - kC
av A
av_c,
--'--'- - kC
iJz A
rJp
at
iiC
A
at

iJt
I +ill
(nV) C:, I, ,'" - (nV)C
A
I, = f [FC"lv - Fc"lv"v - kC"n V] It
,
Dividing by D.. V and letting ti.t and L.i. V go to zero, we find:
Similarly, the overall material halance can be found as:
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
t = 0) = CAO(Z)
CA(O, t) = CA;,,{t)
(2.69)
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 Vis
(2.70)
where is the diffusion coefficient. The reader should be able to derive the following
reaction-diffusion equation (sec exercise 19).

at
(27])
Since this is a second-order PDE, the initial condition 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 one can then begin to develop
solutions to PDEs.
2.7 DIMENSIONLESS MODELS
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:
It seems natural to work with a scaled concentration. Defining
x C/C,,/0
where C
AID
is the nominal (steady-state) feed concentration of A, we rind
where Xj= CN/C
AIO
' 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
dx
{:;:dr
Process Modeling Chap. 2
A natural choice for 1*' appears to be VIF (known as the residence time), so
dx (Vk)
=x- 1+ .x
dT I 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
(IT
I ~ -+- (Xx
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
2.8 EXPLICIT SOLUTIONS TO DYNAMIC MODELS
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.
EXAlVIPLE 2.5 Noulincln Tank Height
Consider it Lank height problem where the outlet flow is a nonlinear function of lank height:
tilt
d/
~
1\
Il
v1/
i\
Here tbere is not au analytical solution because of the nonlinear height relationship and the forc-
ing function. 1'0 illustrate a problem with an analytical solution, we will assume that there is no
inler flow to the tank:
dh
df
\Ve can see Ihat the variables are separable, so
tilt
v'h
Il d/
i\
Sec. 2.9 General Form of Dynamic Models 37
which has the solution
(
II dll
Vii
h,.
2v'Ji ,- 2\/h"
! IJ
- j A ell

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.
2.9 GENERAL FORM OF DYNAMIC MODELS
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
XI = II(.tl" .. ,_rll,uj,... ,ltm,Pt,,fJr)
);"} --: l:(x1"",x1I'ut,,ll/ll' PI'''''!)/")
(2.72)
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.
2.9.1 State Variables
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, ternperature 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
2.9.2 Input Variables
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 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
A parameter is typically a physical or chemical property value that must be specified or
known tomathcmatically solve a problem. Parameters arc often fixed by nature, that is,
the reaction chemistry, molecular structure, existing vessel configuration, or operation.
Examples include density. viscosity, thermal conductivity, heat transfer coefficient, and
mass-transfer coefficient. When designing a process, a parameter might be "adjusted" to
achieve some desired performance. For example, reactor volume lllay be an important de-
sign parameter.
2.9.4 Vector Notation
The set of differential equations shown as (2.72) above can be written more compactly ill
vector form.
\vhere
x=, f(x, II, II)
x::;;: vector of n state variables
u =vector of In input variables
p :::: vector of r parameters
(2.73)
Notice that the dynamic models (2.73) can also be used to solve steady-state probJenls, since
that is,
x= ()
f(x,u,p) =. ()
(2.74)
(2.75)
for processes. Numerical techniques (such as Newton's method) to solve al-
gebraic equations (2.75) will be presented in Chapter 3.
The 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

EXAMPLE 2.6 State Variable Form for Example 2.2
COlls'lder the modeling equations for Example 2.2 (chemical reuctor)
39
dV

dl j

(2.31 )
(2.32)

There are four states (V, Cu' and C
p
), four inputs (F
i
, F, C
Ai
, ('/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
or
C
A
F
Ii (CHi -- Cli) - 2 kC,C"
F
VC/, + kCAC/I
X
2
x,
II,
Xl (lI
J
- x
2
) -" P.X2
X
;l
i: (11
4
-- x.,) -- 2 P,X
2
X
3
11, .
i, x4 + l)l
X
1
X
;;
[
I'I(X,II,P)]
___ tix,U,IJ)
- f,(X,II,p)
J
4
(x,u,p)
40
SUMMARY
Process Modeling Chap. 2
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
A nice introduction to dlClnical engincering calculations is provided by:
Felder, R.M., & R. Rousse<lu. (1986). L'lcmcnfmy Principles r!/ C'hemicrtl
Processes. 2nd cd. New York: Wiley.
Excellent discussions of the issues involved in modeling a mixing lank, incorporating
density crfects, and energy balances is provided in the follO\:ving two hooks:
Denn, M.M. (1986)./Jrocess Modeling. New York: Longman.
RusselL T.R.F., & M.M.Denn. (1971). Introduction lo Chemical Engineerillg
Allrdysis. New York: Wiley.
An introduction to chemical reaction engineering js:
Student Exercises 41
Fogler, H.S. (1992). Elements (d' Chcmh'ol ReaUiol/ Engineering, -'.l1d eel. Engle-
wood Cliffs, NJ: Prentice-Ilall.
An exccllenttextbook for an introduction to chemica! engineering thermodynmnics is:
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:
Ads, R. (1993). Ends and beginnings in the mathematical modelling or chemical
engineering systems. Chemica! l-:.'ngineering 5'cience, 48( 14). 2507--2517.
'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., 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 2.1 it was assumed that the input and output f10wratcs could he inde-
pendently varied. Consider a situation in which the outlet flowrate is a function of
the height of liquid in the tank. Write the modeling equation for tank 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 flowrate out gr the tank is a function of' the square root of height of
water in the tank (F
o
:::: 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 -k
1
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 = - k
2
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 C
2
is the mass concentration of A in stream 2).
Model the following cases:
F
C
Student Exercises 43
a. Constant volullle, constant density.
h. Constant volume, density varies linearly with concentration.
c. Variable volume, density varies linearly with concentration.
6. Consider two tanks in series where the flow out of the first tank enters the second
tank. Our objective is to develop a model to describe how the height of liquid in
tank 2 changes \vith time, given the input flowrate Assume that the flow out
of each tank is a linear function of the height of liquid in the tank (F
J
:;:;: I3lhl and
F
2
:;:;: l3i12) and each tank has a constant area.

h ,
to.
F,
h
2 :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 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
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 n
J
) 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
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 47Tr
2
.
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
dl
P

I
and statc any other assumptions.
Student Exercises 45
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
From
source
valve i
V,
Plant piping, represented
as a perfectly mixed drum
Gas drum for
a boilerhouse
unit
To furnaces
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- 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;
Lj----t-'-----.. F
T
46 Process Modeling Chap. 2
Develop the material and energy balance equations that describe this process. F
i
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 Vtenn in the energy balance.
19. Derive the equation
dC.\
at
= - v
neil
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):
leaves by convection and a concentration gradiellt:
and also leaves by a first-order reaclion.
20. Consider the nonlinear tank heipht model
"II
"I
F 13
, VII
A A
tmd define the dimensionless variables II :::: F/F:
I
. and x:::: hlhs.. 'Where F
s
and h.
1
are
the stcady-stateflowrale and height. respeclively (VI' :::: 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 --- 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
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
where Xl and x2 =- drug concentrations in compartments I and 2 (/-Lg/ml), and
u =: ratc of drug input to compartment I (scaled by the volumc of compartment I,
/-Lg/ml min).
SECTION II
NUMERICAL TECHNIQUES
ALGEBRAIC EQUATIONS
3
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:
Solve systems of linear algebraic cqua.lions.
Solve nonlinear functions of one variable graphically and fllll11crically.
Usc thcMAI'LAB function fzero to solve a single algebraic equation.
Discuss the stability of iterative techniques.
Usc thcMATLAB function f solve to solve sets of nonlinear algebraic equations.
The major sections in this chapter are:
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
Consider a set of 11 equations in 11 unknowns. The representation is
fl(XI,xz, x,,) ()
flex I ,x
2
' ).:) := 0
(31 )
/;/(.\;\,X2' ... x,)::: 0
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
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.
3.2 GENERAL FORM FOR A LINEAR SYSTEM OF EQUATIONS
Consider a linear system with n equations and 11 unknowns. The first equation is
allxl + "12
x
'2 + 0nrl + ... + all/XII = b
l
where the a's and b's are known constant parameters, and the x's are the unknowns. The
second equation is:
anxI + ([22 x2 + +. . + ([2Ir\:1/ = /;2
while the nth equation is:
(3.3)
X
J
"1
X
z
llZIl x:'\
a/l/l
XII
I"
a
12
au
a
21
an aLl
alii aliI (lId
The coefficient, aU' relates the jilt dependent variahle lo the itlt equation.
b,
b
2
b
J
Or, using compact matrix notation:
(3.3a)
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
Prclllultiplying each side of (3a) by A--l we find:
A-IAx=bu
and since, (3.4)
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.
EXAI\ilPLE 3.t Linear Ahsor(}tion Model, Solved Using l\:lATLAB
Consider as-stage ahsorption column (presented in Module 6 in Section V) that has a model of
the following form (x is a vector of stage liquid-phase compositions and u is a vector of column
feed compositions):
O=1\x+llu
or

the solution for x is x c;:: - A-I n 11
Thc valucs of A, n, and 11 are:
a
-0.3250 O.12'SO
0.2000 -0.3250
0 0.2000
0 0
0 0
b
0 .2000 0
0 0
0 a
0 0
0 0.2500
u
-
0
0 .1000
o
0.1250
-0.3250
0.2000
o
a
o
0.1250
--0.3250
0.2000
o
o
o
0.1250
-0.3250
54 Algebraic Equations Chap.3
The following MATLAB command can be used to solve for x
x
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:
3.3 NONLINEAR FUNCTIONS OF A SINGLE VARIABLE
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.
x
x
f(Xi
The solution
a. Single Solution b. Multiple Solutions
FIGURE 3.t Graphical solution tof{x) "'" O.

f(Xi
Sec. 3.3 Nonlinear Functions of a Single Variable 55
3.3.1 Convergence Tolerance
A solution to a problcmj(x) :::; 0 is considered converged at iteration kif:
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 relative tolerance specification is not useful iLr is converging to O. A combination or
the relative and absolute tolerance specifications is often used, and can be expressed as
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.
3.3.2 Direct Substitution
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
Using the direct substitution technique, we rewrite (3.5) in the Conn
x = g(x)
(3.5)
(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
k
+
l
:::: M(X
k
)
If formulated properly, (3.7) converges to a solution (within a desired tolerance)
(3.7)
x* = g(x*) (3.8)
If not formulated properly, (3.7) may diverge or converge to physically unrealistic s ~
tions, as shown by the following example.
56
EXAMPLE 3.2 A Reactor with Kinetics
Algebraic Equations Chap. 3
The dynamic model for an isothermal, constant volume, chemical reactor with a single sccond-
order reaction is:

df
0.7071
Find the concentration for the following inputs and parameters:
F/\I:;;;; I min-I, C
Af
'=. I gmolliiter, k:::: I litcr/(gmol min)
At steady-state, riCA/til := n, and substituting the parameter and input vatues, we find
I C C' 0
lis As
where the subscript s is used to denote the steady-state solution. For notational convenience, let
.r:;;: C
A
" 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
:;;;; + 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)
Or, using subscript k to indicate the kth iteration
For a first guess of x
o
:;;;; 0.5, we find the following sequence
x, V - 0.5 + 1
x, 0.7071 + I 0.5412
X
J
0.5412 + 1 0.6774
X
4
0.6774 + I 0.5680
'[his sequence slowly converges to 0.618, as shown in Figure 3.2.
Sec. 3.3 Nonlinear Functions of a Single Variable 57
0.75
0.7
0.65
'"
.".
0.6
0.55
0.5
0 5 10
k
15 20
FIGOH.E 3.2 The iteration XI; 11
sequence converges to 0.61 XO.
I I with X
o
0:;;: 0.5. This
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
\
0.2
I
\
I
\
I \
0
0 2 4 6 10
FIGURE 3.3 The iteration xI; i [ = ~ t ~ 1 Wilh Xo::= 0 (dashed) or
(solid). Thi::; sequence oscillates between 0 and 1.
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
-1
-3 L...". .i..__ .._ ~ . _ _-"- .
-2
FIGURE 3.4 Plot ofj(x) versus x to find whcrcJ(x)::::; O.
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.
3.3.3 Interval Halving (Bisection)
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
f(x)
initial
lower
limit
x
2
initial
upper
limit
FIGURE 3.5 Illustration of the bisection technique.
59
An example of the interval halving approach is shown in Figure 3.5.
Notice that the solution was bracketed by
1. Findingx\, whcrcj(xl) is negative andx2 wheref(x2) is positive.
2. The midpoint between xl and x2 was selected (x]). The function value at x3,}(x3)'
was negative, so
3. xl was thrown out and x3 became the lower bracket point.
4. The midpoint between x
3
and .:r
z
was selected (x4)' The function value at --'"4' .!{.r
4
),
was positive, so
5. '\:2 was thrown out and x
4
became the upper bracket point.
6. The midpoint between x
3
and x4 was selected (x
s
)' The function value al x
5
, j(x
s
)'
was negative, so
7. x3 was thrown out and x5 became the lower bracket point
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
3.3.4 False Position (Reguli Falsi)
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:
1. Select variahle values xk and x
k
+
J
to bracket the solution.
2. Draw line hctwccnj{xk) andf(x
k
+
1
) and find xk+2'
3. Evaluate f(xk+2)' Replace the bracket limit that has the S<llllC sign for its function as
the sign o(l{xk+2)'
An example of the false position approach is shown in J1'igurc 3.6.
The next step would be to draw aline from.f(x'j) to.!(x2) and find -'"4- Continue until
a certain tolerance is met.
The false position method generally converges much more rapidly since it uses
known function values to determine the next "guess" for the variable. We have sho\vn
graphically how each technique is used. You willlHlVe an opportunity in the student x r ~
ciscs to write all algorithrn to implement the two techniques.
3.3.5 Newton's Method (or Newton-Raphsonl
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):
I(x + Llx) = f(x) + I'(x)Llx + rex) (Llx)2 + f"'G') (Llx)' +
2 6
f(x)
initial
lower
limit
=0 (3.9)
X
2
initial
upper
limit
FIG-URE 3.6 Illustration of the false position technique.
~ ~ ~
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 =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,)
f'(x,)
(3.12)
from (3.11)
F(x,)
(3.13)
}\x,)
=x, -/"( . )
_ x
k
(3.14)
Equation (3.14) is known as Newton's method for a single-variahle problem.
Notice that we can obtain the following graphical representation {{Jr Nc\vton's
method (Figure 3.7).
Statting from the initial guess of Xl' we find that -':2 is the intersection off'Cr 1) with
the x-axis. and draw a line with slopcf'(x2) to the x-axis to find x
3
. This
procedure is continued until convergence.
I(x)
Flf;{JRE 3.7 Illustration of NeWlon's
mclhod.
'SlOpe" f'(x,)
I(x)
x, x,
I(x,)
I(x,)
I(x,)
-1-------",'"""'7."---,----
ESCOLA Dc ENC:::NHARIA
BIBLIOTLCA
62 Algebraic Equations Chap. 3
Advantages to Newlon's method include quadratic convergence (when close to the
solution) and that the method is easily extended to l1lultivariablc problenls. Disadvantages
include the fact that a derivative of the function is required, and that the method may not
converge to a solution or may not converge to the nearest solution.
Foran example of nonconvcrgencc, consider the fUllction shown in l"igure 3.8. Here
the initial guess is at a point where the derivative of function is eqllal to zero (f'(x
o
) -:;: 0),
therefore there is no intersection with the x-axis to determine the next guess. \Vc also sec
from (3.14) that there is no finite value for the next guess for x.
Another probIcm is that the solution could continuously oscillate between two val-
ues. Consider/Cx) =::.x
3
-- x. A plot of Newton's method for this function, with an initial
guess o1'xo::= shown inl<'igure 3.9.
Notwithstanding the problems (possible diviSion by zero or continuous oscillation)
that we have shown with Newton's method, it (or some variant of Newton's) is still the
most commonly llsed solution technique for nonlinear algebraic equations. Notice that
Newton's method essentially linearizes the nonlinear model at each iteration and therefore
results in successive solutions of linear models.
Notice that increasing amounts of information were needed to use the previous
techniques. Interval halving required the sign of the function, reguli falsi required the
value of the function, and Nevvton's method required the value and the derivative of the
function. We also found that not all solutions to a nonlinear equation arc stable when di-
rect substitution is used. Next, we show that all solutions are stable using NeWlon's
method.
______ _
horizon1al 1arlgel
never meet! x-axis
1
0.5
f(x)
a
-0.5
-1
-1.5 -1 -0.5 o
x
0.5 1 1.5
FIGURE 3.8 Problem with NeWlon's method whcllf'(r)::;;: O.
Sec. 3.4 MATLAB Routines for Solving Functions of a Single Variable 63
,
l' -....... ~
l ,
~ J,
, I
1
0.5
f(x)
a
-0.5
-1
-1.5 -1 -0.5 a
x
0.5 1 1.5
FIGURE 3.9 OscillatIon of solution between two values.
3.4 MATLAB ROUTINES FOR SOLVING FUNCTIONS
OF A SINGLE VARIABLE
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
MATL.AB returns the answer:
y -1
For an initial guess of x = 2, the user enters
Algebraic Equations Chap.3
z fzero( 'fenl' ,2)
and MATLAB returns the answer
z 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.

Then the user can type the following command
roots(e)
and MATLAB returns
ans ::::
3

Again, these are the two solutions that we expect.
3.5 MULTIVARIABLE SYSTEMS
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
ablc----lhen a single variable solution technique can be llsed. This approach is shown in
the following example.
EXAMPLE 3.3 Reducing a problem to a problem
Solve the following system of nonlinear cqllati(Hls.
fl(x
1
,X
2
)::::: XI x
J
x
2
:::O (3.15)
(3.16)
From (3.15) we can sol ve for x
2
in terms of x I to find:
-'2:;:;;1-4x
1
Substituting (3.17) into (3.16), we find:
I +3x,-ZBxf::::O
which has the two solutions 1'1)] XI (from the quadratic formula)
The corresponding values of x
2
(1i'on} (3.17)) arc
X
2
;::: OJ) and x2:::;: 1.5714
Or, writing these solutions in vector form:
. [0.25]. .
solutIOn 1 is X.co" . 0 .. ' while solution 2IS x =
Question: Arc we certain that there are only two solutions?
[
-0.1429]
1.5714
(3.17)
(3.18)
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).
Question: How did we miss the other two solutions?
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 x
2
+ 4 = 0
4 /116-16
dnd llSlllg the l(UMh,ttlC 100nJuid \} 2 :1: \ --2 2
which gives us the solution x:;::: 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:
1.. 11.11.25.]. 1-
0
.1429.1
' 2 ' . 'dnd 1.5714'
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,
3.5.1 Newton's Method for Multivariable Problems
Recall that we arc solving the general set of equalions
rex) = 0
That is, a set of n equations in n unknowns
fl(x}l"t
zl
' . , x,J 0
f,(x\,x" ... x,,) 0
(3.19)
(3.20)
(3.21)
t"(x,,x,, ... x,,) 0
The oQjectivc is to solve for the sct of variables, Xi' that forces all of the functions,};, to zero.
We can use a Taylor series expansion for eachf;:
II ar
t;(x + Ax) = ,f,(x) + :s -c" !H
j
+ higher order terms
j'l dX
j
Neglecting the higher order terms and writing in matrix form
f(x + Ax) = f(x) + J Ax
where.J is known as the Jacobian
ilf, iii, iii,
ax! dxz
dX"
.J =
aj;/ iJj;/ iI/;/
ax} OX2 aXil
(322)
(3.23)
Sec. 3.5 Multivariable Systems 67
Now, since we wish 10 solve for Ax such that r(x + Ax):::: 0, then (from 3.22)
f(x) + J Ax 0
Solving for Ax at iteration k
but Ax is simply the change in the x vector from the previolls iteration
AX
k
= xkl-
1
- x
k
Substituting (3.26) into (3.25)
(3.24)
(3.25)
(3.26)
(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.
where J
k
and f(x
k
) are known at iteration k.
EXA1VIPLE 3.3 Revisited. Newton's method
1;(-'"x,)
Xl - 4 xj XjX? = 0
or
f;(X"xJ = 2 x
2
- -I 3 X
1
X
2
= 0
f(x) [- x
l
-4xf -X,X'j [OJ
-- 2 x
2
xi + 3 x
j
x
2
_ =0
The Jacobian elements are
ill;
J J I = .. = 1 - 8x
1
X
2
()J:
r
so the Jacobian is written
fJ/;
J?""'=-x
L iJx
2
.l
68
Algebraic Equations Chap. 3
Consider all initial guess of ,:rj :;:;;; --1 and x2 ;;;;; ---J. Let x(O) represent the vector for this initial
guess
The value of the Jacobian at this initial guess is
[
10
.I(x(O)) 3
T'hc inverse of the Jacollian is
[
1
.I I(X(O
.3
13
The value of the function vector for the initial guess is

13 . 10
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
x(1) x(O) '(x(O)) f(x(O)
[
1
U
x( I) r I [ .. 3
13
:-.d]
10 0
13
x(1 )
[

0.3846
Continuing with iterations 2 through 7 we find the foJlowing results
Iteration
XI
x,
0
- ]
1 0.3846
2 1.0688
3 0.2016 1.3952
4 1.5317
5 -0.1439 1.5683
6 -0.1429 1.5714
7 --0.1429 1.5714
Sec. 3.5 Multivariable Systems 69
The sequence of iterations for an initial guess of xl :::: .I and x2::::::1 is
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
Noticethataguc:'isofx:::o [-1 -1]' convergcdtox [-0.1429 1.5714.1' aftcrsix
iterations, and a guess of x ::: [l 1J' converged to x '" [ 0.2500 0.0000 I ' aftcr
six iterations. Other initial guesses may lead to the other two known solutions that were deter-
mined analytically.
The previous example illustrates that, for systems that have ITIuhip1c solutions, the
solution obtained depends on the initial guess.
3.5.2 Quasi-Newton Methods
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
xu, = x
k
- a J
k
' f(xkl (3.28)
where a is chosen so that II f(x
k
+1) II < II f(Xk) II and () < 'x S; I (we lise the II f(x
k
) I1l10ta-
tion to represent the norm of the vector f(x
k
. Often IX is selected to minimize II f(x
k
+
l
) II
using a search technique
l
that is, IX is adjusted until II f(x
k
+
1
) II is minimized.
It should be noted that the single-variable equivalent to (3.28) is
(3.29)
HANDLING SINGULAR (OR ILL-CONDITIONED) JACOBIAN MATRICES
Notice that the Newton method with ot without the damping factor requires the inverse of
the Jacobian matrix (or the solution of a set of linear algebraic equations) to determine the
70 Algebraic Equations Chap. 3
value for the next iteration. If the Jacobian is singular, it cannot he inverted. One method
that avoids this problem is known as the method:
_ T .... ] T
x
k
+ t x
k
(J
k
J
k
+ [31) J
k
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 )
Notice that jf j3 = 0, the standard Newton algorithm results.
WHEN ANALYTICAL JACOBIAN MATRICES ARE NOT AVAILABLE
If an analytical Jacobian is not available, a numerical approximation to the Jacobian mllst
be used by the quasi-Newton techniquc.A backward differences approximation for the
Jacobian is
(3.32)
where oxJ-(k) is a small perturbation in variable x at iteration k. A problcrn with this ap-
.I
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.
3.6 MATLAB ROUTINES FOR SYSTEMS OF NONLINEAR
ALGEBRAIC EQUATIONS
'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.
EXAMPLE 3.3 Reconsidered. Using MATLAB
The tn-file used to implement Example 3.3 using fsolve is:
function f = nle(x)
[(1)= x(1)-4*xll)*xl1)-xll)*xI2);
f{2)= 2*x(2)-x(2)*x(2)+3*x(1)*x(2);
which is placed in an tn-file called nle. m
The initial guess is entered
xO [1 1]';
Summary
and we obtain the solution by entering
X ::0 fsol ve ( 'nle' ,xO)
which gives us the expected results
71
x = [0.2500 0.0000] ,
Computationally faster results will he obtained if the analytical Jacobian is used.
2
'fhe following function file gcnerates the analytic,tI Jacobian for this problem.
[unction gf '=' gradnle(x)

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
In this cbapter we have presented a number of techniques to solve nonlinear algebraic
equations. Each technique bad a number of advantages and disadvantages-the approach
that you use may depend on tbe problem at hane!. If you have the option, it is a good idea
to plot the function,f(x), to see if the results agree with your numerical solution. This op-
tion may not be available with l11ultivariablc problems.
Notice that if a particular problem has multiple solutions, the actual solution ob-
tained will depend on the initial guess. There are many actual chemical. processes that
have "multiple solutions," that is, there are several possible that the
process may operate at. In practice, the steady-state obtained wiU depend on dynamic
considerations, such as the way that the process is started up. These issues will be
dressed when we discuss differential models.
Much research is being done in applied mathematics to develop numerical tecb-
niques that yield everyone of the multiple solutions, without having to make many initial
guesses. Among these is "homotopy continuation." These techniques arc not well-
developed and are heyond the scope of this text. For now, the student must he willing to
72
Algebraic Equations Chap. 3
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
The MATLAB routines that were introduced in this chapter are
f801ve: Solves a system of nonlinear algebraic equations, using quasi-Newton
and Levenberg-Marquardt based algorithms
fzero: Solves for a single equation
roots: Solves for the roots of a polynomial equation
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:
Davis, M.E. (1984). Numerical Methods ol1dModeling for Chell/ieal Engineers,
Ncw York: Wiley.
Finlayson, B.A. (1980), Nonlinear Analysis in Chonit'al Fngineering. New York:
McGraw-Hili.
Riggs, J.B. (1994). Numerh..al Techniques for Chemical Engineers, 2nd cd. Lub-
bock: Texas Tech University Press.
Student Exercises
Example numerical techniques arc also presented by Felder and Rousseau:
73
Felder, R.M., & R.W. Rousseau. (1986). Elementary Principles Chemical
Processes. 2nd cd. New Yark: Wiley.
The following book is more of ail advanced graduate student
text on I1lllncrical methods to solve chcmical engineering problems. The emphasis is on
FORTRAN subroutines to be used with tbe IMSL (FORTRAN-based) package.
Rameriz, w.r-<. ( 989). Computational Methods for Process 5'imulalion. Boston:
BUtlerworths.
STUDENT EXERCISES
Single Variable Methods
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 Varc there? Why? (Hint: Expand the PVT rclationshlp
to form a polynomial.)
b. Recall that direct substitution has the form Vk+J :::: gVk)' Write three different
direct substitution formulations for this problem (call thcse 1, H, and Ill).
c. What would be your first guess for Vin this prohlem?Why?
d. Write the MATLAB m-files to solve for Vusing 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 Iitcr
2
/gmo!2,
b = 0.0366 Iitc/Jglllol, and R = OJl8206 liter alm/glllol K. Solve the I{Jl1owing
problems numerically.
e. Plot Vas 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
0.0001.
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 I Vk11 < ". Lel
k-- [
2. Consider the van der Waals relationship for a gas without the volume correction
lerm (Ii 0)
(
a) A
P + A V
V2
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 mllmonia. The rate of
heat addition to the furnace is 1.0 x J0
6
Btu/hI'. The ammonia fcedstrcam
ture is 550
0
R. Use Newton's method to find the tcmperature of the
ing the furnace. Assumc ideal gas and use the following equation for heat capacity
at constant pressurc:
ell = a + bT + cT- 2
Btu
Ibmol "R
Btll
Ii 3.33 X to 3 Ibmol "R'
c = - 1.20 X
lOS Btu "R
Ibmol
T
and remember that Q c. ,i r,,''" C" dT
where Ii is the molar rlowmtc of gas and Q is the ratc of heat addition to the gas pCI'
unit timc. l-Iow did you detcrrnine a good first gucss to lise?
4. Consider Example 3.2 , .ltx) = _x
2
X + 1 = 0, with the direct substitution method
jCll'lllulated as.x = -x
2
+ 1 :;;:: g(x), so that the iteration sequence is
X
k
I c= g(x
k
) = - + 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

6. Develop an algoritlnl1 (sequence of steps) to solve an algebraic equation using intcr-
val halving (bisection).
Student Exercises 75
7. Develop an algorithm (sequence of steps) to solve an algebraic equation using reg-
lilt falsi (false position). Compare and contrast this algorithm with Newton's
mcthod.
S. A componcnt material balance around a chemical reactor yields the following
steady-slale equation
0=
F
C- kc'
V
F Ibmol ftC>
where V 0.1 min " Cj" .= 1.0 and k = 0.05, .
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 -I' 15.04 'I'
k+ I - 0.716 _ 4.257 X 10
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.
lex) 0.42204 cxp
x
+
x
20
-1.3x=O
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
0.5
0
Algebraic Equations
zero-order rxn - dimensionless
Chap. 3
-0.5
a 0.5 1.5
x
2 2.5
Plot of x versus f(x) for problem IO.
11. A component material balance around a chemical reactor yields the following
steady-state equation
F F
o C C - k(25
c V ';,,- V
F Ibmol If'5
where V = IU min'!, C;" = 1.0 1 - and k = 0.05 . ..... I'
fl' lbmol "- min
i:1. Write two different direct substitution methods and assess the convergence of
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.
fl(xI,x,) = -'!>XIK(X,) + (I - XI) = 0
f,(x"x,) = j3<!>X
I
K(X,) + (I + o)x, = 0
where K(X ) = exp (_X
2
..)
2 1 + x,I'Y
Uscf
t
(x['X2) to solve for xl in terms of x
2
and substitute intoh(xl,x2) to obtain the
single equation
IX,) - (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 .x
2
values for each
solution, using the single variable Newton's method.
Appendix
Multivariable Methods
77
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,-x
2
-5 = 0
J;(x) =-x, -x
2
+ 4 . 0
How many iterations docs it take to converge to the solution? Explain this result
conceptually.
14. A simple bioreactor model (assuming s t d y ~ s t t operation) is
where JJ..mi]X
k
m
k,
c
::::: 0.53
= 0.12
::::: 0.4545
::::: 0.4
::::: 4.0
Xl is the biomass concentration (mass of cells) and xl is the substrate concentration
(food source for the cells).
Find the steady-state values for xI and x2 if f)::::: 0.3 (There are three solutions).
<l. Usc fsolve and several initial guesses for the solution vector.
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 fso1ve to find the solutions. Show lhe initial guesses and the solu-
tions that solve converges to. Show your function routine as well as the calls to
MATLAB.
f,(x"x,) CC - q>X,,,(x
z
) + (1 - x,) = 0
j;(x"x,) = l3q,x,,,(x,) - (1 + I\)x
z
.c. 0
where ,,(x,) = exp (. ..)
I j- x,h
and the following parameters arc used
13 = 8 (I' = 0.072
'Y = 20 1\ = 0.3
78 Algebraic Equations Chap.3
APPENDIX
Stability of Numerial Solutions-Single Equations
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
t evaluated at x* ,- g(,"'). if lu
g
l
(JX
If !, then no conclusions can be drawn. For simplicity in notation, we generally usc
rJx
f (jv
g to represent 1.':>1_
dx
. I' '. '1'li1gl - I I .. II I' I'
IS a stahle so uUon 01 x':: 0:: K(.r""), 1 < eva llatcd at -r"'r';' IS an 11llsta) c SO utHlll ()
llx
\Vc continue with Example 3.2 to illustrate the numerical stability of direcl sub-
stitution.
---------
-------._--.._---
EXAMJ'LE 3.2 Contimlcd. Stability of substitution
Consider the Case I formulation,
x g(x) x+1
which has the derivative
ag
. g' -
ax
- I
x I 1
II
I I
I, then x*' is a stable solutioH.
I.Sox''':=O.6ISisa O.X090
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.
1. For xo;' := 0.618, we find that lex ") :::;0
-I
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.
2. [-'or x'" 0:::: -1.618, wc find I g'(x"') I 0::::
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.
Stability of Newton's Method for Single Equations
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
At the solution, x"" we sec that
g'(x,)
g' (x*)
lex,) n\,)
II' (\,J I'
/(x*) r(x"')
II'(x*)]'
And sincc.f(x*') ::::: 0, we find that the stability constraint is satisfied
g'(x*) = ()
as long *- 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 o r ~
nary differential equations. After studying this material, the student should be able to:
Understand the difference between explicit and implicit Euler integration.
Write MATLAB code to implement fixed step size Euler and Runge-Kutta tech-
niques.
Usc thcMATLAB ode45 integration routine.
The major sections or this chapter arc:
4.1 Background
4.2 Euler Integration
4.3 Runge-Kulla Integration
4.4 MATLAB Integration Routines
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
= ~
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:
since the only nonlinearity is in the independent variable (t).
The purpose of this chapter is to introduce you to numerical techniques for integrat-
ing initial value ordinary differential equations. The first numerical integration technique
that we will present is the Euler integration. In the next section we discuss two algo-
rithms, the explicit and the implicit Euler methods.
4.2 EULER INTEGRATION
Consider a single variable ODE with the form
dx. ( )
dl = x =f x
(4.1 )
We consider two different approximations to the derivative. In Section 4.2, I we consider
a forward difference approximation, which leads to the explict Euler method, In Section
4.2.2 we consider a backwards differences approximation, which leads to the implicit
Euler method.
4.2.1 Explicit Euler
If we use a forward difference approximation for the time derivative of (4, I), we find
dx
=
dl
+ I _.
t(k + I) ~ t(k)
(4.2)
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
x(k+ 1)...- x(k) = j(x(k))
I(k + 1) - 'rk)
(4.3)
Normally we will use a fixed increment of time, that is, t(k + 1) - t(k) at, where!:;;'/ is
the integration step size. Then we write (43) as
Solving t{)r x(k + I)
x(k + 2t -x(k) Cc J(x(k))
x(k + I) = x(k) + D.tJ(x(k)) K,plicit Euler
(43)
(44)
We can view (4.4) as a prediction of x at k + 1 based on the value of x al k and the
slope at k, as shown in Figure 4.1.
Equation (4.4) is the expression for the explicit Euler method for a single variable.
The general statement for a lllultivariable prohlcm is
x(k + 1) = x(k) + 6.lf(x(k)) (45)
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.
4.2.2 Implicit Euler
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:
x(k)
+I)-x(k)
6.1' = j(x(k + 1))
x(k+1) based on x(k) and f(x(k))

slope, f(k),
evaluated at step k
(46)
k k+1
FIGURE 4.1 Pictorial representation
of the explicit Euler method.
which can be written
x(k + J) = x(k) + Iltf(x(k + 1)) Implicit Euler
Sec. 4.2 Euter Integration 83
(4.7)
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.
4.2.3 Numerical Stability of Explicit and Implict Euler Methods
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
dt
1
x co Ax = f(x)
T
(4.8)
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:
Ilt (t1t)
x(k + J) = x(k) + - T x(k) = J - x(k)
IMPLICIT EULER
The implicit Euler method evaluates the function at k + 1 rather than k:
I
I(x(k + 1)) = - x(k + 1)
T
and the state variable at slep k + lis:
(4.10)
84 Numerical Integration
ill
x(k + I) x(k) + - x(k + I)
T
Chap. 4
(4.1 J)
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
x(k + I)
1
ill x(k)
+
T
(412)
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):
(
flt)" I
x(k + I) 1 - T x(O)
which will be stable if 11- AlIT 1< 1. This is the same if we usc the representation:
x(k + i) = g(x(k)) (I -
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:
-1<
flt
1-- < 0
T
These criteria lead to the explicit Euler stability condition of:
0<flt<2T
while the solution will have a stable, oscillatory solution for:
T<ill<2T
and a stable, monotonic solution for:
o< ill < T
The implicit Euler solution, written in terms of the initial condition, is (from (4.12)):
x(k +
( )
'"
x(O)
th
Sec. 4.2 Euter Integration
85
which will be stable if < 1. This is the same result if we usc the representation
x(k + I) = g(x(k)) = ( 1 ) x(k)
I + !it
7
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.
EXAMPLE 4.1 Numerical Compm'json of Explicit and Implicit Euler
Let x(O) ::::: 4, T :::: 5, and tlt ;:: I. Table 4.1 compares the exact solution (4.9) with the explicit
Euler (4.10) and implicit Euler (4.12) methods.
TABLE 4.1 Linear First Order Example (. = 5, dt;:: 1)
()
1
2
3
4
5
x, exact
4.()()()()
3.2749
2.6813
2.1952
1.7979
1.4715
x, Explicit Euler
4.0000
3.2000
2.5600
2.0480
1.6384
1.3107
error
-2.YkJ
-4'yf{-)
-6.7(70
---8.99()
-10.9%
x, Implicit Euler
4.0000
3.3333
2.7778
2.3148
1.9290
1.6075
errol"
1.81;1,
J.(-H('
5.49;
7.Yfri
9.2(;{,
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 at ::::: I
(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.
TABLE 4.2 Linc)]r First Order Example (r;:: 5, ilt;:: 6)
~ ~ ~
x, exact x, Explicit Euler -Y, Implicit Euler

4JJOOO 4JJOOO 4,0000


6 U04S -II-SOOO LSIS2
12 03629 0,1600 11-8264
IS 0-1093
,(HmO IU757
24 (W329 OJI064 IU70S
4
3
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
--....
(4.13a)
dl
4.2 Explicit and Implicit Eulcl"-Nonlinear System
Consider a surge tank with an outlet f!owratc that depends on the square rool of the height of liq-
uid in the tank. Whclllhcrc is 110 inlet flow, the model has the following form
fix
where x is the tank height and (/:::;; WA (:::: flow coefficicntJcross-scctional area).
Analytical solution (exact). 'l'he analytical solution is
x(l) [\1,(1 lit /21' (4.13bl
Next, we compare tbis solution with the explicit and implicit solutions.
Explicit Euler. The explicit Euler method yields the following equation
,(k + I) x(k) - tH lI\le(k (4.14)
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),
,(k + I) + ula\lx(k + I)-x(k)" 0
(4.16)
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
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
where (i) is an index to iudicatc the ith iteration of Newton's method.
(417)
(4.18)
where
yO +
I) rei) _ M(YO
. g' (yO
(4.191
iJ
g'(y(i 1 + --7'
2VY(I)
We call write (4.19) as (from (4.18), (4.19), and (4.20
Iln,'(i) - (\1)'0)]
yO+ iJ
\lv(i) + 2
(420)
(4.21 )
Equation (4.21) is then iterated to convergence.
Summarizing, at step k+l of an integration, we must iteratively solve for the value of x at
k+ I. That is, (4.21) is iteratively solved to convergence, in order to find x(k + 1) in (4.16).
COMMENT ON IMPLICIT INTEGRATION TECHNIQUES
We have seen that the implicit Euler method is more accurate and stable than the explicit
Euler method. We also noted that, for nonlinear systems, a nonlinear equation must be it-
eratively solved at each time step. The implicit Euler method allows a much larger time
step, hut some or the computational savings Inuch be sacrificed in the inlcralive solution
of the nonlinear algebraic equation at each lime step_ There arc a Ilumber of more ad-
vanced implicit methods that arc used in a number of commercially availahle integration
codes. In this text we emphasize e.rplicit techniques, which are used by the MATLAB rou-
tines ode23 and ode4 5. SIMULINK has choices of some implicit integration routines.
An explicit technique that is more accurate than the explicit Euler technique is
known as the Runge-Kutta method and is shown in the next section.
4.3 RUNGE-KUTTA INTEGRATION
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. 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
4.3.1 Second-Order Runge-Kutta
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())
(
At At)
n1, = [ t(k) + 2' x(k) + 2 n1,
x(k + 1) ~ x(k) + n1,At
(4.22)
(4.23)
(4.24)
For autonomOllS systems, the derivative functions arc not explicitly functions of time, so
(4.22) and (4.23) can be written:
or
n1, [(x(k))
n1
2
[(x(k) + ~ !(X(k))
(4.22a)
(4.23a)
(4.23b)
x(k)
x(k+l) based on x(k)
and slope at t
k
+ D. t
2
~
t
k
+
1
FIGURE 4.5 Pictorial representation of s o l l d ~ o r d r Runge-Kutta (midpoint Euler) technique.
90
Equation (4.24) can now be written:
Numerical Integration Chap" 4
x(k + I) x(k) + L1t
r
(r(X(k) +
which is of the form:
x(k + I) g(x(k))
(4"24a)
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.
EXAMPLE 4.3 Second-order (Midpoint Euler) Tedmique
Consider again the first-order process:
dx 1
{(x) - x
dt T
(
I ) -I
Ill, r(x(k)) -" T x(k) T x(k)
For t1t::;;;; 1, T = 5, and x(O) = 4.0:
(4"8)
(4"25)
(4"26)
From (4"25)
From (4"26)
111[=
-1 -4
x(O) ---
5 5
-1( I) -1
I - """" x(O) - (I - OJ)(4)
5 10 5
H
5
[:rom (4.24) x(l) x(O) + 111 , bot
x(1) 4"0 - OJ2 32800
Compare this with the analytical result of 4.0 e -1/5:::: 3.2749
Notice that the error is O.16
1
YtJ. Contrast this with an error of-2.3% from Table 4.! for the
Euler method. For the same step size, Rungc-Kutta techniques arc more accurate than the stan-
dard Explicit Euler technique.
Thus far, we have used single variable examples. The next example is for a
able system.
Sec. 4.3 Runge-Kutta Integration 91
EXAMPLE 4.4 Variable System, Method
Consider two interacting tanks in series, showll in Figure 4.6, with outlet tlowrates that are a
the square root of tank height. Notice that the He)w from tank 1 is a function of
VII - il , while the flowratc out of lank 2 is a function of Vl1
2

I 2
F
FIGURE 4.6 Interacting tanks.
The following modeling equations describe this system
For the following parameter values:
(4.27)
ft2.5
13, = 2.5
min
and the input: F = 5 ft
3
/min
the steady-state height values are:
5 fl2S
13 A, = 5 ft' A, = to ft'
2 \/6 min
Numerically, we can write (4.27) as:
[
dh ] [ , ! .---- ]
cit'.) 1-0.5vh,-h,
1,(h"h
2
dh, 11;(h"h
2
) 1 = 2< _I _1. ;,-
dt O. -, '2 2\16 \ h,
(4.28)
Since this system is autOnomous (no explicit dependence on time), we can leave (oul of the ar-
guments:
. I];(h,(k), h2(1e))]
m, = j(h(le)) = j;(h,(k), h,(k))
[
. at at]
111 ti(h,(Ie) + 2 ""I' h,(k) +2 fI121 )
2 at M
1;(h,(k) + 2 Ill", h
2
(k) + 2 fI1
21
)
92 Numerical Integration
[
h (k + IlJ [h (klJ
h(k + 1l '( l '( l + 1I1,C,t
h, k + 1 h
2
k
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
so
. 05 I ..
-7-,IY7-
2v6
1
-0.118034.]
. 0.018955
I
h,(O)] j
hiO)
!!.t
----m
2 '
. 0.2
12 +2 ( 0.118(34) 111.9881971
0.2 7.001896
7 + -;C (0.018955)
h,(O) + 111" 12 + (_ 0.118(34) 11.988197f1
h,(O) + !!.t 111" 7 f 0
7
.2 (0.018955) 7.001896 fl
2' _
"'" . t;(h,(O) + "'". h
2
(O) + "''') 1;(11.988197.7.001896)
1-0.5vI1.988197-7.001896 -0.116501
"'" .0 t;(h,(O) + "'", h,(O) + "''') /,( 11.988197, 7.001 R96)
.= 0.25 vi (.988197 -7.(J()lWJ6- v7.001896 0.OIH116
",(I) ",(0) + m"c,t 12 + - 0.116501 (0.2) - 11.976700 It
",( I) - ",(0) + m"c,t - 7 + 0.01 R116 (0.2) .= 7.1l03623 It
and we call continue for the next time step, k = t. A plot of the response of this system is shown
in Figure 4.7. The response of Ii] actually increases slightly hefore dccrcasing------this is missed
became of the scaling.
Notice that when hi is greater than h
2
, the flow is from tank I to tank 2; while when hi is
less than 1l
2
, the flow is from tank 2 to tankl (although this cannot occur at steady-state). Since
we have assigned a positive value to F[ when the flow is from tank I to tank 2, then a negative
value of F
I
indicates the opposite flow. Care must he taken when solving this problem numeri-
cally, so that the square root of a negative number is not taken. For this pU'lJOse, the sign func-
tion is used
Sec. 4.3 Runge-Kutta Integration 93

10
1 ----
gL
81
7r--------
61
o 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.
4.3.2 Fourth-Order Runge-Kutta
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
t
fill [(I(k), x(k))
fIl
2
= + D.I, x(k) + fIllD.I)
fll, [(I(k) + J D.I, x(k) + 1 11I
2
D.I)
22
fIl
4
= [(I(k) + D.I, x(k) + 11I,D.t)
(4.29)
(4.30)
(4.3 J)
(4.32)
94
x(k + i) x(k)
j I -I- IJ}z
11 3
Numerical Integration
tn, m4 !,
+ + uf
3 11
Chap.4
(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.
SELECTiON OF INTEGRATION STEP SiZE
Generally, integration step size must be "small" for Euler, call be larger for second-order
(as far as accuracy is concerned), and can be still larger for fourth-order
Rungc-Kutta. Particularly for Euler, step sizes that are (00 large can be unstable or
rate. Step sizes that arc too small may waste computer time or have numerical truncation
errors sillce the state variables Inay not change much from step to step. If the student L1ses
a fixed step si/.e, then it is generally a good idea to try larger and smaller step sizcs to sec
if the results change significantly. Generally, you will want to use as large a step size as
possible, A particular challenge is from "stiff' systelns (time constants that span a wide
range), where a commerical code specifically for stirI' systems should be Llsed. One welJ-
known implicit mcthod for stitT systems is (Jear's method, which is available in
SIMULINK. Implicit methods will only work wel! for systems that arc continoLls. IT dis-
continuous systems are simulated (for example, step changes at certain times), then
Runge-Kutta methods should be used.
Most eommerical integration packages use a variable step size. The integration step
size is automatically chosen and varied from step-to-skp to assurc accuracy while mini-
mizing computation time. The integration routines in MA'rLAB use a variable integration
stcp size.
4.4 MATLAB INTEGRATION ROUTINES
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 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-,
4.4.1 ode23 and ode45
To usc or the reader must first generate an m-filc 10 evaluate the state
variable derivatives. Theil the student gives the cOlllmand:
where
It, xl ode45 ( , xpr ime ' I rto, t t ] xO )
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)
The arrays that arc returned arc
a (column) vcctor or lime
x an array of state variables as a function of time (column I is Slate I, etc.)
For example, jf the lillle vector has 50 elements, and there arc three state variables,
then the stale variable veelor 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.
EXAMPLE 4.4 Revisited Solution Using MATLAH Routine ode45
rirst. the following file titled twotnk. mwas generated:
function hdot Lwotnk{t,h) ;

hdotll) = 1-0.5*sqrtlh{l) h(2));
hdot(2) "" O.2')"c3qrtlhll)--h{2))-cow,t*:;qrt(h(2));
'fhcn, the following command is entered ill the !VIATLAB command window:
[t, h 1"'ode4S { T twotnk' , [0100] , [12 7 J ' };
96
Numerical Integration Chap. 4
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))
plot (t, hi, ,2) )
The transient responses are shown in Figure 4.8.
12
11.5
11
10.5
10
o 20 40 60 80 100
time (minutes)
a. Height of Tank 1
7.2
7
6.8
N
6.6
-c
6.4
6.2
6
0 20 40 60 80 100
time (minutes)
a. Height of Tank 2
FIGURE 4.8 Transient response curves for interacting tank example.
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
ODE23: Variable step size, second-order Runge-Kutta
ODE45: Variable step size, fourth-order Runge-Kutta
FURTHER READING
A nice treatment of numerical integration is provided by:
Parker, T.S., & L.O. Chua. (J 989). Practical Numerical Algorithms .ftJr Chaotic
S'.vstems. New York: Springer- Verlag.
A treatment of integration techniques with chemical engineering applications is presented
by Davis.
Davis, M. E. (1984). Numerical Methods and Modeling for Chemical Engineers.
New York: Wiley.
The following book is more of an advanced undergraduate/first-year graduate student text
on numerical methods to solve chemical engineering problems. The emphasis is on FOR-
TRAN subroutines to he used with the IMSL (FORTRANhased) package.
Rameriz, W.P. (1989). Computational Methods ./iJr Process Simulatioll. Boston:
Butterworths.
98 Numerical Integration
STUDENT EXERCISES
1. Consider the scaled predator-prey equations.
dy,
-=a(l-y)y
dt .2 I
dy,
;il = -13(1 - y,)y,
Chap.4
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
ing equation is:
dC
dt
Use the following parameters:
V 5 .
p=.mll1
k
2
= 0.32 flO Ibmol' min-'
and a steady-state inlet concentration of
C
i
, = 1.25 Ib11101 fl '
Calculate the steady-state concentration of C, = 0,625 Ibmol ft-3
Assume that a step change in thc inlet conccntration occurs at t:::: o. That is, C
i
changes from 1.25 Ibmol fl-} to 1.75 Ihmol ft-} atl = 0 minutes. Use ode45 10 sim-
ulate how the outlct concentration changes as a function of time.
3. Analyze the stability of the fOliJ1h ordcr Runge-KuHa method for the classical
order process.
dx
tit
-x
What is the largest integration step size before the numerical solution becomes un-
stable?
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 nowrates 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 flowrate 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
where x
J
and x2 ;:;0 drug concentrations in compartments J and 2 (fLg/kg patient
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
+ k
21
) = 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 a s ~
slime a constant drug infusion rate of 5.2 fLg/kg min.
a. k ~ k l
b. k
12
=2k
21
C. k
l2
= 0.5 k
21
Discuss how the concentration of compartment 2 (if measurable) could be Llsed to
dctcrmine the actual values of k
l2
and k
21
.
Usc the MATLAB [unction ode45 for your simulations.
6. A stream contains a waste chemical, W, with a concentration of I moilliter. To Illcet
EPA and statc standards, at least 90% of the chemical must be removed by rcaction.
The chemical decomposes by a second-order reaction with a rate constant of
1.5 liter/(mol hr). The stream f10wratc is 100 liter/hr and two availahle reactors
(400 and 2000 liters) have been placed in series (the smaller reactor is placed hcforc
the larger onc).
a. Write the modeling equations for the concentration of the waste chemical. As-
sume constant volume and constant density. Let
ell'l ~ concentration in reactor 1, mol/liter
C
w2
~ concentration in reactor 2. mol/liter
F' ::::: volumetric tlowrate, liter/hr
V
j
liquid volume in reactot 1, liters
V
2
::::: liquid volume in reactor 2, liters
k :::::: second-order rate constant. liter/(mol hI')
b. Show that the steady-state concentrations are 0,33333 mol/liter (reactor I) and
0,0')005 mol/liter (reactor 2), so the specification is met.
(I-lint: You need to solve quadratic equations to ohtain the concentrations,)
c. The system is not initially at steady-state. Write a function file and use ode45
for the following:
(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
Student Exercises 101
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 k
2
represents the rate constant for the c o n ~
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:
where C
A
, C
u
' and C
c
represent the concentrations (mol/volume) of components A,
B, and C, respectively.
a. For k,{= 2, k
l
,. = I, ane! k
2
= 1.25 h,l, use ode45 to solve for the concentra-
tions ~ a function of time. Assume an initial concentration of A of CAO :=
t mollliter. Then plot the concentrations as a function of time. For what time is
the concentration of B maximized?
b. Usually there is some uncertainty in the rate constants. If the real value of k
2
is
1.5 hr-
l
find how the concentrations vary with time and compare with part a.
SECTION III
LINEAR SYSTEMS ANALYSIS
LINEARIZATION OF
NONLINEAR MODELS:
THE STATE-SPACE
FORMULATION
5
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
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:
Write a linear model in stale-space form.
Linearize a nonlinear model and place in state-space form.
Use thcMATLAB eig function to analyze the stability of a state-space model.
Develop the analytical solution of state-space models.
Understand stability and transient response charactcrstics as a function of the
eigenvalues.
Understand the importance of initial condition "direction".
Be able to use the MATLAB routines step and initial for simulation of statc-
space models.
The major sections in this chapter are:
5.1 State-Space Models
5.2 L,inearization of Nonlinear Models
5.3 Geometrical Intell1retation of Linearization
5,4 Solution of the Zero-Tnput Form
5.5 Solution of the General State-Space Form
5.6 MATLAB Routines step and initial
105
106 Linearization of Nonlinear Models: The State-Space Formulation Chap. 5
5.1 STATESPACE MODELS
Thus far in this text we have discussed dynamic models of the general form:
x= f(x,u) ('ill
where f(x,u) is, in general, a nonlinear function vector.
A linear model is a subset of the more general modeling equation (5.1). 'I'he fonn of
linear model that we discuss in this chapter is known as a statc-space model. First. \vc
show how to write models for systems that arc inherently linear. Tlll'.IL \VC
show how to approximate nonlinear systems with linear models.
5.1 illusln:ttcs the form of a state-space model.
EXAi\IPLE 5.1 NOllintcracting Tanks
Consider two tanks in series where the flow nut of the first tank enters the second lank (Fig-
ure 5.1). Our objective is to develop a model to describe how the height of liquid in tank 2
changes with lillIe, given the input fJowratc F,,(t). We aSsumc that the flow out of each lank is u
linear function of the height of liquid in the tank.
F
o
t
h
1
tbi.
F
1
h
2 tt=L. F
2
FIGURE 5.1 Noninteracting tanks.
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 lank (since :;::- [)2ItZ)
F
J
/3)
. - _ .. ' II
A, A, 2
where A
2
is the constant cross-sectional area for tank 2 (parameter), ~ 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
Sec. 5.1 State-Space Models
dI',. /3, h ~ h
df - A
2
1 - A
2
2
107
(5.3)
Notice that we can write (5.2) and (5.3) in the following matrix form:
(5.4)
which has the general form:
x=Ax+Bu
where:
(5.5)
/3,
A,
/3,
A
2
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
The matrix-vector form is:
y ~ [I 0] [h'l cc ex
o I h,
where:
c
[
I oj
o I
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:
l
' I []
1 0 ' ()
y ~ 0 1 [;;'] + 0 [F;,]
o 0 2 1
which is the form of (5.6), with
5.5.1 General Form of State Space Models
Example 5.1 illustrated a specific case of a state-space model. In general, a state-space
model has the f{)lIowing form:
dX
I
dt
-I- (JIll X;, -I- b
ll
H) -I- -I- hJill lim
-I- dim U
IlI
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:
["]
['
(112
'or] ["
btl
"r]
""" x" + b", bill
b ~ I l I:",
x"
(lui (1,,2
[" I"["
ell
'1'] ,I'
d
l2
"]1 "]
d ~ l I l ltl/l Y
r
(r1 (;,<2
em x" tid
d
a
where the dot over a stale variable indicates the derivative with respect to time. 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.
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.
which has the general form:
Sec. 5.2 Linearization of Nonlinear Models

-I-Du
109
(5.7)
5.2 LINEARIZATION OF NONLINEAR MODELS
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.
5.2.1 Single Variable Example
A general single variable nonlinear model is:
d-,,;
dl
(5.8)
The function of a single variable, j(x), can be approximated by a truncated Taylor senes
approximation around the steady-state operating point (.-r):
. iif I I a
2
rI .
j(x) f(xJ -I- .. (x - xJ -I- .., (x - x,)' -I- hIgher order terms
dx x, 2 dx x,
Neglecting the quadratic and higher order terms, we obtain:
. . af I
j(x) = j(xJ -I- . (x - xJ
dx x,
Note that:
dx
y
()

dl
(5.9)
(5.10)
(5.11 )
110
Linearization of Nonlinear Models: The State-Space Formulation
Chap. 5
by definition of a steady-state, so:
dx iii I
=f(x) == '. (x- x,)
dt rh .1,
where the notation 0f1(}ti.t
s
is used to indicate the parlial derivative ofJ(x) \vith respect to .t,
evaluated at the steady-state. Since the derivative of a constant (1;) is zero. we call write:
which leads to:
dx
dl
d(x - xJ
dl
d(x - 'J
dl
ill I ,.= .' (x - x,)
dx -I,
I) 13)
() 1-II
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 I symbol is llsed to represellt dc
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.
'Ihis can be written in s t t e ~ s p c e Corm:
() 1)1
dr'
dt
(f x'
(516)
where {/ :::: iH!dxx
s
.
We have shown how to linearize a single variable equation. Next, \VC consider a
system with one state and one input.
5.2.2 One State Variable and One Input Variable
Similarly, consider a function with one state variable and one input variable
x
dx
~ f(X,II)
dl
() 171
Using a Taylor Series Expansion Corf(x,u):
x
. ill I ill I
/(X"II,) + ;' (x - xJ + .' . (II - IIJ
d.x .t,.Il, {iu .1,.1/,
iY'/1 lil211'
..: (x - X,)(II - II,) + ; 'i (II ~ II,)
dxtJU .1,.11, 2 rJlr .\\.11\
+ higher order terms
b
and truncating aftcr the linear terms, we have:
Sec. 5.2 Linearization of Nonlinear Models
. . ) iIf I
x fix It +. (x - x )
, s, s. (Jx .\",.(1, - S
ill I
t- ()ll IJ',
(It - ItJ
111
(5.18)
and realizing thatj(x,I"u) :::: 0 and dx/dt = d(x .r)/dt:
d(x - xJ ilf I (x x) + ilf I
dl ax ',.11, , all ',,II,
Using deviation variables,./ ::::.r - xI" and u' = It - 11,1':
which can be written:
dx'
= (/ x' j-- b u'
dt
where ({:::: cYIc-1rLr,\' and b::::;
(li uJ
(5.19)
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 and d =dg/au:,_
\" s '- .\',II.\'
5.2 illustrates the application of linearization to a one-slate nonlinear
system.
Using deviation notation:
y' ,,::. C x' + d II' (5.23)
112 Linearization of Nonlinear Models: The State-Space Formulation Chap. 5
EXA\IPLE 5.2 Consider H Nonlinear 'rank lleight Probll'l11
dh
<il
I
.1
13 \ II
.'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
I ,
\
Ij \ hi
,I '
I -
[3
III
2/\ \ h,
(:,),251
rile ftl'\l terll] ell] the righthand side is lern. because the lincari/<ltioll is ahout a
point. That is.
W(, call jll)\'\ \\Tite:
d(h hJ
<il
<ih I
dl!' J
I
.1
I' II
,
1,,\ \ II
()
I
11.1 + II
A
and lI\ing dC\ialiul1 \ariahk nutatioll (1/::0: Ii - h
j
and II':::: r and dmpping the
I'
dh'
<II
I.'
2/\\ 11,
II"
,I
!--'\)r \:UIl\CllicllCC (simplicl1;' in llotatj()!11 we often urlJJ! the (') notation and assume that x II
arc dc\j,Hi(1I1 \(lriahles Cr:::: Ii - h,. /I:::: r (,i dIld write:
which i" in the :sta!('-sp;\l'l' form
til:
dl
dr
dr
IJ
2/\ \' h,
ux-l-bu
I
" I
(527)
5.2.3 Linearization of Multistate Models
The prC\ious cx,-ullples sho\\ed how to linearize single-stale systems. In this sec-
lion \VC geJlcralizc the technilJue for any' I1umber ur slates. lkfnre vvc generalize the tech-
niquc. it is worthv,hile to consider an example system with Ivve) states, olle input and OIlC
output.
.._------------_-
Performing a Taylor series expansion of the nonlinear functions, and neglecting the quadratic
and higher terms:
(5.29)
(5.28)
(5.30)
113
~ 1;(.r, ,X"ll)
dX
j
lit
Linearization of Nonlinear Models Sec. 5.2
EXAMl'LE 5.3 w o ~ s t t c S.ystCJll
From the linearization about the steady-state:
j;(Xj"Xh,U) = J;(X
il
,X
2
",Il,) = 0
and:
g(X
I
."X
2
"U) ,=-, y,
Since the derivative of a constant is zero:
"\x, -=-or,,}
dl
and
d(x] - x
2
)
lit
we can write the state-space model:
114 Linearization of Nonlinear Models: The State-Space Formulation Chap. 5
[
,II,
(Ju
f- _.
df
e
(JII
,ll""1
(5.311
I<lg
dg
, ~
XI,
,
I
d.t] t .. "." ilx,
t"
\\hid) i ~ lhe form or a st:l!t'-SP:lCl' IlHldel:
x' A x' + H u'
y' ex' + D u
'
\\here (') indicates dC\iation variahles.
5.2.4 Generalization
J
NO\\ consider the tll'ncral nonlinear Illodel \\'hcrc x is <l \cdor of II state v<triable,,_ lJ is (j
v('clOr of III input \ariahlcs and y is a vectur of r output \ariables:
x, ~ f,(.r,. ... \'",u, .. 1/111)
x
n
..
1;,(x
1
... .x/Iu I'
, .. lI
m
)
V gJ (.r
j
....-\"".11 J' .If",) - ,
Y
r
g,(.\l" ,X",II], .. .11
1
)
In \-ector notation:
f( X,II)
g(x,u)
Fkillen!" of the linearization matrices arc defined III the follll\ving fashion:
15 ..\.11
(';,\41
/\ 1.1
"1.1
(lX,' __ Ii
<11/, I .. "
b
Usually, the measured (output) variable is not a direct function of the input variable, so it
is Illore common to sec the following model:
115
(538)
(5.37)
iJu I c, = '''i
'.I
dAj .1,_1<,
i)u I
D = -"-"
II aU
j
"/'>
Linearization of Nonlinear Models Sec. 5.2

y' Cx'+Du'
Generally, the () notation is dropped and it is understood that the model is in deviation
variable form:
x=Ax+BlI
After linearization, we have the form:
x' A x' + H u'
y=Cx+[)lI
This procedure is applied in 5.4.
EXAMPLE 5.4 Interacting Tanks
Consider the interacting tank height problem shown in Figure 5.2:
FIGURE 5.2 Interacting tanks.
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 I
lJil
1
hJ;
ilf I
Au = ah'} h F
2 ".<
li = ill
i
I
II ilF hJ',
IJ
I
2AI




1
Al
=0

2A,vh"
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)):
ell = (jj;; k.", 0
and the state-space model is:
Sec. 5.3 Interpretation of Linearization 117
[
(!li'] cc
{fJ:}
dt
Il,
--- 2/tl\,/h
l
:;-
Il,

where:
t Ul}UI
y [O!]
(5.39)
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 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).
5.3 INTERPRETATION OF LINEARIZATION
In Section 5.2 we illustrated the method of linearization of models into 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
dl A II
for a system with A -= 1 n
2
, !Is :::: 5 ft, and fj ;;:; I/V5 ft
L5
/min the steady-state f10wrale is
F
s
;;;;: I ft
3
/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
performing the lincarization:
"If I
J(h.FJ = f(h,,!',) +: . (h h,)
dh h,)"s
(5.40)
118 Linearization of Nonlinear Models: The State-Space Formulation Chap, 5
0,5
linear
"'"
o
-a,s
o 2 4 6 8 10
x
FIGlJRE 5.3 Basic idea of linearization. 'rhe linear approximation is
exact for the steady-state value of x;::o: 5.
for our parameter values
(h,FJ '" 0 +
2\15
(h - hJ
or
I
('(hF)=O--(h-h)
. 's . 10'
(54 I)
50 40 30 20
.'
..'
10
10
8
'"
6
1"
'"
'q;
4 .c
2
a
o
lime, min
FIGURE 5.4 Comparison of linear and nonlinear responses for two different
initial conditions.
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.
Sec. 5.4 Solution of the Form 119
5.4 SOLUTION OF THE ZEROINPUT FORM
We have previously written the general state space Inodel in the following form:

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 The "zero-input" form of the state
space model is then:
or
[
.j [
\1 all
t'/I {lnl
x
(/1I2
Ax
1r
]
{/lll XI
llll/l .f
n
(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 a x
has the solution:
X(I) ,,'" x(O)
which is stable if a < O. In a similar fashion, the solution to (5.42) is
X(I) e"'x(O) (5.43)
and the solution to (5.43) is stable if all of the eigenvalues of A are less than zero. The re-
sponse of (5.43) is oscillatory if the eigenvalues arc complex.
There arc many differenl ways to calculate the exponential of a matrix; in this chap-
ter we discuss only the similarity method.
Recall that the eigenvector/eigenvalue problem is written (sec Module 2 for a re-
view):
120 Linearization of Nonlinear Models: The State-Space Formulation Chap. 5
AV=V;\
l<Of a 2X2 A matrix we have the following eigenvector matrix:
I
v" "12)
V = [s, S2J =. v" "22
where S, = first eigenvector (associated with AI)
S2 = = second eigenvector (associated with 1..
2
)
and the following eigenvalue matrix:
I
I.., 0 I
;\ = 0 1..
2
Multiplying (5.44) nn the right side hy V] wc find:
A=V;\V
'
multiplying by the scalar t and taking the matrix exponential, we find:
eM = V ei\1 V-I
(5.44)
(5.45)
(5.46)
(5.47)
(5.48)
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 has a re-
sponse in the direction of with a "speed or response" of Ai" This is shown by the
ing analysis.
5.4.1 Effect of Initial Condition Direction (Use of Similarity Transform)
Recall that we arc solving the following model
x= Ax
Define a new vector z, such that
x = Vz
(5.42)
(5.51 )
Sec. 5.4 Solution of the Zero-Input Form 121
or
z = V---
J
X
and notice that (from (5.51 )):
x= V Z
Substituting (5.53) and (5.51) into (5.42):
Vz=AVz
or, left multiplying by V-I
z= Vi AVz
But, from (5.44) A V = V A
so we can write:
V'AV=!\
which yields (from (5.55) and (5.56)):
z= !\ z
But A is a diagonal matrix (sec (5.46, so we have:
[
il] = 'AI 0]1"']
Z2 _0 "-2 __ Z2
Notice that (5.58) represents two independent equations:
z] = "-IZ\
1
2
= "-2 Z2
which have the solutions:
z,(t) = Z,(O) e'"
z,(I) = Z2(0) e'i
and we can write:
[
ZI(t)1 "e'" O][Z](O)]
z,(t) = 0 e',1 .Z2(O)
or
z(t) = eAl z(O)
Notice that, if the z(O) vector has the form:
ESCOLA Dc EHGENHARIA
BIBLIOTECA
(5.52)
(5.53)
(5.54)
(5.55)
(5.56)
(5.57)
(5.58)
(5.59)
(5.60)
(5.61)
(5.62)
(5.63)
(5.64)
(5.65)
122
then:
Linearization of Nonlinear Models: The State-Space Formulation Chap. 5
and, if tile z(()) vector has the form:
z(t) (5.66)
then,
(').67)
(568)
that is. initial condition,,; of z{O) :::
AI' v\ihile initial conditions ofz(O):::
Al
"
will yield a ';spced of response" associated with
will yield a "speed of response" associated with
'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
I<;XAMI'LE 5.5 A Stable System
Consider the following system of equations
XI = - 0.5 XI + x
2
Using standard state-space notation
x = Ax
The Jacobian matrix is
A = [. -1l.5 1'.1
-2
the eigenvalues are the solution to det(H - A) :;;:; 0, which yields
([
A + 05 - 1 J)
det . = (A + 05)(A + 2)
A + 2
so
A, - 0,5 A, = - 2
and the eigenvectors are
(5,71 )
(5,72)
(5A2)
(5,73)
<, = [-11.5547 '1
0,8321
Note that Sl is the "slow" subspace, since it corresponds to Al = -0.5 and 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)
-0,5547J[.e
O
" 011' 0,6667] x(O)
0,8321 e" 1.2019
(5,74)
If the initial condition is in the direction of that is
x(O)
we find the following slate solution (from (5.74) and (5.75:
X(l) = [I
If the initial condition is in the direction of S2' that is,
X(O) = I. - 0.5547.1
0,8321
(5,75)
(5,76)
(5,77)
124 Linearization of Nonlinear Models: The State-Space Formulation Chap. 5
we find the following state solution (from (5.74) ami (5.77:
X(f)
- 0.5547
0.8321
(5.781
Note that x(O) :::; f.lll is the slow initial condition and x(O) :;; :::;; 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').
11'IGlJRE S5 Transient response for initial condition in the slow
subspace.
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
d ;::: I 1; 0, '-2] ;
x -;;; expm(a*O.5)*[--O.5547
x ;:::
-0.2040
0.3061
0.8321]
t
which agrees with the plot in I,\gurc 5.6.
125 Solution of the Zero-Input Form
fa.:H suospace
x(O) = [- 0.5547 ]
0.8321
Sec. 5.4
-1 '-------------------='
o 2 345
FIGURE 5.6 Transient response for initial condition in the fast
subspace.
The previous example was a stable system. The next example is an unstable system.
EXAMPLE 5.6 An Unstable S}'stem (Saddle)
Consider the following system of equations;
.\:) = 2x
1
+ Xl
= 2x, -. Xl
The Jacobian matrix is
A = 1
2
II
.2 - I
the eigenvalues are
A, = -1.5616 A
2
=. 2.5616
and the eigenvectors are
< = I 0.270:1 .1
1 ... -O.962g .
l
o.R719]
<2 - 0.4896
since Al < 0, s[ is a stable subspace; since A2 >. 0, S2 IS an unstable suhspace.
The solution for this system is:
Xl __._ [" 0.2703 o.R71911e 15(,lr"
( ) - -0.9628 0.4896 0
11
0
.5038
e
1
.
56
\(il.O.9907
-0.
8972
1 x(O)
0.2782
If the initial condition is in the direction of that is:
126 Linearization of Nonlinear Models: The State-Space Formulation Chap. 5
x(O)
O,'7(H!
-- I
we find the fulJrming :--1,l1C SolUli(l1l
xl t)
O.270J ('
- O,9h28 ('
which is a stablt' solution. shown in r"i)!UH: .".7
stable sUbspace
o


x
-0 5 f /,. x(O) [ 0.2703]
1/ " -0 9628
-I'L----:----------::---;;------
o 2 3
FlCa"IU: 5.7 Inlli,t1l'(11Hli\i(l1l in till' \[:lhk SUh"p:ICl'.
If lhe initi;d condilinll is in the dirl'ctioll pI that is,
x(lI)
[
0 X7191
(l'-iS96
we find the following state \o]lIliun:
X(I)
[
rUnl9 (-"';('11,'
O.-iX(l() eo' ,",h'
which is all lHl.s[,lhJe SO!llliulL as ShU\\'ll lJl FlgUIT 5.S.
o
o 02 06 08
FIGUI-U: 5.8 Initial umditioll in tilt' unstahle \uhspau_'_
Il should be noted lhal if the initial conditioll is Ill)! ('.Y(lU/\' in the stahle slIh"pacc. the solUliull
to di\l'I'!,!c and hCCOllll' unslahk. Thut is. if thl' initlal cunditi()11 i" olT by. "a;, 10 !p.
thl' \\,ill l'\,cntually lxconw Llllbuumkd.
t
5.5 SOLUTION OF THE GENERAL STATE-SPACE FORM
Now, consider the general form:
[]
["
at?
"T]
l"
b
12
;.]
",-
__ u:
11
b
nm
. ali? \ /I
b"l
b
n2
Sec. 5.6 MATLAB Routines step and initial 127
when u(f) = constant = {f(O).
In a similar fashion, the solution to (5.79), for a constant input (u(t) = from
t::::: {) to tis
or
Illu
Recall that the single variable equation:
x=a.\l-bu
has the solution:
b
X(I) en, x(O) I (e'" - I) 1/(0)
a
X(I) P xeD) + Q u(O)
where
(5.79)
(5.80)
(5.8 I)
(5.82)
and Q (I' - I) A 'II
(583)
(5.84)
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:
More often this is written as
X(I + AI) P X(I) + Q U(I)
x(k + I) Px(k) + Qu(k)
(585)
(5.86)
where k represents the kth time step. Often a general purpose nuttlcrical integration
niquc (such as one presented in Chapter 4) will be used to solve (5.79).
5.6 MATLAB ROUTINES step AND initial
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
EXA!\'1PLE 5.7 A Linearized BiOl"Cactol" l\lodel
Consider the follO\ving: lincarilcd form of a biorcactor model with suhstrate inhibition kinetics
(see tvloduJe 8 for details):
x=Ax-fBu
)'=Cx+Du
where:
A=
o
- 0.7500
009056-]
2.5640
Enter the state space model:
B _[- 1.5302 [
_ 1.8255
[
I 0]
o I
J) - [ ~
a = [0, 0.9056;--0.7500, -).')640]
<::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 and initiiJl 129
Check the stability
eig(a)
ans :::;;:

-2.2640
The system is stable.
Assume the process is initially at steady-state. Since this model is in deviation variable
form, the initial condition is the zero vector.
5.6.1 The MATLAB step Function
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 time vector and usc the following command
[y,x] = step(a,b,c,d,l,t)
5.6.2 The MATLAB initial Function
The MATLAB ini t ial function assumes a deviation variable form, with the initial
conditions perturbed from zero. The commands arc:
FIGURE 5.9 Plot of outputs, for a step input change.
130 Linearization of Nonlinear Models: The State-Space Formulation
[Y,x,tJ = initial(a,b,c,d/l);
ploL(t,y)
Chap. 5
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 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).
The I,,:1ATLAB routines that \-vere used include:
exprn:
step:
Matrix exponential
Step response of a state-space (or transfer function) model
State-space rnodels can be transformed to Laplace transfer function fOnl1, which is
particularly useful for control sy'stcm design. Applications of Laplace transforms \vill be
presented in Chapters 7 through 10.
Eigcnvector/cigenvalue analysis \vill be useful in pe-rfonning analysis.
which is covered in Chapter 13.
The reader should understand the fol\O\ving terms:
state-space
Jacobian
deviation or perturbation variable
eigenvalue
Student Exercises
eigenvector
linearization
stability
Taylor series
FURTHER READING
L,inearization is discussed briefly in most books on process control, including:
131
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
1. As a process development engineer you arc working on a process with three
continuous-stirred-tank reactors (CSTRs) in series. A constant volumetric H(l\vrate
(flowratc docs not vary with time) is maintained throughout the system, howcver the
volume in each reactor is different (but constant). Since thc temperature varies from
reactor to reactor (but is constant in an individual reactor) the reaction rate parame-
ter is different for each reactor. The molar concentration of the inlet stream varies.
2
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
tI. \\irite the::; dynamic model equations.
h. \Vritc the statc-space model oCt") ::: A x + B It
c. The values or the parameters and variables arc
F::::: 1 nJ/min C(I::: I IhmoJlft.'l
V, = I() ft1 V, = ft' V, = 5 fl
'
k
l
:;:; O.O:n3 mini k::.::::: 0.2 min-
1
k:;::: 0.55 mirr
1
i. Find the steady-state concentrations in each reactor
it Evaluate the A matrix (Jacobian) and find the eigenvalues
2. Consider a chemical reactor with bypass. as shO\vn below. Assume that the rcnction
rate (per unit volullle) is first-order (r::: kC
j
) and ('I is the concentration in the reac-
tor (the reactor is perfectly' mixed). Assume that the volume in the reactor (V) and the
feed flowrate (F) remain constant. crhc fraction of feed bypassing the reactor is
(l -a)F and that entering the reactor is aF. Assume that the fraction bypassing the r e ~
actor does not change. The inlet concentration (C
i
) is the input vmiable and the mixed
outlet strcarn composition (e
2
) is the output variable. \\lrite this model in state-space
form (this model is inherently linear, so deviation variahles are not neededj.
o(.{-) A :( + nIf
\"=C'x+-Dl/
3. C\msidcr the follc)\\.;ing set of series and parallel reactiolls
k. I k.-,
A . ~ [i .) C
A + A ~ D
k,
Material balances on cOlnponents A and B yield the following t\-\/O equations
d('.,
dl
dC"
dl
F ,
V ((",1/ - CAl - k. (", - k, (":,
F
V ( .. ("/1)1 (k, (A - k: elll
where k,
5 I
min Ie
6
5 .
nlln-
I
]
I liters
k, =----:-
, 6 mol min
(Ii
10 mol
liter
mol
(" ~ . - ~
ii' . I iter
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:
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.
Fill == inlet llowrate (I liter/min)
C
in
=inlet concentration (l gmolliiter)
C == tank concentration (0.5 gmollliter)
V = tank volume (I liter)
k == reaction rale constant (2 liter/(gmol min))
f3 == I min--
l
dVC 2
-- = Fe - FC - WC
dt In III
dV
= F -F
dt III
Equations (5.87) and (5.88) can be written in physical state variahle form as
dC = F
i
" (C _ C) _ kC
2
dt V -(1l
dV
= F - "V
dt 11/ t..J
(5.87)
(5.88)
(5.89)
(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.
7. The l1ol1intcracting tank model I:) (sec Example 5. ()
134 Linearization of Nonlinear Models: The State-Space Formulation
I
" - 13
1
0 1 I" I ]
AI, _ ["1\ + AI, I';,
13 1 13, ",
, '. 0
A, A,
. .
Chap, 5
Consider a system where the 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
We find (1"')Ill F
I
I3
l
h
l
and F, 13
2
h
2
), then, that:
1'1
2
n
z
13, 2 , I', 1
rnm nlln
and the state-space model (in physical variables) becmHes:
1,
--1 0'1Ih
l
,I+[05I F
0,2 - OJ h, 0 "
[
:J (:1[" 1,1 + [F I
o I ", () "
() 0 1
a. Work in deviation variable form and find the fast and slow subspaces. Use ini-
tial to simulate the unforced deviation variable systcrn (input deviation re-
mains constant at 0), from initial conditions in both the fast and slow suhspaces.
h. Usc the results from part <1, and convert to the actual physical variables.
c. Work in physical variable form. Usc ini tial to simulate the unhJrced deviation
variable system (input remains constant), from initial conditions in both the fast
and slow subspaccs. Show that the results obtained afe the same as those in part b.
8. As a chemical engineer in the pharmaceutical industry you are responsible for a
process that uses a bacteria to produce an antibiotic. The reactor has been contami-
nated with a protozoan that consumes the bacteria. The predator-prey equations arc
Llsed to model the system (b ::::: bacteria (prey), jJ ::::: protozoa (predator)). The time
unit is days.
dh
dl
dl'
dl
u b 'Y bp
" 'Y hp- 13 I'
Student Exercises
a. Show thatthc steady-state values are
135
dz
fl (1 w) Z
d/
b. Usc the scaled variables, tv and z, to find thc following scaled modeling equations
Ii p
ll'
rill'
d/
z=
,,(I
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 (let the state variables be Xl :::0
HI ,- It\- and );:, ;;;;; Z - z).Find the initial condition vector x
o
;;;;; [,,".,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
I
i'l I. 1.0 0.011 X'i
"2 4.0 5.0 .\,
a. Find the "fast" and "slow" initial condition directions.
10. Consider the foJiowing system of two reactors.

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:
Bu
c. Given the following constants. calculate the steady-slale concentrations:
I;, =
c
u
_ kgnlOl
.j L
111
IJ.3.1.13.1 hr I
VI'" 15nr' = l)m
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 \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.
F
T
Tank outlet
Jacket inlet

T
F,
,

r-
---
V T
Tank
Jacket
Tank
inlet
Jacket
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.
Assume: Constant level.
Perfect mixing in both the tank and jacket.
The tank inlet flowratc, jacket flowrate, tank inlet temperature, and jacket
inlet temperature may change.
The rate of heat transfer from the jacket to the tank is governed by the equa-
tion Q;:;; UAClj T), where U is the overall heat transfer coefficient and
A is the area for heat exchange.
b. State the objective of this process.
c. What do you consider the most important measured variable?
d. What is a likely input variable variahle that you would use to maintain a desired
tank temperature?
Student Exercises 137
Part 2
Assume that both the tank fluid and the jacket fluid are water. The steady-state
ues of this system variables and some parameters arc:
I'l'
min
1; = 50"F
T
jill
= 20(Y'F
Btu
= 61.3 OF
Toe 125F
7; = 150"F
Btu
= 61.3 OF
vc= 10 n'
V = 1 ft'
J
e. Find Fj and UA (show units) at steady-state.
f. Linearize the set of two nonlinear ODEs obtained in problem a, to obtain the
state space form:
x=Ax+Uu
where x= = state variables
u= input variables
1
1'- l' ]
Y= T- 7:
J J.I
= output variables
Determine the A, H, and C matrices (symbolically and numerically)
g. Find the eigenvalues of A.
138
Part 3
Linearization of Nonlinear Models: The State-Space Formulation Chap. 5
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:
dz (L) w _ (L + Vii) "+ V ".
dl MM 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 flowrates. '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
as a perfectly mixed drum
Gas drum for
a boilerhotlse
unit
To furnaces
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
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.
Student Exercises 139
x=Ax+Uu
y = ex
x = r
p
, - 1"'1 = state variables
, P2 - Ph
\I
y
[
change in valve position 1J
:;:: change ~ n v<.llve position 2 =
change III sourCe pressure
output variables
input 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:
fJj == (Xi hi (pi - PI) =:: flow through valve i
C/I :::: ('(, hi (PI - P2) == flow through valve I
q2 ::;: 0'2 11
2
(P2 ~ p}) == flow through valve 2
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.
STEADY STATE DATA:
gas flowratc =: lOOO std ~ m i n
Pis:;::;; 250 psig, PIS::::: 50 psig, P 2s ::;: 30 psig, P 3s == 5 psig
assume that each valve is 1/2 open under these conditions (his:::: h
lA
,:::: h
2s
== 0.5)
CONSTANTS:
140 Linearization of Nonlinear Models: The t t e ~ p c e Formulation
V, ~ I 135 n3, V, ~ 329 ft3, Temperature ~ 32 "F
psia ft
J
R (gas constant) ~ 10.73
IbmoloR
Chap. 5
('wi
~
C
w2
~
F
~
V,
~
V
2
~
k
~
MAGNITUDE OF STEP CHANGES:
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
concentration in reactor 1, mol/liter
concentration in reactor 2, mol/liter
volumetric flowrate, liter/hr
liquid volume in reactor I , liters
liquid volume in reactor 2, liters
second-order rate constant, liter/Cmol hI')
b. Show that the steady-stale concentrations are 0.33333 mol/liter (reactor I) and
0.09005 mol/liter (reactor 2), so the specification is met.
(Hint: You need to solve quadratic equations to obtain the concentrations.)
c. L,inearize at steady-state and develop the state space model (analytical), of the
form:
x Ax-t-Bu
where:
d. Show that the A and B matrices are:
u ~
[
- - 1.25
A = 0.05
o I
- 0.320 IS
Il .= [0.0016667
0.0001216
O.25J
o
(also, show the units associated with each coefficient)
c. i. Find the eigenvalues and eigenvectors using the MATLAB eig function.
ii. Find the eigenvalues by hand, by solving det(Al- A) ~ o.
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:
Student Exercises
c = [1 01
o 1
0=[0 01

141
g. Solve f for the nonlinear equations, using ode4 5. Compare the linear and nonlinear
variables on the same plots (make certain you convert from deviation to physical
variables for the linear results).
h. Now, consider a step change in the flowrate from 100 liters/hour to 110 liters/hour.
Assume the initial concentrations arc the steady-state values (0.3333 and ().(l9005).
Compare the IincHr and nonlinear responses of the reactor concentrations. Is the re-
moval specification still obtained?
i. Would better steady-state removal of W be obtained if the order of the reaction ves-
sels was reversed? Why or why not? (Show your calculations.)
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.
The nwjor sections in this chapter arc:
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
lowing form:
... +
dx
{/,(t) + ",,(I) x
til
du
+ b,(I) til + b,,(I) It
(6.1 )
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 oftheir 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 ortcchniques 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.
EXAMPLE 6.1 Hatch Chemical
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"
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);
Solving Linear nth Order ODE Models
144
dC""j
dt
k
1
Cit
Chap. 6
(6.2)
~ { _ l l
dt
(6.3)
dec _.'
f
-'--- Ie, (II
{/
(6.4)
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 ~ 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
\: :;;:; (C
AO
- 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
dimensionless time
4 5
FIGlJRE 6.1 Conversion of;\ as a function of the dimensionless timc,
Now wc wish to find a single diJlerelltial equation to solve for Cflo
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
Equation (6.6) is a linear, constant coefficient, heterogeneous differential cquatiOiL ]t is hetenJ-
gcneolls because of the "forcing function" on the righthand side. Heterogeneous equations are
solved in Section 6.3.
Method 2. Here we can rewrite (6.3) to solve for ell in terms of en:
(6.7)
Taking the first derivative of (6.7) with respect to time, we find:
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
til
Notice that (6.9) has the form
(6.8)
(6.9)
(6.10)
Equation (6. J0) is known as a linear, constant coefficient, homogeneolls differential equa-
tion. The term homogeneous means that there is no "forcing function" on the rigbthand
side. In Section 6.2 we cover the solution of these equations.
6.2 SOLVING HOMOGENEOUS, LINEAR ODES
WITH CONSTANT COEFFICIENTS
Homogeneous nth order linear differential equations have the form
d/lx
lin tit'f
{pr--1x
+ an _ I dt'l-l +
... +
dx
", I + aox = 0
{/
(6.11)
To solve equation (6.11) we replace all (JiX/df
i
terms by AJ
(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
6.2.1 Distinct Eigenvalues
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!dIIl1 .
In (lrder [0 find the coefficients, c
i
' \VC rl)ust know the illitia/ cOlldifiollS for r and its
derivatives.
6.1 Continued. Solution for C:nmponent A
~ c l'nllll equation (6.2) that the concentration of /\ does not depend on the vahle:; or U
e
til
lIle l'haracteri'ilic cqlW(IOII is
(h,14)
A+ k] II
and [he eigenvalue is A:o: -- k
l
The solution is then
C\(I) = c
J
C k! (6.16)
e ,(I)
e",e I., (h.17)
\\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
EXX\IPLE 6.1 ContimH'(I, Solution for Component B
r\.t'ctl! lhatthc cyuatin!l fur the concentration of B i.s:
(I
(h.! 01
t
From (3) we sec that:
147
(6.19)
Solving Homogeneous, Linear Odes with Constant Coefficients
and the solution call be written:
CJI) c, exp(- ki) + (', cxp( . ki) (6.20)
which can be written:
Sec. 6.2
So the eigenvalues arc:
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 J5).
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
= rate constant ratio
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
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.
............
-alpha 0.5
-- alpha 0 2.0
Chap. 6
7 6
Solving Linear nth Order ODE Models
345
dimensionless time

.: "'.
, .
, '.
:' ",
: ",
" ....
2
0.5
co
0.4
'0
C
'"
"
c
0.3
0
"
"'
"'
'" C
.Q
0.2
"'
c
'" E
'6
0.1
0
0
148
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.
6,2,2 Repeated Eigenvalues
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)
EXAMPLE 6.1 Continued. Repeated Roots
The equation for the concentration of B is when k
2
::::: k
l
;;;;;: k is:

rIl
2
(6.25)
Sec, 6,2 Solving Homogeneous, Linear Odes with Constant Coefficients 149
and the characteristic equation is:
A' + 2 k A + k
2
0
which can he factored as:
(A + k) (A + k)c., 0
so the eigenvalues (roots) are:
A A -k
, 2
The solution can be written:
C,,(t) (e, + e, I) cxp( - k,)
Notice that we can find cl from the initial condition for C
n
- From (6.27) at t = 0,
But Cn(O);;;;; 0, since there is no II initially, so:
C,,(I) e, t cxp( - kl)
The derivative of (6.28) with respect to time is:
at t = 0,
We also know from (6.3) that
"e,,(O) ,
dt - k CAO
so:
C,,(I) k C
AO
' exp( '" I,,)
(6,26)
(6.27)
(6,2H)
(6.29)
If we define lhe conversion or A to H as x = c,/e
AO
' ilmllhe dirncnsionlcss tiulC as T;::: kt. then
(6.29) can be written:
x(i) TexpC T)
(dO)
which is shown ill Figure 6.3. The reader should be able to find the 1l.1<1xiunJJn value for the
version of A to nand the reaction time required for this conversion.
0.25
Chap. 6
5 4
Solving Linear nth Order ODE Models
2 3
dimensionless time
________-' -'-- L.
o
o
005
0.15
0.1
0.3
0.35
0.4 ----,.-
0.2
150
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
pie illustrates a system with complex roots.
-----_.. ...
EXAMIJl..E 6.2 Complex Roots
Consider the second-order equation:
dx
+x
dt
()
(6.31 )
The characteristic equation is:
A' + A + I o (6.32)
Solving for the roots lIsing the quadratic formula, we find that the rools mc complex:
-4
2

2 2 J
We can use the following Euler identities:
e
jll
= cos f:l j- jSln f:l
Solving Homogeneous, Linear Odes with Constant Coefficients 151
(6.34)
(6.33)
V3) (J Vi)
2 j t + c
1
e ,- 2 - --2'-- j t
c e(- I +
.1 - 2
,(t)
I. The solution is where j
Sec. 6.2
elo =0 cosO -jsinH (dS)
and the property that eXtI' "" eXe
Y
to write (6.33) as:
x(t) '
10
1 V3 ce'-cos (--I
1 __ 2
Vii '/' [Vi Vi I
J
'sill t -1- c (' "cos 1-- J" sin I
. 2' . . 2 . 2
(6.36)
., [ V3
x(t) = e
l
/- c
1
COS 2 t
which can be written:
x(t)
e ,/2 [ec,
vi
Ie,) cos t
]. 2
e (e, -- (
2
) j sin tj
(6.37)
(d8)
(6.39)
2 [Vi Vi I
x(t) e lie;> cos 2 t + c
4
sin 2 t
Again, initial conditions for x(O) and can be used to determine {'3 and ('4- The student should
verify that jf x(O}:::: 1 and = I, then c
J
:::: \.0 and (.'4 ::::1.5. A plot is shown in Figure 6.4.
1.5
::.:; 0.5
a
0.5
o 2 4 6 8 10
FIGURE 6.4 Plot of (6.39) with x(O) :::;:; I and I.
152 Solving Linear nth Order ODE Models Chap. 6
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).
6.2.3 General Result for Complex Roots
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 A
r
and Ai arc the real and
imaginary portions, the solution is:
x(/) co (N lei cos A.,f + c, sin Ai II (6.40)
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 s t e y ~ s t t e 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.3 SOLVING NONHOMOGENEOUS, LINEAR ODES
WITH CONSTANT COEFFICIENTS
In Section 6.2 we solved homogeneous problems with constant coefficients:
In this section we will solve nonhomogeneous problems with the following form:
(6.41)
+ aox = '1(/) (6.42)
lIsing the method (4undetermined coefficients, which is outlined below.
Method of Undetermined Coefficients
1. Solve the homogeneous problem to find
:t Combine the two solutions for
(6.14)
Trial Function
B (a constant)
Be
HI
8] cos ctl + B} sin of
11
,
/1/ + Bn_1lll--J + ... + flo
A (a constant)

A cos ca or A sin at
A ttl
Forcing FUllction
Solving Nonhomogeneous, Linear Odes with Constant Coefficients 153 Sec. 6.3
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)
TABLE 6.1 Trial Functions for Method of Undetermined
Coefficients (noyee and 1992)
The method of undetermined coefficients consists of the following steps:
X(I) Xu(l) + X,.(I)
We illustrate the method hy usc of an illustrative example.
EXAMPLE 6.1 Continued. First Order Heterogeneous System
Notice that we can take the solution for (A as a function of time
cAt) = CAUe-k,1
Step 2. Since the forcing function is k] C
AU
e k,I, we use c
2
e k,f (Table (),1) as our trial func-
tion for the particular solution:
and substitute it into (6.3) to obtain
Step 1. The homogeneous solution to (6.43) is
Xp(t) c). e
kl
!
substituting this solution into the original equation (6.47),
---k
l
C
z
e-
k
,! + k
2
C
z
e---
k,f
= k
l
CAO e-
k,f
(6.43)
(6.44)
(6.45)
(6.46)
154
which we can solve for ('2:
Solving Linear nth Order ODE Models Chap. 6
k,
c, c--
k
2
k ,
Step 3. Now find the complete solution as xU)::::: XII(t) + _'(/,(1)
(' (f) = c e I..,,' + e kit
;\ 1 k, __ k
l
We call evaluate ('I from the initial conditions, em!:::: 0:
(.'\ =
and the lotal solution is:
(6.47)
(6.48)
which, of course, is the same result obtaineu previously (0.23) by solving the second-order ho-
mogeneous equation in C
II
_
We have lIsed a single first-order equation to illustrate the procedure for heterogeneous
equations. The same procedure is used for higher-order equations.
6.4 EQUATIONS WITH TIMEVARYING PARAMETERS
Consider a first-order equation with the following form:
dx
1
-+ pet) x ." q(t)
({
(649)
Notice that the coefficient is 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)
,,(t) exp [fp(t) dl]
Equation (6.49) IS solved by multiplying each term by the integrating factor:
dx
,,(t) -+ ,,(I) p(t) x ,,(I) q(t)
dt
exp lJl'(t) dt I11; -+ exp Ifp(t) dtl p(t) x exp Ifpet) dtl q(t)
Notice that the lefthand side of (6.52) is simply the expansion of:
(6.50)
(65 I)
(6.52)
[X(t) exp {Jp(t) dt}] exp lJp(t) dtl (:;; -+ exp lJp(l) dt] p(I)X (6.53)
b
so we can write:
and, evaluating c using the initial conditions,
which is a separable equation. Separating and integrating, we find:
155
(6.54)
(6.56)
(6.55)
Equations with Time-Varying Parameters
X(t) = exp [- f pet) dl] {X(O) + fq(t) exp IIp(t) dt] ill}
x(t) exp [fpet) dl] = fq(t) exp IJ
P
(I) dtl ill + C
::t [X(I) exp UP(t)dt}] = exp [fpet) iltl q(t)
Sec. 6.4
EXAMPLE 6.3 Semi-batch Reactor
Consider the case where the batch reactor is being filled. Assume a single, first-order reaction
(A-)B) and a constant volumetric flowrate into the reactor (F), with no llow out of the reactor.
The modeling equations arc:
(6.57)
(6.5X)
Expanding the LHS of (6.58) as:
dve 1 ., dV dell
~ = c _. + v-___
dt A dt dt
(6.59)
we find:
(6.60)
If the f10wralc is constant and the initial volume is 0, then:
v = Ft (6.61)
and:
(6.62)
Let:
fp(t) dt ~ fG + k
l
) dt ~ In t + kit + c
i
(6.63)
exp IJpet) 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_'
exp [k,l] (6.6.'1)
and noting that the lefthand side is simply
" exp [k,11 C ,]
dt
we multiply by dt and integrate to find
k [exp [k,ll- I I
,
multiplying by exp I -kill and dividing hy t. we find the solution
(6.66)
(6.67)
C., k,1 II exp [ k,111
The division by t is bothersome at f;;;;; the reader should llSC L Hospital's rule to sl1(1\\ that the
correct initial condition is obtained with this expression.
NOlice that we can define a dimensionless coucentration and time as
to find
V(T) 11 - exp [ ,II
,
(6.69\
which IS shown in Figure 6.:).
Notice that this solution hold.s while the rcacf(l1" IS being "fed" After the feed is stopped
the model is simply dei/ill:;:: with appropriate intinl conditi(lI1s (sec student exercise
1 -_ .. ,----
Solution, dilncnsionless sernihatch reactor prohlem.
0.8
o
o
c
o
0.6

c
o

0.4
E
is
0.2
o
o
FIGURE 6.5
2 4 6
dimensionless time
8
t
Sec. 6.5 Routh Stability Criterion 157
6.5 ROUTH STABILITY CRITERION-DETERMINING STABILITY
WITHOUT CALCULATING EIGENVALUES
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 ~ 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 ~ v e n 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.
6.5.1 Routh Array
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, h
2
h
3
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:
({1I-I(ln--2 -" ti,/In
hI =
h
2
=
{III I
and so 011. Elcments of the fourth and larger rows arc calculated in a similar fashion:
(:1
and so Oil,
Routh Stability Criterion
bj({/I ) - ({nlhZ
h,
('2
hl{[/I S - lltJJ}J
hi
A necessary and sufficient condition for all roots of the characteristic polynomial to have negative
real parts is that all of the coefficients of the polynomial are positive and all of the elements ill the
len column of the Routh array are positive.
EXAi\lPLE (,.4 Charadcdstic Equations
Consider the second-order ODE:
(Px
(/2 tlt2
The characteristic polynomial is:
dx
+ ttl
til
((J.7 I)
a
l
;>..? + a
l
A + an 0 (6.72)
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
EXAMPLE 6.5 ThirdMonlcl' System
The system:
rex
(Px dx
riP
+ 2
dP
+ 3 +
x = 0
dt
has the characteristic polytl(l!llia]:
A' + 2 A' , 3 A + I ~ 0
and the following Routh array:
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.
EXAIVIPLE 6.() ThinJorder, System 'Vith a Variable Parameter
The system:
d\- d
2
x
dt' -I 2 dr;
dx.
+3
dt
, f-Cx _. 0
has the characteristic polynomial:
A' 2 A' + 3 A , f-C ~ 0
where 1.1 is a parameter that may vary. The Routh array is:
I 3
2 2
f-C
3 h,
4
('I
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
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.
160 Solving Linear nth Order ODE Models Chap. 6
SUMMARY
We have reviewed techniques to solve homogeneolls and nonhomogeneous (heteroge-
neous) 11th order ODEs.
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 undetennilled c()(dlicients is lIseful for solving nonhomogeneous
(heterogeneolls) problems. These generally occur if the system is forced by a
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
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.
Boyce, W., & R. DiPrima. (1992). Ordinary Differential Equations and BoundmJ Value
Problems, 5th cd. New York: Wiley.
Routh, EJ. (1905). Dynamics ofa 5'ystern Bodies, Part Il. London: Macmillan.
Seborg, D.E., TF. Edgar, & D.A. Mellichamp. (1989). Process Dynamics and Control.
New York: Wiley.
Student Exercises
FURTHER READING
161
STUDENT EXERCISES
I. Consider the state-space model:
Ix, I 1-
1
211 XI]
Ix, I 0 x
2
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)::::: 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

-0.7500
1
1 0 I
C = 0 1
0.9056..1
-2.5640
D=

1.53021
3.8255
I;:]
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
ESCOLA Dc ENGENHARIA
BIBLIOTECA
162 Solving Linear nth Order ODE Models
a. Lcty =xl' and derive the following relationship:
y-[all + a
22
] Y+ [a
ll
a
22
- a2\ad Y = 0
which has the characteristic equation:
1\2 - [all + a
22
] 1\ + [a
ll
a
22
- a2\a
12
] = 0
Recall that the eigenvalues of the A matrix arc calculated by:
det(H - A) = 0
Chap. 6
Show that det(l\I- A) = 0 applied to this general two-state example, yields:
1\2 - [all + an] 1\ + [allan - a
2I
a
12
] = 0
4. Solve the following differential equation with the given initial conditions:
d
2
y dy
,+5+6y=O
dx dx
yeO) = 0 and
dy(O)
dx
I
5. Find the particular solution of the differential equation:
d'y dy .
~ i ~ - 3 ;I:;' - 4 y = 2 sm x
6. Consider the following second order homogeneons ODE:
,l'x dx
--3-+3x=O
dt
2
dt
a. Write the characteristic equation for this ODE.
b. Find the solution (solve for any constants), x(t), if the initial conditions arc
x(O) =2.0 and x(O) =3.0.
c. Discuss the stability of this system.
7. Consider the following first-order heterogeneous ODE:
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
-1.0] [XII
0.0 X
2
163
with initial conditions x,(O) =0.5 and x
2
(0) =-0.25.
a. What are the eigenvalues of the A matrix? Use both MATLAB and your own
analytical solution.
b. Write the second-order ODE that corresponds to xI. Use the method of Section
6.2 to solve for x,(t). Plot x,(t).
c. Write the second-order ODE that corresponds to x2. Use the method of Section
6.2 to solve for xlI). Plot x2(t).
d. Compare the results from band c with those obtained by integrating the statc-
space equations using cither ode45 or ini tial.
e. Show a phase-plane plot (Xl versus Xl)' placing XI on the .:r-axis and Xl on the
y-axis.
9. Consider a system described hy the following third-order ODE:
(Py
- .... +
dt'
d'y dy
1.5, + .... + Zy = 0
dt- dt
Is the system described by this equation stable? Why or why not?
10. For a general third-order polynomial:
a
J
Po.
3
-I- 112 Po.
2
-I- ill A -I- a
o
= 0
show that {lj > 0 and ([la2 {loa
3
> are necessary and sufficient for stability.
11. For a general fourth-order polynomial:
([4 Po.
4
+ llJ Po.
3
-I- a
2
Po.
2
-I- a
l
Po. -I- a
o
= 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
2
y dy
;/t
i
+ 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-- + ZY = 0
dt
2
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.
F
O
--.
.F
2
F,
a. Assuming that the flow from the first tank is linearly proportional to the differ-
ence in the tank heights (P'l :::.: (h
t
- h
2
)), the flowrate from tank 2 is propor-
tional to the height in tank 2 (F
2
;:;;; rJ
1
liz), and the tanks arc or COllstant cross-
sectional area (A I and A
2
) show that the modeling equations arc
dh 13 13,
.... 2 '0 J (h _ h ) -' h
dl A I 2 A 2
2 . 2
b. Reduce these two equations to a single second-order equation in 11
2
.
c. Assume that the steady-stale f10wratc is 3 [(3/min, and the steady-state tank
heights for tanks 1 and 2 arc 7 and 3 feet, respectively. The constant eros,\;-
sectional area is 5 ftl for each tank. The initial conditions arc h\(O) :::: 6 fect and
h
2
(O) = 5 feet. Solve for the heights of tanks 1 and 2 as a function of time, Plot
the tank heights as a function or time. Discuss your resulls.
d. Write a MATLAB Ill-file and lise ode45 to integrate the two equations shown
above. Show that the numerical integration agrees with your solution in part c.
15. For the batch series reaction (Example 6.1):
k k
A-}IJ-fC
H. Find the reaction time that maximizes the production of B. Recall that the
tion for the concentration of B is:
'() k
I
C,lO[ (]
eli I = 'k--=-;- cxp( - kit) - cxp - k
2
1)
2 /(j
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
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
X(I) = CH(I)/ C
AO
= k I cxp( - kl)
where C
A
, C
u
' and C
c
represent the concentrations (mol/volume) of cOlnponents
A, B, and C, respectively. Using the following definitions:
165
k
ll
A
-->
B
1<,
C
f--
-->
k
lr
Dimensionless time, 'T = kit
Conversion orA, Xl = (C';jO ~ CJ\)/C
AO
Dimensionless concentration of B, x
2
= C
u
/ CAO
Ratio or rate constants, a = k
z
/ kIf
Ratio of forward and reverse rate constants, p = k
ir
/ kIf
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
h, with ~ \ := 1.5 and em> :0;: Ceo::::: 0 mol/liter. Make a comparative plot for the
parameter values in c. What do you observe about the concentrations of A, B,
anel C?
16. For the batch series reaction with ilTeversible reactions (A --.--.7 B --.--.7 C):
a. Find the reaction time (tllla,,) that maximizes the conversion of A to B for the
case INhere k
2
::::: k
j
::::: k. Also find the value for the maximum conversion of A to
B. Recall that the solution for the conversion is
b. Assume that the reactor is run for the period {max found in a. Now consider the
effect of an error in the reaction rate constant of +50%. What is the actual con-
version orA to B obtained at t
max
?
17. Consider a batch reactor with a series reaction where component A reacts to form
the desired component B reversib(v. Component B can also react to form the unde-
sired component C. The reaction scheme can be characterized by:
Student Exercises
166 Solving Linear nth Order ODE Models
ll. Show that the equation the dimensionless concentration of B is
Chap. 6
(Px)
(/72
+ (1:\ + <X +
I) dX2
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 k
2
:::: 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 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 k? C'
A-lIJ-j
The modeling equations for a constant volume batch reactor arc
a. Show that the third-order ODE descrihing the concentration of Cis:
[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
TO LAPLACE TRANSFORMS
Arter sludY'ing this chapter, the reader should hc able to:
7
Define the Laplace transform alld apply it to several example fUl1c1iollS.
Usc Laplace transforms to convert an nth order ()DL: to the Laplace donwin.
Manipulate the algebraic equations by! performing a partial fraction expansion.
'Invert" the Laplace domain functions to obtain the time domain solution.
Use the final v,due theorem to compute the lOllg+:r1n hehavior of a system.
The important sections of this chapter arc:
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 it
7.2 DEFINITION OF THE LAPLACE TRANSFORM
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.
Sec. 7.2 Definition of the Laplace Transform 169
Definition: Laplace transform
Consider the time domain function/(t). The Laplace fransform ofj{f) is represented by qj{t)J and is
defined as
1.[j(l)1 = F(s)c J/(t) e "<it
n
(71 )
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.
L[a,Jj(t) +a,Nt)1 = J [a,Nt) +",Nt)] c "tit
<)
Oc ]a,I;(t) ~ <it + Ja,/;(t) e" tit
(J ()
= aJ'f(t) e" tit + a,!/;(t) e" tit
() , 0
(72)
Equation (7.2) satisfies the definition of a linear operation.
In (7.1) we used Ll/{t)1 :so; F(s) to define the transform of a time domain function. [I'
we wish to transform a Laplace dornain (sometimes called the s-domain) function to the
time dornain, we lise the notion of an inverse transform
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
7.3 EXAMPLES OF LAPLACE TRANSFORMS
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.
7.3.1 Exponential Function
Exponential functions commonly arise in the solutions of linear, constant coefficient. or-
dinary difTcrcntial equations:
J(t) = e,n'
A plot of this function is shown in Figure 7.1.
Recall that the transfoml is defined for t > 0 (we also use the identity that e
X
+
1
' ;::: e1c\)
L[e-,n] = JHt) e-
n
dt = Je-,n e-
n
dt = J e-(da
l
' dt
o () 0
I
= _ [(((.\'+O)lj'''' =
S + (l 0
I
LIe ,a] .-
s + a
L 1[' 1 ....J= e O ~
.s + a
1 I
'-[0-1]=-
s+a s+a
E\pOllential
0.8
1ji
0.6
0:
x
OA I
w
i
0.2
0
0 2
at
3 4 5
FIGURE 7.1 Exponential function.
We must use the "more precise" definition of the Laplace transform, because of the dis-
continuity at t = 0:
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.
171
s
A A
- [0 - i]
s
T
+ I }(t) e-" dt
"
lim
1'---+0
T----'>7;
L[t(t)I =
L[A] = JAe-" dt =
0'
Examples of Laplace Transforms Sec. 7.3
{
Ofort<O}
}(I) = A f{)f 1 > 0
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,
7.3.2 Step Function
Since the transform is defined for t > 0,
L[A] =;\
s
5;tep
Notice that the same expression is used for the Laplace transform of a constant.
A
Step Function
o
t = 0
FIGURE 7.2 Step function.
172 An Introduction to Laplace Transforms Chap. 7
7.3.3 Time-Delay (Dead Time)
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:
Llf(t - t,,)1 = J ](1 - I,Je-
W
dt
o
= e-w,J ](t') e"" dt' = e"" 1'(.1')
o
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,
Llf(t - t
d
) 1 1"'" P(I')
The transform of a delayed function is simply c---stt! times the transform of the undclaycd
function.
I(t)
function
delayed function
"FIGURE 7.3 Delay funclion.

Sec. 7.3 Examples of Laplace Transforms 173
7.3.4 Derivatives
This will he important in transforming the derivative (accumulation) term in a dynamic
equation to the Laplace domain.
Lei
LI tiM]." 1dl( t) e "dt
... dt_ 0 dt
Using integration by parts U adv:::: uv - f vdu)
II e wand v', fell
[
.[{.IJ.(t).!_ J" dill) e
. - ." dl [e'" j(l)]' + Jf(t) se" dt
dt or/t DO
[
dl(t)] . JJ '. .,
L '. = [0 - j (0)] + s j (t) e'" dt ,. shes) - flO)
dt . 0
Derivative
dIet)
fit
t, 'lsF(s) -f(O) 1
nth Order Deriv(ltive
11 initial conditions arc neededf(O), ... ,./(n-I)(O)
Since we often work with deviation varinhlcs,j(O) := 0 in many cases.
In general, you should he able to show the following (sec student exercise I):
{I J(t) dll =I J(l) dl"dl
I
Again, intcgratc by parts, lIsing u = e--,\-I dt and v::::: I./U)dt, to find
o
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:
174 An Introduction to Laplace Transforms
b
Chap. 7
FIGUH.E 7.4 Ramp functioll_
7.3.6 Ramp Function
I
F(s)
s
Integral
Consider the following ramp function:
f(l) b I
as depicted in I'igurc 7.4.
You should be able to shmv (sec exercise 2) that
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.
FIGURE 7.5 Pulse fUllction.
'file usc of A::::: I is the unit pulse.
ONE METHOD
The pulse function is defined over the following two time intervals:
175
F(s) = f/(l) e" dl .c f/(I) e" dl + ff(l) e'" dl
(lOll'
A. A
F(s) = ~ [ e ~ I] = [I ~ e "'I
s s
, A
f A e" dl + fOe" dl- ~ [e"I'"
o ~ s 0
Examples of Laplace Transforms
f(t) = A for 0 < I < I"
.I(t) = 0 for I > I"
and we can write the Laplace transform as:
Sec. 7.3
Llunit pulse of duration 'pi ,-- I [1 e-
I
I"1
s
Unit Pulse
A SECOND METHOD
f(l) , .1;(1) + NI)
F(s) F,(s) + F,(s) .c L[I(I)] ,,- Llt;(I) + f,(I))
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!>
+
/, (I)
o
A
TL
but notice thatl2(t) = ~ f , t ~ II')
FIGURE 7.6 Pulse function.
176
and that (from the stcp fUBction):
and (from the delay function):
An Introduction to Laplace Transforms
s
Chap. 7
-('
1.-" A
.I'
SO \VC call \vrite 1'(.1')
/1
[] .. e'']
s
\vhich is consistent \vith the previous derivation.
7.3.8 Unit Impulse
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:
~
, ,
~ :- ..~ .
~ - -'--'------'---- -------
FIGURE 7.7 Impuhc function.
Final and Initial Value Theorems Sec. 7.4
L[o] lim
11')0
- c".'] .... lim
(!'--.,o
-I
I -sc "1"1
S
177
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 a l . ~ 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.
7.4 FINAL AND INITIAL VALUE THEOREMS
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.
Final Value Theoretl1
Initial Volue Theorem
lim Is F(s)]
,1',0
(7.3)
lim f(t) ~ lim is 1'(.1')]
{-)O )' __Pc
(7.4)
178 An Introduction to Laplace Transforms Chap. 7
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 (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 7.1.
EXA1VIPLE 7.1 Applkatioll of Final and Initial Valu(' Thl'on'UlS to the Exponential Function
(\lllsider the exponential function:
j(1)
which had the Laplace transform:
\" + (/
Finu/ Vulue Theorem. \Vc first find:
lim s F(s)
;(1
which checks 'Ivith
lim !(T)
as IOllg as 1/ is positive.
Inilia! Va/Ill.' Theorem. We first find
lim
>it,- ()
Jim c!l" ()
o
\vbich checks with
\ t- II

Illn !t t)
."
which is safisfied for any fillite (/.
lim e'"
'"
. ...
One pOJl1lnot often made in texthouks is that the final value theorem only hold", for stahle
sy,'",tems (0 > 0).
7.5 APPLICATION EXAMPLES
crhe following is a checklist for solving dynamics probkms using Laplace transt'onns.
Stcp I.
Stcp 2.
Start \vith a linear ordinary differential equatioll and initial conditiolls.
Transform each of the tiJ\le domain fUllctions to the Laplace dumain.
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.
7.5.1 Partial Fraction Expansion
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)
D(s)
C
D,(s)
+ +
D,(s) .. UJs)
C
i
arc constants and D
i
are lower order (typically J) polynomials.
The [our-step procedure is llsed in each of the following examples. The partial frac-
tion expansion is first used in 7.3.
7.2 Homogeneous First-order Problem
Step 1. Consider the simple IwmogeneotlJ' (unforced) first-order problem:
dx
+ 2x 0
dt
subject to the initial condition:
x(O) 4
Step 2. Rccall the following transforms:
II :';;] s X(s) x(O)
"iilxj al jxl c. 1/ Xes)
Then wc (an take the Laplace transform of (7.3) aud (7.4) as:
II I+ 2Lix] 0
s Xes) - x(O) + 2 Xes) -, 0
s X(s) - 4 I 2 X(s) 0
Step 3. Solving (7.7) for Xes):
4
X(.,) -
.I' j-- 2
(7.5)
(7.6)
(7.7)
(7.8)
180 An Introduction to Laplace Transforms Chap.7
Step 4. Inverting each clement back to the time domain:
L '[Xes)) crt)
CII 41
.s+ 2.
and the solution is
x(t) 4 e"
(791
17.10)
(7. II)
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)
has the solution x(t) cc x(O) e '"
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.
EXAMPLE 7.3 Illustration of the Partial Fradion Expansion
Step 1. Consider the simple heterogeneous first-order problem:
dx
-+- 2x = 4.5
dt
with the initial condition
x(O) 4
Step 2. Taking the Laplace transform of each c1cmcnt:
4.5
s X(s)- x(O) + 2 Xes)
s
which can be written (since -,_-(0) "'" 4):
4.5
(sl 2) Xes) -c 4'
s
Step 3. Solving for the transformed varlahle
4 4.5
Xes) +
s f 2 s(s + 2)
(7.12)
17.1\1
(7.14)
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:
A ~ 2.25
then set s:::o;: 0 and solve for A:
181
(7.15) +
.\' S + 2
A Ii
Application Examples
4.5 lis
"C A +
s-+-2 s+ I
4.5
s(s \ 2)
to find A, finit multiply (7.15) by s:
To find fl, first lllUltiply (7.15) by s + 2:
4.5 A(s + 2) + IJ
s s
Sec. 7.5
and set s = -2 to solve for B:
IJ ~ 2.25
which yields:
4.5
.I(S + 2)
2.25 - 2.25
+
s s -+- 2
(7.16)
and We can write (7.15) as:
4
Xes) ~
s +- 2
2.25 - 2.25
\ +
s s + 2
(7.17)
Step 4. Inverting element by clement ill (7. J7) we find
x(t) = 4 C-
21
+- 2.25 +- - 2.25 ell
or
X(I) ~ 1.75 e" + 2.25 (7.1 ~
the reader should verify that this solution satisfies the initial conditions and the differential equa-
tion.
Examples 7.4 and 7.5 provide additional illustration of the partial fraction expansion tech-
nique.
EXAJ\tlPLE 7.4 Find the Inverse Laplace Transform of lI(s + ales +b)
Write
1
(s \' ales + b)
A B
+
s+a s+b
(7.19)
Multiply (7.19) by s + a, set s =:: -0 to find:
(7,231
II
Chap.7
17..2UI
(
C(s
I' --'-- h
hi
(s
11 (/
10 hi,
(/ - h
\
01
\-+-i!
1h "II, I "I 1u I h II, I h I
Ii
An Introduction to Laplace Transforms
--u h
.\
(s ([) :'{.\
i\( ,\
101
- 101] (1)(.\
(1)(0, h)
(s
I. L
\lultiply 17.23\ hy ,\ -+- hand -;ct s 0::: b 10 filld
--------------------- ....
and C;d ,\ ;:c: -u lu find
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.
\lultil'l;. 7.19) hy.\ -+- f), s --/1 tu find:
182
The Illl'thod in the prc\iou" c\i1lllple failed ir the rouLS n( the LttpLICC domain
were equal. "fhc ldhming c\arnplc "IH'\'" hO\\ 10 a partial fraction C\\"KlIbioll fur
I"Cj)('(lfcd I"oofs.
EX';\\IPLE 7.5 Consider the Following Transfer Function with Repealed Roofs
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):
-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:
L ,[.I(a=;))2] + +
(s +a) (s + a)' (s + h)
- I e"l _j J t em -+- I ... e hi
(a, h-a (a_b)'
I
(a bJ'h
1
(b - a
A
L.- . ,
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.
The previous examples were for ODEs with real roots. This next example is a problem
with complex roots.
(7.26)
(7.24)
(725)
( ,11/
, ,
(a-b)'
t c--
il
' -+-

e"l -+
(il ' + b) I
L 'I (, +
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)'
+ b) (s + a)'(s 1 b)
and \VC call write:
EXA1\lPLE 7.6 A System \vith Complex Roots
Step 1. Consider the homogeneous problem:
dx
i+
dt' dt
with the initial conditions:
\(0) ,(0) (7.27)
Step 2. From the table of Laplace transforms:
LI d"xi s" Xes) _ S"IX(O) _ S" 2.\'(0) - ... - S Xl" 2'(0) - xl" "(0)
.. dt
il
.
184
So, for a second derivative:
and, for a first derivative:
An Introduction to Laplace Transforms
I
d"J
L', ~ S2 XeS) - ,\' x(O) - x(O)
dt
[
dx
l
L .. = sX(s)-x(O)
df ..
Chap,7
We can now write the Laplace transform of (7.26) as:
s' Xes) - s x(O) -teO) + s Xes) - x(O) + Xes) = 0
Step 3. Attempting to isolate Xes) on the LHS:
(S' + s + I) Xes) ~ s x(O) + x(O) +x(O)
dividing by (,52 + S + 1):
S x(O) x(O) + x(O)
X(s) =----- + --------
.\'2+ s +1 s2+.\"+1
and from the initial conditions:
Xes) =
,\'
+s+
+
2
+s+
(7,28)
the roots of (.\"2 + s + I) are - J/2 V3]2j (from the quadratic fOl1TIula):
Notice another way that we can write (s2 + S+ 1) is:
(
I)' (Vi)2
(S2 + s + 1) ~ s + '2 + -Z'-
which means that we can write (7.28) as:
s 2
Xes) = ( 1); (\(3)-; + -(-'1-)2(\/3);
s+'+--- s+-+
2 2 2 2
Step 4. Notice from a table of Laplace transforms that:
L[e-/JI sill wt] = ~
(s + Ii)' + ",'
Lle-'" cos wI} = ~ ~ ~
(s + Ii)' + ",2
and we should maneuver (7.28) into the form of (7.29) and (730).
Notice that we can write (7.30) as:
(729)
(7,111)
Sec. 7.6 Table of Laplace Transforms 185
which has the lime domain response sho\vll in Figure 7.8. As we Iloticcdin Chapter 6, complex
roots give oscillatory responses. We see in Chapter 9 that this type of response is called llndcr-
damped.
(7.31)
10 8 6
I.S
(SI i)'1 \ ~
'I' V3
v3 e :. sin (
2
2
time
4
s+
2
'I
) V"3
e ~ c o s l
. 2
2
l
' \/3 J.5 Ii' \/3
x(t)=el"cos t+ e-""sin t
2 2
ttl)
X(S)
FIGURE 7.8 ()sciJlatory response due to complex roots.
-0.5
o
o
and we invert each clement of the RHS of (7.31), using (7.29) and (7.30):
1.5
:..:: 0.5
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.
7.6 TABLE OF LAPLACE TRANSFORMS
186 An Introduction to Laplace Transforms Chap, 7
TABLE 7.1 Laplace Transforms for Selected Time-Domain Functions
fit) 1'(.1')
(j(t) (unit impulse)
, {Ofoft<Oj
S(t) (Uillt step) . _
1 lor I .> 0
A (constant)
f(t--O) (time delay)
t (ramp)
df
(derivative)
dt

dt
il
e--il !
(e--Oll -- e-
Ojl
)
a
j
- {/2
c,,,,r - (12 e"/

sin wt
cos wt
e-Il! cos (UI
1 + (1'1 e-
t
/
T
, 1'2 e---Il,,)
1'2 - 1'1
(1 _ 1
where w :c:.:c
I + e-I/T) +'l"J .---'1"2 e liT,
1'2-1'1
1- (1 -::J e--t!'d
7
,I'
Ah
cos F(s)
1
-I
.v"
.1'1'(.1') -.1(0)
sllFCs) SIl-l.!W) - s"-2j'(I)(())
- .1./,"-21(0) -.I''' "(0)
s + a
I
(.I' + "')(.1' + "2)
s -J-
Cs -+- llj)(S -+- (/2)
I
s(n + I)
W
s2 +
S
+
(,)
(.I' C [J)' +
s+a
(.I' + f
1
.1'(7,.1' + 1)(7,.1' + I)
I
+ 2;; 7S + I)
,(V = tan----
1
+1
.1'(7,.1' + 1)(7", + I)
Til.\' --j-- 1
.1'(7".1' j- I)
___________________ TtII'"
Student Exercises
SUMMARY
187
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.
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;

L
dt"
2, '/(1) bl
3, '/(1) t2
188 An Introduction to Laplace Transforms Chap.7
5. ttt):::; cos (I)!
(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:
2
u(11
o
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
,(OJ
d\(O) d\(O)
0
dt
dt,1
8. Solve the dlllcrcntial equation:
\ (0) 2.0
9. A process input has the following Laplace transform:
2 6
u(s)

\
C
S S
\Vhat is the lillle domain input. It(t)? Find this analytically".
Sketch the time domain Input.
10. Find the tillle dornain solution yO) for the Laplace domain transfer function (\\'ilh
<: J):
Student Exercises
I
Y(s) = ,
S(T"S' + ~ T + I)
11. Derive the time domain solution yet) for the Laplace domain transfer function:
189
+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:
(.I' +
A Ii C
=--+ +--
+ 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
SYSTEMS
Arter studying this chapter. the reader should 11l1ck:rsland:
8
'fhe responses oj" first-order systems to step and illJpubc inputs.
flow chemical reactions change the tillle constant of a stirred tank.
The behavior or all integrating procesc,.
How to compare the long-term beh;lvior of a nonlinear process \viLll tll<'ll of' a linear
process \vitholll integratlng the nonlinear modeling cquaticllls.
The responses of first-order + ti!ll\>clcla)! models.
HO\\ to estimate the o( first-order and first-order + tillle-debl) lr;:1I1sfcr
fUllctions by apply'ing step input changes.
"rile response of a lead/Jag IlH)c!C] to a step input.
The important scctiolls in this chapter arc:
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
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.
8.1 PERSPECTIVE
Sec. 8.2 Responses of Systems 191
8.2 RESPONSES OF FIRST-ORDER SYSTEMS
The equation for a linear process is generally written in the folIo\\ling form
dy
T..... -+- Y .. k u
dt
where the parameters (T and k) and variables (y ;:lnd u) have the following nailles:
T :::: time constant (units of time)
k process gain (units of output/input)
y :::: output variable
u input variable
(8.1 )
The rllodel (8.1) is sometimes derived by linearizing a nonlinear model about a given
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 process model arises,
EXA.MPLE 8.1 A mixing tank
Assume that a chemical compound, A. is in a ICedstream cntering a mixing lank. Assume tbat
there is no reaction, and that the concentration of A has no effect on the density of the fluid (this
is true for trace components ill water, for eXlIlnpk). Also assume that the f!owrate is constant
<lnd the volume in the tank is implieS thal the outlet flowrate is equal to the inlet
flowrate, as shown in r"igure 8.J. The process is operating at steady-Slate, then tbe iHlct concell-
tration is suddenly changed to a llew value, Find the tallk outlet concentration as a function of
time,
192
F
C
;
Overall Material Balance
Transfer Function Analysis of Systems
F
C
FIGURE 8.1 Mixing tank.
Chap.8
dV
= F - F = 0 (from problem statement)
dt
Component Material Balance
dVC
FC-FC
tit '
since Vis constant
de
tit
F F
C- C
v ' v
(X.2)
First of all, we can solve for the initial steady-state concentration. At steady-state, dC/dt = 0, so
from (8.2) we find:
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 is a con-
stant. dC/elf = d(C - C)/dt, and we can write:
d( C - C,) F _. F. .
----,It' (C, - C,J - V (C - C,)
or
v d(C= S,) + (C- C) (C- C)
F dt .\ I J.\
Equation (8.4) is identical to the first-order equation:
dy
T--+y=ku
dt
(X.3;
(X.4)
(X I)
with-r= VIF, k= 1,y:::: C- C
s
' It =: C
i
- Cis
Notice that the time constant in this case is simply the residence time of the tank, that
the average amount of time that a molecule stays in the lank.
_______________"
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 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:
'fhc reader should become familiar with this type or representation. In general terms, /:(s)
is known as a 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
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.
Tis yes) - yeO)] + yes) Ie lI(s)
TS yes) + Y(s)c Ie lI(s)
(n + J) Yes) .c k U(s)
(8.5)
(88)
(8.7)
(8.6)
Ie
Ie
TS + I lI(s)
g(s) lI(s)
g(s)
Y(ll
yes)
where:
which is most commonly written:
or,
8.2.1 Step 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):
LIMII
M!
s
(8.9)
V(s)
--1 g(s)
Yes)
FIGlJRE 8.2 Block diagram.
194 Transfer Function Analysis of First-Order Systems Chap. 8
5 4 3 2
I
I
I I

I I I
I I I
I I I
------1-------1------1------
I I I
I I I
I I I I
---r------l-------r -T------
I I I I
I I I I
I 1 I I
-----r------l-------r------1-
I I
I
I
_
I
I
I
5
0.8
S-
"
0
00
0.6
00
ill
C
0
0.4
w
c
ill
E
0.2
'5
0
0
Vlau
FIGURE 8.3 Dimensionless output step response of a first-order process.
and we can then write (8.6) as:
(8.11 )
(8.10)
ill) k
Y(S) =
'IS + 1 s
k!W
Y(s) =
S(TS + I)
From the table of Laplace transforms in Chapter 7 (the reader should be able to derive this
result, using a partial fraction expansion):
L I [. I] = 1_1'-';'
S(TS + 1)
(812)
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
concentration (inlet and olltlet) is 1.25 Ihmol/ft
J
. Consider a step change in inlet concentration
from 1.25 UHno]/ft
J
to] .75Ibmol/ft
J
. Theil:
Responses of First-Order Systems Sec. 8.2
!>.if 0.5
U(s)
s s
Y(s) 1 0.5
5s + I s
(illl(t) J.75 1.25 0.5 Ibll1ol/ll')
195
(8.15)
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:
y C C, => C(I) C, y(l)
and (8.17) can be written:
C(I) 1.25 + 0.5 [I - e '/51 Ibll1ol/ft ,
(R.17)
(8.18)
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'
1.5
0
E
.0
G 1.4
1.3
0 5 10
I(min)
15 20 25
}i'IGUU.E 8.4 Transient response of mixing tank.
PARAMETER ESTIMATION FOR FIRST-ORDER PROCESSES
H.cturning to the general model for a first-order process, we sec that tllcrc arc two parame-
ters of interest the process gain and the process time constanl.
yet) == kMJ [I -- c ';'1 (813)
Process engineers often find process gains and time conslanls by performing step
tests Oil processes.
196
GAIN ESTIMATION
Transfer Function Analysis of First-Order Systems Chap. 8
\VL' '-;l'l' 1'rOn] (0.1-+) thaI :lftCI I T. the eli, ternl approachc" O. 'fhe \aluc or t:. can he de-
termined:
k.. =
\(1) as I -) (large)
::,.C

lililt ie.,. the pn)("cs" gain ie., thL' clldllgC in output {as it appnwcl1('" it nC\\ stead\ -stall') di-
\id('d hy the c1wngl' ill illpLll.
TIME CONSTANT ESTIMATION
\\\' CIJl find lhe time CUllst,-lllt for '-1 firs!-(mkr prucc\s in the folhl\\'ing LlShioll. Apply a
"tep input to the process aL [;:::: O. From O';.I..J.). we set' that y(l) goes to a \(due of k.::"L
l
as
r"7 ,YO. \\'lll'Il the timc is l'qual to lhe time COlhlanl (f;;;; ,j. from (S 13):
I (I) UU [I (' 'I = O.67,2k::"U
l!Jdl is. the lime constant cail he dClCl"Illilll'd hy finding thl' [inll' where thl' output. 1'(Tl. IS at
of the ultimate 1'i.-'''pOIlSC (I1CW \It'ad> -\ltC) 'fhi" rule is al\o O)WiOllS b>
S.3: \\hCll/I.:::: I, O.6.r2.
You "Iwuld 1)(' Ik'l';HIS(' t11l'; is onl) trllc fur firsl un!.:'r jll\)(\:>SI.:''' \Iith Ill) tillll'-lkl;l) :1
\I<:'p Illput at I ::;: U, If till' PI'UCl'S\ j" \ccolldunlct PI" the input is 11111 a Sll'll elL:.. thi" 6.\.2
1
,;
\alul' \\ill nul hc currcct
rOll s!wuld get ill Ilu' !whil of i1ssocioring ullits \I/tli ({II 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 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 as "how!1 \x'](1\\. 'raking the cit'
ri\,lti\t' of (S.13):
and l'\alllatillg at (:::: O. we find
dl(1)
ill
k::"( .
[,'
7
ilql II)
ill
Responses of First-Order Systems 197
'5
Q.
'5
0
"'
0.6
"'
ill
C
0
0.4
'ii;
c
ill
E
0.2
'6
0
0 2 3 4 5
Sec. 8.2
tltau
FIGURE 8.5 Slope method for time constant estimation (dimensionless
output;;;; ylk!1u).
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 processes llsing a step response is illustrated by
the next example.
EXAMPLE 8.2 Parameter Estimation of a First-Order Procc"is
A process operator makes a step change in an input from 20 to 17.5 gal/min (gpIll) and finds that
the output eventually changes from an initial value of SO psig to 55 psig, as shown in Figure 8.6
below. Find the process gain and time constant for this system.
56
55
0>
54
'ii;
Q.
'5
53
Q.
'5
52 0
51
50
0 5 10 15 20 25
time, min
FIGURE 8.6 Slope method for time constant estimation.
198 Transfer Function Analysis of First-Order Systems Chap. 8
(820)
\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 (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
8.2.2 Impulse Inputs
C:nnsidcr a fir:-;t-order process \vith an impulse input of magnitude A. The tran:-;form of a
unit impulse (0) is 1. so L[A0]:::= A. The first order Laplace domain respomc is:
k . kA
Y(s) U(s) cc
TS + I . is +
the linK domain response is:
\,(1)
kA c i-
(821 )
Dividing by kit \ve find the dimc.nsionlcs:-; OUq1ul respollse shO\\'n ill the 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:'"
"i
0.8
<l
"i
0
0.6

c
0
0.4

c
w
E
0.2
D
0
0 2 3 4 5
t/tau
FIGURE 8.7 [lnpulse Response for it first-order process. The dimensionless
output is \'(f)/k.\.
Sec. 8.2 Responses of First-Order Systems 19U
-,,-n-d-I-',-,-ts-c --j
In the previolls example an impulse of magnillldc A was applied to the process. Consider il pulse .. 1
1
input, where an input value of D..1l is applied for t
fl
units of time, as shown in Figure The
tolal applied input is then A :;;:; till 1{"
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:
s(Tsf I)
I
e li,"'j
TS +1
!lll e (,.'
D.ll
yes) =
s(Tsf I)
llu
yes) - 11
S
which has the time-domain solution (Chapter 7):
1'(1) co '." [I - e 'I'] - '." [I -- e (H)h] 11(IXpulse) (8.22)
where fl(t)::: 0 for l < '" nnd I for t 2 11' and the total input applied over the If! lillle units is !:if( f
V
The i rnpuJ sc response
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 'ii
0.4
'!:
02 ;
i
,
".
o
o 2 3 4 5
Vlau
FIGURE 8.9 Comparison of pulse (dashed, t
p
.:0: O.1T) and impulse (solid)
responses,
200 Transfer Function Analysis of First-Order Systems Chap, 8
8,3 EXAMPLES OF SELFREGULATING PROCESSES
The standard first-order rnodel presented in the previous section is a typical
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.
EXA\IPLE S.4 A C:STR with a Readion
Nu\\, ('x [end the F':Xamplc S.l to include () single dccnmpositilln reaction. The component mater-
ial balance
d\ (
cit
FC, F( F, \'
\\'hcrc f:.
j
ie; the rcadlr1!1 r;llc constant. SlllCC V Je;
dC
rtt
r
(
\ '
and wc (',Ill calculate the "ready "ratc concentration" from dC/ilr,,-, 0
I'
V
I
I'
Thl' dnialinn "ariahle form uf our nwdc! ic;
d(( ,I
df
OJ
l
1
r
V k.;
d( ( (
(It
IC (,)
I
I'
I
1
(S.27)
'\!2<l1Jl. Uh"l'J"\l' Lhal silllply a first-order ODE \\ith:
\' I
F I' I
I ;]llt! I,
F I'
r C
V 1
"'
k,
1\1 k)
r \ r
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] <1 stilled ldnk wIth ICdcllOll ,Ile less thdll those
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 flowrate 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
cause of the second-order reaction term.
EXAiVlPLE 8.5 A CSTR "dtll a Second-Order Reaction
Hcre we cxtend the previous examplc to include a second-order reaction problem. We will
Slime that the rate of reaction (per Ulli! volume) is proportional to thc square of the concentration
of the rcacting componcnt. An example would he A +;\ ---} H. As beforc, \ve afC making the sim-
plifying assumption that the fluid dcnsity is not a function of the concentration. Again, assume
that C
i
Is thc Input. The component material balance is:
dve
d/
FC,- FC-k, VC' (B.2B)
where k
2
IS the reaction rate constant. Since V is constant,
dC
d/

,md we can calculate the steady-state concentrations from dC/rtf;:;;o 0
F
k C' C
-, V s
(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.
to find that:
d(C - CJ .
dl
"II. (C - C,) +iill. C,J
de .<\ dC'.H
I d(C-CJ+(C
(
F+
2k
,C) d/
V ,-,
CJ
/'
V
(C,
2 k, C,)
C,J
(B.J I)
202 Transfer Function Analysis of First-Order Systems Chap,8
.'\gam. \-Vt' kl\c a first-onJer. linear relationship. \\lhen::,:
prucess grlln
time COnsli\nt
,-
/
I'
I
(
It lk, C ')
I' ",
( I
I'
2" C, /,J
\,
I
------
SUllllllarizin!. the pmCll1lcters for each of the previolls cxalnplcs arc shown in Table R.],
"fABI.E S.I Summary of Pannll('ters from Examples

PnlCCY'; Crain. k
Prnccss Time ..
t,x.0.1
\'Jixing Tank
No Rxn
\'
I
Lx.. K.4
CSTR
First-Order Rxn
I
\ '
,
F I
\'
I
\ '
F 1;1
Ex. S.5
CSTR
Secolld-()rder Rxn
EX.-\:\IPLE 8.6 A Numerical Stud.v of Examples Sol, 8.4. 8.5
Here \\'l' will perform a numerical study. using the following values'
\ '
F
,
k,
C"
." min
min I
O.J2 1'1' lhlllOl I min 1
1.25 Ih11101 n
AJJ case"
(S1'R with first-mdt'l RXII
CSTR with sccund-ordcr Rxn
All cases
r1WIl. \\C l'<Hl calculate the steady sldll! concentratiollS:
( ,
('
(
1.25 Ihrnol fr,'
0.625 IhllHlI rt
0.625 lbll)o! 1'r"'
Ivlixinp tank with no Rxtl
CSTR with first-OHler Rxn
\Vilh sCC\llId-onkr Rxn
Sec. 8.3 Examples of Self-Regulating Processes
203
Process Gain. k
Process Time Constant, T (min)
Mixing Tank
No Rxn
I
5
CSTR
First-Order Rxn
0.5
2.5
CSTR
Second-Order RXll
0.5
2.5
For all of the examples, assume that a step change in thcinJet concentration occurs at t:::: O. Tbat
is, C
j
changes from 1.25 lbmol flu] to 1.75 IbmoJ fr
J
at t::;: 0 minutes. In terms of deviation vari-
ables, this means that u increases from 0 to 0.5 Ihmol ft-3 at t::;: O.
Recall that the solution for a system with it step input change of magnitude
A is:
und since
our solution is
For the mixing tank
r"or the CSTR with first-order Rxn
For tile CS'fR with second-order Rxn
Y(I) kA [J - e'hl
y(t) -, C(t) - C,
C(t) C, +kA II _e'h]
C(t) 1.25 + 0.5 [I - e,j']
C(I) 0.625 + 0.25 [I - e -,j' 5]
e(r) = 0.625 + 0.25 [I -- c 1/).51
(8.32)
(8}3)
(8.34)
(8.35)
Notice that solutions for the 11lixing tank (8.33) and the CSTR with first-order Rxn (8.34) are
exact because these systems arc inherently linear. The solution to the CSTR with second-order
Rxn (835) is only approximate, because it is based on a Iincarized approximation to a nonlinear
model.
The actual rcsponse of the nonlinear model (using ode45) is compared with the linear
solution (8.35) in Figure 8.10. Notice that the initial response is similar, but the long-term rc-
0.9
t) 0.8
0.7
0.6
o 5
linear
nonlinear
10
t(min)
15
20
7
FIGURE S.lO Reactor concentration responsc to it step iucrca,se in inlet
conccntration, for a second-order reaction.
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,
o
Lim'ar Model (8.35) as {---->=
Nonlinear rVlodel (8.30) as !--'V'C)
'filc solution that makes physical sense is:
C("j ~ 0.625 + 0.25 ~ O.S750
F F
~ + \lk, e', V k ~ (
C; t- 0.625 C, - 0.625( 1.75) 0
C(,,) ~ 0.7790
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.
EXA:VlPLE 8.7 First Order + Dcadtimc
l'hc most common rnodel for process control studies is known as a first-order + dcadtilllc
process 11l0dcL and is written in the following form
T dt -I- ." = k u(t ,-- 0) (8.3()
where 0 is known ,'IS the time delay. A.ssul1lc that )'(0);;;;; 0 and 1/(0);;;;; O. The input. II lind the O l t ~
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.
F
c,
c' ,
FIGlJRE S.li rVlixing tank.
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 Processes
V"
H ,-
F
205
where V
p
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)
which is equivalent to (8.36) when written in dcviat'lon variable form, where:
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:
V
'j=
F
c,
F F
V C , V q(t)
dC
dl
1(" F F
( .. - C + Cit - 0)
cit V V I
which can be written:
Taking the Laplace transform of (8.36) we find:
Tis Vis) - y(O) I + Vis) k CO" U(s)
TS V(s) + Y(s) 0_ k e 0, U(s)
(TS + I) Vis) - k eO' U(s)
(X.37)
which is most commonly written:
k el'
Vis) - Vis)
'is -l I
(X.3X)
or,
Vis) Mil) Vis)
(X.39)
where:
k C----
fl
,
K(S) -
TS + I
(X.40)
Assume a step input of magnitude flu at time t::;;:; O. We know that:
Clu
L IClu] -
s
(XAI)
and we can then write (8.38) as:
keos 0/1
Y(s) TS , I s
(XA2)
kou elf,
Vis)
S(TS + I)
Vis) Mu c'" [I T
1
,,]
s 'TS +- ..
(XA3)
(XA4)
206 Transfer Function Analysis of First-Order Systems Chap. 8
I'{t)
()
fOJ U H
,It I Id" [I
1.
I
I"j l'or!
\!uticc lh:ll (x ....J-."i) 1\ merely a urlhe first-(lnkr 0 time Ul1ll\.
Cumidcr till' (olhl\\in,'; pin! (FIgure S.121 of lile reSpmlS(' nt" -.y\tcrn [I) a step input
o( llwgnitude U,S at lilll<.' I O. VV'L' '.t'e illll1lClIiaiely that the llllw ,klu) i\ 0 =::; Illinlllt..'\
Sinn' tile 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
FHiCRE K12 of a fit'\t-ordn + dC:llllill1l' 15 tilllL' lJlllhlll1nl!c'l[u a
Sl<:.'P input 0,
8.4 INTEGRATING PROCESSES
'rhe P1T\ioLiS were for proCCSSL:", If ,Ill input changed. [!lC)] Illl'
pnJCc"" output camc [0 a Ill'\\ Slc<ldy-stalc, Another cheJ1ljc;lI proccs:, is [he in(('-
gr,Hing proccss, a;-; ;-;!lo\\'11 in thc cxample hc](m.
EXA\IPI.E X,X An Integrating Systelll
Cunsidcr a \\;ller SIOr(igc lank \vith itllet and OUI!ct SII"(',\I11\ lh,il C(in bl' incll'pcndcntly <ldiu\tcd
rJ1C C;1(J1"agc tank has d c("(lss-sectiolwl ;n-C,l pf JOO Initially. lhe CIO\\ in is cq\lalto the f10\\
put. winch i" 5 fl (/min, Tlw inittal height of \\',\\('1" ill the Idnk is -1. ft ,llld the height of till' l:lId,- i\
10 fl, At I :()() pm the inlet rlU\\Ta\(' is incre,i\cd to 6 ft'/lllln. \\'IlL'1l doc\ the tallk (l\Crf]()\\"
Thl' m,\teriul balance (,t"slIming constal1l tk'nsityl is
______________________ z ....
Sec. 8.4 Integrating Processes
dV
P, E':,
cit
207
(8.46)
where F
j
and F
o
arc the inlet and outlet flowratcs, and Vis the tank volume. Assuming a constant
cross-sectional area:
d1l
dt
(8.47)
To satisfy steady-slate relationships F
is
:;;:; F
ps
' so we can L1SC the following deviation variable
form:
d(h '. hJ
dl
(P, P,,)
1
(E'
A " m
(8.48)
For simplicity, lei's assume that is constant, then:
which has the form:
d(h
dl

dt

A I (\
ku
(8.49)
(8.50)
where y:;;:; Ii hI' k:;;; 1//\ and 1/:;:: Pi Pi,I" Taking Laplace transforms, we find:
sY(s) yeO) k U(s) (851 )
where yeO) h(O) - hI" Assuming that we are, starting from a stcady-slate, y(O):;:; !I(O) hI';::: O.
So we can write (8.51) as:
s yes) k U(s)
Of,
yes)
k
U(s)
s
(852)
Using the notation D.U for tllC magnitude ofthe step increase:
Lll/
U(s)
s
(8.53)
and
Taking the inverse Laplace transform:
Liu
yes) k (8.54)
,I.k Lll/I V(I) L'[Y(s)] L
y(i) kilnl
Substituting hack for the physical variables,
(8.55)
(8.56)
(8.57)
208
nr.
Transfer Function Analysis of First-Order Systems
I
h. I j,F I
II '
Chap. 8
Solving for Ii ;::: I () I"t
1t=.:J.ft
( lOft
(6 5) ai/min
100 ft' [
100 ft'
4 ft) ..\

60n ruinutcs
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
9
8
S
"
7
6
5
4
0 100 200 300 400 500 600
time (min)
FIGL'RE 8.13 Intcgmtillg .system.
j
Notice in equation (8.52) t11at the process transfer fUllction has a pole at s ;::: O. This is a
characteristic oj" an integrating system.
8.5 LEAD-LAG MODELS
Some dyuarnic systems. particularly involved \vith process controL have the follO\ving
fonn for a lrallSfcr fUllction modcl:
Y(s)
T S -I- I
k" U(s)
i,r" + 1
Consider a slt'p input change or magnitude t111
'--------- ." _.,,,,h I
Sec. 8.5 LeadLag Models 209
TIlS + I All
Y(s) ~ k
7,/'. + I s
(8.59)
The reader should find that time domain response is (see student exercise II)
)'(1) ~ k c,u [ 1- (I - ~ ~ e '/'J
(8.60)
8.5.1 Simulating Lead/Lag Transfer Functions
A plot of (8.60) is shown in Figure 8.14, for kAu :::: I. Notice if 'Til> T
d
! the immediate n ~
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.
(8.61 )
25 20 15
Lead-Lag for 'd =5
Various values of 'n
10
(T,t' + 1) Y(s) ~ (T"S + 1) 1I(s)
2
10
1.5 7.5
5
I
2.5
Y
0.5
kt>.u
1
0
-0.5
-5
-1
0 5
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:
FIGURE 8.14 Lead/lag response.
210 Transfer Function Analysis of First-Order Systems Chap. 8
~ i l l the I,apL\cc trallsl'orm relationships.
_ (.<1\ .\(II))! \
'j "dr .
_ (.<I!! !!(II))
'/I "dt
!!
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
T,i\ i,,/I
!! (x 6-1!
(X.h:"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
<II
T
! dt
rill
., dl
(8.661
Suhstitutill,l! the righthand side of (8,66) for the Icftiwild sidc of (8.6..J-). wc find:
\ t- II
t\\l\\. \\c must soh'C (8.65) tu find r as a function 01 .r, tu ohtain
(S.671
r = (8.681
\\'hich \\(': substitute intI) (X.67) to find:
dr
dr
- ~ .\ + rI .. :) II
I,i ". 1<1
(S J}<)I
and \\l' see lhat wc h,1\'e the standard slale-space !"orm:
x=cAx 1I11
ex D u
except that (8.68) and (8.691 consist of scalars:
-----------------"-
Student Exercises
dx
cc=aX+bll
dt
y-=cx+du
211
(X.70)
(8.71 )
where
h
( I
T
d
)
a=
- ~
T"
C d
Tn
T
d 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 i l l p n ~
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 J0 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:
\\'here:
dy
<II
III I)
(l [
3. \\,'rile a eli/Terential equation \vllich corresponds to the following input-olltput trans-
fer function rclatioJlshirJ:
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.
tlllli..'
1:00pm
I: .10 pnl
I ::')9 pill
2:00 pm
2: 10 pill
2:..:1-5 pm
atter 5:00 pm
JI1put
2001h/hr
cOO lh/hr
200lb/hr
225 Ib/1lr
225lh/hr
2251h/hr
225 Ib/1l1
output
IIIO"!
IOO"!
IIIO''!'
I OO"!'
IIIII"F
9j
f
T:
90"F
(i) What is the deadt]mc for this process (show ullits)"
(ii) WhaL is the tinlc constant for this pnKcss (sho\\' unit.s)"?
(iii) What is the process gain (sho\\' units)"?
6. As the process engineer for an operating ullil ill a process plant. you are trying to g('t
a "feel" for the dynamic characteristics of a particular process. You have a discus-
sion \vitb the operator about a process (w'hieh .ynt! feel is J"irsl--orderJ that uses stealll
f]owratc as all input variable. and process ternpcralurc ,IS a measured variable. After
the steam f]O\-'vTatc is increased from 1000 lb/hr to lion Ib/hr (quickJy), lhe process
fluid temperature changes from IO t r ~ (the initiaJ steady-state) to 11 O"F in 30 [nin-
utes. The temperature e\Tlltual1y renches a ne\\' steady-state \',duc of J2()"F.'.
0) Find the process gain (show ulliIS).
(ii) Find the process time constant (show units).
Student Exercises 213
7. A process input is:
u(t)=O !')rt<O
u(t) = ! - e' I')r t > 0
The process transfer function is:
g(s)
2.5
12s +
F,
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 m
3
/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 m
3
is added over 0.05,0.1, and 0.15 hour periods.
IO. Consider a chemical reactor where a step change in coolant flowrate frolll 10
gal/Inin to 12 gal/min (at t::::; 0) causes the change in reactor temperature shown in
the figure below.
Find the time domain output, y(f). Plot both the input and the outpul.
8. Consider the mixing process shown below, where a portion of the feed stream by-
passes the mixing tank.
3. Show that the process has a lead/lag transfer function, if the input is Cj- and the
output is C\. (Hint: Write a dynamic balance around the tank and a static bal-
ance around the mixing point (after the tank outlet). Use deviation variable
form.)
b. Let F::::: 2 m
3
/min, F
I
::::: 1 m
3
/min, C
r
::::: I kgmollm3, and V::::: 10 !TI
3
. Find the
state-space model and the transfer function representing this system.
c. Consider a step increase of C
I
to 1.5 kgmollm
3
. Find the response in C
3
to this
change.
C
3
c,
F,
C,
F
C,
214 Transfer Function Analysis of First-Order Systems
155
150
u..
'"
145
ill
"0
ci
E
140
2'
135
130
0 20 40 60 80 100 120
time, minutes
Chap.S
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', +
Show that time domain response is
s
v( I) = k "" [I _ (I _T,,)
... T,j.
TRANSFER FUNCTION ANALYSIS
OF HIGHER-ORDER SYSTEMS
After studying this chapter, the reader should be able to:
9
Understand the dynamic behavior of s o n ~ o r r systems.
Understand the effect of poles and zeros on the response for higher-order systems.
Usc the Padc approximation for time-delays.
Understand the concept of inverse response.
Understand how to simulate transfer function models using ODE solvers that re-
quire sets of fiL':'I-ordcr ODEs.
Usc theMATLAB routine tf2ss to convert from transfer funclion to state-space
fOrln.
Usc the MATLAB routines step and impulse.
The 1l1,\jor sections are:
9.1 Responses of Second-Order Systems
9.2 Second-Order Systems with Numerator Dynamics
9.3 The Effect of Pole-Zero IJlCations on System Step Respollses
9.4 Pade Approximation for Deadtimc
9.5 Converting the Transfer l'\mclionModel to State-Space Form
9.6 MATLABRoutines for Step and Impulse Response
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.
9.1 RESPONSES OF SECOND-ORDER SYSTEMS
Consider a linear second-order ()I)E, with constant parameters:
(ty
1./, "',
- dc
This is UftC.Il \vrittcn in the form:
h II( I) (9.1 )
\vhcrc (obviollsly o() *0):
(h
nT
- dr
(9.21
(/, (/, h
T'
2'7
k
(ill an ali
where the parameters arc:
k :::0; gain (units of output/input)
( ;;;:0 damping factor (dimensionless)
T :::0; natural period (units of time)
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 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
space) models that arc equivalellt.
Taking the Laplace transform of (9.21:
T' lv' Y(v) sv(O)i,(O)] + 2CT I.IY(.I) v(O)] + Y(s) kU(v)
\vhere Y(s) indicates the Laplace transformed variablc.
Assuming initial conditions arc zero. that is .\'(0)::: ."(0) :::: O. Vie find:
Y(v) (9.3)
\vhich can he represented as:
Y(I) cc g(s) U(s)
T'he choruC!crisfi( cquariol/ of the second-order transfer function is + S + 1. \Ve
can find the roots (also known as the poles) by Llsing the quadratic formula:
TAHLE 9.1 Characteristic Behavior of Transfer Functions
Responses of Second-Order Systems 217
ovcrdumped
critically damped
underdamped
Characteristic Behavior Pole Location
2 real. distinct poles
2 real, equal poles
2 cOInp]cx conjugate poles
Damping ['actor
Sec. 9.1
I
II
III
Case
fJi=
- 2\:TJ \/4\:'T
2
- 4T
2
2T
2
(9.4)
9.1.1 Step Responses
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.
which yields the following values for the roots:
\:
+
\:
1
V\:2_ I
1',

-_.. _-----
T 27
2
T T
\: v\:'
..
I
fJ2
...
T T
(9.5)
(9.6)
Now, we consider the dynamic response of second-order systems to step inputs (U(s) :::;
!>u/s):
k !>u
Yes) , .
TT + 2\:TS + I s
(9.7)
where Llu represents the magnitude of the step change.
(:ASE 1 Ovcrdamped (t 1)
Since '> 1, we can see that the two roots will be rcal and distinct. Also, since we assumed that
T :> 0, the system is stable (the roots arc less than zero, since we are assured that ').
We btctor the polynomial T
2
S
2
+ 2'TS + 1 into the following form;
(98)
We sec immediately from (9.8) that the poles (values of s where the polynomial,;: 0) arc;
1',
from (9.5), (9.6) and (9.g) we find:
1', -liT, .. (iT + V((' 1)/T
(9.9)
which gives the following value for the first time constant:
/\hu. \ \ l ~ find lhe :--ccond pole
( - -I
_ \ ~ c
(9.10)
which gin:::-- the following \allle fur the second time cunstant-
T
r\panding the rlghthand side of (9,S).
(911 )
T,\-
\\'e call \,Tile:
~ TS t- (9.12 )
\\lllCh lead to the relatiollships
T
T 1 "
2\ Oi"'
,,'
(i). 1.:1-)
\Ve call derivc (sec student excrcisc la) the fuIIO\\'ing solution 1'01 step ["eSpll!1SeS ()fllVenlalllpcd
SystClllS
fhcnlmnpl'cl. S> ]
If f)
unll
1'1(' " c
T
ft). I 5 )
v,here
"
and T,--
( - \
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
0.6
0.2
o
o
1.5
5
Various values 01 damping factor
10
t/lau
i5
FIGLRE 9.1 Step ''''I,onse of a second-order rller"damped system.
Sec. 9.1 Responses of Second-Order Systems 219
CASI-: 2 Critically Damped ~ = I)
The transition between ovcrdampcd and underdmnpcd is known as critically damped. We can
derive the following for the step response of a critically damped system (see student exercise I b)
Critically (hlmpcd, ~ := I [Repeated polesl
(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.
CASE 3 Undcrdamped ~ < 1)
For S<: l, from (9.5) and (9.6), we find that the poles are complex:
fJ=
.. ~
T T
which is wriUcn in terms of the real and imaginary contributions:
P=(Xjf3
ex = where:
~ f) ~
T T
We can derive the following step response for all undcrdamped system (sec student exercise I):
lJndcnJampcd, (t < 1) [Complex poles1
V(I) :-= k!:l.u (I (' (1(. ,,,in (I3t
+
<I'))
V'(
-
<I'
I
where f) =
= tan
~ T
(9.17)
Again, dividing by kD.lI, we can produce the plot shown in Figure 9.2.
220 Transfer Function Analysis of Higher-Order Systems
2nd order underdamped
Chap. 9
1.6
1.4
1.2
i 08
0.6
0.4
0.2
~
,-
varia JS values 0 I factor
/
/ I?':
,\\
//og
75'\>"
. "
!
'/.
.0
/.
...
)/
. ..
\
\
/
1/
/
./
\
/

t,\

i

t

o
o 2 4 6
Utau
8 10 12 14
FIGURE 9.2 Step response of a second-order undcrdampccl system as it
function of the damping factor (0.
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 Systems
time to first
peak
221
l
c
I.-period of j
rise time oscillation
d
. b
ecay mIlO = -

overshoot ratio = %
Time
FIGURE 9.3 Step response character-
istics of undcrdamped second-order
processes.
9.1.2 Underdamped Step Response Characteristics
The following C0111mon measures of underdampcd second-order step responses arc shown
on r
7
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.
EXI\l\;lPLE 9.1 Undcrdampcd Second-Order System
Consider the following transfer function, subject to a ullit step (L\.u ::::: 1) input change (assume
time units arc minutes):
5
g(s) ,
4s"1 0.8s + I
Find the (1) rise time, (2) time to first peak, (3) overshoot, (4) decay ratio, (5) period of oscilJa
tion, (6) value of yet) at the peak time,
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;

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 1.2. so 'II::: 3.2 .. ;.c; 6.4 Illinu(t's
=--:: (l.5J. 3. The o\Trsh()()( ratio is
I 15
4. The decay ratio is lSI
15J
I
I
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 = 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.
usc the dimensionless plot (Figure 0.21.
it is often easier to
9.1.3 Impulse Responses
NO\v, \ve cO[l;-.;idcr the dynamic response of second-order systems to impulse inputs.
k
Y(s)
-+- + J
where 1\ represents the lnagllitude of the jmpulse.
\I,'hne dt)/k/\ is the dimensionless output and lIT is dimensionless rimt'.
The lime domain solution for the ovcrdamped C<.l.SC is (see sludent exercise 2a):
sinh (: \1 - ('
T
CASE I O\'crdamped 1)
Sec. 9.1 Responses of Second-Order Systems 223
CASE 2 (:riticallJ' Damped ~ : : : : : I)
The impulse rcspOilsC for the critically damped case is (see student exercise 2b):
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
10 8 6 4 2
0.6 'f-'r.,.+, ; ,..................... !
0.4
o
'5
0.4
%
0
w
w
0.2
'" C
0
'w
c
'"
0
E
i5
0.2
tltau
FIGURE 9.4 hnpulse response as a function o f ~ .
224 Transfer Function Analysis of Higher-Order Systems Chap. 9
CI'Iw underdampcd responses show characteristic oscillator)' behavior.
9.1.4 Response to Sine Inputs
Consider the case where the input is a sine fUllction. with amplitude A and frequency (,):
lI(r) c:::C A sin (ll!
The Laplace transform is:
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:
\vhcrc:
y(l)
\
kA
+
sin (rof + (l))
(9181
(sec student exercise 3). The amplitude of the output is:
kA
(9191
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
These relationships are used in ExarnpJe 9.2.
EXi\IVIPLE 9.2 Sine Forcing of Systems
C:unsider the fol1owing system:

g(s)
I
\.: -+- 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
time, min
60 80 JOO
FIGURE 9.5 Low frequency sine input response.
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
FIGURE 9.6 High frequency sine. input response.
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
time, min
15 20
FIGlJRE 9.7 R.t'sonam;c peaking phenomenon.
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 r r q l l l ~ n y Vv'e do not provide further analysis here.
but refer the reader to any textbook on process control for 1110re detai 1.
9.2 SECOND-ORDER SYSTEMS WITH NUMERATOR DYNAMICS
"rhe previous discussion involved pure second-order systems. COil sider \10\\'. a sccond-
order system with numerator dynamics with the gain/time constant form:
The pole-zero form is:
s(s)
s(S)
k(T"S + J)
( )
.//(1)
",.1+ 1 (T!S+ I)
//(s)
(s -1',)(.1 - 1',)
W201
Sec. 9.2
where:
Second-Order Systems with Numerator Dynamics
PI =
227
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 process.
EXAMPLE 9.3 Consider the Following Transfer Function
yeS)
(3s +
+J
lI(S)
1)(15, + I)
(9.22)
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
9.3 THE EFFECT OF POLE-ZERO LOCATIONS
ON SYSTEM STEP RESPONSES
There (lfC it numher 01 difkrcnt \va)'s to represent process tra/lsfer [unctions. The "t!,lin-
time constant" form is:
g(,,)
k(TII1S -+- I -+- J). ,('''''/ -+- ]
(T,I'" + I )(T,I'" + I) .. (T
d
,," + I)
(9.23)
WI1Cl\' TII/' is (\ nUlllerator time conslanl and Tdi is a nUlllCl"(l[or time constant.
The "poIY'l1omiaJ" form is
(b,!,SIll h hiS
I h
ll
)
g(.l)
--_.
m
(9.24 )
(1,/'!' ([II (f IS I
do
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:
\\Ilcrc:
g/,(I)
C, )(.1 cJ ("- c
m
)
II, )(" - pJ (" p.,l
..
II I', )
k i J
i'i (-:)
, ,
The notation il ( fl,) is shorthand for ( -fll)( -P2) (Plll.
Notice Ihm the poles ;m:
Ill::: -
I,ll
and the Icrn is
and that complex poles (or must occlIr in cornplcx conjugate pairs.
EXA\II'I,E 9,4 Comparison of Various Transfer Function Forms
('nnsidcr a trallsl"cr fUllction \\ith lhe follt\\\ini! E!<l1J1-1irnc constant fnnn:
2(-[0., I I)
(.1.\ + 1)( 15.1 t J)
(l).271
(9.281

The polynomial form is:
Sec. 9.3 The Effect of Pole-Zero Locations on System Step Responses 229
The gain-polynomial form is:
and the pole-zero f(mn is:
g(.,) -
g(s)
"- 20s + 2
-1- ISs +
lOs 1- I)
+ 18s 1 I)
(
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 arc (reaJ,imaginary)). For this system, there is no imaginary component
and the poles and zeros lie on the real axis (Figure 9.10).
2
1.5
FIGUU.E 9.9 Inverse response.
'"
0.5
0
0.5
-1
0 20 40 60 80 100
230 Transfel' Function Analysis of Higher-Order Systems
Imaginary axis
Chap. 9
Real axis
F[G(:RE II.! 0 P"k-/cr" locatio" plot
((I)' Example 9.-4 (x-j1olc\. {l-!l'ro)
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"
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.
f),tI P,I.WE APPROXIMATION FOR DEADTIME
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.
faster response
Imaginary
oscillatory
aXIs
more
r
x
1
x
Inverse response zeros
unstable poles
Real axis
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
ratio increa'ics. lhe response becomes mme
Sec. 9.4 Pads Approximation for Deadtime 231
1.5
..J
1
Second-Order Pade'
Approximatlon
0.5
y
0
Pure Time-Delay
-0.5
Fir.ll-0rder Pade' Approximation
-1
0 5 10
r-
!,::>
time
FIGURE 9.12 Comparison of step responses for pure time-delay with
order and second-order Pade approximations. Dcadtimc::: 5,
The first-order Pad6 arr)foxil1lation is
B
s
0-,=
2
e
0
+ s
2
(9.29)
The second-order Padc approxilnation is
c 0,,=
1 +
o 0
2
,
\' + y'
2 12
o 0
2
"
,
. + 12'
2.
(9.30)
A comparison of the step responses of first and second-order Padc approximations with
pure time delay arc shown in r"igurc 9.12,
EXAiVIPLE 9.5 Comparison of the Pade Appmximations for Dcadtimc
Consider the foUowing + deadtimc transfer function
e
Ss
xes)
5s -+- I
232 Transfer Function Analysis of Higher-Order Systems Chap.9
The first.-order P,ldc appruximatioll yields tht' fullowill(! lnulsfcr functiol\
-- 2.Ss
7.Ss
and the second-order Pade appro\i11latio/l .yields
2.0SJJ\: -- 2S1
1041
j 1-1-.58.\3,' -+ 7.51'
a cOlllparison {If the step response.s (If gl(s) and is "llUwn in [:igurc 9.] J. Notice tllat
the first-urdcr aPllW\llllati(Hl has an inverse response. while the 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
FIGURE 9.13 Cumparisun uf first-urdcr + tlcadtill1c rcspulhC with fll'st- and
L '_c_c_"_n_r1_-,_"_.d_c_r_l'_a_r1_c approximations 101- dcadtimc
Most ordinary dirferenti,ll equation llurllcrical illtcgrat()rs (including 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,
9.5 CONVERTING THE TRANSFER FUNCTION MODEL
TO STATE-SPACE FORM
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:
which we can write as:
Divide (9.31) by 7
2
to obtain:
d'y 2{ dy
+. .. +
dt
2
1" tit
(931 )
233
(932)
(9.33)
(9.34)
k
_I 2{7S 1_ I lI(s)
X2 ::::x
1
y \:2
.r] :::: y
y(S) =
Converting the Transfer Function Model to Form
LeI:
which arises from the following equation:
, d'" dy
7 C
i
+ 2{7 + Y c.c k U(I)
dl dl
Sec. 9.5
and:
so:
2{ dy I k
._- ;Y+,U(I)
'T dt . 'T
or,
The student should show that defining y::;;: x
2
leads to the following state-space model:
(9.38)
(936)
(937)
(935)
I I I]
. 2{ 1 . k
I.
XII = - 7 -7' l.xll + 7' [u]
X, I () .', ()
y = [1 0] 1::1
and since:
and we can write in the slate-space fonn
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.
EXAiVIPLE 9.5 i\lATLAB Routine tf2ss
C'onsidcr the following second-order system:
j
U.7071 \
First define the Ilumerator and denominator arret)'S by:
1 I/(s)
and ClllCl" the command:
num -
den
J
). 0.7071
la, b, c,dJ
I'vlATL \13 returns the SUite-space matrices:
a 0.3535 -0.5000
i.(lOUO 0
b --: ]
(1
c- (J 1.S000
c.1 ()
Lt2soc; (num, den)
Notice that the slale space models ill Exmnplc 9.5 are 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.
9.6 MATlAS ROUTINES FOR STEP AND IMPULSE RESPONSE
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.
The following MATLAB commands arc llsed to generate the response shown in I-;ig-
ure9.J4.
\vhich can be written:
Consider the following Laplace dOlnain model:
235
20s + 2
g(s)
50 + 15 s + 3
2(IOs + I)
g(s) ---
50 s' + 15 s + 3
MATLAB Routines for Step and Impulse Response Sec. 9.6
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:
12
FIGURE 9.14 Step response for the example system.
0.8
"
0.6
OA
02
0
0 10 20 30 40
time
[y,x] = step(num,deD,t)
236 Transfer Function Analysis of Higher-Order Systems
0.4
0.3
0.2
"
0.1
0
01
0 10 20 30 40
time
9.15 Impulse rcsp(lnsc for lhe example sy:'lClll.
Chap,9
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
The output and time veclors arc generated lIsing:
[y,x,tJ =
the plot is obtained from
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.
The MATLAB routines used were
Student Exercises
step: step response
impulse: impulse response
237
transfer function to state space tf2ss:
Critical concepts from this chapter include:
damping factor
natural period
numerator dynamics
Padc approximation for
relative order
STUDENT EXERCISES
1. Derive the step responses for the following second-order systems.
a. Overdamped
b. Critically damped
c. Underdamped
2. Derive the impulse responses for the following second-order systems.
a. Overdamped
b. Critically damped
c. Underdamped
3. Consider a sine input with magnitude A and frequency w. Solve for the time domain
value of the output for the following second-order systems.
a. Overdampcd
h. Critically damped
c. Underdamped
4. For a second-order system with numerator dynamics, find the step response for the
following.
H. Ovcrdampcd.
b. Underdamped.
c. Critically damped.
5. A system has the following Laplace transfer function form:
Y(s) =
2.5
U(.\)
+ 5s + I
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
a. \Vhat is the final value of the outpUt'?
h. \\,'hcn docs the Olltput first reach this final \,-tllIe',J
('. \\:hal is the minimum value of the output',)
d. \VhCll docs the output hit this minimulll \aluc'?
e. PInt the response.
6. ('ullsickr the follO\ving second-order
d\
'II' dt'
d\'
(T
l
-I- T,)
- ill
f k /I
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; 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::: 10. and lry sl'\l'ral plots. \arying 'II from 10 to ()
7. C:ollsider the fol]()\\'ing two first-ordcl' ODE'.;:
d.r I
I ,[
'[
,[ II
til
dr,
"
+
"
ell
til
and the static rclation"hip y:::::: XI +
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 III a" a rUlIction of kI' k::.. 'I' '::,.
b. No\\'. assume that a step change of magnitude 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
:::: 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
slate. You obtain the follmvingplot for the outpUl variable. \vhich is reactor
aturc (notice that the reactor temperature is in OF).
----
Student Exercises 239
100
I
I
-1--
I
I
60
I I
_____1 I
I I
I I
I I
--!---- ---- --t--
I I
I
___ I
I
I
I
- -t----
I
I
I
80 40 20
I I
I I I
I I I
-...J--____
I I I
I I I
1 I I 1
--- ---
I I I
I
----- -----
I I
I I
I

I I
I I
1-- I-
I I
I I
__ I I
I r
I I
I I
-- - ---t - 1
I I
I I
I I
290
285
u.
280
'"
ID
"0

275

iii
270 ID
0-
E
2!
265

'"
260
'"
255
250
0
time, minutes
where y is the Olltput and u is the input. Assume that:
also, assume that at time 1 := 0, the input begins to increase with the following rela-
tionship
a. What is the value of the process gain? (show units)
h. What is the value of 1''1 (show units)
c. What is the value (show units)
d. What is the decay ratio?
c. What Is thc period of oscillation? (show units)
f. Write the second-order transfer function.
(). A process is described by tile f,Jifowing finear ordinary differential equation;
dv d
2
l{
4 + 1 + y 2.5
d1
2
tit
0
du(O)
dl
tlr(0) c (0)
til
U(I)
1 2
2 I
The units for time are minutes.
a. What arc the values of the poles of this process (give units)?
b. When docs the output of the process reach a maximurn value?
c. What is the maximum value or the process output?
10. A process has two poles and one zero. The poles are located at -I 0.5) and the
zero is located at 0.5. Sketch the type of responsc that you expect to a step change in
240 Transfer Function Analysis of Higher-Order Systems Chap.9
input. Explain. F,'ind the transfer function and verify these results assuming a gam of
one.
(1,0.5)
x
(0.5,0)
(-1,-0.5)
x
11. Consider the following state-space model (from Module 7):
[ I [
2AOS
0.833
o II x, [ [
-2.238 x, +
7 [
-1.117 /I
Y - 10 11 [x,'[
Xl.
a. Find the transfer function g(s) where yes) g(s) lI(s).
b. Find the poles and zeros.
c. Plot the response to a unit step input.
d. Plot the response to a unit impulse input.
12. A process engineer responsible for the operation of a complex chemical reactor has
the process operator make a step change in the coolant f10wrate from 10 gpm to 15
grm to the reactor at 2:00 pm. The reactor temperature is initially 150"F at 2:00 pm
and drops to a low of 115P at 2: I0 pill. Eventually the reactor temperature cornes
to a final stcady-state temperature of 125"F. Assuming that the response is second-
order (k!T
2
\.2 + 21;TS + I), find k, 1;, T (show units).
13. The output of a 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.
_____________________________
/ \
/-
----.....
/
>,,_/
/
17 , .............
--
Step response of a physical system, in deviation variables.
241
300 250 200 150
time (min)
100 50
o
o
40
10
20
30
Student Exercises
11(.1')
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
2
S
2
+
+ 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
s2+4s+3
ESCOLA Dc
B I BL I 01 cCA
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
4
2.511 X'I + 10.00155111
- 6.5 x, 0.00248
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 ~ i l l j t i l l g
outputs arc shown ill the plot below. Associate each process with a rCSpn!1Sl' ClIl'\t'
('line (kucl'l fr(jIll Pint
21'
L <';(,\)
2\
II C:(.\ )
.:s I
III .l::(.\)
=
I
-1-(.\ 2\ - !)
IV. (;'(.1)
=
Is
2
d
a
15
"
0.5
0
05
0 2 4 6 8 10
19. ('ollsidcr (\ SC(nIH! order transfer flllll'lion \vilh IlUlllcralm dYIl<.Ullil"';:
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.)
20. ('ol1sidcr the tran"fer fU1Jction g,,(s)
12.\1 2
-L I
(J2.S2 O\J
Ot
s
4 05
S
5
0
6
",6
,'--
1
-
IJ.I' I-
+ +
-
2' :V 4' 5' 61
c. Write the gain-pole-zero form r; (s') =
'I" (.1'-1',)(.1'-1'2)
21. The reader should show how the firsl- and second-order Pade approximations relate
to a Taylor series expansion. The 'I'aylo1" series approximalion to a time-delay in the
Laplace domain is
Student Exercises
a. Write the gain-polynomial form gJs)
b. Write the gain-time constant fonn g,,(s)
k(T"S + I)
r\,l + 2STS +
k(T
IJ
," + I
h.l' + 1)(7
2
.1' + I)
243
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 75C 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:
dC (F) F
~ _ +kC
A
+ CAr
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)
. . gmol B/lilcr ....
where the gam 15---------------, and the tllne lIl11! IS Il1lIlutcs.
gmol A/liler
b. At time t :;:0 0, the input begins to vary in a sinusoidal fashion with amplitude
0.25 and frequency 0.5 min -J; that is,
1/(1) ~ 0.25 sin(O.s 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
1
1)(11 1)
245
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 e
2
(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
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
where XI and x2 ;::: drug concentrations in compartments I and 2 (f.1g/kg patient
\vcight), and u ::;0; rate of drug input to compartment I (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 for the drug
atracurium, which is a muscle relaxant:
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
Chap.9
~ -x,(1 - 8) I 1/(1)
~ 0.015 min I
(k
lO
+ k,,) ~ 0.26 min I
(k
2ll
+ k
2l
) 0.094 min I
Transfer Function Analysis of Higher-Order Systems
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 ~
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
dl
246
MATRIX TRANSFER
FUNCTIONS
10
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:
Convert a state-spate model to a transfer function model analytically.
Convert a slate-space model to a transfer function model using the MATLAB
routine Sf32tf.
Discuss interesting effects from pole-zero cancellation,
The r ~ o r sections arc:
10. J A Second-Order Example
]0.2 The General Method
10.3 MATLAB Function ss2tf
247
248 Matrix Transfer Functions Chap, 10
The goal of this chaptn is 10 take il gCllt'ral stdte-space model:
x Ax+Bu

and convert it to the matrix transfer function form:
yes) <;(s) lies)
and usc this mode] to solve for the response;.; of each output to each input. \Vc will also
usc this technique to easily find the 11th order differential equation corresponding to l'<ICh
output variahle.
10.1 A SECOND-ORDER EXAMPLE
Consider the follo\ving tv\'o-statc, single-input. single-output model:
dX
I
= (111'\"1 -+ (1
1
.',1.":, -+ hi] II
dl
( I 0 I ,
dr")
dl
{ 10.21
( IO.JI
'faking Laplace transforms of (IO.l) through (10.3), \ve find:
s X,es) ',(0) "" X,(') + II,. )(,(s)l iJ" (J(I)
s X.(s) x,(o) !I" X,(I) + II" X.(s) iJ", (J(I)
Yes) _. "" X,es) + c,. X,es) d" (J(s)
Assuming .\)0) .1.':;(0) ;;:;: O. and rearranging:
(s -- II,,) X,es) - II" X.(s) iJ" U(s)
(s .. lI,el X,es) -!I" X,es) iJ" U(s)
( I ()l,
{10.) I
( 10(; I
( 10.71
( I I
III order [0 generalize this procedure later. we \vritc (10.7) and (10.8) in matrix form:
or,
(,,)]_.] 0"
.. (/: 1
11,",1 \ I:,',(1)1 1hill U(s)
(/., I .\ ,(.,) h"
1
(/,Ii
(/) I
0',',1,\ [X,(S)]
(/ .. f X.(I)
I
h" lues)
h
21
( I () _C) I

Sec. 10.1 A Second-Order Example 249
and (10.6) is written in matrix form:
[
X,es) I
yes) = [e" e12 ] X,(s) + <1" U(\")
We scc (10.9) is of the form:
(sl A) Xes) II U(s)
with the solution for Xes):
Xes) (sl A) 'II U(s)
and writing (10.10) as:
yes) C X(I) + D U(s)
combining (10.12) and (10.13):
yes) c" [C (sl A) 'II + D] U(s)
recall that often D::::: 0, in which case (10.15) is written:
yes) .. [C (sl A) 'II] U(s)
or,
yes) G(s) U(s)
(10.10)
(10.1 I)
(10.12)
(10.13)
(10.14)
(IO.IS)
(10.16)
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) ..
D(s)
(IO.l7)
The reader should show that the polynomials in (10.17), based on (10.15) afC (sec student
exercise 4):
H(s) "l S + "
0
D(s) = s' + <1, s + do
where the polynomial coefficients, in terms of the matrix coefficients, arc:
11
1
= ell btl + en bI,
flo = elJ [0
12
b
ll
- {In blJl + C
l2
ra
21
b
l
] alJ h
21
1
Since the inpuHmtput relationship is wrillen:
(1O.18a)
(HU8b)
(IO.19a)
( 10.1%)
(lO.19c)
(lO.19d)
250
We call further write:
Y(s)
Matrix Transfer Functions
Nix) .
lJ(s) lis)
Chap. 10
or.
Dis) Y(s) = N(s) Uis)
The corresponding differential equation is:
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.
Example 10.1 Linear Biol"l'ador \todd
('oll"idcl <l llncari;cd Illode! of a l)iorc<ll'tOL wlth the sl'cund-statl' \"ariahk (SUbslralt' c{llKCIlIJ,1
liun) Il1c,l"urcd and with dilution ralt' (I:;V) as the input \ari;\hlc,
rhe statc-space matrices arc
A=
B
l
II
-II 7';1111
c [II I]
[) II
Using the follt1\\ing steps [0 rind Gel) c:;;: C (sf - A) J B:
(sl A)

O.9().')() I
s + 2.."640_
Recalling the simple method for ill\'t:'lling a 2 x 2 matrix. \\'e find:
(s)
( (d
A)'
A) J
I
s j 2.:'i640
IJ.7SIII1
o7';00\ I,
\ 2.:'1640 s
2..'1640 s f 0.67920
U.6792(J
0.7';011 II [ '
..).XL).J S t 2.5640 s I O.h7920
3.RZ55 sl 1.14765
yes) ~ U(s)
s/ -t-- 2.5640 s t- 0.67920
Sec. 10.2
so,
The General Method
C(sl-A) 'I!
3.RZ55.\ 1 1.14765
" 2.5640 s + 0.67920
251
and we easily find that
d\' dy dll
, + Z.5640 ' ,j 0.67920 \' ~ 3.RZ55 + 1.14765 II
de dt -- dt
We generalize this procedure in SectioIl 10.2.
10.2 THE GENERAL METHOD
Consider a general slate-space model with 11 stales, JJ1 inputs, and r outpuls (see Chapter 5):
tit"1
= (lIIX
I
+ (/I2X2 -+- ... +- Ol/JT" -+- h
ll
u
1
-I ... + bllJlu
m
dt
(10.20)
which can he written in matrix fonn as:
I
i, I [all
., ~ = _a",
[
Y',1 ~ Ie,,'
\' c
.-, II
a'''.lx, I [""
a"" x" + -"",
,'''1[ ''] Id"
(,/1 _ \11 d'l
d
'2
(10.21 )
252
which has the form:
Matrix Transfer Functions


Chap, 10
(10.22)
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:
Yes) "' G(s) lies)
where:
G(s)
(I' X Ill)
The trailsfcr function matrix, G(s), is:

(I' X n)(n X n)(n X Ill)
G(s)
r
gll(S)
g" (s)
g pes)
g,,(s)
g'm(s) I
R,m(s)
Notice that G(s) is square if r:::: m (number of outputs::: number of inputs),
10.3 MATLAB ROUTINE ss2tf
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:

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.
EXAMI'LE 10.2 Example 10.1 Using MATLAII ss2tf
Here we consider the linearized biorcactor model, with two inputs. The first input is dilution
rate, the same input llsed above. The second input is the substrate feed concentration. We will
also consider both state 1 and state 2 to be outputs, and modify the C and 0 matrices so that
ss2 tf provides the transfer functions between the input and both outputs.
Sec. 10.3 MATLAB Routine [3,,2,,[
A =:; [0,0.9056;-0.'15, 2.5640]
A -
a 0.9056
-0.7500 -2.5640
B=- [-'1.5302,0;3.8255,0.3]
253
13
1.5302
3.825'3
o
0.3000
Input I
"
c - [1,0; 0, ] ]
c
c:o
1 0
0 1
"
D [0,0; 0,0]
D
""
0 0
0 0
The numerator and denominator polynomials relating the first input to the two outputs arc found
using the following command:
[nuffi,den] "",ss2tf (A,B,C,D, 1)
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 d r e s ~
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:
-1.5302 .I' - 0.4591
11 (,)
+ 2.5640.1' + 0.67920 l'
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
((lot-,; (den)
dll;:;
O.30()O::1
eiq (al
an,;
. 3 () CJ CJ
.) . /. 6,}
Matr"ix Transfer Functions Chap. 10
We call ahcl \\I'ilt' the Ir;lTlsfcr fUIlCliulls ill fOHn"
I ,,"iJ02 (s +- O.J)
III(S)
(s +- 2.2(40)(0" +- 0.3)
1-
3)Q55 (s 0._')
!J'''. ',-.11 1(,\)
is + 11.,1
\\herc ha\'c the interesting result (11:11 tile lern (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))17 \
1/, (s)
1
\Vi.-' \I.ould notice the Il'ro-pok cancellation if we ;\Is() lIsed the cOll1llwnd \() find the
fOOls of the IHlIJ1Crator polynomial
q'Tot:-? (nurc(l,:))
- () . 3C1 (I 0
'>rU(I\ '; ([;1 :))

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
Input 2
MATLAS Routine ",,2tf 255
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
den
1.0000
,-tnd we have the result that;
o
0.3000
2.5640
0.2717
o
0.6792
v,(s) = g,,(s) lI,(s)
y,(s) = gn(s) lI,(s)
0.2717 ( )
+ 2.5640.':1 -t- 0.67920 1/
2
s
0.3 s ( )
2
().t,7
')7l) 1/, s
+ .5640 s I _
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.
y(t-, = s yes -) 0)
0.3 s au}
-- 0
( 2.5640 s I 0.67Y20 s
10.3.1 Discussion of the Results from Example 10.2
THE FIRST INPUT
We noticed that the transfer functions with respect to the first input had pole-zero
Jation. This created an input-output relationship where the step response is faster than
would be expected, because the slow pole was canceled by the process zero
- 1.5302 (.I' + 0.3) ( )
y,(s) = ---- ... !I, .I'
(.I' + 2.2640)(.1' + 0.3)
( )
3.8255 (.I' + 0.3) ( )
Yo .I' = (sf 2.264(1)(;+ ()3) !I, s
This can also be seen using the constant form:
0.6759 \.,._,_,_,_, .I' +
yJC,\') = (().4417 ,. + + '1) !I,(s)
" 1)(3.3333 s
1.6897 " ..._., .... .I' + 1
y,(s) = (0.4417.\. + u,(s)
1)(3.3333 s + I)
Matrix Transfer Functions
The step responses for a unit step input change are shown in Figure 10.1.
Chap. 10
2
20 15
1.5
10
time
y,
5
0.5
- 0.6759
y,(s) = 0.4417 s + I LI,(S)
1.6897
y,(s) 0.4417 s + I fl,(S)
FIGURE 10.1 Unit step change in input I.
2 ,- --- ---- -- ----
y,
o
-1
o
1.5
-0.5
:;,.., 0.5
0.4
0.3
2:
0.2
"
0.1
a
0
FIGURE 10.2 Unit step change in input 2. Notice that the- steady-state value
of Y2 docs not change.
or,
256
Student Exercises
THE SECOND INPUT
257
Notice that input 2 docs not have a steady-state effect on output 2, only a dynamic effect.
This can be seen hy using the MATLAB step function, then plotting the results (sec Fig-
me 10.2).
Dum
0 0
0 0.3000
d.en
1.0000 2.5640
0.2717
o
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:
ss2tf: converts state space to transfer function form
eig: matrix eigenvalues
roots: roots of a polynomial
STUDENT EXERCISES
1. Compare the step responses of the following three transfer [unctions:
1
a. gt(s)
(0.4417 s + 1)(3.3333 s + I)
1
b. g2(s) 0.4417 .\' + I
1
c. g,(s)
. 3.3333 s + 1
Which has a faster step response? Why?
2. Consider the following state-space model (a 5-stage absorption column)
258 Matrix Transfer Functions
- 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
Chap. 10
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.
I
dX,]
ai -OA O' x, 0.5
dX
2
= [ 0.2 ~ O.2IU + 1-0.5
dt
0.211'//'.1
o II)
4. I"or a ~ s t a t e single-input, single-output process, derive the relationships shO\\1l in
(10, I 8) and (10.19).
5. For the following state-space model, find the transfer function matrix rcl'llill,!.! all
four inputs to both outpulS,
I
-OA
A=
3
B_[0
- SD
C= [I
o
D.3.1
-4.5
-7.5 D.l
D D
DI
1.5
Student Exercises
6. Consider the following state-space Illodel:
[
<It I III OJ [ 7 ]
at- 5 \, 5
'h
2
= _ 1 1 [\,1 + 2 II
<It 10 2 25
}'::::: x
2
259
Show that the eigenvalues of the A matrix are -liS and 112, so the system is u s t ~
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 (C
2
) is the output variable. Write this lllodel in
state-space form, using deviation variahles.
x'-:::Ax--I-Bu
y=Cx+Du
Find the transfer function relating If to y.
For the following parameters, simulate a unit step response.
F =J() limin, V =1001, ("n =1 gmolil, ,,= 0.5, k =0.1 min-I.
F
(X F
(1_(<) F
C, C
2
260 Matrix Transfer Functions Chap. 10
8. Consider the follmving set of series and parallel reactions (from Module 7)
k
j

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
k = ' 1nio' j
I 6
Itllll
.1
k,
liters
6 mol min
and the steady Slate feed and reactor concentration of component A arc:
IlHl]
III
liter
C
A\
mol
1
. liter
a. Find the steady-state dilution rate U/V) and concentration of n(shO\v all unih).
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. 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:
Analyze the stability of a block diagranl system.
Understand how inverse response processes can arise.
Understand potential problems with cancellation.
Write a set of differentia] equations to simulate systems modeled by transfer fUllc-
tions in series.
Usc the MATLAB routines J fC'cdback, conv, and
roots.
Use Sll'vIUIJNK for block diagram simulation.
Major sections of this chapter arc:
11.1 Introduction to Block Diagrams
11.2 Block Diagrams of Systems in Series
11.3 Pole-Zero Cancellation
! 1.4 Systems in Series
11.5 Blocks in Parallcl
11.6 Feedback and Recycle Systems
11.7 Routh Stability Criterion Applied to Transfer Functions
t 1.8 SIMULINK
261
ESCOLA DE ENGENHARIA
13IBLIOTECA
262 Block Diagrams Chap. 11
( )
y(s) FIGl'llE 11.1 Hinck diagram n:,prl'

\\'\, han: shown 110\\- Laplace transforms (irc Llsed to reduce differcntialcljuatiollS to
algehraic l"clatiullships. Algehraic equations arc mllch casier to Irlanipul ethan dif-
Similarly, hlock diagrams allO\v us to easily Illanipu . complex
modds that ,Ire cumpo...;cd of subset'; of simple illudels.
iNTRODUCTION TO BLOCK DIAGRAMS
('oll\idcr a standard first-ordn process
!lr(i)
T
!II
\\hich h,j':; the transfl'r fUllction Conn:
+ r(l) k 11(1) ( I I. I I
r(s)
g(s)
g(s) 11(.\)
'TS+
( lUI
( 11.31
!'!'()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.
!iLOCK DIAGRAMS OF SYSTEMS IN Sl:RIES
('ullsidcr 1l0\\ the block diagram rcprc"entation of t\\'o prucesses in "eric" ,IS shown ill
i ;gme 11.2.
u(s)
9, (5) I2(5) -9, (5) If------ ..
FIGliRE 11.2 Block dirlg'ill11 olIW" I"nccsses ,n """'5.
Y(5)
Sec. 11.3 Pole-Zero Cancellation
1'hc input/output transfer function of Figure 11.2 is:
y(s)
0
g,(s) z(s) cO g,(s) g,(s) 1/(.\)
or,
y(s) g(s) I/(s)
where:
g(s) c= g,(s)g,(s)
If the two transfer functions arc first-order:
and
then the overall process is second order:
( 115)
(Ii,.)
(Iii)
( 118)
where:
g(s)
I<
(T,sf I )(T
2
S + 1)
I< 1<,1<2
( 1191
'rhe same idea can be continued for any Dumber of transfer functions in series. The
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 in series:
If([ system is composed in 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.
11.3 POLE-ZERO CANCELLATION
Again, in this section we consider two blocks in series, as shown in Figure 1J.2:
y(s) Oc g,(s) z(s) g,(s) g,(s) 1/(.1') (1l.IO)
264
Block Diagrams Chap. 11
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 in s(Tic" \\ itll <111 L11l.\['lhk' first-order' ": :'lCllI
2.\ I
g:(s)
).,
I
2\ -
'I 1/(\)
I
(11.11 )
( Il.l .2)
"1'(,\) g{i) 11(\) II(S)
I
I I I 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 Whal tillS I11C,II1S h Ill,]l the 1l1l111Cf<.llu]
llf g (\\ \,ill I1Pl ('\;It:ll) cmCc'l the dCllOminatur of in pr:lctin'.
COllsjtkr II n:ali:-li ..... (,;dSI:\ \\ h..... re .t.':(si ha) ,[ sl,iglH t:rrOl in the \'alul' (If till' poll'
thell \\ C find thdl
I'{s)
t;,(s)
I
-- :U)()O!l -'--- I
2\
.:. ()OUll
ill 14)
I{S) "---' g(s) 11(\)
--.:\
I
I J I I
'\Olll..:(' th,ll \\ IlL'll \\l' do nnt 11d\<" pnfcd p\lkllt:n\ Cdlll..:l'llilIHlIl. thnc :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 ;\Ild \'JI) tile \lUl-
pUl in I 11 I:' I unll \kP illpUl. 11(1);;:: Ill.
\(5s
\'(1)
I)
I I I 1(1)
111 17)
Sec. 11.3
Also,
Pole-Zero Cancellation
-2\' +]
y,(s) s( (J.60lJSs' -:;: 2.9999s + I)
265
(lUg)
which has tbe time domain solution (Chapter 9):
7
y(
t)"I- e'/5
2 7.(JOOl
___ 0.0001 er/2.(l{)(Il
7.0001
(11.l9)
and we call sec that, at low t, (ll.19) is almost identical to (11.17). As time increases, however,
the unstable exponential tcrm in (11.19) begins to dominate. This is shown dearly in Figure 11.3.
Y1' stable
0.5
o
-0.5
o 5 10
time
15 20 25
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 11.1.
EXAMPLE 11.1 Continued State-Space Aualysis
Refer to z(s) as the output of the lead/lag block. FrotH Chapter 8 we find the following state-
space realization of the lead/lag:
dx
dt
x+'T!'u
'Trt 'T(/
266
T"S +
T,t\ + [
5s ~ .. I
, so:
Block Diagrams Chap.11
dl." 7
\ + II
dl
) )
2
,\ II
)
5
(Illd lhe stall' space rcali/ation of the ullstable lag is:
(11.20j
(11.2 J)
dv
dl
Suhstiturill12 (11.21) into (11.22). we find
I
\'
,
rf we usc notation
r 1 :=:.\
Xl c::;;: Y
dy
dl
\'
2
I
x + II
III )
( 11.23J
\\c can \\rile ( II 20) and (11 2J) in the following form:
dt j
dt
7
II
5 5
(1 J .24)
dx-.
dl
Using the usual :,talc-space notation:
I
2 x, 10 Xi
II
)
( 11.2'1)
x Ax Bu
Y (.' xl l) u
\Ve \tTlle
(hi
~ ] i I
7 I
dl
:"
1JII
dx,
I
1_
dl
I()
( 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 analysis can always be used to ad-
dress the stability of a system.
11.4 SYSTEMS IN SERIES
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 ::::;0 I to 5 arc shown in Figure 11.4. Notice the characteristic
S-shape for all orders greater than 1 and the additional lag associated with each higher
order.
11.4.1 Simulating Systems in Series
( I 1.28)
Xl +
k,
u
T, T,
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
dl
1
(53 + 1)'
o
o 5 10 15 20 25 30
time
FIGURE 11.4. Step responses of first-order systems in series.
268 Block Diagrams
XIL-lS)r----'XIL(S)
gutS) ~
FIGURE 11.5 n processes in series.
Notice that we can think of the output of the first process as the input to the second
process:
+
k
z
x)
X'
j
7
2
7
2
and so on through the nth process:
( 11.29)
( 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 -
1 k
dt
0 0 0 x,
,
T, T,
dx
z k
2
1 0 0
x
2 0
dt
T2 T2
1
+
u ( 11.26)
dX
n
,
0 0
0
dt
Tn
,
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.
EXAMPLE 11.2 Two Transfer Functions in Series
Consider two processes, g](.I') and g2(s), in SCrlCS, where:
1.5
g,(s) ~
2, + I
3
~ (s) -
,2 4s +
g(s) ~ g/,) g,(s)
Sec. 11.5 Blocks in Parallel 269
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):
[num,den]
Dum :::
o 0 4.5000
den :::::
8 6 1
which iildicatcs that
cony
:'3cries (numi, denl, num2, den2)
4.5
M(s) ~ 0
~ 1- 6s 1- 1
cony is llsed to multiply two polynomials. Using the previous example, we multiply the numer-
ator polynomials to find:
num
nwn -
cony (nwnl J num2)
4.5000
and the denominator polynomials to find:
den = COIlV (deni , den2 )
den ~
861
11.5 BLOCKS IN PARALLEL
Sometimes the behavior or a chemical process can be modeled by transfer functions in
parallel as shown in Figure 11.6.
270 Block Diagrams Chap. 11
u(s)
y, (5)
9, (5)
+
+
9, (5)
Y2 (5)
Y(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),
or,
1"(S) g(s) u(s)
\\'here:
Consider the case \vhere gl(s) and g2(s) arc fir'>t-ordcr lramJcr functions:
'loS -+ 1
so
(II ,I)
{1112}
{ I I .11}
( 11 3 ~
(1115)
( II,ft)
g(s)
TjS
fl..
(1117)
Developing a common denominator. \\'C find:
Notice that (11.38) has the form (sec Chapter 9):
kiT,s i I)
g(s) = _ ',I
(T,\ + 1) (T,S + I)
(] J .38)
( 111'))
5ec.11.5
where:
Blocks in Parallel
"
~
"
I
1<2 ,
",
j
k
2
T
l
T"
",
I
"2
271
(I lAO)
(I IAI)
We will assume thallhc transfer functions gl(s) and g2(s) arc stable, so Tl and T2 >, O. The
goal of this section is to show a system where inverse response (discussed in Chapter 9
and Example 9.3) behavior can occur.
11.5.1 Conditions for Inverse Response
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 k
2
are of opposite sign. We can arbitrarily as-
sume that k
1
:> 0, which means that k
2
<: 0 is necessary for inverse response. For inverse
response, the condition:
or,
means that
+ k
2
T
l
k
l
+ k]
<0
"
<:
", + ", ", + ",
which yields the following conditions for inverse response.
1. If k
J
+ k
2
::> 0, thcn k[I2 < k211' which implies thal 12fT [ musl be./ kzlk[ for m ~
verse response.
2. If k
J
+ k
2
-< 0, then kJI2 ::> ~ ~ k 2 which implies that 7/11 must be -:> -kik] for i n ~
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.
EXAMPI,E 11.3 '1\\'0 syskms in parallel
Considcr Ihc following systcm of (wo first-order processes in parallel (Figure 11.7):
g,(s)
2
5s +1
272
Block Diagrams
-I
8,(S) -
lsi 1
Chap. 11
2
g(s)
5s +
-1
f
Is + 1
num! [2] ;
denl = [5 1];
num2 -
den2 [1 1];
The following command is used to fiud the new transfer function:
[num, den] ;0: parallel (numl,denl,Ilum2,den2)
nulU =
0 -3 1
den
5 6 1
[y,x, t]
[yl/xl] sLep(numl,denl,t);
[y2,x2] step(num2,den2,L);
p1ot(t,y,t,yl,t,y2)
2
y,
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
11.6 FEEDBACK AND RECYCLE SYSTEMS
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).
Sec. 11.6 Feedback and Recycle Systems 273
r,'ccdback systems arc common in engineering. Examples include chemical and i o h l l l i ~
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).
but
and
So we can write (11.44) as:
Solving for .y(s) we find:
Notice that we can view this as:
yes) ~ glv) /1.(.1')
1/(.1') ~ r(s) + z(s)
z(s) ~ g,(s) yes)
yes) ~ g,(s) (r(s) + g2(s)y(S
g,(s)
yes) ~ . . res)
I - g,(s)g,(s)
(I 1.44)
(l1.4S)
(I 1.46)
( 11.47)
(11.48)
FIGURE t 1.8 Feedback diagram.
where
r(s)
y(s) ~ g,., (.I') res)
g,(s)
g (\) ~ ----------
" ' I - g,(s)g,(s)
u(s)
g (s) I--
+ ~
1
+
'--
g2(s)
f4-
z(s)
(I 1.49)
(11.50)
274
r(,)
u(s)
g (,)
+ 1
+
L....-
gz(,)
f-
z(,)
y(')
Block Diagrams Chap. 11
r(s) ----..I_g_cl(_S)---.JI-----. y(S)
FIC;.(JU.E 11.9 Equivalent block
diagraills.
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.
EXAiVlI'LE 11.4 Feedhack syst('Jll
Consider two first-order process transfer functions:
k
2
'2S _of
glv)
1i,(s)Ii,(I)
(11.51 )
( 11.52)
(11.5.1 )
kl(.;s I
(T,S ,- I )(T)S I) - k,k)
k, (T).I , I)
('1T,S2 -1 ('I -j '2)sl k1k!)
and Xd(s) is stable if the roots of '1'2S2 + ('I] + T
2
)S + J - k
1
k
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 k1k
z
is positive. For stability, then, k
1
k
2
must be less than I. [,d's consider the
folJowing IlUinerical example:
Sec. 11.6 Feedback and Recycle Systems 275
g,(s)
k]
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.
0.8
'"
0.6
0.4
0.2
0
0 10 20 30 40
time
1.2
FIGURE 11.10 Step response for the example feedhack system.
We can also Lise the MATLAI:3 feedback function to obtain the closcd"Joop transfer
function, as shown below.
2
5s
-I
lOs +
276
numl - ] ;
Block Diagrams Chap, 11
and. using lhe rtlutillC fcC'db,)ck
" [nurn,c]cn]
nUllt -
den
S(j T') 3
den] = [5 1];
" den? '-' 1 I ;
'\)v'l' use the routine :;tep to find the step respollse:
[y, .":, L I
which gives the plut shuwl1 in Figure 11.1 n.

11.7 ROUTH STABILITY CRITERION APPLIED
TO TRANSFER FUNCTIONS
Recall from Cb,OIptcr Athat 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
2 {fll_!
3 ",
4 '"
J/+I
(In-__2
an -3
17
2
(;2
(ln4
(111_ )
h
3
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
{In __ ]
(lll_'_ !
and so on. ~ l m n t s 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.
EXAMPLE 11.5 Uouth Array to Determine Closed.Loop Stability
Consider the block diagram of figure 11.9.
yes) -
or,
yes) g,,(s) res)
where:
g,(s)
I - g,(s)g,(s)
278
And the trails!''') fUlll'llOJlS are:
( )S
A
lOs
I )(1, I)
Block Di8grarns Chap. 11
Our g(lal h ((i r-Iml k, til (lSSUrl' __ lahility nl the clnscd-luup
We e:lsil) find the traw,fci l'ullclinil. gi.\):
g(s)
( I50s'
"111h I}
9).\" ISs 2/,;,)
\\hkh has Ill(' c!l,u-ilctcristil' pulYJlolnial
150s' --" 95\
\\ llich j" of the rlmn
lSs ?k,
150 IN
\)5
I 2L
,
1>1 II
4 c
l
rile ilCCC,I.\UrI C()I1c1lliull is that all (II > n, Ilhidl is sari'-Jit'd if J - 2k, > 0, u!" k, ().:'i.
'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)) ,
2k
1."1 (III
-
II
hi
The hi l'lillditioll is satisfied if > :=;) 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'
11.8 SIMULINK
5.2 0.5
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
simulation features 01" SIMULINK.
Summary
Clock time
279
ff------j
Step input
g2(s)
.J'J
output
FIGlJRE 11.11 SIMULINK block diagnllll for two blocks in parallel.
Consider the block diagram system from Example 11.3. A SlMLILJNK block dia-
gram is shown in 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
Block diagram analysis is irnportant because it allows us to think about a system of
processes in terms of a cOlnbination of the individual processes. We have shown how to
analyze the slability of a bloek diagranl systelll, particularly if there are recycle or feed-
back processes. \Vc have shown how inverse response processes can arise from systems
in paralleL We have also shown potential problems with pole-zero cancellation when ana-
lyzing transfer functions in series.
The following MArLAR routines were used:
series:
conv:
parallel:
feedback:
roots:
two models in series (either transfer function or state space)
multiplies two polynOinials
two models in parallel (either transfer function or state space)
two models in feedback form (either transfer function or state
space, and either positive or negative feedback)
find the roots (zeros) of a polynomial
SlMULINK has also been used for block diagram simulation.
280 Block Diagrams
STUDENT EXERCISES
Chap. 11
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:
J,:,
Find the range of gains that \vill make the following feedback system stable.
u(s)

+
+
,(s)
g (s)
1
y(s)
2. Consider the recycle system shown bclmv, where:
]
g,ls) Is l)(s + IJ.5)
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.
r(s)
u(s)
g (s)
+ 1
+
- gz (s)
r.-
z(s)
y(s)
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
r(')
u(,)
g (3)
+ 1
+

g2(3)
I--
Z(3)
281
Discuss how the values of k
2
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' 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 time mo(\eh
The major sections of this chapter art':
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 rime i\lodcls
12.) Parameter of Discrete Linear Systems
282
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 i f ~
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 v r i ~
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.
12.1 BACKGROUND
Sec. 12.2 Linear Boundary Value Problems 283
12.2 LINEAR BOUNDARY VALUE PROBLEMS
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
where Al and 11.
2
arc obtained by rewriting (12.1) as
(/211.
2
--1-- ((I A + an 0
( 12.2)
( 12.3)
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 secondorder equation:
d)x
dx 7
j
4 I x
dz 4
o ( 12.-1.1
subject to the boundary conditions 'II each end;
x(z ~ 0) 2
x(z=-I)=1
We solve for the eigenvalues by using the characteristic equation:
A' + 4 A + : _. 0
which yields (from the quadratic formula):
AI 3.5
A, - 0.5
(lilt! the solution is:
Substituting the boundary conditions results in two equations and two unknowns:
2 = c
1
+ ~
C
j
e:1.S I- (2 eO'
S
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.
2
1.8
1.6
1.4
1.2
( 12,))
{ 12,hl
( 12.7)
(J 2.SI
( 12.91
( I 2.]() I
( 12111
(12, J 2)
1
a 0.2 0.4
z
0_6 0_8
FIGURE 12.1 Solution to Example 12.1.
Sec. 12.2 Linear Boundary Value Problems 285
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
EXAMPLE 12.2 Second-Order Boundary Value Problem
Consider the second-order problem from the previolls example;
subject to the new houndary conditions,
dx
+x=1
dz
dx
=0
dz
Since the solution is:
+
7
4 x = 0
al z ,. 0
at z
(124)
(12.13)
(12.14)
then the first derivative with respect to z: is:
( 12.15)
dx
elz
(12.16)
and boundary condition (12.13) yields:
while boundary comlilion (12.14) yields:
3.5 C
j
e --'5 0.5 ('2 CO,') 0
Solving these two equations for c
1
and c2' we obtain the solution:
( 12.17)
(12.IX)
x
0.37394 C 33, I 0.13032 eO" (12.19)
286
which is showll ill Figure 12,2.
0.1
o
X; 0.1
-0.2
Linear Systems Summary Chap. 12
0.3
o 0.2 0.4
z
0.6 0.8
FIGURE 12.2 Solution to Example 12.2.
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
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 bOllndary valuc problem:
with thc boundary conditions:
x(z 0)
x(z cc 1)
7

4
2
( 12.-1-1
( 12.5)
(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 )
and that one of the initial conditions is
X, (2 ~ 0) ~ 2 ( 12.22)
We sec that -\"2(2"" 0) must be "guessed," then the two equations can he integrated from z:::;:; 0 to
z cz J. The value of x I at z:::;: I is then checked; if x I (2 ;;;:; 1) is not equal to I (within an acceptable
tolerance) then values of .:r2(z ;:;;: 0) arc iteratively guessed until the final value is satisfied. This
method is known as the "shooting method." 'fhe reader is encouraged to llSC this approach to
solve exercise I.
12.3 REVIEW OF METHODS FOR LINEAR INITIAL VALUE PROBLEMS
rn Chilptcrs .5 through II we presented a number of tcchniqtJcs for solving linear initial
value ordinary differential equations. In Chapter 5 we noted that dynamic chemical
process models arc oftcn formulated as a set or first-order, nonlinear differential e q l a ~
tions, where the initial values are known. I'bcsc equations have the general fonn:
x= f(x,u)
y ~ g(x,u)
(12.23)
(12.24)
where x is a vector of n state variables, u is a vector of m input variablcs, and y is a vcctor
of r output variables:
.:\:/I = j;Jxj, ... ,X/pll1,,u
m
)
YI c ~ gj(xl"",xn,uj"",utI/)
12.3.1 Linearization
Elcmcnts of the linearization matrices are dcfincd in tbe following fashion:
288 Linear Systems Summary
_rJg'l () .. -
II all
j
X"II,
Chap. 12
where X,I" H,I" and Y.
I
, represent the steady-state values of the states, inputs, and outputs,
which solve:
() = f(x"uJ
y, = g(x"uJ
After linearization, we have the state space form:
x' = A x' + B u'
y' = ext + Dn'
where the deviation variable vectors are:
X' = x - x
,
II' = U II
,
( 12.25)
( 1226)
( 12.27)
(J2.2n
( 12.29)
( 12.10!
Generally, the (') notation is dropped and it is understood that the model is in deviation
variable form:
x=Ax+BII
y=Cx+DII
Once the model is in this form, a number of techniques can be used.
12.3.2 Direction Solution Techniques
3. Solve the zero-input (perturbation in initial conditions) form (Chapter 5):
x(t) = e
A
' x(O)
One way the matrix exponential can be solved is
eAI = V eAt V--l
The MATLAB function for matrix exponential is expm.
b. For a constant step input at time zero (Chapter 5):
X(I) = eA'x(O) + (eA'_I) A' B u(O)
(12.31)
(\ 2.32)
( 1233)
(12.14)
( 1235!
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)
which is often written as:
(1216)
Sec. 12.3 Review of Methods for Linear Initial Value Problems
x(k + I) o. e
AM
x(k) + (e
A
"' - I) A I B u(k)
289
( 12.37)
where k represents the ktll time step_ This represents a model, which is
discussed in more detail in Section 12.4.
12.3.3 Rewrite the State-Space Model as a Single nth Order Ordinary
Differential Equation
a. Solve the homogeneous problem (Chapter 6);
dx
+ ... + (lJ tit + u() J: =--= 0
( 12.38)
by first writing the characteristic equation:
all All + {In_1 A
Il
-
1
+ ... + G
1
A + al! = 0 ( 12.39)
and solving for the roots (eigenvalues) of the nih order polynomial. 1f the roots arc
distinct, the solutionis of the form:
( 12.40)
where the coefficients arc found llsing the n initial conditions.
h. Solve the nonhomogeneous problem using the method of undetermined coefficients
(Chapler 6):
dn-Jx dx
J "",,, J + ... + ii, d + ""x = f(1t(t
rt - .f
(12.41)
using 11 three-step procedure,
i. Solve the homogeneous problem to Find:
(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)
iii. Combine the two solutions for:
x(t) Xf/(l) + xl'(t)
(12.43)
( 12.44)
c. Use Laplace transforms to solve the nth order equation (most useful for nonhomo-
geneous equations) (Chapters 7-1 I):
(1245)
which corresponds to the differential equation:
290 Linear Systems Summary
The more general case is:
which corresponds to the differential equation:
Chap. 12
(12.46)
(12.47)
dllu
= b---- + b
/I dtll II-I
ri"-Iu du
J+ ... +b
J
+bou
dt
ll
-- dt
(12.48)
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.
12.3.4 Use Laplace Transforms Directly on the State-Space Model
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:
Y(.I) = lC (.1'1- A) 1R + DI U(.I) ( 12.49)
Generally, the Laplace transforms technique is used for nonhomogeneolls problems, that
is, systems that have an input forcing function (such as a step).
12.4 INTRODUCTION TO DISCRETE-TIME MODELS
Consider the genera] linear state space model:
or,
XI
([1,,] lX1] Ib
l1
. . + .
. . .
{{/Ill _nhlll
(1231 )
Recall that the single variable equation:
Sec. 12.4 Introduction to Discrete-Time Models
x-::;:ax+!Ju
291
( 12.50)
has the solution:
iJ
X(I) = e
al
X(O) + (eM - 1) U(O)
({
(12.51 )
when u(t) :::: constant::::: u(O).
In a similar fashion, the solution to (12.31), for a constant input (u(t):::: lI(O fronl
t= 0 to tis:
where:
and
X(I) c. (I' x(O) + r u(O)
G = (t/>-I) A 'B
( 12.52)
(1253)
( 12.54)
Equation (12.52) can be used to solve for a system where the inputs change from time
step to time step (t to t+6.1) hy using:
X(I + AI) tP x(t) + r u(t)
More often this is written as:
x(kc I) tI' x(k) + "u(k)
where k represents the kth time step. The output at tillie step k is written:
y(k) = C x(k) + D u(k)
( 12.55)
(12.56)
( 1257)
The stability of the discrclcstatc-space model is determined by finding the eigenvalues
of (J>, If the magnitude of all of the eigenvalues is less than I, then the system is stable.
12.4.1 Discrete Transfer Function Models
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:
where:
Y(z) c.c G(z) U(z)
G(z) = IC (zl- A) 'n +- DJ
( 12.58)
(12.59)
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
g Z Ii. II I
anz + ali jZ +
... + h1z + h"
.. , + alz + a"
( 12.60)
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
+ {loZ-n
(1261 )
The backwards shift operator is defined as;
y(k 1) = z' y(z)
so y(k 2) := [l.V(Z), etc. The discrete transfer function notation:
( 12(2)
then represents:
__. b
ll
-t-
y(z)
-I- ... -I- {'IZ.---n+ 1 f /, Zf{
" 1(")
j 1 . __ 11 t 4.
+ ... + {lIZ'-n --f- aoZ
( 12(3)
(an + {l1l_IZ-1 + ... + (ljZ-n+l + ((OZ'-II) Y(2)
(hI] + b
ll
_
1
2 j + .. - + btZlll1 + buz I!) u(z)
which corresponds to the discrete input/output model:
a"y(k) + a"ly(k 1) + ... -I- (I,y(k" 11) (I"y(k 11 1)
= ""u(k) -I- h"o,u(k 1) -I- ... -I- hlu(k 11) f h"u(k 11 1)
( 12(4)
( 12.(5)
Usually we arc solving for y(k+ I), and without loss of generality we call assume all :::; ].
y(k -I- 1) -I- {["ly(k) -I- ... -I- a,y(k n -I- 1) -I- {[oy(k 11)
= "ou(k +1) -I- "o,u(k) -I- ... + ",a(k 11 1) + "ou(k 11)
( 12(6)
Also, for rnost systems there is not an immediate effect of the input on the output, so
h
n
;;;;: O.
The most common model is fin..;t-order:
y(k -I- 1) -I- I/"y(k) hol/(k)
or,
y(k + 1) = I/oy(k) + h"u(k)
which has the transfer function relationship:
( 12671
y(z) = 1
boz-
J
+ 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
or,
y(k + 1) -I- I/"y(k) = hol/(k N)
( 12N))
Sec. 12.4 Introduction to Discrete-Time Models
y(k -I I) = -aoy(k) -I boll(k- N)
293
which has the transfer function relationship:
EXAMPLE 12.4 Linear Van de Vnssc Reador Model
( 12.70)
Consider a statc-space model from the isothermal chemical reactor module (specifically, the
Van de Vussc reaction);
A = 1- 2.404R
0.R3:n
II 1 7.00001
- 1.11 70
c ~ [0 I[
J) 1I
o 1
- 2.23Rl
For a sample lillle of 0.1 the discrete Slate-space model is (using (12.52)-( 12.54), or the MAT-
LAB c2d function):
(I) =-0
1'-
r
O.7R63 0 1
0.0661 0.7995
0.
6222
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
r
1
2
.
43
[4J
0.1164
Linear Systems Summary
0.6
Chap. 12
05
04
S 0.3
0.
S
o 0.2
0.1
o
continuous
o deIt := 0.1
__
0.1
o 2
time
3 4
FIGURI'; 12.3 Step respOllse of continous and dis<:rete (0.1::::; 0.1) models.
,old discrete input-output model is (using (12.59), or the MA"llJ\B funClion):
g( z)
0.1564z I
0.3513z
0.240Xz '
,. 0.1I307z
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
S
0.3
0.
S
0.2 0
0.1
0
-0.1
0 2
time
r-.. continuous
[OdeJt := 0.75
3 4
FIGURE 12.4 S1l'p response of continolls :md discrete (.::\.1::::; 0.75) models.
Sec, 12,5 Parameter Estimation of Systems
12.5 PARAMETER ESTIMATION OF DISCRETE LINEAR SYSTEMS
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
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 output
model:
y(k) (/,y(k -- 1) (/oy(k '2) + h, lI(k 1) 1 hO/(k 2)
Now, 1'01' the SystClll of N data points we call write:

(12.71 )
(IU2)
where,
l
Y(I).J . ['1'0)1.']
ellee 0
, ,
y(N) <p(N) ,
[
.. -", I
--: U
o
hi
b
o
( 12.73)
<p(k)J [y(k I) y(k 2) lI(k --I) u(k 2)1
'rhc solution to this problem is:
( 12.74)
(12. I';)
_.. .. ..
EXAMPLE 12.5 Parameter Estimation
A unit step input is made to a system at time t::;: 0 (k:;;:; 0). The sample lime is D.I:;;:; 0.75. The step
response data are shown below and plotted in figure (2.5.
k r(k)
o 0
I 0,1564
2 0.45l2
3 11,5513
4 0.5770
5 0.5830
296
0.6
0.5
0.4
'5
J3.
"
0.3
0
0.2
0
0.1
Linear Systems Summary
o
o
Chap. 12
2 3
sample time
o --------- J__~ ~ __'__ .L_
o 4 5
y
J.'( I) I
y(2)
y(3)
1'(4)
1'(5)
FIGUREl2.S Step response data (some as l'igurc 12.4).
r
O
.
15fJ4
1
0.4522
0.5513
0.5770
0.5830
The solution is:
y(O)
y(4)
y( 1)
y(3)
1/(0)
u(4)
1/(-1)]-
11(:)
o
O.15fJ4
0.4522
0.5513
IJ.5770
IJ
o
0.1564
0.4522
0.5513
:::,] [- ~ ~ ~ ~ ~
hi 0.1564
h
o
__ 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
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 for the User. Englewood Cliffs,
NJ: Prentice-Hall.
298 Linear Systems Summary
STUDENT EXERCISES
Chap. 12
1. Consider the following second-order boundary value problem:
J!x
4 dx
7
0
dz
2
+ +
4
x
.-
tlz
where:
x(z 0) = 2
x(z = 1)
Show that, by defining x I ::::; x and -1:2::::: dx/dz., the following equations arc obtained:
dx,/dz
cc
x
2
7
dx,/dz = ~ x, ~ 4x
2
.. 4
and that one of the intial conditions is:
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,,> o f x L ~ :::;: 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
let:
ac;\
iJl
C
A
C'AO
= dimensionless concentration
and:
define:
and:
y
'T -:::
p =
"
D
II
z
I,
D.,/{
I}
/),,/
k /,'
J),l7
= dimensionless axial distance
dimensionless time
Peclct Illllnber
--- Damkohler number
to show that:
ilC ilC
PI' +
ay
(1221
Student Exercises 299
and:
f"ind the dirncnsionlcss form of the Danckwerts boundary conditions at steady-state:
dC" (L) = 0
dz
u. Perform steadY-Slate calculations (analytically) using lhe Danekwerts boundary
conditions for:
i. P(':::;I, D
II
::;:;:; I, 10, 25 (compare on same plot)
ii. 1',.= IO,D
o
= I, 10,25, 100 (compare on samcplol)
iii. P
e
= 25, D(/ :::: I, 10,25, 100 (compare 011 same plot)
iv. 1',. = 100, Do = I, 10,25,100 (comparc on same plot)
3. Consider the following continuous state-space model:
1
-3.6237
A 0' . 0.8333
I.
5.50511
Ii=
-- 1.2660
C ..= [0 II
D = 0
o )
- 2.9588
a. Find the continuous transfer function model.
b. For a sample time of 0.25, find the discrete state-space and transfer function
models.
c. Compare the step responses of the continuous and discrete 11lOdcls. What do you
observe'!
4. Consider a unit step change made at k:::: 0, resulting in the output response shown in
the plot and table below.
1.2
o c.;---
o 0
o
o
o
o 0 0 0 o 0
o 0
0.8
'5
-50,6
0
0
0.4
0
02
0
0
0
o
_._.L _
20
------.-1- L
40 60
sample time
80 100
g(z) _
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- b
o
z---
2
- ({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
The major sections of this chapter arc:
(3.1 Background
13.2 Linear System Examples
13.3 Gcncralit,ation of Phase-Plane Behavior
13.4 Nonlinear Systems
303
304
13.1 BACKGROUND
Phase-Plane Analysis Chap. 13
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
plot. A phase-plane plot for a variable system consists of curvcs of OIlC-SUltC
variable versus thc state variable (xl(t) versus xi!)), where each curve is hased on a
fercnt initial condition. A phase-space plot can also be made for three-state variahks.
where each curve in 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.
13.2 LINEAR SYSTEM EXAMPLES
Nonlinear systems often have multiple steady-state solutions (sec Modules Xand 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
analysis of the particular steady-state solution (equilihriwIl point).
In this section \\le show tile different types of phase-plane behavior that can be
bibilCcl by linear systems. The phase-plane analysis approach will be shown by \vay (ll' a
number of examples.
EXAJ\ilPLE 13.1 A Stable Etll1ilihrilllll Point (Node Sink)
Consider the system of equations:
(I '.1)
( 11.2)
The reader should find lhat the solution [0 (13.1) and ( 13.2) is:
xl(r) = Xl" ('I
(13,4 )
i
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 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.
EXAMPLEI3.2 An Unstable Equilibrium Point (Saddle)
Consider the system of equations:
X,
-t
l
= 4 Xl
'fhe student should find that the solution to (13.S) and (13.6) is:
X
1
(1) = x
lo
e
l
xit) x
20
e"l
(13.5)
(13.6)
(13.7)
(13.8)
The 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 ~ x l l p k 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 J3,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
EXAMPLE 13.3 AnothcrSHddle Point Problem
Consider the following system of equations:
i
j
= 2x
1
+ x
2
i
1
= 2x
l
-X
2
Using standard state-space notation:
x= Ax
The Jacobian matrix is:
the eigenvalues are:
( 13.9)
(13.10)
(13.11 )
-1.5616
and the eigenvectors arc:
t
', ,0.27031
- 0.9628
1
0.
8719
1
0.4896
Since A] < 0, is a stable subspace; also, since 1..
2
> 0, is an unstable subspace. A plot of the
stable and unstable subspaces is shown in Figure 13.3. These eigenvectors also define the sepa
ratit:cs that determine the characteristic behavior of the state
Unstable Subspace
Stable Subspace
FIGlJRE 13.3 Stable and unstable subspaces for Example 13.3.
308
'file lime domain solution to (13.11) is:
X(I) e
A
' x(O)
which is often solved as (sec Chapter 5):
x(l) V e'\' V I x(O)
which yields the following solution for this system:
Phase-Plane Analysis Chap. 13
(JJ.12)
(13.13)
X(I I0.2703
) 0.9628
Ie LS(,I(,t
0.4896 0
011
0
.
5038
('2.561(;/ 0.9907
- o.
81J72
1
x(O)
0.2782
Recall that the solution 10 (13.[4), if.\'(O) "" so
if x(O)
I
0.2703 I
_ then
- 0.9628
(
I
0.2703 ]
xt)= ._ e
_- 0.9628
The phase-plane plot is shown in F'igure 13.4, where the separatrices clearly define the phasc-
plane behavior.
FIGURE 13.4 Phase-plane plot for Example 13.3,
Sec. 13.2 Linear System Examples 309
'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.
EXA1VIPLE 13.4 Focus (Spiral Source)
Consider the follO\ving system of equations:
XI =x
l
1 2 x.,
Using standard state-space notation:
x= A x
The Jacobian matrix is:
I
I

-- 2
( 13.15)
(13.16)
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.
FIGURE 13.5 Example l3.4, unstable focus (spiral source).
310 Phase-Plane Analysis Chap. 13
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.
EXAMPLE 13.5 Center
Consider the following system of equations:
--Xl X(
The Jacobian matrix is:
I
~ I
~
_ 4
(1117 )
iLUS)
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 h s e ~ l n e 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.
13.3 GENERALIZATION OF PHASEPLANE BEHAVIOR
We wish now to generalize our results for second-order linear systems of the form:
where the Jacohian matrix is:
I
{[II
A=
an
Recall that the eigenvalues arc found by solving det(A./- A) = 0:
del(A! - A) = (A - ",,)(A - aD) - {/" a
2l
CC
()
which can be \vrittcn as:
del(H-A) == A
2
-1r(A)A + del(A) ()
The quadratic formula call be used to find the eigenvalues:
A = Ir(A)+ V(lr(A' - 4 dellA)
2
or, expressing each eigenvalue separately,
(13.19)
( 13.20)
( 13.21)
( 13.22)
( 13.23)
and.
A, =
lr(A) - v(lr(A)2 - 4dcl(A)
2
tr(A) r \/(lr(A)2 - 4 dellA)
2
V./c notice that at least one eigenvalue will be negative if 'r(A) < O. We also notice that the
eigenvalues will be complex if 4 de-teA) > tr(A)2.Remcmbcr that the different behaviors
resulting from Al and A2 are:
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
Sinks (stable nodes):
Saddles (unstable):
Sources (unstable nodes):
Spirals:
Rc (A,) < 0 and Rc (A
2
) < ()
Rc (A,) < 0 and Rc (A2) > ()
Rc (A I) > 0 and Re (A
z
) > 0
Al and A2 arc complex complex conjugates. If Re(AI)
< 0 then stable, i r RC(A,) > () then unstable.
312 Phase-Plane Analysis Chap. 13
node
sink
de1(A)
saddle
spiral
source
Center
node
source
(tr At= 4 det A
FIGURE 13.7 DYllarnic behavior diagram for second-order linear systems,
Thcx<lxis is tr(A) and the y-axis is dd(A).
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
A
tr(A)
dct(A)
1
- I
()
-'i
c= 4
1
-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 behavior as a function of the eigenvalue loca-
tions in the complex plane. For example, two negative eigenvalues lead to stable node be-
havior.
13.3.1 Slope Marks for Vector Fields
A qualitative assessment of the behavior can be obtained by plotting the
slope marks for the vector field. Consider a general linear 2-statc system
Eigenvalues
1m
"" i .... 3table node
iRe
Phase-Plane Plot
1m
xi.... 3table fOCIJ3

FIGlJRE 13.8 Phase-plane behavior as a function of Eigenvalue location.
314
Eigenvalues
f ~ ~ unstab1JJ tocos
~
~
m
saddle
He
Phase-Plane Analysis
Phase-Plane Plot
Chap. 13
r
m
_
~
"
FIGURE 13.8 Continued
X
2
= all x I + an x
2
We call divide (13.25) by (/3.24) to find how x
2
changes with fCS]lcotto x,:
dX
2
a
21
Xl -I-
dx] al1xj+1l12X2
( /3.24)
( 13.25)
(/326)
LA
Sec. 13.3 Generalization of 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
dXj
2x,
2 Xl + x
2
( 13.27)
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
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.
13.3.2 Additional Discussion
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 If two
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
An autonomous (unforced) system with n stale variahles cannot have
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
13.4
FIGIJRE 13.10 Slope marks with trajectories for Exarnplc 13.3,
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.
NONLINEAR SYSTEMS
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.
EXAMI'LE13.6 Nonlinear (Bilinear) System
Consider the following system:
rtf
z,(z, + I) ( 13.28)
dZ
2
tit
(13.29)
Sec. 13.4 Nonlinear Systems 317
which has two steady-state (equilibrium) solutions:
F'rJllilihrillm I: trivial
Equilibrium 2: nontrivial
1.
2s
0
Linearizing (13.28) and (13.29), we find the following Jacobian matrix:
A
+ ]j
<-'1.1' ..
In the following, we i.lnaly/,c the stability of each equilibriulH point.
Equilibrium 1 (Trivial)
The Jacobian matrix is: A

and the eigenvalues arc: 11.
1
= -- v'3 11.) = \/3
We know from linear system analysis that equilibrium point one is a saddle poim, sillce one
eigenvalue is stable and the other is unstable.
The stable eigenvector is:
I
0.5j
.0.866 _
I
0.5 I
The unstable eigenvector is:
0.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
FIGlJH.E B.ll Phase-plane of the 13.6 model lillcarized around
trivial equibrium point. This point is a saddle point.
318
where x = z - z
,
Equilibrium 2 (Nontrivial)
x
1
0 11 x
3 0
Phase-Plane Analysis Chap. 13
'rhe Jacobian matrix is:
the eigenvalues arc:
-3
011
;1
0
AI 3 A2
So, we know from linear system analysis that equilibrium point [\\10 is a stable /lode, since both
eigenvalues arc stable.
The "fast" stable eigenvector is
The "slow" stahle eigenvector is
The phase-plane of the linearized model around cquilhrium point two is a stable node, as shown
in Figure 13.12.
FIGURE 13.12 Phase-plane of the EX<lmple U.6 nwdel linearizcd around
trivial cquibriulH poinL This point is a stable node.
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
FI(;lJRE 13.13 Phase-plane of 13.6. (except those of
the righl side of the saddle) leave the unstable point and arc "attracted" 10 the
stable point.

FIGURE 13.14 Slope-field marks and some trajectories for Example 13.6.
320
EXAMPLE n.? Biorcactol' 'with Monod Kinctks
Phase-Plane Analysis
... _ ~ ~
Chap. 13
D) x,
Consider a model for a bioreactor with MOllOd kinetics (sec rVIoduJe 8):
dx(
tit
03.3(1)
where:
(.'i - x,) IJ
JJ-m;nXI
k
m
+ ~ y
/-lX
1
Y
(13.31 )
(13 ..J2)
/-tIll:)X == 0.53
y ~ 11.4
k", == 0.12
4.11
X
j
is the biomass concentration and x2 is the substrate concentration. There arc (wo steady-state
(equilibrium) solutions for this set of pararneters.
J:quililniulII I: trivial
L'quilibriu/II 2: nontrivial 1.4523
Xl.> = 4.0
x
b
0.3692
Lineari/.ing (13.30) and (13.31) we find the following Jacohian matrix:
where we have defined I-l'
E()uilihrium t (Trivial)
The Jacobian matrix is:
/-L,\
X:!.\( kIll f x1.J
A ~ I 0.114563
- 1.286408
o I
-IIA
with eigenvalues of; ~ l = 0.114563 and A] == -0.4
indicating that the steady-state is unstable (it is a saddle point).
The unstahle eigenvector is: Sl
The stable eigenvector is:
I
0.3714]
. - 0.9285
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)
The Jacobian matrix is:
A 1

- 1
3.215929]
8.439832
with eigenvalues of 0.4 and
indicating 1hal the stcady-state is a stable node.
The "slow" stable eigenvector is
The "fast" stable eigenvector is
1
0.99241
- 0.11234
[.
.
3714
1
0.9285
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.
s
4.0
3.0
2.0
1.0
1.0
2.0
x
FIGURE 13.15 Phase--planc for bioreactor with Monnd kinetics. x is biomass
concentration and s is substrate concelltration.
ESCOLA Dc ENCEi'JHARIA
BIB L 10 'I L '"" 1\
322 Phase-Plane Analysis Chap. 13
0.0 ---------- ---------0.05
13.16 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
0.5
x,
0
-0.5
1
1.5
1 0
X
2
323
FIGURE 13.18 Example of center
behavior.
In the previous examples the system trajectories "left" an unstable point and were
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.
13.4.1 Limit Cycle Behavior
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
1.5
0.5
x,
o
0.5
-1
1.5 L- --'
1 0
x,
FIGlJRE 13.19 Example of limit
cycle behavior.
324 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, analysis is a useful tool for observing the behavior or
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 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 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 approach is limited to systems with two state variables.
Analogous procedures can be used to develop phase-space plots in three dimensions for
systcllls.Linearization and analysis of the locally linear behavior in terms of
eigcnvalues and eigenvectors can still be used for 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
the following linear systems, usc l'igurc 13.7 to determine the 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.
1. x

l
1
_ 2 x
Student Exercises
I ~
31 2. x x
-2
3. x
I ~
~ I X
4. x
I:
~ ] x
5. x=
1:
~ I X
-I
-2J
6.
x : : ~
1
-2 x
x [ -:
-.0.251 .
I ~
-0.
25
1
7. Compare
x with x ,,--
2 x
-2
1
-I
-OSI
8. x x
2 1
~ I
-I
_ ~ ] x
9. x
2
r;
0
":
10. x 2 o x
0 0
-3
r: ]
0 0
It.
x =:-
2
_ ~ x
0 0
325
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:
1 0
- 1.0 1
A
1.0 0.0 .
326 Phase-Plane Analysis Chap. 13
with initial conditions x,(O) 0.5 and x2(0) - 0.25.
3. What are the eigenvalues of the A matrix? Use bothMATLAB and your own an-
alytical solution.
b. Show a phase-plane plot, placing xl on the x-axis and x2 on the y-axis.
13. Consider a process with a state-space A (Jacobian) matrix that has the following
eigenvalues and eigenvectors. Draw the phase-plane plot, clearly showing the
tion of the trajectories. The eigenvalues arc:
and the eigenvectors are:
14. An interesting example of phase-plane behavior is presented in the book hy
gatz (1994). He develops a simple model for love affairs, using Romeo and Juliet to
illustrate the concepts. Consider the case where Romco is in love with Juliet, but
Juliet is fickle. The more that Romeo loves her, the more that Juliet resists his love.
When Romeo becomes discouraged and backs off, Juliet becomes more attracted to
him. Let:
J.:! = Romeo's love/hate for Juliet
x
2
= Juliet's love/hate for Romeo
where positive state variable values indicate love and negative values indicate hate.
The model for this relationship is:
'itl
cit = axz
dx
_____ f. = b x
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
a.
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.

::0; a x] + b x
2
ill
dx, b x
dl t
b.
e.
dx]

ill
dx')
4::o;bx-ax
dt 1 2
dx]
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
a. Show that the nontrivial steady-state values are:
h. Use the scaled variahles, YI and Y2'
=
Yt
Y
2 X
Z,
to find the scaled modeling equations:
328
dYI
"I
Phase-Plane Analysis

Chap. 13
dh
,11=
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
d. The parameters are (X :;::: ::::: 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.' ( I ) = ) X
"I '
where:
J-Lma\:
'-'-
0.53 k
m
0.12
y
0.4
Sf
4.0
k, 0.4545
and Xl is the biomass concentration and Xl is the substrate concentration.
Assumc- that the steady-slate dilution rate is D.
I
,::: 0.3,
a. J"ind the steady-state (equilibrium) solutiOllS (Hint: I'here arc three).
h. Analyze the stahility of each steady-state, l'ind the Jacohian, the eigenvaluc-s,
and the eigenvectors at each steady-state.
Student Exercises 329
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
dl
F
~ ( C i ~ C) ~ kC'
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}
F
The following modeling equations describe this system:
I
dh' . dl f,(h"h,,!'}
dh, = IMh' ,h,,Ii) I
dl
Phase-Plane Analysis
Perform a phase-plane analysis and discuss your results.
Chap_ 13
A cclOlt'
2
= 5 [(2
10
5
13 =
2 V6
ft25
13, c_ 2-5 _
mill
I-'or the following parameter values
[('
and the input F 5
111m
The steady-slale height values arc
hJs
330
INTRODUCTION TO 14
NONLINEAR DYNAMICS:
A CASE STUDY
OF THE QUADRATIC MAP
''['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 model is varied, the llUlnbcr and character of
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
14.5 Bifurcation and Orbit Diagrams
14.6 Stability of l'"ixed-Point Solutions
14.7 Cascade ofPeriod-Doublings
14.8 Purthcr Comments on Chaotic Behavior
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 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.
14.2 A SIMPLE POPULATION GROWTH MODEL
Assume that the population of a species during one time period is a functioll of the
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 )
wherc
Ilk

h
k
die.

population at the beginning of tilne period k
number of births during tinlc period k
number of deaths during time period k
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
which \ve call write as:
or, (l+r)II,
(14.4)
(14.5)
(14.6)
where r;::: (Yb eXd' Eqn. (14.6) call be simply written as:
Ilk I I = 0' fl
k
where ex ::::; I + r;::: I + ex/} - c"-r/ (obviously, 0' > 0 for a physical system)
The analytical solution to (14.7) is:
where /lois the initial condition.
1"1'0111 inspection of (14.8) we observe lhal
( 14.7)
( 148)
if (X < 1
if (X > I
if ex;::: I
The population decreases during each lime period (converging to 0).
The population increases during each time period (-----+ 00).
The population remains constant during each time period.
These results arc also shown in Figure 14.1
3
2.5
D
<D
2
<ii
0

c 1.5
0

"3
0-
0
0-
0.5
0
0
+
alpha 1.1
+
+
+
+
+
+
+
alpha 1 0
+
alpha
2 4 6 8 10
time step
FIGURE 14.1 Simple population growth model.
334 Introduction to Nonlinear Dynamics: A Case Study Chap. 14
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.
14.3 A MORE REALISTIC POPULATION MODEL
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:
X
k
, 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.
as we approach a steady-state (/Lred-poillt) solution, xk+l ::::: xk- so we can write:
X
s
0' .:r, - (X .Y./"
which can be written:
"X,' - (" - I) x, (J
We can use the quadratic formula to find the steady-state (fixed-point) solutions:
(14.11 )
(14.12)
(14.13)
u
x, 0 and
(y
1
(14.14)
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
TABLE 14.1 Parameters and Non
zero Solutions for Four Cases
Case
"
X
I
,-
I 2.95 0.6610
2 3.20 0.6875
3 3.50 0.7143
4 3.75 O.n33
335
behavior can be quite complex. Table 14.1 shows the (X parameter and the
non-zero that is expected from (14.14).
14.3.1 Transient Response Results for the Quadratic (Logistic) Map
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.
ASYMPTOTICALLY STABLE BEHAVIOR
Let Xo represent the initial condition (the value of the population at the initial time) and .tk
represent the population value at time step k. For case I we find the following values,
using the relationship xk+l := 2.95 -'-"k (1 - l"k):
Stepk x
k
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
Introduction to Nonlinear Dynamics: A Case Study
population model, alpha 2.95
50
Chap. 14
40 30 20 10
336
0.8
0.7
c
0
0.6

-S
0-
0
0.5
0-
m
m
"
0.4
C
0

c
"
0.3
E
'5
0.2
01
0
time step
FIGlJllE 14.2 crransicnt population response, easel; cOllverges to single
steady-state.
population model, alpha::: 3.2
0.8
0.7
c
0.6
0

-S
0-
0.5 0
0-
m
m
"
0.4
C
0

c
"
0.3
E
'5
0.2
0.1
0 10 20 30 40 50
time step
FIGURE 14.3 Transienlpopulation response, case 2; oscillates between (\\,0
values (pcriod-2 hehavior).
Sec. 14.3 A More Realistic Population Model 337
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. J0 J leads to a significantly different poinHo-poinl rc-
sponsc--this is known as sensitivity to initial conditions and is characteristic of chaotic
systems.
WHERE WE ARE HEADING
At this point, you arc probably wondering how to predict the type of behavior that thc
quadratic map is going to have. Changes in the (X parameter have led to many different
types of behavior. The purpose of Section J4.4 is to show how to predict the type of
haviorthat will he observed using cobweb diagrams. Section 14.5 will thcn introduce bi-
furcation plots, which reduce the long-term result.s from many transient plots to a single
plot. Section 14.6 introduces linear stability theory for discrete systems. Section 14.7
shows how to find the points.
population model, alpha == 3.5
0.9
0.8
co
0.7
0.

"5
0.6
0.
0.
0.
w
0.5
w
'" C
0.
0.4

co
'" E
0.3
'6
0.2
0.1
0 10 20
time step
30 40 50
FIGURE 14.4 Transient population responsc,case 3; oscillates between four
values (periodA belmvior).
338 Introduction to Nonlinear Dynamics: A Case Study
population model, alpha:o= 3.75
Chap. 14
0.8
c
0

"3
0.
0
0.6
0.
"'
"'
ill
C
0
iii
c
0.4
ill
E
'5
0.2
o
o 20 40
time step
60 80 100
FIf;LJRE 14.5 Transient population response, case 4; chaotic behavior,
population model, alpha:;;;: 3.75
1\
c
0.8
0
:g
"3
0.
0.6
0
0.
"'
"'
ill
C
0.4
0
iii
c
ill
E
0.2
'5
0
75 80
\ !
!
!
I
I
I
I
\1
I
I \
I
I
\
I
I
1/
,
\i
85
time step
90
\
!
\ I
\'
I
I
95
\
I
" "
100
FIGURE 14.(j Transient population response, case 4; chaotic behavior (Solid
Line-- -initial condition of Xo ;:;:: O. L Dashed Iinc----initial condition of X
o
::;0;
0.10 I). 'This illustrates the sensitivity to initial conditions.
Sec, 14.4
X
n
+1
1
Cobweb Diagrams 339
0,75
5
0,25
"'- -L --'- -' --' x
n
0,25 5 0,75 1
14.4 COBWEB DIAGRAMS
FIGlJRE 14.7 Cobweb diagram for
the quadratic map problem. The initial
point is -'0::;:;; 0.1.
Insight to the behavior of discrete systems can be obtained by constructing
cobweb diagrams. Cobweb diagrams are generated by plotting two curves: (i) g(x) versus
.r and (ii) x versus x; the solution (fixed-point) is at the intersection of the two curves. For
exampic, consider the case 1 parameter value of (y ::::: 2.95 and an initial guess, ):0 ::: 0, I,
The xlI+1 =g(x) = 2.95 .t
ll
(I -.1:) curve is shown as the inverted parabola in I<'igurc 14.7.
Since the X
o
value is 0.1, the x
J
value is obtained by first drawing a vertical line to the g(x)
X
n
+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
n
(x = 0.6(1); corresponds to the transient
o 0.25 0.5 0.75 1 response in Figure 14.2.
340 Introduction to Nonlinear Dynamics: A Case Study Chap. 14
i
i
0.75 0.5 0.25
FIGORE 14.9 Case 2 (LV:::: 3.20)
map, oscillates between x:::: 0.5130 'Illd
0.7995 after initial transient; initial
"- -'- -' '- -' x
n
condition ol'xo:::: 0.1- -corresponds to
1 the transient response in figure 14.3.
X
n
+l
I
0.5
0.75
025
curve to rind g(.r
o
) :::: 0.265, then drawing a horizontal line to the x :;:;; .r curve (since
xI :::; g(xo); therefore, -tt :::: 0.2(5). A vertical line is drawn to the g(x) curve lto obtain
g(x
t
):::: 0.575), then a horizontal line is drawn to the x:::: X curve (so, xl:::: 0.575), "fhcsc
initial steps arc shown in Figure 14.7.
l'igurc 14.8 shows that this process converges to the fixed-point of ~ :::: 0.661, for
the case 1 parameter value of 0' :::: 2.95. Figure 14.9 shows that the iterative process even-
tually "bounccs" between two solutions for the case 2 paramctcr value of a;:;;:; 3.2. This is
shown more dearly in Figure 14.10 where an initial guess of Xo = 0.5130 leads to solu
tions of 0.5130 and 0.7995 (pcrioet-2 behavior). Case 3 has pcriod-4 behavior. as shown in
Figurcs 14.11 and 14.12. Case 4 (Figure J4. J 3) is an example of chaotic behavior. where
the sequence of iterates never repeats.
)i
Xn +l
1
0.75
0.5
0.25
o "-----'-----'-----"'-----' x
n
o 0.25 0.5 0.75 1
FIGlJRE 14.10 Case 2 (0 ~ 3.201
map, oscillates het\Vccll x = 0..') l_lO and
0.7995; initial condition or X
o
= n.5130
(period-2 behavior).
0.5
0.75
025
FIGURE 14.11 Case 3 (n 3.50)
map, oscillates between x:;:;o 0.3828,
0,8269,0.5009, and 0.8750, The initial
condition is xo:;: 0.1. This COITcsponds
o "'- -"- -'. '-- -' x
n
to the transient response in Figure 14.4
o 0.25 0.5 0.75 1 (pcriod-4 behavior),
Xn+l
I
X
n
+l
I
0.75
05
0.5
0.25
FIGURE 14.12 Case 3(n 3.50)
map, oscillates between 0.3828,
0.8269,0.5009, and 0.8750, initial
o "'- -'- -' '--__--' x
n
condition of X
o
:;: 0.3828 (period-4
o 0 _25 0.5 0.75 1 behavior).
FIGURE 14.13 Case 4 (" 3.75)
o ...L -' .L.. .J x
n
l.nap, chaotic behavior; corresponds to
o 0.25 0.5 0.75 1 the transient response in Figure 14.5.
0.25
0.75
341
ESCOLA D2 tNGENHARIA
IJIt3L10Tt:CA
342 Introduction to Nonlinear Dynamics: A Case Study Chap. 14
14.5 BIFURCATION AND ORBIT DIAGRAMS
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 or a system, so for a single (Y
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).
14.5.1 Observations from the Orbit Diagram (Figure 14.14)
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
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
4 3.8 3.6 3 4
U.
3.2 3

1----.
' .....--.......--.......

---------./

0 9
o. 8
0 .7
o. 6
x 0 .5
0 .4
o. 3
0.2
o.
0
2 9
FIGURE 14.14 Orbit diagram for the quadratic map. 0' is the bifurcation parametcl".
Sec. 14.5
C
0.
'fg
S
0.
0.
0.
if>
if>
ill
C
g
if>
C
ill
E
i3
Bifurcation and Orbit Diagrams
populatfon model, alpha ;:= 3.83
343
0.1
o 20 40
time step
60 80 100
FIGURE 14.15 Period-3 behavior (after inllial transient) for Ci. =0 3.83, initial
condition;;:;; 0.1. Periodic values are x;:;;: 0.15615,0.50466, and 0.957417.
!I
\'
+ i' t t
t
+
1\
'I
I,
,"
I
Ii
I
/
I' '\
c
0.8
I
I
0.
I
I \ I I

\ I
I
I
I
/
I
S
I
I
I
0. f
\
I
0.
I
I /
0.
0.6
if> I
\
I
I
I
I
+
,
+
if>
i
I
+
'"
+
\ ,
+
ill
\
C /
/
/ / \
/
/
0.
0.4
I
I
I
I
\
I
I
\
I
ijj
I
I
I I
C I
\ I
I
\
I
I
ill I
I
I
I
I
I
E
/
\ /
I
I
" \ /
\ /
/
\f \/ " I
i3
'I
Y
/
"/
I'
0.2
"
I
t
+ + + +
4-
0
75 80 85 90 95 100
time step
FIGlJRE 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
X
n
+l
1
0.75
05
0.25
o &L__--' -'- -'-__---' X
n
o 0.25 05 0.75 1
FIGURE 14.17 Pcriod-J bclwvior at
(X 0;:: 3.83. Values arc x:;:::; 0.156\ S.
0.50466. and 0.957417.
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.
14.6 STABILITY OF FIXEDPOINT SOLUTIONS
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.
Theorem
I
ilg I
.:r* is a stable solution of x* :;::: g(x*), if _ < ~
dx
1 whcn evaluatcd at ).:* .
14.6.1 Application of the Stability Theorem to the Quadratic Map
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
So,
Stability of Fixed,Point Solutions
iJg
.=<-2,xx=<(1 2x)
dx
345
For simplicity in notation, we will usc g' to represent i)g/(Jx. at x*, we have:
g'(x*) = <Y - 2exx* = ev (1 2x*) (14.16)
Therefore, from (14.16) and the stability theorem, if the following condition is satisfied:
I,x (1 2x*) I < I ( 14.17)
Theil'. x* is a stable solution.
Remember from (J 4.14) that there arc two solutions to x* :::: tx*(l-.-t*):
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:
Ig'(x) 11 < (I - 2x*) I 2.95 > I
which indicates that the fixed point is unstable.
At the other fixed point solution, x*:::: 0' - I/O':::: 2.95 - 112.95 = 0.6610, we find:
Ig'(x*)1 = I<Y (1 - 2x*)I12.95 (I - 2(0.6610 1= 1-0.9499 I
= 0.9499 < 1
\vhich assures that the second fixed-point is stable.
1;'01' 0' := 2.95, we expect the numerical solution to converge to the stable fixed point,
x*:= 0.6610, since the olher fixed point (x*;:;;;; 0) is unstable.
The stability results for cases I through 4 are compared in Table 142. Notice thaI
case I is the only one of the four cases where lhere exists a stable solution. The reader
. should verify that an initial guess ofx arbitrarily close to zero (but not exactly 0), will not
converge to zero for any of the four cases.
TAIlLE 14.2 Stability Results for Cases 1-4
Case (Y
r"' Ig'(x*) I condition Ig'(x*) I conclition

2.95 0 2.95 unstable 0.6610 0.9499 stable
2 l.20 0 3.20 unstable 0.6875 1.2000 unstable
3 3.50 0 3.50 unstable 0.7143 1.5000 unstable
4 3.75 0 3.75 unstable
0.73"
1.7500 unstable
346 Introduction to Nonlinear Dynamics: A Case Study Chap. 14
14.6.2 Generalization of the Stability Results for the Quadratic Map
Notice thai we have been quite limited in our study, since we have only considered four
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*
At the risk of complicating our notation, let
and
(X-
xI =
lX
Our goal is to determine how the stability of 01 .'.:;" changes as a function of 0',
STABILITY OF x'o AS A FUNCTION OF lY
Since 0 and g'(xfj) =(X - 2nO ::::: (X
then Ig' Iex I
Also, since III < 1 is required for stability, then is a stable solution only as long
as -1 < 0' < J. Otherwise, x('; is unstable (rccalIthal Ci < 0 docs not make physical sense).
STABILITY OF AS A FUNCTION OF lX

then Ig' (x'DI , I-c, + zi
which indicates stability for I < (X < 3. Otherwise, x1' is unstable.
These results arc shown on the bifurcation diagram of Figure 14.18 for 0 < (X < 4.
Generally, solid lines will be Llsed to represent stable solutions and dolled lines will be
used to represent unstable solutions. As discussed above, a change of stability for x;j oc-
curs at 0' ::::;: I. Also, changes of stability for x't occur at 0' ;:::: I and (Y :::: 3. The values of 0'
where the stability characteristics change arc known as bifurcation points. The bifurcation
that occurs at 0' = 1 is commonly known as a ';lranscritical" bifurcation (sec Chap-
ter 15)-an exchange of slability between the two solutions has occurcd.
Notice that Figure 14.18 is a h(fl-lrcatioll diaRrarn based on a linear stability analy-
sis. It differs frol11 an orhit diagram (sllch as Figure 14.14), because it docs not show the
periodic behavior obtained from solving the nonlinear algebraic equation for the
tion growth model. An orbit diagram cannot disp(ayullstable solutions, however.
14.6.3 The Stability Theorem and Qualitative Behavior
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
Sec. 14.6 Stability of Fixed-Point Solutions 347
bifurcation diagram

.. ..
X
o
X
o
1---------------------------------
stable 1 UIlBtable
I
f
I
I
I
I UIlBtable
I ..
IXI
I
I
0.5
x 0
-0.5
..
"I
stable
---
...-------
UIlBtable
4 3.5 3

o 0.5 1 1.5 2 2.5
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
unstable oscillatory
- 1 <
Dg
<.:
0 stable oscillatory
ax
0<
ilf;
I stable monotonic <
a.r
> I unstable monotonic
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
14.7 CASCADE OF PERIOD-DOUBLINGS
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
using the notation
( 14.19)
then
(14.20)
(14.2 I)
(14.22)
Warning: Do not confuse the g2(r
k
) notation with that or the square of the operator Ig(x
k
) ]2.
r:or the quadratic map, we call develop the relationship shown in (14.22):
X
k
+
2
= aX
kl1
(1 ~ x k \ l
and substituting xk-tl := a X"k (I ~ J ~ k into (14.23), we find:
Since (from 14.19):
we can write (14.24) as
(14.23)
(14.24)
( 1425)
Sec. 14.7 Cascade of Period-Doublings 349
Expanding (14.25),
or
g'(x,) ~ a' [---a x/ + 2ux", - (1 + u)x,' + x,l
( 14.26)
(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 ;:0;; 3.2).
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 s n ~
gle stable solution of X ::::;; 0.6610. This makes sense, because as k -) 00, we know that
x
k
:::: 0.6610; this Illeans that xk+2 -= x
k
+
1
-= :r
k
::::: 0.6610.
We can sec fromF'igure 14.22 that n ;;;;; 3.0 is a bifurcation point, since absolute val-
ues of the slope of g(x) and g2(J::) ::::: I at x::::: 0.66667. Figure 14.22 is clearly a transition
point between l<'igurc 14.21 and Figure 14.20.
1 ,
/.
08! (' A /f\
,"" I ~ j1"..," \
~ 0.4' I / /Vi unstable \
I
./ stable \ !
. I ~ I I
X / i'
0.2;J / Ii
il ~ unstable \!
i /v Ii
oV
o 02 OA OB DB
x
VlGlJRE 14.19 Plo! of g(K(X))
versus.r 10 find the period-2 values for
0';::;: 3.2.
350 Introduction to Nonlinear Dynamics: A Case Study Chap, 14
FIGURE 14.20 Plots of g(x) and
gl(x) versus.x for (t "" J.2.
0,8
"
0,6
CT
'"
"
"
0.4
0;
>{
02

02 0.4 0,6 0,8


x
0,8
"
0,6
CT
'"
"
"
0.4
0;
>{
02
0.4 0,6
x
OB
FIGtJRE 14.21 Plots of g(x) and
g(g(x versus x for 0:;;;:; 2.95. No
pcriod-2 behavIor.
Sec. 14.7 Cascade of Period-Doublings 351
0.8
FIGURE 14.22 Plot of g(x) aod g'(x)
ven,lIs x for n "'" 3.0.
s:
0.6
'&
0
"
0.4
0;
"
0.2
0
0 0.2 0.4 0.6 0.8
x
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
= x
k
(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
))))
. _ '( )
Xk-I-4 -- g x
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).
Chap. 14
,
"
'\ :: .,
.,
\
.,
, ,
:'
\ : I
\. \
.. ,
.;, \
."

V\
0.8
0.8
______ ___L._
0.6
0.6
x
x

-g(x)
..9'(x)
._-- 9"(x)
u
s
u
s
alpha = 3.5
u
alpha:= 3.5
s
0.4
0.4
0.2
0.2
Introduction to Nonlinear Dynamics: A Case Study
FIGURE 14.24 Plot.s of R(X), !,:lex) and ,t,JA-(x) versus x for 0::: 3.5.
FIGURE 14.23 Plots of g4(x) versus x to find the pcriod-4 values for Ci "" 3.5.
0.8
0.6
-;;-
;,-
'"
0,4
0.2
u
0
0
0.2
0.8
-;;-
t;
C5 0.6
:s
'0,

'"
352
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
v ~ ""(.",.)
Ak -lll () ./i
(14.31 )
( 14.32)
Note that gll(X
k
) will he a polynomial that is order 2n, and there will be 2n solutions, n of
which arc stable.
14.7.4 Feigenbaum's Number
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
e
32 (2
5
) and pcriod-M (2
6
)
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
lim
-" Ct
'1 ~ 4.669196223
C'ii+ [ - O:i
( 14.33)
3.56R759 ~ 3.5044IJ7
~ 4.6045
3.569692 ~ 3.56R759
which is close to 4.6692
A summary of thc bifurcation points is providcd in 'fablc 14.3.
Chaos occurs when the pcriodis 00 (state sequcnce never repcated) at 0' ::::: 3.56995.
TABLE 14.3 Values of \ ~ at Bifurcation Points
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
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:
Chap. 14 Introduction to Nonlinear Dynamics: A Case Study 354
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
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 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
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.
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
when llsing J/umerical methods.'
FURTHER COMMENTS ON CHAOTiC BEHAVIOR
References and Further Reading 355
We noticed that a discrete population growth model is represented by the quadratic
map problem. This population growth lnodel is a simple example of a discrete dy-
n,<lmic system, which was modeled by a nonlinear algebraic equation. In the future,
we will be studying continuous dynamic systems, that is, systeills that arc modeled
by ordinary differential equations (ODEs). It turns out that nonlinear OI)Es can
have dynamic properties that are similar to the discrete population tllodel.For ex-
ample, exothermic chemical reactors can exhibit bifurcation behavior and continu-
ous oscillations in temperature and composition. One lnain difference is that a sys-
tem modeled by a set of autonomous must have at least three equations
before chaotic behavior occurs. Chaotic behavior can occur in a discrete lnode! with
only one equation.
REFERENCES AND FURTHER READING
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:
Glcick, J. (1987). Chaos: MakinR a lYeH' .')'ciencc. New York: Viking.
Lorenz is given credit for the discovery of "sensitivity to initial conditions":
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.
TufiUaro, N.B., T. Abbott, & J. ReiJly. (1992). An I,,);pcrimefltal Approach to NO/l-
linear DYllarnics and Chaos. Redwood City, CA: Addison-Wesley.
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):
356 Introduction to Nonlinear Dynamics: A Case Study Chap. 14
The book by Strogatz is an excellent introduction to nonlinear dyiHunics:
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 s t c d y ~ s t t c 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 a cobwcb di<-:tgram for this SYStCllL
10. Consider the nonlinear algebraic equation,f(x)::: -x
2
- x + I ::: O. Usillg Newton's
method,
write the iteration sequence in the form of:
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 ::: ::: 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
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
Z
H
4
, and C,H(,(J).
358 Introduction to Nonlinear Dynamics: A Case Study
APPENDIX: MATLAB M-FILES USED
IN THIS MODULE
function rtime,x] ~ pmod(alpha,xinit,n)
% population model (quadratic map), prnod.m
% 29 August 1993 (e) B.W Bequette
% revised 20 Dec 96
% input data:
% alpha: growth parameter (between 0 and 4)
% n: nUlnber of time steps
% xinit: initial population (between 0 and 1)
%
Chap. 14
clear x; clear k; clear time;
x(l) ~ xinit:
time (1) ~ 0:
for k ~ 2:n+1;
time(k) ~ k-1:
x(k) ~ a1pha*x(k-1)*11-x(k-1)):
end
% run this file by entering the following in the command
window
% [time/x] ~ pmod(alpha,xinit,D);
% with proper values for alpha, xinit and n
% then enter the following
% plotltime,x)
function [x,g,g2,g3,g4j ~ gn_qmapla1pha):
%
% finds g(x), g"2(x), gA3(x) and g"4Ix) functions for
% the quadratic map problem
%
% Ie) B.W. Bequette
% 23 july 93
% modified 12 Aug 93
% revised 20 Dec 96
%
%
x
g
zeros (201, 1):
x: g2 ~ x: g3 x: g4 x:
for i ~ : 2 :
xli) ~ (i-1) *0.005:
gli) ~ a1pha*x(i)*(1-x(i)):
g2li) ~ a1pha*gli)*11-g(i)):
Student Exercises
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, ~ I x g 4 '_, ')
359
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
DClcnnine the bifurcation }Joint for a single ODE
Determine the stability of each branch of a bifurcation diagram
Determine the numher of s t c d y ~ s t t c solutions near a bifurcation point
'fhcmajor sections in this chapter afC:
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 s t c d y ~ s t t c s 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
15.2
In this chapter we introduce bifurcation behavior of systems. A
steady-stale bifurcation occurs if the number of steady-state solutions changes as a system
parameter is changed. If the qualitative (stable ys. unstable) behavior of a system changes
as a function of a parameter, we also refer to this as bifurcation behavior. This chapter
deals with systems modeled by a single ordinary differential equation.
Bifurcation analysis is particularly important for complex systems such as chemical
and biochemical reactors. Allhough only single variable examples arc used in this
ule, the same types of bifurcation behavior afC also observed in chemical and biochemical
reactors.
ILLUSTRATION OF BIFURCATION BEHAVIOR
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.
f(x.[L) = [Lx - x' = 0
The solution can be obtained by plotting the function and finding the valucs of or
where fCql,) :;;:: O. A plot of this function for fL :;;:; I, 0 and J is shown in Figure 15.1
below. We sec that the number of real solutions (f(.q..L) :;;:; 0) for fL =-I is one, while the
number of real solutions for f.L = 1 is three. The curve for fL :;;:: 0 is a transition between the
two cases. We say that: f.L = 0 is a bifurcation point for this system, because the number of
real solutions changes from one to three at this point.
We will see in the next section that this behavior is characteristic of a pitchfork
furcation. We will also fino that the number of solutions is always three for this problcln;
somctimes two of the solutions are complex, and other timcs thc solutions arc all thc samc
value.
x
FIGURE 15.1 Polynomial behavior as a function of /L.
ESCOLA Dc ENGENHARIA
GIBLIOrLCA
362 Bifurcation Behavior of Single ODE Systems Chap. 15
15.3 TYPES OF BIFURCATIONS
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)
A bifurcation point is where the both the function and its first derivative are zero:
iJf
I(X,fL) = = ()
. iJx
( 15.2)
(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. (15.2) has k solutions, if the following criteria arc satisfied:
and
f(X,fL) = ()
af ... a'f
()x - ax?
(15.4)
( 15.5)
In Example 15.1 this method is applied to a system thaI exhibits a pitchfork bifurcation.
EXAl\lPLE 15.1 Pitchfork BiflHTation
Consider the single variable system shown previously ill Section 15.2.
x f(X,fL) fLx- x-'
The equilibrium point is:
the solutions 0 are
-r,,() = 0
x,.j =
x,<! =
(15.6)
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.
3 x?: -1 /J." I-l
c
lIllstahlc
\1fJ'
-:1 r
2
- . e
- VfL
-3 -+- IL,.
.J I-l" -+- ~
2 I-l" - stable
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):
!(X"fL,.) 1.L;x,. x',:
-
0
{lnd
iJ/1 j -I
0
ax \,.l'
1.L"
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
a x } ~ , l ~
(, I ()
This analysis indicates that the mnnber of solutions is three in the vicinity of the bifurcation
point (sec (15.4) and (15.5)),
x
stable
x ~ /.5
A~ -21'
x ~ 0
-----+------------------ ---- -- -- ---- --- --- ------ -- - I'
A ~ I' unstable A= I'
stable
FIGlJRE 15.2 Pitchfork Bifurcation Diagram---Example 15.1.
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-__ __ __...,
-2
o 2 3 4 5
time
15.3.1 Dynamic Responses
FIGURE 15.3 Transient response for
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 J0--
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
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< + x
3
0.5
x 0
-0.5
-I
-1.5
0
Example 1 J' = I
"0 = 0.Q1
1
i
"0 = - 0.01
2 6 8
time
10
FIGlJRJ1: 15.4 Transient response for
Example 15.1, IJ. =: l. The final steady-
state reached depends ()n the initial
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
rou
1.5 2
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).
4
2
0
2
4
u;;:: 1
rou
6 o
EXAMPLE 15.2 Saddle-Node Bifurcation (Turning Point)
Consider the single variable system:
The equilibrium point is:
The two solutions are:
XI'! = \/;J:
x,,): = -- YJJ.
The Jacobian (and eigenvalue) is:
The bifurcation conditions, (15.4) and (15.5), are satisfied for:
IJ.,. = x" = 0
( 15,7)
Sec. 15.3 Types of Bifurcations 367
The second derivative is:
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
FIGURE 15.5 Saddle-node bifurcation diagram, Example 15.2.
X= J l O ~
> - 2 0.5
,,-- Jl
uns1l>.ble
.1l>.ble
,
Jl = a
which is unstable.
x
L,
The bifurcation diagram (saddle-node) is shown in Figure 15.5.
368 Bifurcation Behavior of Single ODE Systems Chap. 15
Notice that there are actually two steady-state solutions for .:r
e
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 .r
o
> -1 converge to a steady-slate of x;;;; I, \vhilc
.:ro < approach x = It should he noted that a consistent physical (or chemit:al)
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 X
o
< -I "blows up",
EXAIVIl']"E 15.3 Transcritical Bifurcation
Consider the single variable system:
.r !(x,p.) p.x - x'
The equilibrium point is:
The solutions arc
The Jacobian is
( loY)
The eigenvalue is also
A jJ.-2x,.
The bifurcation point is !(x, ..... ) = df/dx = 0, which occurs at fJ, = x
e
= O. The second derivative 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-.
a. One solution is:
with an eigenvalue:
A = fl. - 2 x,. fl.,
which is stable (since IJ-" is negative).
b. This equilibrium solution is:
which has the eigenvalue:
A = IJ- - 2x" = J...l
e
- 2IJ-e = -2!J..
e
which is unstable (since I-t
e
is negative).
II. jJ. > 0
a. One solution is
which has the eigenvalue:
which is unstable.
b. Another solution is:
which has the eigenvalue
A = JJ.. - 2 x" = fJ.,. - 2 IJ-"
which is stable.
-2 }L"
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
x
L,
x= j!,
,\ =-j!,
stable
x=o x=o
UIl.'ltable
,\=j!,
stable
----------of------------------
,\=j!,
,\ =-j!,
UIl.'ltable
FIGIJRE 15.7 Transcritical bifurcation, Example 15.3.
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
i
"0=- 0.99
1
-0.5
-1
X
-1.5
-2
-2.5
-3
0
"0 = - 1.01
2 6 8 10
time
Flf;(JRE 15.8 Transient response for Example 15.3, J.-L
importance of initial conditions.
---I. Notice the
371
time
-1
Types of Bifurcations
FIGUH.E 15.9 Transient response for Example 15.3, fJ. ;:;;; 1. Notice the im-
portance of initial conditions.
Sec. 15.3
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.
EXAMPLE 15.4 Hysteresis Behavior
Consider the system:
( 15.9)
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
I. fJ-;:;;; -1. The equilibrium point (steady-state solution) is:
!(X,. fL) ~ 0 ~ II - x,. - x,: (15.10)
The steady-state input-output diagram, obtained by solving (15.10) is shown in Figure 15.10.
This curve is generated easily by first generating an x" vector, then solving If = xl' ,I x ~
The stability of each point is found from:
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
,pie 3. )l = 1
01
Chap. 15
time
6 8 10
FIGURE 15.10 InpllHJUtput diagram 1\,[ Example 15.41\",, =-1.
II. IJ-;:;;; 1. The equilibrium point (steady-state solution) is:
f(X,,,ll) ~ 0 ~ II + x, - x; (15.11)
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:
The eigenvalue is thcn A = 1 - 3 x;. For the three solutions, we find:
XI';:;;; "-I,
XC = 0,
x,,= 1,
A= 1-3=-2
A=I
A= 1-3=-2
which is stable.
which is unstable.
which is stable.
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' = ~ + x;. See student exercise 2).
Sec. 15.3
2
Types of Bifurcations
mu 1
---- ---,. r----------T---- - --------.------- .. - ----,----- .. - .... -.-----.--------
373
'" O
\
\
-1
/

-2

-4 -3 -2 -1 0 2 3 4
u
15. t I Input-output diagram for Example 15.4 with l-t 0= r.
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)
'fhe bifuf(.:atioll points arc theu:
1
3
or, x" = :!.::
(15.13)
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 values of lie ::::; 2/3\1\ as
shown in Figure 15.10. 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 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 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.'::::: (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):
af
f(x,l") 0 .) ..
<X
and
a'f
iJ.t
j
*0
The equations are:
fJ.

0
-6
*
0
It is easy to show that, for a value of Ii :::: 0, the bifurcation conditions are satisfied at:
x" = /L" = 0
The stcitdy-statc input-output curve for thi.<; situation is found by solving:
which yields the plot in Figure 15 12, which is clearly a transition between Figures 15.10
and 15.1 L
A 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
" 0
-1
Types of Bifurcations
mu= 0

375
FIGURE 15.12 Input-output diagram for Example 15.4.
of /L we observe monotonic input-output behavior, with a transition to multiplicity (hysteresis)
behavior at JL :::: O.
The turning points in Figure 15.13 can be projected to the /J--Il plane to find the bifurca-
tion diagram shown in Figure 15.14. A saddle-node (turning point) bifurcation occurs all along
the boundary of the regions, except at the "cusp point" (J.L:::: 0, u:::: 0), where a codimcnsion-2 bi-
furcation occurs. The term "codimensioll-2" that two (/J-,u) are varied to
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
FIGURE 15.14 (f.-l,1I) bifurcation diagram for Example 15.4.
0.5

a
0.5
-1
-1.5
-1 -0.5 a 0.5
mu
three fixed-points
1.5 2
I
SUMMARY
We have studied the bifurcation behavior of some example single nonlinear ordinary
ferential equations of the form.i: c= f(x,f.l), where x is the state variable ancl f.l is the bil'llr-
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,
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 algebraic equation (in a single stale
variable). This can he done for many simple chemical and hiochemical reactor problems.
REFERENCES AND FURTHER READING
The following texts provide nice introductions to bifurcation behavior:
Hale, J.K., & H. Kocak. (1991). Dynamics and BUitrca{;o/ls. New York:
Verlag.
Student Exercises 377
Jackson, E.A. (1991). Perspectives Nonlinear Dynamics. Cambridge, UK: Cam-
bridge University Press.
Strogatz, S.H. (1994). Nonlinear Dynmnics and Chaos. Reading, MA: AddisoIl-
Wesley.
STUDENT EXERCISES
1. r'or the system in Exmnple 15.4:
x f(X,fL) II + [LX - x'
with II ::::: 0 and fL = I, perform transient response simulations (using MATLAR) to
show that the final steady-state obtained depends on the initial condition.
2. For the system in Example 15.4, we found that there are ranges of u where there are
three equilibrium solutions for x (when fL =1). When solving for the roots of a
cubic polynomial, either a complex analytical solution (see any math handbook) or
a root solving routine (such as the MATLAR routine roots) must be used, Show
how .t' can be considered the independent variable and u the dependent variable to
obtain an easier analysis of this problem. Then, simply plot x versus u.
3. For the system in Example 15.4:
x f(X,fL) II + [LX - x'
with fL ::::: 1, show that the bifurcation conditions are satisfied at the
"turning points."
4. Consider the constant harvesting model of population growth (Hale & Kocak, 1991):
.r f(x,k,c,h) k x - C x
2
- h
where all of the parameters are positive. h is the rate of harvesting, while k and care
intrinsic growth rate parameters,
The problcm is, for fixed k and c, to determine the effect of the harvesting on
the population. Since the population density cannot be negative, we are interested in
solutions where x 2:: O. For a positive initial population density (xo) the population is
exterminated if therc is a finite value of t such that x::::: O. Without finding explicit
solutions of the differential equation, show the following:
a. If h satisfies 0 < h <; k
2
/4c, then there is a threshold value of the initial size of the
population such that if the initial size is below the threshold value, then the pop-
ulation is exterminated, If the initial size is above the threshold value, then the
population approaches an equilibrium (steady-state) point.
b. If h satisfies h > k
2
!4c, then the population is exterminated regardless of its ini-
tial size,
c. Comment on the physical ramifications of palis a and b. Should models be used
by State Fish and Game authorities to determine proper hunting and fishing
its?
378 Bifurcation Behavior of Single ODE Systems Chap. 15
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.
.< = f(X,fL) = fLx + x'
2
o
-1
,
,
~
-2
2 1.5 -1 -0.5 o
mu
0.5 1.5 2
6. Consider the system shown in Example J5.4:
x= f(X,fL) = II + [LX - x
J
Develop the cusp bifurcation diagram shown below. Find the values of if and /L on
the boundaries between the one and three fixed-point solution behavior.
.5
0.5
" 0
-0.5
one fixed-point
three fixed-points
-1.5
1 -0.5 o 0.5
mu
1.5 2
. ~ ~ ~ _ ._-. >r,__lIIIblllll.
For a value of u :::: 1, develop the steady-state bifurcation diagram shown below.
Find the values of x and jJ. where the saddle-node (turning point) bifurcation occurs.
Notice that this is a perturbation of a pitchfork bifurcation. This type of behavior
can occur, for example, in exothermic chemical reactors when the feed llowrate is
varied whilc maintaining a constant jacket temperature (a so-ca.lled isola forms).
Student Exercises
7. C\)llsiderthe systcm shown in Example 15.4:
"" f(X,fL,U) U + fU - x'
379
mu
APPENDIX
4
2
0
-2
-4
4 -2 0
h cusp diagram
% b.w. bcqucLtc
'I. dec 96
90 the problem
'f; f(x,u,mu) ::;: u + mu"'x x"3 0
" with x varying between -2 and 2
'1 mu varying from -2 to 2 and
'!, whatever u' s t
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
u ::;: 1
2 4 6 8 10
380 Bifurcation Behavior of Single ODE Systems Chap. 15
mu
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
'1'he major sections in this chapter are:
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
In Chapter 15 we presented the bifurcation behavior of single-state systems. 'A'e found
that a number of interesting bifurcation phenomena could occur in these systems, includ-
ing transcritical, pitchfork, and saddle-node bifurcations. We find in this chapter that these
381
382 Bifurcation Behavior of Two-State Systems Chap. 16
types of bifurcations can also occur in 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.
16.2 SINGLEDIMENSIONAL BIFURCATIONS IN THE PHASEPLANE
Consider the two-variable system (notice that the two equations are decoupled):
XI = f,(X,fL) = fLXI - xi
x, = f2(X,fL) = -x,
The equilibrium (steady-state or solution is:
f(X,fL) = =
There are three solutions to f(x,f,t) ::::: O. The trivial solution is:
and the two nontrivial solutions arc:
(16.1 )
(16.2)
XI' =
and
Xc = = [ -
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"
A
2
= -I
Since the second eigenvalue is always stable, the stability of each equilibrium point is
termincd by the first eigenvalue. Here we consider three cases, fJ, < 0, f.L:::::: 0, and fJ, > o.
Sec. 16.2 Bifurcations in the 383
J.L<O
The only equilibrium solution is the trivial solution (xli'::::: 0), so:
Al = /-L - 3x1e = f.L
which is stable, since J.L < O.
II J.L =0
The equilibrium solution is x
k
::::: 0, so:
= 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.
III J.L > 0
The eigenvalue for the trivial solution (xl
e
::::: 0):
is unstable since p.. > O.
The eigenvalues for the nontrivial solutions (\Iii) are:
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, = [:;;] = [ - with = = [ = stable node
x =
,.
I
x"1 IOJ1 [J.L] . x" = 0 WIt 1 = _I, = saddle pomt
I
X".j I' -2J.L1
., = WIth A = ,= _ = stable node
x
2
,< 0 I
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
mu= --1 mu= 1
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,
16.3 LIMIT CYCLE BEHAVIOR
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
x,
FIGURE 16.2 Example of center be-
havior.
Sec. 16.3 Limit Cycle Behavior
0.5
x,
0
-0.5
-1
-1.5
1 0
x,
FIGURE 16.3 Example of limit
cycle behavior.
385
(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.
EXAMPLE 16.1 A Stable Limit Cycle
Consider the following system of equations, based on polar coordinates:
j. ~ ,. (I - ,.')
II ~
(16.3)
(16.4)
Notice that these equations are decoupled, that is, the value of ret) is not required to find OCt) and
vlee versa. The second equation indicates that the angle is constantly decreasing. The stability of
this system is then determined frotH an analysis of the first equation.
The steady-state solution of the first equation yields two possible values for r. The trivial
solution is r;o;; () and the nontrivial solution is r"'" 1.
The Jacobian of the first equation is:
of
ar
I - 3 r'
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 ;0;; r cos 0, x2 "'" r sin 0). The phase-plane behavior is
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
1.5
Chap. 16
0.5
-1
o 10 20
time
30 40
1.5
0.5
.;;: 0
-0.5
1
FIGVRl\ 16.4 Stable limit cycle behavior (Example 16.1).
X,
F1GUH.E 1().5 Stahle limit cycle
behavior (Exi1mpleI6.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.
EXAMPLE 16.2 An Unstable Limit C)'cle
Consider the following system of equations, based on cylindrical coordinates
r
(j
r(l-r')
I
(16.5)
(16.6)
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
1.5
387
0.5
-0.5
-1
................
...-
/
l
---.. ....
-1.5
-1 o
x,
FIGURE 16.6 for all unstable limit cycle.
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
()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 behavior shown in Figure 16.6.
The time domain behavior is shown in Figure 16.7.
1.5 --
0.5
o
o
_-------1...--._ .. L L..
2 3
time
4 5 6
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.
16.4 THE HOPF BIFURCATION
In Chapter 15 we studied systems where the number of steady-state solutions changed as
a parameter was varied. The point where the number of solutions changed was called the
bifurcation point. We also found that an exchange of stability generally occurred at the
furcation point.
A Hop/hifurcation occurs when a limit cycle forms as a parameter is varied. In the
next example we show a supercritical Horf bifurcation, where the system moves from a
stahle at the origin to a stable limit cycle (with an unstable origin) as a para-
mcter is varied.
EXAMPLE Hi.3 SupercriticallIopf Bifurcation
Consider the systern:
i] = Xl + Xl (p" - xf - xi)
.<,= -x, +x
2
(/L-X;-xi)
This can be written (see student exercise 4) in polar coordinates as:
i r (fJ. - r
2
)
o -I
Since these equations are decoup1cd, thc stability is dctcrmined from the stability of:
;. = fer) = r (fJ. - ,2)
the Jacobian is:
( 16.7)
( 16.8)
(16.9)
(16.10)
af
ar
/.L - 3,.2
The equilibrium (stcady-statc) point is/{r):;;:; 0, which yields,
r(fJ.-r
2
) = ()
Sec. 16.4 The Hopf Bifurcation 389
which has three solutions:
r ,= 0 (trivial solution)
r \ifL (not physically realizable)
For /-L < 0, only the trivial solution (r:;::: 0) exists. For I-l < 0,
which is stable, since /-L < O.
1<'01' /-L::::O 0, all of the steady-slale solutions ,lrC r:;::: 0. aod tbe Jacobian is:
3 r'
which is stable, but has slow convergence to r";=: O.
For 11, > 0, the trivial solution (r::::o 0) is unstable, because:
The nontrivial solution (r:;::: \/f-L) is stable because:
iJ{ "
.'= p, -- 3 r' -2f-L
(),.
and we find the following phase-plane plots shown in Figure 16.8.
The bifurcation-diagram for this system is shown in Figure 16.9.
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.
a. 1
1 0
x,

-1.5
1 0
x,


1.5
0.5
1.5
-0.5
390 Bifurcation Behavior of Two-State Systems Chap. 16
1.5
l.... 0.5
-----------------------
-0.5
4 3 2 1
mu

-2 -1 0
FIGURE 16.9 Bifurcation diagram. Indicates that the origin (r :;:;;0 0) is stahle
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' (fixed-
point or equilibrium) solution to (16.7) and (16.8) 15:
Linearizing (16.7) and (16.8):
atl _ 2 2
__
dX
j
ax,
2 Xl {,
=-1-2x
J
x;
dX)
We find the Jacobian matrix:

-xL
-1-2\:I,X'1
J -2x
l
"X
2
,

which is, for the equilibrium solution of the origin:
The characteristic polynomiaL from det(,\l- A) ::: 0, is:
,'- + + 1 0
\\lhich has the eigenvalues (roots):
2
FIGURE 16.10 Location of eigenvalues in complex plane as a function of fL.
A Hopf bifurcation occurs as the eigenvalues pass from the lefthand side to the
righthand side of the complex plane.
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 l f t ~ h l f plane to the right-half
plane is shown in Figure 16.10.
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).
391
~ > 0 = 0 < 0
The Hopf Bifurcation Sec. 16.4
+++
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
16.4.1 Higher Order Systems (n > 2)
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.
FIGURE 16.U Locatioll of eigenvalues in complex plane as a function of /-L.
A Ilop!" bifurcation occurs ns the eigenvalues pass from the lefthand side 10 the
righthand side of the complex plane.
Bifurcation Behavior of Two-State Systems
+
Chap. 16
p > 0 := a
o
o
p < 0
392
SUMMARY
In this chapter we have shown that the same bifurcations that oeemed in single-state
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
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
The following sources provide general introductions to bifurcation theory:
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:
Varma, A., & M, Morhidclli. (1997). Mathematical Methods in Chemical Engineer-
ing. New York: Oxford University Press.
STUDENT EXERCISES
1. Show that the two-variable system
\1 J;(x,f.l-) IL - xi
.r, - -x,
exhibits saddle-node behavior in the phase plane.
Student Exercises
2. Show that the two-variable system
x, = f,(x,fL) = /LX, - xl
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,
393
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
if Xl = r cos () and x
2
= r sin O.
5. Consider a generalization of Example 16.3, which was a supercritical HopI' bifurca-
tion (a stahle limit cycle);
;. = r (fL - r')
e= (f) + b r
2
Discuss how w affects the direction of rotation. Also, discuss how b relates the fre-
quency and amplitude of the oscillations.
6. Consider the following system, which undergoes a subcritical Hopi' bifurcation:
r = /-L r + ,3 - r
5
Ii = w + b,.'
Show that, for IJ- < 0 an unstable limit cycle lies in between a stable limit cycle and
a stahle attractor at the origin. What happens when fL = 0 and fL > O'!
7. Show that the condition for a HopI' bifurcation for the f()Uowing characteristic equa-
tion
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 ~ r l l 1
394 Bifurcation Behavior of TWQ+State Systems
Relate this condition to the Jacobian matrix, A(/-t), realizing that:
),2 _ tr(A(fL) ), + dct(A(fL = 0
Chap. 16
s. Consider a Hopf bifurcation of a three-state system. Realizing that one pole is nega-
tive (and rcal) and that the other two poles arc on the imaginary axis, relate the Hopf
bifurcation to the coefficients of the characteristic polynomial of the Jacobian ma-
trix arc:
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:
Understand what is meant by chaos (extreme sensitivity to initial conditions)
Understand conceptually the physical system that the Lorenz equations attempt to
model.
Understand how the system behavior changes as the parameter r is varied.
'fhe major sections in thi:-; chapter arc',
17.1 Introduction
17.2 Background
J7.3 The Lorenz Equations
J7.4 Stability Analysis of the Lorenz Equations
J7.5 Numerical Study of the Lorenz Equations
(7.6 Chaos in Chemical Systems
17.7 Other [ssucs in Chaos
395
396
17.1 INTRODUCTION
Introduction to Chaos: The Lorenz Equations Chap. 17
In Chapter 14 we presented the quadratic ll1i:lp (logistic equations) and found that the
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
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
In 1961, Edward Lorenz, a professor of Meteorology at MIT', Was simulating a reduced-
order model of the atmosphere, which consisted of twelve equations. Included were
functional relationships between temperature, pressure, and wind speed (and direction)
among others. He performed numerical simulations and found recognizable patterns to
the behavior of the variables, but the pattel11s would ncver quite repeat. One day he
cided to examine a particular set of conditions (parametcr values and initial conditions)
for a longer period of time than he had previously simulated. Instead of starting the en-
tire simulation over, he typed in a set of initial conditions based on results from midway
through thc previous run, started the simulation and walked down the hall for a cup of
coffee. When he returned, he was shocked to find that his simulation results tracked the
previous run for a period of time, but slowly began to diverge, so that after a long period
of time there appcnred to be no conclation between the runs. His first instinct was to
check for a computer error; when he found none, he realized that he had discovered a
very important aspect of certain types of nonlinear of extreme sensitivity
to initial conditions. When he had entered the new initial conditions, he had done so
only to a few decimal places, whereas several more decimal places were carried
nally in the calculations. This small difference in the initial conditions built up over a pe-
riod of time, to the point where the two fUllS did not look similar. This discovery led to
the realization that long-term prediction of certain systems (such as the weather) will
never bc possible, no matter how many equations are used and how many variables are
measured.
In order to learn more about the behavior of these types of systems, he reduced his
model of the atmosphere to the fewest equations that could describe the bare
this required three equations. Here we discuss the "physics" of the three equations, while
Section 17.3 presents the equations and discusses the equilibrium solutions and stabilty of
the equations.
Consider a Huid maintained between two parallel plates, as shown in Figure 17.1.
When the top plate temperature (T
2
) 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.
FIGURE 17.1 Convection rolls due
to a temperature gradient in a fluid
where density decreases as a function
of temperature (1'1 > 7
2
),
397
T,
T,
The Lorenz Equations Sec. 17.3
17.3 THE LORENZ EQUATIONS
The Lorenz equations are:
x, = <r(x, Xl)
X
2
= r Xl - X
2
- X
I
X
3
X
3
= hx] + X
l
X
2
(17.1)
(17.2)
(17.3)
Notice that the only nonlinear terms are the bilinear terms x
J
x
3
in (17.2) and xlx2 in
( 17.3).
The state variables have the following physical significance:
XI
x2 =
x3 =
proportional to the intensity (speed) of the convective rolls
proportional to the temperature difference between the ascending and de-
scending currents
proportional to distortion of the vertical temperature profile from linearity
398 Introduction to Chaos: The Lorenz Equations Chap. 17
Three parameters, (T, r, and b have the following physical significance:
(J :::::: Prandtl number (ratio of kinematic viscosity to thermal conductivity)
r ::::: ratio of the Rayleigh number, Ra, to the critical Rayleigh number, Rae
b a geomctic factor related to the aspect ratio (height/width) of the convection
roll
The Rayleigh number is:
galP!::.T
Ra =
vI<
where:
a =
11 =
g
!::.T =
v =
I<
=
coefficient of expansion
distance between plates
gravitational acceleration
temperature difference between the plates (T1 ~ T2)
kinematic viscosity
thermal conductivity
For a fixed geometry and tluid, Ra is a dimensionless measure of the teo1peraturc
difference between the plates. For 0 ::; r < I (Ra < RaJ the temperature difference is not
large enough for the buoyancy forces to overcome the viscous forces and cause motion.
['or r> 1 (Ra> Rae) the temperature difference is large enough to cause motion.
17.3.1 Steady-State (Equilibrium) Solutions
The Lorenz equations have three steady-state (equilibrium) solutions under certain o n i ~
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)
Substituting (17.5) into (17.3), we find thatx" = ~ xi" or:
(17.6)
Sec. 17.4 Stability Analysis of the Lorenz Equations 399
TABLE 17.1 Summary of the Equilibrium Solutions
State Variable Trivial Solution
o
o
o
Nontrivial I
(r> 0 required)
Vb (r I)

r -- I
Nontrivial 2
(I' > 0 required)
1)
I)
r 1
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.
Substituting (17.6) into (17.2) at we find',
and substituting (17.7) into (17.6) and using tbe results of (17.5):
x,," x
2
, =1 V';(r - I)
(17.7)
(17.8)
17.4 STABILITY ANALYSIS OF THE LORENZ EQUATIONS
Linearizing (17.1 )-(17.3) around the stcady-statc
j
we find the following Jacobian matrix:
( 17.9)
which we will analyze to determine the stability of the equilibrium solution.
17.4.1 Stability of the Trivial Solution
For the trivial solution, XIs =x2.\,:::: x:h:::: 0 , the Jacobian matrix is:
(17.10)
and the stability is determined by finding the rooIs of dCl(A1 A):::: O.
400 Introduction to Chaos: The Lorenz Equations Chap. 17
(17.11 )
I
o
o
A+h
--- <f
A+
o
"-A I' :,"
del(A/- A) cc (A + h) IA.+ <r -<rl
--I' A + 1
(A + h) [(A + <r)(A + 1) <r1'1
dCl(A/- A)= (A + h) [A
2
+ (IF + I) A+ <r(1 -1')1
and we sec from (17.11) that the eigenvalues are
( 17.12)
A
2

+ 1 - V(<r j 1)2 - 4<r(1 ---1')
2
( 17.13)
(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
r < 0: all eigenvalues are negative, trivial solution is stahle
r> 0: saddle point (one unstahle eigenvalue), trivial solution is unstable
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 convective
flow \vill begin.
17.4.2 Stability of the Nontrivial Solutions
Here we find the roots of det(AJ - A) = 0 for the nontrivial solutions. Starting with:
I:,' ';
-<r
o ]
AI- A A+ I
XIs
-- ):2s A + h
( 17.15)
and solving det(AJ - A):;:: 0, you should find:
A' + "21\.2 + hi A+ IJ
o
(17.16)
Recall that real nontrivial solutions only exist for r > I.Thc coefficients b
2
, hi' and h
o
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:
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.
Stability Analysis of the Lorenz Equations 401
( 17.17)
(17.18)
( 1719)
(17.20)
<T + h +
(IT ~ b - I)
r =-
11
b
2
-lr(A) IT+b+1
b,'(r+lr)b
b
o
= ~ det(A) = 2lrb(r - I)
where:
Sec. 17.4
15
unstable limit cycle
17.4.3 Summary of Stability Results
30
----- ~
unstable limit cycle
25
r
-----
c: .................. .. -
5
5
10
15
-10
" 0
FIGURE 17.2 Bifurcation diagram for the Lorenz equations. Based on para-
meters in Section 17.5.
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.
402 Introduction to Chaos: The Lorenz Equations Chap. 17
17.5 NUMERICAL STUDY OF THE LORENZ EQUATIONS
Lorenz used the following values to illustrate the chaotic nature of the equations
IT ]()
8

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.
17.5.1 Conditions for a Stable Trivial (No Flow) Solution
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
(J 10
X
/,
3
r 0.5
As in future simulations, we assume an initial condition oLt
o
;;;: 10 1 Ol"r, Atime 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.
Lorenz Equations, r "" 0.5
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.
Numerical Study of the Lorenz Equations Sec. 17.5
0.2
0.15
'P 0.1
0.05
o
o
Lorenz Equations, r := 0.5
0.1 0.2 0.3 0.4 Q5 0.6
Xi
0.8 0.9
403
FIGURE 17.4 Phase-plane under stable conditions for the trivial solution
(x] - xJ plane).
17.5.2 Stable Nontrivial Solutions
We have found that the nontrivial steady-states arc stable for 1 < r < r
l1
" I-Icrc we use the
IT and 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.
iT = to
8
h=
3
r = 21
For the trivial steady-state, x::;:; 1000F', the eigenvalues arc:
A,e - 2.67
A} =- 20.67
A, = 9.67
as expected, the trivial steady-state is
The.nontrivial steady-slates, x = lV160/3 V160/3 201
1
and x = [- V160/3
-- vu,0/3 20r', have eigenvalues of:
A, = - 13.4266
1..
2
= --0.1200 + 8.9123j
A; -O.l200-8.9123j
verifying that the nontrivial steady-states are stable.
Time domain plots for x J are shown in Figure 17.5, for r:::; 21 Hnd two difTerent ini-
tial conditions. Notice that convergence to a particular equilibrium point depends on the
initial condition, that is, plot a converges to one equilibrium point. while plot h converges
to a different equilibrium point. Also notice that plot b exhibits what is known as transient
404
20
15
10
5
"
0

10
15
20
0 5
Introduction to Chaos: The Lorenz Equations
r" 21, X
o
" [0;--1 ;0)
40
time
8. r 0:;:. 21, X
o
=- [0 OjT.
Chap. 17
20
15
10
5
-5
10
r"21,x
o
"
-15
200 25 30 35
time
40 FIGURE 17.5 Lorcnz cquations
under conditions for stable nontrivial
solutions.
chaos. Thc initial trajcctory appears chaotic, but eventually the 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
o
-20-15 10
35
FIGURE 17,6 Phase plane under sl<t"
ble conditions for the nOlltrivial
solutions.
15 10 5 o
Xi
-5
,
r= 21. X
o
= [0;-1;01
r = 21. Xo = [-20;10;1 OJ

-20
Xi
b.r=21.x
o
=[20 10 10l
T
17.5.3 Chaotic Conditions
o
-20
5
35
20
25
5
15
10
30
20
25
30
10
!i'
15
The parameters used for this case are
(f lO
8

3
r 28
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
For the trivial x -;;:; 10 0 OfT, the eigenvalues arc:
/.., == 2.67
/.., =-22.83
/..3 co 11.83
as expected, the trivial is unstable (a sa441c poiJlt).
Xor the nontrivial steady-states, x =- [Vn vn 271' and x
= vn 27]1', the eigenvalnes are:
/.., - - 13.8546
/..2 = IW940 =- 10. I945j
/..3 (W940 + H1l945j
[- V72
indicating that the nontrivial arc unstable. Notice that all of the steady-state
operating points are unstable. '{'his means that the curves in the three-dimensional "phase-
cube" plots will not asymptotically approach any single equilibriulll point. The curves
may exhibit periodic-type behavior, where the three-dimensional equivalent of a limit
cycle is reached. The curves could even have "quasi-periodic" behavior, where the oscilla-
tions appear to have two frequency componcnts. It turns out for this set or parameters that.
the curves ncver repeat. The curves have a strange affractor because they stay in a certain
region of three-space, but never intersect or repeat. This is known as chaotic I)chavior.
Figure I?? shows the Lorenz behavior for the "Yr variable under unstable (chaotic)
conditions. The initial condition is x
o
:::: [0 1 Orr. Plots of the other states (x2 and ''\:3) arc
similiar.
Figure 17.7 was 11 time domain plot for Xl under chaotic conditions. More interest-
ing results arc also shown in the following phase-plane diagram (Figure 17.8). Notice that
the trajectory will spend some time "winding around" one equilibrium point, before
ing to the other side and winding around the other equilibrium point for a while. This
process goes on forever, with the trajectory never crossing itself (in 3-space).
20
15
10
5
"
a
5
10
-15
20
a
Lorenz E<lualiOllS,I =a 10 I =50
40 50
time
FJGllRE 17.7 Transient response ofx
j
under chaotic conditions.
Sec. 17.6 Chaos in Chemical Systems 407
Lorenz Equations, t", 0 to t:= 50
50
40
30
20
10
o
20 --15 --10 -5 a
x,
5 10 15 20
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.
17.6 CHAOS IN CHEMICAL SYSTEMS
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 211
(0 5 (010
"'1-
41)
:10
T
'"
'm

-111
'"
0--
_}II -15 -10
'"
IS JII
"
(020
II
-20 -IS -10

HI \<; 20
"

FIGURE 17.9 Phase-plane of Lorcnz equations under chaotic conditions.
"
35 (040
In
30 (035
.10
Sec. 17.7 Other Issues in Chaos 409
5H
'"
)11
11)
'"
'"
'"
"
t = 40 to 45
FIGURE 17.9 C'ol/iit/lled
17.7 OTHER ISSUES IN CHAOS
"
t = 45 to 50
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.
FIGURE 17.10 Three-dimensional phase space plot of Lorenz equations under
chaotic conditions.
60
40
20
o
-50
o
r =: 28, Xo
50 -20
[0;1;OJ
~ ~ 2
~ 10
~ 0
-10
x,
410 Introduction to Chaos; The Lorenz Equations
[ssucs that may be of particular interest include:
Chap. 17
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
We have presented an introduction to chaotic behavior by studying the Lorenz convective
flow equations. A number of chemical processes have been shown to exhibit similar
havior. It is necessary to have three nonlinear autonomous differential equations before
chaos can occur. Although not shown here, chaos call occur in a system of two nonlinear
IlOIl(lutonO!1lOUS equations (that is, if some type of periodic input forcing is used), Also.
we saw in Chapter 14 that chaos can occur in a single discrete nonlinear equation (the
quadratic map, or logistic equation),
REFERENCES AND FURTHER READING
A nice book on the history at' chaos, written for the general public, is by Gleick,
Gleick, J, (1987). Chaos: Making II New Science. New York: Viking.
The first paper to develop the notion of sensitivity to initial conditions is by Lorenz.
Lorenz, E.N. (1963). Deterministic nonperiodic flow. Journal Sci-
ences, 20: 130-141.
A number of introductory-level textbooks provide nice introductions to chaos. The"e
elude:
Strogatz, S.H. (1994). NOlllinear Dynainics and Chaos. Reading, MA: Addison-
Wesley.
A review of nonlinear dynamic behavior (including Chaos) of chemical reactors is pro-
vided by:
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
Papers that develop a way of encoding secret messages using chaos arc:
411
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
J
Leflers, 71: 65.
STUDENT EXERCISES
1. Consider the following parameter values for the Lorenz equations:
" 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 > r
c
' 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 x
o
;;::; [0 I OIT, For the second sim-
ulation lise the initial condition Xo ::::: [0 1.0I 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 = -x
2
- x
J
x
2
= x
l
+ax
2
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
4. The Henon map is a discrete model that can exhibit chaos:
xi(k +- 1) x
2
(k) +- 1 - a xi(k)"'
x
2
(k -I- I) bxi(k)
For a value of b 0.3, perform nUlllerical simulations for various values of a. Try to
find values of a (try a > 0.3(75) thai yield stahle pcriocl-2 behavior. Show that
chaos occurs at approximately a ;::;: I '()6.
APPENDIX
Stability analysis of the nontrivial steady-state using the Routh array:
Row
I
2
3
4
Where
I
"2
hi)] - b
o
h,l.
"0
"0 =2 ,,"(r - I)
()
hi b
2
=<r+h+1
Since the nontrivial steady-state only exists for 1';:: I, then b
o
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:
h
2
hJ - b
o
> 0 or h
2
b 1 > b
o
Making the substitutions for parameter values in the coefficients:
(<r +- b +- I )(r -I- <r)h > 2 <rb(r - I)
After some algebra, this can be written:
'T +- h+-I) r--- -- ,,('TI h -I- 3)
or,
('T - b - I) r < "(<r +- h +- 3)
and, assuming that (J > h + I, the condition on r for stability is:
,,(,,+-h+-
r<
('T - h- I)
(A-2)
(Al)
(A 4)
(A-5)
Notice from (A-3) that if (J < b + I, then any,. satisfies the requirement fl.)!" stability. We
will often define the critical value, r
c
:
If r > r
c
' then the syslem is unstable.
" (" +- h +-
(" - {) - J)
(A-6)
________________ __ __....... A
SECTION IV
REVIEW AND LEARNING MODULES
INTRODUCTION TO MATLAB
MODULE
1
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
The m'ljor sections of this module arc:
MI.l
MI.2
M1.3
MIA
MI.5
MI.6
Background
Using This Tutorial
Entering Mali"ices
The MATLAB Workspace
Complex Variahles
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
M1.7
MI.R
MJ.9
M I.J()
MI.II
MI.12
MI.13
MI.J4
Introduction to MATLAB
Plotting
More Matrix Stuff
FOR Loops and IF-THEN Statements
m-filcs
Diary
Toolboxes
Limitations to Student MATI,AB
Contacting MATHWORKS
Module 1
M1.1 BACKGROUND
MATL,AB is an interactive program for numerical computation and data visualization. It
was originally developed in FORTRAN as a MATrix LABoratory for solving numerical
linear algebra problems. The original application may seem horing (except to linear
bra enthusiasts), hut MATLAB has advanced to solve nonlinear problems and provide
tailed graphics. It is casy to usc, yet vcry powerful. A few short commands can
plish the same results that required a major programming effort only a few years ago.
M1.2 USING THIS TUTORIAL
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
(orial. The MATLAB commands will be shown in the following font style:
Monaco font
the prompt for a user input is shown by the double arrow
MATLAB has an extensive on-line help facility. For example, type help pi at the
prompt
)) help pi
PI PI c, 4*atan(I) 3.1415926535897 ....
so we see thatMATLAB has the number 'IT "built-in". As another exalllple
help exp
EXP EXP{X) is the exponential of the elements of X, e to
the X.
Sec. Ml.3 Entering Matrices 417
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 ~ f i l s 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
EXPM
EXPMl
EXPM2
EXPM3
EXPME
Exponential
Matrix exponential.
Matrix exponential via Pade' approximation.
Matrix exponential via Taylor series approximation.
Matrix exponential via eigenvalues and eigenvectors.
Used by LINSIM to calculate matrix exponentials.
M1.3 ENTERING MATRICES
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
If we want to make x a column-vector, we usc a semicolon as the deli meter between
rows:
" x [1;3;5;7;9;11]
x
1
3
5
7
9
11
To make x a row vector again, we usc the transpose:
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
z
5 10 15 20 25 30
If we wish to suppress printing, we can add a semicolon (i) aftcr any MATLAB 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
We can view the variables currently in the workspace by typing:
More detail abollt the size of the matrices can be obtained by typing:
M1.4 THE MATLAB WORKSPACE
419
No
No
No
No
Complex
1
6
6
6
Total
z
Name Size
ans 1 by 1
x 1 by 6
Y
6 by 1
2 1 by 6
y
the MATLAB Workspace
x
15
Sec. M1.4
ans
Notice that a new variable, ans, was defined automatically.
who
leaving 621420 bytes of memory free.
ans
" 2(3)
Your variables are:
whos
Grand total is (19 * 8) 152 bytes,
leaving 622256 bytes of memory free.
We can also find the size of a matrix or vector by typing:
[m,n};;;:size(x)
1
n
6
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
size (x)
ans
1 6
Introduction to MATLAB Module 1
Since x is a vector, we can also usc the length command
" 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 f i l e ~ m e
(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
To load a set of previously saved variables:
load file name
Sometimes it is desirable to clear all of the variables in a workspace. This is done by sim-
ply typing:
clear
More frequently, you may wish to clear a particular variable, such as x
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
M1.5 COMPLEX VARIABLES
Both i and j represent the imaginary number, \1=1, by default:
i
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
ample), as will be shown later.
Matrices can be created where some of the clements arc complex and the others arc
real:
a [sqrt(4) { -5]
a
2.0000 1.0000
o + 2.00001 -5.0000
Rendl that the semicolon designates the end of a row.
M1.6 SOME MATRIX OPERATIONS
Matrix multiplication is straightforward:
b [1 2 3;4 5 6J
b
1
4
2
5
3
6
Using the a matrix that was generated in Section 1.5:
ESCOLA DE ENGENHARIA
BIBLIOTECA
422
C ;:;, a *b
c
Introduction to MATLAB Module 1
6.0000 9.0000 12.0000
-20.0000 + 2.0000i -25.0000 + 4.0000i -30.0000 + 6.0000i
Notice again that MATLAB automatically deals with complex numbers.
Sometimes it is desirable to perform an element-by-elenwnt multiplication rather
than matrix multiplication. I,'or example, d(iJ) =- b(ilj)*CUlj) is performed by llsing the -k
command
d:::o c. *b
1.0e+02 *
0.0600 0.1800
-0.8000 + 0.0800i -1.2500 + 0.2000i
0.3600
-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 :::; b.le
e
0.1667
-0.1980 - 0.0198i
0.2222
-0.1950 - 0.0312i
0.2500
-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
7.2232 + 1.8019i
-0.4302 + 2.0760i
1\11.7 PLOTTING
1.0380 + 0.2151i
-0.0429 0.2962i
For a standard solid line plot, simply type:
plot (x, z)
Sec. M1.7 Plotting 423
where x and z have been generated using
x 1:2:11;
z 5:5:30;
30
25
20

15
10
5
0 2 4 6 8 10 12
x
Axis labels arc added by using the following commands:
xlabel ('x')
ylabel ( , z ' )
For more plotting options, type:
help plot
PLOT Plot vectors or matrices. PLOT(X,Y) plots vector X versus
vector Y. If X or Y is a matrix, then the vector is plotted
versus the rows or columns of the matrix, whichever lines
up. PLOT(Xl,Yl,X2,Y2) is another way of producing multiple
lines on the plot. PLOT(Xl,Yl, ':' ,X2,Y2, '+') uses a
dotted line for the first curve and the point symbol +
for the second curve. Other line and point types are:
solid point red r
dashed plus + green g
dotted star
,
blue b
dashdot
-
circle 0 white w
x-mark x invisible i
arbitrary cl
t
c15, etc.
PLOT(Y) plots the columns of Y versus their index. PLOT(Y)
is equivalent to PLOT(real(Y),imag(Y)) if Y is complex.
In all other uses of PLOT, the imaginary part is ignored.
See SEMI, LOGLOG, POLAR, GRID, SHG, CLC, CLG, TITLE, XLABEL
YLABEL, AXIS, HOLD, MESH, CONTOUR, SUBPLOT.
424 Introduction to MATLAB Module 1
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
x
+
8
+
10 12
'rext call be added directly to a figure using the gtext command.
gtext ( 'string ') displays the graph window, puts up a cross-hair, and waits
for a mouse button or keyboard key to be pressed. The cross-hair can be positioned with
the rnouse. Pressing a mouse button or any key writes the text string onto the graph at the
selected location.
Consider now the following equation:
Y(I) 4 e 01,
We can solve this for a vector of t values hy two simple- commands:
t ::::
y
0:1:50;
4 * exp ( 0 . 1 * t) ;
and we can obtain a plot by typing:
" p1ot(t,y)
Notice that we could shorten the sequence or commands by typing:
"
4
3
2
o
o 10 20 30 40 50
We call plot the function yet) = t e -lUI by using:
Y = t.*exp(-O.l*t);
" plot(t,Y)
gLexL('hey, this is the peak! ')
" xlabel ( , t ' )
" ylabel ('y')
Sec. M1.7 Plotting
4
3
o
o 10
islhe
20 30 40 50
425
axis ( I square ') will place the plot in a square box, while axis ( I normal') will
change back to a normal aspect ratio.
You can also explicitly set the upper and lower bounds on the plot with:
axis([xlow xhigh ylow yhigh])
For this example we would usc:
" v ~ [0 50 0 4];
axis(v);
Multiple curves can be pJaccd on the same plot in the following fashion.
plot(t,4*exp(-0.1*t) ,t,t.*exp(-O.l*t), '--')
3
,
,
,
2 . ,
,
,
,
,
,
,
,
I
o I _.__ ~ _ L _ ~ ~ ~ = : : : : : = = = = ~
o 10 20 30 40 50
426 Introduction to MATLAB Module 1
The subplot command can be lIsed to make multiple plots.
subp1ot(2,1,1), p1ot(t,4*exp(-O.1*t))
subp1ot(2,1,2), p1ot(t,t.*exp(-O.1*t))
4 ~ ~ --- ,- , I
: _ ~ __~__~ ~ ",=_ - __
o 10 20 30 40 50
: L n ~ ...::..
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).
M1.8 MORE MATRIX STUFF
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
If we wished to look at the first column of v, we could use:
~ ~ _ .....
Sec. M1.9
V ( : J 1)
ans
For Loops and If-then Statements 427
1
3
5
7
9
11
If we wished to look at the second column of v, we could lISC:
" v ( : ,2)
ans
5
10
15
20
2
"
oj
30
And we can construct the same plot as before, by using (' -- I gives a dotted line):
"
p1ot(v(:, 1) ,v(: ,2), '--' )
30
25
>
0
20
0J
C
E
15
=>
<3
" 10
5
0 2 4 6 8 10 12
column 1 of v
M1.9 FOR LOOPS AND IF-THEN STATEMENTS
A for loop in MA'rLAB is similar to a DO (oop in PORTRAN. The main difference is
that the 1"ORTl{AN DO loop must have an integer index variable; for does not have this
restriction. An example of a for loop that is virtually identical to a DO loop is:
428
[or k
tlk)
ylk)
end
l ~ O O l ;
(k1)*0.01;
sinltlk));
Introduction to MATLAB Module 1
Another way of implementing the saille loop is increment ( from 0 to 50 in increments of
0.01:
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.
1.10.1 Script Files
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.
% poprnod.m
% population model, script file example
Sec. MUO M-Files 429
%
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
in theMATLAB command window.
M1.10.2 Function Routines
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.
function [time,x] = pmod(alpha,xinit,n)
% population model example, pmod.m
clear time; clear x; clpar k;
x(l) xinit;
time (1) = 0;
for k = 2:n+l;
time(k) k-l;
x(k) = alpha*x(k-l)*(l-x(k-l));
end
% end of function file 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)
430
Introduction to MATLAB
0.7
0.6
0.5
0-
0
0.4
0-
x
0.3
02
0.1
0 5 10 15 20 25 30
tstep
Module 1
This function routine can also be called by other function routines. This fC,'llurc leads to
"stl1lcturcd programming"; structured programs are casy to follow and debug.
MATLAB has many built-in function routines that you will usc throughout this
course.-The most tommonly used rOLltines arc fzero, [solve:., and ode45, to solve a
single nonlinear algehraic equation, multiple nonlinear algebraic equations, and a set of
nonlinear differential equations, respectively.
M1.11 DIARY
When preparing homework solutions, it is oftell necessary to save the sequence or COl11-
mallels and output results in a file to be turned in with the homework. The diary com-
mand allows lhis.
diary f i le._name causes a copy of all subsequent terminal input and most of the
resulting output to be written on the file namcd file__name. diary off sllspends it.
diary on turns it back OIl. diary, by itself, toggles the diary statc. Diary riles may be
edited latcr \\'ith a text editor to add comments or renlove mistaken entries.
Often the consultants wish to See a diary file of your session to assist them in trou-
bleshooting your MATL.AS problems.
M1.12 TOOLBOXES
MATLAB toolboxes arc a collection of function routines writtcn to solve specialized
problems. The Signals and Sy.<;lems Toolbox is distributed with the Student Edition of
MATL.AB. The newcst edition of Student MATLAB also contains the Symbolic Algcbra
toolbox, which is a collection of routines that allows onc to obtain analytical solutions to
algebndc and differcntial calculus problems. One toolbox orten used in chemical process
control is the Control Systems Toolbox.
-------------
Z'"'''''jK>' Ii ]I k k i
Sec. Ml.14 Contacting Mathworks 431
M1.13 LIMITATIONS TO STUDENT MATLAB
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.
M1.14 CONTACTING MATHWORKS
MATHWORKS has aholncpagc on the \Vorld Wide Web. The URL, for this homepage
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:
camp. s o f t ~ s Y ~ matlab
Summary of Commonly Used Commands
Berore posting questions on this ncwsgroup it is a good idea to read the FAQ from the
MATlIWORKS.
axis
clear
clc
diary
end
exp
for
format
function
gtext
help
hold
if
length
axis limis for plots
removes all variables from \vorkspace
clears command window
save the text of a MATLAB session
end of loop
exponential function
generates loop structure
output display format
user generated function
place text on a plot
help function
holds current plot and allows new plot to be placed on current plot
conditional test
length of a vector
432 Introduction to MATLAB Module 1
lookfor
plot
size
subplot
who
whos
*
./
%
keyword search on help variables
plots veclors
size of the alTay (rows, columns)
multiple plots in a figure window
view variables in workspace
view variables in workspace, with more detail (size, etc.)
matrix multiplication
transpose
suppress printing (also - end of row, when used in matrices)
clement by clement 111l11tplication
clement by clement division
denotes a column or row in a matrix. also creates a vector
placed before comment statements
Frequently Used MATLAH Functious
Function
eig
[solve
[zero
impulse
ode45
polyfit
ss2tf
step
tf2ss
Use
eigenvalues, eigenvectors
solve algebraic equations
solve a single algebraic equation
impulse response
integratc set or ordinary differential equations
least squares fit of a polynomial
convert state space to transfer function modcl
stcp response
convert transfer function to state spacc model
STUDENT EXERCISES
Chapter
5
3
3
9
4
Module 3
(linear rcgression)
10
5, 9
9
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
3. Find eel, where:
4. 3. Calculate xTx, and
h. Calculate xx
T
, where:
= [
I 2

A
- I
2
2 4
[-
2
-n
B 4
4

2
iJ
e 4
4
433
5. Find the eigenvalucs of thc matrix:
I
-I

o
6. Consider the expression:
o
2
3
o
()
()
I
()
with
Solve for R.


3 ] B ==
[:1 -1
Q
[ - 11.896 ...-

G

_.
-17.192 -18.856
434 Introduction to MATLAB Module 1
x
J
+ X
z
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
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
)
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)
10. Find V( .... ) for the following equation of state:
gmol
RT
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
...
REVIEW OF MATRIX
ALGEBRA
MODULE
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
The major sections of this module arc:
435
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.
M2.1
M2.2
M2.3
M2.4
Motivation and Notation
Common Matrix Operations
Square Matrices
Other Matrix Operations
436
M2.1 MOTIVATION AND NOTATION
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:
r'"
{{II
",.]
A
a
2l
(/n ([211I
{ll/! {[n2 {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
(2 X 3)
A vec!oris a special case of a Normally, the use of the tcnn
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:
A row vector of length three is
W o:c; [-WI 'tV! 'l.03J
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.
M2.2 COMMON MATRIX OPERATIONS
M2.2.1 Matrix Addition
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
is simply addition to form a new matrix:
(ij :,,"_c aij + b
ij
Clearly the order of matrices docs not matter for the addition operation (A + n :::;; B -I- A).
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:
Consider an 11 x III matrix A and an r x nmatrix n. An ,. x m matrix C is defined as the
product of H times A:
(M2.1)
10
16
91 IX
12 = 14
II A
(rxn)(nxm)
X
II
31 [7
6 + 10
C :::::
(r x 111)
2
5
C
ij
= Hi] A Ii + H
i2
A
2j
-1- + BinA
llj
n
Cij:O:;: 2: BikA
kj
k .1
c = I:
For example,
M2.2.2 Matrix Multiplication
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
(",111)
= H
(r.lI)
A
(1I,1J1 )
Cd
ijth clemenl
Crm
ilh row
i
jlh column
438
[,'or example,
Review of Matrix Algebra Module 2
2
5
c ,= [ ~ ~ j /:
11 12
(rows,cols) (3,2) (2,3)
[
7(1) + X(4) 7(2) + X(5)
== 9(1) + 10(4) 9(2) + 10(5)
11(1) + 12(4) 11(2) + 12(5)
(3,l)
7(3) + X(6) j
9(3) + 10(6)
11(3) + 12(6)
[
39
~ 49
59
54
6X
X2
69 j
X7
lOS
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
Let D be 11 transpose of the matrix A, then:
D ~ A f
(M22)
where (1) represents the transpose operation. The ij clement of Dis theji clement of A
til} = {iji
Columns become rows and rows become columns. For example,
2
5
3..1
6
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 x
T
.
and
X
tl
Diagonal matrices arc commonly used in weighted least squares (regression) problems.
Matrix Q is diagonal if
439
n
2: '/l};Zj
;,,--1
Common Matrix Operations
2
1
r
2
2
Z['lD
J
Zj'lV
2
Z l'l()\
""'1
23
['w,
'W
2
IlJ
tl
l

Zz'!D2. 2
2
10
3
Z
z
1DI/
'W
3
2,,'10
1
ZII'W
Z
Zn?Dj Zll1IJ
il
Zn
(II.! ) ( 1.11) (11,11)
Notice that multiplication in the opposite order, results in ann x n matrix:
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:
M2.2.4 Diagonal Matrices
Sec. M2.2
For example, Q = diag( I,3, 12) represents the following matrix:
An identity matrix, I, is a diagonal matrix with ones on the diagonal and zeros
OJ o
12
o
3
o
Q
ij
'Ii for i j
0 for; i j
IDENTITY MATRIX
[ii I if ; j
oit' ; *j
'fhe 5 x 5 identity matrix is:
[0= diag(l,I,I,J,I)
1 0
o 1
o 0
o 0
o 0
000
000
I 0 0
010
001
440
M2.3 SQUARE MATRICES
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: {lii
; 1.
M2.3.2 Determinant
(M13)
One of the most important properties of a square matrix is the determinant. Consider <l
2 X 2 matrix:
A ::::0 la" {/ '.2..1
a
21
an.
The determinant of A is
det A -_0 allan - {f21{f12
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.
M2.3.3 Minors and Cofactors of a Matrix
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:
o [:::'
au
{I'll
A
an an
.1
(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 detcrminant of the resulting matrix is:
del M
I2
0::0 (l21a:n - (1:-
H
a
n
The cqj'actor is thc "signcd" valuc of the minor. That is, the cofactor is dcfined as:
c co (- 1)" J del M
y - q
(M2.4)
(M2.S)
Sec. M2.3 Square Matrices 441
The cofactor e
l
2 of the 3 X 3 example matrix is:
e\2 cc_-., =--= = 112[ll:n + (l:lIa}}
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:
"
det A 2: {lijcij
i"\
(ii) Expanding around any row i:
(M2.6)
(M2.7)
"
det A ::::: 2. {lljCij
j.-.--.- 1
As an example, consider the 3 x 3 matrix A. The expansion around row 1 is
det A = ([nCII + {f12et2 t- ajJe
n
del A {[" ( .. I) I , I del M" + II 12( -- I)' ' 2 del M12 + ([ lJ( - I) I ,; del Mil
det A = all (az/l:1,J (f12alT) -- ({Jl{l2.1) -l-- {{lJ (a
21
11:
JJ
. - ((31022)
M2.3.4 Matrix Inversion
The inverse of a square matrix A,is called A ! and is defined as:
(M2.8)
The matrix inverse is conceptually useful when finding x to solve the following problem:

Multiplying each side (onlhe left) by A', we find:
A-I A x
(11 X11)(11 X11)(11 X I)
A' Y
(II X 11)(11 X I)
wbich yields:
' y
or,
where the matrix of A (adj A) is the transpose of the matrix of cofactofs of A.
ESCOLA DE
L,,,LI0Tt-:A
(M2.9)
(M2.IO)
I adjA
A --,
del A
x A ly
An algorithm for finding the inverse of an 11 x n matrix is known as Cramer's rule:
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.
442 Review of Matrix Algebra Module 2
EXAMPLE !VI2.1 Inversion of a 2 X 2 Matrix Using Cramer's Rule
A =
[all all]
a
21
an
A
I
-
adj A
detA
where the cofactofs arc
adj A = ,- an
dctA ..
C
ll
-- (-l)l+ldetM
lI
= (1n
e
12
= (--I))
t2
dctMj2 = -a:?1
en fl 1 det M
21
-- (l12
c
n
= (-ti
l2
det M
n
= all
adj A = {c;Jr = =
A'
The formula for the inverse of a 2 x 2 matrix should be committed to memory:
A
-
b]
d
[
d
- b] 1 d...ct A.
a .. det
det A
-b ]
det A
....... 0 ...
detA
where de! A 00:; ad - be
That is, the diagonal terms, take the negative of the off-diagonal terms, and divide
by the determinant.
Sec. M2.3 Square Matrices 443
M2.3.5 Other Issues in Matrix Inversion
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:
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
has rank = I, because the second row is linearly dependent on the first row. The matrix is
singular, because
-21
1
.. d
4 . 0 = undchne
-2] I [4
4. detA = -2
AI = I 4
-2
A = I ~ ~ ]
The rank of a square matrix is equal to the number of nonzero eigenvalues. Eigenvalues
of a square matrix arc disclissed next
M2.3.6 Eigenvalues and Eigenvectors
Eigenvalue/eigenvector analysis will bc important when studying dynamic systcms.
Eigenvalucs dctcrminc how "fast" a dynamic system responds, and thc associated eigen-
vector indicates the "direction" of that response. This material is used in Chapter 5.
Eigenvalue/eigenvector analysis can only be perrormed on square matrices. The
eigenvector/eigenvalue problem is:
(M211)
where:
A =
A =
~
=
matrix (square, number of rows::::: number of columns)
cigenvalue (scalar)
eigenvector (vector)
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 - ~ = () (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
A
The corresponding 11- eigenvectors ~ can be found from
A ~ i l\j ~ i
~ i is the eigenvector associated with the eigenvalue Ai-
For example, consider the general 2 x 2 matrix:
1
1I'.l (Jizi
(In (/22_
(M2.14)
l\I-A
1
l\-II
11
.. ~ / Z l
det(l\I - A) = (l\ - a,,)(l\ - II,,) - all "21 =. 0
det(l\I- A) = l\' - [1111 + lin] l\ + {alia" - a
2l
1l,,{ ~ 0
Equation CM2J5) can also be written as:
det(l\! - A) ~ l\' - triA) l\ + det(A) ~ 0
where:
triA) = all + a
22
dct(A) = allan - anll
n
Equation (M2.16) is the characteristic polynomial for a 2 x 2 matrix.
(M2.15)
(M2.16)
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
The characteristic equation for a J x 3 matrix is:
det(Al- A) = A' - tr(A) A' + M A- dCl(A) = ()
where:
tr(A) = (/Il + (/" + {/11
M det Mil + del M" + det M
11
:0::: "ntr:,>:,> -" (lJ211n + {llla
J3
{fJl((jJ + a
lJ
a
22
- {{12(f21
det A =0 (l11(a
22
{f:n - anil
lz
) {[12(a
n
ll
J
:. - ((?,j(ln) + {/u(a2111:12 (l:\1(fn)
(M2.17)
A
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.
EXAMPI.. EM2.2 Eigenvalue/Eigellvector Calculation
Consider the following matrix:
-\ I
A' 1[,. 1-[2(-1)-2(1)[ IJ
A!
F'rolll the quadratic equation:
I
I - 4( 4) I VI7
A
+
2 2 2
so,
and
A, 2.5616
The first eigenvector is found from (M2.14):
where we have lIsed the notation:
(M2.1X)
446
Applying equation (M2.1S),

Review of Matrix Algebra
I
v I
1.5616 11
'V
21
Module 2
So the following fWD equations must be satisfied:
2V
11
+V
21
1.56J6v
11
2V
11
-- 021 = - 1.5616 'On
which yield:
1J
21
3.561 5
If we wish, we call arbitrarily select VII 1.0 and '/)21 = 3.56J5
1
II" I [ 1.0 I cc c
}}n---
3
..l 6!5
1M2. J9)
Most 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 solution is:
1
- O.2703j.
0.9628
The reader should show that:
leads to:
-

!]
tv 1
0.8719]
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 =
d
0.8719
0.4896
2.:')616
o
-0.2703
0.9628
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)
-
1
det (a)
ans
4
M2.3.7 The Similarity Transform
The similarity 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
where V is the matrix of eigenvectors:
(1112.22)
(M2.23)
where:
A is the matrix of eigenvalues:
1
/)".1 1/)"1
1)21. and =
;\
1 A} ..
(1112.24)
Multiplying (M2.22) on the right side by VI we find
A' V A V I (111225)
(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
M2.4 OTHER MATRIX OPERATIONS
M2.4.1 Vector Norms
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:
II xII =
Sometimes the Euclidian norm is called the 2-nonn, JJ x lb.
In n-dimensional space,
II X II, =Vx; + xi + .... = xJ
,coj
notice that the sum of the squares can be written as xTx , lhalis:
and the 2-norm is then:

M2.4.2 Orthogonality
A column vector w is orthogonal to a column vector z if wTz = 0.0.
For example, consider the 2-D vector
l
1 "I
w=
-O.S
and the 2-D vector
z (0.5,1)
w (1,-0.5)
xTz = [l [O;S] = I(O.S) + (-O.S)1 OJ)
Notice that orthogonal vectors arc "perpendicular" to each other, as depicted below.
Then
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
EXAIVIPLE M2.3 Vector Normalization
Consider the vector x
T
= [l 21:
Then,
And,
XIX [I
The normalized vector is
F [;]
A vector norm 011 RII is a function I1II : RII 4 R satisfying:
1. x:;t: 0 4
2. II (XX II
3. II X j YiI .,;
II x II > 0
I(X III xii
II x II + II y II
Where CI.. is a scalar
'rriallglc inequality
Common Vector Norms
"
I. II X Iii 2: IXi I
jl
2. II X II, IXi If'
3. II x II,. Ix, I") 1/,.
4. II x"" max I x, I
l-norm (sum of absolute values)
2-norm, Euclidean Norm
p-nonn
oo-norm
Notke that the p-norm includes all other vector norms
EXAMPLE M2.4 Comparison of Norms
Xl [I -2 31
II x Ii, III I 121 + 131 6
!I X II, (iJI' I 12/' + Im
'
/
2
3742
Ilxt max 1111.121, 1311 3
Ilxll,,, (IJI'" + 1_21
'0
+ 131
10
)1/10 3.005
Notice that. as p .., =.11 X II" --> II x IL.
450 Review of Matrix Algebra
SUMMARY
Module 2
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: d e t ~ - 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
For problems 1-3, usc x" ~ ]
I. Find x'.
2. l<ind xTx.
3. Find II x Ib
4. Perform the indicated matrix operations for the following matrices:
f
3
A ~ 1
a. FindC
~
All
b. Find [) ~
IliA
c. Find E A 'll
B [7
9
6
5
5. Solve for x as a fUllction of.y where:
6. Find the determinant of:
v ~ [I
. 2
1] x
-1
7. Derive the characteristic polynomial (del (1\.1- A)) for a general 3 x 3 matrix:
[""
1112
11
11
]
A
...
{/21 an ((21
([-\I
{lJ2 {lJl
Student Exercises
8. Find the determinant, rank, and eigenvalucs of the following matriccs:
a A [ ~ J :31
h. B = [-11 :21
451
LINEAR REGRESSION
MODULE
3
The objective of this module is to review linear regression analysis, with a focus on a m ~
tfix algebra formulation and MATLAB routines for linear regression, After reviewing this
module, the reader should be able to:
Formulate a matrix algebra solution for a least squares problem
Usc the MATLAB routine polyf i t to find a polynomial to fit data
Usc the MATLAB routine polyval to evaluate a polynomial
The major sections of this module are:
M3.1
M3.2
M3.3
M3.4
M3.5
Motivation
Least Squares Solution for a Line
Solution for the Equation of a Line Using t r i x ~ Vector Notation
Generalization of the Linear Regression Technique
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
0
A
-
Y
a x + b
0
0
y
0
0
x
FIGlJREM3.1 data and linear model prediction.
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
X
2
X =
Y
X
N
Y2
which can be wriuen in the following fashion, to minimize space:
x' [x, x
2
xNI
y'! [Y, y, YN!
where f represents the transpose operation.
Given experimental data, x and y, we wish to find paramelers that allow a model to
best fit the data. For a good fit of the data, we would like to minimize the dilTcrence be-
tween the data points Hnd the model prediction (y = ax + b). Our first instinct might be
to find the model parameters, ({ and b, so that the sum of the absolute values of the errors
is minimized. Herc we have defined the error as the difference between the experimental
value and the model prediction. That is, our objective is to find the values of a and b slich
that equation (M3.1) is minimized:
(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 qr the
squares of the errors. That is, find a and b such that (M3.2) is JniniruizecL
l<'or N data points, we can represent (M3,2) using the more compact notation in (M3.3):
454
N
2.: (y, - yJ'
i= J
Linear Regression Module 3
(M.'2)
(MDl
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.
M3.2 LEAST SQUARES SOLUTION FOR A LINE
Using optimization notation, we refer to (M3.3) as the objective .Iltnc'/ioll. We desire to
find the values of a and b (known as decision variahles) that minimize the ohjective fUllc-
tion. Let/(a,b) represent the objective function:
N
f(a,b) 2.: (y, - y,)'
J
N
f(a,b) 2.: (y, - ax, - b)2
i 1
(M.'AI
(M.'.5)
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),
From (M.'.6)
af(ll,b)
da
a/(a,h)
ah
o
o
(M.'6)
(M.'.7)
and from (M.'.7):
a/(a,h)
ria
dEa,.'))
iJb
N
22.: (y, - ax, - h) (x,) 0
i'cl
N
-22.: (y, - ax, - b) ()
I
(MU)
(M.'9)
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/ - bx
i
) = 0
i"l
(M.'.IOl
N
2.: (y, - ax, - b)
i"l
- 0 (M.'.ll)
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:
Rcrlloving the parameters a :md b frorn the summations:
:V N N
'\.' "",'
b L.J Xi + a L..J xt = L.J
i I i=l 1
N N
II "'" X + bN c. y
L..J I LJ./
i.l i,1
1 INN j
N.2: Yi - a 2: Xi
./-1 1""1-
(M3.12)
(M3.13)
(M3.14)
Of course, we sec that the terms in (M3.14) arc merely the mean values of y and x.
I N
x 2: Xi
N;"J
so that:
b co:c).i - ax
Substituting (M3.1 5) into (M3.12) we find:
N N
+ a LX; = 2:Y,t:;
i=1 i'l
or,
which leads to:
(M3.1S)
(M3.16)
(M3.17)
a=
y,xi) -Ny i

(M3.18)
and b can be determined from (M3.15).
M3.3 SOLUTION FOR THE EQUATION OF A LINE
USING MATRIX-VECTOR NOTATION
The model prediction of each dependent variable can be written as:
Yi = aX
i
+ b
(M3.19)
\-vhieh can be written in rnatrix-vcctor form, Cor N data poinls, as:
456 Linear Regression Module 3
I' x
j t
y} .x::!
I;; I
(M320)
Yv_ \'
(Nx I) (Nx 2; (2 x 1)
and ViC can sec that the dimensioning of the rnalrices and vectors is consistent. lIsing
compact notation, \ve write (M3.20) as:
Yoe'I_O
The objective function is:
v
/(0) = L (Y, -Y,)'
i t
which can he \vrittcn as:
](0) = IY - VI'IY - VI
(I x I) (I x IV) (N x I)
The general optimization statcrnctlt is then:
(M321)
(M322)
(M3B)
Minimi/.c
subject to
((O) IY YI'IY-Yl
Y= (I) 0
(M3Ll)
(M321)
whcrcj(O) is the objective function, 0 arc the decision variables. and (1\13.21) is the
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)
M3.4 GENERALIZATION OF THE LINEAR REGRESSION TECHNIQUE
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;
Y {/ .\1 + b c In x, + d eX'
where the .y' s arc the independent variables. Represent the kth data point as:
.Y(I<) = IIX,(I<) + by,(k)' I clllxJk) + dc','k!
which can be written as:
.
______________ ? ...... b.;.
457
x(l )
x(2)
x(N) I
x
2
(k)'
c d]
x(l ),,-1
X(2)'"-1
y(l)
y(2)
yeN)
x(1)"
x(2)"
y=
x(N)" x(N)"' 1
y(k) = 'I'(k)le
'I'(k)' = [xl(k)
OT = [a b
<1>=
Generalization of the Linear Regression Technique
The measured variable vector is:
Pn
PIl+l
0=
where:
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:
The parameter vector is:
Sec. M3.4
The matrix of the independent variable functions is:
458 Linear Regression Module 3
k dt
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).
M3.5 MATLAB ROUTINES polyfit AND polyval
'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:
yl ~ polyval (p. xl)
We show the usc of polyfit and polyval by way of Examplc M3.1.
EXAlVIPLE M3.1 Batch Reactor [I:xample
Consider a batch reactor with a single first-order reaction, A -) H. The model is:
dC
A
til
where C
A
= concentration of A, k:;:; rate constant, and l:;:; time. Separating variables and integrat-
1l1g:
dC;1
C
/l
In (.'11 = In C
AO
- 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.
TARLE M3.J Concentration as a Function of Time
459
5
11.7 1
5
4
LOS
4
o
3
I.X2
o
2
2.95
2 3
time, min
o
I
5.00
o
o
8.47
MATLAB Routines polyt i t and polyval
10
8
6
'"
I
u
c
0
u
4
2
0

0
time, min
kgn101/m
J
Sec. M3.5
FIGURE M3.2 Batch reactor data. Concentration of A as a function of time.
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 "

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/m
J
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 :=0: polyval(p,t);
>.> ploL(L,ymod, t,y, '0')
2.5
2
1.5
..
0
E
0.5
0
-0.5
___ L_
0 2 3
time, min
o
4 5
FIGURE M3.3 Semi log 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
CA_illOd
plot (tI, CA__ffiOd, t, CA, '0' )
The data and model are compared in Figure M3.4.
The rate constant has been evaluated at a single temperature. It can be evaluated at a num-
ber of temperature and linear regression can he lIsed to evaluate the Arrhenius cons/ants (fre-
quency factor and activation energy) as shown in student exercises 3 and 4.
o
c
8
time, min
F[(;{JRE M3.4 Concentration data and model as a function of lime.
Student Exercises
REFERENCES AND FURTHER READING
461
Good coverage of least squares analysis, and optimization in general, is provided by the
following text:
Edgar, T.E, & D.M. Himmelblau. (1988). Optimization 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 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
T,K
0.026
313
0.062
319
00108
323
0.213
328
0.43
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.
ESCOLA DC: ENGENHARIA
BIBLIOTECA
462
Linear Regression Module 3
4. 'rhe Arrhenius rate expression is used to find'rale constants as a function of temper-
ature:
Ie ~ A exp( ... E/ R7)
Taking the natural log (In) of each side, we find:
In Ie In A- (E/R) (1/7)
I.incar regression analysis call be used to find A and E.
Rate constants as a function of temperature for a first-order reaction arc
shown below.
k, min 1
T,K
0.0014
300
0.0026
310
0.0047
320
0.0083
330
0.014
340
0.023
350
0JJ38
360
0.059
370
0.090
380
Find A and E' lIsing least squares analysis (show units). Show that polyfit and
the matrix algebra approach (M3.24) yield the same results. Compare model and
cxpcriIncllt by (i) plotting In k versus lIT and (if) k versus 1'.
5. The growth rate expression for a biochemical reaction, lIsing a Monod model, is:
/--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
x, g/Iiter
0.25
0.1
0.31
0.15
0.36
0.25
0.43
0.50
0.45
0.75
0.47
1.00
0.50
1.50
0.52
3.00
Show that polyfit and the matrix algebra approach (M3.24) yield the saIne ~
suits.
6. The growth rate expression for a biochemical reaction, using a substrate inhibition
model, is
_ P'!lJ'IX X
fL ~ --
k
m
+ x + k
1
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
0.35
0.50
Use linear regression (M3.24) to Data for a particular reactor arc shown below.
solve for the parameters (/-LnHlX' kin' and k,).
fL, hI' I 0.24 0.27 0.34
x, g/litcr 0.1 0.15 0.25
0.35
0.75
0.34
1.00
0.33
1.50
0.22
3.00
Student Exercises
Note that:
x(l) l/x(l)
x(2) l/x(2)
y
x(8) l/x(8)
463
and the solution is H 1>'1'(1) I(J)Ty
Compare the model and experimellt by plotting IL verSUS.L
INTRODUCTION
TO SIMUUNK
MODULE
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;
Construct a hlock diagram for simulation
Set proper simulation parameters
Print SIMULINK windows
The major sections of this module arc:
M4.!
M4.2
M43
Introduction
'fransfcr SilTiulation
Printing SIMlJLINK Windows
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
SIMUUNK Block library (Version 1.3c)
FIGURE M4.1 SIMULINK block library.
methods that call handle systems with (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.
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
Additional blocks using the mask utility (documented in release notes):

Conversion Flip-Flops PIO Controllers Analyzers
Blocks and demos that require toolboxes:

Controllers Filters System 10 Robust MuTools Neural
Control Demos Networks
Demos
FIGURE M4.2 SIMULINK Extras block.
466 Introduction to SIMULINK Module 4
Most commonly used blocks:

B
[i}
>/2
ill
00

yout
I
Inport Gain
To Workspace
Auto-Scale
Signal
Demux
Transfer Fen
Graph
generator
E
B
{2]


OJ

Cutpar! Sum Fcn
Scope
Mux Dis. Transfer Fen
XY grapl
Other commonly used blocks:
0 W ffi
[i}
Product Look Up Table Saturation Constant
fj
system
m
S-fullction
Switch
Rate limiter

From Workspace
@
Integrator
G
PID controller
MATLAS Fen

)
(s-1 )
s(s+1)
Derivative
Zero-pole
[]}
(9)
[j}
Step input Clock Sine wave
Transport Delay
Dis. Zero-Pole
1
1
;22-
1

Filter
l/z p
Unit Delay Full Block
Library
Slmullnk
FIGlJRE M4.3 SIMULlNK most commonly used blocks.
Double-clicking on the Block Lihmlyicon then reveals a window for the most com-
monly lIsed blocks, shown in M4.3. AltcrJl<ltivcly, you can simply enter h!ocklib in
the MA'l'LAI3 command window.
M4.2 TRANSFER FUNCTION-BASED SIMULATION
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
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
on the icon and changing the name in the variable space.
Sec. M4.2 Transfer Function-Based Simulation 467
yout I
Clock To Workspace
rnf---.. yout
Step input To Workspace1
Transfer Fen

Clock Time
::::::!Y=:=
Step input Output
Transfer Function
FIGlJH.E lVJ4.4 Blocks for transfer
function simulation.
FIGlJRE !\i14.5 Blocks for transfer
function simulation- -variables and
icons renamed.
Notice that the default transfer function has a pole at zero, that is, a simple integra-
tor. This is changed by 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
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
t
Clock Time

y
5s+1
Step input Output
Transfer Function
FIGURE IVI4.() Transfer function
sinwlation--first-order process.
468 Introduction to SIMULINK Module 4
15 20
___-------.l.--__ _ ----l
10
-- -r- - -- ---- -
-
5
0-
o
1.5
0.5
'5
Q.
'5
o
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

Step input Output
Transfer Function Transport Delay
FIGLJRE M4.8 Transfer function simulation----fjrst-order + time-delay pro-
cess.
FIGURE iV14.9 Simulation result. Step input at 1 I for first-order system
with delay of 5.
1.5
'3
Q.
'3
0
0.5
a
a 5 10 15 20 25
time
469 Printing SIMULINK Windows
2
Sec. M4.3
tau, theta) in the MATLAB cOllunand window before pcrforrning a new simulation. This
block diagram is shmvil in 17igurc M4. JO.
M4.3 PRINTING SIMULINK WINDOWS
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
which will send the figure to the dcfaull printer.
t
Clock Time
I y
Step input ' Output
Transfer Function Transport Delay
FIGURE [\'14.10 Transfer function simulation. "fhe values of k, fan, and theta
can be entered in the MATLAB command window before beginning the
Jation.
470 Introduction to SIMULINK
SUMMARY
Module 4
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.
1. Plot the step response of the following undcrdamped systcm
I:(s)ee
3
+ 5s +
when a step input of magnitude 2 is made at t;::; ),
2. Plot the step response of the following two transfer functions by performing a single
simulat.ion
3(--3.1 I- I)
g,(s)=, ..
25s + 5s -1- 1
3 ~ 3 s 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
3 e ~ 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)
for a step input change of I at f ;::: O.
STIRRED TANK HEATERS
After .':"tudying this module, the reader should be able to:
MODULE
5
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
crhc major seclions in this module are:
M5.1
M5.2
M5.3
M5.4
M5.5
M5.6
M5.7
Introduction
[)eye-loping the Dynamic Model
Steady-State Conditions
State-Space Model
Laplace-Domain J\1.odcl
Step Responses: Linear versus Nonlinear ivlodels
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
Module 5
F T
nk outlet
ket inlet Tji
Stirred Tank Heaters
ank F;
nlet T
i

- Jae

V T
Tank
Ta
Jacket
T
Jacket F
j
outlet T
j
472
FH;(JU.E MS.l Jacketed stirred tank healer.
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.
M5.2 DEVElOPING THE DYNAMIC MODEL
In this section we write the dynamic modeling equations to find the tank and jacket
pcraturcs. 'fhis methodology was developed in 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.
The notation that we use is presented in Table MS.l.
Sec. M5.2 Developing the Dynamic Model
TABLE MS. 1 Notation
473
Variables
;\
p
T
Q
II
V
j
ji
ref
s
Subscripts
area for heat transfer
heat capacity (cncrgy/mass"'tcmp)
yolumetric flowrate (volume/time)
density (mass/volullle)
temperature
time
rate of heat tnlllsfcr (energy/lime)
heat transfer coefficient (cncrgyltimc" arca$tcmp)
volume
inlet
jacket
jacket inlet
reference stale
steady-slale
M5.2.1 Material Balance Around Tank
The first step is to ~ r t a material balance around the tank, assuming constant density:
dVp . .
, = Fp - [op
dt I
Also, assuming constant volume (dVidt ;;::: 0), we find:
F= F,
M5.2.2 Energy Balance Around Tank
The next step is to write an energy balance around the tank.
accmllulation = in by now ~ out by /low + in by heat transfer + work done on system
dn; /. '7'[' F '7
c
[. f)1 W
= 'P'.,-'I) .,,+ ~ + "/'
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
dU ( Pi) ( P)
= Fp U
i
+ - Fp U +' + Q +
df Pi P
and since H:::: U + [lV, we can rewrite the energy balance as:
~ \
dff
!It
!lpV, ,
.._, =h,[J-h,J!+Q+W,
dt I
(MS. f)
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
= Fp ff-Ff>J! + f) + W
dt 'I ~ ~ . I
Neglecting the work done by the mixing impeller, and assuming single phase and a COI1-
stant heat capacity, we find:
!IT
Vpc" !It = Fpc"Cli - 1) + Q
or
!IT P - Q
=V (1;- 1) +
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
M5.2.3 Material Balance Around the Jacket
The material balance around the jacket is (assuming constant density):
assuming constant volume (dV/dt ::::: 0), we find:
M5,2.4 Energy Balance Around the Jacket
Next, we write an energy balance around the jacket. Making the same assumptions as
around the tank:
dTi = Fj (1" _ T) + Q
cit VJ)I ) V;Pjc
pJ
We also have the relationship for heat transfer from the jacket to the tank:
(MS.2)
Sec. M5.4 State-Space Model
Q UA Uj- T)
475
(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) + ' .
dt V t Vpc
p
(M5.4)
,17; _
dt
(M5.5)
M5.3 STEADY-STATE CONDITIONS
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 values of the system variables and some parameters
for this process arc given below.
M5.3.1 Parameters and Steady-State Values
It' Btu
61.3
Btll
F

1 C
= 61.3

,
111m
p p
"I" I'l'
T ftl
= 50"1" T
I
, 125"1" V 10ft
3

20t)" I" T 150T V I It'


JS
,
Notice that the values or UA and F
is
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
M5.4 STATE-SPACE MODEL
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
XC-"

1' ..1
I-I
J j.\
Stirred Tank Heaters
= state variables
Module 5
y,-II-I'I
.. Ij-IjI
= output variables
Recall that our two dynamic functional equations arc;
dl
dt
(MS.4)
dl;
dt 'l,(T:Ij,F;,F:I;:Ii,,,)
F VA (T- I)
J (T _ T) _ J .
V Jil V'
j
(MS.5)
ar
The clements of the stale-space A matrix arc found by: A _, ::.,-;.",1
II ax
J
A .= ill; = at;
22" -)( '1' 'r')
. oX
2
( j - 'js
A
21 aX
j
= al;
a(1 - I,) aT
af; = at;
a(1; - '0,) ali
ab
acr - T,) aT
F VA ,
V Vpc
p
VA
vpc
p
VA
V;P/;pi
?Js
lJA
V;

= 0.3
= 3,0
-4,5
The elements of the II matrix arc:
Nil =
ai, ill, aj;
= 0 = 0
JU
I iVi - 0,)
aF
J
al; ai, at; I =

8
12
1,1'
--7,5
-
dU
2
a(F- F,) aF v
ill; il/; F
N
n
..
alI, acr; -
-- OJ
1) V
1,1"
lJ
14
af, ilf,
0 = 0
-
(Ju
4
acri, - 7jiJ alji
477
ill, '[jis - 'Ii.)
50
ill'; VI
ill;
0

0
ilF
ilt,
-
0

0
ill;
ill;
F
I.Y
1.5
J7ji
Vi
ill;
il(F - FJ
Laplace Domain Model Sec. M5.5

" ' 'j., '('/' - '/'.)
eli, U i H
ill;
Ii", "
il", ilUi, - Ij,J
Since both states arc measured, the (' lnatrix is I. The numerical values for the matrices arc:
\ .... OA 03
1

3 -4..')
1
0 -7.5 0.1
o I
B-
- 50
0 0 1.5
C


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:
G(s) C(sI-A) 'n (M5.6)
Using the MATLA13 routine ss2 tf (sec appendix), we find:
[
15
G(s) (50s + 20)
(7.5s- 33.75) (O.ls + OA5)
- 22.5 0.3
s' + 4.9s + 0.9
OA5 I
(1.5s + 0.6)
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
(,)
,II' s2+4.9s+0.9
(MS.7)
Dividing (MS.7) hy 0.9, we find:
16.6667
1.111 + SA444s +
(MS.X)
(MS.S) can be factored into:
478
Stirred Tank Heaters
16.6667
~ (\) ~
II . (0.21236.1' + 1)(5.23207.1' + 1)
Module 5
(M5.9)
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
+ 4.9.1' + 0.9
(M5.10)
Similarly, lVe find (dividing (M5.10) hy 0.9):
22.2 (2,.5.1' + I
1:" (.1') cO
1.1 Ills' + 5.4444.1' " 1
Also, (M5.] I) can be l ~ l t o r e into:
(M5.11)
1:,,(.1')
22.2 (2.5.1 + 1
(0.212361' 1- 1)(5.2307.1' + I)
(M5.12)
M5.6 STEP RESPONSES: LINEAR VERSUS NONLINEAR MODELS
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)
J;(t) ~ fj, + x,(t)
Also,
",(I)
F(t) - F
J . I"
We will consider step changes of different magnitudes and differellt directions for this
system.
Sec. M5.6 Step Responses: Linear Versus Nonlinear Models 479
M5.6.1 Small Increase in Jacket Temperature
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.
M5.6.2 large Increase in Jacket Flowrate
Consider a step change of IJ) (from 1.5 to 2.5 n
3
/min) in jacket f1owratc. '['he responses
of the linear and nonlinear Illodels arc shown in Figure MS.3. The linear response is q u l ~
127
linear
LL 126.5
af
D
cL 126
E
2
x
c
~ 125.5
nonlinear
5 10 15
time, min
20 25 30
152.5
152
151.5
151
150.5
a. Tank Temperature
linear
nonlinear
150
o 5 10 15
time, min
20 25 30
b. Jacket Temperature
FJ(;{nu: M5.2 Response to sinall incrca::;e in jacket [Iowratc (0.1 ftJimin).
480 Stirred Tank Heaters
145
linear
Module 5
140
lL
g>
D
ci 135
E
J!l
'" c
J'l
125
o 5 10 15 20
nonlinear
25 30
175
170
165
160
155
time, min
a. Tank Temperature
linear
nonlinear
150
o 5 10 15 20 25 30
time, min
b. Jacket Temperature
F1GlJRE MS.3 Reponsc to a large increase in jacket fJowratc (1.0 ftJ/min).
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.
M5.6.3 Large Decrease in Jacket Flowrate
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>
'"
115
u
<i
E
110
j!)
x
c
105
J'l
100
95
0 5 10 15
time, min
20
linear
nonlinear
25 30
150
140
a. Tank Temperature
130
120
linear
nonlinear
110
o 5 10 15
time, min
20 25 30
b. Jacket Temperature
FIGlJRE M5.4 Response to a large decrease in jacket llowrate
~ 1 0 f(3/ min)
M5.6.4 Small Decrease in Jacket Flowrate
Consider a step change of ~ O l (from 1.5 to 1.4 ft
3
/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.
M5.6.5 Remarks on Step Response Behavior
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
125
LL
0) 124.5
-15
0:
E
2
x
c
J'l
123.5
Stirred Tank Heaters
linear
nonlinear
Module 5
123
o 5 10 15
time, min
20 25 30
a. Tank Temperature
150
LL
149.5
'"
'"
u
0:
149
E
2
"
148.5
x
0
."'-
148
linear
147.5
nonlinear
0 5 10 15 20 25 30
time, min
b. Jacket Temperature
FIGUn.E M5.5 Response to a small decrease in jacket flowralc (-0.1
ftJ/min).
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 froIII 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.
AI - 0.191 1 slow
1,2 -4.7089 fast
M5.7 UNFORCED SYSTEM RESPONSES: PERTURBATIONS
IN INITIAL CONDITIONS
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, RendI 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):
Unforced System Responses: Pert Urbations in Initial Conditions 483 Sec. M5.7
The eigenvectors are:
12 -10.82071 slow
I - 0.5714
''', c' I' 0.
0695
1 fast
0.9976
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.
M5.7.1 Slow Response
Consider an initial perturbation in the slow direction. Let the perturbation be of Inagni-
tude 5:
()
.'. "1.0.82071 . 1
4
.1
035
1
x 0 = 5"'v) y.
- 0.5714 2.R57
The physical state variables (tank and jacket temperature) arc:
I
1(0)1 = 1125j + l4.1
035
1 = 1129.10351
lj(O) 150 2.R57 152.857
'The responses for a perturhation in the slow direction arc shown in Figure M5.o.
M5. 7.2 Fast Response
Consider an initial perturbation in the fast direction. Let the pertubation be:
(
. .'. "I-o.O()95j 1.-0.34751
x 0) = 5"12 . 5' =
2 0.9976 4.9RR
484 Stirred Tank Heaters Module 5
30 25 20 10 5
151
150
o
150.5
130
LL
129
en
'"
u
128
<i
E
2
'"
127
c
J'!
126
125
0 5 10 15 20 25 30
time, min
3. Tank Temperature
153
152.5
time, min
b. Jacket Temperature
FIGURE M5.6 Initial perturbation in the slow direction.
The physical state variables (tank and jacket temperature) are:
[.
T.(O)j = [1251 + 1.-0.3475] = [J24.6525.]
7;(0) 150 4.988 154.988
The responses for a perturbation in the fast dlrection are shown in Figure MS.? (note
time scale change from Figure M5.6).
In Figures M5.6 and M5.? we have shown the effect of initial condition "difC(otir>ll
This can be illustrated more completely by viewing the phase-plane behavior.
Unforced System Responses: Pert Urbations in Initial Conditions 485
3 2.5 2 1.5
125
~ 124.9
w
D
ci
E
124.8
2
~
" :'l
124.7
124.6
0 0.5
Sec. M5.7
time, min
a. Tank Temperature
155
LL
154
'"
w
D
ci
153
E
2
ill
152
'"
"
.<;!.
151
150
0 0.5 1.5 2 2.5 3
time, min
b. Jacket Temperature
FIGUUE wI5.7 Initial perturbation in the fast direction.
M5.7.3 Phase-Plane Behavior
The phase-plane behavior is shown in Figure M5.S, where the Tank Temperature is plot-
ted on the x ~ x s 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
1.
--0.3475] direction
4.lJ88 -.
486 Stirred Tank Heaters Module 5
FIGURE 1\'15.8 Phase-plane
behavior of the stirred tank heater
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:
Denn, M.M. (1986). Process Modeling, New York: [,ongman.
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 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
Illen! to another, as shown in the diagram below.
F T
Tank outlet
Jacket inlet
;

;-- f--
V T
Tj2
Tank
1j1

Jacket Fj
outlet 7]2
Tank
inlet T
APPENDIX
1. Using MATLAB to convert from state-space to transfer function
models-ss2tf
STATE SPACE MODEL
a
.4000 0.3000
3.0000 -4.5000
b
0 0.1000 0
50.0000 0 0 1.5000
c
1 0
0 1
c1
0 0 0 0
0
(]
0 0
Find transfer function polynomials for input 1:
(numl,den]
numl =
ss2tf(a,b,c,d,l)
o
o
den
1.0000
0.0000
50.0000
4.9000
15.0000
20.0000
0.9000
Find transfer function polynomials for input 2:
[num2,c1en]
Dum2 =
ss2tf(a,b,c,d,2)
o -7.5000 -33.7500
o -0.0000 -22.5000
1.0000 4.9000 0.9000
Find transfer function polynomials for input 3:
[num3, den] ss2tf(a,b,c,d,3)
num3
-
0 0.1000 0.4500
0 0.0000 0.3000
dE-;Il
1.0000 4.9000 0.9000
Find transfer function polynomials for input 4:
(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
Eigenvalues and eigenvectors
[v, lambda]
v
0.8207
0.5714
laml)(ia
-0.1911
o
eig(a)
0.0695
0.9976
o
-4.7089
Appendix 489
2. MATlAB function routine for nonlinear heater model
%
% parameter and steady-state variable values are:
%
%
% odes
%
dTdt = (FjV)*(Ti - T) + UA*(Tj - T)j(V*rhoep);
dTjdt = (FjjVj)*(Tji - Tj) - UA*(Tj - Tij(Vj*rhocpj);
xdot(l) dTdt;
xdot(2) = dTjdt;
temperature in tank
temperature in jacket
change in jacket flowrate
Tank flowrate
Tank inlet temperature
Jacket inlet temperature
Tank volume
Jacket volume
density*heat capacity
density*heat capacity,jacket fluid
T
Tj
1
1.5;
50i
200;
10;
1 ;
61. 3;
61.3 ;
i83.9;
delFj -0.1;
Fj ~ Fjs + delFj;
T ~ x l ;
T j ~ x(2);
F
Fjs
Ti
Tji
V
vj
rhocp
rhocpjo::o
UA
%
%
% x(l)
% x(2)
% de1F:j
% F
% Tin
:5 'l'j i
% V
% Vj
% rhoep
% rhocpj
function xdot ~ heater(t,x);
%
% Dynamics of a stirred tank heater
% (e) 1994 - B.W. Bequette
% 8 July 94
FigureM5.7a is obtained using the following commands:
xO ::::::
124.6525
154.9880
( t, xl :::;: ode45 ( 'heater I ,0,5, xO) ;
plot (t, x ( : , 1) )
ABSORPTION
An Example of a Linear
Equilibrium Stage System
After studying this module, the reader should be able to:
MODULE
6
Understand step response behavior of absorption columns
Use the MATLAB functions initial and step for state space simulations
Use eigenvalue/eigenvector analysis to understand unforced system behavior
Understand how zeros affect the step response hehavior oftranslcr functions
The major sections of this module arc:
M6.1
M6.2
M6.3
M6.4
M6.5
Background
T'he Dynamic Model
Steady-State Analysis
Step Responses
Unforced Behavior
M6.1 BACKGROUND
Separations processes play an important role in most chemical manuracturing processes.
Streams from chemical reactors often contain a number or components; sonlC of these
components must be separated from the other components for sale as a final product, or
for usc in another manufacturing process. A common example of a separation process js
gas absorption, which is normally used to remove a dilute cOlnponent from a gas stream.
490
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.
Sec. M6.2
Liquid
Feed
Liquid
Product
L
X
f
L
x"
The Dynamic Model
-. I
1
n
t
v
v
YIJ+l
Gas
Product
Gas
Feed
FIGliRE M6.J Gas absorption
column, II stages.
491
M6.2 THE DYNAMIC MODEL
M6.2.1 Basic Assumptions
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.
M6.2.2 Definition of Variables
We use the following variable definitions:
492
moles inert liquid
time
Absorption
liquid molar flowratc
Module 6
v
M
w-
y,
vapor
time
moles
stage

stage
moles solute i)
mole inerlliquid (stage i)
moles solute i)
mole inert vapor (stage i)
= vapor molar flowratc
= liquid molar holdup per stage
vapor molar holdup per stage
M6.2.3 Equilibrium Stage
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,
M6.2.4 Solute Balance Around Stage i
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" + Wy) _ ,
- LX
i
_
l
+ VYil1 - VYi
ilt
(M6.1)
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,)
ilt
= L X
i
_
i
+ V Yi+ I f, Xi VYi
LXi__ j VYi
(M62)
FIGURE M6.2 A lypical gas
absorption stage.
Our next assumption is that the liquid InolaI' holdup (M) is constant, then we can write
(Mo.2) as:
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.
Sec. M6.2 The Dynamic Model
L V L V
lW
XiJ
+ M
Yill
-Mx;-M
Yi
493
(Mo.3)
M6.2.5 Equilibrium Relationships
The simplest relationship is a linear cquilibriuln relationship:
(Mo.4)
where y is the gas phase composition (mole solute/mole inert liquid), x is the liquid phase
composition (mole solute/mole inert vapor), ; represents the ith stage, and a is an q u i l i ~
riuID parameter.
M6.2.6 The Modeling Equation for Stage i
Substituting the vapor/liquid relationship from (MG.4) into the material balance (MG.])
yields:
dX
i
_
ill
(Mo.5)
which can be written in the following form:
dX
i
L
Jt,-c-=M-
ri
+ 1 -
+ Va) Va
M xi -!- M
Xi
+ 1
(Mo.o)
It should be noted that (M6.6) will yield a matrix with a tridiagonal structure.
M6.2.7 Top Stage
The balance around the top stage (stage I) yields:
dX
i
ill
(I. + Va)
-- Nt x, j-
Va
M x, +
(M6.?)
where XI' is known (liquid feed composition).
M6.2.8 Bottom Stage
The balance around the bottom stage (stage n) yields:
ilx". L (L + Va) V
df -= M
Xn
--- 1 - M XI/ + M YIl11
where YI/+[ is known (vapor feed composition).
(Mo.8)
494
----------------
Absorption Module 6
EXAl\;IPLE j\iJ().J Absorption Column
The modeling equations (M6.6) -(M6.X) can he written in the following form:
dX
I
+
Va L
Xl
I
;Yf X2 -
/1,1/ x/
(stage I)
til M
L + Va
M
Xj
-
x
2 M );3
(Slage 2)
tit M
tL"r
J
L (L I Va) Va
r!t
M
X1
-
M
.r
l
M
X
4
(stagcJ)
dX,j L (L I Va) Va
M
X
:; -
X
4
+ );5
(stage 4)
tit M M
dX
5
L (L I Va) V
t - X
5 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
L (L I Va) Va
"I
M M lvl
I:
L (L I Va)
0
M M
L
,X
s
0 0
M
0 0
()
L
M
0
0 0
+ 0
()
IXI I
() ()
_Y6_
V
()
M
which is the statc-space form
x Ax+Hu
()
()
Va
M
(L I Va)
M
L
M
0
0
>1
X
2
0 x,
Va
X
4
M
_X,;_
(L I Va)
M
(M6.IO)
M6.3 STEADYSTATE ANALYSIS
We have shown that the form of the dynamic equations for the absorption column arc:
Sec. M6.3 Steady-State Analysis
x=Ax+Bu
495
(M6.IO)
At the time derivatives arc zero, so:
o Ax+ HII (M6.11)
The values of x can be found by solving (M6.ll) to find:
x ccc -A 'BII (M6.12)
EXAMPLE M6.2 Parameters for the Fifthstage Column
Lel the liquid feed flowrateL:::::; 80 kgmol inert oi1lhr, vapor feed flowratc V:::::; 100 kgmol air/hI',
equilibrium parameter a:;;: 0.5, liquid feed composition xI';:::. 0.0 kgmol benzcne/kgmol inert oil,
and vapor feed composition Y6 0::: O.l kgmol bcnzcnc/kgmol air. Let's operate with units of min-
utes, so L 0::: 4/3 kgmol inert oil/min and V:;;: 5/3 kgmoJ air/min. Assume that the liquid tnolar
holdup for each stage is M :;;: 20/3 kgmol.
The numerical values yield the follOWing matrices:
A
0.325
0.2
o
o
o
0.125
- 0.325
0.2
o
o
o
0.125
0.325
0.2
o
o
o
0.125
0.325
0.2
o
o
o
0.125
-0.325
(M6.13)
II
[
0,2
o
o
o
o

o
o
025
(M6.14)
The steady-state Input is:
1
X"I 1
0
.
0
]
US =Y6S --= JU.
Solving for T at we find X
s
"'" -Aln u,\"
[
1J.()076.
0.0198
x, O.1J392
Il.0704
(l.! 202
(M6.ls)
(M6.16)
496 Absorption Module 6
I
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
___ ..
M6,4 STEP RESPONSES
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.
+ H Au
M6.4.1 Step Change in Vapor Feed Composition
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
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.
Therefore, the C and J) matrices arc:
0 0
O.S 0
01
o 0
o
o
o
o
[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.07 ; ~ _ T- ...............
0.06
0.05
0.04
"' ,I
0.03
0.02
0.01
o
o 20 40 60 80 100
t(min)
FIGlJRE M6.3 Response of bottom composition 10 a step increase in vapor
feed composition of 0.05, at t :::: O.
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
0
___J,
-j--
0 20 40 60 80 100
t(min)
FIGURE M6.4 Response of top vapor composition to a step increase in
vapor feed composition of 0.05, al t;;;:; O.
---------.. _---
~ : : ; ; ; ; ~
Module 6
100
3
5
80
Absorption
60 40 20
498
0.07
0.06
0.05
'"
0.04
'"
ill
,,'
0.03
0.02
0.01
0
0
'(min)
FIGURE M(.,SRespollse of stage compositions to a step increase in vapor
feed of 0.05, at I = O.
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.
M6.4.2 Step Change in Liquid Feedstream Composition
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
'(min)
60 80 100
FIGlHU'-: M6.6 Response of stage compositions to a step incrc<lse in vapor
reed composition of (l05, at t:::: O. Normalized deviation variables are plotted.
!
~ ~ .... .--.........
Sec. M6.4 Step Responses 499
0.01
~
.--_.__..... --_.
~ ~
0.008
0.006
'"I
0.004
0.002
FIGURE M6.7 Response of hottom composition to a step increase in liquid
feed composition of 0.025 at t "" O.
o
o 40
t(min)
60 80 100
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.
100 80 60 20
'- --'-- ~ _ ~ ~ ~ _ _ _ _ , L. _
40
0.014
0.012
0.01
0.008
~
0.006
0.004
0.002
0
0
t(min)
FIGURE M(j.S Response of lOp vapor composition to a step increase in liquid
feed composition of 0.025 at t :::0 O.
500 Absorption Module 6
0.025
0.02
100 80 60 40
t(min)
-----'------
20
0005
0.015
w
g'
175
>(I 0.01
FIGURE M6.9 Response of stage compositions to a step increase in liquid
feed composition of 0.025 at t :;;: O.
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

0.4
0.2
100
t(min)
FIGURE M6.1O Response of stage compositions to a step increase in liquid
feed composition of OJ)25 at t "" 0 min. Normalized deviation variables arc
plotted.
Sec. M6.5 Unforced Behavior
501
M6.4.3 Transfer Function Analysis
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.
M6.5 UNFORCED BEHAVIOR
Eigenvalue/eigenvector analysis can he Llsed to understand the effect of perturbations in
the initial conditions on the relative speeds of response. The eigenvalues span an order of
magnitude, from min-
1
to -0.6 min-I, as shown by the MATLAB command:
[V , d] (arnat)
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.
v
Columns 1 throuqh 4
-0.16931748198570
O. )"109'':';601705416
-0.54181594235423
0.59352962728666
-0.433452"15388338
Column ')
-0.27472527472528
0.34750303957894
0.00000000000000
-0.55600486332631
0.70329670329670
-0.16931748198570
-0.37095601705416
-0.54181594235423
-0.59352962728666
-0.43345275388338
-0.314446"15225915
0.00000000000000
0.50311480361464
-0.00000000000000
-0.80498368578343
0.2"/472527472527
0.34750303957894
-0.00000000000000
-0.55600486332631
-0.70329670329670
The reader should show (see student exercise 2) that the following perturbation in
initial condition:
FURTHER READING
EXERCISES
Module 6 Absorption
0.1693
03710
XII - 05418 0.025
O.s935
- OA335
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.
LuJ'belL \V.L, & L.A. V'/eIlzcl. (I 9X8). Chemical Process Analysis: J\.4oss and i ~
ergy Ba/aJ/ces. Englewood Cliffs, NJ: Prentice {Iall.
oI m,
IU710
XII ~ 0.5418 '0.025
0.5935
OA335
SUMMARY
502
yields it response tll,1! is u\'cr ten times faster than the follmving penurhation in inilial
condition:
The gas absorption example is a modification of an example presented by:
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,
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.
APPENDIX: MATLAB
96 absorp C'x. m
5[, absorption example - Process Dynamics
% orginal version - 29 June 93
% (c) B. Wayne Bequette
% revised - 7 June 1997
% aeq gas/liquid equil coeff
% ns :;;:: number of stages
% liq :;;:: liquid molar flowrate
% vap :;;:: vapor molar flowrate
% mholc1 liquid molar holdup per stage
% xfeed liquid feed composition
% yfeed vapor feed composition
%
% set parameters
5;
liq 80/60;
vap 100/60;
mho1d - 2013;
xfeed 0;
yfeed 0.1;
aeq :;;:: 0.5;
.,
"
%
amat
bmat
zeros(nS,ns)i
zeros(ns,2);
% calculate ratios
%
Ivratio
lratio
vratio
-(liq+vap*aeq)/mhold;
- liq/mhold;
- vap*aeq/mholdi
amat(l,l)
amat(1,2)
lvratioi
vratio;
for i 2:ns-1;
- Iratio;
amat (i, i) lvratio;
amat(i,i+l) vratio;
end
arnat(ns,ns-l)
amat: (ns, ns)
- lratioi
Ivratioi
504
bmi'J.t(l,l) :::: lratio;
bmat(ns,2) vap/mhold;
% calculate the steady-state
xs :::: -inv(amat) *bmat* [xfeed;yfeed];
% perform step tests using step
Absorption Module 6
'(; ,,;tep c11(:1.n90 thf" vapor feed composition at t 0
Clni'\.t zero:,:-; (2, n:::;) i
cmaL(l,Ils) 1;
cmat(2,l) :::: aeq;
dmat zo1'08(2,2);
'(,
[Y,x,L]=step(amat,bmat,cmaL,dmaL,2);
% actual step magnitude was 0.05
"
-(I
y - y-kO.Ol:J;
x :::: x-kO.O:)i
plot the liquid composition leaving the
absorber (deviation variables)
ploL(L,y(o,l), 'w')
xlabel (' t (min) , )
ylabel ('x_liq')
%
pause
plot. the vapor composi tion leaving the absorber
plot (L,y( ,2), 'w')
xl abel ( , L (mi n) , )
ylabeJ ( 'y_vap ')
pause
% plot each stage liquid composition (deviation)
plot (t , X, 'w')
xlabEd ( F t (min) ')
yL:dx'l ( r X
pause
plot- each std9(-;, normalized by the final change
nt - lC'nqth(t);
Appendix 505
for i :::-, l:ns;
xscale(:, i)
end
x(:, i) Ix(nt, i);
%
plot (t,xscale, 'w')
xlabel ( 't (min) , )
ylabel ( 'x_scaled' )
pause
% now, do a step change in liquid feed comp
[yl, xl, tl] =step (amat, bmat, cmat, d m t ~ 1) i
% actual input change was 0.05
yl yl *0.025;
xl xl*O.025;
%
% plot: the liquid composition leaving the
% absorber (deviation variables)
%
plot (tl,yl (:,1), 'w')
xlabel ( , t (min) , )
ylabel ( 'x. 5 ' )
%
pause
%
% plot the vapor composition leaving t:he absorber
plot(tl,ylj:,2))
%
pause
% plot each stage liquid composition (deviation)
plot (tl,xl, 'w')
xlabel ( 't (min) , )
ylabel ( 'x_st<Jge' )
pause
% plot scaled liquid compositions
%
ntl Length (tl) ;
plot(tl,xscalel, 'w')
xlabel ( 't (min) , )
ylabel ( 'x_scaled' )
xl ( : , i) Ixl (ntl, i) ;
for i = l:ns;
xscalel (:, i)
end
%
%
ISOTHERMAL
CONTINUOUS STIRRED
TANK CHEMICAL REACTORS
After studying this module, the student should be able to:
MODULE
7
Determine the steady-state behavior of an isothermal CSTR (number of stcady-
states)
Determine the stability of a particular s t e d y ~ s t t
Find the statc-space and transfer function form of a linearized CSTR model at a par-
ticular steady-state
Show that steady-state gains calculated from the steady-state equations arc consis-
tent with the transfer function gains
The major sections of the module arc:
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
F
Sec. M7.2 Irreversible Reaction
v
507
FIGURE 1\17.1 Continuous stirred
CB tank reactor (CSTR).
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
action scheme with a number of interesting characteristics is presented in Section 1\17.3.
M7.2 FIRST-ORDER IRREVERSIBLE REACTION
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
::::: kC
A
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;\
M7.2.1 Component Material Balance on A
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
where k is the reaction rate constant. Since V is constant:
F .
VeA(
which we can write as:
dC
A
dt
(M7.1)
M7.2.2 Component Material Balance on B
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 Vis constant:
dC'/)
til
F
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.
M7.2.3 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):
F
s('
V
F
S _I k
V
(M7.J)
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 we would expect complete conversion since we have
an irreversible reaction.
Sec. M7.2 First-Order Irreversible Reaction 509
The 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
DC(I/I'
kV
+k
F
,
(M75)
Notice that we can rnakc a general plot of the solution of (M?3) by dividing by C"VI' to
find
1
F
kV
F
+
kV
(M7.6)
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
J
0.6
J
0.4
0.2
0
0 2 4 6 8 10
kVIF
F(;ORE M7.2 Dimensionless concentration as a function of kV/F.
510 Isothermal Continuous Stirred Tank Chemical Reactors Module 7
0.8
~
0.6
cJ
J
0.4
0.2
0
0 2 4 6 8 10
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
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:
FIGURE \\'17.3 Dimensionless concentration (equation (M7.4 as a function
or NkV.
(M7S)
(M7.7)
C.lt>'
CArs
k C
eVi
'
I"
+k
V
FlVk
I"
y +
kV
k C ~
17\.
V
I"
k V elf,
(J) V t k
which can be written:
subsriruring (M7.5) into (M7.7):
Sec. M7.2 First-Order Irreversible Reaction
0.8
." 0.6
<J
J
0.4
0.2
0
0 2 4 6 8 10
F/kV
511
FIGURE M7.4 Dimensionless concentration of B as a furH:tion or reactor
f1owratc.
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 indicating complete conversion of
A to B (sec Figure M7.4). Notice that this figure is lIie mirror image ofFigurcM7.3.
M7.2.4 Dynamic Behavior
Let the state variables in deviation form be represented by:
Xl (:A CAs
'\:2 = er; - C'IJ.\'
Also, let the input variables in deviation form be represented by:
Il] P -PI'
lt
z
::;::: C'AI -
The state space model (by linearizing (M7.1) and (M7.2) is then:
(M7.9a)
(M7.9b)
(M7.9c)
(M7.9d)
dX
J
ell
d''(2
ell
(M7.IOa)
(M7.IOb)
or,
dx]
ell
dX
1
= an Xl -+- an X
2
-+- b
2
! llJ
ell
(M7. lOa)
(M7.IOb)
512 Isothermal Continuous Stirred Tank Chemical Reactors
Module 7
Writing in state-space matrix notation:
!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)):
which can be written in gain-time constant fortn as:
x,(s) "I(S) + 1 ",(s)
TI'" + 1 TjS +
(M7.lla)
(M7.llb)
where
k"
/.' .. '
Jl = F =
a .\ + k
" V
k
(
F
o
.)'
'+ k
V
(M7.12)
Notice that k
ll
is consistent with (M7.4).
T
I
a" [ JI Ie J 2"'11,:)
'" 1(2;;)
(M713)
(M714)
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? J2). 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:
b
2l
.l' + (b
ll
"21 b
21
"1l) 1/,(.1')1 1/
2
(.1')
(.I' - "ll)(S - "n) (.I' - "JI)(s - an)
513
(M7.17)
(M7.18)
(M7.15)
(M7.16)
O.21I
UI
.1
o 11.,
k y )
I + I) 1l,(S)
0.2 min I
= 0.2 min -I
o II XI I IO.S
O.2h + - O.S
.1.)
uIC') + (
TIS +
/;
V
k
h
I2
{{:n
(lll(ll1
kl)
gmol
CAj, = 1.0 liter
[
clXll
cI/ - 0.4
clx,= I 0.2
cit
First-Order Irreversible Reaction
which yields the following model:
The following figures compare responses of the nonlinear and linear systems
Consider a system with the following parameter and steady-state values:
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.
where:
M7.2.5 Numerical Example
which can he written in the form of:
Sec. M7.2
514 Isothermal Continuous Stirred Tank Chemical Reactors Module 7
A
0.515
0.51
0.505
0
c
0.5
0
0
0.495
0.49
0.485
0 5 10
time, min
B
15 20
.FIGURE M7.5 Small (0.01) step change in FlV. Solid = nonlinear, dotted
-= linear.
SMALL STEP CHANGE IN F/V
In Figure M7,5 we compare the responses of the linear and nonlinear models for a small
(0.01) step change in FlV. Notice that the models yield virtually identical results.
LARGE POSITIVE STEP CHANGE IN FIV
In Figure M7.6 we compare the r s p o ~ s of the linear and nonlinear models for a large
positive (0.2) step change in F/V. The nonlinear model has a lower "gain" than the linear
model for bOlh states.
A
0.8
0.7
0.6
0
c
0.5
0
0
0.4
,
0.3
,
0.2
0 5 10
time, min
B
15 20
FIGURE M7.6 Large (0.2) slep change in FIV. Solid =: nonlinear, dotted
= linear.
Sec. M7.2 Irreversible Reaction 515
FlGUREM7.7 Large negative (-0.2) step change in F/V. Solid:;:;: nonlinear,
dotted:;:;: Ii near.

---
0.8
0.6
0
c
0
u
0.4
0.2
0
0 5 10
time, min
B
A
15 20
LARGE NEGATIVE STEP CHANGE IN F/V
In Figure M7. 7 we compare the responses of the linear and nonlinear model s for a large
negative (-0.2) step change in FlY. The nonlinear model has a higher "gain" than the lin-
ear model for both states.
M7.2.6 Phase Plane Analysis
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
tor := The fast eigenvalue is with an eigenvector = 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.
M7.2.7 Summary of Behavior of the First-Order Irreversible
Chemical Reaction
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 but a
second-order transfer function relates eNto 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
M7.3 VAN DE VUSSE REACTION
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
"
k
2
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.
M7.3.1 Modeling Equations
OVERALL MATERIAL BALANCE
Assuming constant density and constant volume:
dV
() and F = F;
dt
COMPONENT A BALANCE
The balance on Ais:
accumulation = in - out by flow - out by reaction 'I -- out by reaction 2
d(VC
A
)
dt
Since V is constant:
d(C
A
)
dt
(M7.19)
Sec. M7.3 Van de Vusse Reaction 517
COMPONENT B BALANCE
Similarly, we can write:
d( ell)
dl
COMPONENT C BALANCE
Also, for component C:
d(C
e
)
dl
(M7.20)
(M7.2! )
COMPONENT 0 BALANCE
And component D:
d(Cu)
dl
(M7.22)
Look at equations (M7.!'!) through (M7.22). Notice that (M7.!'!) ami (M7.20) do not dc
pend on C
c
or Cf). If we arc only concerned ahout C
A
and C
u
' we only need to solve equa-
tions (M7.!9) and (M7.20).
d(CA)
dl
d(('ilL
dl
(M7.!'!)
(M7.20)
Solving for the steady-slate for (M7.19), we find a quadratic equation in ~ h
Solving this quadratic (using the positive root), we find:
These results lead to the input/output curves presented in Figure M7.8.
2k,
v + k2
I(
r)' (r)
\ k, + ~ " + 4k, ~
+
and solving for Cns:
518
..m
s
o
E
Isothermal Continuous Stirred Tank Chemical Reactors Module 7
o
o 2 3 4 5 6 7 8 9
Fs1V,1/mJn
a. Concentration of A as function of the space velocity.
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
b. Concentration of B as a function of the space velocity.
FIGURE M7.8 Steady-slate relationships for the Van de Vussc reactor.
Notice that there is a maximum value of the concentration of B. If the objective of
the process is to maximize the production of B, then there exists an optimum residence
time (FsI\!) of 1.292 min--
1
(a function routine to find this is shown in the appendix).
STATE-SPACE MODEL
Here we linearize the nonlinear modeling equations to find the s t t ~ s p 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:
I
CA -- C"'J .
X :0--;,,' '"= slate vanables
.C
B
C/J.I'
II c [G inplIt variable
y 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:::::
_ elI; elI
I
P; ,
A lI -_) ..)( ()" y-kl -2k'(A'
(XI (C
A
-'A' oC,1
eli; eli;
A
I2
;);2 el( C
II
- C
II
,.) JEll 0
_ eli; _ aj; _ aj; _
A -- - '---",C'-' - ,., - k
21 ax, a(C
A
- C
A
,) ae" I
A a;; ai;
22 aX
2
il( C
II
- Cfi") dC"
all , ,
= ------ii = CAfl' - CAs
D
y
ili;
F
D
y
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
CHI' = 94
which yields the following stale-space model:
alOl
1.117 .
liter
r
-2.4048
A-
0.8333
B C" 7.00001
1.1170
o I
"2.2381
The transfer function relating input I to output 2 is:
g2l(S)
which has a zero in the right-half plane:
zero =
" 1.1170.1' + 3.1472
+ 4.6429.1' + 5.3821
3.1472
2.8175
1.1170
The process transfer function can also be written in the form:
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
94
1.117
11101
liter
Sec. M7.3 Van de Vusse Reaction 521
And the state-space model:
A [-5.7367
0.K333
= I 3.
9130
1
B -1.1170
o I
4 5 4
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
linear
1.123
1.122
1.121
2
~ 1.12
E
.0
1.119
0
1.118
1.117
1.116
0
nonlinear
2
time, min
3 4 5
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
E
.ci
o
,
I
I
,
I
I
I
,
)
time, min
nonlinear
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
FIGURE M7.lt Response to a small step change in space velocity (0.1),
case 2 conditions.
Sec. M7.3 Van de Vusse Reaction 523
1.2
1.1
2
~
E
.ci
0
0.9
nonlinear
0.8 \
,
,
linear
0.7
o 2 3 4 5
time, min
FIGURE M7.12 Response to a large step change (doubling of space velo-
city), case 2 conditions.
CASE 3 OPERATING AT THE PEAK
which has a zero at the origin.
The transfer function relating input I and output 2 is:
o I
--2.95RR
mol
C", = 1.2660
liter
l
-- 3.6237
O.R333
I ~ ~ ~ ~ { I I
A
mol
C,,, = 4.4949 .
lIter
-- 1.2660 S
g.'l(s)-
- s' + 6.5R25 s + 10.7217
F
-, = 1.2921 min I
V
which yields the composition:
and the state-space model:
"fhe optimum opcraUng point for the production of B is at the following dilution rate:
524 Isothermal Continuous Stirred Tank Chemical Reactors Module 7
1.266
i
I
21.265 j
~ ,
E
tf
1.265
1.264
a
i
i
I
j
linear
nonlinear
2
time, min
3 4 5
FIGUREM7.13 Response to a small step change, case 3 (peak operating
point) conditions.
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.
REFERENCES AND FURTHER READING
The following reference presents a more detailed study of an exothermic reactor that
the same reaction scheme as the Van de Vusse reactor.
Engell, S., & K.-U. Klatt. (1993). Nonlinear control of a nOIH11IIHlllllln-[lhasc
CSTR. Proceedings ~ f t h 1993 Arnerican Control Conference, 2041 --2045.
Appendixes 525
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
t. Consider the A ----7 B example. Extend this to a reversible reaction A H B in a
CSTR, where both the forward and reverse reactions are first -order, and where there
is no B in the feed stream.
a. Derive the model.
b. For the case where the reverse reaction rate constant is 1/2 the forward reaction
rate constant (which is 0.1 Illite
l
), find the value of F/V where thc conversion of
A is SO%.
c. [,'or a stcp increase in the feed concentration of A of IO/X), find the change in the
A and B concentrations in the reactor.
2. Consider the yan de Vusse reactor. Include C and J) as stale variables and write the
slale-space model. Find the transfer functions relating F/V and C
c
and CJ).
APPENDIXES
A1 Generate Steady-State Input/Output Curves
for the Van de Vusse Reaction
[fsov, cbs, cas]
% 25 july 94
% (c) b.w. bequette
%
vandss(kl,k2,k3,cafs) ;
% finds the input/ouLpuLcurves for
the vand de vusse reactor
%
% fsov
% cas
% cbs
% cats
%
fsov
st:eady"-state space velocity, fs/v
st:eac1y--state concentration of a
concentration of b
feed concentratioon of a
O;O.LIO;
526 Isothermal Continuous Stirred Tank Chemical Reactors Module 7
%
%
casl
cas2
cas
-(k1 I fsov)/(2'k3);
- sqrt ((k1+fsov) ,A2 + 4*k3*fsov "leafs) / (2*k3) ;
casl + cas2 i
% cas - O.Ol*cas:cafs/100:O.80*cas;
%
% [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
fmin( 'vanmax' I 0,2)
function cbsmin ::: vanmax(x) ;
%
% 25 july 94
% (e) b.w. bequette
()6 finds the maximum of cbs with to [soy for
9" the van de vusse reaction
9"
% use mat lab function fmin which finds the minimum of a
function
% take as thp function Lo be minimized,
% which is equivalent to maxirnizins,J Cbf.:>
%
)8 fsov
cas
% cbs
% cafs
;';
steady-state space velocity, fs/v
concentration of a
concentration of b
feed concentratioon of a
- 5/6;
5/3;
1/6;
10;
k1
k2
k3
cafs
%
fsov x
%
casl
-
-(kl + fsov) / (2*k3);
cas2 sqrt((k1+fsov)"2 I 4*k3*fsov*cafs)/(2*k3);
cas casl + cas2;
%
cbs
cbsrnin
k1*cas/(fsov + k2);
- cbs;
Appendixes 527
AJ Van de Vusse Function File for Integration Using ode45, vanvusse.m
function xdot :::: vanvusse{t,x);
%
% (e) b.w. bequette
% 25 July 94
% revised 20 July 96
%
6 dynamic for the van de vusse reaction
<[)
% to this funct,ion file with ode45:
%
%
%
[tc,x] ode45{'vanvusse',tO,tf,xO]
% fov
% ca
7> cb
% caf
where to is the initial time (usually 0)
tf is the final time
xO is the ini condition for t::.he states
%
%
%
%
% x
x(l)
x(2)
t
states
- concentration of A
concentration of B
time
dilution rate
concentration of a
concentration of b
feed concentrat::.ion of a
%
%
%
% the reaction scheme is
constant for A -> B (minA-l)
constant for B -> C (minA-l)
constant for A + A D (mol/(liter min)
concpntration of A, mol/liter
C
(k2)
kl

5/6; % rate
k2

5/3; % rate
k3 1/6; % rate
cat - 10; % feed
% equations
%
dcadt - fov*(caf ca) k3*ca*caj
dcbdt + kl*ca - k2*cb;
ea xl]) ;
eb x(2) ;
%
% use familiar notation for the states
%
% A --> B
0, (kl)
% 2A D
% (k3)
% for step changes in fov, use the following
% fov:::: 4/7 + delf;
528 Isothermal Continuous Stirred Tank Chemical Reactors Module 7
xdot (1) dcadt;
xdot(2) - dcbdt;
A4 Various Cases for the Van de Vusse Reactor
% derivatives placed in vector notation
a
-2.2381
-2.4048
0.8333
al
[vl,dl] = eig(al)
vI
()
1.0000
0.1962
-0.9806
d1 -
2.2381
o
o
-2.4048
a2 0;.8333 -4.54111
cl2

0.8333
o

[v2,d2]= eig(a2)
v2
o
1.0000
0.8204
-0.5718
d2
-4.5411
a
o
-::i.7367
",13 3.6237 0; .8333 -2.9588J
a3 -
-3.6237
0.8333
a
-2.9588
[v3.d3] - eig(a3)
v3 -
a
1.0000
0.6237
-0.7817
c13 -
-2.
a
a
-3.6237
BIOCHEMICAL REACTORS
After studying this module, the student should be able to
MODULE
8
Develop the dynamic modeling equations for a biochemical reactor
Understand the concept of "washout"
Understand the different types of steady-state and dynamic behavior exhibited by
the MOl1od and Substrate Inhibition models
Find the numher of steady-state solutions and to determine the stability of each
steady-stale
The Inajor sections of this module arc:
MS.I
MS.2
MS.3
MS.4
MS.)
MS.6
MS.7
MS.S
Background
Modeling
Steady-state Solution
Dynamic Behavior
Linearization
Phase-plane Analysis
Understanding Multiple Steady-states
Bifurcation Behavior
M8.1 BACKGROUND
Biochemical reactors arc used to produce a large number of intermediate and final
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
Module 8 Biochemical Reactors
F
530
F
X1l
.-
x"
X,
x
2
V
X,
X2 FIGUH.E MS.l Biochemical reactor.
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:
Xl = biomass concentration
mass of cells
volume
X
2
= substrate concentration
mass of substrate
volume
1'1 = rate ofceH generation
mass
vol lImc -time
"2 -_'::0 rate of substrate consumption
mass of substrate consumed
volume- time
F = volumetric f10wrate -= volume/timc
Now we can write the material btdances to describe the behavior of this systell1.
M8.2 MODELING EQUATIONS
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.
M8.2.1 Biomass Material Balance
We write the biomass material balance as:
rate of accumulation:;:: in by flow -- out by flow + generation
dVx,
dl ,= ['\1/ - fit, + VI', (MS.I)
M8.2.2 Substrate Material Balance
where ,x
lf
is the concentration of biomass in the feed stream and F is the volumetric
flowratc.
Sec. M8.2 Modeling Equations 531
The substrate material balance is written:
rate of accumulation::;;: in by now - out by flow consumption
dVx, . .
, l'x) [-<x" - Vr.
dt .} .. ,
where x
2I
is the concentration of substrate in the feed stream.
M8.2.3 Specific Growth Rate
(M8.2)
The reaction ratc (mass of cells generatedlvolume time) is nonnally written in the follow-
ing form:
r1 ::::: fL<t 1. (M83)
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
tion of substrate. Define Yas the yield, that is, the mass of cells produced per mass of sub-
strate consumed:

I'"rom (MBA) we can write:
mass of cells produced
mass of substrate consumed
1',
(M8A)
(M8.5)
and substituting (M8.3) into (M8.5). we find:
r =
) Y
We assume in the subsequent analysis that Y is a constant.
M8.2.5 Dilution Rate
Assuming a constant volume reactor, we can write (M8. J) and (M8.2) as:
(M8.6)
532
dX
I
dl
Biochemical Reactors
F
V
Xjf
-
F F
VX2f- V
XZ
-
r2
Module 8
(MS.7)
(MS.S)
Defining F/Vas D, the dilution rate, and using the rate expressions in (MS.J) and (M8.6),
we find:
dX
I
dl
dx]
dl
_ ~ t
D x
21
- D.\,-
. y
(MS.9)
(MS.IO)
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
dl
(MS.II)
(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.
M8.2.6 Growth Rate Expressions
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
and when '-\"2 is high:
Since the reaction rate is:
r
l
/LY
1
this lncans that the Monod description is similar to a second-order (bimolecular) reaction
when x
2
is low, since
r
I
and to a first-order reaction when x
2
is high, since
1'1 = !Lilla;; Xl
(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
FIGURE IV18.2 COIllparison of Monod and substratc inhihition models for
growth rate.
534 Biochemical Reactors
TABLE MS.l I'aramctcrs for lVIonod
and Substrate Inhibition lVlodcls
Module 8
MOllOd Substrate Inhibition
y
0.53 hr
l
0.12 g/litcr
0.4
4.0 g/Iitcr
fLmax
kill
k,
Y
0.53 hI I
0.12 g/Jitcr
0.4545 litcr/g
0.4
4.0 g/li'c!

kill + x
2
+ 1<1
Notice that the Monod equation is a special case of (M8.14), with k
1
= O.
SPECIFIC GROWTH RATE RELATIONSHIPS
(MBI4)
The characteristic relationships between substrate (x
2
) and specific growth rate (f.-l) arc
quite different for Monnd and substrate inhibition. The curves for f.L as a function of _\:! for
both models arc compared in I<igurc M8.2. Notice that the substrate inhibition model ex-
hibits a maximum in the growth rate curve, while Monod becomes zcnH}rdcr al high sub-
strate concentrations.
M8.3 STEADYSTATE SOLUTION
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
ulations are shown in Table MR.I.
We \vill study the following cases:
Case 1. Medium Dilution Rate, 1\::::: 0.3 hr"
Case 2. Low Dilution Rale, D
s
::::: 0.15 he
l
Case 3. High Dilution Rate, D, 0.45 he'
EXAMPI ,E MS. I Case I Results (Il 0.3)
The function file bio ss. m (Appendix 1) is set for Case! (D =: 0.3) and Ihe sub.'ilrale inhibi-
tion model (kl -co 0.4545). The l'vfATLAB function fsolve is used to solve for the steady-slatc
values by entering tbe following in the comfnand window (with an initial guess of x (1) =: 1
andx(2) 0;: 1):
X = 'bio ,[1;1])
Sec. M8.4 Dynamic Behavior 535
The sh:ady-statc solution obtained is:
x =
O.99
t
j1
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
[solvc and b i o _ s ~ m, by entering different initial guesses.
Monod (2 steady-state solutions)
Equilibriulll I
Equilibriulll 2
Xis::;;: 0
'b = 1.5374
X2s::::; 4.0
x
2s
:;:;:; 0./565
Substrate Inhibition (3 steady-state solutions)
Equilibriulll I
Equilibrium 2
EquilibriullI J
X
Is
:= 0
Xis;;;:: 0.9951
.\1.1-:;;;' 1.5302
X21::::; 4.0
.1
2
.1'::::;1.5123
'2, = 0.1745
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.
M8.4 DYNAMIC BEHAVIOR
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. mis shown in Appendix 2.
M8.4.1 Case 1 (0 = 0.3), Substrate Inhibition Model
'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.
,,[tl,xlJ odc,45( 'bio' ,0,30, [1;lJ);
" [t2, x2 J - ode45 ( 'bio' ,0,30, [0.75; 2 J) ;
Biochemical Reactors 536
2
a
a
4
"I 2
o
o
5
5
10
10
15
time
15
time
20
_....-
20
25
25
Module 8
30
30
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
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-
The st<:ltc-spacc matrices arc:
Sec. M8.5 Linearization 537
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:
and for the substrate inhibitioH model:
dr<,
(}X;:'I
IJomaJ(m
(kill + x::"J
2
(MS. IS)
aILs
dX
2s
(1 + __'(2s)
(kllJ + x
2
.\" +- {(I-ttY
(k
m
+ + k1xis) - J.LmllX X2\' (1 + 2k
1
x
2s
)
(kll/ + X2,y + k
1
xiJ
2
(MS.16)
klxI,)
1- k ,_')2
1-'-2.1
M8.5.1 Substrate Inhibition Model
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:
(jac, evec, lambda] :::; bio jac ([ ai 4] )
538 Biochemical Reactors Module 8
where j ac is the Jacobian (A matrix), evec is the eigenvector matrix and lambda arc
the eigenvalues.
jac :;;:;
-0.1139
-0.4652
evec ;::;;
o
1.0000
lambda
-0.3000
o
so,
o
-0.3000
0.3714
-0.9285
o
-0.1139
A

"j
"2 0.1139
- OU.300]

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,evec, lambda]
jac :;;:;
0.0000
-0.7500
evec ;::;;
0.3714
-0.9285
lambda
0.1698
o
-0.0679
-0.1302
0.2209
0.9753
o
-0.3000
The positive eigenvalue (0.1698) indicates that equilibrium 2 is unstable.
EQUILIBRIUM POINT 3
The steady-state is (x
b
,x2,) = (1.5302,0.1746).
[jac,evec,lambda] =
539
0.9048
-2.5619
-0.3714
0.9285
Analysis
evec =:::
0.9492
-0.3147
jac :::0
0.0000
-0.7500
Sec. M8.6
lambda =
-0.3000
o
o
-2.2619
Both eigenvalues arc negative, indicating that equilibrium point 3 is stable.
M8.6 PHASE-PLANE ANALYSIS
The m-filc (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-
FiG-URE M8.4 Phase-plane plot for suhstrate inhihitioll model, Case I con-
ditions (x:;;:: stable steady-state, 0 = unstable steady-state).
o
1.6 1.4 1.2
x1
0.8 0.6 0.4 0.2
1 -
o
o
2
5
540 Biochemical Reactors Module 8
(MHIHI
(MH.I7I
lioll. equilibrium I) or equilibrium 3; while cqliilihriutn 2 is a saddle point (ullstable).
These results arc consistent with the stability analysis of Section M8.).
A phase-plane plot for the Monad model was shown in Chapter 13.
MS.7 UNDERSTANDING MULTIPLE STEADY-STATES*
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:
o= (fL, OJ x"
)
fLx"
o= f).I' (.t2j.i' - x
2
.
1
, ---.y.--
where the subscript s indicates steady-state.
'fhcrc arc two different types of solutions to (MS.I?) and (MS. IX). One is kno\vll as
the trivial or ;'washout" solution. The other type is the nontrivial solution.
M8.7.1 Washout Condition
l:;'rorn (M8.I?) and (M8.IS) we can immediately sec one solution, llslli111y called llw trivial
solution.
x" 0
x ~ = 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.
M8.7,2 Nontrivial Solutions
From (M8.17), assuming that .r
ls
*- 0, then:
fL., = D, (ivlH.20)
which indicates that the specific growth rate is equal to the dilution rate, at steady-state.
From (MH.IH) we find thai:
and from (MH.20) and (MH.21):
y
(ivlH.211
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'
kllJ + x
2s
(M8.24)
Solving (M8.24) for x2s' we find:
(M8.25)
SUBSTRATE INHIBITION
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.
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:
(M8.26)
(M8.27)
(M8.28)
(Mollod)
k
ll
!_ D.
I
,
iJ-max -- D,,_
/-Lmilx
kill + x
2
.
1
, + k
ILJn'IX ..\:2D:
kill + x2(\'
j..L.\'
ESCOLA Dc
BIBLlQI60/\
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
2
f.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
2J
J: .
and since i-L
s
;;;:;; D.
I
,
542 Biochemical Reactors Module 8
l'rom (M8.28), we find thai:
k,xl, + (I - fL'''",) x" + k", ~ 0
J.Ls
Since fL., = U, (M8.20), we snhslilutc into (M8.2'J) to find:
, , + (1 fL"'''') + I ()
{(lXiI' ,,-, X
21
' - (m =
D,
(M8.2'J)
(M8.30)
Since (M8.30) is a quadratic equation, there will he two solutions for x2S" This means that
there arc three s t d y ~ s t t e 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"'''')' _ 4k k
D I III
,
2k,
So, for solutiolls with physical significance:
(
1 _fL""")' > 4k k
D 11/1
,
(M8.31)
(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:
which implies that:
Ds < 1
(
1_ fL'''''') <
lJ,
_J-ll.!!<lX
+ 2' (,:k
v 1\ 1/11
V4k k
1/11
(substrate inhibition)
(M8.34)
(M8.3S)
We could have found the samc result from viewing Figure M8.2. Notice that there is
a peak in the J..L
s
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..L
s
curve. We can find the peak by finding
ilfL,Idx2' ~ n. From (M8.16):
d/-1
s
dX
2s
(M8.36)
Sec. M8.7 Understanding Multiple Steady-States 543
We sec from (MS.36) that dfL./dX2' () if:
(MS.37)
We can substitute this result into (M8,28) to find:
l
ik;"
fLlll(lx \X
1
k
m
+
!em
k + 1 +- k
m
'"
(MS.3S)
__ __
fL.,
+ 2 VX,k,,,
sO the maximum dilution rate (for the nontrivial steady-state) is:
(MS.3,)
D,
which is the same result as eMS.3)).
f.111l<lX
1+2'r.
k
-;-
V kl/(m
M8.7,3 Summary of Steady-State-Monod and Substrate Inhibition
WASHOUT (BOTH MONOD AND SUBSTRATE INHIBITION)
Both Monod and substrate inhibition models have a washout (trivial) steady-state:
XIs 0 (MS. I')
NONTRIVIAL STEADYSTATE FOR MONOD
The nontrivial steady-state solutions for substrate and biomass arc:
kI/lD,\.
f.Lm<lx - '[)",
Y (x
2I
, - -"')
with the requirement that D
s
< IJ.
max
+ (that is D.
I
, < f.L.lr2j.J)
NONTRIVIAL STEADY-STATES FOR SUBSTRATE INHIBITION
The two nontrivial steady-state solutions for substrate arc;
(MS.26)
(MS.22)
j::"wm Chapter 13 we know that the following conditions mllst be satisfied for stability of a
second-order system:
(MX.32)
(M8.31)
(M8.2S)
(M8AO)
Module 8 Biochemical Reactors
1(
1 _ 1:''''''')' -41 1
\. D \1 (/II
,
2/(,
dCl(Al- A) X' - lr(A) X + del(A) ()
544
x" CC" Y (X
2
!, - x,,)
with the requirement for dilution rate:
unci the associated biomass concentration is:
M8. 7.4 Stability of the Steady-States
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:
We will usc (M8AS). (M8A6), and the eouditions shown in (M8AI) and (M8A2) 10 dc-
termine the stability of each steady-state.
where we have used the notation /-L,; to represent the derivative of growth rate with re-
spect to substrate concenlration, evaluated al steady-stale:
(MXAI)
(MXA2)
(M8A3)
(M8A4)
(MXA6)
(M8A5)
lr(il) < 0
del(A) > 0
A C" [1:'.' - D,
-ij;
i!/-L,\
c)x:2y
triA) ,c (I:' - D) _ J) _ I:';x"
" ., .\ Y
det(A) "" - (I:' _ D) (D + /L; x,,) + X,dL;I:',
.\ .\ .' Y Y
That is, the eigenvalues (A) will be negative if conditions (M8.41) and (M8.42) arc satis-
fied. The Jacobian of the biorcactor modeling equations (M8.11 andM8.12) is:
x "I:': J
lJv'r
,- f)" _ .. ,I
y
,),"
The trace and determinant of Ii are:
Sec. MS.7 Understanding Multiple SteadyStates 545
STABILITY OF WASHOUT STEADYSTATE
Under washollt conditions: X2.\':::: '\.2/.'1' and xis::::: o.
For stability of the washout steady-state, the following criteria then must be met.
r"irsl, from the requirement that tr(A) < 0:
fL,-D,-D,<O
and from the requirement that dct(A) > 0:
.. (fL, - DJ(D') > 0
F"rom (M8.47) we sec that the requirement for stability is thell:
D > P'.I'
.\ 2
while from (M8.48) the requirement for stability is:
D
s
::> /-L
s
(MXA7)
(MXAX)
(MXA9)
(MX.50)
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)
while for substrate inhibition kinetics:
(MX.52)
Notice that IJ-.lr
2
j:) 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 Notice that the washout
will only bc stable if D.
I
, is high enough. Wc can think of D.
I
, as a dynamic
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:
and unstable if:
(MX.54)
546
Biochemical Reactors Module 8
Stability of Washout Steady-State for Substrate Inhibition. From (MS.50)
and (MS.52), the washout will he stable if:
and unstable if:
(MS.56)
NONTRIVIAL
For the nontrivial steady-states, D
s
= fL.\.. The stability requirerncnts for the nontrivial
steady-states arc then:
(MS57)
(MS.5S)
(MS. 59)
(MS.61 )
_ _
(kll/ + .T
2I
. + k]xisf
II f t:
- D < 0
s Y
from the trCA) specification, and
Stability of Monod at the Nontrivial Steady-State. From (MS.24):
fL.: > 0
for slability.
from the det(A) specification. Since D.
I
. (and therefore 1J..), xis' and Yare positive, (MS.57)
and (MS.58) to the requirement that:
_ ILm<lxklll
[1; - ... .. . ._, (MS.60)
. (k
m
+ x
2
\)-
We see ilnmediatcly that fL,: is always positive for the Monod model at the non-
trivial steady-state; therefore, the nontrivial steady-state is always stable. Recall that
D.\. < fL.
1
.(X
2
!1.) for a nontrivial steady-state solution.
Stability of Substrate Inhibition at the Nontrivial Steady-States. We can
tcll from the substrate inhibition eurvc in Figure M8.2 that a steady-state that is on the
left side of the peak will be slable (since fL.:: > 0), while a steady-state on the right side
will be unstable (since f.< < 0).
Numerically, from (MS.36):
M8.7.5 Case 1 (D
s
=0.3)
The x
2s
that is on the right side of the peak, and is therefore unvtahle, is (from (MS.31 :
Also, recall that D
s
< fJ-ma/1 + (which is equivalent to requiring a real nontrivial
solution).
547
(M8.62)
(M8.63)
unstable
stable
X
2
,1'::::: 4.0
x,., = 0.1565
_fLO''''')' _41< I<
D L III
.,
Xis:::::: 0
xl.> = 1.5374
(
fL'''''' _I) +
D,
= .
Understanding Multiple Steady-States
The x2s that is on the left side of the peak, and is therefore slable, is (from (MS.31:
(fLO'''' _1) - _iL",,,,r -41< ,I<",
21<,
Sec. MS.7
M0I10d
Equilibrium I-washout
Equilibrium 2-nontrivial
The reader should find the following results:
Substrate Inhibition
Equilibrium i-washout
Equilibrium 2-l1ol1trivial
Equilibrium 3-nontrivial
.t
Is
=0
xL, = 0.9951
xl.> = 1.5302
X
2
, = 4.0
x2, = 1.5123
x2, =0.1745
stable
unstable (saddle point)
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
Equilihrium
XLI' =0
Xli = 1.5811
X2.\' = 4.0
x" = 0.0474
unstable
stable
Snbstrate Inhihition
Equilibrium
Equilihrium
Equilibrium 3-nontrivial
XL, =0
Xli = -0.6104
XL, = 1.5809
X2.\':::;: 4,0
x2, = 5.5261
x" =0,()478
unstable
not feasible
stahle
Although there is a mathematical solution for cquilihrium 2, it is not physically feasible,
since it corresponds to a negative biomass concentration.
548
M8.7.7 Case3
Biochemical Reactors Module 8
r'or a dilution rate of D
s
::::: 0.6, the student should find the follmving results:
Mouod
Equilibrium
Equilibriulll 2-nontrivial
XIs:::: 0

X2, 4.0
xl., I J)286
stable
not feasible
2 is not feasible. because it corresponds to a negative substrate concentration.
Substrate Inhihition
EquilihriuI11 l,,--,washout
Equilibrium 2-11ontl"ivial
Equilibrium 3-nontrivial
XIs::::: 0
x'" 4.13 - 0.20j
+0.2(lj
X2., 4.0
x
2
, -0.13 + 0.50j
x,., -0.13 - 0.50j
stable
not feasible
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.
LOW DILUTION HATE
Case 2 had the lowest dilution rate (D,I' ::;:; 0.15). The Monod model has two steady-
slates-the washout steady-state is unstable and the other (nontrivial) steady-state is sta-
ble. This means that any set of initial conditions will eventually converge to the nontrivial
for the Monod model. The substrate inhibition model has only two feasible
steady-states-- the washout steady-state is unstable and the high conversion steady-state is
stable.
The interesting result is that at low dilution rates, the substrate inhibition model be-
haves like the Monod model.
MEDIUM DILUTION RATE
Case I had the next highest dilution rate (D,I' ::::: 0.30). The Monod model has two steady-
states----the washout steady-state is unstable and the other (nontrivial) steady-state is sta-
ble. 'fhis means that any set of initial conditions will eventually converge to the nontrivial
steady-state, for the Monod model. I'he substrate inhibition model has three feas-
ible steadystates. The w,-1shout (no conversion) steady-state is stable, the medium conver-
sion steady-state is unstable and the high conversion (low x
2
) is stable. This
means that any set of initial conditions will converge to one of the two stable steady-
states. A phase-plane mllst he drawn to determine if a particular set of initial conditions
will lead to washoul.
3
4r----------------....--j
549
0.6
stable
0.5 0.4 0.3
Monad Model
0.2
unstable
0.1
5
2
dilution rate

o
FIGURE M8.5 Input-output diagram for the Monad model,
Bifurcation Behavior Sec M8.8
HIGH 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.
Case 3 had the highest dilution rate (D\, ::: 0.(0). Both models had only one feasible
steady-slate, the \vashout steady-state, and it was stahle. The student should he able to
"sketch" phase planes for all three conditions for each of the models (Monad and sub-
strate inhibition).
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 D
s
> 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
2
f.i.) , there are two steady-slales (like the Monod model). The
nontrivial steady-slate is stable under those conditions, while the washout
is unstable. Por tbe intermediate dilution rate range, 1J-./or2j) < D
s
< /--L
rna
Jl + 2Vk
1
k/ll'
M8.8.2 Diagram for the Substrate Inhibition Model
M8.8.1 Diagram for the Monad Model
M8.8 BIFURCATION BEHAVIOR
550 Biochemical Reactors Module 8
Substrate Inhibition Model
stablo
\
,
,
,
,
'\. unstable
,
"
"-
"-
"-
stable
.->
0.2 0.3 0.4 0.5 0.6
dilution rate
3
5
2
0'L- -
o 0.1
FIGUHE M8.6 diagram for the substrate inhibition model.
there arc three Two of these arc stable, while one is unstable. The stable
steady-slate that is attained will depend upon the initial conditions of the
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.
M8.8.3 Hysteresis Behavior for the Substrate Inhibition Model
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. 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 ratc, we relnain on the
lowcr curve of r'igure M8.6. When V,I' > + XVk1kl/i (1\ ::;:: 0.36126 for this exam-
ple), the stable solution suddenly "leaps" to the upper stahle (washout
tions). As we increase D
s
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' ::::: 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
SUMMARY
551
The modeling equations for a biochemical reactor were developed for Monod and
strate inhibition kinetics. We found that the Monod lnodel normally has two
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 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
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
An excellent source for an introduction to biochemical engineering is:
Bailey, .I.E., & D.F, Ollis. (1986), Biochemical Engineering Fundarnentals, 2nd ed,
New York: McGraw-Hill.
STUDENT EXERCISES
1. In this module we developed the modeling equations assuming that no biomass is
fed to the reactor, Analyze the system studied for the case where the biomass feed
concentration is 2.5% of the substrate feed concentration (so xII::::: 0.1 for the nu-
merical values used ill this module).
Is there still the possibility of a washout steady-state?
2. Modify bio, phas_gen.rn and bio.rn to perform a phase-plane analysis for
cases 2 and 3 with the substrate inhibition model.
3. Data for specific growth rate coefficient as a function substrate concentration for a
biochemical reactor are shown below:
o
0.1
0.25
fh, hrA-1
o
0.38
0.54
552
0.5
0.75
I
1.5
3
5
0.63
0.66
0.68
0.70
0.73
0.74
Biochemical Reactors Module 8
a. Estimate the parameter values for a Monod model (kill'
b. The production rate of cells (biomass) is DBxl. Find the steady-slale value of
the dilution rate that maximi7.es the production rate of cells. 'fhe substrate fecd
concentration is 5 gllitcr.
c. Find the steady-state concentration of biomass and substrate at this dilution rate.
d. Find the linear state-space model at this dilution rale, with dilution rate and sub-
strate feed concentration as the input variables. Also find the transfer function
relating dilution rate to biomass concentration.
e. Simulate the responses (using the nonlinear dynamic model) or the conccnln.l"
lions or biomass and substrate to step increases and decreases of IWit;, in the
lution rate (changes are from the dilution rate found in b.). Compare these
suits with those of the linear system (remelnher to convert deviation variables
back to physical variables).
4. In this module we have analyzed how the biomass and suhstrate concentrations
change depending on the dilution rate. If the purpose of a particular biochemical
actor is to produce cells, then we arc more concerned with the production rate of
cells. The' production rate is mass of cells produced per unit time:
steady-slale production rate of cells = D/'x
ls
For both the Monod and substrate inhibition models 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
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
with the following parameter values:]
Variable Value Variable Value
y
0.4 gig
"
2.2 gIg
f'
0.2 hr-]
!J. max
OAg lu--
J
Pm
50 g/liter
kill
1.2 g/litcr
k, 0.04545Iitcr/g
x21
20 gil iter
IJ 0.202 hI'
,
xJ
6 gIl iter
-"1'-2 5 glliter J.-:; 19.14 g/liter
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 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 in f) have a greater effect on the biomass concentralion?).
Compare your results with linear simulations.
APPENDIXES
1 Steady-State Biochemical Reactor Model, m
function f :::, (x)
%
% b.w. bequette
% (e) 16 Nov 92
% revised 18 July 96
%
% find steady-states of bioreactor, using fsolve:
%
% x::::: fsolve( 'bio' ,xOl
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
% where xO is a vector of initial guessef3
% x(l)
x (2)
%
biomas,;.>
substrate
% biomass ("bugs") consumes the substrate
dilution rate (F/V, timeA-l)
yield biomass/substrate
specific DrowLh rate
param(:!Ler (both Monad and Substrate Tnhibi tion)
parameter (both Monad and Inhibition)
parameter (Substrate:; Inhibition only, kl ::::: () for Monod)
subf3trate concentration
CI, D
% y
96 mu
'l, mumax
km
"6 kl
'r, sf
'?6
% the function vector consists of 2 equations
%
f zeros (2, 1) ;
96 parameter values
D 0.3;
mumax 0:: 0.53;
Y 0.4;
km 0.12;
sf 4.0;
kl 0.4545;
% Substrate Inhibition expression for specific growth rate
%
%
% [t,x] = ode4.5( 'bio' ,t.O,tf,xO)
(mu D)*x(l);
(sf - x(2) )'D - mu*x(l) /Y;
bio.m, Function File for Dynamic Simulation Using ode45 2
f(l)
f(2)
function xdot = bio(t,x}
5(, dynamic equations for biorcactor, integrated using ode4.5,
(i; usiuq the following command
InU mumax
k
x(2)/(km+x(2)+kl*x(2)*x(2));
9
0
% steady-state equations
% [solve varies xll) and x(2) to drive f(l) and f(2) to Zero
% b.w. bequett.e
% (c) 18 96
%
Appendixes
96 biomass ("bugs") consumeS the substrate
'6
% state variables
%
555
biomass
substrate
- dil.ution rate (P/V, timeA-l)
yield biomass/substrate
specific growth rate
- parameter (both Monad and Substrate Inhibition)
parameter (both Manod and Substrate InhiJyit.1.on)
parameter (Substrate Inhibition only, kl :::; 0 for Monad)
substrate feed concentration
% x(l)
't x(2}
% where to is the initial time (usually 0), tf is
% the final time and xO is the initial condition vector
% xO (1) biomass initial conclition
% xO(2) substrate initial condition
q.
"
9
0
D
% y
% mu
% mumax
% km
% kl
96 sf
%
% the function vector consists of 2 equations
I zeros(2,1);
%
% p a r a m ~ t ~ ~ r values
%
DO. 3;
mumax 0.53;
Y = 0.4;
km 0.12;
sf - 4.0;
kl 0.4545;
%
% Substrate Inhibit_ion expression for specific growth rate
mu :::; mumax-
k
x(2) / (km+x(2) +k1-
k
x(2) *x(2));
1-s
90 dynami c equat i ODS
xdOL (1)
xdot(2)
{mu
(sI
D)'x(l);
x(2))*0 - mu*x(l)jY;
3 Phase-Plane Plot for Biochemical Reactor, bio---phas_gen.m
:6
'A b.w. bequett.e
'6 (e) 19 July 96
%
% generates phase-plane plots for the bioreactor
556
%
% set-up the axis limits
%
axis{[O 1.75 0 5]);
%
Biochemical Reactors Module 8
% 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
% run simulations for each initial condition
%
for i ;:c. 1:nc01;
%
[t,xJ "ode45('bio',0,30,[xO(:,i)]);
%
plot (x ( : ,1) ,x ( : ,2) I 'w' )
%
end
%
xlabel ( . xl ' )
ylabel ('x2')
hold off
!
______________.L
Appendixes
4 Direct Calculation of the Eigenvalues
Here we calculate the eigenvalues of the nontrivial solution:
del(A/- A) = A
2
- (r(A)A + dc(A) = 0
where the trace and determinant arc
For the nontrivial solution, 11-.1'':;:::: f),I':
11-,;'X1,1'
(r(A) c= -D, - Y
I ()
XIs 11-.1'.
(cl A ,-
Y
The rools of (MXAO) arc:
557
(MXAO)
(MXA5)
(MXA6)
(MX.AI)
(MX.A2)
A -
- 4 de( A
2
(MX.A3)
(MX.A4)
2 +
2
2
+
y
4 .r,_ fL,;' /.1",
Y
(MX.A5)
2 x.,_ /-L,;' /Ls
y
(MX.A6)
A=
A=
and our roots are:
-x';:r
2
y x'p:)
2
(MX.A7)
(MX.AX)
558
A.[ = --/1-)' and
Biochemical Reactors Module 8
(MX.A9)
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
, < 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.
DIABATIC CONTINUOUS
STIRRED TANK REACTORS
MODULE
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
Understand the assumptions made in developing the classic CSTR model
Understand the possihle steady-state behavior based on an analysis or the heat gell-
crated by reaction removed through the cooling jacket
Understand what is meant by multiple steady-states. Develop the hysteresis
lion/extinction behavior) input-output diagrams based on analysis of the heat gener-
ation and rClllOval curves. [(clate these to saddlc-llOdc and hysteresis bifurcations
from Chapter 15
Understand the dynamic behavior by linearization of nonlinear dynamic equation:.;
followed by eigenvalue analysis
Use phase-plane analysis to understand which steady-state a given initial condilinll
will converge to
Realize the possihility or limit cycle behavior (llopfhifurcations)
'rhe l11i:\jor sections inthis module are:
M9.1
M9.2
M9.3
M9.4
M9.5
M9.6
Background
The Modeling
Steady-State Solution
Dynamic Behavior
Linearizali(m of Dynamic
Phase-Plane Analysis
559
560 Diabatic Continuous Stirred Tank Reactors Module 9
F
F
jlrJ
r-
~
r-
T
F
i
LU
C
A
T
T,
FIGUH.E M9.1 Continuous stirred tank reactor with cooling jacket.
M9.7
M9.S
M9.9
UlldcrstandingMulliple Steady-State Behavior
Further Complexities
[)illlcnslonlcss Model
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 v ~
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, J71 (19X5)). We prefer to usc- diabatic to describe this reactor.
Sec. M9.2 The Modeling Equations 561
M9.2.1 Parameters and Variables
M9.2 THE MODELING EQUATIONS
The parameters and variables that will appear in the modeling equations arc listed below
for convenience.
Reactor temperature
Feed temperature
Jacket temperature
Reference temperature
Overall heat transfer coefficicnt (cnergy/(timc*area*tcmpcrature))
Reactor volume
Activation energy (energy/mol)
Heat of reaction (energy/mol)
Density (mass/volume)
T
Ii
T
.I
I ~ l
U
\I
ali
(-aH)
II
Perfect mixing (product strcanl values arc the same as the bulk reactor fluid)
Constant volume
COnsl,lI1( parameter values
A Area for heat exchange
~ \ Concentration of A in reactor
C ~ V Concentration of A in feed stream
c
p
Heat capacity (cnergy/mass*tcmperature)
F Volumetric f10wrate (vohltne/time)
k
o
Pre-exponential factor (timc--
J
)
R Ideal gas constant (energy/mol*tcmperature)
r Rate of reaction per unit volume (mol/volume'; time)
Time
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:
The constant volume and parameter value assumptions can easily be relaxed by the reader
for further study.
ESCOLA Dc ENGENHARIA
616LIOTECA
562
Diabatic Continuous Stirred Tank Reactors Module 9
M9.2.2 Overall Material Balance
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:
If \VC ;:I1so assume that the density remains constant,2 then:
F and dV/dt 0
M9.2.3 Balance on Component A
The halance on component A, assuming a constant volume reactor, is:
V
dt
(11191)
where r is the rate of reaction per unit volume.
M9.2.4 Energy Balance
The energy balance, assuming constant VOIUlllC, heat capacity and density, is:
dT
Vpc" FjlC,,("/"t- T) + (-t:.!IWr- UA("/"- "Ii)
dt
where (-liB) VI' is the rate of energy contributed by the exothermic reaction.
M9.2.5 State Variable Form of Dynamic Equations
We can write (M9.1) and (M9.2) in the following state variable form:
(1119.2)
t(C T)
,1 ;\'
dC
II
dl
i/1'
dt
F
V (CAl
IV" (1;- T) + (...- !1II) r - UA (1' 7i)
pc!, Vpc
p
(1119.1 a)
(1119.2,,)
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
The reaction rale per unit volume (Arrhenius expression) is:
(
- !1F)
r = ko exp!, i C"
where we have assumed that the reaction is firshOlrdcr.
M9.3 STEADY-STATE SOLUTION
The steady-state solution is obtained when dC,//dl ::: 0 and dlldl :::: 0, that is:
(M9.3)
VA (T- T)
Vpc
p
I
(M9.1 s)
("19.2s)
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 values of 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.
M9.3.1 Solution for Case 2 Parameters Using fsolve and cstr_ss.m
The function for the equations is cstr_ss . m and is shown in
dix I. The command to run this file is
X := fsolve( 'cstr_ss' ,xO);
where xO is a vector or the initial guesses and x is the solution. lkfore issuing this
mand the reactor parameters must be entered in the global parameter vector CS'I'R PAR.
TABLE M9.l Real'tor Parameters
Parameter
FlV. hr
1
k
o
, hr
l
kcallkgrno!
E, kcal/kgmol
pC'f" kcaJ/(m:'\QC)
I" "C
kgltlollm
J
UA/V, kcal/(m:\oC hr)
'Ij, "C
Case 1
I
14,825*3600
5215
11,:-\43
500
25
10
250
25
Case 2
I
9,703"'3600
5%0
11,843
500
25
10
150
25
Case :3
I
18,194*'3600
Xl95
11,843
500
25
10
750
25
We find that different initial guesses for the concentration and temperature lead to
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.
564 Diabatic Continuous StIrred Tank Reactors Module 9
GUESS 1
l1if.:h cOll(..entratioll (1011' conversion), Ienv temperature. lIciT we consider an initial guess
of (, =') and T =300 K.
X ::::: fsolve{ 'cstr ss', [9;300]);
x
8.5636
311.1710
so the steady-state solution for guess
conversion) and low-temperaturc.
GUESS 2
1 is I-C'-,,] )(,.:1('1 that is hioh concentration <.10\1/
- r, _,112' -, l:>
Intermediale concentration and temperature.
X :::: fsol ve ( 'cstr ss ' , [5; _350] )
x
5.5179
339.0971.
so the solution for guess 2 is [(;-_:'-1
GUESS 3
Lmv concentration and high temperature.
x fsolve('cstr ss', [1;450J)
x
2.3589
368.0629
Sec. M9.4 Dynamic Behavior 565
TABLE Mt).2 Guesses and SOIUtiOIlS[Jsillg fsol ve
Guess and Solution
xO ( 1 ) , C ~ \ guessed
xO (2 ) , T guessed
x ( 1 ) , C ~ \ solution
x (2), T solution
(,uess I
9
300
8.564
311.2
CJUCSS 2
5
350
5.518
339.1
(ILlCSS 3
I
450
2.359
368.1
so the stcady-stale solution for guess 3 is l(r"1 l ~ ~ ~ I that is, low concentration (high con-
version) and high temperature. '
The results arc summarized in TablcM9.2,
Other initial guesses do not lead to any other solutions, so we sec that there arc three
possible solutions for this set of parameters. In Section M9.7 we show how to use physi-
cal insight to determine the Humber of steady-state solutions for this problem.
M9.4 DYNAMIC BEHAVIOR
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 ( : J 2) ), respectively.
M9.4.1 Initial Condition 1
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.
M9.4.2 Initial Condition 2
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
Diabatic Continuous Stirred Tank Reactors 566
9.5
"
c
9
0
"
8.5
0 2 4
time, hr
6 8
Module 9
10
"
320
'"
ID
"
310
0:
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
5
0
"
0
0 2 4 6 8 10
time, hr
"
400
'"
'"
"
350
0:
E
300
'"-
0 2 4 6 8 10
time, hr
FIG1JRE 1\19.3 Stale variable responses with initial condition ~ \ :;: 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
time, hr
8 10
"
400
'"
'"
'0
380
0:
E
360
2
0 2 4 6 8 10
time, hr
FIGURE 1\'19.4 State variable responses with initial condition xO ::00 [I ;400].
M9.4.3 Initial Condition 3
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 s t c d y ~ s t t c
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.
M9.5 LINEARIZATION OF DYNAMIC EQUATIONS
The stability of the nonlinear equations can be dClcnnincd by finding the following statc-
space form:
x=Ax+BII
and dctcrmining the eigenvalues of thc A (state-space) matrix.
The nonlinear dynamic state cquations (M9.la) and (M9,2a) arc:
(M9.11)
dC.,
dt
dT
dt
( p;',;I) k C
el
~ CT.
UII
vpe"
T+
UII T + F T
VIIC I V f
"
(M9.1 a)
(M9.2a)
568 Diabatic Continuous Stirred Tank Reactors
Module 9
L,ct the state and input variables be defined in dcviittiou variable form:
x '" I. c" - CA'J
T- T
"
r
T- T l
J JS
II C:'ilf -
Ii - Ii,
M9.5.1 Stability Analysis
Performing the linearization, we obtain the following clemellts for A:
il/; il/, F
All
-
- k
s
ax, ile., V
.11
12
aI, at,
..
- C
A
/<
ax} aT
/\21
ai, a/;
(- 6./1)
k
s
ax! aCA
pCI'
a/; il/; F (fA
(6.11)
CA,lk:
An +
ax') aT V
pCp
where we define the following parameters for more compact representation:
(
6.F)
k, .= k exp .
() RT
1

or,
ak,
aT
(
- 6.1') (6.E )
k" exp . fiT, ih'?
From the analysis presented above, the state-space A matrix is:
[
F
V-k\
A = (-6.11),
(
' J(\
p,p
(M9.12)
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
A1- A
I,
A-A"
.. -An
det()" 1- A) ()" - A,,)(A - A
22
) - A"A
2I
-- ),,2_ (A" + A
22
)" + A"A
n
- A"A"
- ),,'-(trA)" + del (A)
'file eigenvalues are the solution to the second-order polynomial:
A' - (lr A) A+ det (A)- 0 (M9.13)
[amat,lambda] = cstr amat(5.518,339.1)
OPERATING POINT 1
OPERATING POINT 2
cstr_amatI8.564,311.21
-0.0886
-0.2443
-0.2324
1. 4697
lambda =
-0.8369
0.4942
[amat. , 1ambc1a ]
The concentration and temperature arc 8.564 kgmol/m
3
and 31 J.2 K, respectively.
amat =
-1.1680
2.0030
amat =
--1.8124
9.6837
Both of the eigenvalues arc negative, indicating that the point is stable, whieh is consis-
tent with the results ol'Figure M9.2.
lambda ::::;
-0.8957
'-0.5166
'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.
The concentration and temperature arc 5.51 Hand 339.1, respectively.
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 :::;

38.6748
lambda :::;



2.7132
+ O.9584i
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.
M9.5.2 Input/Output Transfer Function Analysis
The input-output transfer functions can be found from:
G(s) = C(sI - A) 'B (M9.14)
where the clements of the H matrix corresponding to the first input (lIl = - 7jJ arc:
iJj; = aj; = 0
all, a'lj
a/2 aI, VA
= -_ = =
dU
l
aT
j
VpC
p
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 for
Case 2. Thc input/output transfer function relating jacket tcmperature to reactor concen-
tration (state I) is:
-0.0266
+ l,4123s + 004627
- 0.0575
(1.I165s + 1)(l,9357s + 1)
and the input/output transfer function relating jacket temperature to reactor temperature
(state 2) is
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-
g2l(S)
O.3s + 0.3504
+ 104123.1' + 004627
07573(0 856s + I]
(1.1165.1' + 1)(1.9357.1' + I)
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.
M9.6 PHASE-PLANE ANALYSIS
In Section M9.4 we provided the results of a fc\v dynamic simulations, noting that
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
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 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
cstr with multiple steady+states
Module 9
420
400
380
'"
'"
ID
"0
360
iii
ID
"-

- 340
320
300
o 2 4 6
concentration, kgmol/ml\3
8 10
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 '+'.
M9.7 UNDERSTANDING MULTIPLE STEADY-STATE BEHAVIOR
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.
M9.7.1 Heat Generation and Heat Removal Curves
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
SOLVING FOR CONCENTRATION OF A AS A FUNCTION
OF TEMPERATURE
'fhe steady-slate concentration solution (dCidt) ::: 0) for concentration is:
(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)
SOLVING FOR TEMPERATURE
The steady-state temperature solution (dT/dt :::: 0) is:
UA F
II (. ( ,
p ""
(
-(11) ((j.{')
--- k ex') """. - C
0 1 R As
(M917)
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 (F - F) I- UA(F. - F.)
P - fI .\ ',' Js \].1
(M9.18)
removed by flow and heat exchange
Note the form of Ql'em
Q[':ell
Heat generated by reaction
(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 IUA +- 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 Q
gen
term:
(M921l)
Substituting (M9.l6) inlo (M9.20), we find that:
574 Diabatic Continuous Stirred Tank Reactors Module 9
(M9.21)
k" cx
p
( /:/) (& C,v,)
-Mf V'
I' + k Cxp( -!J.F)
V () RT
j
(M9.21) has a characteristic "S, shape for Q"ell as a function of reactor temperature.
From equation (M9.18) we sec that a solution exists when there is all
intersection of the QIClIl and Q
gcll
curves.
M9.7.2 Effect of Design Parameters
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.
M9.7.3 Multiple Steady-State Behavior
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
Reactor Temperature (Tr)
a.
Q
Reactor Temperature (Tr)
b.
FIGURE 1\119.6 Possible interscctions of heat gener::ltioll and heat rcmoval
curves.
Sec. M9.7
Q
Understanding Multiple Steady-State Behavior
Temperature
E
9
575
FIGURE !\/19.7 CSTR energy generated and energy removed as a function 01
reactor 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
'Also knowll as <l saddle-node bifurcation point. Sec Chapter 15.
576 Diabatic Continuous Stirred Tank Reactors Module 9
T
A
B
6
2
7
3
c
5
8
o
4
E
9
Jacket Temperature
FIGlJREM9.8 Reactor temperature ~ a function of jacket temperature.
one starts at a high j ~ k t 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 hetween 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.
M9.7.4 Multiple Steady-States: Stability Considerations
(Steady-State Analysis)
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?
LOWER STEADY-STATE (OPERATING POINT 3)
Consider a perturbation from operating point that is colder than point 3, say T
3
- 01'. At
this point we arc generating more heat than can be removed by the reactor, so the lempcr-
Sec. M9.7 Understanding Multiple Steady-State Behavior 577
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 Inov-
ing to 7'-3'
The lower lcmperalut'c intersection, TIt may be a stahle operating point.
'fhe open-loop stability cannot be assured until an eigenvalue analysis is pcrl<mncd (sec
Section M9.5).
MIDDLE STEADY-STATE (OPERATING POINT 5)
If we start at 7:') - oT, we arc generating less energy than is being removed, causing T to
decrease, eventually causing the temperature to go to 1:
1
, [f we slart at '1:") + 0'1', more en-
ergy is being generated than is being removed, causing the temperature to risc, increasing
until T, is reached.
The middle temperaturc intersection, 7'5' is an IIflswble operating point.
Here the steady-state analysis is enough to determine that point 5 is an unstable operating
point.
UPPER STEADY-STATE (OPERATING POINT 7)
Using the same arguments as 1:
1
, we find:
The high tcmperature intersection, 1
7
, may be a stahle operating point.
Again, the stability or the upper 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
M9.7.5 Generating Steady-State Input-Output Curves
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, (frotH the material balance equation for reactant A):
F
C
V 'Ah
F (-111\)
+ I< exp -- ---
V () RT\
Prom the steady-state temperature solution (dTldt =: 0) we can solve for the steady-state
jacket temperature, Z:.s:
T + ,
Fpc/T, - "liJ - (- I11I)VI<"
(fll
Similarly, if we assume that the jacket temperature remains constant, we can solve for the
required feed temperature:
T + IUII(T, - -(.J - (- /:'11) VI<" eeL,]
\' Fpc
p
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.
'I'empvec 3 0 0 : 2 . 5 : 3 8 0 ;
[Tjs,fl'fs,conc] ::c: cstr,.io(Tempvec);
plot(Tjs,TC"mpvec)
plot (Tfs, 'rempveC')
M9.7.6 Cusp "Catastrophe"
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.
Understanding Multiple Steady-State Behavior Sec. M9.7
380
370
"
360
0>

"0
1"
350

340
0-
E
2 330
g
320

310
300
275 280 285 290 295 300 305 310 315
579
320
jacket temperature, dog K
FIGURE LVI?? reactor temperature as a function of jacket
tcmpe-ralurc, Case 2 parameters.
380
"
370
0>

"0
360

"
350
];;

0-
340
E
2

330

320
310
300
290 292 294 296 298 300 302 304 306
feed temperature, dog K
FIGlJRE M9.10 Steady-state reactor temperature as a function of feed
temperature, Case 2 paranlctcrs.
580
400
380
360
~
I
0. 340
E
w
f-
320
300
280
0.2
Diabatic Continuous Stirred Tank Reactors Module 9
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).
M9.8 FURTHER COMPLEXITIES
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.
M9.8.1 Connecting Bifurcation Theory with Physical Reasoning
In Chapter i5 we presented mathematical conditions for bifurcation behavior; we have fo-
cused on physical arguments in this module. The goal of this section is to draw a connec-
tion between the mathematical conditions and the physical conditions for multiple s t d y ~
stale behavior.
Sec. M9.8 Further Complexities 581
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 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:
F j
C
(
- !1E) \I 'A/,
I,
F (.('1' -T) + UI(T -'1')1- ( Ml)VJ
1'", I' I, I' '" exp Iii' F (- Mo')
.\ + k CXI1'-
V () - HI', _
f"or simplicity, we write this equation as:
()
where 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 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)
iJT,
iJQ""U:,JL)
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
Reactor Temperalure( Tt)
a. Heat Removed and Generated
Tr
Jacket Temperature
b. Input/Output
FIGURE 1\'19.12 Illustration of saddle-node (limit point) bifurcation.
sponds to the heat generation and removal curves M9.12a). We also note that the
following conclition also holds:

aJ}
I ()
Since, although the sc.cond derivative of the heat rClllovallinc is always zero,
a
2
QJl,m(T
1
,/.L)
en}
the heat generation curve is not at an inflection point:
()! Q"c.,J(.iL)
DT\2
t ()
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
mediate value oflJA, and complete hysteresis behavior at low values ofUA.
Sec. M9.8
Q
Q
Further Complexities
Reactor Temperature (Tf)
a.
Tr
Tr
Jacket Temperature
583
Reactor Temperature (Tf)
b.
Jacket Temperature
Q
Tr
Reactor Temperature (Tf)
c.
Jacket Temperature
FIGURE M9.13 lIlustration of a hysteresis bifurcation. Bifurcation condi-
tions are satisfied in b.
584
0.8
0.6
d
0.4
I-
0.2
o
1
Diabatic Continuous Stirred Tank Reactors Module 9
0.5
UA
o
o
0.2
--------.......
1
0.4 .
Temp-J
FIGURE M9.l4 Cusp diagram.
M9.9 DIMENSIONLESS MODEL
"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 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
REFERENCES AND FURTHER READING
A number of undergraduate textbooks on chemical reaction enginecring present the ideas
of multiplicity behavior in adiabatic CSTR. These include the following books by Aris
and Fogler:
Aris, R. (1989). E'lementar.v Chemical Reactor Analysis. Boston: Butterworths. This
is a reprint of the book originally published by McGraw Hill (J (69).
Fogler, H.S. (1992). 1'.:lem('l/{S Chemical Reactioll Engineering, 2nd cd. Engle-
wood Clirrs, NJ: Prentice lIall.
The following book docs an excellent job of developing the modeling equations for a dia-
bat;e CSTR:
Denn, M.M. (1986). Process Modeling, New York: Longrnan.
[)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:
Razon, LJ'., &R.A. Schmitz. (1987). Multiplicities and instabilities in chemically
reacting review. Chem. Rng. S'd., 42(5):1005---1047.
The following book provides an excellent discussion of the lise of dimensionless models,
with adiabatic CSTR as a example.
Ads, R. (1994). Mathematical Modelling Techniques. New York: Dover. This is a
reprint of the work originally published by Pitman, London (1978).
STUDENT EXERCISES
1. Consider the Case I parameters shown in Table M9. I.
3. Find the steady-state using fsol ve.
h. Determine the stability of the steady-state using lincarization and eigenvalue
analysis.
c. Simulate the dynamic behavior by perturbing the concenlration and
temperature values by 10 9(). Usc ode4 5 for the simulations.
2. Consider the Case 3 parameters shown in Table M9.1.
a. Find the steady-state using fsol ve.
b. Determinc the stability of the steady-state using linearization and eigellvaluc
analysis.
586 Oiabatic Continuous Stirred Tank Reactors Module 9
c. Simulate the dynamic behavior by pcrtm:bing the steady-state concentration and
temperature values by J0 %. Usc ode4 5 for the simulations.
3. a. For the Case 2 conditions, sketch the phase-plane plots for the process lin-
earized (A matrices) at each of the steady-states (operating points 1,2 and 3) in
Section M9.5.1. Usc the eigenvalues and eigenvectors of the A matrices to
sketch your plots by hand.
b. Generate the phase-plane plot (Figure M9.5) for the nonlinear system of Section
M9.5.I. Usc cs tr run. TO and cs tr . ill from the Appendix.
4. a. Modify the parameters in the file cstr_.arnat.m (from the Appendix) to gener-
ate the state-space A matrix for the steady-state operating point for Case I. Use
the eigenvector/eigenvalue analysis of the A matrix to sketch the phase-plane.
h. Modify cstr__xun.m (change initial conditions) and cstr. In (change cstI' pa-
rameters) to perform the phase-plane calculation for the nonlinear systelll for
Case I. Discuss the phase-plane results.
5. a.Modify the parameters in the file (from the Appendix) to gener-
ate the slate space A matrix for the steady-state operating point for Case 3. Usc
the eigenvector/eigenvalue analysis of the A matrix to sketch the phase-plane.
h. Modify cstr run. ill (change initial conditions) and cstI.'.m (change cstI' pa-
rameters) to perform the phase-plane calculation for the nonlinear system for
Case 3. Discuss the phase-plane results.
6. The CSTR modeling equations have a large number of pararnetcrs. It is clear that
these parameters arc not independent. For example. the behavior is dependent on
the ratio F/V, which can he considered a single parameter. Define the dimensionless
variahles as:
(- !:llJ)C
Af
F;) E
f3

7
-
1
'I

pC[l7j'o
V IU,,,
UA V F
I)
4,

koe--Y
q

pC/li)
F;}
T-
Xt
X
2
1'1 x
J

'I
eNG 'Ij'o 7/0
XII'


XlI'

'T
f
- Fro
'I
C'Arn lio
where F
o
' CAIO' and 'Ij'o are the nominal values.
a. Show that the diniensionless modeling equations arc:
dx)
,IT
dX
2
(IT
Student Exercises
where K(X,) cc CX
P
(
.. 1
587
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 T
j
between
295 K and 305 K. Find the value of T
j
where this occurs (recall that a IJopf bifurca-
tion occur whell the complex eigenvalues have zero real portion.
F
\I
T
I . __ J
k
o
' 111111
(cD.H), J/gll1o]
EIR. K
rei" JIIiter K
if. K
CAl' kgmol/m:
1
UA, J/min K
J00 liters/min
]00 liters
]00 K
7.2 x 10
10
50000
8750
239
]50
10
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 s t ~
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 s t e y ~ s t t e 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
APPENDIXES
Module 9
1 Function m-fi1e for Steady-State CSTR Solution
function = cstr_ss(x)
"o
% 2-state diabatic CSTR model
% Use [solve to find st<C?ady-state concentration and
temperature
'[, 'l'hn cal]. statement from the command window is:
x fsolve (' 'f xO) ;
% where x is the solution vector (x
% and xO is an initial guess vector
%
[conCi temp])
define the following global parameter so that values
% can be entered in the conunand window
% global CSTR_PAR
% parameters (case 2)
% CSTR__ PAR{l) frequency factor (9703-
k
3600)
% CS'l'R..YAR(2) heat of react.-ion (5960)
,?, CS
r
I'R.PAR(3) activation (11843)
% CSTR_PAR(4) densit:y*hl"at cap_ (1500)
% CSTR_PAR(5) heat trans caeff * area (150)
'6 ideal gas constant (1.987)
% CSTR_PAR(7) reactor volume (1)
% CSTR_PAR (8) feed flowralce I l)
% CSTR PAR(9) feed concentration (10)
% CSTR_PAR(10): feed temperature (298)
% jacket temperature (298)
%
% ::,tates
'r, ca
Temp
and 2
- concentration of A, kgmal/m
A
)
reactor temperature, deg K
% 16 July 96 - (c) B.W. Bequette
% revised 2 LJanuary 199'7 - added CS'I'R_PAR
%
f = zeros (2,1) ;
%
global CSTR]AR
%
% below we use common notation for the states to
'15 improve code readibili ty
%
%
ca
Temp
xiI) ;
x(2) ;
% parameter values, case 2 shown in parentheses:
%
Appendixes 589
%
kG
H_rxn
E_act
rhocp
UA
R
V
F
caf
Tf
cI'j
eSTRPAR I j ) ;
- eS1'RJ'AH (2) ;
eS'I'R_PAR (3) ;
eSTR_PAR (4) ;
eSTR]AR(5) ;
eSTRPAH (6) ;
cs'm PAR (7) ;
eSTR PAR(8);
eSTR_PAR I ')) ;
C:STRPAR (1 G) ;
es'm_pAR (11) ;
% frequency factor (9703*3600)
% heat of reaction (5960)
% activation energy (11843)
% density*heat cap. (500)
% ht trans coeff
k
area (150)
% gas constant (1.987)
% reactor volume (1)
feed flowrate (1)
;6 feed concentration (10)
% temp(?rature (298)
% jacket temperature (298)
% ratios used in the equations
%
%
fov
UAoV
F/V;
- UA/V;
% modeling equations:
%
rate:::: kO*exp{--E_ act/(R*Temp)))'ca;
dcadt = fov*(caf - cal - rate;
dTdt fov-
k
(Tf - Temp) -J (H __ Txn/rhocp) *rate -
(UAoV * (Temp - '1'j);
below we convert back to function notation. fsolve
% seeks values of x(l) and x(2) to drive f(l) and (2) to
_
%
f (1)
f (2) -
dcadt;
dTdt;
2 Function m-file for Integration of Dynamic Equations
[unction xdoL = cstr_dyn(t,x)
%
% 2-state diabatic CSTR model
9) ode45 to find concentration and temperature
%
'2; The call statement from the corrnnand ",lindow is:
%
%
%
[t,X] ode45 ( I cstr dyn I, to, tf, xO) ;
'i; where t is the vector
;t, x is the solution vector (x = [conc;temp])
% to is the initial time
% tf is the final time
% xO is an initial condition vector
% deL-ine the followin9 global paramet.er so that valueE3
% can be entered in the cOlrunand window
% global CSTR PAR
590 Diabatic Continuous Stirred Tank Reactors Module 9
lease 2)
frequency factor 19703*36(0)
heat of reaction (5960)
activation energy (11843)
density*heat cap. (500)
heat trans coctf * area (ISO)
ideal gas constant (1.987)
reactor volume (1)
feed flowrate (1)
teed concentration (10)
feed temperature (298)
jacket (298)
9(, paramet,ors
% CS'l'H PAR (1)
'b CSTI' PAI'(2)
% CSTR_PAR(3)
"ci CSTRpAR(4)
% CS'l'R_PAR (5)
'b CSl'R_PAR ( 6 )
'b CSTR_PAR (7)
"C, ('STR PAR (B)
"C, ('STR_ PAR (9) :
% CS'rI(J'AR(lO)
1, CS'l'R PAR I 1] ) :
'I; states
Cd
c.l; Temp
1 and 2
== concentration of A, kgmol/m
A
3
reactor temperature, d.eg K
% 16 July 96 - (e) B.W. Bequette
revised 2 ,January 1997 -- added CSTRPAR
qlobal CSTR PAR
- -
\\ below we, use conunon not:':-JLion for the staLes to
% improve code readibility
%
Cd
Temp
x Ill;
x (2) ;
parame ter values I case 2 shown _in parentheses:
9
6
kO ('STR PARI.] ) ;
'.',
frequency factor 19703*3600) b
Il
----
rxn CS'I'RPAR(2)
;

heat of reaction (5960)
E (Jct
-
CS'l'R pAR(3) ; activation energy (11843)
rhocp CSTR_PAH.(4)
"
dens.ity-kheat cap. ( ',0 () )
;
--;')
UA CSTR PAR ( ') )
;
'(,
hL trans coeff
*
I l'iO)
..
R CS'I'R PAR (6) ;
constant II 987)
V CS'l'H___YAR (7) ;
9
6 reactor volume (1 )
F CSTICPAR (8) ; % feed flowrate 11)
celf CSTR_PAR(9) ; 'r, conc'entration 110 )
Tf
-
C.s'l'R PARII0) ;
9
6 temperature (298)
'1'j CS'l'RPARIll) ; % jacket temperature 1298 )
%
ratios used in the equat_ions
fov
UAoV
- F/V;
UA/V;
'f, model Lnq
rate = kO*exp(--E_.dct/ (R*'1'emp) )-"ca;
Appendixes
dcadt fov* (cdf - cal - ratei
d'I'dt fov* ('l'f rl'emp) + (I-I _rxn/:chocp) -krate -
(UAoVI rhocp)* (Temp - 'I'j);
%
we convert back to ode45 function notation.
%
xdotll1 - dcadt;
xdot 121 dTdt;
3 cstramat.m
function [amat, lambda] -;c: cstr_amat (ca, 'I'emp)
%
,/, 16 July 96
'l; (c) B.1/,J. Bequette
\" fi.nd the A matrix for the 2-state CSTR to determine the
% stability by eigenvalue analysis:
%
% amat A matrix
7,; larnba - vector of eigenvalues
%
%
591
kG
7, fov
I-l rxn
% E_dct
% rho(:,p
% 'l'f
% caf
'6 UAoV
%
frequC-:-DCY factor, hrA-l
F/V. hr
A
-]
iwat of rXTl, kcal/kqmo:l
activation energy, kcal/kgmo:l
densi ty-kheat capaci ty, kcal Im":3 clefJ K
feed temperature, deg- K
feed concentration of A,
heat trans. coeff.*area/volume, kcal/m
A
3 deg 1< hr
% manipulated input
?o Tj =: jack(,:,t temperature, deq K
(Ii
6 states
(b ca
Tc'mp
of A, kqffiol/m"3
- reactor temperature, deq K
% values
% 2:
fov -;c:
kO -
H_rxn
E__ act
rhocp
'1'f
caf
UAoV
R
1'j
1j
9703*3600;

11843 ;
500i
298;
- 10;
150;
1.98'7;
298;
ks kO*exp(-E_act/IR*Temp));
592
Diabatic Continuous Stirred Tank Reactors
Module 9
ksprime - kSk (E_dct/ (R*Temp":Temp)) ;
%
amat(l,l)
amat(1,2)
amat:(2,1)
amat(2,2)
lambda
- -fov - ks;
- -ca*ksprime;
ks'kH_rxn/rhocp;
-fov - UAoV/rhocp + (H_rxn/rhocp)*ca*ksprime;
ei<;J (amat) ;
4 cstr.run.m(Script File to Generate Phase-Plane Plot)
'6 cstr__run. ill
% b.w. bequette
>6 2 Dec 96
% revised - 4 Dec 96 - more documentation
%
%
% generate phase-plane plot for nonlinear cstr (cstr.m)
% set of initial conditions
96
xOla=- [0.:3;305];
xOl [0.5;3151;
x02 [0.5;325J;
xO:3 [0 . 5; 3.3:)] ;
x04
x05 - [0.15;355J;
x06 [O.5;365};
x07 [0.5-;375];
x08 [0.5;385J;
x09 - [0.5;395];
x010= [0.'i;405];
xOll= [0.5;415J;
x012a=[9.5;305] ,.
x012 [9.5;31'i];
x013= [9.5;325J;
x014 [9.5;335];
[9.5;345J;
x016 [9.:5;35::iJ;
x017 [9.5;365];
x018 [9.5;375J;
x019 - [9.5;385J;
x020 [9.5;395];
x021 - [9.5;4051;
x022 [9.5;415J;
"o
% use ode45 for numerical integration
[tla,xlaJ
[U,x1]
[t2,x2J =
= ode45('csLr' ,O,10,xOla);
ode45('csLr',O/10,xOl);
ode45('cstr' ,0,10,x02);
Appendixes
[t3,x3J - ode4S('cstr',O,lO,x03);
[t4,x4j oclo4S( 'cstr' ,0,lO,x04);
[t.5, x5] ode45 ( , 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] - '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};
- ode45 ('cstr' ,O,lO,x052);
[t53, x53] ode45 ( 'cstr' ,0,10, x053) ;
% phase-plane plot
plot (xl ( ; , 1) ,xl ( ; ,2) , 'w' )
hold on
plot (xla ( ; ,1) ,xla ( ; ,2) , 'w' )
plot (x2 (;,1) ,x2 (;,2), 'w')
plot (x3 ( ; ,1) ,x3 ( ; ,2) , 'w' )
plot (x4 ( ; , I) ,x4 ( ; ,2) , 'w' )
plot (xS ( ; ,1) ,x5 ( ; ,2) , 'w' )
plot. (x6 ( ; ,1) ,x6 ( ; ,2) , 'w' )
plot(x'l (; ,1) ,x'l (; ,2), 'w')
plot (x8 ( ; , I) ,x8 ( ; ,2) , 'w' )
p1ot(x9 (;,1) ,x9(; ,2), 'w')
plot(x10 (;, J) ,xlO(; ,2), 'w')
593
594 Diabatic Continuous Stirred Tank Reactors Module 9
plot(xll(:,ll ,xll(:,21, 'w')
p]ot(x12 (:,1) ,xU (: ,21, 'w')
plot (x12a( : ,II ,x12a(: ,21, 'w' I
plot (x13 ( : ,1) ,xU ( : ,2) , 'w' )
plot (x14 ( : , 1 I ,x14 ( : ,21 , 'w' I
plot (xIS ( : ,1) ,x15 ( : ,21 , 'w' )
plot (x16 ( : ,1) ,x16 ( : ,2) , 'w' )
plot(x1'7 (: ,1) ,x17 (: ,2), 'w')
plot(x18(:, 1) ,xI8(: ,21, 'w')
plot(xI9(:,I) ,xI9(:,21, 'w')
plot (x2 0 ( : , 1) ,x2 0 ( : , 2 I , 'w' )
plot(x21(:,I),x21(:,2), 'w')
plot.(x22(: ,1) ,x22(: ,2), 'w')
%
'to mark the stable and unstable steady-states (0 = stable, -+
= unstable)
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 '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 ( : , 2 I , '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) J x53 ( : ,2) , 'w I ) ;
% plot{x30 (: ,1) ,x30 (: ,2), 'w');
'f, plot(x31(:,1),x31{:,2), 'w');
plot(x32(:,ll,x32(:,2), 'w');
96 plot(x33(:,l),X33(:,2), 'w');
%
% set limits aD plot, and label axes and provide plot
title
%
axis ([0 10 300 425])
xlabel (' kgmol/m
A
3')
ylabel ( , temperature, deg KJ )
wit.h multiple steady-states')
Appendixes
function [Tjs,Tfs,concs) =:: cstr__ io(Tempvec)
%
595
% Generate the steady-state i/o curve for the diabatic CSTR.
% rrempvec is a vector of reactor temperatures generated
% before this routine is called.
'5 This routine solvE:?s tor vector of temperatures
96 that would yield 1:11E;" required reactor temperature vector
8; (ar3suming a constant teed
% In addition, this routine solves for the vector of
% feed temperat.ures that would yield the required reactor
% temperature vector (assuming constant jacket temperature)
%
% For consistency with cstr ss.m and cstr__dyn.m, we use
96 a global parameter vector. The elements of this vector
% should be set in the command window before this routine
is run.
% global CSTR_PAR
% parameters (case 2)
% CS'I'RPAR(ll frequency factor (9703*3600)
% CSTR_PAR(2) heat of reaction (5960)
'Ii CSTR_PAR(3) activation energy (11843)
% CSTR PAR(4) density*heat cap. (500)
% CS'I'K_PAR(5) heat trans coef * area (150)
% CS'l'R.YAR (6) ideal gas constant (1.987)
CSTR_PAR (7): reactor volume (I)
% CS'l'R_PAR(81: feed flowrate (1)
% CSTR_PAR(9): feed concentration (10)
% CS'I'RPAR(lO) feed temperature (298)
" CSTR_PAR(ll): jacket temperature (2981
'r,
% 16 July 96 - (c) B.W. Bequette
96 2 ,January 1997 acld(?d CSTR PAR
%
global CS'I'RPAR
-- -.
%
% parameter values, case 2 shown in parentheses:
%
kO
H_rxn

rhacp
VA
R
V
F
cat
Tf
CSTRPAR (I 1 ;
CS'l'R.PAR (21 ;
CSTR_PAR (31 ;
CSTR Pi\R(4);
- CSTR PAR (5) ;
CSTR PAR(6);
CS'I'R.PAR (7) ;
CS'I'R.YAR (B) ;
CSTR_PAR (9) ;
- CSTR PAR(lO);
% frequency factor (9703*3600)
% heat of reaction (5960)
% activation energy (11843)
% density*heat cap_ (:500)
% ht trans coeff * area (150)
% gas constant (1.987)
% reactor volume (1)
% feed flowrate (1)
% concentration (10)
% feed temperature (298)
596 Diabatic Continuous Stirred Tank Reactors
Module 9
'1'j CSTR_PAR(11); % jacket temperature (298)

% ratios used in the equations
%
%
fov
UAoV
F/V;
UA/V;
1:1ength(Tempvec);
Tj) ;
for i -=
'remp
k
ca
rate
stuffl -
stuff2 -
Tjs (il
conc5(i)
stuff3
stuff4
Tfs (il
end;
'I'empvec ( i) ;
kO*exp(-E_aet/(R*Temp));
fov*caf/ (fov -+- k);
kO*exp (-E dct/ (R*'I'emp)) *ca;
fov-krhocp* (Tnmp - Tt);
H rxn).-ra te;
'I'empvec(i) + (stuffl - sLuff21/UAoV;
.::::: ca;
UAoV* (Temp

Tempvec(i) + (stuff3 - stuff41 / (fov*rhocpl;
6 .m-Cusp Catastrophe
% 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) (8 I ;
[T] S I 'ris I cones J ::::: c8tr io (Tempr) ;
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 ( , , )
zlabe1 ( 'Temp_r' I
IDEAL BINARY DISTILLATION
After studying this module, the student should be able to
Develop the dynamic modeling equations for ideal hinary distillation
Solve for the steady-slale
Linearize and find the slale space model
Understand the dynmnic behavior of distillation columns
Use MATLAB for steady-state and dynamic simulation
'fhe major sections of this module are:
MODULE
10
iVI 10.1
iVI I 0.2
iVI 10.3
iVI 10.4
iVI I0.5
iVI 10,6
iVI 10,7
Background
Conceptual Description (If l)isti Ilation
Dynamic Material Balances
Solving the Stc<ldy-Statc
Solving the Nonlinear l)ynamic Equations
State-Space l,inear Distillation Models
Multipl iei tyBehavior
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 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
vapor
y
x
Ideal Binary Distillation Module 10
liquid
FIGlJH:E !VItO. I Closed system \vith
liquid and vapor in cquiJibrililn.
I)istillation is based on the separation of components of a liquid mixture by virtue
or the difTcrcnccs in boiling points of thccomponcnts. For illustration purposes, \\le will
base our discussion on the separation of liquid streams containing two cOinponents (I)i-
nary mixture). We will refer to the pure component that boils at a lower temperature as
the light component and the pure component that boils at a higher temperature as the
heavy component. For example, in a mixture of benzene and toluene, benzene is the light
cOlnponcnl and toluene is the heavy component.
A saturated liquid mixture of two components at a given concentration is in equilib-
rium with a vapor phase that has a higher concentration of the light component than the
liquid phase. Let x represcnt the mole fraction of the light component in the liquid phase
and y represent the mole fraction of thc light component in the vapor phase. Consider r'ig-
me rvIlO. I as a conceptual representation of phase (vapor/liquid) equilibrium. 'fhe s a l u ~
rated liquid is in equilibrium with a saturalcd vapor. The concentration of the Iighl t l l ~
pOllcnt will be larger in the vapor phase than the liquid phase.
Figure M10.2 is an example of an equilibrium diagram that rcprescnts the relation-
ship bctvvecll the liquid and vapor phase cOITlpositions (mole fraction). For example, if the
liquid composition is 0.5 mole fraction of the light component, we rind frOID Figure
M! 0.2 that the vapor composition is 0.7.
O.B
w
00
'"
0.6
c
Q
"
0,
'"
OA
>
:';;
02
0.5
x, liqUid phase light component
FIGURE i\:IlO.2 Vapor/liquid
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
}'=
. I + (o:-I)x
(MIO.I)
where ~ s known as the relative volatility. FigurcMIO.2 was generated based 011 equa-
tion (M10.1) with (X ~ 2.5.
M10.2 CONCEPTUAL DESCRIPTION OF DISTILLATION
Thcft.JlIowing is a conceptual description of the operation of a binary (two-component)
distillation colunm. The feed typically enters close to the rniddlc of the column (above the
feed stage), as shown in f'igurcMIO.3. Vapor flows from stage to stage lip the colullm,
while liquid flows from stage to stage down the column. The vapor from the top tray is
condensed to liquid in the overhead condenser and a portion of that liquid is returned as
rcflux. Thc rest of that vapor is withdrawn as the overhead product stream; this overhead
rroduct stream cOlltains a concentrated amount of the light componcnt A portion of thc
liquidatthc bottom of thc column is withdrawn as a bol.loms product (containing a con-
Condenser
(Heat removed from condenser)
Overhead receiver
Feed
Stream -----1>1
NF
NS
_...-'::=r=::.-=-----...
Reflux Distillate Product
Vapor Boil-up
(Heat added
to Reboller)
Bottoms Product
FIGURE MlO.3 Schematic diagram for a distillation column.
600 Ideal Binary Distillation Module 10
W
E
8
c
,
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 L
i
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 M10.5 in that an additional input to the stage is from the feed to the column.
L
i
__
l
Xil ViYi
FIGURE 1\'110.5 Conceptual material
Lixi Vi-t-l Yill balance diagram for a typical stage.
FIGlJRE i\-1l0.6 Conceptual rnatcrial
Lnfxnf VIlf11 Ynf-t-l balance diagram for the feed stage.
Sec. Ml0.3 Dynamic Material Balances 601
M10.3 DYNAMIC MATERIAL BALANCES
M10.3.1 All Stages Except Feed, Condenser, and Reboiler
The component balance for the liquid phase of a lypical stage as shown in Figure
MIO.S is:
accumulation liquid frolll
tray above
vapor from liquid vapor
tray below leaving leaving
dNlrt
i
dl
(M 10.2)
where M
i
is the liquid molar holdup on stage i.
[.'01' this simple binary distillation model, we will make the COllllllon assumption of
cquimolal ovcrllow (King, 1980). For any stage except the feed stage, we assume that the
vapor tlowratc from one stage is equal to the vapor molar fJowratc of the stage below:
(MI0.3)
and that the liquid leaving the stage is equal to the liquid flowing from olle stage ahove:
(MIOA)
M10.3.2 Feed Stage
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:
V
2
(MI0.7)
where Lv and D represent thc reflux and distillate molar nowratcs, respectively.
M10.3.5 Summary of the Modeling Equations
where Vreboilcr is the reboiler molar llowrate and B is the bottoms product molar flowrate.
The rectifying section (top section of column, above the feed stage) liquid molar nowrates
arc:
(MIO.8)
Module 10
Ideal Binary Distillation
Ii = L
NS
_
1
- Vrehoi1er
A total material balance around the rcboilcr yields:
M10.3.4 Reboiler
602
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 flowrates are:
The recti fying section vapor molar flowrates arc:
Vii = V, + FCI - 'lr)
In the following ~ e assume a constant liquid phase molar holdup (dM/dt) = 0).
The overhead receiver component balance is:
(MIO.II)
(MIO.12)
(MIO.l3)
The rectifying section component balance is (from i = 2 to N F ~ l
dXj =
"I
(MIOI4)
The feed stage balance is:
dX
NF
dl
(MIO.IS)
The rectifying section component balance is (from i = NF+l to NS-I):
"Xi 1 [
= Lx
dt M
r
'S i
And the rehoiIer component baLance is:
(MIO.16)
dx
NS
' =
"I
1
M [L\"NS_l - Bx
NS
- V\YNS]
Ii
(MJO.17)
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-=
, I + (IX - I )x,
M10.4 SOLVING THE STEADY-STATE EQUATIONS
(MIO.18)
To obtain the steady-state concentrations we must solve the system of equations, f(.\') :;:: O.
From the overhead recci vcr component balance:
I, 0
}<rol11 the rectifying section component balance (i = 2 to
= Ll\};:i t + VRYi+ 1 LW'C
i
VRYi = 0
From thefced stage balance:
= LgxN/' -J + VSYNr+ I + FZ
r
LS'''-NF - VUYNI '-co 0
From the stripping section component balance (i ::::: NF+ I to NS-l):
f; :0'::' LSX
i
_
1
+ V.SYill - LSx
i
- VSYi = 0
And from the reboiler component balance:
f:vs = LSX
NS
_
1
- Bx
NS
- VSYNS = ()
(M 10.19)
(M10.20)
(M10.21)
(MIO.22)
(MI023)
where B = L, - V,.
We must realize that (M 10.19)--(MI 0.23) constitute a set of nonlinear algebraic
equations, since the relative volatility relationship (M I 0.18) is nonlinear in the state vari-
able. Equations (M I 10.2:1) arc N.S' equations in NS' unknowns. A Newton-based
technique will be used to solve the equations.
EXAlV1PLE MIO.l Operation of a 41-Stage Column
Consider a 41-stage column with the overhead condenser as stage 1, the feed tray as stage 21
and the reboiler as stage 41. The following parameters and inputs apply
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
r:rom an overall material balance, the hottoms product f10wratc is;
B = F - D = 1 --- 0,5 mol/min
the stripping section flowr:ltc is:
L
s
= R -j Fqr = 2.706 + I = 3.706 mol/min
and a balance around the reboiler yields:
V\' ,."'" L
s
-- B ,= 3.706 -- 0.5 c=. 3.206 mol/min
'[ he ll1-tJle d 1st C,b, Tn (shown in the Appendix) is used to sol ve for the steady-state composi-
tions.
x fsolve( S,3' ,xO)
The resulting compositions are shown in Figure M 10.7. Notice the strong sensitivity to rellux
flowrate.
alpha 0 1.5. R 0 2.706. V 0 3206
08
0.0.6
E
8
:c
>04
0.2
[
_-J
nominal
__:_ _
o
____1... _
5 10 15
__-------'__ _ .-----L.-
20 25
stage
l.,_ ... _
30 35

40
FIGURE MJO.7 Liquid phase composition (mol fraction of light component)
as a function of stage number. Solid := nominal reflux, dashed;::: +1II(, reflux,
dOlled:::o. --1% rellux.
'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).
Steady-State Input-Output Relationships
The scnsitvity to rdlux rate is also shown by the plot in Figure MIO.X. The steady-stale gain
(change in oUlput/dmnge in input) for distillatc composition is large whcn reflux is less than 2.7,
Sec. Ml0.5 Solving the Nonlinear Dynamic Equations 605
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
2.66 2.68 2.7
reflux
2.72 2.74
0.06
0.04
0.02
o ::--::.-----
2.66 2.68 2.7
reflux
1_________ _----L _
2.72 2.74
FIGURE i\i110.8 Steady-state input (reflux)- -olltput (distillate or boUoms
composilion) relationship.
M10.5 SOLVING THE NONLINEAR DYNAMIC EQUATIONS
Equations (M IO.I3)--(M10.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
EXAMPLE lV110.2 Dynamic Response
Consider now the previolls problem, with the initial condiLions of Lhe stage compositions equal
to the steady-state solution or Example M1O. L The parameters needed for the dy-
munic simulation are the molar holdups on each stage. Here we use the following parameters:
MJ=M
o
tv}] =
M
3
:::: 5
overhead receiver molar holdup
feed tray molar holdup
hottoms (reboiler) molar holdup
:::::;5 mol
= 0.5 mol
=5 mol
606 Ideal Binary Distillation Module 10
To illustrate the nonlinear behavior we compan.' the results of J-, I(j{ step changes in the reflux
rate at time t:;:: 5 minutes.
[t,x]o::ode45( 'dist_dyn' IO,400,xO)
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 ~ 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
0.06
0.04
?
0.02
o
o
50
50
100
100
150 200 250
time, min
150 200 250
time, min
300
300
350
350
400
400
FIGURE M10.9 Illustration in Ilonlinear response or distillate and bottoms
compositions to :'>tcp changes in reflux. Solid line c::: +l(k, Dashed line;:::: -19().
M10.6 STATE-SPACE LINEAR DISTILLATION MODELS
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'
y' ;::::: C x'
(M 10.24)
(MI0.25)
Sec. M10.6 State-Space Linear Distillation Models 607
where! is used to represent the deviation variables. Xl :;:;: X -- ~ u' ;:;;: u -- u.\ (the subscript S
indicates the steady-state values). Defining
av 0'.
I( = .' =
, ilx; (I+I-I)x)'
and linearizing the dynamic equations (M IO.13)--(M IO.I?)
(MIO.26)
(M 1(27)
.;01' i = 2 to NF-] :
ill;
JX
i
1
ill;
Au I I = -)
(-t'i+ 1
F'or the feed stage:
V/JC
A11)
M[
VnJ(; I
I'vf/
(M 1(28)
(M 10.29)
(M 10.30)
(MI031)
ANF,NF I
A,V/<Nr+ I
Fori=NF+1 toNS-I:
A
iJI
and for the rcboiler (stage iV,,')
illy/
JXA'V_I
ill"
()x
NP
ill,,
dX,vF' I
(If;
ax; 1
ill;
()X
ii
I
V)<',/
M,
M[
V/<i-+J
iVf/
(MI032)
(MIO.33)
(M I 0.34)
(ivlIO.35)
(M 10.36)
(ivlI0.37)
608
at;
A NS,NS-l ."C:_-
O.li_ I
ANS,NS
Ideal Binary Distillation
Mil
_(13 + V,KN ,)
MlJ
Module 10
(M10.38)
(M 10.39)
Now, for the derivatives with respect to the inputs; ttl ;;;;: L
R
;;;;: L! and Ill:::: Vii'::::: VrehoJler:
For i = I to NS-I:
anel for the bottom stage:
M
r
B,.2
aj,
0
au?
aj;
Yil
-
B'.2
.
OllZ M
r
(M IOAO)
(MIOAI)
aj;
B .....
N.'), I au]
M
NS
ill,
!!"\2 '.
1'_,. aU
2
- Yvs
M
NS
(MI OA2)
If the output variables arc the overhead and bottoms compositions, tIlcn:
C
u
" 1, while eli .c. 0 for i j. 1
C?NS = 1, while C'!.i -::0' 0 for i ;f!
M10.6.1 Transforming the State Space Linear Models
to Transfer Function Form
The matrix transfer function is:
G(s) (,(sf-A)'!!
(M I 0.43)
(MI OA4)
(M IOA5)
It is easy to generate MATLAB m-files to calculate each of the matrices
(A,B,C) for a particular set of parameters (and steady-state comrJositions). For a colunm of
reasonable sile (say the 41-stagc example) the denominator polynomial ill (M 10.45)
would be quite large (say 4pt order). \Vhat is often more llseful is to be able to directly
calculate the steady-state gain matrix, as shown below.
The steady-state gain matrix is:
(MIOA6)
where, again, it is easy to generate a MATLAB m-file to perform this calculation.
M10.7 MULTIPLICITY BEHAVIOR
Even simple ideal binary distillation columns have been shown recently to have interest-
ing 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 flows). Also, the dynarnic responses or these COll1-
positions depends on the magnitude <lnd direction of changes in the manipulated inputs.
REFERENCES AND FURTHER READING
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.
The dynamic lnodcling equations for distillation are prescIlted by:
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:
Holland, C.D. (1981). FUlldamenfals Multicompoflent Distillation. New York:
McGraw-Hili.
Holland, CD., & A.l. Liapis. (1983). Computer Methods'for Solving Dynamic .)'ep-
aratioll Problems. Ncw York: McGraw-HilI.
The panlllleters for Example MI0.1 are presented in the following two references:
Skogestad, S., & M. Morari. (1988). Understanding the dynamic hehavior of
lation columns. /ild. 6lIg. 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 in ideal
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
STUDENT EXERCISES
Module 10
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:
R =
ifF =
F
lJ =
Zp =
5
3 mol/min
I
1 mol/min
0.5 mol/min
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.703] [ distillate composition ]
x = 0.486 = composition of stagc 2 (the feed tray)
0.297 bottoms product composition
Consider now the dynamic behavior, with the initial conditions of the stage
sitions equal to the solution. The additional paramcters needed for the
dynamic simulation are the molar holdups on each stage. Usc:
M, kIn overhead receiver molar holdup 5 mol
M
2 =
feed tray molar holdup 0.5 mol.
M,
=
5
=
bottoms (reboilcr) molar holdup
=
5 11101
At lime zero, the reflux is changed from 3.0 mol/min to 3.2 mol/min. Usc ode45
and dist_dyn. mto simulate the dynamic behavior shown in the figures below.
0.78
0.76
0.74
0.72
0.7
time
0.08
(J) 0.06

x
.:- 004

0.02
S 10 is
time
The Reflux is step changed from 3.0 to 3.2 at 1:::: I minute.
Appendix
APPENDIX
function f ;::: dist_ss(x);
%
% solve for the steady-state stage compositons in an ideal
% binary distillation column using fsolve.
%
% (c) 1993 B. Wayne Bequette - 21 june 93
% revised 31 Dec 96
%
% All flowrates are molar quantities. Stages are numbered
% from the top down. A total condenser is assumed.
% overhead receiver is stage .1. The partial reboiler
% is stage ns (the number of equilibrium "trays" is then
% Ds-I). The column parameters should be specified in the
% DIST_PAR array.
%
% to use this function, enter the following in the con@and
% window, or from a script tile (after defining parameters
% in the DIST_PAR array:
%
% x ;::: fsolve (' dist_ss' I xO)
%
xO is a vector of initial guesses for the liquid
% phase stage compositions (length(xO) :c: DS)
%
%
% is a vector of distillation column parameters
% used by both dist sS.m and
%
611
if 1engthIDIST_PAR) < 8;
disp ( I not enough parametlC':rs given in ')
disp (' ')
disp (' check to SQe that global DIS'I' PAR ha;" bCE"n defined ')
return
end
%
alpha DIST_PAR(l) ;
9
6 relative volatility 12. OJ)
ns DIST_PAR(2) ; % total number of stages (3 )
nf ; % 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
~ t f (i)
6 Ibot
% II'
% Is
% VI'
% VS
% x(i)
% y(i)
%
ith comp mat bal equation
bottoms product flowrate
liquid flow in rectifying section (top)
liquid flow in stripping section (bottom)
vapor flow ~ rectifying sec (::::: vapor + feed* (l-qf)
~ vapor flow ~ stripping section ~ vapor)
::0:- mole frae light component on stage i, liq
mole frae light component OD stage i, yap
% rectifying and stripping section liquid flowrates
%
%
lr
Is
reflux;
refl_ux + feed*qf;
% rectifying and stripping section vapor flowrates
%
%
vs
vr
vapor;
vs + feed*(l-qf);
% distillate and bottoms rates
%
dist_
Ibot
VI' - reflux;
Is - vs;
%
if dist < 0
disp('error in specifications, distillate flow < 0')
return
end
if Ibot < 0
disp{'error in specifications, stripping section ')
disp(' ')
disp ( I liquid flowrate is negative')
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
'r,
for i";2:nf-l;
flil=lr*xli-ll+vr*yli+ll-1r*x(il-vr*yli) ;
end
%
% feed stage
613
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
function xdot. == __ dyn (t J x) ;
o
o
% solve for the transient ;-Jtage compositions in an ideal
% binary column using ode45.
%
% (e) 1997 B. Wayne Bequette - 24 Jan 1997
% revised 31 Dec 96
%
All flowrates art::" molar Stages are numbered
% from the top down. A total condenser is assumed.
% The overhead receiver if3 stage 1. The partial reboiler
% is stage DS (tIle number of equilibrium "trays" is then
n8-1). column should be in the
% DISrr PAR array.
% to use this function, enter the fol1ow,ing in the command
% window, or from a script file (after defining parameters
% in the DIST_PAR array:
%
96 [t, xl ode451 'dist_dyn' ,to,tf,xO)
% where xO is a vector of initial values for the liquid
% phase stage compositions (length(xO) DS)
%
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
if 1ength(DISTPAR) < 11;
( I not enough parameters given in
disp (' ')
disp ( 'check to sec that global DIST_PAR has been defined')
return
end
%
alpha DIST_PAR(I) ; %
n;:; DIS'r__ PAH (2) ;
').
"
n DIST PAR(3 )
" ; -,:i
[cedi DIS'I" PAR (4) ; %
zfeedi
-
DIS'T' PAR ( ) ; %
--
qf DIST PAR(6) ; %

rc;luxl DIST.. PAR(7) ;
9
0
vapori DIST_PAH(S) ; %
mel DIST_PAR(9) ;

mb DIS'I' PAR (10) ; %
ml- DIS'l' PAR (] 1) ;
'x
%
relative (1.5)
total number 0 f s Laq(-'-;s (41)
feed stage' (21)
initial feed flowrate (1)
initiaJ feed composiLiol1, light comp
(0.5)
feed quality (1 = sat:' d liqd,
o saL'd vapor) (1)
initial reflux flowrate (2.706)
initial reboiler vapor lowrate
(3.206 )
d.1.stillatE' molar (5)
bottoms molar hold-up (5)
sLaqe molar hold-up (D.5)
if length (DIST_Pt\R) == 19;
stepr DIST_PAH(12); magnit_udn step in reflux (O)
U:,:;tepr DIST__ PAR (13); % of reflux step change (0)
rnS'l'. PAR(14); % magnitude stc':'};) in vapor (0)
tstepv DIS'1' YAR(15) i % time of vapor step change (0)
stepzf DIST_PAR(16) i 96 magnitude of comp change (0)
tstepzf DIST_PAR(17)i % time of feed camp change (0)
stepf DIST]AR (IS); ';, magnitude of feed flow change (0)
IHST PAR(19) i % time of foed flow change (0)
else
stepr 0; tstepr = 0 i stepv = 0; tstepv = 0 i
st:epzf 0 i tstepzf = 0; stept = 0; tst.epf = 0 i
end
%
%
%
%
%
:(; used by (cJistillat:ion dynamics)
dist disLillate product flO1.,vrate
Ibot bottoms product flowrate
LI' liquid flow in rectifying section (top)
Is liquid flow in stripping section (bottom)
vr vapor flow - rectifyin9 sec {= vapor + feed* (l-qf)
vs vapor flow - stripping section (= vapor)
x (i) mole frac light component on stage i I liq
xdot(i) light component ith stage mat bal equation
y (i) molc.:> frac light componenl- on stagei, vap

Vs check disturbanc0f; in rt-'lflux, vapor boil-up, feed composit::.ion
<J(, and feed flowrate
%
if t < tstepr;
Appendix 615
reflux reflux,i;
else
refLux refluxi + sLepr;
('Ond
if t < tstepv;
vapor vapor i;
else
ViJ.por
end
vapori sLepv;
if t: < tsLepzf;
zfeed. - zf(:,-cdi;
else
zfeed - zfeedi + stepzf;
end
%
if t <
feed
else
feed
end
tstepf;
feec1i;
feec1.i t- SLOpr
(I, rectifying
lr
1s
and strippi.nq section
reflux;
reflux! feed*qf;
liquid flowrates
9,5 rectifying and section vapor flowrates
%
vs
VI'
vapor;
vs + feed*(l-qfl;
% distil.late and bottoms rates
%
dist.
Ibc) t:
vr -- reflux;
Is -
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 ')
return
end
% zero the function vector
%
zeros (ns, 1) ;
%
616 Ideal Binary Distillation Module 10
% calculate the equilibrium vapor compositions
%
for i==l:ns;
y(i)=(aIpha*x(i)I/(I.+(alpha-I.)*x(i)l;
end
%
% material balances
%
% overhead receiver
%
xdot(II=(I/md) * (vr*y(2) -(dist+reUux) *x(II);
%
% rectifying (top) section
%
for i=2:nf-l;
xdot (i I = (I/mt) * (Ir*x (i-l I +vr*y(itl) -lr*x (i) -vr-'y( i) ) ;
end
%
% feed stage
%
xdot (nf) (lImt) * (Ir*x (nf-l I +vs *y (nf+1) -ls'x (nf 1-
r*y(nf)+feed*zfeed);
%
% stripping (bottom) section
%
for i==0+1:os-1;
xdot(il=(l/mt)*(ls*x(i-ll+vs*y(i+l)-ls*x(il-vs*y(i)) ;
end
%
% reboiler
%
xdot (ns 1= (l/mb) * (18 *x (ns-l) -Ibot *x (ns) -vs *y (ns) I ;
Absorption, 53, 490
Algebraic Equations
linear, 52
nonlinear, 54
direct substitution, 55
false position, 60
interval halving (bisection), 58
Newton's method, 60, 66
Analysis, II
Balance equations, 17
integral, 18
instantaneous (differential), 20
Batch reactor, 143
linear regression, 458
semi-batch, 155
Bifurcation
continuous systems, 361
Hopi; 388
pitchfork, 362
saddle-node, 366
transcritica1,368
discrete systerns, 342
Biochemical reactor, 128,250,529
bifurcation behavior, 549
INDEX
dynamic behavior, 535
linearization, 536
model, 530
Monad kinetics, 532
multiple steady-states, 540
phase-plane, 320, 539
steady-state, 534
substrate inhibition kinetics, 533
Block diagrams, 262
SIMULINK, 278, 467
Boundary value differential cquati(l!ls,
283
Chaos, 337, 396
Characteristic cqu<1tion, 145, 216, 289
Characteristic polynomial, 444, 445
Cobweb diagrams, 339
Cofactor, 440
Complex variables, 421
Constitutive relations, 27
equilibrium, 28
heat transfer, 29
kinetics, 27
gas law, 27
valves, 29
617
618
Continuous stirrcc!lank reactor (CSTR)
isothennal, 21, 39, 200, 20 1,293,506
diaharic, 559
Convergence, 55
Cramer's rule, 441
Critically damped, 219
Cusp catastrophe, 374, 578
Damping factor, 216
Decay ratio, 221
Decision variables, 454
Determinant. 440
conditions for stability of two-stale
systems, 3 J2
Deviation variables, J 10, 288
Diabatic reactor. 559
cusp catastrophe, 578
dynamic behavior, S(lS
linearization. 567
571
motkl,561
multiple steady-states, 572
563
Dimensionless models, 35
Direct sub,<.;titution, 55
l)iscretl;>timc models, 290
stale space, 291
transfer function, 291
Distributed parameter system, 6, 8, 34
Distillation, 597
dynamic behavior, 605
linearization, 606
model. 601
multiple 608
steady-state, 603
Eigenvalues, 443
nth-order differential equations, 146
state-space models, 120
analysis, 311
Eigenvectors, 44:i
state-space models, 120
phase-plane analysis, 311
Energy, 31
kinetic, 31
internal. 31
potential, 31
total,31
Index
Enthalpy, 31
Equilibrium point, 52
Equilibrium stage, 492, ()Ol
Exothermic, 560
heal of reaction, 561, 562
Estimation
discrete models, 295
first-order ITanskr functions, 195
linear regression, 452
Euler integration, XI
576
liaise position, 60
ricedback, 273
Feigenbaum's nUlnber, 353
r:inal value theorem. 177
Pixed point, 52, 344
Heated mixing tank, 32, 471
Heterogeneous differential equations, 152,
289
llo!llogelleous differential equations,
145,289
Hopi' bifurcation, 3X8
diabatie reactor, 584, 587
Lorenz equations, 401
llysteresis, 371
biochernical reactor, 550
diabatic CSTH., 582
Identity matrix, 439
Ignition, 576
ImpUlse responses
first-order systems, 198
MATLAB,236
second-order systems, 222
Initial conditions, 95,120,146
Initial value theorem, 177
Input variable, 37
Integrating systems, 206
Integration methods, 80
Euler, explicit, 81
iniplicit, 82
Runge-KuHa, 88
step size, 82
Inverse
matrix, 53, 441
Laplace transform, 169
Index
Inverse response, 227, 229
parallel processes, 271
van de Vusse reactor, 520
Jacohian matrix, 169
Laplace transforms, 168
applications, 178
definition. 169
derivatives, 173
exponential, 170
integrals, 173
Initial value thcorem, 177
final valuc theorcm, 177
irupulse, 176
pulse, 174
ramp, 174
step, 17 I
table, 186
time delay, 172
Lead-lag transfer functions, 208, 264
Least squares, 452
Levcllocrg-M<1Il1Ui11dt,7()
Limit cycle, 323, 384
Linear regression, 452
hatch reactor, 458
decision variables. 454
least squares objective function, 454
MIITLAB,45R
solution, 455
Linear systems analysis, II
Linearll,ation, 109, 117, 2f<,7
Logistic equation, 334
Lorenz equations, 195
introduction, 396
model equations, 397
stability, 399
398
Lumped paranlCtcr systems, 6
MIITLAB,415
background, 416
commonly used cOllllnands, 431
commonly llsed functions, 432
complex variables, 421
diary, 430
entering matrices, 417
if-then, 427
for-loops, 427
function routines, 429
MATHWORKS,431
multiplication, 421
plotting, 422
script files, 428
toolhoxes, 430
transpose,418
workspace, 419
MATLAB, functions and routines
conv, 269
det, 447
eig, 446
expm, 124
feedback, 276
[solve, 70
fze:ro, 63
impulse, 236
initial, 127
ode23, 95
ode45, 95
par,:;d.lel, 272
plot, 422
polyf it, 459
polyval, 460
roots, 64,275
269
ss2tf, 252
"tel', 127,234
Lf2ss.234
trace, 447
Matrix operations and properties, 436
addition, 436
co-factor, 440
determinant. 440
diagonal, 439
eigenvalue, 443
eigenvector, 443
identity, 439
inverse, 53, 441
luinors, 440
multiplication, 437
trace, 440
transpose,
vectOr norm, 448
Matrix transfer-functions, 248
Mean value theorem, 19
Minor, 440
619
620
Mixing tank, J 91
Model
definitions, 4, 5
dimensionless, 35
mathematical, 16-40
uses, 17
control system design, 17
operator training, 17
process design, 17
safety, 17
Multiplicity (multiple steady-states), II
biochemical reactors, 535, 540
diabatic CSTR, 564,572
distillation, 608
input Illultiplicity, 524
outpullllultiplicity, 574
Newton's method
single equation, ClO
multiple equations, 66
quasi-,69
Norm
Vector,44X
Nth order ordinary differential equations
homogeneous, 145,289
non-homogcnC(lliS (heterogeneous), 152,2:)9
time-varying parameters, 154
Numerator dynamics, 226
Objective function, 454
Optimi/.ation,454
Orbit diagrams, 342
Orthogonality, 448
()verdmnpcd,2IX
Overshoot, 221
Padc approximation, 230
Parameter, 23, 37, 38
Parameter estimation
discrete models, 295
first-order transfer functions; 195
linear regression, 452
Parlial fraction expansion, 179
complex roots, 183
distinct roots, 181
repeated roots, 182
Periodic behavior, 335, 348
Phase-plane analysis, 303
biochemical reactor, 321
diabatic reactor, 572
heated mixing tank, 486
linear, 304, 311
nonlinear, 316
Pitchfork bifurcation, 363
Poles, 145, 228
o l e ~ l c r o cancellation, 263
Population growth, 332
Process modeL 5
developing equations, l6
Quadratic map, 334
Rank. 443
Reaction-dilfusion. 35
Recycle, 273
Rcguli falsi, 60
Re-Jati vc order, 219
Relative volatility, 599
Regression analysis, 452
Rise time, 221
ROLlth stability criterion. 157.276
Saddle point, 305
Semi-batch reactor, 155
Shooting method. 2'cl7
Sine inputs, 224
Similarity transform, 120,447
Simulation, 10
SingUlar matrices, 443
SIMULlNK, 278, 464
Space time, 508
Space velocity, 508
Stability
discrete-time models, 291
fixed-point solutions, 344
numerical methods, 78, 84
state space models, 130, 311
transfer function models, 229
State-space models, ] 06
absorption, 494
biochemical reactor, 536
diahatic reactor, 567
distillation, 606
heated mixing tank, 475
isothermal CS'rR, 5 {I
van de Vussc reactor. SIR
Index
Index
State variables, 23, 37
Step response
absorption, 496
distillation, 606
effect of poleshcros, 228
first-order SystCrllS, 193
integrating system, 20X
isothermal CSTR, 203, 5J4
lead-lag systems, 209
MATLAB, 127,234
second-order systems, 2] 7
second-order with numerator dynamks,
227
statc space models, 127
stirred tank heater, 478
time-deJay systems, 231
van de Vussc reactor, 521
Surge drums
gas, 26
liquid, 106, 112. 115
Symbolic analysts, 4
System, 10
Taylor series, 60, J 09
'fhcrmodynamics, 31
Tolerance, 55
absolute, 55
relative, 55
Trace
conditions for stability of two-stale
systems, 312
Ilmtrix, 44()
Transfer functions
first-order. 191
first-order plus time-delay, 204
integrating, 206
lead-lag, 208
matrix, 248
second-order, 2 J6
series, 267
cI'ranspose,438
reviews
linear regression, 452
MATLAB,415
matrix algebra, 435
SIMULlNK,464
vall de Vusse model
linear, 293, 518
nonlinear, 516
Washout, 540
Zeros
algebraic equation, 63
of a transfer function, 22R
plane, 229
621
ESCOLA CC c'
BIBLI01t:CA
Prentice Hall PTn Online!
plug into
Prentice Hall PT Online!
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.
Visit the Prentice Hall PTR Web page at
and get the latest information about:
New Books, Software & Features of the Month
New Book and Series Home Pages
Stores that Sell Our Books
Author Events and Trade Shows
join prentice hall ptr's new internet mailing lists!
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.
Visit the Mailroom at
to subscribe to our mailing lists in...
COMPUTER SCIENCE:
Programming and Methodologies
C\nnmunications
0pcrilting Systems
!Jatabclse'technologies
ENGINEERING:
Elcctricall':ngincering
ChcmiGll i:lnd Environmental Engineering
Mechanical and Civil Engineering
and Quality
ICHEMICAL ENGINEERING I
Process Dynamics
Modeling, Analysis, and Simulation
B. Wayne Bequette
,
In today's highly integrated chemical process plants it is important to consider process
dynamics at the process design stage. This innovative book applies the power of MATLAB
and SIMULINK software to the dynamic behavior of chemical processes. Computer simulation
techniques allow the application of multiple analytical strategies, both linear and nonlinear,
to create accurate, adaptable models for real-life chemical processes.
With an emphasis on numerical methods and the dynamic nature of chemical processes,
Process Dynamics covers:
Process Modeling: material and energy balances, lumped parameter systems.
scaling, and constitutive relationships
Numerical Techniques: algebraic equations, numerical integration, associated
MATLAB routines
Linear and Nonlinear Systems Analysis: Laplace transforms, transfer function
analysis, block diagrams, bifurcation, the quadratic map, chaos theory
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.
About the Author
B. WAYNE BEQUElTE is an Associate Professor of Chemical Engineering at Rensselaer
Polytechnic Institute. He holds a B.s. from the University of Arkansas and a Ph.D. from the
University of Texas at Austin. He has published numerous articles on process dynamics and
control, with an emphasis on nonlinear systems. He also serves an Associate Editor of
Automatica, a journal of the International Federation of Automatic Control. This book is
based on seven years of experience In teaching Process Dynamics and ChemiCAll Process
Control. '
ISBN 0-13-206889-3
PRENTICE HALL
Upper Saddle River, NJ 07458
http://www.phptr.com
9780132 068895
90000

Vous aimerez peut-être aussi