# A Program Model of Fuzzy Interpreted Petri Net to Control Discrete Event Systems
## 1 Introduction
An important aspect related to the design of control systems, especially those that are complex, is performance evaluation. Within this area of science, PNs based on stochastic modelling (stochastic PNs) can be used. The application of Generalized Stochastic Petri Nets (GSPNs) to distributed systems, e.g., flexible manufacturing systems, is proposed in [44]. GSPNs enable performance evaluation by using simulation or numerical methods. A software tool based on GSPN called GreatSPN is presented in [45; 46]. Another tool to model stochastic Petri nets is Mobius Framework [47; 48]. This framework supports multiple modelling formalisms and modularity. It is based on the so-called atomic model which is composed of state variables, properties, and actions. Another solution supporting multi-formalism modelling and modularity is SIMTHESys [49], which enables the application of the product-form solution theory to multi-formalism compositional modelling techniques. Stochastic Preemptive Time Petri Net (SPTPN) is proposed in [50]. This net is used to validate and conduct a performance analysis of real-time systems, e.g., a digital control system. The formal model of SPTPN is constructed using step semantics. All solutions presented that combine PLC programs with PNs can be very valuable. However, the discrete PNs are mainly applied. One of the few fuzzy PNs that can be used directly to control DES is fuzzy interpreted Petri net (FIPN) [51]. This net enables the use of analogue and binary signals of processes for diagnosis and control of these processes. It also allows quantitative changes of the resources to be modelled, and the natural interpretation of the fuzzy tokens' position to be maintained. In comparison to discrete PNs, which are usually used to create control systems, the graphic representation of FIPN more precisely shows the dynamics of the net through the possibility of using analogue sensors. To validate and analyse the properties of the net, e.g., liveness and deadlock, the coverability graph can be applied [52]. The algebraic representation [51] and the reachability graph can also be used to investigate the properties. When applying a reachability graph for a net with analogue sensors, it needs to be considered as a net with binary sensors to avoid a state-explosion problem. The computer tool called FIPN-SML facilitates the application of FIPN [53]. This simulator can be used to create a graph of FIPN and to generate program code for PLCs in ST language based on this graph. As a continuation of [53], which lacked a formal description of the proposed solution, this article may be included in the second trend of dealing with DES. The previous work generally outlines the concept of this solution and gives an example of using it. Thus, this paper proposes a formal description of the PLC program and the method to create this program based on the graphical representation of FIPN. The aim is to describe how this program and method works by giving general formalisms and an illustrative example. The paper is organised as follows. Firstly, comparison to similar works is presented (Section 2). Secondly, the formal description and the conception of FIPN (Section 3) are shown. Next, the formal program model based on FIPN (Section 4) and the method which allows its creation based on the FIPN's diagram (Section 5.1) are described. Finally, the example of program generation in ST language through using FIPN-SML (Section 5.2) is discussed and a brief summary of the results and possible directions of future developments are given (Section 6).