Experiences in the Teaching of Sequencing Control

Experiences in the Teaching of Sequencing Control

Cop\"l'ighl © I F:\C Trclld ... ill CO IlI rol ;111 - et-Bf Fig. 3: Screen of decision table analysis program 23 Expcricnces in the Teaching ...

874KB Sizes 2 Downloads 45 Views

Cop\"l'ighl

©

I F:\C Trclld ...

ill

CO IlI rol ;111<1

\k :lsll r , IlH:1l 1 Ldll t · ~ lli ()ll. S\\· ~ lI h t' ~1.

l·l-\. . I q~K

EXPERIENCES IN THE TEACHING OF SEQUENCING CONTROL W. Schaufelberger /-'III/I'HI-ll'lllnllll IDA. SU'IS.I I-'I'dl'lll/ IIISIIIIIII' of Tn//lw/ug, (LT/I) lllli,h. CH-S(),)] £.II/"I,h. SU' il:I'I/lI lId

a1

Abstract: Based on the view that sequencing control is just as important as feedback control, a one term course on the former has been taught at ETH Zurich for about ten years . The course, consisting of lectures and computer based exercises is described in the paper together with a set of suitable laboratory experiments.

b1

d1

Keywords: Sequencing Control, State Machines, Teachware, Laboratory Experiments, Prolog. c1

INTRODUCTION / MOTIVATION Fig. 1: Structure of a simple sequencing system

There is a sharp contrast between the teaching of feedback control systems and the teaching of sequencing control systems.

Based on this observation, three basic chapters are introduced:

Feedback control of continuous and discrete time systems is regularly taught in almost all mechanical, electrical and chemical engineering curricula. Teaching in this field can be heavily based on linear systems theory and techniques.

a) Petri-nets to handle state machines (other representations might do just as well) b) Decision tables to treat decision situations in states c) Expert systems for planning and design

Sequencing control systems are at least as important in practical control engineering. Start-up, shutdown and emergency or exception operations are just a few examples where sequencing becomes important in control. In addition, many systems do exist where sequencing control is completely dominating, i.e. traffic lights.

Additional chapters may include: Man-machine communication, overview of artificial intelligence, social effects of automation. The teaching is done as follows: The basic principles of the corresponding techniques are introduced in the classroom. Computer programs in Prolog (shells) have been prepared allowing the student to study the basic concepts in computer experiments. Laboratory exercises have also been set up, where sequencing control systems can be designed and operated. The course and the laboratory are both optional and separate teaching units.

Despite this fact, sequencing control is not or only minimally taught in most curricula. A sequencing control course (with a total of 24 hours) has been given at advanced undergraduate levels for nearly ten years at the ETH Zurich. Some of the experience gained will be summarized in the paper. Two fundamental concepts have emerged by considering a sequencing system as a state machine: 1)

THE CORE CONTENT OF THE LECTURES

States and state transitions do play a dominant role . Parallel operation, synchronization etc. must be handled. It can easily be shown that even the most simple systems of this kind are necessarily nonlinear.

The core content may be summarized as follows: Representation of parallel systems using Petrinets: Parallel operation; Petri-nets fundamentals: states, transitions , firing rules; Elementary applications: mutual exclusion, producer-consumer, deadlocks; States and reachability; Practical applications: elevator, handshake .

2) Decisions must be taken to find the next state if more than one possibility exists. Planning is in some cases necessary. TCME-C

21

22

\\',

Slhallklbcr~l'J'

Decision tables: Definition; representation; formal analysis: redundancy, contradiction, inclusion etc, of rules; simplification (in analogy to Carnaugh-maps); examples: supervisory control, etc. Knowledge based systems (Expert Systems): Structure; forward- and backward-chaining; relation to decision tables; knowledge representation: facts, semantic nets, rules, frames, logic; knowledge acquisition and editing; a simple shell; commercial products

Overview on artificial intelligence Social affects of automation: division of labor between man and machine (Rosenbrock), safety control of robot systems The computer exercises are based on the following set of Prolog programs: Petri-net simulator Petri-net reachability tree computation Decision table analysis (M, Miiller, ETH) Expert system shell (backward inference) (C. Muller, ABB) Expert system shell (forward inference) Block world planning (M. Miiller, ETH)

A detailed description of the contents of decision tables and knowledge based systems may be found in Glattfelder et al. (1987). Additional topics that may be included (voted by the students):

