Energy Tree Dynamics of Smart Grid Based on Industrial Internet of Things

Service-oriented architectures make establishing comprehensive profiles of smart factories feasible. In this paper, an energy tree model is used to describe a profile that shapes energy system dynamics. The energy tree shows an overall and detailed profile that combines information communication technologies and ontology knowledge bases. A 7-level network protocol defines sustainable communication services for accumulating local information to maintain the global energy tree in real time. The communication protocol manages everchanging temporal and spatial misalignments by aligning groups of energy resources that are temporally or spatially related. Meanwhile, correlated domain information regarding industrial processes is formulized into ontology models. Ontology-based semantic contexts allocate knowledge-supported attributes to energy resources, including systems, resources, and users. The key objective of context awareness is to align attributes and to intensify couplings between different energy resources by decomposing and aggregating internal ontology models. Intertemporal and interspatial correlations of energy resources are made available by the cooperative transmission of ontology-based semantic contexts in the protocol framework. An informational architecture based on the conceptual energy tree finally can be established using incomplete measurement data and reasoning for large-scale industrial networks. A Smart Grid application instance is given to demonstrate the functionalities of energy tree dynamics.


I. INTRODUCTION
NERGY-aware mechanisms and perceptual systems based on information communication technologies (ICT) have attracted the attention of experts and scholars worldwide. A consensus has been reached that the role of ICT is to shape energy system dynamics [1]. The cyber-physical modeling of present and future energy systems embodies the complexities of intertemporal and interspatial dynamics, thus resulting in incomplete data, unobservable states, and unaligned spacetime. When monitoring the structural characteristics of physical energy networks, the primary objective is to understand their structural properties, what to measure, how communication occurs, and how the models change [1]. Future energy networks are characterized by bidirectional transmission, multiple energy carriers, and decentralized energy resources. Energy hubs and combined interconnector devices have been espoused as the most general modeling approaches [2,3]. The structure of a load tree as a full and detailed model of electrical coverage is used to answer the "What, Where, and When?" of energy measurement [4]. A top-down modeling of optimal power flow (OPF) aims at formulating analytical models, i.e., an aggregated set of equations describing the relevant phenomena of energy system dynamics [3,5,6]. Unfortunately, OPF modeling is very likely to be non-convex, leading to unsolvable problems. Even if OPF modeling were simplified by a certain level of abstraction, the risk remains that the model would not represent reality sufficiently [3]. On the contrary, bottom-up approaches to agent modeling generalize different energy resources of the system within a framework of rules, where different resources can interact with each other [7].
The ICT of service-oriented architectures shift the paradigm of energy measurement from host-centric to content-centric [8]. Meanwhile, the paradigm of energy services shifts from inventory-centric to just-in-time, which enables sustainable energy services by dynamic monitoring and decision systems [9]. In order to alleviate a successful implementation of SOAs and to relieve the negative effect of heterogeneous cyber-physical modeling, definitions of site-wide (plant-wide) decentralized resources, tasks, and services are required first. On the other hand, a hierarchical model is needed to effectively manage inter-temporal and inter-spatial decentralized resources.
The key objective of the first problem is essentially to align temporally and spatially groups of decentralized resources using information and communications technologies (ICT). Hence, the main purpose of ICT is to align attributes of the resource system, resource units, and users using ontology-based semantic contexts [9]. These contexts describe the rules, rights, and regulations (3Rs) of industrial processes and the constantly evolving system conditions. The service-oriented architecture (SOA) is a new engineering paradigm requiring a different way of thinking [10]. Hardware devices are decoupled from control engineering. Semantic control offers greater agility. Unprecedented demands for the industrial IoTs based on SOAs emerge simultaneously, and the unpredictable behaviors demand enhanced user expertise, smart web servers in each device, and well-defined service standards [10][11][12]. All of these demands can be summarized into one term--ontology.
The second problem is solved by the embedded intelligence and communication at different industry layers supporting the fundamental platform for the Just-in-time, Just-in-place, and Just-in-context (JITJIPJIC) paradigm. JITJIPJIC, which is based on the idea of a socioecological energy system (SEES), was proposed by Nobel Prize winner Elinor Ostrom [9] [1,13]. Meanwhile, IEEE has published sensor standards that enable the Internet to access sensor descriptions and values [14]. Perception E standardization means that the perception processes of AMIs are endowed with real-time embedded processing capabilities [15]. As shown in Fig. 1, smart factories based on an Internet of things (IoTs) link decentralized resources to online object information. In service-oriented architectures (SOAs), embedded intelligence and communication turn every decentralized resources in factory into a service provider [16]. From the socioecological service providers to a system-level objective, the hierarchical model plays the role for coordinating different objectives in different layers.

