Tải bản đầy đủ (.pdf) (60 trang)

Essentials of Process Control phần 10 ppt

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (4.19 MB, 60 trang )

cttAt?‘EK

IS:
Stability Analysis of Sampled-Data Systems
525
hods.
.s
the
value
-
gain
1 for
ristic
From
i
#r

z
in
5.35)
1
:
Fig.
L
)
On the
CR
contour,
z
=
Re’”


where R
+

00
and
8
goes from
7r
through 0 to
7~.
Substituting into Eq. ( 15.32) gives
~GWzP(z)

=
&K,>(l

-

b)
Rei8

-
b
(15.36)
As

R

-+


m,
f-G@(,)
-+ 0. Therefore, the infinite circle in the z plane maps into the
origin in the
ffG,+,(,)D(,)
plane.
The Ci, contour is just the reverse of the C,,,
contour, going from the origin out
along the negative real axis. The C- contour is just the reflection of the
C+
contour over
the real axis. So, just as in a continuous system, we only have to plot the C+ contour. If
it goes around the (-
1,O)
point, this sampled-data system is closedloop unstable since
P = 0.
The farther the curve is from the (-
1,O)
point, the more stable the system. We
can use exactly the same frequency-domain specifications we used for continuous sys-
tems: phase margin, gain margin, and maximum closedloop log modulus. The last is ob-
tained by plotting the function
HGM(iw,Dcio,l(
1 +
HG
M(iu)D(io)).
For this process (with
70
=
K,

= 1) with a proportional sampled-data controller and a sampling period of 0.5
minutes, the controller gain that gives a phase margin of 45” is K, = 3.43. The controller
gain that gives a +2-dB maximum closedloop log modulus is
Kc
= 2.28. The ultimate
gain is K, = 4.08. n
EX A M PL E 15.6.
If a
deadtime
of one sampling period is added to the process considered
in the previous example,
~Gd4z)

=
K&(1

-

b)
z(z

-

b)
(15.37)
We substitute
eiwTs
for z in Eq. (15.37) and let
o
go from 0 to

0,/2.
At
o
= 0, where
z
= + 1, the Nyquist plot starts at
KcKp
on the positive real axis. At
o
=
0,/2,
where
z =
-

1,
the curve ends at
HGM(iw)D(iw)

=
K&(1

-

b)

=

Kc&,(1


-

b)
-1(-l

-
b) l+b
(15.38)
This is on the positive real axis. Figure
15.6~
shows the complete curve in the
HGM~D
plane. At some frequency the curve crosses the negative real axis. This occurs when the
real part of HG
~(i~&,)
is equal to -0.394 for the numerical case considered in the
previous example. Thus the ultimate gain is
i
K, = l/O.394 = 2.54
Note that this is smaller than the ultimate gain for the process with no deadtime. The
controller gain that gives a +2-dB maximum closedloop log modulus is
Kc
= 1.36.
The final phase angle (at
0,/2)
for the first-order lag process with no deadtime was
-
180”. For the process with a deadtime of one sampling period, it was
-360’.
If we

had a deadtime that was equal to two sampling periods, the final phase angle would be
-540”. Every multiple of the sampling period subtracts 180” from the final phase angle.
Remember that in a continuous system, the presence of deadtime made the phase
angle go to
co
as
u
went to
~0.
So the effect of deadtime on the Nyquist plots of sampled-
data systems is different than its effect in continuous systems.
n
EXAMPLE 15.7. As our last example, let’s consider the second-order two-heated-tank
process studied in Example 15.4.
GMts)
=
-
2.315
(s
+
l)(5s
+ I)
E
526
PAW
FIVE: Sampled-Data Systems
i
Using a zero-order hold, a proportional sampled-data controller, and a sampling period
of
T,

= 0.5 minutes gives
h~Guz,
=
O.O479K,(z
+ 0.8133)
(z
-
0.607)(z
- 0.905)
We substitute
eiwrs
for
z
and let
o
vary from 0 to
wJ2.
(15.39)
2T.r

271.

-

4=
us
=
-
=
-


-
T,f
0.5
At
o
= 0, the Nyquist plot starts at
2.315&.
This is the same starting point that the
continuous system would have. At
o
=
0,/2
=
27r,
where z =
-
1, the Nyquist plot
ends on the negative real axis at
0.0479&(-
1 + 0.8133)
(- 1
-

0.607)(-
1
-
0.905)
=
-o

0029K
.

The entire curve is given in Fig. 15.M. It crosses the negative real axis at
-0.087&.
So
the ultimate gain is
K,
=
l/O.087 = 11.6, which is the same result we obtained from
the root locus analysis.
The controller gain that gives a phase margin of 45“ is
KC
= 2.88. The controller
gain that gives a +2-dB maximum closedloop log modulus is K, = 2.68.
n
15.2.3 Approximate Method
To generate the HG
M+)
Nyquist plots discussed above, the
z
transform of the appro-
priate transfer functions must first be obtained. Then
e
jwTs
is substituted for
z,
and
o
is varied from 0 to

0,/2.
There is an alternative method that is often more convenient
to use, particularly in high-order systems. Equation (15.40) gives a doubly infinite
series representation of HG~ci~j.
1
+m
ffGM(iu)
=
T
>:
H(iw+inw,)G~(iw+ino,)
(15.40)
S
n=-CC
where
Ht,,
and
GM($)
are the transfer functions of the original continuous elements
before
z
transforming.
If the series in Eq. (15.40) converges in a reasonable number of terms, we can
approximate
H
GMtiw)
with a few terms in the series. Usually two or three are all that
are required.
1
+m

ffGM(ico)
=
7
>:
H(iw

+inw,)Gn/r(iw

+irwy)
(15.41)
S
n=-cc
1
ffG~~(iw)

2:

Ti’H(iw)GM(iw)
+
H(icx+-iwr)G~(iw+iwJ)
+
H(iw-iwS)GM(iw-iw,)
S
+

H(i,+i2w,,)G~(iw+i2ws)
+
H(iw-i2u,)G~(iw-i20,)1
(15.42)
This series approximation can be easily generated on a digital computer.

The big advantage of this method is that the analytical step of taking the
z
trans-
formation is eliminated. You just deal with the original continuous transfer functions.
For complex, high-order systems, this ca;r elintinate a lot of messy algebra.
iod
3%
the
jlot
so
om
Her
m
ro-
lo
znt
lite
w
nts
:an
hat
$1)
42)
ns-
ns.
C’~IAWI~K

