Semantic Interoperability for Context-Aware Autonomous Control using IoT and Edge Computing


 The exponential development of Internet of things (IoT) services over edge computing and cloud networks has increased the utilities of remote monitoring, control systems, continuous maintenance and effective utilization of services for applications, such as smart cities. However, data modelling is required to manage such heterogeneous data sources. IoT applications gather data from diverse sources. These applications sometimes obtain data in the form of datasets. Heterogeneous datasets are used for various purposes, and the issue of semantic interoperability arises. Therefore, this paper presents an empirical study of IoT-based semantic interoperability. This study aims at combining portable and fixed sensors with an intermediate microcontroller module and annotating data semantically for the smart autonomous environment, smart home. A context model is devised for developing a mechanism over an ontology schema for managing and passing controlling and monitoring messages to home appliances effectively. The proposed model integrates the environment with the context of a person in a smart autonomous environment for efficient energy consumption and enhanced living context model experience.


Introduction
Semantic web technologies are becoming more familiar and more frequently used to improve semantic interoperability within various ventures. The design and construction of RDF graphs and ontology construction also pave the way for the integration of Internet of Things (IoT) [1] with the semantic web. The 5 semantic web is applied to reuse the available knowledge instead of regenerating it [2]. In contrast, the IoT [3] is a combination of devices that have sensing capabilities and their identification via the use of radio frequency identification (RFID). The integration of devices and sensor communication technologies forms the basis of IoT [4]. One of the largest challenges in the era of IoT is the 10 huge volume of data that are gathered and produced by things and services.
The applications of IoT include security applications, firefighting applications, healthcare applications, smart cities, smart houses, mining productions, and transportation [5]. Despite the widespread application of IoT [6], it remains in its early stages with respect to various issues. One of the most important 15 issues is the semantic operability of devices. This issue can be resolved only by operating all smart devices under common standards. In energy efficient and remote control scenarios, these applications can yield substantial improve-2 ments in performance and lifetime when these smart devices operate properly [7]. Smart device and hardware utilization will lead to the transformation of 20 existing cities into smart cities. Semantic interoperability is realized via the use of the resource description framework (RDF) and IoT devices. Through the use of the simple protocol and RDF, query language (SPARQL) query data can be extracted from an ontology via intelligence rule mining [4]. Due to the enhancement of technology, people have become addicted to an easy lifestyle. 25 Automation plays a vital role in providing an easy lifestyle to humans in every field of life, such as industry. For home automation, state-of-the-art technologies are emerging. In IoT, things are interlinked via the Internet and communicate with one another to promote different concepts, such as home automation, thus, smoothing household tasks specially to disabled people [8] [9]. Moreover, home 30 automation is expected to be implemented in most homes in the future. Things require a mechanism for communicating with each other. In the home automation, many issues including energy consumption and waste of resources [7] are encountered. A smart system should be aware of the user's context according to which decisions are made and things are turned on [4]. Therefore, background 35 research must be conducted not only for tracking the current state of semantic interoperability but also for improving it. This paper directs the reader's intentions towards the reuse of available knowledge, including datasets, ontologies, RDF graphs, search engines and repositories of the semantic web. Through this study, the ontology methodology's related work for data transformation is uti-40 lized for the development of semantic interoperability [2]. Figure 1 shows that the development of mobile networks is moving towards smart homes and smart cities applications. Applications developed over 5G network will be enhanced and will have more connectivity with other applications. These applications have higher speed and end with much better performance because of the high 45 bit rate and expected widespread coverage. In this article, image processing is used to detect human presence in a room and to control hardware according to a sensing device measurement control mechanism. Home automation creates a smart environment. A methodology that encourages the semantic operability of the IoT's applications is designed.

50
The interpretation of IoT data for building IoT-based semantic inter-operable applications is an important task. This paper describes the field of IoT and highlights the potential advantages of its application for the public. Embedded devices such as the raspberry pi camera and sensing devices, used to control the automation system, are also presented.

Literature Review
Technological development has transformed many aspects of people's lives.
It has affected various aspects of the day-to-day routine and enabled stronger social affiliation, effortlessness in transportation, and the ability to appreciate incitement. The media has also helped making headway for medical solutions.

