Petri Nets: Applications Petri Nets: Applications Edited by Pawel Pawlewski In-Tech intechweb.org Published by In-Teh In-Teh Olajnica 19/2, 32000 Vukovar, Croatia Abstracting and non-prot use of the material is permitted with credit to the source. Statements and opinions expressed in the chapters are these of the individual contributors and not necessarily those of the editors or publisher. No responsibility is accepted for the accuracy of information contained in the published articles. Publisher assumes no responsibility liability for any damage or injury to persons or property arising out of the use of any materials, instructions, methods or ideas contained inside. After this work has been published by the In-Teh, authors have the right to republish it, in whole or part, in any publication of which they are an author or editor, and the make other personal use of the work. © 2010 In-teh www.intechweb.org Additional copies can be obtained from: publication@intechweb.org First published February 2010 Printed in India Technical Editor: Maja Jakobovic Cover designed by Dino Smrekar Petri Nets: Applications, Edited by Pawel Pawlewski p. cm. ISBN 978-953-307-047-6 V Preface Petri Nets are the graphical and mathematical tool used in many different science domains. Their characteristic features are the intuitive graphical modeling language and advanced for- mal analysis method. The concurrence of performed actions is the natural phenomenon due to which Petri Nets are perceived as mathematical tool for modeling concurrent systems. The nets whose model was extended with the time model can be applied in modeling real-time systems. Petri Nets were introduced in the doctoral dissertation by K.A. Petri, titled “„Kommunikation mit Automaten” and published in 1962 by University of Bonn. During more than 40 years of development of this theory, many different classes were formed and the scope of applications was extended. Depending on particular needs, the net denition was changed and adjusted to the considered problem. The unusual “exibility” of this theory makes it possible to introduce all these modications. Owing to varied, currently known net classes, it is relatively easy to nd a proper class for the specic application. The present monograph shows the whole spectrum of Petri Nets applications, from classic applications (to which the theory is specially dedicated) like computer science and control systems, through fault diagnosis, manufacturing, power systems, trafc systems, transport and down to Web applications. At the same time, the publication describes the diversity of investigations performed with use Petri Nets in science centers all over the world. Pawel Pawlewski VI VII Contents Preface V 1. AnApplicationofGSPNforModelingandEvaluating LocalAreaComputerNetworks 001 MasahiroTsunoyamaandHiroeiImai 2. ArchitectureofComputerIntrusionDetectionBased onPartiallyOrderedEvents 013 LiberiosVokorokosandAntonBaláž 3. ParticleFilterforDepthEvaluationofNetworking IntrusionDetectionUsingColouredPetriNets 029 Chien-ChuanLinandMing-ShiWang 4. ModelingandAnalyzingSoftwareArchitectureUsing Object-OrientedPetriNetsandπ-calculus 045 ZhenhuaYu,XiaoFu,YuLiu,JingWangandYuanliCai 5. SystolicPetriNets 061 AlexandreAbellardandPatrickAbellard 6. TowardsRewritingSemanticsofSoftwareArchitectureSpecication 093 YujianFu,ZhijiangDong,PhilBordingandXudongHe 7. Transfer-ResourceGraphandPetri-netfor System-on-ChipVerication 115 XiaoxiXuandCheng-ChewLim 8. UsingPetrinetsformodelingandverication ofHybridSystems 137 RicardoRodriguez,OtonielRodriguez, GerardoReyesandVianeyCruz 9. AnewControlSynthesisApproachofP-TimePetriNets 161 BonhommePatrice 10. CL-MAC:Cross-layerMACProtocolforDelaySensitive WirelessSensorNetworkApplications 179 KecharBouabdellahandSekhriLarbi VIII 11. DistributedImplementationofPetrinetsinControlApplications 207 RamonPiedrata,DaniloTardioliandJoseLuisVillarroel 12. HybridstatePetrinetswhichhavetheanalysispower ofstochastichybridsystemsandtheformal vericationpowerofautomata 225 MarikenH.C.EverdijandHenkA.P.Blom 13. ReachabilityAnalysisofTime-CriticalSystems 251 ŠtefanHudák,ŠtefanKorečkoandSlavomírŠimoňák 14. SupervisoryControlandHigh-levelPetrinets 279 ChihebAmeurABID,SajehZAIRIandBelhassenZOUARI 15. UsingPetriNetforModelingandAnalysisof aEncryptionSchemeforWirelessSensorNetworks 305 HugoRodríguez,RubénCarvajal,BeatrizOntiveros, IsmaelSotoandRolandoCarrasco 16. DiagnosabilityinSwitchedLinearSystems 319 LizetteRubio-Gómez,DavidGómez-Gutiérrez, AntonioRamírez-Treviño, JavierRuiz-LeónandGuillermoRamírez-Prado 17. FaultdiagnosisforcomplexsystemsusingColouredPetriNets 333 L.Rodríguez,E.García,F.Morant,A.CorrecherandE.Quiles 18. ModellingandFaultDiagnosisbymeansofPetriNets. UnmannedAerialVehicleApplication 351 MiguelTrigos,AntonioBarrientos,JaimedelCerroandHermesLópez 19. DesignandImplementationofHierarchicalandDistributed ControlforRoboticManufacturingSystemsusingPetriNets 377 Gen’ichiYasuda 20. PerformanceEvaluationofDistributedSystems: AComponent-BasedModelingApproachbased onObjectOrientedPetriNets 391 AladdinMasri,ThomasBourdeaud’huiandArmandToguyeni 21. UsingPetriNetstoModelandSimulationProduction SystemsinProcessReengineering(casestudy) 419 PawlewskiPawel 22. WorkowDiagnosisUsingPetriNetCharts 445 CalinCiufudeanandConstantinFilote 23. EvaluationofPowerSystemSecuritywithPetriNets 469 JoseL.Sanchez,MarioA.RíosandGustavoRamos IX 24. FaultDiagnosisonElectricPowerSystemsbased onPetriNetApproach 491 AlejandraSantoyo-Sanchez,JoséAlbertoGutiérrez-Robles, ElviaRuiz-Beltrán,CarlosAlbertoDeJesús–Velasquez, LuisIsidroAguirre-SalasandVíctorOrtiz-Muro 25. GPenSIM:ANewPetriNetSimulator 525 ReggieDavidrajuh 26. AssessingRisksinCriticalSystemsusingPetriNets 539 LucioFlavioVismariandJoãoBatistaCamargoJunior 27. ModellingandAnalysisofTrafcLightControlSystems UsingTimedColouredPetrinets 565 Yi-ShengHuangandTa-HsiangChung2 28. TrafcNetworkControlBasedonHybridSystemModeling 587 YoungwooKim 29. UsingPetriNetsintheanalysisofsequentialautomata modelswithdirectapplicationsonthetransport systemswithaccumulationareas 623 DanUngureanu-Anghel 30. AnApproachBasedinPetriNetforRequirementAnalysis 651 ErmesonAndrade,PauloMaciel,GustavoCallou, BrunoNogueiraandCarlosAraujo 31. IntuitiveTransformationofUML2Activitiesinto FundamentalModelingConceptPetriNetsandColoredPetriNets 671 AnthonySpiteriStaines 32. MultilevelPetriNetsfortheSpecicationandDevelopment ofWorkowAutomationSystems 693 MarinaFlores-BadilloandErnestoLópez-Mellado 33. AnApplicationofPetriNetstoe/m-LearningEnvironments 713 CristinaDeCastroandPaoloToppan 34. Petrinets-basedModelsforWebServicesComposition 729 HuaikouMiaoandTaoHe X [...]... (2) In Equation (2), m0 [t1 m1 indicates that the marking m0 changes to m1 after the transition t1 fires m 0 [t1 m1 [t 2 m 2 [t 3 m0 (2) m 0 [t1 m1 [t 2 m 2 [t1 m3 [t 3 m0 (p1,p2,p3,p4,p5) m0 0 013 1 t1 m1 t3 m2 0 012 0 t3 t2 010 21 t1 11 010 m3 Fig 2 Reachability graph for the sample GSPN The set of markings reached from m0 is called a reachability set and is defined as follows: [Definition... example network using IEEE802 .11 e over the IEEE802 .11 a consisting of three hosts is evaluated Table 1 shows the parameters for the simulation An Application of GSPN for Modeling and Evaluating Local Area Computer Networks Access AIFSN Categories AC_BK 7 AC_BE 3 AC_VI 2 AC_VO 2 Table 1 Parameters for the ACs CW min CW max 15 15 7 3 10 23 10 23 15 7 9 TXOP Limit 1 frame 1 frame 3 ms 1. 5 ms Each AC has four... packets [ms] 2500 or 5000 Number 1 2 3 4 5 6 7 (1) Configuration AMD Duron 800MHz, 512 MB SDRAM Intel Celeron 2.4GHz, 512 MB DDRAM AMD Sempron 2.0Ghz, 512 MB DDRAM Intel P4 2.4GHz HT, 1GB DDRAM AMD Opteron 2.21GHz, 1GB DDRAM Ethernet 10 0Mbit Ethernet 10 00Mbit Table 1 Testing Configuration of Computer Systems Description Average time 2500 packets [ms] Ethernet 10 00Mbit Ethernet 10 0Mbit Intel Celeron Amd Duron... Intel Pentium 4 Amd Sempron 0,200496 0, 815 273469 0,2646 1, 712 097959 0 ,19 4256 0, 813 512 0,274432653 Table 2 Average Time Need for Generation of One Instance of Input Event Description Average time 5000 packets [ms] Ethernet 10 00Mbit Ethernet 10 0Mbit Intel Celeron Amd Duron Amd Opteron Intel Pentium 4 Amd Sempron 0,22 919 2 0,9 410 5 0,496 812 0,8239 0 ,15 8636 0,578 310 204 0,409856 Table 3 Average Time Need... Intrusion Detection Based on Partially Ordered Events 21 s4 t3 s1 t1 s2 cp( f ile1, f ile2) t2 s3 touch( f ile3) t4 s5 chmod( f ile2) Fig 4 Petri Net Intrusion Example Each intrusion is in the proposed IDS system represented by a Petri Net Petri Net places represent states or pre - post events conditions Input for Petri Net creation is plan of partially ordered events forming intrusion Petri Net transitions... Performance Analysis of Communication Systems with Non-Markovian Stochastic Petri Nets, John Wiley & Sons, Inc German, R.; Kelling, C.; Zimmermann, A & Hommel, G (19 95) TimeNET-a toolkit for evaluating non-Markovian stochastic Petrinets, Proceedings of the Sixth International Workshop on Petri Nets and Performance Models, pp. 210 - 211 Gibson, L & David, R (2007) Streaming Multimedia Delivery in Web Services... 1 , and the tokens in places p4 and p5 move to place p1 The assignment of tokens to places is called marking In this example, the marking changes from the initial marking m0 to the next marking m1 when t1 fires, as shown in Fig.2 The change in markings is represented by Equation (2) In Equation (2), m0 [t1 m1 indicates that the marking m0 changes to m1 after the transition t1 fires m 0 [t1 m1... Fig .1 shows a typical GSPN for M/M /1/ 1/3 In the figure, p1, p2, p3, p4, and p5 are places; t1 and t3 are the timed transitions; t2 is an immediate transition; and 1 and 3 are the firing rates for transitions t1 and t3 An Application of GSPN for Modeling and Evaluating Local Area Computer Networks 3 Fig 1 Sample GSPN 2.2 Reachability Graph and Markov Chain In the example net, the transition t1 fires... Networks 1 1 X An Application of GSPN for Modeling and Evaluating Local Area Computer Networks Masahiro Tsunoyama* and Hiroei Imai ** * Department of Information and Electronics Engineering, Niigata Institute of Technology 17 19 Fujihashi, Kashiwazaki 945 -11 95, JAPAN E-mail: mtuno@iee.niit.ac.jp ** University Evaluation Center, Niigata University, 8050 Ikarashi-2, Niigata-shi, Niigata 950- 218 1, JAPAN... (19 99).The Effect of Jitter on the Perceptual Quality of Video, ACM Multimedia ’99, pp .11 5 -11 8 Fan, Y.; Huang, C.Y & Tseng, Y.L (2006) Multimedia Services in IEEE 802 .11 e WLAN Systems, Proceedings of the 2006 International Conference on Wireless communications and mobile computing, pp.4 01 – 406 Ferguson, P & Huston, G (19 98) Quality of Service: Delivering QoS on the Internet and in Corporate Networks, . t 1 fires. 03 312 211 0 032 211 0 [[[[ [[[ mtmtmtmtm mtmtmtm (2) 0 013 1 0 012 0 11 010 010 21 m 0 m 1 m 2 m 3 t 1 t 2 t 1 t 3 t 3 (p 1 ,p 2 ,p 3 ,p 4 ,p 5 ) 0 013 1 0 012 0 11 010 010 21 m 0 m 1 m 2 m 3 t 1 t 2 t 1 t 3 t 3 (p 1 ,p 2 ,p 3 ,p 4 ,p 5 ) . t 1 fires. 03 312 211 0 032 211 0 [[[[ [[[ mtmtmtmtm mtmtmtm (2) 0 013 1 0 012 0 11 010 010 21 m 0 m 1 m 2 m 3 t 1 t 2 t 1 t 3 t 3 (p 1 ,p 2 ,p 3 ,p 4 ,p 5 ) 0 013 1 0 012 0 11 010 010 21 m 0 m 1 m 2 m 3 t 1 t 2 t 1 t 3 t 3 (p 1 ,p 2 ,p 3 ,p 4 ,p 5 ) . AnewControlSynthesisApproachofP-Time Petri Nets 16 1 BonhommePatrice 10 . CL-MAC:Cross-layerMACProtocolforDelaySensitive WirelessSensorNetwork Applications 17 9 KecharBouabdellahandSekhriLarbi VIII 11 . DistributedImplementationof Petri nets inControl Applications