IS,
Stability Analysis of Sampled-Data
Sysrems

327
15.2.4 Use of MATLAB
The frequency response of sampled-data systems can be easily calculated using
MATLAB software. Table 15.2 gives a program that generates a Nyquist plot for
the first-order process with a deadtime of one sampling period.
After parameter values are specified (K, = 3,
T,
= 0.2,
r0
= 1, and
K,
=
i), the frequency range is specified from
o
= 0.01 to
o
= wJ2. The vector of
complex variables
z
for each frequency is calculated. Then the complex function
HGM(iW&,) is calculated in two steps:
hgmd=
kc*kp*(l

-b)./(z-6);
hgmd = hgmd
.I

z;
Term-by-term division is specified by the use of the

“I”
operator.
TABLE 15.2
MATLAB program for discrete frequency response
70
Program
“dfreq.m”
generates Nyquist plot
70
for jirst-order process with
deadtime
= sampling period
%
using a sampled-data P controller and zero-order hold
% GM(s) =
Kp*exp(
-Ts*s)/(tauo*s+l)
%
950
Give parameter values
kc=3;
ts=0.2;
tauo=l;
kp=l;
b=exp(-ts/tauo);
%
Calculate sampling frequency
ws=2*pi/ts;
940
Specify frequency range from 0.01 up to

ws/2
w=[0.01:0.01:ws/2];
% Calculate vector of
2
values
i=sqrt(-1);
z=exp(i*w*ts);
70
%
Calculate value of
HGM(iw)*D(iw)
at each frequency
70
hgmd=kc*kp*(
1
-b)

./
(z-b);
hgmd=hgmd
./

z;
%
elf
plot(hgmd)
grid
title(
‘Polar Plot for
HGM(iw)*D(iw)‘)

axis( ‘square
‘)
clxis([-I 3.5 -2.5
21);
xlabel(
‘Real
HGM*D’)
yiabel(

‘[mag

HGM*D

‘)
/
.
i
t
text(O.S. -0.5,
‘Ts=O.Z.

Kc=3’)
pause
528
PART FIVE: Sampled-Data Systems
15.3
PHYSICAL REALIZABILITY
In a digital computer control system the feedback controller
DtZ)
has a pulse transfer

function. What we need is an equation or algorithm that can be programmed into
the digital computer. At the sampling time for a given loop, the computer looks at
the current process output
yu),
compares it with a setpoint, and calculates a current
value of the error
e(,).
This error plus some old values of the error and old values
of the controller output or manipulated variable that have been stored in computer
memory are then used to calculate a new value of the controller output
m(,).
These algorithms are basically difference equations that relate the current value
of
m
to the current value of
e
and old values of
m
and e. These difference equations
can be derived from the pulse transfer function
&I.
Suppose the current moment in time is the nth sampling period
t
=
nT,.
The
current value of the error
et,)
is
e(,Ts).

We will call this e,. The value of
et,)
at the
previous sampling time was e,-1. Other old values of error are en-z,
en-j,
etc. The
value of the-controller output
m(,)
that is computed at the current instant in time
t
=
nT,
is
rn(,~~)
or m,. Old values are m,-1,
mn-2,
etc. Suppose we have the following
difference equation:
mn
=
hoe,
+
blend1
+
b2en-2
+
**

*
+

bMen-M
-
aim,-]
-

u2mn-2

-

u3mn-3

-



-

-

ahIm,-N
(15.43)
m(nTs)
=
boe(nl;)
+
ble(nTs-T,)

f
he(nT,-2T,) +
*


*

*
+
b,we(nTS ,w,)
-
vqnTS-T3)
-

a2m(nTs-2Ts)

-

a3m(c-3TS)

-
. . .
-

aNm(,TS-NT3)
(15.44)
Limiting
t
to some multiple of T,,
mw
=
he(t)

+


hqt-Ts)

+

b2+2T,)

+
. . .
+

h@-,t4Ts)
(15.45)
-

alm(f-T,)

-

a2m(j-2Ts)

-

a3m(t-3T,)

-

'.
.
-


aNfl(f-NTJ
If each of these time functions is impulse sampled and
z
transformed, Eq. (15.45)
becomes
Mcz)
=
boEc,)
+
blz-‘EcZ,
+
b2z-2EtZj
+
b3z-3Et,j
+ . . .
-
q-7
-‘hf(,)
-

u2z-2k!(z)

-
.


-

-


uNzmNhrl(,)
(15.46)
Putting this in terms of a pulse transfer function gives
M,,,
_ b. + b,z-’ +
b2z-2
+
*.a
+ bMz+
D(,)

=

-

-
4,)
1
+
alz-’
+
a2ze2

+

*.
. +
aNzeN
(15.47)

A sampled-data controller is a ratio of polynomials in either positive or negative
powers of z. It can be directly converted into a difference equation for programming
into the computer.
Continuous transfer functions are physically realizable if the order of the poly-
nomial in
s
of the numerator is less than or equal to the order of the polynomial in
s
of the denominator.
(*IIAP~EK

IS:
Stability Analysis of Sampled-Data Systems
529
sfer
into
s at
rent
iues
uter
ilue
.ons
The
the
The
t=
Gng
.43)
,45)
.45)

.46)
.47)
tive
ling
Ay-
in
s
The physical realizability of pulsed transfer functions uses the basic criterion
that the current output of a device (digital computer) cannot depend upon future
information about the input. We cannot build a gadget that can predict the future.
If
DtZJ
is expressed as a polynomial in negative powers of
Z,
as in Eq.
(15.47),
the requirement for physical realizability is that there must be a “1” term in the
denominator. If
DtZ)
is expressed as a polynomial in positive powers of
z,
as shown
in Eq. (15.48) below, the requirement for physical realizability is that the order of the
numerator polynomial in
z
must be,less than or equal to the order of the denominator
polynomial in
z.
These two ways of expressing physical realizability are completely
equivalent, but since the second is analogous to continuous transfer functions in

