You are on page 1of 6

IDENTIFICATION OF DISCRETE EVENT

SYSTEMS USING ORDINARY PETRI NETS

Rebiha Bekrar ∗ , Nadhir Messai ∗∗ ,


Najib Essounbouli ∗ , Abdelaziz Hamzaoui ∗ ,
Bernard Riera ∗∗


CReSTIC, IUT de Troyes 9 rue de Quebec BP 396,
10026 Troyes Cedex France
rebiha.bekrar@etudiant.univ-reims.fr

CReSTIC, Université de Reims Champagne-Ardenne,


∗∗

UFR Sciences Exactes et Naturelles, Moulin de la Housse


BP 1039, 51687 Reims cedex 2 France

Abstract: This paper presents an identification method of partially observable


Discrete Event Systems (DES) using ordinary Petri Nets. The proposed method
is absolute, sequential and multiple. It consists in building the compartmental
model, computed off-line, for a DES in a Petri Net (PN) form. The developed
method is based on the use of the input/output sequences constructed during the
system evolution. The proposed algorithm is illustrated by the help of a simulation
example.

Keywords: Discrete Event Systems, Ordinary Petri nets, Identification

1. INTRODUCTION of a controller and a plant running in a closed


loop is proposed in (Klein, 2005). This algorithm,
specially developed for the diagnosis tasks, uses
Identification of a discrete event systems (DES) is a new automata class called Non Deterministic
a process allows to obtain a formal model repre- Autonomous Automaton with Outputs. However,
senting the DES behaviour. Most of studies deal- the behaviour of the considered system can be
ing with this task are based on using automata only modelled by a generator (i.e. produces an
(Biermann and Feldman, 1972; Choi, 1998). Gen- output sequences that only depends on how it is
erally, the objective of these studies is to find controlled internally).
languages in Moore or Mealy machines form
(Kella, 1971; Veelenturf, 1978). However, these Petri Nets (PN) (Murata, 1989; David and Alla,
approaches could not give an explicit representa- 1992) are a useful tool which has been widely in-
tion of all the system states. They are based on vestigated for the supervisory, the control (Ramadge
the minimisation of the states number which can and Wonham, 1987; Giua and DiCesare, 1994)
lead to losing important information about the and the monitoring (Zamai et al., 1998) of DES.
system. Moreover, they allow either to the iden- However, there are no studies treating the iden-
tification of the plant’s model or the controller’s tification problem of DES using PN, except the
model but never to the identification of a DES papers of Meda and co-workers, see for exam-
in a closed loop. Note that a new identification ple (Meda-Campaña and Lopez-Mellado, 2005),
algorithm which can deal with a DES composed where the authors propose to identify DES mod-
elled by an Interpreted Petri Net (IPN). In this The marking M at a given instant describes the
context, the developed methods associate the IPN system state. The evolution of PN marking is
places with the DES output signals and the IPN given by the following state equation:
transitions with the DES input signals. Hence, in
M = M0 + W × V, (1)
the first study (Meda-Campaña et al., 1998), the
proposed on-line identification algorithm has been where W is the incidence matrix, M0 is the initial
devoted to the class of binary IPN. This algorithm marking and V is the firing sequence vector.
is presented as an infinite loop that reads and
The arc weight between a place pi and transition
processes at each time the I/O signals of the con-
tj is noted as w(pi , tj ) and between transition
sidered DES. Then, an asymptotic identification
ti and place pj is noted w(ti , pj ). Each place pi
algorithm adapted to the case of IPN with single
has input transitions which are noted as ∗ pi and
dependencies was proposed in (Meda-Campaña et
output transitions noted as p∗i . Each transition
al., 2000). After developing the passive method
tj has also input places noted as ∗ tj and output
(Meda-Campaña and Lopez-Mellado, 2001), the
places noted as t∗j . Note that, in the case of
authors have adapted the previous asymptotic
ordinary PN the arcs weights are equal to 1.
algorithm to the case of ordinary IPN with com-
plex dependencies (Meda-Campaña and Lopez- Since the identification problem becomes more
Mellado, 2002). Finally, the identification algo- challenging when only partial information on the
rithm that process concurrent DES is presented system states and events are available. This paper
in (Meda-Campaña and Lopez-Mellado, 2005). considers a partially observable DES where, no
direct measurements of some states are available,
Unfortunately, all these algorithms require a pri-
only specified subset of possible events can be
ori knowledge concerning the specification of the
observed and the model structure is not known.
DES, which must be modelled by at least one IPN.
We propose to associate, with each non observable
Therefore, these algorithms can be considered as
state a reachable estimate marking and with each
validation algorithms of the IPN model more than
a non observable event a non observable tran-
identification ones.
sition. For that raison, on one hand the vector
To resolve this problem, we proposed in a previous marking of the DES to be identified will be repre-
paper (Bekrar et al., 2006) an off-line identifica- sented as follows:
tion method that deal with a partially observable
µ ¶
MO (S)
DES using safe PN. This method associates sys- M(S) = , (2)
MŌ (S)
tem states with a PN reachable markings and a
system events with PN transitions. The aim of this the first part represents the marking of the observ-
paper is to adapt this method to identify a DES able places when, the second one represents the
using ordinary PN. In this method a priori knowl- marking of the non observable places. The latter
edge about the system specification is not needed will be estimated basing on the structure of the
and the system to be identified is considered as a identified PN and the observed I/O signals.
black box. On the other hand, the matrix W of the DES to
This paper is organised as follows: some basic be identified will be represented as follows:
definitions about PN are presented in the section
2. Section 3 presents the developed identification · ¸
WPO TO WPO TŌ
approach. Finally, the proposed algorithm is illus- W= , (3)
WPŌ TO WPŌ TŌ
trated with a simulation example in section 4.
where PO (PŌ ) and TO (TŌ ) are the sets of ob-
servable (non observable) places and transitions
2. BASIC DEFINITIONS respectively.