Figure 1. Vision of Smart Facotries Based on Web Service MashUps
Hence the information-centric industrial Internet of things (IoTs) with a 7-level network protocol is proposed. Main contributions of this IoT are addressed below.
1) A modeling layer as an intermediate layer is introduced to formulate the definitions and to process semantic contexts in expertise domains. Any services, resources, even human involved should be formulated into formal semantics with data syntax.
2) A SOA of 3-tier hierarchical model provides a relatively seamless route to fit respective objectives of different layers in industrial IoTs. The industrial IoTs is devised to support sustainable communication services in the JITJIPJIC paradigm.
The Chinese government has outlined national emission reduction targets in the 2011-2015 five-year plan, stating that CO 2 emissions relative to the 2005 standard per unit of GDP should be decreased by 40-45% [17]. Reaching this target requires that architecture-specific ICT capitalize on the available energy resources and enhance the utilization of existing energy resources without endangering the reliability of the services or sacrificing yields [1].
This paper proposes an information-centric industrial Internet of things (IoTs), which formulates an overall energy viewpoint. A 7-level network protocol as the mechanism of information realization of the conceptual energy tree is developed for energy measurements. To our knowledge, little work has been conducted so far toward devising an industrial IoTs with a global information model that compares to the energy tree for measuring the energy of industrial processes.

II. ENERGY MEASUREMENT PARADIGM
Energy measurements are deeply affected by ICTs, which have reached a sufficient level of maturity. Meanwhile, ontology knowledge bases of expert systems have accumulated a large amount of domain knowledge and data. Smart factories make information and communication available anywhere, anytime, within any context, and for any user using any device and type of access [10]. The integration of mature ICT and ontology knowledge bases into industrial automation will change the conventional paradigm of energy measurement.
Sustainable energy services currently attract the majority of attention of researchers in industrial fields [18], whereas industrial processes are complex and ever-changing. The coverage and resolution of energy measurements in particular face several challenges.

A. Energy Measurement Challenge
The first energy measurement challenge is unobservable variables, parameters, and states in industrial processes. More than 50% of industrial energy consumption is used to drive steam and motor-driven systems. If these systems were updated with commercially-available energy-saving technologies, approximately 10-12 EJ of primary energy would be saved, according to 2007 IEA Statistics. The key problem is the lack of awareness of energy inefficiency in existing productivity-oriented industrial facilities. Incomplete coverage of energy measurements leads to incomplete data and unobservable states in industrial processes.
The second challenge involves the large-scale energy resources, including the staff, devices, material, rules, and environment. The following information refers to energy resources, which could be measured in real-time or set as defaults by automated meter infrastructures (AMIs): roles, responsibilities, proficiencies, coordination, and execution of staff; optimal control, continuous measurements, historical data, and state estimation of devices and material; rules, rights, and regulations of industrial processes; and the ambient temperature, climate, scenarios, and other physical information about the external environment. These large-scale energy resources cause a great deal of overhead in communication and the overall industrial process. Some tradeoffs help to balance real-time services and processing overhead; therefore, some simplifications and abstractions are imposed on the informational integration of energy resources.
The third challenge relates to multiple energy carriers and their relationships. In industrial processes, coal, petroleum products, biomass, electricity, natural gas, vapor, and district heating/cooling typically are used [2,3]. More specifically, a variety of energy carries are transformed into each other by chemical reactions, mechanical transmissions, turbine transfers, and power transmission systems (e.g., motors, pumps) in each process unit under different pressure, temperature, velocity, and other conditions. Integrated measurements and the calculation of multiple energy carriers increase the complexity of information flow.

B. Conventional Energy Measurement
The conventional paradigm of energy measurement, which industrial processes have adopted, is the 3-tier enterprise integration framework proposed by the Advanced Manufacturing Research Institute (AMR) in 1992. Industrial ICT is developed according to the various tiers, with different provisions of suitable services based on practicality [19].

Figure 2. Energy Metric Tracker on 3-tier Enterprise Integration Framework
In Fig. 2, the structure of an energy metric tracker is divided into three tiers: In-situ Level, Onsite Level, and Top Level. Key Performance Indicators (KPIs) are defined for the three tiers. A number of energy influencing metrics (or variables) termed by the KPIs are sampled or calculated by installed AMIs. In general, an In-situ Level KPI is sampled directly from a process unit related to specific energy and correlated productivity. Several In-situ Level KPIs in the same area are aggregated and filtered to calculate an Onsite Level KPI that is reported to engineering staff and senior management. Site-wide (or plant-wide) Onsite Level KPIs are accumulated and recalculated to generate a Top Level KPI that coincides with a specific energy or productivity target.
To summarize conventional energy measurement, KPIs and correlated calculations are predefined before the measurement process occurs, and the energy-aware mechanism is assumed as a known, fixed paradigm. This fixed paradigm, which results in information gaps between levels, limits the potential for improvements in energy efficiency [20]. The lack of understanding of the energy-aware mechanism of the "who, where, when, how?" of energy consumption is the essential cause of the lack of a linking interface in estimating energy efficiency.

