Monitoring of Unaccounted for Gas in Energy Domain Using Semantic Web Technologies

Smart Urbanization has increased tremendously over the last few years, and this has exacerbated problems in all areas of life, especially in the energy sector. The Internet of Things (IoT) is providing effective solutions in gas distribution, transmission and billing through very sophisticated sensory devices and software. Billions of heterogeneous devices link to each other in smart urbanization, and this has led to the Semantic interoperability (SI) problem between the connected devices. In the energy field, such as electricity and gas, several devices are interlinked. These devices are competent for their specific operational role but unable to communicate across the operational units as required for accounting and monitoring of gas losses due to heterogeneity in device communication standards. To overcome this problem, we have proposed a model and ontology by applying semantic web technologies and cloud storage to address the tracking of customers to observe Unaccounted for gas (UFG) in the gas domain of energy. Semantization is achieved by replicating heterogeneous devices Sensor Model Language (SenML) data into Resource description framework (RDF) without human interventions. As semantic interoperability is used to efficiently and meaningfully share the information from one location to another. Therefore, the proposed ontology and model focus more efficiently on customer tracking, forecasting, and monitoring to detect UFG in gas networks. This also helps to save Gas Companies from financial gas losses.


Introduction
In the energy domain management, theft of gas is a big issue. The difference between total gas volume for distribution or transmission and the billed volume of gas is known as UFG [1]. In the IoT, SI, with the help of RDF, can provide benefits to gas companies by using smart devices. In natural gas management, SI can help to monitor usage remotely to reduce the UFG in respect of tampering of measurement devices, leakage, and pilferage of gas.
The IoT is a dominant technology field today [2]. It covers almost all communication fields of computers [3]. IoT's most influential work is its application to several different areas [4], such as smart cities [5,6], ehealth [7,8], smart environment [9,10], smart home [11], and industry 4.0 [12]. These days severe challenge in IoT is the lack of interoperability due to heterogeneous devices and protocols [13,14]. The main objective of this paper is the interoperability of data to empower systems by a knowledge base system. Several types of researches are in progress that focuses on interoperability methods that can empower machines for a better understanding of IoT data. In 1997, the C4ISR architecture working group developed a Levels of information systems interoperability (LISI) technique to promote the interoperability of enterprises [15]. The LISI program aims to get such a competence system for the US Department of defense (DoD), which can recognize interoperability needs and select practical business interoperability solutions. The open internet consortium (OIC) focuses on IoT interoperability to detect specifications, connect trillions of smart objects, and scalability problems [16]. The grid-wise architecture council (GWAC) aims to allow interoperability between objects interacting with the electric power system. GWAC built a context-setting system to define interoperability problems [17]. Interoperability technologies should help customers continue to work in mixed environments shortly. One of the most prominent approach to add semantics to data is known as an extension of the World wide web (WWW) [18], it uses the semantic web to overcome the segregation issues among heterogeneous information and gives a better perceptive by adding up semantization. RDF is generally a semantic web framework that can help to relate things significantly with the aid of triple statements (subject, predicate, and object) [19]. In IoT, a statement may define an IoT node and its sensed properties, such as temperature [20]. SenML is an emerging standard for measuring sensors and describing interoperability parameters on the system [21]. It helps the interoperability between IoT devices from different vendors in Javascript object notation (JSON) and powerful extended markup language (XML) interchange (EXI) format. Small computers also support lightweight formats. This paper addresses the problem of striking a balance within semantic and SenML to ease interoperability among sensors. Adding a new system to the IoT network will be difficult without addressing semantic uncertainty [16]. The research has handled the challenge of bridging the problems between SI by converting Sensors data (SenML data) into the standardized semantic model of RDF. Incorporating SenML into RDF will ease smart IoT applications. For instance, physical as well as logical sensor data could be processed and translated into actionable information. It would offer people a deeper understanding of our physical world and would allow us to develop more value-added products and services.
Our key contributions are: 1. To achieve interoperability by applying semantic web technology to IoT and by translating primary SenML data to RDF. With this method, existing SenML-enabled devices can take advantage without the further extra complexity of the benefits offered by knowledge-based systems. The research proposes to use SenML-enabled devices as such, without requiring any additional software libraries or processors. 2. The utility of the method is demonstrated by an energy-based IoT system, including smart meter sensors and a knowledge-based portion.
Over the past few years, urbanization has increased dramatically. About half of the world's population resides in urban areas. The research predicts that the residents of the city will reach about 70% of the total by 2050. There will be 27 jumbo cities, with over 10 million people due to this magnificent growth [22]. This congestion of populations creates problems in terms of government, economic development, environmental sustainability, life excellence, transport, power usage, etc. Smart approaches are therefore needed to fix these obstacles. SI is used to share data from one point to another in a secure and meaningful way [22].
Nowadays, companies use many technologies to defend energy domain systems for tracking and assessing pilferage [22,23]. Various manufacturers employ IoT devices in the natural gas domain to help gas companies and users remotely. The problem of UFG in natural gas marketing is prevailing since the start of the 20th century. Though gas companies could not avoid entirely so, current efforts are getting importance to control it for exact technical, environmental, social, operational, and economic aspects. In this background, the study on UFG decline is initiated with due attention to the current global situation so that improvement of knowledge and application of the same could be made concerning technology, management strategy, cost efficiency, and trends to assist in alleviating the condition. Researchers have worked on interoperability issues by linking them to IoT [24][25][26]. Gas smart meters are from different vendors but mostly work with the help of mobile in excel file or send measurements wirelessly to an intelligent gateway in SenML format or other formats. At this point, the gas companies require the interoperability system for the automated knowledge-based system. In this paper, SenML measurements transform into RDF statements with the help of ontology to achieve interoperability. Gas networks use semantic web technologies for tracking and monitoring consumer activities, and to determine UFG to save the gas companies from financial gas losses remotely.
An IoT based Natural gas management SI model (NGM-SIM) has been proposed in this paper which helps to give semantically meaning with the help of triples to the data among heterogeneous IoT devices in the energy domain. Natural gas is discussed for heterogeneous IoT devices to help gas companies monitor tracking for UFG, and develop consumer's profile for prediction of their gas usage. To dig out meaningful communication and to find this lightweight model information between Gas Company and users is semantically annotated and proposed with the help of RDF.
The remainder of the article on SI is organized as follows. Section 2 allows an evaluation of applicable, related work in the core research topics underpinning the UFG in the realm of natural gas. Section 3 introduces the key design thoughts to develop the NGM-SIM model to monitor UFG in the natural gas domain. Section 4 focuses on the implementation details to create the ontology to reduce the UFG, the storage, the distribution of semantic data and findings. Finally, Section 5 concludes the research and addresses briefly some open issues left as future work.

