A Computer Controlled Teaching Experiment

A Computer Controlled Teaching Experiment

COP' right © I F.\C ~ I(h ·1 r it'l lni ,tI \\"01 Id ( .• mg l t'" BlI dapt·'>! . Ilung.lt' . 1 ~1 ,..q A COMPUTER CONTROLLED TEACHING EXPERIMENT...

1MB Sizes 44 Downloads 145 Views

COP' right

©

I F.\C ~ I(h ·1 r it'l lni ,tI \\"01 Id ( .• mg l t'"

BlI dapt·'>! . Ilung.lt' .

1 ~1 ,..q

A COMPUTER CONTROLLED TEACHING EXPERIMENT C. Wang*, R. M. Henry**, R. Cameron** and S. Mossaheb** *Rt'.\('(l1'(/i Im/il utt' j() r .~u/um(1timl (11/d fn., lrulflt'1ltatiuu ..\lhn~ tr~·, of Light fur/ mt,..)'. \\"01 )"/ Strt'f't.

l.lt u/{ . l.llIj;((1I Prol ';II(f, Tit, P,upl,', R , p"blic of CItIllO Cc)//11'U1 t:1I~II Fr ";lIg, CII;l',,., ;I)' of Bradford. Bradfunl, BDi I DP, Ch

I/(III /{

"Scltu(l1

of

Abstract The paper describes a laboratory experiment relying for measurement and control on a small dedicated microprocessor. The process consists of a copper pipe fitted with four temperature transducers and two heating coils, one at each end. Using any two temperatures a range of multivariable experiments are possible with varying degrees of interaction. A novel feature is that the dynamics of the rig can be drastically changed by mounting the pipe vertically instead of horizontally. This is because heat transfer then involves natural convection. The system is truly distributed and introduces time delays, non-linearities, random load constraints and distributed limits on maximum heating and cooling rates. A number of approaches to design are included in the paper. The computer control relies on a mixeo language approach so that the user only needs BASIC. It also provides a useful case study in interfacing. ~ord~

Laboratory teaching experiment, computer control, systems, distributeo systems, multivariable systems.

interfacing,

nonlinear

INTRODUCTION introduces a case study in interfa Cing. Assembly code routines are fired into epROM so that the user only needs BASIC to control the rig.

Laboratory experiments are expensive to produce. Perhaps the most expensive of all are the 'one -offs' which absorb much staff time in their development. It is hardly surprising, therefore, that a constantly recurring theme is the need for well-thought out experiments to be used in teaching at graduate and undergraduate levels.

THE EXPERIMENTAL RIG The rig consists of a copper tube fitted with heating coils and four temperature transducers. The arrangement is shown in Fig. 1. No thermal insulation is used except aro und the heating coils at either end. Power input to the coi ls is 100 w maximum and this leads to max i mum surface temperatures of about 90 degrees Celsius. This value means that special safety precautions a re not needed.

This paper des c ribes a rig developed to meet our own needs at Bradford. An important feature is that it can be used in a number of different ways to illustr a t e a v arie ty of control and identification problems. The central feature of the process is a copper tube fitted with heating coils at each end. Four t emperat ure transducers are spaced along the length of the tube. This arrangement allows multivariable experiments to be undertaken on a distributed parameter proc ess . The amount of inter ac tion depends on which of the four temperature transducer signals are usen.

Temperature measurement is by current loop trans ducers, type RS 590 KH. Th ese are similar in size and appearance t o a discretely pa ckage d transist o r and develop 1 mi c r oamp per deg ree Kelvin over a range -50 to +150 degrees Celsius. Linearity is very good and the current loop feature avoids interference problems from the thyristors controlling the power to the h eati ng coils. The transducers are mounted in small wells brazed to the copper pipe. Good th e rm a l contact is ensured by the use of zinc oxide paste.

A particularly interesting feature is that the dynami cs can be varied by mounting the tube vertically rather than horizontally. This gives '2 for the price of 1'. The new dynamics arise be cause , when vertical, heat transfer is by both convection and conduction. Load disturbances can be introdu ced conveniently using a hair dryer to blow hot or cold.

Whilst the expe riment was con ceived for multivariable operation, it can of cour se be used with a single heater. Under these circumstances the steady state temperature pr ofi le along the pipe is roughl y exponentiaL With both heaters full on the profile follows a shallow 'u' with the minimum temperature at the centre.

The thyristor control of the heaters introduces a well understood non-linearity which can be linearised by a softwa re look-up table. A More interesting cons traint, also distributed, lies in the difference betwen maximum heating and coo ling rates at any pOint along the pipe.

When mounted vertically the pipe acts as a chimney and this greatly increases the natural h eat loss. As a r esu lt maximum surface temperatures fall. This 'chimney' effect operates whether the lower or upper end is hot. However the results depend on whi ch e nd is hot.

The whole expe riment is computer contro lled using a small, dedicated single board computer built around the z-80 processor. This greatly increases power and flexibility; at the same time it IWC6-P

3449

3450

C. Wang

When the upper end is hot, cold air is rising up the inside of the tube. This removes heat. At the same time heat is being conducted down the pipe and the nett effect is to reduce steady state gain and lengthen the time constant. At first sight results appear to be first order with time delay and it is convenient, if not strictly accurate, to think in terms of time constants. When the lower end is hot the natllral convection carries hot air up the tube. The conduction and the convection are working together rather than in opposition and the result is a shorter time constant but again a lower steady state gain (This is because heat losses are always higher when the tube is vertical rather than horizontal).

RIG DYNAMICS The results of applying full power to one heater, the pipe being at room temperature, are shown in Fig. 2. To the eye these are first order with time delay. Detailed analysis shows that this is not quite true as one might expect for a distributed system. Fig. 3 shows the difference between the response and the best time delayed exponential that can be fitted. The dynamics introduce a rather unusual constraint already referred to in the introduction. The rate of cooling depends on excess temperature and will be higher at high temperatures. Heating, on the other hand, involves conducting heat along the pipe and suffering heat losses along the way. If the temperature at some point is close to the maximum for that point, then the maximum heating rate will be small. From this the reader should be able to appreciate that for every point along the pipe there will he a maximum heating rate and a maximum cooling rate. In genereal these will be different and will depend not only on position but also on the temperature profile. Needless to say such a constraint does not easily lend itself to analysis.

HEATING COILS The heating coils consist of 0.6 m of laboratory heating cahle wrapped around the outside of the pipe and surrounded by thermal insulation. Power input is controlled by thyristors. There is a non-linear relationship between the firing delay and the power. This is shown in Fig. 4. The curve can easily be shown to be part of a sinusoid. Note that there is a inverse relationship: longer delay means less power. The system can be operated with the non-linearity and will work well enough over a narrow set of operating/load conditions. For wider operation the slop~ variations of Fig. 4 dictate a linearisation which may be most conveniently implemented in software. Such a look-up table is fired into epROM to save the user from having to write one.

THE COMPUTER The computer used for this work is a NASCOM 2. It is a single board co~puter constructed around a Z-80A processor. It is supplied with a keyboard and facilities to drive a TV/monitor. A serial interface can be used to store/ retrieve programs using a casette recorder. There is space on board for 4K of RAM and 4K of epROM. A 8K Microsoft BASIC, an uncommitted parallel port and a 2K monitor co~plete the system.

et al. Software to drive the interface is fired into epROM. This is permanently available and allows the user to work entirely at high level when programming. The use of this mixed language approach provides a valuable teaching point.

THE INTERFACE The interface requirements are quite straightforward. There are four current loop inputs from the temperature sensors and two outputs to drive the thyristors. Provision is made to drive a mUltipen recorder from the current to voltage converters. This does not involve the computer. Both input and output interfacing involve some novelty. In the case of the input each channel has its own A/D converter, a ZN427E. All four conversions take place at the same instant al though there is no reason in this case why serial conversion would not have sufficed. The 8-bit outputs are all connected together as a hus onto port A of the PlO. Each reading is then enabled in turn. This means we are multiplexing the digitised signals rather than the analogue inputs. The output circuitry involves generating a delay in the range 0 - 10 ms some 100 times each second (50Hz ac in UK). This was achieved digitally using the counter-timer ci.rcuit (CTC) of the Z-80 family. The arrangement is shown in Fig. 5. This arrangement works autonomously once the delay had been written to the cre using an OUT command. Each thyristor requires two CTC channels and as there are four channels on each CTC, one CTC can control both thyristors. Sampling times are generated by a second CTC. The rig time constants range from 14 to 28 minutes and a 15 s sampling period was used for the initial controller designs based on continuous and sampled data theory.

IDENTIFICATION OF RIG DYNAMICS Initial identification was done on the basis of step tests. This yielded a 4 X 2 matrix of transfer functions for each of the two configurations. (horizontal and vertical). These figures refer to the rig dynamics in still air and are shown in Table 1. In multi variable use both heating coils would be used and for the vertical configuration a further co~plication arises. The greater the heat input, the greater will be the convection. As explained this affects both dynamics and steady state gain. It follows then that the rig dynamics vary as the two inputs change. For example, with both heaters full on the heat loss will be a maximum. The shallow 'u' shaped curve associated with horizontal mOllnting is now lower ann skewed as shown in Fig. 6. From these steady state profiles it shollld be clear that the dynamics have been affected by the level of the input signals. A fuller description of the above work appear in Wang (1983).

facilities

and

MULTIVARIABLE CONTROL The equipment can be used to illustrate many aspects of multivariahle control system design and implementation: only a few will be described here.

A Computer Controlled Teaching Experiment

3451

Using the procedures described above, an approximate, lumped parameter, matrix transfer function model can be obtained, which relates the two inputs to the four outputs. Independent control can clearly only be exercised over only two of the outputs. The first and third or second and fourth may be chosen to introduce asymmetry into the resulting transfer function.

1977) was completed. The resulting controller consists of a high frequency compensator and an approximately commutative controller incorporating proportional and integral action. The simulated responses to separate step changes are shown in Fig. 8, and the actual responses to simultaneous changes in the two reference levels are shown in Fig. 9.

it is Before commencing any design exercises, useful to encourage students to considpr very imposed by the carefully the constraints equipment.

Other design methods, such as Inverse Nyquist Array, (Rosenbrock, 1975) or multivariable Ziegler-Nichols (Kouvaritakis and Kleftouris, 1980) could be used to good effect. It is hoped that the results of a "robust" design procedure based on the work of Davison (1976) will be available for the presentation of the paper.

(1) Only some temperature profiles can be achieved; it is not possible, in the steady state, to have the tube hotter in the centre than it is at the ends, for example (assuming no external heating) •

nonlinear (ii) The control variables have a characteristic in that heating of the bar can be controlled, whereas cooling is determined by the system and its environment; a consequence of this is that there is a degree of interaction in the system which cannot be removed. (iii) The model as used is approximate - it is a linear, lumped parameter model of a nonlinear, distributed system. Any design process therefore, must be considered in this context. These constraints can be exploited in the teaching process. The limitation on the achievable temperature profiles leads to a consideration of functional controllability, introduced by Rosenbrock (1970). A simplified (ie. steady state) version of this concept leads to the following valuable exercise: If Y1 and Y2 denote the steady state values of the step responses due to independent and separate step changes on u1 and u2, determine the region in the Y1-Y2 plane which corresponds to "reachable" steady state outputs, assuming that the inputs saturate at +1. The region is shown in Fig. 7 and clearly indicates that non-interacting control is not feasible.

USER EXPERIENCE The current academic session, 1983/4 is the first in which the equipment has been used as part of our Masters course teaching. User reaction will be reported at the Congress. These will cover the use of the equipment for teaching labs and for demonstrations aimed at the practicalities of computer control as well as the more sophisticated control problems outlined above. During the past few months the rig has been used by a doctoral student concerned with the development of a novel identification procedure. See Zhang (1984). The technique is capable of identifying linear dynamics embedded between two nonlinearities (provided these meet certain conditions) and the rig provided an ideal test-bed for this method. 7.hang's results led to a first order plus dead-time model which agreed well when step responses were compared. See Fig. 10. These results are based on a series of small steps between two operating levels and naturally differ from the results in Table 1 which results from switching to full power when the rig is cold. The rig has also been used by a group of 3rd year Electrical Engineers working on a project. They did the initial appraissal of the vertical dynamics but some of their results were subsequently unrepeatable and cannot be quoted.

The design of effective controllers for the system is more complex and it is worthwhile to emphasise that the linear design methods which are a v ailable are to be applied to a non linear , distributed system, and to attempt to elicit some a priori assessment of their value from the students. The following points can then be made:

The rig will also be used for MSc project work during summer 1984. This will probably take the form of a detailed appraissal of the various strategies outlined above.

(i)Input-output frequency domain design methods can be based on approximate models with some success (see Doyle and Stein, 1981; Postlethwaite, 1982, for further details);

The authors record their thanks to Miss Li 7.hang for the results published in Fig. 10 and to all the other students who have worked on the rig.

(ii)Although the elimination of interaction is one of the main priorities of these methods, and that this will demand the ability to cool the plant, it is unlikely, in view of the above comments concerning non-interaction, that interaction errors would be of importance in the operation of such a process. In fact a plausible reference demand would probably require a simultaneous step change on both inputs.

REFERENCES

1. Doyle J C, Stein G (1981) "Multivariable feedback design: concepts for a classical/modern synthesis" IEEE Trans. Automatic Control, AC-26, I, 4-16.

The design exercise proceeds, therefore, to construct a controller which yields prescribed step responses with (t)leoretically) reduced interaction and acceptably small steady state error, in the knowledge that individual step changes will not be made on the system.

3. Postlethwaite I (1982 ) "Sensitivity characteristic gain loci 11, Automatica, 702-712.

For this paper a design exercise

standard characteristic locus (MacFarlane and Kouvaritakis,

ACKNOWLEDGMENTS

2.Macfarlane A G J, Kouvaritakis B (1977) "A design technique for linear multivariable feedback systems" Int. J. Control 12,6, 837-874

4. Rosenbrock H H (1970 ) "State Multi variable Theory" Nelson, London

of

.!.§.'

Space

the 6,

and

C. Wang et aL.

3452

5. Rosenbrock H H (1975) "Computer aided system design" Academic Press, London

control TABLE 1

6. Kouvari takis B, Kleftouris D (1980) "The characteristic sequences method for multivariable systems" Int J Control 1l. 1 pp 127-152

73 eXj2( -0.96 s) 1 + 14.4s

27 eXj2( -4.7 s) 1 + 25 s

7. Davison E J (1976) ''Multi variable Tuning Regulators: the feed forward and robust control of a general servomechanism problem" IEEE Trans Automatic Control AC - 21 pp 35 - 47.

50 eX!2( -1.8 s) 1 + 18 s

39 eXj2( -2.78s) 1 + 19.4 s

36 eXj2( -2 . 75 s) 1 + 20.5 s

59 eXE( -1.55 s) 1+17.8s

27 eXE( -3.75 s) 1 + 28.3 s

83 eXj2( -0.65 s) 1 + 14 s

8. Zhang L (1984) "Linear and non linear identification using square waves" PhD thesis submitted to Univ. of Bradford, UK, Jan 1984. 9. Wang C (1983) "A development of the microcomputer control experiment facility" Research report no. 372, School of Control Eng, Univ of Bradford, UK

4 x 2 matrix of transfer functions tube horizontal - time constants in minutes.

550 400 240

80

FIG.1

ARRANGEME NT OF RIG

i

,[~j ss I

1

5°1

T3

!

4S

1

40J

'; / 25

~ J:

i jd----------~'"~--------~2~U----------3TO----------,~~O----------5'~O-------~ns FIG2

TE'1PERATUR E RESPONSES - TUS' HORIZONTAl RIGHT HAND HEATER

A Computer Controll e d Teaching Experiment

34 53

,I o+-L---.------.-----.-----,,-----~----._----_r---

o

10

F IG_ 3

20

30

MEASURED RESPONSE

40

50

60

COMPARED WITH MODEL RESPONSE

~-------+------------ ------------~

--+-- ----(f"----

240v

ac

r - - - -- -------..,

~?i~'--'--~ 4 MHz '

: Z8 0 A- ClC

c::-~:NC~---'-:'--1 ,

(t-

6;-'Jf--------\.____- -__---' I

I

L

_

FIG.5

c=I:

_ ___________ J

OUTPUT INTERFACE USING CT( TO FIRE THYRIST ORS

70 mins

c.

3454

Wang

et al .

Y2

1

POWER 0·5

o o FIG.4

o o

30

2 Y1

0

90 120 150 180 FI RI NG ANG LE NON-LINEARITY OF OUTPUT THYRISTORS

60

FIG,' REACHABLE REGION OF Y1 Y2 PLANE

T1\

PI PE HOR*ONTAL

It: t

T2

PIPE VERTICAL

o

-

L

0·5 L

DISTANCE ALONG PIPE FIG,6

STEADY STATE TEMP. PROFILES FIG.9

\~ nj-

'1

(a)

Ibl

t SIMULTANEOUS

RESPONSES TO STEPS

'·1

t

h'---

~!odel

11 - - - - - Plant
(c)

5

UJ

T21--+-......:::=="""""'~----~

(d)

FiG. B

iJg ~~S~s~N~~iuT -Ial

0'1

I

'1

model IF= (normali sed)

D 'lL'"-.f~0~-W~'

& :dl " STEP ON 2nd INPUT _ (bl & (cl

.

FIG. 10

i80:)·

exp(-40s) 1

TIC·a l

+

455 s

14J,·I----rEOjl

\EOJ'

time (secs) STEP RESPONSE OF RIG AND MODEL