A Petri net is a 5-tuple, PN = (P, T, F, A, MO )


where: 3. THE DEVELOPED APPROACH
P = {p1 , p2 , ..., pm } is a finite set of places, T =
{t1 , t2 , ..., tn } is a finite set of transitions, F⊆ (P × Before presenting the off-line identification ap-
T ) ∪ (T × P ) is a set of arcs (flow relation), proach, we consider the following assumptions un-
A: F→ (1, 2, 3, ...) is a weight function and M0 : der which, the proposed algorithm can be used:
P→ (0, 1, 2, 3, ...) is the initial marking with P ∩
Assumption 1: the considered DES is cyclic and
T = ∅ and P ∪ T 6= ∅.
all its cycles start from the same initial observable
A Petri net structure (P, T, F, A) without any
state.
specific initial marking is denoted by N and a Petri
net with the given initial marking is denoted by Assumption 2: the number of I/O signals in the
(N, MO ) (Murata, 1989). identification data set is sufficient to identify the
considered DES. This assumption is required be- 3.2 Detection of non observable places and non
cause an infinite time horizon is generally needed observable transitions
to observe all the normal behaviours of a system.
The DES to be identified is partially observable
where several states (events) are not included in
In this method we deal with a DES that can be
the identification data set. Therefore, some non
modelled by an ordinary PN without concurrence
observable places (transitions) of the identified
nor conflict. Our identification method consists in
PN must be associated to non observable signals.
constructing the I/O sequences from the finite set
The procedure to obtain these non observable
of identification data and uses these sequences to
places (transitions) is presented as follows:
build the formal model in an ordinary PN form.
Therefore, before presenting the developed identi-
fication algorithm, this section gives some details 3.2.1. Detection of non observable places:
on the construction way of the I/O sequences and in a given I/O sequence δk and after the occur-
explains how we detect non observable states and rence of an event ei which is observable or not,
events. the system changes state from Ei to Ei+1 . Thus,
if we remark that the values of some components
of the vector state Ei+1 are less than their values
in Ei and those of the remaining components are
unchanged, then we can conclude that the system
3.1 Construction of the I/O sequences
is in a non observable state. Mathematically, if we
consider Ei (x) with x is varying from 1 to m the
The identification objective is to construct a be- components values of the state vector:
havioural model in an ordinary PN form. The e
system to be identified is equipped by some ac- ∀Ei (x) ∈ δk , Ei →i Ei+1 ; if Ei (x) < Ei+1 (x)
tuators and sensors, whose corresponding sig- ∀x ∈ [1..l] and if Ei (x) = Ei+1 (x) ∀x ∈ [l..m]
nals are associated to the input and the output then the system is in a non observable state.
system respectively. The PN model is obtained In PN terms, after the firing of a transition ti
by associating the output signals with the PN which is equivalent to the event ei , the vector
reachable markings and the input ones with the marking changes from Mi to Mi+1 . Hence, if we
PN transitions. Since DES are generally asyn- remark that the marking of input places of this
chronous systems, the identification data set is transition decreases by 1 in the marking Mi+1 and
updated when an observable event occurs (i.e., the marking of all remaining observable places is
an input signal is observed) or when the system unchanged then, we detect the existence of non
state changes (i.e., an output signal is observed). observable place. This place will be an input of
Hence, the identification data set, noted CS , is the transition associated with the event before the
an asynchronous succession of states and events: state Ei+1 in the sequence δk and an output of
CS =E0 ei Ei ej ...ek E0 el El Eh em Ep ...en Es . where the transition associated with the event following
Ei ∈ Nm are the system states with i ∈ {0, ..s}, m the state Ei+1 in the same sequence. Finally, the
is the dimension of the state vector and ej are the dimension of the network marking vector will be
observed events with j ∈ {0, ..n}. Since the DES increased by adding a new element representing
to be identified is cyclic (Assumption 1 ), the the estimate marking of the non observable place.
first step of the identification process consists in We can formalised this procedure mathematically
segmenting the identification data set into several as:
sequences, which represent the observed execution ti
cycles. These cycles start from the same initial Mi → Mi+1 : if [Mi+1 (∗ ti ) = Mi (∗ ti ) − 1] and
vector which is the initial observable state and [∀pi ∈ PO , Mi+1 (pi ) = Mi (pi )] then t∗i ∈ PŌ .
will be associated with a set of I/O sequences in
the PN. Each I/O sequence can be represented as 3.2.2. Detection of non observable transitions:
δi = E0 e1 E1 e2 ...ek Ek with Ek = E0 . This means in a given I/O sequence δk , if the system changes
that the identification data set is scanned starting its state from Ei to Ei+1 but no observable event
from the first I/O signal (i.e, the initial state E0 ) takes place then, we detect the occurrence of
until the observation of the next initial state E0 . non observable event ei . Hence, a non observable
Once E0 is observed, the I/O sequence is removed transition ti which, represents this non observable
from CS and affected to the first I/O sequence event, must be added to the actual structure of
(δ1 ). This procedure will be repeated up to the last PN. This transition will be an input of the place
element of identification data set in order to ob- that will receive one token after the occurrence of
tain the other I/O sequences. The I/O sequences this event. In PN terms, we can note:
are used in the next step of the identification
ti
algorithm to obtain the PN structure representing If Mi → Mi+1 such that Mi 6= Mi+1 and ti ∈
/ TO
the behavioural model of the considered DES. then ti ∈ TŌ .
3.3 The identification algorithm sequentially the I/O sequences observed during
the system evolution and, beginning by the same
Input: let S be a partially observable DES and observable initial state. Finally, it is important to
CS its identification data set. note that the obtained PN could not produce more
states than the considered DES. These exceeding
Output: the identified model of the considered states represent the possible wrong trajectories
DES in form of an ordinary PN. that can be followed by the system. Therefore, the
Algorithm transitions sequences characterising these wrong
trajectories could not firing during the system
• Construct Ω the set of the I/O sequences normal functioning.
needed to identify the system from the iden-
tification data set according to the subsection
3.1. 4. AN ILLUSTRATIVE EXAMPLE