C. Conception of an Energy Tree
Inspired by the "load tree" introduced by Berkeley [4], the energy tree in this context is a global model integrated by an ICT infrastructure of energy measurement. The root of the energy tree is the total amount of energy input during the first level of an industrial process. The second level is the vehicle by which energy is carried, e.g., anthracite, washed coal, heavy oil, electricity, petroleum coke, raw coal, as shown in Fig. 3.
Above the second level, process units, which are categorized as production units (PUs), conversion units (CUs), or storage units (SUs) according to their different functionalities, are combined by energy interconnectors, as first proposed by Andersson, as directed energy transmission between double process units [1][2][3]. The circular leaf nodes at the top of the energy tree represent energy consumption and loss.
The energy tree integrates plant-wide energy information into a generalized formulation, including the intrinsic values of physical information, system configuration variables, estimated values, and values measured by AMIs. The energy tree serves not only as a model that provides detailed information and a global viewpoint for industrial processes, but also acts as the coverage model for the ICT infrastructure of energy measurements. That is to say, the main task of the energy-awareness mechanism is to accumulate correlated variables to establish the energy tree. III. PROCESS UNITS IN ICT ARCHITECTURE IEEE has published sensor standards that enable the Internet to access sensor descriptions and values [14]. Perception standardization means that the perception processes of AMIs are endowed with real-time embedded processing capabilities [15]. Smart factories based on an Internet of things (IoTs) link physical objects to online object information. In service-oriented architectures (SOAs), embedded intelligence and communication turn every physical object in factory into a service provider [16].
Inspired by [14][15][16]22], a 7-level protocol reference model for the industrial IoTs is devised, as shown in Fig. 4. Industrial IoTs adopt the JITJIPJI paradigm first proposed by Ilic [9].The following sections will introduce the physical layer, perception layer, security layer, network layer, modeling layer, service layer, and application layer in detail, while the energy-aware mechanism based on the energy tree will be discussed alongside the protocol.

A. Decentralized Virtual Physical Devices
On the physical layer, wireless sensor/actuator networks (WS/ANs) on 802.15.4, AMIs on Modbus/RS-485, RFID & QR, gateways on IPv6, and Web servers on the cloud constitute an integrated platform of industrial IoTs, linking physical energy resource devices into networks. A variety of physical devices, such as AMIs, show good potential as platforms for industrial IoTs, yet are limited in their ability to provide dynamic, device-specific information rapidly [23]. Therefore, a more intelligent, virtual physical device is proposed as an extended version of the perception layer.
In Fig. 5, the perception layer is a device virtualization layer that provides resource-constrained or unconstrained devices with a uniform syntax for semantic contexts by the server proxy factory. It also schedules local services and the data scheduler using the service injector and the data adaptor, respectively. Plug-in technology allows data processing software to be downloaded and installed freely into the plug-in database of the processing agent. Similarly, specific rules can be downloaded from the knowledge bases of the modeling layer (as shown in Fig. 4) and installed into the rule plug-in database of the rule proxy, while abnormal data violating any constraint checking rules would trigger the event handler to send feedback. The data flow of physical information can be accessed legally by the device service proxy factory via networks, unless the data processing of the data adaptor and the rules constraining the checking of the rule engine are in play.

Figure 5. Protocol Reference Model of Decentralized Perception Layer
At the security layer, some modifications are imposed on the network layer protocol. Generally, some encrypted information is inserted into the protocol's original memory. Above the security layer, a device is linked into the networks and can be accessed as a virtual physical device.
The JIT paradigm enables the prediction-based decision making of the processing agent and the rule constraint checking of the rule proxy to be decentralized in the industrial IoTs. Prediction-based intertemporal decomposition can be calculated directly from decentralized devices using historical and predicted information. Hence, a rapid response could be offered during emergency situations. A classical example is the smart relay deployed with the support vector machine (SVM) algorithm, which could offer the much needed "breathing time" for SCADA to regain a stable mode of operations, thus avoiding a cascade of failures and a large-scale blackout [24]. Andersson and Ilic both agree that "The more distributed decision makers of this type there are, the more sustainable the overall system will be distributed dynamic programming" [1].

B. Generalized Formulation of Process Units
Process units, the generalized energy model for industrial devices, extend the energy hub concept. As shown in Tab. 1, six categories of energy flow are defined for a process unit.

Symbol
Energy flow Detailed description for energy flow Upstream energy flow Energy is brought by material from upstream process units.
Downstream energy flow Energy is taken away by products to downstream process units as load.
Imposed energy flow Energy is supplied by energy input but not other process units.
Lost energy flow Energy is lost in processes through emission or consumption E r [k] Internal reused energy flow Energy is recovered or reused in the internal process unit as storage.
External reused energy flow Energy is recovered and reused for external process units as output.
In this table, k refers to a 10-min. sampling interval. Assuming that n denotes the number of energy carriers, the six categories of energy flow are all n-dimensional vectors.  Fig. 6 shows the relationship among the inputs and outputs of the six energy flow categories. E r represents the internally stored energy used for the recycling of conversion, storage, or production. Inspired by [25], an equality constraint is given by the power flow equation (1). This equation contains the internal reused energy flow energy derivatives. The change of energy E r within a where E r [k-1] denotes the energy stored at the k-1 th sampling period, E r [k] denotes the energy stored at the k th sampling period, and E l [k] represents the standby energy losses of the k th sampling period. Merging (1) and the law of conservation of input and output energy yields the energy balance equation: A general conversion model covering multiple energy carrier couplings can be created. Stating all energy inputs P= E u + E i and outputs L= E e in vectors enables the formulation of a multi-input, multi-output power conversion to satisfy (3): where C is the conversion coupling matrix, and the entries of coupling matrix C are the converter coupling factors. Regarding the energy conversion process, the energy inputs are E u and E i , while the energy output is E e . Because the downstream energy flow E d [k] is used by products and therefore leaves the energy tree, E d [k] is not referred to in (3). The lost energy flow, E l [k], is represented, assuming that E l [k] is lost inside the process unit.
Moving E l [k] from the left side of (3) to the right side, and replacing "E r [k]-E r [k]" with (1), yields a mathematical transformation equation of (3): where I is an identity matrix. Equation (4) establishes the effect of input energy P, reused energy E r , and lost energy E l on the output energy L. Inspired by [25], a storage coupling matrix is defined as : where S is the storage version of the conversion coupling matrix C with the change of energy E r and lost energy E l , and the entries of coupling matrix S are the storage coupling factors. The storage coupling matrix is used to simplify (4). Hence, a more general model covering storage and conversion couplings can be created by substituting (5) into (4) where C denotes the energy conversion of input energy, and S denotes the energy storage of reused energy. Thus far, a simplified and generalized process unit formulation has been mapped out. The formulated model is the fundamental modeling for virtual physical devices in the industrial IoTs. Specific mechanism models could be added as constraints or functions of energy-aware mechanisms.

