Real Time Identication of Discrete Event Systems Using Petri Nets ? Mariagrazia Dotoli a , Maria Pia Fanti a , Agostino Marcello Mangini a a Dipartimento di Elettrotecnica ed Elettronica, Politecnico di Bari, Via Re David 200, 70125 Bari, Italy Abstract The paper denes the identication problem for Discrete Event Systems (DES) as the problem of inferring a Petri Net (PN) model using the observation of the events and the available output vectors, that correspond to the markings of the measurable places. Two cases are studied considering di/erent levels of the system knowledge. In the rst case the place and transition sets are assumed known. Hence, an integer linear programming problem is dened in order to determine a PN modelling the DES. In the second case the transition and place sets are assumed unknown and only an upper bound of the number of places is given. Hence, the identication problem is solved by an identication algorithm that observes in real time the occurred events and the corresponding output vectors. The integer linear programming problem is dened at each observation so that the PN can be recursively identied. Some results and examples characterize the identied PN systems and show the exibility and simplicity of the proposed technique. Moreover, an application to the synthesis of supervisory control of PN systems via monitor places is proposed. Key words: Discrete event systems, Petri nets, Identication algorithms, integer programming. 1 Introduction System identication deals with choosing mathemati- cal models from a known model set to characterize the input-output behaviour of an unknown system from - nite data [21]. Numerous modern man made systems can be modelled as Discrete Event Systems (DES), whose dy- namics is asynchronous and whose state transitions are initiated by events that occur at discrete time instants. The DES behaviour can be described by a language that species all the admissible sequences of events that the DES is capable of processing or generating [8]. The problem of identifying a language and an automaton from nite data has been explored by Gold [15], [16]: a - nite number of experiments is performed on a black box and an identication algorithm uses the results of the ex- periments to guess a nite automaton which realizes the input/output function of the black box. Gold [16] shows that the problem of nding a nite automaton accepting ? This paper was not presented at any IFAC meeting. Cor- responding author M. P. Fanti. Tel. +39-080-5963643. Fax +39-080-5963410. Email addresses: dotoli@deemail.poliba.it (Mariagrazia Dotoli), fanti@deemail.poliba.it (Maria Pia Fanti), mangini@deemail.poliba.it (Agostino Marcello Mangini). positive samples of a regular language is NP complete. Angluin [1] characterizes the classes of nonempty recur- sive languages for which correct inference from positive data is possible and proposes in [2] a learning algorithm that constructs a nite automaton accepting a given reg- ular language. Petri Nets (PN) have become a standard model for the study of DES and di/erent classes of PN languages have been dened to represent the marked be- haviour of a net depending on the choice of transition la- belling and of the nal marking set [11], [8]. Accordingly, several approaches to the problem of determining a PN model of a DES may be found in the related literature. In [18] an algorithm consisting of two phases is presented for the construction of a free labelled PN model (i.e., a net where each transition is associated to a unique label) from the knowledge of a nite set of ring sequences. In particular, the rst phase identies the language of the target system from given ring sequences in the form of nite state automaton. In the second phase the algo- rithm extracts the dependency relation of the net and guesses the structure of the PN from dependency. How- ever, the technique presents several restrictions since the language is generated by special classes of nets. In the context of PN synthesis, an alternative approach is based on the theory of regions whose objective consists in de- ciding whether a given graph is isomorphic to the mark- ing graph of some net and then constructing it [3], [10]. Preprint submitted to Automatica 3 October 2007