• Construct the initial model as follows: To illustrate the proposed algorithm, we consider
a manufacturing system composed of three ma-
(1) Initialise the index of the first I/O se- chines MA1, MA2 and MA3 which are connected
quence: k=1. by a bidirectional conveyor. The displacement of
(2) Build the initial model M0 using δ1 , such pieces between machines is done using pallets.
that each state vector Ei is equivalent to Each piece manufactured correctly and without
a reachable marking Mi and each event manufacturing defect leaves the system by un-
ei is represented by a transition ti . The loading the palette. The system restarts manu-
number of observable places in M0 is facturing by loading new pieces in the palettes.
equal to the dimension of the state vector The pieces manufactured in M3 can be send back
Ei and, the number of observable transi- to M2 or to M1 due to a manufacturing defects.
tions is equal to the number of events in Each arrived piece must pass firstly in M1 then
δ1 . Note that the non observable places it can pass in M2 then M3 or in M3 then M2 .
and transitions are obtained according to The machine M1 must manufacture two pieces at
the subsection 3.2. the same time but MA2 and MA3 can process
(3) calculate the vector marking of the initial only one piece in the same time. Let us assume
model. that the identification data set which, has been
• Updating the initial model as follows: observed during the system evolution is:
         
2 1 1 2 1
Repeat: CS =  0  e1  1  e2  0  e5  0  e1  1 
(1) Go to the next I/O sequence by increas-   0   0  1  0  0
1 1 2 1 1
ing the index sequences: k := k + 1
e2  0  e6  0   0  e4  0  e3  1  e8
(2) Use the sequence δk for updating the
       1  0  