s,
it
is probably used more often.
M(z)
D($
=
-
=
bOzM

+

b,z”-’
+
b2zM-2
+
*.
. +
bM
E(z)
ZN

-k
alZN-’ +
a2zNp2

+“’
+
aN
(15.48)

Multiplying numerator and denominator by
zeN
and converting to difference equa-
tion form give the current value of the output m,:
ml
=
b@,+M-N
+
b,e,+,+N-1
+ ‘. . +
bMen-N
-

am-1
-

a2mn-2

-



-

aNmn-N
(15.49)
If the order of the numerator
M
is greater than the order of the denominator N in,
Eq.

(15.48),
the calculation of m, requires future values of error. For example, if
M

-
N = 1, Eq. (15.49) tells us that we need to know e,+l or
e(,+~~)
to calculate m,
or
m(,).
Since we do not know at time
t
what the error
e(,+TX)
will be one sampling
period in the future, this calculation is physically impossible.
15.4
MINIMAL-PROTOTYPE DESIGN
One of the most interesting and unique approaches to the design of sampled-data
controllers is called minimal-prototype design. It is one of the earliest examples of
model-based or direct-synthesis controllers.
The basic idea is to specify the desired response of the system to a particular
type of disturbance and then, knowing the model of the process, back-calculate the
controller required. There is no guarantee that the minimal-prototype controller is
physically realizable for the given process and the specified response. Therefore,
the specified response may have to be modified to make the controller realizable.
Let us consider the closedloop response of an arbitrary system with a sampled-
data controller.
Y(z)
=

D(~,HGM(~,


G&z)
1
+
D(z,HGM(z)
Yg;
+
1
+
&,HGM(,,
If we consider for the moment only changes in setpoint,
(15.50)
&.I=
D(,)HGM(z)
Yg
l
+
&$GM(z)
(15.51)
530
I+~T

PINE:
Sampled-Data Systems
If we specify the form of the input
YF$
and the desired form of the output
Ytzj,

and
if the process and hold transfer functions are known, we can rearrange Eq.
(I
5.5 I)
to give the required controller designed for setpoint changes
QT(~
(15.52)
j
If all of the terms on the right side of this equation have been specified, the controller
can be calculated.
EXAMPLE
15.9.
The first-order lag process with a zero-order hold has a pulse transfer
function
HGnr(,,

=
K,(l
-

b)
z-b
(15.53)
where

b

E

eeTsJ7~~.

Suppose we want to derive a minimal-prototype controller for step
changes in setpoint.
(15.54)
We know that it is impossible to have the output of the process respond instanta-
neously to the change in setpoint. Therefore, the best possible response that we could
expect from the process would be to drive the output
YCZ,
up the setpoint in one sampling
period. This is sketched in Fig.
15.7~.
Remember, we are specifying only the values of
the variables at the sampling times.
The output at t = 0 is zero. At t = T,, the output should be 1 and should stay
at’1
for all subsequent sampling times. Therefore, the desired
YtEJ
is
y(z)

=
y(0) +
y(T$-’
+
y(2Ts)z-2
+
y(3Ts,z-3
+ .

=


0
+
z-1
+
z-2
+ z-3 + . .
*
(15.55)
i
Z
-I
Y(z)
=
1
1-z-l

=-
z-l
Plugging these specified functions for
YQ)
and
Y$
into Eq. (15.52) gives
1
(15.56)
h(z)
=
Y
(2)
z-l

=
HGm,tY;Z”;

-

Y(z))
(fGqz,)
5

-

!-
z-1
(15.57)
D
1
‘(,-)
=
HGM(<)(z

-
1)
Now, for this first-order process, Eq. (15.53) gives HG
MCZJ.
Plugging this into Eq. (15.57)
gives the minimal-prototype controller.
D
1
1
s(z)

=
HGMc,,(z

-
1) =
K,>(

1

-

b)
z-b
K,,(

I

-
b)(z
-

1)
(15.58)
This sampled-data controller is physically realizable since the order of the polynomial
in the numerator is equal to the order of the polynomial in the denominaror. Therefore,
the desired setpoint
response
is achievable for this process.
CHAPTER
IS:

Stability Analysis of Sampled-Data Systems
531
:r
:r
l-
d
g
bf
1
I
I
l Yli l l l l .
2
h
Only can specify values of
y(,)
2
at sampling times
Discontinuity in slope at t =
TfT
(b)
*t
2T, 3T,

4T,

5T,

6T,
1

T,

2T,

3T,

4T,

5T,

6T,

IT,

8T,

9T,
(4
_
/
I I I
*t
T,

2T,

3T,

4T,
.

FIGURE 15.7
Minimal-prototype responses. (a) Desired response to unit step change in
setpoint. (b) Response of first-order process. (c) Response of second-order
system when driven to setpoint in one sampling period. (d) Modified response
of second-order system to take two sampling periods to reach setpoint without
rippling.
532 PART FIVE: Sampled-Data Systems
Before we leave this example, let’s look at the closedloop characteristic equation of
the system.
1
+
DScZ)HGM(z)
= 0
If we substitute Eqs. (I 5.58) and (15.53), we get
I+
Z-h
K,U-6)

=.
&,(I
-b)(z-
1) z-b
I+

I
-=o

j

z=o

z-l
Thus, the closedloop root is located at the origin. This corresponds to a critically damped
closedloop system
([
= 1). The specified response in the output was for no overshoot,
so this damping coefficient is to be expected. n
EXAMPLE 15.10. If we have a first-order lag process with a deadtime equal to one sam-
pling period, the process transfer function becomes
HGMI(~) =
Kp(l

-

b)
z(z

-

b)
(15.59)
Suppose we specified the same kind of response for a step change in setpoint as in Ex-
ample 15.9: the output is driven to the setpoint in one sampling period. Substituting our
new process transfer function into Eq. (15.58) gives
D
1
1
S(z)
=
HGM,,,(z


-
1)
=
K,(l

-
6)
z(z
-

b)
=
K,(l

-
b)(z
-
1)
(15.60)
z(z

-

6)
(z

-
1)
This controller is
WC

physically realizable because the order of the numerator is higher
(second) than the order of the denominator (first). Therefore, we cannot achieve the re-
sponse specified. This result should really be no surprise. The deadtime does not let the
output even begin to change during the first sampling period, and we cannot drive the
output up to its setpoint instantaneously at t =
TX.
Let us back off on the specified output and allow two sampling periods to drive the
output to the setpoint.
Y(z)

=

Y(0)
+ Y(T,)z-’ + y(*T,)z-* + y(J&)z-3 + . . .
=
o+(o)~-‘+~-*+z-3+
Y(z) =
Z-*
1
1
-
z-’ =
z(z

-
1)
Now the minimal-prototype controller for step changes in setpoint is
1
D
Y

S(z)
=
(z)
HG,w(~,(Y;',~:

-

Yc,I)
=
PW

-

b)
z(z

-

1)
I[
z
1
___

-
Z-1
z(z

-


1)
(15.61)
(15.62)
-
I
(15.63)
z(z

-

6)
=
K,(l

-6)(22-i)
~mwrts
IS:
Stability Analysis of
Satnpled~Data
Systems
533
led
06
n
m-
i9)
1X-
ur
10)
ler

*e-
he
he
he
1)
2)
3)
Using long division to see the values of
VZ(,T,~)
gives
The controller is physically realizable since
N
= 2 and
M
= 2. Note that there are two
poles, one at
z
= +
1
and the other at z =
-
I, and there are two zeros (at
z
= 0 and
z = b).
n
A first-order process can be driven to the setpoint in one sampling period and
held right on the setpoint even between sampling periods. This is possible be-
cause we can change the slope of a first-order process response curve, as shown in
Fig. 15.76.

If the process is second or higher order, we are not able to make a discontin-
uous change in the slope of the response curve. Consequently, we would expect a
second-order process to overshoot the setpoint if we forced it to reach the setpoint in
one sampling period. The output would oscillate between sampling periods, and the
manipulated variable would change at each sampling period. This is called rippling
and is illustrated in Fig.
15.7~.
Rippling is undesirable since we do not want to keep wiggling the control valve.
We may want to modify the specified output response to eliminate rippling. Allowing
two sampling periods for the process to come up to the setpoint gives us two switches
of the manipulated variable and should let us bring a second-order process up to the
setpoint without rippling. This is illustrated in Example 15.11. In general, an Nth-
order process must be given N sampling periods to come up to the setpoint if the
response is to be completely ripple free.
Since we know only the values of the output
ytn~,)
at the sampling times, we
cannot use
Yt,)
to see if there are ripples. We can see what the manipulated variable
rn(,~~)
is doing at each sampling period. If it is changing, rippling is occurring. SO
we choose
Ytz,
such that Mt,, does not ripple.
If the controller is designed for setpoint changes [Eq.
(15.52)],
D(z)

