Howtouse PCM
Howtouse PCM
by
F. J. Doyle III
([email protected])
Dept. of Chemical Engineering
University of Delaware
Newark, DE 19716
with
E. P. Gatzke
R. S. Parker
ISBN 013-021107-9
v
PREFACE xiii
Module Organization xiii
Hardware and Software Requirements xiv
Instructor’s Manual xiv
World Wide Web Page xiv
Acknowledgments xv
vii
viii
INTRODUCTION 60
PROCEDURE—BOTH UNITS 60
Frequency Response of a First-order System 61
General Pulse Testing Procedure 62
Frequency Response of Unknown Systems 62
PROCEDURE—FURNACE 63
PROCEDURE—COLUMN 64
SUMMARY 64
APPENDIX: plot bode AND pcmfft COMMANDS 65
plot bode 65
pcmfft 65
Proportional Control 93
Proportional Control for a Disturbance 94
Proportional-Integral (PI) Control 95
Proportional-Integral (PI) Control for a Disturbance 97
SUMMARY 98
8 CONTROLLER TUNING 99
OBJECTIVE 99
Open-Ended Module Procedure 99
THINGS TO THINK ABOUT 99
INTRODUCTION 100
PROCEDURE—FURNACE 101
Closed-Loop Auto Relay Tuning Method 103
PROCEDURE—COLUMN 104
Closed-Loop Auto Relay Tuning Method 105
SUMMARY 106
The Process Control Modules (PCM) have been developed to address the key engi-
neering educational challenge of realistic problem solving within the constraints of
a typical lecture-style course in process dynamics and control.
The primary objectives in developing these modules were:
• Develop convenient graphical interface for students that allowed them to in-
teract in real-time with the evolving virtual experiment.
Module Organization
This book is organized into 13 modules or chapters, around two distinct unit
operations—a fired tube furnace and a binary distillation column. Most of the
13 modules contain separate exercises for the different units. The progression of
modules follows a typical undergraduate process control textbook, starting with
low-order dynamic system analysis and continuing through digital and multivari-
able control synthesis.
A typical module is structurally arranged with the following elements:
xiii
xiv Preface
Instructor’s Manual
An instructor’s manual has been prepared and is available from the publisher.
A WWW page has been setup to provide up-to-date information about the Process
Control Modules, including new unit operations. The URL is:
http://www.che.udel.edu/pcm/
Acknowledgments xv
Acknowledgments
There are a number of individuals that must be acknowledged for their contributions
to PCM. First, there has been a succession of “lead TAs” for my undergraduate pro-
cess dynamics and control courses at Purdue and Delaware. In chronological order
they include Tom Kendi, Bob Parker, Ed Gatzke, and Radhakrishnan Mahadevan.
Over the course of the past seven years, a multitude of graduate and undergraduate
programmers have contributed to various components of PCM—their contributions
and names are numerous, and I would like to express my gratitude to all of them. It
was their enthusiasm that helped sustain this effort. In a similar vein, the students
that I have taught through the years in CHE 456 at Purdue and CHEG 401 at
the University of Delaware have provided inspiration for this activity through their
intellectucal curiousity and motivation to apply their textbook understanding. I
would also like to thank a number of colleagues at other universities for their valu-
able feedback in evaluating the modules, including Mike Henson at LSU, Yaman
Arkun at Georgia Tech, and Tunde Ogunnaike at DuPont/University of Delaware. I
would like to express my appreciation to my former department head, Rex Reklaitis,
who encouraged the pursuit of these educational activities while I was an assistant
professor at Purdue University. Finally, I would like to acknowledge partial fund-
ing for this project from the National Science Foundation via the National Young
Investigator program (Grant CTS 9257059).
A brief historical note on the origins of these Modules may be of interest to
some users and offers further acknowledgments to the important work of other
educators. During the summer of 1982, as part of a special study with IBM, the
IBM Advanced Control System (ACS) was installed at Purdue University. In 1982–
83, Professor L. B. Koppel wrote a set of ACS-based instructional modules which
made use of a process furnace simulation supplied by IBM (known as the Purdue
Furnace). In 1987–88 Professor R.P. Andres and Professor K.P. Madhavan updated
and modified the existing ACS system. This system was replaced with Hewlett-
Packard workstations in 1993. Professor F.J. Doyle undertook the rewriting of
the original Purdue Furnace model using the Mathworks products MATLAB and
SIMULINK as the basic platform. In 1994, the binary distillation column unit was
added to the Modules. In 1996, the software was ported to the Macintosh and PC
platforms.
xvii
xviii Author Biographies
INTRODUCTION TO THE
PROCESS CONTROL
MODULES
OBJECTIVE
INSTALLING PCM
You may run PCM from the CD-ROM. For better performance, it is suggested that
you copy the pcm folder to a local hard disk.
To start PCM you must either currently be in the pcm directory or have the
pcm directory added to your MATLAB path. From MATLAB, you can use the
pwd to determine your current working directory. The cd command can be used to
change directories. MATLAB comes with a path browser that allows you to view
and change your path. You can also manually change the path by including an
appropriate addpath command in your matlabrc.m file that specifies the full path
to the pcm directory.
The column and furnace simulations used by PCM rely on process models. MAT-
LAB can use interpreted models or compiled models. In our experience, compiled
models run much faster. We have provided compiled models for MATLAB version
5.3 on PC and Solaris systems. You may have trouble using the provided compiled
models. If you have access to a C compiler that is MATLAB compatible, you can
use the mex command to compile the models for your system or for newer/older
versions of MATLAB. The files that need compiling are: /pcm/furnace/pufcore4.c,
/pcm/column/newcolco.c, and /pcm/column/newcol.c. For the furnace, the result-
1
2 INTRODUCTION TO THE PROCESS CONTROL MODULES Module 1
START-UP MATLAB
2. For UNIX systems, you should type matlab at a command prompt in a ter-
minal window.
3. For DOS systems (Win 95/NT) use the mouse to select the Start button.
Holding the left button, highlight the Programs menu. Another group of
menus will appear. Highlight the MATLAB selection. This opens the MAT-
LAB menu. Highlight the MATLAB command to start MATLAB.
WHAT IS MATLAB?
At the MATLAB prompt try typing 1234 + 5678. You should get:
However, these are just scalar calculations. MATLAB was developed with the
ability to easily manipulate matrices.
Trigonometric functions
>> cos(2) (hit enter)
ans =
-0.4161
>> sin(pi) (hit enter)
ans =
1.2246e-16
Exponential functions
>> exp(1) (hit enter)
ans =
2.7183
>> log10(2) (hit enter)
ans =
0.301
>> log(2) (hit enter)
ans=
0.6931
MATLAB contains many math functions, both elementary and advanced. To find
more information on these functions, type help at the MATLAB prompt. This will
give a list of help topics along with a description of the functions contained in each
of the topics. Each of the topics can be further examined by typing the topic name
after the help command. For example, typing help elfun gives more help information
on MATLAB’s elementary math functions.
Try the following examples in succession:
linspace(0, 1, 5)
logspace(0, 1, 5)
x=[1 2 3]
y=[3; 2; 1]
x + y
y + x
y1 = y’
polyfit(x, y1, 1)
To further explore options in MATLAB, type demo at the MATLAB prompt and
hit enter. Select Continue from the menu options of the MATLAB EXPO and
spend about 15 minutes investigating the demonstrations. When you are finished,
select the Close All Windows button from the menu.
SIMULINK 5
SIMULINK
1. At the MATLAB prompt, type simulink. The SIMULINK block library should
appear.
2. At the top of the SIMULINK block library are several (six in most versions
of SIMULINK) pull-down menus (labeled File, Edit, Options, ...). To open
an empty window for creating a new simulation, click on the File menu and
select New. This should produce an empty SIMULINK window.
3. In the SIMULINK block library window, double-click on the Sources icon.
The Signal Source Library window should appear. An icon from this library
can be incorporated into your simulation by placing the mouse arrow on an
icon and dragging the icon from the library window into the empty SIMULINK
window while holding down the left mouse button. Grab several of the icons
from the Signal Source Library and put them into your empty SIMULINK
window.
4. The SIMULINK window can be saved by using the File pull-down menu.
Make sure the you save your own window (not the block library window).
Click on File with the left mouse button, move your mouse arrow down to
Save and click once with the left mouse button. You will be prompted to
name your file which will be saved with a .mdl extension.
5. After saving the file, exit by using the Exit option on the File pull-down menu.
Restart the simulation by typing the filename (without the .mdl extension)
at the MATLAB prompt.
6. Within your SIMULINK window, an icon can be moved by placing your mouse
arrow on the icon and dragging while the left mouse button is held down. An
icon can be selected by clicking the left mouse button ONCE on the icon.
When selected, an icon can be deleted by using the backspace key on the
keyboard. Additional operations can be performed using several of the pull-
down menus. Familiarize yourself with the operations in the Edit pull-down
menu.
7. Building a SIMULINK simulation:
You will need the following icons: [icon (quantity)]
8. Construct a flow sheet such that the output of each of the Step Input blocks is
multiplied by one of the Gain blocks. The output of each of the Gain blocks
is summed using the Sum icon. The output of the Sum icon is assigned to a
variable name (out, for instance) and sent to the MATLAB workspace using
one of the To Workspace icons. For a dynamic simulation, the output is
plotted with respect to time. Connect the Clock icon to the remaining To
Workspace icon and assign a variable name of t or time. Note that if using
MATLAB 5.3 or greater, you should double-click on each To Workspace block
and change the save format to Matrix. Save your SIMULINK diagram using
the Save option on the File pull-down menu.
10. Experiment with different sets of parameters for the Step Input and Gain
blocks. To change the parameters, double-click (using the left mouse button)
on the icon you would like to change.
11. To create your own SIMULINK block library, select New from the File menu
in the SIMULINK Library Window then select Library. This is your oppor-
tunity to create a personalized set of blocks for use throughout the course.
By pressing the left mouse button, blocks from the different SIMULINK sub-
menus can be highlighted. By holding the left button down, blocks can be
dragged from the sub-menus into your personalized window. Double-click on
the Sources menu and drag the blocks from Step 7 (above) into your window.
SIMULINK 7
Now, from the Linear menu move the blocks (again from Step 7) to your
library. Add the blocks needed from the Sinks menu for Step 7 to your set of
blocks. In your personalized window select File and click on Save. Name this
block set simblocks.mdl. As the course progresses, you can add more blocks
to this library to assist with homework.
1. bode - The bode command is used to obtain the frequency response informa-
tion of a system.
Usage: [mag,phase,w] = bode (num, den) calculates magnitude and phase for
a given transfer function whose coefficients are given by num (numerator) and
den (denominator) or alternatively, bode(num, den) - which directly plots the
magnitude and phase over the frequencies w to produce the Bode plot.
Overview of PCM
The units of PCM are organized around the following three elements:
1. Process Modeling
2. PID Controller Design and Tuning
3. Analysis and Advanced Control Design
The second element in the synthesis of a control system is the control structure
selection and controller tuning. There are many approaches to controller design. In
Module 7 and Module 8, the following three approaches will be applied to PID con-
troller design for the furnace or distillation column: (1) Ziegler-Nichols tuning rules;
(2) Cohen-Coon tuning rules; and (3) Åström’s relay-tuning method. The focus of
Module 5 is the calculation of the frequency response of the process. The frequency
response is obtained from the data generated by a pulse test using a Fourier trans-
form to calculate two specific properties of the process response: amplitude and
phase shift. Given the frequency response for a process, tuning parameters for the
controllers can be obtained using the Ziegler-Nichols tuning rules. A second method
of controller design is known as model-based control. In Module 8, controller tuning
parameters are obtained using the Cohen-Coon tuning rules which recommend tun-
ing constants based upon the parameters of the first-order transfer function model
of the furnace or column obtained in Module 6. The performance of the resultant
controller is dependent upon the accuracy of the model obtained previously, a clear
illustration of the interaction between modeling and controller design. Finally in
Module 8, a controller is designed using Åström’s auto-tuning method. Students will
learn that each of the techniques results in a different controller and, subsequently,
different closed-loop performance.
The third element in the design of a control system is the analysis of the perfor-
mance. Advanced topics in control design will also be explored, including combined
feedforward/feedback (Module 9), multivariable and Internal Model Control (IMC)
design (Module 10), digital design techniques (Module 12), and Model Predictive
Control (MPC) (Module 13).
There are several ways of characterizing performance, which will be explored
in the later Modules. The interaction of modeling, design and analysis for control
system design will be demonstrated.
The Process Control Modules (PCM) use programs that were developed to be
used with SIMULINK and MATLAB. To start the Modules, type mainmenu. The
display in Figure 1.1 will appear on the screen. From this menu you can access
INTRODUCTION TO THE PROCESS CONTROL MODULES 11
the various programs that will be used in the Process Control Modules. In the
next two Modules, we will use the Furnace and the Distillation Column models to
demonstrate basic principles in process behavior. If one selects the Furnace button,
then the furnace menu shown in Figure 1.2 will appear on the screen. Clicking on
the Distillation Column button will cause Figure 1.3 to appear on the screen.
The PCM units have exercises that can be used for evaluation purposes. The
exercises may ask you to answer a question, print a plot, or create a table. The
exercises are listed in bold. Exercises in the THINGS TO THINK ABOUT section
of each Module are listed with letters (e.g., Exercise 1-A ). These should be
completed before attempting to work the laboratory Module. Exercises in the pro-
cedure section are numbered (e.g., Exercise 1.1 ) and should be completed while
working through the laboratory Module.
Ending Session
To end the session select Yes under the Quit menu from the Main Menu. This
will take you back to the MATLAB prompt. At this prompt, type quit to exit
MATLAB.
SUMMARY 13
SUMMARY
By the end of this Module, you should have learned how to log in at the computer.
You have been introduced to MATLAB and should be able to start MATLAB and
know how to run the demonstration. You should also be able to start the Process
Control Modules.
14 INTRODUCTION TO THE PROCESS CONTROL MODULES Module 1
Module 2
OBJECTIVE
Calculate the steady state gains for the furnace/column, filling in all the gains
in Figure 2.7/2.12. Use these gains to demonstrate “manual control” in which you
attempt to calculate the appropriate manipulated variable changes required to bring
about an output change of a desired magnitude, as well as cancel the effect of a
step change in one of the process disturbances for the furnace/column.
Using the information in the furnace flow diagram (Figure 2.2) and the following
data, perform an energy balance on the furnace (assume atmospheric pressure for
the streams and use the ideal gas law for density):
15
16 STEADY STATE ANALYSIS Module 2
J
heat capacity of fuel (inlet) 29.5 mol K
J
heat capacity of fuel (exit) 49 mol K
heat of reaction for combustion 889 molkJCH4
kg
density of hydrocarbon 787 m3
hydrocarbon exit temperature 605 K
J
heat capacity of hydrocarbon stream 463 kg K
stack gas temperature 1410 K
m3
volumetric flow rate of stack gas 43.95 min
The following exercises will lead you through the appropriate calculations for an
overall energy balance.
Exercise 2-A What is the contribution from the combustion of fuel gas in the
furnace?
Exercise 2-B What are the enthalpies of the streams (hydrocarbon, air, and
fuel) entering the furnace?
Exercise 2-C What is the enthalpy of the hydrocarbon process stream leaving
the furnace?
Exercise 2-D What is the enthalpy of the stack gas stream?
Exercise 2-E Using the information from the previous exercises, attempt to
close the energy balance. Indicate, if appropriate, the imbalance and explain the
difference.
Exercise 2-A In order to control the composition of the distillate and the
bottom streams, which variables can be used as manipulated variables?
Exercise 2-B Which variables act as load (disturbance) variables?
Exercise 2-C What will happen if the reflux ratio is increased? How will this
increase affect the mole fraction of methanol in the distillate and the bottom?
Exercise 2-D A binary mixture of components with relative volatility 2 is to be
separated in a distillation column. Consider a mass balance over a tray in the
rectifying section (above the feed). The reflux ratio is 3.1667. The vapor enters the
tray at 0.5 mol/sec with 60% purity in the more volatile component. The liquid
enters the tray at 0.38 mol/sec with 80% purity in the more volatile component.
Calculate the composition of the streams leaving the tray. (Assume that the vapor
and liquid flows in the rectifying section do not change from tray to tray.)
INTRODUCTION 17
INTRODUCTION
In this section, you will obtain steady state models for a process system to determine
the effect of manipulated and load variables on the controlled variables of a process.
This data is useful for approximating the changes in the manipulated variables
necessary to keep the controlled variables at their desired setpoints.
The steady state gain of a system characterizes the effect that a change in an
input variable has upon an output variable. The gain is mathematically described
as follows:
Change in Output
K=
Change in Input
It is important to note that the gain is defined on the basis of the incremental
change in the respective variables. An implicit assumption in such a calculation is
that changes in the controlled variables can be calculated by summing the changes
in all the manipulated and load variables multiplied by constant gain coefficients.
This is known as the principle of superposition and is strictly valid only for linear
processes. The furnace and column are nonlinear systems; consequently, this ap-
proximation is valid only over a small region around the operating point where the
system behaves in a nearly linear manner.
The steady state gains can be used for many purposes, some of which are listed
below:
(a) to determine the value of a manipulated variable necessary to change the
setpoint of a controlled variable;
(b) to predict the effect of a change in a load variable upon a controlled variable;
and
(c) to predict the change in a manipulated variable necessary to counteract a
load variable change.
PROCEDURE—FURNACE
The unit operation in this module represents a furnace fueled by natural gas which is
used to preheat a high molecular weight hydrocarbon feed (C16 - C26 ) to a cracking
unit at a petroleum refinery (see schematic in Figure 2.1). The furnace model
consists of energy and component mass balances which result in coupled nonlinear
differential equations. The furnace model has seven inputs and four outputs as
listed below.
18 STEADY STATE ANALYSIS Module 2
INPUTS OUTPUTS
Hydrocarbon Flow Rate Hydrocarbon Outlet Temperature
Hydrocarbon Inlet Temperature Furnace Temperature
Air Flow Rate Exhaust Gas Flow Rate
Air Temperature Oxygen Exit Concentration
Fuel Gas Flow Rate
Fuel Gas Temperature
Fuel Gas Purity
The combustion of the fuel is assumed to occur via the following reaction mech-
anism:
3
CH4 + O2 → CO + 2H2 O
2
1
CO + O2 → CO2
2
There are two major objectives for operation of the furnace. First, in order to
minimize fuel costs, the furnace must be operated with proper oxygen composition
to ensure complete combustion of the fuel (carbon monoxide is an undesired prod-
uct). Second, the hydrocarbon feed stream must be delivered to the cracking unit
at the desired temperature.
The furnace has the following manipulated and controlled variables:
The system also has the following load (or disturbance) variables:
Load Variables
Hydrocarbon Flow Rate
Fuel Gas Purity
Furnace Operation
1. Start by selecting the furnace from the Main Menu (see Figure 1.1). This is
done by clicking the left mouse button once on the Furnace button. This opens
the menu window for the furnace modules. Click the left mouse button on
the Furnace button. Two additional windows should open, one for the input
PROCEDURE—FURNACE 19
Exhaust Gas
Inlet Hydrocarbon
Heated Hydrocarbon
Burner
(To Downstream Process)
Fuel Gas
and output graphs and one for the furnace process flowsheet. The flowsheet
is shown in Figure 2.2.
3. Next, try decreasing the fuel gas purity. This will act as a disturbance to the
system. By double-clicking on the Fuel Gas Purity box (see Figure 2.2) you
should get a box as shown in Figure 2.4. Change the value from 1.0 to 0.95 by
clicking on the value box and using the backspace key to erase the old value.
PROCEDURE—FURNACE 21
Type the file name here. Click here to save data to a file.
When you have entered a new value, click on the Close button. Again, notice
how the outputs on the process monitor are changing with time.
4. Now, change some of the operating parameters. First, turn off the disturbance
in the gas purity by double-clicking on the Fuel Gas Purity box and return
the value to 1.0. Allow the system to reach a new steady state. Now we
will increase the product flow rate by 10%. To do this, double-click with the
left mouse button on the Hydrocarbon Flow Rate box (see Figure 2.2). A box
containing the product flow rate value should appear (see Figure 2.5). Change
this value from 0.035 to 0.0385 and click on the Close button.
5. An important feature of the furnace module is the pointer button (see Figure
2.3). There is one pointer button for each of the controlled outputs (one for the
Hydrocarbon Outlet Temperature and one for the Oxygen Exit Concentration).
The pointer button allows the user to find the coordinates of a point on one
of the output graphs by using the mouse. Single-clicking on one of the pointer
buttons by using the left mouse button changes the mouse arrow to a crosshair
sight. The crosshair sight can be moved to a spot on one of the output curves
in the furnace monitor. Use the corresponding pointer button for a specified
graph. The sight should be moved to the Hydrocarbon Outlet Temperature
curve if the Hydrocarbon Outlet Temperature pointer is selected. Clicking the
left mouse button once displays the coordinates of the selected point to the
upper right corner of the output curve. Now return the Hydrocarbon Flow
Rate to 0.035 by double-clicking on the Flow Rate box and adjusting the
value, as done before.
3
m
6. Increase the air flow rate by 10% (from 17.9 to 19.69 min ) by using the proce-
dure described above (see Figure 2.5). Make careful note of the time that you
introduce the change. The change does not occur until you hit the Close or
Apply button. Using the Hydrocarbon Outlet Temperature and Oxygen Exit
Concentration pointer buttons, determine which output takes the longest to
begin reacting to the change in Air Flow Rate (i.e., which output has the
most dead time). You want to find the time on each output curve at which
the output starts to change from the initial steady state value.
Exercise 2.1 What is the time when the change in Air Flow Rate is intro-
duced (min)?
Exercise 2.2 Record the time when the Hydrocarbon Outlet Temperature
begins to change (min).
Exercise 2.3 What is the time when the Oxygen Exit Concentration begins
to change (min)?
Exercise 2.4 Which output exhibits the largest dead time?
m3
Do not forget to return the Air Flow Rate to its original value (17.9 min )
INPUTS
m3
Hydrocarbon Flow Rate min
Hydrocarbon Inlet Temperature K
m3
Air Flow Rate min
Air Temperature K
m3
Fuel Gas Flow Rate min
Fuel Gas Temperature K
mol CH4
Fuel Gas Purity mol total
OUTPUTS
Hydrocarbon Outlet Temperature K
Furnace Temperature K
m3
Exhaust Gas Flow Rate min
mol O2
Oxygen Exit Concentration min
8. Make the following sequence of increases in the air flow rate by double-clicking
the left mouse button on the Air Flow Rate box. The remaining inputs (the
six other inputs) should be kept at their initial steady state values. After
each change in the Air Flow Rate, allow the system to reach a new steady
state (approximately 40 simulation minutes) and then record the values of the
output variables obtained using the pointers on the output graphs.
Exercise 2.6 Record the steady state values:
Return the Air Flow Rate to its initial value and allow the furnace to reach
steady state.
9. Make the following sequence of increases in the Fuel Gas Flow Rate by double-
clicking the left mouse button on the Fuel Gas Flow Rate box. The remaining
inputs (the six other inputs) should be kept at their initial steady state values.
Again, record the steady state values of the output variables at each of the
new steady states.
Exercise 2.7 Record the steady state values:
PROCEDURE—FURNACE 25
Return the Fuel Gas Flow Rate to its initial value and allow the furnace to
reach steady state.
10. Make the following sequence of increases in the Hydrocarbon Flow Rate by
double-clicking the left mouse button on the Hydrocarbon Flow Rate box.
The remaining inputs (the six other inputs) should be kept at their initial
steady state values. Again, record the values of the output variables at each
of the new steady states.
Exercise 2.8 Record the steady state values:
Return the Hydrocarbon Flow Rate to its initial value and allow the furnace
to reach steady state.
11. Make the following sequence of decreases in the Fuel Gas Purity by double-
clicking the left mouse button on the Fuel Gas Purity box. The remaining
inputs (the six other inputs) should be kept at their initial steady state values.
Again, record the values of the output variables at each of the new steady
states.
Exercise 2.9 Record the steady state values:
Return the Fuel Gas Purity to its initial value and allow the furnace to reach
steady state.
12. Using the information from Procedures 8–11, calculate the steady state gains
for each of the following input-output pairings. This can be accomplished
graphically by plotting the output versus input values from the tables and
calculating the best linear fit to the data. The MATLAB function polyfit can
also be used to find a least-squares fit to your data.
For example, given the following input-output data,
the gain is obtained by plotting the outputs (B and C) versus the input and
calculating the slope (see Figure 2.6).
The gain is defined as the change in the output divided by the change in input
which is equivalent to the slope of the input-output curve. One feature that
distinguishes the behavior of Output B from Output C, is the degree of nonlin-
earity in the system. The data for Output C is better fit by a linear equation
than that of Output B as a result of the nonlinear behavior of Output B. Thus,
the predictive ability of the gain for the Input A-Output C coupling should be
much more accurate than that of the gain for the Input A-Output B coupling.
Exercise 2.10 Calculate the gains for the input-output relationships.
Inputs Outputs
Air Flow Rate Oxygen Exit Concentration
Fuel Flow Rate Hydrocarbon Outlet Temperature
Fuel Gas Purity
Hydrocarbon Flow Rate
PROCEDURE—FURNACE 27
410
2 405
400
1.9
Output C
Output B
395
390
1.8
385
1.7 380
375
1.6 370
0.4 0.6 0.8 0.4 0.6 0.8
Input A Input A
(Change in Hydrocarbon Outlet T emperature) K
K11 = =
m /min
(Change in F uel Gas F low Rate) 3
Fill in the block diagram in Figure 2.7 with the gains calculated above.
13. Increase the nominal Air Flow Rate by 20% and repeat Exercises 2.6 to 2.9.
Exercise 2.11 Compared with results from Exercise 2.10, is the nonlinear
behavior of the furnace apparent? How is this behavior manifested?
The steady state gains can be used to determine the input-output behavior
of the furnace. They can be calculated from the block diagram, the gain
expressions on the previous page, and the following general equations:
where:
∆Th - Change in Hydrocarbon Outlet Temperature (Controlled Variable)
∆O2 - Change in Oxygen Exit Concentration (Controlled Variable)
∆Vf g - Change in Fuel Gas Flow Rate (Manipulated Variable)
∆Vair - Change in Air Flow Rate (Manipulated Variable)
∆d1 - Change in Fuel Gas Purity (Load Variable)
∆d2 - Change in Hydrocarbon Flow Rate (Load Variable)
PROCEDURE—FURNACE 29
K11 =
Fuel Gas Flow
K12 =
Air Flow
Hydrocarbon
K1d2 =
Temperature
K1d1 =
K21 =
K22 =
Oxygen
K2d2 =
Composition
Hydrocarbon Flow
K2d1 =
Fuel Gas Purity
14. Using the gains obtained in Exercise 2.10, determine the values of the Air Flow
Rate and Fuel Gas Flow Rate that are necessary to increase the Hydrocarbon
Outlet Temperature by 7◦ C and decrease the Oxygen Exit Concentration by
0.05 mol O2
m3 .
Assume that the load variables remain constant:
17. Implement this load variable change in the furnace and record the values of
the output variables.
Exercise 2.18 How close are the ultimate process outputs to the desired
values?
PROCEDURE—COLUMN 31
18. Using the block diagram, calculate values for the manipulated variables which
would return the controlled variables to their initial steady states for this
change in load variables.
3
m
Exercise 2.19 Calculate the new value of the Air Flow Rate ( min ).
3
m
Exercise 2.20 Calculate the new value of the Fuel Gas Flow Rate ( min ).
19. Implement the changes in manipulated variables you calculated and wait for
the furnace to return to a new steady state.
Exercise 2.21 Do the controlled variables return to their initial steady
states?
20. To end the session, stop the simulation by selecting Stop under the Simulation
menu, then select Yes under the Quit menu from the Main Menu window.
This will return you to the MATLAB prompt. At this prompt, type quit to
exit MATLAB.
PROCEDURE—COLUMN
The process under consideration in this unit is a binary distillation column which
separates a mixture of methanol (MeOH) and ethanol. Distillation is a very impor-
tant unit operation in the chemical and petroleum industries. Increasing demand for
high quality products coupled with the demand for more efficient energy utilization
has highlighted the role of process control for distillation columns.
The particular column studied in this unit has 27 trays, a reboiler on the bottom
tray, and a total condenser on the overhead stream. A 50%-50% mixture of methanol
and ethanol is fed at the fourteenth tray (counted from the bottom). This column
was originally modeled by K. Weischedel and T.J. McAvoy in 1980. It represents
a benchmark that has been studied by a number of researchers for the purpose
of controller design. The specific control objective is to achieve an 85% methanol
stream at the top and an 85% ethanol stream at the bottom of the column. This
is referred to as dual-composition control. A schematic of the process can be found
in Figure 2.8.
The column is modeled with component mass balances and steady state energy
balances which result in coupled nonlinear differential algebraic equations. The
column model has four inputs and four outputs as listed below.
INPUTS OUTPUTS
Reflux Ratio Overhead MeOH Composition
Vapor Flow Rate Overhead Flow rate
Feed MeOH Composition Bottom MeOH Composition
Feed Flow Rate Bottom Flow Rate
The system also has the following load (or disturbance) variables:
Load Variables
Feed Flow Rate
Feed MeOH Composition
Column Operation
1. Double-click on the box Vapor Flow Rate. Use the backspace key to delete
the existing value and enter 0.045 m3 /sec (Figure 2.11). Close the box and
start the simulation. Click on the window showing the monitor to bring it
to the front of your screen. It gives information about the system outputs:
Overhead Flow Rate, Overhead MeOH Composition, Bottom Flow Rate, and
Bottom MeOH Composition. These graphs give both the current and the
nominal process values.
2. Changes in the values of Reflux Ratio, Feed Flow Rate and Feed MeOH Com-
position can be given in a similar manner. Increase the value of Reflux Ratio
to 3.0. Observe the effect on the outputs. Once the system has reached a new
steady state, increase the Feed MeOH Composition to 0.55. Again, observe
the effect on the outputs.
When the column has reached the new steady state, return all of the input
values to their nominal values and allow the system to return to its initial
steady state.
Reflux Condensor
Overhead
Product
Reflux
Feed
Bottoms
Product
Reboiler
Vapor
Type the file name here. Click here to save data to a file.
INPUTS
Reflux Ratio
mol
Vapor Flow Rate sec
mol MeOH
Feed MeOH Composition mol total
mol
Feed Flow Rate sec
OUTPUTS
mol MeOH
Overhead MeOH Composition mol total
mol MeOH
Bottom MeOH Composition mol total
Return the Reflux Ratio to its initial value and allow the column to reach
steady state.
5. Make the following sequence of changes in the Vapor Flow Rate by double-
clicking the left mouse button on the Vapor Flow Rate box. Keep the re-
maining inputs (the three other inputs) at their initial steady state values.
Again, record the steady state values of the output variables at each of the
new steady states.
Exercise 2.3 Record the steady state values:
Return the Vapor Flow Rate to its initial value and allow the column to reach
steady state.
6. Make the following sequence of changes in the Feed Flow Rate by double-
clicking the left mouse button on the Feed Flow Rate box. Keep the remaining
inputs (the three other inputs) at their initial steady state values. Again,
record the values of the output variables at each of the new steady states.
Exercise 2.4 Record the steady state values:
Return the Feed Flow Rate to its initial value and allow the column to reach
steady state.
7. Make the following sequence of changes in the Feed Composition by double-
clicking the left mouse button on the Feed Composition box. Keep the re-
maining inputs (the three other inputs) at their initial steady state values.
Again, record the values of the output variables at each of the new steady
states.
38 STEADY STATE ANALYSIS Module 2
Return the Feed Composition to its initial value and allow the column to reach
steady state.
8. Using the information from Procedures 4–7, fill in the equations on the fol-
lowing page with the calculated values of the steady state gains for each of
the following input-output pairings. This can be accomplished graphically by
plotting the output versus input values from the tables and calculating the
best linear fit to the data.
Exercise 2.6 Calculate the gains for the input-output relationships.
Inputs Outputs
Reflux Ratio Overhead MeOH Composition
Vapor Flow Rate Bottom MeOH Composition
Feed MeOH Composition
Feed Flow Rate
Exercise 2.7 Fill in the block diagram in Figure 2.12 with the gains calcu-
lated above.
9. The assumption implicit in the block diagram in Figure 2.8 is that changes in
the controlled variables can be calculated by summing the changes in all the
manipulated and load variables multiplied by constant gain coefficients. This
is strictly valid only for linear processes. Most chemical processes, including
the distillation column, are nonlinear and this linear approximation is valid
only for a small region around the normal operating point. Performing tests
on the column at some other operating point would yield a different set of
steady state gains.
Exercise 2.8 Can you detect the process nonlinearity from the plot of Over-
head MeOH Composition versus Reflux Ratio? How so?.
The steady state gains can be used to determine the input-output behavior
of the column. They can be calculated from the block diagram, the gain
expressions on the previous page, and the following general equations:
where:
∆Yd - Change in Overhead MeOH Composition (Controlled Variable)
∆Xb - Change in Bottom MeOH Composition (Controlled Variable)
∆R - Change in Reflux Ratio (Manipulated Variable)
∆V - Change in Vapor Flow Rate (Manipulated Variable)
∆d1 - Change in Feed MeOH Composition (Load Variable)
∆d2 - Change in Feed Flow Rate (Load Variable)
10. Using the gains obtained in Procedure 8, determine the values of the Reflux
Ratio and Vapor Flow Rate that are necessary to increase the Overhead MeOH
Composition to 0.88 and the Bottom MeOH Composition to 0.17.
Assume that the load variables remain constant:
40 STEADY STATE ANALYSIS Module 2
K11 =
Reflux Ratio
K12 =
Vapor Flow Rate
Overhead MeOH
K1d2 =
Composition
K1d1 =
K21 =
K22 =
Bottom MeOH
K2d2 =
Composition
Feed Flow Rate
K2d1 =
Feed MeOH
Composition
Solve these equations simultaneously to find the new values of the controlled
variables.
Exercise 2.13 What is the new Overhead MeOH Composition?
Exercise 2.14 What is the new Bottom MeOH Composition?
13. Implement this load variable change in the column and record the values of
the output variables.
Exercise 2.15 How close do the outputs come to the predicted values?
14. Using the block diagram, calculate values for the manipulated variables which
would return the controlled variables to their initial steady states for this
change in load variables.
Exercise 2.16 What is the new Reflux Ratio?
Exercise 2.17 What is the new Vapor Flow Rate?
15. Implement the changes in manipulated variables you calculated and wait for
the column to return to a new steady state.
Exercise 2.18 Do the controlled variables return to their initial steady states?
42 STEADY STATE ANALYSIS Module 2
16. To end the session, stop the simulation by selecting Stop under the Simulation
menu, then select Yes under the Quit menu from the Main Menu. This
will return you to the MATLAB prompt. At this prompt, type quit to exit
MATLAB. To exit the system, select the EXIT icon located on the right
bottom side of the menu bar. Select OK from the Logout Confirmation box.
SUMMARY
This unit covers the basic operation of system operation, including the various
process variables. At the end of this unit, you should be comfortable with the
notion of a process gain, as well as the use of process gains in accomplishing manual
(steady state) control of a process system.
Module 3
FIRST-ORDER
DYNAMIC SYSTEM
ANALYSIS
OBJECTIVE
Use SIMULINK to explore the different dynamic responses obtained from a first-
order system as one changes the gain, and separately, the time constant. Calcu-
late a first-order approximation for the unknown system in System Identification
Problem 1 menu.
Exercise 3-A What effect does increasing the gain have on the system output?
Exercise 3-B What is meant physically by a system with a large gain?
Exercise 3-C What effect does decreasing the time constant have on the system
output?
Exercise 3-D What is meant physically by a system with a small time constant?
Exercise 3-E Is it possible for a system to have a negative gain? What is the
expected behavior?
Exercise 3-F Is it possible for a system to have a negative time constant?
What is the expected behavior?
43
44 FIRST-ORDER DYNAMIC SYSTEM ANALYSIS Module 3
Exercise 3-G What is the expected response from a first-order system driven
by a sinusoidal input?
INTRODUCTION
dy
τp + y(t) = Kp u(t)
dt
where:
y(t) is the system output;
u(t) is the input (forcing function);
Kp is the system gain; and
τp is the system time constant.
The gain and the time constant are the two parameters that determine the char-
acteristics of the dynamic response of a system. The Laplace transform of this
differential equation yields a first-order transfer function:
y(s) Kp
Gp (s) = =
u(s) τp s + 1
• A mercury thermometer
PROCEDURE
To start the first-order system, click once on the First and Second Order Systems
(Figure 3.1) button from the Main Menu (Figure 1.1) then select the First-order
System button. Figures 3.2 and 3.3 display the two windows that are used for
the first-order system; the first is the system window, and the second is the in-
put/output window. Refer to Figures 3.4 and 3.5 for instructions on how to change
the simulation parameters for the first-order system.
1. First, set the system gain Kp and the system time constant τp both to 10.0
(see Figure 3.4). Now set the initial value of the step function to 0.0 and the
PROCEDURE 45
final value of the step function to 1.0 (see Figure 3.5). To start the simulation,
select Start from the Simulation menu.
Exercise 3.1 Enter the new steady state value.
Exercise 3.2 Enter the length of time it takes for the output to reach the
new steady state (sec).
2. Now increase the value of Kp to 40.0 and repeat the previous exercise.
Exercise 3.3 How does this response differ from the response in exercise
3.1?
3. Set Kp back to 10.0 and now try increasing the value of τp to 20.0. Repeat
the simulation.
Exercise 3.4 How does the response differ from the response in exercise 3.1?
4. Now decrease the value of the Kp to 5.0 and decrease the value of τp to 5.0.
Repeat the simulation.
Exercise 3.5 Enter the new steady state value.
Exercise 3.6 Enter the amount of time it takes (sec) for the output to reach
the new steady value.
In practice, the transfer function for a given process operation must be de-
termined from data generated by the system. For example, the engineer may
determine a reasonable first-order approximation to the data for the purpose
of controller design. With your knowledge of first-order systems and the infor-
mation presented in the lectures, you will try to identify an unknown process.
5. From the Main Menu, select the System Identification Problem 1 button.
Using a step input, run the simulation to generate output data that can be
used to determine the system gain (Kp ) and the system time constant (τp ).
Remember to use the Pointer button and to take several points along the
response curve in your analysis of the system output.
You may find it useful to calculate the following quantities:
Exercise 3.7 What is the slope of initial response?
Exercise 3.8 Calculate the final output value minus the initial output value.
This information can be used to calculate the gain and time constant for this
system.
Exercise 3.9 Fill in the following table with the parameter values you cal-
culated:
48 FIRST-ORDER DYNAMIC SYSTEM ANALYSIS Module 3
System gain
10
G(s)=
10 s + 1
These numbers are changed by placing the cursor inside the brackets,
deleting the existing value, and typing a new value.
Kp
τp
Exercise 3.10 Give the first-order transfer function of this unknown system.
SUMMARY
SECOND-ORDER
DYNAMIC SYSTEM
ANALYSIS
OBJECTIVE
Use SIMULINK to explore the different dynamic responses obtained from a second-
order system as one changes the gain, and separately, the natural period, and the
damping coefficient. Calculate a second-order approximation for the unknown sys-
tem in System Identification Problem 2 menu.
Consider the following values for the damping coefficient for a second-order dynamic
system.
Region I Region II Region III
ζ<1 ζ=1 ζ >1
Exercise 4-A What types of response would be expected for a system with a
damping coefficient in Region I? (i.e., overdamped, critically damped,
underdamped)
51
52 SECOND-ORDER DYNAMIC SYSTEM ANALYSIS Module 4
Exercise 4-K Which of the three responses would be expected to have a shorter
response time?
Exercise 4-L Which of the three responses would be expected to be sluggish?
Exercise 4-M What are the trade-offs, from a control perspective, of the
different responses? (e.g., response times, rise times, overshoot, etc.)
INTRODUCTION
PROCEDURE
To start the second-order system, click once on the First and Second Order Systems
button (Figure 3.1) from the Main Menu (Figure 1.1) then select the Second-Order
Systems button. Figures 4.1 and 4.3 display the two windows used for the second-
order system; the first is the system window, and the second is the input/output
window. Refer to Figures 4.3 and 4.4 for instructions on how to change the simu-
lation parameters for the second-order system.
Kp
y(s) =
As2 + Bs + 1
1. Exercise 4.1 Calculate ζ (the damping coefficient) for the given system.
2. Set the system gain (Kp ) to 10.0, the value of A to 40.0, and the value of B
to 14.0 (see Figure 4.3). Now set the initial value of the Step Function to 0.0
and the final value of the Step Function to 1.0 (see Figure 4.4). To start the
simulation, select Start from the Simulation menu.
Exercise 4.2 Is the system overdamped, underdamped or critically damped?
Exercise 4.3 If the system is underdamped, what is the overshoot, decay
ratio, rise time, settling time and the period of oscillation?
4. Change the value of A to 42.25 and the value of B to 13. Repeat the simula-
tion.
Exercise 4.6 Is the system overdamped, underdamped or critically damped?
Exercise 4.7 If the system is underdamped, what is the overshoot, decay
ratio, rise time, settling time and the period of oscillation?
5. Close the two windows by clicking the left mouse button on the upper left-hand
box of both windows and selecting Close. From the First and Second Order
Systems Menu, select the System Identification Problem 2 button. Using a
step input, run the simulation to generate data that can be used to deter-
mine the system gain (Kp ), the system time constant (τp ), and the damping
coefficient (ζ). Calculate the following quantities to characterize the system
response:
Exercise 4.8 What is the overshoot in the response?
Exercise 4.9 What is the period of the oscillatory response?
This information can be used to calculate the system gain, time constant, and
damping coefficient:
56 SECOND-ORDER DYNAMIC SYSTEM ANALYSIS Module 4
System gain
Two times the system time constant multiplied by the damping coefficient
Kp
τp
ζ
Hint: Use the overshoot equation and the period of oscillation equation to
find ζ and τp :
−πζ
overshoot = exp
1 − ζ2
2πτp
period(T ) =
1 − ζ2
Exercise 4.10 Derive the second-order transfer function for this unknown
system.
SUMMARY
FREQUENCY DOMAIN
ANALYSIS
OBJECTIVE
In previous units, step function tests were used to develop dynamic models for
the first- and second-order system identification problems. In this unit you will
use pulse testing of the system identification problems and the Furnace/Column
to generate frequency response data. Frequency response data, often represented
in a Bode plot, are useful for describing the dynamics of a process plant and for
designing stable feedback control systems.
Construct the four open-loop Bode plots corresponding to each combination of the
two manipulated inputs and the two process outputs for the Furnace/Column. For
each plot, calculate the gain and phase margins for the corresponding input-output
pair.
Exercise 5-A What are two methods to generate frequency response data for a
system?
Exercise 5-B What is the ultimate response of a stable linear system to a
sinusoidal input?
Exercise 5-C What is required of the input and output to use pulse testing for
identification?
Exercise 5-D What information is represented on a Bode plot?
59
60 FREQUENCY DOMAIN ANALYSIS Module 5
Exercise 5-E What is the amplitude ratio and how is it determined from
sinusoidal forcing data?
Exercise 5-F What is the phase shift and how is it determined from sinusoidal
forcing data?
Exercise 5-G What are the gain and phase margins?
Exercise 5-H What is the significance of the crossover frequency, ωco ?
Exercise 5-I Given three systems in series: G = G1 G2 G3 , where:
0.35 10 5e−4s
G1 (s) = G2 (s) = G3 (s) =
(4s + 1) (2s + 1) (3s + 1)
INTRODUCTION
The frequency response model of a system can be derived by the variable transfor-
mation s = jω applied to the transfer function representation. Therefore, there is a
direct relationship between the input and output time response data, and the cor-
responding data in the frequency domain. This relation is the Fourier Transform,
which is given by the following expression:
∞
ˆ
f (jω) = f (t)e−jωt dt
−∞
Thus, given time domain data generated by a process, one can determine its
frequency response equivalent:
∞ ∞
ŷ(jω) −∞
y(t)cosωtdt − j −∞ y(t)sinωtdt
g(jω) = = ∞ ∞
û(jω) −∞
u(t)cosωtdt − j −∞ u(t)sinωtdt
Rather than doing this by hand, there are convenient functions in MATLAB to
accomplish this transform. Read about pcmfft in the Appendix to Module 5.
PROCEDURE—BOTH UNITS
The goal of this exercise is to collect frequency response data by using rectangular
pulses as inputs to the first-order system, the system identification problems, and
the furnace or column. With these data, Bode plots will be constructed and system
information will be extracted from these plots.
PROCEDURE—BOTH UNITS 61
1. Select the First-Order System button from the Frequency Analysis menu.
The frequency response of a first-order system is easily calculated from the
transfer function using formulas found in most undergraduate texts on process
dynamics and control.
Make sure that the first-order system has the following parameters:
3. Substitute s = jω into the transfer function, and then manipulate g(jω) until
you can factor it such that:
Re(ω) is the real component of the transfer function, g(jω), and Im(ω) rep-
resents the imaginary component.
4. In the MATLAB workspace, calculate the amplitude ratio and phase lag using
the following equations:
AR = Re(ω)2 + Im(ω)2
Im(ω)
φ = atan
Re(ω)
NOTE: atan is the MATLAB function for tan−1 , and atan returns phase in
radians. You will have to convert this to degrees before you can use plot bode.
5. Exercise 5.1 Produce the Bode plot for this system using the plot bode com-
mand in the Appendix to Module 5.
62 FREQUENCY DOMAIN ANALYSIS Module 5
(a) Observe the simulation and verify that the output profile returns to, and
holds at, zero.
(b) Type whos in the MATLAB window. A list of vectors containing input,
output, and time should appear. The vector input represents the pulse
input to the system of interest. The vector output is the system response
to the input pulse.
(c) These vectors will be used to calculate the amplitude ratio and the phase
lag using pcmfft. The integration step size for the first order system and
the system identification simulations is 0.05 sec.
(d) Using A1, A2, B1, and B2 generated by pcmfft, amplitude ratio and
phase lag can be calculated using the following equations:
A12 + A22 A1 ∗ B1 + A2 ∗ B2
AR(ω) = 2 2
Re[g(jω)] =
B1 + B2 B12 + B22
Im[g(jω)] A1 ∗ B2 − A2 ∗ B1
φ(ω) = tan−1 Im[g(jω)] =
Re[g(jω)] B12 + B22
7. Examine the output power spectrum to determine the point after which the
data contains no useful information.
Exercise 5.2 Construct the Bode plot for the first-order system using the
plot bode command as described in the Appendix to Module 5.
Exercise 5.3 At approximately what frequency does the output power be-
come insignificant?
Exercise 5.4 Find the corner frequency for this system.
Exercise 5.5 Construct the Bode plot for System Identification Problem 1.
Exercise 5.6 Assuming that this is a first-order system, calculate the gain
and the time constant.
9. Now select the System Identification Problem 2 from the Frequency Response
Analysis Menu and repeat the procedure above.
Exercise 5.7 Construct the Bode plot for System Identification Problem 2.
Exercise 5.8 Assuming that this is a second-order system, calculate the
gain, the time constant, and the damping coefficient.
PROCEDURE—FURNACE
The goal of this procedure is to obtain the system model dependent parameters
(from Bode plots) in order to tune the controllers for the Hydrocarbon Outlet Tem-
perature and the Oxygen Exit Concentration. Several methods exist for tuning
controllers based upon the open-loop behavior of the plant (most of which will be
studied in Module 8); however, the frequency-based methods tend to be more re-
liable than other heuristics and serve as the basis for the auto-tuning controllers
available in industry today.
1. Select the Furnace from the Frequency Response Analysis Menu. This will
bring up the furnace simulation driven by pulse inputs. Displayed on your
screen are the flowsheet and the furnace strip chart on which the inputs and
outputs of interest are recorded. The goal of this exercise is to use pulse inputs
for both the Air Flow Rate and the Fuel Gas Flow Rate, and to collect the
frequency response data from the outputs.
2. First, set the Air Flow Switch to 0 and the Fuel Switch to 1. BE CARE-
FUL: some of the outputs decrease with an increase in corresponding inputs
(negative gain). Begin the simulation, and follow the General Procedure for
Pulse Testing, given above.
Exercise 5.9 With the data, calculate the appropriate amplitude ratios and
the phase lags and construct the Bode plot of Oxygen Exit Concentration for
changes in the Fuel Gas Flow Rate.
Exercise 5.10 Construct the Bode plot for the Hydrocarbon Outlet Temper-
ature response to the Fuel Gas Flow Rate.
3. Now change the Fuel Switch to 0 and the Air Flow Switch to 1. Start the
simulation, and follow the generated pulse testing procedure above.
Exercise 5.11 Construct the Bode plot for the Oxygen Exit Concentration
response to the Air Flow Rate input change.
64 FREQUENCY DOMAIN ANALYSIS Module 5
Exercise 5.12 Construct the Bode plot for the Hydrocarbon Outlet Temper-
ature response to the Air Flow Rate input change.
PROCEDURE—COLUMN
The goal of this procedure is to examine the frequency response behavior for high-
order systems. This information is useful in controller design as well. Several
methods exist for tuning controllers based upon the open-loop behavior of the plant
(most of which will be studied in Module 8); however, the frequency-based methods
tend to be more reliable than other heuristics and serve as the basis for the auto-
tuning controllers available in industry today.
1. Select the Column from the Frequency Response Analysis Menu. This will
bring up the column simulation driven by pulse inputs. Displayed on your
screen are the flowsheet and the column strip chart on which the inputs and
outputs of interest are recorded. The goal of this exercise is to use pulse
inputs for both the Vapor Flow Rate and the Reflux Ratio, and to collect the
frequency response data from the outputs.
2. First, set the Reflux Ratio Switch to 0 and the Vapor Switch to 1. BE CARE-
FUL: some of the outputs may decrease with an increase in corresponding
inputs (negative gain). Begin the simulation, and follow the General Proce-
dure for Pulse Testing, given above.
Exercise 5.13 With this data, calculate the appropriate amplitude ratios
and the phase lags and construct the Bode plots of the Overhead MeOH
Composition and Bottom MeOH Composition for the Vapor Flow Rate loop.
Exercise 5.14 Calculate the gain margin and phase margin from the plot
for Overhead MeOH Composition.
3. Now change the Vapor Switch to 0 and the Reflux Ratio Switch to 1. Start the
simulation, and follow the generated pulse testing procedure, above. Using
this data, calculate the amplitude ratios and phase lags.
Exercise 5.15 Construct the Bode plots for the Overhead MeOH Composi-
tion and Bottom MeOH Composition for the Reflux Ratio loop.
Exercise 5.16 Calculate the gain margin and phase margin from the plots
for Bottom MeOH Composition.
SUMMARY
This unit demonstrated the construction of an open-loop Bode plot, which de-
picts the frequency characteristics for a given input-output pair in terms of its
APPENDIX: plot bode AND pcmfft COMMANDS 65
frequency-dependent magnitude and phase lag. One should be able to interpret the
key characteristics of the curves, including the meaning of gain margin and phase
margin.
plot bode
>> a=[w,amp,phi];
The first entry of each row is the frequency, the second entry of each row is the
amplitude ratio, and the third entry of each row is the phase lag. At the MATLAB
prompt, type plot bode(a):
This will display the bode plots for the given data. In order to print this plot, select
File and then Print from the figure window.
pcmfft
Ty
A2 = y(t)sin(ωt)dt
0
Tu
B1 = u(t)cos(ωt)dt
0
Tu
B1 = u(t)sin(ωt)dt
0
The integration lower bound is 0 (instead of −∞) because we are interested only
in time ≥0. The upper bound is chosen such that the input is zero after Tu and the
output is zero after Ty . This property, that both the inputs and outputs return to
zero in finite time, is required to perform the FFT. Once the A and B vectors have
been calculated, equations (such as those given in part e of the Generalized Pulse
Testing Procedure) can be used to calculate the amplitude ratio and phase lag for
the system of interest.
Module 6
TRANSIENT RESPONSE
ANALYSIS
OBJECTIVE
In this module, transient response data will be collected which will be used to obtain
a first-order-plus-time-delay transfer function model of the Furnace/Column. This
model will later serve as the basis for several types of feedback and feedforward
controller design.
Exercise 6-A Fill in the following table describing the relationship between the
system time constant and the final value of the output for a linear first-order
system (recall that the time constant is defined as the time that it takes for an
output to attain approximately 63% of its final response).
Exercise 6-B Briefly define time delay. Give an example that illustrates how
time delay occurs in a process system.
Exercise 6-C Describe how one would obtain a system gain from dynamic
response data generated by introducing a step change in one of the process inputs.
67
68 TRANSIENT RESPONSE ANALYSIS Module 6
INTRODUCTION
Typically, the transient response of a plant (even a nonlinear process such as the
furnace or column) can be approximately modeled with a first-order-plus-time-delay
(FOTD) transfer function. The mathematical description of a first-order-plus-time-
delay transfer function is as follows:
Kp e−θs
Gp (s) =
τp s + 1
where: Kp is the system gain, θ is the time delay of the system, and τp is the system
time constant.
Once a step change has been made in one of the inputs, the system gain, time
constant, and the time delay may be calculated from the system response. The
method for obtaining these parameters is described in most undergraduate chemical
process dynamics and control textbooks.
PROCEDURE—FURNACE
This module is divided into three parts: (i) data collection, (ii) empirical modeling,
and (iii) model validation. Customized MATLAB utilities have been designed to
simplify each task. At the beginning of each part, a short summary of the procedure
will be given. Please read these instructions carefully.
Data Collection
Before changing any inputs, make sure that the clock display is open. To open
the clock display, double-click the left mouse button on the yellow clock icon located
in the upper right corner of the furnace diagram, see Figure 2.2. The clock display
is the small window showing the current process simulation time. Make sure to
arrange your windows such that the clock display is visible at all times.
The first input variable that will be changed is the Air Flow Rate (from 17.9 to
m3
18.26 min ). A detailed explanation of the data collection procedure will be given
for this run.
(a) Open the clock display. Make sure to arrange the windows such that
the clock display is completely visible.
(b) Choose a filename for the data from this run to be saved by typing
a filename in the box located in the lower right corner of the process
monitor, see Figure 2.3. In the MATLAB command window, use the
cd command to change directories to a directory where you would like
to store your data files. Use pwd to print the working directory that
you are currently in. Use ls or dir to show the contents of the current
directory.
(c) Record the filename for the current data run.
(d) Double-click on the Air Flow Rate box with the left mouse button.
(e) Double-click in the white box to highlight the value to be changed.
(f) Record the time at which the Air Flow Rate change is implemented.
Be careful: the Air Flow Rate change is not implemented until
you hit apply or close with the mouse. You should notice a slight
pause in the simulation at the time in which the Air Flow Rate change
is implemented.
(g) Once the furnace has reached steady state, click on the Save button
located in the lower right corner of the process monitor, see Figure 2.3,
to save the data to a data file. Be sure to act promptly, as any
data that is lost when the axes rescale is not recoverable.
3
m
(h) Return the Air Flow Rate to its original value (17.9 min ) and allow
the furnace to return to its original steady state before making the
next input change. You must allow the furnace to return to its
original steady state before making any further changes in the
input variables.
3
m
1. Increase the value of the Air Flow Rate by 2% (from 17.9 to 18.26 min ).
The furnace should reach a new steady state in approximately 40 simulation
minutes.
Exercise 6.1
Name of data file for this run (example: airflow ).
Time at which the Air Flow Rate change is introduced min (from
clock display).
3
m
2. Increase the value of the Fuel Gas Flow Rate by 2% (from 1.21 to 1.234 min ).
The furnace should reach a new steady state in approximately 40 simulation
minutes.
Exercise 6.2
Name of data file for this run (example: fuelgas).
Time at which the Fuel Gas Flow Rate change is introduced min
(from clock display).
3. Increase the value of the Hydrocarbon Flow Rate by 2% (from 0.035 to 0.0357
m3
min ). The furnace should reach a new steady state in approximately 40
simulation minutes.
Exercise 6.3
Name of data file for this run (example: hydrocarbonflow ).
Time at which the Hydrocarbon Flow Rate change is introduced
min (from clock display).
4. Decrease the value of the Fuel Gas Purity by 2% (from 1.0 to 0.98). The fur-
nace should reach a new steady state in approximately 40 simulation minutes.
Exercise 6.4
Name of data file for this run (example: gaspurity).
Time at which the Fuel Gas Purity change is introduced min (from
clock display).
The data files collected in the previous portion of this module will be loaded
into a specially designed graphical utility, called PCMplot, to obtain transient
plots of the output variables. To start PCMplot, return to main menu and
click on the Graphical Analysis button in the lower right corner. A new menu,
the Graphical Analysis Menu, will appear in the center of your screen. Click
on the PCMplot – Furnace button to open PCMplot. The window depicted
in Figure 6.1 will appear.
The procedure for loading a data file will be summarized below.
PROCEDURE—FURNACE 71
Pull-down menus
containing PCMplot
functions.
5. Click on the Data option on the graphics window, see Figure 6.1, and hold
down the left mouse button. By moving the mouse downward, a menu with
the following options will appear: Load, Print, and Quit. To load a file,
continue holding the left mouse button and pull the mouse down to highlight
the Load option. Release the mouse button.
(a) A window titled Load Data File should appear. Click on the data file
you wish to load.
(b) If the file loaded successfully, the following text will be displayed in your
MATLAB window:
load selected filename
(c) Once the data file has been loaded, the output variable plot is generated
by clicking on the Plot option at the top of the graphics window with
your left mouse button. Hold the left mouse button down and pull the
mouse down to obtain the following options: (i) Plot Var 1, (ii) Plot Var
2, (iii) Plot Var 3, and (iv) Plot Var 4. These options are responsible for
plotting the four outputs as follows:
i. Plot Var 1 = Plot Hydrocarbon Outlet Temperature
ii. Plot Var 2 = Plot Furnace Temperature
iii. Plot Var 3 = Plot Exhaust Gas Flow Rate
iv. Plot Var 4 = Plot Oxygen Exit Concentration
(d) To plot the change in the Hydrocarbon Outlet Temperature for the airflow
data file, hold the left mouse button down and highlight Plot Var 1.
Release the mouse button. A graph of the transient response of the
Hydrocarbon Outlet Temperature should appear.
(e) It may be necessary to rescale the axes on the plot. This can be done
using the Trim Axes option on the View menu of the graphics window
(Hold your left mouse button on View and pull down as you have previ-
ously done to see this menu). You will be prompted to enter new values
for the upper and lower limits for both the x-axis and the y-axis. Hint:
it may be helpful to set the x-axis lower limit equal to the time
at which the change in the given input was introduced.
(f) Once a plot of the desired output is obtained with the axes scaled as
desired, a hard copy of the plot can be obtained using the Print option
under the File menu (hold down the left mouse button and pull down
underneath File on the graphics window. Highlight the Print option and
release the left mouse button). This will open the print options window.
Selecting OK (PC) or Print (UNIX) will print the current figure to the
default printer.
6. Plot the Hydrocarbon Outlet Temperature and the Oxygen Exit Concentration
for the Air Flow Rate change using PCMplot and the procedure described
PROCEDURE—FURNACE 73
7. Plot the Hydrocarbon Outlet Temperature and the Oxygen Exit Concentra-
tion for the Fuel Gas Flow Rate change using PCMplot and the procedure
described above. Fit a first-order-plus-time-delay transfer function model to
each of the responses. Fill in your parameters below and on Figure 6.2.
Exercise 6.7 Hydrocarbon Outlet Temperature, G11
Gain:
Time Constant:
Time Delay:
Exercise 6.8 Oxygen Exit Concentration, G21
Gain:
Time Constant:5
Time Delay:
8. Plot the Hydrocarbon Outlet Temperature and the Oxygen Exit Concentration
for the Hydrocarbon Flow Rate change using PCMplot and the procedure
described above. Fit a first-order-plus-time-delay transfer function model to
each of the responses. Fill in your parameters below and on Figure 6.2.
Exercise 6.9 Hydrocarbon Outlet Temperature, G1d2
Gain:
Time Constant:
Time Delay:
Exercise 6.10 Oxygen Exit Concentration, G2d2
Gain:
Time Constant:
Time Delay:
74 TRANSIENT RESPONSE ANALYSIS Module 6
9. Plot the Hydrocarbon Outlet Temperature and the Oxygen Exit Concentration
for the Fuel Gas Purity change using PCMplot and the procedure described
above. Fit a first-order-plus-time-delay transfer function model to each of the
responses. Fill in your parameters below and on Figure 6.2.
Exercise 6.11 Hydrocarbon Outlet Temperature, G1d1
Gain:
Time Constant:
Time Delay:
Exercise 6.12 Oxygen Exit Concentration, G2d1
Gain:
Time Constant:
Time Delay:
The third step of this module is to validate the performance of the first-order-
plus-time-delay transfer function models obtained in the previous section. The
input changes from the modeling runs of the first section can be used with
the linear models developed in the last section. You will compare the simu-
lated response of the linear models to the actual plant data to determine if
the modeling parameters developed in the last section are accurate. In Mod-
ule 7, controllers will be designed based upon the transfer function models
obtained in this module. The effectiveness of these controllers will be signif-
icantly influenced by the accuracy of the transfer function models obtained
in this module. The transfer function models will be simulated using a spe-
cially modified version of SIMULINK, the MATLAB-based object oriented
programming software for dynamic simulations. SIMULINK can be started
from the Graphical Analysis Menu by clicking on the Simulink – Furnace
button. Clicking on this button creates two windows, a blank SIMULINK
window with a save button (where the simulation is constructed) and the
SIMULINK toolbox window (where programming elements are located). The
results of the simulations will be saved into data files and loaded into PCMplot
for comparison with the original plant data.
10. Construct a SIMULINK simulation to compare the modeled response of the
Hydrocarbon Outlet Temperature and the Oxygen Exit Concentration for a 2%
m3
change in the Air Flow Rate (from 17.9 to 18.26 min ), G12 (s), and G22 (s),
with the actual plant data. Be aware that your transfer function model relates
deviation variables while the plant data is not in deviation form.
Your SIMULINK simulation should consist of the following elements:
PROCEDURE—FURNACE 75
-s
K11 = e
Fuel Gas Flow s+1
-s
K12 = e
Air Flow s+1
-s
e Hydrocarbon
K1d 2 =
s+1 Temperature
-s
K1d 1 = e
s+1
-s
K21 = e
s+1
-s
K22 = e
s+1
-s
e Oxygen
K2d 2 =
s+1 Composition
Hydrocarbon Flow
-s
K2d1 = e
Fuel Gas Purity s+1
Figure 6.2. Block Diagram for Transfer Function Model of the Furnace
76 TRANSIENT RESPONSE ANALYSIS Module 6
(a) clock
(b) step input
(c) Hydrocarbon Outlet Temperature (to workspace)
(d) Oxygen Exit Concentration (to workspace)
(e) time (to workspace)
(f) 2 transfer functions and 2 transport delays or 2 transfer functions (with
time delay)
(g) 2 sums
(h) 2 constants
Run a simulation of your transfer function model and save the data into a
data file. Do not repeat filenames from any previous runs.
Exercise 6.13 Filename: (example: airflow val ).
Note: Make sure that you do not change the names of the variables in any
of the to workspace blocks. A procedure has been written to interface the
data collected from the validation experiments with PCMplot which is name
specific.
11. Using the same SIMULINK block diagram from the previous exercise compare
the modeled response of the Hydrocarbon Outlet Temperature and the Oxygen
Exit Concentration to a 2% change in the Fuel Gas Flow Rate (from 1.21 to
m3
1.234 min ); G11 (s), and G21 (s); with the actual plant data. Be aware that
your transfer function model relates deviation variables while the plant data
is not in deviation form.
Run a simulation of your transfer function model and save the results into a
data file. Do not repeat filenames from any previous runs.
Exercise 6.14 Filename: (example: fuelflow val )
Note: Make sure that you do not change the names of the variables in any of
the to workspace blocks. The system which interfaces the data collected from
the validation experiments with PCMplot is name specific.
Save your SIMULINK simulation window for use later in this section.
12. To compare the data from the SIMULINK simulations with the plant data,
PCMplot will be used in the validation mode. The validation mode loads the
plant data and the data from the SIMULINK simulations sequentially and
overlays the plots for comparison.
ii. highlight the validate option with the mouse button still depressed
and
iii. pull the mouse to the right of validate and highlight the on option.
(b) First, load the plant data file using the Load option and the prompts
(remember to include the single quotes where specified).
(c) Using the Plot option, plot the Hydrocarbon Outlet Temperature (plot
var 1 ).
(d) Using the Plot option, plot the Oxygen Exit Concentration (plot var 4 ).
(e) Use the Load option a second time to load the data from the SIMULINK
simulation of the transfer function model.
(f) Using the Plot option, plot the Hydrocarbon Outlet Temperature (plot var
1 ). The plot of the data from the SIMULINK simulation of the transfer
function will automatically overlay the plant data.
(g) Pull down the View menu and select Original Axes.
(h) It may be necessary to utilize the Trim Axes option to view the plots.
(i) Print the graph using the Print option.
(j) Using the Plot option, plot the Oxygen Exit Concentration (plot var 4 ).
(k) Select Original Axes under the View menu.
(l) It may be necessary to utilize the Trim Axes option to view the plots.
(m) Exercise 6.15 Print the graph using the Print option.
13. How well do the models fit the dynamic plant data? Modify the parameters,
if necessary, to obtain better agreement. Rerun the SIMULINK simulation
and replot the data. Include these plots in your report.
14. Repeat the validation sequence for each transfer function (8 overall). Vali-
dated models will be needed for later lab units.
Exercise 6.16 Create the seven remaining transfer function validation plots.
PROCEDURE—COLUMN
This module is divided into three parts: (i) data collection, (ii) modeling, and
(iii) validation. Customized MATLAB utilities have been designed to simplify each
task. At the beginning of each part, a short summary of the procedure will be given.
Please read these instructions carefully.
78 TRANSIENT RESPONSE ANALYSIS Module 6
Data Collection
(g) Once the column has reached steady state, click on the Save button
located in the lower right corner of the process monitor, see Figure
2.10, to save the data to a data file. Be careful not to wait too
long because any data that is lost when the axes rescale is not
recoverable.
3
(h) Return the Feed Flow Rate to its original value (0.025 m sec ) and allow
the column to return to its original steady state before making the next
input change. You must allow the column to return to its original
steady state before making any further changes in the input
variables.
2. Decrease the value of the Feed MeOH Composition by 4% (from 0.5 to 0.48
mol
mol total ). The column should reach a new steady state in approximately 6000
simulation seconds.
Exercise 6.2
Name of data file for this run (example: feedconc).
Time at which the Feed MeOH Composition rate change is introduced
sec (from clock display).
3. Increase the value of the Vapor Flow Rate by 3% (from 0.033 to 0.03399 mol
sec ).
The column should reach a new steady state in approximately 6000 seconds.
Exercise 6.3
Name of data file for this run (example: vaporflow ).
Time at which the Vapor Flow Rate change is introduced sec
(from clock display).
4. Increase the value of the Reflux Ratio by 2% (from 1.75 to 1.785). The column
should reach a new steady state in approximately 6000 simulation seconds.
Exercise 6.4
80 TRANSIENT RESPONSE ANALYSIS Module 6
The data files collected in the previous portion of this module will be loaded
into a specially designed graphical utility, called PCMplot to obtain transient
plots of the output variables. To start PCMplot, return to main menu and
click on the Graphical Analysis button in the lower right corner. A new menu,
the Graphical Analysis Menu, will appear in the center of your screen. Click
on the PCMplot – Column button to open PCMplot. A graph similar to the
one shown in Figure 6.1 will appear.
The procedure for loading a data file will be summarized below.
5. Click on the Data option on the graphics window, see Figure 6.1, and hold
down the left mouse button. By moving the mouse downward, a menu with
the following options will appear: Load, Print, and Quit. To load a file,
continue holding the left mouse button and pull the mouse down to highlight
the Load option. Release the mouse button.
(a) A window titled Load Data File should appear. Click on the data file
you wish to load.
(b) If the file loaded successfully, the following text will be displayed in your
MATLAB window:
load selected filename
(c) Once the data file has been loaded, one can plot one of the output vari-
ables by clicking on the Plot option at the top of the graphics window
with your left mouse button. Hold the left mouse button down and pull
the mouse down to obtain the following options: (i) Plot Var 1, (ii) Plot
Var 2, (iii) Plot Var 3, and (iv) Plot Var 4. These options are responsible
for plotting the four outputs as follows:
i. Plot Var 1 = Plot Overhead Flow Rate
ii. Plot Var 2 = Plot Overhead MeOH Composition
iii. Plot Var 3 = Plot Bottom Flow Rate
iv. Plot Var 4 = Plot Bottom MeOH Composition
(d) To plot the change in the Overhead MeOH Composition for the feedflow
data file, hold the left mouse button down and highlight Plot Var 1.
Release the mouse button. A graph of the transient response of the
Overhead MeOH Composition should appear.
PROCEDURE—COLUMN 81
(e) It may be necessary to rescale the axes on the plot. This can be done
using the Trim Axes option on the View menu of the graphics window
(Hold your left mouse button on View and pull down as you have previ-
ously done to see this menu). You will be prompted to enter new values
for the upper and lower limits for both the x-axis and the y-axis. Hint:
it may be helpful to set the x-axis lower limit equal to the time
at which the change in the given input was introduced.
(f) Once a plot of the desired output is obtained with the axes scaled as
desired, a hard copy of the plot can be obtained using the Print option
under the File menu (hold down the left mouse button and pull down
underneath File on the graphics window. Highlight the Print option and
release the left mouse button). This will open the print options window.
Selecting OK (PC) or Print (UNIX) will print the current figure to the
default printer.
6. Plot the Overhead MeOH Composition and the Bottom MeOH Composition
for the Vapor Flow Rate change using PCMplot and the procedure described
above. Fit a first-order-plus-time-delay transfer function model to each of the
responses. Fill in your parameters below and on Figure 6.3.
Exercise 6.5 Overhead MeOH Composition, G12
Gain:
Time Constant:
Time Delay:
Exercise 6.6 Bottom MeOH Composition, G22
Gain:
Time Constant:
Time Delay:
7. Plot the Overhead MeOH Composition and the Bottom MeOH Composition
for the Reflux Ratio change using PCMplot and the procedure described above.
Fit a first-order-plus-time-delay transfer function model to each of the re-
sponses. Fill in your parameters below and on Figure 6.3.
Exercise 6.7 Overhead MeOH Composition, G11
Gain:
Time Constant:
Time Delay:
Exercise 6.8 Bottom MeOH Composition, G21
Gain:
Time Constant:
Time Delay:
82 TRANSIENT RESPONSE ANALYSIS Module 6
8. Plot the Overhead MeOH Composition and the Bottom MeOH Composition
for the Feed Flow Rate change using PCMplot and the procedure described
above. Fit a first-order-plus-time-delay transfer function model to each of the
responses. Fill in your parameters below and on Figure 6.3.
Exercise 6.9 Overhead MeOH Composition, G1d2
Gain:
Time Constant:
Time Delay:
Exercise 6.10 Bottom MeOH Composition, G2d2
Gain:
Time Constant:
Time Delay:
9. Plot the Overhead MeOH Composition and the Bottom MeOH Composition
for the Feed MeOH Composition Change using PCMplot and the procedure
described above. Fit a first-order-plus-time-delay transfer function model to
each of the responses. Fill in your parameters below and on Figure 6.3.
Exercise 6.11 Overhead MeOH Composition, G1d1
Gain:
Time Constant:
Time Delay:
Exercise 6.12 Bottom MeOH Composition, G2d1
Gain:
Time Constant:
Time Delay:
The third step of this module is to validate the performance of the first-order-
plus-time-delay transfer function models obtained in the previous section. The
input changes from the modeling runs of the first section can be used with
the linear models developed in the last section. You will compare the simu-
lated response of the linear models to the actual plant data to determine if
the modeling parameters developed in the last section are accurate. In the
next Module, controllers will be designed based upon the transfer function
models obtained in this module. The effectiveness of these controllers will be
significantly influenced by the accuracy of the transfer function models ob-
tained in this module. The transfer function models will be simulated using a
PROCEDURE—COLUMN 83
-s
K11 = e
Reflux Ratio s+1
-s
K12 = e
Vapor Flow Rate s+1
-s
e Overhead MeOH
K1d 2 = Composition
s+1
-s
K1d1 = e
s+1
-s
K21 = e
s+1
-s
K22 = e
s+1
-s Bottom MeOH
K2d 2 = e
Composisiton
Feed Flow Rate s+1
-s
K2d 1 = e
Feed MeOH s+1
Composition
Figure 6.3. Block Diagram for Transfer Function Model of the Column
84 TRANSIENT RESPONSE ANALYSIS Module 6
(a) clock
(b) step input
(c) Overhead MeOH Composition (to workspace)
(d) Bottom MeOH Composition (to workspace)
(e) time (to workspace)
(f) 2 Transfer Function Blocks and 2 Transport Delay Blocks or 2 Transfer
Function Blocks (with dead time)
(g) 2 sum blocks
(h) 2 constant blocks
Run a simulation of your transfer function model and save the data into a
data file. Do not repeat filenames from any previous runs.
Exercise 6.13 Filename: (example: vapor val ).
Note: Make sure that you do not change the names of the variables in any
of the to workspace blocks. A procedure has been written to interface the
data collected from the validation experiments with PCMplot which is name
specific.
11. Using the same SIMULINK block diagram from the previous exercise compare
the modeled response of the Overhead MeOH Composition and the Bottom
MeOH Composition to a 2% change in the Reflux Ratio (from 1.75 to 1.785);
G11 (s), and G21 (s); with the actual plant data. Be aware that your trans-
fer function model relates deviation variables while the plant data is not in
deviation form.
PROCEDURE—COLUMN 85
Run a simulation of your transfer function model and save the data into a
data file. Do not repeat filenames from any previous runs.
Exercise 6.14 Filename: (example: reflux val )
Note: Make sure that you do not change the names of the variables in any of
the to workspace blocks. The system which interfaces the data collected from
the validation experiments with PCMplot is name specific.
Save your SIMULINK simulation window for use later in this section.
12. To compare the data from the SIMULINK simulations with the plant data,
PCMplot will be used in the validation mode. The validation mode loads the
plant data and the data from the SIMULINK simulations sequentially and
overlays the plots for comparison.
13. How well do your models fit the dynamic plant data? Modify the parameters,
if necessary, to obtain better agreement. Rerun the SIMULINK simulation
and replot the data. Include these plots in your report.
86 TRANSIENT RESPONSE ANALYSIS Module 6
14. Repeat the validation sequence for each transfer function (8 overall). Vali-
dated models will be needed for later modules.
Exercise 6.16 Create the seven remaining transfer function validation plots.
SUMMARY
OBJECTIVE
In this unit the characteristics of some of the various types of feedback control action
and their influence on the performance of the Furnace/Column will be studied. Of
particular interest is the impact of controller gain and reset time on the offset
between the output and the setpoint at steady state.
Design P and PI controllers for the furnace/column using the values suggested in
the text. Examine the effect of changing the controller gain and reset time on
the dynamic closed-loop response. In particular, characterize the impact of various
controller tuning parameters on the offset observed at steady state.
Exercise 7-A Sketch the generalized block diagram of the furnace or column
with a general controller and the following input-output pairing:
87
88 STEADY STATE FEEDBACK CONTROL Module 7
Exercise 7-C The controlled variable is reduced from 100% to 90% due to a
temporary bias in the sensor. The controlled variable is regulated with a
proportional controller. Sketch the expected controlled response of the controlled
variable to this disturbance.
Exercise 7-D The system undergoes the same disturbance as described in the
preceding exercise except the controlled variable is now regulated with a PI
controller. Sketch the expected controlled response of the controlled variable to
this disturbance.
INTRODUCTION
The two types of controllers that will be studied in this section are proportional
(P) and proportional-integral (PI) controllers. Proportional controllers consist of a
constant gain which operates on the error signal generated by subtracting the cur-
rent value of the controlled variable from the setpoint. The mathematical definition
of proportional control is as follows:
u = Kc ∗ e
where:
e is Ysp − Ycurrent ;
Ysp is the setpoint of the controlled variable;
Ycurrent is the current value of the controlled variable;
u is the manipulated variable; and
Kc is the proportional gain
t
Kc
u = Kc ∗ e + ∗ e(t ) dt
τI 0
where:
PROCEDURE—FURNACE
Proportional Control
1. To start the furnace with control, click once on the Furnace with Control
button on the Furnace Menu (Figure 1.2). Double-click on the composition
controller block and set the controller parameters to the following values (see
Figure 7.1):
6
Gain of the controller (Kc ) = 4.0 molmmin
Reset time or the integral time constant (τI ) = 1 min
Rate time or the derivative time constant (τD ) = 0
Integral Action On = 0
Derivative Action On = 0
Exercise 7.1 Enter the initial values of the process variables in Table 7.1.
2. Double-click on the composition loop switch and change its value to 1. Change
the setpoint of Oxygen Exit Concentration to 1.0143 mol
m3 . When a steady state
value is reached, record the final values in Table 7.1. Note the closed-loop
behavior under proportional control.
3. From the data recorded in the table, it can be seen that the final steady state
value is not equal to the setpoint. There is a steady state error which is called
an offset. This is the principle drawback of the proportional controller. From
the plots on the Process Monitor, one can observe that the Hydrocarbon Outlet
Temperature is also affected by the manipulation of the Air Flow Rate. This
issue will be addressed later in this module with the use of PI control.
6. Disconnect the controller by turning off the composition loop. Bring the fur-
nace back to its initial steady state and change the Oxygen Exit Concentration
Setpoint back to 0.922 molm3 . Set the tuning parameters of the controller to the
following values:
PROCEDURE—FURNACE 91
6
Gain of the controller (Kc ) = 4.0 molmmin
Reset time or the integral time constant (τI ) = 1 min
Rate time or the derivative time constant (τD ) = 0
Integral Action On = 0
Derivative Action On = 0
7. Double-click on the composition loop switch and change its value to 1. Change
the Fuel Gas Purity from 1.0 molCH
mol
4
to 0.96 molCH
mol .
4
Exercise 7.4 Record the final steady state values of Oxygen Exit Concen-
tration in Table 7.2.
9. Once the furnace has returned to steady state, set the gain Kc = 8.45 and turn
on the composition loop switch. Repeat the exercise from Step 7. Change the
gain to Kc = 13.5. Repeat Step 7 again.
Exercise 7.5 Be sure to enter all of the data in Table 7.2.
12. Introduce a step change in the setpoint from 0.922 mol mol
m3 to 1.0143 m3 .
92 STEADY STATE FEEDBACK CONTROL Module 7
13. When steady state is reached note the final value of the Oxygen Exit Con-
centration. It should be equal to the setpoint indicating the absence of offset
when integral action is present in the controller. Also note the overshoot (if
any) and the settling time of the system.
Exercise 7.6 Record your data in Table 7.3.
14. Change the Oxygen Exit Concentration Setpoint back to 0.922 mol
m3 and let the
system return to its initial steady state.
15. Repeat Steps 12, 13, and 14 for the following values of the integral reset time:
τI = 5.0, 10.0, 20.0 (min). Be sure to record your data in Table 7.3.
Exercise 7.7 Describe the difference between closed-loop responses obtained
for the proportional (only) versus proportional-integral controllers.
19. When steady state is reached note the final value of the Oxygen Exit Con-
centration. It should be equal to the setpoint indicating the absence of offset
PROCEDURE—COLUMN 93
when integral action is present in the controller. Also note the overshoot (if
any) and the settling time of the system.
Exercise 7.8 Record your data in Table 7.4.
21. Repeat Steps 18, 19, and 20 for the following values of the integral reset time:
τI = 5.0, 10.0, 20.0 (min). Be sure to record your data in Table 7.4.
Exercise 7.9 Describe the difference between closed-loop responses obtained
for the proportional (only) versus proportional-integral controllers.
PROCEDURE—COLUMN
Proportional Control
1. To start the column with control, click once on the Column with Control
button on the Distillation Column Menu (Figure 1.3). Double-click on the
Overhead Composition Controller block and set the controller parameters to
the following values (see Figure 7.2):
mol total
Gain of the controller (Kc ) = 55 mol MeOH
Reset time or the integral time constant (τI ) = 300 sec
Rate time or the derivative time constant (τD ) = 0
Integral Action On = 0
Derivative Action On = 0
Exercise 7.1 Enter the initial values of the process variables in Table 7.5.
final values in Table 7.5. Note the closed-loop behavior under proportional
control.
3. From the data recorded in the table, it can be seen that the final steady state
value is not equal to the setpoint. There is a steady state error called an offset.
This is the principle drawback of the proportional controller. From the plots
on the Process Monitor, one can observe that the Bottom MeOH Composition
is also affected by the manipulation of the Reflux Ratio. The solution to this
problem will be postponed until PI control is introduced.
mol total
Gain of the controller (Kc ) = 55 mol MeOH
Reset time or the integral time constant (τI ) = 300 sec
Rate time or the derivative time constant (τD ) = 0
Integral Action On = 0
Derivative Action On = 0
7. Double-click on the Overhead Loop Switch and change its value to On. Change
the Feed MeOH Composition from 0.5 mol MeOH mol MeOH
mol total to 0.4 mol total . Record the
final steady state values of the Overhead MeOH Composition in Table 7.6.
9. Once the column has returned to steady state, set the gain Kc = 65 mol MeOH
mol total
and turn on the Composition Loop Switch. Repeat the exercise from Step 2.
Change the gain to Kc = 75 mol MeOH
mol total . Repeat again.
Exercise 7.4 Be sure to enter all of the data in Table 7.6.
mol total
Gain of the controller (Kc ) = 55 mol MeOH
Reset time or the integral time constant (τI ) = 300 sec
Rate time or the derivative time constant (τD ) = 0
Integral Action On = 1
Derivative Action On = 0
12. Introduce a step change in the setpoint from 0.85 mol MeOH mol MeOH
mol total to 0.83 mol total .
96 STEADY STATE FEEDBACK CONTROL Module 7
13. When steady state is reached note the final value of the Overhead MeOH
Composition. It should be equal to the setpoint indicating the absence of
offset when integral action is present in the controller. Also note the overshoot
(if any) and the settling time of the system. Record your data in Table 7.7.
15. Repeat Steps 12, 13, and 14 for the following values of the integral reset time:
τI = 350, 400, 450 (sec). Be sure to record your data in Table 7.7.
Exercise 7.5 Describe the difference between closed-loop responses obtained
for the proportional (only) versus proportional-integral controllers.
mol total
Gain of the controller (Kc ) = 55 mol MeOH
Reset time or the integral time constant (τI ) = 300 sec
Rate time or the derivative time constant (τD ) = 0
Integral Action On = 1
Derivative Action On = 0
18. Keep the Overhead MeOH Composition Setpoint at 0.85 mol MeOH
mol total . Intro-
duce a step change in the Feed MeOH Composition from 0.50 mol MeOH
mol total to
mol MeOH
0.40 mol total .
19. When steady state is reached note the final value of the Overhead MeOH
Composition. It should be equal to the setpoint indicating the absence of
offset when integral action is present in the controller. Also note the overshoot
(if any) and the settling time of the system. Record your data in Table 7.8.
98 STEADY STATE FEEDBACK CONTROL Module 7
20. Change the Feed MeOH Composition back to 0.50 mol MeOH
mol total and let system
return to its initial steady state.
21. Repeat Steps 18, 19, and 20 for the following values of the integral reset time:
τI = 350, 400, 450 (sec). Be sure to record your data in Table 7.8.
Exercise 7.6 Describe the difference between closed-loop responses obtained
for the proportional (only) versus proportional-integral controllers.
SUMMARY
CONTROLLER TUNING
OBJECTIVE
The performance of a feedback control system depends on the values of the controller
tuning constants. The Proportional-Integral-Derivative (PID) controller will be
used in this module for the Furnace/Column. A trial and error selection process
for PID controller tuning constants requires a lengthy iterative procedure. In this
module, you will be introduced to standard tuning algorithms which produce good
initial estimates of Kc , τI , and τD .
Design PID controllers for the Fuel Gas Flow Rate—Hydrocarbon Outlet Tempera-
ture (furnace) or Vapor Flow Rate—Bottom MeOH Composition (distillation col-
umn) loop using: (i) Ziegler Nichols, (ii) Cohen-Coon, and (iii) Relay Tuning rules.
Test the performance of your controllers in closed-loop for both setpoint and dis-
turbance changes.
Exercise 8-A Calculate the controller parameters using the Cohen-Coon tuning
method for the first-order-plus-time-delay transfer functions that you obtained in
the Transient Response Module for the following variable pairings:
Proportional Control Kc =
Proportional-Integral Control Kc = τI =
Proportional-Integral-Derivative Control Kc = τI = τD =
99
100 CONTROLLER TUNING Module 8
Proportional Control Kc =
Proportional-Integral Control Kc = τI =
Proportional-Integral-Derivative Control Kc = τI = τD =
Exercise 8-B Given the following data, use the Ziegler-Nichols tuning rules to
calculate the controller parameters for the control loop.
Furnace: Fuel Gas Flow Rate =⇒ Hydrocarbon Outlet Temperature loop:
Pu = 14.3(min)
Ku = 0.0102
Column: Vapor Flow Rate =⇒ Bottom MeOH Composition loop:
Pu = 63.5(min)
Ku = −4.6
Proportional Control Kc =
Proportional-Integral Control Kc = τI =
Proportional-Integral-Derivative Control Kc = τI = τD =
Exercise 8-C Compare the controller parameters obtained with the
Ziegler-Nichols tuning method with those obtained by the Cohen-Coon tuning
rules. Comment on any significant differences.
INTRODUCTION
Two classical algorithms for PID controller tuning are the Cohen-Coon method and
the Ziegler-Nichols method. These two methods yield controllers with at most a
0.25 value of the decay ratio (ratio of second peak to first peak in an oscillatory
response). While this leads, in principle, to an attenuation of oscillations, these
techniques typically lead to controllers with an aggressive response.
The Cohen-Coon tuning method requires an open-loop first-order-plus-time-
delay transfer function model of the process. This can be obtained from a process
reaction curve, generated from a step input. From the identified effective gain, time
constant and dead time (Kp , τp , θ), one can tune the controller using the rules which
are summarized below:
Controller Controller Gain Reset Time Derivative
Type Time Constant
1 τp θ
P Kc = 1+
Kp
θ
3τp
1 τp 9 θ 30+3θ/τp
PI Kc = + τI = θ
Kp
θ
4
10 12τp
9+20θ/τp
1 τp θ 32+6θ/τp 4
PID Kc = Kp θ 3
+ 4τp
τI = θ 13+8θ/τp
τD = θ 11+2θ/τ
p
PROCEDURE—FURNACE 101
The Ziegler-Nichols tuning method requires two key process parameters: the
ultimate period (Pu ), and the ultimate gain (Ku ). These quantities can be obtained
from a simple closed-loop test with a proportional controller. The proportional
gain of the controller is increased until the closed-loop system exhibits sustained
oscillations of constant amplitude. The period of these oscillations is defined as the
ultimate period (Pu ); the controller gain corresponding to this behavior is referred
to as the ultimate gain (Ku ). The Ziegler-Nichols method also seeks to achieve a
quarter decay ratio performance objective and the rules for controller tuning are
summarized below.
Controller Controller Gain Reset Time Derivative
Type Time Constant
P Kc = 0.5Ku
Pu
PI Kc = 0.45Ku τI = 1.2
Pu Pu
PID Kc = 0.6Ku τI = 2
τD = 8
Before you start the procedure, perform the following sequence of steps:
1. From the Furnace Menu click on the Furnace with Control or from the Distil-
lation Column Menu click on the Column with Control button.
2. Make sure that both of the feedback loops are in manual by setting the loop
switch blocks to the off position.
5. Allow the simulation to reach steady state before changing either of the feed-
back loops to automatic.
PROCEDURE—FURNACE
Exercise 8.4 Calculate the decay ratio. Note the time it takes for the system
to reach steady state. (Hint: it may prove useful to use the MATLAB
zoom command to enlarge portions of the process monitor plots).
Exercise 8.5 How does the PID-controlled response differ from the PI-
controlled response?
3. Return the system to steady state by resetting the Hydrocarbon Outlet Tem-
perature Setpoint to 609.9 K. When the system has equilibrated, set the
controller parameters using the proportional gain obtained from the Ziegler-
Nichols tuning rules. Make sure that the integral action and derivative action
are both Off. Disturb the system by changing the Hydrocarbon Flow Rate
m3 m3
from 0.035 min to 0.037 min .
Exercise 8.7 Calculate the maximum deviation from the setpoint. (Hint:
it may prove useful to use the MATLAB zoom command to enlarge
portions of the process monitor plots).
4. Return the system to steady state by resetting the Hydrocarbon Flow Rate
m3
to 0.035 min . Once the system has equilibrated, set the controller using the
PID parameters obtained from the Ziegler-Nichols tuning rules. Make sure
that integral action and derivative action are both On. Perturb the system
m3 m3
by changing the Hydrocarbon Flow Rate from 0.035 min to 0.037 min .
Exercise 8.10 Calculate the maximum deviation from the setpoint. (Hint:
it may prove useful to use the MATLAB zoom command to enlarge
portions of the process monitor plots).
where:
a = amplitude of output oscillations
d = amplitude of input oscillations
Given a specified phase margin (φm ), a PID controller can be calculated as
follows:
Kc = Ku cos(φm )
τI = ατ
√ 4D
tan φm α +tan φm
τD = 2∗ωc
2∗π
ωc = Pu
Relay
2d a
Figure 8.1. Inputs and Outputs for the Relay Tuning Method
6. Start with the system at steady state and set the controller by using the
PID parameters obtained from the relay tuning rules in Procedure 5. Make
sure that integral action and derivative action are both On. Introduce a new
setpoint in the Hydrocarbon Outlet Temperature loop of 616 K.
Exercise 8.15 Observe the response and calculate the decay ratio.
Exercise 8.16 Compare the results with those obtained in part 2 for the
Cohen-Coon tuning parameters.
PROCEDURE—COLUMN
2. Reset the Bottom MeOH Composition to its initial value, 0.15 mol MeOH
mol total .
Once the system has returned to steady state, change the controller parame-
ters to the PID settings obtained with the Cohen-Coon tuning rules for the
Bottom MeOH Composition. Make sure that integral action and derivative
action are both On. Introduce a new setpoint on the Bottom MeOH Compo-
sition of 0.13 mol MeOH
mol total .
PROCEDURE—COLUMN 105
5. Refer to the discussion of the relay tuning method on Page 103. Use the relay
controller to obtain the ultimate gain. Assume that φm = 45 degrees and
α = 4. The input oscillation amplitude for the distillation column case study
is d = 0.005.
Exercise 8.12 What is the ultimate gain? Exercise 8.13 Calculate the
PID controller parameters. Exercise 8.14 How do they compare with the
Ziegler-Nichols tuning parameters obtained previously?
6. Start with the system at steady state and set the controller by using the PID
parameters obtained from the relay tuning rules in Procedure 5. (Make sure
that integral action and derivative action are both On.) Introduce a new
setpoint in the bottom concentration 0.13 mol MeOH
mol total .
Exercise 8.15 Observe the response and calculate the decay ratio. Ex-
ercise 8.16 Compare the results with those obtained in Procedure 2 for the
Cohen-Coon tuning parameters.
106 CONTROLLER TUNING Module 8
SUMMARY
FEEDFORWARD CONTROL
OBJECTIVE
In the previous modules, process outputs were controlled using a feedback control
strategy. The disadvantage of a feedback strategy is that control action is not ini-
tiated at the onset of the disturbance to a process, but rather action is only taken
after the controlled variable starts deviating from its setpoint. This drawback be-
comes significant in cases where a process is dominated by slow dynamics and the
disturbance occurs at a fast rate. A feedforward control strategy can be used to
provide corrective action soon after the onset of a disturbance, thereby limiting de-
viation of the controlled variable from its setpoint. In this unit, you will implement
a feedforward strategy on the Furnace/Column to reduce the effect of disturbances
on process outputs.
Derive feedforward controllers for the Fuel Gas Purity (furnace) or Feed MeOH
Composition (column) disturbance based upon the FOTD models developed in
Module 6. Implement the feedforward controller both alone, and in combination
with a feedback controller. Consider both setpoint and disturbance changes.
107
108 FEEDFORWARD CONTROL Module 9
Feedforward Compensator
d
Gff = -Gd /G p
Gd
Feedback
Controller
yd ε y
+
+ Gc + Gp ++
-
INTRODUCTION
The control configuration that will be used in this unit is shown in Figure 9.1. It
consists of feedforward compensation for both setpoint changes and load changes.
As discussed in previous modules, the manipulated variables for the furnace are Air
Flow Rate and Fuel Gas Flow Rate and the manipulated variables for the column
are Vapor Flow Rate and Reflux Ratio. The load variables for the furnace are the
Fuel Gas Purity and Hydrocarbon Flow Rate and the load variables for the column
are the Feed Flow Rate and Feed MeOH Composition.
The feedforward controller receives information about the status of load vari-
ables. From a knowledge of the process and how disturbances affect the system,
the feedforward controller calculates the manipulated variable change required and
uses some form of dynamic compensation to account for the process dynamics.
The models can be obtained in different ways. Here, we are using the first-
order-plus-time-delay system models developed in the Transient Response Analysis
Module (Module 6). Given the following process model and disturbance model:
Kp Kd
Gp (s) = e−θp s Gd (s) = e−θd s
τp s + 1 τd s + 1
PROCEDURE—FURNACE 109
PROCEDURE—FURNACE
1. Consider the loop between the Oxygen Exit Concentration and Air Flow Rate
with the Fuel Gas Purity as the disturbance. Note: be sure to set the com-
position loop switch and temperature loop switch to Off. Use the models
obtained in Module 6 to get the Kp and τp values for the disturbance and
plant models. Insert the values into the controller and start the simulation.
After 10 simulation minutes, change the Fuel Gas Purity to 0.96 molCH
mol .
4
Exercise 9.1 Sketch the response, and qualitatively describe the behavior.
Exercise 9.2 How effective is the controller in maintaining the Oxygen Exit
Concentration at its setpoint?
Exercise 9.3 What is the maximum deviation from setpoint?
Exercise 9.4 How much does the steady state Hydrocarbon Outlet Temper-
ature change?
3. Now consider the loop between the Hydrocarbon Outlet Temperature and the
Fuel Gas Flow Rate with the Hydrocarbon Flow Rate as the disturbance.
Enable the appropriate feedforward controller (disable the one you used pre-
m3
viously). Change the Hydrocarbon Flow Rate to 0.037 min .
Exercise 9.5 How effective is the controller in rejecting the disturbance?
Exercise 9.6 Sketch the response, and qualitatively describe the behavior.
Exercise 9.7 What is the maximum deviation from setpoint for the Hydro-
carbon Outlet Temperature?
110 FEEDFORWARD CONTROL Module 9
Exercise 9.8 How much does the Oxygen Exit Concentration change (steady
state offset)?
3
m
4. Change the setpoint of the Hydrocarbon Flow Rate back to 0.035 min . Allow
the system to return to its initial steady state.
8. Return the system to its initial steady state, Oxygen Exit Concentration at
0.922 mol
m3 .
10. Return Fuel Gas Purity to the normal steady state value, 1.0 molCH
mol .
4
Exercise 9.21 What would you expect to see if the feedback controller was
used in conjunction with the feedforward controller?
11. Implement the feedforward-feedback controller by entering the Cohen-Coon
Controller tuning constants calculated in Module 8 for Proportional-Integral
control of the Oxygen Exit Concentration loop. Make sure the switch value is
set to On. Again, change the Fuel Gas Purity to 0.7 molCH
mol .
4
Exercise 9.22 Sketch the output responses, and qualitatively describe the
behavior.
Exercise 9.23 Describe the improvement (if any) in performance on each of
the outputs.
Exercise 9.24 Describe, quantitatively and qualitatively (offsets, rise time,
etc.), the improvements gained by the addition of feedback control in com-
pensating for this disturbance.
12. Return Fuel Gas Purity to its steady state value of 1.0 molCH
mol , and let the
4
Exercise 9.25 Sketch the output responses for the controlled variables.
Exercise 9.26 Does the control of both outputs improve?
Exercise 9.27 Quantitatively and qualitatively describe the improvements
gained by the addition of feedback control in compensating for this distur-
bance.
PROCEDURE—COLUMN
1. Consider the loop between the Overhead MeOH Composition and Reflux Ratio
with the Feed MeOH Composition as the disturbance. Note: be sure to set the
Overhead and Bottom Loop Switches to Off. Use the models obtained in the
Transient Response Analysis Module to get the Kp and τp values for the dis-
turbances and the plant models. Insert the values into the controller and start
the simulation. After 500 simulation seconds, change the feed concentration
to 0.47 mol MeOH
mol total .
Exercise 9.1 Sketch the response.
Exercise 9.2 How effective is the controller in maintaining the Overhead
MeOH Composition at its setpoint?
112 FEEDFORWARD CONTROL Module 9
3. Now consider the loop between the Bottom MeOH Composition and the Vapor
Flow Rate with the Feed Flow Rate as the disturbance. Enable the feedforward
controller for Feed Flow Rate (disable the one you used previously). Change
m3
the Feed Flow Rate to 0.027 sec .
Exercise 9.5 How well does the controller reject the disturbance? Exer-
cise 9.6 Sketch the response.
Exercise 9.7 What is the maximum deviation from setpoint for the Bottom
MeOH Composition? Exercise 9.8 How much does the Overhead MeOH
Composition change (steady state offset)?
3
4. Change the value of the Feed Flow Rate back to 0.025 m
sec . Allow the system
to return to its initial steady state.
5. Now change the Overhead MeOH Composition Setpoint from 0.85 mol MeOH
mol total
mol MeOH
to 0.86 mol total .
Exercise 9.9 Sketch the response, and qualitatively describe the behavior.
Exercise 9.10 How much does Overhead MeOH Composition deviate from
setpoint? Exercise 9.11 What is the maximum deviation from setpoint
for the Overhead MeOH Composition? Exercise 9.12 How much does the
Bottom MeOH Composition deviate from its setpoint?
7. Step the Bottom MeOH Composition Setpoint from 0.15 mol MeOH
mol total
to 0.14 mol MeOH
mol total .
Exercise 9.13 Sketch the response and qualitatively describe the behavior.
Exercise 9.14 How well is the controller able to keep the Bottom MeOH
Composition at its setpoint? What is the maximum deviation from setpoint?
Exercise 9.15 Is there an observable steady state offset? If so, how much?
Exercise 9.16 How much does the Overhead MeOH Composition change at
steady state?
8. Return the system to its initial steady state setpoint, Bottom MeOH Compo-
sition of 0.15 mol MeOH
mol total .
Exercise 9.17 How well does the controller perform for this disturbance?
Exercise 9.18 Sketch the response.
Exercise 9.19 What is the maximum deviation from setpoint for the two
controlled variables? Exercise 9.20 Is there offset for the controlled
variables? If so, how much?
10. Return the Feed MeOH Composition to the normal steady state value.
Exercise 9.21 What would you expect to see if the feedback controller was
used in conjunction with the feedforward controller in Procedure 9?
12. Return Feed MeOH Composition to its steady state value of 0.50 mol MeOH
mol total ,
and let the system return to steady state.
13. With the feedback controller still operating on the Overhead MeOH Composi-
tion loop, enter the Cohen-Coon tuning constants calculated in the previous
unit for PI control of the Bottom MeOH Composition loop. Make sure the
switch value is set to On. Again, change the Feed MeOH Composition to
0.35 mol MeOH
mol total .
Exercise 9.25 Sketch the output responses for the controlled variables.
Exercise 9.26 Describe the improvement (if any) in performance for each of
the outputs. Exercise 9.27 Describe, quantitatively and qualitatively the
improvements gained by the addition of feedback control in compensating for
this disturbance.
114 FEEDFORWARD CONTROL Module 9
SUMMARY
In this module, feedforward controller design has been introduced, based on first-
order-plus-time-delay process models. One should have sufficient knowledge to de-
sign and implement a feedforward controller for disturbance rejection. For the
operating conditions considered here, a first-order-plus-time-delay model approxi-
mates the chemical process reasonably well. For this reason one can achieve good
performance with the feedforward controller.
Module 10
OBJECTIVE
Using the RGA, determine the best pairing on inputs and outputs for SISO control
design. Design an IMC controller for both loops, and evaluate its performance for
individual as well as combined setpoint changes. Calculate a dynamic decoupler
from the FOTD process models, and evaluate its performance.
Exercise 10-A Calculate the Relative Gain Array (RGA) between the outputs
and manipulated variables. For the furnace, the outputs are Hydrocarbon Outlet
Temperature and Oxygen Exit Concentration and the manipulated inputs are Air
Flow Rate and Fuel Gas Flow Rate. For the column, the outputs are Overhead
MeOH Composition and Bottom MeOH Composition and the manipulated inputs
are Reflux Ratio and Vapor Flow Rate.
Exercise 10-B Calculate the Single-Input-Single-Output (SISO) IMC
controllers for the inputs and outputs in the previous question. Consider all
permutations, which will yield 4 controllers in total.
115
116 IMC AND MULTIVARIABLE CONTROL Module 10
Exercise 10-C How does changing λ, the filter time constant, affect the
performance of the controller (or output response)?
Exercise 10-D Given a multivariable system, how do you determine stability of
the transfer function matrix?
Exercise 10-E Is the following transfer function matrix stable? Does this plant
have multivariable zeros?
4 2
s+1 s+3
G(s) =
3s+1 5
s+1 s+3
INTRODUCTION
Time delays and Right-Half-Plane (RHP) zeros are included in G+ (s). The
balance of the model is factored into G− (s). The controller is then calculated as
[G− (s)]−1 . Typically, the power of s in the numerator is greater than that of the
denominator. Consequently, the model inverse is improper (not realizable). This
can be fixed by the addition of a simple filter, which also introduces an adjustable
tuning parameter into the design procedure:
1
F (s) =
(λs + 1)n
Here F (s) is a filter applied to make the controller physically realizable. The
filter time constant, λ, can be adjusted to change the aggressiveness of the controller.
The variable n is chosen such that the highest power of s in the denominator of
the controller Q(s) is at least equal to that of the numerator of Q(s). Once the
controller has been designed, it can be applied to the system by running the plant
model in parallel with the actual plant. The deviation in the output signals of these
two components acts as the input to the inverse-based controller.
PROCEDURE—FURNACE 117
Decoupling Control
yd1 - u1 y1
+ +
+
G c1 G 11
+ +
G i1 G 12
G i2 G 21
+
+
+ G c2 G 22
+
+
y - u2 y2
d2
this module, Gc1 and Gc2 are the IMC controllers designed in the Things to Think
About section. The decoupling blocks Gi1 and Gi2 vary depending on the type of
decoupler desired. For steady state decouplers, they are given as:
K12
Gi1 = −
K11
K21
Gi2 = −
K22
If one has additional dynamic information about a process (e.g., time constants
and/or time delays), then it is possible to design more advanced decouplers by
substituting the full transfer function for each of the gains above (i.e., K12 becomes
G12 ).
PROCEDURE—FURNACE
1. From the Furnace Menu select the Multivariable Control - Furnace. Based on
your RGA calculations (Things to Think About section), select an appropriate
input-output pairing for SISO control. Use the switch blocks to turn on or off
118 IMC AND MULTIVARIABLE CONTROL Module 10
specific models or controllers in the simulation. Change the switches for the
models you will be using to On. Enter your model values into the Hydrocarbon
Outlet Temperature model and Oxygen Exit Concentration model blocks.
Also from the Things to Think About section, insert the values that you
have calculated into the IMC temperature controller and the IMC composi-
tion controller. If your controller requires a filter, set the filter time constant
to 0.5 times the dominant model time constant.
2. Make sure the Switch for controlling the Hydrocarbon Temperature loop in
the IMC Controller is set to On and the Switch for controlling the Oxygen
Composition in the IMC Controller is set to Off. Start the simulation.
Exercise 10.1 What is your filter time constant?
Exercise 10.2 Does the Hydrocarbon Outlet Temperature track the 609.9 K
setpoint?
3. Change the Hydrocarbon Outlet Temperature Setpoint to 622 K.
Exercise 10.3 What are the values of overshoot, rise time, and settling
time for Hydrocarbon Outlet Temperature response in this setpoint tracking
exercise?
Exercise 10.4 Comment critically on the performance of the controller re-
garding both of the outputs (offset, speed of response, etc.).
4. Return the system to its steady state (Hydrocarbon Outlet Temperature Set-
point 609.9 K). Multiply the filter time constant by 4, adjust the IMC Con-
troller block transfer functions, and implement the same change as in the last
exercise (Hydrocarbon Outlet Temperature Setpoint to 622 K.)
Exercise 10.5 What are the changes in the overshoot and settling times for
the controlled output?
Exercise 10.6 Comment on the overall effect of this change.
5. Stop the simulation. Return the temperature loop filter time constant to
its original value and reset the Hydrocarbon Outlet Temperature Setpoint to
609.9 K. Set the Switch for controlling the Hydrocarbon Temperature loop
in the IMC Controller to Off and set the Switch for controlling the Oxygen
Composition in the IMC Con troller to On. Restart the Simulation.
Does the Oxygen Exit Concentration track the 0.922 mol
m3 setpoint?
6. Set the Switch for controlling the Hydrocarbon Temperature loop in the IMC
Controller to On (both controllers on) and perform the setpoint change in
Procedure 3.
Exercise 10.7 What are the values of overshoot, rise time, and settling time
for the Hydrocarbon Outlet Temperature response in this setpoint tracking
exercise?
PROCEDURE—FURNACE 119
Exercise 10.8 What are the values of overshoot, rise time, and settling time
for the Oxygen Exit Concentration response in this setpoint tracking exercise?
Exercise 10.9 What trends do you notice?
Exercise 10.10 Why would increased oscillations result from having both
controllers operational?
Decoupling
7. Stop the simulation. Go to the Main Menu and select Clear Work Space.
Then click on Decoupling Control from the Furnace Menu. Double-click on
Controllers and Models in the SIMULINK flowsheet window. Add the blocks
necessary to design a PID-based decoupling control architecture. Implement
your Cohen-Coon PI controller tuning constants from Module 8 for the two
control loops. Then design steady state decouplers and incorporate them into
your current flowsheet.
9. Return the system to steady state. Replace the steady state decouplers with
dynamic decouplers.
10. Once again, implement the setpoint change from Procedure 8. Change the
Hydrocarbon Outlet Temperature Setpoint to 622 K.
Exercise 10.14 Compare the responses of the dynamic decouplers to that
of the steady state decouplers. How do they differ?
Exercise 10.15 What are the values of overshoot, rise time, and settling time
for the Hydrocarbon Outlet Temperature response in this setpoint tracking
exercise?
Exercise 10.16 What are the values of overshoot, rise time, and settling
time for the Oxygen Exit Concentration response in this setpoint tracking
exercise?
120 IMC AND MULTIVARIABLE CONTROL Module 10
PROCEDURE—COLUMN
1. From the Distillation Column Menu select the Multivariable Control - Column.
Based on your RGA calculations (Things to Think About section), determine
the appropriate input-ouptut pairing for SISO control. Use the switch blocks
to turn on or off specific models or controllers. In the Column Model block,
change the switches for the models you will be using to On. Enter your model
values into the model blocks.
Also from the Things to Think About, insert the controllers that you have
calculated into the IMC Controller. If your controller requires a filter, set the
filter time constant to 0.5 times the dominant model time constant.
2. Make sure the Switch for controlling the Overhead MeOH Composition loop
in the IMC Controller is set to On and the Switch for controlling the Bottom
MeOH Composition in the IMC Controller is set to Off. Start the simulation.
Exercise 10.1 What is your filter time constant? Ex-
ercise 10.2 Does the Overhead MeOH Composition loop track the
0.85 mol MeOH
mol total setpoint?
4. Return the system to its steady state (Overhead MeOH Composition Setpoint
0.85 mol MeOH
mol total ). Multiply the filter time constant by 4, implement the new
controller in the IMC Controller block, and implement the same change as in
the last exercise (Overhead MeOH Composition Setpoint to 0.87 mol MeOH
mol total .)
Exercise 10.5 What are the changes in the overshoot and settling times for
the controlled output? Exercise 10.6 What effect does this change have
on control?
5. Stop the simulation. Return the Overhead MeOH Composition loop filter
time constant to its original value and reset the Overhead MeOH Composi-
tion setpoint to 0.85 mol MeOH
mol total . Set the Switch for controlling the Overhead
PROCEDURE—COLUMN 121
MeOH Composition loop in the IMC Controller to Off and set the Switch
for controlling the Bottom MeOH Composition in the IMC Controller to On.
Restart the Simulation.
Does the Bottom MeOH Composition track the 0.15 mol MeOH
mol total setpoint?
6. Set the Switch for controlling the Overhead MeOH Composition in the IMC
Controller to On (both controllers on) and perform the setpoint change in
Procedure 3.
Exercise 10.7 What are the values of overshoot, rise time, and settling time
for the Overhead MeOH Composition response in this setpoint tracking ex-
ercise? Exercise 10.8 What are the values of overshoot, rise time, and
settling time for the Bottom MeOH Composition response in this setpoint
tracking exercise? Exercise 10.9 What trends do you notice? Exer-
cise 10.10 Why could more oscillation result from having both controllers
operational?
Decoupling
7. Stop the simulation. From the Distillation Column Menu select Clear Work
Space. Then click on Decoupling Control. Double-click on Controllers and
Models in the SIMULINK flowsheet window. Add the blocks necessary to
design a PID-based decoupling control architecture. Implement your Cohen-
Coon PI controller tuning constants from the controller tuning unit for the
two control loops. Design steady state decouplers and incorporate them into
your current flowsheet.
9. Return the system to steady state. Replace the steady state decouplers with
Dynamic Decouplers.
SUMMARY
In this unit, you have designed model-based controllers, given an accurate process
model. In addition, you have explored controller interaction in multivariable sys-
tems, and the impact on closed-loop performance. Given an accurate model of a
system, you should be able to design a dynamic decoupler to negate, or at least
reduce, controller interaction.
Module 11
OBJECTIVE
Exercise 11-A What are the physical and/or theoretical limiting factors which
place upper or lower bounds on the sampling time for a discrete-time system?
Exercise 11-B Calculate the Z-transform of the continuous time system:
y(s) 5e−4s
=
u(s) 6s + 1
for a sampling time (∆ts ) of 1 sec. Recalculate the discrete transfer function for
the case of ∆ts = 1.5 sec.
Exercise 11-C Describe one method by which a discrete-time signal can be
converted to a continuous-time signal.
Exercise 11-D What assumption(s) are made in reconstructing a continuous
signal using the above method?
123
124 DISCRETE TIME SYSTEM MODELING Module 11
INTRODUCTION
Most chemical engineering processes are continuous systems, and can be mathemat-
ically described by a set of continuous differential equations. Recall that a first-order
system can be represented as:
dy(t)
τp + y(t) = Kp u(t)
dt
where:
y(t) is the system output;
u(t) is the input (forcing function);
Kp is the system gain; and
τp is the system time constant.
To represent this model in discrete-time, we need to define the sampling time
for a discrete process. In terms of measurements, this can be interpreted of as
the sampling rate of a measurement. To approximate the continuous derivative in
discrete time, the forward difference notation is used, which yields:
dy(t) ∼ y(k) − y(k − 1)
=
dt ∆ts
where:
∆ts is the sampling time; and
y(k) is the value of y(t) at t = k∆ts
The equation for a continuous system can now be recast in the following discrete-
time form:
∆ts Kp ∆ts
y(k) = 1 − y(k − 1) + u(k − 1)
τp τp
Consequently, the output of a discrete-time process can be viewed as a weighted
sum of past outputs, y(k − 1), and past inputs, u(k − 1). By introducing the shift
operator, z −1 , we can rewrite the previous equation as:
∆ts Kp ∆ts −1
y(k) = 1 − z −1 y(k) + z u(k)
τp τp
Solving for the output, y(k), one obtains the discrete-time (pulse) transfer func-
tion relationship:
p s −1
K ∆t
y(z) τ z
= p
u(z) 1 − 1 − ∆t s
z −1
τp
∞
F (z) = f (n∆ts )z −n
n=0
One important consideration in using the Z-transform is the fact that the con-
troller output signal (digital) must be converted to a continuous signal for ultimate
implementation with an actuator (e.g., a process pump). Typically, a so-called hold
function is employed, the most elementary of which is the Zero-Order-Hold (ZOH).
The ZOH transfer function (in continuous time) is:
1 − e(−s∆ts )
H(s) =
s
In other words, the discrete output is held constant between samples. The
convolution (product) of the simple first-order system with the zero-order hold can
then be transformed to discrete-time by use of the Z-transform, resulting in the
model:
− ∆ts
y(z) K p 1 − e τp
z −1
=
u(z) − ∆ts
1 − e τp z −1
Note that unlike the backward difference approximation above, the Z-transform
is an exact discretization. A time delay (e−θs ), if present in the s-domain system,
manifests itself in the discrete domain as z −n , where n is given by ∆tθ s . The char-
acteristics of discrete-time systems and utility of the preceding discussion will be
examined in the balance of this module.
PROCEDURE
1. To start the discrete-time systems modeling unit, click once on the Discrete
Menu button from the Main Menu (Figure 1.1) and select Aliasing. This will
bring up the flowsheet shown in Figure 11.1.
One concern in discrete-time modeling is a problem known as aliasing. A
poorly chosen sample time will cause the digital reconstruction of a signal to
display dynamics different than that of the real system.
2. The effects of sample time selection on process discretization can be summa-
rized by filling out the following table. The Frequency should be entered into
the Sine Wave block under frequency (remember that π in MATLAB can be
entered using the two-letter symbol pi rather than 3.14159....). The sample
time is placed in the Sampling block. The output will draw straight lines
between each collected data point.
126 DISCRETE TIME SYSTEM MODELING Module 11
and time constant can be calculated using the process reaction curve method
(identical to that used in the Dynamic Model Identification modules). To get
a step input make sure the Step Switch is set to On, and the Sine Switch is
set to Off. Also make sure the CT Switch and DT Switch are set to Off.
discrete blocks. Both switches must be set to On in order to compare all three
outputs.
Exercise 11.7 Using the step input value of +1, simulate all three systems
and comment on differences between the real process (blue), the continuous
model (red), and the discrete model (green). How accurate are your continu-
ous and discrete models with respect to gain, time constant, etc.? Exercise
11.8 Change the step input to –1 and run the simulation. Are your models
still accurate? If not, describe the differences between your models and the
process. How do you account for the discrepancies?
SUMMARY
DISCRETE CONTROL
OBJECTIVE
This module addresses the synthesis of discrete-time feedback controllers for the
Furnace/Column. Discrete PID controllers will be developed, and performance will
be analyzed through tuning constant selection. The effects of choosing the proper
sample time will also be explored.
129
130 DISCRETE CONTROL Module 12
Hydrocarbon Outlet Temperature loop. For the column, design the controller for
the Reflux Ratio to Overhead MeOH Composition loop. (Hint: recall that
continuous time IMC design is F (s) ∗ [G (s)] 1 and that one must
incorporate the hold operator (zero-order hold, H(s)) in continuous
time and then perform the Z-transform of H(s) ∗ F (s) ∗ [G (s)] 1 =
HF G 1 (z) which is not equivalent to H(z) ∗ F (z) ∗ [G (z)] 1 .)
Exercise 12-E Will a system (with time constant τ ) under closed-loop control
subjected to a step change in the setpoint settle faster with a sample time of 0.2 τ
or 2τ ? Why?
INTRODUCTION
Analog controllers are becoming less common in industry due to the implementa-
tion of distributed control systems for process regulation. Using these computer
systems, control loops are implemented in a discrete-time framework. This moti-
vates engineers to work with discrete-time controllers and controller tuning.
Recall Module 8, where Ziegler-Nichols and Cohen-Coon rules were used to
select controller tuning parameters. This unit will start by analyzing controller
performance under these tuning rules converted to discrete-time PID coefficients.
The continuous PID controller obeys the following equation in the time domain
(in deviation form):
1 t d6
u(t) = Kc 6(t) + 6(t )dt + τD
τI 0 dt
If one uses the rectangular rule for numerical approximation of the integral term,
t
k
6(t )dt ≈ 6(i)∆t
0 i=1
d6 6(k) − 6(k − 1)
≈
dt ∆t
then the discrete PID controller equation can be written as:
∆t
k
τD
u(k) = Kc 6(k) + 6(i) + (6(k) − 6(k − 1)) (12.1)
τI i=1 ∆t
τ
∆t τD 2τD
+ 1 z −1 + z −2 6(z)
D
∆u(z) = Kc 1+ + − (12.2)
τI ∆t ∆t ∆t
In this way the parameters developed in the controller tuning unit can be used in
the discrete-time domain.
Later in this module, the emphasis will be on the design of the Internal Model
Controller (IMC) in discrete time. Recall from the Multivariable Control Module,
that an IMC controller is designed by first partitioning the process model into an
invertible (G− (s)) and noninvertible (G+ s) portion. Then G− is inverted to yield
the IMC controller. If this inversion is not physically realizable, then a filter must
be applied prior to controller implementation. In the Z-domain, a first-order filter
is given by:
1−λ
F (z) =
z−λ
where the filter constant λ is 0 < λ < 1. Here, the filter time constant λ can be used
to tune the aggressiveness of the controller. Smaller values (closer to zero) yield
faster response. Note that in the limit as t → ∞, the filter gain approaches unity
(recall: t → ∞ ⇔ z → 1).
PROCEDURE—FURNACE
Before you start the exercises, Click on the Discrete button on the Main Menu, then
select PID Control - Furnace from the Discrete Menu. This will display Figure 12.1.
1. A good initial estimate of the sample time for discrete control is 15 of the
dominant open-loop time constant, rounded such that any delay is an integer
number of sample times.
Exercise 12.1 What is your first-order-plus-time-delay model for the Fuel
Gas Flow Rate to Hydrocarbon Outlet Temperature loop?
Exercise 12.2 What sample time do you recommend using to control this
loop?
Exercise 12.3 Using Equation 12.2 above, and your Kc , τI , and τD coeffi-
cients from Module 8, fill in the following table with the discrete-time tuning
constants using Cohen-Coon rules for the Fuel Gas Flow Rate to Hydrocarbon
Outlet Temperature loop.
132 DISCRETE CONTROL Module 12
Figure 12.1. Flowsheet for the Furnace using Discrete PID Control
2. Exercise 12.4 Use Ziegler-Nichols rules for the Fuel Gas Flow Rate to
Hydrocarbon Outlet Temperature loop. Fill in the following table based on
your Module 8 continuous-time tuning constants:
3. From the Discrete Menu, select PID Control. Tune the Discrete Temperature
PID Controller using the Cohen-Coon discrete tuning constants for PI control.
Make sure the integral action is On and the derivative action is Off. Remember
to include the sample time in the controller block and the Temperature Sensor.
Introduce a new Hydrocarbon Outlet Temperature Setpoint of 620 K.
PROCEDURE—FURNACE 133
4. Return the system to steady state by setting the Hydrocarbon Outlet Temper-
ature Setpoint to 609.9 K. Enter the derivative time constant in the Discrete
Temperature PID Controller, and set the derivative action to On. Make the
same setpoint change as above.
Exercise 12.7 Sketch the response.
Exercise 12.8 How does the use of derivative action affect the settling time?
5. Return the setpoint to its initial value, 609.9 K. Once the system has reached
steady state, double the sample time, and make the necessary changes in the
Discrete Temperature PID Controller and Temperature Sensor. Also update
the controller parameters (REMEMBER: PID tuning coefficients are
sample time dependent). Again set the Hydrocarbon Outlet Temperature
Setpoint to 620 K.
Exercise 12.9 How does the settling time compare to that achieved before?
6. Again return the system to steady state by setting the Hydrocarbon Outlet
Temperature Setpoint to 609.9 K. Return the Temperature Sensor and Dis-
crete Temperature PID Controller sample times to their initial values. Replace
the Cohen-Coon parameters with those calculated using the Ziegler-Nichols
rules. Make the setpoint change described above.
Exercise 12.10 Compare the Ziegler-Nichols PID results to the PID results
generated under Cohen-Coon tuning. Which is more aggressive?
Exercise 12.11 What is the settling time for this controller, and how does
that compare with those found above?
7. Stop the simulation. Find the Discrete Menu, and click on Discrete IMC -
Furnace. This will bring up the flowsheet in Figure 12.2. Discretize your
first-order-plus-time-delay model, and place it in the Discrete Model block.
Take the discrete IMC controller you developed in the Things to Think About
section and enter the values in the correct blocks in the IMC Controller block.
Do not forget to enter the sample time in the Temperature Sensor, Discrete
Model, and controller blocks. Make a step change in the Hydrocarbon Outlet
Temperature Setpoint from 609.9 K to 620 K.
Exercise 12.12 Sketch the response.
134 DISCRETE CONTROL Module 12
Figure 12.2. Flowsheet for the Furnace under Discrete IMC Control
Exercise 12.13 How does this response compare to those which were gen-
erated in the PID controller section?
8. Return the system to steady state. Examine the performance of the closed-
loop in response to the same setpoint change for the various IMC filter values
in the table below.
PROCEDURE—COLUMN
Before you start the exercises, Click on the Discrete button on the Main Menu,
then select PID Control - Column from the Discrete Menu. This will display the
window in Figure 12.3
Figure 12.3. Flowsheet for the Column under Discrete PID Control
1. A good initial estimate of the sample time for discrete control is approximately
1
5 of the dominant open-loop time constant, rounded such that any delay is
an integer number of sample times.
Exercise 12.1 What is your first-order-plus-time-delay model for the Reflux
Ratio to Overhead MeOH Composition loop? Exercise 12.2 What sample
time do you recommend using to control this loop? Exercise 12.3 Using
Equation 12.2 and your Kc , τI , and τD coefficients from Module 8, fill in
the following table with the discrete-time tuning constants using Cohen-Coon
rules for Reflux Ratio to Overhead MeOH Composition loop.
136 DISCRETE CONTROL Module 12
2. Exercise 12.4 Use Ziegler-Nichols rules for the Reflux Ratio to Overhead
MeOH Composition loop. Fill in the following table based on the continuous-
time tuning constants from Module 8:
3. Tune the Overhead MeOH Controller using the Cohen-Coon discrete tun-
ing constants for PI control. Remember to include the sample time in the
controller block and in the Overhead Composition Sensor. Introduce a new
composition setpoint of 0.89 mol MeOH
mol total .
Exercise 12.5 Sketch the response. Exercise 12.6 Note the settling
time (time required for the Overhead MeOH Composition to remain within
5% of the new steady-state value).
4. Return the system to steady state by setting the Overhead MeOH Composition
Setpoint to 0.85 mol MeOH
mol total . Enter the Cohen–Coon derived controller tuning
constants for PID control in the Overhead Composition Controller, and set
the derivative action to On. Make the same setpoint change as above.
Exercise 12.7 Sketch the response. Exercise 12.8 How does the use of
derivative action affect the settling time?
6. Again return the system to steady state by setting the Overhead MeOH Com-
position Setpoint to 0.85 mol MeOH
mol total . Return the Overhead Composition Sen-
sor and Overhead Composition Controller sample times to their initial values.
PROCEDURE—COLUMN 137
Replace the Cohen-Coon parameters with those calculated with the Ziegler-
Nichols rules. Make the setpoint change described above.
Exercise 12.10 Compare the Ziegler-Nichols PID results to the PID results
generated under Cohen-Coon tuning. Which is more aggressive? Exercise
12.11 What is the settling time for this controller, and how does that compare
with those found above?
7. Stop the simulation. From the Discrete Menu, click on Discrete IMC - Col-
umn. This will bring up the flowsheet in Figure 12.4. Discretize your first-
order-plus-time-delay model, and place it in the Discrete Model block. Take
the discrete IMC controller you developed in the Things to Think About
section and enter the values in the Overhead Composition Controller block.
Do not forget to enter the sample time in the Overhead Composition Sensor,
Discrete Model, and controller blocks. Make a step change in the Overhead
MeOH Composition Setpoint from 0.85 mol MeOH mol MeOH
mol total to 0.89 mol total .
Exercise 12.12 Sketch the response. Exercise 12.13 How does this
response compare to those that were generated in the PID controller section?
8. Return the system to steady state. Examine the performance of the closed-
loop in response to the same setpoint change for the various IMC filter values
in the table below.
Exercise 12.14 Fill in the following table:
Figure 12.4. Flowsheet for the Column under Discrete IMC Control
SUMMARY
MODEL PREDICTIVE
CONTROL
OBJECTIVE
The objective of this unit is to introduce the basic concepts involved in designing a
Model Predictive Controller (MPC). Discrete-time models of the Furnace/Column
will be created from existing continuous-time models. Various different controller
parameters will be explored. These parameters include the output weights, input
weights, model prediction horizon, and move horizon. An accurate linear model
of the process will be provided. Comparisons between first-order-plus-time-delay
models and the more accurate model will be made.
Design a 2 × 2 MPC controller for the Furnace/Column using the previously devel-
oped FOTD models, and evaluate the setpoint response. Examine the sensitivity
of the response to the 4 key tuning parameters in the MPC algorithm.
Exercise 13-A What is a typical time constant for each of the input-output
pairings in the furnace or column? To construct a discrete-time model, you should
sample at a rate equal to approximately 15 of the time constant of a process. What
is a reasonable sampling rate for your system?
Exercise 13-B If one developed a discrete-time model of your process system
by sampling every 0.5 sec (for the furnace) or every 60 sec (for the column), how
many model coefficients would be needed to capture the complete response of the
system to a step change in the input?
139
140 MODEL PREDICTIVE CONTROL Module 13
Exercise 13-C Two of the controller tuning parameters in MPC are the input
move suppression weight and the output error weight. Explain how one could
adjust these weights to make the controller more aggressive.
INTRODUCTION
1.5
Output
0.5
0
0 5 10 15
Time
1
Input
0.5
0
0 5 10 15
Time
of the steady state value (typically between 20 and 40). A smaller sampling time
and more model coefficients lead to more accurate models, but the mathematical
manipulations become more difficult.
Using the model of the system, predictions of future output values can be made.
MPC solves an optimization problem by searching for an input move which mini-
mizes a scalar cost function. The difference between the predicted output variables
and their reference values is part of the cost function, so that the controlled variables
optimally track the setpoint. The difference between control moves from one time
to the next can also be incorporated in the cost function to minimize excessive use
of system actuators and introduces an extra degree of freedom for controller tuning.
The optimization problem which is solved at every time step can be written as:
where:
yr (k) is the reference trajectory value of the controlled variables at time k;
y(k) is the model estimate of the controlled variables at time k;
u(k) is the predicted input move at time k;
p is the model prediction horizon; and
x is a norm of the vector x (typically 2-norm (energy))
PROCEDURE - FURNACE
1. From the Main Menu, click on Furnace and Horizon-based Control - Fur-
nace. Locate your first-order-plus-time-delay models of the furnace which
were developed in the Transient Response Analysis Module. Use the pcm c2d
command at the MATLAB prompt to convert your continuous-time models to
discrete-time models. This function makes a discrete step-response model for
the 2 × 2 system and places the step-response coefficients in variables model1
and model2 in the MATLAB workspace. Make sure that the discrete models
capture the steady state and dynamic behavior of the furnace. If they do not,
change the model memory or sampling time.
Exercise 13.1 What is the sampling time that you have determined for your
system?
Exercise 13.2 What is the model memory you have selected? Plot the model
and actual data for validation purposes.
2. Double-click
on the MPC Controller block. Set the output error weight Γy to
1 1 . The move horizon should be 1 and the prediction horizon should be
20. Change the setpoint for the Hydrocarbon Outlet Temperature to 600 K.
142 MODEL PREDICTIVE CONTROL Module 13
220e−2s
Fuel Gas Flow Rate to Hydrocarbon Outlet Temperature
6.5s + 1
−13e−2s
Air Flow Rate to Hydrocarbon Outlet Temperature
6.2s + 1
2.0e−4s
Fuel Gas Flow Rate to Oxygen Exit Concentration
3.8s + 1
0.14e−4s
Air Flow Rate to Oxygen Exit Concentration
4.2s + 1
From these models, use the pcm c2d command to generate step response mod-
els. Incorporate these models into the controller, and implement the same
setpoint change as in the last exercise.
Exercise 13.6 Does controller performance improve (in terms of steady state
tracking, rise time, and settling time)?
4. Use these new models for the remainder of this module. Assume
that the Oxygen Exit Concentration has been designated a higher priority
for control. To account for this, the output error weight can be increased
such that Γy is 0.1 1 . Keep the move and prediction horizons the same.
Change the setpoint for the Hydrocarbon Outlet Temperature to 600 K.
Exercise 13.7 Comment on the performance of your controller, noting, in
particular, the rise and settling times for the outputs.
Return the setpoint to the normal steady state value, 609.9 K. Change the
setpoint for the Oxygen Exit Concentration to 1.0143 mol
m3 .
Exercise 13.8 Record the rise and settling times for the outputs.
PROCEDURE - FURNACE 143
Return the setpoint to the normal steady state value, 0.922 mol
m3 .
Exercise 13.9 Does the controller decouple the outputs in the system re-
sponse?
Exercise 13.10 Can you detect a difference in the aggressiveness of the
controller, with respect to the Oxygen Exit Concentration?
5. Now, consider a change in the input move weights to detune the controller and
(potentially) reduce the amount of “chatter” in the system (excessive,
high
frequency actuator response). Set the input move weight Γ to 0.1 0.1 .
u
Keep the output error weight Γy set to 0.1 1 . The move and prediction
horizons again remain the same. Change the setpoint for the Hydrocarbon
Outlet Temperature to 600 K.
Exercise 13.11 Record the rise and settling times for the outputs.
Return the setpoint to the normal steady state value, 609.9 K. Change the
setpoint for the Oxygen Exit Concentration to 1.0143 mol
m3 .
Exercise 13.12 Record the rise and settling times for the outputs.
Return the setpoint to the normal steady state value, 0.922 mol
m3 .
Exercise 13.13 Does the controller decouple the system?
Exercise 13.14 Can you detect a difference in the aggressiveness of the
controller, with respect to the movement of the Air Flow Rate valve?
6. Now, change
the move horizon to 2. Keep the input move weight Γu set at
0.1 0.1 . The output error weight Γy should also remain unchanged at
0.1 1 . The prediction horizon should remain the same (20).
Change the setpoint for the Hydrocarbon Outlet Temperature to 600 K.
Exercise 13.15 Record the rise and settling times for the outputs.
Return the setpoint to the normal steady state value, 609.9 K. Change the
setpoint for the Oxygen Exit Concentration to 1.0143 mol
m3 .
Exercise 13.16 Record the rise and settling times for the outputs.
Return the setpoint to the normal steady state value, 0.922 mol
m3 .
Exercise 13.17 Can you detect a difference in the aggressiveness of the
controller, with respect to manipulated variable movement? With respect to
the output tracking?
7. Keep the move horizon set to 2. If the air flow valve were more susceptible
to damage from “chatter.” Adjust the input move weight Γu to 1 0.1 .
Keep the output error weight Γy at 0.1 1 . The prediction horizon should
remain the same. Change the setpoint for the Hydrocarbon Outlet Temperature
to 600 K.
Exercise 13.18 Record the rise and settling times for the outputs.
144 MODEL PREDICTIVE CONTROL Module 13
Return the setpoint to the normal steady state value, 609.9 K. Change the
setpoint for the Oxygen Exit Concentration to 1.0143 mol
m3 .
Exercise 13.19 Record the rise and settling times for the outputs.
Return the setpoint to the normal steady state value, 0.922 mol
m3 .
Exercise 13.20 Can you detect a difference in the behavior of the controller
with the new tuning?
PROCEDURE—COLUMN
1. From the Main Menu, click on Column and Horizon-based Control - Col-
umn. Locate your first-order-plus-time-delay models of the column which
were developed in the Transient Response Analysis Module. Use the pcm c2d
command at the MATLAB prompt to convert your continuous-time models to
discrete-time models. This function makes a discrete step-response model for
the 2 × 2 system and places the step-response coefficients in variables model1
and model2 in the MATLAB workspace. Make sure that the discrete models
capture the steady state and dynamic behavior of the column. If they do not,
change the model memory or sampling time.
Exercise 13.1 What is the sampling time that you have determined for your
system? Exercise 13.2 What is the model memory you have selected?
Plot the model and actual data for validation purposes.
2. Double-click
on the MPC Controller block. Set the output error weight Γy to
1 1 . The move horizon should be 1 and the prediction horizon should
be 20. Change the setpoint for the Overhead MeOH Composition to 0.90
mol MeOH
mol total .
Exercise 13.3 Comment on the performance of your system, recording the
rise and settling times for the outputs. Return the setpoint to the normal
steady state value, 0.85 mol MeOH
mol total . Change the setpoint for the Bottom MeOH
mol MeOH
Composition to 0.1 mol total .
Exercise 13.4 Record the rise and settling times for the outputs. Return
the setpoint to the normal steady state value, 0.15 mol MeOH
mol total .
Exercise 13.5 Does the controller decouple the outputs in the system re-
sponse?
3. MPC controllers are used on multivariable systems because they do not require
the design of explicit decouplers to compensate for variable interactions. If
the two controlled outputs, Overhead MeOH Composition and Bottom MeOH
Composition, did not both track their respective setpoints, then the models
generated in the Transient Response Analysis Module may be inaccurate.
PROCEDURE—COLUMN 145
0.126e−138s
Reflux Ratio to Overhead MeOH Composition
762s + 1
−1.1953e−548s
Vapor Flow Rate to Overhead MeOH Composition
1252s + 1
0.124e−166s
Reflux Ratio to Bottom MeOH Composition
840s + 1
−22.07e−26s
Vapor Flow Rate to Bottom MeOH Composition
911s + 1
From these models, use the pcm c2d command to generate step-response mod-
els. Incorporate these models into the controller, and implement the same
setpoint change as in the last exercise.
Exercise 13.6 Does controller performance improve (in terms of steady state
tracking, rise time, and settling time)?
4. Use these new models for the remainder of this module. Assume
that the Overhead MeOH Composition has been designated a higher priority
for control. To account for this, the output error weight can be increased
such that Γy is 1 0.1 . Keep the move and prediction horizons the same.
Change the setpoint for the Overhead MeOH Composition to 0.90 mol MeOH
mol total .
Exercise 13.7 Record the rise and settling times for the outputs. Return
the setpoint to the normal steady state value, 0.85 mol MeOH
mol total . Change the
mol MeOH
setpoint for the Bottom MeOH Composition to 0.1 mol total .
Exercise 13.8 Record the rise and settling times for the outputs. Return
the setpoint to the normal steady state value, 0.15 mol MeOH
mol total .
Exercise 13.9 Does the controller decouple the outputs in the system re-
sponse? Exercise 13.10 Can you detect a difference in the aggressiveness
of the controller, with respect to the Bottom MeOH Composition?
5. Now, consider a change in the input move weights to detune the controller and
(potentially) reduce the amount of “chatter” in the system (excessive,
high
frequency actuator response). Set the input move weight Γ to 1 10 .
u
Keep the output error weight Γy set to 1 0.1 . The move and prediction
horizons again remain the same. Change the setpoint for the Overhead MeOH
Composition to 0.90 mol MeOH
mol total .
Exercise 13.11 Record the rise and settling times for the outputs. Return
the setpoint to the normal steady state value, 0.85 mol MeOH
mol total . Change the
mol MeOH
setpoint for the Bottom MeOH Composition to 0.1 mol total .
Exercise 13.12 Record the rise and settling times for the outputs. Return
the setpoint to the normal steady state value, 0.15 mol MeOH
mol total .
146 MODEL PREDICTIVE CONTROL Module 13
Exercise 13.13 Does the controller decouple the outputs in the system
response? Exercise 13.14 Can you detect a difference in the aggressiveness
of the controller, with respect to the movement of the Reflux Ratio and Vapor
Flow Rate valves?
6. Now, the move horizon to 2. Keep the input move weight Γu set
change
at
1 10
. The output error weight Γy should also remain unchanged at
1 0.1 . The prediction horizon should remain the same.
mol MeOH
Change the setpoint for the Overhead MeOH Composition to 0.90 mol total .
Exercise 13.15 Record the rise and settling times for the outputs. Return
the setpoint to the normal steady state value, 0.85 mol MeOH
mol total . Change the
setpoint for the Bottom MeOH Composition to 0.1 mol MeOH
mol total .
Exercise 13.16 Record the rise and settling times for the outputs. Return
the setpoint to the normal steady state value, 0.15 mol MeOH
mol total .
Exercise 13.17 Can you detect a difference in the aggressiveness of the
controller, with respect to manipulated variable movement? With respect to
the output tracking?
7. Keep the move horizon set to 2. Adjust the input move weight Γu to
3 10 . Keep the output error weight Γy at 1 0.1 . The prediction
horizon should remain the same. Change the setpoint for the Overhead MeOH
Composition to 0.90 mol MeOH
mol total .
Exercise 13.18 Record the rise and settling times for the outputs. Return
the setpoint to the normal steady state value, 0.85 mol MeOH
mol total . Change the
mol MeOH
setpoint for the Bottom MeOH Composition to 0.1 mol total .
Exercise 13.19 Record the rise and settling times for the outputs. Return
the setpoint to the normal steady state value, 0.15 mol MeOH
mol total .
Exercise 13.20 Can you detect a difference in the behavior of the controller
with the new tuning?
SUMMARY
In this unit you have developed a model predictive controller. Different input move
and output error weighting values were used for controller tuning. The effect of
changing the move horizon was also explored. The use of an improved system
model was shown to improve closed-loop performance.
ABOUT THE CD
This CD that accompanies the book contains the files needed to run PCM using
MATLAB version 5.1 or higher and SIMULINK version 2.0 or higher.
The files are located on the CD in the pcm directory. PCM can be run directly
from the CD, but is is recommended that you install PCM on your computer’s hard
drive. To install PCM, copy the pcm directory to your local hard drive.
To start PCM, type mainmenu at the MATLAB prompt. Note that you must
either currently be in the pcm directory or have the pcm directory added to your
MATLAB path. You can use the pwd command to determine your current working
directory. The cd command can be used to change directories. MATLAB comes
with a path browser that allows you to view and change your path. You can also
manually change the path by including an appropriate addpath command in your
matlabrc.m file.
For PC users, you may need to copy the files mths110.dll and plbs110.dll to
your system directory before starting MATLAB. System directories may be
C:\Windows\system or C:\WINNT\system32. These files are on the CD-ROM and
may be hidden from view because they have a .dll extension. If so, select View,
Options, View, and Show all files.
The column and furnace simulations rely on process models. MATLAB can
use interpreted models or compiled models. In our experience, compiled models
run much faster. We have provided compiled models for MATLAB version 5.3 on
PC and Solaris systems. If you have access to a C compiler that is MATLAB
compatible, you can use the command mex to compile the models for your sys-
tem or for newer/older versions of MATLAB. The files that need compiling are:
/pcm/furnace/pufcore4.c, /pcm/column/newcolco.c, and /pcm/column/newcol.c.
For the furnace, the resulting compiled file should be named pufcore4.dll for PC
versions or pufcore4.mexsol for Solaris.
If you cannot use mex to compile these files or if you have trouble running
the simulations, you can use the slower interpreted version of the furnace model.
Remove or rename the compiled versions of the furnace model so that MATLAB
will use the file pufcore4.m as the model. MATLAB looks for a compiled version
before using the interpreted version.
For information and updates, see the WWW page for the book at:
http://che.udel.edu/pcm
147