C. Generalized Formulation of Energy Interconnectors
A generalized energy interconnector model is proposed as the transmission channel for multiple energy carriers. Fig. 7 shows the energy flow transmitted by a mediated energy interconnector (e.g., pipes and circuits) from one process unit to another.

Figure 7. Generalized Model of Energy Interconnectors
As for any two process units U i and U j , defining the operators →: U i →U j means using an existing energy interconnector to transmit from U i to U j . A connectivity coupling matrix A is defined as: where connectivity coupling matrix A is a diagonal matrix denoting the emission coupling factors.
The output energy L i of a process unit U i is divided by several energy interconnectors into the multiple output flow L ij . The aggregated output flow L ij remains equivalent to the original output energy L i , and the energy flow balance is similar to Kirchhoff s first law: where ∃U i →U j means that unless an energy interconnector exists from U i to U j , the cumulative computation is added into the sum of the series, and m denotes the maximum number of plant-site process units. The energy input P j of a process unit U j merges several input flows from multiple interconnectors, satisfying: With the virtual physical devices, the concepts of process units and energy interconnectors, and the coupling matrixes of conversion C, storage S, and connectivity A, an energy tree's forward dynamics can be calculated using modeling.

IV. NETWORKED SERVICES ON SOAS
The energy tree is an integrated information set that aggregates intertemporal and interspatial data from different devices. As with any large-scale energy system with steady-state and dynamic behavior, the problems of spatial and temporal decomposition must be addressed.

A. Problems in Spatial and Temporal Decomposition
The temporal decomposition of the JIT paradigm is partly executed by local data processing algorithms in the processing agent of Fig. 5. Such look-ahead, prediction-based decision-making algorithms enable the decentralized devices to smooth out their decisions and capture intertemporal correlations to the greatest extent possible. However, the following two problems still exist: The steady-state and dynamic behaviors of energy systems mix with each other. The limited predictability and high intertemporal variations of the energy system cause a full spectrum of problems as look-ahead scheduling attempts to account for intertemporal dependencies [26].
Another complexity of JIT stems from having to optimize interspatial dependencies and avoid network congestion [1]. The interspatial decomposition of the JIP paradigm relies on the 3-tier hierarchical model of decentralized devices, aggregators, and operators [23]. Interspatial decomposition confirms that an entirely centralized implementation is not manageable for any reasonably-sized system without relying on arbitrary clearing decisions that are difficult to justify [9]. Hence, autonomies based on decentralized intelligence are deployed on various layers. In Fig. 4, autonomies are released to the decentralized processing agents of devices by real-time embedded systems. Meanwhile, the device monitor is deployed in the network layer as an aggregator, which balances the objectives of device-level services with those of energy system-level services. Using system-level centralized intelligence as an operator allows for a more effective management of service efficiency based on the semantic contexts during normal conditions in the JIC paradigm.
Device-level decentralized intelligence relies on JIT actions during extreme conditions, such as, for example, sending out alerts during constraint checking. Normal conditions of the JIC paradigm and extreme conditions of the JIT paradigm are balanced by third-party aggregators serving as intermediaries between the decentralized devices and the system operator. The complexity of the JIT paradigm is its dual orientation [23]: As for the orientation of decentralized devices managing the intertemporal dependencies, the aggregators manage the spatial complexity. Aggregators have dual roles as schedulers and monitors, organizing decentralized devices and driving them to run synchronously, coinciding with one another.
As for the orientation of the system operator, the aggregators identify contexts and respond to operator requests instantaneously. Meanwhile, the aggregators provide the operator with a relatively seamless route to fit aggregated devices into the legacy control paradigm [23].