=

Y(z)
HGdY(Z)
set

-

Y(z)>
Y(z)
M(z)

=

HGMM(,)
Let’s check the first-order system from Example 15.9.
&Al

-

b)
1
HG
M(z)
=
z-b
and
Ytz)
=
-
z-l
1

M
Y(z)
Z-l
z-b
(‘)
=
HGM(Z,
=
K,(l

-

b)
=
I$(

1

-
b)(z
-

1)
z-b
1
M
-___
1
-I
1


-2,

It-‘+
(‘)
=
K,,(l-b)+K,Z

+Gz
KP
(15.64)
(15.65)
(15.66)
(15.67)
534

PART

FIVE
: Sampled-Data Systems
Thus, the manipulated variable holds constant after the first sampling period, indi-
cating no rippling.
E

X A
M
P

L,


E

t
s.
t

I
.
The second-order process considered in Example 15.4 has the follow-
ing openloop transfer function:
Using a zero-order hold gives an openloop transfer function
~GI(,)
=
K,ao(z

-
ZI>
(z

-

PINZ

-

P2)
(15.69)
We want to design a minimal-prototype controller for a unit step setpoint change. The
output is supposed to come up to the new setpoint in one sampling period. Substituting
Eq. (15.69) into Eq. (15.52) gives

1 1
D
S(z)
=
=
fG,&.

-

1)
K,aok

-

ZI)
cz
_

1>
(2

-

Pl>(Z

-

P2)
(15.70)
(z


-

Pl>(Z

-

P2)
=
K,,ao(z

-

ZI)(Z

-

1)
This controller is physically realizable. Therefore, minimal-prototype control should be
attainable. But what about intersample rippling? Let us check the manipulated variable.
1
yw
(z-pd(z-P2)


-

=
M(z)
=

HGM(,,
z-1
K,ao(z
-
zr
>
=
ao(z

-

l)(z

-
Zl>
(15.71)
(z

-

PINZ

-

P2)
.
Long division shows that the manipulated variable changes at each sampling period, SO
rippling occurs.
For a specific numerical case
(Kp

=
rol
= 1;
7,~
= 5;
T,
=
0.2)
the parameter
values are
p1
= 0.8187,
p2
= 0.9608, aa = 0.0037, and
ZI
= -0.923.
Mcz)
= 270
-4602-l
+
4272
-2
-
392~-~ + 364~-~
-

334z-’

+
. . .

(15.72)
This system exhibits rippling.
To prevent rippling, we.modify our desired output response to give the system two
sampling periods to come up to the setpoint. The value of
yCr)
at the first sampling period,
the yl shown in Fig. 15.711, is unspecified at this point. The output
YcZ)
is now
Y(z) =
VIZ
-I
+z-2+z-3+
=
y,

z-1
+ z-2(1 +
z-1
+ z-2 + z-3
-t
. .
.)
=
y,z-’
+
z-2&
Y(z)
=
Ylz+

.
1
-yt
z(z

-
I)
-
(15.73)
The setpoint disturbance is still a unit step:
CHAITER

14:
Stability Analysis of Sampled-Data Systems
535
di- .
JW-
59)
‘he
ing
70)
be
Je.
‘1)
so
ter
‘2)
kV0
Id,
The new controller is

y1z+
1

-

Yl
D(z)
=
Y(z)
z(z

-

1)
HGdY(,)
sel

-