60
The development of various devices, such as personal digital assistants (PDAs) and personal computers (PCs) [11], has influenced various people to rely upon technological advancement in daily activities [12]. The web must be transformed into a regular interface that various devices use with the objective of streamlining the everyday work of various people. The web enables us to find solutions 65 for a few issues and to work from remote spots, which reduces our overall costs and increases ease of use [13]. Home automation appliances might be regarded as innovations that provide simplicity and insurance to its inhabitants. Thanks to IoT innovation, the examination and execution of home mechanization have become extra-normal [12]. Various remote innovations, which can bolster a few 70 types of remote information exchange, detection and administration, such as Bluetooth, Wi-Fi and cellular systems, are utilized to provide high levels of performance inside the home. Home mechanization for the more established and debilitated will offer increased personal [14]. It might provide an interface for home machines or the mechanization framework. It can be done by using 75 a phone line or the web to perform administration and recognition through an advanced mobile phone or PC [15]. IoT has attained substantial fame for the field of remote access and control from scientists, industries, and governments around the world for its potential range of services for cutting-edge living. IoT is envisioned as a huge number of sensors that are associated with the web through 80 remote and other related advancements [16]. The inter-related sensors produce a huge volume of information, which should be examined, deciphered then used [5]. Via minimal effort, an adaptable automation framework is operated for the home. This automation framework upgrades the utilization of remote correspondence, which enables remote control by the customer of various electrical 85 and mechanical apparatuses [12]. The Neon project emphasizes the reuse of available knowledge [17]. The European Research Cluster on IoT was released in 2015, which consists of recommendations for semantic interoperability [18].
Semantic interoperability concerns the ontology heterogeneity and the meanings of data that are changed by small sensing devices according to the environment 90 [19]. Semantic-level machine-to-machine interoperability has motivated several research projects on improving traditional technologies. Important examples of these applications include the task computing environment (TCE) [20], solutions for Link Smart [21] , and COCOA, which has been integrated with OWL-S [22], leading to further application development. Smart home automation uses the of an image for background subtraction [23].

Semantic Interoperability for Autonomous Control
IoT has evolved along with the troubles that are faced while directing all   highly suitable for creating a rule-based inference engine. The inference engine provides more analysis data for generating commands that are built on linked 6 data and constraints. These constraints must be satisfied while controlling electronic devices. In Figure 3, data are processed through the sending commands 115 to the controller after undergoing a three-phased data transformation procedure. Phase 1 consists of the data model analysis. In the second phase, data are mapped with alternative representation in XML format. Finally, in the last phase, data are made available as triples in RDF format that are ready for the inference engine to carry out artificial intelligence operations. These opera-120 tions are based on special rules defined for controlling the devices remotely and automatically. work via WIFI and send data to the cloud [25]. microcontrollers can communicate autonomously with devices and sensors via internet, although the cloud 125 is used as the main component between these micro controllers [26]. The cloud provides a log between the micro controller connectivity and the communication network as illustrated in Figure 4.  Smart home automation applies image processing to detect a human in a room. If the human detection result is positive, a human is in the room and 130 the control system switches to semantic interoperability status. The room environment activates as shown in Figure 5. Otherwise, the room status becomes unoccupied and no signal is forwarded to the control system of the room.

135
In this case study, a system that detects the user context inside a home and accordingly activates the sub-portion of the system that corresponds to the user's location is modelled. This system is illustrated in Figure 6. In Figure 6, a home automation system is illustrated, within which we represent two rooms inside a home and home appliances that exhibit interoperability. 140 These appliances, which include an air conditioner, a fan and electrical bulbs, communicate using sensor devices reading data from the room. Based on the retrieved data from the home appliances, the output is controlled and monitored simultaneously. The fan utilizes a humidity sensor: if the humidity increases, the fan speed will slow down automatically and if it decreases, the fan speed will 145 rise while being controlled and manipulated using microcontroller. Similarly, the air conditioner uses a temperature sensor where the ambient temperature and the air conditioner's temperature are inversely proportional. According to the temperature, the air conditioner reduces or increases the cooling control power.
The electrical bulbs, inside the room, use detection sensors: if these sensors 150 detect someone, they send a signal. In addition, according to this signal, the electric bulb state will be on or off. Cameras are used to detect the presence of 9 a person in the rooms by using object detection through image processing. The proposed setup for home appliance automation utilizes sustainable computing.
The realization of interoperability among these appliances is discussed. We use a microcontroller to interlink with other kind of devices and to make decisions, as listed in table 1. Figure 7 illustrates how the setup operates [27].
In the figure, the arrow signs represent the input and output, and the arrow direction is towards the controller or an appliance. Sensors read data and send these data to the controller which, in its turn, sends a signal to the device to 160 control its on or off state. In Figure 7, we have a humidity sensor that collects humidity and temperature data and sends them to the microcontroller. If the temperature increases past 35 degrees Celsius, then a 3.3 v signal is relayed to the air conditioner as a command. For the fan, if the humidity reaches 18, a PWM (pulse width modulation) signal is sent to the AC voltage PWM module 165 and according to the PWM value, the fan speed will increase or decrease. The same approach is followed by the refrigerator. We use detection sensors that detect a person and send the signal towards the controller. This latter will turn the bulb on or off depending on the IR detection sensor data that describe the 10 context of use inside the home. Two sensors are used: a laser sensor, which emits 170 light, and a photoresistor, which absorbs this laser light. When the user crosses this laser light, the photo resister module detects the user, and according to the user context, the microcontroller decides whether to turn on the appliances in the room where the user is present. We have implemented this system. We will further describe the system with the help of graphical images.