B. Spatial and Temporal Decomposition in the Network Layer
The protocol reference model of the industrial IoTs adopts the 3-tier hierarchical model of decentralized devices, aggregators, and operators. Inspired by [27], the device monitor serving as an aggregator is deployed in the network layer, as shown in Fig. 8. The device monitor, as the intermediary between decentralized devices and system-level services, is in charge of task mapping from system-level to device-level services, as well as monitoring the state feedback from the server proxy factory in the perception layer.
In summary of the steps previously introduced, energy resources are linked to networks by devices (e.g., WSNs, Gateway, AMIs) in the physical layer. In the perception layer, energy resources (e.g., staff, devices, materials, rules, and the environment) are abstracted as virtual physical devices in networks. At this point, an energy resource is just an isolated service provider. The device monitor, as an entity of an aggregator, passively discovers virtual physical devices using the device discover feature and registers them into the device registry. At this time, an isolated service provider is identified as device service that could be provided to the system-level service as a service component or just as a service. Multiple device monitors could be distributed in decentralized physical spaces to organize local energy resources, while a virtual physical device could link into multiple device monitors. Some decision-making protocols and their rules are set up to reduce spatial complexities for device monitors.

Figure 8. Protocol Reference Model of Decentralized Network Layer
Another primary function of the network layer is to guarantee that the flow scheduler provides stable and reliable services, as shown in Fig. 9.

Figure 9. Data Flow Schedule and Middleware Storage
The industrial IoTs based on SOAs consists of a more compact transferring architecture with characteristics of a centralized schedule and decentralized data. Such IoTs will appear more like a task-oriented enhanced bus system. The data flow of a service could be divided into a data flow of multiple sub-services, as shown in Fig. 9. Meanwhile, the output of a service could serve as the input of another service. In other words, a system-level service request is allocated to correlated service providers according to spatial and temporal dependencies. The data flow scheduler deploys services to decentralized service providers, sharing service resources such as processing, storage, and transport. Future network transmission systems will make full use of decentralized service resources, optimizing energy efficiency and service awareness of processing, storage, and transport [28].
Centralized platforms, which are generally equipped with very powerful computers, receive transfer data from great distances. Centralized cloud computing is energy efficient for computationally intensive tasks, whereas centralized cloud storage consumes on the order of three to four times more energy than decentralized cloud storage due to the increased energy consumption required for transport [29]. Conventional in-situ devices such as data generators have no sufficient processing capabilities, but rather transmit data to distant network processing terminals. Therefore, energy consumption in transport and switching can represent a significant percentage of the total energy consumption in cloud computing [29].
The industrial IoTs based on SOAs makes decentralized intelligence with plug-and-play interfaces (e.g., RJ45 Ethernet interface) widely popular in industrial energy systems [30,31]. In the perception layer shown in Fig. 5, processing plug-ins and rule plug-ins are deployed into plug-in databases. In the network layer in Fig. 9, the middleware storage system, which includes a variety of databases, is deployed to store remote data and intermediate results. This middleware storage system bridges the gap between communication interfaces and service interfaces, partly eliminating the management burden of a centralized schedule. The weight of network management is dispersed across layers with interspatial decomposition.

C. Semantic Services and Context
SOA is a new engineering paradigm requiring a different way of thinking [10]. Hardware devices are decoupled from control engineering. Semantic control offers greater agility. Unprecedented demands for the industrial IoTs based on SOAs emerge simultaneously, and the unpredictable behaviors demand enhanced user expertise, smart webservers in each device, and well-defined service standards [10][11][12]. All of these demands can be summarized into one term--ontology.

Figure 10. Ontology Base and Domain Ontology
Ontology is a formal knowledge representation analogy with a glossary, taxonomy, and thesaurus. Because of effective coverage of information regarding domain knowledge of a series of concepts and correlated relationships, ontology is adopted as plant-wide definitions of tasks and services. Fig. 10 shows an ontology base used as a database for ontology models providing virtual physical devices with information about knowledge objects. Unless under the support of ontology bases, the device services of virtual physical devices could be described by semantic services. So far, energy resources have been considered complete semantic services that experience device linking in the physical layer, virtualization in the perception layer, service in the network layer, and ontology-based semantic description in the modeling layer. As shown in Fig. 8, semantic contexts of device services are already transmitted in the network layer according to a standard syntax. Only in this way can the service discover feature identify the contexts of semantic services and register state information about semantic services into the service registry in the formal ontology-based semantic contexts.

Figure 11. Life Cycle of Ontology Design
Industrial IoTs for energy measurement requires a certain amount of domain ontology for knowledge preparation, especially under conditions of incomplete data and unobservable states. As shown in Fig. 11, the lifecycle of an ontology design can be summarized as three major stages, i.e. building, manipulating and maintaining. In the building stage, requirements are first identified, including the purposes, scope, and requirements of ontology. Then, correlated data and information are collected about the concepts behind these requirements. The third step is to analyze the collected data and information. Based on the analyzed ontology, the ontology can be filtered and input into an ontology base in the ontology implementation step. In the manipulating stage, the ontology and knowledge bases both are deployed to the knowledge sharing system, which receives legal access from users. A feedback loop exists between the knowledge base and the ontology base via both ontology analysis and ontology implementation. The feedback loop expands the ontology base with experience data and reasoning values from the knowledge base, which is constantly receiving real-time data from the processing agent and the rule proxy in the perception layer. While more real-time data continuously corrects the parameters of the 3Rs (e.g., minimum and maximum limits of such variable resources), the ontology base correspondingly updates and adds these new parameters. The domain expert, who can add, update, and remove ontology via a user interface, plays a significant role in the maintaining stage. A professional domain expert can continuously update ontology information by adding experience values and mechanism variables in an effort to merge ontology models with reality.

