New Software Tool for Modeling and Control of Discrete-Event and Hybrid Systems Using Timed Interpreted Petri Nets
Abstract
:1. Introduction
2. Materials and Methods
3. Results
3.1. Case Study: Control of Laboratory Discrete-Event System
- —alarm does not detect fire
- and —alarm is active (fire was detected)
- —alarm is turned on
- —alarm makes a noise
- —signal light blinks
- and —alarm is turned off
3.2. Case Study: Control of Laboratory Hybrid System
- Input: controlled variable (double), rpm of the motor
- Output: control variable (double), in this case input voltage—PWM (0-255)
- Setpoint: setpoint (double), desired rpm of the motor
- Kp, Ki, Kd: tuning parameters (double>=0)
- Direction: Either DIRECT or REVERSE—determines which direction the output will move when faced with a given error.
4. Conclusions
- Development of the software application PN2ARDUINO supporting modeling and control of discrete-event and hybrid systemsA new software application named P2ARDUINO based on the open-source Petri nets editor PNEditor was developed to support systems modelling by using timed interpreted Petri nets. Consequently, it enables us to realize control algorithms on Arduino-type microcontrollers as well as on other compatible microcontrollers which support the Firmata protocol used for communication between the computer and the microcontroller.
- Verification of the newly developed application software system for control of discrete-event systems on a laboratory modelTo verify and demonstrate possibilities to control discrete-event systems using the developed application P2ARDUINO, a laboratory fire alarm model was proposed. The Arduino-type microcontroller Arduino Uno was chosen for control purposes. The respective Petri net was modeled in the original software PN2ARDUINO. Finally, control of the laboratory discrete-event system was demonstrated.
- Development and verification of the developed hybrid system control methodology based on high-level Petri netTo verify the developed hybrid system control methodology, it was necessary to set up a laboratory physical model of such type. A DC motor was chosen with an encoder realizing the feedback. Two working points on the steady state I/O characteristics were selected and two respective control algorithms (PID controllers) were designed. The optimal solution was to switch between the two control algorithms depending on the motor speed (working point). The developed software application PN2ARDUINO showed to be appropriate for this purpose. Switching between individual control algorithms (controllers) and setpoints was realized via SYSEX messages offered by the Firmata protocol. It is the author’s original solution which can be considered to be an important scientific and application contribution. Using the Firmata protocol, SYSEX type messages and possibility to implement user code on the microcontroller side enable us to apply any control algorithm realizable by the microcontroller.
5. Patents
Author Contributions
Funding
Acknowledgments
Conflicts of Interest
References
- Kharitonov, D.; Tarasov, G.; Golenkov, E. Modeling of Object-Oriented Programs with Petri Net Structured Objects. Comput. Inf. 2017, 36, 1063–1087. [Google Scholar] [CrossRef]
- Prilandita, N.; McLellan, B.; Tezuka, T. Modeling Autonomous Decision-Making on Energy and Environmental Management Using Petri-Net: The Case Study of a Community in Bandung, Indonesia. Challenges 2016, 7, 9. [Google Scholar] [CrossRef] [Green Version]
- Kaid, H.; Al-Ahmari, A.; Li, Z.; Davidrajuh, R. Intelligent Colored Token Petri Nets for Modeling, Control, and Validation of Dynamic Changes in Reconfigurable Manufacturing Systems. Processes 2020, 8, 358. [Google Scholar] [CrossRef] [Green Version]
- Fonseca i Casas, P.; Lijia Hu, D.; Guasch i Petit, A.; Figueras i Jové, J. Simplifying the Verification of Simulation Models through Petri Net to FlexSim Mapping. Appl. Sci. 2020, 10, 1395. [Google Scholar] [CrossRef] [Green Version]
- Dotoli, M.; Fanti, M.; Iacobellis, G. A freeway traffic control model by first order hybrid petri nets, in Automation Science and Engineering (CASE). In Proceedings of the 2011 IEEE International Conference on Automation Science and Engineering, Trieste, Italy, 24–27 August 2011; pp. 425–431. [Google Scholar] [CrossRef]
- Fanti, M.; Iacobellis, G.; Mangini, A.; Ukovich, W. Freeway traffic modeling and control in a first-order hybrid petri net framework, Automation Science and Engineering. IEEE Trans. Autom. Sci. Eng. 2014, 11, 90–102. [Google Scholar] [CrossRef]
- Dotoli, M.; Fanti, M.; Mangini, A. Fault monitoring of automated manufacturing systems by first order hybrid petri nets. In Proceedings of the 2008 IEEE International Conference on Automation Science and Engineering, Arlington, VA, USA, 23–26 August 2008; pp. 181–186. [Google Scholar] [CrossRef]
- Costantino, N.; Dotoli, M.; Falagario, M.; Fanti, M.P.; Mangini, A.M. A model for supply management of agile manufacturing supply chains. Int. J. Prod. Econ. 2012, 135, 451–457. [Google Scholar] [CrossRef]
- Matsuno, H.; Doi, A.; Drath, E.; Miyano, S. Genomic object net: Object oriented representation of biological systems. Genome Inf. Ser. 2000, 11, 229–230. [Google Scholar] [CrossRef]
- Drighiciu, M.A.; Manolea, G. Application des Reseaux de Petri Hybrides a L’etude des Systemes de Production a haute Cadence. 2010. Available online: http://mail.ace.ucv.ro/sintes11/Volume1/2MECHATRONICS/M10_Drighiciu_Adrian_2.pdf (accessed on 1 May 2020).
- Drighiciu, M.A.; Cismaru, D.C. Modeling a water bottling line using petri nets, Annals of the University of Craiova. Electr. Eng. Ser. 2011, 37, 110–115. [Google Scholar]
- Rohr, C.; Marwan, W.; Heiner, M. Snoopy—A unifying petri net framework to investigate biomolecular networks. Bioinformatics 2010, 26, 974–975. [Google Scholar] [CrossRef] [PubMed]
- Kucera, E.; Niznanska, M.; Kozak, S. Advanced techniques for modelling of as/rs systems in automotive industry using high-level petri nets. In Proceedings of the 2015 16th International Carpathian Control Conference (ICCC), Szilvasvarad, Hungary, 27–30 May 2015; pp. 261–266. [Google Scholar]
- Kucera, E.; Haffner, O.; Kozak, S. Modelling and control of as/rs using coloured petri nets. In Proceedings of the 2016 Cybernetics & Informatics (K&I), Levoca, Slovakia, 2–5 February 2016; pp. 1–6. [Google Scholar]
- Fausto, S.; Giua, A.; Seatzu, C. HYPENS: A Matlab tool for timed discrete, continuous and hybrid Petri nets. In International Conference on Applications and Theory of Petri Nets; Springer: Berlin/Heidelberg, Germany, 2008. [Google Scholar]
- Davidrajuh, R. Modeling and Simulation of Discrete Event Systems with Petri Nets: A Hands-On Approach with GPenSIM; VDM Verlag: Saarbrücken, Germany, 2009. [Google Scholar]
- Krenczyk, D.; Davidrajuh, R.; Skolud, B. An Activity-Oriented Petri Net Simulation Approach for Optimization of Dispatching Rules for Job Shop Transient Scheduling. In Proceedings of the International Joint Conference SOCO’17-CISIS’17-ICEUTE’17, León, Spain, 6–8 September 2017; Springer: Cham, Switzerland, 2017; pp. 299–309. [Google Scholar]
- Davidrajuh, R.; Skolud, B.; Krenczyk, D. Performance Evaluation of Discrete Event Systems with GPenSIM. Computers 2018, 7, 8. [Google Scholar] [CrossRef] [Green Version]
- Mostermany, P.J.; Ottery, M.; Elmqvistz, H. Modeling Petri Nets as Local Constraint Equations for Hybrid Systems Using Modelica. 1998. Available online: http://citeseer.ist.psu.edu/359408.html (accessed on 10 May 2020).
- Fabricius, S.; Badreddin, E. Modelica library for hybrid simulation of mass flow in process plants. In Proceedings of the 2nd Citeseer International Modelica Conference, Oberpfaffenhofen, Germany, 18–19 March 2002; pp. 225–234. [Google Scholar]
- Pross, S.; Bachmann, B.; Stadtholz, A. A petri net library for modeling hybrid systems in openmodelica. In Proceedings of the 7th International Modelica Conference, Como, Italy, 20–22 September 2009. [Google Scholar]
- Pross, S.; Bachmann, B. Pnlib-an advanced petri net library for hybrid process modeling. In Proceedings of the 9th International MODELICA Conference, Munich, Germany, 3–5 September 2012. [Google Scholar]
- Riesz, M.; Seckar, M.; Juhas, G. Petriflow: A petri net based framework for modelling and control of workflow processes. In Proceedings of the Workshops of the 31st International Conference on Application and Theory of Petri Nets and Other Models of Concurrency (PETRI NETS 2010) and of the 10th International Conference on Application of Concurrency to System Design (ACSD 2010), Braga, Portugal, 21–25 June 2010; Volume 827, pp. 191–205. [Google Scholar]
- Češeková, A. Control of Laboratory Discrete Event Systems. Master’s Thesis, Slovak University of Technology in Bratislava, Bratislava, Slovakia, 2016. (In Slovak). [Google Scholar]
- Kucera, E. Modelling and Control of Hybrid Systems Using High-Level Petri Nets. Ph.D. Thesis, Slovak University of Technology in Bratislava, Bratislava, Slovakia, 2016. (In Slovak). [Google Scholar]
- Steiner, H.C. Firmata: Towards making microcontrollers act like extensions of the computer. In Proceedings of the NIME, Pittsburgh, PA, USA, 3–6 June 2009; pp. 125–130. [Google Scholar]
- MIDI Association: Summary of Midi Messages. 2016. Available online: https://www.midi.org/specifications/item/table-1-summary-of-midi-message (accessed on 10 May 2020).
- Comnes, B.; La Rosa, A. Arduino Pid Example Lab; Portland State University: Portland, OR, USA, 2013. [Google Scholar]
Petri Net Logic in PC | Petri Net Logic in Microcontroller |
---|---|
limited capability of real-time control | real-time control |
much more computation and memory resources available | limited computation and memory resources |
code in microcontroller does not need recompiling | during development repeated compiling is needed |
PC must be still online | independence of control unit |
Actuators Conditions | |
---|---|
Rated voltage | 6.0 V (DC) |
Temperature range | ~ |
Humidity range | 0–90% |
No-load characteristics | |
No-load current | ≤200 mA |
No-load speed | rpm |
Load characteristics | |
Rated load | |
Rated current | ≤550 mA |
Rated speed | rpm |
Starting torque | |
Locked-rotor current | ≥2.0 A |
© 2020 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).
Share and Cite
Kučera, E.; Haffner, O.; Drahoš, P.; Cigánek, J.; Leskovský , R.; Štefanovič, J. New Software Tool for Modeling and Control of Discrete-Event and Hybrid Systems Using Timed Interpreted Petri Nets. Appl. Sci. 2020, 10, 5027. https://doi.org/10.3390/app10155027
Kučera E, Haffner O, Drahoš P, Cigánek J, Leskovský R, Štefanovič J. New Software Tool for Modeling and Control of Discrete-Event and Hybrid Systems Using Timed Interpreted Petri Nets. Applied Sciences. 2020; 10(15):5027. https://doi.org/10.3390/app10155027
Chicago/Turabian StyleKučera, Erik, Oto Haffner, Peter Drahoš, Ján Cigánek, Roman Leskovský , and Juraj Štefanovič. 2020. "New Software Tool for Modeling and Control of Discrete-Event and Hybrid Systems Using Timed Interpreted Petri Nets" Applied Sciences 10, no. 15: 5027. https://doi.org/10.3390/app10155027
APA StyleKučera, E., Haffner, O., Drahoš, P., Cigánek, J., Leskovský , R., & Štefanovič, J. (2020). New Software Tool for Modeling and Control of Discrete-Event and Hybrid Systems Using Timed Interpreted Petri Nets. Applied Sciences, 10(15), 5027. https://doi.org/10.3390/app10155027