Formulating the Sensor Setup
To formulate the sensors setup for data collection and for realizing semantic interoperability, it is necessary to investigate the transformation mechanism be- Hence, if the sensor value is 920, the output humidity becomes 80 and the remaining value will be ignored.  Table 2 lists the mappings from 220 temperature to voltage. According to Table 2, if the temperature value is above 35, the AC voltage will be at its full capacity. If the temperature value is between 30 and 35, the AC output voltage of the module will be between 180 and 220.
• Data Semantic Annotation Now, the real-time readings are recorded and 225 stored in two formats, such as XML and RDF (as shown in Figure 8).
The World Wide Web Consortium (W3C) specifications are followed in annotating the obtained data in the semantic realization. In Figure 8,  For further communication for schema at both ends of the data, either XML or RDF is needed prior to data recording and annotation. Figure 9 (a) shows a schema representation of the XML data element while Figure   9 (b) shows a schema representation for RDF data.

240
The dataset is collected over 5-second intervals in a 4-day span in two rooms of a home to evaluate the automatic device control over sensors. Data collection is conducted according to the user context: if the user switches rooms, the control is switched to the other room while the readings of both rooms are captured. The experiment can be classified into two scenarios, namely, the 245 person is in room 1 and the person is in room 2, as illustrated in Figure 11 and    Figure 12 (a), the temperature of Room 1 is 35 degrees Celsius and the humidity is 16.
Inside the refrigerator in this room, the temperature is 28 degrees Celsius and the 255 photoresistor sensor value of 0 indicates that the user is not inside of Room 1 and the IR obstacle detection sensor also shows a value of 0; hence, our bulb is turned off. After 10 minutes, the room temperature decreases to 31 degrees Celsius, the humidity increases to 25, and the refrigerator temperature decreases. The photo resistor value becomes 0 and Figure 12 (b) shows the result for Room 260 1. Now, the IR obstacle detection sensor value is 1 and somebody is under the light bulb. The bulb will go on in Figure 12 (b). Thus, by following this pattern in the current time period, the temperature reaches 15 degrees Celsius, the humidity is 58, and refrigerator temperature is 13. Therefore, according to the user, Figure 12 (a) shows that when the user entered the room at this time, 265 the temperature was 35 degrees Celsius, and now the temperature is 15 degrees Celsius, as specified in Figure 12 (a).    When the user changes the context and is at room 2, the photo resistor detects the values for the appliances that are on in Room 2, and the Room 1 appliances will be off. Figure 14 (a) presents the readings when the user is inside Room 2. According to these values, the output of Room 2 is presented 285 in the graph in Figure 14 (b). At that time, the output of Room 1 is presented in Figure 14 (c). Because the user changes the context by leaving Room 1 and entering Room 2, the appliances of Room 1 are turned off, and the temperature and humidity of Room 1 gradually increase, as represented in Figure 14 (d).  This is an evident fact because of the cross relation between humidity and temperature in humid environment. This has been already mentioned by J Bernan "If you raise the temperature while keeping moisture content constant, the relative humidity decreases." [23].  Figure 14 (b). In Figure 12 (b) Fan power consumption drops as the room humidity rises. Figure 14 (d) shows a decrease of humidity since the fan is switched off as shown, also, in Figure 14 (c). Figure 14

Conclusions
Environmental features can be measured as signs while sitting in the comfort of our homes. These readings can be stored on our mobiles or remotes systems. IoT devices can be used to facilitate remote monitoring and to activate notification systems if any change in the environmental scenario occur. IoT 320 provides a reduction in cost and extends the scope of energy-efficient facilities to remote areas; it also enhances the quality of services. The full economic 22 benefits of IoT-based semantic interoperability for smart home appliances are due to the availability of the data in a structured format. Many semantic-level data sources will be obtainable for the integration of datasets with IoT sensing 325 devices. Based on data that are produced by these devices, smart decisions will be made for maintaining a controlled environment. The system data are used by the system according the model mentioned using the RDF data. The system is ready for extension because the system is developed using the latest trend in technology and web standards. It is highly expected that in 6G networks 330 that the support for intelligent systems will be higher which will increase the Edge computing functionality and enhancing home automation systems. 6 G networks can bring much facilities for home automation, it is the role for the cloud and the edge computing level to coop with. However, the IoT devices will need to coop with the edge new expected capabilities.

Acknowledgements
We are thankful to the graduate students of Air University, Pakistan, especially Ramsha Ansari, Moaz Sohail, and Khadija Tul Kubra, for supporting us in the collection of useful information.
Competing interests: The authors declare no competing interests.