1 0 0
initial model by adding new (observable)
1 2 1 1 1 1
non observable places and transitions as  0   0  e1  1  e2  0  e3  1  e2  0 
mentioned in the subsection 3.2.
0 0 0 1 0 1
(3) Update the network marking by adding   
the estimate marking of non observable 1 2
places. e6  0   0 .
Until: the last sequence of Ω. 0 0

The detection of the cyclic behaviour allows es-


• Calculate the incidence matrix of the identi-
tablishing the following I/O sequences from this
fied model as represented in (3).
data set:

The analysis of this algorithm show that it has the        


2 1 1 2
advantage to be absolute because a priori knowl- δ1 = 0  e1  1  e2  0  e5  0 ,
edge on the internal state of the identified model 0 0 1 0
is not needed to identify the system and DES to         
be identified is considered as a black box. We in- 2 1 1 1 2
corporate progressively the information contained δ2 = 0  e1  1  e2  0  e6  0   0 ,
in the I/O sequences to construct finally a unique 0 0 1 0 0
identified model, which can generate all the be-         
haviours of the real system. So, this method can 2 1 1 1 2
be considered constructive. We can say also that δ3 = 0  e4  0  e3  1  e8  0   0 ,
our method is multiple because it consists in using 0 1 0 0 0
unloaded from the system. Hence, the transition
         
2 1 1 1 1
δ4 = 0  e1  1  e2  0  e3  1  e2  0  t6 is input of p4 and output of p3 . We see also that
0 0 1 0 1 the system change states without occurrence of
any observable event. This shows the occurrence
  
1 2
e6  0   0  . of non observable event which we can called e7
0 0 that explain the loading operation. This event is
Then the set of all the I/O sequences is Ω = equivalent to the non observable firing transition
{δ1 , δ2 , δ3 , δ4 }. Using these sequences, we can con- t7 . It is input of p1 and output of non observable
struct the identified model of this manufacturing place p4 . In this case we update the network
system where the first step consists in building marking vector by adding the estimate marking
the initial model using the first I/O sequence δ1 . of p4 . The update identified model is built by
According to the latter and starting from the adding the new detected non observable place
first element of this sequence which is the ini- and observable and non observable transition as
tial state E0 , we can conclude that the initial showed in figure 2. Note that, the non observable
model contains three observable places that we places (transitions) are depicted as black circles
can respectively called p1 , p2 and p3 . The initial (black bars).
marking of p1 is equal to 2; that indicates the
number of pieces in MA1; and those of p2 and
t5
p3 are null. After the occurrence of the event e1
which is equivalent to the firing of the transition
t1 , the marking of p1 and p2 become equal to 1. P4
This indicate that the transition t1 is input of the
t6
••
places p2 and output of p1 . After the occurrence
t1 t2
of e2 which is equivalent to the firing transition t2 , P1 P2 P3
the marking of p1 remain unchanged, the marking t7
of p2 becomes null and that of p3 is equal to 1.
Therefore, t2 is an output of p2 and an input of
p3 . Finally, due to a manufacturing defect, the Fig. 2. Updated identified model
piece in M3 is sent back to M1 . This explain the
occurrence of e5 which is equivalent to the firing
transition t5 . The system is turned over to its Using the sequence δ3 allows to detect a new ob-
initial state which indicates that t5 is an input servable events e3 , e4 and e8 which are equivalent
of p1 and an output of p3 . According to this first in PN term to the firing transitions t3 , t4 and
sequence, the network initial marking consists in t8 . This represent the execution cycle MA1, MA3
the marking of observable places p1 , p2 and p3 . then MA2. The transition t3 is input of p2 and
The initial identified model compose of these three output of p3 , the transition t4 is input of p3 and
observable places and the observable transitions output of p1 and the transition t8 is input of the
t1 , t2 and t5 as represented in figure 1. non observable place p4 and output of p2 . The
update identified model is construct by adding the
t5
new detected transitions as represented in figure
3.

