Enhancing BDI Agents Using Fuzzy Logic for CPS and IoT Interoperability Using the JaCa Platform
<p>Overview of the MAPE-K loop.</p> "> Figure 2
<p>Overview of type-1 fuzzy systems.</p> "> Figure 3
<p>Mamdani type-1 fuzzy inference process.</p> "> Figure 4
<p>The proposed architecture based on the MAPE-K loop.</p> "> Figure 5
<p>Connection architecture of the physical case study.</p> "> Figure 6
<p>ESP32 microcontroller for creating IoT systems.</p> "> Figure 7
<p>LM-35 temperature sensor.</p> "> Figure 8
<p>Raspberry Pi 3 board.</p> "> Figure 9
<p>BrickPi adaptation board.</p> "> Figure 10
<p>Fuzzy functions.</p> "> Figure 11
<p>The comparison of the result with the jFuzzyLogic.</p> "> Figure 12
<p>Asynchronous communication with the IoT system.</p> ">
Abstract
:1. Introduction
2. Background
2.1. MAS and Jason BDI Agents
2.2. CArtAgO Artifacts
- Observable properties: The state variables that show the current status of an artifact that the agents can perceive.
- Observable events: The signals that can be indicated to the agents when certain events occur.
- Operations: The actions belong to the artifacts. These operations can be triggered by the agents that can change the values and status of observable properties. These changes can trigger the events of the other agents as well.
2.3. Internet of Things
2.4. MAPE-K Loop
- Monitor: The raw data are collected using distributed and standardized sensor nodes of the system.
- Analysis: Raw data are processed to achieve data-to-information transformation. This can be achieved using reasoning mechanisms and logical controls. However, uncertainty can diverge the analysis phase and beliefs of the system. Therefore, a pre-processing phase, such as fuzzification, can be applied.
- Planning: The pre-processed contextual information obtained from the analysis phase determines the plan and adaptation decision. Considering the BDI architecture, the software agents decide which plan should be applied to reach the goals.
- Execution: According to the decisions taken in the planning phase, the execution phase realizes the decided actions. In this phase, agents decide to actuate the physical components, such as motors, lights, and switches—their target components.
- Knowledge: Knowledge maintains data of the managed system, beliefs of the agents, steady-state conditions of the environment, adaptation goals, and other relevant states that are shared by the software agents.
2.5. Fuzzy Inference System
2.6. Fuzzy Logic-Based BDI Agents
2.7. Embedded Systems
2.8. CPS
3. Related Work
4. Proposed Architecture
5. Case Study: Distributed Fan Controller Enriched with Fuzzy Inference for the Multi-Agent System
Listing 1. The form of a Jason plan. |
|
5.1. Jason Only Implementation
Listing 2. Boolean logic based BDI Agent’s Plans. |
|
Listing 3. Fuzzy logic-based BDI Agent’s Plans. |
|
5.2. Physical Deployment of the Jason BDI Agents
5.2.1. Embedded Hardware
5.2.2. Embedded Software
Listing 4. ESP32 Software for sampling temperature data and sending it via UDP. |
|
Listing 5. UDP Receiver software in the Jason environment. |
|
Listing 6. UDP Receiver software in the Jason environment. |
|
5.2.3. Time Measurements
Listing 7. Code Excerpt to establish an NTP server in ESP32-Arduino software. |
|
Listing 8. Simple plan to receive UDP messages. |
|
5.3. Enhancing BDI Agents Using Fuzzy Logic and JaCa
Listing 9. The artifact creation plan. |
|
Listing 10. Mock-up sensor artifact. |
|
Listing 11. Fuzzy rules of the fuzzy logic controller. |
|
Listing 12. Fuzzy function boundaries. |
|
Listing 13. Timer artifact. |
|
Listing 14. Rule Inference Phase using AND (Min). |
|
Listing 15. Defuzzification Phase. |
|
Listing 16. Communication Interface Artifact. |
|
Distributed and Adaptive Scenario
6. Discussion and Conclusions
6.1. Discussion
6.2. Conclusions and Future Work
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
References
- Greer, C.; Burns, M.; Wollman, D.; Griffor, E. Cyber-Physical Systems and Internet of Things; NIST: Washington, DC, USA, 2019.
- Challenger, M.; Getir, S.; Demirkol, S.; Kardas, G. A domain specific metamodel for semantic web enabled multi-agent systems. In Proceedings of the Advanced Information Systems Engineering Workshops—CAiSE 2011 International Workshops, London, UK, 20–24 June 2011; pp. 177–186. [Google Scholar]
- Kardas, G.; Challenger, M.; Yildirim, S.; Yamuc, A. Design and implementation of a multiagent stock trading system. Softw. Pract. Exp. 2012, 42, 1247–1273. [Google Scholar] [CrossRef]
- Bratman, M. Intention, Plans, and Practical Reason; Harvard University Press: Cambridge, MA, USA, 1987. [Google Scholar]
- Bratman, M.E.; Israel, D.J.; Pollack, M.E. Plans and resource-bounded practical reasoning. Comput. Intell. 1988, 4, 349–355. [Google Scholar] [CrossRef]
- Tezel, B.T.; Challenger, M.; Kardas, G. A metamodel for Jason BDI agents. In Proceedings of the 5th Symposium on Languages, Applications and Technologies (SLATE’16), Maribor, Slovenia, 20–21 June 2016; Schloss Dagstuhl-Leibniz-Zentrum fuer Informatik: Maribor, Slovenia, 2016. [Google Scholar]
- Kardas, G.; Tezel, B.T.; Challenger, M. Domain-specific modelling language for belief–desire–intention software agents. IET Softw. 2018, 12, 356–364. [Google Scholar] [CrossRef]
- Rao, A.S.; Georgeff, M.P. BDI agents: From theory to practice. In Proceedings of the First International Conference on Multiagent Systems, San Francisco, CA, USA, 12–14 June 1995; Volume 95, pp. 312–319. [Google Scholar]
- Rao, A.S.; Georgeff, M.P. Modeling rational agents within a BDI-architecture. KR 1991, 91, 473–484. [Google Scholar]
- Herrera, J.L.L.; Ríos-Figueroa, H.V. JaCa-MM: A User-centric BDI Multiagent Communication Framework Applied for Negotiating and Scheduling Multi-participant Events-A Jason/Cartago Extension Framework for Diary Scheduling Events Permitting a Hybrid Combination of Multimodal Devices based on a Microservices Architecture. In Proceedings of the 10th International Conference on Agents and Artificial Intelligence, ICAART 2018, Madeira, Portugal, 16–18 January 2018; pp. 318–330. [Google Scholar]
- Santi, A.; Guidi, M.; Ricci, A. Jaca-android: An agent-based platform for building smart mobile applications. In Proceedings of the International Workshop on Languages, Methodologies and Development Tools for Multi-Agent Systems, Lyon, France, 30 August–1 September 2010; pp. 95–114. [Google Scholar]
- Challenger, M.; Tezel, B.T.; Amaral, V.; Goulao, M.; Kardas, G. Agent-based cyber-physical system development with sea_ml++. In Multi-Paradigm Modelling Approaches for Cyber-Physical Systems; Elsevier: Amsterdam, The Netherlands, 2021; pp. 195–219. [Google Scholar]
- Karaduman, B.; Tezel, B.T.; Challenger, M. Towards Applying Fuzzy Systems in Intelligent Agent-based CPS: A Case Study. In Proceedings of the 2021 6th International Conference on Computer Science and Engineering (UBMK), Ankara, Turkey, 15–17 September 2021; pp. 735–740. [Google Scholar]
- Ricci, A.; Viroli, M.; Omicini, A. CArtAgO: A framework for prototyping artifact-based environments in MAS. In Proceedings of the International Workshop on Environments for Multi-Agent Systems, Hakodate, Japan, 8 May 2006; pp. 67–86. [Google Scholar]
- Bordini, R.H.; Hübner, J.F. BDI agent programming in AgentSpeak using Jason. In Proceedings of the International Workshop on Computational Logic in Multi-Agent Systems, London, UK, 27–29 June 2005; pp. 143–164. [Google Scholar]
- Arcaini, P.; Riccobene, E.; Scandurra, P. Modeling and analyzing MAPE-K feedback loops for self-adaptation. In Proceedings of the 2015 IEEE/ACM 10th International Symposium on Software Engineering for Adaptive and Self-Managing Systems, Florence, Italy, 18–19 May 2015; pp. 13–23. [Google Scholar]
- Petrovska, A.; Neuss, M.; Gerostathopoulos, I.; Pretschner, A. Run-time Reasoning from Uncertain Observations with Subjective Logic in Multi-Agent Self-Adaptive Cyber-Physical Systems. In Proceedings of the 16th Symposium on Software Engineering for Adaptive and Self-Managing Systems, SEAMS, Madrid, Spain, 18–24 May 2021. [Google Scholar]
- Karaduman, B.; Challenger, M. Smart Cyber-Physical System-of-Systems Using Intelligent Agents and MAS. In Proceedings of the International Workshop on Engineering Multi-Agent Systems, Virtual Event, 3–4 May 2021; pp. 187–197. [Google Scholar]
- Karaduman, B.; Tezel, B.T.; Challenger, M. Deployment of Software Agents and Application of Fuzzy Controller on the UWB Localization based Mobile Robots. In Proceedings of the Intelligent and Fuzzy Systems, INFUS 2022, Izmir, Turkey, 19–21 July 2022; Springer: Cham, Switzerland, 2022; Volume 504. [Google Scholar]
- Rao, A.S. AgentSpeak (L): BDI agents speak out in a logical computable language. In Proceedings of the European Workshop on Modelling Autonomous Agents in a Multi-Agent World, Eindhoven, The Netherlands, 22–25 January 1996; pp. 42–55. [Google Scholar]
- Georgeff, M.; Ingrand, F. Decision-making in an embedded reasoning system. In Proceedings of the International Joint Conference on Artificial Intelligence, Detroit, MI, USA, 20–25 August 1989. [Google Scholar]
- Rao, A.S.; Georgeff, M.P. Decision procedures for BDI logics. J. Log. Comput. 1998, 8, 293–343. [Google Scholar] [CrossRef]
- Ricci, A.; Piunti, M.; Viroli, M. Environment programming in multi-agent systems: An artifact-based perspective. Auton. Agents -Multi-Agent Syst. 2011, 23, 158–192. [Google Scholar] [CrossRef]
- Croatti, A.; Ricci, A. Mobile Apps as Personal Assistant Agents: The JaCa-Android Framework for programming Agents-based applications on mobile devices. Auton. Agents -Multi-Agent Syst. 2020, 34, 1–27. [Google Scholar] [CrossRef]
- Croatti, A.; Montagna, S.; Ricci, A.; Gamberini, E.; Albarello, V.; Agnoletti, V. BDI personal medical assistant agents: The case of trauma tracking and alerting. Artif. Intell. Med. 2019, 96, 187–197. [Google Scholar] [CrossRef] [PubMed]
- Palanca, J.; Rincon, J.; Julian, V.; Carrascosa, C.; Terrasa, A. Developing IoT Artifacts in a MAS Platform. Electronics 2022, 11, 655. [Google Scholar] [CrossRef]
- Calvaresi, D.; Marinoni, M.; Sturm, A.; Schumacher, M.; Buttazzo, G. The challenge of real-time multi-agent systems for enabling IoT and CPS. In Proceedings of the International Conference on Web Intelligence, Leipzig, Germany, 23–26 August 2017; pp. 356–364. [Google Scholar]
- Villegas, N.M.; Tamura, G.; Müller, H.A.; Duchien, L.; Casallas, R. DYNAMICO: A reference model for governing control objectives and context relevance in self-adaptive software systems. In Software Engineering for Self-Adaptive Systems II; Springer: Berlin/Heidelberg, Germany, 2013; pp. 265–293. [Google Scholar]
- Zadeh, L.A. Fuzzy sets. In Fuzzy Sets, Fuzzy Logic, and Fuzzy Systems: Selected Papers by Lotfi A Zadeh; World Scientific: Singapore, 1996; pp. 394–432. [Google Scholar]
- Alcalá-Fdez, J.; Alonso, J.M. A survey of fuzzy systems software: Taxonomy, current research trends, and prospects. IEEE Trans. Fuzzy Syst. 2015, 24, 40–56. [Google Scholar] [CrossRef]
- Zadeh, L.A. Outline of a new approach to the analysis of complex systems and decision processes. IEEE Trans. Syst. Man, Cybern. 1973, SMC-3, 28–44. [Google Scholar] [CrossRef] [Green Version]
- Cuevas, F.; Castillo, O.; Cortés-Antonio, P. Generalized Type-2 Fuzzy Parameter Adaptation in the Marine Predator Algorithm for Fuzzy Controller Parameterization in Mobile Robots. Symmetry 2022, 14, 859. [Google Scholar] [CrossRef]
- Arogundade, O.; Atasie, C.; Misra, S.; Sakpere, A.; Abayomi-Alli, O.; Adesemowo, K. Improved predictive system for soil test fertility performance using fuzzy rule approach. In Proceedings of the International Conference on Soft Computing and its Engineering Applications, Anand, India, 11–12 December 2020; pp. 249–263. [Google Scholar]
- Gheibi, O.; Weyns, D.; Quin, F. Applying machine learning in self-adaptive systems: A systematic literature review. ACM Trans. Auton. Adapt. Syst. (TAAS) 2021, 15, 1–37. [Google Scholar] [CrossRef]
- Weyns, D. Wave VII: Learning from Experience. In An Introduction to Self-Adaptive Systems: A Contemporary Software Engineering Perspective; John Wiley & Sons Ltd.: Hoboken, NJ, USA, 2020. [Google Scholar]
- Queiroz, J.; Leitão, P.; Oliveira, E. A Fuzzy Logic Recommendation System to Support the Design of Cloud-Edge Data Analysis in Cyber-Physical Systems. IEEE Open J. Ind. Electron. Soc. 2022, 3, 174–187. [Google Scholar] [CrossRef]
- Ben Mekki, A.; Tounsi, J.; Ben Said, L. Fuzzy BDI agents for supply chain monitoring in an uncertain environment. Supply Chain. Forum Int. J. 2016, 17, 109–123. [Google Scholar] [CrossRef]
- Chen, M.; Hu, X. Using Fuzzy Logic as a Reasoning Model for BDI Agents. In Proceedings of the 2010 International Conference on Computational Intelligence and Software Engineering, Wuhan, China, 10–12 December 2010; pp. 1–4. [Google Scholar]
- Challenger, M.; Vangheluwe, H. Towards employing ABM and MAS integrated with MBSE for the lifecycle of sCPSoS. In Proceedings of the 23rd ACM/IEEE International Conference on Model Driven Engineering Languages and Systems: Companion Proceedings, Virtual Event, Canada, 18–23 October 2020; pp. 1–7. [Google Scholar]
- Barišic, A.; Savic, D.; Al-Ali, R.; Ruchkin, I.; Blouin, D.; Cicchetti, A.; Eslampanah, R.; Nikiforova, O.; Abshir, M.; Challenger, M.; et al. Systematic Literature Review on Multi-Paradigm Modelling for Cyber-Physical Systems; Technical Report, Zenodo (Archive); 2019; Unpublished. [Google Scholar]
- Jeschke, S.; Brecher, C.; Meisen, T.; Özdemir, D.; Eschert, T. Industrial internet of things and cyber manufacturing systems. In Industrial Internet of Things; Springer: Berlin/Heidelberg, Germany, 2017; pp. 3–19. [Google Scholar]
- Ochoa, S.F.; Fortino, G.; Di Fatta, G. Cyber-Physical Systems, Internet of Things and Big Data. Future Gener. Comput. Syst. 2017, 75, 82–84. [Google Scholar] [CrossRef]
- Bierzynski, K.; Escobar, A.; Eberl, M. Cloud, fog and edge: Cooperation for the future? In Proceedings of the 2017 Second International Conference on Fog and Mobile Edge Computing (FMEC), Valencia, Spain, 8–11 May 2017; pp. 62–67. [Google Scholar]
- Queiroz, J.; Leitão, P.; Barbosa, J.; Oliveira, E. Distributing intelligence among cloud, fog and edge in industrial cyber-physical systems. In Proceedings of the 16th International Conference on Informatics in Control, Automation and Robotics, ICINCO 2019, Prague, Czech Republic, 29–31 July 2019; pp. 447–454. [Google Scholar]
- Leitao, P.; Karnouskos, S.; Ribeiro, L.; Lee, J.; Strasser, T.; Colombo, A.W. Smart agents in industrial cyber–physical systems. Proc. IEEE 2016, 104, 1086–1101. [Google Scholar] [CrossRef] [Green Version]
- Calinescu, R.; Mirandola, R.; Perez-Palacin, D.; Weyns, D. Understanding Uncertainty in Self-adaptive Systems. In Proceedings of the 2020 IEEE International Conference on Autonomic Computing and Self-Organizing Systems (ACSOS), Washington, DC, USA, 17–21 August 2020; pp. 242–251. [Google Scholar]
- Bolturk, E.; Kahraman, C. Humanoid Robots and Fuzzy Sets. In Toward Humanoid Robots: The Role of Fuzzy Sets; Springer: Berlin/Heidelberg, Germany, 2021; pp. 3–25. [Google Scholar]
- Bolturk, E.; Kahraman, C. Fuzzy Sets and Extensions: A Literature Review. In Toward Humanoid Robots: The Role of Fuzzy Sets; Springer: Cham, Switzerland, 2021; pp. 27–95. [Google Scholar]
- Valdez, F.; Castillo, O.; Caraveo, C.; Peraza, C. Comparative Study of Conventional and Interval Type-2 Fuzzy Logic Controllers for Velocity Regulation in Lego Mindstorms Ev3 Humanoids. In Toward Humanoid Robots: The Role of Fuzzy Sets; Springer: Berlin/Heidelberg, Germany, 2021; pp. 201–219. [Google Scholar]
- Cuevas, F.; Castillo, O.; Cortes, P. Control Strategies Based on Interval Type-2 Fuzzy Logic for Autonomous Mobile and Humanoid Robots. In Toward Humanoid Robots: The Role of Fuzzy Sets; Springer: Berlin/Heidelberg, Germany, 2021; pp. 221–236. [Google Scholar]
- Xing, W.; Jun, Y.; Peihuang, L.; Dunbing, T. Agent-oriented embedded control system design and development of a vision-based automated guided vehicle. Int. J. Adv. Robot. Syst. 2012, 9, 37. [Google Scholar] [CrossRef]
- Ciortea, A.; Mayer, S.; Michahelles, F. Repurposing manufacturing lines on the fly with multi-agent systems for the web of things. In Proceedings of the 17th International Conference on Autonomous Agents and Multiagent Systems, Stockholm, Sweden, 10–15 July 2018; pp. 813–822. [Google Scholar]
- Minotti, M.; Ricci, A.; Santi, A. Exploiting agent-oriented programming for developing future internet applications based on the web: The jaca-web framework. In Proceedings of the International Workshop on Languages, Methodologies and Development Tools for Multi-Agent Systems, Lyon, France, 30 August–1 September 2010; pp. 76–94. [Google Scholar]
- Croatti, A.; Ricci, A. Programming Agent-based Mobile Apps: The JaCa-Android Framework. In Proceedings of the 20th International Conference on Autonomous Agents and MultiAgent Systems, Virtual Event, UK, 3–7 May 2021; pp. 1724–1726. [Google Scholar]
- Croatti, A.; Ricci, A. The JaCa-Android Framework for Programming BDI-Based Personal Agents on Mobile Devices. In Proceedings of the International Conference on Practical Applications of Agents and Multi-Agent Systems, L’Aquila, Italy, 7–9 October 2020; pp. 80–92. [Google Scholar]
- Palanca, J.; Terrasa, A.; Julian, V.; Carrascosa, C. Spade 3: Supporting the new generation of multi-agent systems. IEEE Access 2020, 8, 182537–182549. [Google Scholar] [CrossRef]
- Ricci, A.; Viroli, M.; Omicini, A. Construenda est CArtAgO: Toward an Infrastructure for Artifacts in MAS; Citeseer. 2006. Available online: http://lia.deis.unibo.it/~ao/pubs/pdf/2006/atai-rvo.pdf (accessed on 15 June 2022).
- Bienz, S.; Ciortea, A.; Mayer, S.; Gandon, F.; Corby, O. Escaping the streetlight effect: Semantic hypermedia search enhances autonomous behavior in the web of things. In Proceedings of the 9th International Conference on the Internet of Things, Bilbao, Spain, 22–25 October 2019; pp. 1–8. [Google Scholar]
- Ciortea, A.; Boissier, O.; Ricci, A. Engineering world-wide multi-agent systems with hypermedia. In Proceedings of the International Workshop on Engineering Multi-Agent Systems, Stockholm, Sweden, 14–15 July 2018; pp. 285–301. [Google Scholar]
- Weyns, D. An Introduction to Self-Adaptive Systems: A Contemporary Software Engineering Perspective; John Wiley & Sons: Hoboken, NJ, USA, 2020. [Google Scholar]
- Cingolani, P.; Alcalá-Fdez, J. jFuzzyLogic: A java library to design fuzzy logic controllers according to the standard for fuzzy control programming. Int. J. Comput. Intell. Syst. 2013, 6, 61–75. [Google Scholar] [CrossRef] [Green Version]
- Yalcin, M.M.; Karaduman, B.; Kardas, G.; Challenger, M. An agent-based cyber-physical production system using lego technology. In Proceedings of the 2021 16th Conference on Computer Science and Intelligence Systems (FedCSIS), Online, 2–5 September 2021; pp. 521–531. [Google Scholar]
- Mordenti, A. Programming Robots with an Agent-Oriented Bdi-Based Control Architecture: Explorations Using the Jaca and Webots Platforms. Ph.D. Thesis, Universita di Bologna, Bologna, Italy, 2012. [Google Scholar]
Phase | Time Delay | Activity |
---|---|---|
ESP32/Arduino | ≈1 ms | Sample and send |
Jason(Sense) only | ≈0 ms | Receive sense data |
Jason(Sense)-to-Jason(Reasoning) | =8–10 s | After sense to plan selection |
Jason(Plan)-to-Jason(Actuation) | ≈0 ms | Plan intention and action |
ESP32(Sender)-to-Java(Receiver) | ≈0 ms | UDP communication |
Java only | ≈0 ms | Match data to fuzzy functions |
ESP32-to-python | ≈0 ms | UDP communication |
Python only | ≈0 ms | Match data to fuzzy functions |
Device | # of Packets | Time Delay | # of Lost Packets |
---|---|---|---|
ESP32 | 5 | 0 | 2 |
ESP32 | 50 | 1 s | 5 |
ESP32 | 100 | 3 s | 5 |
ESP32 | 150 | 3 s | 8 |
ESP32 | 250 | 4 s | 9 |
ESP32 | 300 | 5 s | 19 |
ESP32 | 500 | 5 s | 221 |
ESP32 | 1000 | 5 s | 721 |
PC | 5 | 0 | 0 |
PC | 50 | 1 s | 0 |
PC | 100 | 2 s | 0 |
PC | 150 | 2 s | 0 |
PC | 250 | 4 s | 0 |
PC | 300 | 5 s | 15 |
PC | 500 | 5 s | 215 |
PC | 1000 | 5 s | 715 |
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |
© 2022 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 (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Karaduman, B.; Tezel, B.T.; Challenger, M. Enhancing BDI Agents Using Fuzzy Logic for CPS and IoT Interoperability Using the JaCa Platform. Symmetry 2022, 14, 1447. https://doi.org/10.3390/sym14071447
Karaduman B, Tezel BT, Challenger M. Enhancing BDI Agents Using Fuzzy Logic for CPS and IoT Interoperability Using the JaCa Platform. Symmetry. 2022; 14(7):1447. https://doi.org/10.3390/sym14071447
Chicago/Turabian StyleKaraduman, Burak, Baris Tekin Tezel, and Moharram Challenger. 2022. "Enhancing BDI Agents Using Fuzzy Logic for CPS and IoT Interoperability Using the JaCa Platform" Symmetry 14, no. 7: 1447. https://doi.org/10.3390/sym14071447
APA StyleKaraduman, B., Tezel, B. T., & Challenger, M. (2022). Enhancing BDI Agents Using Fuzzy Logic for CPS and IoT Interoperability Using the JaCa Platform. Symmetry, 14(7), 1447. https://doi.org/10.3390/sym14071447