Related Work
Early studies concentrate on gas domain problems, IoT applications, SI needs in different fields, and the introduction of RDF semantic technology. The application of IoT and semantic technologies in the energy sector for forecasting and tracking activities is still in its early stages. As a consequence, the relevant segment is divided into four subsections. The first section discusses some of the published work in the gas domain concerning IoT, and interoperability using RDF and SenML. The second section describes the use of RDF and SenML in interoperability in different fields of life. The third section is on ontology, while the fourth section discusses cloud computing.

Natural Gas Management
Natural gas losses are observed in all states of the world and in this regard "Washington, US department of energy" records state-wise natural gas annual supply & disposition. UFG losses among the states are from 0.6% to 5.8% [23]. The natural gas balancing item indicates the difference between the number of natural gas supply components and the sum of natural gas disposition components. Each state calculates it as a result of a correlation between total recorded supply and total recorded disposition [23].
Xu [27] offers an idea of the smart-city concept in which every house is equipped with smart meters that transmit its readings to the home gateway, which in turn information to the community center in a secure and privacy-preserving manner via the community network. It was a floating concept, and hence smart metering started. In a report published in June 2014 entitled "benchmarking smart metering implementation in the EU-27," the European Commission (EC) found that only 16 nations within the EU block expected to deploy smart meters of electricity by 2020, while the remainder had not proved it. In the meantime, twelve nations have agreed that these smart meters cannot be justified and that only five of the twenty-seven nations (Ireland, Italy, Luxembourg, the Netherlands, and the UK) are moving them forward by 2020. Both meters of electricity and gas have vital criteria for measuring success, and the EC study also showed a broad range of values among member states [28].
Gas leakages, measurement errors, and suspected meters or theft are factors that contribute to UFG losses [21]. UFG usually varies from 0.2% to 0.5% in Italian networks. UFG's average annual price in the US over the past ten years is 0.6 percent. The ruling body for defining the UFG benchmark is the oil and gas regulatory authority (OGRA) in Pakistan. Unlike the 2% international benchmark, the UFG benchmark for Fiscal year (FY) 2015-16 identified by OGRA was 4.5%. However, Sui northern gas pipeline limited (SNGPL) actual UFG for FY 2015-16 was 10.97%, resulting in volumetric 4.28 BCF and a financial loss of 2.49 trillion Pakistan Rupees. The values above show the importance of addressing the issue of managing UFG losses in SNGPL due to a substantial divergence from local and international standards. This analysis, therefore, focuses on assessing UFG in gas networks [29]. Litvinov et al. [30] Introduces new data management and analytical technologies in the oil and gas enterprise business processes, describes the technological characteristics of current Radio-frequency identification (RFID) systems, RFID implementation guidelines, and some applications in oil and gas supply chains. Tab. 1 shows a summary of year-wise related work progress in gas-related management in the field of IoT and to date, there is no research work on interoperability in natural gas management.