Y(z))
=
K,ao(z

-

II>
y1z+
1

-Yi

(z

-

Pl>(Z

-

P2)
I[
z


1
z(z
-

1)
1
(15.74)
=

(z-pl)(z-P2)(YIz+

1

-Yd
Qo(Z
-
ZlMZ

-

l)(z
+
1

-
Yl>
The manipulated variable is
Y(z)
4)
=
HGrcr(l)
=
(z

-

Pl>(Z

-

p2xy1z
+ 1
-
yt)
Kpao(z
-

Zi)Z(Z


-
1)
(15.75)
Rippling occurs whenever the denominator of
M(,)
contains any terms other than z
or z
-
1. Therefore, the
z

-

zt
term must be eliminated by picking yt such that the term
z
-

zt
cancels out.
Then
Mcz)
becomes
M(z)
=
=
1
-y1
1

~
=
-z,
YI
+

y1
=
1

-
z,
Yl(Z

-

Pl>(Z

-

p2)
q?aoz(z
-
1)
Yl
&a0
+ (1
-

PI


-

P2)

z-I
+
z-2
+
z-3
+
z-4
+ . . .
&a0
Thus, there is no rippling.
15.5
CONCLUSION
(15.76)
(15.77)
n
The design of digital compensators was discussed in this chapter. The conventional
root locus, frequency response, and direct synthesis methods used in continuous
systems in the
s
plane can be directly extended to sampled-data systems in the
z
plane.
PROBLEMS
‘3)
15.1. Find the maximum value of K, for which a proportional sampled-data controller with

zero-order hold is closedloop stable for the three-CSTR process
1
c
‘M(s) =
(S

+81)3
Use sampling times of 0.1 and
I
minute.
536
15.2.
Repeat Problem
15.1
using a sampled-data
PI
controller.
Use r/ values of 0.5 and 2 minutes.
15.3.
Make Nyquist plots for the process of Problem 15.1 and find the value of gain that gives
the following specifications:
l Gain margin of 2
l Phase margin of 45”
l Maximum closedloop log modulus of +2
dB
15.4.
Make a root locus plot of the system in Problem 15.1 and find the value of gain that
gives a closedloop damping coefficient
5
equal to 0.3.

15.5.
A distillation column has an approximate transfer function between distillate compo-
sition xg and reflux flow rate R of
0.0092
Gw,)
=
(Ss
+
1)2
Distillate composition is measured by a chromatograph with a deadtime equal to the
sampling period. If a proportional sampled-data controller is used with a zero-order
hold, calculate the ultimate gain for
T,
= 2 and 10.
15.6.
Grandpa McCoy has decided to open up a new Liquid Lightning plant in the California
gold fields. He plans to stay in Kentucky, and he must direct operation of the plant using
the pony express. It takes two days for a message to be carried in either direction, and
a rider arrives each day.
The new Liquid Lightning reactor is a single, isothermal, constant-holdup CSTR
in which the concentration of ethanol, C, is controlled by manual changes in the feed
concentration, Co. Ethanol undergoes an irreversible first-order reaction at a specific
reaction rate
k
= 0.2Yday. The volume of the reactor is 100 barrels, and the throughput
is 25 barrels/day.
Grandpa will receive information from the plant every day telling him what the
concentration C was two days earlier. He will send back instructions on how to change
Co. What is the largest change Grandpa can make in Co as a percentage of C without
causing the concentration in the reactor to begin oscillating?

15.7.
A process has the following transfer function relating the controlled and manipulated
variables:
G
s + 1
M(s)
=
____
ss
1
(a) If a zero-order hold and a proportional digital controller are used with sampling
period
T,,,
determine the
openloop
pulse transfer function
HGM~;).
(6) Calculate the value of controller gain that puts the system right at the limit of
closedloop stability.
(c)
Calculate the controller gain that gives a closedloop damping coefficient of 0.3.
CIJA~~EK

IS:
Stability Analysis of Sampled-Data Systems
537
iat
IO-
he
ler

Iia
ng
nd
‘R
ed
fiC
1ut
he
LF
ut
‘g
of
15.8. A process controlled by a proportional digital controller with zero-order hold and sam-
pling period
T,
= 0.25 has the openloop pulse transfer function
HG
-z
+ 1.2212
M(z)
=
z

-
0.7788
If a unit step change is made in the setpoint, calculate the closedloop response of the
process at the sampling times if a controller gain of 0.722 is used.
15.9. Make a root locus plot for the process considered in Problem 15.7 in the
z
plane.

15.10. A first-order lag process with a zero-order hold is controlled by a proportional
sampled-data controller.
(a) What value of gain gives a critically damped closedloop system?
(b)
What is the gain margin when this value of gain is used?
(c)
What is the steady-state error for a unit step change in setpoint when this value
of gain is used?
15.11. A pressurized tank has the openloop transfer function between pressure in the first
tank and gas flow from the second tank
GM(~)
=
0.2386
s(O.7137.Y
+ 1)
If a zero-order hold and a proportional sampled-data controller are used and the sam-
pling time is 1 minute:
(n) Make a root locus plot in the
z
plane.
(b) Find the value of controller gain that gives a damping coefficient of 0.3.
(c)
Find the controller gain that gives 45” of phase margin.
(d) Find the gain that gives a maximum closedloop log modulus of +2 dB.
15.12. Repeat Problem 15.11 for a process with the
openloop
transfer function
-s+
1
GM(s)

= (s +
1)2
15.13. For the process considered in Problem 15.11, generate Nyquist and Bode plots by the
rigorous method and by the approximate method using several values of
n.
15.14. A process has the following openloop transfer function relating the controlled and
manipulated variables:
GMcs)
=
s
If a zero-order hold is used with sampling period T,, the
openloop
pulse transfer func-
tion is
HGM(,,
=
-z+2-b
z-b
Design a sampled-data minimal-prototype digital compensator for step changes in
setpoint that does not ripple.
538 PART
WE:
Sampled-Data Systems
I
15.15. A process has openloop load and manipulated variable transfer functions
GM(s)
The digital compensator that
changes is
C’-TrS
e

-2T,s
=-
s+

I
G,(s)
=
s+l
gives minimal-prototype setpoint response for step
Ds(:)
=
z(z

-

b)
(z2

-

l)(l

-

h)
Determine the closedloop response of the system when this controller is used and a
unit step change in the load input occurs.
15.16. An openloop-unstable, first-order process has the transfer function
G
KP

M(s) =
~
7,s
-
1
A discrete approximation of a PI controller is used.
(a) Sketch a root locus plot for this system. Show the effect of changing the reset
time
~1
from very large to very small values.
(b) Find the maximum value of controller gain
(Km,,)
for which the system is
closedloop stable as a general function of
r,,

q,
and
T,.
(c) Calculate the numerical value of
K,,,
for the case
rO
= K, = q = 1 and
T,
=
_
0.25.
15.17. Design a minimal-prototype sampled-data controller for the pressurized tank process
considered in Problem 15.11 that will bring the pressure up to the setpoint in one

sampling period for a unit step change in setpoint.
(a) Calculate how the manipulated variable changes with time to test for rippling.
(b)
Repeat for the case when the controller brings the pressure up to the setpoint in
two sampling periods without rippling.
15.18. Design a minimal-prototype sampled-data controller for a first-order system with a
deadtime that is three sampling periods. The input is a unit step change in setpoint.
15.19. Design minimal-prototype controllers for step changes in setpoint and load for a pro-
cess that is a pure integrator.
GM(s)
1
= G(s) =
;
For setpoint changes, the process should be brought up to the setpoint in one sampling
period. For load changes, the process should be driven back to its initial steady-state
value in two sampling periods. Calculate the controller outputs for both controllers to
check for rippling.
(IIAI~I

B.K

IS:
Stability Analysis
of
Sampled-Data Systems
539
15.20,

Dmign
a minimal-pl-vtvtyp~ aamplcd-data controller for a process with an opcnloop

process
rtmsf’er

f’uncrion

rhar
is
a
pure dca&ime.
GM(.r)

=

C’
PT,.v
where
k
is an integer. Design the controller for a unit step change in setpoint and the
best possible response in the controlled variable.
15.21.
A process has the following
openloop
transfer function relating the controlled variable
Y and the manipulated variable
M.
&J=
I
M(S,
(s
+

I)’
(a) If a proportional analog controller is used, derive the relationships that show how
the closedloop time constant FL and the closedloop damping coefficient
[CL
vary
with controller gain
K,
(b)
If a proportional digital controller is used with a zero-order hold and sampling
time
T,v:
(i) Derive the
openloop
pulse transfer function
HGMC,,
for any sampling period
and for a specific value of 0.5 minutes.
(ii) Make a root locus plot in the
z
plane.
(iii) Prove that the ultimate gain is 9.84.
15.22. The output of a process Y is affected by two inputs
iI41
and
M2
through two transfer
functions
G,
and
G2.

Y =
G,M,

+G2M2
where
1
G1
=
-
0.2
s+l
and
G2
=
___
5s + 1
Since the transfer function
G,
has a smaller time constant and larger gain, we want to
use
MI
to control Y.
(a) Using a digital proportional controller
D1
and zero-order hold with sampling
period
T,
= 0.5, find the value of controller gain K, that gives a closedloop
damping coefficient of 0.5.
However,, using manipulated variable Ml is more expensive than using

M2
because
M2
is cheaper. Therefore, we want to use a “valve position controller” (VPC), a simple
type of optimizing control, that will slowly change
M2
in such a way that only a small
amount of
MI
is used under steady-state conditions. This is accomplished by using a
second digital controller 02 that has as its “process variable” signal the output signal
from the
DI
controller
(MT)
and has as its setpoint signal A4rt, which is set at a small
value. The output of the 02 controller (M;) is sent to a zero-order hold whose output
is
M2.
(6) Draw a block diagram of this sampled-data VPC system.
(c)
What is the closedloop characteristic equation of the entire system with the
DI
controller tuned using the gain determined in part
(Al)?
(d)
Solve for the roots of the closedloop characteristic equation as functions of the
gain
K,
of the

112
controller.
540

fm7‘

I:fvti:
San~plcd-Data Systems
15.23. A process has an
opcnloop
transfer function relating the controlled variable Y and the
manipulated variable
M
that is a pure integrator with unity gain.
(u) Sketch root locus plots in the s plane for analog P and PI controllers.
(h) Derive the
openloop
pulse transfer function for the sampled-data system if a
zero-order hold is used with a sampling time
T,v.
(c)
Sketch the root locus plot in the
z
plane if a proportional sampled-data controller
is used. What value of controller gain gives a critically damped closedloop
SYS-
tern? What is the ultimate gain?
(d) Sketch the root locus plot in the
z
plane if the following sampled-data controller

is used.
Kc?-CV
D(r)

=

-

-
a!
z-l
?I
where
Q
=
___
71
+
Ts
7j
= reset time
K, = controller gain
(e) Derive the relationship between the ultimate gain and the parameters
T/
and
T.y.
(f) What is the maximum closedloop damping coefficient that can be achieved in this
system? Your result should be an equation that gives
&CL
as a function of

(Y.
For
the numerical values
T/
= 1 and
T,y
= 0.2, the maximum closedloop damping
coefficient should be 0.298.
15.24.
(a)
Make a frequency response Nyquist plot for the pure integrator process with a
proportional sampled-data controller.
(b)
Use the Nyquist stability criterion to find the ultimate gain.
(c)
What is the phase margin of the system if
Kc
=
l/T,7?
15.25. A pure integrating process with unity gain is controlled by a PI controller with reset
71
= 1 minute.
If the controller is analog, what value of controller gain gives a closedloop damp-
ing coefficient of 0.3?
Now suppose the controller is sampled-data and a zero-order hold is used.
where
cx
=
T,/(T,
+

Ts).
Sketch a root locus plot in the
z
plane.
What values of controller gain give a closedloop damping coefficient of 0.3, and
what is the ultimate gain if the sampling period
T,v
=
0.2?
Sketch Nyquist plots of G
MCiwjGCCrCO,
for the continuous system and of
HGM~;,,)D~;,)
for the sampled-data system.
15.26. A process has the following
openloop
transfer function relating controlled and manip-
ulated variables:
CIIAIIEK

IS:
Stability Analysis of Sampled-Data System;
541
the
Fa
ler
is-
ler
s-
tis

‘or
ng
.a
et
P-
td
3-
GM(,$)
=
;
=
2
s(lOs + 1)
where time is in minutes.
(a) If a sampled-data proportional controller is used with a zero-order hold and sam-
pling period
T,,
derive the
openloop
pulse transfer function of the process.
(b)
Using a sampling period of 0.5 minutes, show that the
openloop
pulse transfer
function is
ffG~(z) =
O.O2459(z
+ 0.9835)
(z
-


l)(z

-
0.9512)
(c)
Sketch a root locus plot.
(d) Calculate the ultimate gain and ultimate frequency of this sampled-data system.
15.27. Derive an analytical relationship that can be used to calculate the damping coefficient
of a sampled-data system from known values
x
and y of the real and imaginary parts
of the complex variable
z
for any location in the
z
plane. Check your result by showing
that the damping coefficient is 0.3 when z = -0.372
+
i0.
15.28. (a) Design a minimal-prototype controller for a pure integrator process with a
zero-
order hold and a sampled-data controller that, for step changes in setpoint, brings
the process output up to the setpoint in one sampling period.
(b)
If the process has an
openloop
transfer relating the output to the load input that
is also a pure integrator with unity gain, find the output of the closedloop system
for a step change in load when the controller derived in part (a) is used.

15.29. A process has the same transfer functions relating the controlled variable to the ma-
nipulated variable and to the load variable:
GM(~)
=
(k(s)
=
1
(T,lS
+
1)(7&r

+

1)
When a zero-order hold is used in a sampled-data system with
Ts
= 0.2,
~1
= 1, and
~2
= 5, the pulse transfer function is
ffG~(,,

=
O.O037(z
+ 0.923)
(z
-
0.8187)(z
-

0.9608)
Design a minimal-prototype sampled-data controller for a step change in load that
will not give rippling.
15.30. A process has the following transfer functions relating load disturbance
L
and manip-
ulated input M to the controlled variable Y.
Y
KM
GMcs)
=
-
=
~
Y
KL
M
7,s
+
1
GLcs)
=
-
=
~
L
7,&s+

1
Design a minimal-prototype controller for a unit step change in load such that the max-

imum change in the manipulated variable
M
cannot exceed some specified maximum
value
M,,,
.
M
rnax
= RKJKM
542!
PART FIVI::
Samphi-Data

$‘stcms
K
is a number greater than unity but less than I +
17,
where
h
=
c~7~~‘T~1
for sampling
period
T,.
15.31. The openloop transfer function of a process is
(a)
(b)
Cc)
(4
(e>

GM(~) =
K

e-T.y~v
I’
s
If an analog proportional controller is used, calculate the ultimate gain and ulti-
mate frequency.
If a digital proportional controller and zero-order hold are used, derive
HGM(,).
Sketch a root locus plot in the
z
plane and find the ultimate gain and ultimate
frequency.
Design a minimal-prototype digital compensator for step changes in setpoint.
Sketch the time-domain curves for the output and the manipulated variable.
If a digital compensator is used on this process that has the form
4)
=
Kc(z

-

ZI>
(2

-

PI)
where

zi
= 1 and
pl
= 0, sketch a root locus plot in the z plane and calculate
the ultimate gain and ultimate frequency.
15.32. The process considered in Problem 11.45 is now controlled by a digital controller.
(a) Using a zero-order hold in the sampled-data system with sampling period
T,
(where D =
TX),
derive the pulse transfer function of the system.
(b)
For a sampling period
r,
= 1 and the numerical values of parameters given in
Problem 11.46, calculate the ultimate gain and frequency if a proportional digital
compensator is used.
(c)
Calculate the value of the gain of a proportional digital compensator that gives a
closedloop damping coefficient of 0.3.
(d) Sketch a Nyquist plot of the sampled-data system.
(e) Design a minimal-prototype digital compensator for a step change in setpoint.
(f) Sketch time-domain plots of the controlled and manipulated variables.
15.33. The openloop transfer function
GMtsJ
of a process relating the controlled variable
Y(,)
and the manipulated variable
MC,,
is a gain K, (with units of mA/mA when transmitter

and valve gains are included) and a first-order lag with time constant
TV.
A sampled-
data PI feedback controller
DC:)
is used with a sampling period
T.y.
4)

=
&(z
-

a)
cy(z

-

1)
where K, = controller gain
a =
T,/(T,
+ T,)
71
= reset time
(a) What is the closedloop characteristic equation?
(h) If
T,
= 0.5 minutes and
T/

=
I
minute, sketch a root locus plot.
(c)
Calculate the ultimate gain in terms of
a,
K,, T,, and
T,,.
Calculate a numerical
value for K,, if
K,,
= T(, =
I.
(d) Calculate the value of controller gain that gives a closedloop damping coefficient
of 0.3.
(e) Sketch a Nyquist plot
of
HGMciw)D(,w).
FART SIX
Process Identification
CHAPTER
16
Process Identification
Th
d
e
ynamic relationships discussed thus far in this book have been determined
from mathematical models of the process. Equations based on fundamental physical
and chemical laws were developed to describe the time-dependent behavior of the

system. We assumed that the values of all parameters, such as holdups, reaction
rates, and heat transfer coefficients, were known. Thus, the dynamic behavior was
predicted on essentially a theoretical basis.
For a process already in operation, there is an alternative approach based on ex-
perimental dynamic data obtained from plant tests. The experimental approach is
sometimes used when the process is thought to be too complex to model from first
principles. More often, however, we use it to find the values of some model param-
eters that are unknown. Although many of the parameters can be calculated from
steady-state plant data, some must be found from dynamic tests (e.g., holdups in
nonreactive systems). Additionally, we employ dynamic plant experiments to con-
firm the predictions of a theoretical mathematical model. Verification is a critical
step in a model’s development and application.
In performing plant tests it is important to consider how much the process can
be upset and how long testing can last. In devising tests we need to consider all of
the disturbances and upsets that can potentially occur during the course of the test.
Experimental identification of process dynamics has been an active area of re-
search for many years by workers in several areas of engineering. The literature is
extensive, and entire books have been devoted to the subject. The theoretical aspects
are covered in System Identification, by L. Ljung (1987, Prentice-Hall, Englewood
Cliffs, NJ.) A user-friendly discussion of some of the practical aspects of identifi-
cation is provided by R. C. McFarlane and D. E. Rivera in “Identification of Dis-
tillation Systems,” Chapter 7 in Practical Distillation Control (1992, Van Nostrand
Reinhold, New York).
Although many techniques have been proposed, we limit our discussion to the
methods that are widely used in the chemical and petroleum industries. Only
the
identification of linear transfer function models is discussed. We illustrate the use of
the MATLAB System Identification Toolbox.
545
546 PART FIVE: Sampled-Data Systems

,
16.1
FUNDAMENTAL CONCEPTS
16.1.1 Control-Relevant Identification
Whenever we want to identify a model of the process, we have to specify how we will
use the information. In this book we are interested in control, so we want to obtain
good models for designing controllers. To design feedback controllers, a model must
be accurate over the frequency range near the (-
1,O)
point. Its fidelity at higher or
lower frequencies is not important. This means that an accurate value of the steady-
state gain (the
o
= 0 point) is not required.
Figure 16.1 illustrates the point. Suppose we have two models of a process,
model A and model B, and we know exactly what the true transfer function of the
process is. The step responses of the alternative models are compared with the re-
sponse of the real process in Fig. 16. la. Model A fits the real plant well near the final
steady state, but its fidelity is poor during the initial part of the transient. Model B is
just the opposite. Which model is better for use in designing a feedback controller?
Figure 16. lb gives the Nyquist plots of the plant and the two models. The model
B curve is closer than the model A curve to the real process curve over the frequency
range near the (-
1,O)
point. Therefore, model B should be used for feedback con-
troller design.
However, for feedforward controller design, model A should be used because
having the correct steady-state gain is more important in feedforward control than
the correct dynamics.
Process


ModelA
Model
B
*
ReG
(b)
FIGURE 16.1
Control-relevant models.
CHAITER 16: Process Identification
547
16.1.2 Frequency Content of the Input Signal
Identification requires that the process be disturbed by some input signal. If the input
signal has little frequency content (small magnitude) over some frequency range, the
accuracy of the identified model is poor. This is because we are obtaining a transfer
function that is a ratio of functions.
(16.1)
If the input
U
does not provide enough excitation of the process over the important
frequency range, the model fidelity is poor, particularly in processes with appreciable
noise. This is why direct sine wave testing at a frequency near the ultimate frequency
and relay feedback testing are such useful methods.
;
16.1.3 Model Order
Part of the identification problem is to determine the “best” order of the model. The
higher the order, the more parameters there are to identify and the more difficult the
estimation problem becomes. A “parsimonious” model (one with few parameters) is
the easiest to identify. A large number of parameters gives high variance (a measure
of the difference between the model predictions and the actual plant) and a poorly

conditioned estimation problem (the matrix to be inverted in the numerical solution
technique is nearly singular). These difficulties can be overcome by using a large
number of data points, but this increases the duration of the plant testing, which is
undesirable because it increases the likelihood of the plant being disturbed by other
events.
A common way to determine the best model order is to use “model validation.”
The experimental data are separated into two sets. A specific number of parameters is
assumed. The first set is used in the numerical calculations to identify a model. Then
the predictions of this model are compared with the actual data from the second set
(the variance is calculated). A different model order is assumed and the procedure is
repeated. A plot of the variance of the model in the prediction of the second set of data
versus the number of parameters is usually a curve that goes through a minimum.
This is the best model order.
16.2
DIRECT METHODS
16.2.1 Time-Domain Fitting of Step Test Data
The most direct way of obtaining an empirical linear dynamic model of a process is
to find the parameters (deadtime, time constant, and damping coefficient) that fit the
experimentally obtained step response data. The process being identified is usually
openloop, but experimental testing of closedloop systems is also possible.
548
PART IWG: Sampled-Data System
=’
f=O
Input
t=O
t=D

t=z,,+D
First-order output

.t
e
*y(r,J
:
G


‘-tRd
I
1-1
I
D
I-
-1
I
I
tP
,
I
t=O t=D
Second-order output
=
t
FIGURE 16.2
Step response.
We put in a step disturbance qt) and record the output variable
ycr)
as a function
of time, as illustrated in Fig. 16.2. The quick-and-dirty engineering approach is to
simply look at the shape of the

y(,)
curve and find some approximate transfer function
GQ)
that would give the same type of step response.
Probably 80 percent of all chemical engineering
openloop
processes can be mod-
eled by a gain, a deadtime, and one lag.
( 16.2)
The steady-state gain
K,,
is easily obtained from the ratio of the final steady-state
-I
. .I
1
*
.I .
I.

.I
i
ma

I

I.
CHAPTER

16;
Process

Identil!ication
549
easily read from the
y(,)
curve. The time constant can be estimated from the time it
takes the output
y(l)
to reach 62.3 percent of the final steady-state change.
Closedloop processes are usually tuned to be somewhat underdamped,
so
a
second-order underdamped model must be used.
e-DS
G(.d =
KP72S2
+ Z7C8 +
1
(16.3)
As shown in Fig. 16.2, the steady-state gain and deadtime are obtained in the same
way as with a first-order model. The damping coefficient
5
can be calculated from
the “peak overshoot ratio,”
POR (see Problem
2.7),
using Eq. (16.4).
POR
=
e-m’o’+
(16.4)

A
where POR =
Y(r,)
-

AY
-
AY
(16.5)
4
= arccosl
VW,
Aytt,)
= change in
ytt)
at the peak overshoot
t,
= time to reach the peak overshoot (excluding the deadtime)
Then the time constant
7
can be calculated from Eq. (16.7).
tR
n-4
-=
7
sin
4
(16.7)
where
tR

