The variety of smart devices and their communication models increase the development complexity of embedded software for IoT. Thus, the development of these systems becomes more error-prone, complex, and costly. To tackle this problem, in this study, a model-driven approach is proposed for the development of RIOT-OS based IoT systems. To this end, a meta-model is designed for RIOT-OS. Based on this meta-model, a Domain-specific Modeling Language (DSML) is developed to graphically represent the domain models. To gain more functionality for the language, domain rules are defined as constraints. Also, system codes are generated partially from the instance models. In this way, the development is supported by code synthesis and the number of bugs is reduced. Finally, a smart irrigation system and a smart lighting system are implemented to evaluate the proposed DSML. The results show that about 83.5% of the final code is generated automatically on average.
Cyber-physical systems (CPSs) are complex systems interacting with the physical world where instant external changes and uncertain events exist. The Internet of Things is a paradigm that can interoperate with a CPS to increase the CPS’s network and communication capabilities. In the literature, software agents, particularly belief–desire–intention (BDI) agents, are considered options to program these heterogeneous and complex systems in various domains. Moreover, fuzzy logic is a method for handling uncertainties. Therefore, the enhancement of BDI with fuzzy logic can also be employed to improve the abilities, such that autonomy, pro-activity, and reasoning, which are essentials for intelligent systems. These features can be applied in CPSs and IoT interoperable systems. This study extends the CPSs and IoT interoperable systems using fuzzy logic and intelligent agents as symmetric paradigms that equally leverage these domains as well as benefit the agent & artifact approach. In this regard, the main contribution of this study is the integration approach, used to combine the CPS and IoT augmented with fuzzy logic using BDI agents. The study begins with constructing the design primitives from scratch and shows how Jason BDI agents can control the distributed CPS. The study then performs the artifact approach by encapsulating a fuzzy inference system, utilizing time-based reasoning, and benefiting from symmetric fuzzy functions. Lastly, the study applies the self-adaptiveness method and flexibility plan selection, considering the run-time MAPE-K model to tackle run-time uncertainty.
The Internet of Things and its technologies have evolved quickly in recent years. It became an umbrella term for various technologies, embedded devices, smart objects, and web services. Although it has gained maturity, there is still no clear or common definition of references for creating WSN-based IoT systems. In the awareness that creating an omniscient and ideal architecture that can suit all design requirements is not feasible, modular and scalable architecture that supports adding or subtracting components to fit a lot of requirements of various use cases should be provided as a starting point. This chapter discusses such an architecture and reference implementation. The architecture should cover multiple layers, including the cloud, the gateway, and the edges of the target system, which allows monitoring the environment, managing the data, programming the edge nodes and networking model to establish communication between horizontal and vertical embedded devices. In order to exemplify the proposed architecture and reference implementation, a smart irrigation case study is used.