Process Control Modeling Design and Simulation B Wayne Bequettepdf PDF Free
Process Control Modeling Design and Simulation B Wayne Bequettepdf PDF Free
• Table of Contents
Process Control: Modeling, Design, and Simulation
By B. Wayne Bequette
Master process control hands on, through practical examples and MATLAB(R)
simulations
This is the first complete introduction to process control that fully integrates software
tools—enabling professionals and students to master critical techniques hands on, through
computer simulations based on the popular MATLAB environment. Process Control: Modeling,
Design, and Simulation teaches the field's most important techniques, behaviors, and control
problems through practical examples, supplemented by extensive exercises—with detailed
derivations, relevant software files, and additional techniques available on a companion Web site.
Coverage includes:
Dynamic behavior of linear systems: state space models, transfer function-based models,
and more
Feedback control; proportional, integral, and derivative (PID) controllers; and closed-loop
stability analysis
Frequency response analysis techniques for evaluating the robustness of control systems
Improving control loop performance: internal model control (IMC), automatic tuning, gain
scheduling, and enhancements to improve disturbance rejection
Split-range, selective, and override strategies for switching among inputs or outputs
Control loop interactions and multivariable controllers
Bequette walks step by step through the development of control instrumentation diagrams for an
entire chemical process, reviewing common control strategies for individual unit operations, then
discussing strategies for integrated systems. The book also includes 16 learning modules
demonstrating how to use MATLAB and SIMULINK to solve several key control problems, ranging
from robustness analyses to biochemical reactors, biomedical problems to multivariable control.
[ Team LiB ]
[ Team LiB ]
• Table of Contents
Process Control: Modeling, Design, and Simulation
By B. Wayne Bequette
Copyright
PRENTICE HALL INTERNATIONAL SERIES IN THE PHYSICAL AND CHEMICAL ENGINEERING SCIENCES
About Prentice Hall Professional Technical Reference
Preface
Background
Textbook Goals
Chapters
Learning Modules
Textbook Web Page
Acknowledgments
Chapter 1. Introduction
Section 1.1. Introduction
Section 1.2. Instrumentation
Section 1.3. Process Models and Dynamic Behavior
Section 1.4. Control Textbooks and Journals
Section 1.5. A Look Ahead
Section 1.6. Summary
Student Exercises
Module 8. CSTR
Section M8.1. Background
Section M8.2. Simplified Modeling Equations
Section M8.3. Example Chemical Process—Propylene Glycol Production
Section M8.4. Effect of Reactor Scale
Section M8.5. For Further Study: Detailed Model
Section M8.6. Other Considerations
Section M8.7. Summary
References
Additional Exercises
Appendix M8.1
Copyright
Library of Congress Cataloging-in-Publication Data
p. cm. — (Prentice-Hall international series in the physical and chemical engineering sciences)
670.42'7—dc21
2002032953
Prentice Hall books are widely used by corporations and government agencies for training,
marketing, and resale.
For information regarding corporate and government bulk discounts please contact:
Other product or company names mentioned herein are the trademarks or registered trademarks
of their respective owners.
For MATLAB product information, please contact:
Tel: 508-647-7000
Fax: 508-647-7101
E-mail: [email protected]
Web: www.mathworks.com
All rights reserved. No part of this book may be reproduced, in any form or by any means,
without permission in writing from the publisher.
10 9 8 7 6 5 4 3 2 1
Pearson Education—Japan
Dedication
To Pat, Brendan, and Eileen and my parents, Bill and Ayleen Bequette
[ Team LiB ]
[ Team LiB ]
ADVISORY EDITORS
CROWL AND LOUVAR Chemical Process Safety: Fundamentals with Applications, 2nd edition
CONSTANTINIDES AND M OSTOUFI Numerical Methods for Chemical Engineers with MATLAB Applications
CUTLIP AND SHACHAM Problem Solving in Chemical Engineering with Numerical Methods
TURTON, BAILIE, WHITING, AND SHAEIWITZ Analysis, Synthesis, and Design of Chemical Processes, 2nd
edition
[ Team LiB ]
[ Team LiB ]
Our roots are firmly planted in the soil that gave rise to the technological revolution. Our
bookshelf contains many of the industry's computing and engineering classics: Kernighan and
Ritchie's C Programming Language, Nemeth's UNIX System Administration Handbook,
Horstmann's Core Java, and Johnson's High-Speed Digital Design.
PH PTR acknowledges its auspicious beginnings while it looks to the future for inspiration. We
continue to evolve and break new ground in publishing by providing today's professionals with
tomorrow's solutions.
[ Team LiB ]
[ Team LiB ]
Preface
Background
Textbook Goals
Chapters
Learning Modules
Acknowledgments
[ Team LiB ]
[ Team LiB ]
Background
There are a variety of courses in a standard chemical engineering curriculum, ranging from the
introductory material and energy balances course, and culminating with the capstone process
design course. The focus of virtually all of these courses is on steady-state behavior; the rare
exceptions include the analysis of batch reactors and batch distillation in the reaction engineering
and equilibrium stage operations courses, respectively. A concern of a practicing process
engineer, on the other hand, is how to best operate a process plant where everything seems to
be changing. The process dynamics and control course is where students must gain an
appreciation for the dynamic nature of chemical processes and develop strategies to operate
these processes.
[ Team LiB ]
[ Team LiB ]
Textbook Goals
The major goal of this textbook is to teach students to analyze dynamic chemical processes and
develop automatic control strategies to operate them safely and economically. My experience is
that students learn best with immediate simulation-based reinforcement of basic concepts. Rather
than simply present theory topics and develop analytical solutions, this textbook uses "interactive
learning" through computer-based simulation exercises (modules). The popular MATLAB software
package, including the SIMULINK block-diagram simulation environment, is used. Students,
instructors, and practicing process engineers learning new model-based techniques can all benefit
from the "feedback" provided by simulation studies.[1]
[1]It should be noted that I am not a proponent of a solely "simulation-based" control education, where
students iteratively adjust parameters in a JavaScript simulation until acceptable responses are obtained. I
wish for students to obtain the classic mode of understanding as analyzed so well by Robert Pirsig in Zen
and the Art of Motorcycle Maintenance (Bantam Books, 1974). This deeper understanding of process control
can be obtained by rigorous analysis and by selected simulations where the student plays a direct role in the
implementation of an algorithm or strategy of choice.
Depending on the goals of the instructor and the background of the students, roughly one chapter
(± 0.5) and one module can be covered each week. Still, it is probably too ambitious to cover the
entire text during a typical 15-week semester, so I recommend that instructors carefully choose
the topics that best meet their personal objectives. At Rensselaer Polytechnic Institute, we teach
the one-semester, 4-credit course in a studio-based format, with students attending two 2-hour
sessions and one 2-hour recitation (which also provides plenty of "catch-up" time) each week.
During these sessions we typically spend 45 minutes discussing a topic, then have the students
spend the remaining hour performing analysis and computer simulation exercises, working in
pairs. During the discussion periods the students face the instructor station at the front of the
room, and during the simulation periods they swivel in their chairs to the workstations on the
countertops behind them. This textbook can also be used in a more traditional lecture-based
course, with students working on the modules and solving homework problems on their own.
[ Team LiB ]
[ Team LiB ]
Chapters
An introduction to process control and instrumentation is presented in Chapter 1. The
development and use of models is very important in control systems engineering. Fundamental
models are developed in Chapter 2, including the steady-state solution and linearization to form
state space models. Chapter 3 focuses on the dynamic behavior of linear systems, starting with
state space models and then covering transfer function-based models in detail. Chapter 4 we
cover the development of empirical models, including continuous and discrete transfer function
models.
Chapter 5 provides a more detailed introduction to feedback control, developing the basic idea of
a feedback system, proportional, integral, derivative (PID) controllers, and methods of analyzing
closed-loop stability. Chapter 6 presents the Ziegler-Nichols closed-loop oscillation method for
controller tuning, since the same basic concept is used in the automatic tuning procedures
presented in Chapter 11. Frequency response analysis techniques, important for determining
control system robustness, are presented in Chapter 7.
In recent years model-based control has lead to improved control loop performance. One of the
clearest model-based techniques is internal model control (IMC), which is presented in Chapter 8.
The PID controller remains the most widely used controller in industry; in Chapter 9 we show how
to convert internal model controllers to classical feedback (PID) controllers.
In Chapter 10 the widely used cascade and feed-forward strategies are developed. Many control
loops suffer from poor performance, either because they were not tuned well originally, or
because the process is nonlinear and has changed operating conditions. Two methods of dealing
with these problems, automatic tuning and gain scheduling, are presented in Chapter 11. The
phenomenon of reset windup and the development of antireset windup strategies are also
presented in Chapter 11.
Many control strategies must be able to switch between manipulated inputs or select from several
measured outputs. Split-range, selective and override strategies are presented in Chapter 12.
Process units contain many control loops that generally do not operate independently. The effects
of these control-loop interactions are presented in Chapter 13. The design of multivariable
controllers is developed in Chapter 14.
The development of the control instrumentation diagram for an entire chemical process is
challenging and remains somewhat of an art. In Chapter 15 recycle systems are shown to cause
unique and challenging steady-state and dynamic control problems. In addition, an overview of
corporate-wide optimization and control problems is presented. Model predictive control (MPC) is
the most widely applied advanced control strategy in industry. The basic step response model-
based MPC method is developed in Chapter 16. This is followed by a discussion of the constrained
version of MPC, and enhancements to improve disturbance rejection.
[ Team LiB ]
[ Team LiB ]
Learning Modules
The chapters are followed by a series of learning modules that serve several purposes; some
focus on the software tools, while others focus on particular control problems. The first two
provide introductions to MATLAB and SIMULINK, the simulation environment for the modules that
follow. The third module demonstrates the solution of ordinary differential equations using MATLAB
and S IMULINK, while the fourth shows how to use the MATLAB Control Toolbox to create and convert
models from one form to another. The modules that follow focus on a particular unit operation, to
provide a detailed demonstration of various control system design, analysis or implementation
techniques. Module 5 develops a simple isothermal CSTR model that is used in a number of the
chapters. Module 6 details the robustness analysis of processes characterized by first-order +
deadtime (FODT) models.
Module 7 presents a biochemical reactor with two possible desired operating points; one stable
and the other unstable. The controller design and system performance is clearly different at each
operating point. The classic jacketed CSTR with an exothermic reaction is studied in Module 8.
Issues discussed include recirculation heat transfer dynamics, cascade control, and split-range
control. Level control loops can be tuned for two different extremes of closed-loop performance,
as shown in Module 9 (steam drum, requiring tight level control) and Module 10 (surge drum,
allowing loose level control to minimize outflow variation). Challenges associated with jacketed
batch reactors are presented in Module 11. Some motivating biomedical problems are presented
in Module 12. Challenges of control loop interaction are demonstrated in the distillation application
of Module 13. Module 14 provides an overview of several case study problems in multivariable
control. Here the students can download SIMULINK .mdl files for the textbook web page and
perform complete modeling and control system design. These case studies are meant to tie
together many concepts presented in the text. Issues particular to flow control are discussed in
Module 15, and digital control techniques are presented in Module 16.
[ Team LiB ]
[ Team LiB ]
www.rpi.edu/dept/chem-eng/WWW/faculty/bequette/books/Process_Control/
or
www.rpi.edu/~bequeb/Control
[ Team LiB ]
[ Team LiB ]
Acknowledgments
A few acknowledgments are in order. First of all, Professor Jim Turpin at the University of
Arkansas stimulated my interest in process dynamics and control when I took his course as an
undergraduate. As a neophyte process engineer for American Petrofina I had the opportunity to
serve as a process operator during two work-stoppages. A newfound respect for control loop
interaction led me to graduate study at the University of Texas, where Professor Tom Edgar
provided the "degrees of freedom" for me to explore a range of control topics. Collaborations at
Merck, Inc., led to the presentation of modeling and control of batch reactors in Module 11.
Research sponsored by the Whitaker Foundation and the National Science Foundation resulted in
material presented in Modules 12 and 14.
My own graduate students have served as teaching assistants in the dynamics and control
courses, and have provided me with valuable feedback on various versions of this textbook. In
particular, Lou Russo, now at ExxonMobil, helped me understand what works and what does not
work in the classroom and in homework assignments. He certainly had a major positive impact on
the education of many Rensselaer undergraduates.
Professor Robert Parker at the University of Pittsburgh classroom tested this textbook, and made
a number of valuable suggestions. In addition, Brian Aufderheide (now at the Keck Graduate
Institute) critiqued Chapter 16.
Various Troy and Albany establishments have served to "gain schedule" my personal regulatory
system and allowed me to obtain a better understanding of the pharma cokinetics and
pharmacodynamics of caffeine and ethanol. The Daily Grind (www.dailygrind.com; you won't find
a better coffee roaster in Seattle) in Albany provided beans for the many espressos that "kick
started" numerous sections of this textbook. Group meetings at the Troy Pub & Uncle Sam
Brewery (www.troypub.com; try the Harwood Porter the next time you are in town) led to many
interesting education and research[2] discussions (not to mention political and other topics).
[2]The important interplay of research and education should not be overlooked. Seemingly innocuous
problems assigned in the control class have led to interesting graduate research projects. Similarly,
graduate research results have been brought into the undergraduate classroom.
Naturally, completing this text would have been a struggle without the support of my wife, Pat
Fahy, and the good sleeping habits of my kids, Brendan and Eileen. They have done their best to
convince me that not all systems are controllable.
[ Team LiB ]
[ Team LiB ]
Chapter 1. Introduction
The goal of this chapter is to provide a motivation for, and an introduction to, process control and
instrumentation. After studying this chapter, the reader, given a process, should be able to do the
following:
Determine possible control objectives, input variables (manipulated and disturbance) and
output variables (measured and unmeasured), and constraints (hard or soft), as well as
classify the process as continuous, batch, or semicontinuous
Assess the importance of process control from safety, environmental, and economic points
of view
1.1 Introduction
1.2 Instrumentation
1.6 Summary
[ Team LiB ]
[ Team LiB ]
1.1 Introduction
Process engineers are often responsible for the operation of chemical processes. As these
processes become larger scale and/or more complex, the role of process automation becomes
more and more important. The objective of this textbook is to teach process engineers how to
design and tune feedback controllers for the automated operation of chemical processes.
A conceptual process block diagram for a chemical process is shown in Figure 1-1. Notice that the
inputs are classified as either manipulated or disturbance variables and the outputs are classified
as measured or unmeasured in Figure 1-1a. To automate the operation of a process, it is
important to use measurements of process outputs or disturbance inputs to make decisions about
the proper values of manipulated inputs. This is the purpose of the controller shown in Figure 1-
1b; the measurement and control signals are shown as dashed lines. These initial concepts
probably seem very vague or abstract to you at this point. Do not worry, because we present a
number of examples in this chapter to clarify these ideas.
1. Control objective(s).
2. Input variables— classify these as (a) manipulated or (b) disturbance variables; inputs may
change continuously, or at discrete intervals of time.
3.
1.
2.
5. Operating characteristics— classify these as (a) continuous, (b) batch, or (c) semicontinuous
(or semibatch).
Here we discuss each of the steps in formulating a control problem in more detail.
1. The first step of developing a control strategy is to formulate the control objective(s). A
chemical-process operating unit often consists of several unit operations. The control of an
operating unit is generally reduced to considering the control of each unit operation
separately. Even so, each unit operation may have multiple, sometimes conflicting
objectives, so the development of control objectives is not a trivial problem.
4. Any process has certain operating constraints, which are classified as hard or soft. An
example of a hard constraint is a minimum or maximum flow rate—a valve operates
between the extremes of fully closed or fully open. An example of a soft constraint is a
product composition—it may be desirable to specify a composition between certain values to
sell a product, but it is possible to violate this specification without posing a safety or
environmental hazard.
6. Safety, environmental, and economic considerations are all very important. In a sense,
economics is the ultimate driving force—an unsafe or environmentally hazardous process will
6.
ultimately cost more to operate, through fines paid, insurance costs, and so forth. In many
industries (petroleum refining, for example), it is important to minimize energy costs while
producing products that meet certain specifications. Better process automation and control
allows processes to operate closer to "optimum" conditions and to produce products where
variability specifications are satisfied.
7. The two standard control types are feed forward and feedback. A feed-forward controller
measures the disturbance variable and sends this value to a controller, which adjusts the
manipulated variable. A feedback control system measures the output variable, compares
that value to the desired output value, and uses this information to adjust the manipulated
variable. For the first part of this textbook, we emphasize feedback control of single-input
(manipulated) and single-output (measured) systems. Determining the feedback control
structure for these systems consists of deciding which manipulated variable will be adjusted
to control which measured variable. The desired value of the measured process output is
called the setpoint.
A particularly important concept used in control system design is process gain. The process gain is
the sensitivity of a process output to a change in the process input. If an increase in a process
input leads to an increase in the process output, this is known as a positive gain. If, on the other
hand, an increase in the process input leads to a decrease in the process output, this is known as
a negative gain. The magnitude of the process gain is also important. For example, a change in
power (input) of 0.5 kW to a laboratory-scale heater may lead to a fluid temperature (output)
change of 10°C; this is a process gain (change in output/change in input) of 20°C/kW. The same
input power change of 0.5 kW to a larger scale heater may only yield an output change of 0.5°C,
corresponding to a process gain of 1°C/kW.
Once the control structure is determined, it is important to decide on the control algorithm. The
control algorithm uses measured output variable values (along with desired output values) to
change the manipulated input variable. A control algorithm has a number of control parameters,
which must be "tuned" (adjusted) to have acceptable performance. Often the tuning is done on a
simulation model before implementing the control strategy on the actual process. A significant
portion of this textbook is on the use of model-based control, that is, controllers that have a
model of the process "built in."
This approach is best illustrated by way of example. Since many important concepts, such as
control instrumentation diagrams and control block diagrams, are introduced in the next
examples, it is important that you study them thoroughly.
1. Control objective: The control objective is to maintain the height within certain bounds. If it
is too high it will overflow and if it is too low there may be problems with the flow to process
2. Usually, a specific desired height will be selected. This desired height is known as the
setpoint.
2. Input variables: The input variables are the flow from process 1 and the flow to process 2.
Notice that an outlet flow rate is considered an input to this problem. The question is which
input is manipulated and which is a disturbance? That depends. We discuss this problem
further in a moment.
3. Output variables: The most important output variable is the liquid level. We assume that it is
measured.
4. Constraints: There are a number of constraints in this problem. There is a maximum liquid
level; if this is exceeded, the tank will overflow. There are minimum and maximum flow
rates through the inlet and outlet valves.
5. Operating characteristics: We assume that this is a continuous process, that is, that there is
a continuous flow in and out of the tank. It would be a semicontinuous process if, for
example, there was an inlet flow with no outlet flow (if the tank was simply being filled).
Safety considerations play an important role in the specification of control valves (fail-open
or fail-closed). For this particular problem, the control-valve specification will depend on
which input is manipulated. This is discussed in detail shortly.
7. Control structure: There are numerous possibilities for control of this system. We discuss
first the feedback strategies, then the feed-forward strategies.
Feedback Control
The measured variable for a feedback control strategy is the tank height. Which input variable is
manipulated depends on what is happening in process 1 and process 2. Let us consider two
different scenarios.
Scenario 1
Process 2 regulates the flow-rate F 2. This could happen, for example, if process 2 is a steam
generation system and process 1 is a deionization process. Process 2 varies the flow rate of water
(F2) depending on the steam demand. As far as the tank process is concerned, F2 is a "wild"
(disturbance) stream because the regulation of F2 is determined by another system. In this case
we would use F 1 as the manipulated variable; that is, F 1 is adjusted to maintain a desired tank
height.
The control and instrumentation diagram for a feedback control strategy for scenario 1 is shown
in Figure 1-3. Notice that the level transmitter (LT) sends the measured height of liquid in the
tank (hm) to the level controller (LC). The LC compares the measured level with the desired level
(hsp, the height setpoint) and sends a pressure signal (Pv) to the valve. This valve top pressure
moves the valve stem up and down, changing the flow rate through the valve (F1). If the
controller is designed properly, the flow rate changes to bring the tank height close to the desired
setpoint. In this process and instrumentation diagram we use dashed lines to indicate signals
between different pieces of instrumentation.
Figure 1-3. Feedback control strategy 1. The level is measured and the
inlet flow rate (valve position) is manipulated.
A simplified block diagram representing this system is shown in Figure 1-4. Each signal and device
(or process) is shown on the block diagram. We use a slightly different form for block diagrams
when we use transfer function notation for control system analysis in Chapter 5. Note that each
block represents a dynamic element. We expect that the valve and LT dynamics will be much
faster than the process dynamics. We also see clearly from the block diagram why this is known
as a feedback control "loop." The controller "decides" on the valve position, which affects the inlet
flow rate (the manipulated input), which affects the level; the outlet flow rate (the disturbance
input) also affects the level. The level is measured, and that value is fed back to the controller
[which compares the measured level with the desired level (setpoint)].
Scenario 2
Process 1 regulates flow rate F 1. This could happen, for example, if process 1 is producing a
chemical compound that must be processed by process 2. Perhaps process 1 is set to produce F1
at a certain rate. F 1 is then considered "wild" (a disturbance) by the tank process. In this case we
would adjust F 2 to maintain the tank height. Notice that the control valve should be specified as
fail-open or air-to-close, so that the tank will not overflow on loss of instrument air or other valve
failure.
The process and instrumentation diagram for this scenario is shown in Figure 1-5. The only
difference between this and the previous instrumentation diagram (Figure 1-3) is that F2 rather
than F1 is manipulated.
The simplified block diagram shown in Figure 1-6 differs from the previous case (Figure 1-4) only
because F 2 rather than F1 is manipulated. F 1 is a disturbance input.
The previous two feedback control strategies were based on measuring the output (tank height)
and manipulating an input (the inlet flow rate in scenario 1 and the outlet flow rate in scenario 2).
In each case the manipulated variable is changed after a disturbance affects the output. The
advantage to a feed-forward control strategy is that a disturbance variable is measured and a
manipulated variable is changed before the output is affected. Consider a case where the inlet
flow rate can be changed by the upstream process unit and is therefore considered a disturbance
variable. If we can measure the inlet flow rate, we can manipulate the outlet flow rate to maintain
a constant tank height. This feed-forward control strategy is shown in Figure 1-7, where FM is the
flow measurement device and FFC is the feed-forward controller. The corresponding control block
diagram is shown in Figure 1-8. F 1 is a disturbance input that directly affects the tank height; the
value of F1 is measured by the FM device, and the information is used by an FFC to change the
manipulated input, F2.
Notice that we have not discussed the actual control algorithms; the details of control algorithms
and tuning are delayed until Chapter 5. Conceptually, would you prefer to tune level controllers
for "fast" or "slow" responses?
When tanks are used as surge vessels it is usually desirable to tune the controllers for a slow
return to the setpoint. This is particularly true for scenario 2, where the inlet flow rate is
considered a disturbance variable. The outlet flow rate is manipulated but affects another process.
In order to not upset the downstream process, we would like to change the outlet flow rate
slowly, yet fast enough that the tank does not overflow or go dry.
Related to the controller tuning issue is the importance of the dominant timescale of the process.
Consider the case where the maximum tank volume is 200 gallons and the steady-state operating
volume is 100 gallons. If the steady-state flow rate is 100 gallons/minute, the "residence time"
would be 1 minute. Assume the inlet flow rate is a disturbance and outlet flow rate is manipulated
(Figure 1-5). If the feed flow rate increased to 150 gallons/minute and the outlet flow rate did not
change, the tank would overflow in 2 minutes. On the other hand, if the same vessel had a
steady-state flow rate of 10 gallons/minute and the inlet flow suddenly increased to 15
gallons/minute (with no change in the outlet flow), it would take 20 minutes for the tank to
overflow. Clearly, controller tuning and concern about controller failure is different for these two
cases.
The first example was fairly easy compared with most control-system synthesis problems in
industry. Even for this simple example we found that there were many issues to be considered
and a number of decisions (specification of a fail-open or fail-closed valve, etc.) that needed to be
made. Often there will be many (and usually conflicting) objectives, many possible manipulated
variables, and numerous possible measured variables.
It is helpful to think of common, everyday activities in the context of control, so you will become
familiar with the types of control problems that can arise in practice. The following activity is just
such an example.
1.
1. Control objectives: Control objectives when taking a shower include the following:
a. to become clean
d. to become refreshed
To simplify our analysis, for the rest of the problem we discuss how we can satisfy the
second objective (to maintain water temperature and flow rate at comfortable values).
Similar analysis can be performed for the other objectives.
2. Input variables: The manipulated input variables are hot-water and cold-water valve
positions. Some showers can also vary the velocity by adjustment of the shower head.
Another input is body position—you can move into and out of the shower stream.
Disturbance inputs include a drop in water pressure (say, owing to a toilet flushing) and
changes in hot water temperature owing to "using up the hot water from the heater."
3. Output variables: The "measured" output variables are the temperature and flow rate (or
velocity) of the mixed stream as it contacts your body.
4. Constraints: There are minimum and maximum valve positions (and therefore flow rates) on
both streams. The maximum mixed temperature is equal to the hot water temperature and
the minimum mixed temperature is equal to the cold water temperature. The previous
constraints were hard constraints—they cannot be physically violated. An example of a soft
constraint is the mixed-stream water temperature—you do not want it to be above a certain
value because you may get scalded. This is a soft constraint because it can physically
happen, although you do not want it to happen.
5. Operating characteristics: This process is continuous while you are taking a shower but is
most likely viewed as a batch process, since it is a small part of your day. It could easily be
called a semicontinuous (semibatch) process.
6. Safety, environmental, and economic considerations: Too high of a temperature can scald
you—this is certainly a safety consideration. Economically, if your showers are too long,
more energy is consumed to heat the water, costing money. Environmentally (and
economically), more water consumption means that more water and wastewater must be
treated. An economic objective might be to minimize the shower time. However, if the
shower time is too short, or not frequent enough, your clothes will become dirty and must
be washed more often—increasing your clothes-cleaning bill.
7. Control structure: This is a multivariable control problem because adjusting either valve
affects both temperature and flow rate. Control manipulations must be "coordinated," that
is, if the hot-water flow rate is increased to increase the temperature, the cold-water flow
rate must be decreased to maintain the same total flow rate. The measurement signals are
continuous, but the manipulated variable changes are likely to be discrete (unless your
hands are continuously varying the valve positions).
Feedback control: As the body feels the temperature changing, adjustments to one or both
valves is made. As the body senses a flow rate or velocity change, one or both valves are
adjusted.
Feed-forward control: If you hear the toilet flush, you move your body out of the stream to
avoid the higher temperature that you anticipate. Notice that you are making a manipulated
variable change (moving your body) before the effect of an output (temperature or flow
rate) change is actually detected.
Some showers may have a relatively large time delay (or dead time) between when a
manipulated variable change is made and when the actual output change is measured. This could
happen, for example, if there was a large pipe run between the mixing point and the shower head
(this would be considered an input time delay). Another type of time delay is measurement dead
time, for example if your body takes a while to detect a change in the temperature of the stream
contacting your body.
Notice that the control strategy used has more manipulated variables (two valve positions and
body movement) than measured outputs (total mixed-stream flow rate and temperature).
In the shower example, the individual taking the shower served as the controller. The
measurements and manipulations for this example are somewhat qualitative (you do not know
the exact temperature or flow rate, for example). Most of the rest of the textbook consists of
quantitative controller design procedures, that is, a mathematical model of the process is used to
develop the control algorithm.
This chapter has covered the important first step of control system development—identifying
seven basic steps in analyzing a process control problem. We have used simple examples with
which you are familiar. As you learn about more chemical and environmental processes, you
should get in the habit of thinking about them from a process systems point of view, just as you
have with these simple systems.
[ Team LiB ]
[ Team LiB ]
1.2 Instrumentation
The example level-control problem had three critical pieces of instrumentation: a sensor
(measurement device), actuator (manipulated input device), and controller. The sensor measured
the tank level, the actuator changed the flow rate, and the controller determined how much to
vary the actuator, based on the sensor signal.
There are many common sensors used for chemical processes. These include temperature, level,
pressure, flow, composition, and pH. The most common manipulated input is the valve actuator
signal (usually pneumatic).
Each device in a control loop must supply or receive a signal from another device. When these
signals are continuous, such as electrical current or voltage, we use the term analog. If the
signals are communicated at discrete intervals of time, we use the term digital.
Analog
Analog or continuous signals provided the foundation for control theory and design and analysis. A
common measurement device might supply either a 4- to 20-mA or 0- to 5-V signal as a function
of time. Pneumatic analog controllers (developed primarily in the 1930s, but used in some plants
today) would use instrument air, as well as a bellows-and-springs arrangement to "calculate" a
controller output based on an input from a measurement device (typically supplied as a 3- to 15-
psig pneumatic signal). The controller output of 3–15 psig would be sent to an actuator, typically
a control valve where the pneumatic signal would move the valve stem. For large valves, the 3-
to 15-psig signal might be "amplified" to supply enough pressure to move the valve stem.
Digital
Many devices and controllers are now based on digital communication technology. A sensor may
send a digital signal to a controller, which then does a discrete computation and sends a digital
output to the actuator. Very often, the actuator is a valve, so there is usually a D/I (digital-to-
electronic analog) converter involved. Indeed, if the valve stem is moved by a pneumatic actuator
rather than electronic, then an I/P converter may also be used.
In the past few decades, digital control-system design techniques that explicitly account for the
discrete (rather than continuous) nature of the control computations have been developed. If
small sample times are used, the tuning and performance of the digital controllers is nearly equal
to that of analog controllers.
[ Team LiB ]
[ Team LiB ]
"A 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."
In this textbook, model will be taken to mean mathematical model. More specifically, we develop
process models. A working definition of 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.
Models play a very important role in control-system design. Models can be used to simulate
expected process behavior with a proposed control system. Also, models are often "embedded" in
the controller itself; in effect the controller can use a process model to anticipate the effect of a
control action. We can see from Example 1.1 that we at least need to know whether an increase
in the flow rate will increase or decrease the tank level. For example, an increase in the inlet flow
rate increases the tank level (positive gain), while an increase in the outlet flow rate leads to a
decrease in the tank level (negative gain). In order to design a controller, then, we need to know
whether an increase in the manipulated input increases or decreases the process output variable;
that is, we need to know whether the process gain is positive or negative.
An example of a process model is shown next. A number of other examples are developed in
Chapter 2.
For this process, we first assume that the density is constant. The model we develop should allow
us to determine how the volume of liquid in the vessel varies as a function of the inlet and outlet
flow rates. We will list the state variables, parameters, and the input and output variables. We
must also specify the required information to solve this problem (see Figure 1-2). The system is
the liquid in the tank and the liquid surface is the top boundary of the system. The following
notation is used in the modeling equations:
Equation 1.1
where the total mass of fluid in the vessel is Vr, the rate of change is dVr/dt, and the density of
the outlet stream is equal to the density of the vessel contents
Equation 1.2
Notice the implicit assumption that the density of fluid in the vessel does not depend on position
(the perfect mixing assumption). This assumption allows an ordinary differential equation (ODE)
formulation. We refer to any system that can be modeled by ODEs as lumped parameter systems.
Also notice that the outlet stream density was assumed to be equal to the density of fluid in the
tank. Assuming that the density of the inlet stream and fluid in the vessel are equal, this equation
is then reduced to[1]
[1]It might be tempting to the reader to begin to directly write a "volume balance" expression, which looks
similar to Equation (1.3). We wish to make it clear that there is no such thing as a volume balance and
Equation (1.3) is only correct because of the constant density assumption. It is a good idea to always write
a mass balance expression, such as Equation (1.2), before making assumptions about the fluid density,
which may lead to Equation (1.3).
Equation 1.3
In Equation (1.3) we refer to V as a state variable, and F1 and F2 as input variables (even though
F2 is an outlet stream flow rate). If density remained in the equation, we would refer to it as a
parameter.
In order to solve this problem we must specify the inputs F 1(t) and F2(t) and the initial condition
V(0). Direct integration of Equation (1.3) yields
Equation 1.4
If, for example, the initial volume is 500 liters, the inlet flow rate is 5 liters/second and the outlet
flow rate is 4.5 liters/second, we find
Example 1.3 provides an introduction to the notion of states, inputs, and parameters. Consider
now the notion of an output. We may consider fluid volume to be a desired output that we wish to
control, for example. In that case, volume would not only be a state, it would also be considered
an output. On the other hand, we may be concerned about fluid height, rather than volume.
Volume and height are related through the constant cross-sectional area, A
Equation 1.5
Equation 1.6
where V is a state, F1 and F2 are inputs, h is an output, and A is a parameter. We could also
rewrite the state variable equation to find
or
Equation 1.7
where fluid height is now the state variable. It should also be noted that inputs can be classified
as either manipulated inputs (that we may regulate with a control valve, for example) or
disturbance inputs. If we desired to measure fluid height and manipulate the flow rate of stream
1, for example, then F 1 would be a manipulated input, while F2 would be a disturbance input.
We have found that a single process can have different modeling equations and variables,
depending on assumptions and the objectives used when developing the model.
The liquid level process is an example of an integrating process. If the process is initially at steady
state, the inlet and outlet flow rates are equal (see Equation 1.3 or 1.7). If the inlet flow rate is
suddenly increased while the outlet flow rate remains constant, the liquid level (volume) will
increase until the vessel overflows. Similarly, if the outlet flow rate is increased while the inlet flow
rate remains constant, the tank level will decrease until the vessel is empty.
In this textbook we first develop process models based on fundamental or first-principles analysis,
that is, models that are based on known physical-chemical relationships, such as material and
energy balances, as well as reaction kinetics, transport phenomena, and thermodynamic
relationships. We then develop empirical models. An empirical model is usually developed based
on applying input changes to a process and observing the response of measured outputs. Model
parameters are adjusted so that the model outputs match the observed process outputs. This
technique is particularly useful for developing models that can be used for controller design.
[ Team LiB ]
[ Team LiB ]
Coughanowr, D.R., Process Systems Analysis and Control, 2nd ed., McGraw-Hill, New York
(1991).
Luyben, M.L., and W.L. Luyben, Essentials of Process Control, McGraw-Hill, New York (1997).
Luyben, W.L., Process Modeling Simulation and Control for Chemical Engineers, 2nd ed., McGraw-
Hill, New York (1990).
Marlin, T.E., Process Control: Designing Processes and Control Systems for Dynamic
Performance, 2nd ed., McGraw-Hill, New York (2000).
Ogunnaike, B.A., and W.H. Ray, Process Dynamics, Modeling and Control, Oxford, New York
(1994).
Riggs, J.B., Chemical Process Control, Ferret Publishing, Lubbock, Texas (1999).
Seborg, D.E., T.F. Edgar, and D.A. Mellichamp, Process Dynamics and Control, Wiley, New York
(1989).
Smith, C.A., and A.B. Corripio, Principles and Practice of Automatic Process Control, 2nd ed.
Wiley, New York (1997).
Stephanopoulos, G., Chemical Process Control, Prentice Hall, Englewood Cliffs, NJ (1984).
Svrcek, W.Y., D.P. Mahoney, and B.R. Young, A Real-Time Approach to Process Control, Wiley,
Chichester (2000).
The following books are generally more applied, with specific control applications detailed.
Levine, W.S. (ed.), The Control Handbook, CRC Press, Boca Raton, FL (1996).
Liptak, B.G., and K.Venczel (eds.), Instrument Engineers Handbook, Process Control Volume,
Chilton Book Company, Radnor, PA (1985).
Luyben, W.L., B.D. Tyreus, and M.L. Luyben, Plantwide Process Control, McGraw-Hill, New York
(1999).
Schork, F.J., Deshpande, P.B., and K.W. Leffew, Control of Polymerization Reactors, Marcel
Dekker, New York (1993).
Shunta, J.P., Achieving World Class Manufacturing Through Process Control, Prentice Hall, Upper
Saddle River, NJ (1995).
The following sources often provide interesting process control problems and solutions.
Advances in Instrumentation and Control (ISA Annual Conference)
The following sources tend to be more theoretical but often have useful control-related articles.
[ Team LiB ]
[ Team LiB ]
The best way to understand process control is to work many problems. In particular, it is
important to use simulation for complex problems. A numerical package that is particularly useful
for control-system analysis and simulation is MATLAB; the S IMULINK block-diagram simulator is
particularly useful. If you are not familiar with M ATLAB/ SIMULINK, we recommend that you work
through the M ATLAB and SIMULINK tutorials (Modules 1 and 2). Simply reading the tutorials will not
give you much insight into the use of MATLAB; you must sit at a computer, work through the
examples, and try new ideas that you have.
[ Team LiB ]
[ Team LiB ]
1.6 Summary
You should now be able to formulate a control problem in terms of the following:
Control objective
You should also be able to sketch control and instrumentation diagrams, and control block
diagrams. In addition, you should be able to recommend whether a control valve should be fail-
open or fail-closed.
Actuator
Air-to-close
Air-to-open
Algorithm
Control valve
Controller
Deadtime or time-delay
Digital
Fail-closed
Fail-open
Gain
Integrating process
Model
Process gain
Sensor
Setpoint
The abstract notions of states, inputs, outputs, and parameters were introduced and are covered
in more detail in Chapter 2. The examples used were as follows:
[ Team LiB ]
[ Team LiB ]
Student Exercises
ii. Identify input variables and classify as (a) manipulated or (b) disturbance;
iii. Identify output variables and classify these as (a) measured or (b) unmeasured;
v. Identify operating characteristics and classify as (a) continuous, (b) batch, (c)
semicontinuous (or semibatch);
a. Driving a car
d. Beer fermentation
f. A household thermostat
2: Literature Review. The process control research literature can be challenging to read,
with unique notations and rigorous mathematical analyses. Find a paper from one of
the magazines or journals listed in Section 1.4 that you would like to understand by
the time you have completed this textbook. You will find many articles to choose from,
so use some of the following criteria for your selection:
The process is interesting to you (do not choose mainly a theory paper)
The modeling equations and parameters are in the paper (make certain the
equations are ordinary differential equations and not partial differential
equations)
There are plots that you can verify (eventually) through simulation (the plots
should be based on simulation results)
i. A short (one paragraph) summary of the overall objectives of the paper; why are
you interested in the paper?
ii. A short list of words and concepts in the paper that are familiar to you.
3: Instrumentation Search. Select one of the following measurement devices and use
Internet resources to learn more about it. Determine what types of signals are input to
or output from the device. For flow meters, what range of flow rates can be handled by
a particular flow meter model?
f. Control valves
g. pH
f.
g.
5: A process furnace heats a process stream from near ambient temperature to a desired
temperature of 300°C. The process stream outlet temperature is regulated by
manipulating the flow rate of fuel gas to the furnace, as shown below.
g. Should the control valve fail-open or fail-closed? For the strategy you chose, is
the valve gain positive or negative? Why?
i. Draw the control block schematic diagram and label all signals and blocks on the
diagram.
6: A fluidized catalytic cracking unit (FCCU) produces a significant portion of the gasoline
produced by a typical petroleum refinery. A typical FCCU processes 30,000 Bbl/day (1
Bbl = 42 gallons) of heavy gas oil from a crude oil distillation unit, producing roughly
15,000 Bbl/day of gasoline, along with streams of other components. The value of
gasoline alone produced by this unit is on the order of $500,000/day, so any
improvement in yield and energy consumption owing to improved control can have a
significant economic impact.
Question: A control system revamp for a 30,000 Bbl/day FCCU is estimated to cost $2
million. It is expected that the implementation of advanced control schemes will result
in an economic increase of 2% in the value of products produced. Based on the value
of gasoline alone, how many days will it take to pay back the control system
investment?
7: Furnaces are often used to heat process streams to temperatures above 400°F. A
typical fired furnace may have a heat duty of 100 x 106 Btu/hour, requiring roughly
1667 scfm (standard cubic feet per minute) of natural gas (methane has a fuel value
of approximately 1000 Btu/scf). The cost of this fuel gas is on the order of $5/1000
scf, yielding an annual fuel cost of $4.4 million/year. Excess combustion air is needed
to assure complete combustion; however, too much excess air wastes energy (the
heated air simply goes out the exhaust stack). Too little excess air leads to incomplete
combustion, wasting energy and polluting the atmosphere with unburned
hydrocarbons. It is important, then, to deliver an optimum amount of combustion air
to the furnace. With the large flow rates and high temperatures involved, maintaining
safe operation is also very important. The control system must be designed so that
excess combustion air is maintained, no matter what is happening to the fuel gas flow
rate. A fired furnace control system clearly needs to satisfy safety, environmental, and
economic criteria.
8: Consider the surge vessel process in Example 1.3. If the steady-state volume is 500
liters, and the steady-state inlet and outlet flow rates are 50 liters/minute, find how
the liquid volume varies with time if the inlet flow rate is Fi(t) = 50 + 10 sin(0.1t),
while the outlet flow rate remains constant at 50 liters/minute.
9: The human body is composed of many innate feedback and feed-forward control loops.
For example, insulin is a hormone produced by the pancreas to regulate the blood
glucose concentration. The pancreas in a type I (insulin dependent) diabetic has lost
the ability to produce significant insulin. An insulin-dependent diabetic must monitor
her/his blood glucose (accurate blood glucose strips have been on the market for
years) and provide insulin injections several times per day. It is particularly important
to use knowledge of the meal characteristics to determine the amount of insulin
necessary to compensate for the glucose.
10: Consider the following three heat exchanger control instrumentation diagrams. For
each diagram (a, b, and c), the objective is to maintain a desired cold stream outlet
temperature. Since the cold stream exiting the exchanger is fed to a reactor, it is
important that the stream temperature never be substantially higher than the setpoint
value. Please answer the two basic questions about each strategy, then the final
question (part d).
Is the process gain relating the manipulated flow rate to the measured
temperature positive or negative?
Is the process gain relating the manipulated flow rate to the measured
temperature positive or negative?
c.
Should the control valve should be fail-open or fail-closed? Why?
Is the process gain relating the manipulated flow rate to the measured
temperature positive or negative?
d. Which strategy (a, b, or c) will have the fastest dynamic behavior? Why?
[ Team LiB ]
[ Team LiB ]
Determine the state, input, and output variables and the parameters for a particular model
(set of equations)
2.1 Background
2.8 Summary
[ Team LiB ]
[ Team LiB ]
2.1 Background
Operator training: The people responsible for the operation of a chemical manufacturing process
are known as process operators. A dynamic process model can be used to perform simulations to
train process operators, in the same fashion that flight simulators are used to train airplane pilots.
Process operators can learn the proper response to upset conditions, before having to experience
them on the actual process.
Process design: A dynamic process model can be used to properly design chemical-process
equipment for a desired production rate. For example, a model of a batch chemical reactor can be
used to determine the appropriate size of the reactor to produce a certain product at a desired
rate.
Safety: Dynamic process models can also be used to design safety systems. For example, they
can be used to determine how long it will take, after a valve fails, for a system to reach a certain
pressure.
Process control: Feedback control systems are used to maintain process variables at desirable
values. For example, a control system may measure a product temperature (an output) and
adjust the steam flow rate (an input) to maintain that desired temperature. For 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 complex control system is implemented on a process, it is
normally tested by simulation.
It should be noted that no single model of a process exists, since a model only approximates the
process behavior. The desired accuracy and resulting complexity of a process model depends on
the final use of the model. Usually more-complex models will require much more data and effort
to develop than simplified models, since more model parameters will need to be determined. The
focus of this textbook is on process control, so model development is provided with this in mind.
State variables are variables that naturally appear in the derivative term of ordinary differential
equation models. Common states resulting from overall material balance equations include total
mass, volume, level for liquid-phase processes, and pressure for gas-phase processes.
Component compositions are the most common states that arise from component material
balances. Temperature is the most common state arising from an energy balance modeling
equation.
This state-variable representation seems very abstract at this juncture, and it generally takes
students some time to become comfortable with it. The easiest way is to work through some
simple examples to begin to associate the notion of states, parameters, inputs, and outputs with
the physical variables associated with chemical processes. Throughout the text we use matrix and
vector notation; you may wish to review any standard linear algebra book to become familiar with
this notation. A concise review is also provided in the M ATLAB module (Module 1).
[ Team LiB ]
[ Team LiB ]
This equation is deceptively simple because there may be many in and out terms, particularly for
component balances. The in and out terms would then include the generation and conversion of
species by chemical reaction, respectively. The rate of mass accumulation in a system has the
form dM/dt, where M is the total mass in the system. Similarly, the rate of energy accumulation
has the form dE/dt, where E is the total energy in a system. If Ni is used to represent the moles
of component i in a system, then dNi/dt represents the molar rate of accumulation of component i
in the system.
When solving a problem, it is important to specify what is meant by system. In some cases the
system may be microscopic in nature (a differential element, for example), while in other cases it
may be macroscopic in nature (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 integral balance, while the other is based on an instantaneous balance. Integral balances
are particularly useful 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 instantaneous balance where the time rate of change is written
directly.
Integral Balances
An integral balance is developed by viewing a system at two different "snapshots" in time.
Consider a finite time interval, Dt, and perform a material balance over that time interval,
The mean-value theorems of integral and differential calculus are then used to reduce the
equations to differential equations. For example, consider the system shown in Figure 2-1, where
one boundary represents the mass in the system at time t, while the other boundary represents
the mass in the system at t + Dt.
Equation 2.1
where M represents the total mass in the system, while and represent the mass rates
entering and leaving the system, respectively. We can write the right-hand side of Equation (2.1),
using the mean-value theorem of integral calculus, as
Equation 2.2
where 0 < a < 1. Substituting the right-hand side of Equation (2.2) into Equation (2.1), we find
Equation 2.3
By dividing Equation (2.3) by Dt, and using the mean value theorem of differential calculus (0 < b
< 1) for the left-hand side,
Equation 2.4
Equation 2.5
Equation 2.6
Equation 2.7
Representing the
r total mass
r as M = V , r as Fin in and asr Fout , where V is the volume, is
the mass density (mass/volume), and F is a volumetric flow rate (volume/time), we obtain the
equation
Equation 2.8
Note that we have assumed that the system is perfectly mixed, so that the density of material
leaving the system is equal to the density
r of
r material in the system ( out = ).
Instantaneous Balances
Here we write the dynamic balance equations directly, based on an instantaneous rate-of-change
Equation 2.7
Equation 2.8
This is the same result obtained using an integral balance. Although the integral balance takes
longer to arrive at the same result as the instantaneous balance method, the integral balance
method is probably clearer when developing distributed parameter (partial differential equation-
based) models.
Steady State
At steady state, the derivative with respect to time is zero, by definition, so from Equation (2.7),
Equation 2.9
Equation 2.10
Steady-state relationships are often used for process design and determination of optimal
operating conditions.
[ Team LiB ]
[ Team LiB ]
Let V = volume of the drum and n = the total amount of gas (moles) contained in the drum.
Assumption: The pressure-volume relationship is characterized by the ideal gas law, PV = nRT,
where P is pressure, T is temperature (absolute scale), and R is the ideal gas constant.
The rate of accumulation of the mass of gas in the drum is described by the material balance
Equation 2.11
where MW represents the molecular weight. Assuming that the molecular weight is constant, we
can write
Equation 2.12
From the ideal gas law, since V, R, and T are assumed constant,
so
Equation 2.13
To solve this equation for the state variable P, we must know the inputs q i and q, the parameters
R, T, and V, and the initial condition P(0). Once again, although q is the molar rate out of the
drum, we consider it to be an input in terms of solving the model.
It should be noted that just like the liquid level process discussed in Example 1.3, this is an
integrating system. For example, if the inlet molar flow rate increases while the outlet flow rate
stays constant, then the pressure increases without bound. In reality, an increase in pressure
would most likely cause an increase in outlet molar flow rate (owing to the increased driving force
for flow out of the drum). Indeed, we model that case now.
Equation 2.14
Equation 2.15
where we use the subscript s to indicate a steady-state solution. Solving explicitly for Ps, we find
Equation 2.17
which is a linear relationship. An increase in qis will lead to an increased value of Ps. This type of
system is known as self-regulating, since a change in an input variable eventually leads to a new
steady-state value of the output variable. Contrast self-regulating systems with integrating
systems that do not achieve a new steady state (the output "integrates" until a vessel overflows
or a tank overpressures).
The modeling equations for Examples 1.3 and 2.1 were based on writing an overall material
balance. In the case of a liquid vessel we found that either liquid volume or height could serve as
an appropriate state variable. For the gas drum we found that pressure was the most appropriate
state variable.
Liquid level and gas pressure vessels represent inventory problems, which are integrating by
nature. If there is an imbalance in the inlet and outlet flow rates, the inventory material (liquid or
gas) can easily increase or decrease beyond desirable limits. It is the independence of the flow
rates that can cause this problem. Notice, however, that a feedback controller can be designed to
regulate the inventory levels (liquid volume or gas pressure). A feedback controller manipulates a
stream flow rate to maintain a desired inventory level.
There are many control loops that a process engineer must consider at the design stage of a
process. Because of the critical nature of inventory loops, these must receive the highest level of
consideration. In Chapter 15, we find that inventory loops must be closed before other loops are
considered.
The next example illustrates the use of modeling for reactor design.
Here we develop a model (Figure 2-3) to find the concentration of each species as a function of
time.
Equation 2.18
Assumption: The liquid-phase density, r, is not a function of concentration. The vessel liquid (and
outlet) density is then equal to the inlet stream density, so
and we can write Equation (2.18) as (notice this is the same result as Example 1.3)
Equation 2.19
It is convenient to work in molar units when writing component balances, particularly if chemical
reactions are involved. Let C A and CP represent the molar concentrations of A and P
(moles/volume). The component material balance equations are
Equation 2.20a
Equation 2.20b
where r A and rP represent the rate of generation of species A and P per unit volume, and CAi
represents the inlet concentration of species A. Since the water is in large excess its concentration
does not change significantly, and the reaction rate is first order with respect to the concentration
of ethylene oxide,
Equation 2.21
where k is the reaction rate constant and the minus sign indicates that A is consumed in the
reaction. Each mole of A reacts with a mole of B (from the stoichiometric equation) and produces
one mole of P, so the rate of generation of P (per unit volume) is
Equation 2.22
Equation 2.23
Equation 2.24
This model consists of three differential equations (2.19, 2.24, 2.25) and, therefore, three state
variables (V, CA, and CP). To solve these equations we must specify the initial conditions [V(0),
CA(0), and CP(0)], the inputs (F i, F, CAi ) as a function of time, and the parameter (k).
Equation 2.26
Equation 2.27
or,
Equation 2.28
Simplifying Assumptions
The reactor model presented in Example 2.2 has three differential equations. Often other
simplifying assumptions are made to reduce the number of differential equations to make them
easier to analyze and faster to solve. Assuming a constant volume (dV/dt = 0), perhaps owing to
a feedback controller, reduces the number of equations by one.
Steady-State Solution
At steady state, we find the following relationships (where the subscript s represents a steady-
state solution):
Equation 2.30
Notice that the concentrations are a function of the space velocity (F s/V), which has units of
inverse time. The space velocity can be thought of as the number of reactor volumes that
"change over" per unit time. It is inversely related to the fluid residence time (V/Fs), which has
units of time and can be thought of as the average time that an element of fluid spends in the
reactor.
Equation 2.31
So, from Equations (2.30) and (2.31), we find that the conversion is related to the space velocity,
Equation 2.32
Notice that the conversion is a function of the dimensionless term kV/F s, which is known as the
Damkohler number. The Damkohler number is the ratio of the characteristic residence time to the
characteristic reaction time and is widely used by chemical-reaction engineers to understand
reactor behavior. Two different chemical-reaction systems can have the same conversion if their
Damkohler numbers are the same. A system with a large rate constant and low residence time
can have the same conversion as a system with a small rate constant and high residence time.
Numerical Example Using an Experimentally Determined Rate Constant
Laboratory chemists have determined that the reaction rate constant at 55°C is k = 0.311 min -1.
Here we find the steady-state concentrations of ethylene oxide (A) and ethylene glycol (P) as a
function of the steady-state space velocity and residence time. The plots in Figure 2-4 all illustrate
the same basic concept. On the left-hand plots, the independent variable is the space velocity,
while the right-hand plots have residence time as the independent variable. The top plots have
concentrations as the dependent variables, while the bottom plots have conversion as the
dependent variable. At low space velocities (large residence times) there is nearly complete
conversion of ethylene oxide to ethylene glycol, while at high space velocities (low residence
times) there is little conversion.
Design Objective
It is desired to produce 100 million pounds per year of ethylene glycol. The feed-stream
concentration is 0.5 lbmol/ft3 and an 80% conversion of ethylene oxide has been determined to
be reasonable. What volume of reactor should be specified to meet the production rate
requirement? Since process plants often have a shutdown period every 18 months or so, assume
350 days/year of operation.
The design flow-rate calculation is shown below. Since 80% of the ethylene oxide is converted to
ethylene glycol, the ethylene glycol concentration is 0.4 lbmol/ft3 [see Equation (2.32)]. Since the
molecular weight is 62 lb/lbmol, the mass concentration is 24.8 lb/ft3.
Dynamic Response
Assume that a control strategy will be specified to maintain the desired ethylene glycol
concentration in the reactor by manipulating the reactor feed flow rate. In order to design the
controller, it is important to understand the dynamic response between an input change and the
observed output(s). A step change of 5% in the space velocity (F/V) yields the responses in the
ethylene oxide and ethylene glycol concentrations shown in Figure 2-5. An increase in the space
velocity (corresponding to a decrease in residence time) results in a decrease in the conversion of
A to P. We also see that it takes roughly 10 minutes for the reactor concentrations to achieve new
steady-state values. These simulations were performed by integrating differential Equations
(2.29) using the techniques presented in Section 2.6.
[ Team LiB ]
[ Team LiB ]
Gas Law
Process systems containing a gas will often need a gas-law expression in the model. The ideal gas
law is commonly used to relate pressure (P), molar volume ( ), and temperature (T):
Equation 2.33
The van der Waal's P T relationship contains two parameters (a and b) that are system specific:
Equation 2.34
For other gas laws, see a thermodynamics text, such as Smith, Van Ness, and Abbott (2001).
Chemical Reactions
The rate of reaction per unit volume (mol/volume*time) is usually a function of the concentration
of the reacting species. For 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 expression
Equation 2.35
where r A is the rate of reaction of A (mol A/volume time), k the reaction rate constant, CA the
concentration of A (mol A/volume), and CB the concentration of B (mol B/volume).
Reaction rates are normally expressed in terms of generation of a species. The minus sign
indicates that A is consumed in the reaction above. It is good practice to associate the units with
all parameters in a model. For consistency in the units for rA, we find that k has units of (vol/mol
B * time). Notice that 2 mol of B react for each 1 mol of A. Then we can write
Usually, the reaction rate coefficient is a function of temperature. The most commonly used
representation is the Arrhenius rate law,
Equation 2.36
where k(T) is the reaction rate constant, as a function of temperature, k0 the frequency factor or
preexponential factor, E the activation energy (cal/gmol), R the ideal gas constant (1.987
cal/gmol K), and T the absolute temperature scale (K or R.)
The frequency factor and activation energy can be estimated based on data of the reaction
constant as a function of reaction temperature. Taking the natural logarithm of the Arrhenius rate
law, we find
Equation 2.37
and we see that k0 and E can be found from the slope and intercept of a plot of (ln k) vs. (1/T).
Equilibrium Relationships
The relationship between the liquid- and vapor-phase compositions of component i, when the
phases are in equilibrium, can be represented by
Equation 2.38
where yi is the vapor-phase mole fraction of component i, xi the liquid-phase mole fraction of
component i, and Ki the vapor/liquid equilibrium constant for component i.
The equilibrium constant is a function of composition and temperature. The simplest assumption
for the calculation of an equilibrium constant is to use Raoult's law. Here,
Equation 2.39
where the pure component vapor (saturation) pressure often has the following form:
Equation 2.40
Often, we will see a constant relative volatility assumption made, to simplify vapor/liquid
equilibrium models. In a binary system, the relationship often used between the vapor and liquid
phases for the light component is
Equation 2.41
where x is the liquid-phase mole fraction of light component, y the vapor-phase mole fraction of
light component, and a the relative volatility (a > 1).
Heat Transfer
The rate of heat transfer through a vessel wall separating two fluids (a jacketed reactor, for
example) can be described by
Equation 2.42
where Q is the rate of heat transfer from hot to cold fluid, U the overall heat transfer coefficient, A
the area for heat transfer, and DT the difference between hot and cold temperatures.
At the design stage the overall heat transfer coefficient can be estimated from correlations; it is a
function of fluid properties and velocities. The individual film heat transfer coefficients (h i and ho),
the metal conductivity (k, and thickness, Dx), and a fouling factor (f) can be used to determine
the overall heat transfer coefficient from the relationship
Equation 2.43
The individual film coefficients are a strong function of fluid properties and velocities. The overall
heat transfer coefficient is often estimated from experimental data.
Flow Through Valves
The flow through valve is often described by the relationship
Equation 2.44
where F is the volumetric flow rate, Cv the valve coefficient, x the fraction the valve is open (0
x 1), DPv the pressure drop across the valve, s.g. the specific gravity of the fluid, and f(x) the
flow characteristic (varies from 0 to 1, as a function of x).
Three common valve characteristics are (i) linear, (ii) equal-percentage, and (iii) quick-opening.
For a linear valve, f(x) = x. For an equal-percentage valve, f(x) = a x - 1. For a quick-opening
valve, . These flow characteristics are plotted in Figure 2-6.
Notice that for the quick-opening valve, the sensitivity (or "gain") of flow to valve position is high
at low openings and low at high openings; the opposite is true for an equal-percentage valve. The
sensitivity of a linear valve does not change as a function of valve position. The equal-percentage
valve is commonly used in chemical processes because of desirable characteristics when installed
in piping systems where a significant piping pressure drop occurs at high flow rates. Knowledge of
these characteristics will be important when developing feedback control systems. Flow control is
discussed in detail in Module 15.
[ Team LiB ]
[ Team LiB ]
Review of Thermodynamics
Developing correct energy balance equations is not trivial and the chemical engineering literature
contains many incorrect derivations. Chapter 5 of the book by Denn (1986) points out numerous
examples where incorrect energy balances were used to develop process models.
The total energy (TE) of a system consists of internal (U), kinetic (KE), and potential energy (PE),
Equation 2.45
For most chemical processes where there are thermal effects, the kinetic and potential energy
terms can be neglected, because their contribution is generally at least an order of magnitude less
than that of the internal energy term.
When dealing with flowing systems, we usually work with enthalpy. Total enthalpy is defined as
Equation 2.46
The heat capacity is defined as the partial derivative of enthalpy with respect to temperature, at
constant pressure. The heat capacity, on a unit mass basis, is
Equation 2.47
where the overbar indicates that the enthalpy is on a unit mass basis. We make use of this
relationship in the following example.
illustrate the effect of process "size" (magnitude of flow rate, for example)
Material Balance
Neglecting changes in density due to temperature, we find
Equation 2.48
Energy Balance
Equation 2.49
We write the total work done on the system as a combination of the shaft work (WS) 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.
Equation 2.50
Equation 2.51
Equation 2.52
We must remember the assumptions that went into the development of Equation (2.52).
and assuming no phase change, we select an arbitrary reference temperature (Tref) for enthalpy
Equation 2.53
Often we assume that the heat capacity is constant, or calculated at an average temperature, so
Equation 2.54a
Equation 2.54b
Expanding the derivative term and assuming that the density is constant, we have
Equation 2.55
but Tref is a constant, so d(T - Tref)/dt = dT/dt. Also, neglecting WS (which is significant only for
very viscous fluids), we can write
Equation 2.56
Equation 2.57
Equation 2.58
In order to solve this problem, we must specify the parameters r and cp, the inputs Fi, F, Q, and
Ti (as a function of time), and the initial conditions V(0) and T(0).
The steady-state solution can be found by setting the derivative terms in Equations (2.57) and
(2.58) to 0. The resulting relationship between the manipulated power and the outlet temperature
is
Equation 2.59
where the subscript s is used to indicate a steady-state value. Notice that for a given steady-state
flow rate, the relationship between heater power and outlet temperature is linear. Also, the
volume of the vessel has no effect on the steady-state temperature (volume has a solely dynamic
effect).
Here we consider a stream of water entering a stirred-tank heater at 20°C, at three possible flow
rates: 1 liter/minute (espresso machine), 10 liters/minute (household shower), and 100
liters/minute (small car wash). The outlet temperature as a function of heater power [Equation
(2.59)] is plotted in Figure 2-8 for each of the three cases. As expected from Equation (2.59), the
curves are linear. The lower flow rate operation has a high sensitivity (slope) of temperature to
power, while the higher flow rate operation has a low sensitivity. This makes physical sense,
because a given change in power will have a much larger affect on a low flow rate than a high
flow rate stream.
This sensitivity is also known as the process gain and is defined as the partial derivative of the
output with respect to the input, evaluated at steady state.
Equation 2.60
It is clear from Equation (2.60) that larger flow rates will have smaller gains (slopes or
sensitivities). It is often useful to work with scaled variables. For example, if a scaled steady-state
input is defined as
Equation 2.61
then all three input flow rates have the same steady-state sensitivity of the output to the scaled
input. This is shown in Figure 2-9 and the following equation:
Equation 2.62
The discussion thus far has centered on the steady-state behavior of stirred-tank heaters, and we
found that the volume had no effect. The volume has a major impact, however, on the dynamic
behavior of a stirred-tank heater.
Dynamic Behavior
Volume has a considerable effect on the dynamic behavior of this process. The response of the
temperature to a step change in the scaled heat input is shown in Figure 2-10, as a function of
the residence time (V/F). As expected, longer residence times have a slower response time than
shorter residence-time systems. These curves were obtained by integrating Equation (2.58) for
the three different residence times (with V assumed constant). The initial steady-state values are
T = Ti = 20°C and Qscaled = 0. At t = 0, Qscaled is stepped from 0° to 1°C.
[ Team LiB ]
[ Team LiB ]
Equation 2.63
where xi is a state variable, ui is an input variable, and pi is a parameter. The notation is used
to represent dxi/dt. Notice that there are nx equations, nx state variables, nu inputs, and np
parameters.
Also included in these models is a set of algebraic equations, relating states, inputs, and
parameters to output variables.
Equation 2.64
State Variables
A state variable is a variable that arises naturally in the accumulation term of a dynamic material
or energy balance. A state variable is a measurable (at least conceptually) quantity that indicates
the state of a system. For example, temperature is the common state variable that arises from a
dynamic energy balance. Concentration is a state variable that arises when dynamic component
balances are written.
Input Variables
An input variable is a variable that normally must be specified before a problem can be solved or
a process can be operated. Inputs are normally specified by an engineer, based on knowledge of
the process being considered. Input variables typically include flow rates of streams entering or
leaving a process (notice that the flow rate of an outlet stream might be considered an input
variable!). Compositions or temperatures of streams entering a process are also typical input
variables. Input variables are often manipulated (by process controllers) in order to achieve
desired performance.
Parameters
A parameter is typically a physical or chemical property value that must be specified or known to
mathematically solve a problem. Parameters are often fixed by nature, that is, the reaction
chemistry, molecular structure, existing vessel configuration, operation, and so forth. 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 may be an important design parameter.
Output Variables
An output variable is often a state variable that is measured, particularly for control purposes.
Very often the measured outputs are simply a subset of the state variables. Other times the
outputs are a nonlinear function of the states (or even inputs).
Vector Notation
The set of differential and algebraic Equations (2.63) and (2.64) can be written more compactly in
vector form.
Equation 2.65
where x is the vector of state variables, u the vector of input variables, p the vector of
parameters, and y the vector of output variables.
Steady-State Solutions
Notice that dynamic models (2.63) can also be used to solve steady-state problems, since
That is,
Equation 2.66
for steady-state processes, resulting in a set of algebraic equations. In this case, all inputs and
parameters would be specified, leaving the nx state values to be solved for; that is, nx equations
in nx unknowns must be solved. The focus of this text is not on the development of numerical
methods, so we briefly cover the basic idea in Appendix 2.1. Note that differential equation
solvers can also be used to solve for the steady state of stable systems, by simply integrating
from an initial value for the states for a long period of time, until a steady state is reached.
Numerical Integration
Here we briefly consider numerical methods to integrate ordinary differential equations.
Equation 2.67
Equation 2.68
The explicit Euler integration technique involves specifying the integration step size, Dt,
Equation 2.69
and marching sequentially from one time step to another. This approach is illustrated in Appendix
2.2. In practice, more accurate integration routines using a variable step size are used. For more
details on how to use MATLAB integration routines, see Module 3.
[ Team LiB ]
[ Team LiB ]
Equation 2.70
Equation 2.71
Equation 2.72
or
Equation 2.73
Equation 2.74
The value of this function can be approximated using a Taylor series expansion of the form
where the subscript s is used to indicate the point of linearization (usually the steady-state
operating point). The quadratic and higher order terms are neglected, resulting in the following
approximate equation:
Equation 2.75
Since the steady-state operating point is chosen as the point of linearization, then [by definition of
a steady state, f(xs) = 0]
Equation 2.76
Equation 2.77
where x' = x - xs represents a deviation variable, and is the derivative of the function
evaluated at the steady-state value.
Equation 2.78
The value of this function can be approximated using a Taylor series expansion of the form
where the subscript s is used to indicate the point of linearization (usually the steady-state
operating point). The quadratic and higher order terms are neglected, resulting in the following
approximate equation
Equation 2.79
Since the steady-state operating point is chosen as the point of linearization, then [by definition of
a steady state, f(xs, us) = 0]
Output Variable
Equation 2.80
A Taylor series expansion about the state and input yields (after neglecting higher order
derivatives)
Equation 2.81
where y' = y - ys, x' = x - xs, and u' = u - us represent deviation variables, and and
are the derivatives of the function with respect to the state and input, evaluated at
the steady-state value.
Here the state variable is CA and the input variable is F. A Taylor series expansion performed at
the steady-state solution yields
so
where the state, input, and output (in deviation variable form) are
Generalization
Consider the general nonlinear model with nx states, ny outputs, nu inputs, and np parameters
where the deviation variables are defined as perturbations from their steady-state values
In future chapters we normally drop the prime (') notation for deviation variables and assume
that a state space model is always in deviation variable form.
Here the outputs are the vessel and jacket temperatures, which are also the states; the inputs
are the jacket flow rate, feed flow rate, feed temperature, and jacket inlet temperature. If the
outputs, states, and inputs, in deviation variable form, are
[ Team LiB ]
[ Team LiB ]
2.8 Summary
We have focused primarily on the development of ordinary differential equation models that
describe the dynamic behavior of processes where perfect mixing can be assumed. The models
have the form
where the states, inputs, outputs, and parameters are x, u, y, and p, respectively.
States appear in the "accumulation" (derivative with respect to time) term, inputs can be either
manipulated or disturbance variables, outputs are often a subset of the states, and parameters
are often physical intensive variables, such as density or kinetic rate parameters. The modeling
equations are based on material (component or total) and energy balances. States are often
concentrations (from the component balances), volume (total material balance on liquids),
pressure (total material balances on gases), or temperature (energy balances).
The steady-state solution is , or f(x,u,p) = 0 which can be found numerically, using M ATLAB
functions such as fzero and fsolve (which require the optimization toolbox) as shown in the
MATLAB tutorial module.
To integrate the differential equations numerically, we use a variant of Euler integration, which is
The ODE module provides a tutorial on the use of MATLAB to integrate ordinary differential
equations.
An understanding of dynamic behavior is obtained by using linear state-space models, which have
the form
where the prime notation (') is used to indicate a deviation variable. In the next chapter we
further analyze linear state space models to obtain an understanding of dynamic behavior. These
state space models are converted to Laplace transfer function models, which are used later for
control system design.
For the processes studied, some important characteristics were discussed. For example, residence
time (volume/flow rate) is often a good indicator of the relative "speed" of the process dynamics,
particularly for nonreacting systems. For chemical reactors, the Damkohler number is an
important parameter, since it is the ratio of a characteristic reaction time to residence time.
The concept of process gain is extremely important for process control design. Process gain is the
sensitivity of the process output to a manipulated input. That is, process gain is the ratio of the
long-term (steady-state) change in process output to the change in process input.
Many process systems can be represented as single-state models, where the output is the state.
The resulting first-order model has the form
where kp is the process gain and tp is the process time constant. The dynamic behavior of first-
order processes will be discussed in the next chapter.
[ Team LiB ]
[ Team LiB ]
Suggested Reading
Excellent discussions of the issues involved in modeling a mixing tank, incorporating density
effects and energy balances, is provided in the following two books: Denn, M. M., Process
Modeling, Longman, New York (1986); Russell, T.R. F., and M. M. Denn, Introduction to Chemical
Engineering Analysis, Wiley, New York (1971).
A more detailed discussion of process dynamics is provided in the textbook Bequette, B.W.,
Process Dynamics: Modeling, Analysis and Simulation, Prentice Hall, Upper Saddle River, NJ
(1998).
The reaction of ethylene oxide and water to form ethylene glycol is discussed in Fogler, H. S.,
Elements of Chemical Reaction Engineering, 2nd ed., Prentice Hall, Upper Saddle River, NJ
(1992).
[ Team LiB ]
[ Team LiB ]
Student Exercises
1: Consider the gas drum in Example 2.1. Often the outlet flow relationship is actually
nonlinear, with the form
Discuss whether this is now a self-regulating process. Also, sketch the steady-state
input (qis) -output (Ps) curve, based on the flow coefficient, b = 1 mol · s -1 · atm-1/2 and
a constant header pressure, Ph = 1 atm.
2: Consider the heated mixing tank example, which had the modeling equations
For steady-state inlet and outlet flow rates of 100 liters/minute, a liquid volume of 500
liters and inlet and outlet temperatures of 20° and 40°C, respectively:
b. Consider a step inlet temperature change from 20° to 22°C. Use Euler integration
with a integration step size of 0.5 minutes to find the vessel temperature response
for the first 2 minutes. Compare this with MATLAB ode45 (see the ODE module).
3: Often liquid surge tanks (particularly those containing hydrocarbons) will have a gas
"blanket" of nitrogen or carbon dioxide to prevent the accumulation of explosive vapors
above the liquid, as depicted below.
Develop the modeling equations with gas pressure and liquid volume as the state
variables. Let qf and q represent the inlet and outlet gas molar flow rates, Ff and F the
liquid volumetric flow rates, V the constant (total) volume, Vl the liquid volume, and P
the gas pressure. Assume the ideal gas law. Show that the modeling equations are
4: Consider the ethylene glycol problem (Example 2.2). If two 800-gallon reactors are
placed in series, what volumetric flow rate is necessary to produce 100 million lb/year of
ethylene glycol? What percentage savings is this compared with using a single 800-
gallon reactor?
5: Consider the ethylene glycol problem (Example 2.2). Solve the dynamic equations using
ode45 (see the ODE module), for a step change in space velocity from 0.0778 to 0.0817
min-1. Compare your plots with those shown in Figure 2-4.
6: 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. Develop the modeling
equations for a single first-order reaction. The state variables should be volume and
concentration of reactant A.
a. Write the modeling equations for the concentration of the waste chemical. Assume
constant volume and constant density. Let
b. Show that the steady-state concentrations are 0.33333 mol/liter (reactor 1) and
0.09005 mol/liter (reactor 2), so the specification is met.
c. Linearize at steady state and develop the state space model (analytical) of the
form
where
e. Assuming that each state is an output, show that the C and D matrices are
f. Find the eigenvalues of A using the MATLAB eig function, and find the eigenvalues
by hand, by solving det (lI - A) = 0.
g. Solve a for the nonlinear differential equations, using ode45. Compare the linear
and nonlinear variables on the same plots (make certain you convert from
deviation to physical variables for the linear results) for a step change in the flow
rate from 100 liters/hour to 110 liters/hour. Assume the initial concentrations are
the steady-state values (0.3333 and 0.09005). Compare the linear and nonlinear
responses of the reactor concentrations. Is the removal specification still obtained?
8: Consider Example 2.5, the stirred-tank heater example. Read and work through the
example. Use the following parameters and steady-state values:
a. By solving the steady-state equations, verify that the following values obtained for
UA (overall heat transfer coefficient * area for heat transfer) and F js (steady-state
jacket flow rate) are correct:
c. Write a function file, heater.m (example shown below), to be used with ode45
(Module 3) to solve the two nonlinear ordinary differential equations.
d. First, verify that the steady-state state variable values are correct by simulating
the process with no change in the jacket flow rate.
e. Now, perform simulations for small and large step changes in the jacket flow rate.
Use the MATLAB step command to solve for the linear state space model. Realize
that the step results are based on deviation variables and for a unit step change in
input one (jacket flow rate), and convert the linear states to physical variable
form.
We now consider the important issue of scale-up: Pilot plants are small-scale
(intermediate between lab-scale and full-size manufacturing-scale) chemical
processes, used to understand process operating behavior before the
manufacturing process is designed. Here we discover the effect of vessel scale on
the heat transfer removal capability of a vessel.
f. Consider now a vessel that can handle 10 times the throughput of the previous
vessel (that is, 10 ft3/min rather than 1 ft3/min). Assume that the same residence
time is maintained (V/F = 10 minutes), so the volume of the new vessel is 100 ft3.
Assume that the heat transfer coefficient (U) remains constant, but that the heat
transfer area changes. Assume that the vessel can be modeled as a cylinder, with
the height (L) = 2*diameter (D). Find the value of UA for the larger vessel.
g. For the larger vessel, find the new steady-state value of jacket temperature that
must be used to maintain the vessel temperature at T = 125°F. Also, find the new
steady-state jacket flow rate. Hint: Solve the two modeling equations at steady
state to obtain these values. Discuss the effect of process scale-up on the
operating conditions. How large can the vessel become before the jacket
temperature is too high (it approaches the inlet jacket temperature)?
h. For the larger vessel, find the new state space model, assuming that the jacket
volume is 0.25 times the vessel volume. Calculate the eigenvalues of the A matrix.
How do they compare with the smaller vessel?
i. Find the step response for the nonlinear and linear (state space) systems for a
step increase of 0.1 ft3/min in jacket flow rate. How do these compare with the
smaller vessel?
j.
i.
j. Find the step response for the nonlinear and linear (state space) systems for a
step increase of 10% in the jacket flow rate. How do these compare with the
smaller vessel?
%
% runs stirred tank heater example - 23 Jan 01
% step changes to stirred tank heater
%
% make certain you enter the step change value (delFj)
% before running this file
% also, generate function file with the following first line:
% function xdot = heater(t,x,flag,delFj);
%
options = odeset('RelTol',1e-6,'AbsTol',[1e-6 1e-6]);
%
[t,x] = ode45('heater',tspan,x0,options,delFj);
%
figure(1)
subplot(2,1,1),plot(t,x(:,1))
title('nonlinear, using ode45')
xlabel('time, min')
ylabel('temp, deg F')
subplot(2,1,2),plot(t,x(:,2))
xlabel('time, min')
ylabel('jacket temp, deg F')
%
% state space model with unit step change
a = [-0.4 0.3;1.2 -1.8];
b = [0;20];
c = [1 0;0 1];
d = 0;
sys = ss(a,b,c,d);
[ylin,tlin] = step(sys);
%
figure(2)
subplot(2,1,1),plot(tlin,ylin(:,1))
title('linear state space, unit step, deviation')
xlabel('time, min')
subplot(2,1,2),plot(tlin,ylin(:,2))
xlabel('time, min')
%
% scale deviation by delFj
ylinscale = ylin*delFj;
% plot in physical variable form
figure(3)
subplot(2,1,1),plot(tlin,125+ylinscale(:,1))
title('linear state space, physical magnitude')
xlabel('time, min')
subplot(2,1,2),plot(tlin,150+ylinscale(:,2))
xlabel('time, min')
% compare linear and nonlinear on same plot
figure(4)
subplot(2,1,1),plot(t,x(:,1),tlin,125+ylinscale(:,1),'--')
title('nonlinear vs. linear')
xlabel('time, min')
ylabel('temp, deg F')
legend('nonlinear','linear')
subplot(2,1,2),plot(t,x(:,2),tlin,150+ylinscale(:,2),'--')
xlabel('time, min')
ylabel('jacket temp, deg F')
legend('nonlinear','linear')
[ Team LiB ]
[ Team LiB ]
Equation A.1
obtained from Equation (2.66) with a fixed p and u. The most commonly used numerical
techniques are related to Newton-Raphson iteration. The "guess" for iteration k + 1 is determined
from the value at iteration k, using
Equation A.2
where f[x(k)] is the vector of function evaluations at iteration k, and J(k) is the Jacobian matrix
Equation A.3
The ij element of the Jacobian represents the partial derivative of equation i with respect to
variable j. If analytical derivatives are not available, elements of the Jacobian are obtained by
perturbation of the state variable, requiring n + 1 function evaluations for an n-equation system
of equations. Various quasi-Newton techniques provide approximations to the Jacobian and do not
require as many function evaluations, reducing computational time.
In practice, the Jacobian matrix in Equation (A.2) is not inverted. Rather, a set of linear algebraic
equations is solved for x(k+1),
Equation A.4
In this text we do not focus on the solution of algebraic equations. See the text by Bequette
(1998) for more details on these techniques.
[ Team LiB ]
[ Team LiB ]
we have left the inputs and parameters out of the function variable list for convenience. An
example is shown next.
For C A(0) = 0.1 and CP(0) = 0.4, and a space velocity (F/V) = 0.0816 min-1 we find, for the first
time step,
Substituting the numerical values for an integration step size of 0.5 minutes, we find
resulting in the concentration values at t = 0.5 minutes
Values can be obtained at future times by continuing to march forward in time. MATLAB has a suite
of routines for integrating differential equations. These are covered in Module 3.
[ Team LiB ]
[ Team LiB ]
Understand first-order, first-order + dead time and integrating system step responses
3.1 Background
3.14 Summary
[ Team LiB ]
[ Team LiB ]
3.1 Background
One of the major goals of this chapter is to obtain an understanding of process dynamics. Process
engineers tend to think of process dynamics in terms of the response of a process to a step input
change. Assume that the process is initially at steady state, then apply a step change to an input
variable. The majority of chemical processes will exhibit one of the responses shown in Figure 3-
1. In this plot, we assume that a positive step increase has been made to the input variable of
interest. The solid curves are examples of "positive gain" processes; that is, the process output
increases for an increase in the input. The dashed lines are those of negative gain processes. The
curves in Figure 3-1a show a monotonic change in the output; this behavior is generally known as
overdamped. The curves in Figure 3-1b are indicative of "integrating" processes; a prime example
is a liquid surge vessel, where the level continues to change when there is an imbalance in the
inlet and outlet flow rates. The curves in Figure 3-1c are known as underdamped or oscillatory
responses. This type of behavior may occur in exothermic chemical reactors or biochemical
reactors. It more often occurs in processes that are under feedback control, particularly if the
controller is poorly tuned. The behavior shown in Figure 3-1d is known as "inverse response" and
is seen in steam drums, distillation columns, and some adiabatic plug flow reactors.
In the sections that follow, we discuss the characteristics of process models that lead to each of
the behaviors shown in Figure 3-1.
[ Team LiB ]
[ Team LiB ]
State space models have the following form, where the states (x), inputs (u), and outputs (y) are
all perturbation or deviation variables
Equation 3.1
Recall that in matrix notation, the first subscript refers to the row and the second subscript refers
to the column. When matrices multiply vectors, each row corresponds to a particular output of the
multiplication, while the column corresponds to a particular input of the operation. Consider the C
matrix, which relates the states to the outputs. Element cij relates the effect of state xj on output
yi.
Equation 3.2
Stability
One of the first basic concepts that we need to cover is the notion of stability. Consider a process
where one or more states have been perturbed from the steady-state solution or operating point.
The process is stable if after a period of time, the variables return to the steady-state values. This
means that the state variables, since they are deviation variables, return to zero.
Numerically, we can determine the stability of a state space model by finding the eigenvalues of
the state space A matrix. Remember that the A matrix is simply the matrix of derivatives of the
dynamic modeling equations with respect to the state variables.
If all of the eigenvalues are negative, then the system is stable; if any single eigenvalue is
positive, the system is unstable. A system with all but one eigenvalues negative and with one
eigenvalue equal to zero is called an integrating system and is characteristic of processes with
liquid levels or gas drum pressures that can vary.
Examples of unstable systems are shown in Figure 3-2. If an eigenvalue is real and positive, the
system response is that shown in the top curves. If there are complex conjugate eigenvalues,
with positive real portions, the system oscillates (with ever increasing amplitude), as shown at the
bottom.
Mathematically, the eigenvalues of the A matrix are found from the roots of the characteristic
polynomial
Equation 3.3
where l is known as an eigenvalue, and I is the identity matrix. For a state space model with n
states, A is an n x n matrix, and there will be n solutions (eigenvalues) of Equation (3.3). There
are analytical solutions for two- and three-state systems; the two-state solution is shown below.
In two-state systems,
Equation 3.4
Equation 3.5
It is easy to show that if and a11 + a22 < 0 and a11a22 >a12a21, the roots (eigenvalues) are
negative and the system is stable. A more general method of qualitatively checking the stability,
known as the Routh stability criterion, is shown in Chapter 5.
and the eigenvalues for operating condition 1 can be found using the following steps
Again, the positive eigenvalue indicates that the second operating condition is unstable.
Generalization
Notice that a solution of a second-order polynomial was required to find the eigenvalues of the
two-state example; this resulted in two eigenvalues. For the general case of an n x n matrix,
there will be n eigenvalues. It is too complex to find these analytically for all but the simplest low-
order systems. The simplest way to find eigenvalues is by using existing numerical analysis
software; for example, in MATLAB the eig function can be used to find eigenvalues.
The values of the eigenvalues are related to the "speed of response," and the eigenvalue unit is
inverse time. If the unit of time used in the differential equations is minutes, for example, then
the eigenvalues have min-1 as the unit. For stable systems (where all eigenvalues are negative),
the larger magnitude (more negative) eigenvalues are faster.
For matrices that are 2 x 2 or larger, some eigenvalues may occur in complex conjugate pairs. In
this case, the stability is determined by the sign of the real portion of the complex number. As
long as all real portions are negative, the system is stable.
[ Team LiB ]
[ Team LiB ]
The Laplace transform of a time-domain function, f(t), is represented by L[f(t)] and is defined as
Equation 3.6
The Laplace transform is a linear operation, so the Laplace transform of a constant (C) multiplying
a time-domain function is just that constant times the Laplace transform of the function,
Equation 3.7
The Laplace transforms of a few common time-domain functions are shown next.
Exponential Function
Exponential functions appear often in the solution of linear differential equations. Here
The transform is defined for t > 0 (we also use the identity that ex+y = exey)
Equation 3.8
Derivatives
This will be important in transforming the derivative term in a dynamic equation to the Laplace
domain (using integration by parts),
so we can write
Equation 3.9
Equation 3.10
One reason for using deviation variables is that all of the initial condition terms in Equation (3.10)
are 0, if the system is initially at steady-state.
Equation 3.11
So the Laplace transform of a function with a time delay (q) is simply e–qs times the Laplace
transform of the nondelayed function.
Step Functions
Step functions are used to simulate the sudden change in an input variable (say a flow rate being
rapidly changed from one value to another). A step function is discontinuous at t = 0. A "unit"
step function is defined as
so
Equation 3.12
Equation 3.13
Pulse
Consider a pulse function, where a total integrated input of magnitude P is applied over tp time
units, as shown in Figure 3-3.
The function is f(t) = P/t p for 0 < t < tp and f(t) = 0 for t > t p. The Laplace transform is
Equation 3.14
Impulse
An impulse function can viewed as a pulse function, where the pulse period is decreased while
maintaining the pulse area, as shown in Figure 3-4. In the limit, as tp approaches 0, the pulse
function becomes (using L'Hopital's rule)
Equation 3.15
Equation 3.16
Examples of common impulse inputs include a "bolus" (shot or injection) of a drug into a
physiological system, or dumping a bucket of fluid or bag of solids into a chemical reactor.
Other Functions
It is rare for one to derive the Laplace transform for a function; rather a table of known
transforms (and inverse transforms) can be used to solve most dynamic systems problems.
Table 3-1 presents solutions for most common functions. If you desire to transform a function
from the time domain to the Laplace domain, then look for the time-domain function in the first
column and write the corresponding Laplace domain function from the second column. Similarly, if
your goal is to "invert" a Laplace domain function to the time domain, then look for the Laplace
domain function in the second column and write the corresponding time-domain function from the
first column. This notion of the inverse Laplace transform can be written
Equation 3.17
For example
Initial- and Final-Value Theorems
The following theorems are very useful for determining limiting values in dynamics and control
studies. The long-term behavior of a time-domain function can be found by analyzing the Laplace
domain behavior in the limit as the s variable approaches zero. The initial value of a time-domain
function can be found by analyzing the Laplace domain behavior in the limit as s approaches
infinity.
C (constant)
f(t - q) e-qsF(s)
tn
sF(S) - f(0)
e-at
te-at
1-e-t/t
sin wt
Time-domain function Laplace domain function
cos wt
e–at sin wt
e–atcos wt
where ,
Equation 3.18a
Equation 3.18b
It should be noted that these theorems only hold for stable systems.
The short-term behavior, y(t 0), is found using the initial-value theorem,
The reader should verify that the time-domain function, y(t), can be found by applying Table 3-1
to find
and that the values of y(t ), and y(t 0), are consistent with the final- and initial-value
theorems.
3.
3. Use algebraic manipulations to solve for the transformed variable.
where a, b, and so forth are the roots of D(s). If roots are repeated the partial fraction
expansion has the form (for an example where three roots all have a value of a).
5. Invert each element back to the time domain to find the final solution for y(t).
For the case of repeated roots (say 3 that have a value of a), the solution has the form
It should be noted that chemical process systems are rarely described by an nth order differential
equation. Usually, a set of n first-order differential equations is transformed to a single nth order
equation, as shown in Example 3.3.
Equation 3.19
where x1 and x2 represent the concentrations of two components (in deviation variable form) in
an isothermal reactor; the initial conditions are x1(0) = x2(0) = 0. Solve for the output
(concentration of component 2) response to a unit step input.
1. The reader should show (see exercise 6) that this can be arranged to a second-order
differential equation,
with the initial conditions y(0) = dy(0)/dt = 0, and the input is initially u(0)= 0.
4. Performing a partial fraction expansion using the roots of the denominator polynomial,
Equation 3.20
Solve for C1 by multiplying by s,
Setting s = 0 to find
Similarly, solve for C2 by multiplying Equation (3.20) by s + 2.4053 and setting s = –2.4053
Also, solve for C3 by multiplying Equation (3.20) by s + 2.2376 and setting s = –2.2376
which yields
Equation 3.21
Differential equations textbooks, such as Boyce and DiPrima (1992) present many examples of
applications of Laplace transforms to solve differential equations. In practice, it is rare for process
engineers to seek analytical solutions to differential equations; it is far easier to solve these
numerically. The primary goal of this section was to provide background material to understand
the transfer functions and dynamic responses shown in the next section.
[ Team LiB ]
[ Team LiB ]
Equation 3.22a
Since we are assuming that the model is based on deviation variables, and that the system is
initially at steady state, the initial conditions are
Equation 3.22b
The ratio of polynomials is called the transfer function. When it relates a manipulated input to an
output it is commonly called a process transfer function. In general, we will use gp(s) to represent
the process transfer function.
Equation 3.23
Equation 3.24
The roots of the numerator polynomial are known as zeros, and the roots of the denominator
polynomial are call poles. The significance of poles and zeros are discussed in detail in Section
3.9.
We have used capital letters to distinguish Laplace domain variables from the time-domain
variables. In the rest of this text we generally use lowercase letters for all input and output
variables. If the argument is s, then we assume that we are referring to the Laplace domain.
Transfer functions are often used in block diagrams. For example, the relationship between an
input and output is shown as
In the rest of this chapter we study the dynamic behavior of some commonly used transfer
functions. Our focus is on Step Responses, since process engineers often apply step changes to
understand dynamic behavior.
[ Team LiB ]
[ Team LiB ]
Equation 3.25
where the parameters (tp and kp) and variables (y and u) have the following names: tp is the
process time constant (units of time), kp the process gain (units of output/input), y the output
variable, and u the input variable. Taking the Laplace transform of each term (notice that we are
now using lower-case variables to represent the Laplace domain input and output), and assuming
that the initial condition is y(0) = 0,
Equation 3.26
Step Response
Consider the case where the output is initially zero (steady state in deviation variable form), and
the input is suddenly step changed by an amount Du. The Laplace transform of the input is
Equation 3.27
Equation 3.28
Using a partial fraction expansion and inverting to the time domain, you should find (see Exercise
1)
Equation 3.29
Here the notion of a process gain is clear. After a substantial amount of time (t >> tp), we find,
from Equation (3.29),
Equation 3.30
That is,
Equation 3.31
We can think of the process time constant as the amount of time it takes for 63.2% of the
ultimate output change to occur, since when t = tp,
Remember that this holds true only for first-order systems.
Impulse Response
Consider now an impulse input of magnitude P, which has units of the input*time; if the input is a
volumetric flow rate (volume/time), then the impulse input is a volume. The output response is
which has an immediate response of Pkp/tp followed by a first-order decay with time.
where the subscript s is used to indicate that a particular variable remains at its steady-state
value. Defining the following deviation variables
The gain and time constant are clearly a function of scale. A process with a large steady-state
flow rate will have a low gain, compared to a process with a small steady-state flow rate. This
makes physical sense, since a given heat power input will have a larger effect on the small
process than the large process. Similarly, a process with a large volume-to-flow rate ratio is
expected to have a slow response compared to a process with a small volume-to-flow rate ratio.
Consider a heater with a constant liquid volume of Vs = 50 liters and a constant volumetric flow
rate of Fs = 10 liters/minute. For liquid water, the other parameters are rcp = 1 kcal/ liter°C. The
process gain and time constant are then
Step Response
If a step input change of 10 kW is made, the resulting output change is [from Equation (3.29)]
A plot of the step input and the resulting output are shown in Figure 3-6.
Impulse Response
If an impulse input of 30 kJ is made, you should be able to show that the temperature changes
immediately by 0.143°C (see Exercise 15).
[ Team LiB ]
[ Team LiB ]
Equation 3.32
Equation 3.33
Step Response
If a step input change of Du is made at t = 0,
Equation 3.34
Impulse Response
If an impulse input of magnitude P is made at t = 0,
then the output immediately changes to a new steady-state value of
where h is the liquid height, A is the constant cross-sectional area of the tank, F1 is the inlet flow
rate, and F2 is the outlet flow rate. Assume that the outlet flow rate remains constant at a steady-
state value of F2s. Defining the output and input in deviation variable form as
Step Response
which is shown in Figure 3-7. If the steady-state height is 2 meters, then the height as a function
of time is
[ Team LiB ]
[ Team LiB ]
Equation 3.35
Equation 3.36
where (obviously a0 0)
and the parameters are as follows: k is the gain (units of output/input), z the damping factor
(dimensionless), and t the natural period (units of time).
The second-order model shown in Equation (3.35) or (3.36) generally arises by changing a set of
two first-order equations (state-space model) to a single second-order equation. For a given
second-order ODE, there are an infinite number of sets of two first-order (state-space) models
that are equivalent.
Equation 3.37
Equation 3.38
The characteristic equation of the second-order transfer function is t2s2 + 2zts + 1. We can find
the roots (known as the poles) by using the quadratic formula
Equation 3.39
The following analysis assumes that z >0 and t > 0. This implies that the real portions of p1 and
p2 are negative and, therefore, the system is stable. The three possible cases are shown in Table
3-2.
Step Responses
Now, we consider the dynamic response of second-order systems to step inputs (u(s) = Du/s),
Equation 3.40
For z > 1, the denominator polynomial, t 2s2 + 2zts + 1, can be factored into the form
where the time constants are
We can derive the following solution for step responses of overdamped systems,
Equation 3.41
Note that, as in the case of first-order systems, we can divide by kDu to develop a dimensionless
output. Also, the dimensionless time is t/t and we can plot curves for dimensionless output as a
function of z. This is done in Figure 3-8, which includes the critically damped case, as discussed
next. Most chemical processes exhibit overdamped behavior.
The transition between overdamped and under damped is known as critically damped. We can
derive the following for the step response of a critically damped system
Equation 3.42
Notice that the main difference between overdamped (or critically damped) step responses and
first-order step responses is that the second-order step responses have an S shape with a
maximum slope at an inflection point, whereas the first-order responses have their maximum
slope initially.
The initial behavior for a step change is really dictated by the relative order of the system. The
relative order is the difference between the orders of the numerator and denominator polynomials
in the transfer function. If the relative order is 1, then output response has a nonzero slope at the
time of the step input; the step response of a system with a relative order greater than 1 has a
zero slope at the time of the step input.
For z < 1, we find [from Equation (3.39)] that the poles are complex,
Equation 3.43a
where the real and imaginary contributions are
Equation 3.43b
Equation 3.44a
where
Equation 3.44b
Again, dividing Equation (3.44a) by kDu, we can produce the dimensionless plot shown in Figure
3-9.
As the imaginary/real ratio gets larger, the response becomes more oscillatory (z becomes
smaller). We also notice that a decreasing ratio 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 pole/zero plots in Section 3.9.
Consider now a second-order system with numerator dynamics with the gain/time constant form
Equation 3.45
which is relative order one. The reader should show that the pole-zero form is
where the parameters are
The gain/time constant form has the following time-domain response to a step input (see Exercise
4):
Equation 3.46
The reader should show that, if tn = t2, the response is the same as a first-order process.
The unit step responses are shown in Figure 3-11. Notice that negative numerator time constants
(corresponding to positive zeros) yield a step response which initially decreases before increasing
to the final steady state. This type of response is known as inverse response and causes tough
challenges for process control systems. Positive zeros are often caused by two first-order transfer
functions, with gains of opposite sign, acting in parallel (see Exercise 5).
[ Team LiB ]
[ Team LiB ]
Consider a lead-lag transfer function where the numerator and denominator polynomials are first
order:
Equation 3.47
Equation 3.48
A dimensionless output can be defined by dividing Equation (3.48) by kpDu, and t/tp is a natural
dimensionless time. The responses to a step input at t = 0 are shown in Figure 3-12. Notice that
there is an immediate response that is equal to the tn/tp ratio. This can also be found by applying
the initial value theorem to Equation (3.47"/>) for a step input change (see Exercise 3).
It is rare for processes to exhibit lead-lag behavior, but many controllers exhibit such behavior.
[ Team LiB ]
[ Team LiB ]
Equation 3.49
The values of s that cause the numerator of Equation (3.49) to equal zero are known as the
"zeros" of the transfer function. The values of s that cause the denominator of Equation (3.49) to
equal zero are known as the "poles" of the transfer function.
Equation 3.50
and complex poles (or zeros) must occur in complex conjugate pairs.
The "gain-time constant" form is the one that we use most often for control system design.
Equation 3.51
where tni is a numerator time constant and tpi is a denominator time constant. This form is
normally used when the roots (poles) of the denominator polynomial are real.
The zero is 1/10, and the poles are –1/3 and –1/15.
Notice that the zero for Example 3.7 is positive. A positive zero is called a right-half-plane (RHP)
zero, because it appears in the right half of the complex plane (with real and imaginary axes).
RHP zeros have a characteristic inverse response, as shown in Figure 3-11 for tn = -10 (which
corresponds to a zero of +0.1).
Also notice that the poles are negative (left-half-plane), indicating a stable process. RHP (positive)
poles are unstable. Recall that complex poles will yield an oscillatory response. A pole-zero plot of
the transfer function in Example 3.7 is shown in Figure 3-13 [the pole locations are (-1/3,0) and
(-1/15,0) and the zero location is (1/10,0), with the coordinates (real,imaginary)]. For this
system, there is no imaginary component and the poles and zeros lie on the real axis.
Figure 3-13. Pole-zero location plot for Example 3.7 (x, poles; o, zero).
As poles move further to the left they yield a faster response, and increasing the magnitude of the
imaginary portion makes the response more oscillatory. This behavior is summarized in Figure 3-
14. Recall also that a process with a pole at the origin (and none in the RHP) is known as an
integrating system; that is, the system never settles to a steady state when a step input change
is made.
Multiple RHP zeros cause multiple "changes in direction"; for example, with two RHP zeros, the
step response, initially going in one direction, switches direction, then switches back to the initial
direction.
[ Team LiB ]
[ Team LiB ]
Consider a process with kp = 1, tp = 10, and q = 5. A unit step input change at t = 0 yields the
response shown in Figure 3-15. We see that the time-delay shifts the response of the output.
[ Team LiB ]
[ Team LiB ]
Most ordinary differential equation numerical integrators require pure differential equations (with
no time delays). If you have a system of differential equations that has time delays, the Padé
approximation can be used to convert them to delay-free differential equations, which can then be
numerically integrated.
One of the many advantages to using SIMULINK is that time delays are easily handled so that no
approximation is required.
[ Team LiB ]
[ Team LiB ]
Take the Laplace transform of each term, assuming zero initial conditions
Solving for x(s), then y(s) (it should be noted that often D = 0)
where G(s) is a transfer function matrix. For example, the transfer function relating input j and
output i is
and multiplying,
Also,
The transfer function poles (–2.2381 and –2.4048) are equal to the eigenvalues of the A matrix.
Also, the positive zero (1/0.3549) in g11(s) yields the inverse response shown in Figure 3-5.
We see that it is straightforward to convert state space models to transfer function models. An n-
state system results in transfer functions that have a denominator polynomial that is nth order in
s, that is, with n poles. Sometimes the resulting transfer functions can be factored into lower
order transfer functions because of pole-zero cancellation (a value of a pole is equal to a value of
a zero). An example of pole-zero cancellation is shown in Exercise 13.
[ Team LiB ]
[ Team LiB ]
Here we first present some useful MATLAB functions not covered in other modules.
step
First, define an object, such one of the transfer functions in Example 3.6.
Transfer function:
-10 s + 1
-----------------
45 s^2 + 18 s + 1
then plot the step response (use help step to view other options)
» step(sysc)
A number of other useful functions, such as pole and tzero are shown in Module 4.
Simulink
It is highly recommended that you interactively work through the initial sections of Module 2 to
understand how SIMULINK can be used to simulate dynamic systems.
[ Team LiB ]
[ Team LiB ]
3.14 Summary
The main objective of this chapter was to develop an understanding of dynamic process behavior.
Although Laplace transforms can be used to obtain analytical solutions to differential equations,
we will not be using them for this purpose during the rest of this textbook. The concept of a
transfer function is very useful for control system design and analysis. In future chapters we find
that transfer functions allow the use of algebra rather than differential equations when analyzing
control systems composed of a number of components (controller, valve, process, sensor, etc.).
The stability of a process is determined by the eigenvalues of the state space A matrix, or the
poles of the Laplace transfer function: if all are negative, the system is stable. Complex
eigenvalues (poles) correspond to underdamped (oscillatory) behavior, characterized by damping
factors less than 1. Dynamic responses are also affected by the values of the zeros (roots of the
numerator polynomial in s) of a transfer function. If zeros are positive (in the right-half-plane),
step responses have a characteristic inverse response.
A first-order + dead time model is the most common process representation. Time-delays are
represented by an irrational term (e–qs) in the Laplace domain. First and second-order Padé
approximations are sometimes used for controller design; the approximations lead to right-half-
plane zeros and inverse response.
The initial and final value theorems of Laplace transforms can be used to find the limiting behavior
of transfer functions without having to obtain a full solution. The process gain is a measure of the
long-term change in a process output for a given input change.
State space models are easily converted to Laplace transfer function models. The use of LTI
objects (see Module 4) allows easy interconversion of models in MATLAB.
[ Team LiB ]
[ Team LiB ]
References
For more details on analytical mathematical methods (including Laplace transforms) to solve
differential equations, see: Boyce, W., and R. DiPrima, Ordinary Differential Equations and
Boundary Value Problems, 5th ed., Wiley, New York (1992).
[ Team LiB ]
[ Team LiB ]
Student Exercises
1: Solve for the time-domain output of a first-order transfer function to a step input
change.
2: A second-order process with one pole at the origin has the transfer function
Find the output as a function of time, for a unit step input change. Sketch the expected
behavior.
3: Use the initial value theorem to find the immediate response of a lead-lag transfer
function to a step input change at t = 0.
Also, use the final value theorem to find the long-term response of a lead-lag transfer
function to a step input change.
4: For the following second-order process with numerator dynamics, solve for the time-
domain output response to a step input change of magnitude Du at t =0.
where
If the gain of g1 is positive and the gain of g2 is negative, find the conditions
(relationship between gains and time constants for the two transfer functions) that
cause a right-half-plane zero (resulting in inverse response to a step input change) in
gp(s).
Find the second-order differential equation in y. Hint: first solve for x 1 from the second
equation, then take the derivative and substitute into the first equation.
i. Find the output at t=0 and as t approaches infinity, using the initial and final
value theorems.
8: As a process engineer with the Complex Pole Corporation, you are assigned a unit with
an exothermic chemical reactor. In order to learn more about the dynamics of the
process, you decide to make a step change in the input variable, the coolant
temperature, from 10°C to 15°C. Assume that the reactor was initially at a steady
state. You obtain the following plot for the output variable, which is reactor
temperature (notice that the reactor temperature is in °F). Use Figure 3-9 to help
answer the following questions.
i. What is the value of the process gain? (show units)
9: Match the transfer functions with the responses to a unit step input, shown in the
figure.
i.
ii.
iii.
iv.
v.
v.
ii. Find (analytically) the time-domain output response to a unit step input change.
Sketch the expected response to a unit step input change.
11: As a process engineer, you decide to develop a first-order + time delay model of a
process using a step test. The process is initially at steady state, with an input flow
rate of 5 gpm and an output of 0.75 mol/L. You make a step increase of 0.5 gpm at
3:00 p.m. and do not observe any changes until 3:07 p.m. At 3:20 p.m., the value of
the output is 0.8 mol/L. You become distracted and do not have a chance to look at
the output variable again, until you leave for happy hour at a local watering hole at
6:30 p.m. You note that the output has ceased to change and has achieved a new
steady-state value of 0.85 mol/L. What are the values of the process parameters, with
units? Show your work.
12: Use the initial and final value theorems of Laplace transforms to determine the initial
and final values of the process output for a unit step input change to the following
transfer functions.
i.
i.
ii.
iii.
13: Consider the following state space model for a biochemical reactor. Since there are two
states (the A matrix is 2 x 2) we expect that the process transfer function will be
second-order. Show that pole-zero cancellation occurs, resulting in a first-order
transfer function. Find the values of the gain and time constant.
14: Match the transfer functions with the responses to a unit step input, shown in the
figure.
i.
ii.
iii.
iv.
v.
v.
15: Consider Example 3.4. For an impulse input of 30 kJ, find the value of the vessel
temperature immediately after the impulse input is applied.
For a unit impulse input, find the output response as a function of time. What is the
peak change and when does it occur?
[ Team LiB ]
[ Team LiB ]
Develop continuous first-order and integrator + dead time models from step tests
4.1 Introduction
4.7 Summary
[ Team LiB ]
[ Team LiB ]
4.1 Introduction
For many processes there is not enough time, or it is not worth the effort, to develop fundamental
process models. Particularly if your main interest is tuning a specific control loop, it is likely that
you will develop a transfer function-based model by performing a plant test. The most common
plant test is to make a step change in the manipulated input (controller output) and observe the
measured process output response. Then a model is developed to provide the best match
between the model output and the observed plant output.
There are a number of important issues in developing an input-output model. Foremost is the
selection of the proper input and output variables. For many processes this is not trivial, because
a particular manipulated input may affect a number of measured outputs. Similarly, a measured
output may be affected by a number of manipulated inputs. In this chapter we assume that the
manipulated input and measured output have already been selected. The important discussion of
the selection of a particular input to be "paired" with a particular output is postponed until
Chapter 13.
It is common to base an input-output model on step responses. In this procedure we first bring
the process to a consistent and desirable steady-state operating point, then make a step change
in the input variable. An important decision is the magnitude of the step change to make.
If the step change in input is too small, the measured output may not change enough to
develop a reliable model. This is particularly true if the measured output is "noisy." Clearly,
the magnitude of step input must be enough so that the output "signal-to-noise" ratio is
high enough to obtain a good model.
If the step change in the input is too large, the output variable may change too much and
produce product that is "off-specification." This is not desirable because of the severe
economic penalty (i.e., the plant loses too much money while the step test is being
performed). Also, if the step input change is too large, nonlinear effects may dominate. That
is, the operating condition may become significantly different than the desired condition.
Clearly there is a trade-off here. The input must be changed enough to observe a change in the
output variable (it must increase above the noise level), yet not so much that the output variable
change is too great (causing an economic penalty).
As a process engineer conducting a plant step test, you will usually have some basic knowledge of
(or experience with) the input-output pair under consideration. Observations of the measured
output with time will provide an estimate of the standard deviation or variance of the
measurement noise. A rough estimate of the process gain will enable you to select an input
change magnitude so that the output change is "above the noise level." An estimate of the
process gain can often be obtained through steady-state material and energy balances.
In the following sections we show how to estimate parameters for some common simple models.
By far the most commonly used model, for control-system design purposes, is the first-order +
time-delay model discussed in the next section.
[ Team LiB ]
[ Team LiB ]
Equation 4.1
Equation 4.2
where the measured output is in deviation variable form. The three process parameters can be
estimated by performing a single step test on the process input.
The gain is found as simply the long-term change in process output divided by the change in
process input. Also the time delay is the amount of time, after the input change, before a
significant output response is observed. There are several easy ways to estimate the time
constant for this type of model.
Since the process gain is kp = Dy/Du = 6°C/2 gpm = 3°C/gpm, and the time-delay is 8-1 = 7
min, the first-order + time-delay transfer function is estimated as
Two-Point Method for Estimating Time Constant
A technique similar to the first one, but using two points on the output response, is shown in
Figure 4-4. Here the time required for the process output to make 28.3% and 63.2% of the long-
term change is denoted by t28.3% and t63.2%, respectively. The time constant and time delay can
be estimated from (see Exercise 2)
[ Team LiB ]
[ Team LiB ]
Equation 4.3
Equation 4.4
with the response shown in Figure 4-5. The gain, k, can be found from the slope by solving
Integrator + dead-time models are good for describing the behavior of "integrating processes,"
such as vessel liquid levels or gas drum pressures. They can provide a good short-term
approximation to the step response behavior of a first-order + dead-time process. Consider the
step response of a distillation column, which has a fairly long time constant. We see from Figure
4-6 that it takes roughly 5–6 hours to obtain good estimates for a FODT model.
where the gain has units of mol%/(kmol/min) and the time unit is minutes.
The initial response of Figure 4-6 is "blown-up" in Figure 4-7. Notice that fewer than 20 minutes
(the step change is made at t = 10 minutes) is required to obtain a satisfactory integrator + time-
delay model. Clearly, plant operators (and managers) will be much more willing to tolerate a 20-
minute test than a 4- to 5-hour test.
[ Team LiB ]
[ Team LiB ]
In practice, manipulated input changes are made at discrete time intervals and measured outputs
are available at discrete sample times. The physical inputs and outputs are continuous; only the
changes and measurements occur at discrete times. Since the focus of this textbook is on
controller design based on continuous models, the topic of discrete models may be skipped on a
first reading. Discrete models are primarily useful for model predictive control (Chapter 16) and
digital control design and analysis (Module 16).
In this section we cover discrete autoregressive models, in Section 4.5 parameter estimation of
discrete autoregressive models is covered, and in Section 4.6 we cover finite step and impulse
response models. It should be noted that the M ATLAB Control Toolbox has routines that convert
continuous-time models to discrete and vice versa. The details of the conversion are beyond the
scope of this text, but are summarized in the appendix; read Module 4 for explanations on how to
use these routines.
Equation 4.5
where k represents the current time step, k - 1 the previous time step, and so forth. The notation
y(k) is used to indicate the value of the output at step k. If all of the outputs are brought to the
left hand side, Equation (4.5) can be written
Equation 4.6
This form is primarily used to lead to the notion of discrete input-output transfer functions
covered next.
Z-Transforms
Similar to the use of Laplace transforms for continuous systems, Z-transforms are used for
discrete systems.
Equation 4.7
Equation 4.8
so Z[y(k - 2)] = z-2y(z), and so forth. Taking the Z-transform of each term in Equation (4.6), we
find
Equation 4.9
Equation 4.10
Equation 4.11
The discrete transfer function is the discrete-time analogy to the continuous-time transfer
function based on the Laplace transform. Similar to continuous (Laplace) transfer functions,
discrete (z-transform) transfer functions can be written in several forms. Multiplying Equation
(4.11) by zn/zn, we find
Equation 4.12
For most process systems there is not an immediate effect of the input on the output, so b0 = 0.
The polynomial forms of Equations (4.11) and (4.12) can be factored into gain-pole-zero form
Equation 4.13
The pole is found by solving for the roots of the denominator polynomial. In this case
To illustrate the importance of pole values, we will study the following values for a1:
yielding the corresponding pole values
For simplicity, we will assume no input change, so u(k) = 0. Also, let the initial value of the output
be y(0) = 1. The first few values of y(k) for each value of a1 are shown in the table below.
As expected, when the magnitude of the pole is less than 1.0, the process is stable; when the
magnitude is greater than 1.0, the process is unstable. One thing that is unusual for this first-
order discrete example is that the output can oscillate even with a constant (in this case, 0) input
value. For continuous-time systems there must be at least two states (the process must be at
least second-order) for oscillation to occur. This is because the condition for oscillation in
continuous-time systems is that the eigenvalues must be complex; for this to happen, there must
be at least two eigenvalues, each complex-conjugates of the other. Discrete time systems can
oscillate, as long as a pole has a negative value; if the negative pole has a magnitude less than
one, it is a stable oscillation.
The formal statement of the final value theorem is (where Dt is the sample time)
For a discrete-time input-output model
we find
so we can find the long-term behavior of the process output, subject to a unit step input, simply
by setting z = 1 in gp(z).
[ Team LiB ]
[ Team LiB ]
The measured inputs and outputs are the independent variables, and the dependent variables are
the outputs. For simplicity, consider the following model where two previous values of the input
and output are used to predict the next value. This model has four parameters
Equation 4.14
Notice that k = 1 is an arbitrary starting point for calculating the output, and that two previous
data points for the output and the input are needed to start the algorithm. To make it clear that
we are performing a model-based prediction of yk, we will use the notation k to indicate a model
prediction
Equation 4.15
Equation 4.16
where
Equation 4.17
The objective is to choose a set of parameters (a1, a2, b1, b2) to minimize the square of the
residuals (the differences between the model outputs and measured outputs).
Equation 4.18
The sum of the squares of the residuals can be written in matrix notation as
Equation 4.19
Equation 4.20
k -1 0 1 2 3 4 5
y 0 -0.0889 0.0137 0.1564 0.4618 0.1771 0.3446
u 1.0000 1.0000 1.0000 -1.0000 1.0000 -1.0000 -1.0000
k 6 7 8 9 10 11 12
y 0.2171 -0.1558 0.0485 -0.1879 -0.1123 0.0463 0.2003
u 1.0000 -1.0000 1.0000 1.0000 1.0000 1.0000 -1.0000
k 13 14 15 16 17 18 19
y 0.5007 0.3846 -0.0172 0.1513 -0.1162 0.1134 0.0502
u -1.0000 1.0000 -1.0000 1.0000 -1.0000 -1.0000 -1.0000
The F (input-output data) matrix, Q parameter vector, and discrete transfer functions are shown
below.
The M ATLAB and SIMULINK .m and .mdl files used to generate this example are shown in the
Appendix. It should be noted that the discrete transfer function can be converted to a continuous
transfer function using d2c to find
This is virtually identical to the continuous transfer function used to generate the original data.
This example illustrated the response of a perfectly modeled system (no measurement noise).
The approach can also be applied to a system with arbitrary inputs, and with noisy
measurements. See Exercise 8 for the same process, with output data corrupted by measurement
noise. To verify model parameter estimates it is common to use a portion of experimental data to
estimate parameters, then another portion of the data in "simulation" mode to see how well the
model predicted outputs match the data.
The data was analyzed in a batchwise fashion, that is, all of the data were collected before the
parameter estimation was performed. For on-line (real-time) estimation and control, we would
prefer to re-estimate parameters each time we obtain a new data point. This can be done by
using a "moving horizon" of past data points (each time a new data point is collected, the oldest
one is thrown out), or by using recursive identification techniques. Recursive techniques are
commonly applied in adaptive control, where the model is updated at each time step and a control
calculation is performed based on the updated model.
[ Team LiB ]
[ Team LiB ]
where the model length n is long enough so that the coefficient values are relatively constant
(i.e., the process is close to a new steady state).
Impulse Response Models
Another common form of model is known as a finite impulse response (FIR). Here, a unit pulse is
applied to the manipulated input, and the model coefficients are simply the values of the outputs
at each time step after the pulse input is applied. As shown in Figure 4-10, hi represents the ith
impulse response coefficient.
Figure 4-11 illustrates how impulse response coefficients can be obtained from step responses.
The impulse response coefficients are simply the changes in the step response coefficient at each
time step. Similarly, step response coefficients can be found from impulse responses; a step
response coefficient is the sum of the impulse response coefficients to that point.
4.7 Summary
The first sections of this chapter illustrated the development of first-order + time-delay and
integrator + time-delay models based on step input changes. These models will be sufficient for
many simplified controller designs. Higher order models can easily be developed by "fitting"
(adjusting) parameters to obtain a best match between model predictions and the actual
measured process output responses.
Linear regression (least squares) techniques can be used to estimate parameters in discrete time
autoregressive models. Usually, parameters are estimated based on a subset of the available
experimental data. The model parameters are then verified by applying the model to a different
subset of the data. If the model predictions match the measured outputs reasonably well, then
the discrete model is usually acceptable for discrete control system design and analysis.
The stability of a discrete transfer function model is determined from the values of the poles of
the denominator polynomial. If the poles are less than 1 in magnitude, the discrete model is
stable. Module 16 covers classical discrete controller design procedures. Discrete step and impulse
response models are often used in model predictive control (Chapter 16).
[ Team LiB ]
[ Team LiB ]
References
[ Team LiB ]
[ Team LiB ]
Student Exercises
Show that the maximum rate-of-change (slope) of the output occurs at t = q . Also, find this slope.
2: Consider the response of a first-order + time-delay transfer function to a step input change. Find the
value of the output (y ) at the following times, as a fraction of the long-term output change
Find the time constant and time-delay based on the values of t 1 and t 2 .
3: Consider the following step response. Estimate parameters for a first-order + time-delay model using
the three techniques shown in Section 4.3 . Include the units for each parameter.
4: Consider the following step response. Estimate the parameters for an integrator + time-delay model,
including the units for each parameter.
b. For a sample time of 0.25, find the discrete state space and transfer function models (use M ATLAB
; see Module 4 ).
c. Compare the step responses of the continuous and discrete models (use MATLAB ). What do you
observe?
using z -transforms, find the corresponding model represented as equations (4.11 ), (4.12 ) and (4.13
). Discuss the stability of the process.
7: Consider a unit step input change made at k = 0, resulting in the output response shown in the plot
and table below.
k -1 0 1 2 3 4 5 6 7 8 9 10
y 0 0 0.1044 0.3403 0.6105 0.8494 1.0234 1.1244 1.1616 1.1531 1.1184 1.0746
u 0 1 1 1 1 1 1 1 1 1 1 1
k 11 12 13 14 15 16 17 18 19 20
y 1.0336 1.0023 0.9828 0.9744 0.9742 0.9790 0.9860 0.9929 0.9985 1.0022
u 1 1 1 1 1 1 1 1 1 1
Estimate the parameters for a discrete linear model with the form
Compare the step response of the estimated model with the data. Use MATLAB to convert the discrete
model to a continuous model. Compare the step responses of the discrete and continuous models.
8: Consider Example 4.4 with measurement noise on the output variable, as shown below. Estimate the
discrete model parameters based on this data. How do the parameters compare with those of Example
4.4 ? Compare the step responses of the two models.
k -1 0 1 2 3 4 5
y 0.0741 -0.0857 -0.0399 0.1663 0.4065 0.1521 0.3910
u 1.0000 1.0000 1.0000 -1.0000 1.0000 -1.0000 -1.0000
k 6 7 8 9 10 11 12
y 0.2284 -0.2569 0.0910 -0.1737 -0.1260 0.0668 0.1958
u 1.0000 -1.0000 1.0000 1.0000 1.0000 1.0000 -1.0000
k 13 14 15 16 17 18 19
y 0.4976 0.3724 0.0119 0.0927 -0.0528 0.1357 0.0580
u -1.0000 1.0000 -1.0000 1.0000 -1.0000 -1.0000 -1.0000
9: Consider the continuous state space model (where the time unit is minutes)
a. Find the eigenvalues and the transfer function (use MATLAB for these calculations, if desired)
b. Using a sample time of 3 minutes, find the discrete state space model and the discrete transfer
function. Refer to the Appendix for the form of the discrete state space model, and Module 4 to
understand how to use MATLAB for these computations.
[ Team LiB ]
[ Team LiB ]
[ Team LiB ]
[ Team LiB ]
Appendix 4.2
Discrete time models can be obtained directly from continuous time models, as summarized in
this appendix. The MATLAB Control Toolbox can be used for these conversions, as shown in Module
4.
Consider a continuous state space model of the following form (where we have assumed D = 0)
Equation A4.1
Equation A4.2
Assuming that the sample time is Dt, and that the input u is held constant between time tk and
tk+1, (A4.1) can be integrated to yield
which has the solution (although the matrix exponential is not an intuitive concept, the
computation is readily performed by MATLAB)
where
The stability of this discrete state space model is determined by the eigenvalues of F, which must
have a magnitude less that 1.0 for stability.
The discrete transfer function is, similar to the continuous time case
[ Team LiB ]
[ Team LiB ]
Find the closed-loop transfer function for a given process and controller transfer function
Find the transfer function relationship between any two signals on a block diagram
5.1 Motivation
5.10 Summary
[ Team LiB ]
[ Team LiB ]
5.1 Motivation
Consider the level control problem first described in Chapter 1 and shown in Figure 5-1. A level
measurement device (usually a differential pressure cell) senses the level and sends a signal to
the controller. Notice that the controller is comparing the tank height with the desired setpoint
and sending a controller output (pressure signal) to the valve, which changes the valve position
and therefore the volumetric flow rate of stream 1, F 1. These signals are shown as dashed lines
on the figure.
The question is, what is the control algorithm? How does the controller change the flow rate to
the process? You can probably think of a number of possible algorithms.
On-Off Control
An on/off controller is similar to a controller used in a typical home heating unit. If the liquid level
is too high (higher than the desired setpoint), the valve is closed and if the level is too low (lower
than the desired setpoint) the valve is fully opened. The problem with an on-off strategy is that
the valve will constantly be opening and closing, as shown in Figure 5-2, causing wear and tear on
the valve.
Equation 5.1
The next option is to make the signal to the valve proportional to the difference between the
desired level and the actual level. This is known as a proportional controller (or P-controller) and
is discussed below.
Proportional Control
The following equation suggests a control action that is proportional to the error (difference
between setpoint and measurement),
Equation 5.2
where b is the bias term, kc is the proportional gain (a tuning parameter), and the difference
between the setpoint and the measured output is the error
Equation 5.3
If the error is 0 at steady state, notice that the bias term is equal to the steady-state valve-top
pressure.
Now we discuss the adjustment of the tuning parameter (proportional gain, kc). Consider the case
where the error is positive (setpoint is greater than the measured output). This indicates that the
flow rate entering the tank should be higher and therefore the valve-top pressure should increase.
The proportional gain, kc, must then be positive, for the control strategy shown in Figure 5-1. As
kc is increased, more control action is requested for a given amount of error.
Now consider the control strategy shown in Figure 5-3. A similar proportional control algorithm is
Equation 5.4
In this case we assume that the valve is fail-open (or air-to-close), since we desire that the tank
not overflow in the event of a control valve (or instrument air) failure. Now we rationalize the
adjustment of the tuning parameter. Consider the case where the error is positive (height
setpoint is greater than the measured height). This indicates that the flow rate leaving the tank
should be lower and that the pressure to the valve should increase. The proportional gain, kc,
must also be positive for the system in Figure 5-3.
Recall that the process gain is simply the steady-state change in output for a steady-state change
in process input.
For the first strategy, the process gain is positive; that is, an increase in F 1 causes an increase in
h.
Since the input to the valve is the valve-top pressure (Pv1) and the output of the valve is flow
rate, the valve gain is
The overall gain between valve-top pressure and tank height is then
For the second strategy, the process gain is negative (an increase in F2 causes a decrease in h),
and the valve gain is also negative. The gain between valve-top pressure and tank height is
Notice that a process with a positive gain (kp1kv1 or kp2kv2) requires a controller proportional gain
that is also positive. Similarly, a process with a negative gain would require a controller
proportional gain that is also negative.
Valve Gains
Most control valves are designed to operate with signals between 3 and 15 psig. A fail-closed
valve will be fully closed at 3 psig and fully open at 15 psig. For example, if the maximum flow
rate through the valve is 120 gallons per minute (gpm), then the average valve gain is
Similarly, a fail-open valve of the same size would have a negative gain (-10 gpm/psig).
[ Team LiB ]
[ Team LiB ]
From the proportional control law (algorithm) for this system [Equation (5.2)], realizing that b =
Pv1s (steady-state pressure to valve), we find the controller input-output relationship
where the controller input signal is the error, which is the difference between the setpoint and
measured process output. We write the equation [where c(s) is the controller output, the
pressure to the valve]
Equation 5.5
A block diagram for the controller is shown in Figure 5-4, where gc(s) = kc. For convenience when
analyzing block diagrams, the comparator is shown outside the controller transfer function block.
The block diagram uses r(s) to represent the setpoint, and ym(s) to represent the measured
process output.
We often assume that the output variable can be perfectly measured, and that process input
(usually a flow rate) is directly manipulated; in this case we do not include the valve and
measurement transfer functions in the closed-loop block diagram. Equivalently, we can "lump" the
valve and measurement dynamics into the process transfer function, again allowing us to neglect
the valve and measurement transfer functions. Similarly, the measurement device can be lumped
into the disturbance transfer function.
[ Team LiB ]
[ Team LiB ]
One objective of block diagram analysis is to find the output response to a setpoint change. A
critical aspect is to determine the closed-loop stability. The key is to use block diagram
manipulation to find the relationship between the setpoint and the output.
In Figure 5-11, we have absorbed the closed-loop diagram of Figure 5-10 into a single transfer
function block, to provide the closed-loop relationship between setpoint and process output.
Our goal is to obtain the output y(s) as a function of the setpoint, r(s). Here, we combine the
process input-output relationship, y(s) = gp(s) u(s), with controller relationship, u(s) = gc(s) e(s),
to find
Also, since the error is defined as e(s)= r(s) - y(s), we can write
which can be solved to find
We refer to the relationship between r(s) and y(s) as the closed-loop transfer function, gCL (s),
Equation 5.6
If all of the poles of gCL (s) are stable, then the closed-loop system is stable. The denominator of
gCL (s) is also known as the characteristic equation.
Equation (5.6) has been derived for the simple diagram shown in Figure 5-10. Please realize that
more-complex block diagrams will have more-complex closed-loop transfer functions. You should
be able to derive the closed-loop transfer function for any block diagram. For example the closed-
loop transfer function for Figure 5-9 (neglecting disturbances) is
We recognize that this is a first-order transfer function, where kCL = kpkc/(1 + kpkc)and tCL =
tp/(1 kpkc). For closed-loop stability, the requirement is that tCL > 0 or tp/(1 + kpkc) > 0. Since tp
> 0 (the process is open-loop stable), we have the requirement that 1 + kpkc > 0 or
for stability. Now consider a step setpoint change of magnitude R. You should be able show that
the output response will be
Notice that if kCL is not exactly equal to 1, there will be "offset" in the closed-loop response, as
shown in Figure 5-12. That is, the process output will not exactly match the desired setpoint,
even in the limit as time goes to infinity. Also, as a practical matter, it is important that kpkc > 0.
Notice that if –1 < kpkc < 0, then kCL is negative; although the closed-loop is stable, the process
output actually moves in the opposite direction as the setpoint change.
Offset can also be shown by the final value theorem of Laplace transforms.
or the fractional offset is 1/(1 + kpkc). For a given kp, the offset will be reduced as kc gets larger
and larger. Also, an increase in kc decreases tCL , speeding up the closed-loop response.
Thus far we have not considered the effect of control action. It is easy to derive the following
relationship between r(s) and u(s) from Figure 5-10:
which we recognize is a lead-lag response. The control (manipulated) variable response for this
example is also shown in Figure 5-13 for various values of kc. As kc increases, the magnitude and
speed of the manipulated variable response increases. For a particular physical system, too high
of a value of kc may cause the manipulated variable to hit a constraint. Consider a step setpoint
change of magnitude R [that is r(s) = R/s]. From the definition of a proportional controller, or
from the initial value theorem, we can show that
If Rmax represents a maximum setpoint change and umax represents a maximum allowable
manipulated variable change, then clearly kc must be less umax/Rmax to avoid manipulated
variable saturation.
Notice that increasing the controller gain reduces the offset and speeds up the response. In the
limit of an infinite controller gain, there is no offset and the dynamic closed-loop response is
instantaneous; a clear limitation is that the manipulated input may hit a constraint (in this
example, the heater power will be limited to some maximum value). In practice, there are time
delays or other model uncertainties and that may cause the closed-loop to be unstable with high
controller gains. It is necessary, then, to devise other control strategies to remove offset. These
strategies are detailed in Section 5.4.
Please note that there is one type of process where proportional control does not yield offset
when a setpoint change is made. These are integrating processes, where one pole of the process
has a value of zero; for example,
The reader should use the final value theorem of Laplace transforms to show that this process will
not have offset when a step setpoint change is made, under proportional control.
[ Team LiB ]
[ Team LiB ]
PI Control
A PI controller has two terms (and two tuning parameters), one proportional to the error (kc) and
the other proportional to the integral of the error (kI).
Equation 5.7
where tI is known as the integral time. Both the proportional gain and integral time are tuning
parameters that can be adjusted by the control instrument technician or process operator. Notice
that kI = kc/tI. The transform of an integral is
Taking the Laplace transform of Equation (5.7), we find as representation for a PI controller
Equation 5.8
and the controller transfer function for PI control is
Equation 5.9
Notice that there is no offset, because the closed-loop gain is 1. The quadratic formula can be
used to show that for a second-order characteristic polynomial, if all the coefficients are positive,
the roots are negative (stable). In this case, we have the conditions
Assuming that the process is open-loop stable (tp > 0) and realizing that tI > 0 by definition, we
see that from the first condition,
that is, kp and kc must be the same sign. The second condition requires that 1 + kpkc > 0, or
which is less restrictive than the first condition. The first condition, kpkc > 0, then must be met for
closed-loop stability of this system.
We must realize that there are two controller tuning parameters, kc and tI, that can be adjusted
to give a desired closed-loop response. The process parameters are not available for adjustment,
since they are physical parameters based on the process under consideration.
We have already found the conditions for stability but have not discussed the expected dynamic
behavior of a stable closed-loop system. If some poles of the closed-loop system are complex, the
response will consist of damped oscillations (underdamped), and if all the poles are real, the
response will be critically damped or overdamped. The reader has the opportunity (see Exercise
16) to show that the closed-loop behavior will be underdamped if the following condition is
satisfied
The reader should also show that if the integral time, tI, is equal to the process time constant, tp,
the closed-loop response will be first order with a closed-loop time constant of tp/(kpkc). These
results can be illustrated by simulation for a first-order process with the following parameter
values (see Example 5.1)
Simulations for a setpoint change of 1°C are shown in Figure 5-14, for tI = 0.25 minutes and tI =
5 minutes. In both cases the proportional gain is kc = 5 kW/°C. For the smaller integral time
there is oscillatory performance in both the controlled output (temperature) and manipulated
input (heater power). This oscillatory performance is often viewed as unfavorable to process
operators. An oscillatory closed-loop system is usually more sensitive to parameter uncertainty;
that is, if the process operating conditions changed the closed-loop system could go unstable.
PID Control
The next level of controller complexity is to add a term that accounts for the current rate of
change (derivative) of the error. Using knowledge of the derivative of the error allows the
controller to "predict" where the future error is heading and compensate for it. The time-domain
representation of PID control is
Equation 5.10
Equation 5.11
where tD is called the derivative time. In the Laplace domain, Equation (5.11) is written
Equation 5.12
Equation 5.13
It turns out that the "ideal" PID algorithm is not physically realizable, that is, no instrument can
take a perfect derivative, so most "practical" PID algorithms have one of the following forms
Equation 5.14a
or
Equation 5.14b
where tF + atD. A typical value for a is 0.1 or less. Even if the ideal PID controller of Equation
(5.13) could be implemented, it would not be desirable. A step setpoint change, for example,
would cause the derivative of the error to be infinity and cause a spike in the manipulated
variable; this behavior is known as derivative "kick." For this reason the derivative action is often
based on the process output rather than the error. That is, Equation (5.11) is implemented as
Equation 5.15
The transfer function representation is
Equation 5.16
Again, since an ideal derivative cannot be implemented, the following filtered derivative of the
output can be used
Equation 5.17
Proportional Band
We have been using a controller formulation based on proportional gain. Some industrial
controllers use proportional band, rather than proportional gain. The proportional band is the
range of error that causes the controller output (manipulated input) to change over its full range.
The proportional band is related to the proportional gain by
Equation 5.18
[ Team LiB ]
[ Team LiB ]
The Routh (pronounced like truth) stability criterion is based on a polynomial equation that has
the following form
The necessary condition for all the roots to be negative is that all ai > 0 (you can multiply all
coefficients by –1 if needed). The sufficiency test requires the Routh array
If all the coefficients in the first column of the Routh array are positive, then the sufficient
condition for stability is satisfied. If all the coefficients are not positive, then we can determine the
number of unstable (positive) roots by the number of changes in the sign of the coefficients as we
move down the first column. An example of the use of the Routh array to determine limits of a
tuning parameter for closed-loop stability is shown next.
We must use the Routh stability criterion on the characteristic polynomial. The coefficients are
we see from the necessary condition that 1 + kc > 0, or kc > 0. The sufficient condition that must
be checked is b1 > 0
which leads to kc < 10 for stability. The range of tuning parameters for stability is then
As a practical matter, however, the controller gain should be the same sign as the process gain
(recall that in Example 5.1 a controller gain with the wrong sign led to a process output response
in the opposite direction of the setpoint change). Simulation results for a unit step setpoint
change are shown in Figure 5-15. As kc is increased, the closed-loop response becomes more
oscillatory. The closed-loop system will lose stability at kc = 10.
Indeed, in Table 5-1 we show the relationship between kc and the closed-loop poles. Notice that
one pole stays real and becomes more negative (faster) as kc increases. The other two poles
become complex and the magnitude of the imaginary portion becomes larger as kc increases,
indicating that the magnitude of oscillation is increasing. At kc = 10, the complex poles cross from
the left-half plane to the RHP, indicating that the closed-loop system is unstable for kc > 10.
Figure 5-16 is a plot of the roots of the characteristic equation, as a function of kc. It shows
vividly the results presented in Table 5-1. The closed-loop poles start as three real, distinct poles
at kc = 0. Two become complex, and move toward the RHP as kc is increased. When kc > 10, the
two complex poles move into the RHP; at kc = 10, a continuous oscillation is formed.
Our discussion here is based on open-loop stable processes. To better understand the effect of
controller tuning parameters, you should experiment with a number of transfer functions. You can
also determine the closed-loop poles as a function of the tuning parameters, for a particular
process.
kc p1 p2 p3
0 –1.0000 –0.5000 –0.3333
[a] The poles (p1,p2,p3) are the roots of the characteristic equation, 6s3 + 11s2 + 6s + 1 + kc.
Derivative Time
In this chapter we have not explicitly shown the effect of derivative action—examples are given in
the next chapter. An increase in derivative time (tD) tends to help stabilize the closed-loop
response. A disadvantage of derivative action is that it causes the control system to be sensitive
to measurement noise.
The next chapter presents some standard procedures for controller tuning.
[ Team LiB ]
[ Team LiB ]
In our previous analysis we have been assuming that there is no load disturbance entering the
process; that is, our concern has been with setpoint responses. In this section we analyze
disturbance rejection (or the response to load disturbances) in detail.
Notice that a disturbance does not affect the stability of a system (as long as the disturbance
transfer function itself is stable), because the closed-loop characteristic equation [1 + gp(s)gc(s)]
is the same for setpoint tracking or disturbance rejection.
We see that this system is stable as long as kc is tuned to satisfy 1 + kpkc > 0. Since we are
dealing with deviation variables and we have made no setpoint change, we desire for y to stay as
close to 0 as possible.
Consider a step load disturbance of l(s) = Dl/s. Using the final-value theorem, we find that
which will be a small value as long as the disturbance magnitude (Dl) is low, the disturbance gain
(kd) is low, or the controller gain (kc) is high. Since it is undesirable to have offset, we would use
a PI controller, in practice, to remove the offset (see Exercise 24).
[ Team LiB ]
[ Team LiB ]
where tu > 0. We use this notation to make it clear that the process is open-loop unstable, since
the pole is positive.
Recall that an open-loop stable first-order process under P-only control (Example 5.1) required
that kpkc > –1 for closed-loop stability (and kpkc > 0 for reasonable performance). For open-loop
stable processes and controllers with integral action, kpkc > 0 is required for stability; this means
that the process gain and controller gain must be the same sign. It is interesting that this open-
loop unstable process needs the controller and process gain to be different signs.
Not all open-loop unstable processes can be stabilized by P-only control. For example, one of the
processes in Exercise 10 cannot be stabilized by P-only control.
[ Team LiB ]
[ Team LiB ]
For kc + 10, the MATLAB roots command can be used to find that the process is on the verge of
instability, with the following values for the poles:
» roots([6 11 6 11])
ans =
-1.8333
-0.0000 + 1.0000i
-0.0000 - 1.0000i
Notice that this analysis can be performed for several values of kc, to construct Table 5-1.
[ Team LiB ]
[ Team LiB ]
5.10 Summary
The objective of this chapter was to provide an introduction to feedback control. We showed how
to convert an instrumentation and control diagram to a control block diagram. Block diagram
manipulations were used to develop a closed-loop transfer function. Transfer function
representations for standard PID controllers were developed. The Routh array was used to test for
the necessary and sufficient conditions for closed-loop stability based on the characteristic
equation of the closed-loop transfer function. We noted that proportional controllers exhibit offset
for setpoint and disturbance changes, motivating the development of controllers with integral
action. Open-loop stable processes generally require that the controller gain be the same sign as
the process gain, while open-loop unstable processes often require that the controller gain be the
opposite sign of the process gain.
It is suggested that you work some of the problems in the student exercises section. It is
particularly important to be able to find the closed-loop relationship (transfer function) between
any two signals on a control block diagram.
What has not been discussed in this chapter is the issue of robustness. We have presented
methods of analysis that assume that the process transfer function is exactly known. In reality, a
process model is only an approximate representation of the dynamic behavior of the process. A
set of tuning parameters that is stable under one operating condition may be unstable under
another. Chapter 7 presents tuning methods that account for uncertainty in process parameters.
Also, the model-based methods developed in Chapters 8 and 9 allow for detuning parameters
based on model parameter uncertainty.
gc(s): controller
gv(s): valve
gp(s): process
gm(s): measurement
gCL (s): closed-loop
P: proportional
PI: proportional-integral
PID: proportional-integral-derivative
gc(s) = kc P control
PI control
CLTF simplified
[ Team LiB ]
[ Team LiB ]
References
Routh, E.J., Dynamics of a System of Rigid Bodies, Part II, MacMillan, London (1905).
[ Team LiB ]
[ Team LiB ]
Student Exercises
1: Consider a household heating system with on-off control. Normally there is a dead
band of 2°F; that is, the temperature must drop to 1°F below the setpoint before the
heater kicks on, and it must go 1°F above the setpoint before the heater kicks off.
Clearly the thermostat/heater has periodic behavior with periods where the heater is
on, followed by periods where it is off. Discuss the effect of the dead band on this
periodic behavior. Sketch the expected heater (on-off) and temperature profiles (as a
function of time) as the dead band is changed.
2:
a. Derive the closed-loop transfer functions relating L(s) and r(s) (the disturbance
and setpoint, respectively) to ym(s) (the measured output) for the following
control block diagram. This block diagram is for a system that has significant
measurement and valve dynamics.
Use the following form: ym(s) = gCL (s) r(s) + gCL1(s) L(s) [that is, find gCL (s) and
gCL1(s)].
b. Also derive the closed-loop transfer functions relating L(s) and r(s) to u(s) (the
input to the process).
3: Derive the closed-loop transfer function between L(s) and y(s) for the following control
block diagram (this is known as a feed forward/feedback controller).
How would you check the stability of the closed-loop system? Will the stability of this
system be any different than that of the standard feedback system? Why?
4: Derive the closed-loop transfer function between r 1(s) and y1(s) for the following
control block diagram (this is known as a cascade control system). Hint: Find a single
block to represent the "inner" feedback loop.
a.
a. Construct a control block diagram, labeling all signals and transfer functions.
Make certain that you include valve and measurement sensor dynamics. Also
include at least one important disturbance input.
c. Based on whether the control valve is fail-open or fail-closed, is the process gain
relating the manipulated valve position (or valve top pressure) to the measured
temperature positive or negative?
6: Consider a first-order open-loop unstable process that has the following transfer
function
Find the range of values of parameters for a PI controller that stabilize this process.
7: Calculate the offset to a step setpoint change due to P-only control, for the following
process:
Using a P-only controller, find the range of the controller gain that will yield a stable
closed-loop system.
For a PI controller, find the range of stabilizing controller proportional gains (kc) for an
integral time constant of tI = 2.
a. Find the range of kc for a P-only controller that will stabilize this process.
b. It turns out that kc = 2 will yield a stable closed-loop (if this is not in your range
from part (a), you should check your results) for this system. In practice there is
a measurement lag in the feedback loop. Assuming a first-order lag on the
measurement, find the maximum measurement time constant which is allowed
before the system (with kc = 2) is destabilized.
Can a PI controller satisfy the necessary condition for stability of this process?
For P-only control, find the bound on the proportional gain to assure closed-loop
stability of this process.
The process parameters are kp = 1, t = 2, z = 0.7. The tuning parameters used are kc
= 5, tI = 0.2.
15: Consider an isothermal CSTR that has the following reaction scheme
This system exhibits a maximum in the concentration of B vs. dilution rate (F s/V,
where F s is the steady-state flow rate and V is the constant reactor volume) curve
shown in Figure 5-19. In this problem we consider two possible operating points, which
we call case 1 and case 2.
Case 1. The steady-state dilution rate of Fs/V = 4/7 min–1 is on the left side of the
peak shown in Figure 5-19. The transfer function relating the input (dilution rate) to
the output (concentration of B) is
Case 2. The steady-state dilution rate of Fs/V = 2.8744 min–1 is on the right side of
the peak in Figure 5-19. The transfer function relating the input to the output is
b. Find the process gain, poles, and zero for the two transfer functions. Are the
gains consistent with the steady-state input/output curve?
c.
b.
c. For a P-only controller, find the range of controller gains that will stabilize this
system at both operating points (case 1 and case 2).
16: Show that, for a stable first-order process, a PI controller will have an oscillatory
response if
17: Compare the effect of kc on the closed-loop stability requirements for the following
processes under P-only control:
Determine the conditions (range of values) for the PI tuning parameters to assure
closed-loop stability.
19:
It is easy to show for the second-order system that there is no
upper bound on kc for P-only control, so that offset can be minimized by making kc
very large. Now consider the more practical case, where there is a measurement lag.
How low must tm be to assure that the maximum offset for a setpoint change is 5%?
(Hint: Consider the offset of a P-only control system, but also make certain that the
closed-loop system satisfies the Routh stability criterion.)
In the process of tuning a P-only feedback controller for this process, the operator
discovers a steady-state offset of 2/5 for a unit setpoint change, when the proportional
gain is 1. She also finds that the closed-loop system goes unstable when the
proportional gain is greater than 2.
c.
a.
b.
c. What type of instability occurs when the proportional gain is 2? That is, does the
closed-loop system oscillate owing to simultaneous crossing of two complex poles
across the imaginary axis? Or does a single real pole cross the imaginary axis?
21: An open-loop unstable chemical reactor is known to have a process transfer function
with the following form, where the manipulated input is the coolant flow rate
(liters/minute) and the measured process output is the reactor temperature (°C):
When a P-only controller, with a value kc = -3 lpm/°C, is used, the response to a unit
setpoint change is shown below.
When a PI controller is used, the closed-loop system becomes unstable, as shown
below, when the tuning parameter values are kc = -1.333 lpm/°C and tI = 2 minutes.
What are the values for the process parameters, kp and tu? Hints: Can the final-value
theorem be used? Can the Routh stability criterion be used?
22: Consider the following chemical process. The concentration of propylene glycol exiting
the adiabatic reactor is measured. The output of the concentration controller is a
current signal, which is converted to a pressure signal. The pressure signal actuates a
control valve that changes the flow rate of steam to a heat exchanger, which changes
the temperature of the reactor inlet stream.
a. Construct the control block diagram, clearly labeling all signals and blocks.
b. Find the closed-loop transfer function from the concentration setpoint to the
measured output.
23: Consider a PID controller with a special form that eliminates "derivative kick":
Derive the closed-loop transfer function relating a setpoint change, r, to the process
output, y.
24: Consider Example 5.4. If a PI controller is used, rather than P-only, show that there
will not be any offset to a step load disturbance. Also, show the conditions on the
tuning parameters for closed-loop stability.
[ Team LiB ]
[ Team LiB ]
After studying this chapter, the reader should be able to do the following:
Tune PID controllers using the classical, Ziegler-Nichols, and Cohen-Coon methods
6.1 Introduction
6.5 Summary
[ Team LiB ]
[ Team LiB ]
6.1 Introduction
Consider the standard feedback block diagram shown in Figure 6-1, where disturbance inputs
have been neglected. Transfer functions (and block diagrams) are used to analyze the behavior of
control systems, because the algebraic expressions are easy to manipulate.
We noted in Chapter 5 that the closed-loop transfer function could be used to determine, for
example, the range of controller gains that assure closed-loop stability.
P-Only Control
Equation 6.1a
which has the following transfer function relationship between error and controller output:
Equation 6.1b
PI-Control
The PI algorithm is
Equation 6.2a
which has the following transfer function relationship between error and controller output:
Equation 6.2b
PID Control
Equation 6.3a
which has the following transfer function relationship between error and controller output:
Equation 6.3b
In practice it is impossible to perfectly differentiate the error signal, so the following Laplace
transfer function approximations are often used for "real" PID control (where a = 0.1 is common):
Equation 6.4a
or
Equation 6.4b
A problem with taking the derivative of the error is that step setpoint changes cause the
derivative to become unbounded and result in a "spike" in the manipulated variable action. In
most practical PID controllers, then, the derivative of the measured process output is used.
Equation 6.5a
Equation 6.5b
Equation 6.5c
where the measured process output has been "filtered" to minimize noise problems.
[ Team LiB ]
[ Team LiB ]
1. With P-only closed-loop control, increase the magnitude of the proportional gain until the
closed-loop is in a continuous oscillation. For slightly larger values of controller gain, the
closed-loop system is unstable, while for slightly lower values the system is stable.
2. The value of controller proportional gain that causes the continuous oscillation is called the
critical (or ultimate) gain, kcu . The peak-to-peak period (time between successive peaks in
the continuously oscillating process output) is called the critical (or ultimate) period, Pu.
3. Depending on the controller chosen, P, PI, or PID, use the values in Table 6-1 for the tuning
parameters, based on the critical gain and period.
Tyreus and Luyben have suggested tuning parameter rules that result in less oscillatory responses
and that are less sensitive to changes in the process condition. Their rules are shown in Table 6-
2.
Controller type kc tI tD
Controller type kc tI tD
PI kcu /3.2 2.2 Pu —
PID kcu /2.2 2.2 Pu Pu/6.3
Recall that a P-only controller caused the closed-loop to be on the verge of instability (continuous
oscillation) when the value of the controller gain was kc = 10. This is the critical proportional gain,
kcu . From the response shown in Figure 6-2 we see that the ultimate period (period of oscillation)
is Pu = 6.2 minutes.
The closed-loop responses for Ziegler-Nichols tuning for P, PI, and ideal PID controllers (based on
Table 6-1) are shown in Figure 6-3. Notice that a P-only controller has offset, as expected. Also,
all the responses are quite oscillatory; this is one of the major disadvantages to the Ziegler-
Nichols tuning method. It typically results in more oscillatory behavior than would be allowable in
a typical process plant. The tuning parameters are also not very robust, that is, they are very
sensitive to process uncertainty. If the process conditions change, then the control system may
become unstable.
The closed-loop responses for Tyreus-Luyben tuning for P (assumed to be the Ziegler-Nichols
value), PI, and PID controllers are compared in Figure 6-4. The Tyreus-Luyben parameters result
in less oscillatory responses and will be less sensitive to uncertainty.
[ Team LiB ]
[ Team LiB ]
Since first-order + time-delay processes have a maximum slope of k = kp/tp at t = q for a unit
step input change, these same rules can be used for first-order + time-delay processes,
Their recommended tuning parameters, which should give roughly quarter-wave damping, are
shown in Table 6-3. We see a potential problem for systems with a low time-delay/time-constant
ratio, since this causes the proportional gain to become very large. Similarly, the integral time
tends to be low, causing oscillatory behavior.
Cohen-Coon Parameters
The method developed by Cohen and Coon (1953) is based on a first-order + time-delay process
model. A set of tuning parameters was empirically developed to yield a closed-loop response with
a decay ratio of 1/4 (similar to the Ziegler-Nichols methods). The tuning parameters as a function
of the model parameters are shown in Table 6-4.
A major problem with the Cohen-Coon parameters is that they tend not to be very robust; that is,
a small change in the process parameters can cause the closed-loop system to become unstable.
P-only — —
PI 3.3q —
PID 2q 0.5q
Controller type kc tI tD
P-only — —
PI —
PID
[ Team LiB ]
[ Team LiB ]
Equation 6.6
In the direct synthesis procedure, we select a desired closed-loop response, gCL (s), and, based on
the known process, gp(s), find the controller gc(s) that will yield this response. Solving Equation
(6.6) for gc(s), we obtain
Equation 6.7
By now you should be able to perform block diagram manipulations to find the relationship
between any external signal [such as a setpoint change, r(s)] and any other signal on the control
block diagram. For example, it is important to analyze the manipulated variable action required
for a setpoint change to make certain that it is not too rapid or that it does not violate
constraints. From Figure 6-1 we can easily derive the effect of the setpoint change on the
manipulated variable action,
Equation 6.8
The direct synthesis procedure then consists of specifying the desired closed-loop transfer
function (e.g., first-order response, second-order underdamped, etc.), gCL (s), using Equation
(6.7) to find the feedback controller, and considering the manipulated variable response (usually
tested by simulation).
The real question is: How do we specify the desired closed-loop response?
It turns out that we are not limited by the desired closed-loop response, if the system is minimum
phase (the process does not have RHP zeros or time delays—the terminology becomes clear in
Chapter 7). In the following section we present the direct synthesis method for minimum-phase
systems, and cover non-minimum-phase systems in the subsequent section.
Direct Synthesis for Minimum-Phase Processes
It seems fairly natural to specify a desired closed-loop response that is first order, since we
understand the characteristics of a first-order response.
Equation 6.9
For a specified first-order response, there is only one tuning parameter, l, since we desire a
closed-loop gain of 1 (we want the process output to equal the setpoint as the closed-loop system
goes to a new steady state); small values of l results in fast responses, while large values result
in slow responses. One could also argue for a desired closed-loop response that is second order
and underdamped, which would lead to specifying two parameters.
Equation 6.10
Equation 6.11
Equation 6.12
so that our direct synthesis controller for a first-order process is simply a PI controller, where
Notice that there was only one "tuning parameter" for this direct synthesis example. The desired
closed-loop time constant, l, was the only adjustable parameter. Given the first-order transfer
function parameters (kp and tp) and the desired closed-loop time constant (l), we found that the
direct synthesis controller was PI, but that we only needed to "adjust" one PI parameter (kc). This
is a nice result, because once we find the process time constant (tp), we can set the integral time
(tI) equal to the time constant, and tune kc on-line until we achieve a desired response. Tuning a
single controller parameter is much easier than tuning two or three.
Numerical Example
Consider the following first-order process, with a time constant of 10 minutes and a process gain
of 2 %/%
The output and manipulated variable responses for l = 1, 5, and 10 min (tI = 10; kc = 5, 1, and
0.5, respectively) are shown in Figure 6-5. As expected, the manipulated variable response for
the faster desired closed-loop time constant is much more aggressive than for the slower closed-
loop time constants. Notice that setting the closed-loop time constant equal to the open-loop time
constant (l = tp = 10) results in a single step change in the manipulated variable action.
If the desired closed-loop response is first order, gCL (s) = 1/ls + 1, the resulting controller is
which is a PI controller with an additional term (e3s). This additional term is not physically
realizable because it requires knowledge of future errors to obtain the current control action. This
is clearly impossible. Perhaps this is shown more clearly in the time domain
where the control action at time t depends on the error at time t + 3, which is clearly impossible
to implement.
The next example shows how a system with a RHP zero must have a modified desired closed-loop
response.
Equation 6.14
The direct synthesis procedure with gCL (s) = 1/ls + 1 yields the controller
which is unstable because of the RHP pole. The RHP pole in the controller is due to the inversion
of the process zero. This inversion occurs because of the specification of a first-order closed-loop
response. The output and manipulated variable responses are shown in Figure 6-6 for l = 5
minutes. Notice that the inverse response does not appear in the output variable but that the
manipulated variable is unbounded (unstable). This is often called internal instability.
It is easy to understand the behavior shown in Figure 6-6. On a short timescale, the process
appears to the controller to have a negative gain, since a step change in the manipulated variable
yields an output that initially dips before going in the positive direction. The controller is acting on
this effective "negative gain" to continually force the manipulated variable in a negative direction.
The reader should verify that once the manipulated variable hits a lower bound, the process
output will begin to decrease.
Specifying a desired first-order closed-loop response for a system with a RHP zero resulted in an
unstable controller and unbounded manipulated variable action. A stable controller can be
obtained if the desired closed-loop response has the same RHP zero as the process.
using the direct synthesis procedure, you should find the following controller,
which is an ideal PID controller cascaded with a first-order filter. The parameters are
The output and input responses for a step setpoint change with l = 5 minutes are shown in Figure
6-7. The closed-loop system has inverse response (as specified by the closed-loop transfer
function) and reasonable manipulated variable action.
[ Team LiB ]
[ Team LiB ]
6.5 Summary
The closed-loop Ziegler-Nichols method (Table 6-1) was shown to lead to oscillatory closed-loop
behavior, which is one of the major disadvantages to the approach. A major advantage to the
approach is that a process model is not needed. Tyreus-Luyben parameters (Table 6-2) were
shown to be less oscillatory and are generally recommended over the Ziegler-Nichols parameters.
The open-loop Ziegler-Nichols (Table 6-3) and the Cohen-Coon (Table 6-4) methods also tend to
lead to oscillatory closed-loop behavior; we have covered these approaches primarily for historical
reasons.
In the direct synthesis design procedure, a desired closed-loop response (or closed-loop transfer
function) is specified. A feedback controller is then synthesized to obtain that response. We have
seen that a PID-type controller often results. Some problems can arise if the process has a time
delay or inverse response. In these cases, the desired closed-loop response must also have a time
delay or inverse response. We develop a more transparent method for designing controllers for
first-order + time-delay processes in Chapters 8 and 9.
[ Team LiB ]
[ Team LiB ]
References
The original Ziegler-Nichols parameters are developed in the following paper: Ziegler, J. G., and
N. B. Nichols, "Optimum Settings for Automatic Controllers," Trans. ASME, 64, 759–768 (1942).
The Cohen-Coon parameters are developed in the following paper: Cohen, G. H., and G. A. Coon,
"Theoretical Considerations of Retarded Control," Trans. ASME, 75, 827 (1953).
The Tyreus-Luyben parameters are presented in the following textbook: Luyben, M. L., and W. L.
Luyben, Essentials of Process Control, McGraw-Hill, New York (1997).
[ Team LiB ]
[ Team LiB ]
Student Exercises
1: Consider the gas pressure problem shown below. The objective of this problem is to
understand (via simulation) how the tuning parameters for a PI controller affect the
stability and speed of response for setpoint changes or disturbances.
The relationship between the manipulated valve position (u in deviation variables) and
the pressure in the second tank (y in deviation variables) is (with a time unit of
minutes)
Also assume that the dynamic behavior of the control valve is also characterized by a
first-order lag with a time constant of 6 seconds,
where c(s) is the output from the controller and u(s) is the valve position. For P-only
control, find the value of kc (via simulation) that causes a closed-loop to go unstable.
Call this value kcu , and call Pu the period of oscillation (time between peaks) when the
system goes unstable. These values are used in the Ziegler-Nichols closed-loop
oscillation method.
a.
a. Show that the value of kc sightly greater than that you obtained causes at least
one root of the closed-loop characteristic equation [gCL (s)] to be positive. Find
the P and PI tuning parameters on the Ziegler-Nichols closed-loop oscillations
method.
b. Compare the response of the two different controllers (P vs. PI), for step setpoint
changes of 1 psig in the desired output (y).
Perform simulations for the process output and manipulated input for unit step
changes in the setpoint.
a. Compare the closed-loop step response of this process using P-only control based
on (i) Ziegler-Nichols closed-loop oscillations method, (ii) Ziegler-Nichols open-
loop method, (iii) Cohen-Coon, and (iv) Tyreus-Luyben tuning.
b. Compare the closed-loop step response of this process using PI control based on
(i) Ziegler-Nichols closed-loop method, (ii) Ziegler-Nichols open-loop method, (iii)
Cohen-Coon, and (iv) Tyreus-Luyben tuning.
c. Compare the closed-loop step response of this process using PID control based
on (i) Ziegler-Nichols closed-loop method, (ii) Ziegler-Nichols open-loop method,
(iii) Cohen-Coon, and (iv) Tyreus-Luyben tuning.
3: Consider the process transfer function for the Van de Vusse reactor (Module 5).
Find the Ziegler-Nichols controller parameters for P, PI, and PID controllers for this
process, based on the closed-loop oscillation method. Compare the responses of all
three controllers to a step setpoint change.
4: Most PID controller design procedures assume that a perfect derivative controller is
used. For the process transfer function used in problem 3 above, and the Ziegler-
Nichols closed-loop method, compare the responses of (i) ideal PID, (ii) real PID, and
(iii) PID with ideal derivative action on the process output, rather than the error.
where
where yf is a "filtered" value of the process output. Assuming that a first-order filter is
used, with a time constant of tf , write the modeling equations (differential and
algebraic) to simulate the behavior of this controller.
7: Apply (simulate) the Tyreus-Luyben parameters for PI and PID controllers to the
following process
Compare these results with Cohen-Coon. Which do you recommend for implementation
on a real process?
8: Find the feedback controller for an integrating process, gp(s) = kp/s, assuming a
desired first-order response using the direct synthesis method.
9: Find the feedback controller for an integrating process, gp(s) = kp/s, assuming a
10: Show that the direct synthesis procedure for the following process, assuming a desired
first-order response, yields a PID controller
Find the PID tuning parameters if a closed-loop time constant of 5 minutes is desired.
find a controller that gives a first-order closed-loop response. (Hint: It will be a PID
with a first-order lag.)
If the desired closed-loop response to a setpoint change is second order with the
following form,
find the feedback controller required, where a and l are adjustable tuning parameters
(they are both positive). What type of controller is this? If the controller is PID form
(perhaps with a lag), find each of the tuning parameters (kc, tI, tD, tF). Show that l >
0.5a is required for the controller to be stable.
13: Consider a first-order process with a desired closed-loop response that is second order.
Use the direct synthesis procedure with the following specified closed-loop transfer
function (which is critically damped),
to derive the controller. Perform simulations for several values of l and compare and
contrast the closed-loop results with those shown in Figure 6-5.
[ Team LiB ]
[ Team LiB ]
Substitute s = jw, and find Bode or Nyquist plots for a transfer function
Understand the effect of gains, time constants, RHP zeros, and time delays on amplitude
ratios and phase angles
Find the gain and phase margins for a given process and controller
Determine the amount of dead time or gain uncertainty that can be tolerated before a
closed-loop system becomes unstable
7.1 Motivation
7.6 Robustness
7.8 Summary
[ Team LiB ]
[ Team LiB ]
7.1 Motivation
A control system must satisfy desired performance characteristics (closed-loop time constant,
minimal overshoot, etc.) for nominal operating conditions. By nominal, we normally mean that
the plant is perfectly described by the model used for control-system design. In reality, a model is
never perfect, so controllers must be designed to be robust (to remain stable even when the true
plant characteristics are different from the model).
So far we have analyzed the closed-loop characteristic equation (1 + gcgp) for stability, either by
directly calculating the roots or by using the Routh array to verify that the roots (closed-loop
poles) are negative. There are two problems with this approach:
1. Although the closed-loop characteristic equation may be stable for the nominal plant, the
values of the poles do not indicate how much uncertainty can be tolerated before the system
becomes unstable.
The best method for dealing with both of these problems is frequency response analysis. Our
motivation for covering frequency response analysis is primarily that it provides a measure of the
robustness of the controller tuning; that is, it provides a measure of the amount of model
uncertainty that can be tolerated before the control system will become unstable. We consider the
ability to determine the stability of systems with irrational transfer functions (time delays) to be
less important, because a higher order Padé approximation can provide an adequate
representation of the time delay, for analysis purposes.
To understand the concept of frequency response, consider the well-insulated, perfectly mixed
tank with constant flow in and out (perfect level control), shown in Figure 7-1. Assume that the
inlet temperature varies in a sinusoidal fashion between a minimum of 20°C, a maximum of 30°C,
with an average of 25°C. The amplitude of the inlet temperature sine wave is then 5°C.
This tank has a volume of 100 gallons, with a flow rate of 10 gallons/minute. You can easily show
that this system is modeled by a first-order transfer function, with a gain of 1°C/°C and a time
constant of 10 minutes. The responses to different frequencies in the inlet temperature are shown
in Figure 7-2. Notice that at low-frequency (0.01 rad/minute) forcing (top plot), the outlet
temperature (dashed line) has approximately the same amplitude as the inlet temperature (solid
line), with very small shift in the peak time. At an intermediate frequency (0.1 rad/minute)
forcing, we begin to see a decrease in the amplitude of the outlet temperature, as well as a "lag"
in the peak time (center plot). At a high frequency (1 rad/minute), the outlet temperature does
not vary substantially (bottom plot).
Please note that radians/time is the common unit used for frequency response analysis in process
control. You may be more comfortable thinking in terms of cycles/time. Since there is one cycle
for each 2p radians, then a frequency (f) in cycles/time can be converted to a frequency, w, in
radians/time by
Equation 7.1
Also, the period P ("peak-to-peak time") corresponds to one cycle and can be found by
Equation 7.2
The input-output behavior shown in Figure 7-2 makes physical sense. At low frequencies the inlet
temperature changes on a much slower timescale than the characteristic time of the process, so
the outlet temperature is virtually identical to the inlet temperature. At high frequencies, the inlet
temperature changes so rapidly that the "thermal mass" of the process does not allow the outlet
temperature to change significantly.
In terms of dynamic behavior, this type of system is known as a "low-pass filter" that is, low-
frequency inlet forcing is directly felt at the output. High input frequencies are effectively filtered
by the process and not felt at the output.
There are two important measures that can be obtained from these time-domain plots. One is the
amplitude ratio, which is the amplitude of the output sine wave divided by the input sine wave.
The second measure is the phase shift of the output sine wave relative to the input sine wave, as
illustrated in Figure 7-3. The phase shift, or phase angle, is
Equation 7.3
where P is the period, and DP is the lag between an input peak and an output peak.
For example, if the output were exactly out of phase with the input (output at a minimum when
the input is a maximum), the phase angle would be –180° or p radians. If the output lagged the
input by a full cycle, the phase angle would be –360°, and it is possible for the phase angle to
exceed this value (particularly for processes with a time delay). The phase angle in the bottom
plot of Figure 7-2 is approximately –90° (0.5p radians).
Rather than generating numerous time-domain plots like Figure 7-2, each at a different
frequency, the equivalent results can be displayed concisely on a Bode plot, as shown in Figure 7-
4. The amplitude ratio plot is log-log, while the phase angle plot is semilog.
Figure 7-4. Bode plot of the first-order example. Amplitude ratio and
phase shift are plotted as a function of frequency. The circles
correspond to the three frequencies used on the mixing tank.
[ Team LiB ]
[ Team LiB ]
Method 2, substitution of s = jw in the transfer function, is the easiest approach. There are also
two ways to display the frequency response information: Bode plots and Nyquist plots. The
following first-order example is used to illustrate these concepts.
We use two methods to find the output, given a sine forcing on the process input.
Consider a first-order system, with an input that is forced with a sine wave of magnitude A and a
frequency of w (rad/time). The time and Laplace domain representations of the input are
The exponential term decays with time, so the first term can be neglected at long times. Also, a
trignometric identity can be used to find that
Equation 7.4
The ss subscript is used to indicate the long-term behavior of the output, after the initial
transients have decayed. Notice that the output approaches 0 at high frequencies. This is
consistent with the results shown in Figure 7-2. The phase angle also approaches –90° at high
frequencies.
The amplitude ratio is the magnitude of the output divided by the input.
Equation 7.5
Notice that there is a natural dimensionless frequency, wtp, resulting from this analysis.
An easier way to generate frequency response plots is to simply set s = jw in the transfer
function. We illustrate this procedure, again with a simple first-order example.
2. Substitution of s = jw Method
Notice that the result is a complex number (real and imaginary portions) that changes as a
function of frequency. Since the magnitude of a complex number Re + jIm, can be represented by
, then the magnitude (amplitude) of the transfer function (notice that the amplitude at
zero frequency is simply the steady-state process gain) is
Equation 7.6a
Equation 7.6b
Notice that these are exactly the relationships shown with method 1 [Equations (7.4) and (7.5)].
Also notice that one can simply plot the imaginary values as a function of the real values to obtain
a Nyquist plot. Such a plot is shown in Figure 7-5 for this system. The curve begins close to (kp,0)
at low frequencies, and approaches (0,0) through the first quadrant at high frequencies. That is, it
starts with an amplitude of 1 at a phase angle of 0, and ends with an amplitude of 0 at a phase
angle of –90°.
4. For Bode plots, at each frequency point find the amplitude ratio and phase angle
5.
The results for several common transfer functions are shown in Table 7-1.
Table 7-1. Nyquist and Bode Values for Common Transfer Functions
tan–1(–tpw) 0 –90°
ts + 1 1 tw tan–1(tw) 0 90°
kp kp 0 kp 0 0 0
Equation 7.7
Equation 7.8
The amplitude ratio and phase angle can be found at each frequency from
Equation 7.9
Equation 7.10
That is, at each frequency the amplitude ratios add on a logarithmic scale, while the phase angles
add on a linear scale.
The amplitude ratio and phase angle can be found from Equations (7.9) and (7.10), and Table 7-1
Notice that the time delay has no effect on the amplitude ratio (compared with the pure first-
order process), but it has a great effect on the phase angle, particularly at high frequencies. We
can also think of the effect of the changes in each of the parameters.
Gain Change
A change in the gain merely shifts the amplitude ratio up or down (additive on a log scale), with
no change in the phase angle.
A change in the time delay changes the phase angle, but not the amplitude ratio. An increase in
the time delay increases the phase lag (makes it more negative) at any given frequency.
A change in the time constant affects both the amplitude ratio and phase angle. An increase in
the time constant tends to decrease the amplitude ratio and increase the phase lag (make it more
negative) at any given frequency.
[ Team LiB ]
[ Team LiB ]
The Bode plot is shown below in Figure 7-6. The higher order transfer functions have amplitude
ratios that decrease more rapidly with frequency, and the phase angles asymptotically approach
larger (more negative) values (-180° and -270° for the second- and third-order processes).
where the first transfer function is a pure gain, the second and third are Padé approximations
(first and second order, respectively), and the fourth is a pure time delay. The Bode plots are
shown in Figure 7-8. Notice that all these transfer functions have an amplitude that is constant
(does not vary with frequency). A transfer function with a constant amplitude ratio is called all-
pass because all frequencies are directly transferred from input to output with no change in
magnitude.
Figure 7-8. Bode plots. Comparison of different processes with an
amplitude ratio of 2.
Also, notice that the phase angle is different for each transfer function. A transfer function is
"minimum phase" if there is no other transfer function that has the same amplitude ratio, with a
larger phase angle. In this case, the first transfer function (gain with no dynamics) is minimum
phase, while all of the others are non-minimum phase. The high frequency asymptotes of the
first- and second-order Padé approximations are –180° and –360°, respectively. The high-
frequency phase angle of the time delay is unbounded. The corresponding Nyquist plots are
shown in Figure 7-9; each curve begins at (2,0). The constant gain remains at (2,0). The first-
order Padé transfer function ends at (-2,0), which is –180°. The second-order Padé transfer
function ends at (2,0), which is –360°. The time delay wraps an infinite number of times.
For stable systems (poles < 0) with no time delays, we can state the following general results. Let
m be the order of the numerator polynomial and n the order of the denominator polynomial (the
relative order is n–m).
If all process zeros are negative (no RHP zeros), the high-frequency phase lag is
(n–m)*(–90°)
Each RHP zero adds –90° of phase lag (left-half-plane zeros add +90° of phase lead) at high
frequencies
Gains change the amplitude ratio plot but not the phase angle plot
We also can state the following about systems with time delays:
Time delays change the phase-angle plot but not the amplitude ratio plot
Processes with time delays have a phase-angle that continuously decreases with frequency;
this corresponds to a continuous "wrapping" of the origin on a Nyquist plot
[ Team LiB ]
[ Team LiB ]
Consider the case where the loop has been opened, as shown in Figure 7-10. We introduce the
concept of Bode stability using the following thought experiment. Assume that the setpoint
applied to the "open-loop" system in Figure 7-10 is a sine wave. Also assume that the controller
has been tuned so that the output lags the setpoint by 180° and has the same amplitude as the
setpoint, as shown in Figure 7-11.
Consider the case where the output is exactly out of phase (f = –180°) with the setpoint in the
open-loop, but the amplitude of the output is less than the setpoint. Therefore the amplitude ratio
(|y|/|r|) is less than 1. Then, if the loop is closed, the output decreases each time "around the
loop" and the system is stable. In contrast, consider the case where the output is exactly out of
phase with the setpoint when the control loop is open, but the amplitude of the output is greater
than the setpoint. Then, if the loop is then closed, the output increases each time "around the
loop" and the system in unstable.
The thought experiment that we have just performed is the basis for the Bode stability criterion
stated in the next section.
[ Team LiB ]
[ Team LiB ]
Equation 7.11
where wco is known as the crossover frequency, which is defined as the frequency where the
phase angle is –180°.
The requirements placed by the Bode stability criterion are not that restrictive for most chemical
processes. For processes where the phase angle crosses –180° more than once, it is necessary to
use the Nyquist stability criterion.
Gain Margin
Let ARco represent the amplitude of gc(s)gp(s) at the crossover frequency (wco, where f = -180°).
The gain margin is defined as
Equation 7.12
and the Bode stability requirement is that ARco < 1, so for stability
Equation 7.13
The gain margin is the multiplicative factor that the gain can be increased by before the system
becomes unstable.
Phase Margin
Let fpm represent the phase angle when the amplitude of gc(s)gp(s) is 1. This occurs at a
frequency wpm. The phase margin is defined as
Equation 7.14
The closed-loop system will be stable if f > -180° when AR = 1, so the stability requirement is
Equation 7.15
The phase margin is the amount that the phase angle can decrease (in magnitude, at wpm) before
the system becomes unstable.
We have developed the Bode and Nyquist stability criteria and defined the gain and phase
margins. Next we use an example to illustrate the techniques.
where time unit is minutes. The Bode plots for gp(s)gc(s) with kc = 2.5 are shown in Figures 7-14
and 7-15.
Figure 7-14. Bode plot for Example 7.3. Calculation of the gain margin.
Figure 7-15. Bode plot for Example 7.3. Phase margin calculation.
We can use the following steps and the Bode plot in Figure 7-14 to calculate the gain margin.
1. Find the frequency where the phase angle for gpgc = –180°. Here, wco = 4.3 rad/min.
2. At this frequency, find the amplitude ratio for gpgc. Here, AR = 0.60.
3. The gain margin is 1/AR. Here, the gain margin = 1/0.60 = 1.67.
We can use the following steps and the plot in Figure 7-15 to find the phase margin.
1. Find the frequency where the gpgc amplitude ratio is 1.0. Here, wpm = 2.1 rad/minute.
2. At this frequency, find the gpgc phase angle. Here, fpm = –121°.
3. The phase margin is f – (–180). Here, the phase margin = –121 + 180 = 59°.
The Nyquist plot is shown in Figure 7-16. The unit circle is plotted on this diagram so that it is
easy to determine where the amplitude is equal to one. Notice that the Nyquist diagram is
consistent with the Bode diagram, since the amplitude ratio is 0.60 when the phase angle is
–180°, and the phase angle is –121° when the amplitude ratio is 1.0.
Figure 7-16. Nyquist plot for Example 7.3. The unit circle (dashed line)
is included for convenience. The points for the gain margin and phase
margin calculations are shown as the open circle and star,
respectively.
[ Team LiB ]
[ Team LiB ]
7.6 Robustness
We have noted throughout this text that it is important to tune controllers to be robust. By
robust, we mean that a controller can tolerate a certain amount of change in the process
parameters without causing the feedback system to go unstable. The gain and phase margins
presented in Section 7.5 quantify the amount of uncertainty that can be tolerated.
To illustrate the relationship between gain and phase margins and the model parametric
uncertainty that can be tolerated, we consider the following first-order + time-delay process.
Equation 7.16
Let Dk and Dq represent the additive uncertainty in the process gain and dead time, respectively
(notice that we are neglecting any uncertainty in the time constant). The actual process is then
Equation 7.17
Equation 7.18
where . The open-loop transfer function used in the frequency response analysis is
Equation 7.19
Notice that the gain and time-delay uncertainties are clearly separated from the nominal model
and controller e in this equation. Since 1 + is a constant term, it will only affect the
amplitude ratio. Also notice that e–Dqs will only affect the phase angle. This means that we can
think of the gain margin as being related to the amount of gain uncertainty that can be tolerated,
while the phase margin is related to the amount of dead-time uncertainty that can be tolerated.
The change in phase angle, Df, due to the change in deadtime, Dq, can be found from
Equation 7.20
These concepts are shown more clearly in the first-order + dead-time learning module (Module
6).
[ Team LiB ]
[ Team LiB ]
Transfer function:
-0.2075 s + 0.5848
-------------------------
0.1858 s^2 + 0.8627 s + 1
Next, generate the open-loop transfer function (gcgp) for a controller gain (kc) of 2.5.
» kc = 2.5;
» gcgp = kc*vdvtf
Transfer function:
-0.5189 s + 1.462
-------------------------
0.1858 s^2 + 0.8627 s + 1
Now, use the bode function to generate magnitude and phase angles as a function of frequency.
Also, use imargin to perform the gain margin (Gm) and phase margin (Pm) calculations at their
respective frequencies (Wcg and Wcp).
»[mag,phase,w] = bode(gcgp);
[Gm,Pm,Wcg,Wcp] = imargin(squeeze(mag),squeeze(phase),w)
Gm =
1.6680
Pm =
59.0905
Wcg =
4.3064
Wcp =
2.0956
The Nyquist plot, Figure 7-16, is generated using the following sequence of steps. First, define an
appropriate frequency range.
w1 = logspace(-2,2,300);
Then use the nyquist function to generate real and imaginary vectors.
[regcgp,imgcgp] = nyquist(gcgp,w1);
[ Team LiB ]
[ Team LiB ]
7.8 Summary
In this chapter, we developed the Bode and Nyquist frequency response techniques for control-
system design. Gain and phase margins indicate the amount of uncertainty a feedback system
can tolerate before becoming unstable. The gain margin is related to the change in gain (process
or controller) that can be tolerated, while the phase margin is related to the change in time delay
that can be tolerated. From a practical perspective, we recommend a gain margin of at least 2.5
and phase margin of at least 60° to assure robustness.
Phase angle (f): Peak-to-peak shift between input and output curves
Nonminimum phase: Generally, transfer functions with time delays and RHP zeros
Nyquist stability criterion: The critical point (–1,0) is not encircled by gcgp.
[ Team LiB ]
[ Team LiB ]
Reference
The following text contains an advanced discussion of control system design for robustness:
Morari, M., and E. Zafiriou, Robust Process Control, Prentice-Hall, Englewood Cliffs, NJ (1989).
[ Team LiB ]
[ Team LiB ]
Student Exercises
1: Find the time-domain solution for the output of a first-order process, with an input sine
wave of magnitude A at frequency w.
2: The peak day length (in terms of hours of daylight) occurs on 21 June, while the peak
average daily temperature occurs on 21 July (30 days later). Assuming that the
relationship between daylight hours and average daily temperature can be modeled by a
first-order transfer function, estimate the time constant of Earth's weather system
(provide the units). Also, what are the units of the "process gain"?
a. Use a Bode plot to find critical (ultimate) proportional gain (kcu ) for a P-only
controller that will make the closed-loop system nominally stable (gain margin = 1,
phase margin = 0). Also, find the ultimate period.
b. Find the gain and phase margins for a Ziegler-Nichols P-only controller. How much
gain uncertainty can be tolerated? How much dead-time uncertainty can be
tolerated?
c. Find the gain and phase margins for a Zielger-Nichols PI controller. How much gain
uncertainty can be tolerated? How much dead-time uncertainty can be tolerated?
d. Find the gain and phase margins for a Zielger-Nichols PID controller. How much
gain uncertainty can be tolerated? How much dead-time uncertainty can be
tolerated?
e. Would you recommend the Ziegler-Nichols tuning if you desired the following gain
and phase margins: gain margin, > 2.5; phase margin, > 60°?
f. Compare the closed-loop responses, for step setpoint changes, of the controllers
obtained in b–d. Show both output and manipulated input responses. Recommend
a set of tuning parameters.
4: For the open-loop system [go1(w) = g pgc(w)] below, find the gain and phase margins.
Also, show your work on the diagram. The unit circle is plotted for convenience.
5: Consider a pH control problem that has the transfer function
A PI controller with kc = 4.35 and tI = 69 yields the following Bode plot. Find the
controller gain that will provide a gain margin of 2.
6: The Bode plots for a particular system are shown below. You know that there is no gain
uncertainty in this process, however, when you implement the tuning parameters, the
feedback system is unstable. At least how much additional dead time was not included
in your model?
7: A first-order + time delay process is controlled by a PI controller. The Nyquist plot for kc
= 4.9688 and tI = 12.5 is shown below. Keeping tI constant, find the proportional gain
that will yield a gain margin of 3.
8: A process under P-only control has the following Bode plot, for kc = 1. What is the
ultimate gain (kcu ) and period (Pu)? If the Ziegler-Nichols recommended controller gain
for P-only control is used, what will be the phase margin? Recall that Ziegler-Nichols
recommended kc = 0.5 kcu for P-only control.
9: Consider the following Bode plot for a system under PI control.
b. How much can the controller gain be increased if a gain margin of 2 is desired?
c. How much can the deadtime increase before the system goes unstable?
[ Team LiB ]
[ Team LiB ]
After studying this chapter, the reader should be able to do the following:
Design internal model controllers for stable processes (either minimum or nonminimum
phase)
8.12 Summary
[ Team LiB ]
[ Team LiB ]
Consider the stirred-tank heater control problem shown in Figure 8-1. We can use a model of the
process to decide the heat flow (Q) that needs to be added to the process to obtain a desired
temperature (T) trajectory, specified by the setpoint (Tsp). A simple steady-state energy balance
provides the steady-state heat flow needed to obtain a new steady-state temperature, for
example. By using a dynamic model, we can also find the time-dependent heat profile needed to
yield a particular time-dependent temperature profile.
Assume that the chemical process is represented by a linear transfer function model, and that it is
open-loop stable. The input-output relationship is shown in Figure 8-2, where u is the input
variable (heat flow) and y is the output variable (temperature).
When the process is at steady state, and there are no disturbances, then the inputs and outputs
are zero (since we are using deviation variables). Consider a desired change in the output y; we
refer to the desired value of y as the setpoint, which is represented by r. We wish to design an
open-loop controller, q(s), so that the relationship between r(s) and y(s) has desirable dynamic
characteristics (fast response without much overshoot, no offset, etc.). The open-loop control
system is shown in Figure 8-3 (we may also wish to think of this as a feed-forward controller,
based on setpoint). We use q(s) to represent the open-loop controller transfer function, to
emphasize that it is a different type of controller than the feedback controllers of Chapters 5 and
6.
Using block diagram analysis, we find the following relationship between the setpoint and the
output
Equation 8.1
To obtain a desirable response, kq = 1/kp; offset will result otherwise. We can see this from the
final-value theorem. Consider a step setpoint change, of magnitude R.
Equation 8.2
and for no offset, we require that kq = 1/kp. We can also find the time-domain solution to
Equation (8.2)
Again, we can see that kq = 1/kp is necessary for offset-free performance. Notice also that the
speed of response is the same as the time constant of the open-loop process. In order to "speed
up" the response, we must use a dynamic control law, as developed in the next section.
Equation 8.3
That is, we have perfect control, since the output perfectly tracks the setpoint! For a first-order
process, the controller is
Equation 8.4
Here we use the inverse Laplace transform to solve Equation (8.4) for u(t), when there is a step
change in r.
where d(t) is the impulse function, which has infinite height, infinitesimal width, and unit area.
Since this is hard to understand conceptually, you probably realize that it is impossible to
implement exactly. Think about how you would approximate it.
The Bottom Line. Equation (8.4) is representative of a controller that is not physically
realizable. Notice that the equation has a numerator polynomial, but not a denominator
polynomial. We can state the following general result.
Physical Realizability. For a controller to be physically realizable, the order of the denominator
of the controller transfer function [q(s)] must be at least as great as the order of the numerator.
Definition. A transfer function that satisfies this condition is proper. If the order of the
denominator is greater than the order of the numerator, then the transfer function is strictly
proper. If the order of the numerator is equal to the order of the denominator, then the transfer
function is often called semiproper.
[ Team LiB ]
[ Team LiB ]
Equation 8.5
where l is a filter tuning parameter that has units of time. We see shortly that we can think of l
as a desired time constant for the output response; if a faster response is desired, then l is
decreased. Now, let the controller be designed in the following fashion to make q(s) proper.
Equation 8.6
Equation 8.7
Equation (8.7) is a lead/lag controller. Since the order of the denominator is at least as great as
the order of the numerator, the design is physically realizable. The response of the output
variable, y, is
Equation 8.8
in this case,
Equation 8.9
That is, there will be a first-order response with a time constant of l. Contrast this with the static
control law [q(s) = kq = 1/kp], which will yield a first-order response with a time constant of tp.
As long as l < tp, the dynamic controller will have a faster response than the static controller.
Equation 8.10
Notice that this is a lead/lag controller. For a step setpoint change of magnitude R,
Equation 8.11
Equation 8.12
Equation 8.13
Figure 8-4 is a plot of y(t) and u(t), as a function of as a function of l, for a process with tp = 10
minutes and kp = 1 %/%. Notice that the manipulated input action occurs immediately at the
time of the setpoint change. You should show that the magnitude is consistent with the time-
domain solution [Equation (8.12)], and with the Laplace domain solution [Equation (8.11)] using
the initial value theorem.
Figure 8-4. Response to step setpoint change, as a function of l, for a
first-order process with a time constant of 10 minutes.
Question 8.2.1: Can the process model inverse always be used for controller design?
Equation 8.14
where b is a positive real number, indicating a positive zero (yielding inverse response) in the
process transfer function. If we use the previous design procedure for a dynamic open-loop
controller, we find
Equation 8.15
Equation 8.16
Notice that the zeros of the process model become the poles of the controller, when the model
inverse is used for control-system design. This creates an unstable controller and the possibility of
unbounded, manipulated variable action. Therefore, if a process has a RHP zero, this zero must
be factored out before using the model inverse for the controller design.
Answer 8.2.1: The process model cannot simply be inverted to form the controller. It must be
factored so that the resulting controller is stable and realizable.
Look at Equation (8.16). If we simply take out the unstable pole, we have
Equation 8.17
Notice that this is not acceptable, because q(s) is not proper. To make it proper, we can simply
increase the order of the filter.
Equation 8.18
where we have used a second-order filter, f(s) = 1/(ls + 1)2, for the controller design. What kind
of output response will be achieved?
Equation 8.19
Notice that the output will exhibit an inverse response when there is a step setpoint change.
This is an important result—process inverse response behavior cannot be removed by any stable
control system.
Compare the responses (input and output) under open-loop control, for the two cases: (i) when
the RHP pole is removed from the controller and (ii) when the RHP pole is not removed from the
controller (i.e., the controller is unstable)
(i) When the unstable controller pole is removed, we have from Equation (8.18)
For a unit step change in setpoint, the output and manipulated variable responses are shown in
Figure 8-5 for l = 5 minutes. Notice that the inverse response appears in the output variable, and
that the manipulated input changes immediately when the setpoint change is made. The reader
should be able to show that the manipulated input change is consistent with that predicted by the
initial value theorem.
Equation 8.20
which is an unstable controller. This controller yields the manipulated variable response
Equation 8.21
Equation 8.22
The output and manipulated variable responses are shown in Figure 8-6 for l = 5 minutes. Notice
that the inverse response does not appear in the output variable, but the manipulated variable is
unbounded (unstable). This is often called internal instability.
Figure 8-6. Unit step setpoint response with unstable controller (note
scale of response).
This last example illustrated an important point that is not often mentioned in textbooks. If only
the process output is calculated or plotted, then the engineer may overlook the fact that a
manipulated variable is becoming unbounded. Good output performance does not ensure feasible
manipulated variable action.
When designing the open-loop control system of Figure 8-3, it is critical that both the controller
and the process be stable. If the process is unstable, an open-loop controller cannot be used. The
proper control-system design procedure for open-loop unstable systems is covered in Chapter 9.
[ Team LiB ]
[ Team LiB ]
First of all, we have been using the inverse of the process transfer function, gp(s), in our control
law. We must realize that the actual process transfer function is never known exactly. We now
use two transfer function representations of the process. One is considered the process
(sometimes we use the term plant), which is never known exactly. The other is considered the
process model, which we do know exactly.
Equation 8.23
Equation 8.24
Recall that when the process had a RHP zero, we performed a factorization, so that the RHP zero
did not form a RHP pole in the controller. In general, we factor the process model in the following
fashion,
Equation 8.25
where contains the invertible elements and contains the noninvertible elements. One
easy way to remember this is to recall that if RHP zeros are "inverted" (the RHP is the positive
side of the complex plane), they become RHP poles, which are unstable.
Answer 8.3.1: The reader should verify that dead time is not invertible. If there is dead time in
the process, it cannot be removed by any physically realizable controller.
Our controller design will consist of inverting the invertible part of the process model and
cascading this with a filter that is of high enough order to make the controller proper.
Equation 8.26
In the next section, we see that there are a number of ways to factor the same transfer function
into invertible and noninvertible parts.
Controller Factorization
There are a number of ways to factor the same transfer function,
The most common method, known as an all-pass factorization, is shown as method 2 in the
example below. The reason for the term all-pass was illustrated in Chapter 7, frequency-response
techniques.
Equation 8.27
where is positive.
The simple factorization approach is to simply place the RHP zeros in the noninvertible part of the
process model .
Equation 8.28
The all-pass factorization places the RHP zero in the noninvertible part of the process model, but
it also places a pole at the reflection of the RHP zero:
Equation 8.29
Generally, Method 2 (all-pass) is used because the resulting controlled system minimizes the
integral squared error (ISE).
Method 1
Equation 8.30
Equation 8.31
Equation 8.32
Method 2
Equation 8.33
Again, since y(s) = q(s) gp(s) r(s),
Equation 8.34
Equation 8.35
which is slightly different from the response shown in Equation (8.32). The responses will be
equivalent only if we set l = b (and there is generally no reason to do that).
The controller design procedure has been generalized to the following steps.
2. Invert the invertible portion of the process model (the "good stuff") and cascade with a filter
that makes the controller q(s) proper.
The factorization is used only for control-system design. The actual model still contains the RHP
zeros and time delays.
Remember that the factorization was performed so that the controller would be stable. For linear
systems, if the controller is stable and the process is stable, then the overall controlled system is
stable. This is true simply because if two transfer functions are stable, then the transfer functions
cascaded together (multiplied) are stable. This is a nice result because in a standard feedback
control formulation, the controller and the process can each be stable, yet the feedback system
may be unstable.
[ Team LiB ]
[ Team LiB ]
There are no noninvertible elements, so the control design procedure results in the following:
Notice that the response will be second order with numerator dynamics if the model is not perfect.
Also, there will be offset when there is a step change in setpoint.
Consider the following numerical example, where the model gain and time constant are 1 %/%
and 10 minutes, respectively, but where the actual process has a gain of 1.2 %/% and a time
constant of 8 minutes. If the tuning parameter, l = 4 minutes, the relationship between the
setpoint and the output is
Whereas the response with a perfect model would be y(s) = r(s)/(4s+1). The response with
model uncertainty is compared with the perfect model response in Figure 8-7 for a unit step
change in setpoint. The manipulated input value is the same whether the process model is perfect
or in error, since there is no feedback from the measured output to correct for this error.
Some form of feedback is needed to correct for model uncertainty (as well as any disturbances
entering the process). The method that we develop to account for model uncertainty and
disturbances is known as internal model control (IMC). In the next section, we begin to develop
the IMC structure.
[ Team LiB ]
[ Team LiB ]
We now consider a process model that receives the same manipulated variable signal as the
actual process (Figure 8-8). We can now subtract the difference between the process output
(actually measured) and the process model output (model predicted) to determine the model
error. This is shown in Figure 8-9. We must also realize that disturbances can enter the system,
as shown in Figure 8-10.
Figure 8-11 is also known as the IMC structure, which is discussed in depth in the next sections.
[ Team LiB ]
[ Team LiB ]
The IMC design procedure is exactly that of the open-loop "control" design procedure developed
in Section 8.3. Remember that a factorization of the process model was performed so that the
resulting controller would be stable. If the controller is stable and the process is stable, then the
overall controlled system is stable. This is true simply because if two transfer functions are stable,
then the transfer functions cascaded together (multiplied) are stable. This is a nice result because
in a standard feedback control formulation, the controller and the process can each be stable, yet
the feedback system may be unstable. The restriction of this design procedure is that the process
must be stable. An extension to unstable processes is covered in the Chapter 9.
Although the IMC design procedure is identical to the open-loop "control" design procedure, the
implementation of IMC results in a feedback system. Thus, IMC is able to compensate for
disturbances and model uncertainty, while open-loop "control" is not. Note that the internal model
controller must be detuned to assure stability if there is model uncertainty.
[ Team LiB ]
[ Team LiB ]
Figure 8-13. The IMC strategy. The dotted line indicates the
calculations performed by the model-based controller.
A list of transfer function variables shown in the IMC block diagram are given below.
d(s)= disturbance
estimated disturbance
=
gp(s)= process
process model
=
r(s)= setpoint
= model output
Equation 8.36
Equation 8.37
If the model is perfect and there are no disturbances (d(s) = 0), then the feedback
signal is zero. The relationship between r(s) and y(s) is then
Equation 8.38
Notice that this is the same relationship that we get for an open-loop control system design.
Why is this nice? If the controller, q(s), is stable and the process, gp(s), is stable, then the closed-
loop system is stable. We developed a design procedure that yields a stable, physically realizable
controller in Section 8.3.
Recall that a standard feedback controller could actually destabilize a process if we did not
correctly choose the tuning parameters. An analysis of the poles of the closed-loop transfer
function must be performed to determine the stability of standard feedback controllers.
If the model is perfect and there is a disturbance, then the feedback signal is
This illustrates that feedback is needed because of unmeasured disturbances entering a process.
Unmeasured disturbances
Model uncertainty
The primary disadvantage of IMC is that it does not guarantee stability of open-loop unstable
systems. The procedure detailed in Chapter 9 handles these systems.
[ Team LiB ]
[ Team LiB ]
1. Factor the process model into invertible ("good stuff") and noninvertible ("bad stuff"—time
delays and RHP zeros) elements (generally, an all-pass factorization will be used).
Equation 8.39
2. Form the idealized IMC controller. The ideal internal model controller is the inverse of the
invertible portion of the process model ("good stuff").
Equation 8.40
3. Add a filter to make the controller proper. A transfer function is proper if the order of the
denominator polynomial is at least as high as the numerator polynomial.
Equation 8.41
If it is most desirable to track step setpoint changes, the filter transfer function usually has
the form
Equation 8.42
and n is chosen to make the controller proper (or semiproper). If it is most desirable to track
ramp setpoint changes (often used for batch reactors or transition control problems), then
4. Adjust the filter-tuning parameter to vary the speed of response of the closed-loop system.
If the l is "small," the closed loop system is "fast," if l is "large," the closed-loop system is
more robust (insensitive to model error).
The student should note that the factorization performed in Equation (8.39) is used only for
controller design. The process model that is simulated in parallel with the process is still the full
model, .
If the process model is perfect, then we can easily calculate what the output response to a
setpoint change will be. Substituting Equation (8.40) into Equation (8.38), we find
Equation 8.43
Equation 8.44
Equation 8.45
which yields
Equation 8.46
Equation (8.46) indicates that the bad stuff must appear in the output response. That is, if the
open-loop process has a RHP zero (inverse response), then the closed-loop system must exhibit
inverse response. Also, if the process has dead time, then dead time must appear in the closed-
loop response. Please remember that Equation (8.46) only holds for the case of a perfect model.
The most common process model is a first-order plus time-delay transfer function. The design
procedure for this system is shown in the next example.
Example 8.5: First-Order + Dead Time Process
Consider a first-order + time-delay model:
Using the four-step design procedure, first factor out the noninvertible elements,
Once again, the controller is of lead-lag form. Finally, adjust l for response speed and robustness.
The closed-loop response (assuming a perfect model) to a setpoint change is
Numerical Example
Consider a first-order + time-delay process with a time constant of 10 seconds, a time delay of 5
seconds, and a gain of 1%/%. The output and manipulated variable responses for various values
of l are shown in Figure 8-14.
Figure 8-14. Response as a function of l for IMC of a first-order +
time-delay process.
Notice that the IMC procedure has effectively "compensated" for the time delay. The time delay
was not removed, but the controller does not "expect" results from a manipulated variable move
until "after" the time delay because the model is integrated "in-parallel" with the process.
The output and manipulated responses for a step setpoint change is shown in Figure 8-15 as a
function of l. Notice that as l is decreased, the inverse response becomes more pronounced—the
inverse response can not be removed by a stable controller.
We have shown how to factor models with time delays and RHP zeros and have used several
examples to illustrate the effect of the tuning parameter (or filter time constant), l, on the output
response to setpoint changes if the model is perfect. The IMC design procedure is identical to the
open-loop control design procedure presented in Section 8.3. Although the control-system design
procedure is the same, the implementation of IMC is much different, since it incorporates
feedback to compensate for model uncertainty or disturbances.
[ Team LiB ]
[ Team LiB ]
We can see immediately that if the model is perfect , then we have the open-loop
"control" formulation. When the model is not perfect, then the closed-loop response is much more
complicated and can even be unstable if the filter [f(s)] is not detuned sufficiently.
Disturbance Rejection
Consider a disturbance only; then
Equation 8.47
Indeed, often the load disturbance is really a disturbance to the process input, so the disturbance
transfer function has dynamic behavior similar to the process transfer function. It turns out that a
controller that is tightly tuned and works well for setpoint changes may fail miserably on handling
disturbance rejection. This is shown by the following example.
Disturbance rejection results are shown in Figure 8-17. Notice that there is a very slow response
to the step load disturbance. This result is perhaps the greatest criticism of the standard IMC
design procedure; it tends to lead to slow responses to load disturbances that occur at the
process input. An improved IMC procedure for disturbance rejection is presented in the next
section.
Equation 8.48
where g is selected to achieve good disturbance rejection. In practice, g will be selected to cancel a
slow disturbance time constant. Consider the closed-loop transfer function for disturbance
rejection
Equation 8.49
Equation 8.50
Equation 8.51
Although it is hard to tell from this general expression, g should be selected to cancel the slow
time constant associated with gd(s). This is shown by way of an example for a first-order process.
Assuming a perfect model and load disturbance transfer function equal to the process transfer
function, Equation (8.52) becomes
If we select l2/(2l - g) to cancel the process model time constant, ,we find
Numerical Example
Here we consider again the first-order process model transfer function from Example 8.7,
and assume that the disturbance transfer function is equal to the process transfer function (this is
equivalent to assuming that the load disturbance occurs at the process input).
which leads to the closed-loop results for a unit step disturbance, shown in Figure 8-18.
[ Team LiB ]
[ Team LiB ]
The IMC block diagram for the case where the actual manipulated variable value that is
implemented on the process is also used by the model is shown in Figure 8-20. Integral "wind-up"
will not be a problem with this implementation. Figure 8-21 shows an IMC implementation where
the manipulated variable value implemented on the process is constrained, while the process
model uses the unconstrained value. Integral wind-up may be a problem in this case. It is very
important when implementing IMC to use the actual manipulated input to the model in the control
law.
8.12 Summary
The IMC design procedure is exactly the same as the open-loop control design procedure. Unlike
open-loop control, the IMC structure compensates for disturbances and model uncertainty. The
IMC tuning (filter) factor, l, is used to detune for model uncertainty. It should be noted that the
standard IMC design procedure is focused on setpoint responses, but good setpoint responses do
not guarantee good disturbance rejection, particularly for disturbances that occur at process
inputs. A modification of the IMC design procedure was developed to improve input disturbance
rejection. Tolerance of model uncertainty is called robustness and was discussed in more detail in
Chapter 7.
Like open-loop control, the disadvantage compared with standard feedback control is that IMC
does not handle integrating or open-loop unstable systems. In Chapter 9, we develop a
procedure, based on IMC, to form a standard feedback control system that can handle open-loop
unstable systems. We call this IMC-based PID.
Terms
All-pass: Property of a transfer function (detailed in Chapter 7).
Factorization: Factoring a transfer function into invertible (good stuff) and noninvertible (bad
stuff) portions.
Proper: A transfer function is proper if the order of the denominator is at least as great as
the order of the numerator. If they are exactly the same order, the transfer function is
semiproper. If the order of the denominator is greater than the numerator, the transfer
function is strictly proper.
2. Factor the process model into invertible (good) and noninvertible (bad) portions,
3.
usually using an all-pass factorization.
3. Invert the invertible portion of the process model (the good stuff) and cascade with a filter
that makes the controller q(s) proper.
For a focus on step setpoint changes, the following form is often used:
Although not discussed in detail in the chapter, for good tracking of ramp setpoint changes,
the following form for the filter should be used:
For good rejection of step input load disturbances, the form used is
4. Implement in the form of Figure 8-20 to handle constraints on the manipulated input.
[ Team LiB ]
[ Team LiB ]
References
The improved IMC disturbance rejection procedure was suggested by Braatz and co-workers:
Horn, I. G., J. A. Arulandu, C. J. Gombas, J. G. VanAntwerp, and R. D. Braatz, "Improved Filter
Design in Internal Model Control," Ind. Eng. Chem. Res., 35(10), 3437–3441 (1996).
A complete IMC design procedure is presented in the following: Morari, M., and E. Zafiriou, Robust
Process Control, Prentice-Hall, Upper Saddle River, NJ (1989).
[ Team LiB ]
[ Team LiB ]
Student Exercises
Problems 1–5 require analytical solutions, Problems 6 and 8 are SIMULINK problems.
Assume that the all-pass factorization technique is used. Assuming the model is perfect,
sketch the transient response of y(t) to a step setpoint change in r(t).
2: Consider the following IMC block diagram. Find the closed-loop transfer functions
relating the load [l(s)] and the setpoint [r(s)] to the output [y(s)]. Assume that the
model is not perfect.
3: A biochemical reactor with several components has the following linearized model, which
relates the biomass concentration to the dilution rate:
a. Design an IMC, q(s), for this process, assuming that (i) an all-pass filter is used,
and (ii) the controller is strictly proper (order of the denominator is greater than
b.
a.
b. Qualitatively sketch the type of closed-loop response to a setpoint change that you
would expect if the model is perfect.
4: A process has the following relationship between the input and output:
Design an IMC controller for this process. Let q(s) be semiproper (order of denominator
is equal to the order of numerator) and use an all-pass factorization. Find the closed-
loop transfer function assuming a perfect model. Sketch the closed-loop response to a
step setpoint change.
5: Consider the closed-loop response for IMC when the model is not perfect. Show that
there is no offset for a setpoint change for the following process model and actual
process transfer functions. Also, find the minimum value of l that assures closed-loop
stability for this system.
a. For this part, do not factor out the right-half-plane zero to form the controller.
Perform simulations to show that the manipulated variable grows unbounded when
a step setpoint change is made, although good performance of the output is
achieved.
For the following parts, assume that the "all-pass" factorization technique is used.
b. Assuming the model is perfect, plot the transient response of y(t) to a unit step
setpoint change in r(t) as a function of l. (Show your control loop diagram.)
d. Show how gain uncertainty degrades the closed-loop performance (show several
curves on one plot) and show how the sensitivity depends on the filter time
e.
d.
constant, l.
e. Now, assume that there is no setpoint change but that there is a step disturbance.
Assume that the disturbance transfer function is equal to the process transfer
function. Compare and contrast the response of the output with the open-loop
control response.
For the following parts, assume that the all-pass factorization technique is not used.
f. Assuming the model is perfect, plot the transient response of y(t) to a unit step
setpoint change in r(t) as a function of l. (Show your control loop diagram.)
h. Show how gain uncertainty degrades the closed-loop performance (show several
curves on one plot) and show how the sensitivity depends on the filter time
constant, l.
i. Now, assume that there is no setpoint change, but that there is a step disturbance.
Assume that the disturbance transfer function is equal to the process transfer
function. Compare and contrast the response of the output with the open-loop
control response.
7: Packed-bed reactors often exhibit "wrong way" (inverse response) behavior. You are
responsible for the control-system design for a packed-bed reactor that has the
following step response behavior, where a step decrease in steam valve position was
made at t = 5 minutes.
You have developed the following process model (the time unit is minutes):
a. What are the units for the process gain?
b. Design an IMC for this process. Use the all-pass factorization for the RHP zero, and
assume that q(s) is semiproper (numerator order in s is equal to the denominator
order in s).
c. Assuming a perfect model, plot qualitatively how the temperature will respond to a
step setpoint change of 1°C.
d. It is desirable to make certain that the control valve position, immediately after a
10°C setpoint change, does not move more than 25%. What is the smallest value
of l that you can use? Show your work.
8: Consider the following isothermal chemical reactor, where the dilution rate (feed flow
rate per unit volume of reactor) is manipulated to achieve a desired concentration of
product.
which has a RHP zero (inverse response) and a time delay (due to the concentration
measurement device).
a. For this part, do not factor out the RHP zero to form the controller. Perform
simulations to show that the manipulated variable grows unbounded when a step
setpoint change is made, although good performance of the output is achieved.
For the following parts, assume that the all-pass factorization technique is used.
b.
b. Assuming the model is perfect, plot the transient response of y(t) to a unit step
setpoint change in r(t) as a function of l. (Show your control loop diagram.)
d. Show how gain uncertainty degrades the closed-loop performance (show several
curves on one plot) and show how the sensitivity depends on the filter time
constant, l.
e. Now, assume that there is no setpoint change but that there is a step disturbance.
Assume that the disturbance transfer function is equal to the process transfer
function. Compare and contrast the response of the output with the open-loop
control response.
For the following parts, assume that the all-pass factorization technique is not used.
f. Assuming the model is perfect, plot the transient response of y(t) to a unit step
setpoint change in r(t) as a function of l. (Show your control loop diagram.)
h. Show how gain uncertainty degrades the closed-loop performance (show several
curves on one plot) and show how the sensitivity depends on the filter time
constant, l.
i. Now, assume that there is no setpoint change but that there is a step disturbance.
Assume that the disturbance transfer function is equal to the process transfer
function. Compare and contrast the response of the output with the open-loop
control response.
[ Team LiB ]
[ Team LiB ]
and we find
or
which can be written
[ Team LiB ]
[ Team LiB ]
After studying this chapter, the reader should be able to do the following:
Design an internal model controller, then find the equivalent feedback controller (IMC-based
PID) in standard form; derive and use the results presented in Table 9-1
Use an approximation for time delays in order to find a PID-type control law; compare the
performance of various IMC-based PID controllers for time-delay processes; use Table 9-2
9.1 Background
9.7 Summary
[ Team LiB ]
[ Team LiB ]
9.1 Background
As we show in this chapter, the IMC structure can be rearranged to the standard feedback
structure.
Question: Why do we care about IMC, if we can show that it can be rearranged into the standard
feedback (PID) structure?
Answer: Because the process model is explicitly used in the control-system design procedure.
The standard feedback structure uses the process model in an implicit fashion; that is, PID tuning
parameters are often "tweaked" based on a transfer function model, but it is not always clear how
the process model affects the tuning decision. In the IMC formulation, the controller, q(s), is
based directly on the "good" part of the process transfer function. The IMC formulation generally
results in only one tuning parameter, the closed-loop time constant (l, the IMC filter factor). The
IMC-based PID tuning parameters are then a function of this closed-loop time constant. The
selection of the closed-loop time constant is directly related to the robustness (sensitivity to
model error) of the closed-loop system. Also, for open-loop unstable processes, it is necessary to
implement the IMC strategy in standard feedback form, because the IMC suffers internal stability
problems.
The reader should realize that the IMC-based PID controller presented in this chapter will not give
the same results as the IMC strategy when there are process time delays, because the IMC-based
PID procedure uses an approximation for dead time, while the IMC strategy uses the exact
representation for dead time.
[ Team LiB ]
[ Team LiB ]
Figure 9-4. Inner loop of the rearranged IMC structure shown in Figure
9-3.
Notice that r(s) – y(s) is simply the error term used by a standard feedback controller. Therefore,
we have found that the IMC structure can be rearranged to the feedback control (FBC) structure,
as shown in Figure 9-6. This reformulation is advantageous because we find that a PID controller
often results when the IMC design procedure is used. Also, the standard IMC block diagram
cannot be used for unstable systems, so this feedback form must be used for those cases.
Equation 9.1
We refer to Equation (9.1) as the IMC-based PID relationship because the form of gc(s) is often
that of a PID controller. The IMC-based PID procedure is similar to the IMC procedure of the
previous chapter, with some additional steps. One major difference is that the IMC-based
procedure will, many times, not require that the controller be proper. Also, the process dead time
will be approximated using the Padé procedure, in order to arrive at an equivalent PID-type
controller. Because of the Padé approximation for dead time, the IMC-based PID controller may
not perform as well as IMC for processes with significant time delays.
1. Find the IMC controller transfer function, q(s), which includes a filter, f(s), to make q(s)
semiproper or to give it derivative action [the order of the numerator of q(s) is one order
greater that the denominator of q(s)]. Notice that this is a major difference from the IMC
procedure. Here, we may allow q(s) to be improper, in order to find an equivalent PID
controller. For integrating or unstable processes, or for better disturbance rejection, a filter
with the following form will often be used
Equation 9.1
Write this in the form of a ratio between two polynomials.
3. Show this in PID form and find kc, tI, tD. Sometimes this procedure results in an ideal PID
controller cascaded with a first-order filter, with a filter time constant (tF):
Equation 9.2
4. Perform closed-loop simulations for both the perfect model case and cases with model
mismatch. Adjust l considering a tradeoff between performance and robustness (sensitivity
to model error). Initial values for l will generally be around 1/3 to 1/2 the dominant time
constant.
[ Team LiB ]
[ Team LiB ]
Step 1. Find the IMC controller transfer function, q(s), which includes a filter to make q(s)
semiproper.
Equation 9.3
Step 2. Find the equivalent standard feedback controller using the transformation
Equation 9.4
Step 3. Rearrange Equation (9.4) to fit the form of Equation (9.5), to find how the model
parameters and l are related to the PI controller parameters. Multiplying Equation (9.4) by
tp/tp, we find
Equation 9.6
Equating terms in Equations (9.5) and (9.6), we find the following values for the PI tuning
parameters
Equation 9.7
The IMC-based PID design procedure for a first-order process has resulted in a PI control law. The
major difference is that there are no longer two degrees of freedom in the tuning parameters (kc,
tI)—the IMC-based procedure shows that only the proportional gain needs to be adjusted. The
integral time is simply set equal to the process time constant. Notice that the proportional gain is
inversely related to l, which makes sense. If l is small (closed loop is "fast"), the controller gain
must be large. Similarly, if l is large (closed loop is "slow"), the controller gain must be small.
Also notice that the same results were obtained using the direct synthesis method—a specified
first-order closed-loop response for a first-order process leads to a PI controller with the
parameter values shown in Equation (9.7).
This procedure can be used to develop the equivalent PID (plus lag, in some cases) controller for
a number of other transfer functions, as shown in Table 9-1. In the next example, we derive the
PID controller for a second-order process.
Step 1. Find the IMC controller transfer function, q(s)—here we allow q(s) to be improper
because we wish to end up with an ideal PID controller.
Equation 9.8
Step 2. Find the equivalent standard feedback controller using the transformation
Equation 9.9
Equation 9.10
Step 3. Rearrange Equation (9.9) to fit the form of Equation (9.10), to find how the model
parameters and l are related to the PID controller parameters. Multiplying Equation (9.9)
by (t1 + t2)/(t1 + t2), we find
Equation 9.11
Equating terms in Equations (9.10) and (9.11), we find the following relationships:
The IMC-based PID controllers for first- and second-order processes, as designed above, have
good setpoint tracking characteristics. Although setpoint tracking may be quite good, disturbance
rejection can be poor, particularly for input disturbances. Next, we apply the IMC-based PID
procedure to develop good disturbance rejection.
Equation 9.12
For a first-order process and an input disturbance, in Chapter 8 (Example 8.8), we found that the
internal model controller
and
Integrating Processes
For integrating processes, a filter with the following form is used:
The reader should be able to derive the controllers shown in elements I and K of Table 9-1.
Notice that Table 9-1 is for process transfer functions that do not have a time delay. The following
section develops PID tuning relationships for a first-order + time-delay process.
[ Team LiB ]
[ Team LiB ]
Equation 9.13
Equation 9.14
Step 2. Factor out the noninvertible elements (this time do not make the bad part all-
pass),
Equation 9.15
Step 3. Form the idealized controller,
Equation 9.16
Step 4. Add the filter—this time we will not make q(s) proper because a PID controller will
not result. We use the "derivative" option, where we allow the numerator of q(s) to be one
order higher than the denominator (NOTE: This is done only so that we will obtain an ideal
PID controller).
Equation 9.17
Equation 9.18
Equation 9.19
We can multiply Equation (9.19) by (t p + 0.5)/(q/tp + 0.5q) to find the PID parameters
Equation 9.20
The IMC-based PID controller design procedure has resulted in a PID controller, when the process
is first-order + dead time. Remember that a Padé approximation for dead time was used in this
development, meaning that the filter factor (l) cannot be made arbitrarily small; therefore, there
will be performance limitations to the IMC-based PID strategy that do not occur in the IMC
strategy. Rivera et al. (1986) recommend that l > 0.8q because of the model uncertainty due to
the Padé approximation.
In Example 9.3 the all-pass formulation was not used. The reader should show that the use of an
all-pass in the factorization will lead to a PID controller in series with a first-order lag. The
parameters, in this case, are shown as the first entry in Table 9-2. Morari and Zafiriou (1989)
recommend l > 0.25q for the PID + lag formulation. The third and fourth entries neglect the time
delay in forming the PI controller.
Different assumptions are used to derive the PI and PID controllers shown in Table 9-2. A zeroth-
order Padé approximation leads to a PI controller while a first-order Padé approximation leads to
PID + lag (when an all-pass filter is used) and PID (when the all-pass is not used) controllers.
Generally, the PID + lag controller will be easier to tune for robustness and will certainly be less
sensitive to noise than the PID controller. The PID + filter perfomance is almost identical to the
"pure" IMC. This shows that the powerful IMC framework can be used to design PID-type
controllers that can be implemented in industrial processes using existing (PID) control
equipment.
Equation 9.21
Here, assume that a Taylor series approximation for dead time is used. Also, the special filter
form for integrating systems is used.
Using the IMC-based PID procedure,
the reader should show that a PI controller results with the following parameters:
Equation 9.22
Equation 9.23
Equation 9.24
[ Team LiB ]
[ Team LiB ]
We want this following point to be clear to the reader. For process transfer functions without time
delays, the IMC-based PID controller will yield exactly the same performance as does IMC. This
will occur if no approximation has to be made in the process model to find a feedback form that is
equivalent to PID. If an approximation (such as Padé) is made in the IMC-based PID strategy, and
this approximation is not made in the IMC strategy, then the performance will not be the same.
It should also be noted that although the standard IMC filter form, f(s) = 1/(ls + 1)n, leads to
good setpoint tracking, it generally does not lead to good rejection of disturbances that have
dynamics similar to the process transfer function. It is generally better to use a filter of the form
f(s) = (gs + 1)/(ls + 1)n.
Table 9-1 provides a summary of the PID tuning parameters for systems without a time delay.
Table 9-2 summarizes the PID tuning parameters for stable processes with a time delay. Notice
that there are minimum recommended values for l shown, since there is inherent model
uncertainty due to the Padé approximation. Selecting l near this value will put the closed-loop
system on the edge of stability, so most often your initial tuning values for l will be significantly
larger than these minimum values.
Table 9-1. Ideal PID Tuning Parameters for Open-Loop Stable and
Integrating Processes[a].
A tp
B[b]
C t1 + t2
D 2zt
E[c]. 2zt
gp(s) gCL (s) kc tI tD tF
F[c],[d] 2zt
G[d] 2zt
I[e] 2l
J t
K[e] 2l + t
[a]Parameters for other process transfer functions are given in Rivera et al. (1986) and Morari and Zafiriou
(1989)
[b]
The controller is designed for improved input disturbance rejection; . Notice that we desire g
> 0, which leads to l < 2tp.
[e]The controllers are designed for ramp setpoint changes. This also generally leads to better input
disturbance rejection.
gp(s) kc tI tD tF Notes[b]
A 1
B 2
C tp 3
gp(s) kc tI tD tF Notes[b]
D 4
E 2l + q 5
F 2l + q 6
G ke–qs 7
H ke–qs 8
[b]IMC-based PID is based on a first-order Padé approximation, unless otherwise noted. 1, With an all-pass
factorization and semiproper q(s) recommended l > 0.25q. 2, Without an all-pass factorization and
improper q(s); recommended l > 0.8q. 3, Time-delay neglected; recommended l > 1.7q. 4, Time-delay
neglected; effective time constant increased by 0.5q; recommended l > 1.7q. 5, Using a Taylor series
approximation for time delay (-qs + 1). 6, With an improper q(s). 7, Using a first order Padé approximation
for time delay. 8, Using a second order Padé approximation for time delay. In all cases it is recommended
that l > 0.2tp.
[ Team LiB ]
[ Team LiB ]
1. Find the IMC controller transfer function, q(s), which includes a filter, f(s), to make q(s)
semiproper. An additional requirement is that the value of f(s) at s = pu (where pu is an
unstable pole) must be 1. That is,
Morari and Zafiriou (1989) recommend a filter transfer function that has the form
where n is chosen to make q(s) proper (usually semiproper). A value of g is found that
satisfies the filter requirement f(s = pu) = 1.
3. Show this in PID form and find kc, tI, tD. Sometimes this procedure results in a PID
controller cascaded with a lag term (tF):
4. Perform closed-loop simulations for both the perfect model case and cases with model
mismatch. Choose the desired value for l as a tradeoff between performance and
robustness.
Equation 9.25
where tu is given a positive value. The pole, pu, is 1/tu, which is positive, indicating instability.
Equation 9.26
Note that we have selected a second-order polynomial filter to make the controller, q(s),
semiproper. Now we solve for g so that f(s = pu) = 1.
so
Equation 9.27
Step 2. Find the equivalent standard feedback controller using the transformation
After a lengthy bit of algebra,
Equation 9.28
Equation 9.29
As a numerical example, consider . The closed loop output responses for various
values of l are shown in Figure 9-7a, while the manipulated variable responses are shown in
Figure 9-7b. Notice that we do not achieve the nice overdamped-type of closed-loop output
responses that we were able to obtain with open-loop stable processes. The reader should show
that the closed-loop relationship for this system is
which has overshoot if g > l [this is always the case for this system; see Equation 9.27)].
In Figure 9-7 we notice that the closed-loop response had overshoot. A response to a setpoint
change, without overshoot, can be obtained by including a setpoint filter, as shown in Figure 9-8.
The setpoint filter is
Figure 9-7. Responses for a step setpoint change, for various values of
l. (a) Output; (b) manipulated input.
Figure 9-8. FBC with a setpoint filter.
The results for several unstable process transfer functions are shown in Table 9-3. See Rotstein
and Lewin (1991) for a discussion of the effect of dead time and model uncertainty on the control
of unstable processes.
[ Team LiB ]
[ Team LiB ]
9.7 Summary
We have shown how the IMC procedure can be used to design PID-type feedback controllers. If
the process has no time delay and the inputs do not hit a constraint, then the IMC-based PID
controllers will have the same performance as does IMC. If there is dead time, then the IMC-
based PID controllers will not perform as well as IMC because of the Padé approximation for
deadtime.
A g 1
B g + tp 1
C g 1, 2
It is interesting to note that the IMC-based PID controllers for all of the transfer functions shown
in Table 9-1 could have been designed using the direct synthesis method of Chapter 6. The key
issue in the direct synthesis method is the specification of the closed-loop response characteristic.
If the process has a RHP zero, then the specified closed-loop response must also have a RHP
zero. The IMC-based PID procedure provides a clear method for handling this. Also, note that the
standard IMC filter design results in good setpoint response performance, but other filter designs
must be used for good input disturbance rejection.
The IMC design method of Chapter 8 was modified to handle unstable processes. The standard
IMC structure cannot handle unstable processes, so the controller for an unstable process must
be implemented in standard PID feedback form.
For a good example application of the IMC-based PID procedure, work through Module 7 on
Biochemical Reactors.
1. Find the IMC controller transfer function, q(s), which includes a filter, f(s). The controller,
q(s), may be semiproper or even improper to give the resulting PID controller derivative
action. If a process model has a time delay, use an approximation, such as a first- or
second-order Padé.
For good setpoint tracking, a filter with the following form is generally used
For improved disturbance rejection, or for integrating and open-loop unstable processes, a
filter with the following form is used:
For disturbance rejection, g is selected so that the term inside the brackets cancels a slow
pole in the distubance transfer function [often gd(s) = gp(s) for input disturbances],
For unstable processes, a value of g is found that satisfies the filter requirement f(s = pu) =
1.
3. Show this in PID form and find kc, tI, tD. Sometimes this procedure results in an ideal PID
controller cascaded with a first-order filter, with a filter time constant (tF):
4. Perform closed-loop simulations for both the perfect model case and the cases with model
mismatch. Adjust the value of l on-line as a tradeoff between performance and robustness
(sensitivity to model error).
[ Team LiB ]
[ Team LiB ]
References
The following paper derives IMC-based PID controllers for "real PID" control: Chien, I.-L., and P.
S. Fruehauf, "Consider IMC Tuning to Improve Controller Performance," Chem. Eng. Prog.,
86(10), 33–41 (1990).
The IMC procedure is fully developed in the following monograph: Morari, M., and E. Zafiriou,
Robust Process Control, Prentice-Hall, Englewood Cliffs, NJ (1989).
Initial IMC-based tuning parameters were presented in the following paper: Rivera, D. E., M.
Morari, and S. Skogestad, "Internal Model Control. 4. PID Controller Design," Ind. Eng. Chem.
Proc. Des. Dev., 25, 252–265 (1986).
The following paper discusses the IMC-based tuning rules for open-loop unstable systems:
Rotstein, G. E., and D. R. Lewin, "Simple PI and PID Tuning for Open-Loop Unstable Systems,"
Ind. Eng. Chem. Res., 30, 1864–1869 (1991).
[ Team LiB ]
[ Team LiB ]
Student Exercises
Exercises 1, 19, and 20 are SIMULINK-based problems.
1: Use the IMC-based PID design procedure to find the PID controller for a second-order
transfer function
Hint: First design the IMC, assuming that you will allow the controller to be improper;
that is, the order of the numerator is one higher than the denominator. What order
filter do you find?
a. Find the PID parameters, kc, tI, tD, as a function of the process model
parameters, kp, t, z, and the filter factor, l.
b. For a perfect model, plot the closed-loop response of y to a step setpoint change
in r (as a function of l). (Show your control block diagram.)
2: Compare the response of the following first-order + time-delay process, using IMC and
IMC-based PID. Discuss the effect of l on the closed-loop stability for both systems.
Do you find that there is a minimum l required for the stability of the IMC-based PID
strategy? How does this relate to the recommendations in Table 9-2? Is there a
minimum l required for the stability of the IMC strategy?
3: In Example 9.3, the all-pass formulation was not used for the first-order + time-delay
process with a Padé approximation for dead time. Show that the use of an all-pass in
the factorization [and semi-proper q(s)] leads to a PID controller in series with a first
order lag.
b. Find the IMC-based PID controller (which must be cascaded with a first-order lag)
if an all-pass is used and the IMC controller, q(s), is semiproper.
and in a PI controller if .
6: The following process transfer function represents the relationship between boiler
feedwater flow rate and steam drum level:
a. Use the all-pass factorization method to show that the IMC-based PID controller
is PD with a first-order lag.
7: Use the IMC-based feedback controller design procedure to design a PID controller for
the following process.
Assume that the IMC filter is . Find kc, tI and tD—these will be a function
of the process parameters and l (show all work). What is the closed-loop transfer
function? Sketch the expected response of the output to a unit step setpoint change.
9: Consider Example 9.2, where q(s) was allowed to be improper. This yielded a PID
controller. Now assume that q(s) is forced to be proper (actually semiproper). Find the
resulting feedback controller. Elaborate on the control structure.
10: A stack gas scrubber has the following relationship between the fresh feedwater flow
rate and the SO2 concentration in the water leaving the scrubber:
Use the IMC-based PID procedure to find the PID controller (plus first-order lag) for
this process.
Hint: Let the IMC q(s) be semiproper (order of denominator = order of numerator).
Which controller tuning parameters does l affect?
11: Use the IMC-based feedback controller design procedure to design a PID-type
controller for the following process. Assume that q(s) is semiproper and tn > 0.
Find the PID tuning parameters (assuming ideal PID) as a function of the process
parameters and l (show all work). What is the closed-loop transfer function? Sketch
the expected response behavior.
12: Consider the closed-loop response for IMC when the model is not perfect. Show that
there is no offset for a setpoint change for the following model and process transfer
functions. Also, find the minimum value of l that assures closed-loop stability when
13: Show that the IMC strategy cannot be implemented on an unstable process and must
be implemented in standard feedback form.
14: A styrene polymerization reactor is operated at an open-loop unstable point and has
the following input-output model
Design the IMC-based PI controller for this system. Sketch the expected response for a
setpoint change.
a. Design the IMC-based PID controller for this system; that is, find kc, tI, and tD.
Show units for all parameters.
b. What is the closed-loop transfer function? Sketch the expected response for a
step setpoint change.
16: Derive g for the first three elements in Table 9-3. The value of the filter must be one at
the location of the unstable pole.
17: A reactor is operated at an open-loop unstable point and has the following input-output
model:
a. Design the IMC-based PID controller (perhaps with a lead-lag filter) for this
system, that is, find the tuning parameters.
b. What is the closed-loop transfer function? Sketch the expected response for a
step setpoint change.
The IMC-based PID controller (entry B in Table 9-3) can handle this process.
19: Consider a first-order + dead-time process with the following transfer function (use
this to represent the process in all analyses and simulations)
Now assume two different PI design procedures for this process: The model is first-
order + dead time with the known parameter values; and the model is integrator +
dead time where k = 1/10 = 0.1.
a.
a. For a small time delay (0.5 minutes), compare the performance of the two PI
control strategies for step setpoint changes. Discuss the effect of l. Also compare
the performance of the two PI control strategies for step input load disturbance
changes (let the load disturbance transfer function be equal to the process
transfer function). Discuss the effect of l.
b. For a larger time delay (5 minutes), compare the performance of the two PI
control strategies for step setpoint changes. Discuss the effect of l. Also compare
the performance of the two PI control strategies for step input load disturbance
changes (let the load disturbance transfer function be equal to the process
transfer function). Discuss the effect of l.
20: Consider a first-order + dead time process with the following transfer function (use
this to represent the process in all analysis and simulations):
Compare the setpoint performances of PI, improved PI, PID, and PID + filter tuning
rules from Table 9-2 (rows A–D). Discuss the effect of the closed-loop time constant,
l; for what values is unstable or poor performance obtained?
Use the IMC-based PID design procedure to find a PI controller. Assume that an all-
pass factorization is used for the RHP zero. Also, assume that q(s) is semiproper. Use
an IMC filter with the form
Find the proportional gain and integral time as a function of the model parameters (k,
b) and l.
[ Team LiB ]
[ Team LiB ]
Tune cascade controllers; tune the secondary loop first; then tune the primary controller
with the secondary loop closed
10.1 Background
10.11 Summary
[ Team LiB ]
[ Team LiB ]
10.1 Background
Thus far in this textbook we have emphasized control-system design for single input–single output
(SISO) processes; that is, processes with one output (measured) variable and one manipulated
variable. We have also focused on setpoint responses, primarily because it is then easier to tune a
feedback controller. In particular, it is easier to tune on-line for setpoint changes because we do
not know when a disturbance is going to enter a system. We have developed a number of control-
system design procedures that are based on a desired response to a setpoint change.
[ Team LiB ]
[ Team LiB ]
Figure 10-3. Cascade control block diagram for the fired heater. Series
transfer function form.
In this strategy, the temperature controller is known as the primary, master, or outer-loop
controller, while the flow controller is the secondary, slave, or inner-loop controller. The dynamics
of the flow control loop are very fast, making the flow controller easy to tune. The temperature-
control loop is much slower, so the primary loop can be effectively tuned as if the flow controller
response is instantaneous.
For cascade control strategies where flow control is the inner loop, a control block diagram where
the secondary and primary process transfer functions are in series (as in Figure 10-3) is natural.
The primary disturbance (process inlet temperature) directly affects the primary output (process
outlet temperature), with no direct effect on the secondary output (fuel gas flow rate, which is
also the manipulated input for the primary process). The secondary disturbance (fuel gas header
pressure) directly affects the secondary output, so the control block diagram shown in Figure 10-3
is relatively straightforward to generate. This is known as a series representation for the block
diagram that is useful when the "secondary" process (such as the control valve or fuel gas flow
rate) are naturally separated from the "primary" process (the heater and process fluid). It should
be noted that other primary disturbances, such as process fluid flow rate, could easily be added to
the diagram. See Exercise 9 for a numerical study of this process.
An example of the improved performance achievable with cascade control is shown in Figure 10-
4, where a 1-psig disturbance in fuel gas header pressure occurs at t = 0 minutes. In the
cascade-control strategy (Figure 10-2), the flow controller (secondary controller) rejects the
header pressure disturbance before it is even "felt" by the process outlet temperature, since there
is a primary process time-delay of one minute. The standard feedback controller (Figure 10-1)
has poor performance due to the process time delay. It should be noted that setpoint changes
and responses to a primary disturbance (process feed temperature) are the same for both control
strategies (see Exercise 9 for a numerical study).
In this strategy, the reactor temperature controller is the primary (master or outer loop)
controller, while the jacket temperature controller is the secondary (slave or inner loop)
controller. This is effective because the jacket temperature dynamics are normally significantly
faster than the reactor temperature dynamics. An inner-loop disturbance, such as jacket feed
temperature, will be "felt" by the jacket temperature before it has a significant effect on the
reactor temperature. This inner-loop (secondary) controller then adjusts the manipulated variable
before a substantial effect on the primary output has occurred.
Notice that an appropriate block diagram representation of cascade control is less obvious here.
Jacket flow rate certainly has a direct effect on the jacket temperature, which then affects the
reactor temperature; one would think that a series representation would again be appropriate.
Notice, however, that the jacket and reactor temperatures interact in a way that is different than
the primary and secondary processes of the fired heater. Here, the reactor and jacket
temperatures are directly coupled by the heat transfer between them. A change in the reactor
temperature causes a change in jacket temperature and vice versa; a simple input-output
transfer function block diagram does not truly capture this behavior. A more appropriate
representation is shown in Figure 10-7, where a state space model is used to represent the
interactions, and the temperatures are simply viewed as two outputs from the process. See
Exercise 10 for a numerical study of a similar stirred-tank heater problem.
[ Team LiB ]
[ Team LiB ]
We use the following algebraic manipulations to understand the effect of the secondary (inner-
loop) on the primary (or outer) loop. Notice that the secondary output can be written
Equation 10.1
Equation 10.2
Equation 10.3
After tuning the inner loop, we can use the following transfer function to design the outer-loop
controller.
Equation 10.4
Equation 10.5
where it is clear that the secondary closed-loop transfer function affects the primary control loop.
Notice that if the secondary control loop is much faster than the primary loop, so that gc2CL = 1
(on a relative time scale to the primary control loop), then the closed-loop transfer function for
the primary loop is
[ Team LiB ]
[ Team LiB ]
The inner-loop control system design can be based on IMC-based PID or any other procedure,
such as frequency-response gain and phase margins. Once the inner-loop is tuned, the effective
outer-loop transfer function can be used to tune the outer-loop controller. Again, any control
design procedure can be used.
Cascade control can be successfully used to reject secondary-process disturbances when the
primary process has a much larger time constant and a time delay or RHP zero while the
secondary process has a small time constant and little or no dead time or nonminimum-
phase (RHP zeros) behavior.
The most common cascade-control loop involves a flow controller as the inner loop. This
type of loop easily rejects disturbances in fluid stream pressure, either upstream or
downstream of the valve.
The inner loop (secondary, slave loop) in a cascade-control strategy should be tuned before
the outer loop (primary, master loop). After the inner loop is tuned, and closed, the outer
loop should be tuned using knowledge of the dynamics of the inner loop.
Cascade control is widely used on chemical processes, and should not be considered an
"advanced control strategy."
There is little or no advantage to using cascade control if the secondary process is not
significantly faster than the primary process dynamics. In particular, if there is much dead
time in the secondary process, or if there is an RHP zero, it is unlikely that cascade control
will be much better than standard feedback control.
Cascade control can be easily combined with other forms of control, such as feed-forward
control.
Any of your favorite methods can be used for tuning the inner and outer loops. Indeed, the
IMC strategy can be used on either or both of the inner and outer loops.
[ Team LiB ]
[ Team LiB ]
The internal model controller should be designed based on a model that includes the flow control
loop dynamics
The reader should also be able to develop a control block diagram for cascade control where both
the primary and secondary loops use IMC (see Exercise 12).
[ Team LiB ]
[ Team LiB ]
For this furnace example, the steady-state energy balance can be used to find the fuel gas flow
rate
where F = process stream flow rate, r = density, cp = heat capacity, T = desired outlet
temperature, Tf = feed temperature,
e = furnace efficiency, and DHc = heat of combustion of fuel
gas. A steady-state feed-forward controller computes the fuel gas flow rate based on the
measured process flow rate (and possibly the process feed temperature). Sometimes it is
important to also consider dynamic effects, as shown in several examples that follow.
or
Equation 10.6
Equation (10.6) is the closed-loop relationship for feed-forward/feedback control. Notice that a
(stable) feed-forward controller does not affect the closed-loop stability, since the feed-forward
controller transfer function does not appear in the closed-loop characteristic equation
(denominator polynomial).
[ Team LiB ]
[ Team LiB ]
Equation 10.7
In this expression all the transfer functions are determined for a particular system, except for the
feed-forward controller, gcf(s). Solving Equation (10.7) for gcf(s), we find
Equation 10.8
If we make the simplifying assumption that the disturbance measurement has no dynamics, then
Equation 10.9
Notice that Equation (10.9) requires the inverse of the process model. Clearly, there will be
problems if the process model has RHP zeros, or if the process time delay is greater than the
disturbance time delay. The use of Equation (10.9) as a feed-forward design equation is shown in
Examples 10.1–10.4.
Equation 10.10
The feed-forward control law, from Equations (10.9) and (10.10), is
Equation 10.11
which is simply a lead-lag controller. Most control systems have feed-forward controllers that are
of lead-lag form.
Numerical Example
Here we study the case where kd = kp = 1 and td = tp = 5 minutes. If we use the IMC-based PI
procedure for feedback control, we find that tI = 5 and kc = 2 for l = 2.5 minutes. We compare
the disturbance rejection of feedback-only with feed-forward/feedback control in Figure 10-14 for
a unit step change in the load disturbance at t = 0. The feed-forward controller is a static
controller with kcf = 1 for this case. Notice that the feed-forward controller implements an
immediate change in the manipulated input to counteract the disturbance.
Equation 10.12
Equation 10.13
which is simply a lead-lag feed-forward controller with a time delay. The main thing that we notice
about Equation (10.13) is that qd qp is required for the controller to be realizable. If qp > qd,
we cannot have a time-delay term in the feed-forward controller and must accept the fact that we
cannot have perfect feed-forward control, even if the models are perfect.
Equation 10.14
Equation 10.15
Since Equation (10.15) is improper, it is not physically realizable. We could simply add a first-
order filter, perhaps something like 1/(s + 1), to make the feed-forward controller second order
over second order. Perhaps the simplest thing to do is to make the numerator term first order.
Most likely, we would use 18s + 1 to approximate the numerator to arrive at the lead-lag
controller
Equation 10.16
Numerical Simulation
Assume that an IMC-based PID controller is used for feedback control. With l = 9, we find (from
Table 9-1) that kc = 1, tI = 18, and tD = 2.5. Figure 10-15 compares the closed-loop response of
the simplified feed-forward/feedback [Equation (10.16)] with feedback-only to a unit step change
in load disturbance at t = 0. Although the feed-forward/feedback control is not perfect, the
performance is substantially better than feedback only control. This performance is achieved by
the initial manipulated variable action that is characteristic of lead-lag feed-forward controllers
with a numerator lead time constant that is greater than the denominator lag time constant (see
the lead-lag transfer function behavior in Chapter 3).
Equation 10.17
The feed-forward controller is
Equation 10.18
Notice that Equation (10.18) has a RHP pole and is therefore unstable. We must factor RHP zeros
from the process transfer function before designing a feed-forward controller. In all likelihood, we
would neglect the dynamic part and use only a static feed-forward controller, as shown in
Equation (10.19) below.
Equation 10.19
This will get us the majority of the performance improvement over feedback-only control.
[ Team LiB ]
[ Team LiB ]
Equation 10.20
Again, noninvertible elements of qf(s) must be removed before the feed-forward controller can be
implemented.
The closed-loop transfer relationship (the derivation is left as an exercise for the reader) is
[ Team LiB ]
[ Team LiB ]
The feed-forward controller must be physically realizable and stable, as noted by the next
three items.
The disturbance time delay must be greater than the process time delay for perfect
feed-forward compensation. If the process time delay is greater than the disturbance
time delay, the feed-forward controller will have no time-delay compensation, and
perfect control cannot be achieved.
If the process has an RHP zero, it must be factored out before designing the feed-
forward controller. Otherwise, the feed-forward controller will be unstable.
If the process is higher order than the disturbance, fast time constants probably must
be neglected in designing the feed-forward controller.
Often a static feed-forward controller will have good performance, particularly if the
disturbance dynamics are the same timescale as the process dynamics.
A feed-forward controller does not change the closed-loop stability of the feedback system,
assuming the feed-forward controller is stable. Also, a feed-forward controller does not
change the setpoint response of a closed-loop system.
Feed-forward control can be implemented with either the classical feedback (PID-type) or
IMC structure.
[ Team LiB ]
[ Team LiB ]
Notice that each "mode" is used to reject a different type of disturbance. The feed-forward
controller is used to reject feed flow rate disturbances. The fuel gas flow controller is used to
reject disturbances in the fuel gas header pressure. The temperature controller plays a role in
compensating for all disturbances. See Exercise 19 for a numerical example.
A common process that combines feed-forward/feedback and cascade control is a steam drum.
See Module 9 for a case study of steam drum level control.
[ Team LiB ]
[ Team LiB ]
10.11 Summary
Disturbance rejection provides the motivation for cascade and feed-forward control. Cascade
control uses a secondary process measurement to detect and correct for a disturbance before it
affects the primary process output. Feed-forward control uses a direct measurement of the
disturbance to change the manipulated input before the disturbance affects the output. It is
common to combine feed-forward/feedback with cascade control, as shown in the furnace control
block diagram, Figure 10-17.
Although some texts refer to cascade and feed-forward control as "advanced control," these
techniques are commonly used in industry. Almost every control system that has a flow rate as a
manipulated variable will have a flow controller as an inner loop in a cascade strategy.
[ Team LiB ]
[ Team LiB ]
References
A number of feed-forward control examples are presented in the following sources:
Badavas, P.C., "Feedforward Methods for Process Control Systems," Chemical Engineering,
103–108 (October 15, 1984).
[ Team LiB ]
[ Team LiB ]
1: Derive the closed-loop transfer function relating the primary setpoint to the primary
process output for a cascade-control system.
3: For the following process, develop the double cascade-control loop diagram, where the
jacket flow controller is a "tertiary controller." Use the state space form similar to
Figure 10-6, where jacket flow rate is an input to the state space representation of the
reactor.
4: Consider the following instrumentation diagram for a chemical reactor. Csp represents
a concentration setpoint.
Draw the control block diagram for this system. Label every transfer function and
signal on the diagram. What type of control strategy would you call this? What is the
primary measured variable for this system? What is the primary control variable for
this system? Which controller is probably tuned to be the slowest? Which controller is
probably tuned to be the fastest? What is the gain for device D1 if a current signal
(4–20 mA) is being converted to a pneumatic signal (3–15 psig) (show units)?
a. Complete the instrumentation diagram shown below. Draw the control block
diagram associated with the bug concentration control strategy.
b. What type of control strategy is this (for the bug concentration control)?
c. Identify the control objective and possible disturbance variables. Name the
disturbance variables that each controller is meant to reject.
c.
Draw the following control instrumentation diagram. Now, draw the corresponding
control block diagram, in order to be able to analyze the control loops and tune the
controllers. Label all controllers, measurement devices, and signals on the block
diagram.
7: Consider the following depiction of the bottom portion of a distillation column. It is
desired to control the composition of the bottom stream at a certain value (setpoint)
by manipulating the steam to the reboiler. Composition is a slow variable, and the
measurement device can have significant delays; it is known that measuring and
controlling the temperature of a tray in the column can improve disturbance rejection.
The temperature is regulated by the pressure of the steam in the reboiler, which is a
function of the steam flow to the reboiler. Show the proper signals for a cascade type
of control system. Also, develop the corresponding block diagram, showing clearly the
disturbances that each loop is meant to reject.
8: A common type of chemical reactor is a packed-bed reactor, which is assumed to
operate adiabatically (no heat loss). The objective of the following reactor control
strategy is to maintain a desired reactor outlet concentration by manipulating the
temperature of the inlet stream to the reactor. The reactor inlet temperature is
maintained by manipulating the steam flow to a feed preheat exchanger. Connect the
measurements and control devices on the control instrumentation diagram and draw
the corresponding control block diagram. Label all controllers and signals on both the
control instrumentation and control block diagrams. Draw appropriate disturbances on
the control block diagram.
9: As a young process engineer, you have been given the responsibility for a catalytic
reforming unit at a refinery that, for some reason, is just now getting involved with
"advanced control." The catalytic reforming unit produces roughly 25% of the gasoline
produced by the refinery. The throughput of the unit is 25,000 barrels per day
(Bbl/day) and the value is roughly $30/Bbl. The gross operating income of the unit is
then roughly $1 million/day. You feel certain that tighter control can improve the yield
of the unit, increase the value of the product, and reduce operating costs. The
reforming unit consists of three fuel gas-fired furnaces and three catalytic reactors
with a number of additional heat exchangers and separation columns. You feel that
you must prove that advanced control can work on part of the process before you
attempt to implement it on the entire process. You decide that the place to start is on
the temperature control of the process fluid leaving the first furnace.
A simplified process instrumentation diagram for the furnace that heats the process
stream for the first reactor is shown in Figure 10-1. The "old school" operations
personnel have been controlling the outlet temperature of the process stream by
simply manipulating the fuel gas valve directly. You realize that this method allows fuel
gas header pressure changes to affect the fuel gas flow rate, which will affect the
process fluid outlet temperature.
You wish to show the benefits of cascade control for this system. Use your practical
engineering knowledge, a number of discussions with the process operators
responsible for the reforming unit, an investigation of the unit log books, and
determine the following.
Relevant information:
a. For each increase of 1 psig to the fuel gas valve actuator, the fuel gas flow rate
increases by 83.3 scfm (standard cubic feet per minute).
b. For each increase of 1 scfm in fuel gas flow, there is an increase in the outlet
reformate stream temperature of 0.36°F.
c. For a change in the upstream fuel gas header pressure of 1 psig, there is a
corresponding change of 13.5 scfm in the fuel gas flow rate.
d. For a change in the inlet process stream of 1°F, there is a change of 1°F in the
outlet temperature.
e. You assume that the time constant associated with the control valve is roughly 6
seconds (0.1 minutes).
Design a cascade-control strategy and compare results (using S IMULINK) with the
standard feedback-control strategy for two types of disturbances: fuel gas header
pressure (±5 psig), and process stream inlet temperature disturbances (±25°F).
10: Consider a stirred-tank heater that has the following process model:
with the parameter and variable values
V/F = 30 minutes
UA = 24 kcal/min °C
Vjrjcpj = 120°C
Tjf = 120°C
T = 40°C
Tf = 20°C
a. Find the state space model for these conditions, if the inputs are F j, Tjf, and Tf .
b. Show that the linear transfer function model has the form of the following block
diagram and find all of the process and disturbance transfer functions. Is a zero
of the secondary process transfer function related to the pole of the primary
process transfer function?
c. If changes in the vessel temperature are slow and can be neglected so that only
the second (jacket temperature) equation is considered, find the secondary
transfer function, gp2 (this is first-order). How does this compare with part b?
11: Consider a cascade control block diagram based on a parallel process representation
(note that the disturbances are excluded here). Show that the closed-loop transfer
function for the inner-loop is the same as for the series representation. Derive the
closed-loop transfer function for the outer-loop as a function of the inner-loop closed-
loop transfer function. Also, relate gp to gp1 and gp2 .
12: Develop a block diagram that has the IMC structure on both the primary and
secondary loops.
[ Team LiB ]
[ Team LiB ]
13 Use physical reasoning to discuss why the disturbance dead time must be greater than
the process dead time to even have the possibility of perfect feed-forward disturbance
compensation.
14
Let and .
Design a feed-forward controller, gcf(s), for this system. Elaborate on its expected
performance.
The following data are relevant to this problem. Without control, a change in the inlet
pH of 0.5 leads to a change of 0.25 pH in the outlet stream. The time delay is 10
minutes and the time constant is 30 minutes. A change in the acid stream valve-top
pressure of 1 psig leads to a change in pH in the outlet stream of 0.4 pH. The time
constant is 25 minutes and the time delay is 7.5 minutes.
16 Derive the following closed-loop relationship for IMC with feed-forward control,
and show that there is no offset for a step load disturbance.
[ Team LiB ]
[ Team LiB ]
17 Consider again the reactor control system from Exercise 8. If there is also a
measurement of the concentration of the reactor feed stream (before it enters the heat
exchanger), show how it can be used in a feed-forward-control strategy (using the
previously developed cascade type of strategy). Show this on both the control
instrumentation diagram below and the control block diagram.
18 Design a feed-forward/cascade control strategy for the following level control problem.
Draw the instrumentation directly on the figure. Draw a control block diagram, labeling
all the signals on the diagram
19 Consider the heater shown in Exercise 9. Now consider implementing feed-forward and
cascade control when process flow disturbances can occur, as shown below.
For a change in the inlet process flow rate of 1,000 Bbl/day, there is a change of –10°F
in the outlet temperature. Also, the dynamic behavior can be described by a first-order
lag of 5 minutes and a one minute time delay. Use the information from Exercise 9 to
design a feed-forward/feedback/cascade-control strategy, and perform simulations for
a step feed flow rate disturbance of 2,000 Bbl/day.
[ Team LiB ]
[ Team LiB ]
11.1 Background
11.8 Summary
[ Team LiB ]
[ Team LiB ]
11.1 Background
The focus of the techniques developed thus far in this textbook has been on linear systems,
although it is recognized that chemical processes are inherently nonlinear. Fortunately, when
processes are operated close to a desired operating point, the linear-system approaches generally
work well. Also, when the main nonlinearity is due to the control valve or flow-pressure drop
characteristics, cascade-control approaches work quite well. The inner-loop flow controller has
fast dynamics, and the nonlinear effects will usually not propagate to the outer-loop.
In this chapter we cover several different approaches to handling nonlinear effects. The first
nonlinear effect is due to manipulated input saturation. When manipulated inputs hit a constraint,
the phenomena of reset (or integral) windup can occur. Approaches for antireset windup (ARW)
are presented in Section 11.2.
When chemical processes change operating points, the dynamic input-output characteristics often
change, requiring a control system retuning. Automatic tuning procedures can be used to retune
controllers. So-called autotune procedures are developed in Section 11.3.
Sometimes it is desirable to have a controller gain that is a function of the error. If small errors
can be tolerated, then a controller with a proportional gain that is a function of the absolute value
of the error can often be used. The basic idea of nonlinear PID is introduced in Section 11.4. If the
process gain changes as a function of operating condition, then "gain scheduling" approaches can
be used to vary the controller tuning parameters as a function of the operating condition. Gain
scheduling is presented in Section 11.5. Sometimes process input-output behavior can be made
more linear by proper measurement/actuator selection. Such techniques are discussed in Section
11.6.
[ Team LiB ]
[ Team LiB ]
Equation 11.1
where the time unit is minutes. Here we compare two processes: where the manipulated input is
unconstrained, and where the manipulated input is constrained between –1 and 1. Assuming
deviation variable form and an initial steady-state output of 0, we know that the constrained
process cannot achieve a steady-state output change of greater than 0.5. Here we tune the PI
controller for a closed-loop response time of 0.25 minutes. The controller gain and integral time
parameter values are kc = 8, tI = 1 min.
Figure 11-2 compares the input and output responses for a setpoint change of 0.4 in both the
constrained and unconstrained control systems. The process output for the constrained system
exhibits overshoot, while the unconstrained system has the expected first-order closed-loop
response. The overshoot is due to reset windup. Notice the constrained manipulated input stays
saturated for 2 minutes, although the output is above the setpoint after 1.5 minutes (after the
setpoint change).
A SIMULINK block diagram for this problem is shown in Section 11.7. For small setpoint changes
(say, ±0.1) you should find that reset windup is not a problem. You should show that as the
setpoint change approaches 0.5 (remember, this is the maximum steady-state change that can
be handled by the process, owing to the input constraints), the reset windup effect becomes
worse. See Exercise 2.
Antireset Windup (ARW) Techniques
There are a number of ways that have been developed to minimize problems with reset windup.
Two ways are compared with the standard PI algorithm in Figure 11-3. Figure 11-3a shows the
standard PI algorithm in block diagram form, with a saturation element to represent the
manipulated input constraints. It is clear that there is no feedback to the algorithm to prevent the
unconstrained input v from changing due to integration of the error signal. The "back-calculating"
ARW strategy is shown in Figure 11-3b. Here, the difference between the ideal (unconstrained)
input v and the actual (constrained) input u is fed-back to the integrator. The resetting time, tr, is
an adjustable parameter that is normally set equal to the integral time, tI. The first-order
feedback method of implementing integral action is shown in Figure 11-3c. For a resetting time
equal to the integral time, the two antiwindup strategies (Figures b and c) yield the same closed-
loop performance.
Reset windup can be particularly problematic in cascade-control systems, particularly when batch
processes are involved. This is illustrated by the cascade-control block diagram shown in Figure
11-5. The outer loop (primary control loop) of a cascade strategy is normally tuned for much
slower dynamics than is the inner loop (secondary control loop). If the inner loop performs more
slowly than expected, due to constraints on the manipulated input for example, the performance
of the outer loop controller may suffer. In this case external windup protection can be provided,
as shown in the following example.
For simplicity, let the primary and secondary processes be represented by the following first-order
transfer functions,
and assume IMC-based PI tuning, where the secondary process dynamics were neglected in the
design of the primary controller. Closed-loop time constants of 10 and 2 minutes were used for
the primary and secondary loops, respectively. The manipulated input is assumed to saturate at
±3. The primary and secondary tuning parameters are then
We first perform a simulation with antiwindup on the secondary control loop, since the jacket flow
rate is constrained. The response to a unit setpoint change is shown in Figure 11-7. Notice that
there is still some windup involved, causing overshoot of the primary process output. This is
because the output of the primary controller is a setpoint to the secondary controller. The
secondary controller does not track its setpoint very well because of the saturation of the
manipulated input. This is shown clearly in the middle plot of Figure 11-7.
Improved performance can be obtained using an external input to the primary controller. The
basic idea is illustrated in Figure 11-8 for the reactor temperature (master) controller, where the
controller output is the jacket temperature setpoint. Here the jacket temperature (actual
manipulated input) is compared with the jacket temperature setpoint (ideal manipulated input). If
the jacket temperature is not equal to its setpoint, some of the integral action is "removed" by
corrective feedback action. The improved cascade control, with antiwindup (Figure 11-3c) on the
secondary loop and external resetting antiwindup (Figure 11-8) on the primary loop, has excellent
performance, as shown in Figure 11-9. There is now no overshoot in the primary process output
(reactor temperature). The external reset windup protection is shown as a signal between the
measured jacket temperature and the reactor temperature controller, on the control
instrumentation diagram in Figure 11-10.
Figure 11-8. Reactor temperature controller with external variable
reset.
[ Team LiB ]
[ Team LiB ]
The most common method of automatic tuning uses a relay switch to create what is essentially an
on-off controller. The resulting oscillatory behavior is analyzed to determine the proper controller
settings.
Figure 11-11. Control block diagram for an autotune relay switch. (a)
Switch set to PID Control. (b) Switch set to relay function for
automatic tuning.
Notice that the relay block represents a nonlinear function. As drawn, it represents the following:
Equation 11.2
Assuming that the input is symmetrical with a steady-state value of 0 (in deviation variable form),
the magnitude of the input change allowed is h, so u max = h, and umin = –h. Notice that this
assumes that the process gain is positive. If the process gain is negative, then switch the
inequalities shown in Equation 11.2.
In autotune mode, the closed-loop system oscillates and the manipulated variable action is on-off
(or bang-bang), as shown in Figure 11-12. In this example, h = 0.05.
There are two parameters that result from this autotune test. One is the period (time between
successive peaks), P, and the other is the amplitude of the process output, a. The period has
units of time; the ultimate frequency can be found from
Equation 11.3
Equation 11.4
In the results shown in Figure 11-12, the period is 16.4 min and the process output amplitude is
0.019. The manipulated input magnitude is 0.05, yielding the following values for kcu and wu:
The behavior is very similar to that obtained from the Ziegler-Nichols closed-loop cycling method.
The Ziegler-Nichols results for the same process are shown in Figure 11-13.
The Ziegler-Nichols test yields an ultimate gain of 3.83 and an ultimate period of 17.13 min;
contrast these with the relay values of 3.35 and 16.4 min.
Also, if the error is in between the minimum and maximum limits, then the control action stays at
the current value.
Controller Tuning
Once the process parameters (ultimate gain and frequency) are identified from the relay test, a
controller tuning procedure must be used. An obvious method is to use the Ziegler-Nichols values,
since the autotune test is similar to the Ziegler-Nichols test. These controller tuning parameters
are not robust, however, and result in closed-loop systems that may go unstable if the process
conditions change.
An alternative is to use a model-based procedure, such as IMC-based PID. A problem is that the
ultimate gain and frequency must be converted to model parameters. Since only two parameters,
ultimate gain and frequency, are obtained from the relay test, a two-parameter process model
must be developed. The classical first-order + time-delay model cannot be used because it has
three parameters. Two options are integrator + time delay (11.6) and gain + time delay (11.7):
Equation 11.6
Equation 11.7
The integrator + time-delay model is generally a very good approximation to a first-order + time-
delay process if the time constant is much larger than the time delay. The gain + time-delay
model is generally a good approximation if the time delay is much larger than the time constant
(such as for liquid flows with significant pipe volume delays).
For the integrator + time-delay model, the dead time and process gain can be found from the
relay parameters in the following fashion:
Equation 11.8
The IMC-based PI tuning parameters can be found from (see Chapter 9)
Equation 11.9
For the gain + time-delay model, the dead time and process gain can be found from the relay
parameters in the following fashion
Equation 11.10
Equation 11.11
In both cases, the IMC filter-factor (l) is adjusted to provide a tradeoff between nominal
performance and robustness to model uncertainty.
In the example shown in Figure 11-12, the period and output amplitudes were 16.4 min and
0.019 for a control magnitude of 0.05. The IMC-based PI controllers obtained under the two
different model-based assumptions are compared in Table 11-1.
The responses of the two model-based PI controllers are shown in Figure 11-14. The l value was
adjusted to achieve 25% overshoot in both cases. For more robust performance, the l values
must be increased.
Equation 11.12
where it is understood that any bias associated with steady-state operation is absorbed into the
integral term. Other forms for PID control are presented in Chapter 5.
Often it is useful to have a nonlinear controller even if the process is linear. A common example is
level control of a surge drum where the primary objective is to maintain a reasonably consistent
outlet flow under disturbances in the inlet flow rate, subject to high and low drum level
constraints. In this situation, some small nominal controller gain can be used when the level is
close to the setpoint, and as the error increases, the gain can increase. A common choice is to
make the proportional gain a function of the absolute value of the error,
Equation 11.13
This means that the controller output is effectively proportional to the square of the error, as
shown below for a P-only nonlinear controller.
Equation 11.14
An alternative to making the controller gain a continuous function of the error is to form a
piecewise linear controller (sometimes called a gap controller), where (often kc,high = kc,low)
Equation 11.15
An example of nonlinear PID control is given in Module 10 (Surge Vessel Level Control).
[ Team LiB ]
[ Team LiB ]
Equation 11.16
Notice that the primary difference between this algorithm and the nonlinear PID controllers of the
previous section is that a is a general scheduling variable, whereas the controllers in the previous
section were based on error as the scheduling variable. Although all of the controller parameters
can be scheduled, controller gain is commonly scheduled because processes are often
characterized as a changing gain with relatively constant dynamics. Typically, the controller gain,
kc, is varied to keep kckp constant, which then keeps the stability margin constant. If the process
gain can be characterized as a function of the scheduling parameter, kp(a), then the controller
gain can be scheduled as
Equation 11.17
Note that steps 1 and 2 will often be combined by using some form of closed-loop tuning at
discrete operating points. This is particularly true if the autotune feature of commercial controllers
4.
There are several different options for the scheduling of the controller parameters.
An example application of gain scheduling is distillation. Since the process gain is a function of the
product composition, it makes sense to schedule the controller gain as a function of composition.
This approach was taken by Tsogas and McAvoy (1985) in the control of distillation composition,
with distillate flow rate as the manipulated variable. The scheduling algorithm used was
Equation 11.18
Notice that this is a "one-way" algorithm. Since the process gain increases with lower purity,
maintaining a constant controller gain speeds up the response when the distillate is less pure.
[ Team LiB ]
[ Team LiB ]
In distillation control, defining a process output as the logarithm of the product composition can
be used to linearize the input-output relationship. For example,
Equation 11.19
where xD is the distillate composition. The new setpoint variable, r, can be found as the logarithm
of the desired distillate composition, xDsp, by
Equation 11.20
and the controller output (reflux flow rate, for example) would be a function of r - y.
[ Team LiB ]
[ Team LiB ]
ARW
The antiwindup results presented in Figure 11-4 were generated using the S IMULINK .mdl diagram
shown in Figure 11-17. The cascade results of Figures 11-7, and 11-9 were generated using the
SIMULINK .mdl diagrams shown in Figures 11-18 and 11-19.
[ Team LiB ]
[ Team LiB ]
11.8 Summary
A number of enhancements to standard PID controllers have been presented in this chapter. All
commercial controllers implement ARW methods of one form or another. It is particularly
important for cascade controllers to use external reset windup protection.
A number of controllers also have autotune features, but some of these are proprietary. We have
presented the approach that is most widely presented in the literature. Using a relay function in
the closed loop provides a closed-loop oscillation similar to the Ziegler-Nichols closed-loop
oscillation method. There are several of advantages to the relay-based approach: the magnitude
of the oscillations is bounded by proper selection of the manipulated input constraints, and the
time required to develop several periods of the oscillation is much shorter than the time it takes
to laboriously change a proportional gain to create a closed-loop oscillation.
One of the primary ways of creating a nonlinear PID controller is to make the controller gain a
function of the absolute value of the error. This approach works well for processes where small
deviations from setpoint are acceptable, such as surge vessel level control. Gain scheduling is a
approach that can be used when the model and controller gain can be characterized as a function
of the operating condition.
The proper selection of measurements and actuators can help linearize the input-output
relationship. Equal percentage valves often make flow systems appear linear over a wider range.
Similarly, using the logarithm of distillation product compositions can make the input-output
behavior more linear.
[ Team LiB ]
[ Team LiB ]
References
A nice presentation of antireset windup is presented in: Astrom, K. J., and L. Rundqwist,
"Integrator Windup and How to Avoid It," in Proceedings of the 1989 American Control
Conference, Pittsburgh, pp. 1693–1698 (1989).
The following paper presents model-based (integrator + time delay and gain + time delay) PI
approaches for tuning SISO and two-input, two-output processes: Friman, M., and K. V. Waller,
"Autotuning of Multiloop Control Systems," Ind. Eng. Chem. Res., 33(7), 1708–1717 (1994).
A nice summary of PID design and implementation is presented in the following book: Kiong, T.
K., W. Quing-Guo, and H. C. Chieh with T. J. Hagglund, Advances in PID Control, Springer Verlag,
London (1999).
The following paper reviews gain scheduling approaches to process control: Bequette, B. W.,
"Practical Approaches to Nonlinear Control: A Review of Process Applications," in Nonlinear Model-
based Process Control, NATO ASI Series, Ser. E, Vol. 353, pp. 3–32 (R. Berber and C. Kravaris,
Eds.), Kluwer, Dordrecht (1998).
Distillation gain-scheduling control has been studied in the following: Tsogas, A., and T. J.
McAvoy, "Gain Scheduling for Composition Control of Distillation Columns," Chem. Eng. Commun.,
37, 275–291 (1985).
[ Team LiB ]
[ Team LiB ]
Student Exercises
1: Verify that the two block diagrams below result in the same PI control algorithm
transfer function.
2: Use the SIMULINK diagram presented in Figure 11-16 to verify the results presented in
Example 11.1. Show that, as the setpoint change approaches 0.5 the integral windup
effect becomes worse.
3: Verify the results of Example 11.2 using a SIMULINK simulation. Also, discuss the effect
of the resetting time, tr, on the ARW results.
4: Consider the process furnace temperature cascade control system shown in Figure 10-
2, where the output of the temperature control loop is a setpoint for the fuel gas flow
controller. Draw a signal, similar to Figure 11-10, that shows that an external antireset
strategy is used for the temperature controller.
5: Consider Example 11.3. Use S IMULINK to show that cascade control without antireset
windup protection yields significant overshoot for a setpoint change.
6: Show that the relay procedure for an integrator + time-delay process will exhibit the
following period and output amplitude:
7: Show that the relay procedure for a gain + time-delay process will exhibit the following
period and output amplitude:
8: The example process used in this module is first order + time delay, with a gain of 1, a
time constant of 10, and a time delay of 5. Compare the Ziegler-Nichols PI control
performance when the critical gain and period are obtained using two different
methods: relay-based cycling, and Ziegler-Nichols closed-loop cycling. Also, compare
the Tyreus-Luyben tuning parameters obtained using the two methods. Does the
relay-based method generally yield more conservative results?
10: For a gain + time-delay model, find the IMC-based PI parameters when the all-pass
method is not used.
11: For a first-order + time-delay process, with a time constant of 10 minutes and a time
delay of 0.5 minutes, use the autotune procedure. How close are the critical gain and
ultimate period to the values obtained by the Ziegler-Nichols closed-loop oscillation
method? What are the process parameters for an integrator + time-delay model?
Based on these parameters, simulate the closed-loop behavior of a PI controller, with
various values of l. What l values do you recommend? Why?
12: For a first-order + time-delay process, with a time constant of 0.5 minutes and a time
delay of 10 minutes, use the autotune procedure. How close are the critical gain and
ultimate period to the values obtained by the Ziegler-Nichols closed-loop oscillation
method? What are the process parameters for a gain + time-delay model? Based on
these parameters, simulate the closed-loop behavior of a PI controller, with various
values of l. What l values do you recommend? Why?
[ Team LiB ]
[ Team LiB ]
12.1 Motivation
12.6 Summary
[ Team LiB ]
[ Team LiB ]
12.1 Motivation
In Chapter 10 we discussed feed-forward and cascade-control strategies. The purpose of these
control strategies was to take advantage of additional measurements to improve the disturbance
rejection capability. In this chapter, we also develop strategies that use more than one
measurement and, in addition, manipulate more than one input. Ratio control, presented in
Section 12.2, is very similar to feed-forward control. In Section 12.3, we discuss selective and
override control, which involves the use of "selectors" to decide the proper control action to take.
In Section 12.4, split-range control is presented as a way to use more than one valve to regulate
a process.
[ Team LiB ]
[ Team LiB ]
Equation 12.1
Equation 12.2
Clearly, the process gain varies as a function of the flow rate of stream A. This means the ratio
controller would need to be tuned differently depending the stream A flow rate. In contrast, the
relationship between the manipulated input (valve position, related to FB) and the measured
output (FB) for the flow controller in Figure 12-1b is
Equation 12.3
so the gain is
Equation 12.4
which is constant.
The ratio could be specified to maintain an excess of component B in a reaction, for example. A
common use of this would be the supply of combustion air to a furnace. Stream A could represent
the fuel gas, for example, and stream B would represent the combustion air.
The blend stream could also have a composition or product property measurement and controller;
the output of this controller would be cascaded to the desired ratio of stream B flow to stream A
flow. In Exercise 1 you have the opportunity to sketch this control strategy.
[ Team LiB ]
[ Team LiB ]
Equation 12.5
When manipulating the fuel gas flow to a fired heater (furnace), it is important to make certain
that a minimum air/fuel ratio is maintained. High/low selectors can be used to assure this, as
shown in Figure 12-3; here the A/F boxes indicate the air/fuel ratio. To understand how this
strategy works, first consider a positive change in the fuel flow setpoint. Notice that the
combination of high and low selectors will force the combustion air flow rate to increase before
the fuel flow increases. Also, if a decrease in fuel flow setpoint is made, the fuel flow must
decrease before the combustion air flow. This strategy makes certain that excess combustion air
is always available.
Figure 12-3. Use of high/low selectors for fuel gas and air flow control
of a fired heater. Notice the simplified representation for the air flow;
ordinarily a damper inside an air duct would be adjusted to vary the
air flow.
In practice this strategy is just one part of the overall furnace control strategy. Usually, the fuel
flow setpoint will be the output of another controller (e.g., process fluid temperature or steam
system pressure), and the air/fuel ratio might be the output of a furnace stack gas O2 or CO
measurement and control strategy.
[ Team LiB ]
[ Team LiB ]
Equation 12.6
Sometimes there is a small deadband, where the cold glycol is open between 0 and 45%, while
the hot glycol is open between 55 and 100%. This adds the equivalent of a small time delay to the
control strategy but avoids situations where both cold and hot valves are open owing to small
miscalibrations.
where the jacket make-up flow rate (F j ; of either cold or hot glycol) is the process input.
Numerical values are shown in Exercise 5.
The responses for setpoint changes in jacket temperature are shown in Figure 12-6. A positive
setpoint change is made at t = 0 minutes, followed by a negative change at t = 10 minutes. The
middle plot shows the jacket temperature controller output and the bottom plot shows the
individual valve positions. All variables are in deviation form. When the controller output is
positive, the hot valve is activated; when the controller output is negative, the cold valve is
activated.
[ Team LiB ]
[ Team LiB ]
An example SIMULINK block diagram to implement a split-range jacket temperature controller from
Example 12.1 is shown in Figure 12-7. Since this has been formulated in deviation variable form,
the output of the jacket temperature controller ranges from –50 to 50%. Saturation elements are
used for the cold and hot valve positions.
[ Team LiB ]
[ Team LiB ]
12.6 Summary
Ratio control has many similarities to feed-forward control. Usually a "wild stream" flow rate is
measured and another stream is manipulated to maintain a constant ratio to the wild stream.
Selective and override strategies are often used to improve the safety of a process system. A
prime example is a fired heater where it is important for combustion air to "lead" the fuel gas flow
on increasing loads, but to "lag" fuel gas flow on decreasing loads. Split-range control allows the
use of two or more valves as manipulated inputs, depending on the operating condition.
[ Team LiB ]
[ Team LiB ]
References
Ratio control is discussed in: Myron Jr., T. J., "Feedback Methods for Process Control Systems,"
Chemical Engineering, 233–238 (Nov. 14, 1983).
A number of selective control examples are shown in: Kurth, T. G., "How to Use Feedback Loops
to Meet Process Conditions," Chemical Engineering, 77–83 (April 30, 1984).
[ Team LiB ]
[ Team LiB ]
Student Exercises
1: Consider the ratio control strategy shown in Figure 12-1b. If the blend stream has a
concentration measurement and controller, construct the control instrumentation
diagram where the output of the concentration controller is the desired ratio of stream B
to stream A flows.
2: Consider the high-temperature select control problem shown in Figure 12-2. Modify the
control instrumentation diagram to include a cascade-control strategy, where the output
of the reactor temperature controller is the setpoint to a reactor inlet temperature
controller. The reactor inlet temperature controller then manipulates the flow to the
preheat exchanger.
3: Consider a gas-phase reactor where a valve on the output stream is normally regulated
to maintain a desired outlet composition. Design a selector-based control strategy that
switches to pressure control if the pressure is too high.
5: Consider Example 12.1, where input 1 is the cold glycol make-up flow rate, and input 2
is the hot glycol make-up flow rate. The steady-state temperature is 20°C, which is also
the vessel feed temperature. At steady-state the cold and hot glycol make-up flow rates
are 0. The parameter values are
6: Develop a SIMULINK diagram of a cascade control strategy, where Figure 12-7 represents
the inner-loop (jacket temperature) control system. The output of the primary (outer-
loop) controller that you develop should be the setpoint for the jacket temperature
controller. Discuss the design and implementation (tuning) of both controllers. Use the
parameter values from Exercise 5.
[ Team LiB ]
[ Team LiB ]
Use the relative gain array (RGA) to determine the proper input-output pairings for multiple
single input–single output controllers
13.1 Introduction
13.2 Motivation
13.10 Summary
[ Team LiB ]
[ Team LiB ]
13.1 Introduction
Thus far in this textbook we have focused primarily on SISO control systems. Most chemical
processes, however, have many manipulated variables affecting many output variables, as shown
in Figure 13-1. We generally assume that a desired output variable is also measured. In some
cases (composition for example), an output variable cannot be measured and must be "inferred"
from other measurements (such as temperatures and flow rates).
Although most processes are multivariable, SISO control loops are formed by selecting a
measured output that is most strongly affected by a particular manipulated input. This is done for
two reasons: SISO design techniques are easy to understand, and hardware and software are
readily available for SISO controllers. We refer to control systems that use several SISO
controllers on a multivariable process as MVSISO (multivariable single input–single output)
controllers. The selection of which measured output to pair with which manipulated input is known
as variable "pairing" and is the focus of much of this chapter.
[ Team LiB ]
[ Team LiB ]
13.2 Motivation
A specific example of a multivariable control problem is shown in Figure 13-2. Here, two different
streams are blended together. The objective is to manipulate the individual stream flow rates to
meet specifications on the output flow rate and the output composition. Let the outputs be
represented by y2 (total flow) and y1 (composition), and the inputs by u1 (flow rate of stream 1)
and u 2 (flow rate of stream 2). How should our outputs and inputs be paired? If we assume that
the output-input pairings are y1-u1 and y2-u2, the instrumentation diagram is shown in Figure 13-
3a. If we assume that the output-input pairings are y1-u2 and y2-u1, the instrumentation diagram
is shown in Figure 13-3b.
Your intuition is probably to pair output 1 (alcohol measurement) with input 1 (80 proof whiskey
stream), since there is no alcohol in the water stream; this is the strategy shown in Figure 13-3a.
We find later that this is not the best pairing, indicating that the best control structure is often
counterintuitive. We first see the problem by observing the behavior of control loop 1 (y1-u1
pairing) when control loop 2 (y2-u2 pairing) is open (or under "manual" control). The response to
an ethanol concentration setpoint change is shown in Figure 13-4. Observe that the closed-loop
behavior of ethanol concentration is quite good, but that the total flow rate deviates, since the
flow control loop (control loop 2) is not closed.
Assume that it is desirable to maintain the total blend rate at a constant value. This requires that
loop 2 be closed. Loop 2 has blend flow as the measured process output (y2) and the dilution
water flow rate as the manipulated input (u2). Assume that it has been tuned independently from
loop 1, that is, loop 1 is open. The response to a setpoint change in flow rate is shown in Figure
13-5. Notice that the flow-rate response is quite good but that the ethanol concentration deviates
from the desired value, because loop 1 is open.
Figure 13-5. Response to total blend flow rate setpoint change; loop 2
has blend flow rate as the measured output (y2) and dilution water
flow rate as the manipulated input (u 2). Loop 1 is open.
We have seen that the individual control loops have quite good performance. Since we desire to
control both the concentration and the flow rate of the blend stream, we need to have both loops
closed simultaneously. The response to a setpoint change in the total blend flow rate with both
loops closed is shown in Figure 13-6. Notice that closed-loop system is now unstable! What
characteristic of this control strategy caused the instability to occur when both loops were closed?
Would this behavior have occurred if a different variable pairing had been used? That is, would
there be problems if loop 1 paired the ethanol measurement (y1) with dilution water flow (u2) and
loop 2 paired the total blend flow rate (y2) with the whiskey flow (u 1)? We find the answer to this
question in the sections that follow.
Figure 13-6. Response to a total blend flow rate setpoint change with
both loops closed. Loop 2 pairs blend flow rate (y2) and dilution water
flow rate (u2), while loop 1 pairs ethanol concentration (y1) with
whiskey flow (u1).
[ Team LiB ]
[ Team LiB ]
Equation 13.1
Equation 13.2
Equation 13.3
Which output yi should be paired with which input uj to form an SISO control loop?
Equation 13.4
which is written in matrix form as
Equation 13.5
and we can think of the input output relationships as shown in Figure 13-7.
The corresponding feedback control system, if the pairings are u1-y1 and u2-y2, is shown in Figure
13-8.
Now, consider how u1 affects y1 if (a) loop 2 is open and if (b) loop 2 is closed.
(a) Loop 2 is open (loop 1 is also open). If the second input (u2) is constant, then the outputs
depend only on the first input (u 1), as shown in Figure 13-9.
Figure 13-9. Block diagram with loop 2 open (loop 1 is open as well).
If we designed a SISO feedback control system for loop 1, we would use g 11(s) as the process
transfer function for control system design.
(b) Loop 2 is closed. If the second loop (y2-u2) is closed, then the outputs depend on input 1 (u1),
as shown in Figure 13-10. Notice that there is an additional effect of input 1 on input 2 owing to
the action of controller 2. Input 1 affects output 2, which then changes input 2 through the
second controller. This change in input 2 then has an additional effect on output 1; this effect can
be positive or negative.
Thus, the relationship between u1(s) and y1(s) is no longer just g11(s). Indeed, we can derive the
relationship in the fashion:
Equation 13.6
Equation 13.7
also
Equation 13.8
Combining Equations (13.7) and (13.8),
Equation 13.9
Equation 13.10
Equation 13.11
Equation 13.12
Equation 13.13
g11,eff(s) is the effective input-output relationship between u1 and y1, with loop 2 closed. This
means that g11,eff(s) should be used as the process transfer function to design controller 1 if loop
2 is closed. Unless g12(s) or g21(s) = 0, if the second control loop is closed, then the first control
loop must be designed differently than if the second control loop were open. Naturally, the
relationship between u1 and y1 is a function of the controller gc2 when the second loop is closed.
What we would really like is a method to determine the relationship between u1 and y1 with loop 2
closed, without knowing gc2 (s).
We can easily determine this relationship for a limiting case, the steady state. For the steady
state, we simply let s 0. Assuming integral action is used in the controller, we find that as s
0, gc2 (s) . Also, from Equation (13.13) and gc2 (0) as s 0, we find the
following relationship (where 0 represents s = 0, the steady state; do not confuse this with t = 0,
the initial condition):
Equation 13.14
This can also be determined from the steady-state relationship
Equation 13.15
Equation 13.16
Equation 13.17
We now have a steady-state effective gain relationship between u1 and y1 with the loop between
u2 and y2 closed.
[ Team LiB ]
[ Team LiB ]
Equation 13.18
This is referred to as the gain between u1 and y1 with all other loops open (that is, u2 is constant
for this 2 x 2 example).
The steady-state relationship between u1 and y1 at steady state, with y2 maintained constant at
its setpoint (using a controller with integral action), is
Equation 13.19
Notice that Equation (13.19) is the gain between input 1 and output 1, assuming output 2 is
constant.
Equation 13.20
By convention, the symbol used for the relative gain is lij. Please do not confuse it with the l that
was used for the IMC filter or for the l that is commonly used to represent the eigenvalues of a
matrix. The relative gain will normally be shown with two subscripts, distinguishing it from
eigenvalues or the IMC filter factor.
Equation 13.21
Remember that Equation (13.21) is only true for the two input–two output case.
The RGA
The RGA is simply the matrix that contains the individual relative gain as elements, that is L =
{lij} . For a 2 x 2 system, the RGA is
Equation 13.22
Question: What value do we desire for the relative gain?
Think of it this way. If we want to use a u1-y1 pairing for a SISO controller, we do not want it to
matter whether the other loops in the system are closed or not. This tells us that we desire a
relative gain close to 1.0. That is,
The l11 calculation for a 2 x 2 system yielded . The more general result is (see
Appendix 13.1 for a derivation)
Equation 13.23
where element of G–1(0). Notice that this is not the same as matrix multiplication. Here,
the individual elements of the two matrices are being multiplied together.
We check the general results derived above by applying them to a 2 x 2 (two output, two input)
system,
Multiplying the individual elements of G(0) and (0), as in Equation (13.23), we find
Equation 13.24
[ Team LiB ]
[ Team LiB ]
This property for 2 x 2 systems is general for n x n systems. That is, each row of the RGA sums to
1.0 and each column of the RGA sums to 1.0.
Then, for a 2 x 2 system, only one relative gain must be calculated to find the entire array,
Equation 13.25
For a 3 x 3 system, only four of the nine elements would need to be calculated. In practice, they
are all calculated simultaneously using (13.23).
However, if
That is, for an odd number of positive elements in the process gain matrix, all the relative gains
will be between 0 and 1. If there are an even number of positive elements in G(0), then
This means that for an even number of positive elements in the process gain array, all the relative
gains will be outside the 0–1 range.
The results for a 2 x 2 system indicate that if l11 > 1 then l12 = l21 < 0. Also, if 0 < l11 < 1,
then 0 < l12 < 1. Let us think about the differences between having a l11 greater than 1 and
having a l11 less then 1.
If l 11 > 1, then .
This tells us that the gain between u1 and y1 is larger with loop 2 open than with loop 2 closed.
If we design the u1-y1 controller with loop 2 open, then close loop 2, we expect somewhat
sluggish behavior, since the effective process gain will be lower than the u1-y1 gain.
However,
If we design the u1-y1 controller with loop 2 closed, then if we have to open loop 2 for some
reason, we could have destabilizing behavior, since the u1-y1 gain will be higher than when
the controller was tuned.
This tells us that the gain between u1 and y1 is smaller with loop 2 open than with loop 2 closed.
If we design the u1-y1 controller with loop 2 open, then close loop 2, we expect more
aggressive behavior, since the effective process gain will be higher than the u 1-y1 gain.
However,
If we design the u1-y1 controller with loop 2 closed, then if we have to open loop 2 for some
reason, we expect sluggish behavior, since the u1-y1 gain will be lower than when the
controller was tuned.
Also, note that we have only been concerned with static (steady-state) effects. Dynamic
interaction has a major effect when control systems are tuned. Our experience is that one rarely
reverses a pairing decision based on the steady-state relative gain, when one considers the
dynamic effects.
The primary result from a dynamic interaction analysis is to recognize additional interaction
affects above the steady-state ones and either accept the degradation in control system
performance, or use a "true" multivariable control system design technique rather than separate
SISO controllers. Sometimes the interaction and other problems will be so severe that only one
loop can be closed.
[ Team LiB ]
[ Team LiB ]
We first develop the steady-state model, then linearize to find the process gain matrix, and finally
calculate the RGA to decide on variable pairing. For simplicity we neglect density differences
between the streams and components.
Solving these equations for the volume fraction of ethanol in the blend stream,
Let the volume fraction of ethanol be output 1 and total flow rate output 2. Also, inputs 1 and 2
are the flow rates of the whiskey and water feedstreams, respectively. The following steady-state
values were used in Example 13.1: F 1 = 3 gpm, F2 = 1 gpm, z = 0.3 mole fraction ethanol, and F
= 4 gpm.
This value of 0.25 indicates that the effective gain relating input 1 to output 1 with loop 2 closed is
four times the value of the gain with loop 2 open. This explains the result shown in Figure 13-11.
which indicates that the blend total flow (y2) should be paired with the whiskey flow rate (u1) and
the blend ethanol concentration (y1) should be paired with the water flow (u2). Notice that the
largest component stream flow rate then controls the total flow.
[ Team LiB ]
[ Team LiB ]
Failure Sensitivity
When tuning a set of SISO controllers to form a MVSISO strategy, it is important to consider the
failure sensitivity of the system. For example, consider a two input–two output system. If loop 1
is tuned to operate well when loop 2 is closed, we must also consider what happens when loop 2
is opened. It is possible for loop 2 to be opened in a number of ways. The most obvious way is for
an operator to put loop 2 on manual control (i.e., open loop). Another way is if the second
manipulated variable hits a constraint, say if the valve goes all the way open or closed—this
means that the second input can no longer affect the second output, which is equivalent to being
open loop.
Consider a system where loop one has output 1 paired with input 1. The relative gain is defined as
Equation 13.26
Using k11 to represent the steady-state gain between input 1 and output 1,
Equation 13.27
Equation 13.28
where
We can really represent the effect of the relative gain by comparing the two block diagrams
shown in Figures 13-12a and b.
Figure 13-12. Process gain between input 1 and output 1 when loop 2
is open versus when loop 2 is closed. (a) Process gain between input 1
and output 1 when loop 2 is open. (b) Effective process gain between
input 1 and output 1 when loop 2 is closed.
Comparing Figures 13-12a and b, we see that the effective process gain between input 1 and
output 1 with loop 2 is closed is simply a perturbation of the open-loop gain between input 1 and
output 1 by a multiplicative factor of 1/l11.
If a relative gain is less than 1, this means that k11,eff > k11. If a controller for loop 1 is based on
k11 (implicitly assuming that loop 2 is open), then when loop 2 is closed, the controller gain for
loop 1 (kc1 ) should be detuned approximately by a factor of l11, otherwise the control system will
respond too rapidly and there will be a chance of instability. If, on the other hand, the controller
for loop 1 is tuned based on loop 2 being closed, then kc1 can probably be increased by a factor of
1/l11 when loop 2 is opened. The problem is, if the kc1 is kept at this new larger value when loop
2 is closed again, there is again a potential for instability.
This analysis indicates that for safety purposes, if the relative gain is less than 1, then loop 1
should be tuned based on loop 2 closed.
If a relative gain is greater than 1, this means that k11,eff < k11. If a controller for loop 1 is based
on k11 (implicitly assuming that loop 2 is open), then when loop 2 is closed, the controller gain for
loop 1 (kc1 ) can be increased approximately by a factor of l 11. The problem is, if loop 2 is then
opened again, the controller gain will be too high, and there is a chance of instability. If, on the
other hand, the controller for loop 1 is tuned based on loop 2 being closed, then kc1 should be
decreased by a factor of 1/l11 when loop 2 is opened.
This analysis indicates that for safety purposes, if the relative gain is greater than 1, then loop 1
should be tuned based on loop 2 open.
Think about the ramifications of having a negative relative gain. If l11 is negative, this means that
the gain between u1 and y1 with loop 2 closed (k11,eff) has the opposite sign compared with the
gain between u1 and y1 with loop 2 open (k11). This has the following ramifications. First of all,
assume that the process is open-loop stable. For open-loop stable processes that have a
controller with integral action, the controller gain must have the same sign as the process gain. If
the controller for loop 1 is designed with loop 2 open, it will have a controller gain with a certain
sign. Then, when loop 2 is closed, it must have an opposite sign in order to be stable! This is
certainly not a desirable situation and is unacceptable in practice. A controller for loop 1 designed
based on g11 (loop 2 open) will be destabilized when loop 2 is closed. If the controller for loop 1 is
designed based on g11,eff (loop 2 closed), the controller will be destabilized when loop 2 is opened.
This leads to the following statement regarding failure sensitivity.
Failure Sensitivity
A control strategy that is based on pairing on a negative relative gain is failure sensitive and is
unacceptable. Never select input-output pairings based on a negative relative gain.
Many control strategies have more than two control loops. Consider a case where there are three
control loops, for example. If the variable pairings have been performed so that the corresponding
relative gains are positive (and hopefully close to 1.0), then we need to consider the failure
sensitivity of all possible controller failures. For example, if loop 1 fails, it is important then to
make certain that the RGA of the subsystem with loop 1 removed still satisfies the requirement of
positive relative gains on all paired inputs and outputs.
Large relative gains correspond to a high sensitivity to uncertainty. This is shown in the following
example.
The actual process could very easily have a minor error of 5% in the gain relating u1 to y2, as
shown in the actual process gain matrix and RGA:
Notice that the model requires that input 1 be paired with output 1, while the relative gain for the
actual plant (model + uncertainty) indicates that input 1 must be paired with output 2. In this
case, we have no choice but to use only one control loop. In this case we would use physical
insight and dynamic considerations to select the loop to close.
A large relative gain (the order of 25 and higher) corresponds to an extreme sensitivity to model
uncertainty and indicates that some loop should be opened; that is, not all outputs should be
under feedback control. One process that can have multivariable control, even with a large
relative gain, is distillation, where nonlinear effects dominate.
[ Team LiB ]
[ Team LiB ]
indicating that the output-input pairings should be y1-u2 and y2-u1. In order to achieve this
pairing, we could use the block diagram shown in Figure 13-13.
Notice that the difference between r2 and y2 (the error in output 2) is used to adjust u1, using a
PID controller (gc1 ), hence, we refer to this pairing as y2-u1. Similarly, the difference between r 1
and y1 (the error in output 1) is used to adjust u2, using a PID controller (gc1 ); hence, we refer to
this pairing as y1-u2. This corresponds to the physical diagram shown in Figure 13-3b.
An alternative is to rearrange (renumber) our outputs or inputs so that the natural pairing is y1-u1
and y2-u2 (in the renumbered variables). For example, we could renumber the outputs. Let
and , where * indicates the newly redefined variable. This corresponds to the control and
instrumentation diagram shown in Figure 13-14.
We can write
or
Notice that redefining the outputs is equivalent to switching the rows of the process gain matrix
related to the corresponding outputs (in this case, switching rows 1 and 2 is equivalent to
exchanging outputs 1 and 2). The new RGA is found by making the same transformation of rows
in the RGA, as was performed on the process gain matrix.
Similarly, redefining the inputs is equivalent to switching the columns of the process gain matrix
related to the corresponding inputs. The new RGA is found by making the same transformation of
columns in the RGA, as was performed on the process gain matrix.
Generalization
We have shown, by way of example, that outputs can be renumbered by switching the rows in
the process gain matrix, and inputs can be renumbered by switching columns in the process gain
matrix. Each time we perform this exchange of variables, we do not need to recalculate the
relative gain array—we simply find the new RGA by performing the same row and column
exchanges on the RGA that we performed on the process gain matrix. By performing this
exchange (renumbering) of variables, we can always rearrange our inputs and outputs such that
loop 1 has a pairing of y1 and u1 (in the newly defined variables). For this reason, we will often
assume that a y1-u1 pairing has been made and discuss the effect of l 11 on controller tuning.
Solution:
1. First of all, we know that we do not want to pair on a negative relative gain.
2. Second, we do not want to pair with a relative gain of 0 because that means that the
particular input does not have an effect on the particular output, when all of the other loops
are open.
Look at row 3 in the relative gain array; this corresponds to output 3. We would not pair y3 with
u3 because of the 0 term. We also would not pair y3 with u1 because of the –3 term. This means
that y3 must be paired with u 2. Let us indicate this choice in our RGA,
Now we have eliminated the third output (row) and the second input (column) from our selection
process. From the first row (output), we see that we would not pair y1 with u3 because of the –1
term. We also cannot pair y1 with u2 because we have already paired u2 with y3 (hence, the
circle). Our only choice is to pair y1 with u1. Let us indicate this choice in our RGA,
Now, we have eliminated outputs 1 and 3 (rows 1 and 3) as well as inputs 1 and 2 (columns 1
and 2). We have no choice but to pair y2 with u3, and we make that choice below:
Notice also, that we can renumber our outputs, such that pairings of the new variables occur on
the diagonal. For example, if we define and , this is equivalent to switching the
second and third rows to obtain
Now, let us systematically choose our pairings. Looking at column 3, we see only one relative gain
that is not negative, therefore, we must pair y2 with u3. Looking at row 4, we notice that there is
only one relative gain that is not negative, therefore, we must pair y4 with u1. Looking at column
2, there are 2 nonnegative relative gains, but we have already used output 2, so we must pair y3
with u2. This leaves y1 and u4, which, fortunately, has a favorable relative gain (0.8546). If the
y1-u4 relative gain had not been favorable, we would have been forced to drop output 1 and input
4 and simply have three control loops for our system.
[ Team LiB ]
[ Team LiB ]
Then the RGA is calculated using the call to the function file:
» lambda = rga(g)
lambda =
3.6449 -1.9131 -0.7318
-2.3616 2.9581 0.4035
-0.2833 -0.0450 1.3283
[ Team LiB ]
[ Team LiB ]
13.10 Summary
The purpose of this chapter was to develop a technique (the RGA) to assist us with the decision of
how to pair input and output variables to form multiple SISO control loops. The relative gain
between output i and input j is defined as
and the RGA is a matrix of relative gains. Some of the important things that we learned about the
RGA are summarized below.
If you cannot pair on positive relative gains, or if the relative gains are high (>25), then the
number of closed-loop control loops must generally be reduced; that is, one or more loops
must be placed on manual control
Switching rows on the process gain and relative gain matrices is equivalent to renumbering
the outputs; switching columns on the process gain and relative gain matrices is equivalent
to renumbering the inputs
After selecting variable pairings, check the relative gain array for all subsystems to make
certain that they are not sensitive to controller failure
[ Team LiB ]
[ Team LiB ]
References
A nice summary of the features of the relative gain array are presented in the following:
Grosdidier, P., M. Morari, and and B. Holt, "Closed-Loop Properties from Steady-State Gain
Information," Ind. Eng. Chem. Fund., 24(2), 221–235 (1985).
The following sources were used for some of the RGA examples in this chapter: Alatiqi, I. M., and
W. L. Luyben, "Control of a Complex Sidestream Column/Stripper Distillation Configuration," Ind.
Eng. Chem. Proc. Des. Dev., 25(3), 762–767 (1986).
Doukas, N., and W. L. Luyben, "Control of Sidestream Separating Ternary Mixtures," Instrum.
Technol. (INTECH), pp. 43–48 (June, 1978).
Exercise 12 is presented in the following: Reeves, D. E., and Y. Arkun, "Interaction Measures for
Nonsquare Decentralized Control Structures," AIChE J., 35(4), 603–613 (1989).
The grinding circuit problem (Exercise 10) was presented in the following: Hulbert, D. G., and E.
T. Woodburn, "Multivariable Control of a Wet Grinding Circuit," AIChE J., 29, 186 (1983).
[ Team LiB ]
[ Team LiB ]
Student Exercises
How would you pair the variables for an MVSISO strategy and why?
Assume that the MVSISO system is tuned for stable feedback control with both loops
closed.
Case 1— u 1 is paired with y1 (loop 1) and u2 is paired with y2 (loop 2). What happens if
loop 2 is opened? Why? Must loop 1 be retuned? How?
Case 2— u 1 is paired with y2 (loop 1) and u2 is paired with y1 (loop 2). What happens if
loop 2 is opened? Why? Must loop 1 be retuned? How?
How would you pair variables for your control loops? Why?
How would you pair variables for your control loops? Why?
b1. If your answer to a is yes, what are the recommended pairings [will
these pairings assure stability if one of the loops must be opened (think
about the 2 x 2 subsystems)]? Reorder the inputs and outputs such that the
paired variables are on the diagonal of the new G(0) matrix. Show the new
G(0) matrix and the new L matrix.
6: Consider the following steady-state gain matrix for a process with three inputs and
four outputs. [This is for a Benzene-Toluene distillation column, with a side draw—see
Doukas and Luyben (1978) for details.] Assuming all the outputs are of equal
importance, which input-output pairings would you use for a MVSISO control system?
7: For a 2 x 2 system, show that a y1-u2 and y2-u1 pairing yields the following result for
l12.
where
9: Your boss has told you to develop a control strategy for the following stirred-tank
heater, which has two inputs (rate of heat addition, Q, and flow rate to tank, F i), and
two outputs (tank height and temperature). She also gave you the following transfer
function matrix, assuming that you knew which output corresponded to which
measured variable and which input corresponded to which manipulated variable.
10: The objective of a wet grinding circuit is to grind large solid material to form granular
material. Solids are fed with a water stream to a ball mill where the solids are ground.
The slurry effluent from the ball mill is fed to a sump which is used as surge capacity.
The slurry is pumped to a cyclone separator, which separates water from solid material
and returns water to the ball mill. A schematic diagram is shown below.
Consider the following process model (Hulbert and Woodburn, 1983)
b. Connect the appropriate input and output variables with controllers, on the
diagram above, to form a control instrumentation diagram.
c. Discuss the failure sensitivity of this three input–three output system. That is, if
any of the control loops failed, would the resulting two input–two output system
have the correct pairing?
It seems fairly clear that it is desirable to control the level in the separator (y1) by
manipulating the product flow rate (u1). It is particularly important to keep the level
under feedback control, since is has integrating action (a pole is at the origin). With
the level controlled by manipulating the product flow rate, the following steady-state
input-output relationship is found for the other variables
12: Consider the following system with two outputs and three inputs (Reeves and Arkun,
1989). This model is for a mixing tank with three input streams. The outputs are the
concentration and tank height, while the three inputs are stream flow rates:
To use a MVSISO strategy, we must remove one of the inputs (set it to a constant
value, rather than using it for feedback control).
13: As a promising young engineer, you are placed in charge of a gasoline blending facility.
This facility blends three refinery streams together to form a final product stream that
must meet road octane (RO) and Reid vapor pressure (RVP, psi) specifications. Two
streams are available for manipulation. You are given the following data
10 21 90.164 9.918 61
Let Flow 1 be the first input and Flow 2 be the second input. RO is the first output and
RVP is the second output.
b. How would you pair the input-output variables for this process? (Why?)
d. Draw a control block diagram for this process (with the proper pairings). (Are
there any cascade loops?)
14: Consider the whiskey blending problem. A new market for 70 proof whiskey (0.35
volume fraction ethanol) has developed. Assume that the feedstreams are still 80
proof whiskey and pure water, and that the desired production rate of 70 proof
whiskey is 4 gpm. Find the new gain matrix and relative gain array. What are the
implications for controller pairing?
[ Team LiB ]
[ Team LiB ]
The relationship between input j and output i with all other inputs constant is
For any desired output vector, y, we can find the corresponding input vector, u, from
Defining (0)=G-1(0)=K-1
The relationship between output i and input j with all other outputs constant is
and
Equation 13.23
What Equation (13.23) tells us is that the ij element of the RGA is found by multiplying the ij
element of the steady-state process gain matrix by the ji element of the inverse of the steady-
state process gain matrix.
[ Team LiB ]
[ Team LiB ]
[ Team LiB ]
[ Team LiB ]
Perform matrix transfer function block-diagram analyses and understand that the order of
multiplication is very important
14.1 Background
14.6 Decoupling
14.7 IMC
14.9 Summary
[ Team LiB ]
[ Team LiB ]
14.1 Background
Chapter 13 presented the problem of control-loop interaction, and a method (RGA) to help
determine the best input-output pairing to form a set of SISO control loops. The goal of this
chapter is severalfold. One is to understand the inherent performance limitations of a
multivariable system due to RHP transmission zeros. Also, multivariable systems exhibit a
"directional sensitivity" that can be detected by performing a singular value decomposition (SVD).
Use of the SVD requires that the gain matrix be properly scaled, so that the scaled inputs and
outputs have roughly the same ranges of expected values.
Two forms of multivariable control are presented in this chapter: decoupling and IMC. The more
commonly used multivariable technique in practice, model predictive control (MPC), is the topic of
Chapter 16.
[ Team LiB ]
[ Team LiB ]
SISO Zeros
For a SISO process transfer function with the form
Equation 14.1
the zeros are the roots of the numerator polynomial, N(s). The inverse of the process transfer
function is
Equation 14.2
That is, the zeros of g(s) are the poles of g–1(s). A RHP zero then results in an inverse transfer
function with a RHP pole, which is unstable. Some model-based control strategies, such as IMC,
make use of a model inverse for control system design. In Chapter 8, we found that the RHP
zeros must be factored out, and that only a portion of the model could be inverted for controller
design.
Equation 14.3
Similar to single variable systems, the multivariable transmission zeros become the poles of the
inverse system. RHP transmission zeros for a particular transfer function matrix then become RHP
poles for the inverse transfer function matrix (that is, the inverse is unstable). Again, a
multivariable controller that simply tries to invert the process model will be unstable.
We illustrate these concepts with the following example. Here we use the symbol z to represent
the zero.
System A
Consider the transfer function matrix, where the time unit is minutes
We can also see that the rank of the G matrix drops to 1 when s = 3 min-1,
since the first column of the matrix is now a multiplicative factor (3) of the second column. Note
that although the zero of the g11 element is -3 min-1, the matrix transmission zero is +3 min -1
(that is, a RHP transmission zero)!
It is possible for an individual element to have a RHP (positive) zero while the matrix transmission
zero is in the left-half-plane (negative); this is illustrated by the following transfer function matrix.
System B
which differs from system A by the RHP zero in the g11(s) transfer function. The determinant of
G(s) is
We can also see that the rank of the G matrix drops to 1 when s = -3,
since the first column of the matrix is (like system A) a multiplicative factor (3) of the second
column. Note that although the zero of the g11 element is +3 (RHP), the matrix transmission zero
is -3 min-1 (that is, a left-half-plane transmission zero).
It is left to the reader to show that the inverse of this matrix has a stable pole at -3 min-1.
An example of a physical process with a RHP transmission zero is shown in Figure 14-1. This is a
laboratory-scale system developed by Johansson (2000) to study the effect of operating condition
on the location of the transmission zeros. The inputs are the voltages to the pumps (v1, v2) and
the outputs are the voltage measurements of the height of liquid in tanks 1 and 2 (y1, y2). The
flow from pump 1 is split between tanks 1 and 4, while the flow from pump 2 is split between
tanks 2 and 3. Depending on the actual flow splits, it is possible to obtain a positive RHP
transmission zero. Numerical details are presented in Example 14.2.
Although this is a "toy" problem, you can see how some processes with recycle might have similar
behavior.
Operating Point 1
which are both in the left-half-plane (so the matrix inverse will be stable).
Operating Point 2
Notice that there is a RHP transmission zero, so the matrix inverse will be unstable. In Exercise 1,
you will find that the feedback control performance of this operating point is severely limited
compared with the first operating point.
The M ATLAB routine for calculating transmission zeros is discussed in Section 14.7.
[ Team LiB ]
[ Team LiB ]
An output scaling matrix can be found to assure that the scaled outputs cover the same range.
Let (*) represent the scaled variables. A diagonal scaling matrix for the output variable is
Equation 14.4
Equation 14.5
Equation 14.6
we find
Equation 14.7
Also,
Equation 14.8
Equation 14.9
yielding the scaled transfer function matrix
Equation 14.10
The cross-sectional area of the tank is 0.581 m2. The steady-state tank height is then 0.86 m,
with a steady-state volume of 0.5 m3 or 500 liters (assume that the tank is half full at steady
state). The input-output transfer function relationship is (see Exercise 3).
Equation 14.11
The time constant unit is minutes, and the units of the gains are
It is interesting that the height time constant is twice the temperature time constant. Notice that
if the height unit was centimeters and the temperature unit was degrees Celsius, the transfer
function matrix would be
Equation 14.12
If, in addition, the time units were seconds, the input-output relationship would be
Equation 14.13
The point of this is that it is very important to understand the units of the variables you are
dealing with, and that the parameters can vary (numerically) by orders of magnitudes depending
on those units.
In this example, the expected range of the manipulated variables is roughly the same, since we
assume that the control valves are designed to handled flows roughly twice the nominal steady-
state values. That is, we expect the manipulated inputs to be bounded between 0 and 50
liters/minute.
Notice that the outputs do not cover the same range. For one thing, the units are different (m for
height, and °C for temperature).
The steady-state value of the tank height is 0.86 m, with a minimum value of 0 m and a
maximum height of 1.72 m. We desire, however, for the height to stay between 20 and 80% of
the full tank level. That is, the height should range from 0.344 to 1.376 m. Since we work in
deviation variables, and it is convenient to cover a range of -1 to 1, then it is natural to scale by
0.516 m (this is found from 0.86 to 0.344). We can then define a scaled y1 variable as y*1, where
Similarly, it is convenient to scale the second output. The approximate range of temperatures is
from 10° to 60°C, with a steady-state value of 35°C. Again, since we are working with deviation
variables and it is natural to consider variations of -1 to 1 in the scaled second output, we use
25°C (obtained from 35°C - 10oC) as the scaling factor. The second scaled output is then
And the scaled output vector is related to the dimensional output vector as
Equation 14.14
Equation 14.15
The gains indicate that the outputs will vary approximately the same order of magnitude (there is
roughly a factor of 3 difference in the gains).
Although not important in this particular example, the inputs can be scaled as well. Since the
steady-state manipulated input flow rates are each 25 liters/minute, and we can assume that the
flows each range from 0 to 50 liters/minute, it is convenient to scale each input by a factor of 25
liters/minute.
Equation 14.16
or
Equation 14.17
Equation 14.18
Now it is clear from the gain matrix that a full manipulated variable move will cause the desired
tank height range to be violated, while the temperature range will be satisfied.
When dealing with dynamic systems, it is always important to know the units of all parameters
and variables, and to understand expected operating ranges for all inputs and outputs. It is
convenient to scale the inputs and outputs such that the expected operating range is -1 to +1; for
one reason, it is easier to compare responses on the same set of plots. Also, some analysis tools
(such as the SVD presented in Section 14.4) can be interpreted only on properly scaled systems.
[ Team LiB ]
[ Team LiB ]
In this section, we first present the SVD technique, followed by the operating window technique.
SVD
The SVD can be used to predict the directional sensitivity of a process. The process gain matrix is
decomposed into three matrices,
Equation 14.19
where U is the left singular vector matrix, S the diagonal matrix of singular values, and V the right
singular vector matrix. The left and right singular vector matrices are both orthonormal matrices;
that is, each column of the matrix is orthogonal to all other columns and the columns each are
unit length. The diagonal singular value matrix is ordered so that the largest singular value is in
the (1,1) position. Note that the standard notation for SVD is to use U to represent the left
singular vector matrix. Please do not confuse this with the u vector commonly used to represent
the vector of manipulated inputs.
The left singular vector matrix indicates the strongest and weakest output directions, while the
right singular vector matrix indicates the strongest and weakest input directions. The ordered
matrix of singular values provides the "magnitude" of the strongest and weakest directions. The
ratio of the minimum and maximum singular values is known as the condition number of the
matrix. Large condition numbers are indicative of ill-conditioned systems, which effectively lose a
degree of freedom (not all inputs are truly independent).
This analysis has the following control-related implications. It is relatively easy to make a setpoint
change in the strongest output direction (indicated by the first column of the left singular vector
matrix), and it is relatively hard to make a setpoint change in the weakest output direction
(indicated by the last column of the left singular vector matrix).
Here we use the mixing tank example to illustrate the use of SVD analysis.
Example 14.3, continued
The singular value decomposition of the mixing tank gain matrix (steady state, s = 0) is (see
Section 14.8 for the MATLAB calculation)
The first column of the U (left singular) matrix indicates that output 1 (liquid height) is the
strongest output direction, while the second column indicates that output 2 (temperature) is the
weakest input direction. The first column of the V (right singular) matrix indicates that the
strongest input direction is to increase (or decrease) both inputs by the same amount, while the
second column indicates that changing both inputs in opposite directions (decreasing one,
increasing the other) results in the weakest effect. The matrix of ordered singular values (S)
indicates that the strongest direction has 3.33 times (2.3575/0.7071) the effect of the weakest
direction.
These results have the following physical interpretation. A simultaneous increase in both the hot
(input 1) and cold (input 2) flow rates will increase the tank height (output 1) but will not change
the outlet temperature (output 2). Similarly, a decrease in the hot flow rate simultaneously with
an increase in the cold flow rate will not change the tank height but will result in a temperature
decrease.
First, consider a simultaneous increase in both flow rates (notice that the "magnitude" of the input
That is, the scaled height increases by 2.3575, but there is no change in temperature. This can be
viewed in Figure 14-3, where the input vector is in the direction (u 1,u2) = (0.71,0.71) and the
output vector is in the direction (y1,y2) = (2.36,0).
notice that the "magnitude" of the input vector is ) and refer to this as
input vector b:
That is, the scaled temperature decreases by 0.7071, but there is no change in height. Notice that
we can construct Figure 14-4, where the "unit circle" on the left represents all possible input
vectors with a length of 1. The input vectors ua and ub are also shown. The ellipse on the right
represents the corresponding set of outputs (obtained from y = Gu). Notice that a is the longest
output vector and b is the shortest. That is, a unit input in the a direction results in an output in
the a direction shown, with a length of the largest singular value. Similarly, a unit input in the b
direction results in the output shown, with a length of the smallest singular value. All other inputs
result in output vectors with lengths between the smallest and largest singular values.
A minor disadvantage of the SVD analysis is the assumption that all possible input vectors are the
same length. For this example, you could argue that it is possible for both the hot and cold flows
to be at their maximum values of 1. A slightly more realistic interpretation of the input-output
mapping is then shown in Figure 14-5.
The output space, in physical (rather than scaled) variables, is shown in Figure 14-6. Notice that
the linear analysis predicts negative height values, which clearly cannot be obtained in practice.
Operating Window
This approach is similar to the "rectangular" mapping shown in the previous example. The idea is
to map the effect of a region of process inputs onto a region of process outputs. Here, simulations
are performed using the steady-state nonlinear model, with various values for the inputs.
Example 14.3, continued
The nonlinear steady-state modeling equations result in the two steady-state output equations
Here it is understood that the steady-state values are being used, so the subscript s has been
neglected. The flow coefficient is under these conditions. For the flows
bounded between 0 and 50 liters/minute each, we find the output region shown in Figure 14-7.
The vessel will overflow for tank heights greater than 1.72 m.
Notice that some high and low temperatures cannot be obtained at heights between 0.86 and
1.72 m; this is also predicted by the "linear rectangle" analysis shown earlier. At low tank heights,
however, the entire temperature range is feasible; this is not predicted by the previous linear
analysis and is a nonlinear effect.
We have shown that the SVD provides insight about the strong and weak input and output
directions. The primary limitation is the assumption of a linear model. Linear models are suitable
for perturbations from a nominal operating point and are generally very useful for control system
design. After all, the purpose of a controller is to maintain the process close to a desired operating
point. However, linear models usually do not predict the behavior of a nonlinear system over the
entire range of operating conditions. To explore a "window" of operating conditions, the nonlinear
model should be used. If operating the process at a different operating point is desired, the model
can be linearized at that point for controller design and analysis. Another limitation to the analysis
presented in this section is that, like the RGA, it is based solely on steady-state information.
Dynamics certainly play an important role, but this steady-state analysis provides a quick
screening tool to understand physical limitations to steady-state operating conditions.
[ Team LiB ]
[ Team LiB ]
Notice that if SISO controllers are used, the controller transfer function matrix is
where gc1 (s) and gc2 (s) will usually be PID-type controllers. The relationship between inputs (both
manipulated and disturbance) and outputs is
Since the error signal is e(s) = r(s) - y(s), we can derive (where I is the identity matrix)
Equation 14.20
This last equation is the closed-loop transfer function relationship for multivariable systems.
Notice that the order of multiplication is very important. In general, GP(s)Gc(s) Gc(s)Gp(s).
This is clear if, for example, Gp is a 4 x 3 matrix and Gc is a 3 x 4 matrix.
For SISO systems, the order of multiplication does not matter; for MIMO systems, it is crucial.
[ Team LiB ]
[ Team LiB ]
14.6 Decoupling
We have seen the problems with control-loop interaction; these occur because a manipulated
input affects more than one controlled output. One approach to handling this problem is known as
decoupling. The idea is to develop "synthetic" manipulated inputs that affect only one process
output each. This approach is illustrated in Figure 14-9.
The relationship between the synthetic input vector and the process output vector is
Equation 14.21
Equation 14.22
where Gp(s)D(s) is a 2 x 2 transfer function matrix. There are a number of possible choices for
the "target" Gp(s)D(s) matrix. Two common ones lead to ideal decoupling and simplified
decoupling.
Ideal Decoupling
One possible choice for Gp(s)D(s) is
Equation 14.23
Equation 14.24
where we use the (~) notation to make it clear that these calculations are performed based on a
process model. The relationship between the synthetic inputs and process outputs, y(s) =
GP(s)D(s)u*(s), that results is
Equation 14.25
and we see that each synthetic input affects only one process output (assuming a perfect model).
The main advantage is that independent SISO tuning parameters can be used for each control
loop. A major disadvantage is that the resulting decoupler is the inverse of the process transfer
function matrix. There are numerous problems with this approach, including the fact that the
decoupler will be unstable if there are RHP transmission zeros associated with the process transfer
function matrix. Also, this type of decoupler is known to be extremely sensitive to model error.
Simplified Decoupling
An alternative approach, known as simplified decoupling, is shown for a 2 x 2 example in Figure
14-10. Here, the decoupling matrix is restricted to the form
Equation 14.26
Here, we specify a decoupled response and the decoupler with the structure in Equation (14.26),
Equation 14.27
Equation 14.28
Notice that the decoupling elements (d12 and d21) are the same as the feed-forward control
design presented in Chapter 10. The effect of the synthetic inputs are being "fed-forward" to
minimize control loop interaction. Similar to feed-forward control, some factorization of the
decoupling elements must be performed to make certain that they are stable and physically
realizable.
The feedback control diagram for simplified decoupling is shown in Figure 14-11. Whether ideal or
simplified decoupling is being implemented, the result is a true multivariable strategy, as shown in
Figure 14-12.
[ Team LiB ]
[ Team LiB ]
14.7 IMC
The IMC design procedure for MIMO systems is similar to the design procedure developed in
Chapter 8 for SISO systems. The IMC block diagram is shown in the Figure 14-13, where the
blocks now represent matrix transfer functions and the inputs and outputs are vectors. We first
use an example to illustrate the multivariable IMC design procedure, then follow with the general
procedure.
There are a number of ways to factor this matrix. The easiest way is to place the RHP
transmission zero on the diagonal of the "bad (noninvertible) matrix."
Since , we can solve for the "good matrix" from , and find that
Assume a perfect model with no disturbances. For l1 = l2 = 0.333 min, in Figure 14-14 we find
the response to a step setpoint change in output 1. Notice that the output response is decoupled,
although both manipulated inputs are changed. Also, although the original g11(s) transfer function
did not have a RHP zero, the multivariable system has inverse response behavior in the closed
loop. It should be noted that, in general, the IMC filter factors (l1 and l2) should be tuned to have
different values.
A major disadvantage to the diagonal factorization is that inverse response appears in all output
setpoint responses. It is also possible to perform a factorization that places all the inverse
response behavior in one of the output variables, resulting in good closed-loop performance in the
other outputs. See Holt and Morari (1985) for more details.
Equation 14.29
The difficulty is that there are many ways to factor the process transfer function matrix. One
way is to place the RHP transmission zero on the diagonal.
Equation 14.30
Although this is perhaps the simplest method, it usually does not result in the best
performance. Other factorization methods are beyond the scope of this text. The motivated
reader should consult Morari and Zafiriou (1989) for more details.
Equation 14.31
Equation 14.32
Equation 14.33
4. The filter factors are adjusted to vary the response and robustness characteristics.
Equation 14.34
and where, as in the SISO case, the "bad stuff" must appear in the output response.
[ Team LiB ]
[ Team LiB ]
Consider first the minimum-phase operating point. First, set all of the individual matrix elements
as follows:
1.4
#2: --------------------
2700 s^2 + 120 s + 1
z = tzero(G)
z =
-0.01733947114395
-0.05947212305895
and we see that both zeros are in the left-half-plane, so the model inverse will be stable.
Consider now the nonminimum-phase operating point. Set all of the individual matrix elements as
follows:
2.5
#2: --------------------
5096 s^2 + 147 s + 1
z2 = tzero(G2)
z2 =
0.01300046557077
-0.05649863406894
The RHP (positive) zero indicates that the matrix inverse will be unstable.
SVD
Here we illustrate the use of svd to perform a SVD, by way of an example.
» [U,S,V] = svd(G_scaled)
U =
1.0000 0.0000
0.0000 -1.0000
S =
2.3575 0
0 0.7071
V =
0.7071 -0.7071
0.7071 0.7071
Then, construct the .mdl diagram shown in Figure 14-15, where the multivariable (MV) IMC
controller block contains the Q object, the plant block contains the G object and the model block is
equal to the plant block for this (ideal) example.
[ Team LiB ]
[ Team LiB ]
14.9 Summary
Transmission zeros are the multivariable equivalent of SISO transfer function zeros. RHP
(positive) transmission zeros indicate that the process inverse will be unstable. A transfer function
matrix may have no individual transfer functions with RHP zeros, and yet have a RHP matrix
transmission zero. Similarly, a transfer function matrix may have an element with a RHP zero,
and yet have no RHP matrix transmission zeros. Processes with RHP transmission zeros have
inherent closed-loop performance limitations; often there is not a significant advantage to full
multivariable control (using decoupling or MV IMC) of these processes.
Multivariable processes exhibit a directional sensitivity, where two different input vector directions
could result in outputs with a significantly different output magnitude. Processes that are ill-
conditioned (high condition number, or ratio of maximum to minimum singular values) will often
be too sensitive for full multivariable control.
Processes with RHP transmission zeros have internal closed-loop performance limitations; often
there is not a significant advantage to full multivariable control (using decoupling or MV IMC) of
these processes.
[ Team LiB ]
[ Team LiB ]
References
The quadruple tank problem (Example 14.2) is presented in the following paper: Johansson, K.
H., "The Quadruple-Tank Process. A Multivariable Laboratory Process with an Adjustable Zero,"
IEEE Trans. Cont. Syst. Tech., 8(3), 456–465 (2000).
Control performance limitations due to RHP transmission zeros is discussed in the following texts
and papers:
Holt, B. R., and M., Morari "Design of Resilient Processing Plants—VI: The Effect of Right-Half-
Plane Zeros on Dynamic Resilience," Chem. Eng. Sci., 40(1), 59–74 (1985).
Morari, M., and E. Zafiriou, Robust Process Control, Prentice Hall, Upper Saddle River, NJ (1989).
Skogestad, S., and I. Postlethwaite, Multivariable Feedback Control: Analysis and Design, Wiley,
New York (1996).
A more detailed discussion of the operating window approach is presented in the following: Marlin,
T. E., Process Control: Designing Processes and Control Systems for Dynamic Performance, 2nd
ed., McGraw Hill, New York (2000).
[ Team LiB ]
[ Team LiB ]
Student Exercises
a. Find the RGA for each operating point. Which variable pairing do you recommend
for each operating point?
2: Find the inverse of the process transfer function matrix for system B in Example 14.1.
Write the dynamic material and energy balances for this system. The material balance
will yield the rate of change of height with respect to time, and the energy balance will
yield the rate of change of temperature with respect to time. Linearize the model at
the steady state to develop the input-output transfer function matrix.
a. First, work with the scaled transfer function matrix and make step input changes
in both the strongest and weakest directions. Compare the magnitudes of the
output responses.
b. Now, work with the dimensional variables. Convert the strongest and weakest
input directions to dimensional inputs and compare the effect of step changes on
the dimensional outputs.
5: Consider Example 14.1, controlled using the multivariable IMC procedure. Use the
SIMULINK diagram and LTI objects shown in Section 14.8.3 to perform simulations for
various tuning parameter (l1 and l2 values). Show that decreasing the tuning
parameter values below 0.333 does not significantly speed up the response but does
increase the manipulated input action.
6: Consider Example 14.1, controlled using the multivariable IMC procedure. Use the
SIMULINK diagram and LTI objects shown in Section 14.8. but revise these for the
minimum-phase (system B) operating point. Since there is not a RHP transmission
zero, no factorization of the process transfer function is necessary. Perform simulations
for various tuning parameter (l1 and l2) values. Show that decreasing the tuning
parameter values to approach 0 leads to almost instantaneous control, at the expense
of large manipulated variable action.
7: Consider Example 14.2 (quadruple tank problem). The modeling equations are
presented in the appendix. Verify that the given steady-state values are correct for
each operating point. Also, linearize and find the state space model and verify the
transfer function matrix that was given for each operating point in Example 14.2.
8: Consider Example 14.2 (quadruple tank problem). Use MATLAB to calculate the
transmission zeros for both operating points.
10: Consider Example 14.3 (mixing tank) with the transfer function matrix shown in
Equation (14.11). Implement the simplified decoupling strategy. Compare this with
static decoupling. Discuss the effect of controller tuning. For setpoint changes of a
reasonable magnitude, make certain that the manipulated input ranges are feasible.
11: Consider a process ("the shower problem") where a cold water stream at 15°C is
mixed with a hot water stream of 50°C. The outputs are the total mixed stream flow
rate and temperature. Assume steady-state flow rates of 0.19 and 0.13 liters/sec for
the cold and hot streams respectively. The steady-state outputs are then 0.32
liters/sec and 29°C. Scale the inputs and outputs to cover appropriate ranges, find the
scaled gain matrix and perform an SVD analysis. What is the condition number? What
are the most sensitive input and output directions (provide a physical interpretation of
this result)? For a rectangular input space where the cold water flow can range from 0
to 0.25 liters/second and the hot water flow can range from 0 to 0.19 liters/sec,
construct the output operating window. Given those input flow limits, is it possible to
operate over a mixed stream flow rate of 0.19 to 0.44 liters/sec, with a mixed stream
temperature between 23 and 34°C?
[ Team LiB ]
[ Team LiB ]
Appendix 14.1
The nonlinear modeling equations for the quad tank process are presented by Johansson (2000).
where
ki = pump coefficient i;
gi = flow splits;
g = gravitational constant
A1,A3 = 28 cm 3
A2,A4 = 32 cm 3
a1,a3 = 0.071 cm2
And the measured outputs are yi = bhi (for i = 1,2). Note that the maximum tank height is 20
cm.
The following states, inputs and coefficients correspond to the two operating points:
Operating point 1
h1s,h2s = 12.4, 12.7 cm
Operating point 2
[ Team LiB ]
[ Team LiB ]
Understand the control strategies associated with equipment/unit operations that are part of
a typical chemical process plant
Understand the "snowball effect" and how to fix a stream flow in the recycle loop to avoid it
Understand the control and optimization hierarchy—that important operation and control
decisions at different corporate levels are made on different timescales
15.1 Background
15.6 Summary
[ Team LiB ]
[ Team LiB ]
15.1 Background
This textbook has emphasized controller design, primarily for SISO control loops. Much attention
has been focused on control algorithms (such as PID or IMC) and tuning [adjusting the PID
parameters, or the IMC "filter factor" (l)]. Some attention has also been paid to control-loop
interaction, particularly for two input–two output systems. Much of what a control or process
engineer does, however, is not related to specific control algorithm and tuning details. A process
engineer must be concerned about the operation of an entire process plant or operating unit, and
not just individual control loops or even unit operations. The issues addressed by a process
engineer are similar to those developed in Chapter 1, but on a much larger scale. At this point,
the plant operating and control objectives are really inseparable, so we repeat from Chapter 1 the
following topics on the development of a control strategy:
What sensors should be paired with what manipulated inputs to form a control structure to
achieve the major objectives?
For any control valve or sensor failure, what steps will a process operator (and control
system) need to take?
Much of this type of discussion occurs during the design [or "retrofit" (redesign)] stage of a
process. Here, process engineers develop and review process flow sheets and process and
instrumentation diagrams (P&ID). Typically, a detailed operational description of the proposed
process and control strategy is developed, with consideration to all possible operating modes that
can be selected by an operator, as well as to all equipment failure modes.
In this chapter, we cannot do justice to the scope of work that is needed to develop a control
strategy and get an automation and control (including the plant!) strategy "up and running." We
attempt to show some of the major issues in "plantwide control" by using some illustrative
examples. In addition to showing examples of the many control loops required by even a simple
process, we provide an overview of the various levels (hierarchy) involved in a chemical
manufacturing organization.
We should note that the term plantwide control is somewhat of a misnomer. Process unit control
is really a more proper term, since an entire chemical process manufacturing plant is usually
composed of a large number of process units. Many of these process units contain reactors and
separators with recycle. In addition, there are recycle flows between many of the process units,
and the units draw from and contribute to many utility streams, such as steam and natural gas.
Although process unit control is a better term, we will continue the tradition of using plantwide
control as the term for regulation of a process unit.
[ Team LiB ]
[ Team LiB ]
and an idealized flow sheet composed of a CSTR and a "perfect separator." An example is shown
in Figure 15-3; a basis of 100 moles/hour of the feedstream (stream 1) is used and the stream
component flow rates are shown directly on the flow sheet. A reactor volume of 200 moles and a
reaction rate constant of 0.6 hr-1 are assumed; this results in a 16% conversion of reactant A to
product B in the CSTR. In addition, the separator perfectly separates component A from B.
Because of the relatively low conversion, a 5:1 recycle/feed stream ratio is required.
Figure 15-4. Idealized flow sheet example with a change in feed flow
rate of 10%.
Notice the tremendous change in the recycle flow rate. A 10% increase in feed flow rate has
resulted in more than doubling the recycle flow rate (from 500 to 1210 moles/hr)! Similarly
consider a 10% decrease in feed flow rate, which results in the stream flow rates shown in Figure
15-5. A 10 moles/time decrease (from the nominal amount of 100 from Figure 15-3) has led to a
decrease in the recycle stream flow rate from 500 to 230 moles/hr. You are encouraged to work
Exercise 1 to verify these results.
Figure 15-5. Idealized flow sheet example with a change in feed flow
rate of -10%.
This extreme sensitivity to small disturbances, illustrated by Example 15.1, has been termed the
"snowball effect" by Luyben (see Plantwide Process Control by Luyben et al., 1999). To minimize
this effect, Luyben et al. suggest that one of the flows within the recycle system be fixed. For
example, consider the strategy shown in Figure 15-6. Here, the flow rate of the mixed stream to
the CSTR is maintained at a constant value by manipulating the feedstream flow. The more
complete control instrumentation diagram is shown in Figure 15-7. Another alternative is to fix
the flow rate of stream 3 (between the CSTR and column) by using a flow controller on stream 3,
and to control the CSTR volume by manipulating the fresh make-up (stream 1) flow rate (see
Exercise 2).
Equation 15.1
It is easy to show that the closed-loop dynamics can be substantially longer than the individual
time constants. This is an interesting result because it indicates that individual unit operations in a
recycle system may be designed for relatively fast behavior, yet the dominant timescale of the
entire recycle system can be substantially longer. This is illustrated by the following example.
Equation 15.2
We also neglect any dynamic behavior of the recycle process and assume that it can be
characterized as a constant gain (kR) between 0 and 1. The resulting input-output relationship is
[from Equations (15.1) and (15.2)]
Equation 15.3
Notice that, as the recycle gain approaches 1, the effective gain and time constant increase
dramatically. This effect is also shown in Figure 15-9, where a unit step input has been applied at
t = 0 min. The response of the forward path (kR = 0) is rapid with a magnitude of 1, while larger
recycle gains cause slower responses with larger magnitude. This is an interesting result, since a
recycle process with no dynamics has caused a tremendous increase in the time constant of the
overall (forward + recycle path) system. For kR = 0.9 with a forward time constant of 1 minute,
the overall dynamic time constant is 10 minutes. In Example 15.6 in Section 15.6 a physically
based recycle system with similar changes in time constant are shown.
[ Team LiB ]
[ Team LiB ]
Using supply-side control, a change in the flow rate setpoint propagates downstream as a
disturbance to all units that follow. In demand-side control, a flow rate setpoint change
propagates upstream to all units that precede the unit. Luyben (1999) has studied demand-side
control structures for complex flow sheets and finds that they often add additional lags and create
control problems, particularly when distillation columns are involved. This causes greater product
variability, so the supply-side structure is generally recommended.
Compressor Control
It is more economical to condense a vapor stream and pump it than to vaporize a liquid stream
and compress it. Gas compressors are often used on recycle streams composed of light
components (hydrogen, methane, etc.). For these systems, it is not economical to condense the
streams and pump them as liquids.
Compressors that operate at a constant speed are usually controlled using one of the strategies
shown in Figure 15-11. Usually the "pinch" method will have lower operating costs than the
"spillback" method. Variable speed control methods are shown in Figure 15-12 for an electric
motor drive and for a steam turbine drive. The operating costs of variable speed compressors are
generally lower than for fixed speed systems, with perhaps a slightly higher initial capital cost.
When compressors are used on recycle streams, Douglas (1988) generally recommends that they
be operated "wide open"; that is, at a constant maximum flow rate. This is because the economic
return from the increased overall yield usually outweighs the incremental operating cost of the
compressor.
Heat Exchangers
Heat exchangers are used in a large number of temperature-control services, so here we focus on
the regulation of the exit temperature of a cold process stream that is exchanging heat with a hot
process stream. A common application would be a feed/effluent exchanger for a chemical reactor.
Three possible strategies are shown in Figure 15-13. The preferred method will often be that
shown in Figure 15-13c, since the dynamics will be much faster than for the other two strategies
shown. A change in the cold bypass flow rate has an almost immediate effect on the cold stream
outlet temperature.
Operating Levels
The actual operation of a chemical manufacturing company involves decisions and actions that
occur at a number of levels and timescales, as shown in Figure 15-15. At the corporate level,
allocation decisions are made. Market demand projections, raw material availability, and past
operating costs are used to set long-term plans for corporate-wide optimization. These decisions
are typically made on an infrequent basis—weekly, monthly, or quarterly. Often these decisions
are made using linear programming (LP) techniques. This information is passed to the plant level.
At the next level are plant decisions about allocation among various plant operating units. These
may be made daily, or even more frequently, depending on the plant automation and control
system. For example, steam may be generated by a number of different sources, with different
costs, depending on relative energy and product values. In an oil refinery, different units make
similar components for blending into gasoline (which is produced in many different grades), and
these relative amounts may change depending on energy and product values, operating problems
with certain units, and so forth.
The operating unit level takes information available on a daily basis and over the course of the
day makes hour-by-hour changes, on average, to meet those goals. The unit operation level
involves individual equipment, and desired setpoints may be changed on an hourly (or more
frequent) basis. The regulation on this level occurs on the order of minutes.
The fundamental control level consists primarily of process flow or pressure controllers. The
lowest level generally involves the manipulation of a control valve, or the reading of a sensor,
where the time frame is on the order of 1 second or less. Notice that there is a feedback of
information from the lower levels back up to the higher levels. The basic idea of feedback control
occurs at the unit operation and fundamental control levels. Here, control algorithms are used to
adjust manipulated inputs (controller outputs or control variables) to maintain process outputs
(process variables) at desired values (setpoints).
[ Team LiB ]
[ Team LiB ]
The objective is to produce MPN at a specified rate, while satisfying product purity constraints. In
Figure 15-17, there are nine control valves, representing nine degrees of freedom. Also shown are
13 measurements: seven flow, three level, two temperature, and one pressure. Clearly, there are
not enough degrees of freedom to specify a setpoint value for every measured variable. Inventory
variables, such as level and pressure, must be controlled; without feedback, these integrating
variables could easily violate alarm limits. This means that four control valves must be used to
control the three levels and the column pressure.
We consider it an important exercise for the reader to attempt to place nine control loops on
Figure 15-17. Please do this before reading any further.
1. The production rate objective should be satisfied by the methanol flow rate controller, since
there is essentially total conversion of the methanol to MPN.
2. The excess ACN is obtained by specifying the ACN flow rate to be 2% higher than the
methanol flow rate.
4. The reactor level (related to residence time) is controlled by manipulating the reactor outlet
flow valve. Notice that there are now only five more loops that can be specified, since there
are a total of nine control valves. The final five loops are associated with the distillation
column; three of these are associated with inventory variables (distillate receiver level,
bottoms level, column pressure).
5. A temperature in the bottom of the column manipulates the steam control valve. Because of
equilibrium relationships, the temperature is related to the product purity.
6. The reflux stream is simply flow controlled. An alternative would be to control a tray
temperature in the top of the column; this would be related to controlling the distillate
purity. Since the distillate stream is recycled to the reactor, it is not considered important to
maintain the stream composition at a given value.
7. The distillate receiver level is controlled by manipulating the distillate (or recycle) flow valve.
8. The column pressure is controlled by manipulating the condensate flow. This essentially
changes the level of condensate in the overhead condenser, changing the effective heat
transfer area, and therefore the condenser duty.
9. The column bottom level is maintained by manipulating the bottom control valve.
The main problem with this solution is that the control structure exhibits a high sensitivity in the
recycle flow rate to small disturbances. This so-called snowball effect was discussed in Section
15.2. Luyben et al. (1999) have recommended that at least one control loop in the recycle flow
path be flow controlled in order to minimize the snowball effect.
Alternative Solution 1
An alternative solution [designated plantwide control structure 1 by Zhan and Grassi (1999)] is
shown in Figure 15-19. Here, a flow controller is used to regulate the mixed stream (recycle +
ACN) flow rate by manipulating the distillate (recycle) flow rate; this allows the control structure
to minimize the snowball effect. The distillate level controller manipulates the fresh ACN flow
control valve. The other seven loops are identical to the previous solution shown in Figure 15-18.
There are some alternative solutions that include flow control of a recycle loop stream. For
example (alternative 2), the reactor outlet stream can be flow controlled. The reactor level can
then be controlled by manipulating the ACN feed-flow valve (see Exercise 3). In addition, a
reactor concentration sensor can be used to improve control (again, see Exercise 3).
The primary reaction is an irreversible reaction of toluene and hydrogen to produce benzene and
methane, while the secondary reaction is the reversible reaction of benzene to form diphenyl and
hydrogen
Equation 15.4
The selectivity decreases as the temperature increases. It is clear that a purge stream is
necessary to eliminate methane from the process system.
We consider it an important exercise for the student to attempt to place control loops on Figure
15-20. Please do this before analyzing the suggested solution shown in Figure 15-21. Use the
following suggestions to guide your control structure development.
Luyben et al. (1999) recommend placing a flow control loop on a stream in the recycle path.
For this process, they suggest placing the recycle toluene stream on flow control.
Douglas (1988) recommends operating recycle compressors "wide open" because the value
of recovered components is usually higher than the additional compressor power cost.
A tray temperature in each column can be used to "infer" a product composition. Dual
composition control for the columns is not necessary, and this petrochemical plant has had
good success by placing reflux streams under flow control.
Notice that there are 23 control degrees of freedom, since there are 23 control valves. It is not
necessary that all these valves be used for feedback control; one or more valves may be held at a
constant valve position.
One possible solution to the HDA problem is shown in Figure 15-21. This solution was developed
by Luyben et al. (1999). The important control structure decisions to note are as follows:
The total toluene flow (recycle + feed) is set to prevent the snowball effect (recall that it is
recommended that one loop in a recycle system be placed on flow control). Notice that this
flow also sets the production rate of benzene.
The makeup (feed) toluene flow is manipulated by the recycle column distillate receiver level
controller. Your intuition may suggest that there would be a significant lag between the feed
flow, through the various unit operations, to the final distillation column. This is not the case,
however, since the total toluene flow is regulated. Any change in toluene feed has an
immediate effect on the recycle toluene flow and, hence, the distillate receiver level.
The overhead valve from the flash drum is set wide open to allow maximum flow through
the recycle compressor. The flash drum operating pressure is then dictated by pressure drop
through the system, since the pressure is controlled at the reactor entrance.
Since the diphenyl flow rate from the recycle column is so low, the level is controlled by the
reboiler heat duty (steam to the reboiler).
The benzene purity is maintained using a cascade strategy, where the output of the
composition controller is the setpoint to a tray temperature controller. This strategy yields a
faster rejection of feed disturbances and provides satisfactory composition control when the
composition sensor fails or needs recalibration.
It should also be noted that only the basic control strategy is presented. In practice, ratio, feed
forward, and cascade control will be added for improved control. Also, the control techniques
presented in Section 15.3 can be used.
Although computer simulation packages are widely available, a process engineer often gains
insight about operating and design decisions using simple "back of the envelope" calculations, as
shown in the next example.
Toluene recycle (stream 10) flow: n10 = (1-XT)/XT, where XT is the single-pass conversion of
toluene in the reactor.
Hydrogen make-up (stream 2) flow: n2 = 1/(0.96-y7,H ), where y7,H is the mole fraction of H2 in
the purge stream (stream 7).
Equation 15.5
Two of the major operating costs are the hydrogen make-up (raw material) and vapor recycle
(stream 8, compressor costs). We can now quickly calculate the hydrogen make-up flow and
vapor recycle as a function of the toluene conversion and hydrogen purge fraction. For example,
consider a single pass toluene conversion of 0.7. The following table (Table 15-1) is quickly
constructed; additional rows can be generated by considering other toluene conversions (see
Student Exercise 4). Notice that there is a direct trade-off of hydrogen raw material costs with
recycle compressor operating costs. Douglas (1988) finds that the incremental raw material cost
is higher than the incremental recycle compression costs for these types of processes.
Consideration of the secondary reaction in Equation (15.4) results in the simplified flow sheet
shown in Exercise 5.
[ Team LiB ]
[ Team LiB ]
15.6 Simulations
SIMULINK provides a nice modeling environment for simulating very simple process flow sheets. For
rigorous process design and analysis, chemical process flow sheeting packages such as ASPEN
PLUS and HYSYS should be used. Flow sheets can quickly be developed using standard "icons"
that represent unit operations, such as reactors and separators. This next example illustrates the
use of SIMULINK to solve a flow sheet similar to Example 15.1.
Equation 15.6
Consider a step change in the feed composition of A from 0.9 to 1.0 mole fraction. The results for
the recycle system are compared with the "straight through" system without recycle in Figure 15-
26. Notice that the recycle system has a tremendous change in the separator product stream
(recycle flow) compared to the no-recycle case. As discussed in Section 15.2 (and Example 15.2),
the recycle system has a large gain and time constant compared to the system without recycle.
[ Team LiB ]
[ Team LiB ]
15.7 Summary
This chapter has provided a brief overview of perhaps the most interesting and challenging
aspects of process control. The intuitive placement of controllers on a process with recycle can
often lead to extreme sensitivity to disturbances known as the snowball effect. This effect can be
minimized by fixing the flow rate of one stream in the recycle loop.
Recycle can also significantly increase the dynamic timescale of the process. The specification of a
plantwide control structure is based on years of operational experience with similar plants and will
involve input from a large number of engineers and technicians. If you are interested in a much
more detailed presentation of plantwide control, including many "rules of thumb" and other
suggestions, the book by Luyben et al. (1999) is highly recommended.
Corporations have a large number of levels where decisions need to be made (Section 15.4). The
various levels range from the long-term corporate purchasing and scheduling decisions at the top,
to fundamental control instrumentation at the bottom, as shown in Figures 15-15 and 15-16.
[ Team LiB ]
[ Team LiB ]
References
The MPN process is presented and discussed by in the following: Zhan, Q., and V. G. Grassi,
"Dynamic Matrix Control of a Specialty Chemical Plant with Different Plantwide Control
Structures," in Proceedings of the 1999 American Control Conference, pp. 632–636 (1999).
The best reference for plantwide control is the following monograph: Luyben, W. L., B. D. Tyréus,
and M. L. Luyben, Plantwide Process Control, McGraw Hill, New York (1999).
Plantwide strategies are also discussed in the following papers and textbook:
Ponton, J. W., and D. M. Laing, "A Hierarchical Approach to the Design of Process Control
Systems, Trans. Inst. Chem. Eng., 71(A), 181–188 (1993).
Stephanopoulos, G., Chemical Process Control, Prentice Hall, Englewood Cliffs, NJ (1984).
Problems with "on-demand" control structures are discussed in the following: W. L. Luyben,
"Inherent Dynamic Problems with On-Demand Control Structures," Ind. Eng. Chem. Res., 38,
2315–2329 (1999).
The following book provides a nice treatment of the synthesis of chemical process flow sheets to
meet design objectives. Once the process is designed, Douglas recommends that recycle streams
be operated at a constant maximum flow rate, since the resulting yield improvements are worth
the additional energy costs.
Douglas, J. M. Conceptual Design of Chemical Processes, McGraw Hill, New York (1988).
The Tennessee Eastman "challenge problem" (Exercise 6) was presented in the following paper:
Downs, J. J., and E. F. Vogel, "A Plant-Wide Industrial Process Control Problem," Comp. Chem.
Engng., 17, 245–255 (1995).
[ Team LiB ]
[ Team LiB ]
Student Exercises
1: Consider Example 15.1. Assume that the isothermal CSTR has perfect level control; that
is, the volume is constant. The CSTR contains 200 moles, and the reaction rate constant
is 0.6 hr -1. Verify the results shown in Figures 15-3, 15-4 and 15-5.
2: Consider Example 15.1. Revise Figure 15-7 to obtain the following alternative control
strategy. Draw the control instrumentation diagram obtained by fixing the flow rate of
stream 3 (between the CSTR and column) by using a flow controller on stream 3, and to
control the CSTR volume by manipulating the fresh make-up (stream 1) flow rate.
3: Consider the MPN example. Alternative 2 is shown here. Now, consider the use of a
reactor concentration sensor. Let the reactor concentration controller manipulate the
methanol feed flow rate. Sketch this control strategy on the diagram. Which controller
setpoint is set to yield a desired production rate?
4: Consider the simplified flow sheet shown in Figure 15-22 (Example 15.5).
a. From material balances find the relationships for all flows as a function of hydrogen
fraction in the purge stream and the single-pass toluene conversion in the reactor.
c. Based solely on the current raw material costs (neglecting capital and energy
b.
c.
costs) of hydrogen and toluene, can a profit be obtained with a hydrogen purge
concentration of 0.5 mole fraction?
5: Consider the "back of the envelope" calculations for the HDA process (Example 15.5). In
our first pass at material balances, we neglected the diphenyl formation. Now, consider
the selectivity of conversion to toluene and include diphenyl material balances. The
additional separator is shown in the flow sheet here.
a. Find how the raw material, recycle, and benzene product flows change as a
function of toluene conversion, selectivity (fraction of toluene converted to
benzene vs. overall conversion of toluene) and hydrogen purge fraction. Construct
a table similar to Table 15-1.
b. Based solely on the current raw material costs (neglecting capital and energy
costs) of hydrogen and toluene, can a profit be obtained with a hydrogen purge
concentration of 0.5 mole fraction and a selectivity of 0.95?
6: A Tennessee Eastman "challenge problem" was published by Downs and Vogel in 1993
(see the references section of this chapter). A fairly large number of academic studies
have been performed on plantwide control problems. Conduct a literature review on this
topic, read at least two articles, and compare the different control techniques proposed.
7: Most process plants have three steam header pressure levels, approximately 15 psig,
150 psig, and 600 psig. Discuss possible answers to the following:
What determines the pressure level needed for a particular unit operation?
How would you control the pressure of each of the steam headers?
How would you determine the cost of various levels of steam? If some low
pressure steam were being released to the atmosphere to maintain the steam
balance (and the low pressure header at 15 psig), what should be the incremental
cost of this steam to give an economic reward using it for heating needs?
[ Team LiB ]
[ Team LiB ]
After studying this chapter, the reader should understand the basic ideas behind SISO MPC,
including the following:
Tuning parameters such as prediction and control horizons and control weight
The effect tuning parameters have on the control performance and stability
16.1 Motivation
16.6 MATLAB
16.7 Summary
[ Team LiB ]
[ Team LiB ]
16.1 Motivation
Most of the techniques presented in this textbook have been based on continuous-time models.
The controllers are normally implemented by microprocessors and, therefore, must be converted
to discrete time before implementation. We have focused on continuous time because few
changes in the techniques are needed for the discrete-time case. One advanced control technique
that has solely had discrete-time application is model predictive control (MPC). MPC is by far the
most commonly applied advanced control technique in the chemical process industry, so it is
worth devoting a chapter to it. One major contributor to the success of MPC is the ability to
handle constraints in an optimal fashion. The optimization-based procedure is intuitive and is also
a natural way of handling multivariable systems.
Basic Description
The basic idea behind MPC is shown in Figure 16-1. At each time step, k, an optimization problem
is solved, as illustrated on the top half of the figure. An objective function (usually quadratic)
based on output predictions over a prediction horizon of P time steps is minimized by a selection
of manipulated variable moves over a control horizon of M control moves. Although M moves are
optimized, only the first move is implemented. After uk is implemented, the measurement at the
next time step, yk+1 is obtained, as shown in the bottom half of the figure. A correction for model
error is performed, since the measured output yk+1 will, in general, not be equal to the model
predicted value. A new optimization problem is then solved, again, over a prediction horizon of P
steps by adjusting M control moves. This approach is also known as receding horizon control.
[ Team LiB ]
[ Team LiB ]
Objective Functions
Here, there are several different choices for objective functions. The first one that comes to mind
is a standard least-squares or "quadratic" objective function. The objective function is a "sum of
squares" of the predicted errors (differences between the setpoints and the model-predicted
outputs) and the control moves (changes in control action from step to step).
A quadratic objective function for a prediction horizon of 3 and a control horizon of 2 can be
written
where represents the model predicted output, r is the setpoint, Du is the change in manipulated
input from one sample time to the next, w is a weight for the changes in the manipulated input,
and the subscripts indicate the sample time (k is the current sample time). For a prediction
horizon of P and a control horizon of M, the least-squares objective function is written
Equation 16.1
Another possible objective function is to simply take a sum of the absolute values of the predicted
errors and control moves.
For a prediction horizon of 3 and a control horizon of 2, the absolute value objective function is
which has the following general form for a prediction horizon of P and a control horizon of M:
Equation 16.2
The optimization problem solved is usually stated as a minimization of the objective function,
obtained by adjusting the M control moves, subject to modeling equations (equality constraints),
and constraints on the inputs and outputs.
Equation 16.3
Least-squares formulations are by far the most common objective functions in MPC. Least
squares yields analytical solutions for unconstrained problems and penalizes larger errors
(relatively) more than smaller errors. The absolute value objective function has been used in a
few algorithms because a linear programming (LP) problem results. LPs are routinely solved in
large-scale scheduling and allocation problems. For example, an oil company often uses an LP to
decide how to distribute oil to various refineries and to decide how much and what product to
produce at each plant. This topic was discussed in Chapter 15. The LP approach is not useful for
model predictive control, because the manipulated variable moves often "hop" from one extreme
constraint to another. For the rest of this chapter we use a quadratic (least squares) formulation
for the objective function.
Models
Many different types of models are possible for calculating the predicted values of the process
outputs, which are used in evaluating the objective function. Since the outputs are evaluated at
discrete-time steps, it makes sense to use discrete models for the output prediction. Here, we
review step and impulse response models (introduced in Chapter 4), both of which are used in
common MPC algorithms.
FSR models are obtained by making a unit step input change to a process operating at steady
state. The model coefficients are simply the output values at each time step, as shown in Figure
16-2. Here, si represents the step response coefficient for the ith sample time after the unit step
input change. If a non-unit step change is made, the output is scaled accordingly.
Equation 16.4
where the model length N is long enough so that the coefficient values are relatively constant
(i.e., the process is close to a new steady state).
Another common form of model is a finite impulse response (FIR). Here, a unit pulse is applied to
the manipulated input, and the model coefficients are simply the values of the outputs at each
time step after the pulse input is applied. As shown in Figure 16-3, h i represents the ith impulse
response coefficient.
Equation 16.5
Figure 16-4 illustrates how impulse response coefficients can be obtained from step responses.
The impulse response coefficients are simply the changes in the step response coefficient at each
time step. Similarly, step response coefficients can be found from impulse responses; a step
response coefficient is the sum of the impulse response coefficients to that point. It should be
noted that there are two major limitations to step and impulse response models. They can only be
used to represent open-loop stable processes, and they require a large number of parameters
(model coefficients) compared to state space and transfer function models.
Equation 16.6
Equation 16.7
where k is the model prediction at time step k, and uk – N is the manipulated input N steps in
the past.
Note that the model-predicted output is unlikely to be equal to the actual measured output at
time step k. The difference between the measured output (yk) and the model prediction is called
the additive disturbance.
Equation 16.8
The "corrected prediction" is then equal to the actual measured output at step k,
Equation 16.9
Similarly, the corrected predicted output at the first time step in the future can be found from
Equation 16.10
So, for the jth step into the future, we find
Equation 16.11
and we can separate the effects of past and future control moves
Equation 16.12
The most common assumption is that the correction term is constant in the future (this is the
"constant additive disturbance assumption"):
Equation 16.13
Also, realize that there are no control moves beyond the control horizon of M steps, so
In matrix-vector form, a prediction horizon of P steps and a control horizon of M steps, yields
Equation 16.14
which we write using matrix-vector notation
Equation 16.15
Equation 16.16
where the future predicted errors are composed of "free response" (E) and "forced response"
(–Sf Duf ) contributions.
Equation 16.18
Equation 16.19
and
Equation 16.20
Equation 16.21
subject to the modeling equation equality constraint (16.17)
Equation 16.17
Equation 16.22
The solution for the minimization of this objective function is (see Appendix 16.2)
Equation 16.23
Notice that the current and future control move vector (Duf) is proportional to the unforced error
vector (E). That is, a controller gain matrix, K, multiplies the unforced error vector (the future
errors that would occur if there were no control move changes implemented).
Because only the current control move is actually implemented, we use the first row of the K
matrix, and
Equation 16.24
1. Develop a discrete step response model with length N (16.4), based on a sample time Dt.
4. All calculations assume deviation variable form, so remember to convert to/from physical
units.
4.
The effect of all of these tuning parameters is now discussed for SISO systems.
Model-length and sample-time selection are not independent. The model length should be
approximately the "settling time" of the process, that is, the time required to reach a new steady
state after a step input change. For most systems, the model length will be roughly 50
coefficients. The sample time is usually on the order of one tenth the dominant time constant, so
the model length is roughly the settling time of the process.
Prediction and control horizons differ in length. Usually, the prediction horizon is selected to be
much longer than the control horizon. This is particularly true if the control weighting factor is
selected to be zero. Usually, if the prediction horizon is much longer than the control horizon, the
control system is less sensitive to model error. Often P = 20 or so, while M = 1–3.
Control weighting is often set to zero if the prediction horizon is much longer than the control
horizon. As the control horizon is increased, the control moves tend to become more aggressive
so a larger weight is needed to penalize the control moves.
Ordinarily, we would select a sample time of roughly 0.5 minutes, and a model horizon of 50.
Here we select a sample time of 1 minute to study the effect of other tuning parameters. The step
response coefficients generated from this plant are shown in Figure 16-5. We can see that a
model length of at least 20 should be used, since that is when the output is reasonably close to
steady state.
and K1 = K since the control horizon (M) is 1 (the reader should verify these numerical results
using MATLAB), the feedback gain matrix is:
in the simulations shown, the process is initially at steady state when the unit step setpoint
change at t = 1 minute is made. Since deviation variables are used, the values of all previous
manipulated inputs and outputs are 0. The unforced error vector, E, from Equation (16.16) is (we
have transposed it to a row vector to save space)
where the measured state (output) is the concentration of the second component and the
manipulated input is the dilution rate. The manipulated input-output process transfer function for
the reactor is
The discrete step response model is shown in Figure 16-8, for a sample time of 0.1 minute. Notice
that a model length of at least 35 is needed to capture the complete dynamic behavior.
Figure 16-8. Step response coefficients for the van de Vusse example.
Sample time = 0.1 minutes, model length, N = 50.
Effect of Prediction Horizon
A sample time of 0.1 minute, a model length of N = 50, and a control horizon of M = 1 are used
in the following simulations. For this particular example, the prediction horizon does not appear to
have an appreciable effect, as shown in Figure 16-9; the setpoint tracking performance is roughly
the same for prediction horizons of P = 10 and 25. There is a lower limit, however, to the length
of the prediction horizon that can be used. A prediction horizon of 7 or less results in an unstable
closed-loop system, as shown in Figure 16-10. This is not due to any model error, since we have
assumed a perfect model in these simulations. If the prediction horizon is too short, the initial
step response coefficients dominate. Since these are negative while the later coefficients are
positive (corresponding to a positive process gain), the prediction is really in error. The effect is
the same as using a PID controller with a controller gain that is the wrong sign.
[ Team LiB ]
[ Team LiB ]
Equation 16.25
which is suitable for minimum and maximum flowrates, for example. In addition, velocity
constraints that limit the magnitude of the control moves at each sample time have the following
form
Equation 16.26
where ordinarily, Dumin = –Dumax. To use a standard quadratic program (QP), the constraints in
(16.25) need to be written in terms of the control moves, Duk+i. Since the previously
implemented control action (uk–1 ) is known, we can write
Equation 16.27
and so on. Since the manipulated input constraints are enforced over the control horizon of M
steps, (16.25) and (16.27) yield
Equation 16.28
Most standard QP codes use a "one-sided" form
Equation 16.29a
and
Equation 16.29b
Equation 16.30
The majority of constrained MPC problems can be solved based on the input constraints
considered above. For completeness, however, we also show how constraints on the process
outputs can be included.
It may be desirable to force the predicted process outputs to be within a range of minimum and
maximum values
Equation 16.31
Here we first rewrite Equation (16.15) in the following form
Equation 16.32
where f, the free response of the "corrected-predicted output" (if no current and future control
moves are made) is
Equation 16.33
Equation 16.34
Equation 16.35
Equation 16.36
Equation 16.37
where the matrices and vectors in the objective function are
Equation 16.38
and the inequality matrices, A and b, in (16.37) incorporate the matrices in (16.29) and (16.35),
with appropriate dimensionality. For example, if there are no output constraints, then A and b are
Equation 16.39
Futher presentation is beyond the scope of this text. Example m-files for the study of constrained
systems will be placed on the book web page.
Multivariable Systems
In this chapter we have focused on single input–single output processes. One reason that MPC
has been so widely applied is that it naturally handles multivariable systems. The same basic
ideas presented in this chapter hold for the multivariable case, but the formulation for step
response models in a DMC framework is somewhat tedious. We recommend that you use the
Model Predictive Control Toolbox to perform multivariable studies.
[ Team LiB ]
[ Team LiB ]
Model predictive heuristic control (MPHC) was developed in France and received initial applications
in the French petroleum refining industry. The software was called IDCOM for "identification and
command." This work is summarized by Richalet et al. (1978). A finite impulse response model is
used, and the desired setpoint trajectory over the prediction horizon is first order.
IDCOM-M, developed by Setpoint, Inc. (now part of ASPEN Technology), differs from IDCOM in a
number of ways. In addition to handling multivariable processes, it includes constraint handling,
where hard constraints can be ranked in terms of priority. Also, rather than considering outputs
over an entire prediction horizon, each output is controlled at a specific point in the future
(termed the coincidence point).
Generalized predictive control (GPC) arose from adaptive control research, where model
parameters are continuously updated to account for changing process dynamics. It is geared
toward SISO processes and has had few major industrial applications. Clarke (1988) provides an
overview of some applications.
MPC Research
Many of the "classical" MPC approaches used in industry have performance limitations, which we
summarize here.
Model structure. The finite step and impulse response models limit applications to open-loop
stable processes and require many model coefficients to describe the response (indeed, even
a first-order system with two parameters may require 50 or more step response
coefficients). Integrating systems have been handled by formulating the derivative of an
integrating output as the controlled output.
Disturbance assumption. In Chapter 8 we found that the standard IMC design may not
handle input disturbances very well, since it is formulated for output disturbances. Similarly,
DMC uses a "constant output disturbance" assumption. This may not yield good performance
if the real disturbance occurs at the plant input.
Finite horizons. We found in the examples presented in Section 16.3 that control
performance could deteriorate if the prediction or control horizons were not formulated
correctly, even if the model was perfect.
Model type. The step and impulse response models are all linear. For some processes
(exothermic reactors) where the process operating conditions are changed frequently
(different product specifications for each consumer, for example), a single linear model may
not describe the dynamic behavior of the process over the wide range of conditions. Batch
processes also operate over a wide range of conditions. For these systems, better control
performance may be achieved if nonlinear models are used.
Much academic research has gone into developing approaches to solving these problems. It is
now recognized that there are many advantages to using discrete state space models. State
space models require fewer model parameters than step and impulse response models to describe
process behavior. State space models also provide more flexibility for disturbance estimation.
State estimation techniques can be easily formulated to handle input disturbances, for example.
State estimation also allows unstable systems to be controlled. This is discussed by Muske and
Rawlings (1993), for example.
Infinite horizon approaches can be used to guarantee closed-loop stability. Although it may seem
impossible to solve an optimization problem over an infinite horizon, linear models have analytical
solutions, allowing rapid computations to be performed. This topic is covered by Muske and
Rawlings (1993).
Nonlinear models can be used to improve performance, compared with linear models. Reviews of
these approaches are provided by Bequette (1991) and Henson (1998). An alternative is to
include several linear models to approximate the nonlinear system over a range of operating
conditions. The linear models can then be "scheduled" or "interpolated" so that the best linear
model approximation to the nonlinear process is used at a particular operating condition. An
application to drug infusion during surgery is discussed by Rao et al. (2001).
[ Team LiB ]
[ Team LiB ]
16.6 Matlab
There is an MPC Toolbox available through Mathworks. It is recommended if you are going
perform many MPC simulations, especially if you are working with multivariable systems.
For those without the MPC Toolbox, simple m-files that can be modified for problems of interest
are presented in Appendix 16.3. It is suggested that you download these files from the course
web page and use them for Problems 1 and 2. For each new problem, simply insert the new
continuous state space model at the appropriate location in the dmcsim.m file.
[ Team LiB ]
[ Team LiB ]
16.7 Summary
MPC is the most widely applied advanced control technique in industry. Our presentation focused
on DMC, which has achieved a great deal of success in the petroleum refining and petrochemicals
industries. Most MPC techniques have been based on step or impulse response models, but there
has been a recent trend toward state space models. New mathematical techniques are making it
easier to develop state space models from plant data. Regardless of the model type, the same
basic ideas are used. At the current time step, future process output predictions are based on two
contributions: the free or unforced response (how the outputs will change if no further control
moves are made) and the forced response (the effect of current and future control moves on the
predicted outputs). In DMC, the free response is the effect of the past control moves and the
additive correction term, while the forced response is the effect of the current and future (to be
calculated) control moves.
We studied two simple examples to develop a basic understanding of how to tune SISO model
predictive controllers. When using step or impulse models, it is important to make certain that the
model length (N) is long enough to capture the steady-state change; although not discussed, it is
important to "filter," or smooth, the step response data. We found that it is also important to
make certain that the prediction horizon (P) is long enough to avoid stability problems,
particularly for systems with inverse response behavior. Generally, control horizons (M) are much
shorter than are prediction horizons, yielding more robust performance. A disadvantage of MPC is
that there are many parameters (model length, prediction horizon, control horizon, manipulated
input weighting, and even sample time) that affect the closed-loop performance.
M control horizon (N P M)
P prediction horizon (P M)
N model length (N P)
Sf dynamic matrix
S vector of step response coefficients
Spast matrix, used for effect of past control moves
[ Team LiB ]
[ Team LiB ]
Camacho, E.F., and C. Bordons, Model Predictive Control, Springer-Verlag, London (1999).
Clarke, D.W., "Application of Generalized Predictive Control to Industrial Processes," IEEE Control
Syst. Mag., April, pp. 49–55 (1988).
Cutler, C.R., and B.L. Ramaker, "Dynamic Matrix Control—A Computer Control Algorithm," in
Proc. Joint Automatic Control Conference, San Francisco, CA, Paper WP5-B (1980).
Garcia, C.E., and A.M. Morshedi, "Quadratic Programming Solution of Dynamic Matrix Control
(QDMC)," Chem. Eng. Commun., 46, 73–87 (1986).
Garcia, C.E., D.M. Prett, and M. Morari, "Model Predictive Control: Theory and Practice—A
Survey," Automatica, 25, 335–348 (1989).
Maciejowski, J.M., Predictive Control: with Constraints, Prentice Hall, Harlow, England (2002).
Marchetti, J.L., D.A. Mellichamp, and D.E. Seborg, "Predictive Control Based on Discrete
Convolution Models," Ind. Eng. Chem. Proc. Des. Dev., 22(3), 488–495 (1983).
Morari, M., and J.H. Lee, "Model Predictive Control: Past, Present and Future," Comp. Chem. Eng.,
23, 667–682 (1999).
Muske, K., and J.B. Rawlings, "Model Predictive Control with Linear Models," AIChE J., 39(2),
262–287 (1993).
Qin, S.J., and T.A. Badgwell, "An Overview of Industrial Model Predictive Control Technology,"
Proceedings of the Fifth Conference on Chemical Process Control, AIChE Symp. Ser. 316, Vol. 93,
pp. 232–256 (Kantor, J.C., C.E. Garcia, and B. Carnahan, Eds.), (1997).
Richalet, J.A., A. Rault, J.D. Testud, and J. Papon, "Model Predictive Heuristic Control: Applications
to Industrial Processes," Automatica, 14, 413–428 (1978).
Shah, S.L., "A Tutorial Introduction to Constrained Long Range Predictive Control," Pulp Pap.
Can., 96(4), 57–63 (1995).
Allgower, F., T.A. Badgwell, J.S. Qin, J.B. Rawlings, and S.J. Wright, "Nonlinear Predictive Control
and Moving Horizon Estimation—An Introductory Overview," Advances in Control: Highlights of
ECC '99, Ch. 12, pp. 391–449, (P.M. Frank, Ed.), Springer-Verlag, Berlin/New York (1999).
Bequette, B.W., "Nonlinear Control of Chemical Processes: A Review," Ind. Eng. Chem. Res., 30,
1391–1413 (1991).
Henson, M.A., "Nonlinear Model Predictive Control: Current Status and Future Directions," Comp.
Chem. Eng., 23, 187–202 (1998).
Lee, J.H., and N.L. Ricker, "Extended Kalman Filter Based Nonlinear Model Predictive Control,"
Ind. Eng. Chem. Res., 33(6), 1530–1541 (1994).
Meadows, E.S., and J.B. Rawlings, "Model Predictive Control," in Nonlinear Process Control, pp.
233–310 (M.A. Henson and D.E. Seborg, Eds.), Prentice Hall, Upper Saddle River, NJ (1997).
Sistu, P.B., and B.W. Bequette, "Model Predictive Control of Processes with Input Multiplicities,"
Chem. Eng. Sci., 50(6), 921–936 (1995).
Rao, R., C.C. Palerm, B. Aufderheide, and B.W. Bequette, "Experimental Studies on Automated
Regulation of Hemodynamic Variables," IEEE Engineering in Medicine and Biology Magazine,
20(1), 24-38 (Jan/Feb, 2001).
[ Team LiB ]
[ Team LiB ]
Student Exercises
1: Reproduce the DMC simulations for the van de Vusse reactor shown in Figures 16-9 and
16-10 using the files shown in Appendix 16.3 (also, you may download these files from
the book web page).
2: Run the DMC simulations for the van de Vusse reactor, for a prediction horizon of 10
(and a model length of 50). Vary the control horizon and discuss the effect; for
example, if M = 5, the manipulated input resembles a "pulse" change. Also, try different
weighting on the manipulated input and discuss the effect.
3: Consider a biochemical reactor operated at a stable operating condition (Module 7), with
the state space model
where the input is the dilution rate (units = min-1) and the output is the biomass
concentration (gmol/L). Modify the DMC simulation code presented in Appendix 16.3 to
simulate the MPC applied to this system. Use a sample time of 0.05 hours and discuss
the effect of model length, prediction horizon, and control horizon on the performance
for setpoint changes of 0.02 gmol/L. Consider the effect of these parameters on the
magnitude of manipulated input changes. What are your recommended tuning
parameters if the maximum manipulated input change is 0.2 min-1?
Modify the DMC simulation code presented in Appendix 16.3 to simulate MPC applied to
this system. Use a sample time of 0.05 hours and discuss the effect of model length,
prediction horizon, and control horizon (remember that N > P > M) on the performance
for setpoint changes of 5°F. Consider the effect of the tuning parameters on the
manipulated input changes (that is, is the change in jacket temperature reasonable?).
[ Team LiB ]
[ Team LiB ]
However, assuming that all step response coefficients greater than step N are equal to the value
at step N (this is only true for stable systems with a long model horizon), we can write
[ Team LiB ]
[ Team LiB ]
Unconstrained System
The minimization with respect to the control move vector, when there are no constraints, is
Equation 16.23
Constrained System
The objective function for a constrained system is no different than the unconstrained
and
The constraints
[ Team LiB ]
[ Team LiB ]
Appendix 16.3
Use the following files to reproduce the van de Vusse simulations shown in Figure 16-9. These are
based on an unconstrained DMC strategy. Files for the constrained formulation, involving qp and
quadprog from the optimization toolbox, are available on the book web page.
dmcsim.m
% dmcsim
%
% 26 Oct 00 - revised 4/5 Aug 01 for Chapter 16 - MPC
% b.w. bequette
% unconstrained DMC simulation, calls: smatgen.m and dmccalc.m
% currently contains van de vusse reactor model and plant
%
% MPC tuning and simulation parameters
n = 50; % model length
p = 10; % prediction horizon
m = 1; % control horizon
weight = 0.0; % weighting factor
ysp = 1; % setpoint change (from 0)
timesp = 1; % time of setpoint change
delt = 0.1; % sample time
tfinal = 6; % final simulation time
noise = 0; % noise added to response coefficients
%
t = 0:delt:tfinal; % time vector
kfinal = length(t); % number of time intervals
ksp = fix(timesp/delt);
r = [zeros(ksp,1);ones(kfinal-ksp,1)*ysp]; % setpoint vector
%
% ----- insert continuous model here -----------
% model (continuous state space form)
%
a = [-2.4048 0;0.8333 -2.2381]; % a matrix – van de vusse
b = [7; -1.117]; % b matrix – van de vusse
c = [0 1]; % c matrix – van de vusse
d = 0; % d matrix – van de vusse
sysc_mod = ss(a,b,c,d); % create LTI "object"
%
% ----- insert plant here -----------
% perfect model assumption (plant = model)
ap = a;
bp = b;
cp = c;
dp = d;
sysc_plant = ss(ap,bp,cp,dp);
%
% discretize the plant with a sample time, delt
%
sysd_plant = c2d(sysc_plant,delt)
[phi,gamma,cd,dd] = ssdata(sysd_plant)
%
% evaluate discrete model step response coefficients
%
[s] = step(sysc_mod,[delt:delt:n*delt]);
%
% generate dynamic matrices (both past and future)
%
[Sf,Sp,Kmat] = smatgen(s,p,m,n,weight);
%
% plant initial conditions
xinit = zeros(size(a,1),1);
uinit = 0;
yinit = 0;
% initialize input vector
u = ones(min(p,kfinal),1)*uinit;
%
dup = zeros(n-2,1);
sn = s(n); % last step response coefficient
x(:,1)= xinit;
y(1) = yinit;
dist(1) = 0;
%
% set-up is done, start simulations
%
for k = 1:kfinal;
%
du(k) = dmccalc(Sp,Kmat,sn,dup,dist(k),r(k),u,k,n);
% perform control calculation
if k > 1;
u(k) = u(k-1)+du(k); % control input
else
u(k) = uinit + du(k);
end
% plant equations
x(:,k+1) = phi*x(:,k)+gamma*u(k);
y(k+1) = cd*x(:,k+1);
% model prediction
if k-n+1>0;
ymod(k+1) = s(1)*du(k) + Sp(1,:)*dup + sn*u(k-n+1);
else
ymod(k+1) = s(1)*du(k) + Sp(1,:)*dup;
end
% disturbance compensation
%
dist(k+1) = y(k+1) - ymod(k+1);
% additive disturbance assumption
% put input change into vector of past control moves
dup = [du(k);dup(1:n-3)];
end
%
% stairs plotting for input (zero-order hold) and setpoint
%
[tt,uu] = stairs(t,u);
[ttr,rr] = stairs(t,r);
%
figure(1)
subplot(2,1,1)
plot(ttr,rr,'--',t,y(1:length(t)))
ylabel('y')
xlabel('time')
title('plant output')
subplot(2,1,2)
plot(tt,uu)
ylabel('u')
xlabel('time')
smatgen.m
dmccalc.m
function [delu] = dmccalc(Sp,Kmat,sn,delup,d,r,u,k,n)
%
% for use with dmcsim.m
% b.w. bequette
% 2 oct 00
% calculate the optimum control move
%
% first, calculate uold = u(k-n+1)...u(k-n+p)
%
[m,p] = size(Kmat);
uold = zeros(p,1);
for i = 1:p;
if k-n+i>0;
uold(i) = u(k-n+i);
else
uold(i) = 0;
end
end
dvec = d*ones(p,1);
rvec = r*ones(p,1);
y_free = Sp*delup + sn*uold + dvec;
e_free = rvec-y_free;
delu = Kmat(1,:)*e_free;
[ Team LiB ]
[ Team LiB ]
17.4 Notation
[ Team LiB ]
[ Team LiB ]
Chapters
Chapter 1 provided the motivation for process control, while Chapter 2 introduced fundamental
models. Chapter 3 presented dynamic behavior, with a focus on transfer functions. Chapter 4
covered the development of empirical models, including continuous time step responses, as well
as the identification of parameters for discrete-time models. Chapter 5 provided an introduction to
the analysis of closed-loop control strategies, introducing the idea of a block diagram. Chapter 6
presented PID controller tuning techniques, followed by frequency response analysis in Chapter 7.
Many advanced control techniques rely on the use of a process model embedded in the control
strategy; Chapter 8 covers the Internal Model Control strategy. Internal model controllers can
often be rearranged to form a PID controller, as shown in Chapter 9. Improved disturbance
rejection is the main motivation of the cascade and feedforward techniques presented in Chapter
10. Enhancements to PID control, including autotuning, integral windup protection, and nonlinear
approaches are discussed in Chapter 11. Ratio, split-range and selective controllers are presented
in Chapter 12. The interaction of multiple SISO loops, with the RGA as the main analysis tool, is
developed in Chapter 13. In Chapter 14, right-half-plane transmission zeros indicate dynamic
performance limitations; the singular value decomposition provides insight about possible steady-
state performance limitations. The topic of plantwide control is the focus of Chapter 15, followed
by model predictive control in Chapter 16. Specific topics are presented in the pages that follow.
Identify the control objective and the state, output, manipulated, and disturbance variables
Linearize the nonlinear model about the steady state to find the state-space model
Given experimental step responses, the reader should be able to estimate parameters for low-
order transfer function models that match the measured process output.
Relate the location of a pole in the complex plane to the speed of response
Consider a first-order + dead time transfer function (Why does the first-order Padé
approximation for dead time provide a good approximation for the response to a step input?
Hint: Think of RHP zeros.)
Given a physical process with feedback control (a process instrumentation and control diagram),
the reader should be able to do the following:
Draw the block diagram for any type of feedback control (all variables should be clearly
identified on the block diagram
For a given block diagram, the reader should be able to do the following:
Derive the closed-loop transfer functions (for example, relate the setpoint to the output for a
feedback control scheme)
For a given process transfer function, the reader should be able to do the following:
Use the Routh stability criterion to determine if a closed-loop system is stable (the
denominator of your closed-loop transfer function will usually be a polynomial with an order
of 2–4
Determine the range of tuning parameter values that will yield a stable feedback system if
the controller tuning parameters are not given
Use the direct synthesis method to find a control algorithm that yields a desired closed-loop
response. Find the corresponding PID parameters if the controller has PID form (sometimes
in series with lead-lag)
Calculate the poles and discuss the response characteristics for a closed-loop transfer
function that results in a first or second-order polynomial
Discuss the response characteristics if you are given the closed-loop poles for a higher order
closed-loop polynomial
Given a Bode diagram of gc(w)gp(w), be able to do the following:
Use that information to calculate the amount of additional deadtime allowable before
instability occurs
Understand the relationship between Bode and Nyquist plots (How is the information from a
Bode plot translated to the Nyquist diagram? How is information of the Nyquist diagram
translated to a Bode plot?)
Understand that the closed-loop Ziegler-Nichols method is equivalent to finding the proportional
controller gain where the phase angle is –180o when the open-loop (gc*gp) amplitude ratio is one.
Determine the magnitude of the output from the transfer function at low input frequencies
and at high input frequencies
Be able to handle the complete IMC design procedure for a given process transfer function:
Factor gp(s) into minimum-phase and nonminimum-phase elements {good [gp-(s)] vs. bad
[gp+(s)] stuff}
Invert the minimum phase elements to form the ideal IMC controller
Cascade the ideal IMC controller with a filter that is high enough order to form a physically
realizable IMC controller
Determine what the closed-loop response will look like for an IMC scheme with a perfect
model
Understand the effect of l, the IMC filter time constant, on the closed-loop response (How
does l impact the robustness? A good first guess for tuning l is to use roughly one third to
one half the dominant time constant, depending on the amount of time-delay and model
uncertainty; note that l has units of time)
Know that the IMC-based PID procedure will give the same closed-loop results as the IMC
strategy when there are no time delays (the behavior will be different when there are time
delays because the IMC-based PID procedure uses a Padé approximation for the time delay)
Use ARW techniques (controllers with integral action can exhibit "reset windup" when the
manipulated input becomes constrained)
Renumber the inputs and outputs such that the favorable RGA pairings appear on the
diagonal of the new gain matrix
Realize that you should never pair on a negative or zero relative gain
Find the structure of the control matrix that corresponds to the RGA pairing that has been
selected
Find the closed-loop transfer functions for any multivariable block diagram
For a system with more than two inputs and two outputs, the reader should know the following:
To check the RGAs of all reduced-order structures (this is to make certain that when a
control loop is out of service, the reduced order system is not failure sensitive)
Place control loops on a process flow sheet (one heuristic is that one stream in a recycle loop
should be under flow control)
Understand the basic idea behind MPC. For the step response-based technique of DMC,
understand
Are longer prediction horizons (P) more robust than shorter ones?
Are shorter control horizons (M) more robust than longer ones?
Modules
The modules in the final section of the text provide detailed application examples to illustrate the
techniques presented in the Chapters. Module 1 reviews MATLAB, while Module 2 covers SIMULINK.
Numerical integration of ordinary differential equations using MATLAB is presented in Module 3,
while Module 4 presents useful functions available in the Control System Toolbox. An isothermal
CSTR with a series/parallel reaction structure (the van de Vusse reaction) is studied in Module 5.
Frequency response techniques are used to analyze the classic first-order + dead time model in
Module 6. Biochemical reactors and the classic exothermic CSTR are convered in Modules 7 and 8,
respectively. Steam and surge drum level control problems differ significantly, as presented in
Modules 9 and 10. Batch reactors are studied in Module 11, followed by biomedical systems in
Module 12. Linear and nonlinear effects in distillation are discussed in Module 13. A set of case
studies is summarized in Module 14; these are particularly useful for open-ended final projects in
a typical process control course. Flow and digital control, Module 15 and Module 16, complete the
text.
[ Team LiB ]
[ Team LiB ]
Statistical process control (SPC): SPC is used by process engineers and operators to
determine if a process is producing a product that is meeting specified quality targets. SPC
techniques attempt to differentiate between normal statistical deviations in product quality
and deviations due to operating problems (these may be control related)
Advanced digital control techniques: An introduction to the most important advanced control
technique, model predictive control (MPC), was presented in Chapter 16. There are a large
number of important topics in MPC that were not presented. These include the use of
different types of models (linear step response models were covered), different model
updating techniques (output additive disturbance was covered), and different objective
functions (least squares over a finite prediction horizon was covered). Nonlinear models and
adaptive linear models can also be used.
Inferential control: Very often the most important process variable (product quality or
property) cannot be measured on-line. Other measurements must be used to "infer" the
quality variable; one example is to use tray temperature in distillation to infer the distillate
purity.
Noise filtering: In practice, measurements are corrupted by noise. Often "filters" are used to
"average" recent measurements to obtain a better estimate of the actual value.
Specific control system hardware and software: We have chosen not to cover specific
hardware or software for automation projects in detail. Although important in the actual
implementation of a control project, we feel that the role of the process engineer is to
specify control objectives, determine the proper measured variables, etc. Instrumentation
specialists and other project engineers will be involved with many of the detailed
specifications necessary to complete an automation project.
The point of the previous paragraph is that you, as a process engineer, do not operate in
isolation. There are many people involved in the operation of a chemical process, no matter which
industry you are working in. There is an entire history to the operation of a particular process,
and you will not be expected to be an expert overnight. You need to be willing, however, to listen
and learn from the experiences of others. At the same time, you need to realize that not
everything you will be told will be technically correct and that some information is biased (due to
management and labor relation issues, etc.). You will need to achieve a delicate balance between
believing everything you are told and being so skeptical that you believe nothing.
So, will you be deriving equations, manipulating block diagrams, and using the Routh stability
criterion on a daily basis? In all probability, no. But hopefully this textbook has given you some
basic knowledge of dynamics and control that you can use in a broad, qualitative sense. Without
explicitly trying, you will probably begin to think in terms of inputs, outputs, and objectives. You
will begin to develop a feel for the order of magnitude of an effect of an input change on an
output. You will naturally perform "back of the envelope" calculations based on material and
energy balances to understand these relationships (for example, if the steam flow to an
exchanger changes by a certain amount, how much do you expect the process fluid temperature
to change?).
Eventually, as you learn more about the process, you may conceive ideas to improve the control
of the process. There is no better way to develop better control strategies than to achieve a
deeper knowledge of the process. The best "loop-tuner" in the world will not achieve good control
loop performance if a bad input-output pairing is made to begin with.
It should also be noted that the probability of a failure or technical problem occurring between 8
am and 5 pm on Monday–Friday is roughly 27% (you do the math), so 73% of failures and
technical problems occur outside the normal working hours of a process engineer. If the technical
problem is critical to continued process operation (remember, many of these operating units are
producing several $ million/day of product), and you are the process engineer "on-call," you will
likely be called in to help solve the problem. This is usually exciting (sometimes you may wish for
less excitement in your life), sometimes with almost an "emergency room" sense of urgency as
you and many others try and troubleshoot/solve the problem.
[ Team LiB ]
[ Team LiB ]
For books with many practical tips and present numerous application examples, read the
following:
Shinskey, F. G. Feedback Controllers for the Process Industries, McGraw Hill, New York (1994).
Shinskey, F. G., Process Control Systems. Application, Design and Tuning, 4th ed., McGraw Hill,
New York (1996).
The plantwide process control book by Luyben et al. provides numerous unit operation and entire
flow-sheet examples.
Luyben, W. L., B. D. Tyréus, and M. L. Luyben, Plantwide Process Control, McGraw Hill, New York
(1999).
For a more detailed coverage of linear systems analysis and an introduction to nonlinear systems
behavior and analysis, read the following textbook:
Bequette, B. W., Process Dynamics: Modeling, Analysis and Simulation, Prentice Hall, Upper
Saddle River, NJ (1998).
For a nice introduction to robust control system design for multivariable systems, read the
following:
Skogestad, S., and I. Postlethwaite, Multivariable Feedback Control: Analysis and Design, Wiley,
New York (1996).
This textbook focuses on chemical process control. For a discussion of the differences between
process control and other control fields (both practice and education), see the following article:
Bequette, B. W., and B. A. Ogunnaike, "Chemical Process Control Education and Practice," IEEE
Control Syst. Mag., 21(2), 10–17 (2001).
[ Team LiB ]
[ Team LiB ]
17.4 Notation
A Jacobian state space—relates states to the state derivatives
l load (disturbance)
input
first-order transfer
function, gp(s)
NMP nonminimum phase a NMP process has right-half-plane zeros and/or time delays
PM phase margin indication of "phase uncertainty" that can be tolerated (usually
used to find the amount of time delay that can be tolerated)
PID proportional-integral-
derivative (ideal)
PID proportional-integral-
derivative (ideal)
PID proportional-integral-
derivative (real)
RGA relative gain array used for variable pairing and interaction analysis
[ Team LiB ]
[ Team LiB ]
Student Exercises
1: Why must the process transfer function be factored in the IMC design procedure? (For
example, what happens if the process dead time is not factored out? Also, what
happens if a RHP zero is not factored out?)
3: Since you are a young process engineer with a good theoretical process-control
background, your boss asks you to work on a problem in the catalytic reforming unit.
The process has been having trouble maintaining yield specifications and your boss
suspects that part of the problem could be due to the control system. You review the
process flow sheets and then proceed to the process unit. Your next step is to do which
of the following:
a. Begin discussing, with the process operator, a recent theoretical article from the
International Journal of Unapplied Incomprehensible Control. You discuss the
various ramifications of pole/zero cancellation, robustness with respect to
parameter uncertainty, and so forth, and relate this theoretical treatise to
problems in the process unit.
b. Grab a cup of coffee and sit down and discuss the most recent local high school
football game with the process operator. After a while, begin to direct the
conversation to the subject of the catalytic reforming process and discuss
possible operating changes that have occurred during the past few weeks.
Equation 1
The tuning parameters for an IMC-based PI controller (not the "improved" version) are
(from Table 9-2 in the text): kc = 1/l, tI = 1. Assuming a Padé approximation for dead
time, the approximate model is
Find the value of kc which brings the approximate closed-loop system to edge of
instability, using the Routh stability criterion.
b1. If your answer to a is yes, what are the recommended pairings [will these
pairings assure stability if one of the loops must be opened (think about the 2 x 2
subsystems)]? Reorder the inputs and outputs such that the paired variables are
on the diagonal of the new G(0) matrix. Show the new G(0) matrix and the new
L matrix.
b2. If your answer to a is no, do you recommend a reduction to two loops? If so,
what are your recommendations for input-output pairings for this system?
7: The objective of the following process is to produce a product stream with a desired
composition. The composition of the product stream is a function of the inlet
temperature. The inlet temperature is a function of the steam pressure on the shell
side of the feed preheat exchanger. Draw the proper connections of all of the
controllers and the valve shown in the following diagram. Draw the corresponding
block diagram, labeling all signals, controllers, and measurement devices.
8: Consider the process and instrumentation diagrams shown in the surge vessel level
control figure below, where the surge vessels are assumed to be cylindrical.
i. For which orientation can the surge vessel best be modeled as a linear process?
Why?
ii. Choose the vessel that you want to analyze. Assume that the steady-state flow
rate is 100 gallons/minute, and that the vessel has a residence time of 5 minutes
when half-filled with liquid (assume the vessel is one half full at steady state).
Assume a length/diameter ratio of 2:1. Also, assume that the control valve
(which has a linear valve characteristic) is designed to be one half open at the
steady-state operating point. For simplicity, assume that the controller output is
the flow rate of the outlet stream.
b.
b. Discuss the advantages and disadvantages of having a fail-open valve.
Question: What are the values for the process parameters, kp and tu? Hints: Can the
final value theorem be used? Can the Routh stability criterion be used?
10: Type I diabetics must deliver themselves insulin shots several times each day, in an
effort to maintain blood glucose values within a desirable range. Portable infusion
pumps that provide a continuous delivery of insulin are becoming widely available, and
there has been a large effort to develop sensors that provide a continuous blood
glucose measurement. The ultimate goal is to create an "artificial pancreas" by forming
a feedback control system where blood glucose is the measured process variable and
insulin infusion rate is the manipulated input variable.
The Bergman minimal model (with 3 states) has the following input-output third-order
transfer function relationship
b. For a proportional-only controller, what value of controller gain will cause the
closed-loop system to become unstable? Show the units for the proportional gain.
c. For any stable controller, what is the long-term insulin infusion rate change for a
step glucose setpoint change of –1 mmol/liter? What is surprising or interesting
about this result, compared to those of "non-integrating" systems?
[ Team LiB ]
[ Team LiB ]
Enter matrices
Make plots
M1.1 Background
M1.5 Plotting
M1.8 m-Files
[ Team LiB ]
[ Team LiB ]
M1.1 Background
MATLAB is an interactive program for numerical computation and data visualization. It is produced
by MATHWORKS, which has the following URL:
http://www.mathworks.com
You can find answers to frequently asked questions (FAQ) on this homepage. Also, there are a
number of technical notes that give more information on using many M ATLAB features. The
MATHWORKS issues a new release of MATLAB every 1–2 years. At the time of the writing of this
textbook, the most recent release was MATLAB 6.5 (Release 13). This is the first release since
MATLAB 5.2.1 (Release 10) to support the Macintosh (OS 10). The figures presented in this module
are from MATLAB 6.1, while much of the rest of the textbook was generated using MATLAB 5.2.1.
When you start MATLAB, a desktop similar to that shown in Figure M1-1, with three basic work
areas, appears; alternative layouts can be obtained using the "View" pull-down menu. In the
upper left corner, when "Launch Pad" is toggled, you will find the M ATLAB and SIMULINK toolboxes
available with your current MATLAB license. Examples using SIMULINK functions are provided in
Module 2. The right-hand work area is known as the command window; this is where most of
your MATLAB commands will be entered. It is also the focus of this tutorial module. The lower left
work area toggles between the current directory and the history of recent commands that you
have entered in the command window.
This tutorial provides a brief overview of essential MATLAB commands that are entered in the
command window. You will learn this material more quickly if you use MATLAB interactively as you
are reviewing this tutorial. The M ATLAB 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 3.1415926535897....
PI = 4*atan(1) = imag(log(-1)) = 3.1415926535897....
so we see that MATLAB has the number p "built in." Notice that although MATLAB reports the
function in uppercase letters, lowercase is actually used when entering the function in the
command window.
[ Team LiB ]
[ Team LiB ]
Transposing each vector results in the following, where the superscript 'T' represents a transpose:
A 3 x 2 matrix has three rows and two columns, as shown by the matrix G:
Notice that the ij subscript refers to the element in the ith row and jth column.
Dimensional consistency is very important in matrix operations. Consider the matrix operation
To be dimensionally consistent, the number of columns in G must be equal to the number of rows
in H. When considering matrix multiplication, it is convenient to write the dimensions underneath
the matrices. For a G matrix with mg rows and ng columns, and an H matrix with nh columns,
then the rest of the dimensions must be
The ijth element of F is found in the following fashion:
» x = [1,3,5,7,9,11]
x =
1 3 5 7 9 11
Notice that a row vector is the default in MATLAB (in contrast to the default column vector used by
this and most other textbooks). Instead of commas, we could have used spaces as the delimiter
between columns
» x = [1 3 5 7 9 11]
There is a faster way to enter matrices or vectors that have a consistent pattern. For example,
the following command creates the previous row vector
» x = 1:2:11
where the first element is 1, the increment is 2, up to the final element of 11. Transposing a row
vector yields a column vector (' is the transpose command in MATLAB),
» y = x'
y =
1
3
5
7
9
11
If we want to make x a column vector, we use a semicolon as the delimeter between rows:
» x = [1;3;5;7;9;11]
x =
1
3
5
7
9
11
» x = x'
Say that we want to create a vector z, which has elements from 5 to 30, by increments of 5. To
suppress the listing of vector elements, we add a semicolon at the end (;):
» z = 5:5:30;
The z vector is generated but not printed in the command window. We can find the value of the
third element in the z vector, z(3), by typing
» z(3)
ans =
15
Matrix multiplication is straightforward. First, enter the two-dimensional matrix (here a semicolon
is used to begin a new row):
»a = [1 2;3 4; 5 6]
a =
1 2
3 4
5 6
» b = [1 2 3;4 5 6]
b =
1 2 3
4 5 6
Remember that the order of multiplication of matrices is important (AB BA, in general)
» c = a*b
c =
9 12 15
19 26 33
29 40 51
» d = b*a
d =
22 28
49 64
» e = a.*a
e =
1 4
9 16
25 36
Similarly, element-by-element division, b(i,j)/c(i,j), can be performed using ./
[ Team LiB ]
[ Team LiB ]
» who
Your variables are:
ans x y z
leaving 621420 bytes of memory free.
More detail about the size of the matrices can be obtained by typing whos.
» [m,n]=size(x)
m =
1
n =
6
where m 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
» size(x)
ans =
1 6
» length(x)
ans =
6
It should be noted that MATLAB is case sensitive with respect to variable names. An X matrix can
coexist with an x matrix.
Sometimes it is desirable to clear all of the variables in a Workspace. This is done by simply
entering
» clear
in the command window. More frequently you may wish to clear a particular variable, such as x
» clear x
This is particularly true if you are performing a new calculation of x and the new vector is shorter
than the old vector. If the new vector has length n, then all of the elements of the new x greater
than x(n) will contain values of the previous x vector.
[ Team LiB ]
[ Team LiB ]
» i
ans =
0 + 1.0000i
» sqrt(-3)
ans =
0 + 1.7321i
Note that these variables (i and j) can be redefined (as the index in a for loop, for example).
[ Team LiB ]
[ Team LiB ]
M1.5 Plotting
MATLAB has many nice graphics capabilities. Here, we will illustrate standard two-dimensional
plots. First, generate two vectors for plotting
» x = 1:2:11;
» z = 5:5:30;
» plot(x,z)
and Figure M1-2 appears. Axis labels are added by selecting "Insert" and specifying X label or Y
label. Alternatively, in the command window you can use the following commands (perform this):
» xlabel('x')
» ylabel('z')
» help plot
If we wish to plot discrete points, using + as a symbol, we can use the following (perform this):
» plot(x,z,'+')
Notice that a new plot appears in the place of the previous one. You can generate a new figure by
entering figure(n), where n is any integer, before entering new plot commands.
We can plot this for a vector of t values using two simple commands,
» t = 0:1:50;
» y = 4*exp(-0.1*t);
and we can obtain a plot by entering in the command window (perform this)
» figure(2)
» plot(t,y)
Notice that we could shorten the sequence of commands by entering (perform this)
» plot(t,4*exp(-0.1*t))
To perform element-by-element multiplication of two vectors or arrays of the same size, we can
use the .* command. We can plot the function y(t) = t·e –0.1t by using (perform this)
» figure(3)
» y = t.*exp(-0.1*t);
» plot(t,y)
» xlabel('t')
» ylabel('y')
axis('square') will place the plot in a square box, while axis('normal') will change back to a
normal aspect ratio.
You can also explicitly set the upper and lower bounds on the plot with
Multiple curves can be placed on the same plot in the following fashion (perform this).
» plot(t,4*exp(-0.1*t),t,t.*exp(-0.1*t),'--')
The subplot command can be used to make multiple plots, as illustrated in Figure M1-3.
Here, subplot(i,j,k) means that there are i "rows" of figures, j "columns" of figures, and the
current plot is the kth figure (counting left to right and top to bottom). The following is an
example of a four plot sequence shown in Figure M1-4:
» t = 0:1:60;
» subplot(2,2,1),plot(t,4*exp(-0.1*t)), xlabel('t')
» subplot(2,2,2),plot(t,t.*exp(-0.1*t)), xlabel('t')
» subplot(2,2,3),plot(t,sin(.25*t)), xlabel('t')
» subplot(2,2,4),plot(t,cos(.25*t)), xlabel('t')
[ Team LiB ]
[ Team LiB ]
» v = [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 (where : indicates all rows, while the 1
indicates the first column)
» v(:,1)
ans =
1
3
5
7
9
11
» v(:,2)
ans =
5
10
15
20
25
30
And we can construct the same plot as before by using the following plot command ('--' gives a
dashed line):
» plot(v(:,1),v(:,2),'--')
[ Team LiB ]
[ Team LiB ]
» for k = 1:5001;
t(k) = (k-1)*0.01;
y(k) = sin(t(k));
end
Another way of implementing the same loop is to increment t from 0 to 50 in intervals of 0.01:
» k = 0
» for t = 0:0.01:50;
k = k + 1;
y(k) = sin(t);
end
The developers of MATLAB highly recommend that you use the vectorized version of the above for
loops:
t = 0:0.01:50;
y = sin(t);
since the computation time for this method is over 200 times faster than the nonvectorized
methods.
[ Team LiB ]
[ Team LiB ]
M1.8 m-Files
Thus far we have shown the interactive features of MATLAB by entering one command at a time.
One reason that MATLAB is powerful is that it is a language, and programs of MATLAB code can be
saved for later use. There are two ways of generating your own MATLAB code: script files and
function routines.
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 number of times, it
is much easier to generate a script file.
The following example is for the so-called quadratic map (population model)
where xk represents the value of the population (dimensionless) at the kth time step. We have
titled the file popmod.m. Use the MATLAB text editor to generate this file and save it in a working
directory as popmod.m.
% popmod.m
% population model, script file example
%
clear x,k
n = input('input final time step ');
alpha = input('input alpha ');
xinit = input('input initial population ');
x(1) = xinit;
time(1)= 0;
for k = 2:n+1;
time(k) = k-1;
x(k) = alpha*x(k-1)*(1-x(k-1));
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 by the program.
Function Routines
A more powerful way of solving problems is to write MATLAB function routines. Function routines
are similar to subroutines in FORTRAN. Consider the previous example.
where we generate and save a file titled pmod.m. We can now "run" this function routine (using
alpha = 2.8, xinit = 0.1, n = 30) by typing the following in the MATLAB command window:
» [tstep,xpop]=pmod(2.8,0.1,30);
» plot(tstep,xpop)
This function routine can also be called by other function routines. This feature leads to
"structured programming"; structured programs are easy to follow and debug.
The first step is to generate a function file, which we will call fcn (any name can be used). For
this simple example, the function file can consist of two lines,
function y = fcn(x)
y = x^2 - 2*x -3;
and can be saved as fcn.m. The user must enter the following command in the command window,
where 0 is the initial guess. Notice that fzero calls the fcn routine, using an initial guess for the
solution,
» y = fzero(@fcn,0)
y = -1
We know that there will be two solutions, since this is a quadratic equation. Indeed, an initial
guess of x = 2 yields the following result:
» y = fzero(@fcn,2)
y = 3.0000
Since the function is a polynomial, we can use a function developed for polynomial solutions. The
MATLAB function roots finds the solution to the quadratic equation, using
» roots([1 -2 -3])
ans =
3
-1
[ Team LiB ]
[ Team LiB ]
[ Team LiB ]
[ Team LiB ]
[ Team LiB ]
[ Team LiB ]
Additional Exercises
1: Plot the following three curves on a single plot and a multiple plots (using the subplot
command): 2 cos(t), sin(t), and cos(t)+sin(t). Use a time period such that two or three
peaks occur for each curve. Use solid, dashed, and + symbols for the different curves.
Use roughly 25–50 points for each curve.
2: a. Calculate the rank, determinant, and matrix inverse of the following matrices (use
help rank, help det, and help inv):
with the initial condition x1(0) = x2(0) = 1. Use ode45 (Module 3) and plot your results.
[ Team LiB ]
[ Team LiB ]
The easiest way to learn how to use S IMULINK is to implement each step of the tutorial, rather than
simply reading it. The basic steps to using SIMULINK are independent of the platform (PC, MAC,
UNIX, ...).
M2.1 Background
M2.5 Summary
[ Team LiB ]
[ Team LiB ]
M2.1 Background
The first step is to start up MATLAB on the machine you are using. In the Launch Pad window of the
MATLAB desktop, select S IMULINK and then the SIMULINK Library Browser. A number of options are
listed, as shown in Figure M2-1 for SIMULINK 4 (Release 12); SIMULINK 5 (Release 13) has a number
of additional options. Notice that Continuous has been highlighted; this will provide a list of
continuous function blocks available. Selecting Continuous will provide the list of blocks shown in
Figure M2-2. The ones that we often use are Transfer Fcn and State-Space.
The s-polynomials in the process transfer function were entered by double clicking on the
transfer function icon and entering the coefficients for the numerator and denominator
polynomials. Notice also that the default step (used for the step input change) is to step from a
value of 0 to a value of 1 at t = 1. These default values can be changed by double clicking the
step icon. The simulation parameters can be changed by going to the Simulation "pull-down"
menu and modifying the stop time (default = 10) or the integration solver method (default
= ode45).
The reader should generate simulations and observe the "inverse response" behavior of the
output with respect to a step input change. Use the subplot command to place the process
output (y) on the top plot, and the manipulated input (u) on the bottom plot. Perform this now. If
desired, change the default simulation stop time by selecting the parameters "pull down" menu.
[ Team LiB ]
[ Team LiB ]
It should be noted that the form of the PID control law used by the S IMULINK PID Controller icon
is not the typical form that we use as process-control engineers. The form can be found by double
clicking the icon to reveal the controller transfer function representation
So the numerical values for the following parameters must be entered in the SIMULINK PID
controller:
The s-polynomials in the process transfer function were entered by double clicking on the transfer
function and entering the coefficients for the numerator and denominator polynomials. Notice also
that the default step (used for the step setpoint change) is to step from a value of 0 to a value of
1 at t = 1. These default values can be changed by double clicking the step icon. The simulation
parameters can be changed by going to the Simulation "pull-down" menu and modifying the
start time (default = 0), stop time (default = 10) or the integration solver method (default =
ode45).
The controller tuning parameters of kc = 1.89 and tI = 1.23 are used by entering P = 1.89 and I
= 1.89/1.23 in the default PID Controller block. The following plot commands were used to
generate Figure M2-9:
» subplot(2,1,1),plot(t,r,'--',t,y)
» xlabel('t (min)')
» ylabel('y (mol/l)')
» subplot(2,1,2),plot(t,u)
» xlabel('t (min)')
» ylabel('u (min^-1)')
The curves in Figure M2-9 could be made smoother by selecting the 'refine' box in the
Simulation pull-down menu. Selecting refine = 2 will plot two points for each integration step.
This brief tutorial has gotten you started in the world of SIMULINK-based control block diagram
simulation. You may now easily compare the effect of different tuning parameters or different
formulations of a PID controller ("ideal" vs. "real," for example).
Let's say you generated responses for a set of tuning parameters that we call case 1 for
convenience. You could generate time, input, and output vectors for this case by setting
» t1 = t;
» y1 = y;
» u1 = u;
after running the case 1 values. You could then enter case 2 values, run another simulation, and
create new vectors:
» t2 = t;
» y2 = y;
» u2 = u;
» subplot(2,1,1),plot(t1,y1,t2,y2,'--')
» xlabel('t (min)')
» ylabel('y (mol/l)')
» subplot(2,1,2),plot(t1,u1,t2,u2,'--')
» xlabel('t (min)')
» ylabel('u (min^-1)')
which automatically plots case 1 as a solid line and case 2 as a dashed line.
Similarly, you could modify the controller type by placing a transfer function block for the
controller and using a "real PID" transfer function (this only differs when there is derivative
action).
Manipulated variables are often constrained to between minimum (0 flow, for example) and
maximum (fully open valve) values. A saturation icon from the Discontinuities library can be
used to simulate this behavior. The saturation icon is shown in Figure M2-11.
Actuators (valves) and sensors (measurement devices) often have additional dynamic lags that
can be simulated by transfer functions. These can be placed on the block diagram in the same
fashion that a transfer function was used to represent the process earlier.
It should be noted that icons can be "flipped" or "rotated" by selecting the icon and going to the
format "pull-down" menu and selecting Flip Block or Rotate Block. The block diagram of
Figure M2-8 has been extended to include the saturation element and transport delay, as shown
in Figure M2-12.
The default data method for the "to workspace" blocks (r,t,u,y in Figure M2-12) must be
changed from "structure" to "array" in order to save data in an appropriate form for plotting.
[ Team LiB ]
[ Team LiB ]
Figure M2-13. Default ideal PID controller. (a) Block. (b) Block
unmasked.
but it would be much less confusing to work with our standard form.
We have generated a new ideal analog PID, as shown in Figure M2-14a. Notice that there are two
inputs to the controller, the setpoint (r) and the measured output (y), rather than just the error
signal that is the input to the default SIMULINK PID controller. Our new implementation is
unmasked in Figure M2-14b to reveal that
[ Team LiB ]
[ Team LiB ]
M2.5 Summary
SIMULINK is a very powerful block diagram simulation language. Simple simulations, including the
majority of those used as examples in this textbook, can be set up rapidly (in a matter of
minutes). The goal of this module was to provide enough of an introduction to get you started on
the development of open- and closed-loop simulations. With experience, the development of these
simulations will become second nature. It is recommended that you perform the simulations
shown in this module, as well as the additional exercises, to rapidly acquire these simulation skills.
[ Team LiB ]
[ Team LiB ]
Additional Exercises
1: Compare step responses of the transfer function and state space models for the van de
Vusse reactor.
a. Transfer function: Perform the open-loop simulation for a step input change from 0
to 1 at t = 1, as shown in Figure M2-5.
b. State space: Replace the transfer function block shown in Figure M2-5 with a state
space block. Enter the following matrices in the MATLAB command window:
Show that the resulting step responses of the transfer function and state space models
are identical.
2: Consider the closed-loop SIMULINK diagram for the van de Vusse reactor (Figure M2-8).
Replace the default PID controller with a "Real PID" controller, as shown below in both
the masked and unmasked versions. How do your results compare with ones obtained
using the default PID controller?
3: The following control algorithm uses a filtered derivative of the process output (see
Chapter 5). Develop a SIMULINK implementation of this algorithm, where e(s) = r(s) -
y(s).
[ Team LiB ]
[ Team LiB ]
After reviewing this module, the reader should be able to do the following:
Write a basic function file containing differential equations to be integrated by MATLAB ode
routines
Write a more advanced function file, with parameters based through an argument list and
containing differential equations to be integrated by MATLAB ode routines
M3.5 Summary
[ Team LiB ]
[ Team LiB ]
ode45 uses fourth-order and ode23 uses second-order Runge-Kutta integration. All routines use a
variable integration step size (Dt is not constant). The integration step size is adjusted by the
routine to provide the necessary accuracy, without taking too much computation time.
To use these routines, the user must first generate an m-file to evaluate the state variable
derivatives. The m-file must be named 'xprime.m', and contain the following statement in the first
line of the file
where 'xprime' is the name of the function routine (usually selected as something meaningfully
related to the system of equations), 'xdot' is the vector of time derivatives of the states, 't' is
time, and 'x' is the vector of states. 'xdot' must be generated as a column vector.
[t,x]= solver('xprime',tspan,x0)
where
solver is any of the integration routines (ode45, etc.)
xprime is a string variable containing the name of the m-file for the state derivatives
tspan is the vector of time values (row vector)
x0 is the initial condition vector for the state variables (column vector).
For example, if the time vector has 50 elements and there are three state variables, then the
state variable vector has the 50 rows and three columns. After the integration is performed, if the
student wishes to plot all three variables as a function of time, she/he simply enters
plot(t,x)
If you only want to plot the second state variable, then the command plot(t,x(2,:)) is given.
ca = x(1);
cb = x(2);
xdot = [dcadt;dcbdt];
% end of file
In the MATLAB command window, enter the initial conditions and run ode45
» x0 = [2;1.117]
» [t,x] = ode45('vdv_ode',[0 5],x0);
» subplot(2,1,1),plot(t,x(:,1)), xlabel('t'), ylabel('ca')
» subplot(2,1,2),plot(t,x(:,2)), xlabel('t'), ylabel('cb')
The plots are shown in Figure M3-1. Notice that the system converges to the steady-state values
of CA=3, CB=1.117.
[ Team LiB ]
[ Team LiB ]
[t,x]= ode45('xprime',tspan,x0,options,P1,P2,...)
[t,x]= ode23('xprime',tspan,x0,options,P1,P2,...)
[t,x]= ode113('xprime',tspan,x0,options,P1,P2,...)
[t,x]= ode15s('xprime',tspan,x0,options,P1,P2,...)
[t,x]= ode23s('xprime',tspan,x0,options,P1,P2,...)
[t,x]= ode23t('xprime',tspan,x0,options,P1,P2,...)
[t,x]= ode23tb('xprime',tspan,x0,options,P1,P2,...)
To use the default options (generally recommended) and pass through parameter values, simply
enter [ ] for the options element in the argument list. For example, create an 'xprime.m' m-file
for the differential equation
and enter
A typical application might be to be able to change the magnitude of an input variable. For
example, consider the van de Vusse reactor shown in Example M3.1. The first line of the
vdv_ode.m file could be modified in the fashion
so that delstep represents a change from the nominal input value of 4/7 min-1. If the magnitude
of the step change is 0.1, then the line entered in the MATLAB command window is
[ Team LiB ]
[ Team LiB ]
The vdv_sfun function file is shown below. The vectors 't', 'x', and 'u' contain time, states, and
inputs, respectively. The 'flag' parameter is passed from S IMULINK, depending on the simulation
status. A value of flag = 0, for example, sets up the simulation with information about the
number of states, and so forth. A value of flag = 1 solves for the derivatives of the states with
respect to time and passes these derivatives in the sys vector back to SIMULINK. A value of flag =
3 passes the values of the outputs back to SIMULINK through the sys vector.
Before running the simulation, double click on the S-Function block to see what parameters or
initial conditions must be set before the simulation. In this case, the initial conditions must be set
in the MATLAB Workspace, using the xi variable. Also, go to the "parameters" pull-down menu in
SIMULINK to set the final time for integration and the differential equation solution method.
For the simulation shown, enter
» x0 = [2;1.117]
% process condition:
% dilution rate (fov) = 4/7;
% feed concentration of a (caf) = 10;
% x1s = cas = 3.0;
% x2s = cbs = 1.117;
% x0 = [x1i;x2i] = [cai;cbi] = initial conditions;
switch flag
case 0 % initialization;
sizes = simsizes;
sizes.NumContStates = 2;
sizes.NumDiscStates = 0;
sizes.NumOutputs = 2;
sizes.NumInputs = 2;
sizes.DirFeedthrough = 0;
sizes.NumSampleTimes = 1;
sys = simsizes(sizes);
str = [];
ts = [0 0];
case 1 % derivatives;
ca = x(1);
cb = x(2);
% also, the inputs are
fov = u(1);
caf = u(2);
% parameter values
% state derivatives
sys = [dcadt;dcbdt];
case 3 % outputs;
sys = [x(1);x(2)];
case {2, 4, 9}
sys = [];
otherwise
error(['unhandled flag = ',num2str(flag)]);
end
[ Team LiB ]
[ Team LiB ]
Figure M3-4. The subsystem of the block shown in Figure M3-3. Notice
that addition actuator and sensor lags have been placed on the
diagram.
Kinetic parameters are passed into the S-function file by adding the parameters after x0 in the
argument list:
The values of the kinetic parameters are then entered in the MATLAB command window before
beginning the simulation.
The simulation diagram of Figure M3-3 is "run" by entering the initial conditions in a MATLAB
command window:
» x0 = [3.0;1.117];
Setting the dilution rate step function to move from 4/7 to 4/7 + 0.1 at t = 1 minute, run the
simulation, then enter the following commands to obtain the plots shown in Figure M3-5.
» subplot(2,1,1),plot(t,ca)
» xlabel('time, min')
» ylabel('ca, mol/liter')
» subplot(2,1,2),plot(t,cb)
» xlabel('time, min')
» ylabel('cb, mol/liter')
[ Team LiB ]
[ Team LiB ]
M3.5 Summary
We have shown how to write function files to be used by MATLAB and SIMULINK to integrate sets of
ordinary differential equations. It is highly recommended that you work through this tutorial
interactively, generating the suggested .m files and .mdl diagrams. For more information on
options used by the M ATLAB ode routines, enter the following in the command window:
help ode45
[ Team LiB ]
[ Team LiB ]
M4.6 Summary
The majority of the functions that are used in this textbook are in Section M4.1.
[ Team LiB ]
[ Team LiB ]
where sys is the desired name of the model formed in each case. The a,b,c,d terms are the
state space matrices. The num and den terms are vectors of polynomial coefficients, in decending
order of powers in s. The z and p terms are row vectors of zero and pole locations (roots of
numerator and denominator polynomials, respectively), while k is the gain term (note that this is
not necessarily equal to the gain of the transfer function as we know it).
We use the van de Vusse reactor example from Module 5 to illustrate the use of each. The
following sections illustrate how state space, transfer function, and zero-pole gain models are
directly entered. Then we illustrate how to convert between the different model forms.
State Space
The state space model is
where the parameter values for the van de Vusse CSTR result in
» a = [-2.4048,0;0.8333,-2.2381];
» b = [7;-1.117];
» c = [0,1];
» d = [0];
The state space object command is used (note that we name our system vdv_ss for
convenience):
» vdv_ss = ss(a,b,c,d)
a =
x1 x2
x1 -2.4048 0
x2 0.8333 -2.2381
b =
u1
x1 7
x2 -1.117
c =
x1 x2
y1 0 1
d =
u1
y1 0
Continuous-time system.
The poles and zeros can be calculated using the pole and tzero commands.
» pole(vdv_ss)
ans =
-2.2381
-2.4048
» tzero(vdv_ss)
ans =
2.8173
Clearly, the system is stable (the poles of the transfer function = the eigenvalues of the A matrix
= negative, indicating stability) and contains a RHP zero, indicating an inverse response.
Transfer Function
The transfer function model is
» num = [-1.117,3.1472];
» den = [1,4.6429,5.3821];
» vdv_tf = tf(num,den)
Transfer function:
-1.117 s + 3.147
---------------------
s^2 + 4.643 s + 5.382
» pole(vdv_tf)
ans =
-2.4048
-2.2381
» tzero(vdv_tf)
ans =
2.8173
Again, the RHP zero indicates an inverse response.
Zero-Pole Gain
This structure is not often used by process engineers. It is similar to the transfer function form,
but the polynomials have been factored to clearly show the zeros and poles. An example with one
zero and two poles is
Notice that the gain term, k, is not the same as the process gain and is definitely a source of
confusion.
Consider the transfer function with the following zero-pole-gain form (you should be able to write
the previous transfer function in this form):
Zero/pole/gain:
-1.117 (s-2.817)
-------------------
(s+2.238) (s+2.405)
As an example, assume that the state space form has been entered as
» a = [-2.4048,0;0.8333,-2.2381];
» b = [7;-1.117];
» c = [0,1];
» d = [0];
» vdv_ss = ss(a,b,c,d)
The transfer function form can found from the state space form using
» vdv_tf = tf(vdv_ss)
Transfer function:
-1.117 s + 3.147
---------------------
s^2 + 4.643 s + 5.382
Also, the zero-pole-gain form can be found from the state space form using
» vdv_zpk = zpk(vdv_ss)
Zero/pole/gain:
-1.117 (s-2.817)
-------------------
(s+2.238) (s+2.405)
[num,den] = ss2tf(a,b,c,d,iu)
[z,p,k] = ss2zp(a,b,c,d,iu)
where iu is the ith input variable (2, if you want the transfer functions relating input 2 to all of
the outputs). If there is more than one output, then num will be a matrix of elements, where each
row contains the coefficients of the polynomial associated with that output (row 1 is the
numerator polynomial for output 1, etc.).
» num = [-1.117,3.1472];
» den = [1,4.6429,5.3821];
» vdv_tf = tf(num,den);
»vdv_ss1 = ss(vdv_tf)
a =
x1 x2
x1 -4.6429 -1.3455
x2 4 0
b =
u1
x1 1
x2 0
c =
x1 x2
y1 -1.117 0.7868
d =
u1
y1 0
Continuous-time system.
Recall that there are many state space models that yield the same transfer function model. The
state space realization of a transfer function, used by MATLAB, is known as the controllable
canonical form. Notice that this form in this example (vdv_ss1) is different than the original state
space form (vdv_ss). You should show that either state space form results in the same transfer
function.
For transfer functions, the easiest way to form a MIMO transfer function matrix is to concatenate
the individual matrix elements. Consider
Enter all the individual transfer functions, then specify the elements in the transfer function
matrix:
-1
#2: -------
2 s + 1
5
#2: -------
6 s + 1
» set(G,'InputDelay',[1.5 2.5])
» G
-1
#2: -------
2 s + 1
5
#2: -------
6 s + 1
[ Team LiB ]
[ Team LiB ]
where k represents the discrete-time step index. Consider the discrete state space model
with a sample time of Dt = 0.1 minutes. Please note that, if you need to convert a continuous
state space model to discrete, see Section M4.3.
After the a, b, c and d matrices are entered, the state space object can be created:
» vdv_ssd = ss(a,b,c,d,0.1)
a =
x1 x2
x1 0.78625 0
x2 0.06607 0.79947
b =
u1
x1 0.62219
x2 -0.07506
c =
x1 x2
y1 0 1
d =
u1
y1 0
If you have a discrete-time model but do not know the sample time, enter –1 for Ts.
»vdv_ssd1 = ss(a,b,c,d,-1)
a =
x1 x2
x1 0.78625 0
x2 0.06607 0.79947
b =
u1
x1 0.62219
x2 -0.07506
c =
x1 x2
y1 0 1
d =
u1
y1 0
The poles and zeros are found using the same commands as for continuous systems.
» pole(vdv_ssd)
ans =
0.7995
0.7863
» tzero(vdv_ssd)
ans =
1.3339
The poles are inside the unit circle, indicating stability. The zero is outside the unit circle,
indicating that the model inverse is unstable.
Transfer function:
-0.07506 z + 0.1001
----------------------
z^2 - 1.586 z + 0.6286
» pole(vdv_tfd)
ans =
0.7995
0.7863
» tzero(vdv_tfd)
ans =
1.3339
Again, the poles are inside the unit circle, indicating stability. The zero is outside the unit circle,
indicating that the model inverse is unstable.
Transfer function:
0.1564 z^-1 + 0.2408 z^-2
-----------------------------
1 - 0.3513 z^-1 + 0.0307 z^-2
Note that with the discrete filter form, it is critical to have the leading zero element in the
numerator polynomial.
As an example, assume that the discrete state space form has been entered as vdv_ssd. The
discrete transfer function is found using tf:
» vdv_tfd1 = tf(vdv_ssd)
Transfer function:
-0.07506 z + 0.1001
----------------------
z^2 - 1.586 z + 0.6286
[ Team LiB ]
[ Team LiB ]
where sysc is the LTI object for a continuous model, sysd is the discrete object to be created, Ts
is the sample time, and method is the type of hold placed on the input variable. We always
assume a zero-order hold ('zoh'); this is also the default if no entry is made for method.
Consider the continuous state space model for the van de Vusse reactor, vdv_ss. It can be
converted to the discrete-time model using the following MATLAB commands:
» vdv_ssd = c2d(vdv_ss,0.1,'zoh')
a =
x1 x2
x1 0.78625 0
x2 0.066067 0.79947
b =
u1
x1 0.62219
x2 -0.075061
c =
x1 x2
y1 0 1
d =
u1
y1 0
[ Team LiB ]
[ Team LiB ]
where sysd is the LTI object for a discrete model, sysc is the continuous object to be created,
and method is the type of hold placed on the input variable. We always assume that a zero-order
hold ('zoh') is used for the discrete model; this is also the default if no entry is made for method.
Consider the discrete transfer function model for the van de Vusse reactor, vdv_tfd. It can be
converted to the continuous-time model using the following MATLAB command:
» vdv_tfc = d2c(vdv_tfd,'zoh')
Transfer function:
-1.117 s + 3.147
---------------------
s^2 + 4.643 s + 5.382
[ Team LiB ]
[ Team LiB ]
» step(vdv_tfc,vdv_tfd)
The resulting response is shown in Figure M4-1. Notice that a zero-order hold has been applied to
the discrete step response. Also, note that the step command assumes that the time unit is
seconds, which is not normally the case for chemical process systems.
Alternatively, the following sequence of commands can be used to generate Figure M4-2:
» [yc,tc] = step(vdv_tfc);
» [yd,td] = step(vdv_tfd);
» plot(tc,yc,td,yd,'o')
» xlabel('time')
» ylabel('y')
» title('step response of van de Vusse reactor models')
» legend('continuous','discrete')
Similarly, the impulse responses shown in Figure M4-3 are generated using
» impulse(vdv_tfc,vdv_tfd)
Notice that the tremendous difference in the impulse response for the continuous and discrete-
time models is due to the pulse implementation on the discrete-time model.
M4.6 Summary
The M ATLAB Control Toolbox can be used to create LTI objects. These objectives can then easily be
converted to other forms. Conversion from continuous to discrete is particularly useful when
implementing a digital control algorithm. The commands used include the following:
Examples for the most important commands can be found in Section M4.1.
[ Team LiB ]
[ Team LiB ]
Reference
More details on converting between model types can be found in the following: Bequette, B. W.,
Process Dynamics: Modeling, Analysis and Simulation, Prentice Hall, Upper Saddle River, NJ
(1998).
[ Team LiB ]
[ Team LiB ]
Additional Exercises
1: Consider the continuous state space model, where the time unit is minutes
b. Find the continuous-time transfer function and calculate the poles and zeros. Is the
inverse of this transfer function stable?
c. Find the discrete-time transfer function for a sample time of 0.1 minutes. What do
you notice about the number of zeros? Is the inverse of this transfer function
stable for this sample time? You should increase the sample time to 1.8399
minutes to find that the transmission zero shifts to the right-half-plane.
d. Compare the step responses of the continuous model with the discrete models.
e. Find the "filter" form (backward shift notation) of the discrete transfer function for
sample times of 0.1 and 1.
2: Show that the following three state space models result in the same transfer function
model.
a. Model 1
b. Model 2
c. Model 3
c.
[ Team LiB ]
[ Team LiB ]
IMC
This module contains too many topics to cover interactively during a typical 2-hour session. It is
recommended that the reader (or instructor) select a topic of particular interest. The two different
controller design sections (M5.4 and M5.5) can be studied independently. The approximate time
needed and the focus (in parentheses) of each section of this module are as follows:
M5.1 Background
[ Team LiB ]
[ Team LiB ]
M5.1 Background
The reactant conversion in a chemical reactor is a function of the residence time or its inverse,
the space velocity. For an isothermal CSTR, the product concentration can be controlled by
manipulating the feed flow rate, which changes the residence time (for a constant volume
reactor). The feedback strategy is shown in the schematic diagram shown in Figure M5-1.
Here, we consider a series-parallel reaction of the following form (known as the van de Vusse
reaction scheme):
The desired product is the component B, the intermediate component in the series reaction. In
this module, we find interesting steady-state and dynamic behavior that can occur with this
reaction scheme. Klatt and Engell (1998) note that the production of cyclopentenol from
cyclopentadiene is based on such a reaction scheme (where A = cyclopentadiene, B =
cyclopentenol, C = cyclopentanediol, and D = dicyclopentadiene).
[ Team LiB ]
[ Team LiB ]
Assuming a constant volume reactor, it is easy to derive the following equations (do this):
Notice that the first two equations do not depend on the concentration of components C or D.
Since we are only concerned about the concentration of component B, we only need to solve the
first two equations:
[ Team LiB ]
[ Team LiB ]
where the subscript s is used to indicate the steady state value. Solving this quadratic and using
the positive root (clearly, there cannot be negative concentrations), we find
Using these two expressions, we can find the steady-state input-output curve relating CBs and
Fs/V. Here we consider the dilution rate (F/V) to be the manipulated input. The main advantage is
that it is independent of scale (reactor volume). Whether the reactor is 1 or 10,000 liters, the
same dilution rate will yield the same concentrations (assuming the feed stream is the same
composition).
For the particular reaction under consideration, the rate constants are
In this example, a steady-state concentration of B of 1.117 gmol/liter can be obtained with either
Fs/V = 0.5714 min-1 (case 1) or F s/V = 2.8744 min-1 (case 2). Notice that the process gain (slope
of the steady-state input-output curve) is positive for case 1 and negative for case 2. For
controller design, it is clearly important to know whether you are operating on the left-hand side
(e.g., case 1) or right-hand side (e.g., case 2) of the "peak," since the sign of the controller gain
must be the same sign as the process gain. Also notice that a steady-state concentration greater
than 1.266 gmol/liter cannot be achieved regardless of the controller used.
Linear Analysis
The linear state space model is
where the states, inputs, and output are in deviation variable form. The first input (dilution rate)
is manipulated and the second (feed concentration of A) is a disturbance input.
You should linearize the two modeling equations at steady-state solution to find the following
state space matrices:
The manipulated input-output process transfer function for the reactor is [you can find this
analytically, using G(s) = C(sI-A)-1B, or numerically, using Module 4]
Note: A motivated reader may wish to demonstrate that the linear and nonlinear models have the
same response for a step change of 0.01 min-1, while the differences in response to a step change
of 0.5 min-1 are substantial. Function files for integration of the nonlinear model are presented in
Module 3. The focus of the current module is on responses of the linear model.
[ Team LiB ]
[ Team LiB ]
Problem 1. Based on the transfer function given, answer the following questions:
a. For a desired concentration change of 0.1 gmol/liter, what is the expected steady-state
manipulated dilution rate change? If the volume is 1 liter, what is the expected steady-state
flow-rate change? If the volume is 1000 gallons, what is the expected steady-state flow-rate
change?
b. To keep the manipulated input dilution rate change less than 0.4 min-1, what is the
maximum concentration setpoint change that can be made?
Problem 2. Generate the SIMULINK block diagram shown in Figure M5-4. Recall that the default
SIMULINK controller block requires parameters in the decoupled (kc,kI,kD) form,
If the default SIMULINK PID controller block is used, then the tuning parameters for the integral
and derivative modes are
Note that variables can be specified on the input window for the PID controller block, so that
numerical values can simply be entered in the MATLAB command window before each new
simulation.
Perform some initial simulations with arbitrary PID parameter values. Use a setpoint change of
0.1 at t = 1 minute. Adjust the tuning parameters to obtain an "acceptable" closed-loop response,
so that the concentration overshoot and maximum input flow-rate changes are satisfied.
Problem 3. Consider P-only control and a step setpoint change of 0.1 gmol/liter at t = 1 minute.
a. Find the offset when kc = 1 is used. Is this the amount expected? Show your calculation.
b. Discuss the behavior as kc is increased. At what value of kc does the system appear to go
unstable? Is this consistent with your analytical results from the Routh stability criterion?
Show those results here.
Note that the system solver (integration code), although accurate, may generate points that yield
a "coarse" plot. You can make the curves appear smoother by selecting the parameters pull-
down menu and changing refine from 1 to 2 or 4. This generates more points for plotting
purposes.
a.
a. Find the proportional gain that causes the response to continuously oscillate (actually, you
found the proportional gain for this in Problem 3b above), and the "ultimate period" of this
oscillation. Find the Ziegler-Nichols closed-loop controller parameters for P, PI, and PID
(ideal derivative) controllers for this process. Remember that the default S IMULINK PID
controller block uses a different form for the PID controller than we do.
b. Compare the responses of the Ziegler-Nichols P, PI, and PID controllers to a step setpoint
change of 0.1 gmol/liter at t = 1 minute.
d. Compare the responses of ideal and "real" (use a transfer function to generate a "real"
derivative) PID controllers, tuned using the Ziegler-Nichols approach.
a. Consider now the effect of integral action. Start with a nominal case of the proportional gain,
kc, set to 1 and the integral time, tI, set to 2 minutes. What happens to the output and
manipulated input responses as tI is decreased? Does there appear to be a value where the
closed-loop system goes unstable? Is this consistent with the Routh stability criterion? Show
your analytical work.
[ Team LiB ]
[ Team LiB ]
Problem 1. Design an open-loop controller that gives a first-order + time-delay response for a
setpoint change. Assume that the model perfectly captures the process behavior, so that
. For this part, do not factor out the RHP zero to form the controller. Perform
simulations to show that the manipulated variable grows unbounded when a step setpoint change
is made, although good performance of the output is achieved. Assume a setpoint change of
magnitude 0.1 mol/liter.
For the following parts, assume that the all-pass factorization technique is used.
a. Plot the transient response of y(t) to a setpoint change of r(t) = –0.1 mol/liter, for several
different values of l.
c. What is the smallest value of l you can use before the manipulated variable action becomes
unrealistic (the physical flow rate would be negative) for a setpoint change of –0.1 mol/liter?
d. Consider now an unmeasured load disturbance, where the disturbance is a change in the
c.
d.
feed composition. The disturbance transfer function is
Show (simulate using S IMULINK) that a step load disturbance (feed concentration of A) of 1.0
mol/liter leads to offset in the output variable (see Figure M5-6).
Problem 4. Discuss how process gain uncertainty degrades the performance. For example, if the
real process gain varies between 0.3 and 0.8 (mol/liter)/min-1, what is the offset that results from
using the nominal model for control system design? Assume no disturbance and a setpoint change
of -0.1 mol/liter.
Problem 5. a–c. Using the same controller design (all-pass factorization) used in Problems 2 and
3, show that the IMC structure gives exactly the same results for a perfect model (process =
model) and no disturbance. That is, show the same results as for 2 and 3a–c.
d. Consider now an unmeasured load disturbance, where the disturbance transfer function is
Show (simulate using S IMULINK) that a step load disturbance of 1 mol/liter does not lead to
offset in the output variable when the IMC structure is used.
Problem 6. Discuss how gain uncertainty degrades the performance. Keep the process model
transfer function the same but let the actual process gain vary between 0.3 and 0.8
(mol/liter)/min-1. Show the IMC performance for step setpoint changes of –0.1 mol/liter.
Question: Does the higher gain or lower gain process cause more of a control problem?
Problem 7. Discuss how dead-time uncertainty degrades the closed-loop performance. That is,
keep the model dead time the same, but vary the process dead time. Do process time delays that
are larger than the model time delays cause more of a problem than process time delays that are
smaller than the model time delays?
a. For an actual process time delay of 2 minutes (with the model delay of 0.5 minutes), what is
the smallest value of l that can be used before there are problems with the manipulated
variable action for a setpoint change of –0.1 mol/liter?
b. For an actual process time delay of 2 minutes (with the model delay of 0.5 minutes), what is
the smallest value of l that can be used before there are stability problems, when a setpoint
change of –0.01 mol/liter is made?
[ Team LiB ]
[ Team LiB ]
Reference
Klatt, K.-U., and S. Engell, "Gain-Scheduling Trajectory Control of a Continuous Stirred Tank
Reactor," Comp. Chem. Engng., 22 (4/5), 491–502 (1998).
[ Team LiB ]
[ Team LiB ]
Additional Exercises
1: Consider the case 2 operating point, F s/V = 2.8744 min-1. Show that the steady-state
concentrations are CAs = 6.0870 mol/liter and CBs = 1.117 mol/liter.
a. Find the resulting state space model and verify that the manipulated input-output
process transfer function for this operating point is
c. Show that a P controller (with the correct sign on the controller gain) cannot
destabilize this process unless there are additional measurement and valve lags.
Use the Routh stability criterion.
2: Consider the following parameters given by Klatt and Engell (1998) for a reactor
operating at 134.14°C.
a. Find the two steady-state flow rates that yield a concentration of B = 0.9
gmol/liter.
b. Find the process transfer function for the lower flow rate that yields CB = 0.9
gmol/liter.
Answer:
[ Team LiB ]
[ Team LiB ]
The "cross-over frequency" is related to the ultimate period from the closed-loop Ziegler-
Nichols approach
Ziegler-Nichols recommended tuning values do not provide adequate gain and phase
margins
IMC-based PI is easier to tune for robustness than are the other approaches
M6.1 Motivation
M6.6 Summary
It is assumed that the reader has the MATLAB Control Toolbox, which has the Bode and Nyquist
functions.
[ Team LiB ]
[ Team LiB ]
M6.1 Motivation
Since many chemical processes are modeled as first order + time delay (at least for controller
design), it is important to understand the effect of control structure (IMC, P, PI, PID) and tuning
parameters on the stability of the nominal (perfect model) and uncertain (actual) closed-loop
system. In this module, we use the following transfer function to represent the model
For illustrative purposes, we assume that the units of the gain are in degrees Celsius per percent
and that minutes are the time units.
[ Team LiB ]
[ Team LiB ]
The system is on the verge of instability when kc = 3.8 %/°C, as shown in Figure M6-2; the
ultimate proportional gain is then kcu = 3.8 %/°C. The period of oscillation (ultimate period, Pu) is
approximately 17.2 minutes. Both of these values can be obtained from frequency-response
analysis, as shown in Section M6.3. Notice that the manipulated variable action is constant from t
= 1 to t = 6 minutes. This is due to the initial "proportional kick." The manipulated input does not
change until the process output is observed to change at t = 6 minutes (remember there is a 5-
minute time delay). If we used a controller with integral action, the manipulated input would have
kept increasing during this interval.
Transfer function:
1
--------
10 s + 1
Input delay: 5
» kc = 1;
» [mag,phase,w] = bode(kc*fodt);
» subplot(2,1,1), loglog(w,squeeze(mag))
» subplot(2,1,2), semilogx(w,squeeze(phase),[0.01 1],
[-180 -180],'--')
The resulting Bode plot, with the –180° line drawn for convenience, is shown in Figure M6-3.
Notice that the crossover frequency is around 0.36 rad/min, where the amplitude ratio is
approximately 0.26. The gain margin is then 1/0.26 = 3.8. This means that the controller gain
could be increased to roughly 3.8 before the process goes unstable. This is consistent with the
finding of kc = 3.8 for instability, shown in the previous section (time-domain simulation).
» [Gm,Pm,Wco,Wpm] = imargin(squeeze(mag),squeeze(phase),w)
Gm = 3.80093442825351
Pm = Inf
Wco = 0.36655875121677
Wpm = NaN
where wco is the crossover frequency (where f = –180°) and wpm is the frequency where AR = 1.
Gain Margin
The gain margin of 3.8 indicates that the controller gain can be increased from 1 to 3.8 before the
process becomes unstable—again, this is consistent with the previous results. Also notice that the
phase margin is infinity. This is because the amplitude ratio is always less than 1 (it is exactly 1
only at 0 frequency, when the proportional gain is 1).
» [re,im,w] = nyquist(kc*fodt);
» plot(squeeze(re),squeeze(im))
Problem 1. Use a controller proportional gain of 3.8 and perform a Bode analysis to show that the
amplitude ratio is 1 at the crossover frequency. What is the phase margin and frequency when AR
= 1 (for the controller proportional gain of 3.8)?
Solution
The Bode and Nyquist plots for gc(s)gp(s) with kc = 3.8 are shown in Figures M6-5 and M6-6.
Notice that the phase margin is 1 (the AR = 1 at the crossover frequency) and the phase margin
is 0 (the phase angle is -180° when the AR = 1).
Figure M6-5. Bode plot of gc(s)gp(s) for kc = 3.8. Notice that the gain
margin is 1 and the phase margin is 0°, indicating that the system is
on the verge of instability.
Figure M6-6. Nyquist plot of gc(s)gp(s) for kc = 3.8. The Nyquist curve
passes through the critical point (–1,0), indicating the system is on
the verge of instability.
This is also shown by the gain and phase margin analysis from MATLAB:
» kc = 3.8;
» [mag,phase,w] = bode(kc*fodt);
» [Gm,Pm,Wco,Wpm] = imargin(squeeze(mag),squeeze(phase),w)
Gm = 1.00024590217198
Pm = 0.03106191271067
Wco = 0.36655875121677
Wpm = 0.36646150971664
Notice that the gain margin is effectively 1, the phase margin is effectively 0, and the crossover
and phase margin frequencies converge to 0.366 rad/min.
[ Team LiB ]
[ Team LiB ]
Recall that the P-only controller tuning recommended by Ziegler and Nichols (1942) results in a
controller that has a gain margin of 2 (since the proportional gain is one half of the ultimate gain).
This is also shown by the following M ATLAB analysis.
» kc = 3.8/2;
» [mag,phase,w] = bode(kc*fodt);
» [Gm,Pm,Wco,Wpm] = imargin(squeeze(mag),squeeze(phase),w)
Gm = 2.00049180434395
Pm = 75.49091926803467
Wco = 0.36655875121677
Wpm = 0.16127245556240
The gain margin is 2 and the phase margin is 75°, indicating that a reasonable amount of
uncertainty can be tolerated before the closed-loop system goes unstable. The closed-loop
responses (measured output and manipulated input) for kc = 1.9 are shown in Figure M6-7.
Transfer function:
24.45 s + 1
-----------
14.3 s
» [mag,phase,w] = bode(gc*fodt);
» [Gm,Pm,Wco,Wpm] = imargin(squeeze(mag),squeeze(phase),w)
Thus far, we have used the gain margin to determine either how much the controller gain can be
increased before instability occurs, or how much the process gain can increase before instability
occurs. Next, we illustrate how the phase margin is related to time-delay uncertainty that can be
tolerated.
Problem 3. Use the Ziegler-Nichols recommended P-only value of kc = 0.5 kcu = 3.8/2 = 1.9.
What is the phase margin for this value of controller gain? What is the frequency associated with
this phase margin? Calculate the amount of additional time delay that can be tolerated from
Add this time delay to the process model and show that the new phase margin is now 0. Show
that the time-domain closed-loop simulations have an oscillation with a frequency of wpm. Include
plots of the manipulated input action.
[ Team LiB ]
[ Team LiB ]
Problem 4. For the IMC-based PI (improved) settings, find the value of l that leads to a gain
margin of 2.5. Also, find the value of l that leads to a phase margin of 75°. Compare the time-
domain closed-loop responses for these two systems (always include plots of the manipulated
inputs). Hint: Recall that the improved IMC-based PI settings for first-order + time-delays
systems are
Transfer function:
15.62 s + 1.25
--------------
12.5 s
» [mag,phase,w] = bode(gc*fodt);
» [Gm,Pm,Wco,Wpm] = imargin(squeeze(mag),squeeze(phase),w)
Gm = 2.63261419901939
Pm = 63.19455846288847
Wco = 0.32379172211747
Wpm = 0.11488259758305
Here, we see that the gain margin requirement is satisfied. Increase l until the phase margin is
satisfied.
Problem 5. Compare the Ziegler-Nichols PI, Tyreus-Luyben PI and IMC-based improved PI (with l
= 10 minutes) control performance in time-domain simulations.
[ Team LiB ]
[ Team LiB ]
M6.6 Summary
Frequency-response techniques have been used to study the robustness of a simple first-order +
time-delay process model. The gain margin is a measure of gain uncertainty that can be
tolerated, while phase margin is a measure of dead time uncertainty that can be tolerated. An
uncertain time constant affects both the gain margin and phase margin.
[ Team LiB ]
[ Team LiB ]
References
The original Ziegler-Nichols parameters are developed in the following paper: Ziegler, J. G., and
N. B. Nichols, "Optimum Settings for Automatic Controllers," Trans. ASME, 64, 759–768 (1942).
The Tyreus-Luyben recommended values are presented in Chapter 3 of the following textbook:
Luyben, M. L. and W. L. Luyben, Essentials of Process Control, McGraw Hill, New York (1997).
[ Team LiB ]
[ Team LiB ]
Additional Exercises
1: The transfer function for the van de Vusse reactor is given below; the input variable is
dilution rate (F/V, min-1) and the output is concentration of component B (mol/liter).
Find the gain and phase margins for the Ziegler-Nichols recommended P, PI, and PID
parameters. Show the resulting closed-loop time-domain responses to a unit setpoint
change.
2: The IMC-based PID design procedure for the van de Vusse reactor (Additional Exercise
1) results in a PID with first-order lag controller. Find how the gain and phase margins
vary as a function of the IMC filter factor, l. Vary l from 0.1 minutes to 1 minute. What
is the recommended value of l if the minimum gain and phase margins are 3 and 75°,
respectively?
[ Team LiB ]
[ Team LiB ]
Appendix M6.1
Answers to Problems 2, 3 and 4. The reader should show how these results are obtained and
generate the resulting closed-loop time domain plots.
Problem 2: Ziegler-Nichols PI: Gm = 1.97, Pm = 53, Wco = 0.33, Wpm = 0.16. Tyreus-Luyben:
Gm = 3.09, Pm =102, Wco = 0.351, Wpm = 0.0746.
Problem 3: Gm = 2.00, Pm = 75.49, Wco = 0.366, Wpm = 0.161. Additional time delay = 8.18
minutes.
[ Team LiB ]
[ Team LiB ]
M7.1 Background
The procedure for a stable process will be used in Section M7.3, while the procedure for an
unstable process will be used in Section M7.4. In both cases, use the SIMULINK model file
presented in Section M7.5.
Although you will be using a linear controller, you will be implementing this controller on a
nonlinear process. The inputs and outputs to/from this process are in physical variables, while the
controller design procedure is based on deviation variables.
[ Team LiB ]
[ Team LiB ]
M7.1 Background
Biochemical reactors are used in a wide variety of processes, from waste treatment to alcohol
fermentation. Biomass (cells) consume substrate (sugar or waste chemicals) and produce more
cells. A typical control and instrumentation diagram, with biomass concentration as the measured
output, is shown in Figure M7-1.
Model
The modeling equations for a bioreactor are
Equation M7.1
where the state variables are x1 = biomass (cell) concentration = mass of cells/volume, and x2 =
substrate concentration = mass of substrate/volume.
The manipulated input is D = dilution rate = F/V = volumetric flow rate/reactor volume, and the
disturbance input is x2f = substrate feed concentration.
Two possible expressions for the specific growth rate are monod and substrate inhibition kinetics,
which include
Notice that the monod-specific growth rate model is a subset of the substrate inhibition model (k1
= 0).
Scale Up
One motivation for working with the dilution rate as the manipulated input is that the resulting
dynamic model is independent of scale. A reactor volume of 1 liter with a flow rate of 0.3
liters/hour has the same dynamic behavior as a reactor volume of 1000 liters with a flow rate of
300 liters/hour. Thus, a small-scale (laboratory or pilot plant) reactor can be used to predict the
behavior of a production-scale reactor.
[ Team LiB ]
[ Team LiB ]
The steady-state dilution rate is Ds = 0.3 hr-1 (and the residence time is 3.33 hours) and the feed
substrate concentration is x2fs = 4.0 g/liter.
Steady-State Conditions
The nonlinear process has the following three steady-state solutions (operating points) to
Equation M7.1 for a dilution rate of 0.3 hr-1:
Notice that we definitely do not want to operate a equilibrium point 1. Here there is no reaction
occurring because the cells have been washed out of the reactor. The outlet substrate
concentration is the same as the inlet substrate concentration under these conditions.
Linear Model
The state-space model matrices are
where the partial derivative of the specific growth rate with respect to the substrate concentration
is
and where dilution rate is the manipulated input. Different control strategies have been used to
control continuous biochemical reactors. One is based on measuring the biomass concentration
and manipulating the dilution rate. Another is based on measuring the substrate concentration
and manipulating the dilution rate.
In the following two problems, the biomass concentration is the measured output and the dilution
rate is the manipulated input. You will be performing your control simulations using the nonlinear
process, so the inputs and outputs from the process are in physical variable form, while the linear
controller design is based on the use of deviation variables. Assume that the dilution rate is
physically constrained between 0 and 0.6 hr-1.
[ Team LiB ]
[ Team LiB ]
Use M ATLAB to find that the eigenvalues are –0.3 and –2.2640 hr -1, so the system is stable and
the IMC-based PID method for stable systems can be used (see Table 9-1). Find the transfer
function relating the dilution rate to the biomass concentration and use this for controller design.
You may wish to use the MATLAB function ss2tf to find the process transfer function
After placing the process model in gain and time constant form and recognizing pole-zero
cancellation, you should find
Notice that the time constant of 0.4417 hr is significantly shorter than the residence time (3.33
hr). Also notice from Table 9-1, that the IMC-based controller is a PI controller.
a. Show how the response to a small setpoint change varies with l. Suggested setpoint
changes are from 1.53016 to 1.52 and from 1.53016 to 1.54 g/liter.
b. For a particular value of l, show how the magnitude of the setpoint change affects your
response. This is where the nonlinearity comes into play. Try changing from the steady-state
value of 1.53016 to 1.0, 1.4, 1.6, and 2.5 g/liter. You will find problems with control
saturation and for larger setpoint changes.
c. Often measurements cannot be made instantaneously, and there will be a transport delay
associated with the measurement. Use the transport delay function in SIMULINK. Use q = 0.25
hour and discuss how the time-delay affects your choice of l.
d.
c.
d. Consider now disturbance rejection. Do not make a setpoint change but do make a step
change in substrate feed concentration (x2f) from 4 to 3.5 at t = 1 hour. Compare
disturbance rejection results with the PI controller developed in row 2 of Table 9-1.
[ Team LiB ]
[ Team LiB ]
Use M ATLAB to find that the eigenvalues are –0.3 and 0.169836 hr -1, so the system is unstable and
the IMC-based PID method for unstable systems must be used (Table 9-3). Find the transfer
function relating the dilution rate to the biomass concentration and use this for controller design.
You may wish to use the MATLAB function ss2tf to find the process transfer function
After placing the process model in gain and time constant form (and cancelling common poles and
zeros), you should find
That is, the transfer function has a RHP pole at 0.1698 hr-1 which is consistent with the state
space model. Notice that we can use the first entry in Table 9-3, which is a PI controller.
a. Show how the response to a small setpoint change varies with l (show explicitly how the
PID tuning parameters vary with l). I suggest setpoint changes from 0.995103 to 0.985 and
1.005 g/liter.
b. For a particular value of l, show how the magnitude of the setpoint change affects your
response. This is where the nonlinearity comes into play. Try changing from the steady-state
value of 0.995013 to 0.5, 0.75, 1.5, and 2.0 g/liter.
c. Use the transport delay block in SIMULINK. Start with q = 0.25 hour and discuss how the time
delay affects your choice of l.
d.
c.
d. Consider now disturbance rejection. Do not make a setpoint change but do make a step
change in substract feed concentration (x 2f) from 4 to 3.5 gmol/liter at t = 1 hour.
[ Team LiB ]
[ Team LiB ]
biofbc.mdl
I recommend that you make your proportional and integral terms in the PID controller a function
of lambda (l). Then, before each simulation run, you merely have to type in a new lambda in the
MATLAB window, rather than typing in new PI parameters. Always realize that the integral term in
the default SIMULINK PID block is our kc/tI.
Notice that the SIMULINK diagram contains two extra blocks. The transport delay block can be
inserted in the feedback loop to illustrate the effects of a measurement time delay. The PID
controller for the open-loop unstable point can be inserted when Additional Exercise 2 is being
solved.
The following must be entered into the MATLAB command window: initial conditions, x1i and x2i;
setpoint for biomass concentration, x1sp; final simulation time, tfinal; substrate feed
concentration, x2f; and the IMC filter factor, lambda.
The transfer function parameters are used by the PID controller block. The IMC-based PID
parameters are different depending on whether the process is open-loop stable (Additional
Exercise 1) or open-loop unstable (Additional Exercise 2). This is also seen by comparing
Tables 9-1 and 9-3.
Notice that a saturation block is used so that the dilution rate is bounded between 0.0 and
0.6. This is consistent with "real-world" constraints on manipulated variable action.
The typical rule-of-thumb for l for open-loop stable systems is roughly one third to one half
of the dominant time constant. There are no good rules-of-thumb for open-loop unstable
systems.
When performing your simulations, plot the dilution rate to see if it is hitting a constraint.
[ Team LiB ]
[ Team LiB ]
Reference
The parameters used in this module were presented in the following paper: Agrawal, P., and H. C.
Lim, "Analyses of Various Control Schemes for Continuous Bioreactors," Adv. Biochem. Eng.
Biotechnol., 30, 61–90 (1984).
[ Team LiB ]
[ Team LiB ]
Additional Exercises
1: Data for a specific growth rate coefficient as a function of substrate concentration for a
biochemical reactor are shown below
b. The production rate of cells is Dx1. Find the steady-state value of the dilution rate
that maximizes the production rate of cells. The substrate feed concentration is 5
g/liter.
c. Find the steady-state concentration of biomass and substrate at this dilution rate.
d. Find the linear state space model at this dilution rate, with dilution rate and
substrate 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) of the concentration
of biomass and substrate to step increases and decreases of 10% in the dilution
rate (changes are from the dilution rate found in question b.). Compare these
results with those of the linear system (remember to convert deviation variables
back to physical variables).
[ Team LiB ]
[ Team LiB ]
Module 8. CSTR
Unlike many of the other modules, this module is too lengthy to be performed in a single 1- to 2-
hour session. Each instructor or reader is likely to have a different focus. Much of the initial
material is related to modeling and interesting nonlinear aspects. If the focus is on controller
design, the initial material can be skimmed before Problem M8.4 is completed. After studying this
module the reader should be able to understand:
These reactors can have input-output operating curves that are nonlinear; that is, the
"process gain" is not constant.
Larger reactors have a reduced capability of removing heat compared to smaller reactors.
Often, a larger reactor is operated at an unstable point, while the smaller reactor (with the
same residence time) is stable.
M8.1 Background
M8.9 Summary
[ Team LiB ]
[ Team LiB ]
M8.1 Background
Chemical reactors often have significant heat effects, so it is important to be able to add or
remove heat from them. In a jacketed CSTR (continuous stirred-tank reactor) the heat is added
or removed by virtue of the temperature difference between a jacket fluid and the reactor fluid.
Often, the heat transfer fluid is pumped through agitation nozzles that circulate the fluid through
the jacket at a high velocity; an example recirculating jacket system is shown in Figure M8-1.
Notice that cascade control is shown, with a primary controller (reactor temperature) and a
secondary controller (jacket temperature). The output of the reactor temperature controller is the
jacket temperature setpoint. The output of the jacket temperature controller is the valve position
for the jacket make-up valve (usually it is assumed that this is directly related to the flowrate of
the jacket make-up fluid). The coolant can be chilled water, but is often a heat transfer fluid, such
as an ethylene glycol/water mixture or a proprietary mixture of hydrocarbons.
A different cascade control strategy is shown in Figure M8-2. In this cascade control stategy, the
output of the reactor temperature controller is the setpoint for jacket inlet temperature. The
output of the jacket inlet temperature controller is the valve position of the coolant make-up
valve. The first cascade control strategy (Figure M8-1) is the most commonly used reactor
temperature control strategy.
In addition, to develop a simplified model, we assume that the jacket temperature can be directly
(and nearly instantaneously) manipulated. This assumption is very good if a boiling heat transfer
fluid is used, for example; changing the pressure on the jacket side would result in near
instantaneous change in jacket temperature (note that a recirculating jacket system would not be
used in this scenario). Even for the recirculating heat transfer system, the assumption of the
jacket temperature being directly manipulated can be good if the jacket dynamics are rapid
compared to the reactor dynamics.
where V is the constant liquid reactor volume, r is the density of reactor fluid and rin is the
density of the inlet stream. F in and Fout are the flow rates of the inlet and outlet streams.
Assuming a constant density (rin = r) and volume, it is easy to show that Fout = Fin = F; this will
be used in the component balance.
Balance on Component A
Here we consider, for simplicity, the simple reaction A B. The balance on component A is
Equation M8.1
where CA is the concentration of component A in the reactor and rA is the rate of reaction per unit
volume. The Arrhenius expression is normally used for the rate of reaction. A first-order reaction
results in the following
Equation M8.2
where k0 is the frequency factor, Ea is the activation energy, R is the ideal gas constant, and T is
the reactor temperature on an absolute scale (R, Rankine or K, Kelvin).
Equation M8.3
where -DH is the heat of reaction, U is the heat transfer coefficient, A is the heat transfer area, Tf
is the feed temperature, and Tj is the jacket temperature.
Equation M8.4a
Equation M8.4b
Steady-State Solution
The steady-state solution is obtained when the two state derivatives are set equal to zero
Equation M8.5a
Equation M8.5b
Here, all of the inputs and parameters must be specified, allowing the two equations to be solved
for steady-state values of the two states. For these equations, a nonlinear technique, such as
Newton Raphson, would need to be used. It should be noted, however, that there is an easier
selection of the two unknowns to solve for. For a given steady-state temperature, solve Equation
(M8.5a) for the steady-state concentration. Then, solve Equation (M8.5b) for the value of the
jacket temperature (perform this in the following exercise).
Problem M8.1 Steady-State Concentration and Jacket Temperature for a Specified Reactor
Temperature
Result:
Equation M8.6a
b. Solve for the steady-state jacket temperature as a function of the steady-state reactor
temperature and concentration from Equation (M8.5b).
Result:
Equation M8.6b
Alternatively, one could specify the desired concentration, solve for the required reactor
temperature (from M8.5a), and then solve for the required jacket temperature (from M8.5b).
Again, this assumes that the residence time and all other parameters are fixed.
Linearization
The goal of the linearization procedure is to find a model with the form
Here we define the states, output, and inputs in deviation variable form
Notice that the first input (jacket temperature, Tj) is manipulated, while the last three inputs are
disturbances.
Equation M8.7
Equation M8.8
The output matrix is, since we consider temperature (second state) to be measured,
[ Team LiB ]
[ Team LiB ]
Water is supplied in excess, so the reaction is first-order in propylene oxide concentration. The
rate of reaction of propylene oxide (component A) is first-order
Parameter Values
This system has the following activation energy, frequency factor, and heat of reaction values
Assume that the reactor is to be operated with the following residence time, feed concentration,
and feed temperature
Also assume the reactor is designed as a vertical cylinder with a height/diameter ratio of 2:1, that
complete heat transfer area coverage occurs when the reactor is 75% full, and that the reactor is
operated at 85% of the design volume.
[ Team LiB ]
[ Team LiB ]
Reactor Scale
Consider now the following reactors, operated at 85% of the design volume.
Find the steady-state jacket temperatures for the 100 ft3 and 5000 gallon reactors.
Solution: Substituting the parameter values and steady-state concentration and temperature into
Equations (M8.6a) and (M8.6b), the resulting jacket temperatures are 80°F (100 ft3) and 65°F
(5000 gallon).
1. All of the input output curves are nonlinear. Recall that a process gain is change in
output/change in input, or the slope of the input-output curve. A linear system has a
constant gain and therefore a constant slope.
2. The larger (5000 gallon and 1000 ft3) reactors exhibit multiple steady-state behavior. That
is, for a certain jacket temperature there is the possibility of three reactor temperatures. For
these larger reactors the intermediate temperature (desired) operating point is unstable.
This will be shown in the linear stability analysis that follows.
3. For a given reactor temperature, a larger reactor requires a lower jacket temperature. This
is because a larger reactor has a reduced heat transfer area/volume (A/V) ratio and a
reduced ability to transfer heat.
a. For the 100-ft 3 reactor the state space model is (note that the time unit is hours)
and you should be able to show (analytically, or using MATLAB) that the process transfer
function is
Equation M8.9
where the process gain is kp = 3.275°F/°F and the time unit is hours. You will want to factor
this into the gain-time constant form for controller design.
and you should be able to show (analytically, or using MATLAB) that the process transfer
function is
Equation M8.10
You will want to factor this into the gain-time constant form for controller design.
Calculate the poles and zeros of the process transfer function for both size reactors. You should
find that the 100-ft3 reactor is stable, while the 5000-gallon (668 ft 3) reactor is unstable.
Since the 5000-gallon reactor is open-loop unstable, it can only be operated at the design point of
101.1°F using a closed-loop control system.
where the stability is determined by the roots of the denominator polynomial. The Routh stability
criterion (chapter 5) can be used to determine the ranges of the controller tuning parameters that
will assure a closed-loop stable system. See Additional Exercise 4 at the end of the module.
Develop a SIMULINK block diagram to perform closed-loop simulations for the two reactor sizes
(100 ft3 and 5000 gal). For simplicity, use the linear process transfer functions (M8.8 and M8.9)
to represent the respective reactor. Include two additional first-order transfer functions with time
constants of 0.1 hour to account for unmodeled mixing and jacket dynamics (although these are
included in your simulation studies, neglect them for any model-based controller design
procedure). Here any of your favorite control system design techniques can be used: (i) Ziegler-
Nichols, (ii) Tyreus-Luyben, (iii) IMC, (iv) IMC-based PID, (v) "ad-hoc" iterative tuning.
In the following we use the IMC-based PID procedure for both the 100-ft3 (stable, Table 9-1) and
the 5000-gallon (unstable, Table 9-3) reactors. The IMC filter factor (l) is adjusted to obtain a
satisfactory closed-loop response to a step setpoint change in reactor temperature (including a
consideration of the action of the manipulated jacket temperature). For the unstable reactor a
setpoint filter (see Figure 9-8) should be used for improved response.
Make plots of both the reactor temperature (output) response and the manipulated jacket
temperature (input). Since the linear simulations are in deviation variable form, add the steady-
state values to the deviation variables to plot the physical values. Your responses for a 5°F
setpoint change should be similar to Figure M8-4.
[ Team LiB ]
[ Team LiB ]
Equation M8.11a
Equation M8.11b
Equation M8.11c
where Fj is the flow rate through the jacket, and Tjin is the jacket inlet temperature. The variable
definition should be clear from Figure M8-5. Notice that the manipulated input is the jacket make-
up flow rate (Fjf), which does not appear in the above modeling equations.
Equation M8.11d
Equation M8.12a
Equation M8.12b
Equation M8.12c
which is the same set of equations that would be derived from a reactor with a "once-through"
jacket, shown in Figure M8-6.
This is an interesting result. The model for a CSTR with a "once-through" jacket is the same as
that for a recirculating jacket, assuming a static energy balance around the mixing point. This is
one reason that it is common to see Figure M8-6 used to represent a CSTR when Figure M8-5 is
the more common configuration in industry. It should be noted that the assumption of a constant
heat-transfer coefficient is much better for Figure M8-5 than M8-6, since the jacket velocity will
stay relatively constant for this system.
For the 100-ft 3 reactor the state space model is (see Appendix M8.1 for the linearization results)
Equation M8.13
where x = [CA – CAs T – T s Tj – Tjs]T, u = Fjf – F jfs, y = [T – Ts T j – Tjs]T
You should be able to show (using MATLAB) that the process transfer function relating the jacket
flow rate (u1) to the reactor temperature (y1) is
Equation M8.14
Use the Routh stability criterion to determine the range of controller gains, for a P-only controller,
that stabilize the reactor (based on the transfer function M8.14). Based on simulation results,
what value of gain do you recommend for the P-only controller?
Develop a SIMULINK diagram of a cascade controller CSTR, where a state space representation
[Equation (M8.12)] is used for the reactor. First, tune the secondary loop to stabilize the process.
Then, tune the primary loop for the desired setpoint response behavior.
[ Team LiB ]
[ Team LiB ]
Nonlinear Behavior
Although general nonlinear models were developed in this module, and some nonlinear steady-
state results were presented, dynamic simulations were based on linear models. Although the
responses on the physical (nonlinear) system will be similar to the linear results for small changes
around the designed operating point, the nonlinear behavior can be significantly different for large
changes.
Download the nonlinear SIMULINK/MATLAB files from the book web page and perform closed-loop
simulations. Show that responses of the nonlinear system are similar to the linear simulations, for
small setpoint changes. For a sequence of larger setpoint changes, show that the nonlinear
system begins to deviate significantly from the linear system.
Split-Range Control
Thus far we have only considered the case where coolant was circulated through the jacket at a
lower temperature than the reactor vessel, to remove energy due to the exothermic reaction.
During reactor start-up, however, it may be necessary to add energy to the reactor to bring the
temperature up to a point where the reaction can be initiated. In this case a warm fluid must be
circulated through the jacket. This requires a split-range controller as shown in Figure M8-8 and
M8-9. Notice that the cold fluid is fail-open, while the hot fluid is fail-closed.
[ Team LiB ]
[ Team LiB ]
M8.7 Summary
Exothermic CSTRs can exhibit interesting, and challenging, nonlinear behavior. Even a simple
two-state model, with jacket temperature manipulated and the reactor temperature as the
(controlled) output variable, can have multiple steady-state behavior. For reactors with three
steady states, the intermediate steady-state is unstable, requiring a feedback controller for stable
operation.
CSTRs often have recirculating jacket fluid heat-transfer systems to improve the heat removal
capability. For tighter control, and particularly for start-up and transition control, it is important to
incorporate a split-range strategy; here, the jacket temperature controller output manipulates
either a hot fluid valve or a cold fluid valve, depending on the range of the controller output. For
most reactors it is desirable for the cold valve to fail open and the hot valve to fail closed.
[ Team LiB ]
[ Team LiB ]
References
The Fogler text uses the propylene glycol example for the analysis of an adiabatic CSTR. The
Seider et al. text uses it in the context of simulation-based process design. The original
experimental results for the kinetic rate expressions are provided in Furusawa et al. An analysis of
a two-state CSTR is presented in the Process Dynamics text by Bequette. The article by Lipták
provides an excellent overview of both batch and continuous reactor control.
Bequette, B. W., Process Dynamics: Modeling, Analysis and Simulation, Prentice Hall, New York
(1998).
Fogler, H. S., Elements of Chemical Reaction Engineering, 2nd ed., Prentice Hall, New York
(1992).
Lipták, B. G., "Controlling and Optimizing Chemical Reactors," Chemical Engineering Mag., pp.
69–81 (May 26, 1986).
Seider, W. D., J. D. Seader, and D. R. Lewin, Process Design Principles, Wiley, New York (1999).
[ Team LiB ]
[ Team LiB ]
Additional Exercises
1: Perform a search on propylene glycol. What is the worldwide demand? What is the
current sales price? Enumerate some of the uses of this product.
2: Consider the simple CSTR model used in Section M8.4. Transfer functions for the 100-ft3
and 5000-gallon reactor were given.
a. Find the heat transfer area, diameter, and UA for a 1000-ft3 reactor (with an
operating volume of 850 ft3), designed with the same residence time and
height/diameter ratio as the other reactors. Also, find the required jacket
temperature to achieve the reactor temperature of 101.1°F.
b. Find the state space model and calculate the eigenvalues for the 1000-ft3 reactor.
Find the transfer function and calculate the poles. You should find that this reactor
is open-loop unstable. Now, find the range of proportional gains that will yield a
stable closed-loop system under proportional-only control.
a. For a desired propylene oxide conversion of 50% at a residence time of 0.25 hr,
show that the reactor operating temperature is 101.1°F.
c. Assume complete liquid coverage of the heat transfer area when the reactor is
75% full. What is the heat transfer area for a 100-ft3 reactor? Remember to
include both the "bottom" and "side" of the reactor.
d. Again, assume complete liquid coverage of the heat transfer area when the reactor
is 75% full. What is the heat transfer area for a 5000-gallon (668 ft3) reactor?
Remember to include both the "bottom" and "side" of the reactor.
e. Comment on the A/V ratio as the volume of a reactor increases. For a specified
reactor conversion (and temperature) and residence time, how does the jacket
temperature change as a function of reactor volume?
Perform the following for both the 100-ft3 and 5000-gallon (668 ft3) reactors.
a. For a PI controller, with an integral time of 1 hour, find the range of controller
gains for closed-loop stability using the Routh stability criterion.
b. Develop a SIMULINK block diagram to perform closed-loop simulations for the two
a.
b.
reactor sizes. For simplicity, use the linear process transfer functions to represent
the reactor. Include two additional first-order transfer functions with time
constants of 0.1 hour (6 minutes) to account for unmodeled mixing and jacket
dynamics. Select tuning parameters within the range of those that you obtained in
part a. Adjust the parameters until you are satisfied with closed-loop response to a
step setpoint change.
Make plots of both the reactor temperature response and the manipulated jacket
temperature.
Assume that the reactor is to be operated with the following steady-state inputs:
Solve for the steady-state concentration and temperature and find the corresponding
state space model.
[ Team LiB ]
[ Team LiB ]
Appendix M8.1
For Equations (M8.12) we develop a linear state space model, with the states, outputs, input, and
disturbances as the following deviation variables:
where
The first column of the B matrix is (this column is related to input 1, the jacket feed flow rate)
If both the reactor temperature (state 2) and the jacket temperature (state 3) are measured for
a cascade control structure, the measured output matrix is
[ Team LiB ]
[ Team LiB ]
M9.1 Background
[ Team LiB ]
[ Team LiB ]
M9.1 Background
Virtually every manufacturing plant has a steam utility system. The heart of the steam system is
the boiler (in general, there are a number of boilers in a plant). One of the important control loops
on a steam boiler is the steam drum level controller, which is shown schematically in Figure M9-1.
An actual boiler control problem consists of many other control loops, including steam pressure
control.
The control of steam drum level is tougher than most other level control problems because there
is inverse response combined with a ramp in the level when a step increase in feed-water flow
rate is made. A typical step response is shown in Figure M9-2. The ramp nature (integrator) is
because if there an increase in the incoming water with no corresponding increase in outlet steam
flow, then the level must continually increase. The inverse response occurs because the incoming
cold water causes some of the bubbles in the steam drum to collapse, causing the level to drop
slightly. However, since the incoming flow rate is higher that the outgoing flow rate, the level
must eventually start rising.
[ Team LiB ]
[ Team LiB ]
Equation M9.1
Equation M9.2
the unit of time is minutes, and the input and output have been scaled so that the full range is –1
to 1, with a nominal value of 0. The constraints on the inputs and outputs are then -1 and 1.
Now consider process disturbances. The primary disturbance (header pressure) affects the drum
level in the following fashion
Equation M9.3
[ Team LiB ]
[ Team LiB ]
For the selected controller design technique, perform simulations for the following:
In each case discuss the effect of controller tuning. In addition to the response of stream drum
level (process output), include plots of the manipulated input (valve position). You may wish to
revise the SIMULINK diagram shown in Appendix M9.1, for your simulations.
IMC-Based PID
Use the IMC-based PID procedure to find that the resulting feedback controller: assuming all-pass
and allowing the IMC controller to be semiproper. The resulting feedback controller will be lead-
lag [neglect the valve dynamics in controller design but include it in the simulation, that is, use
Equation (M9.1) for controller design].
a. What is the PID controller transfer function? (You should find that there is no integral term.)
b. Plot the closed-loop response for a step setpoint change of 0.1 at t = 1 minute. Compare the
closed-loop responses for several values of the IMC filter factor, l.
c. Plot the closed-loop response for a step load disturbance change of 0.5 at t = 1 minute.
Compare the closed-loop responses for several values of the IMC filter factor, l. You should
find that there is offset since there is no controller integral action.
You found that the feedback-only controller had offset when a load disturbance occurred. This is
because the controller does not have integral action. An IMC-based PID controller with integral
action can be designed for the integrating process with inverse response
by using the following IMC filter, and by not forming an all-pass factorization
and by letting g = 2l + b to obtain integral action. The resulting ideal PID controller parameters
are:
b. Plot the closed-loop response for a step setpoint change of 0.1 at t = 1 minute. Compare the
closed-loop responses the PI and PID controllers.
c. Plot the closed-loop response for a step load disturbance change of 0.5 at t = 1 minute.
Compare the closed-loop responses for the PI and PID controllers.
Frequency Response
Design a PI controller with a gain margin of 2 and a phase margin of at least 60°.
a. What are the values of the PI controller? What are the gain and phase margins and the
relevant frequencies?
b. Plot the closed-loop response for a step setpoint change of 0.1 at t = 1 minute.
c. Plot the closed-loop response for a step load disturbance change of 0.5 at t = 1 minute.
[ Team LiB ]
[ Team LiB ]
Compare responses of the feed-forward control (combined with the feedback control designed in
the first problem) strategy with feedback control for a primary load step change of 0.5 at t = 1
minute.
[ Team LiB ]
[ Team LiB ]
Develop a SIMULINK diagram for the 3-mode strategy, similar to that shown in Appendix M9.2.
Tune the flow controller for tight performance (closed-loop time constant of roughly 0.1 minutes)
and compare the 3-mode strategy with the standard feedback strategy for disturbances affecting
the feed water valve position.
[ Team LiB ]
[ Team LiB ]
[ Team LiB ]
[ Team LiB ]
[ Team LiB ]
[ Team LiB ]
M10.1 Background
M10.5 Summary
[ Team LiB ]
[ Team LiB ]
M10.1 Background
Much of this text has focused on tracking setpoint changes, where the goal has often been to
design a controller to yield a first-order type of response to a step setpoint change. There are
many processes, however, where disturbance rejection (regulatory control) is more important
than setpoint tracking, because setpoints may not be changed frequently. Consider the surge
drum level control system shown in Figure M10-1. The purpose of the surge vessel is to smooth
variations in the flow from process 1 and maintain a relatively constant flow rate to process 2.
The level can vary substantially from the setpoint, as long as the vessel does not overflow or go
dry. The main objective is to vary the manipulated flow rate (the outlet flow from the vessel) as
little as possible, while satisfying level constraints.
Figure M10-1. Surge vessel level control. (a) Vertical orientation. (b)
Horizontal orientation.
The goal of this module is to develop guidelines for tuning level controllers for surge vessels. The
performance specifications are significantly different than for the steam drum level systems
studied in the previous module.
[ Team LiB ]
[ Team LiB ]
Equation M10.1
The deviation variables for the manipulated input, load disturbance, and measured output are
Equation M10.2
Equation M10.3
[ Team LiB ]
[ Team LiB ]
It seems reasonable to select a value for the proportional gain that will just assure that
constraints will not be violated for the worst-case expected disturbance. Assume that level alarms
are set at 20% and 80% of the volume of the vessel. Let DH represent the magnitude of the
maximum allowable deviation of the tank height from setpoint, and let DL represent the maximum
magnitude of a step disturbance.
Proportional Gain
Assuming that the flow rate out is proportional to the deviation from setpoint,
Equation M10.4
where kc is a negative number since the flow rate must increase if the tank height is above the
setpoint value. The step change in the load disturbance is DL,
and the value at the new steady-state after a step disturbance is [from Equation (M10.1)]
which yields
Equation M10.5
Again, the value of the kc0 term can be determined from the proportional gain term in Equation
(M10.5),
Equation M10.7
[ Team LiB ]
[ Team LiB ]
You should show that the process and load disturbance transfer functions are
Since the physical variable minimum and maximum alarm heights are 0.4 and 1.6 m,
respectively, in terms of deviation variables, the minimum and maximum heights are
So, DH = 0.6 m. The minimum and maximum manipulated variable values are
So, DL = 0.5 m3/min. From Equations (M10.5) and (M10.7), we find kc = -0.833 m2/min and kc0
= -1.389 m/min.
Step Disturbances
Compare the step responses of the linear and nonlinear controllers to a small step disturbance of
0.05 m3/min and a large step disturbance of 0.5 m3/min. For a small step change in the load
disturbance (inlet flow rate), the linear and nonlinear controllers are shown in Figure M10-2.
Notice that the manipulated input changes more slowly for the nonlinear controller. The minor
disadvantage is that the offset is larger for the nonlinear controller, as designed. This is not a real
problem, as the offset is small compared with the capacity of the vessel.
Figure M10-3. Response to a large step in inlet flow rate (0.5 m3/min).
Sinusoidal Disturbances
Consider a sinusoidal disturbance with an amplitude of 0.05 m 3/min and a frequency of 1/min.
The linear and nonlinear strategies are compared in Figure M10-4. Clearly, there is an incentive
for nonlinear control, since the manipulated variable does not change nearly as much for the
nonlinear case as for the linear case.
The responses to large-magnitude sinusoidal disturbance with an amplitude of 0.5 m3/min and a
frequency of 1/min is shown in Figure M10-5. In this case, there is not much incentive for the
nonlinear control strategy.
Additional Simulations
Consider the large-magnitude sinusoidal disturbance shown in Figure M10-5. Show that doubling
the amplitude of the disturbance leads to saturation of the manipulated variable, and to violation
of the high- and low-level alarms.
[ Team LiB ]
[ Team LiB ]
M10.5 Summary
For surge vessels it is generally more important to allow levels to "float" in order to minimize flow
rate variations. The approach shown in this module uses a gain that is proportional to the
absolute value of the error; this is effectively a nonlinear controller, where the control action is a
function of the square of the error. Nonlinear control was shown to lead to reduced control action
compared with simple P-only control.
[ Team LiB ]
[ Team LiB ]
Reference
Nonlinear level controllers with integral action are discussed in the following:
Marlin, T. E., Process Control: Designing Processes and Control Systems for Dynamic
Performance, 2nd ed. McGraw Hill, New York (2000).
[ Team LiB ]
[ Team LiB ]
Additional Exercises
1: Develop a nonlinear model for the rate of change of tank height for the horizontal vessel
orientation shown in Figure M10-1b. Consider a surge vessel that has a diameter of 1 m
and a length of 2 m, with low- and high-level alarms set at 20% and 80%. Also, assume
that the height setpoint is 0.5 m, and the steady-state flow rate is 0.5 m3/min. The
steady-state flow rate is 0.5 m3/min, so assume that the inlet flow rate can vary
between 0 and 1 m3/min. Design a proportional controller for this system. For the same
disturbances given in the example, compare the performance of the horizontal tank with
that of the vertical drum.
on the level control problems discussed in this chapter. Revise the SIMULINK diagram
shown in Figure M10-6 for your simulations. Discuss your selection of kcmin, kcmax, and
ebreak.
3: Consider a more general form of controller than Equation (M10.6). Perform simulations
using a controller with the form
Discuss the effect of the two tuning parameters (kc0 and b) on the response to different
amplitude step and sign disturbances.
[ Team LiB ]
[ Team LiB ]
[ Team LiB ]
[ Team LiB ]
After studying this module, the reader should be able to do the following:
Understand some common control configurations and controller tuning techniques. Tuning
for ramp vs. step setpoint changes, and tuning for disturbance rejection.
M11.1 Background
M11.5 Summary
[ Team LiB ]
[ Team LiB ]
M11.1 Background
Jacketed batch chemical reactors are often used in the pharmaceutical and specialty chemicals
industries. Very often these reactors need to have both "heating" and "cooling" modes. That is,
the temperature of a reactor is often ramped up from the ambient reactor charge conditions (near
20°C) to a temperature where the reaction begins to "take off." If the reaction is exothermic, the
heat released through the reaction must be removed by circulating a cold fluid through the jacket.
A common strategy is shown in Figure M11-1, where both hot and cold jacket feed streams are
available. Here we have shown a split-range jacket temperature control strategy. When the jacket
temperature controller output is between 0 and 50%, the cold glycol valve is open. When the
jacket temperature controller output is between 50 and 100%, the hot glycol valve is open. The
split-range behavior is shown in Figure M11-2. Notice that the cold glycol valve is fail-closed, while
the hot glycol valve is fail-open.
[ Team LiB ]
[ Team LiB ]
Equation M11.1
Notice that the accumulation term includes the effect of the "thermal mass" of the reactor wall
Equation M11.2
where (mcp)m is the "thermal mass" (mass * heat capacity, including the metal as well as the
glass lining) of the reactor wall and any other inert components (agitator, baffles, etc.). Also,
(mcp)f is the contribution of the reactor fluid (Vrcp). For small (laboratory) scale reactors the
contribution of the reactor wall and other inert components can be significant, while the relative
contribution is insignificant for large scale reactors. Equation (M11.1) can be rewritten
Equation M11.3
The fundamental model shown in (M11.3) is linear. The more familiar state-space form is
Equation M11.4a
Equation M11.4b
where reactor temperature is the state (and output), jacket temperature is the manipulated
input, and heat generation is the load disturbance.
The resulting input-output transfer function models relating the manipulated and disturbance
inputs to the measured reactor output are first-order (see Additional Exercise 1)
Equation M11.5
In the following studies we will consider three different reactors: (i) laboratory scale (1 liter), (ii)
pilot-plant scale (0.5 m3), and (iii) manufacturing scale (10 m3). We will assume that the heat-
transfer coefficient is the same for each of these reactors, but that the heat transfer area
changes. The heat transfer coefficient used is
Assume that the reactor is a vertical cylinder with a height/diameter ratio of 2, and that a
heating/cooling jacket fully covers the bottom and sides of the reactor. This yields the results
shown in Table M11-1.
Quasi-Steady-State Behavior
If the heat-generation term is constant, then there exists a steady-state temperature difference
between the reactor and jacket such that the heat flows are balanced. From Equation (M11.1) we
see
Table M11-1. Reactor Characteristics
V 0.001 m3 0.5 m3 10 m3
For each scale of reactor, determine the heat flow, on a per-volume basis, if the temperature
difference between the reactor and jacket is 20°C. How much more "efficient" at transferring heat
is a 1 liter reactor compared to a 10-m 3 reactor?
For each scale of reactor, find the process time constant (tp) assuming that the process fluid is
water and neglecting the thermal effect of the reactor mass. For controller tuning, we suggest
that you use an initial l value of 1/4 tp for future simulations.
IMC-Based Design
In the Internal Model Control (IMC) design procedure used throughout most of this text we have
focused on the response to step setpoint changes. IMC can also be designed for ramp setpoint
changes or for the rejection of process input disturbances. What differs about the design is the
specification of the filter. For each case the filter is shown below.
where n is chosen to make the internal model controller physically realizable. For a first-order
process, you should verify the following results.
Here we require that the reactor temperature setpoint be changed from 20°C to 50°C. Compare
responses to step setpoint changes, for each size reactor. Discuss the practical limitations to the
expected dynamic performance for each size reactor, especially considering the constraints on
jacket temperature.
Here we require that the reactor temperature setpoint be changed from 20°C to 50°C. Compare
responses to ramp setpoint changes, for each size reactor. Discuss the practical limitations to the
expected dynamic performance for each size reactor, especially considering the constraints on
jacket temperature. Also, what are practical limitations on the ramp time as a function of scale?
For example, perhaps a 10-minute ramp time is fine for the laboratory scale reactor; is it feasible
for the larger scale reactors?
After the reactor has been heated to 50°C, assume that a reaction heat flow of 0.05 kW/liter (50
kW/m3) is initiated. Compare the closed-loop performance as a function of reactor scale; compare
the maximum deviation from the desired value of 50°C for each scale reactor.
[ Team LiB ]
[ Team LiB ]
Equation M11.6
where the accumulation terms include the effect of any "thermal mass" of the reactor and jacket
walls. For example, the reactor energy balance includes the term
where (mcp)m is the "thermal mass" (mass * heat capacity, including the metal as well as the
glass lining) of the reactor wall and any other inert components (agitator, baffles, etc.). Also,
(mcp)f = Vrcpf is the contribution of the reactor fluid. The term represents the mass flow rate
of the jacket fluid.
Equation M11.7
Equation M11.8
The resulting input-output transfer function models relating the manipulated and disturbance
inputs to the measured reactor output are (see Additional Exercise 2)
Equation M11.9
For each scale of reactor (Table M11-1), find the process parameters assuming that the process
and jacket fluid is water and neglecting the thermal effect of the non-fluid components of the
reactor and jacket. Assume that the jacket volume is 1/4 of the reactor volume.
Equation M11.10
We can also use the following order of magnitude analysis to reduce the expressions
so
Equation M11.11
Also, as in Section M11.2, let the closed-loop time constant be roughly 1/4 of the open-loop time
constant, so the resulting controller proportional gain is
and the proportional band is then 25%. For a PI controller, we can start with the same parameter
values, but set the derivative time constant to 0.
Here we require that the reactor temperature setpoint be changed from 20°C to 50°C. Compare
responses to step setpoint changes, for each size reactor. Discuss the practical limitations to the
expected dynamic performance for each size reactor, especially considering the constraints on
jacket inlet temperature (–10 to 150°C).
[ Team LiB ]
[ Team LiB ]
Equation M11.12
As written, this assumes that the jacket is a "once through" flow and that there are cold and hot
jacket feed streams. It can also be shown that a jacket recirculating heat-transfer system has the
same model equations, where the jacket mass flow rate is simply the make-up flow to the
recirculating jacket heat-transfer system [compare Equations (M8.11) and (M8.12) for a CSTR].
Here a split-range control strategy would be used, with either the cold or hot fluid stream
admitted to the jacket, depending on the split-range controller output.
Linearizing Equation (M11.12), we find the following state space model matrices
where inputs 1 and 2 (corresponding to columns 1 and 2 of the B matrix) are the cold and hot
jacket feedstreams, respectively. The third input is the disturbance (reaction heat flow), qgen .
Since the measured outputs are the reactor and jacket temperature,
For the 0.5 m3 reactor, assuming that both the reactor and jacket fluids are water, and the jacket
volume is 25% of the reactor volume (and neglecting the thermal mass of the non-fluid
components), find the state space model. For the initial steady-state assume that there is no
reaction heat flow, so the cold and hot fluid flow rates are zero initially. What do you notice about
the eigenvalues of the A matrix? Find the transfer functions relating the manipulated inputs to the
outputs; what do you notice about one of the poles? Observe the responses to step changes in
the manipulated inputs. Are these realistic? (Hint: You should find that the responses are
integrating in nature; this is expected for the initial responses, but not for the long-term
behavior.)
Problem M11.9 Cascade Control with Split-Range Jacket Temperature Controller (this problem is
better for a longer-term project)
Develop a jacket temperature controller that has a split-range output (see Chapter 12 for an
example SIMULINK model for a stirred-tank heater). The controller output should be similar to
Figure M11-2. Design the jacket temperature (secondary) controller using any method that you
desire. Next, design the reactor temperature (primary) controller.
Perform simulations where the reactor temperature setpoint is changed from 20°C to 50°C.
Compare responses to step setpoint changes, for each size reactor. Discuss the practical
limitations to the expected dynamic performance for each size reactor, especially considering the
constraints on jacket inlet temperature (–10 to 150°C).
It is recommended that both the primary and secondary controllers include antireset windup
(Chapter 11) strategies.
[ Team LiB ]
[ Team LiB ]
M11.5 Summary
This module has assumed very simple models for batch reactors, where heat effects (due to an
exothermic reaction, for example) are captured by a simple heat generation term.
This resulted in low-order models that demonstrated clearly the importance of process scale. A
smaller reactor has a larger heat transfer area to volume ratio, making it much more efficient at
transferring heat compared to a larger reactor. That is, smaller temperature differences between
the reactor and jacket are needed to remove heat energy from the reactor. Smaller reactors then
are less prone to suffer from problems with jacket temperature constraints. In addition, the
smaller reactors have smaller process time constants, allowing better closed-loop temperature
control (faster closed-loop responses). Certainly, more complicated models can be developed,
which include reactor rate terms and semi-batch reactor operation (see Additional Exercise 4).
More comprehensive examples will be placed on the textbook web page; you are encouraged to
download these files for advanced study.
[ Team LiB ]
[ Team LiB ]
Reference
The following article provides an excellent overview of both batch and continuous reactor control:
Lipták, B. G., "Controlling and Optimizing Chemical Reactors," Chem. Eng. Mag., pp. 69–81 (May
26, 1986).
[ Team LiB ]
[ Team LiB ]
Additional Exercises
3: Pfaudler is a major manufacturer of reaction vessels. Search the Pfaudler web page to
find 100-gallon and 1500-gallon reactors. Do the heat transfer areas vary with volume
in the way that you would expect?
4: All of the examples in this module have included a heat generation term, for simplicity.
This resulted in simple, low-order models. Develop a more comprehensive model of a
semi-batch reactor (flow in, but not out), with a simple first-order irreversible reaction
(A B). Develop the modeling equations, including the following states: V (liquid
volume), NA (total amount of component A in the reactor), T (reactor temperature), and
Tj (jacket temperature). Allow the heat-transfer area to vary as a function of the reactor
volume. Include a steady-state energy balance on the recirculating jacket fluid heat-
transfer system, and assume that a split-range controller manipulates either the cold or
hot glycol flow rate.
[ Team LiB ]
[ Team LiB ]
M12.1 Overview
M12.7 Summary
[ Team LiB ]
[ Team LiB ]
M12.1 Overview
Physiological systems are composed of a large number of feedback control loops. Examples
include the baroreceptor reflex that regulates blood pressure, and the synthesis of insulin and
glucagon by the pancreas to regulate blood glucose. The focus of the examples presented in this
module is on exogenous feedback regulation using devices external to the human body.
There is a rich history of automated control applications in biomedicine. Initial studies on feedback
control of anesthesia were performed by Bickford at the Mayo Clinic in the 1950s. Several
different anesthetics were studied as the manipulated input, while the measured variable was the
integrated rectified amplitude of the EEG. The control strategy did not gain acceptance because it
was not clear what feature of the EEG signal should be used as an indicator of the depth of
anesthesia.
Modeling biomedical processes can be quite challenging. For physiological systems, drug material
balances can be written based on a compartmental model; that is the body or tissues are
"lumped" into "volumes" in the same fashion that stirred tanks are used to represent chemical
process behavior.
[ Team LiB ]
[ Team LiB ]
Compartment 1 is often used to represent blood plasma. The drug is assumed to be directly
infused to compartment 1. The drug can then diffuse between compartment 1 and compartments
2 and 3, based on the transfer parameters, k ij. For example, k12 represents the kinetics for
transfer of the drug from compartment 1 to compartment 2. Compartment 2 can be thought of as
well-perfused tissues, such as muscle and brain, while compartment 3 represents residual tissues
and bone.
Modeling Equations
If we let I represent the mass infusion rate (mass/unit time) of the drug, the overall material
balance can be written as
Equation M12.1
This has the form of a state space model
Equation M12.2
One is normally concerned more about drug concentrations rather than the total amount of drug.
The blood plasma concentration can be represented by C 1 = M1/V1. The state space model for the
measured output is then
Equation M12.3
Alternatively, the states can be formulated as concentrations, resulting in the following model:
Equation M12.4
[ Team LiB ]
[ Team LiB ]
1. What is the required steady-state propofol infusion rate to maintain a desired blood
concentration of 2 mg/ml?
2. Develop the state space model, based on Equations (M12.2) and (M12.3 or M12.4),
assuming that the plasma volume is 12 liters. What are the units of the manipulated input
(propofol infusion rate) and measured output (blood concentration)?
3. Develop the process transfer function model, if the manipulated drug infusion rate has units
of mg/hr, and the blood concentration has units of mg/ml.
[ Team LiB ]
[ Team LiB ]
Clearly, there is a tremendous motivation for the development of closed-loop insulin delivery
systems. Current technology involves external pumps with insulin reservoirs that can deliver
insulin continuously, rather than having "pulses" due to shots administered several times a day.
With an external infusion pump, the patient must still perform tests to monitor blood glucose
levels.
There is a major research effort to develop implantable glucose sensors and insulin infusion
pumps. An implanted sensor will measure glucose and send a telemetry signal to a small,
wristwatch-sized controller that can send another telemetry signal to a small implanted insulin
pump. This closed-loop system essentially acts as an artificial pancreas, yielding a lifestyle that
differs little from a nondiabetic person on a day-to-day basis.
Nonlinear Model
One of the more widely used models of the effect of insulin infusion and glucose (meal) inputs on
the blood glucose concentration is known as the Bergman "minimal model" (Bergman et al.,
1981). This is described by three differential equations:
Equation M12.5
where G and I represent the deviation in blood glucose and insulin concentrations, respectively.
Also, X is proportional to the insulin concentration in a "remote" compartment. The inputs are
Gmeal, a meal disturbance input of glucose, and U, the manipulated insulin infusion rate. The
parameters include p1, p2, p3, n, and V1 (which represents the blood volume). Other parameters
are Gb and Ib, the "basal" (baseline or steady state) values of blood glucose and insulin
concentration. These values can be used to determine the basal infusion rate of insulin necessary
to maintain a steady state.
Linear Model
A linear state space model can be developed for use in control-system design. Here, define the
state, input, and output variables (in deviation form) as
Equation M12.6
where the first input is manipulated (insulin infusion) and the second input represents a meal
glucose disturbance. The state space model is
Equation M12.7
It is necessary to be careful with units. Since the concentrations are in mmol/liter, and the
glucose disturbance has units of grams, we must apply a conversion factor of 5.5556 mmol/g to
the Gmeal term. Solving for the steady states, we find that the basal insulin infusion rate must be
Ub = 16.667 mU/min. For these parameters, the resulting state space model is
Equation M12.8
In the United States it is more common to work with glucose concentration units of mg/deciliter
rather than mmol/liter. Since the molecular weight of glucose is 180 g/mol, we must multiply the
glucose state (mmol/liter) by 18 to obtain the measured glucose output (mg/deciliter). This yields
the following state-output relationship
Equation M12.9
Equation M12.10
Equation M12.11
In practice, the glucose does not directly enter the blood stream. The processing in the gut before
entering the blood can be modeled as a first-order transfer function with a 20-minute time
constant. This means that the disturbance transfer function, including the lag in the gut, is
Equation M12.12
Also, unlike many chemical process disturbances, a meal disturbance is best modeled as a pulse.
Assume that a 50 g glucose meal is consumed over a 15-minute period; the pulse then has a
magnitude of 3.333 g/minute for a duration of 15 minutes.
A number of control strategies could be used. One suggestion is to simplify the process transfer
function (M12.10) to the following form
Equation M12.13
and design an IMC-based PD or PID controller. Also, since the diabetic knows when they are
consuming a meal, some type of feed-forward action can be used.
Perform disturbance rejection simulations and discuss your results. What feedback-only design
(and tuning) do you recommend? What are the minimum and maximum blood glucose values that
occur after a pulse meal consumption of 50 g glucose over a 15-minute period? Does your
strategy satisfy constraints on the insulin infusion rate? How much better is the performance if
feed-forward control is included? Compare the resulting blood glucose profiles with those found in
the literature.
[ Team LiB ]
[ Team LiB ]
A 70-kg patient exhibits the following input-output behavior for the effect of sodium nitroprusside
(SNP) on mean arterial pressure (MAP):
where the pressure unit is mm Hg, the drug flow units are ml/hr and the time unit is minutes. The
initial MAP (with no SNP infused) is 175 mm Hg. The desired MAP setpoint is 100 ± 15 mm Hg,
and the maximum allowable (short-term) SNP infusion rate is 150 ml/hr. The desired settling time
(time for the MAP to remain within limits) is 5 minutes.
2. Design an internal model controller for this system. What is the minimum l value that can
be used and still satisfy the drug infusion limit? What is the maximum l value that can be
used and still satisfy the settling time limit?
3. Design an IMC-based PI controller for this system, using the "improved" parameters (Table
9.2). Compare the closed-loop performance with a "pure" IMC strategy (developed in
problem 2).
[ Team LiB ]
[ Team LiB ]
The goal of this control system design is to manipulate the flow rate of two drugs, dopamine
(DPM) and sodium nitroprusside (SNP), to maintain the two outputs at their desired setpoints. A
successful implementation of such a strategy allows the anesthesiologist to spend more time
monitoring other patient states, such as "depth of anesthesia."
Equation M12.14
where inputs 1 and 2 are SNP and DPM (ml/hr), and outputs 1 and 2 are MAP (mmHg) and CO
(liters/min). The time constants have units of minutes.
1.
1. Based on the RGA (Chapter 13), what are the natural pairings? Ordinarily, one would control
MAP by manipulating SNP and control CO by manipulating SNP. Does the RGA rule out this
strategy? Why or why not?
2. Consider the transfer function matrix. If the nominal steady-state drug infusion rates are 0,
can the cardiac output (CO) be decreased by infusing these drugs? Why or why not?
3. Perform an SVD analysis (Chapter 14), assuming that the transfer function matrix (M12.14)
is properly scaled. What are the strongest and weakest output directions for this process?
4. Assume that the initial steady states for MAP and CO are 120 mm Hg and 4 liters/min,
respectively. Design controllers and perform simulations for step setpoint changes to 100
mm Hg and 4.5 liters/min. Discuss controller performance and the different behavior if
setpoint changes are made individually versus simultaneously.
[ Team LiB ]
[ Team LiB ]
M12.7 Summary
Automation and control in biomedicine is an important area of research, with many potential long-
term health care benefits. Sensors, the difficulty of developing a reliable model, and "fuzzy"
performance specifications all create difficulties in feedback-control design. For each of the
examples presented in this module, it is recommended that you perform a literature review to
understand the current state of the art.
[ Team LiB ]
[ Team LiB ]
References
A nice textbook on this general topic is:
Northrop, R. B., Endogenous and Exogenous Regulation and Control of Physiological Systems,
Chapman and Hall/CRC, Boca Raton, FL (2000).
For examples of biomedical control applications, see the following special issue:
Bequette, B. W., and F. J. Doyle III (Eds.), IEEE Engineering in Medicine and Biology Magazine,
Special issue on automation in biomedicine, Jan/Feb (2001).
Vuyk, J., F. H.M. Engbers, A. G.O. Burm, A. A. Vletter and J. G. Bovill, "Performance of Computer-
Controlled Infusion of Propofol: An Evaluation of Five Parmacokinetic Parameter Sets," Anesth.
Analg., 81, 1275–1282 (1995).
Bellazzi, R., G. Nucci, and C. Cobelli, "The Subcutaneous Route to Insulin-Dependent Diabetes
Therapy," IEEE Engineering in Medicine and Biology Magazine, 20(1), 54–64 (2001).
Parker, R. S., F. J. Doyle III, and N. A. Peppas, "The Intravenous Route to Blood Glucose
Control," IEEE Engineering in Medicine and Biology Magazine, 20(1), 65–73 (2001).
The parameters for the diabetes model are presented in the following paper:
Lynch, S. M., and B. W. Bequette, "Estimation-based Model Predictive Control of Blood Glucose in
Type I Diabetics: A Simulation Study," in Proceedings of the 27th Northeast Bioengineering
Conference, Storrs, CT, pp. 79–80 (2001).
Isaka, S., and A. V. Sebald, "Control Strategies for Arterial Blood Pressure Regulation," IEEE
Trans. Biomed. Eng., 40(4), 353–363 (1993).
An experimental study of the simultaneous control of blood pressure and cardiac output is
presented in the paper:
[ Team LiB ]
[ Team LiB ]
Additional Exercises
2: Ventricular Assist Devices (VAD) help a weakened left ventricle to supply more
"pumping action" to the blood. Perform a literature search and discuss at least two
papers presenting VAD control studies.
[ Team LiB ]
[ Team LiB ]
Understand the importance of input "direction" when making step input changes
Understand how an input "direction" affects the magnitude and "direction" of the resulting
output change
M13.9 Summary
[ Team LiB ]
[ Team LiB ]
For a number of reasons, composition sensors may not be installed or many not be in service. The
distillate and bottoms streams compositions can be inferred by measuring the temperatures of
trays near each end of the column, as shown in Figure M13-2. The tray temperature
measurement dynamics are typically more rapid than the product stream composition
measurements, so tighter disturbance rejection may be possible with this strategy. For
convenience, we assume throughout the rest of this module that composition measurements are
available. The analysis and design techniques presented in this module can easily be used for the
temperature-control system shown in Figure M13-2.
Simplified Model
The column studied is a 41-stage binary separation. For ease of modeling, it is assumed that the
manipulated inputs are reflux flow rate and vapor boil-up rate. In practice, the steam flow rate to
the reboiler would be manipulated, but it is related to the vapor boil-up by the heats of
vaporization of the bottoms stream and the steam.
An input-output transfer function model for the dual composition control strategy is
Equation M13.1
The outputs are the distillate (xD) and bottoms (xB) composition, in mole fraction of light
component. The manipulated inputs are the reflux (L) and vapor boil-up (V) rates, in kilomoles
per minute. The disturbance inputs are feed flow rate (F, kmol/minute) and feed light component
mole fraction (zF). The unit of time is minutes. The steady-state compositions are 0.99 and 0.01
mole fraction light component for the distillate and bottoms product streams, respectively. The
steady-state manipulated inputs (reflux and vapor flow rates) are 2.706 and 3.206 kmol/minute,
respectively. The feed to the column is 1 kmol/minute, with a feed composition of 0.5 mole
fraction light component and a feed quality of 1.
[ Team LiB ]
[ Team LiB ]
A first-order closed-loop response is achieved for each of these controllers operated independently
(only one loop closed at a time). The reader should verify, through simulation of the independent
controllers, that IMC filter factors of 25 minutes lead to closed-loop time constants of roughly 25
minutes (see Additional Exercise 2).
[ Team LiB ]
[ Team LiB ]
This RGA indicates that the xD-L (distillate composition-reflux flow) and xB-V (bottoms
composition-reboiler vapor flow) input-output pairings are the only possible pairings, since pairing
on a negative relative gain would lead to a failure-sensitive system. It also indicates that this
system is sensitive to model uncertainty and that significant tuning parameter changes must be
made (typically, the magnitude of the proportional gains must be increased) so that both loops
can be closed simultaneously with good performance. Very often, with high relative gain systems,
tuning parameters that work well with both loops closed will be unstable if one of the loops is
opened (either by an operator or by the failure or saturation of a valve). With high relative gain
systems, one must often decide to simply keep one loop under control and sacrifice the control of
the less important output variable.
[ Team LiB ]
[ Team LiB ]
Setpoint Changes
In Section M13.3, the composition control loops were tuned independently using the IMC-based PI
technique, neglecting time delays. The control system was simulated assuming a 2-minute time
delay on all measurements. The IMC filter factors (l 1, l2) were both set to 25 minutes, one third
of the process time constant. Here, we show the responses for both loops closed simultaneously.
The response for a setpoint change of 1 mol% (0.01 mole fraction) in the distillate composition is
shown in Figure M13-6. Note that the controllers are highly interacting and the response time is
extremely slow (the outputs are still far from the setpoint after 1000 minutes).
Figure M13-6. Setpoint change of r = [1,0], mol% light comp. Note the
long timescale.
It is intriguing that simultaneous setpoint changes of 0.625 mol% in the distillate and 0.78 mol%
in bottoms composition lead to much more rapid closed-loop responses, as shown in Figure M13-
7. Notice here that the time scale is 100 minutes, and that the desired setpoint has been achieved
in 55 minutes.
The reader should tune the controllers for tighter performance for the setpoint change in the
"slow" direction (Figure M13-8). Decrease l 1 and l2 (increase the magnitude of the proportional
gains) and observe the behavior (Additional Exercise 3). Also, once tighter control has been
achieved with both loops closed, consider the effect of opening one loop. You should observe that
the other loop goes unstable (Additional Exercise 4).
[ Team LiB ]
[ Team LiB ]
where U is the left singular vector matrix, S the diagonal matrix of singular values, ordered, and V
the right singular vector matrix. The left and right singular vector matrices are both orthonormal
matrices; that is, each column of the matrix is orthogonal to all other columns and the columns
each are unit length. The diagonal singular value matrix is ordered so that the largest singular
value is in the (1,1) position. Note that the standard notation for SVD is to use U to represent the
left singular vector matrix. Please do not confuse this with the u vector commonly used to
represent the vector of manipulated inputs.
When performing a singular value analysis, it is important to scale the inputs and outputs to cover
the same range. For this system, we assume that we desire the output compositions to vary by
only ±0.01 mole fraction. Also, we assume that the inputs vary by ±0.5 kmol/minute. The scaled
process gain matrix is then
gs =
43.9000 -43.2000
54.1000 -54.8000
» [u,s,v] = svd(gs)
u =
0.6246 -0.7809
0.7809 0.6246
s =
98.6043 0
0 0.6957
v =
0.7066 -0.7077
-0.7077 -0.7066
» cond(gs)
ans = 141.7320
which indicates that this is an ill-conditioned system. The first column of the left singular vector
matrix indicates that the most sensitive output direction is a simultaneous change in the distillate
and bottoms composition in the same direction. The first column of the right singular vector
matrix indicates that the strongest input direction is to change reflux and vapor boil-up by the
same magnitude, but in different directions (increase reflux and decrease vapor boil-up, or vice
versa). Physically, this is because these types of changes have a greater effect on the overall
material balance around the column.
We can view these SVD results to understand both open-loop and closed-loop effects.
Open-loop. An input in the most sensitive direction will have a large-magnitude effect on the
outputs. This means that an input in the most sensitive direction has a high "gain" effect on the
output; that is, a small input change causes a large output change. Similarly, an input in the least
sensitive direction (column 2 of the V matrix) has very little effect on the output. These effects
are illustrated by the open-loop responses in Figures M13-4 and M13-5. Figure M13-4 is a forcing
in the most sensitive input direction, while Figure M13-5 is a forcing in the least sensitive
direction.
Closed-loop. A desired output change in the most sensitive output direction will require an input in
the most sensitive input direction, and these are associated with the largest singular value. This
means that a setpoint change in the most sensitive output direction will not require as large a
magnitude input change as a setpoint change in the least sensitive output direction. It should be
noted that the response shown in Figure M13-7 is based a setpoint change in the most sensitive
output direction, which requires little manipulated variable action. The reader should show that a
setpoint change in the weakest direction will yield a slow response, similar to Figure M13-6.
[ Team LiB ]
[ Team LiB ]
Figures M13-8 and M13-9 show small open-loop changes in the manipulated inputs. The reader
should perform additional small open-loop changes to verify that the outputs do not change much
when the purity is increasing but can change tremendously when the purity is decreasing
(Additional Exercise 5).
Because of nonlinear effects, a controller designed at setpoint may not operate well when the
setpoint is significantly changed. The reader is encouraged to perform SISO control simulations
(Additional Exercise 6) and multiple loop simulations (Additional Exercise 7).
[ Team LiB ]
[ Team LiB ]
In this chapter we have assumed that the pressure and level loops are perfectly controlled. In
Figures M13-1 and M13-2 we used a simplified representation for the pressure control loop, where
the pressure was controlled by manipulating the condenser cooling water flow rate. In practice,
there are many different ways to control column pressure. (See the references section for articles
discussing various pressure control methods.)
[ Team LiB ]
[ Team LiB ]
M13.9 Summary
In this chapter, we have focused on "conventional control" of distillation columns, where reflux is
manipulated to control distillate composition and reboiler vapor boil-up rate is manipulated to
control bottoms composition. The RGA indicates that this is the only satisfactory pairing for this
strategy. We have found that this process is very sensitive to the multivariable direction of the
manipulated inputs (open loop), or the setpoints (closed loop). The SVD is a useful mathematical
tool for finding the strongest and weakest directions for a multivariable process.
[ Team LiB ]
[ Team LiB ]
References
The distillation model is presented in Bequette (1998), based on a column studied by Morari and
Zafiriou (1989) and Skogestad and Postlethwaite (1996).
Bequette, B. W., Process Dynamics. Modeling, Analysis and Simulation, Prentice Hall, Upper
Saddle River, NJ (1998).
Morari, M., and E. Zafiriou, Robust Process Control, Prentice Hall, Englewood Cliffs, NJ (1989).
Skogestad, S., and I. Postlethwaite, Multivariable Feedback Design, Wiley, New York (1996).
Sigurd Skogestad has published a nice series of articles that discuss the dynamics and control of
distillation columns. The following review paper can be found at his web site
(www.kjemi.unit.no/~skoge): Skogestad, S., "Dynamics and Control of Distillation Columns. A
Tutorial Introduction," paper presented at Distillation and Absorption '97, Maastricht, Netherlands
(8–10 September, 1997).
Skogestad, S., and M. Morari, "Understanding the Dynamic Behavior of Distillation Columns," Ind.
Eng. Chem. Res., 27(10), 1848–1862 (1988).
Skogestad, S., and M. Morari, "Control Configuration Selection for Distillation Columns," AIChE J.,
33(10), 1620–1635 (1987).
For a discussion of the many practical issues in distillation control, see the following:
There are many ways to regulate the pressure in a distillation column. Two nice articles are as
follows:
Chin, T. G., "Guide to Distillation Pressure Control Methods," Hydrocarbon Processing, 86(10),
145–153 (1979).
Sloley, A. W., "Effectively Control Column Pressure," Chem. Eng. Prog., 97(1), 38–48 (2001).
[ Team LiB ]
[ Team LiB ]
Additional Exercises
1: Generate responses to step changes of ±0.01 kmol/minute in the vapor boil-up rate (V)
at t = 10 minutes. Compare and contrast these responses with those of the reflux
changes shown in Figure M13-3. Are these changes consistent with the transfer function
matrix?
2: Consider the SISO controllers. The reader should verify through simulation that the
independent controllers with IMC filter factors of 25 minutes lead to closed-loop time
constants of roughly 25 minutes.
a. First, close the xD-L loop and make a setpoint change of 0.005 mole fraction.
b. Next, close the xB-V loop (with xD-L open) and make a setpoint change of -0.005
mole fraction. In each case, show the change of both compositions.
3: Consider the case where both SISO controllers are closed simultaneously. Tune the
controllers tighter for the setpoint change in the "slow" direction (Figure M13-8).
Decrease l 1 and l2 (increase the magnitude of the proportional gains) and observe the
behavior.
4: Using the tuning parameters found in Additional Exercise 3, study the response to a
setpoint change if one of the loops is "opened." You should find that the other loop goes
unstable or has oscillatory performance.
5: Now perform open-loop step changes on the nonlinear model. Show that the purity
never changes much when it is increasing but can exhibit large changes when
decreasing.
6: Perform closed-loop SIS0 studies on the nonlinear system. For small setpoint changes
(say, from 0.990 to 0.991 on the distillate composition), the results are similar to the
linear case. For large setpoint changes (say, from 0.990 to 0.999), the differences can
become more substantial.
7: Perform closed-loop studies on the nonlinear system with both loops closed. For small
setpoint changes in the most sensitive directions (say, from 0.9900 to 0.9906 on
distillate and from 0.0100 to 0.0108 on bottoms), the results are similar to the linear
case.
[ Team LiB ]
[ Team LiB ]
Appendix M13.1
The SIMULINK .mdl diagram for the open-loop transfer function model is shown in Figure M13-10.
[ Team LiB ]
[ Team LiB ]
M14.1 Background
M14.8 Summary
A partial solution for the drug infusion case study is presented on the textbook web page.
[ Team LiB ]
[ Team LiB ]
M14.1 Background
The development and implementation of an industrial control strategy is complex and involves a
number of steps. A goal of this module is to present a number of interesting important process
control problems that require the synthesis of concepts presented in this textbook. One use of this
module is for a special project studied during the final few weeks of a typical undergraduate
process control course. Students, often working in small groups, select one of the challenge
problems discussed in this module. Here we discuss some of the critical steps of the control
system development.
It is important to consider the control objectives for a particular process; in addition, it one should
consider previously developed strategies and understand how successful they were/are.
Sometimes this information is available from a currently operating plant in the corporation. In
other cases, a literature search can provide important background material. The next step is to
develop a process model, either from first principles, or from testing an existing process. In this
module we assume that the step testing approach is being used; since we do not have direct
access to an operating plant, SIMULINK modules are used to mimic plant behavior; these can be
downloaded from the textbook web page. Models can then be used to develop SISO control loops,
and to understand/predict possible multivariable interaction problems when all loops are closed. If
the closed-loop performance of multiple SISO loops is not satisfactory, then multivariable
techniques can be developed.
When working on these problems, use the following steps and answer the following questions:
What types of control strategies and objectives have been used on similar processes?
What types of input tests should be performed to develop models for control system design?
Do the responses of the models adequately match the actual plant responses?
Do the orders of magnitudes of the model gains, time constants, and time delays make
physical sense?
If using independent SISO control loops (MVSISO), what pairings are suggested by the RGA
analysis?
If an SISO controller is tuned based on the other loops being open, does the tuning need to
change when all the other loops are closed?
Should a decoupling (steady-state or dynamic) type of control strategy be used for real
(MIMO) multivariable control? What about multivariable IMC?
Can you think of any other measured or manipulated variables that could be used?
When tuning the independent SISO loops (assuming the other loops are open), it is probably best
to use a procedure that you are familiar with, such as IMC-based PI. You will generally use a
closed-loop time constant (l, the IMC filter factor) of roughly one half of the open-loop time
constant (if this satisfies the minimum requirements for l based on the dead time).
When testing controller performance for these multivariable processes, it is probably best to
initially make a step change in one setpoint while keeping all other setpoints constant (for
example, change r 1 without changing r 2). Do this for each loop. Compare how a setpoint change
in one output variable affects the other output variables. Also consider the manipulated variable
responses.
[ Team LiB ]
[ Team LiB ]
Two variables important to control are the voltage bias of the plasma and the fluorine
concentration, since they ultimately determine the etch rate. Two important manipulated
variables are the RF power and the outlet valve position (throttle). A schematic of a reactive ion
etcher is shown in Figure M14-1.
A reactive ion etcher has power and throttle position inputs (P and T) and voltage (Vbias) flourine
concentration (F) as outputs.
Questions to Answer
Will fundamental models or input/output tests (i.e., step tests) normally be used for control
system design?
The nominal and range of operating conditions for this system are as follows:
Inputs: power 1000 W, range from 0 to 2000 W; throttle, 50%, range from 0 to 100%.
Outputs: voltage, 250 V; fluorine, 50% of range.
A SIMULINK block diagram for a reactive ion etcher is shown in Figure M14-2. The inputs and
outputs of the etcher are in physical (not deviation) variables.
[ Team LiB ]
[ Team LiB ]
[ Team LiB ]
[ Team LiB ]
The steady-state input values are 294 kg/s (Fs), 25.35 kg/s (Fa) and the output values are
776.9°F (T1) and 998.1 (Tcy), the regenerator temperature (Trg) is 965.4°F. Assume that the
manipulated inputs can vary by ± 50% of the nominal steady-state values.
[ Team LiB ]
[ Team LiB ]
The time unit is days, and the inputs and outputs have been scaled to cover the same ranges.
The outputs and inputs are y1 = substrate concentration, y2 = temperature, u1 = inlet flow rate,
and u 2 = heat addition rate (°C/day). The steady-state inlet flow rate is 300 m3/day, the heat
addition rate is 10°C /day. The steady-state temperature is 55°C and substrate concentration is
300 mg/liter.
Besides considering setpoint responses, assume that disturbances in the inlet flow rate occur.
[ Team LiB ]
[ Team LiB ]
The goal of this control system design is to manipulate the flow rate of two drugs, dopamine
(DPM) and sodium nitroprusside (SNP), to maintain the two outputs (MAP and CO) at their
desired setpoints. A successful implementation of such a strategy allows the anesthesiologist to
spend more time monitoring other patient states, such as "depth of anesthesia."
The steady-state (initial) drug infusion rates are both 0, while the steady-state (initial) mean
arterial pressure is 120 mmHg and cardiac output is 130 ml/(kg min). A partial solution to this
problem is presented on the textbook web page. The maximum flow rates for both drugs is 10
mg/(kg min).
[ Team LiB ]
[ Team LiB ]
Each problem (unit operation) will have an "advisor" who will answer questions that you have
regarding the problem and possible solutions techniques. After you turn in part 1, you will be
assigned an advisor. You should probably plan to meet with the advisor once per week, during
office hours, during the project period.
An example partial solution to a biomedical engineering control problem (drug infusion control) is
presented on the web page.
Write a short memo (two pages or fewer), giving the following information:
The importance of the unit operation to the particular industry. What are typical sizes
or production rates?
A literature search with references related to control of the unit operation. A web-
based search (using Google or some other search engine) is unacceptable. We are
interested in sources published in books, journals, magazines, or conference
proceedings. Appropriate databases include Current Contents and the EI Compendex.
The SIMULINK files for each problem are available on the textbook web page. You will apply
step inputs to identify the process transfer functions for the next phase of the project.
Write a short memo (one page or under) summarizing your modeling results. Attach the
following information to the memo:
Comparison of open-loop step tests with model step responses (superimpose the model
3.
and plant responses)
Write a short report summarizing the control system design for each independent SISO
controller. Please include the following:
How does a setpoint change in a controlled loop affect the uncontrolled loop?
The RGA analysis: Based on the RGA, suggest how the variables should be paired in a
MVSISO control structure (i.e., y1 paired with u1 and y2 paired with u2).
The suggested PI or PID tuning parameters that you would use if the loops did not
interact: For example, what tuning parameters would you recommend for loop 1 if loop
2 was open; you may use IMC-based PI or PID, Cohen-Coon, Ziegler-Nichols, Direct
Synthesis, or frequency-response-based tuning (satisfying certain gain and phase
margins).
A couple of plots: One for the setpoint response of loop 1, with loop 2 open; another
for the setpoint response of loop 2, with loop 1 open.
Do you suspect that the control loops must be detuned if all loops are closed? Use the
RGA to assist you with this.
Are there dynamic reasons that you might want not pair outputs and inputs based on
the RGA?
Prepare a short (fewer than 15 minutes) oral presentation with overhead transparencies.
Each group member should make an equal contribution. The problem advisor and at least
one other consultant will observe the presentation and ask questions.
a. A title page, giving a list of the group members. Include a one paragraph abstract that
summarizes the results presented in the report.
d. A short section with the preliminary pairing selection based on RGA analysis.
e.
c.
d.
e. A single-loop results section giving the setpoint responses of each control loop
separately (i.e., setpoint response for loop 1 assuming loop 2 is open).
f. A MVSISO results section for the setpoint responses of each control loop. In this, you
will show the results of a setpoint change in loop 1 with loop 2 closed. Did you need to
detune either loop?
h. A recommendations section. Do you feel that MVSISO control is sufficient? Do you feel
that a multivariable technique such as decoupling should be used? Do you feel that the
system needs to be studied further using more advanced techniques?
i. The previous reports (with the advisor comments) placed in the appendix of the report.
[ Team LiB ]
[ Team LiB ]
M14.8 Summary
We have presented module of case study example problems. The simulation files can be
downloaded from the textbook web page, allowing a complete, realistic control system study. This
includes model development, SISO controller design, MVSISO design (including retuning of
controllers and consideration of failure tolerance). Additional case study problems will be added to
the web page.
[ Team LiB ]
[ Team LiB ]
Additional Exercises
For each of the case studies, the following additional studies can be performed, depending on the
interests of the students and instructor:
[ Team LiB ]
[ Team LiB ]
Discuss the flow characteristics of equal percentage, quick-opening, and linear control valves
and understand when each should be used
M15.2 Flowmeters
M15.5 Summary
[ Team LiB ]
[ Team LiB ]
Flowmeter— often an orifice plate meter. The volumetric flow rate is proportional to the
square root of the pressure drop across the orifice plate
DP (differential pressure) cell— measures the pressure drop across the orifice plate
P/I (pressure to current) transducer— converts the pressure signal to a 4- to 20-mA current
signal
Controller— the input to the controller is a 4- to 20-mA current signal. The output of the
controller is a 4- to 20-mA current signal
Control valve actuator— translates the 3- to 15-psig pressure signal to a valve position
Notice that this control loop is based on having an electronic analog controller. In practice, there
are still a number of pneumatic analog controllers, where the input and output signals are
pressure signals (typically 3–15 psig). Also, more of the "field equipment" (flow transmitters, etc.)
are microprocessor-based, so often the signals to and from the controller are digital in nature.
Now we further analyze each component of instrumentation in terms of its transfer function.
Flowmeter
We can think of the input to the flowmeter as the actual flow rate of the process fluid. The output
of the flowmeter is the pressure drop across the orifice plate. Here, we determine the gain of the
flowmeter by simply considering the minimum and maximum flows and how they relate to the
pressure drop
Consider a flowmeter where the flow rate varies from 0 to 5 gpm, while the pressure drop varies
over a range of 0–2 psig. The flowmeter gain is then
The dynamics of flowmeters are so fast compared with the process dynamics that we can
normally neglect the time constant and assume that the transfer function is represented as a
static gain. Also, in practice the gain is not constant because the pressure drop is a nonlinear
function of the flow rate. This is discussed in depth in Section M15.2.
DP Cell
The DP cell measures the pressure drop across the orifice plate. We can think of the gain as being
part of the flowmeter gain. The dynamics of differential pressure cells are so fast compared with
the process dynamics that we can normally neglect the time constant and assume that the
transfer function is represented as a static gain.
Again, the dynamics are so fast that they are normally neglected.
Often a controller uses proportional band (PB) as a tuning parameter, rather than proportional
gain. The PB is defined as the range of error that causes the controller output to change by the
full range (100%). We see that relationship can be written
Equation M15.1
For example, if a change in error (De) of 10% causes a 50% change in controller output (Du),
then the PB is 20.
We recognize that the controller gain we are familiar with can be written
Equation M15.2
Equation M15.3
Comparing Equations (M15.3) and (M15.2), we see that
Equation M15.4
We have always used a simplified representation for a controller for analysis purposes. In
practice, a controller performs the computations shown in Figure M15-3.
We see that the controller transfer function operates on signals that are scaled from 0 to 100% of
range. The following scaling factors are used:
Current-to-Pressure Transducer
The input to the I/P transducer is a 4- to 20-mA signal and the output is a 3- to 15-psig signal.
The I/P gain is then
Control Valve
Control valves will be covered in more depth in Section M15.3. Consider here the two cases: a
fail-closed valve and a fail-open valve.
Fail-Closed Valve
If the pressure signal to the valve changed, this valve would close, hence the term fail-closed.
These valves are also called air-to-open. Consider a case where flow rate through the valve is 5
gpm when it is fully open (15-psig signal). Assuming that the valve is fully closed at 3 psig (or
less), the valve gain is
Fail-Open Valve
If the pressure signal to the valve changed, this valve would open, hence the term fail-open.
These valves are also called air-to-close. Consider a case where the flow rate through the valve is
5 gpm when it is fully open (3-psig signal). Assuming that the valve is fully closed at 15 psig (or
more), the valve gain is
One of the most important things that a process engineer can do is to specify whether a valve is
air-to-open or air-to-close. For example, if the control valve was manipulating the cooling water
flow to a nuclear reactor, then a fail-open valve should be specified.
Valve dynamics can become significant for larger valves. A laboratory valve may have a time
constant of perhaps 1–2 seconds, a valve on a 3-inch process pipe may have a time constant of
3–10 seconds, and a valve on the Alaska pipeline may have a time constant of minutes.
[ Team LiB ]
[ Team LiB ]
M15.2 Flowmeters
An orifice plate meter is the most common flow measurement device. A constricting orifice is
placed between two flanges, as shown in Figure M15-4. As the fluid "speeds up" through the
orifice, the pressure drops. The volumetric flow rate is related to the pressure drop across the
orifice. As shown in the motivating example, a DP cell is typically used to measure the pressure
drop; here, we use a manometer for illustrative purposes.
The equation for flow through an orifice is (McCabe and Smith, 1976)
Equation M15.5
gc is Newton's law gravitational constant, 32.174 ft lb m/lb fs2; r is the fluid density;
Equation M15.6
so the volumetric flow rate [combining Equations (M15.5) and (M15.6)] is
Equation M15.7
Equation M15.8
where
Equation M15.9
Notice that C1 will be a constant for a given system. Notice also that an orifice plate has a
nonlinear input-output relationship. Consider the input to be the volumetric flow rate. The output
is the differential pressure. After rearranging Equation (M15.8) we find Equation (M15.10) and
notice that the pressure drop is a function of the square of the flow rate,
Equation M15.10
This means that the orifice plate gain (pressure drop change/flow rate change) increases with
increasing flow. The orifice plate gain is
Equation M15.11
and we see that if the flow rate doubles, then the orifice plate gain doubles. If a controller is tuned
to obtain good control when the flow rate is low, there is a chance that the control loop will
become unstable when the flow rate is high, because of the increase in overall control loop gain,
which is due to the increasing orifice plate gain. A common way of handling this varying gain
problem is to use a square root extractor.
Equation M15.12
Equation M15.13
Notice that the square root extractor gain is inversely proportional to the square root of the
pressure drop. The purpose of a square root extractor can be seen by combining Equations
(M15.12) and (M15.10) to yield
Equation M15.14
The gain between flow rate and the signal out of the square root extractor is
where . That is, we have a signal that is now directly proportional to the flow rate.
[ Team LiB ]
[ Team LiB ]
Equation M15.15
where F is the volumetric flow rate, Cv is the valve coefficient, x is the fraction of valve opening,
DPv is the pressure drop across the valve, s.g. is the specific gravity of the fluid, and f(x) is the
flow characteristic.
Three common valve characteristics are linear, equal-percentage, and quick-opening. For a linear
valve,
Equation M15.16
Equation M15.17
Equation M15.18
Think about the orifice plate nonlinearity. If a square root extractor is not used, then the orifice
plate gain is low at low flow rates and high at high flow rates [see Equation (M15.11)]. Notice that
the quick-opening valve has a high gain at low flow rates and a low gain at high flow rates,
exactly the opposite of the orifice plate. Since the flowmeter and control valve are both elements
in a control loop, the overall gain of the loop may be relatively unchanged by combining the
nonlinearity of the direct-acting valve with the nonlinearity of the orifice plate flowmeter. This is
probably less important in this day and age because square root extractors or computer
computation of the actual flow rate can compensate for the orifice plate nonlinearity. A quick-
opening valve is then no longer necessary. We discuss this because a number of older plants still
have old analog equipment, which may not have nonlinear compensation (e.g., square root
extraction) for the orifice plate. Perhaps a process was originally designed with the direct-acting
valve and an orifice plate flowmeter with square root extraction. If a recent "retrofit" (installation
of new equipment) to change the control instrumentation involved adding nonlinear compensation
(square root extraction, etc.) but did involve the replacement of the control valve, then the
overall loop gain could change tremendously as a function of the flow rate. These thoughts may
help you when you are troubleshooting a control problem.
Notice that the curves in Figure M15-5 are based on a constant pressure drop across the valve.
This may be reasonable, for example, if the pressure drop through a piping system was negligible
and all the pressure drop was due to the valve. In this case, a linear valve is desirable because
there is a linear relationship between the valve position and the actual flow rate.
There are many systems, however, where the pressure drop due to piping is a significant portion
of the pressure drop through the system and the pressure drop through the valve is not constant,
and thus it may be desirable to use a nonlinear valve. This is shown more clearly in the next
section.
[ Team LiB ]
[ Team LiB ]
A typical pump head curve is shown in Figure M15-7. The pump head is a direct measure of the
pressure increase between the suction and discharge of the pump that can be obtained as a
function of the flow rate through the pump.
Figure M15-7. Pump head curve for a typical centrifugal pump [see
Figure 6-7 from Perry and Green (1984)].
where hp is the pump head in feet. The process will operate at the intersection of the pump head
and system head curves, as shown in the following discussion.
Assume that the pressures Pa and P4 are known. Pa is the ambient (or atmospheric) pressure and
P4 is the pressure at some known point downstream. If the height of liquid in the tank is known,
then P0 can be calculated for any given flow rate as
Equation M15.19
where h is the height of fluid between the tank level and the suction side of the pump and DPs p is
the pressure loss due to friction in the suction piping. The pressure drop is generally proportional
to the square of the volumetric flow rate.
The pump discharge pressure, P1, can be determined either using P0 and the pump head curve as
a function of flow rate,
Equation M15.20
or using the pressure drop through the discharge piping system and the final pressure, P4.
Using the second method, we can basically determine the system head as a combination of the
pressure drop through the chemical process (DPcp) and across the orifice plate (DPop).
Equation M15.21
The pump discharge pressure can be found as
Equation M15.22
Obviously, the problem solution is where P1 from Equation (M15.20) is equal to P1 from Equation
(M15.22).
Numerical Example
Consider the pump head curve shown in Figure M15-7. Assume that the maximum flow rate is
240 gpm. The pump head at this flow rate is 76 feet of water. Now, let's make some assumptions
about the other pressures in the system. First, we know that P1 calculated from Equation
(M15.20) is equal to P1 from Equation (M15.22), or
Equation M15.23
Equation M15.24
At the maximum flow rate of 240 gpm, assume that the system head is
We can easily determine the system head at any other flow rate (F 2) as
Equation M15.25
That is, .
The system head is compared with the pump head curve in Figure M15-8. Notice that in practice,
the pressure drop can be predicted by knowing the pipe diameter, the number of elbows and
fitting, the pipe roughness, and so forth, and by calculating an overall friction factor. The pressure
drop is a function of the square of the flow rate, so we are assuming that the pressure drop has
been calculated or measured at a particular flow rate and we simply use the ratio of the square of
the flow rates to determine the pressure drop at any other flow rate. The difference between the
pump head and the system head is the pressure drop across the valve.
Equation M15.26
Now assuming that the valve is wide open at the maximum flow rate of 240 gpm (x = f(x) = 1)
and the fluid is water, we can calculate the valve coefficient as
Notice that the unit of pressure drop that we are using is feet of water.
Then, for a given flow rate and valve pressure drop, we can calculate the fraction that the valve
must be open. That is,
And for a linear valve, the fraction that the valve is open is
and for an equal-percentage valve, the fraction that the value is open is
In each case, DPv = DPp - DPsys. These relationships are shown in Figure M15-9.
Notice that the linear valve has a more linear characteristic at low flow rates, while the equal-
percentage valve has a more linear characteristic over a wider range of flow rates, and in the
higher flow rates in particular. Notice also that the gain of the linear valve is high at low valve
opening and low at high valve openings. The equal-percentage valve has a gain that is roughly
the same at high and low valve openings and has a maximum gain that is roughly twice the
minimum gain. The linear valve has a maximum gain that is roughly 10 times the minimum gain.
If a control system using the linear valve was tuned at a high flow rate (valve gain low, controller
gain high), the control system might go unstable when operated at low flow rates. This problem is
less likely to occur with the equal-percentage valve.
[ Team LiB ]
[ Team LiB ]
M15.5 Summary
We have seen that a direct-acting valve might be used to compensate for the orifice plate
nonlinearity if no square root extractor is used. We also noted that a linear valve should be used if
the pressure drop across the valve is constant (say, the upstream and downstream headers are
maintained at constant pressure, and there is negligible pressure drop through the piping). We
notice that an equal-percentage valve should be used if a substantial amount of the pressure drop
at high flow rates is due to piping, while most of the pressure drop at low flow rates is across the
valve.
Many industrial controllers use proportional band rather than proportional gain. You can still use
any of the techniques presented in this text to find the proportional gain, and simply convert to
PB using PB = 100/kc.
[ Team LiB ]
[ Team LiB ]
References
McCabe, W. L., and J. C. Smith, Unit Operations of Chemical Engineering, 3rd ed., McGraw-Hill,
New York (1976).
Perry, R. H., and D. Green (ed.), Perry's Chemical Engineering Handbook, 6th ed., pp. 6–8, New
York: McGraw Hill (1984).
[ Team LiB ]
[ Team LiB ]
Additional Exercises
1: Consider the control valve diagram presented in Figure M15-5 and Equations
(M15.16)–(M15.18). Find the gain between the fraction of valve opening, x, and the
output of the orifice plate, DP, as a function of flow rate for each of the valves shown in
Figure M15-5. Assume that the sum of the pressure drop across the valve and the
orifice plate is constant. Assume that the constant pressure drop is 30 psig, and that at
maximum flow, three quarters of the pressure drop is across the valve and one quarter
is across the orifice plate. The gain calculation is shown conceptually below.
2: Instrumentation Search. Select one of the following measurement devices and use
Internet resources to learn more about it. Determine what types of signals are input to
or output from the device. For flow meters, what range of flow rates can be handled by
a particular flowmeter model?
a. Vortex-shedding flowmeters
b. Orifice-plate flowmeters
c. Mass flowmeters
f. Control valves
g. pH
[ Team LiB ]
[ Team LiB ]
Discrete and continuous controller performance is similar for short sample times
The discrete equivalent to a continuous-system RHP zero is a zero outside the unit circle
A discrete control system is stable if the poles of the discrete closed-loop characteristic
equation are inside the unit circle
The discrete IMC procedure factors zeros outside the unit circle and negative zeros inside
the unit circle into the "bad stuff"
A continuous process transfer function with no RHP zeros may have an equivalent discrete
transfer function with a zero outside the unit circle, if the relative order (difference in
denominator and numerator orders) is 3 or higher.
M16.1 Background
M16.6 Summary
[ Team LiB ]
[ Team LiB ]
M16.1 Background
The focus of this textbook has been on continuous systems although, in practice, most controllers
are implemented digitally. Fortunately, the sample time is usually small compared with the
process dynamics, so continuous systems theory is usually sufficient.
Processes are best described as continuous systems (with differential equation models), with
inputs that are applied continuously and outputs that are available continuously. With digital
controllers, however, measurements are made at discrete intervals of time and control moves are
made at discrete intervals of time. Discrete-time models were developed in Chapter 4 and the
conversion of continuous time to discrete time models (using LTI objects in MATLAB) were
presented in Module 4.
Recall that continuous systems are stable if their poles are negative [in the left-half plane (LHP)];
also, process models can only be inverted to form stable controllers if the models have zeros in
the LHP. Models with RHP zeros must be factored into "good" and "bad" stuff; only the portion
with LHP (good stuff) zeros can be inverted to form a controller. For continuous systems, then,
the focus is on the LHP vs. the RHP. Discrete-time systems are stable if their poles are "inside the
unit circle," that is, with a magnitude <1. If a discrete-time process model has a zero outside the
unit circle (magnitude >1), it cannot be inverted to form a stable controller; the zero must be
factored into the bad stuff before the good stuff is inverted to form a stable controller.
Stable continuous process models will always have stable discrete process transfer functions. That
is, if all poles of a continuous process model are negative, then the discrete process model will
have all discrete poles inside the unit circle. It is possible, however, for a continuous process with
no RHP zeros to have a discrete zero that is outside the unit circle. This is possible for continuous
transfer functions that have a relative order (difference between the denominator and numerator
polynomial orders) of 3 or higher. See Additional Exercise 4 for an example of this problem.
The purpose of this interactive module is to obtain a better understanding of the effect of
discretization on control system performance. We focus initially on PID control, then study IMC.
[ Team LiB ]
[ Team LiB ]
Equation M16.1
We use a constant sample time, Dt, and the index k to represent the value of the continuous time
signal at discrete step k. For example, the error at discrete sample time k is equal to the
continuous system value at time t = tk.
Equation M16.2
Equation M16.3
Equation M16.4
Equation M16.5
Notice that the manipulated variable action is calculated at discrete intervals. The most common
way of implementing the discrete control actions on a continuous process is to assume a zero-
order hold. A zero-order hold means that the control action is held constant between the sample
times, and that the manipulated variable changes instantly at each sample time.
Equation (M16.5) is known as the position form of the discrete PID controller equation. The
"velocity form" can be found by subtracting the position form at step k - 1 from that at step k:
Equation M16.6
One of the major advantages to the velocity form of Equation (M16.6) is that it is naturally
"antireset windup" (see Chapter 11 for a discussion of reset windup and procedures to prevent it).
If the manipulated input saturates, the position form of Equation (M16.5) has an integral term
that continues to accumulate, causing a potential windup problem.
Most of the PID control system design techniques covered earlier in this text (direct synthesis,
IMC-based PID, etc.) should yield successful tuning parameters for the discrete PID version, if the
sample time is sufficiently small. Generally, the sample time should be 0.01 to 0.1 times the
dominant time constant. In practice, most digital control loops are sampled several times per
second, which is far more frequently than is actually needed for most process systems.
Equation M16.7
where
In an analogy to continuous-time systems, where we let u(s) represent the Laplace transform of
u(t), we let u(z) represent the Z-transform of u(k). It is common to refer to z-1 as the backward
shift operator:
Equation M16.8
We can also multiply the numerator and denominator polynomials by z2/z2, to write
Equation M16.9
A discrete closed-loop block diagram is similar to that of a continuous block diagram. The closed-
loop relationship for a setpoint change is
Equation M16.10
[ Team LiB ]
[ Team LiB ]
so the roots of
If discretized with a sample time of 1 minute, the discrete-time process (the M ATLAB Control
Toolbox can be used to convert continuous to discrete models—see Module 4, Section M4.3) is
Consider the first-order process given in Example M16.1. For a discrete PI controller, with tI = 10
minutes, find the proportional gain that just makes the closed-loop system unstable. Verify your
analytical result via simulation; show plots similar to Figure M16-1.
[ Team LiB ]
[ Team LiB ]
where the output is temperature (°C), the manipulated input is valve position (%), and the time
unit is minutes. In Module 6 we used this example to compare the robustness of different tuning
procedures for PID-type controllers. The IMC-based "improved PI"parameters (see Chapter 9),
with l = 7.5 minutes, yields kc = 1.67%/°C and tI = 12.5 minutes for an analog PI controller. In
Figure M16-2 we compare analog PI control with discrete PI control for two sample times (1 and 4
minutes). Clearly, the control performance degrades as the sample time increases.
Perform simulations with different sample times and compare the performance of the digital
controller with the continuous controller while keeping the PID tuning parameters the same as
shown in the example.
a. Is there much difference in performance when a sample time of 0.25 minutes is used?
b. Does the discrete control system go unstable for any sample times greater than 4 minutes?
You may wish to increase the integration final time for this simulation.
[ Team LiB ]
[ Team LiB ]
Factorize into good stuff and bad stuff the discrete model
Equation M16.11
where contains zeros outside the unit circle and zeros inside the unit circle that negative.
The reason for this is that negative zeros inside the unit circle cause oscillatory poles in the
controller if not removed. Make certain that the numerator of is one order less than the
denominator polynomial. Also, form an "all-pass" in by including a pole at 1/zi for each zi
outside the unit circle. Make certain that "gain" (found by setting z = 1) of the "bad stuff" is equal
to one, while the gain of the "good stuff" is equal to the gain of the unfactored transfer function.
The design procedure is then analogous to that developed for continuous IMC in Chapter 8. The
controller is the inverse of the "good stuff" times a discrete filter to make the controller physically
realizable (numerator and denominator polynomials are the same order).
Equation M16.12
Equation M16.13
where a is a discrete tuning parameter. It is related to the continuous IMC filter factor by
Equation M16.14
where Dt is the sample time. The discrete IMC procedure is slightly more complex than the
continuous-time case for a couple of reasons. First of all, the continuous system parameters such
as time constants are much easier to interpret than the discrete-time parameters; discrete
parameters are a function of the sample time of the digital system. Also, it is easier to keep
mental track of gains in continuous-time, since setting s = 0 normally eliminates most terms in a
transfer function. In discrete-time, setting z = 1 results in the sum of a number of coefficients,
and is simply not as natural to handle.
The following example presents a step-by-step application of the discrete IMC procedure.
Example M16.3
Consider the van de Vusse reactor model studied in Module 5; this was also used as an example
for the conversion between model types in Module 4. The continuous transfer function is
and it is easy to verify that the gain (found by setting z = 1) is 0.5851, which is consistent with
the continuous time model (found by setting s = 0).
Now, the first step of the factorization procedure is to remove the zeros that are outside the unit
circle (there is a zero at 1.334), as well as the negative zeros inside the unit circle (there are none
in this particular problem)
where the discrete tuning parameter, a, is related to the continuous tuning parameter, l, by
Here, we compare the responses of the discrete control system with the continuous system. For
this sample time and choice of l = 0.2 min, there is virtually no difference, as shown in Figure
M16-3. The block diagram and m-file used for this simulation is presented in Appendix M16.2.
Choose Exercise 2, 3, or 4 from the Additional Exercises at the end of this module for further
study of the IMC design procedure. Exercise 2 is a straightforward first-order example where
there are no particular performance limitations. Exercise 3 illustrates the importance of factoring
out negative zeros inside the unit circle. Exercise 4 is an example where the continuous-time
transfer function is third-order, but minimum-phase (no RHP zeros or time delays) so there is no
limitation to achievable IMC performance. The discrete-time model, however, has a zero outside
the unit circle. This poses substantial performance limitations for the discrete-time system.
[ Team LiB ]
[ Team LiB ]
M16.6 Summary
The unit circle plays the same role in discrete-time systems that the real line does in continuous-
time systems. A zero outside the unit circle causes the same performance limitations that an RHP
zero causes for continuous systems. It is possible, however, for a continuous-time system with no
RHP zero to have a discrete zero that is outside the unit circle, if the continuous-time system has
a relative order of 3 or higher.
Discrete-time models with zeros outside the unit circle must be factored into the bad stuff for
discrete IMC controller design. This procedure is similar to continuous-time models, where RHP
zeros must be factored into the bad stuff. The main difference between continuous and discrete
systems is that even zeros than are inside the unit circle, but negative, must be factored out; if
they are not, the controller will often be too oscillatory for acceptable performance.
[ Team LiB ]
[ Team LiB ]
References
In this textbook we have used the Control Toolbox to convert continuous-time models to discrete
time models (assuming a zero-order hold). For more details on how to perform this conversion
analytically, see the following textbooks:
Stephanopoulos, G., Chemical Process Control, Prentice Hall, Upper Saddle River, NJ (1984).
Seborg, D. E., T. F. Edgar, and D. A. Mellichamp, Process Dynamics and Control, Wiley, New York
(1989).
The basic discrete IMC design procedure is covered (at an advanced level using different notation
than in our textbook) in the following:
Zafiriou, E., and M. Morari, "Digital Controllers for SISO Systems: A Review and a New
Algorithm," Int. J. Cont., 42(4), 855–876 (1985).
Morari, M., and E. Zafiriou, Robust Process Control, Prentice Hall, Englewood Cliffs, NJ (1989).
[ Team LiB ]
[ Team LiB ]
Additional Exercises
1: Consider the van de Vusse reactor, which has the following state space model at the
nonminimum-phase operating point:
where
Find the sample time that will bring the zero (discrete time) that is outside the unit
circle to the unit circle. Compare the discrete-step response for this sample time with
the continuous system step response.
2: Consider the first-order process (where the time unit is minutes and the gain is °C/%)
Design continuous and discrete IMC controllers and compare performances on a unit
step setpoint change. Study various values of the IMC tuning parameter, l.
3: Consider the second-order process (where the time unit is minutes and the gain is
%/%)
4: Consider the third-order process (where the time unit is minutes, and the gain is %/%)
which has no zeros (that is, it is minimum phase). If the model is perfect, we know that
a continuous-time controller can be tuned arbitrarily tightly.
If the continuous model is discretized with a sample time of 1 minute, the discrete-time
model (in factored form) is
Notice that one of the process zeros is at –1.7790 (outside the unit circle); if the inverse
of the model is used for controller design, an unstable controller results. It is interesting
that the continuous-time model has no RHP zero, yet the discretized model has a zero
outside the unit circle.
Consider factorizations for the discrete IMC design when (a) the zero at –1.7990 is not
factored out, and (b) the zero at –1.7990 is factored out. Compare the two digital
controllers and continuous IMC performances on a unit step setpoint change. Study
various values of the IMC tuning parameter, l.
[ Team LiB ]
[ Team LiB ]
[ Team LiB ]
[ Team LiB ]
Dr. Bequette's career path can be viewed as either a series of random moves or a well-planned
deterministic process. While completing a B.S. in chemical engineering at the University of
Arkansas, he worked at Arkansas Eastman (handling utility and waste treatment problems) and
Cosden Oil and Chemical (where he did process trouble shooting during the day, and played third
base on a championship softball team at night). After his undergraduate studies, he was a
process engineer at American Petrofina, where he had the chance to serve as a process operator
during two work stoppages. This sparked his interest in process automation and control, enticing
him to the University of Texas at Austin to earn a Ph.D. with a focus on multivariable control
system analysis and design. He spent a year as a visiting lecturer at the University of California at
Davis (developing a taste for extra dry cappuccinos) before becoming a professor at Rensselaer in
1988. While at Rensselaer, he has had the good fortune to serve as the advisor for ten Ph.D. and
four M.S. students, in addition to teaching chemical process dynamics and control to at least 900
undergraduate students. In recent years, he has had little time for softball and pole-vaulting,
devoting more time to teaching applied trajectory analysis to his son's T-ball team and helping his
daughter apply corrective feed-back action to an open-loop unstable transportation device
(bicycle).
[ Team LiB ]
The scale of a reactor influences its heat transfer capabilities due to varying surface area to volume ratios. Larger reactors have more challenges in removing heat efficiently compared to smaller reactors, requiring larger temperature differences or enhanced thermal management strategies, like advanced control systems for jacket temperatures, to maintain stability and efficiency during operation .
MATLAB and SIMULINK provide convenience and flexibility in analyzing dynamic systems by allowing easy manipulation and transformation between different model types, such as converting state space models to transfer functions. This versatility is crucial in modeling complex behaviors and performing detailed simulations, which enhances the understanding of dynamic system characteristics and responses .
Discrete models are primarily useful for digital control design and analysis, which may be skipped initially in favor of continuous models to simplify the controller design process. Continuous models are often preferred because they align with classical control theory and methods, which form the foundational understanding for designing and analyzing control systems before considering digital implementations .
The choice between fail-open or fail-closed valves depends on safety considerations and the specific requirements of the process being controlled. For instance, if losing water due to overflow incurs an economic penalty, a fail-closed valve might be preferred to prevent such losses. The decision also relies on whether the input manipulated affects process 1 or process 2, as detailed in the control strategy where feedback and feed-forward techniques might require different valve specifications .
A dual composition control strategy might be unnecessary if a simpler method sufficiently maintains process specifications. For example, using tray temperature to infer product composition can effectively regulate outputs without requiring full dual composition control, reducing complexity in control systems and achieving desired performance in petrochemical plants .
Practical limitations in reactor dynamic performance under temperature constraints include the reduced capability to quickly adjust to temperature changes due to constraints on jacket inlet temperatures, such as minimum and maximum allowable temperatures. These constraints impact how fast heat can be added or removed, influencing control response times and efficiency. Smaller reactors, with better heat transfer efficiency, face fewer issues, whereas larger reactors require more sophisticated control solutions to counteract these limitations .
Feed-forward control is designed to take immediate corrective action before a disturbance affects the output measurement by directly manipulating input variables. However, due to its sensitivity to measurement uncertainties in inlet and outlet flows, feed-forward control alone may not perfectly control the tank height if there is measurement error. Therefore, it is typically combined with feedback control to correct for these uncertainties, adjusting the outlet flow rate to maintain the desired output even with inaccurate input measurements .
Padé approximations are used to convert systems of differential equations with time delays into delay-free differential equations, which are necessary for numerical integration by most ordinary differential equation integrators. This allows for the simulation and analysis of systems without needing specialized tools for handling time delays, facilitating easier numerical solutions .
IMC procedures aid in designing PID controllers by providing a structured approach to handle model uncertainties and dead time, particularly beneficial for unstable processes. They ensure stability by introducing bounds on tuning parameters and employing semiproper controller forms to prevent excessive overshoot in closed-loop responses. This method offers robust performance comparable to IMC itself, making it suitable for both stable and unstable system applications .
Controller tuning is crucial for aligning the response speed of a control system with the dominant timescale of the process it manages. For example, if a tank is used as a surge vessel, the controller is tuned for a slow return to the setpoint to avoid disturbances to downstream processes, while still preventing overflow. Specifically, the dominant timescale, determined by factors like process volume and flow rate, guides the necessary speed of controller adjustments to ensure stability and efficiency under varying operational conditions .