`
`o
`Karl J. Astrom
`Bjorn Wittenmark
`
`Prentice-Hall, Inc., Englewood Cliffs, N.J. 07632
`
`1
`
`Micro Motion 1036
`
`
`
`Library of Congress Cataloging in Publication Data
`AsntoM, KARL l. (Karl loban). (date)
`Computer controlled systems.
`
`Includes bibliographies and index.
`1. Automatic control-Data processing.
`I. Wittenmark, B.
`II. Title.
`TJ213.A78 1984
`629.8'95
`ISBN 0·13·164319·3
`
`83·17643
`
`Editorial/production supervision
`and interior design: Karen Skrable
`Manufacturing buyer: Anthony Caruso
`
`©1984 by Prentice-Hall, Inc., Englewood Cliffs, N.J. 07632
`
`All rights reserved. No part of this book
`may be reproduced in any form or
`by any means without permission in writing
`from the publisher.
`
`Printed in the United States of America
`
`10 9 8 7 6 5 4 3 2 1
`
`ISBN 0-13-164319-3
`
`Prentice-Hall International, Inc., London
`Prentice-Hall of Australia Pty. Limited, Sydney
`Editora Prentice-Hall do Brasil, Ltda., Rio de Janeiro
`Prentice-Hall Canada Inc., Toronto
`Prentice-Hall of India Private Limited, New Delhi
`Prentice-Hall of Japan, Inc., Tokyo
`Prentice-Hall of Southeast Asia Pte. Ltd., Singapore
`Whitehall Books Limited, Wellington, New Zealand
`
`2
`
`
`
`GOAL -To Introduce the Subject and to Give Some Historical
`Background on the Development of Computer-Control
`Technology and Theory.
`
`1.1 Introduction
`
`Digital computers are increasingly being used to implement control systems. It is
`therefore important to understand computer-controlled systems well. One can view
`computer-controlled systems as approximations of analog-control systems, but this
`is a poor approach because the full potential of computer control is not used. At best
`the results are only as good as those obtained with analog control. Alternatively, one
`can learn about computer-controlled systems, so that the full potential of computer
`control is used. The main goal of this book is to provide the required background.
`A computer-controlled system can be schematically described as in Fig. 1.1. The
`
`1
`
`3
`
`
`
`1.2
`
`.... o
`
`Figure 1.1 Schematic diagram of a computer-controlled system.
`
`output from the process yet) is a continuous-time signal. The output is converted into
`digital form by the analog-to-digital (A-D) converter. The A-D converter can be
`included in the computer or regarded as a separate unit, according to one's preference.
`The conversion is done at the sampling times, t k • The computer interprets the convert(cid:173)
`ed signal, {y(tk)}' as a sequence of numbers, processes the measurements using an'
`algorithm and gives a new sequence of numbers, {U(tk)}' This sequence is converted to
`an analog signal by a digital-to-analog (D-A) converter. Notice that the system runs
`open loop in the interval between the A-D and the D-A conversion. The events are
`synchronized by the real-time clock in the computer. The digital computer operates
`sequentially in time and each operation takes some time. The D-A converter must,
`however, produce a continuous-time signal. This is normally done by keeping the
`control signal constant between the conversions. The computer-controlled system
`contains both continuous-time signals and sampled, or discrete-time signals. Such
`systems have traditionally been called sampled-data systems, and this term will be used
`here as a synonym for computer-controlled systems.
`The mixture of different types of signals sometimes causes difficulties. In most
`cases it is, however, sufficient to describe the behavior of the system at the sampling
`instants. The signals are then of interest only at discrete times. Such systems will be
`called discrete-time systems. Discrete-time systems deal with seq1,lences of numbers,
`so a natural way to represent these systems is to use difference equations.
`The purpose of the book is to present the control theory that is relevant to the
`analysis and design of computer-controlled systems. This chapter provides some back(cid:173)
`ground. A brief overview of the development of computer-control technology is given
`in Sec. 1.2. The need for a suitable theory is discussed in Sec. 1.3. Examples are used
`to demonstrate that computer-controlled systems cannot be folly understood by the
`theory oflinear, time-invariant, continuous-time systems. An example shows not only
`that computer-controlled systems can be designed using continuous-time. theory a:n,d
`approximations, but also that substantial improvements can be obtained by other
`techniques that use the full potential of computer control. Sec. 1.4 gives some exam(cid:173)
`ples of inherently sampled systems. The development of the theory of sampled-data
`systems is outlined in Sec. 1.5.
`
`2
`
`Computer Control
`
`Chap. 1
`
`4
`
`
`
`1.2 Computer Technology
`
`The idea of using digital computers as components in control systems emerged around
`1950. Applications in missile and aircraft control were investigated first. Studies
`showed that there was no potential for using the general-purpose digital computers
`that were available at that time. The computers were too big, they consumed too much
`power, and they were not sufficiently reliable. For this reason special-purpose com(cid:173)
`puters-digital differential analyzers (DDA)-were developed for the early aerospace
`applications.
`The major developments in computer control occurred in the process industries.
`The progress of these developments is illustrated in Fig. 1.2, which shows the growth
`of computers used for process control over a period of 25 years.
`
`100N
`
`10N
`
`1N
`
`100k
`
`~
`
`J! t .... 0
`f :e
`
`Figure 1.2 Growth of computers used
`for industrial process control. For
`comparison the total number of
`computers is also given. The picture is
`compiled from several sources:
`Control Engineering, A. D. Little,
`Frost and Sullivan, and Diebold.
`(Redrawn from data published in
`Control Engineering, © 1980,
`Technical Publishing Co., with
`1990 permission.
`
`10k
`
`1k
`
`100
`
`10
`
`1960
`
`1WO
`
`1980
`
`The idea of using digital computers for process control emerged in the mid(cid:173)
`fifties. Serious work started in March 1956 when the aerospace company Thomson
`Ramo Woolridge (TRW) contacted Texaco to set up a feasibility study. After pre(cid:173)
`liminary discussions it was decided to investigate a polymerization unit at the Port
`Arthur, Texas, refinery. A group of engineers from TRW and Texaco made a thorough
`feasibility study, which required about 30 people-years. A computer-controlled system
`for the polymerization unit was designed based on the RW-300 computer. The control
`system went on-line March 12, 1959. The system controlled 26 flows~ 72 temperatures,
`3 pressures, and 3 compositions. The essential functions were to minimize the reactor
`pressure, to determine an optimal distribution among the feeds of 5 reactors, to con(cid:173)
`trol the hot-water inflow based on measurement of catalyst activity, and to determine
`the optimal recirculation.
`The pioneering work done by TRW was noticed by many computer manufac(cid:173)
`turers, who saw a large potential market for their products. Many different feasibility
`studies were initiated and vigorous development was started. The results of these
`efforts are reflected in the growth shown in Fig. 1.2.
`To discuss the dramatic developments, it is useful to introduce four periods.
`
`Sec. 1.2
`
`Computer Technologv
`
`3
`
`linto
`nbe
`ence.
`lvert(cid:173)
`Ig an
`ed to
`runs
`:s are
`:rates
`nust,
`g the
`rstem
`Such
`used
`
`most
`pIing
`ill be
`lbers,
`
`o the
`Jack(cid:173)
`given
`used
`y the
`only
`rand
`:>ther
`xam(cid:173)
`-data
`
`hap. 1
`
`5
`
`
`
`= 1955
`Pioneering period
`Direct~digital~control period = 1962
`Minicomputer period
`Microcomputer period
`
`= 1967 = 1972
`
`It is difficult to give precise dates, because the development was highly diversi·
`fied. There was a wide difference between different application areas and different
`industries; there was also considerable overlap. The dates given refer to the first
`appearance of new ideas.
`
`The Pioneering Period
`
`The work done by TRW and Texaco evoked substantial interest at process industries,
`among computer manufacturers, and in research organizations. The industries saw a
`potential tool for increased automation, the computer industries saw new markets,
`and universities saw a new research field. Many feasibility studies were initiated by the
`computer manufacturers because they were eager to learn the new technology and
`were very interested in knowing what a proper process·control computer should look
`like. Feasibility studies continued throughout the sixties.
`The computer systems that were used were slow, expensive, and unreliable. The
`earlier systems used vacuum tubes. Typical data for a computer around 1958 were an
`addition time of 1 ms, a multiplication time of 20 ms, and a Mean Time Between
`Failures (MTBF) for a central processing unit of 50-100 h. To make full use of the
`expensive computers, it was necessary to have them perform many tasks. Because the
`computers were so unreliable, they controlled the process by printing instructions to
`the process operator or by changing the set points of analog regulators. These super·
`visory modes of operation were referred to as operator guide and set· point control.
`The major tasks of the computer were to find the optimal operating conditions,
`to perform scheduling and production planning, and to give reports about production
`and raw· material consumption. The problem of finding the best operating conditions
`was viewed as a static optimization problem. Mathematical models of the processes
`were necessary in order to perform the optimization. The models used-which were
`quite complicated-were derived from physical models and from regression analysis
`of process data. Attempts were also made to carry out on· line optimization.
`Progress was often hampered by lack of process knowledge. It also become
`clear that it was not sufficient to view the problems simply as static optimization
`problems; dynamic models were needed. A significant proportion of the effort in
`many of the feasibility studies was devoted to modeling, which was quite time con(cid:173)
`suming because there was a lack of good modeling methodology. This stimulated
`research into system-identification methods.
`A lot of experience was gained during the feasibility studies. It became clear that
`process control puts special demands on computers. The need to respond quickly to
`demands from the process led to development of.the interrupt feature, which is a
`special hardware device that allows an external event to interrupt the computer in its
`current work so that it can respond to more urgent process tasks. Many sensors that
`
`4
`
`Computer Control
`
`Chap. 1
`
`6
`
`
`
`a-
`tlt
`st
`
`s,
`a
`s,
`Ie
`d
`,k
`
`Ie
`n
`n
`Ie
`Ie
`o
`r-
`
`s,
`n
`IS
`:s
`'e
`is
`
`e
`n
`n
`I(cid:173)
`i
`
`t
`:>
`a
`s
`t
`
`were needed were not available. There were also several difficulties in trying to intro(cid:173)
`duce a new technology into old industries.
`The progress made was closely monitored at conferences and meetings and in
`journals. A series of articles describing the use of computers in process control was
`published in the journal Control Engineering. By March 1961 thirty-seven systems had
`been installed. A year later the number of systems had grown to 159. The applications
`involved control of steel mills and chemical industries and generation of electric power.
`The development progressed at different rates in different industries. Feasibility studies
`continued through the sixties and the seventies.
`
`Direct Digital Control
`
`The early installations of control computers operated in supervisory mode, either as
`operator guide or as set-point control. The ordinary analog-control equipment was
`needed in both cases. A drastic departure from this approach was made by Imperial
`Chemical Industries (lCI) in England in 1962. A complete analog instrumentation for
`process control was replaced by one computer, a Ferranti Argus. The computer
`measured 224 variables and controlled 129 valves directly. This was the beginning of
`a new era in process control: Analog technology was simply replaced by digital
`technology; the function of the system was the same. The name Direct Digital Control
`(DOC) was coined to emphasize that the computer controlled the process directly.
`In 1962 a typical process-control computer could add two numbers in 100 fiS and
`multiply them in 1 ms. The MTBF was around 1000 h.
`Cost was the major argument for changing the technology. The cost of analog
`technology increased linearly with the number of control loops; the initial cost of a
`digital computer was large, but the cost of adding an additional loop was small. The
`digital system was thus cheaper for large systems. Another advantage was that the
`operator communication could be changed drastically; an operator communication
`panel could replace a large wall of analog instruments. The panel used in the ICI
`system was very simple--a digital display and a few buttons.
`Flexibility was another advantage of the DOC systems. Analog systems were
`changed by rewiring; computer-controlled systems were changed by reprogramming.
`Digital technology also offered other advantages. It was easy to have interaction
`among several control loops. The parameters of a control loop could be made functions
`of operating conditions. The programming was simplified by introducing special
`DOC languages. A user of such a language did not need to know anything about
`programming, but simply introduced inputs, outputs, regulator types, scale factors,
`and regulator parameters into tables. To the user the systems thus looked like a con(cid:173)
`nection of ordinary regulators. A drawback of the systems is that it was difficult to
`do unconventional control strategies. This certainly hampered development of control
`for many years.
`DOC was a major change of direction in the development of computer-con(cid:173)
`trolled systems. Interest was focused on the basic control functions instead of the
`supervisory functions of the earlier systems. Considerable progress was made in the
`years 1963-65. Specifications for DOC systems were worked out jointly between
`
`Sec. 1.2
`
`Computer Technology
`
`5
`
`7
`
`
`
`users and vendors. Problems related to choice of sampling period and control algo(cid:173)
`rithms, as well as the key problem of reliability, were discussed extensively, The con(cid:173)
`cept DOC was quickly accepted in spite of the fact that DDC systems often turned
`out to be more expensive than the corresponding analog systems.
`
`The Minicomputer Period
`
`There was substantial development of digital computer technology in the sixties. The
`requirements on a process-control computer were neatly matched with progress in
`integrated circuit technology. The computers became smaller, faster, more reliable,
`and cheaper. The term minicomputer was coined for the new computers that emerged.
`It was possible to design efficient process-control systems by using minicomputers.
`The development of minicomputer technology combined with the increasing
`knowledge gained about process control with computers during the pioneering and
`DDC periods caused a rapid increase in applications of computer control. Special
`process-control computers were announced by several manufacturers. A typical
`process computer of the period had a word length of 16 bits. The primary memory was
`8-124k words. A disc drive was commonly used as a secondary memory. The CDC
`1700 was a typical computer of this period, with an addition time of 2 jtS and a mul(cid:173)
`tiplication time of 7 jtS. The MTBF for a central processing unit was about 20,000 h.
`An important factor in the rapid increase of computer control in this period
`was that digital computer control now came in a smaller "unit." It was thus possible
`to use computer control for smaller projects and for smaller problems. Because of
`minicomputers, the number of process computers grew from about 5000 in 1970 to
`about 50,000 in 1975.
`
`Microcomputers
`
`The minicomputer was still a fairly large system. Even as performance continued to
`increase and prices to decrease, the price of a minicomputer mainframe in 1975 was
`still about $10,000. This meant that a small system mrely cost less than $100,000.
`Computer control was still out of reach for a large number of control problems. But
`with the development of the microcomputer in 1972, the price of a card computer
`with the performance of a 1975 minicomputer dropped to $500 in 1980. Another
`consequence was that digital computing power in 1980 came in quanta as small as $50.
`Th~s meant, of course, that computer control could now be considered as an alterna(cid:173)
`tive, no matter how small the application.
`Since there are even more drastic developments in microelectronics to come with
`the very large scale integration (VLSI) technology in the eighties, it is a safe guess
`that there will be a large increase in computer-control applications then. Micro(cid:173)
`computers have already made an impact on control equipment: Microcomputers are
`replacing analog hardware even as single-loop controllers; small DDC systems have
`been made using microcomputers; operator communication has been vastly improved
`in these systems with the introduction of color video-graphics displays; hierarchical
`control systems with a large number of microprocessors have been constructed; and
`special-purpose regulators based on microcomputers have been designed.
`
`6
`
`Computer Control
`
`Chap. 1
`
`8
`
`
`
`mation has been used for different sampling times. The other approximations give
`similar results. The closed-loop system has a satisfactory behavior for all compensators
`when the sampling time is short. The rule of thumb also gives reasonable values for the
`sampling period. The overshoot when h = 0.5 is about twice as large as for the continu(cid:173)
`ous-time compensator. In the example, the change in Uc occurs at a sampling instant.
`This is not true in practice, and there may be a delay in the response of at most one
`sampling period.
`
`8.3 Digital PID-Controllers
`
`For many control applications, it is sufficient to use a standard PID-controller. In
`this section, different ways to implement digital PID-controllers are discussed, together
`with some operational aspects. A standard "textbook," continuous-time PID-control(cid:173)
`ler is often written in Laplace form as
`
`(8.12)
`
`where U(s) and £(s) are the Laplace transforms of the controller output and the'error
`signal, respectively; K is the proportional gain; T] is the integral, or reset, time; and
`TD is the derivative time. In the controller there is a filter, with time constant TD/N,
`for the derivative part. Also, N is often in the range 3-10 and is usually fixed by the
`manufacturer of the controller.
`The methods of approximation for a continuous-time system in the previous
`section can be used to translate (8.12) into a digital controller. Straightforward sam(cid:173)
`pling of (8.12) gives
`u(kh) = K(l + (q (J, + P(q
`l))e(kh)
`q + y
`1)
`
`(8.13)
`
`where
`
`h
`T]
`P=N
`-exp ( ~N)
`y
`It is also possible to approximate the Pill-controller using other methods.
`The most common way is to make an Euler approximation of the integral part and a
`backward-difference approximation of the derivative part. This gives
`
`(8.14)
`
`The approximations in both (8.13) and (8.14) have the same principal structure;
`there is only a slight difference in the coefficients. When h decreases, the responses of
`(8.13) and (8.14) get closer and closer. Ifthe derivative part is instead approximated
`using the forward-difference approximation, then the controller will be unstable if
`h > 2TDIN; i.e., it is not possible to use TD = O. However, the derivative parts of
`(8.13) and (8.14) are stable for all possible h. Sometimes the backward approximation
`is also used for the integral part. The only difference then is that the delay in the
`
`180
`
`Translation of Analog Design
`
`Chap. 8
`
`9
`
`
`
`pve
`ors
`the
`au(cid:173)
`tnt.
`)ne
`
`In
`ler
`01-
`
`[2)
`
`:or
`nd
`N,
`,he
`
`'us
`ffi-
`
`3)
`
`Is.
`a
`
`4)
`
`e' ,
`of
`~d
`if
`of
`m
`Ie
`
`8
`
`numerator of the integral part is removed, which means that the last-measured error
`is used in the integral part without delay. This may be good if the sampling period
`is long. Finally, there are many possibilities to modify the derivative part of the
`controller.
`To streamline the notation, the parts P, I, and D are denoted by
`
`1)
`
`KDh, and KDTDD(q
`K
`h(q + y)
`TID(q - 1)
`D,
`respectively, where TID and TDD are the discrete-time equivalents to reset and
`derivative times. The parameters in the controller will have the same dimensions as
`the parameter of the continuous-time controller. The textbook form of the digital
`PID-controller can thus be written in the form
`u(kh) = KD(1 + ~ _1_ + TDD q -
`l)e(kh)
`1
`TIDq
`h q+y
`The coefficients KD, TID and TDDwill have different interpretations depending
`on how the continuous-time controller has been approximated. This will not make any
`difference if the sampling period is short.
`Forms (8.13)-(8.15) are called position forms for the PID-controller because
`the total output is calculated. If the change in the control signal, /lu(kh), is computed
`instead, a velocity, or incremental form, is determined from (8.15):
`/lu(kh) = u(kh)
`u(kh
`h)
`
`(8.15)
`
`Often, the delay in the integral part is removed, which corresponds to making
`a backward-difference approximation for the integral part. When using the velocity
`form, the integrator is placed outside the controller. For example, the output may
`be pulses to a stepping motor, which is connected to a valve. The integral part is then
`realized by the motor. A drawback to the incremental algorithm is that it cannot
`operate in P- or PD-mode. If this is attempted, the external integrator must be com(cid:173)
`pensated by a difference in the digital part. If this is done, an unstable mode will be
`canceled, which can give difficulties. A further comparison of the two forms is given
`later in the section.
`
`Different Structures of PID-Controllers
`
`There are many ways to change the structure of the textbook PID-controller of (8.12).
`Figure 8.5 shows different PID-structures, which can be used both in continuous and
`discrete time. The structure in Fig. 8.5(b) has the advantage that the controller does
`not give a large control signal at step changes in the reference signal. This is the
`structure of the controller seen most often in the literature. The "set-point-on-I-only"
`controller in Fig. 8.5(c), is less commonly seen. The filter for the derivative part can
`be used in different ways. The most common way is as shown in (8.12). It is also
`possible to filter all three parts of the controller or only the proportional and the
`derivative parts. The latter will, for instance, attenuate high-frequency measurement
`noise.
`
`Sec. 8.3
`
`Digital PI D-Controllers
`
`181
`
`10
`
`
`
`-y
`
`a)
`
`b)
`
`~ PI H Lead ~
`
`-y
`
`c)
`
`d)
`
`Figure 8.5 Different ways to implement controllers with PID-function. P, I, and
`D indicate the different parts of the controller.
`a. Textbook controller
`b. Derivative-of-output controller
`c. Set-point-on-I-only controller
`d. PI-controller followed by lead network
`
`The tuning of a controller is often made using step disturbances in the reference
`signal. The parameter values that are good for this type of disturbance may not be
`good if the main disturbances are process disturbances. However, it is reported that
`the structure in Fig. 8.5(c) is the structure for which the differences in the controller
`parameters are smallest if it is tuned for set-point or process disturbances.
`The different structures in Fig. 8.5 can be rewritten using a common form (see
`Fig. 8.6) as
`
`S(q)y(kh)
`T(q)uc(kh)
`R(q)u(kh)
`where the interpretation of the polynomials T and S depends on the structure. All
`three polynomials are of second order and
`R(q)
`(q
`
`y)(q
`
`1)
`
`ControUer
`
`y
`
`Figure 8.6 A common general form for the PID-controllers in Fig. 8.5.
`
`182
`
`Translation of Analog Design
`
`Chap.S
`
`11
`
`
`
`,portional
`motivated
`ement the
`computer
`
`he system
`)fial com(cid:173)
`plications
`so a few
`
`'ator inter(cid:173)
`There is a
`>pilot may
`~aft. There
`e pilot has
`
`s variables
`. It is also
`anual COD(cid:173)
`automatic
`
`, measured
`eral differ(cid:173)
`md tuning
`)lants and
`
`ions of the
`ystem that
`he control
`
`il control.
`where the
`done with
`ractical to
`modified.
`must have
`If this is
`Ibumpless
`
`Ramp generator
`
`Increase
`Decrease
`
`Figure 15.8 Control system with manual and automatic control modes.
`
`In conventional analog regulators, it is customary to handle bumpless transition
`by introducing a tracking mode, which adjusts the regulator state so that it is compat(cid:173)
`ible with the given inputs and outputs of the regulator. A tracking mode may be
`viewed as an implementation of an observer.
`A tracking mode is obtained automatically in the regulators of (15.7), (15.12),
`and (15.15) because they have an observer built into them. To run them in a tracking
`mode, simply put
`
`This implies that the control signal is always equal to the manual input signal. The
`state of the regulator will be reset automatically because of the internal feedback in
`the regulator. The saturation introduced in the regulator to handle actuator satura(cid:173)
`tion will automatically give bumpless transfer. There are also ways to have modes for
`semiautomatic control by keeping some feedback paths for stabilization.
`With computer control, it is also possible to have many other operating modes.
`For example, it is possible to include parameter estimation and control-design
`algorithms in the regulator. An estimation mode, in which a model of the process is
`estimated, may be introduced. The estimated model may be used in the design
`algorithm to give an update of the parameters of the regulator in a tuning mode.
`Adaptive control modes, in which the parameters are updated continuously, may also
`be added. Compare this with the self-tuning regulator shown in Fig. 14.1.
`
`Initialization
`
`Since a regulator is a dynamic system, it is important to set the regulator state appro(cid:173)
`priately when the regulator is switched on. If this is not done, there may be large
`switching transients. In conventional process-control with PI-regulators, the regulator
`has one state only-namely, the integrator. It is customary to initialize such a regulator
`by operating it in manual control until the process output comes close to its desired
`value.
`For an algorithm with an explicit observer, the regulator state may be initialized
`by keeping the control signal fixed for the time required for the observer to settle.
`A regulator with antiwindup may also be initialized by running it in manual mode
`during a period that corresponds to the settling time of the observer.
`
`Chap.15
`
`Sec. 15.5
`
`Operational Aspects
`
`375
`
`12
`
`