P. Atkinson R. L. Davey
Computer-aided design of closed-loop control systems A method is described whereby linear, single-input, single-output control systems can be designed by a computer-aided design process in which the Nyquist diagram of the system is displayed automatically on a cathode ray oscilloscope coupled to the computer. The designer communicates with the computer using his intuitive understanding of the design process coupled with the rapid computation and display offered by the computer. The method allows the rapid design of the compensating devices required to control high order processes in feedback loops. The article includes a numerical example in which the parameters of a typical pneumatic three-term controllers are computed to match a process plant having five simple lags.
Routine methods of designing feedback control systems are described in the literature. 1, 2 A very useful approach is via the Nyquist diagram which can be used for the determination of the correct loop gain (i.e. the correct error constant) to give a specified relative stability and also for the design of series compensating elements (phase-lead networks, phase-lag networks, two- and three-term controllers). Traditional methods involve tedious hand computation together with the repeated drawing of Nyquist diagrams. Precise design usually involves a certain amount of trial and error regardless of the excellence of the design method. Control engineers often prefer to use Bode diagrams (which are very much less precise) or rootlocus diagrams which require a very adaptable approach based partly on intuition and experience. The authors have for several years been using digital computers to eliminate the hand computation and drawing involved in the Nyquist approach. They initially used an on-line graph plotter which proved to be slow and cumbersome. The waste of expensive computer time also proved to be unacceptable. Programs have also been developed which allow the parameters of a control system to be inserted together with the design specification; the computer output then completely specifies the compensation required. Although for some purposes this is very useful the authors are inclined 8
to believe that semi-automation of the design-process gives the designer a greater flexibility in the design approach and an intuitive understanding of the design problem which he would not have in the completely automated method. Recently a cheap interactive graphics system has been developed at this laboratory 3 and the authors have introduced an approach to the design of control system which allows the maximum communication and interplay between the designer and the computer. The approach which will be described in this article is outlined in Fig. 1. The designer forms part of a closed-loop system (in fact he represents the 'error detector' in a process arranged to design a controller). He first obtains a cathode ray display of the Nyquist diagram for the uncompensated system. To do this he merely types in the relevant details of the system structure and parameters. He can then call for both a cathode ray display of the Nyquist diagram and (optionally) precise teletyped information regarding the magnitude and phase of any points in the Nyquist diagram. The designer then uses this information coupled with his experience to select the type of compensating device required such that the compensated system will be capable of meeting the specification. Then using a slide rule he will make brief calculations necessary to specify the COMPUTER AIDED DESIGN
nyquist dmgro.m of control system (representin~ performance
///~/
design
START
designer J"error"detector in the des,gn process)
of designed systeml
~
specificotton
ond structure of
control system
T
I L
.
.
.
.
.
.
Above: Fig. 1.
I I J
Right: Fig. 2
parameters of the proposed compensator (see literature ~. 2). The data related to the structure and parameters of the compensator and basic elements of the control system are then teletyped into the computer. A new Nyquist diagram is displayed together with an M-circle z (if required). The initial design will give a close approximation to the correct result; the designer then proceeds by a rapid iterative process to optimise the design. He adjusts the parameters of the compensating elements until the form of the Nyquist diagram (i.e. its shape and point of contact with the maximum M-circle) corresponds with t h e specification. The design is then complete and the designer, if he requires, obtains a print out of the open- and closedloop frequency response of the complete system.
Control S y s t e m S p e c i f i c a t i o n The design method has at present been developed to handle the wide range of control systems having the open-loop transfer function 0o/E(j~o) of general form:
Oo(jO~) K(1 + j o J T e x - oJ~-Tee~)(1 + fflo)n(1 - I - j o J Z a x - o J 2 T a a l ) ( 1
toTe=+ fioTa2
oJ2TeeO . . . -
o~2Taa2)
etc. etc.
. . .
where 60 is the system output, is the system error defined as 8i - ~o, Oi is the system input, co is the angular frequency, K is the error constant, , is the type number of the system (i.e. the number of pure integrations), and T e x , T e e z , T a l , T a a ~ , etc. are constants defmirig the quadratic leads and lags. (Note, simple leads or lags are of course included by setting T e e I and/or T a a z to zero). If the real and imaginary parts of this transfer function are computed for a range of angular frequencies, a coordinate plot of these values gives the Nyquist diagram for the system. The program which will be described allows the computer to make the necessary calculations; then by means of digital to analogue conversion, the real and imaginary parts are displayed in the X and Y directions of the cathode ray oscilloscope.
Detailed Program The Nyquist Display program is written for use on a PDP 8 computer having limited storage capacity (4k, 12 bit words). Despite this limitation the program is written in Fortran language for ease of modification and improvement. It is of course necessary to jump from Fortran to machine code routines to control the cathode ray display.
AUTUMN 1968
The whole Nyquist diagram including the real and imaginary axes is displayed as a series of points. The most convenient time to generate the display during computation is found to be either when the computer is waiting for more data to be fed in via the keyboard or between typing out characters (the teletype normally being very wasteful of computer time). At these times the two axes are displayed together with the other points on the Nyquist diagram. As each new point on the Nyquist diagram is computed, its co-ordinates are inserted into a stored list of points to be displayed. The numbers stored in the list initially are arranged so that they cause all the associated points on the Nyquist display to lie at the origin. One point from the list is used to mark the Nyquist point ( - 1,j0). Control of the facilities provided by the program is exercised by typing a series of single digit commands. The essential features of the program are shown in the flow diagram given in Fig. 2. The functions provided by the program are as follows: (a) Generate new Nyquist diagram - command J = 1 After the '1' has been typed in, the computer is ready to accept a new set of transfer function data. This is entered in the form: (i) Number of transfer function leads. (ii) Number of lags. (iii) Number of integrations. (iv) Error constant. (v) Starting frequency. (vi) Ratio by which frequency is to be decreased
e.g. 0.9. (vii) Complex leads. (viii) Complex lags. @) Draw M-circle. Command J 2. Data for the M = 1-3 circle is already stored in the ~
9
computer, the command adds this to the list of points to be displayed. (c) Change error constant. Command J = 3. The new error constant may now be typed in, the new Nyquist diagram is then generated and displayed. (d) Identity frequency. Command J = 4. A single frequency may now be typed in. Its Nyquist point is displayed, f The program does not display Nyquist points with magnitudes greater or less than certain prescribed limits• After each Nyquist diagram is generated the program returns to the command mode. More than one diagram may be displayed at once, however the total number of points being displayed must not exceed 70. When this number is exceeded no more data can be accepted and the .program must be restarted.
Example of Computer-aided Design
1
(I + 0 . 2 / , 0 ) " ( [ + 0-5j`0) o-
=
"IT
Ta --
and T,. =
To illustrate the use of the Nyquist program, its appli"cation to the problem of determining the optimum parameters of a pneumatic three-term controller to match a plant of known structure will be described• The transfer function H;,(j`0) of the plant is arbitrarily taken as
HvU`O)
The method of design is based on an article published by the a u t h o r s / A s explained in that article, the best results are achieved by making T~ = 3Td and `0rfTa = 9/2 where `0,f is the angular resonant frequency of the compensated system. The phase-lead introduced by the leads in the three-term controller will be 135 ° at the resonant frequency and the initial problem is to find the angular frequency at which the transfer function Hp(jo.,)/iioJ has a net lag of 270 °. The Nyquist diagram representing Hp(j`0)/i`0 is displayed (with or without M-circle) (see Fig. 3). By repeated use of command J = 4, points near the positive imaginary axis are 'spotted-up' until the point lying on that axis is found. The angular frequency associated with this point is `off. In this particular example `off = 2.5 rad/min. Then using a slide rule:
where `0 is expressed in rad/min. The pneumatic three-term controller which provides the series compensation is taken to be a Kent Mark 30 whose transfer function H,.(j`0) is approximately given by: (l + j`0Ta)(1 + j`0Ti) =P(T~- Td) j`0
_
0-63 min
3Ta =
i.89min
2`0rf
The Nyquist diagram representing (1 + j ` 0 T d ) ( l
j`0Ti)Hp(j`0)
+
j`0 is then displayed. The command J = 2 is used to introduce the M-circle. By repeated use of command J = 3 the scaling factor K of the plot is adjusted until the locus touches the M = 1-3 circle (see Fig. 4). In this example K----- 0.8 and thus the proportional band setting P can be calculated from K = 0"8 --
I00
PfT+- Td)
100
B'dj`0)
where P = proportional band, T,. = integral action time and Ta = derivative action time.
•
.
.
,
giving P = 99 %. Using command J ---- 5 a print-out of data t:rom the final Nyquist diagram is given on the teleprinter• This includes a complete closed-loop frequency response• The design is thus completely checked in the frequency domain.
"
;.e . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
,. . . . . . .
Fie. 3 10
:
. . . . . . .
.: . . . . . . . .
Fig. 4 COMPUTER AIDED DESIGN
Conclusion The article has introduced an approach to the computeraided design of control systems based on the Nyquist diagram. The reduction in the work compared with unaided design is enormous. The authors would like to stress that whilst the whole design process could be computerized they feel that the interplay between the designer and the computer gives the designer great flexibility coupled with a proper analytical understanding of the system he is designing. The present approach has been limited to linear, single-input, single output systems because of the small storage available in the PDP 8 used in the development. However, as increased storage becomes available
there are plans for extending the frequency response method to include both non-linear and multivariable systems, The root-locus approach, preferred by some designers, is at present under development.
References i Atkinson, P.: Feedback Control Theory for Enghleers (London, Heineman Education Books Ltd. 1968). '-' Atkinson, P. and Davey, R. L. : 'A theoretical approach to the tuning of pneumatic three-term controllers', Control (Volume 12, Number 117, March 1968). ,~ Walker, B. S.:'Developments in low-cost interactive graphics systems', Computer Aided Design (Volume I, Number 1, Autumn 1968).
Received August 1968.
P. Atkinson B.Sc.(Eng.), A.C.G.I,, C.Eng., M.I.E.E,, M.I.E.R.E., was educated at Southall Grammar School and Imperial College, London, graduating with honours in electrical engineering in 1955. He served a post-graduate apprentice and had further industrial experience with the guided weapons division of English Electric. From 1959 to 1962 he was a lecturer in electrical engineering at North Herts Technical College and, from 1962 to 1 964, a senior lecturer in control engineering at the College of Technology, Letchworth. In 1964, Atkinson became a lecturer in control engineering at Reading University and a founder member of the Department of Applied Physical Sciences. Apart from his research and teaching interests he has written a book on control engineering and is an indtJstrial consultant. R. L. Davey B.Sc., was educated at Forest Grammar School, Winnersh, and Reading University, graduating in cybernetics with first-class honours in 1966. He is at present working for his Ph.D. in the department of Applied Physical Sciences, Reading University, where he is engaged on research into the implementation of "bang-bang' control using an on-line digital computer.
AUTUMN 1968
11