•• t5
t1 t2
P1
P2 P3 t3
P4
t6
Fig. 1. Initial model ••
t1 t2
The second step is to update the initial model P1 P2 P3
using the remaining sequences. According to the t7
second sequence, a new event e6 is occurred which t4 t8
is equivalent to the firing transition t6 . After the
occurrence of this event, we remark that the first Fig. 3. Identified model
and the second component of the vector state
remain unchanged in the same time the value of
the third component decrease by 1. Otherwise, The sequence δ4 allows to construct the same
the sum of vector state components decrease by identified model represented in figure 3 which is
1 then, we must add non observable place to the the identified model of the considered system in
PN structure which we can called p4 . This indicate form of ordinary PN. The incidence matrix of this
that the piece is correctly manufactured and it is identified model is:
Meda-Campaña, M.E. and E. Lopez-Mellado
 t1 t2 t3 t4 t5 t6 t8 t7
(2001). A passive method for on-line identifi-

p1 −1 0 0 −1 1 0 0 1
WS =
p2  1 −1 1 0 0 0 −1 0  cation of discrete event systems. Proceedings
p3 of The 40th IEEE Conference on Decision
 0 1 −1 1 −1 −1 0 0 
p4 0 0 0 0 0 1 1 −1
and Control 5, 4990–4995.
Meda-Campaña, M.E. and E. Lopez-Mellado
(2002). Incremental synthesis of petri net
5. CONCLUSION models for identification of discrete event sys-
tems. Proceedings of The 41th IEEE Confer-
In this work, an off-line identification approach ence on Decision and Control 1, 805–810.
for partially observable DES using ordinary PN Meda-Campaña, M.E. and E. Lopez-Mellado
is presented. This approach consists in building (2005). Identification of concurrent discrete
a formal model based only on the knowledge of event systems using petri nets. Proceeding of
the input and the output system signals. An il- the 17th IMACS World Congress.
lustrative example has been given to illustrate Murata, T. (1989). Petri nets : properties, analysis
the advantages of the proposed method: sequen- and applications. Proceedings of the IEEE
tial, constructive and multiple. Our future works 77, 541–580.
concern the generalisation of this identification Ramadge, P. J. and W. M. Wonham (1987).
algorithm in order to deal with other class of Supervisory control of a class of discrete event
PN and to study more complicate phenomena like processes. SIAM J. Cont. Opt. 25, 206–230.
concurrence and conflict. Veelenturf, L. P. J. (1978). Inference of sequential
machines from sample computations. Pro-
ceding of IEEE Transactions on Computers
REFERENCES 27, 167–170.
Bekrar, R., N. Messai, N. Essounbouli, A. Hamza- Zamai, E., A. Chaillet-subias and M. Combacau
oui and B. Reira (2006). Off-ligne idedntifica- (1998). An architecture for control and mon-
tion for a class of discrete event sytems using itoring of discrete events systems. Computers
safe petri nets. Proceeding of the 3rd IFAC in Industry 36, 95–100.
Workshop on Discrete Event System Design
(DESDes06, Poland ).
Biermann, A.W. and J.A. Feldman (1972). On
the sysnthesis of finite-state machines from
samples of their behavior. Proceding of IEEE
Transactions on Computers 21, 592–597.
Choi, C. H. Ben (1998). Automata for learning
sequential tasks. New Generation Computing
16, 23–54.
David, R. and H. Alla (1992). Du Grafcet aux
Réseaux de Petri. Hermes Sciences Publicat..
Paris, France.
Giua, A. and F. DiCesare (1994). Petri net struc-
tural analysis for supervisory control. Proced-
ing of IEEE Transactions on Robotics and
Automation 10, 185–195.
Kella, J. (1971). Sequential machine identifica-
tion. Proceding of IEEE Transactions on
Computers 20, 332–338.
Klein, S. (2005). Identification of discret event
systems for fault detection purposes. Thesis
of the University of Cachan, France.
Meda-Campaña, M.E., A. Ramirez-Treviño and
A. Malo (1998). Identification in discrete
event systems. Proceding of IEEE Interna-
tional Conference on Systems, Man and Cy-
bernetics 1, 740–745.
Meda-Campaña, M.E., A. Ramirez-Treviño and
E. Lopez-Mellado (2000). Asymptotic identi-
fication of discrete event systems. Proceedings
of the 39th IEEE Conference on Decision and
Control 3, 2266–2271.

You might also like