Interoperability
In different fields of life, several proposed ways assist in interoperability. One of the suggested solutions is semantic web interoperability technology in various information systems running via sensors and sensing systems. Such technologies operate alone or with semantic sensor web [31] to combine, manage, and request information from sensors. World wide web consortium (W3C) has developed these technologies. Its methods for linking different resources on the internet are RDF, RDF/XML, Rdf schema (RDFs), and Ontology web language (OWL). The RDF [32] semantic web technology is a language that helps to provide explanations of the web's tools. It is the most commonly used data model to describe semantic sensor data using triples. Triples are the format consisting of subject, property, object, and various syntaxes that help to write and serialize data in RDF [33]. Smart home plus smart environments are its examples. Zhang et al. [34] focused primarily on converting sensor data to RDF and Satterfield et al. [35] worked on smart home and used RDF triples for sensor data throughout systems, as shown in Tab. 2.
SenML lets IoT devices link to the internet at the level of data exchange. Resource-limited device develops SenML for its explanation uses a single base object composed mainly of an array of entries as well as attributes. Furthermore, all submissions include the sensor parameter name and parameters such as the measurement time and current value [36].
Tab. 3 shows the use of SenML with RDF for SI has been achieved successfully in the submarine system [36] and the smart campus system [37]. Tab. 4 shows the features of RDF, SenML, and advantages of transformation from SenML to RDF. The resource-limited device uses the SenML prototype by extending the custom attributes, such as using a Resource type (RT) attribute. These features include semantic information, whereas preserving descriptions of SenML easy. The key approach is to allow a mapping of the RDF model, i.e., a marked, directed graph, between SenML components. First, SenML does not use URIs to about the same degree as RDF; second, URIs are a simple component of the RDF key; the nonliteral object of information has its own URI. The conversion allows IoT sensors enabled by SenML to be attached to information-based systems with reduced code, as shown in Tab. 5.

Data sources
Web resources. Sensors. Sensors data to web resources.

Data formats
Semantic metadata.
Sensor measurements in small packets on networks from constrained devices.
Facilitates intelligent IoT functions including sensor data rationing and device-to-device SI.
Language XML. XML. Link sensors to knowledge-based systems with the least IoT device modifications.

Resources refer to web
Resources identified by URI on the web.
URI does not identify resources on the web.
It leads to SenML data to connect with the web.
The change allows the connection of IoT sensors enabled by SenML to information-based systems with comparatively low code conversions. Sensors might use SenML deprived of certain extra computing to ready the data, and a quick analyzing element for conversion SenML into RDF is part of an information-based system. The conversion enables IoT sensors allowed by SenML to access knowledge-based systems with reduced modifications. Sensors can use SenML to prepare the data without any additional computation and uses a simple parsing feature for translating SenML into RDF on a knowledge-based framework. This part may be physically installed on an IoT systems gateway or server machine. To implement this, an algorithm must have the following steps for transforming SenML to RDF [36][37][38].
Step 1. Transform SenML elements, usually URIs and literals, into their corresponding unique defined elements. The names of elements should be concatenated when it specifies any prefix or base name in the SenML text. It affirms that with comprehensive demonstrations, resources, properties, types, and preset values.
Step 2. After transforming SenML into URIs, rearrange it into a set of RDF triples by using RDF containers, RDF Tables, etc., if required.
Step 3. Serialise triples of RDF for presentations It is common to transform SenML description into multiple RDF statements for assigning the URIs to unambiguous identifiers of SenML. It ensures that full representations of resources as well as properties their types, and given values. Resource type is an obligatory element of a SenML description. It is for the reason that resource type has a significant role when SenML descriptions alter into RDF statements. It specifies the type of device that produces the data, that is, the type of subject in the RDF statement. It can be mapped to RDF: type, and it will be connected to a class name when applying ontology logic to sensor data in an ontology. The namespace for IoT applications and Sensors explanation handles sensor data. RDF has a much greater expressive potential than SenML, but interpreting action details when using the full power of RDF is also difficult for several resource-constrained IoT tools [36][37][38].

