DOI 10.1007/s00170-006-0843-5
ORIGINAL ARTICLE
Received: 7 April 2006 / Accepted: 16 October 2006 / Published online: 9 September 2007
# Springer-Verlag London Limited 2007
Abstract In this study, a methodology for PLC implemen- methods applied in the industry are intuitive rather than
tation of Supervisory Control Theory is introduced and being formal. For small-sized DES control problems,
realized on a pneumatic manufacturing system. The intuitive methods may yield practical solutions, but as the
implementation methodology resolves the problem of controlled system gets larger and complex, formal methods
avalanche effect and enhances program readability. We need to be applied.
use local modular approach, which exploits modular The supervisory control theory (SCT) introduced by
structure of the plant and of the specifications. Local Ramadge and Wonham [1] provides a powerful framework
modular approach, together with the implementation meth- for control of discrete event systems. The theory enables
odology presented in this study provides an effective way synthesis of closed loop control systems for DESs.
for synthesizing and realizing supervisors for Discrete Although the SCT has received a wide acceptance in the
Event Systems (DES) control problems. The resulting academy and some applications of SCT have been reported
PLC program is also modular in structure, making it in the literature [26, 15], it has not been employed in the
handable for modification and error detection. industry yet. This is mainly due to the difficulties arising in
physical implementation of SCT [4, 7].
Keywords Discrete event systems . Supervisory control Programmable Logic Controllers (PLCs) have been used
theory . Programmable logic controllers . Supervisor design widely in industrial applications for more than 25 years, and
today most of the automated manufacturing systems use
PLCs as control units. Therefore, PLCs can be a potential
1 Introduction physical platform to realize supervisors in the industry.
Finite state automata are used for representing the plant
An important portion of todays manufacturing systems can model and the supervisors in SCT. Implementation of SCT
be classified as event driven systems or discrete event necessitates an appropriate method for developing a PLC
systems (DESs). Although it is possible to analyse and program corresponding to the automaton that represents the
control this class of industrial systems formally, general theoretical supervisor. Therefore implementing the SCT is a
matter of developing an appropriate PLC program, which
. T. Hasdemir (*) : S. Kurtulan : L. Gren will oblige the PLC to behave as an automaton. The
Department of Electrical Engineering, methods for developing PLC codes to fulfill this purpose
Istanbul Technical University,
and the problems that may arise in doing so are discussed in
34390 Maslak,
Istanbul, Turkey [4, 7, 15]. One of the problems frequently encountered in
e-mail: hasdemir@elk.itu.edu.tr programming an automaton as a PLC code is related to
S. Kurtulan undesirable state transitions occurring in the PLC program
e-mail: kurtulan@elk.itu.edu.tr which correspond to the theoretical automaton. This
L. Gren problem is called avalanche effect [7]. In this paper, in
e-mail: goren@elk.itu.edu.tr order to overcome this problem, we formalize a methodol-
374 Int J Adv Manuf Technol (2008) 36:373385
ogy which was introduced and used in a previous work of An automaton, denoted by G, is a six tuple G=(Q, , f,
authors [6]. , q0, Qm) where Q is the set of states; is the finite set of
One of the main difficulties arising in SCT implementa- events. f: QQ is the partial transition function on its
tions is state-space explosion. System models are generally domain. : Q ! 2 is the active event function. (q) is
built as a combination of subsystems and the number of the set defined for every state of G and represents the
states of the global system grows exponentially with the feasible events of q. q0 is the initial state and Qm Q is the
number of subsystems. Computational complexity caused set of marked states representing a completion of a given
by large number of states (may be more than 1020) can task or operation. Automata are generally represented by
make it impossible to design and implement a supervisor state diagrams. Figure 1 shows a simple automaton with
for a given DES control problem. Therefore some formal two states. State 0 with a directed line pointing it is the
and informal techniques are used to reduce computational initial state. State 1 with double circle is the marked state of
complexity either by reducing sizes of the automata or the automaton. Directed lines (transitions) represent transi-
using different control structures comprising more than one tion functions of the automaton. Labels of the transitions
supervisor. Informal techniques generally depend on the correspond to events. The events associated with all the
designers experience and preferences such as ignoring transitions from a state give the active event set of that
some of the details (i.e. some of the states of the physical state.
system) that are not necessary to appear for the given The language generated by G is denoted by L(G) and
control problem [4]. Modular control, as a formal method, defined as L(G)={s *: f(q0,s) is defined}. The language
allows designing multiple supervisors for which control marked by G is denoted by Lm(G) and defined as Lm(G)=
action combination is equivalent to a monolithic supervisor {s*: f(q0,s)Qm}. A DES G is said to be nonblocking if
for a given system [12]. In this way, memory used for LG Lm G. Product and parallel composition opera-
storing states of the supervisor can be reduced. Another tions are defined for expressing two forms of joint
formal method, called Local Modular Supervisory Control, behaviour of multiple automata that operate concurrently.
extending the results of [12], reduces computational Product of two automata, say G1 and G2 is denoted as
complexity and provides significant memory savings by G1XG2 and represents the synchronous behaviour of the
using multiple supervisors and local models of the plant two automata. Thus, an event occurs in the resulting
[13, 14]. A necessary and sufficient condition for local automata if and only if it occurs in both automata. The
modularity is given in this method. generated and marked languages of the resulting automaton
In this study, following some preliminaries of Discrete will be L(G1 X G2) =L(G1) L(G2) and Lm(G1 X G2)=
Event Systems in Section 2, a methodology for generating Lm(G1) Lm(G2), respectively. Parallel composition of
PLC codes corresponding to a given automaton is intro- automata G1 and G2 is denoted as G1||G2. In the resulting
duced in Section 3. In Section 4, an implementation of local automaton common events occur synchronously, while the
modular supervisory control for an educational pneumatic other events occur asynchronously. Therefore, if the event
manufacturing system based on the proposed methodology sets 1 and 2 of the automata are equal then parallel
is presented and a hierarchical control structure for modular composition of G1 and G2 will be equivalent to the product
supervisory control is given. It is shown that modularity of G1 and G2 [8].
condition holds for the problem at hand. Finally, conclu- The supervisory control theory (SCT) uses formal
sions are given in Section 5. languages to model the uncontrolled behaviour of discrete
event systems and specifications for the controlled behav-
iour. The objective is to restrict the behaviour of the system
2 Preliminaries and notation to a desired behaviour, which is represented by the
specifications. This is done by disabling some events to
Discrete event systems evolve on spontaneously occurring prevent the occurrence of some undesired strings in the
events. Let be finite set of the events that drive the system. The decision of which event will be disabled is
system. The set of all finite concatenations of events in is made by another simultaneously executing system, called
denoted as *. An element in this set is called a string. The the supervisor which is also represented by an automaton.
number of events gives the length of the string. The string
with zero length is denoted as . A subset L* is called a Fig. 1 A simple automaton c
language over . For a string s *, s denotes the a
prefixes
of s and is defined as s sp 2 : 9t 2 sp t s .
Extending this definition to languages we get prefix closure 0 1
of a language L denoted as L. A language L satisfying the
condition L L is said to be prefix closed [8]. b
Int J Adv Manuf Technol (2008) 36:373385 375
The active event set associated with a state of the supervisor Table 1 Summary of notations
includes the events that are allowed to occur in the Symbol Description
corresponding state of the controlled system.
In SCT, events are divided into two classes as control- G=(Q, , f, , An automaton G with state set Q, event set set
lable events and uncontrollable events. The set of control- q0, Qm) of state transition functions f, set of active events
lable events is denoted by c, while uc represents the initial state q0, set of marked events Qm
L(G) Language generated by automaton G
uncontrollable event set. The supervisor has no effect on
Lm(G) Language marked by automaton G
uncontrollable events, which means that the supervisor s Prefixes of string s
cannot prevent an event of uc from happening. The L Prefix closure of a language L
existence of a supervisor is guaranteed if the desired G1 G2 Product of automata G1 and G2
language satisfies a condition. This condition is called as G1||G2 Parallel composition of automata G1 and G2
the controllability condition and defined as Kuc \ M K L(G1)L(G2) Language obtained by product of automata G1
where K is the language that will be generated under the and G2
control of the supervisor and M is the language generated L(G1)||L(G2) Language obtained by parallel composition of
automata G1 and G2
by the uncontrolled system.
L(S/G) Language generated by a system G under the
The behaviour of a DES G, under the control of supervisor supervision of supervisor S
S is denoted by L(S/G). A language K is called Lm(G)-closed Lm(S/G) Language marked by a system G under the
when the language satisfies the condition K K \ Lm G. If supervision of supervisor S
the desired behaviour KLm(G) is controllable and Lm(G)-
closed, then K LS=G Lm S=G, and this means that
the controlled behaviour is nonblocking. performing programmed logical expressions of Boolean
Modular Supervisory Control guarantees nonblocking of valued signals in a cyclic manner. Therefore, a convenient
DES controlled by multiple supervisors if the modularity method to represent these sets of the automaton in the PLC
condition \ Lm Si =G \ Lm Si =G, holds. Local Modular environment is needed. States can be represented by memory
i i
Control approach extends this result to exploit the modular- bits. If a memory bit corresponding to a state of the automaton
ity of the controlled system G. When a DES G is given as a is set, this means that the realized automaton is in that state.
composition of Gloc,j, j=1,...,m, local modularity condition Events are assumed to be momentary in DES theory.
which is given as mj1 Lm Sloc; Gloc;j m
j j1 Lm Sloc;j Gloc;j is
Intuitively, this assumption can be met by using rising and
equivalent to global modularity [13, 14]. While modelling a falling edges of sensor signals. Falling and rising edges of a
system as a combination of subsystems, local modular signal is detected by comparing the logical value of the signal
approach uses product system representation (PSR) of the between previous and current scan cycle. If a change from
global system [12, 14]. In the PSR, subsystems are modelled logical false to true (true to false), rising edge (falling edge)
by asynchronous automata. will output a value of logical true for one scan cycle time,
To help reading, a summary of notations is given in which is the shortest possible period in the PLC environment.
Table 1. The next step is to define transition functions in the PLC
In the next section, we develop a methodology which language. This can be done using Boolean AND operations
enables expressing a given automaton in logical domain, in and SET/RESET functions. Boolean AND operation is used
particular as a PLC program. for memory bits representing the current state and memory
bits representing the events which cause a transition from this
state. The result of AND operation determines whether the
3 Expressing automata in logical domain transition condition is satisfied. If satisfied, current state is
reset and next state is set by the use of SET/RESET functions.
In order to realize a given automaton using PLCs, states, An example is given in Fig. 2. In the LAD program of
events and state transition functions of the automaton should Fig. 2b, q1, q2 and q3 are memory bits representing the states
be defined in PLC language. IEC 61131-3 standard defines of the automaton in Fig. 2a, while 1, 2, 3 and 4
the graphical and textual languages for PLCs [9]. Among correspond to signals whose rising edge represents the
these, Ladder Diagram (LAD) is a graphical language events of the automaton.
which is traditionally preferred by the practitioners.
Therefore, we will use LAD to program a given state 3.1 The avalanche effect problem
machine. For detailed information about PLCs and Ladder
Diagram, the interested reader is referred to [10, 11]. Although the above approach is straightforward and easy to
States, events and state transition functions of an autom- apply, it may yield an incorrect realization depending upon
aton are simply mathematical sets, and a PLC is a device the structure of the given automaton. This incorrect
376 Int J Adv Manuf Technol (2008) 36:373385
(a) (b)
behavior is due to the occurrence of undesirable state shows that the method based on reversing the networks
transitions of the realized automaton and is called avalanche fails when there exist transitions between two states of an
effect problem [7]. Consider the automaton and its LAD automaton in both directions with the same event.
realization in Fig. 2 and suppose that the automaton in In Sect. 3.2, we introduce a methodology for realizing a
Fig. 2a is in state q1; therefore bit q1 is set in its LAD given automaton which constitutes a general solution for
realization. On the occurrence of event 1, the automaton the avalanche effect problem in a systematic way and
transits to state q2 and PLC program sets q2, resets q1. provides an advantage in program readability and memory
Normally, the automaton stays in state q2 until another 1 saving in many cases.
event occurs. However, when the second network is
executed just after the first network, the PLC program of 3.2 Methodology for PLC realization
Fig. 2b will immediately jump to q3, since q2 is set and
rising edge value of signal 1 is still true. Therefore, the When SET and RESET functions are used, these functions
behavior of the PLC realization in Fig. 2b is incorrect. We appear in more than one network to program all transition
can conclude from this example that, for a given automa- conditions related to a single state. For example, in Fig. 2b,
ton, if successive occurrence of an event causes successive transition conditions of state q2 necessitate using SET or
state transitions, the avalanche effect problem is inevitable RESET functions four times. Apparently, this reduces
with the programming approach described above. program readability. Furthermore, depending upon the
In [7] a methodology based on reversing the order of PLC being used, SET and RESET functions may occupy
ladder diagram networks for solving this problem is a considerable amount of program memory in the PLC as
discussed. However, this methodology is highly dependent compared to the standard bit logic operations. In this
upon the problem at hand, and may fail in some cases. As subsection we will develop a programming technique
an example, a simple automaton which may be used for which does not use SET and RESET functions and renders
detecting event pairs of 1 is given in Fig. 3. Obviously, 1 a PLC program without avalanche effect problem. In the
causes the avalanche effect problem: when state q1 is
active, an occurrence of 1 causes a transition to q2 and
then back to q1 in the same PLC cycle. If the method
Fig. 3 An automaton with ava-
lanche effect problem
1
described above is utilized, arranging the networks in
reverse order prevents a transition back to q1, but in this q1 q2
case the problem occurs when state q2 is active: A 1 event
causes a transition to q1 and then back to q2. This example 1
Int J Adv Manuf Technol (2008) 36:373385 377
following, we will introduce the methodology in a formal Cause a Transition from State qj to State qi and is defined
way. The methodology will also be considered from a by
practical point of view within the examples provided in this
IT s i; j k 2 Is js k 2 qj ^ k 2 ISs i ; 8i; j
section.
As a first step toward the development of the method- 2 ISq ISq 4
ology, we will try to realize SET and RESET functions by
standard bit logic operations. Let us denote the SET
condition of a logic variable q by S, and RESET condition Notice that, IT s i; j may be empty for some combina-
by R. Representing current and next values of q by q(k) and tions of i and j.
q(k+1), respectively, it can easily be shown that the logic
function Definition 4 Given an automaton with state transition
function f: Q Q, and active event function
qk 1 S qk :R0 1 : Q ! 2 , where Q q1 ; q2 ; :::; qNq is the set of states
and f1 ; 2 ; :::; N g is the set of events. Event Index
can be used to set q by S, and to reset it by R, where + Set for Transition Conditions from State qi is defined by
corresponds to OR, . corresponds to AND operations, and
R means inverse of R. This logic function can be used for IR i j 2 I jj 2 qi ; 8i 2 Iq 5
realization of the rules defined by state transition function
of a given automaton. In order to translate state transition
In the following, we give an example to clear the
function into logical domain in terms of SET (S) and
meaning of the definitions.
RESET (R) conditions of Eq. 1, some definitions will be
given below. In these definitions, we use the index sets Iq =
3.2.1 Example 1
{1,2,...,Nq} and Is f1; 2; :::; Ns g for states and events of
the automaton, respectively.
Consider again the automaton in Fig. 2a. State and event
index sets of the automaton can be picked as Iq={1,2,3} and
Definition 1 Given an automaton with state transition I f1; 2; 3; 4g, respectively. By using Definitions 1
function f: QQ, where Q q1 ; q2 ; :::qNq is the set
P through 4 for state q2, the following index sets can be
of states and fs 1 ; s 2 ; :::; s Ns g is the set of events. We
obtained:
define State Index Set for Transition Conditions to State qi
State Index Set for Transition Conditions to State q2:
by
ISq(2)={1,3},
ISq i j 2 Iq 9k 2 Is ; f qj ; s k qi ; 8i 2 Iq 2 Event Index Set for Transition Conditions to State
q2 : IS 2 f1; 3; 4g, Index Set of Events That Cause a
Transition from State qj(jIq) to State
Note that, ISq(i) is the set of indices of the states from
q2 : IT 2; 1 f1g; IT 2; 2 ; IT 2; 3 f3; 4g,
which a transition to state qi is feasible.
Event Index Set for Transition Conditions from State
q2 : IRs 2 f1; 2g.
Definition 2 Given an automaton with state transition It has to be noted that, although the definition of an
function f: QQ, where Q q1 ; q2 ; :::; qNq is the
automaton includes the initial state and the set of marked
set of states and f1 ; 2 ; :::; N g is the set of events.
states, we have not taken them into consideration in the
We define Event Index Set for Transition Conditions to
above definitions, since we are primarily focused on state
State qi by
transitions. However, for a complete realization of a given
ISs i j 2 Is j9k 2 Iq ; f qk ; s j qi ; 8i 2 Iq 3 automaton, initial state should also be taken into account.
As we will discuss shortly, initial state can easily be
programmed by setting a memory bit at the start-up of the
Similar to Definition 1, ISs i represents the set of PLC. For the case of marked states, there is nothing to do in
indices of events by which a transition to state qi is the realization stage, since marked states are used for the
possible. validation purposes in the design procedure rather than
realization.
Definition 3 Given an automaton with state transition Note also that, for simplicity, we use the same notations
function f: Q Q, and active event function for the elements (i.e. events and states) of a given
: Q ! 2 , where Q q1 ; q2 ; :::; qNq is the set of states automaton and their corresponding logic variable represen-
and f1 ; 2 ; :::; N g is the set of events. The follow- tations as in the example of Fig. 2. The meaning of the
ing index set corresponds to the Index Set of Events That notation can be distinguished from the context or from the
378 Int J Adv Manuf Technol (2008) 36:373385
In the following section we apply the methodology The order of assembly is as follows. First a base arrives at
obtained in this section for the supervisory control of a the assembly point. Then a bearing is inserted into the base.
pneumatic manufacturing system. Following insertion of the bearing a shaft is inserted into the
bearing. And finally, a cover is placed onto the base.
The original control algorithm provided by the vendor
4 The pneumatic system allows only one rotary mechanism in an assembly process.
Also, picking up and insertion operations of the compo-
The pneumatic system (SMC-MAP 205) shown in Fig. 8 is nents are done sequentially causing additional decrease in
a flexible automation mini-cell built for educational efficiency. The purpose of this study is to minimize the
purposes comprising pneumatic manipulators and a PLC average time spent during the manufacturing of an
(Siemens S7-200). It demonstrates the assembly of a rotary assembled mechanism by an efficient operation. There are
mechanism composed of a base, a bearing, a shaft and a two steps to increase efficiency: One is to allow the system
cover. Assembly of the rotary mechanism is carried out by to work on more than one product simultaneously, and the
means of three manipulators and four cylinders. We will other is picking up a supplied component immediately,
call the manipulators as Manipulator E, H and K. therefore making the component ready for assembly before
Manipulator E is used for picking up the bearing and insertion/placement operation of the component begins. It is
inserting it into the base. Manipulator H carries out the also necessary to prevent a possible collision of the product
process necessary for the assembly of the shaft by picking components, i.e. bases.
up and placing it inside the previously inserted bearing. The
task of Manipulator K is to pick up and place the cover 4.1 Modelling and control
onto the base after the shaft is inserted into the bearing. The
four cylinders are called Cylinder A, B, C and D. The model of the uncontrolled system can be built in
Cylinder A is used for feeding the base to the test point. different levels depending upon the control purpose. A low
Cylinder C tests a possible incorrect position of the base. level model gives detailed information of the system such
The task of Cylinder B is to move the tested base to the as sensor readings, actuator status and deals with opera-
assembly point. Finally, Cylinder D is used for ejecting the tional procedures [5, 15]. However, this kind of modelling
assembled mechanism. If the base fails the test carried out is not suitable for large-scale control problems, since the
by Cylinder C, then Cylinder D ejects the base before the model may become extremely large. Therefore, in this
assembly process begins. study modelling is done at a higher level, which defines
Figure 8b gives a schematic representation of the system. start and end operations of subsystems. Each of the lower
The supply mechanisms of the components are beyond the level control algorithms responsible for operating its
scope of this study and we assume that the components are corresponding subsystem is also developed using formal
supplied by a mechanism not modelled here. methods [5].
In the modelling stage, decomposition of the global system corresponding assembly component. The second start
into subsystems exploits physical decomposition of the operation is denoted by Y2 and represents start of
system. Therefore, there are seven models corresponding to insertion/placement operation of the component. Y1 and
the four cylinders and the three manipulators. Also there are Y2 are used to denote the end of picking up and insertion/
four more models, which describe existence and absence of placement operations, respectively. Figure 9c shows the
the supplied components. automaton models of component existence and absence.
Figure 9a shows the cylinder models. For x{A,B,C,D}, The uncontrollable events br, sh, bs and cv correspond to
the controllable event X represents the start operation, the existence of bearing, shaft, base and cover, respectively.
while the uncontrollable event X represents the end Cylinder models and manipulator models together with
operation of the corresponding subsystem. The uncontrol- component existence/absence models represent the Com-
lable events BO and BNO appearing in the model of posed System Representation [14] of the global system. In
cylinder C represent the test results of the base. If the base the Product System Representation, the following subsys-
position is correct then event BO is generated, if not event tem models should be obtained by parallel compositions.
BNO is generated.
Manipulator models are given in Fig. 9b. There are two GAbs GA kGbs ; GEbr GE kGbr
different start and end operations defined for each manip- GHsh GH kGsh ; GKcv GK kGcv
ulator. The first start operation is denoted by Y1, Y{E,H,
K}, and this matches to start of picking up operation for the
Table 2 Local systems and local specifications controllability and modularity have been performed by
Local System Model Local Specification
UMDES-LIB which is a software package developed at the
University of Michigan for performing operations on finite
Gloc,a0 =GAbs||GC Hloc,a0 =OS0||Gloc,a0 state machines (available at http://www.eecs.umich.edu/
Gloc,a1 =GB||GC Hloc,a1 =OS1||Gloc,a1 umdes).
Gloc,a2 =GB||GC||GEbr Hloc,a2 =OS2||Gloc,a2 It can be shown that each local specification is
Gloc,a3 =GEbr||GHsh Hloc,a3 =OS3||Gloc,a3
controllable with respect to its corresponding local system.
Gloc,a4 =GHsh||GKcv Hloc,a4 =OS4||Gloc,a4
Therefore, supervisors Sloc,x, x={a0,a1,a2,a3,a4,a5,a6,b0,
Gloc,a5 =GB||GC||GD||GKcv Hloc,a5 =OS5||Gloc,a5
Gloc,b0 =GAbs Hloc,b0 =PS0||Gloc,b0 b1,b2,c0,c1}, can be computed directly from their respec-
Gloc,b1 =GEbr Hloc,b1 =PS1||Gloc,b1 tive local specifications.
Gloc,b2 =GHsh Hloc,b2 =PS2||Gloc,b2 Local specifications are obtained by parallel composition
Gloc,b3 =GKcv Hloc,b3 =PS3||Gloc,b3 of generic specifications and local system models. There-
Gloc,c0 =GAbs||GB Hloc,c0 =CPS0||Gloc,c0 fore, in the realization stage, when generic specifications
Gloc,c1 =GB||GD Hloc,c1 =CPS1||Gloc,c1 are considered as local supervisors and are operated in
parallel with the corresponding local systems, it is
guaranteed that the resulting behaviour will be equivalent
There are three groups of generic specifications to the behaviour determined by local specifications.
corresponding to the desired behaviour of the system. The Figure 11 shows three of the 12 local supervisors as an
first group of specifications, shown in Fig. 10a, are called example. The labels appearing on some of the states of the
ordering specifications (OS) and manages the operation of supervisors correspond to enabling signals of the control-
subsystems in desired order. Depending upon the test result lable events as defined in Section 4.2.
obtained by Cylinder C, Manipulator E or Cylinder D may At this point, it might be interesting to calculate the
be started following the end operation of Cylinder B. This supervisor that would be realized if a monolithic supervisor
choice is done by OS2 and OS5. The second group of design approach had been taken. This monolithic supervi-
specifications forces the manipulators to pick up the sor would be obtained by calculating the parallel compo-
supplied component immediately and make the components sition of the 12 local supervisors. Calculations by the
ready for the next mode of operation, which is called software tool show that this monolithic supervisor would
insertion/placement operation. These specifications are have 20992 states, and approximately 200000 transitions.
called preparation specifications (PS) and are given in This calculation shows that in many cases it might be
Fig. 10b. The last group of specifications shown in Fig. 10c impossible to design and realize a supervisory control
prevents possible collision of two bases, which may occur application if a monolithic approach is taken.
in the test point or assembly point. These specifications are To s h o w t h at l o c a l m o d u l a r i t y c o n d i t i o n
called collision protection specifications (CPS).
m
j1 Lm Sloc;j Gloc;j mj1 Lm Sloc;j Gloc;j holds for the prob-
As a next step in the local modular control approach,
lem at hand, it is necessary to perform several operations on
local models and the automata that mark the local
specifications of the system are built as in Table 2. The
computations necessary for Table 2 and verification of
automata corresponding to local supervisors and local languages given in the modularity condition by using
system models. Local modularity condition is expressed executable co_acc.exe. The executable par_comp.exe
based on marked languages. Therefore, all the calculations is used to calculate the parallel compositions appearing in
have been performed using the automata corresponding to the modularity condition. As a last step equiv.exe of
these languages. For the computation of automata that UMDES_LIB has been used to check if the modularity
correspond to local languages under the control of super- condition holds.
visors, the executable par_comp.exe of UMDES_LIB has
been used. 4.2 Implementation
For a nonblocking automaton, the prefix closure of the
language marked by the automaton is equal to the In the implementation stage, we use the structure shown in
language generated by the automaton. And for a coacces- Fig. 12. In this structure, modular supervisors constitute the
sible automaton, prefix closure of the marked language highest level of hierarchy and they interact with the low-
always equals the generated one, since a coaccessible level control algorithms, which define the operational
automaton is always nonblocking [8]. This fact has been procedures of the real system. The task of low-level
applied to calculate the prefix closures of the marked interface is to convert responses obtained as sensor signals
Int J Adv Manuf Technol (2008) 36:373385 385
into events and to convert low-level enabling signals into ered as a new definition of automata in a logical domain.
physical outputs that drive the real system. Such a definition of automata would be very useful as it
Modular supervisors update their states when the high- would skip the need of a translation to logical domain
level events occur. When modular supervisors update their where realization generally takes place.
states, they also update the enabling signal information sent
to low-level control algorithms. Low-level control algo- Acknowledgments This work was partially supported by SMC-
ENTEK Company. The authors also thank Neslihan S. Sengr for her
rithms send high-level events corresponding to these comments on the manuscript.
enabling signals back to modular supervisors as soon as
the enabling signals are processed by the plant. This feed
back structure for high-level events ensures that modular References
supervisors update their states only if the plant processes
the enabled signals. This is also compatible with SCT, 1. Ramadge PJ, Wonham WM (1987) Supervisory control of a
which assumes that events are generated by the plant. class of discrete event processes. SIAM J Control Optim 25
We will explain the realization methodology on supervi- (1):206230
sor Sloc,c0 shown in Fig. 11 using the methodology 2. Balemi S, Hoffmann GJ, Gyugyi P, Wong-Toi H, Franklin GF
(1993) Supervisory control of a rapid thermal multiprocessor.
introduced in Section 3.2. Figure 13 shows the ladder IEEE Trans Automat Contr 38(7):10401059
diagrams related with the supervisor Sloc,c0. In Fig. 13a, 3. Brandin BA (1996) The real-time supervisory control of an
state transition of Sloc,c0 is programmed. Notice that it is not experimental manufacturing cell. IEEE Trans Robot Autom 12
necessary to program the self loop of the automaton. (1):114
4. Leduc RJ (1996) PLC implementation of a DES supervisor for a
Figure 13b shows the LAD program which generates Sloc, manufacturing testbed: an implementation perspective. Masters
c0s enabling signal for A. The LAD given Fig. 13d is thesis, University of Toronto, Toronto, Canada
programmed to enable A if both of Sloc,b0 and Sloc,c0 5. Hasdemir T, Kurtulan S, Gren L (2003) Supervisory control of a
enables it. Figure 13c shows the state transition program pneumatic system using PLC. Proc. third international conference
on electrical and electronics engineering, ELECO, Bursa, Turkey
code of the low-level control algorithm for Cylinder A. As 6. Hasdemir T, Kurtulan S, Gren L (2004) Implementation of local
can be seen from the code, when transition to A2 occurs by modular supervisory control for a pneumatic system using PLC.
the enabling signal en_A, A is generated. Note that the Proc.7th Int. workshop on discrete event systems (WODES),
events A_f and A_b correspond to forward and backward Reims, France
7. Fabian M, Hellgren A (1998) PLC-based implementation of
positions of cylinder A and are obtained in the interface by supervisory control for discrete event systems. Proc. 37th IEEE
rising edges of sensor signals. conference on decision & control, Tampa, Florida, USA
8. Cassandras GC, Lafortune S (1999) Introduction to discrete event
systems. Kluwer Academic Publishers, Massachusetts, USA
9. IEC 61131-3 (2003) Programmable controllers-part 3: program-
5 Conclusion ming languages
10. Bolton W (1997) Programmable logic controllers: an introduction.
In this paper, a formal methodology which enables Butterworth-Heinemann
11. Kurtulan S (2006) Industrial automated systems (In Turkish).
expressing a given state machine in logical domain has
Istanbul Technical University Press, Istanbul
been introduced and applied for supervisory control of a 12. Wonham WM, Ramadge PJ (1988) Modular supervisory control
pneumatic manufacturing system. We have used local of DESs. Mathematics of control of discrete event systems 1
modular approach, which exploits modular structure of the (1):1330
13. Queiroz MH de, Cury JER (2000) Modular control of composed
system and of the specifications. A hierarchical control
systems. Proc. ACC. Chicago, USA
structure using the presented implementation methodology 14. Queiroz MH de, Cury JER (2000) Modular supervisory control of
is introduced. The introduced methodology constitutes a large scale discrete-event systems. Proc.5th Int. Workshop on
general solution for the problem of avalanche effect, Discrete Event Systems (WODES), Ghent, Belgium
15. Queiroz MH de, Cury JER (2002) Synthesis and implementation
enhances program readability and provides considerable of local modular supervisory control for a manufacturing cell.
memory savings in many cases. In particular, the approach Proc.6th Int. Workshop on Discrete Event Systems (WODES),
used for the implementation methodology could be consid- Zaragoza, Spain