D. Decomposition and Aggregation of Semantic Services
Recall the original monotonous paradigm of the 3-tier enterprise integration framework and the information gaps between tiers in Fig. 2. In order to change paradigms in terms of conditions and eliminate these information gaps, the modeling layer is deployed between the network layer and the service layer, as depicted in Fig. 12.

Figure 12. Protocol Reference Model of Decentralized Modeling Layer
An ontology base and a knowledge base are the main components of the modeling layer. Core-level and second-level variables are collected in the ontology base to characterize the ontology in the factory, and this base defines deeper-level variables to capture the dependencies between ontologies. Using the identifier and the handler, the ontology manager can identify ontology models and provide interfaces for ontology maintenance. The ontology dispatcher responds to ontology demands from the local ontology base using localization or from decentralized ontology providers using navigation. The adapter selects the most proper reasoner to allow the reasoning host to fulfill a reasoning process. The knowledge base accumulates a number of knowledge objects, which consist of 3Rs. The query engine queries real-time data in terms of ontology-based semantic contexts from the perception layer (Fig. 5). The 3Rs engine, the core of a reasoner, calculates the service-level 3Rs constraint checking. The results are calculated as feedback is transmitted to update the ontology base via the reasoner, resoning host, event switcher, localization, and handler. The event switcher and the localization, as the semantic service mediators, interact with the service layer and implement semantic service discovery and execution.
The distinguishing feature of SOAs based on the JIC paradigm from more conventional adaptive architectures is their ability to choose performance objectives contextually as conditions change. Given incomplete data and unobservable states, the optimizer will reorganize the ontology structure for the original semantic contexts to guarantee complete information coverage for semantic services. As conditions vary, contextual dynamic decomposition and aggregation enable seemingly uncorrelated semantic services to be reaggregated, choosing a more flexible paradigm to adapt to different performance objectives. The service layer recognizes how to change objectives both to ensure efficiency when possible and to avoid risking reliable service to those who require it. This is the JIC paradigm [9].

V. ENERGY TREE APPLICATION
The modeling layer, as an intermediate layer, provides the service layer with a uniform semantic description-based model. All available elements, such as the staff, technical support, storage, software, processing, enterprise applications, devices, materials, products, etc., can become standardized service providers accessed by networks. Technologies for the factory of the future are developing into an integrated factory-of-things Smart Factory. Figure 13. Protocol Reference Model of Decentralized Service Layer As shown in Fig. 13, a service provider is dynamically discovered by the service scheduler of a service requestor. The service provider sends a service response for service events and a handler to the service requester via the mutual external invokers. After receiving the service response, the service requestor sends a service monitor request, classifies the service type, and finally maps the service to the network layer. In the service layer, a service provider conceptualizes service groups managed by each aggregator just as easily as for individual service.

B. Decentralized Application Layer
The application operator, situated at the top of the 3-tier hierarchical model, focuses on the application request.The application operator, situated at the top of the 3-tier hierarchical model, focuses on the application request. The application operator is an overall objective composed of a set of services. In general, multiple service providers may support a single application operator. In Fig. 14, the application operator begins by describing the application request or objective with semantic contexts through human-computer interaction. Inspired by [10][11][12], some generic services (elementary services) are listed in the request library as common application requests. The semantic application searches the services in the request library in order of priority and selects needed service information to create a request list. Any residual services that are not found are requested from available service providers by the external service requestor. Once available, information regarding external services is also added to the request list. The application operator obtains the control priorities of listed services from the query engine of the local or external service handler. If duplicate services are available, the optimal one is selected by the optimal component configuration of services. Communication events (e.g., messages and notifications) are defined, scheduled, and published by the message definition, scheduler, and message broker, respectively. The request and response for services pertaining to semantic contexts are transmitted between the application layer and the service layer. Decentralized application layers could share services and messages due to possible interconnections between mutual external invokers.
Multiple decentralized energy resources interact with each other within a framework of communication rules. The physical grid, 3-tier hierarchical model, decentralized semantic services, knowledge-based contexts, and energy tree model are designed to induce sustainability by sensing and controlling interaction variables so that a closed-loop system has excellent JITJIPJIC functionalities.

Figure 14. Protocol Reference Model of Decentralized Application Layer C. Inverse Energy Tree
For every process unit, three key efficiencies are defined. With regard to the production process, an energy conversion efficiency η p can be expressed by: Similarly, with regard to the conversion process, an energy conversion efficiency η c can be expressed by: With regard to energy emission and consumption, an energy emission efficiency ζ can be expressed by: According to Fig. 15, process units can be categorized into PUs, CUs, and SUs in terms of real-time energy measurement. Meanwhile, the forward dynamics of the energy tree can calculate the estimated energy output and input of every process unit. At every sampling period, four variables can be present: , the estimated energy output;