Ontology
Ontology is a set of objects and relationships which can define and represent a field of concern in IoT. They reflect an abstraction infrastructure aimed at hiding the heterogeneity of IoT entities, serving as an intermediary between IoT service providers and consumers, and facilitating their semantic matchmaking [39]. Though, it's challenging to define the abstraction level needed for an IoT ontology. There are several initiatives nowadays that define the models that represent IoT devices and the environment around them. Nonetheless, finding one that satisfies all the criteria is always difficult. Ontology attains Syntactic and SI among platforms [39]. In the context of IoT, several ontologies such as the W3C Semantic sensor network (SSN), IoT-Ontology, SAREF and open IoT have been proposed [39].

Cloud Services
Cloud services are still in their early days in SI. Here are some of the prominent achievements discussed. Doukas et al. [25] demonstrated in 2010 that together mobile application and cloud computing would allow better sharing, storage, upgrading, and retrieval of electronic healthcare data. This concept was introduced as a mobile application in android format. The cloud service Amazon S3 has been used to test the framework created. All work in [36,37] transforms SenML to RDF using Tab. 5. On the bases of these projects, an ontology for a specific solution is a technical task. In the gas domain, a specific ontology tracks the consumer using SenML and RDF.
To achieve intelligent interoperability [40] computational intelligence approaches like the Fuzzy system [41], Neural Network [42], DELM [42,43] and SVM [44] are robust candidate solutions in the field of semantic web technologies and smart city [43]. Fig. 1 shows the proposed RDF based model, which is also a step forward towards smart solutions, in the energy domain proposing an example use case with a prototype implementation. It is named as the natural gas management SI model (NGM-SIM). Its primary purpose is to track and monitor consumers for determining the difference between actual consumption patterns against predicted patterns based on consumer's profile to determine UFG in gas networks and save the gas companies from gas losses. Semantics and ontological connections annotate the assimilated data to make them machinecomprehensible and cross-system reusable. SI is the conversation between different types of devices of information with meaningful and precise meanings. Here for SI, the main focus is on tracking and monitoring of problems related to energy domain gas leakages, measurement errors, and suspected meters or theft, concerning gas company rules. There are three main parts of the NGM-SIM model (1) User interface (UI), (2) SI, and (3) Cloud services (CS).

User Interface
In the gas domain user interface is consisted of gas companies and users of the company. The users of the company are 1. Industry consumers, 2. Commercial consumers, 3. Special domestic consumers 4. Transmission consumers, and 5. Internal users of the gas company. The gas company is itself a consumer of natural gas reservoirs; therefore, the user interface shows it. In this study, only industry consumers are significant because significant UFG occurs in the industry in the shape of gas theft or leakage of gas. In UI, both gas companies and consumers communicate with IoT devices. In a gas company, gas main server (GMS) keeps a record of all incoming gas data from reservoirs of gas and outgoing data to the consumers. It cannot calculate UFG on its own due to different protocols and heterogeneous smart devices. GMS such as sensors and UI sends data directly to SI.

Semantic Interoperability
In the SI phase, there are many data producers like sensors, observing systems, data aggregators, and data archiver. Here sensors are the smart meters of consumers and GMS of the company and intermediate sensor to control the gas flows like Town border station (TBS). In SI data producers data is collected through a secure communications system via SMS within the form of SenML, i.e., every smart device has some id and properties. SI phase first collects data and then convert it into RDF based on the following ontology using Tab. 5.
Ontology for UFG depends on the scenario. The current scenario is that the company supplies gas to industrial, commercial, domestic, special domestic, transmission consumers, and internal departments of the gas company shown in Fig. 1 and the main issues of UFG occur in the industry department. Gas wells provide gas to GMS, and it further provides gas to the industrial area as shown in Fig. 2. The GMS has all input volumes that are sent to the industry but still, losses occur because there is no correlation of billing system and if the input of gas from GMS is 100 units then billing should be of 100 units instead of 80 or 50 units.
New ontology to reduce gas theft is as follows: There are smart meters on Town Border Station (TBS). There are also smart meters on consumer sites. GMS has already a smart system which has all record of input of gas from main lines to TBS and the consumers. As the primary purpose of this ontology is to find that the consumer does not temper in meters or where leakage occurs, so the second step is followed. Smart meters send data in the form of SenML using a Wi-Fi device from Town Border Station (TBS), and from consumers, bill data is collected by using SIMs or USB or manually as shown in Fig. 5. The new and novel step in this ontology is the conversion of smart meters data into the RDF form for the SI. Firstly, SenML converts data to RDF according to Tab. 5, which is known as semantically annotated data, as shown in Figs. 1 and 3. That data is stored in the cloud and checked from the UFG scenario, by data correlation of released gas volume from GMS and used gas consumption of consumers. In current systems, there is no realtime correlation between the supplied volume of gas and billed volume. To overcome this issue, all data is gathered in a database. The UFG computation order is now reversed, that is from users billing to the GMS instead of GMS to users.
If at a certain level of TBS, the value of input and output does not match then the billing and history of consumers of that area are reconciled to check the discrepancy, in this whole procedure only devices work with RDF, which is a machine-understandable format. It is recommended that there should be one TBS for a small group of industries. For suspected industries, another smart meter may be installed, which should not be in reach of the consumer.
All specific consumer information is semantically annotated with the RDF graph to supply matching information that excludes the hardware specifics of the vendors. Records of specific users from the RDF  Step 1: Step 2: Step 3: Step 4: Evaluate the profiles Update evaluation record Step 5: Match record with incoming units of GMS Step 6:

