Bequette - Control de Procesos
Bequette - Control de Procesos
Understand first-order, first-order + dead time and integrating system step responses
3.1 Background
3.14 Summary
[ Team LiB ]
[ Team LiB ]
3.1 Background
One of the major goals of this chapter is to obtain an understanding of process dynamics. Process
engineers tend to think of process dynamics in terms of the response of a process to a step input
change. Assume that the process is initially at steady state, then apply a step change to an input
variable. The majority of chemical processes will exhibit one of the responses shown in Figure 3-
1. In this plot, we assume that a positive step increase has been made to the input variable of
interest. The solid curves are examples of "positive gain" processes; that is, the process output
increases for an increase in the input. The dashed lines are those of negative gain processes. The
curves in Figure 3-1a show a monotonic change in the output; this behavior is generally known as
overdamped. The curves in Figure 3-1b are indicative of "integrating" processes; a prime example
is a liquid surge vessel, where the level continues to change when there is an imbalance in the
inlet and outlet flow rates. The curves in Figure 3-1c are known as underdamped or oscillatory
responses. This type of behavior may occur in exothermic chemical reactors or biochemical
reactors. It more often occurs in processes that are under feedback control, particularly if the
controller is poorly tuned. The behavior shown in Figure 3-1d is known as "inverse response" and
is seen in steam drums, distillation columns, and some adiabatic plug flow reactors.
In the sections that follow, we discuss the characteristics of process models that lead to each of
the behaviors shown in Figure 3-1.
[ Team LiB ]
[ Team LiB ]
State space models have the following form, where the states (x), inputs (u), and outputs (y) are
all perturbation or deviation variables
Equation 3.1
Recall that in matrix notation, the first subscript refers to the row and the second subscript refers
to the column. When matrices multiply vectors, each row corresponds to a particular output of the
multiplication, while the column corresponds to a particular input of the operation. Consider the C
matrix, which relates the states to the outputs. Element cij relates the effect of state xj on output
yi.
Equation 3.2
Stability
One of the first basic concepts that we need to cover is the notion of stability. Consider a process
where one or more states have been perturbed from the steady-state solution or operating point.
The process is stable if after a period of time, the variables return to the steady-state values. This
means that the state variables, since they are deviation variables, return to zero.
Numerically, we can determine the stability of a state space model by finding the eigenvalues of
the state space A matrix. Remember that the A matrix is simply the matrix of derivatives of the
dynamic modeling equations with respect to the state variables.
If all of the eigenvalues are negative, then the system is stable; if any single eigenvalue is
positive, the system is unstable. A system with all but one eigenvalues negative and with one
eigenvalue equal to zero is called an integrating system and is characteristic of processes with
liquid levels or gas drum pressures that can vary.
Examples of unstable systems are shown in Figure 3-2. If an eigenvalue is real and positive, the
system response is that shown in the top curves. If there are complex conjugate eigenvalues,
with positive real portions, the system oscillates (with ever increasing amplitude), as shown at the
bottom.
Mathematically, the eigenvalues of the A matrix are found from the roots of the characteristic
polynomial
Equation 3.3
where is known as an eigenvalue, and I is the identity matrix. For a state space model with n
states, A is an n x n matrix, and there will be n solutions (eigenvalues) of Equation (3.3). There
are analytical solutions for two- and three-state systems; the two-state solution is shown below.
In two-state systems,
Equation 3.4
Equation 3.5
It is easy to show that if and a11 + a22 < 0 and a11a22 >a12a21, the roots (eigenvalues) are
negative and the system is stable. A more general method of qualitatively checking the stability,
known as the Routh stability criterion, is shown in Chapter 5.
and the eigenvalues for operating condition 1 can be found using the following steps
Again, the positive eigenvalue indicates that the second operating condition is unstable.
Generalization
Notice that a solution of a second-order polynomial was required to find the eigenvalues of the
two-state example; this resulted in two eigenvalues. For the general case of an n x n matrix,
there will be n eigenvalues. It is too complex to find these analytically for all but the simplest low-
order systems. The simplest way to find eigenvalues is by using existing numerical analysis
software; for example, in MATLAB the eig function can be used to find eigenvalues.
The values of the eigenvalues are related to the "speed of response," and the eigenvalue unit is
inverse time. If the unit of time used in the differential equations is minutes, for example, then
the eigenvalues have min-1 as the unit. For stable systems (where all eigenvalues are negative),
the larger magnitude (more negative) eigenvalues are faster.
For matrices that are 2 x 2 or larger, some eigenvalues may occur in complex conjugate pairs. In
this case, the stability is determined by the sign of the real portion of the complex number. As
long as all real portions are negative, the system is stable.
[ Team LiB ]
[ Team LiB ]
The Laplace transform of a time-domain function, f(t), is represented by L[f(t)] and is defined as
Equation 3.6
The Laplace transform is a linear operation, so the Laplace transform of a constant (C) multiplying
a time-domain function is just that constant times the Laplace transform of the function,
Equation 3.7
The Laplace transforms of a few common time-domain functions are shown next.
Exponential Function
Exponential functions appear often in the solution of linear differential equations. Here
The transform is defined for t > 0 (we also use the identity that ex+y = exey)
Equation 3.8
Derivatives
This will be important in transforming the derivative term in a dynamic equation to the Laplace
domain (using integration by parts),
so we can write
Equation 3.9
Equation 3.10
One reason for using deviation variables is that all of the initial condition terms in Equation (3.10)
are 0, if the system is initially at steady-state.
Equation 3.11
So the Laplace transform of a function with a time delay () is simply e–s times the Laplace
transform of the nondelayed function.
Step Functions
Step functions are used to simulate the sudden change in an input variable (say a flow rate being
rapidly changed from one value to another). A step function is discontinuous at t = 0. A "unit"
step function is defined as
so
Equation 3.12
Equation 3.13
Pulse
Consider a pulse function, where a total integrated input of magnitude P is applied over tp time
units, as shown in Figure 3-3.
The function is f(t) = P/t p for 0 < t < tp and f(t) = 0 for t > t p. The Laplace transform is
Equation 3.14
Impulse
An impulse function can viewed as a pulse function, where the pulse period is decreased while
maintaining the pulse area, as shown in Figure 3-4. In the limit, as tp approaches 0, the pulse
function becomes (using L'Hopital's rule)
Equation 3.15
Equation 3.16
Examples of common impulse inputs include a "bolus" (shot or injection) of a drug into a
physiological system, or dumping a bucket of fluid or bag of solids into a chemical reactor.
Other Functions
It is rare for one to derive the Laplace transform for a function; rather a table of known
transforms (and inverse transforms) can be used to solve most dynamic systems problems.
Table 3-1 presents solutions for most common functions. If you desire to transform a function
from the time domain to the Laplace domain, then look for the time-domain function in the first
column and write the corresponding Laplace domain function from the second column. Similarly, if
your goal is to "invert" a Laplace domain function to the time domain, then look for the Laplace
domain function in the second column and write the corresponding time-domain function from the
first column. This notion of the inverse Laplace transform can be written
Equation 3.17
For example
Initial- and Final-Value Theorems
The following theorems are very useful for determining limiting values in dynamics and control
studies. The long-term behavior of a time-domain function can be found by analyzing the Laplace
domain behavior in the limit as the s variable approaches zero. The initial value of a time-domain
function can be found by analyzing the Laplace domain behavior in the limit as s approaches
infinity.
f(t) F(s)
(t) (unit impulse) 1
C (constant)
f(t - ) e-sF(s)
tn
sF(S) - f(0)
e-at
te-at
1-e-t/
sin t
Time-domain function Laplace domain function
cos t
e–at sin t
e–atcos t
where ,
Equation 3.18a
Equation 3.18b
It should be noted that these theorems only hold for stable systems.
The short-term behavior, y(t 0), is found using the initial-value theorem,
The reader should verify that the time-domain function, y(t), can be found by applying Table 3-1
to find
and that the values of y(t ), and y(t 0), are consistent with the final- and initial-value
theorems.
where a, b, and so forth are the roots of D(s). If roots are repeated the partial fraction
expansion has the form (for an example where three roots all have a value of a).
5. Invert each element back to the time domain to find the final solution for y(t).
For the case of repeated roots (say 3 that have a value of a), the solution has the form
It should be noted that chemical process systems are rarely described by an nth order differential
equation. Usually, a set of n first-order differential equations is transformed to a single nth order
equation, as shown in Example 3.3.
Equation 3.19
where x1 and x2 represent the concentrations of two components (in deviation variable form) in
an isothermal reactor; the initial conditions are x1(0) = x2(0) = 0. Solve for the output
(concentration of component 2) response to a unit step input.
1. The reader should show (see exercise 6) that this can be arranged to a second-order
differential equation,
with the initial conditions y(0) = dy(0)/dt = 0, and the input is initially u(0)= 0.
Alternatively, one could take the Laplace transform of each equation in (3.19) and use algebraic
[1]
substitution to find this second-order equation in s.
4. Performing a partial fraction expansion using the roots of the denominator polynomial,
Equation 3.20
Solve for C1 by multiplying by s,
Setting s = 0 to find
Similarly, solve for C2 by multiplying Equation (3.20) by s + 2.4053 and setting s = –2.4053
Also, solve for C3 by multiplying Equation (3.20) by s + 2.2376 and setting s = –2.2376
which yields
Equation 3.21
Differential equations textbooks, such as Boyce and DiPrima (1992) present many examples of
applications of Laplace transforms to solve differential equations. In practice, it is rare for process
engineers to seek analytical solutions to differential equations; it is far easier to solve these
numerically. The primary goal of this section was to provide background material to understand
the transfer functions and dynamic responses shown in the next section.
[ Team LiB ]
[ Team LiB ]
Equation 3.22a
Since we are assuming that the model is based on deviation variables, and that the system is
initially at steady state, the initial conditions are
Equation 3.22b
The ratio of polynomials is called the transfer function. When it relates a manipulated input to an
output it is commonly called a process transfer function. In general, we will use gp(s) to represent
the process transfer function.
Equation 3.23
Equation 3.24
The roots of the numerator polynomial are known as zeros, and the roots of the denominator
polynomial are call poles. The significance of poles and zeros are discussed in detail in Section
3.9.
We have used capital letters to distinguish Laplace domain variables from the time-domain
variables. In the rest of this text we generally use lowercase letters for all input and output
variables. If the argument is s, then we assume that we are referring to the Laplace domain.
Transfer functions are often used in block diagrams. For example, the relationship between an
input and output is shown as
In the rest of this chapter we study the dynamic behavior of some commonly used transfer
functions. Our focus is on Step Responses, since process engineers often apply step changes to
understand dynamic behavior.
[ Team LiB ]
[ Team LiB ]
Equation 3.25
where the parameters (p and k p) and variables (y and u) have the following names: p is the
process time constant (units of time), kp the process gain (units of output/input), y the output
variable, and u the input variable. Taking the Laplace transform of each term (notice that we are
now using lower-case variables to represent the Laplace domain input and output), and assuming
that the initial condition is y(0) = 0,
Equation 3.26
Step Response
Consider the case where the output is initially zero (steady state in deviation variable form), and
the input is suddenly step changed by an amount u. The Laplace transform of the input is
Equation 3.27
Equation 3.28
Using a partial fraction expansion and inverting to the time domain, you should find (see Exercise
1)
Equation 3.29
Here the notion of a process gain is clear. After a substantial amount of time (t >> p), we find,
from Equation (3.29),
Equation 3.30
That is,
Equation 3.31
We can think of the process time constant as the amount of time it takes for 63.2% of the
ultimate output change to occur, since when t = p,
Remember that this holds true only for first-order systems.
Impulse Response
Consider now an impulse input of magnitude P, which has units of the input*time; if the input is a
volumetric flow rate (volume/time), then the impulse input is a volume. The output response is
which has an immediate response of Pkp/p followed by a first-order decay with time.
where the subscript s is used to indicate that a particular variable remains at its steady-state
value. Defining the following deviation variables
The gain and time constant are clearly a function of scale. A process with a large steady-state
flow rate will have a low gain, compared to a process with a small steady-state flow rate. This
makes physical sense, since a given heat power input will have a larger effect on the small
process than the large process. Similarly, a process with a large volume-to-flow rate ratio is
expected to have a slow response compared to a process with a small volume-to-flow rate ratio.
Consider a heater with a constant liquid volume of Vs = 50 liters and a constant volumetric flow
rate of Fs = 10 liters/minute. For liquid water, the other parameters are cp = 1 kcal/ liter°C. The
process gain and time constant are then
Step Response
If a step input change of 10 kW is made, the resulting output change is [from Equation (3.29)]
A plot of the step input and the resulting output are shown in Figure 3-6.
Impulse Response
If an impulse input of 30 kJ is made, you should be able to show that the temperature changes
immediately by 0.143°C (see Exercise 15).
[ Team LiB ]
[ Team LiB ]
Equation 3.32
Equation 3.33
Step Response
If a step input change of u is made at t = 0,
Equation 3.34
Impulse Response
If an impulse input of magnitude P is made at t = 0,
then the output immediately changes to a new steady-state value of
where h is the liquid height, A is the constant cross-sectional area of the tank, F1 is the inlet flow
rate, and F2 is the outlet flow rate. Assume that the outlet flow rate remains constant at a steady-
state value of F2s. Defining the output and input in deviation variable form as
Step Response
which is shown in Figure 3-7. If the steady-state height is 2 meters, then the height as a function
of time is
[ Team LiB ]
[ Team LiB ]
Equation 3.35
Equation 3.36
where (obviously a0 0)
and the parameters are as follows: k is the gain (units of output/input), the damping factor
(dimensionless), and the natural period (units of time).
The second-order model shown in Equation (3.35) or (3.36) generally arises by changing a set of
two first-order equations (state-space model) to a single second-order equation. For a given
second-order ODE, there are an infinite number of sets of two first-order (state-space) models
that are equivalent.
Equation 3.37
Equation 3.38
The characteristic equation of the second-order transfer function is 2s2 + 2s + 1. We can find
the roots (known as the poles) by using the quadratic formula
Equation 3.39
The following analysis assumes that >0 and > 0. This implies that the real portions of p1 and
p2 are negative and, therefore, the system is stable. The three possible cases are shown in Table
3-2.
Step Responses
Now, we consider the dynamic response of second-order systems to step inputs (u(s) = u/s),
Equation 3.40
For > 1, the denominator polynomial, 2s2 + 2s + 1, can be factored into the form
where the time constants are
We can derive the following solution for step responses of overdamped systems,
Equation 3.41
Note that, as in the case of first-order systems, we can divide by ku to develop a dimensionless
output. Also, the dimensionless time is t/ and we can plot curves for dimensionless output as a
function of . This is done in Figure 3-8, which includes the critically damped case, as discussed
next. Most chemical processes exhibit overdamped behavior.
The transition between overdamped and under damped is known as critically damped. We can
derive the following for the step response of a critically damped system
Equation 3.42
Notice that the main difference between overdamped (or critically damped) step responses and
first-order step responses is that the second-order step responses have an S shape with a
maximum slope at an inflection point, whereas the first-order responses have their maximum
slope initially.
The initial behavior for a step change is really dictated by the relative order of the system. The
relative order is the difference between the orders of the numerator and denominator polynomials
in the transfer function. If the relative order is 1, then output response has a nonzero slope at the
time of the step input; the step response of a system with a relative order greater than 1 has a
zero slope at the time of the step input.
For < 1, we find [from Equation (3.39)] that the poles are complex,
Equation 3.43a
where the real and imaginary contributions are
Equation 3.43b
Equation 3.44a
where
Equation 3.44b
Again, dividing Equation (3.44a) by ku, we can produce the dimensionless plot shown in Figure
3-9.
As the imaginary/real ratio gets larger, the response becomes more oscillatory ( becomes
smaller). We also notice that a decreasing ratio corresponds to a larger negative value for the real
portion. As the real portion becomes larger in magnitude (more negative), the response becomes
faster. We use these insights to interpret pole/zero plots in Section 3.9.
Consider now a second-order system with numerator dynamics with the gain/time constant form
Equation 3.45
which is relative order one. The reader should show that the pole-zero form is
where the parameters are
The gain/time constant form has the following time-domain response to a step input (see Exercise
4):
Equation 3.46
The reader should show that, if n = 2, the response is the same as a first-order process.
The unit step responses are shown in Figure 3-11. Notice that negative numerator time constants
(corresponding to positive zeros) yield a step response which initially decreases before increasing
to the final steady state. This type of response is known as inverse response and causes tough
challenges for process control systems. Positive zeros are often caused by two first-order transfer
functions, with gains of opposite sign, acting in parallel (see Exercise 5).
[ Team LiB ]
[ Team LiB ]
Consider a lead-lag transfer function where the numerator and denominator polynomials are first
order:
Equation 3.47
Equation 3.48
A dimensionless output can be defined by dividing Equation (3.48) by kpu, and t/p is a natural
dimensionless time. The responses to a step input at t = 0 are shown in Figure 3-12. Notice that
there is an immediate response that is equal to the n/p ratio. This can also be found by applying
the initial value theorem to Equation (3.47"/>) for a step input change (see Exercise 3).
It is rare for processes to exhibit lead-lag behavior, but many controllers exhibit such behavior.
[ Team LiB ]
[ Team LiB ]
Equation 3.49
The values of s that cause the numerator of Equation (3.49) to equal zero are known as the
"zeros" of the transfer function. The values of s that cause the denominator of Equation (3.49) to
equal zero are known as the "poles" of the transfer function.
Equation 3.50
and complex poles (or zeros) must occur in complex conjugate pairs.
The "gain-time constant" form is the one that we use most often for control system design.
Equation 3.51
where ni is a numerator time constant and pi is a denominator time constant. This form is
normally used when the roots (poles) of the denominator polynomial are real.
The zero is 1/10, and the poles are –1/3 and –1/15.
Notice that the zero for Example 3.7 is positive. A positive zero is called a right-half-plane (RHP)
zero, because it appears in the right half of the complex plane (with real and imaginary axes).
RHP zeros have a characteristic inverse response, as shown in Figure 3-11 for n = -10 (which
corresponds to a zero of +0.1).
Also notice that the poles are negative (left-half-plane), indicating a stable process. RHP (positive)
poles are unstable. Recall that complex poles will yield an oscillatory response. A pole-zero plot of
the transfer function in Example 3.7 is shown in Figure 3-13 [the pole locations are (-1/3,0) and
(-1/15,0) and the zero location is (1/10,0), with the coordinates (real,imaginary)]. For this
system, there is no imaginary component and the poles and zeros lie on the real axis.
Figure 3-13. Pole-zero location plot for Example 3.7 (x, poles; o, zero).
As poles move further to the left they yield a faster response, and increasing the magnitude of the
imaginary portion makes the response more oscillatory. This behavior is summarized in Figure 3-
14. Recall also that a process with a pole at the origin (and none in the RHP) is known as an
integrating system; that is, the system never settles to a steady state when a step input change
is made.
Multiple RHP zeros cause multiple "changes in direction"; for example, with two RHP zeros, the
step response, initially going in one direction, switches direction, then switches back to the initial
direction.
[ Team LiB ]
[ Team LiB ]
Consider a process with kp = 1, p = 10, and = 5. A unit step input change at t = 0 yields the
response shown in Figure 3-15. We see that the time-delay shifts the response of the output.
[ Team LiB ]
[ Team LiB ]
Most ordinary differential equation numerical integrators require pure differential equations (with
no time delays). If you have a system of differential equations that has time delays, the Padé
approximation can be used to convert them to delay-free differential equations, which can then be
numerically integrated.
One of the many advantages to using SIMULINK is that time delays are easily handled so that no
approximation is required.
[ Team LiB ]
[ Team LiB ]
Take the Laplace transform of each term, assuming zero initial conditions
Solving for x(s), then y(s) (it should be noted that often D = 0)
where G(s) is a transfer function matrix. For example, the transfer function relating input j and
output i is
and multiplying,
Also,
The transfer function poles (–2.2381 and –2.4048) are equal to the eigenvalues of the A matrix.
Also, the positive zero (1/0.3549) in g11(s) yields the inverse response shown in Figure 3-5.
We see that it is straightforward to convert state space models to transfer function models. An n-
state system results in transfer functions that have a denominator polynomial that is nth order in
s, that is, with n poles. Sometimes the resulting transfer functions can be factored into lower
order transfer functions because of pole-zero cancellation (a value of a pole is equal to a value of
a zero). An example of pole-zero cancellation is shown in Exercise 13.
[ Team LiB ]
[ Team LiB ]
Here we first present some useful MATLAB functions not covered in other modules.
(Convolution) and
Often it is necessary to multiply polynomials in s together. Although the following multiplication is
quite simple: (5s + 1)(3s + 1) = 15s2 + 8s + 1, a more complex multiplication, such as (2s2 +
1.5s + 1)(3s3 + 8s2 + 4s + 1) could be quite time consuming. The following conv (convolve)
command makes this straightforward. Also, the roots of the resulting polynomial are easily
calculated using the roots command.
First, define an object, such one of the transfer functions in Example 3.6.
Transfer function:
-10 s + 1
-----------------
45 s^2 + 18 s + 1
then plot the step response (use help step to view other options)
» step(sysc)
A number of other useful functions, such as pole and tzero are shown in Module 4.
Simulink
It is highly recommended that you interactively work through the initial sections of Module 2 to
understand how SIMULINK can be used to simulate dynamic systems.
[ Team LiB ]
[ Team LiB ]
3.14 Summary
The main objective of this chapter was to develop an understanding of dynamic process behavior.
Although Laplace transforms can be used to obtain analytical solutions to differential equations,
we will not be using them for this purpose during the rest of this textbook. The concept of a
transfer function is very useful for control system design and analysis. In future chapters we find
that transfer functions allow the use of algebra rather than differential equations when analyzing
control systems composed of a number of components (controller, valve, process, sensor, etc.).
The stability of a process is determined by the eigenvalues of the state space A matrix, or the
poles of the Laplace transfer function: if all are negative, the system is stable. Complex
eigenvalues (poles) correspond to underdamped (oscillatory) behavior, characterized by damping
factors less than 1. Dynamic responses are also affected by the values of the zeros (roots of the
numerator polynomial in s) of a transfer function. If zeros are positive (in the right-half-plane),
step responses have a characteristic inverse response.
A first-order + dead time model is the most common process representation. Time-delays are
represented by an irrational term (e–s) in the Laplace domain. First and second-order Padé
approximations are sometimes used for controller design; the approximations lead to right-half-
plane zeros and inverse response.
The initial and final value theorems of Laplace transforms can be used to find the limiting behavior
of transfer functions without having to obtain a full solution. The process gain is a measure of the
long-term change in a process output for a given input change.
State space models are easily converted to Laplace transfer function models. The use of LTI
objects (see Module 4) allows easy interconversion of models in MATLAB.
[ Team LiB ]
[ Team LiB ]
References
For more details on analytical mathematical methods (including Laplace transforms) to solve
differential equations, see: Boyce, W., and R. DiPrima, Ordinary Differential Equations and
Boundary Value Problems, 5th ed., Wiley, New York (1992).
[ Team LiB ]
[ Team LiB ]
Student Exercises
1: Solve for the time-domain output of a first-order transfer function to a step input
change.
2: A second-order process with one pole at the origin has the transfer function
Find the output as a function of time, for a unit step input change. Sketch the expected
behavior.
3: Use the initial value theorem to find the immediate response of a lead-lag transfer
function to a step input change at t = 0.
Also, use the final value theorem to find the long-term response of a lead-lag transfer
function to a step input change.
4: For the following second-order process with numerator dynamics, solve for the time-
domain output response to a step input change of magnitude u at t =0.
where
If the gain of g1 is positive and the gain of g2 is negative, find the conditions
(relationship between gains and time constants for the two transfer functions) that
cause a right-half-plane zero (resulting in inverse response to a step input change) in
gp(s).
Find the second-order differential equation in y. Hint: first solve for x 1 from the second
equation, then take the derivative and substitute into the first equation.
i. Find the output at t=0 and as t approaches infinity, using the initial and final
value theorems.
8: As a process engineer with the Complex Pole Corporation, you are assigned a unit with
an exothermic chemical reactor. In order to learn more about the dynamics of the
process, you decide to make a step change in the input variable, the coolant
temperature, from 10°C to 15°C. Assume that the reactor was initially at a steady
state. You obtain the following plot for the output variable, which is reactor
temperature (notice that the reactor temperature is in °F). Use Figure 3-9 to help
answer the following questions.
i. What is the value of the process gain? (show units)
9: Match the transfer functions with the responses to a unit step input, shown in the
figure.
i.
ii.
iii.
iv.
v.
10: Consider the following state space model:
ii. Find (analytically) the time-domain output response to a unit step input change.
Sketch the expected response to a unit step input change.
11: As a process engineer, you decide to develop a first-order + time delay model of a
process using a step test. The process is initially at steady state, with an input flow
rate of 5 gpm and an output of 0.75 mol/L. You make a step increase of 0.5 gpm at
3:00 p.m. and do not observe any changes until 3:07 p.m. At 3:20 p.m., the value of
the output is 0.8 mol/L. You become distracted and do not have a chance to look at
the output variable again, until you leave for happy hour at a local watering hole at
6:30 p.m. You note that the output has ceased to change and has achieved a new
steady-state value of 0.85 mol/L. What are the values of the process parameters, with
units? Show your work.
12: Use the initial and final value theorems of Laplace transforms to determine the initial
and final values of the process output for a unit step input change to the following
transfer functions.
i.
ii.
iii.
13: Consider the following state space model for a biochemical reactor. Since there are two
states (the A matrix is 2 x 2) we expect that the process transfer function will be
second-order. Show that pole-zero cancellation occurs, resulting in a first-order
transfer function. Find the values of the gain and time constant.
14: Match the transfer functions with the responses to a unit step input, shown in the
figure.
i.
ii.
iii.
iv.
v.
15: Consider Example 3.4. For an impulse input of 30 kJ, find the value of the vessel
temperature immediately after the impulse input is applied.
For a unit impulse input, find the output response as a function of time. What is the
peak change and when does it occur?
[ Team LiB ]
[ Team LiB ]
Develop continuous first-order and integrator + dead time models from step tests
4.1 Introduction
4.7 Summary
[ Team LiB ]
[ Team LiB ]
4.1 Introduction
For many processes there is not enough time, or it is not worth the effort, to develop fundamental
process models. Particularly if your main interest is tuning a specific control loop, it is likely that
you will develop a transfer function-based model by performing a plant test. The most common
plant test is to make a step change in the manipulated input (controller output) and observe the
measured process output response. Then a model is developed to provide the best match
between the model output and the observed plant output.
There are a number of important issues in developing an input-output model. Foremost is the
selection of the proper input and output variables. For many processes this is not trivial, because
a particular manipulated input may affect a number of measured outputs. Similarly, a measured
output may be affected by a number of manipulated inputs. In this chapter we assume that the
manipulated input and measured output have already been selected. The important discussion of
the selection of a particular input to be "paired" with a particular output is postponed until
Chapter 13.
It is common to base an input-output model on step responses. In this procedure we first bring
the process to a consistent and desirable steady-state operating point, then make a step change
in the input variable. An important decision is the magnitude of the step change to make.
If the step change in input is too small, the measured output may not change enough to
develop a reliable model. This is particularly true if the measured output is "noisy." Clearly,
the magnitude of step input must be enough so that the output "signal-to-noise" ratio is
high enough to obtain a good model.
If the step change in the input is too large, the output variable may change too much and
produce product that is "off-specification." This is not desirable because of the severe
economic penalty (i.e., the plant loses too much money while the step test is being
performed). Also, if the step input change is too large, nonlinear effects may dominate. That
is, the operating condition may become significantly different than the desired condition.
Clearly there is a trade-off here. The input must be changed enough to observe a change in the
output variable (it must increase above the noise level), yet not so much that the output variable
change is too great (causing an economic penalty).
As a process engineer conducting a plant step test, you will usually have some basic knowledge of
(or experience with) the input-output pair under consideration. Observations of the measured
output with time will provide an estimate of the standard deviation or variance of the
measurement noise. A rough estimate of the process gain will enable you to select an input
change magnitude so that the output change is "above the noise level." An estimate of the
process gain can often be obtained through steady-state material and energy balances.
In the following sections we show how to estimate parameters for some common simple models.
By far the most commonly used model, for control-system design purposes, is the first-order +
time-delay model discussed in the next section.
[ Team LiB ]
[ Team LiB ]
Equation 4.1
Equation 4.2
where the measured output is in deviation variable form. The three process parameters can be
estimated by performing a single step test on the process input.
The gain is found as simply the long-term change in process output divided by the change in
process input. Also the time delay is the amount of time, after the input change, before a
significant output response is observed. There are several easy ways to estimate the time
constant for this type of model.
Since the process gain is kp = y/u = 6°C/2 gpm = 3°C/gpm, and the time-delay is 8-1 = 7
min, the first-order + time-delay transfer function is estimated as
Two-Point Method for Estimating Time Constant
A technique similar to the first one, but using two points on the output response, is shown in
Figure 4-4. Here the time required for the process output to make 28.3% and 63.2% of the long-
term change is denoted by t28.3% and t63.2%, respectively. The time constant and time delay can
be estimated from (see Exercise 2)
[ Team LiB ]
[ Team LiB ]
Equation 4.3
Equation 4.4
with the response shown in Figure 4-5. The gain, k, can be found from the slope by solving
Integrator + dead-time models are good for describing the behavior of "integrating processes,"
such as vessel liquid levels or gas drum pressures. They can provide a good short-term
approximation to the step response behavior of a first-order + dead-time process. Consider the
step response of a distillation column, which has a fairly long time constant. We see from Figure
4-6 that it takes roughly 5–6 hours to obtain good estimates for a FODT model.
where the gain has units of mol%/(kmol/min) and the time unit is minutes.
The initial response of Figure 4-6 is "blown-up" in Figure 4-7. Notice that fewer than 20 minutes
(the step change is made at t = 10 minutes) is required to obtain a satisfactory integrator + time-
delay model. Clearly, plant operators (and managers) will be much more willing to tolerate a 20-
minute test than a 4- to 5-hour test.
[ Team LiB ]
[ Team LiB ]
In practice, manipulated input changes are made at discrete time intervals and measured outputs
are available at discrete sample times. The physical inputs and outputs are continuous; only the
changes and measurements occur at discrete times. Since the focus of this textbook is on
controller design based on continuous models, the topic of discrete models may be skipped on a
first reading. Discrete models are primarily useful for model predictive control (Chapter 16) and
digital control design and analysis (Module 16).
In this section we cover discrete autoregressive models, in Section 4.5 parameter estimation of
discrete autoregressive models is covered, and in Section 4.6 we cover finite step and impulse
response models. It should be noted that the M ATLAB Control Toolbox has routines that convert
continuous-time models to discrete and vice versa. The details of the conversion are beyond the
scope of this text, but are summarized in the appendix; read Module 4 for explanations on how to
use these routines.
Equation 4.5
where k represents the current time step, k - 1 the previous time step, and so forth. The notation
y(k) is used to indicate the value of the output at step k. If all of the outputs are brought to the
left hand side, Equation (4.5) can be written
Equation 4.6
This form is primarily used to lead to the notion of discrete input-output transfer functions
covered next.
Z-Transforms
Similar to the use of Laplace transforms for continuous systems, Z-transforms are used for
discrete systems.
Equation 4.7
Equation 4.8
so Z[y(k - 2)] = z-2y(z), and so forth. Taking the Z-transform of each term in Equation (4.6), we
find
Equation 4.9
Equation 4.10
Equation 4.11
The discrete transfer function is the discrete-time analogy to the continuous-time transfer
function based on the Laplace transform. Similar to continuous (Laplace) transfer functions,
discrete (z-transform) transfer functions can be written in several forms. Multiplying Equation
(4.11) by zn/zn, we find
Equation 4.12
For most process systems there is not an immediate effect of the input on the output, so b0 = 0.
The polynomial forms of Equations (4.11) and (4.12) can be factored into gain-pole-zero form
Equation 4.13
The pole is found by solving for the roots of the denominator polynomial. In this case
To illustrate the importance of pole values, we will study the following values for a1:
yielding the corresponding pole values
For simplicity, we will assume no input change, so u(k) = 0. Also, let the initial value of the output
be y(0) = 1. The first few values of y(k) for each value of a1 are shown in the table below.
As expected, when the magnitude of the pole is less than 1.0, the process is stable; when the
magnitude is greater than 1.0, the process is unstable. One thing that is unusual for this first-
order discrete example is that the output can oscillate even with a constant (in this case, 0) input
value. For continuous-time systems there must be at least two states (the process must be at
least second-order) for oscillation to occur. This is because the condition for oscillation in
continuous-time systems is that the eigenvalues must be complex; for this to happen, there must
be at least two eigenvalues, each complex-conjugates of the other. Discrete time systems can
oscillate, as long as a pole has a negative value; if the negative pole has a magnitude less than
one, it is a stable oscillation.
The formal statement of the final value theorem is (where t is the sample time)
For a discrete-time input-output model
we find
so we can find the long-term behavior of the process output, subject to a unit step input, simply
by setting z = 1 in gp(z).
[ Team LiB ]
[ Team LiB ]
The measured inputs and outputs are the independent variables, and the dependent variables are
the outputs. For simplicity, consider the following model where two previous values of the input
and output are used to predict the next value. This model has four parameters
Equation 4.14
Notice that k = 1 is an arbitrary starting point for calculating the output, and that two previous
data points for the output and the input are needed to start the algorithm. To make it clear that
we are performing a model-based prediction of yk, we will use the notation k to indicate a model
prediction
Equation 4.15
Equation 4.16
where
Equation 4.17
The objective is to choose a set of parameters (a1, a2, b1, b2) to minimize the square of the
residuals (the differences between the model outputs and measured outputs).
Equation 4.18
The sum of the squares of the residuals can be written in matrix notation as
Equation 4.19
Equation 4.20
k -1 0 1 2 3 4 5
y 0 -0.0889 0.0137 0.1564 0.4618 0.1771 0.3446
u 1.0000 1.0000 1.0000 -1.0000 1.0000 -1.0000 -1.0000
k 6 7 8 9 10 11 12
y 0.2171 -0.1558 0.0485 -0.1879 -0.1123 0.0463 0.2003
u 1.0000 -1.0000 1.0000 1.0000 1.0000 1.0000 -1.0000
k 13 14 15 16 17 18 19
y 0.5007 0.3846 -0.0172 0.1513 -0.1162 0.1134 0.0502
u -1.0000 1.0000 -1.0000 1.0000 -1.0000 -1.0000 -1.0000
The (input-output data) matrix, parameter vector, and discrete transfer functions are shown
below.
The M ATLAB and SIMULINK .m and .mdl files used to generate this example are shown in the
Appendix. It should be noted that the discrete transfer function can be converted to a continuous
transfer function using d2c to find
This is virtually identical to the continuous transfer function used to generate the original data.
This example illustrated the response of a perfectly modeled system (no measurement noise).
The approach can also be applied to a system with arbitrary inputs, and with noisy
measurements. See Exercise 8 for the same process, with output data corrupted by measurement
noise. To verify model parameter estimates it is common to use a portion of experimental data to
estimate parameters, then another portion of the data in "simulation" mode to see how well the
model predicted outputs match the data.
The data was analyzed in a batchwise fashion, that is, all of the data were collected before the
parameter estimation was performed. For on-line (real-time) estimation and control, we would
prefer to re-estimate parameters each time we obtain a new data point. This can be done by
using a "moving horizon" of past data points (each time a new data point is collected, the oldest
one is thrown out), or by using recursive identification techniques. Recursive techniques are
commonly applied in adaptive control, where the model is updated at each time step and a control
calculation is performed based on the updated model.
[ Team LiB ]
[ Team LiB ]
where the model length n is long enough so that the coefficient values are relatively constant
(i.e., the process is close to a new steady state).
Impulse Response Models
Another common form of model is known as a finite impulse response (FIR). Here, a unit pulse is
applied to the manipulated input, and the model coefficients are simply the values of the outputs
at each time step after the pulse input is applied. As shown in Figure 4-10, hi represents the ith
impulse response coefficient.
Figure 4-11 illustrates how impulse response coefficients can be obtained from step responses.
The impulse response coefficients are simply the changes in the step response coefficient at each
time step. Similarly, step response coefficients can be found from impulse responses; a step
response coefficient is the sum of the impulse response coefficients to that point.
4.7 Summary
The first sections of this chapter illustrated the development of first-order + time-delay and
integrator + time-delay models based on step input changes. These models will be sufficient for
many simplified controller designs. Higher order models can easily be developed by "fitting"
(adjusting) parameters to obtain a best match between model predictions and the actual
measured process output responses.
Linear regression (least squares) techniques can be used to estimate parameters in discrete time
autoregressive models. Usually, parameters are estimated based on a subset of the available
experimental data. The model parameters are then verified by applying the model to a different
subset of the data. If the model predictions match the measured outputs reasonably well, then
the discrete model is usually acceptable for discrete control system design and analysis.
The stability of a discrete transfer function model is determined from the values of the poles of
the denominator polynomial. If the poles are less than 1 in magnitude, the discrete model is
stable. Module 16 covers classical discrete controller design procedures. Discrete step and impulse
response models are often used in model predictive control (Chapter 16).
[ Team LiB ]
[ Team LiB ]
References
[ Team LiB ]
[ Team LiB ]
Student Exercises
Show that the maximum rate-of-change (slope) of the output occurs at t = . Also, find this slope.
2: Consider the response of a first-order + time-delay transfer function to a step input change. Find the
value of the output (y ) at the following times, as a fraction of the long-term output change
Find the time constant and time-delay based on the values of t 1 and t 2 .
3: Consider the following step response. Estimate parameters for a first-order + time-delay model using
the three techniques shown in Section 4.3 . Include the units for each parameter.
4: Consider the following step response. Estimate the parameters for an integrator + time-delay model,
including the units for each parameter.
b. For a sample time of 0.25, find the discrete state space and transfer function models (use M
; see Module 4 ).
c. Compare the step responses of the continuous and discrete models (use MATLAB ). What do you
observe?
using z -transforms, find the corresponding model represented as equations (4.11 ), (4.12 ) and (4.13
). Discuss the stability of the process.
7: Consider a unit step input change made at k = 0, resulting in the output response shown in the plot
and table below.
k -1 0 1 2 3 4 5 6 7 8 9 10
y 0 0 0.1044 0.3403 0.6105 0.8494 1.0234 1.1244 1.1616 1.1531 1.1184 1.0746
u 0 1 1 1 1 1 1 1 1 1 1 1
k 11 12 13 14 15 16 17 18 19 20
y 1.0336 1.0023 0.9828 0.9744 0.9742 0.9790 0.9860 0.9929 0.9985 1.0022
u 1 1 1 1 1 1 1 1 1 1
Estimate the parameters for a discrete linear model with the form
Compare the step response of the estimated model with the data. Use MATLAB to convert the discrete
model to a continuous model. Compare the step responses of the discrete and continuous models.
8: Consider Example 4.4 with measurement noise on the output variable, as shown below. Estimate the
discrete model parameters based on this data. How do the parameters compare with those of Example
4.4 ? Compare the step responses of the two models.
k -1 0 1 2 3 4 5
y 0.0741 -0.0857 -0.0399 0.1663 0.4065 0.1521 0.3910
u 1.0000 1.0000 1.0000 -1.0000 1.0000 -1.0000 -1.0000
k 6 7 8 9 10 11 12
y 0.2284 -0.2569 0.0910 -0.1737 -0.1260 0.0668 0.1958
u 1.0000 -1.0000 1.0000 1.0000 1.0000 1.0000 -1.0000
k 13 14 15 16 17 18 19
y 0.4976 0.3724 0.0119 0.0927 -0.0528 0.1357 0.0580
u -1.0000 1.0000 -1.0000 1.0000 -1.0000 -1.0000 -1.0000
9: Consider the continuous state space model (where the time unit is minutes)
a. Find the eigenvalues and the transfer function (use MATLAB for these calculations, if desired)
b. Using a sample time of 3 minutes, find the discrete state space model and the discrete transfer
function. Refer to the Appendix for the form of the discrete state space model, and Module 4
understand how to use M ATLAB for these computations.
[ Team LiB ]
[ Team LiB ]
[ Team LiB ]
[ Team LiB ]
Appendix 4.2
Discrete time models can be obtained directly from continuous time models, as summarized in
this appendix. The MATLAB Control Toolbox can be used for these conversions, as shown in Module
4.
Consider a continuous state space model of the following form (where we have assumed D = 0)
Equation A4.1
Equation A4.2
Assuming that the sample time is t, and that the input u is held constant between time tk and
tk+1, (A4.1) can be integrated to yield
which has the solution (although the matrix exponential is not an intuitive concept, the
computation is readily performed by MATLAB)
where
The stability of this discrete state space model is determined by the eigenvalues of , which must
have a magnitude less that 1.0 for stability.
The discrete transfer function is, similar to the continuous time case
[ Team LiB ]