[5] that propose an on line modeling refinement technique ... On Line Identification of Discrete Event Systems via Petri Nets: .... (A3) the DES can be modeled by a PN system with λ-free ..... service transfer through the gateway (voice, data, .... the GLPK software version 4.8 [11]. .... 5th French Conference on Modeling and.
On Line Identification of Discrete Event Systems via Petri Nets: an Application to Monitor Specification Mariagrazia Dotoli, Member, IEEE, Maria Pia Fanti, Senior, IEEE, and Agostino M. Mangini
Abstract—The paper proves some properties of a previously proposed identification algorithm that builds on line the Petri net model of Discrete Event Systems (DES). The procedure uses the real time observation of the DES events and the corresponding available output vectors that partially provide the place markings. The paper shows how the considered identification method allows us to define a supervisory controller via monitor places enforcing generalized mutual exclusion constraints. To show the efficiency of the proposed approach, a communication gateway case study is presented.
S
I. INTRODUCTION
identification deals with choosing mathematical models from a known model set to characterize the input-output behavior of an unknown system from finite data. Modern man made systems are modeled as Discrete Event Systems (DES) and the DES behavior can be described by a language that specifies all the admissible sequences of events that the DES is capable of “processing” or “generating” [4]. The problem of identifying a language and an automaton from finite data has been explored in [1, 12]. Moreover, paper [13] presents an algorithm for the construction of a free-labeled PN, i.e., a net where each transition is associated to a unique label, from the knowledge of a finite set of its firing sequences. An analogous problem is solved in [2] that proposes a method to synthesize a PN on the basis of a set of structural constraints. In two recent papers [3,10] the authors propose a linear algebraic approach for the identification of a PN from the knowledge of the DES language, i.e., the finite set of strings generated by the set of transitions. The approach solves the identification problem by Integer Linear Programming (ILP) that is applied to λ-free labeled nets [3], i.e., nets where two transitions may share the same event label but no transition is labeled with the empty string. The identification problem of DES on the basis of an on line identification approach has been applied by Chung et al. [5] that propose an on line modeling refinement technique able to incrementally update the observed sample path. Moreover, Meda et al. [14] use an incremental synthesis approach to identify an interpreted PN (i.e., an extension of YSTEM
Manuscript received April 29, 2007. M.P. Fanti is with the Department of Elettrotecnica ed Elettronica, Politecnico di Bari, Bari, Italy. (+30-080-5963643; fax: +39-080-5963410; e-mail: fanti@ deemail.poliba.it). M. Dotoli is with the Department of Elettrotecnica ed Elettronica, Politecnico di Bari, Bari, Italy. (e-mail: dotoli@ deemail.poliba.it). A.M. Mangini is with the Department of Elettrotecnica ed Elettronica, Politecnico di Bari, Bari, Italy. (e-mail: mangini@ deemail.poliba.it).
PN) modeling a DES on the basis of the partial knowledge of input and output symbols. An on line identification approach is proposed by Dotoli et al. [6,7] assuming that the DES evolution and the initial state are not perfectly known and only an upper bound of the cardinality of the place set is given. Moreover, an Identification Algorithm (IA) waits until a new event occurs, updates the transition set and the labeling function, defines and solves an ILP problem. Hence, the set of places, of transitions and the λ-free labeling function are recursively determined. This paper proves some important properties of the PNs provided by the IA presented in [6,7]. It shows that even if it is possible to obtain an infinite number of PN systems modeling the DES, under suitable properties, each PN system provided by the IA is characterized by the same incidence matrix. Consequently, we prove that the proposed method can be used to specify a supervisory controller via monitor places enforcing generalized mutual exclusion constraints [9]. To this aim we consider a communication gateway case study that is modeled by an identified λ-free labeled PN and is controlled by monitors enforcing mutual exclusions constraints. II. BACKGROUND ON PETRI NETS A. Petri nets A PN is a bipartite graph [15] described by the four-tuple PN=(P, T, Pre, Post) where P is a set of places with cardinality m, T is a set of transitions with cardinality n, Pre:P×T→ ` m×n and Post:P×T→ ` m×n are the pre- and post-incidence matrices respectively, which specify the arcs connecting places and transitions. More precisely, for each p∈P and t∈T element Pre(p,t) (Post(p,t)) is equal to a natural number indicating the arc multiplicity if an arc going from p to t (from t to p) exists, and it equals 0 otherwise. Note that ` is the set of non-negative integers. The m×n incidence matrix of the net is defined as C=Post-Pre. For the pre- and post-set we use the dot notation, e.g., •t={p∈P: Pre(p,t)>0}. A marking is a mapping M: P→ ` m , assigning to each place of the net a nonnegative number of tokens. A PN system PN , M 0 is a net PN with an initial marking M0. Given a PN system PN , M 0 and a set of places Pv⊆P, we denote by Mv the restriction of M to Pv. Here, we consider the set of places partitioned into two disjoint subsets: Pk, the set of measurable places, whose marking Mk is known, and Puk, the set of non measurable places, whose marking Muk is
unknown. Moreover, the restriction of the incidence matrix C to Pk (Puk) is denoted Ck (Cuk). A transition tj∈T is enabled at a marking M if and only if (iff) for each p∈•tj, it holds: M(p)≥Pre(p,tj)
(1)
and we write M[tj〉 to denote that tj∈T is enabled at marking M. When fired, tj produces a new marking M’, denoted by M[tj〉M’ that is computed by the PN state equation: G (2) M’=M+C t j G where t j is the n-dimensional firing vector corresponding to
the j-th canonical basis vector. Let σ = tβ1 , tβ2 ,..., tβh be a sequence of transitions (or firing sequence) and let h be its length, given by the number of transitions that σ contains. Moreover, the notation M[σ〉M’ indicates that the sequence of enabled transitions σ G may fire at M yielding M’. We also denote σ : T→ ` n the G firing vector associated with a sequence σ, i.e., σ (t)=v if transition t is contained v times in σ. In addition, the sequence σ is called transition complete if ∀ t∈T it holds G σ (t)≥1. A marking M is said reachable from PN , M 0 iff there exists a firing sequence σ such that M0[σ〉M. The set of all markings reachable from M0 defines the reachability set of 〈PN,M0〉 and is denoted by R(PN,M0)={M|∃ σ : M0[σ〉M}. B. λ-free labeled Petri nets The following definition specifies and characterizes the labeled PN considered in this paper. Definition 1. A labeling function λ: T→E assigns to each transition t∈T a symbol ei∈E. The labeling function is λ-free according to [8,15], i.e., the same label ei∈E may be associated to more than one transition while no transition may be labeled with the empty string ε. ei
In particular, we denote by T ={t∈T|λ(t)=ei}= ={ t1i t2i ...t zi e } the set of transitions associated with the same i
event ei and zei =Card( T ei ), where Card(.) stands for the cardinality of the set (.). Given a PN system
PN , M 0 , the set of its firing
sequences is denoted L(PN,M0)={ σ∈T*⎜M0[σ〉}. Moreover, we denote as w the word of events associated with the sequence σ such that w=λ(σ), using the extended form of the transition labeling function λ: T* → E* in the usual manner. In addition, the empty string ε is associated with the word of null length. Furthermore, we define the λ-free labeled language as the set of admissible words in E* given the initial marking M0, namely: L E(PN,M0)={w∈E*⎜ λ (σ) = w , σ∈T*, M0[σ〉}.
(3)
We say that a PN system PN , M 0 models the DES if it holds L E(PN,M0)=L.
III. DES IDENTIFICATION BY λ-FREE LABELED PETRI NETS In this section we recall the identification problem definition and the results presented in [6, 7]. Let us consider a DES with event set E and language L. The inputs of the identifier are the DES event sequences w = eα eα ...eα with h≥1 and eα ∈E for i=1,…,h and the 1
2
i
h
corresponding output vectors y0,y1,…,yh, where y0 is the q
initial output vector and each yi∈ ` is the output vector observed after event eα with i=1,…,h. i
In order to define the problem of identifying a PN system PN , M 0 modeling the DES, the following properties of the DES are assumed: (A1) all the events of set E are observable, i.e., the events can be detected and distinguished; (A2) the DES state can be (partially) observed by the measured output vectors y∈ ` q ; (A3) the DES can be modeled by a PN system with λ-free labeling function λ . Moreover, we assume that the PN PN=(P, T, Pre, Post) modeling the DES enjoys the following properties: (A4) the subset of measurable places is Pk⊆P with Card(Pk)=q; (A5) an upper bound m ≥ q of Card(P) is given. Now, we define the PN set D={PN=(P,T,Pre,Post):Pre∈ ` m×n ,Post∈ ` m×n } so that the identification problem is formally stated as follows. Identification Problem. Let us consider a DES with event set E and language L verifying assumptions A1, A2 and A3. Let us observe an event sequence w∈L and the corresponding output vectors y∈ ` q . The Identification Problem consists in determining a place set P and its cardinality m, a transition set T and its cardinality n, a λ-free labeling function λ and a PN system 〈 PN , M 0 〉 satisfying assumptions A4 and A5 such that PN∈D, M0∈ ` m and w∈LE(PN,M0). To characterize the PN modeling the DES, the following definition is introduced. Definition 2. Let us consider a DES modeled by the PN system 〈 PN , M 0 〉 with λ-free labeling function λ and PN=(P,T,Pre,Post). The PN system 〈 PN , M 0 〉 is said event detectable by the output iff ∀ w∈LE(PN,M0) and ∀ α
eαi , eα j ∈w : eαi = eα j with i≠j, eαi = λ (tβαi ) , eα j = λ (tβ j ) i
and
tβαi i
≠
α tβ j j
j
it holds yi-yi-1≠yj-yj-1. In other words, the PN
system is event detectable iff any two transitions in T can be distinguished from each other by the observation of the DES output vectors. A solution of the Identification Problem is obtained by the Identification Algorithm (IA) of Fig.1 described in detail in [7]. The IA waits until an event occurs and stores the corresponding output vector. In particular, the inputs of the IA are an upper bound m of the number of places, the dimension q of the output vectors, the initial output y0, the
events generated by the DES and the corresponding output vectors. Let us assume that the IA observes the DES event sequence w = eα1 eα2 ...eαh with h≥1 and the corresponding output vectors y0,y1,…,yh, that are stored in the q×(h+1) matrix Y with Y(.,i+1)=yi for i=0,…,h. At each observation the algorithm properly updates the labeling function λ, the transition set T and the place set P. Hence, the IA infers
Identification Algorithm (IA) 1. Input: q, m , y0 Output: Solution=( 〈 PN w , M 0 w 〉 ,λw) or Solution=0 2.
3.
σ = tβα11 tβα22 ...tβαhh with λ (tβαii ) = eαi and tβαii ∈T for i=1,..,h. Denoting m=Card(P) and
M 0 [tβα1 〉 M1[tβα2 〉...[tβαh 〉 M h h 1 2
the
assume that
4.
= yi for i=0,…,h is the restriction of the uk
marking Mi to Pk and M i
(Case A)
G := 0q×1
{ }
βi:=1; let λw and tβαi be such that eαi = λw (tβαi ) ; Tw := Tw ∪ tβαi , i
i
1
Kα i (⋅,βi ) := yi − Y (⋅, i ) , Y(.,i+1):= yi ;
following linear algebraic constraint set is defined: ξ ( w, Y , λ ,T , m) =
endif 4.2 The event occurred previously. If zαi > 0 then
flag=0;
{
for all v ∈ 1,..., zαi
}
endif endfor 4.2.1 A new transition must be associated to the event. If flag=0 then (Case B.1) zαi := zαi + 1 ; Kα i (⋅, zαi ) := yi − Y (⋅, i ) ;
βi := zαi , and let λw and tβαi be such that eαi = λw (tβαi ) ; i
Tw := Tw ∪
i
{ } ; Y(.,i+1):= y ; tβαi i
i
4.2.2 The transition to associate to the event has been previously considered. else (flag=1); Y(.,i+1):= yi ; (Case B.2)
5.
endif endif Solving the ILP problem. m’:=m; Solution=0 Repeat begin min φ ( Prew , Post w , M 0w ) s.t. ξ ( w, Y , λw , Tw , m ') ; if the ILP admits a solution Solution=( 〈 PN w , M 0 w 〉 ,λw) else m’=m’+1
(6)
At each event occurrence the IA redefines the ILP problem and provides the output named Solution: it holds Solution=(〈PNw,M0w〉,λw), if the IA provides a PN system with labeling function λw, PNw=(Pw,Tw,Prew,Postw) and initial marking M0w, whereas Solution=0 if the defined ILP problem does not admit any solution. In [7] we proved that the solution provided by the IA is a solution of the Identification Problem. We remark that the proposed IA may be applied in real time storing the DES evolution (steps 1-4) and subsequently solving at least an ILP problem at each event occurrence. Obviously, in order to apply the IA online, the dynamics of the DES has to be slow with respect to the time required to solve the ILP problem at each occurrence.
(Case B)
if Kα i (⋅, v) = yi − Y (⋅, i) then βi:=v, flag:=1;
(4)
G where 1m×n is the matrix of dimensions m×n with each element being 1. As an indicator of the size of the PN, we introduce a linear function φ: D× ` m → ` defined by a linear combination of matrices Pre and Post and of the initial marking M0: G G G G G φ ( Pre, Post , M 0 ) = a T Pre b + c T Post d + e T M 0 , (5) G G G G G where the vectors a , c , e ∈ ` m and b , d ∈ ` n are appropriately chosen and at least one of them is non zero. Once P, T and λ are determined, it is shown in [6, 7] that a solution of the Identification Problem is a solution of the following ILP problem:
min φ ( Pre, Post , M 0 ) s.t. ξ(w,Y, λ,T,m).
Associating a transition to an event. 4.1 The event occurs for the first time. If zα i = 0 then E:=E ∪ { eα i }; zαi := zαi + 1 ; Kαi
is the restriction to Puk. Now, the
⎧ Pre, Post ∈ ` m×n ⎪ m ⎪ M i ∈ ` with i =0,...,h G G G ⎪ T T ⎪ Post 1m×1 + Pre 1m×1 ≥ 1n×1 G G G =⎨ ⎪ Post 1n×1 + Pre ⋅ 1n×1 ≥ 1m×1 ⎪∀t αi ∈ σ : λ (σ) = w Pre tG αi ≤ M i −1 βi ⎪ βi ⎪∀t αi ∈ σ : λ (σ) = w ( Post − Pre ) tG αi = M - M i i −1 βi ⎪⎩ βi
Solution=0 Recording the events and the DES outputs. Wait until a new event eα i and the corresponding output vector yαi are observed. w:=w eα i ;
evolution of the net corresponding to the sequence σ, we k Mi
Initializing the algorithm variables. G i:=1, Y := 0q×1 , E:=∅, w:=ε, Tw:=∅, Y (.,1) = y0 , αi=1, zαi := 0 , m:=q,
6.
then
set
m=m’,
endif end until Solution≠0 or m’> m Returning to the condition of recording the events. i := i + 1 ; goto 3; Fig. 1. The Identification Algorithm.
On the other hand, if the DES dynamics is too fast, the IA can be straightforwardly modified in two subroutines. The first one has to be dedicated to storing online the DES information and the second one to solving offline the corresponding ILP problem in a recursive way. IV. AN APPLICATION TO THE SUPERVISORY CONTROL SPECIFICATION
In this section we characterize the PN system obtained by the IA and we show how the proposed identification method
can be applied to synthesize a supervisory control of the PN systems via monitor places. A. Characterization of the identified PN system Let us consider a DES with event set E and language L satisfying assumptions A1-A3 and let 〈 PN , M 0 〉 be a PN with labeling function λ modeling the DES such that PN=(P,T,Pre,Post). Assume that the sequence w = eα1 eα2 ...eα h ∈L and the output vectors yi∈ ` q for i=0,…,h are observed. Let 〈 PN w , M 0 w 〉 with labeling function λw and PN w = ( Pw , Tw , Prew , Post w ) be a PN system identified by the IA. Denoting by C wk the restriction of matrix Cw=Postw-Prew to Pk⊆Pw, the following proposition characterizes the PN system provided by the IA application. Proposition 1. If the PN system modeling the DES is event detectable by the output vector y∈ ` q and sequence σ such that w=λ(σ) is transition complete, then the following conditions hold for any PN system 〈 PN w , M 0 w 〉 obtained by the IA: P1a) Tw=T; P1b) C wk = C k . Proof. Proof. By the application of the IA, ∀ eαi , eα j ∈ w with i>j three situations can occur: a) eαi ≠ eα j : the IA sets α
λ (tβαi ) = eαi ,
λ(tβ j ) = eα j
i
α
tβαi ≠ tβ j ,
and
j
i
hence
j
α
tβαi , tβ j ∈Tw; b) eαi = eα j and yi-yi-1≠yj-yj-1: the IA sets i
j
λ(tβαi i
α
) = λ (tβ j ) = eαi = eα j , j
α
tβαi ≠ tβ j i
j
and
α
tβαi , tβ j ∈Tw; i
j
α
c) eαi = eα j and yi-yi-1=yj-yj-1.: the IA sets λ (tβαi ) = λ (tβ j ) = i
eαi = eα j ,
tβαi i
=
α tβ j j
and
tβαi i
j
∈Tw. If σ is transition complete
and the PN system 〈 PN , M 0 〉 is event detectable by the output, then by construction ∀tj∈T there exists one and only α
α
i
i
one transition tβ i ∈Tw such that tβ i =tj. Consequently, we infer Tw=T and P1a) is true. Since Pk⊆Pw, hence the following n equations are derived by the state equation (2): Gα G ∀tβαi ∈ Tw C wk tβαi = yi − yi −1 = M ik - M ik−1 = C k tβ i . i
i
i
Consequently we prove that C wk = C k . Proposition 1 points out that if the PN system is event detectable by the output symbols and if σ such that w = λ (σ) is transition complete, then there exists only one matrix C wk = C k obtained by the IA. Indeed, each identified PN system is characterized by the same incidence sub matrix restricted to Pk. Obviously, if Pk=Pw=P and the hypotheses of Proposition 1 hold, then the identified PN system denotes Cw = C . B. The supervisory control specification We recall the problem of enforcing Generalized Mutual
Exclusion Constraints (GMECs) on PN [9]. Let PN , M 0 be a PN system, whose set of reachable markings is R(PN,M0). Assume that we are given a set of legal markings LM⊆ ` m and consider the basic control problem of designing a supervisor that restricts the reachability set of the plant in closed loop to LM∩R(PN,M0). We denote a GMEC as a couple (l, H) where l: P→ Z is a 1×m weight vector, H∈ Z and Z is the set of relative numbers. A set of and GMECs (L,H), with L= [l1T l2T ...lnTc ]T H = [ H1 H 2 ...H nc ]T ,
defines
the
legal
marking
set
M(L,H)= { M ∈ ` m | LM ≤ H } . The support of L is the set QL = { p ∈ P | L(., p ) ≠ 0} . A controlling agent must ensure
that the forbidden markings will not be reached. As shown in [9], if all transitions are controllable then the PN controller enforcing (L,H) has incidence matrix Cc ∈ Z nc ×n given by Cc=−LC and the initial marking of the controller nc
is Mc0=H−LM0. The controller exists iff the Mc0 ∈ ` initial marking is legal, i.e., H−LM0 ≥ 0. The control net has nc control places, called monitor places, and no transition is added to the controlled net. Now, let us consider a DES with event set E and language L satisfying assumptions A1-A3 and let PN , M 0 be a PN system modeling the DES such that PN=(P, T, Pre, Post) and let Pk⊆P be the set of measurable places of cardinality q. Let us consider the problem of restricting the reachability set of the PN within a set of legal markings defined by the set of GMECs (L,H) such that QL⊆Pk. In other words, we consider a set of constraints imposed only on the measurable places. We denote by Lk the nc×q matrix that is the restriction of matrix L to the set Pk and by Luk the restriction of matrix L to the set Puk of unmeasurable places. Since QL⊆Pk, Luk is a matrix with all elements equal to zero. Hence, the set of legal markings is LM=M(Lk,H)={ M k ∈ ` q | Lk M k ≤ H }. with λ-free labeling function λw and PN w =(Pw , Tw , Prew , Post w ) be the PN system identified by the IA after the observed sequence w = eα1 eα2 ...eαh ∈L. Given a set of GMECs (L,H) such that
Proposition 2. Let 〈 PN w , M 0 w 〉
QL⊆Pk, if σ such that w=λw(σ) is transition complete, then the controller enforcing the set of GMECs has incidence matrix Cc=−LkCk and initial marking Mc0=H−Lk M 0k . Proof. The proof is straightforward and can be omitted. By Proposition 2, the hypothesis that the PN system is identified by a transition complete sequence guarantees that the set of GMECs imposed on the measurable places are enforced by a controller that is independent from the observed event sequence.
V. THE CASE STUDY A. System Description In this section we address the problem of identifying the
architecture of a communication gateway between two kinds of networks. More precisely, the Call Control Application (CCA) has a sending and a receiving interface that are performed by two totally independent processes. Moreover, a service handler interface manages the specific end user service transfer through the gateway (voice, data, messaging). We represent the behavior of the system as a DES whose events are shown in Table I. A set of output sensors associated with a set of output symbols describes the changing DES operative conditions as depicted in Table II. In particular, the sensors may provide the number of idle users, calls or occupied positions in the communication buffer between sending interface and receiving interface. TABLE I. EVENT DEFINITION.
e1 e2 e3 e4 e5 e6
Connect indication Dispatching to buffer Connect request Connect response Connect confirm Alert request
e7 Alert indication e8 Call active end e9 Release or request indication e10 New user arrival e11 User exit from system
TABLE II. OUTPUT VECTOR DESCRIPTION.
Description Call active Call received Call delivered Occupied positions in buffer Call incoming Call present Idle user
Output y(1) y(2) y(3) y(4) y(5) y(6) y(7)
y1
[0 0 0 0 0 1 3]T
y16
[0 1 0 0 0 0 2]T
y2
[0 0 0 0 1 1 2] T
y17
[1 0 0 0 0 0 2]T
y3
[0 0 0 1 1 0 2]T
y18
[0 0 0 0 0 0 3]T
y4
T
y19
T
[0 0 0 0 1 0 2]
y5
T
[1 0 0 1 0 0 2]
y20
[0 0 0 0 0 0 3]T
y6
[2 0 0 0 0 0 2]T
y21
[0 0 0 0 0 1 2]T
y7
[1 0 0 0 0 0 3]T
y22
[0 0 0 0 1 1 1]T
y8
[0 0 0 0 0 0 4]T
y23
[0 1 0 0 1 0 1]T
y9
[0 0 0 0 0 0 3]T
y24
[0 1 1 0 0 0 1]T
y10
[0 0 0 0 0 1 2]T
y25
[0 0 1 0 0 0 2]T
y11
T
y26
T
[0 0 0 0 0 0 3]
y12
T
[0 0 0 1 0 1 1]
y27
[0 0 0 0 0 0 4]T
y13
[0 0 0 1 0 0 2]T
y28
[0 0 0 0 1 0 3]T
y14
[0 0 0 0 0 0 3]T
y29
[0 0 0 1 0 0 3]T
y15
[0 0 0 0 0 1 2]T
y30
[1 0 0 0 0 0 3]T
[0 0 0 0 1 1 1]
B. System Identification: Case A The IA observes the following sequence w: w= eα1 ...eα 30 =
(7)
e1e3 e2 e7 e5 e4 e9 e8 e11e1e3 e2 e9 e9 e1e6 e4 e8 e3 e9 e1e3 e6 e7 e9 e9 e10 e3 e2 e5 .
Moreover, assuming q=7, the observed outputs are reported in Table III. In addition, we suppose that the DES evolution starts with 4 idle users in the communication gateway, i.e., the initial output is y0=[0 0 0 0 0 0 4]T. The objective function is the following G G G φ ( Pre, Post , M 0 ) = 11×m ( Pre + Post )1n×1 + 11×m M 0 , (8) and some constraints are added to the constraint set (4). In particular, we impose that each place is connected with an input transition and an output transition. Hence the following constraints have to be verified: G G G G Pre ⋅ 1n×1 ≥ 1m×1 and Post ⋅ 1n×1 ≥ 1m×1 (9) The IA is applied and the ILP problem (6) is solved using the GLPK software version 4.8 [11]. However, the IA provides no solution until the occurrence of the event eα17 = e4 . After the observation of the entire word w, the
TABLE III. OBSERVED OUTPUT VECTORS.
[0 0 1 1 0 0 2]
With reference to the DES identification methodology recalled in Section III, we suppose that assumptions A1-A5 are satisfied. We identify the system in two cases: in the first case (Case A) we assume that the complete system state is known by the output, i.e., q=m=7, in the second case (Case B) we assume that just a partial observation of the system is allowed, i.e., q=5.
ILP provides a solution in an average time of 0.41 s with a PC equipped with a 1.73 GHz processor and 1 GB RAM. The identified PN system is shown in Fig. 2. In particular, the obtained transition set Tw contains 19 transitions and the labeling function λw defines the following sets:
{ } T = {t , t } , T = {t } , T = {t , t } , = {t , t } , T = {t } , T = {t } , T = {t } , = {t , t , t , t , t , t } , T = {t } , T = {t } .
T e1 = t11 , T e5 T e9
5 1
5 2
9 1
9 2
e2
2 1
e6
9 3
9 4
9 5
e3
2 2
e7
6 1
9 6
e10
10 1
e4
3 1
e8
7 1
e11
4 1
4 2
8 1
11 1
Assuming that the PN system modeling the DES is event detectable by the output and the sequence σ obtained by the labeling function λw is transition complete, since the output provides the complete marking of the place set (q=m), by Proposition 1 we infer that the incidence matrix of the identified PN is such that Cw=C. C. System Identification: Case B In this case we assume that it is not possible to detect the number of idle users and whether a call is present in the 5
network, i.e., y∈ ` . More precisely, the identifier observes the event sequence (7) and the corresponding output symbols, represented by the first 5 elements of the output vectors shown in Table III. The identification procedure defines the ILP (6) with the same objective function and the
same constraint set of Case A. Starting from the initial output vector y0 =[0 0 0 0 0]T, the IA is applied to identify the PN modeling the CCA assuming that m =q=5 and observing the event sequence (7). In this case the procedure provides the PN shown in Fig. 3 (solid lines only) using GLPK software in an average time of 0.47s. We enlighten that the set of transitions is the same set obtained in case A, while the place set is Pw={p1, p2 p3, p4, p5, p6} and the set of measurable places is Pk={p1, p2 p3, p4, p5}. Comparing the incidence matrices of the PN in Figs. 2 and 3 (solid lines), according to Proposition 1, in Case B the sub-matrix C wk ∈ `5x19 is equal to the corresponding sub-matrix of the incidence matrix obtained in Case A. t11
t
t29
t59
t12
11 1
t69
t49
p1
p4
t110
t19
t24
t14
t
p7
p2
t16
p6 9 3
t17
p5
t18
t15
t25
t22
Since the hypotheses of Proposition 2 are satisfied and the set of GMECs is imposed on the measurable places, the incidence matrix and the initial marking of the monitor places enforcing the GMECs are the same for Case A and for Case B. VI. CONCLUSION The paper analyzes the properties of a DES real time identification procedure, previously proposed by the authors. The considered technique synthesizes on line a λfree labeled PN modeling the observed deterministic DES behavior on the basis of partial knowledge of the system state and the output symbols. The paper shows how the identification method may be applied for defining a supervisory controller via monitor places enforcing a set of generalized mutual exclusion constraints. To show the efficiency of the proposed approach, a communication gateway case study proposed in the related literature is considered. Future research deals with identifying PN models of non deterministic DES that may be driven also by silent events. REFERENCES
p3
[1]
t13
[2] Fig. 2. The PN identified in Case A. [3] [4] t11
p2
t16 9 3
t
t29 t111
t59
p6
9 1
t
pS 2
t12
t69
t49
t110
t22
p5
t24
t14
p4
[5]
pS 1
[6]
p1
t18
t15
t25 t17
[7]
p3
t13
[8] Fig. 3. The identified PN (solid lines only) and the controlled PN (solid and dashed lines) in Case B.
Now, we wish to impose that the number of active calls can be at most three and the occupied positions in the buffer must be at most four. The set of legal markings is defined as follows:
LM=M(Lk,H)={ M k ∈ ` 2 | M ( p1 ) ≤ 4 , M ( p4 ) ≤ 3 },
(10)
⎡1 0 0 0 0 ⎤ T where Lk = ⎢ ⎥ and H=[4 3] . 0 0 0 1 0 ⎣ ⎦ The controller enforcing the set of GMECs has incidence matrix C c = − Lk C k and initial marking Mc0=H−Lk y0 . The controlled PN is shown in Fig. 3 (solid and dashed lines).
[9]
[10] [11] [12] [13] [14]
[15]
D. Angluin, “Introductive inference of formal languages from positive data”, Information and Control, vol. 45, pp. 117-135, 1980. T. Bourdeaud’Huy, P. Yim, “Synthèse de rèseaux de Petri à partir d’exigences”, in Proc. 5th French Conference on Modeling and Simulation, MOSIM’04, Nantes, France, 8 pp., 2004 (in French). M.P. Cabasino, A. Giua, C. Seatzu, “Identification of deterministic Petri nets”, in Proc. 8th International Workshop on Discrete Event Systems, Ann Harbor, MI, pp. 325-331, 2006. C.G. Cassandras, S. Lafortune, An Introduction to Discrete Event Systems. Boston, MA, USA: Kluwer Academic Publisher, 1999. S.L. Chung, C.L. Li, J.C. Wu, S.T. Wang, “Online modeling refinement for discrete event systems”, in Proc. IEEE Conf. on Systems, Man and Cybernetics, Washington, D.C., pp. 2739-2744, 2003. M. Dotoli, M.P. Fanti, A.M. Mangini, “An optimization approach for identification of Petri nets”, in Proc. 8th Int. Workshop on Discrete Event Systems, Ann Harbor, MI, pp. 332-337, 2006. M. Dotoli, M.P. Fanti, A.M. Mangini, “Real time identification of discrete event systems by Petri nets”, to appear in Proc. DCDS’2007, the 1st IFAC Workshop on Dependable Control of Discrete Systems, Paris, France, 6 pp., 2007. S. Gaubert, A. Giua, “Petri net languages and infinite subsets of Nm”, J. of Computer and System Sciences, vol. 59, pp. 373-391, 1999. A. Giua, F. DiCesare, M. Silva, “Generalized mutual exclusion constraints on nets with uncontrollable transitions”, in Proc. IEEE Int. Conf. on Systems, Man, and Cybernetics, Chigago, IL, pp. 974-979, 1992. A. Giua, C. Seatzu, “Identification of free-labeled Petri nets via integer programming”, in Proc. 44th IEEE Conf. on Decision and Control, Sevilla, Spain, pp. 7639-7644, 2005. Gnu Linear Programming Kit http://www.gnu.org/software/glpk/glpk.html E.M. Gold, “Language identification in the limit”, Information and Control, vol. 10, pp. 447-474, 1967. K. Hiraishi, “Construction of a class of safe Petri nets by presenting firing sequences” In Jensen K. Editor, Lecture notes in Computer Science, Vol. 616, 244-262, Springer-Verlag, 1992. M.E. Meda-Campaña, E. López-Mellado, “Identification of concurrent discrete event systems using Petri nets”, in Proc. IMACS World Congress on Scientific Computation, Applied Mathematics and Simulation, Paris, France, 8 pp., 2005. J.L. Peterson, Petri Net Theory and the Modeling of Systems. Englewood Cliffs, NJ, USA: Prentice Hall, 1981.