Figure 15. Three Categories of Process Units
Inspired by [20], two variables can be defined: the utilization index of the process production capacity, expressed as α; (13) and the variation index of process energy utilization, expressed as β: As shown in Fig. 16, the state of energy efficiency can be deduced by the state decision tree. An inverse dynamics calculation of an energy tree can calculate the energy lost from leaf to root, as shown in Fig. 16.   Fig. 18). Enabling the performance of smart meters is to maintain the reliability and stability of communication especially under complex scenarios with interference, obstacles, and other anomalies [32,33]. WIA-PA industrial wireless network, which is specified by IEC/PAS 62601 and Chinese GB/T 26790.1-2011, is applied in the process automation for measurement and control [34] . Smart Grid on WIA, as an Important National Science and Technology Specific Project in China under contract 2010ZX03006-005-01, adopts WIA-PA network as wireless communication networks.

Figure 18. Overview of Smart Grid A. Complex Huge System
However, Smart Grid is a typical complex huge system in which vast amounts of information is generated and transferred [35,36]. Because of the complexity, gray and black swan phenomena bring in maintaining difficulties. In order to alleviate the complexity, IEEE has published a variety of Smart Grid related standards, including those called out in the NIST Smart Grid Interoperability Standards Framework [37,38]. Figure 19 shows the approved IEEE smart grid standards with 3-tiers hierarchical model. In Fig. 19, Smart Grid is composed of Device Layer, Aggregator Layer, and Operator Layer. Undoubtedly the framework simplifies architecture complexities. Wireless smart meters are deployed in Device Layer, which is charge of the device maintenance and the information transfer. How to define the information access of Device Layer is an important problem for the scalability.  Fig. 20 (a) and (b)), power transmission line (Fig. 20 (c)), transformer substation ( Fig. 20 (d)), home area networks (HAN in Fig. 20 (e)), and building area networks (BAN in Fig. 20 (f)). A number of heterogeneous devices (e.g. thermometer, galvanometer, vibration meter) comprise the sea side of Smart Grid. How to unified access to data sources of heterogeneous devices is another important problem for the adaptability. As shown in Fig. 20, there are various scenarios and a number of device data comprising the data of the sea-end side. As for the data of the sea-end side, the the key question "What, Where, and When?" of data measurements as for the data from the sea side. The data from the sea-end side are accumulated by an aggregation server as an aggregator. The aggregation server, which is a semantic sensor Web, publishes the data from the sea side to the cloud side. The servers in the cloud-end side then could subscribe and access the data of the cloud-end side. As shown in Fig. 21 (a), the SOA of 3-tiers hierarchical model is adopted in Smart Grid applications. The measurement feed from devices is processed in real-time. On arrival at the aggregator, each measurement is put into a FIFO queue, and is used to update the running aggregate for various time windows. The aggregated results can be published to the cloud-end side using different formats (RDF, RuleML, Datalog). Operators could search their interesting aggregated results by issuing Google-like search queries in search engines. A passive diagnosis [39] system is developed with the functionality of packet sniffing at 16 channels of IEEE 802.15.4, as shown in Fig 21 (b). If smart meters are accessed by Ethernet ports with sniffers, even protocol analyzing online or offline is available. If so, the internal semantic metrics in smart meters could be recorded autonomously, and can be transmitted actively from an active diagnosis subsystem to a CEP server.

C. Channel Interference Scenario of Indoor Experiment
Though obstacle interference is considered as the most common factor, channel interference always emerges in scenarios of home area networks (HAN in Fig. 20 (e)) and building area networks (BAN in Fig. 20 (f)). Unfortunately, almost all 802.15.4 channels overlap with Wi-Fi channels, resulting to severe interference.

Figure 22. RSSI of The Measurement by Passive Sniffing
Through artificially imposing Wi-Fi interference on the current working channel in an indoor environment, the sensor nodes detect Link Events. The link quality is estimated at Unhealthy State. The transferring packets of one sink and thirty nodes are passively sniffed, while their respective RSSIs are captured from 21 o'clock to 24 o'clock. As show in Fig. 22, the interference is triggered at approximately eleven o'clock at night. The artificial interference makes the RSSI enhanced from average -70 dBm to average -40 dBm.
The original channel peak of RSSI amplitudes is at 2.405 GHz before the interference. After the imposed interference the channel peak hops to 2.46 GHz. The strong interference causes the event of channel hopping. As shown Fig. 23, the average PRR of 34 links under the channel interference keeps 95. 8471% in the interference scenario.

EMI Scenario of Outdoor Experiment
EMI frequently occurs in the power transmission line (Fig. 20 (c)) and transformer substation (Fig. 20 (d)). An outdoor experiment is made in a working transformer substation of Fig. 20 (d).
As shown in Fig. 24, the PRRs of 45 nodes in the working transformer are roughly stable and approaching 100 percent in the EMI scenarios. The physical experiment results convince that: EMI has no significant adverse impact on the performance of the WIA-PA network. If necessary, a metal case (like in Fig. 20 (a) and (b)) could be an effective solution for "Free of EMI problems".

