INTERNATIONAL JOURNAL OF COMPUTERS COMMUNICATIONS & CONTROL ISSN 1841-9836, e-ISSN 1841-9844, 14(4), 503-517, August 2019. Energy Optimization for WSN in Ubiquitous Power Internet of Things W. Hu, H.H. Li, W.H. Yao, Y.W. Hu Wei Hu, Huanhao Li*, Wenhui Yao, Yawei Hu School of Economics and Management, Shanghai University of Electric Power, Shanghai 200090, China *Corresponding author: 2625904776@qq.com Abstract: This paper attempts to solve the problems of uneven energy consump- tion and premature death of nodes in the traditional routing algorithm of rechargeable wireless sensor network in the ubiquitous power Internet of things. Under the applica- tion environment of the UPIoT, a multipath routing algorithm and an opportunistic routing algorithm were put forward to optimize the network energy and ensure the success of information transmission. Inspired by the electromagnetic propagation theory, the author constructed a charging model for a single node in the wireless sensor network (WSN). On this basis, the network energy optimization problem was transformed into the network lifecycle problem, considering the energy consumption of wireless sensor nodes. Meanwhile, the traffic of each link was computed through linear programming to guide the distribution of data traffic in the network. Finally, an energy optimization algorithm was proposed based on opportunistic routing, in a more realistic low power mode. The experimental results show that the two proposed algorithms achieved better energy efficiency, network lifecycle and network reliability than the shortest path routing (SPR) and the expected duty-cycled wakeups minimal routing (EDC). The research findings provide a reference for the data transmission of UPIoT nodes. Keywords: Ubiquitous power Internet of Things (UPIoT), energy-balanced rout- ing, rechargeable wireless rechargeable network (WSN), routing algorithm, low power mode. 1 Introduction During the "Two Sessions" (the annual sessions of China’s top legislature and top political advisory body) in 2019, the State Grid Corporation of China (SGCC) promised to step up the construction of strong smart grid and ubiquitous power Internet of Things (UPIoT) and act as a hub, platform and sharer of energy information, turning itself into a world-class energy Internet enterprise with global competitiveness. Before long, the SGCC confirmed that its most urgent and critical task is to speed up the UPIoT construction, which requires overall planning and deployment. As its name suggests, the UPIoT refers to the application of the IoT technique in power systems. It is essentially a wireless sensor network (WSN) [15]. The WSN is a wireless network self-organized by numerous smart microsensor nodes, which collaboratively send the monitored data to the sink node for further processing. In the WSN, the safety, efficiency and speed of data transmission to the control center directly hinges on route optimization [9,20]. Many sensors are deployed in the UPIoT. Under harsh natural conditions, the nodes in the rechargeable wireless sensor network (WSN) will enter the low power mode after running out of energy, if they can only capture a limited amount of energy. In this case, the operation time of network nodes depends on the energy-balancing effect of the routing strategy. Therefore, it is particularly important to manage the energy efficiency of sensors. The common routing protocols fall into two categories: planar routing and clustering rout- ing. The planar routing protocols include flooding protocol, SPIN (Sensor Protocols for Infor- mation via Negotiation) protocol, SAR (Synthetized Adaptive Routing) protocol, and directed Copyright ©2019 CC BY-NC 504 W. Hu, H.H. Li, W.H. Yao, Y.W. Hu diffusion mechanism [4]. In general, planar routing protocols are not applicable to the UPIoT, due to their fast energy consumption, slow response and high complexity. The typical clustering routing protocols are the LEACH (Low Energy Adaptative Clustering Hierarchy) algorithm, the TEEN (Threshold sensitive Energy Efficient sensor Network protocol) algorithm, and the PE- GASIS (Power Efficient Gathering in Sensor Information Systems) algorithm [3,16]. The latter two algorithms were extended from the LEACH. Compared with planar routing protocols, the clustering routing protocols feature low energy consumption, fast response and simple implemen- tation. Unsurprisingly, this type of routing protocols has long been the research focus at home and abroad. Below is a brief review of the studies on clustering routing protocols. In [12] Lee at al. proposes an energy-optimization clustering algorithm based on multi- ple factors, which introduces the fuzzy rule algorithm to cluster head selection, thus extending the network lifecycle. Reference [13] designs an energy-balanced non-uniform clustering routing algorithm, in which the cluster heads are selected by timer-based election. Reference [5] puts forward an energy-balanced routing algorithm based on message importance; the algorithm in- creases the success rate and reduces the delay of message delivery, as the route is determined by the forwarding income of messages. Reference [1] improves the low-energy adaptive cluster- ing and stratification algorithm into an energy-balanced clustering routing protocol capable of adaptively adjust the cluster scale. Xia et al. in [19] proposed an energy equalization method based on hybrid transmission to avoid energy holes in wireless sensor networks. Hybrid trans- mission refers to the wireless transceivers of nodes in the network having different transmission powers. In a data collection sensor network, a wireless sensor near a sink node will deplete en- ergy more quickly by receiving more data from a remote sensing node, and proposes to increase the transmission power of the distant node while probabilistically select the receiving node of the transmission to reduce the communication load of the node closer to the sink, delay the appearance of energy holes, and prolong the network life. The protocol ensure the balance of network energy by creating clusters of different scales based on the distance to sink node, residual energy and distribution density of network nodes, such that no low-energy node will be selected as cluster head. To sum up, the existing energy-balanced clustering routing protocols face the following problems: the distributed algorithm in the protocols cannot converge to the global optimal solution; the energy consumption of information reception is ignored when analyzing the energy consumed in data transmission between network nodes; the routing algorithm searches for the optimal path, overlooking the possibility of multipath routing. In light of the above, this paper proposes a multi-path routing algorithm based on link traffic distribution under the UPIoT. Specifically, the energy-balanced routing was achieved based on the predictable energy supplement, and the opportunistic routing was adopted to tackle the time- variation and loss of WSN channels. These measures, coupled with the natural load-balancing feature of the WSN, ensure the balance of the energy consumption among WSN nodes. The experimental results show that the proposed method can optimize the energy of rechargeable WSN, and prolong the lifecycle of the entire WSN. 2 UPIoT overview The UPIoT is a smart service system that connects all things and all links in the power system, and supports effective human-machine interaction. This system can be implemented conveniently and flexibly to sense all kinds of states and process information in an efficient manner. The functions of the system are realized through modern information technologies like the mobile Internet and artificial intelligence, and advanced communication technologies. In fact, the UPIoT is an application of 5G (the 5th generation mobile networks) and the IoT in the Energy Optimization for WSN in Ubiquitous Power Internet of Things 505 power industry, linking up the human, machine and devices inside and outside the grid. As an extension of the energy Internet, the system can serve users, grids, power generation companies, governments and the entire society. 2.1 Construction principle Unify standards and encourage innovation Adhere to the unified data management, system construction must strictly follow the com- pany’s unified sg-cim data model and data collection, definition, coding, application and other standards, to ensure data sharing. Adhere to the unified application interface, unified portal entrance, unified technology line, to ensure the application of horizontal interconnection, longitudinal through; We will combine top-level design with grassroots innovation, and encourage grassroots units to adapt measures to local conditions and take the lead. Inheritance and development, precise investment What is missing on the existing basis, integration and improvement, get through the data, avoid to scratch, find what you need and develop it, look for weak places and then strengthen it. Technical and economic feasibility, vigorously promote; Pilot reserves that are technically feasible but economically to be assessed. If the investment is large and the effect cannot be seen in a short term, the demonstration will be limited in scope. Who to use, how to use, use frequency as the principle of whether to set up the project, to ensure accurate investment. Saving money is making money. Intensive construction, sharing and co-construction Coordinate the company’s internal construction results, avoid repeated investment and de- velopment and pilot demonstration, promote the sharing and reuse of results, and give full play to the intensive effect. All business terminals should fully consider the needs of all other majors, and be equipped with electrical side acquisition devices, communication resources, edge computing and data re- sources for cross-professional reuse, so as to promote the co–construction and sharing of all majors. We will strengthen external cooperation in mature technologies, coordinate internal and external resources to advance them efficiently and ensure high-quality development. Economic and practical, focusing on value The key to the construction of ubiquitous power Internet of things is application. Full consideration should be given to practicality, economy and convenience of grassroots application. Only by working hard on practicality and practical effect can practical effect be achieved, so as to make front-line personnel better and more willing to use. 2.2 Specific content of construction Build a comprehensive service platform for smart energy With high-quality power grid services as the cornerstone and the entrance, we will make full use of the massive user resource advantages of state grid corporation to build a comprehensive intelligent energy service platform covering the government, terminal customers and the upstream 506 W. Hu, H.H. Li, W.H. Yao, Y.W. Hu and downstream of the industrial chain, and provide information docking, supply and demand matching, transaction matching and other services to attract users for emerging businesses. We will strengthen the building of common capacity centers for equipment monitoring, power grid interaction, account management and customer service, empower power grid enterprises and emerging business entities, and support the three-level smart energy service system for companies, regions and parks. (1) Drainage: Integrate the external service application entrance and supply and demand information of various emerging businesses of state grid company, connect the energy efficiency service sharing platform of headquarter level enterprises, provincial customer side energy service platform, new energy big data platform, Internet of vehicles, photovoltaic cloud network, intelli- gent energy control system and other systems, and give full play to the large-scale agglomeration effect. (2) Enabling: Integrating the common ability of state grid corporation for external services, providing all kinds of emerging business subjects with unified sharing services of network connec- tion, monitoring, metering, billing, trading, operation and maintenance and other platform-based services. Build an energy ecosystem We should establish a standard system to support the interconnection of equipment, data and services, establish a normal cooperation mechanism with well-known enterprises, universities and scientific research institutions at home and abroad, integrate the upstream and downstream industrial chains, reconstruct the external ecology, promote the aggregate growth of industries, and create an energy Internet industrial ecosystem. We will build a national demonstration base for entrepreneurship and innovation, establish a mechanism for incubating emerging industries, serve small, medium and micro businesses, and actively foster new businesses, new formats and new models. (1) Establishment mechanism: Make use of the innovation and entrepreneurship platform, give full play to the supporting service role of "collaborative sharing of needs, resource sharing, crowdfunding and crowdsourcing", pool innovation achievements, improve the mechanism of achievement transformation, and build the platform of achievement transformation. (2) Promotion and transformation: Establish a special fund for achievement incubation, select outstanding achievements with broad market prospects and potential for state grid corpo- ration operation, strengthen technical cooperation and capital cooperation, promote the indus- trialization of innovation achievements, and cultivate unicorn enterprises. Cultivate and develop emerging businesses Give full play to the SGC grid infrastructure, such as customers, data, brand unique advan- tages of resources, foster and develop a comprehensive energy service, Internet finance, big data operations, data inquiry, photovoltaic cloud network, three stand one, online financial supply chain and virtual power plants, based on a new type of energy services, intelligent manufactur- ing, chain block its core and the combination of 5G resources such as communication, tower emerging business, such as commercial operation implement emerging business "flowers", as a new major profit growth point of SGC: (1) With the goal of serving the development of new energy industry, give full play to the unique resource advantages of state grid corporation, build new energy big data service platform, and carry out new business of new energy big data operation service. (2) By collecting all kinds of data related to equipment operation, environmental resources, weather and climate, load energy consumption and so on at the power generation side, power Energy Optimization for WSN in Ubiquitous Power Internet of Things 507 grid side and user side, we provide diversified services such as centralized equipment monitoring, equipment health management and energy efficiency diagnosis for power generation enterprises and comprehensive energy service providers. Data sharing Based on the unified data center and data model of the whole business, the data access trans- formation and integration are comprehensively carried out, the data standards are unified, the professional barriers are broken, and the data management system of the national network com- pany is established. Create a data center, unified data call and service interface standards, and achieve data application service. Construction of an enterprise-level master data management system to support key tasks such as the transformation of multidimensional lean management systems. Develop big data applications such as customer portraits, develop digital products, provide analytical services, and drive data operations: (1) For the internal network of the company: To achieve equipment status warning, power sales and load forecasting, new energy generation power forecasting applications, etc. , to improve lean management. (2) For the government industry: To achieve macroeconomic forecasting, energy conservation and emission reduction policy formulation, industry climate index analysis, big data credit and other services to support the government’s efficient and accurate decision-making. (3) For external enterprises: To achieve enterprise energy optimization recommendations, industry trend research, commercial location planning and other services to help enterprises save money and increase efficiency. (4) For customers who use electricity: To achieve home energy optimization advice, quality service improvement and other services to enhance the sense of power users. The UPIoT mainly consists of a sensing layer, a network layer, a platform layer, and an application layer. Based on widely distributed sensors, the sensing layer collects data in all stages of the grid, from generation, transmission, distribution to consumption, and conducts preliminary data fusion and calculation. The network layer fully utilizes modern communication technologies like 5G to set up a WSN that links up all data. The platform layer schedules the facilities and processes the big data in the network, making preparations for application. The application layer maintains the safe and stable operation of the grid and pursues an energy- efficient, smart and integrated power network. 3 UPIoT energy optimization 3.1 Rechargeable WSN In the UPIoT, the data streams are transmitted via the rechargeable WSN [8]. The pattern of wireless charging determines the distance between the devices receiving and emitting the energy. The transmission distances, charging efficiency, power, frequency varies with the wireless charging patterns. This paper explores the charging mode based on radio waves. Capable of charging devices several tens of meters away, this wireless charging mode is suitable for WSNs with a large coverage. During wireless charging, the electromagnetic waves transmitted continuously from the power transmitter gradually attenuates with the increase of propagation distance and the change in the spatial environment. Thus, the author firstly examined the charging model of a single node in the WSN. According to the electromagnetic propagation theory, the relationship between the electro- magnetic wave power P1 at any point in space and the transmitting power P0 of the electromag- 508 W. Hu, H.H. Li, W.H. Yao, Y.W. Hu netic wave transmitter can be established as: P1 = GP0( λ 4πd )2 (1) where G is the combined gain of the receiving and transmitting antennas; d is the distance of the receiving point from the transmitting source; λ is the wavelength of the electromagnetic wave. A rechargeable WSN that periodically collects data mainly consists of wireless sensor nodes, node links and power collection and transmission devices. Such a rechargeable WSN can be described as G = (M,Z,P), where M is the set of all wireless sensor nodes, Z is the set of all node links and P is the set of power collection and transmission devices. M contains one sink node that collects data and uploads them to the processor and M-1 regular nodes that receive and transmit information. A node link exists between two wireless sensor nodes, if and only if the two nodes are within the transmission range of each other. In this case, the two nodes are called neighbors. It is assumed that each wireless sensor node in the rechargeable WSN collects data at a constant rate, and the acquisition rate of node j is rj. Let T be the lifecycle of the rechargeable WSN. For each cycle t ∈ T , the transmitting power of P is a constant denoted as Pfsj (t), with j ∈ P . For node j, the energy consumed to send a unit of data to node k can be denoted as efsjk, and that consumed to receive a unit of data as ejsk . The total amount of data transmitted by all wireless sensor nodes to the sink node via multiple paths can be denoted as qjk(t). 3.2 WSN opportunistic routing Targeting unreliable networks, opportunistic routing increases network throughput through fewer transmissions and lower energy consumption, using multiple nodes in the next hop that may provide similar transmission quality [6,14]. The opportunistic routing is achieved in different ways, depending on the specific medium access control (MAC) protocol. The key to this routing method lies in the selection of candidate set. A candidate set is a set of candidate nodes, i. e. the next hop nodes that are qualified by the algorithm to forward packets. In a wireless network, the nodes in the candidate set for opportunistic routing are all selected from single-hop neighbors. The main reason is that, in a highly dynamic wireless network, it is only possible to maintain the accurate information of single-hop neighbors. The topology of the candidate set for node S is shown in Figure 1, where the black box stands for the size of the area centered on S. It can be seen that this area contains the neighbors within two hops (h=2) from S: the first-hop neighbors include nodes A∼E and the second-hop neighbors include nodes f∼k. Among the second-hop neighbors, nodes g, h, i and k can interact with the nodes outside the area, and are thus called the exits of the area. Thus, the candidate set of node S can be described as{g,h,i,k}. Meanwhile, the first-hop neighbors and the second-hop neighbor that is not the exit of the area are service nodes for the candidate ones, and collectively form the set of service nodes {A,B,C,D,E,f,j}. If node S needs to forward data, the shortest path tree will be constructed directly from the link state database for deterministic forwarding, if the destination falls in the said area; the forwarding nodes will be selected by the priority and dynamic forwarding probability of candidate nodes, if the destination falls outside the area. Determine the priority of candidate nodes. For a candidate node, the lower the end-to-end cost of reaching the destination node when it is selected, the higher the corresponding priority, and the higher the corresponding forwarding probability. For example, for two candidate nodes, if one is in the direction of the destination node and the other is in the opposite direction of the destination node. Obviously, candidate nodes in the same direction have higher priority and Energy Optimization for WSN in Ubiquitous Power Internet of Things 509 Figure 1: Topology of an example on candidate set forwarding probability, and even worse, candidate nodes in the opposite direction can set the forwarding probability to zero. The cost corresponding to a candidate node includes two parts: the near cost and the far cost. The distant cost refers to the end-to-end cost expected by the candidate node to reach the destination node. According to link state database (LSDB), it is easy to calculate the approximate cost corresponding to the optimal path to a candidate node. The remote cost should be considered in two cases: if the destination node is located in the region with the candidate node as the center, the corresponding remote cost of the optimal path from the candidate node to the destination node can be obtained according to the LSDB of the candidate node; If the destination node is not in the region centered on the candidate node, considering the characteristics of opportunistic routing, this paper needs to consider the average end-to-end cost of all potential paths from the candidate node to the destination node, and take this as the remote cost of the candidate node. Nodes have different forwarding probabilities under different conditions. For a particular destination node, not all candidate nodes (referring to candidate nodes after loop avoidance) have the opportunity to become the final forwarding node, because some candidate nodes will forward the packet to the more expensive path. In this paper, the factor α (0 ≤ α ≤ 1) is used to represent the proportion of candidate nodes with non-zero forwarding probabilities in the total candidate nodes: α = 1 indicates that each candidate node has a non-zero forwarding probability and has the opportunity to become the final forwarding node. In this case, the performance of load balancing is the best; when α ≤ 1/NS (NS is the number of sending node S candidate nodes), the opportunity route is degraded into a deterministic route, and the candidate node with the least end-to-end cost is determined as the final forwarding node. 510 W. Hu, H.H. Li, W.H. Yao, Y.W. Hu 4 Energy optimization model and routing algorithm for the UP- IoT 4.1 Energy balance analysis and routing algorithm For a WSN, it is assumed that each node i is charged by the same device at a time. To ensure the energy sufficiency of node i in each cycle t, the node should select the device with the highest charging power in each cycle. Let the distance between node i and the power transmitter be di,r. Then, the charging power of node i in cycle t can be expressed as: P maxi (t) = max r∈R   GPr( λ 4πdir )2   (2) According to the rechargeable WSN model, the data flow of a wireless sensor node i consists of three parts: the data stream flowing into node i Qini (t), the data stream flowing out of node i Qouti (t), and the data stream generated by node i itself eit. In a traffic-stable UPIoT network, the final data will all enter the sink node. In this case, each node i in the network should satisfy: Qini (t) + eit = Q out i (t) (3) In other words, the traffic of network nodes is dynamically balanced. The data flow rate can be expressed as: ∑ i,r∈Lk qi,r(t) + ri = ∑ k∈Lk qi,k(t) (4) where Lk is the set of neighbor nodes that forward data for a randomly selected node in the network. Here, it is assumed that the wireless sensor nodes collect monitored data at a low frequency and low power consumption. Without considering the power consumed by the nodes in data acquisition, the energy consumption rate of node i in cycle t can be calculated by: Vi = e fs jk · ∑ i,r∈Lk qi,r(t) + ∑ k∈Lk e js k qi,k(t) (5) It is also assumed that, the sum of the energy received by node i from the power transmitter in cycle t (Ei(t)) and the remaining power of the battery in cycle t − 1 equals the energy consumption of node i in cycle t, i. e. the total energy for data transmission and reception of node i. Then, the operation time of node i in cycle t can be expressed as: Ti(t) = Ei(t) + Ei(t− 1) Vi = Ei(t) + P max i (t− 1) · tr e fs jk · ∑ i,r∈Lk qi,r(t) + ∑ k∈Lk e js k qi,k(t) (6) If Ti(t) ≥ t, then the battery has surplus energy in cycle t and can support node i to operate beyond the cycle; otherwise, the energy received by node in cycle t, plus the remaining power of the battery, cannot support the normal operation of node i through cycle t. The relationship between Ti(t) and t determines the amount of remaining power of the battery for node i in cycle t. An energy-balanced routing strategy must ensure that the remaining power of the battery for node i is neither zero or above the maximum battery capacity in any cycle. In actual application, it is possible in any cycle that the energy stored in a node is insufficient to support data transmission and reception at the node, calling for the design of an energy-balanced routing protocol. For any node with insufficient energy, the remaining energy in the previous cycle can be regarded as zero. Energy Optimization for WSN in Ubiquitous Power Internet of Things 511 Definition 1 (Network lifecycle). The network lifecycle in cycle t refers to the operation time of the rechargeable wireless sensor node which is shorter than that of any other node involving in data monitoring and transmission. The maximization of network lifecycle, i. e. the balancing network energy through traffic distribution of each sensor node in each cycle t, can be described as: max qi,r(t) {min i∈M Ti(t)} (7) s.t. Ti(t) = Ei(t) + P max i (t− 1) · tr e fs jk · ∑ i.r∈Lk qi,r(t) + ∑ k∈Lk e js k qi,k(t)∑ i,r∈Lk qi,r(t) + ri = ∑ k∈Lk qi,k(t) qi,r(t) ≥ 0 i,r,k ∈ N where Ei(t) represents the energy received by node i from the power transmitting device at stage t; P maxi represents the charging power of node i during time t; e fs jk is the transmission energy consumed by node j to transmit one unit of data packet to node k; ejsk is the received energy consumed by j to receive one unit of data packets; qi,r(t) represents the data flow rate between nodes. In essence, the network lifecycle maximization is a max-min linear programming problem for variable qi,r(t) under equal constraints. This problem can be solved by the linear programming tool fminimax in the Matlab. In a rechargeable WSN, if a node consumes energy in data transmission and reception faster than it collects energy, then the node will die within a limited time; otherwise, the node energy will always surpass the battery capacity, causing a great waste of the energy provided by the charging device. The above calculation strikes a balance between the energy consumed in data transmission and reception and the energy collected from radio waves, thus maximizing the network lifecycle. If applied to an actual network, the routing strategy with the global optimal energy balance, which is obtained through the optimization of global information of the network, has a certain impact on the energy consumption and lifecycle of the network [10, 11]. To further extend the network lifecycle, it is of practical significance to optimize the energy of the UPIoT based on the low power mode. 4.2 UPIoT energy optimization based on the low power mode To further reduce the energy consumption and extend the lifecycle of the UPIoT sensor network, the low power MAC protocol is often adopted to turn off the wireless transceiver of inactive nodes, preventing unnecessary power consumption, that is, initiate the low power mode [15,17]. Under this mode, the wireless sensor nodes can turn off the wireless communication module in the idle period, and enter the sleep mode. Then, the nodes can only send and receive data packet in the active state. The periodic sleep scheduling is an important aspect of the low power mode. By this strategy, the nodes fall asleep and wake up periodically at the preset time. The ratio of the sleep time to the scheduling cycle is called the duty ratio of the nodes in the low power mode. In the case of a low duty ratio, it is extremely rare for all nodes to wake up at the 512 W. Hu, H.H. Li, W.H. Yao, Y.W. Hu same time. To successfully transmit a data packet, the sender needs to send the introduction packet continuously until a receiver wakes up and confirms for its active state. If the sender only selects one next hop node, then it has to wait for the next scheduling cycle to send the remaining data packet after the end of the current active cycle of the receiving node. In a sensor network with unreliable links, the sender must wait for several scheduling cycles, pushing up the data transmission time [2,18]. The opportunistic routing allows a sender to select a candidate set of neighbors to forward data, rather than only a next hop node. In this way, it is possible to effectively shorten the waiting time, and reduce the transmissions to successfully send a data packet. In this section, the author attempted to optimize the network energy by setting up the candidate set of forwarding nodes for each network node, when the routing strategy cannot achieve the optimal energy balance [7,10]. Suppose the sender needs to send a packet and consider multiple packets in the traffic distribution policy. The forwarding nodes in the candidate nodes of the sender s can be ranked as fs = {a1,a2, · · · ,an} by their wake-up sequence. Let p1,p2,p3 · · · ,pnbe the quality of the sender s to each of the forwarding nodes. Then, the theoretical expected forwarding probability of node i in the candidate set can be determined by: P(i) = i−1 Π l=1 (1 −pl)pi (8) Equation (5) shows that the sender s fails to transmit data to any node in the candidate set until to node i. Next, equation (7) can be transformed to the selection of the optimal candidate set fi(t)of forwarding nodes for node i within a rechargeable WSN in each cycle: max fi(t) {min Ti(t) i∈M } (9) s.t. Ti(t) = Ei(t) + P max i (t− 1) · tr e fs jk · ∑ i.r∈Lk qi,r(t) + ∑ k∈Lk e js k qi,k(t)∑ i,r∈Lk qi,r(t) + ri = ∑ k∈Lk qi,k(t) qik(t) = pik fi∑ l=1 pil · ( ∑ i,j∈fj qij(t) + ri ) i,r,k ∈ N In equation (9), the traffic distribution depends on the following factors: the candidate set selected by opportunistic routing, the wake-up time, and the expected traffic considering node priority. The problem described by this equation can also be solved by the linear programming tool fminimax in the Matlab. 5 Case analysis 5.1 Experimental setup The energy optimization routing protocol was simulated on the Matlab, aiming to verify its effects on common rechargeable WSN and low power rechargeable WSN. A total of n − 1 rechargeable WSN nodes were deployed randomly in an 800m∗ 800m field, with the sink node at the coordinates (0, 0). The unreliable links were simulated by the free space propagation loss Energy Optimization for WSN in Ubiquitous Power Internet of Things 513 model. For simplicity, the charging scenario was simulated as a one-to-one mode. The charging device was placed at the height of 20m to supply energy to each node at a constant power. The energies consumed to transmit and receive a unit of data were respectively assumed as ejsk = e R and efs = eT + αdβ. In addition, the scheduling cycle and duty ratio of the nodes in the low power mode were set as 2s and 60%, respectively. The specific simulation parameters are listed in Table 1 below. Table 1: Simulation parameters Sign Definition Value n Total number of network nodes 10, 30, 50 and 80 tsim Total simulation time 6h α Amplification factor 80pJ · b−1 ·m−3 β Power index 4 ∆t Cycle 1h tr Charging time 0. 5h r Sampling rate of WSN node 80B · min−1 eR Energy consumption for receiving a unit of data of WSN node 0. 0567 mJ eT Energy consumption for transmitting a unit of data of WSN node 0. 0233mJ The proposed energy optimization (EOR) routing protocol is denoted as the EOR-L in the low power mode. In the simulation, the EOR was compared with the shortest path routing (SPR), and the EOR-L was contrasted with the expected duty-cycled wakeups minimal routing (EDC). In the SPR, the energy balanced routing is realized by taking the shortest path to the sink node based on the reciprocal of the ratio of the residual node energy to the rated battery capacity. In the EDC, the candidate set with the shortest expected delay is selected under the low power mode and opportunistic routing. 5.2 Evaluation standard This paper uses the normalized network life cycle as the evaluation criterion to evaluate the strategy of routing energy balance with network as the target. The normalized network life cycle is defined as the ratio of the average working duration to the total period length of all nodes in the network (excluding the charging cycle). Taking Figure 2 as an example for specific explanation: node I in the first observation cycle [0, t] before a third charge of electricity from 0 to 1e, subsequent data transmission, forwarding operation, after t1 time consumption of energy, finished the work ahead of time; In the second observation period, I obtained 3e energy and consumed 3e− 0.7e energy. At the end of this period, there was still electricity left. Then the normalized network life cycle of I in the first two cycles is (t1 − t/3 + 2t/3)/(4t/3). 5.3 Simulation results and analysis The energy optimization quality of each routing protocol was evaluated by normalized net- work lifecycle (NNL), i. e. the ratio of the mean operation time of all network nodes to the cycle. Figure 3 shows the variation of the NNL with the number of nodes in the EOR and the SPR. It can be seen that the mean network lifecycle was shortened, as each node operated for 514 W. Hu, H.H. Li, W.H. Yao, Y.W. Hu Figure 2: Battery energy cycle of node i Figure 3: The variation of the NNL with the number of nodes less time in each cycle, with the increase in the number of nodes. Both the EOR and the SPR saw a gradual decline in the NNL. Comparatively, the EOR achieved better energy optimization than the SPR. This is attributable to the fact that the EOR considers how the load distribution of multiple forwarding nodes, rather than a single next hop node, on the network optimization. Figure 4 presents the variation of the NNL with the number of nodes in the low power mode. Similar to Figure 3, both the EOR-L and the EDC witnessed a declining trend in the NNL with the growth in the number of nodes. The EOR-L, which focuses on energy optimization, outperformed the EDC, which highlights time delay. Comparing Figures 3 and 4, it can be seen that the EOR-L had a better NNL than the EOR. Generally speaking, the EOR is a multi-path routing protocol, not an opportunistic protocol. By contrast, the EOR-L can enter the sleep mode when there is no task, thus saving the energy consumed in idle state. Under the same scenario, the EOR led to a longer network lifecycle than the EOR-L. There are two possible reasons: our simulation only considers the energy consumed in data transmitting and reception; the EOR owns more information than the EOR-L, because it optimizes network energy using the global information of the network, while the latter adopts a distributed routing Energy Optimization for WSN in Ubiquitous Power Internet of Things 515 Figure 4: The variation of the NNL with the number of nodes in the low power mode algorithm. Considering the complexity of the two algorithms, EOR uses a linear programming algorithm with a polynomial level of time complexity n; EOR-L adds constraints on the forward- ing candidate set based on the former, the search space is larger than EOR, but still n polynomial level time complexity. 6 Conclusions The UPIoT is the development trend of the energy industry and the priority of China’s energy research. Under the UPIoT, the information transmission relies on the WSN containing multiple sensors. The WSN involves widely distributed power devices, which may need to work under harsh natural environment. For the energy-balanced routing of rechargeable WSN, this paper puts forward a multi-path routing protocol for the normal mode and an opportunistic routing protocol for the low power mode. Under the normal mode, the link traffic is planned through global linear programming for each forwarding node, according to charging rate, remain- ing battery power, and the energy consumed in data transmission and reception. Under the low power mode, the WSN lifecycle is greatly extended under the framework of opportunistic rout- ing. Finally, Matlab-based simulation shows that the proposed routing protocols can effectively optimize network energy, reduce energy consumption of network nodes and enhance the network reliability. Next, we will investigate the routing problem of rechargeable wireless sensor networks in complex mobile scenarios. Funding This work is supported by the Humanities and Social Sciences Project of Chinese Ministry of Education (Grant No. : 17YJCZH062). Bibliography [1] Asha, G.; Santhosh, R. (2019). Soft computing and trust-based self-organized hierarchical energy balance routing protocol (TSHEB) in wireless sensor networks, Soft Computing, 23(8), 2537-2543, 2019. [2] Awad, F.H. (2018). Optimization of relay node deployment for multisource multipath routing in Wireless Multimedia Sensor Networks using Gaussian distribution, Computer Networks, 145, 96-106, 2018. 516 W. Hu, H.H. Li, W.H. Yao, Y.W. Hu [3] Caria, M.; Jukan, A.; Hoffmann, M. (2016). SDN partitioning: A centralized control plane for distributed routing protocols, IEEE Transactions on Network and Service Management, 13(3), 381-393, 2016. [4] Chen, Y.; Xu, X.G.; Wang, Y. (2019). Wireless sensor network energy efficient coverage method based on intelligent optimization algorithm, Discrete and continuous dynamical systems-series, 12(4-5), 887-900, 2019. [5] Chen, Z.G.; Yin, B.A.; Wu, J. (2018). Message of the importance of the opportunity to network based energy equilibrium routing algorithm, Journal of communication, 39(12), 91-101, 2018. [6] Chowdhury, S.; Giri, C. (2019). Energy and Network Balanced Distributed Clustering in Wireless Sensor Network, Wireless Personal Communications, 105(3), 1083-1109, 2019. [7] Ghazi, A.E.; Ahiod, B. (2018). Energy efficient teaching-learning-based optimization for the discrete routing problem in wireless sensor networks, Applied Intelligence, 48(9), 2755-2769, 2018. [8] Gu, Y.; He, T. (2011); Dynamic switching-based data forwarding for low-duty-cycle wireless sensor networks, IEEE Transactions on Mobile Computing, 10(12), 1741-1754, 2011. [9] Habib, M. (2019). Energy-Efficient algorithm for reliable routing of wireless sensor networks, IEEE Transactions on Industrial Electronics, 66(7), 5567-5575, 2019. [10] Jayanthi, N.; Valluvan, K.R. (2018). Bio-inspired optimization routing technique using DNA sequencing algorithm for wireless sensor networks, Wireless Personal Communica- tions, 101(4), 2365-2381, 2018. [10] Khan, I.; Singh, D. (2018). Energy-balance node-selection algorithm for heterogeneous wire- less sensor networks, Electronics Journal, 40(5), 604-612, 2018. [11] Kulshrestha, J.; Mishra, M.K. (2018). Energy balanced data gathering approaches in wireless sensor networks using mixed-hop communication, Computing, 100(10), 1033-1058, 2018. [12] Lee, J.; Kao, T. (2016). An improved three-layer low-energy adaptive clustering hierarchy for wireless sensor networks, IEEE Internet of Things Journal, 3(6), 951-958, 2016. [13] Liu, C. (2015). Cluster head election strategy based on LEACH protocol in WSN routing algorithm and research, Hangzhou university of electronic science and technology. [15] Liu, X.T.; Chen, Z.P.; Huang, Y.Y. (2019). A non-uniform clustering routing algorithm based on energy equilibrium, Microelectronics and computer, 36(2), 36-40, 2019. [14] Liu, Y.; Wu, Y.; Chang, J. (2019). The diffusion clustering scheme and hybrid energy balanced routing protocol (DCRP) in multi-hop wireless sensor networks, AD HOC and Sensor Wireless Networks, 43(1-2), 33-56, 2019. [15] Mittal, N. (2019). Moth flame optimization based energy efficient stable clustered routing approach for wireless sensor networks, Wireless Personal Communications, 104(2): 677-694, 2019. [16] Shalabi, M.; Anbar, M.; Wan, T.; Khasawneh, A. (2018). Variants of the low-energy adaptive clustering hierarchy protocol: Survey, Issues and Challenges, Electronics, 7(8), 136, 2018. Energy Optimization for WSN in Ubiquitous Power Internet of Things 517 [17] Sun, Z.; Wei, M.; Zhang, Z. (2019). Secure routing protocol based on multi-objective ant- colony-optimization for wireless sensor networks, Applied Soft Computing, 77, 366-375, 2019. [18] Tabibi, S.; Ghaffari, A. (2019). Energy-efficient routing mechanism for mobile sink in wireless sensor networks using particle swarm optimization algorithm, Wireless Personal Communi- cations, 104(1), 199-216, 2019. [19] Xia, X.J.; Li, S.N.; Zhang, Y. (2015). Energy of mixed data transmission in one-dimensional sensor network Equilibrium, Journal of Software, 26(8), 1983-2006, 2015. [20] Xiao, K.; Wang, R.; Deng, H. (2019). Energy-aware scheduling for information fusion in wireless sensor network surveillance, Information Fusion, 48, 95-106, 2019.