is the time it takes the output to reach the final steady-state value for the
first time (see Fig. 16.2).
These “eyeball” estimation methods are simple and easy to use. They can pro-
vide a rough model that is adequate for many engineering purposes. For example,
an approximate model can be used to get preliminary values for controller settings.
However, these crude methods cannot provide a precise, higher-order model,
and they are quite sensitive to nonlinearity. Most chemical engineering processes are
fairly nonlinear. A step test drives the process away from the initial steady state, and
the values of the parameters of a linear transfer function model may be significantly
in error. If the magnitude of the step change could be made very small (sometimes
as small as lop4 to lop6 percent of the normal value of the input), nonlinearity
would not be a problem. But in most plant situations, such small changes give output
responses that cannot be seen because of the normal noise in the signals. Thus, step
n
0
n
testing has definite limitations for plant studies.
16.2.2 Direct Sine Wave Testing
l-
2
e
e
The next level of dynamic testing is with direct sine waves. The input of the plant,
which is usually a control valve position or a flow controller setpoint, is varied
si-
nusoidally at a fixed frequency o. After waiting for all transients to die out and for
-
a steady oscillation in the output to be established, the amplitude ratio and phase
angle are found by recording input and output data. The data point at this frequency
is plotted on a Nyquist, Bode, or Nichols plot. See Fig.

16.3~~.
Then
the
frequency
is changed to another value, and a new amplitude ratio and a new phase angle are

×