Figure 24. PRR of the Measurement of 3 Groups of 45 Sensor Nodes E. Custromer Electricity Scenario of Microgrid Experiment
In order to partly testify the model functionalities of the energy tree, we design a smart microgrid system that consists of a washer, a water dispenser, a fridge, and an aggregator that measures the aggregated electric power of the 3 appliances ( Fig. 25 (a) and Fig. 25 (b)). Though a microwave is available, yet nobody uses it. Each applicance is powered by an intelligent socket (Fig. 25  (c)). The smart socket is used for the data sampling of voltage, current, and power. Meanwhile a wireless node within the smart socket transfers the applicance data to the aggregator of the sea-end platform of the sea-cloud system. The sea-cloud system has collected a large number of experimental data and stored in the database of the aggregator since 2012-04-10 until 2012-07-26. Using SQL query languge to obtain data from database, we made a Matlab program to process the electricity consumption data.

F. Temporal-Spatial Energy Behavior
The electricity consumption data in Fig.26, Fig. 27 and Fig. 28 indicate that the entire microgrid is well operating, and applicances have not functional abnormalities, no phenomenon that existing wireless devices autonomously quit the microgrid. The working of the entire microgrid is stable and reasonable.
Power data of day, week, and month scale are shown in Fig.26, Fig. 27 and Fig. 28 respectively. Judging from the current energy behavior, there is approximately duplicated composition which repeats in cycle, especially with the point of one day scale. However, there exists no significantly rules in the energy behavior of electricity consumption data with the point of the week and the month scale. Using data mining to further analyze the energy behavior of electricity consumption data, inherent rule of electricity consumption data could be rewarded. In addition, other computational learning models (e.g. statistical model )of energy behavior could be mapped out from known rules. According to the forward dynamics of the energy tree, energy input including washer power (Fig. 29 a), water dispenser power (Fig. 29 b), and fridge power (Fig. 29 c) are aggregated into estimated energy output (Fig. 29 e). Whereas, practical energy output of aggregated power is measured in real-time as shown in Fig. 29 d. According to the inverse dynamics of the energy tree, the deviation between estimated aggregated power and real-time aggregated power is revealed as shown in Fig. 29 f. In this paper, only a very simple demo of energy tree dynamics is given. The rules of energy behavior could be also mined using different time windows and other aggregation types.

VII. NEXT-GENERATION INDUSTRIAL INTERNET OF THINGS
The next-generation industrial Internet of Things would be a cyber-physical system with the technologies of semantic web (web 3.0), knowledge base, and smart search engine. Fig. 30 shows the correlations among WSNs, IoT and CPS. WSNs make inter-spatial smart meters to collect physical and environmental data, and to aggregate these data into higher level perceptual information. WSNs are the very basic scenarios of IoT. The advances in wireless communication Tech., such as wearable biosensors and mobile phone are enabling the information collection about human. At the present stage, human and things could be connected into IoTs like computers. Through ontoloy-based information retrieval, annotation transfers the raw data from human, computor , and things into formal semantics. The annotation process incarnates the ontology-based information integration into semantic web for IoT. The trple merging of human, computor and things makes the original social network as a semantic network, which means no human intervention while human, computor, and things could communicate end-to-end coincidingly.
The intelligent information processing just like a artificial neural networks would enable the ambient intelligence and autonomous control for industrial network. The industrial network will be a CPS featuring a higher level combination and cooperation beween the total systematic elementary resource and services. That is to say, industrial CPS will be a higher stage of industrial IoT.
With the development of computational and physical devices, industrial CPS, and emerging form of industrial IoT, is becoming reality. CPS performance have the potential to provide more intelligent services based on knowledge base and semantic search engine.

VIII. CONCLUSION
Industrial processes experience the initial situation of automation via electrical signals in 1980s, bits & bytes driven by electrical engineering in the 1990s, functions driven by software engineering in the 2000s, services driven by the orchestration via services instead of functions in the 2010s, semantic driven by the Internet of things in the 2020s. The artificial Intelligence which is characterized by semantic contexts-aware will enable factory of things to share product knowledge, factory knowledge, service knowledge, communication knowledge, energy knowledge with decentralized resources via networks. Sharing knowledge based on ontology & knowledge bases will fill the information gaps and incomplete coverage in the future factory of things. The age of knowledge-oriented industrial control network has begun, crossing the threshold of the Internet of things into industry processes.
An industrial IoTs based on SOAs is proposed for energy measurements. The energy tree concept is introduced as a global information model of multiple energy carriers in this paper. A 7-level protocol reference model then is devised to measure the energy by ICTs, which support sustainable energy services in the JITJIPJIC paradigm. The energy tree, as the global information-centric coverage model for energy services, shows users a full and detailed viewpoint of plant-wide process units and energy interconnectors. With the information accumulated by the industrial IoTs, forward and inverse dynamics are calculated, and key energy efficiencies and energy losses are observable. The energy tree dyamics of Smart Grid, which focus on forecasting energy behavior, has the potential possibiltiy to alter the original paradigm of energy awareness, so that energy efficiency for industrial systems can be maximized to some degree.