Repeat
Step 2 for N TBS Step 7:

End
Step 8: Step 9: Step 10: } In semantization, after data collection, ontology converts SenML to RDF Semantic Engine. In SI data is visualized using the GMS portal.

Cloud Services
All user's data, ontology, and required operations data is a store with the help of cloud services. Cloud technology enables information sharing with authorized company's employees. Cloud storage offers easy and efficient access to stored data on-demand. Thus gradation of the digital infrastructure occurs with minimal interruption of operation. The ontology services can exist anywhere and anywhere using mobile and cloud computing together. Cloud computing has almost infinite storage space.

GMS Units Calculation with NGMSIM
In the NGMSIM system, the following algorithm measures the user unit values, as shown in Fig. 5.
Let "£1" is TBS1, "£2" TBS2, and "£N" is TBS N having users "a" is as follows: if £ unit consumption does not match the GMS units, then the profile of users from the cloud will be checked by GMS automatically. In case GMS billing <£1 + £2 + : : : + £N ontology is shown in Fig. 5.
That is the calculation of units is done at individual TBS. Let "uc" is user consumption then "£1" total consumption is Here g is a constant value of UFG in the form of line losses of gas.
for £2 and £N; it is as follows: After simplification the above equations, total consumption is calculated and finds the discrepancy at the root level.

Implementation
For experimental setup and performance analysis of the proposed system, synthetic data are generated in collaboration with the University of Engineering and Technology (UET) Lahore in "Lahore Industrial Area" TBS. This TBS connects to the four industries. AL Khwarizmi department provided smart meters and solar panels. This solar panel provided power to the Wi-Fi device and smart meter attached to the TBS. Smart meters are also installed in four industries. The experimental setup of the proposed system consists of four parts for proper understanding: • Creation of synthetic data.
• Performance analysis of the proposed system on the cloud.

Creation of Synthetic Data
A TBS under which four industries are working is shown in Fig. 6. This TBS is different from other TBS as it has Wi-Fi, smart meter and solar panel for smart working.
The TBS gets smart meter data from industries and saves it on the cloud after semantization to calculate UFG with the help of the billing department procedure. According to ontology, first units are calculated which are received by the TBS from GMS. Tab. 7 shows the gas consumption week wise in four industries. After the creation of the synthetic data semantization process starts.

Performance Analysis
The user information is processed via shared cloud storage of Amazons Optimized capacity. The cluster xlarge helps in the cloud implementation of the proposed device. Administration, audit departments and government agencies may access this information. One of the essential tasks of the program is to recover the pattern of users' use.
The usage time of the gas in the industry can be helpful to find UFG utilizing the information received from the smart meters RDF code. It helps in gaining consumption patterns that recognize which consumer uses gas on weekdays, as shown in Fig. 7.

Conclusion
In this research paper, the functional interoperability model is introduced for NGM-SIM in the energy domain. Gas Companies can track their input and output remotely anywhere, without any Vendors specification limit on devices. RDF was being used to show the valuable information. In this research, interoperability problem was removed by mapping the generated data set into the database of RDF graphs. Semantically, the transmitted information was interpreted and annotated. Semantically annotated information was then transmitted to the Cloud Server where Gas Company's UFG requirement was matched. RDF graph depicts the triple server of Gas Company that can be read semantically by using the SPARQL query. In the future, our proposed model can be used to provide semantic interoperability in other research areas.