`
`o
`Karl J. Astrom
`Bjorn Wittenmark
`
`Prentice-Hall, Inc., Englewood Cliffs, N.J. 07632
`
`Micro Motion 1036
`
`1
`
`
`
`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
`
`
`
`the new theory produced except in a few exotic cases-mostly in aerosi~ce or advanced
`process control. However, due to the revolutionary development of thicroelectronics,
`advanced regulators can be implemented even for basic applications. It is also possible
`to do analysis and design at a reasonable cost with the interactive design tools that are
`becoming increasingly available.
`that is relevant to the
`The purpose of this book is to nr"~Plnt
`on basic con-
`of complut(~r-I;OfJltf()lle:dS'ystl~ms, with an
`amllysis and
`and ideas.
`with a reasonable software
`
`to the conl1puter.
`
`is also carried out
`programs in a nu(n-jleV,el 1<U1l:!;UCll;;C.
`the form
`is orl~anlized as follows: An
`of the
`of cOlnptlter
`The
`control is given in
`1. A survey of the development of the theory is also
`in order to
`who do not know
`are bound
`to
`
`some
`
`is
`of
`Sampling, which is a fundamental
`discussed in Chapter 2. The basic mathematical models needed are given in Chapters
`3, 4, and 6.
`3
`the models as seen from the
`while
`4
`treats the models as seen from the process. Without disturbances there are no control
`problems; it is therefore
`to find suitable ways to chantctl~rij~e disturl)aI1CeS,
`6.
`which is done in
`In Chapter 5 the major tools for analysis and simulation are given. Simulation
`plays an important role because there are many detailed questions that are very hard
`to answer through analysis alone. Simnon, an interactive simulation language that is
`used throughout the book, is presented in an appendix. It is not very difficult to
`translate the programs into other simulation languages. The fact that a powerful
`simulation tool is available makes a drastic change in attitudes and techniques. It is
`very important that the simulations be accompanied by analysis that can give order(cid:173)
`of-magnitude estimates to ensure that the simulation results are reasonable. At the
`same time it is not necessary to provide tools for very accurate calculations because
`Chapters 7 through 12 are devoted to the
`these can easily be done by the
`An overview is
`7. Translation
`for deterministic
`methods is discussed
`9. The same prclblem
`systenls based
`methods based on
`discussed in
`Gaussian control are treated in
`linear
`Kalman
`12
`models.
`models and in
`'-''''''"pc". 11 based on
`methods is that a model of
`A characteristic feature of many of the new
`13 discusses how such models can
`the process and its disturbances is needed.
`be obtained. A brief treatment of parameter-adaptive control systems is
`in
`'-'1J,al-".'" 14. This may
`viewed as a combination of the
`methods in
`9
`to 12 with the recursive identification methods in
`14.
`15 discusses
`different
`The
`are
`in such a way that all models and
`is
`in continuous time. This makes
`easier because of the close connections
`with
`Multivariable
`are covered whenever
`are
`
`in
`
`3
`
`
`
`used; however, the treatment of input-output models using the polynomial appn)ac:h
`is limited to the single-input-single-output case. Both deterministic and stochastic
`aspects of the analysis and the design problem are given.
`When designing a system it is often advantageous to see a problem from several
`viewpoints. Since the
`of the book is to
`a
`foundation for design of
`it
`necessary
`cover
`wide range
`reasonable balance between detail and overview has been achieved; however, Chapters
`14
`books
`cover
`
`the
`a forward-shift
`variable
`a
`We
`confusing for the students and have therefore introduced the
`q to denote the
`forward-shift operator. This is
`to the use of
`as a cOltIlplex variable
`d/dt as a differential operator for continuous-time
`The notation
`p
`used to denote the backward-shift operator.
`This book can be used in many different ways. Chapters 2, 3, 5, 7, 8, 9, 10, and 15
`and Sections 6.1-6.3 are suited for an
`course in sampled data sys:telns.
`A detailed treatment of
`4, 6, 7, and 9
`15 can form the core of a
`graduate course in design of computer-controlled systems. We have
`courses to
`industrial audiences based on Chapters 3, 4,5,8,9, 10, 13, 14, and 15. In all cases we
`have found it very
`to have access to
`simulation and to
`ment lectures and exercises with
`Some
`are given in the solutions manual.
`
`for this
`
`is
`
`Acknowledgments
`
`During the writing of this book we have had the pleasure and privilege of interacting
`with many persons. It is a particular pleasure to thank the nestor of sampled-data
`Professor E. 1. Jury, who has patiently read several versions of the manuscript
`and given many hints and much advice. Many thanks are also due to Per Hagander at
`Lund Institute of Technology; George Axelby, editor of Automatica; and Brian
`Anderson of the Australian National University, Canberra-each of whom have
`much useful criticism. We have also
`feedback
`Paul
`at
`Rick Johnson
`and Howard EHiot
`M.lss:aclmsetts, who have
`We are mdlebted
`students who have
`different versions
`We also extend thanks
`versions of the manuscript and to Doris Nilsson for making the illustrations.
`
`the
`
`KARL J. ASTRIOM
`BJORN WlTTENMARK
`
`4
`
`
`
`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
`
`5
`
`
`
`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
`
`6
`
`
`
`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
`
`7
`
`
`
`= 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
`
`8
`
`
`
`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
`
`9
`
`
`
`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
`
`10
`
`
`
`2.4 Reconstruction
`
`The inversion of the sampling operation, i.e., the conversion of a sequence of numbers
`{J(tk): k EO Z} to a continuous-time functionf(t) is called reconstruction. In computer(cid:173)
`controlled systems, it is necessary to convert the control actions calculated by the com-
`as a sequence of numbers to a continuous-time
`that can be
`to
`process. In digital filtering, it is similarly nesessary to convert the representation of
`the filtered
`as a sequence
`numbers
`a continuous-time function. Some
`
`Shanrwn Reconstn.u::tion
`
`of band-limited signals, it follows from the sanllpling
`For the case of periodic
`theorem that
`reconstruction is
`by
`This reconstruction is called the
`Shannon reconstruction. Equation (2.1) defines an inverse of the sampling operation,
`It
`which can be considered as a linear
`not a causal op1crator
`values {J(kh): k < t/h}
`because the value
`time t is
`in terms of
`as well as future values {J(kh): k > t/h}. This implies that the Shannon reconstruction
`is not useful for computer control, but it can sometimes be used in communication,
`where a delay can often be
`Other drawbacks of the Shannon reconstruction
`to periodic sampling. It is
`are that it is
`and that it can be
`therefore useful to have other reconstructions.
`
`Zero-Order Hold
`
`A simple causal reconstruction is given by
`
`This means that the reconstructed signal is piecewise constant, continuous from the
`and
`to the sampled signal at the sampling instants. The reconstructed value
`is thus held constant
`next sanllpling
`Because
`its
`zero-order hold is very common in com~)Uter·
`controlled systems. The standard D-A converters are often
`in such way
`that the old value is held constant until a new conversion is ordered.
`
`gives an exact inverse of
`that the reconstruction in
`the sampling operation only for signals that are right continuous and piecewise con-
`stant over the
`intervals. For all other
`the reconstruction of
`an error
`For
`of a signal with a smooth first
`derivative, the following estimate of the error is obtained. The
`value
`the
`IS
`
`eZOH max I
`
`k
`
`I<h
`
`is the derivative off.
`
`24
`
`Sampling of Continuous-Time Signals
`
`Chap.
`
`11
`
`
`
`spectrum is then obtained
`The
`phase from all sheets.
`
`Prefiltering
`
`Figure 2.8 Frequency folding.
`
`the contributions with proper
`
`A practical difficulty is that real signals do not have Fourier transforms that vanish
`outside a given frequency band. The high-frequency components may appear to be
`low-frequency components due to aliasing. The problem is particularly serious if
`there are periodic high-frequency components. To avoid the alias problem, it is neces(cid:173)
`sary to filter the analog signals before sampling. This may be done in many different
`ways.
`
`seldom
`
`~
`~m~
`obtained do not have frequencies above the Nyquist frequ1enc;y
`filter so that the
`Sometimes the simplest solution is to introduce an
`standard
`for
`second-order filter
`
`is shown in Fig. 2.9.
`obtained by
`HI2:hier··onler filters
`in Table 2.l.
`Examples of filters are
`The Bessel filter has a linear phase curve, which means that the
`signal is not distorted much. The Bessel filters are therefore common in nHm-UeJr(cid:173)
`formance systems.
`
`first- and second-order sys:telns.
`
`28
`
`Sampling of Continuous-Time Signals
`
`Chap.
`
`12
`
`
`
`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
`
`13
`
`
`
`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
`
`14
`
`
`
`-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
`
`15
`
`
`
`LISTING 15.1 Computer code skeleton for the control law of (15.2).
`Line numbers are introduced only for purposes of referencing.
`
`1
`2
`
`Procedure Regulate
`begin
`uc
`Adin y
`u ;= C*x + D*y + Dc*uc
`;= F*x + G*y + Gc*uc
`u
`
`- - - - _ . _ - - - - - - - - - - - - - - - - - - -_ ._ - - -
`
`computed in the
`and uc. The control signal u
`values are stored in the arrays
`second line using matrix vect