The students are asked to carry out exercises of the following nature:

Man-machine communication: user's model of the systems, its use in design and operation File

PROlOG

Petri-net: Simulation and analysis of simple nets such as producer-consumer or 3 wire handshake . Fig. 2 shows a simple example on the screen.

MockWrite

DMTerminal

D

bspl.pdb

ti te I ( . Be i sp i ell' ),

Erreichbarkeitsbaum von (0) Zustandsvektor offene Transitionen gewcihlte Transition (1) Zustandsvektor offene Transitionen gewcihlte Transition (2) Zustandsvektor offene Transi tionen gewcihlte Transition (1) Zustandsvektor offene Transi tionen gewcihlte Transition (2) Zustandsvektor offene Transi tionen gewcihlte Transition (3) Zustandsvektor offene Transitionen gewcihlte Transition (2) Zustandsvektor

Beispiel 100 [t2, t1 J t2

/+ eingabe des zustandsvektors in der folgenden form +/ /+ I iste von listen mit nomen und anfangswerten von zustaenden +/

[t3 J 1 t3

zustand([ [pl,lJ, [p2,OJ, [p3,OJ

°

[t1 t1

° ° 1 --- Terminal J

°

1 w [t2, t1 J t2

°w ° w --- Dupl ika w ° --- Dup I i kat

[t3 J t3

J) ,

/+ eingabe der transitionen in der folgenden form +/ /+ I iste von listen mit drei angaben name der transition, +/ /+ I iste der zufuehrenden, I iste der wegfuehrenden zustaende +/

trans it i onen( [

t1 ,[pI J

Anzahl Zustandsvektoren Anzahl Terminierungs-Zustande

,

[pl,p2J t2 ,[pI J [p2,p3 J t3 , [p2,p3 J [p3 J

[t1 J t1

J,

,

J,

,

J J),

5

Fig. 2: Reachability tree of Petri-net example Decision tables : Analysis and simplification of simple switching systems such as heating or elevator control systems . A simple example is given in Fig, 3,

Prolog et-Bf a n n n y y y y y

y n - y y - y y n - n y n n n y x -

x -

x -

x x

..

x x - x x x x -

- - - (

x -

- c ( r

-

> -

et-Bf

Fig. 3: Screen of decision table analysis program

23

Expcricnces in the Teaching of Se4uencing Control

Expert System Shell : Use of heuristic rules for three term controller structure design and calcul•

Kontrolle

s 2 . 00

-""

Regler

--

Strecice

ation (Fig. 4). Diagnosis problems, i.e. supervisory control of heating systems. Design calculations.

PROlOG o.

u

(\r~C

...

y

....

2 . 00

..

.. ..

(v'--

~

0 00

0 . 00

......

DMTer'llinal :=!: 0

7- f i nde regler . Muessen s ta t i onaer-e Fenler vern i nder' t werden 7 [j a, ne i n J ==» ja . 1st eine kurze Einsenwingzeit wientig 7 [j a, ne i n J ==» j a . 1st die Senrittantwort verfuegbar 7 [j a, ne i n J ==» ja.

Zeit

~

len nabe folgendes Resul tat regler = pid-ehien-hrones-reswiek Begruendung : [regell0J yes

{}

7-

~O

01 .tei00 I

Fig. 4: Simulation and expert system shell.

Block world planning: Get acquainted with a simple planning system similar to the one describe d in Winston and Horn (1984). A screen dialog follows:

a b c d e T T T T T T ?-

yes

reserve(tl).

move a onto t6 Modula -- Prolog

VI.3 86 - 07 - 22 (C) Brown, Boveri & Company , Limited, Baden / Switzerland

Welcome to the Macintosh- version of Modula--Prolog! ?-

[a rmbl ock I .

Blocks World Manipulations

b c d e a - T T T T T

yes

?- reserve (t2) .

move b onto a b c d e a - - T T T T

yes

?- P (d, a) •

Typing help will give the following: Here are the main blocks world commands and some short cuts puton(a,b)

generates the single steps needed to put a onto b listSteps displays these steps on the screen ds displays the present state of blocks p(a,b) is like puton (a,b), listSteps, ds reserve (tl) clears the table place tl and blocks it free(tl) is the reverse of reserve tower will stack all blocks onto one another Loading , please wait ... yes ?- ds.

move b onto c move d onto a b c - - T

T

d e a T T

yes

?- p(c, a) . move d onto t4 move b onto d move c onto a

-

-

b c d e a T T T T

yes

?-

A similar set of programs is also vailable in Lisp (XLisp 1.6).

24

\c\'. Schaufelberge r

WHY PROLOG Prolog was chosen as the basic language for the implementation of the computer based exercises mainly for the following reasons: the declarative style of programming is well adapted to the basic structure of Fig. 1; the environment is interactive, students have easy and fast access to all procedures in a program; the shells are short, 5 to 10 pages per shell, the code can be studied and changed by the teachers and students; the Modula-Prolog system allows easy access to Modula-2 programs; object centered programming can be introduced. This technique may quickly gain importance in the field.

LABORATORY EXPERIMENTS For a more detailed description see Mansour et al. (1981). Typical processes used in the laboratory for sequencing control are: traffic lights elevator coin exchanging machine high bay warehouse robot motion planning As an example, the elevator experiment consists in the following: determine the states of the system determine decisions in the states program a commercially available PLC to operate the model with three floors A suitable state representation is shown in Fig. 5.

In contrast to this, the programs for the feedback control exercises are all programmed in Modula-2.

floor 3

floor 2

floor 1

r2

11

r3

o

0

12

13

000 Fig. 5: Possible state diagram for an elevator in a three storey building: call commands rl, r2, r3; command buttons in elevator 11,12,13

Most of the decisions are straightforward, the only problem worth some investigation is the state 'wait 2'. The decision to go up or down must be based on the internal and external buttons pressed and probably on history, to avoid oscillations between two states only.

practical application than in theory. This has influenced the content in that an attempt is made to present only the theories really needed. Results in the examinations show that the material can fairly easily be mastered by undergraduate students. CONCLUSION

EXPERIENCE The optional course on sequencing control (Automatisierungstechnik II) is usually taken by 30-40 students, especially students who are more interested in

Sequencing control should play a more important role in control engineering education. A course given at ETH Zurich for some time is described, showing that basic materi&l and ideas worth teaching may be found in the field.

Expe riences ill th e

T e achill~

REFERENCES CHARNIAK, E., MCDERMOTT, D. (1986): Introduction to Artificial Intelligence. Addison-Wesley. CLOCKSIN, W.F., MELLlSH, C.S. (1981): Programming in Prolog. Springer. FASOL, K.H., ed. (1979): Entwurf digitaler Steuerungen. Springer-Verlag. GLATTFELDER, A.H., REIMANN, K.A., ITTEN, A., SCHAUFELBERGER, W. (1987): Wissensbasierte Systeme (Expertensysteme) und ihre Anwendung. SGA-Zeitschrift Nr. 2, pp. 10-18, Nr. 3, pp . 3-12. HARMON, P ., KING, D. (1985): Expert Systems, Artificial Intelligence in Business, J. Wiley. JOKUTHY, B., SCHUPP, W.: (1976): Anwendung der Entscheidungstabellentechnik. Siemens. KUNDIG, A., BUHRER, R.E. , DAHLER, J. (1987): Embedded Systems. Springer Lecture Notes in Computer Science.

APPENDIX:

of

Se'lllt'll('ill~

COlltrol

MANSOUR, M.A., SCHAUFELBERGER, W., CELLIER, F.E., MAIER, G., RIMVALL, M. (1984): The Use of Computers in the Education of Control Engineers at ETH Zurich. Europ. J . of Eng. Education 9, 135151. MANSOUR, M.A., SCHAUFELBERGER, W. (1981): Digital Computer Control Experiments in the Control Group of ETH Zurich. IFAC World Congress, Kyoto, paper #63.2. PETERSON, J .L. (1981): Petri-Net Theory and the Modeling of Systems. Prentice Hall. RAMADGE, P., WONHAM , W.M. (1987): Supervisory Control of a Class of Discrete Event Systems. SIAM J . Control and Optimization, Vol. 8, No. I, pp. 206-230. SCHAUFELBERGER, W. (1988): Teachware for Control. Draft for Americal Control Conference, Atlanta. STERLING, L ., SHAPIRO, E., (1986): The Art of Prolog. MIT Press. WINSTON, P.H., HORN, B .K.P. (Eds.) (1984): Lisp . Addison-Wesley. WINSTON, P .H . (1984): Artificial Intelligence, Addison-Wesley.

Syntax diagrams of the rule based systems

Rules :

Questions :

Facts :

-I

X

25

~8----8-1

Reason