Abstract
We propose a dynamic energy balanced max flow routing algorithm to maximize load flow within the network lifetime and balance energy consumption to prolong the network lifetime in an energy-harvesting wireless sensor network. The proposed routing algorithm updates the transmission capacity between two nodes based on the residual energy of the nodes, which changes over time. Hence, the harvested energy is included in calculation of the maximum flow. Because the flow distribution of the Ford–Fulkerson algorithm is not balanced, the energy consumption among the nodes is not balanced, which limits the lifetime of the network. The proposed routing algorithm selects the node with the maximum residual energy as the next hop and updates the edge capacity when the flow of any edge is not sufficient for the next delivery, to balance energy consumption among nodes and prolong the lifetime of the network. Simulation results revealed that the proposed routing algorithm has advantages over the Ford–Fulkerson algorithm and the dynamic max flow algorithm with respect to extending the load flow and the lifetime of the network in a regular network, a small-world network, and a scale-free network.
Keywords
Introduction
Nodes of traditional wireless senor networks (WSNs) are typically powered by batteries. Once the energy is depleted, the node is “dead,” so the lifetime of a network is limited to its battery capacity. Moreover, it is very difficult and costly to replace batteries due to the deployment of nodes in difficult-to-access environments or large numbers of nodes. 1 As a result, the limited lifetime of the network creates a bottleneck in WSNs. Energy-aware routing is one of the main approaches for balancing energy consumption and prolonging network life. Along with the development of hardware technology, it is possible for nodes to harvest energy from the ambient environment, such as from radio frequency, 2 solar, 3 thermal, 4 and vibrations. 5 The emergence of energy-harvesting technology partly alleviates the problem with the energy constraint of the nodes and makes self-powering, long-lasting energy-harvesting wireless sensor networks (EHWSNs) possible.
With the introduction of energy harvesting, the objective of routing algorithm for EHWSNs is maximizing the network’s workload since energy can be replenished. Bogliolo et al. 6 first proposed the maximum energetically sustainable workload (MESW) problem and showed that the EHWSN can be cast into an instance of a modified max flow problem. The article also gives the reachable upper bound for the workload that can be sustained by the network. To achieve the max workload, the data rate and the energy-harvesting rate must satisfy a definite constraint. Then, Lattanzi et al. 7 proposed a methodology that made use of graph algorithms and network simulations for evaluating the MESW starting from a network topology, a routing algorithm, and a distribution of the environmental power available at each node. The main challenge for routing algorithm in EHWSN is that the energy harvesting strongly depends on the environment power conditions, which changes over time. Seraghiti and Bogliolo 8 presented a theoretically optimum max flow routing algorithm that makes EHWSNs able to transparently adapt to time-varying environmental power conditions during their normal operation. Bogliolo et al. 9 proposed a self-adapting maximum flow (SAMF) routing strategy which was able to route any sustainable workload while automatically adapting to time-varying operating conditions. Wu et al. 10 proposed a centralized power efficient routing algorithm energy-harvesting genetic-based unequal clustering-optimal adaptive performance routing algorithm (EHGUC-OAPR) to balance the network energy and improve delivery ratio. The objective of these studies focuses on the optimal routing to adapt the variation of environment conditions for maintaining the network energy sustainable. Due to the unstable environment conditions, the harvested energy may be not enough to sustain the network in many cases. In view of the max flow and network lifetime when the network is not energy sustainable, an energy balanced dynamic maximum flow (EB-DMF) routing algorithm is proposed in this article. The proposed routing algorithm has two features that distinguish it from the Ford–Fulkerson (FF) algorithm:
Nodes of the network can harvest energy from their environment, so the energy of the nodes is variable. The static FF algorithm calculates the capacity based on the initial energy of nodes, with the result that the harvested energy cannot be included in the capacity. The load flow of the network is restricted to the initial energy of nodes. To remove this constraint, the capacity of the edge is updated according to its residual energy when the flow of the residual network is not sufficient for the next delivery. The improved algorithm is defined as a dynamic max flow (DMF) routing algorithm.
The FF algorithm randomly and disproportionately allocates the flow on the augmenting path, causing unbalanced energy consumption among nodes. The more flow the augmenting path carries, the more energy the nodes on it will consume. To balance the flow distribution, the capacity of the edges is updated when the flow of any edge is not sufficient for the next delivery. To balance energy consumption and prolong network life, the node chooses the next layer neighbor (NLN) with maximum residual energy as its next hop.
Simulations were conducted to perform a comparative study by applying FF, DMF, and EB-DMF algorithms to three different network models, to verify the validity of the EB-DMF algorithm. The network models are a uniform distribution network model, the Watts–Strogatz (WS) model, 11 and the Barabasi–Albert (BA) model. 12 By comparing the FF, DMF, and EB-DMF algorithms to various network models, we can obtain a deep understanding of the performance of EB-DMF in real EHWSN applications. The simulation results will help guide EB-DMF engineering practice in EHWSN, incorporating issues such as network deployment, routing configuration, and application range.
The remainder of this article is organized as follows. Section “Related work” presents a review of relevant prior work. The “Network environment and problem” section explains the network environment of the proposed algorithm and describes the problem. The proposed routing algorithm is described in “Routing algorithm”. Section “Simulation” discusses the simulation results. Finally, the article is concluded in section “Conclusion and future works.”
Related works
Because of the character of energy harvesting, most existing routing algorithms are not suitable for EHWSN. EHWSN has scale-free and small-world properties, and it is necessary to study the routing process according to the particular requirements of these types of networks. Accordingly, in this section, we describe related research progress in two ways: routing in EHWSN and complex networks.
Routing in EHWSN
There are typically two types of EHWSN: 13 the first is still powered by batteries, but the energy of the batteries can by supplied by energy harvesting, while the second type is powered only by harvested energy. Accordingly, the routing algorithms can be divided into two classes. For the first type of EHWSN, the routing design always aims to improve energy efficiency and prolong network life. Voigt et al. 14 first proposed solar-aware routing that preferentially routes traffic via nodes powered by solar energy to save battery energy. sLEACH routing was also developed to extend the lifetime of the network. 15 Islam et al. 16 proposed A-sLEACH, an extension of sLEACH. For the second type of EHWSN, the objective of most routing is to maximize the throughput and data delivery ratio of the network under the condition that the network is energetic sustainability. In Meng et al., 13 an adaptive energy-harvesting aware clustering (AEHAC) routing protocol for EHWSNs was proposed to maintain available nodes and improve the network throughput. In Eu and Tan, 17 a routing method that included the network deploying environment was proposed to increase the throughput of the network.
Routing in complex networks
Large complex communication networks, such as the network society, 18 the World Wide Web, 19 and WSNs 20 have drawn significant attention. Many routing strategies have been proposed for WSNs to improve the transmission capacity of networks and avoid congestion based on complex network theory, including efficient routing, optimal routing, local routing, and hub avoidance strategies.21–27
To verify the performance of EB-DMF, we applied the proposed algorithm to a complex network.
Network environment and problem formulation
Network environment
Given an EHWSN as shown in Figure 1, this article assumes that all data packets are generated by the source sensors and are transmitted to the sink sensor by the router in a multi-hop manner by applying the routing strategy. All sensors are assumed to have the same energy-harvesting rate and all the source sensors are assumed to have the same data packets rate.
6
Moreover, all nodes have the same battery capacity

An energy-harvesting wireless sensor network.

The equivalent model of the EHWSN.
In this article, the max flow algorithm is applied to determine the routing strategy which maximized the load flow and lifetime of the network. This article assumes that all the source sensors are connected to the virtual source node

The example of routing path in EHWSN.
To obtain minimum hop end-to-end communication, we first adopt the breadth-first searching (BFS) algorithm to obtain hierarchical information on the network. The BFS begins at the source node and searches all neighboring nodes. Then, based on those neighbor nodes in turn, unvisited neighbor nodes are searched, and so on. After BFS, the neighbors of node
The virtual source node sends
In this article, the proposed routing algorithm dynamically calls the max flow algorithm. Assume that the interval of calling the max flow algorithm is
Then, the time of calling the max flow algorithm for
Let
The set of routing paths can be defined as
The flow of augmenting path
Let
Problem formulation
The main work of this article is to design a routing-based on max flow algorithm for EHWSN to extend the load flow and the lifetime of the network.
The network of the lifetime can be described as
The load flow of the network is the flow sum of all the routing paths within the network lifetime, which can be described as
As shown in objective Function (6), this article aims at maximizing lifetime and the max flow while satisfying Constraints (7)–(19)
The source node sends
The counts of
Suppose the residual energy of node
All nodes have the same initial energy, which is equal to the battery capacities C, the above formula can be expressed as
The energy of the nodes is limited to the battery capacity
For max flow algorithm, the flow of the augmenting path is determined by the minimum edge capacity
The edge capacity is determined by the energy of the nodes
The virtual nodes have infinite energy. The edge capacities between them and their neighbors are determined by the nodes connected to them: if node
In a similar way, if node
For other nodes, we can calculate the edge capacity
The edge capacity can be distributed based on
Applying formulas (13) and (17) to formula (16)
The packets transmitted by
The more packets the node transmitted, the node tends to deplete its energy, and the network is easy to die. Meanwhile, the value of
Routing algorithm
In this section, we use a simple routing example to illustrate the proposed EB-DMF algorithm, and then explain how this realizes dynamic energy balanced routing. We finally provide a flow chart for DMF and EB-DMF. Before describing the workings of EB-DMF in detail, the objectives of EB-DMF are stated explicitly:
Minimum hop end-to-end communication to fulfill short latency communication requirements.
Dynamically updating the capacity to achieve larger flow load.
Balanced energy consumption to increase overall network lifetime.
To explain the problem clearly, we consider the example of a regular network topology, as shown in Figure 4. This is a small network of six nodes, one virtual source node, and one virtual destination node. Assuming that all source nodes are connected to the virtual source node and all destination nodes are connected to the virtual destination nodes, all the virtual nodes have infinite energy. 7

An example of EHWSN topology.
FF algorithm
The FF algorithm can be introduced to maximize the flow load of the network under the circumstance that the energy of nodes is constrained. The initial energy of all nodes except source and destination nodes is 0.27J, and

The edge capacity of the network.
The flow of edge
The residual flow of
The process of looking for an augmenting path and its flow using the FF algorithm is described as follows.
Look for augmenting path
Add
After applying this algorithm to Figure 5, the augmenting paths and flow are as given in Table 1.
Routing path and flow (sorted by finding order at
The max flow of the network is
The order of augmenting paths is irrelevant because the order does not affect the final value of

The flow of all edges after FF.
DMF routing algorithm
The battery is not the only power source in EHWSN. The FF algorithm only considers the battery energy of the node, regardless of the energy harvested by the node from the ambient environment. We propose a DMF routing algorithm to solve this problem; in DMF, the edge capacity is updated according to the residual energy of the node. The process of finding augmenting paths will not be restated, and this is described in section FF algorithm. If we enter all edge capacities
The edge capacities can be calculated according to formulas (14)–(18). After updating the edge capacities, we can use FF to calculate the flow of all edges
We define the residual flow of the network as
Formula (22) shows the residual flow of the network at time
The edge capacity is updated when the residual flow of the network is less than
Here,

DMF routing algorithm.
The counts of
The residual flow of edge
The DMF algorithm can be described as follows:
Initialize the energy of nodes, and calculate all edge capacities, then calculate the flow of all edges
If it is the first instance of packet sending, the residual energy of the nodes does not need to be updated because the nodes have not yet harvested energy. Otherwise, update the residual energy of the nodes, then decide whether to update edge capacities according to formula (23); if the edge capacities are updated, we need to recalculate the flow of all edges
Set the outgoing packet number of the source node as
If the residual flow of edge
When
To explain the process of routing packets and describe the update time, we can apply the DMF algorithm to an example (shown in Figure 5). Step 1 has been discussed in section FF algorithm, and the FF algorithm will not be restated here. The output of the FF algorithm (as shown in Figure 6) is used to represent the process. Assume that the source node sends the first packet at
The routing process.
The augmenting path
Energy balanced dynamic max flow routing algorithm
Due to the unbalanced distribution of the edge flow, the energy consumption of nodes is not balanced and the network will terminate early. Taking Figure 6 as an example, although nodes 1, 2, and 3 have the same energy, the flow distribution calculated from the maximum flow is not balanced. The flow of edge

EB-DMF routing algorithm.
The flow chart of the EB-DMF routing algorithm is shown as Algorithm 2.
Based on the example shown in Figure 5, the routing process can be described as follows:
From
From
The delivery of packets repeats the above process in the order

The residual flow of all edges at
From Figure 7, we can see that the residual flow of
The second update is at

The residual flow of all edges at

The residual energy of nodes at

The residual flow of all edges after updating the edge capacities at
Table 3 lists the network lifetime of DMF and EB-DMF. The EB-DMF routing algorithm has a longer network lifetime than DMF. Figure 9 shows the residual energy of all nodes of DMF and EB-DMF. The energy consumption of EB-DMF is more balanced than that in DMF ( Figure 11 ). Moreover, the residual energy of node 3 is much larger than that of nodes 1 and 2 in DMF. Similarly, node 4 and node 6 have larger residual energies compared to node 5. The flow of node 3 is less than nodes 1 and 2 and the flow of node 5 is larger than nodes 4 and 6 in Figure 6.
Comparison of the network lifetime of DMF and EB-DMF.
DMF: dynamic maximum flow; EB-DMF: energy balanced dynamic maximum flow.

Comparison of the nodes’ residual energy of DMF and EB-DMF when the first failure node appears.
Simulation
This section presents simulations performed to evaluate the performance of the proposed routing algorithm, to determine the advantages of the FF routing algorithm, the DMF routing algorithm, and the EB-DMF routing algorithm in terms of load flow, and to determine the advantages between the DMF routing and EB-DMF routing algorithms in terms of network lifetime and energy consumption. The application range of the algorithms was also obtained by analyzing their performance in various networks.
Simulation model
There are three types of networks in our simulation: a regular network, a BA network, and a WS network. The scale-free and small-world networks are both complex networks. A scale-free network is a network with a small portion of nodes that have a large number of connections and a large portion of nodes that have a small number of connections. Scale-free networks enjoy strong robustness against node failures. 29 A small-world network lies between a regular network and a random network, and has two properties: high clustering and a small shortest path. The networks were generated using the BA and WS models.
BA model
Two mechanisms were used to generate the BA network: growth and preferential attachment. The generation of the network is based on an initial network of
where
WS model
The WS network lies between a regular network and a random network. The generation of the WS network is based on a nearest-neighbor coupled network that has
Simulation scenarios
The routing algorithms were applied to three kinds of network: a regular network, a BA network, and a WS network. In each network, we compared the load flow of FF, DMF, and EB-DMF and the lifetime of DMF and EB-DMF. For the FF routing algorithm, the simulation stopped because the network had achieved the maximum load flow calculated by the initialized energy instead of the node dying. Thus, the lifetime of FF was not considered. For Scenario1–Scenario4, the data rate was set as
Scenario 1. Application of the FF, DMF, and EB-DMF routing algorithms to a regular network. The number of nodes was fixed at
Scenario 2. In a regular network, the depth is fixed at
Scenario 3. Application of the FF, DMF, and EB-DMF routing algorithms to BA and WS networks for comparative study. The degree distribution is set as 4 and the number of nodes is increased by 50 from 100 to 400.
Scenario 4. Compare the load flow and network lifetime of the three networks with fixed node number
Scenario 5. Apply the DMF and EB-DMF routing algorithm in a regular network where
Simulation parameters.
Simulation results
Table 5 shows the simulated load flow, and Table 6 shows the simulated network lifetime with different topology structures and a fixed node number
Load flow as a function of different topology structures with
FF: Ford–Fulkerson; DMF: dynamic maximum flow; EB-DMF: energy balanced dynamic maximum flow.
Network lifetime as a function of different topology structures with
DMF: dynamic maximum flow; EB-DMF: energy balanced dynamic maximum flow.
Load flow as a function of the number of nodes with
FF: Ford–Fulkerson; DMF: dynamic maximum flow; EB-DMF: energy balanced dynamic maximum flow.
Network lifetime as a function of the number of nodes with
DMF: dynamic maximum flow; EB-DMF: energy balanced dynamic maximum flow.
Figure 12 shows the residual energy distribution plotted against the node index for the regular network with

The distribution of residual energy plotted as a function of the node index, for a regular network where
Total energy comparison between EB-DMF and DMF when the first failure node appears, for the regular network where
DMF: dynamic maximum flow; EB-DMF: energy balanced dynamic maximum flow.
The DMF algorithm sends packets along one augmenting path until there is no residual flow, then finds another augmenting path to transmit packets during the edge capacity updating period, which results in nodes not passing through the augmenting path continually harvesting energy and rapidly reaching their energy limit. The EB-DMF algorithm chooses the node with max residual energy as its next hop, which balances energy consumption among the nodes. The nodes do not reach their energy limit and harvest more energy. Thus, the network using the EB-DMF algorithm has a larger total energy. Taking Figure 2 as an example.
In DMF, from Table 2, it can be seen that the packets are delivered along
As shown in Table 10, the load flow clearly improved after using the DMF and EB-DMF algorithms. The network lifetime of the EB-DMF algorithm is significantly extended compared to the DMF algorithm, as shown in Table 11. In the two network models, the load flow has an increasing tendency while the total number of sensor nodes increases because more augmenting paths means more nodes are harvesting energy during each packet delivery interval.
Comparison of load flow of FF, DMF, and EB-DMF routing algorithms in WS and BA network models.
FF: Ford–Fulkerson; DMF: dynamic maximum flow; EB-DMF: energy balanced dynamic maximum flow; WS: Watts–Strogatz; BA: Barabasi–Albert.
Network lifetime of FF, DMF, and EB-DMF routing algorithms in WS and BA network models.
FF: Ford–Fulkerson; DMF: dynamic maximum flow; EB-DMF: energy balanced dynamic maximum flow; WS: Watts–Strogatz; BA: Barabasi–Albert.
Meanwhile, the load flow of the WS model is larger than that of the BA model when using the same routing algorithms with the same number of sensor nodes, on the condition that the network is relatively small. In turn, the load flow of the WS model is smaller than that of the BA model when the network is large. Moreover, the load flow of the BA model increases more obviously than that of the WS model when the total number of nodes increases.
Figures 13 and 14 show the distribution of the residual energy of EB-DMF and DMF when the first failure node appears in the small-world and scale-free networks when

The distribution of residual energy plotted as a function of the node index, for a small-world network where

The distribution of residual energy plotted as a function of the node index, for a scale-free network where
Total energy comparison between EB-DMF and DMF when the first failure node appears, for a small-world network and scale-free network where
DMF: dynamic maximum flow; EB-DMF: energy balanced dynamic maximum flow; WS: Watts–Strogatz; BA: Barabasi–Albert.
Although the EB-DMF algorithm can extend the load flow and prolong the network lifetime of both network models, it is more suitable for the BA model when the network is large and it is more suitable for the WS model when the network is small.
It is possible to draw a number of conclusions from these simulation scenarios. First, the DMF and EB-DMF routing algorithms, which dynamically update the capacity of the max flow algorithm, can extend the load flow of a network; the EB-DMF algorithm that balances the energy consumption among the nodes can actually prolong the lifetime of a network. Second, EB-DMF routing algorithm performs better in scale-free networks, with the same degree of distribution in a small-world network and a scale-free network when the network is large. In turn, the EB-DMF routing algorithm performs better in small-world networks when the network is small.
Figures 15 and 16, respectively, show the load flow and the network lifetime plotted as a function of the harvested energy of the nodes in 1 s for regular network where

The load flow plotted as a function of the harvested energy of the nodes in 1 s, for regular network where

The network lifetime plotted as a function of the harvested energy of the nodes in 1 s, for regular network where
Conclusion and future works
We proposed an EB-DMF routing algorithm for EHWSN based on the max flow algorithm and investigated the flow load and the network lifetime assuming that all nodes had the same initial energy and energy-harvesting rate. The proposed routing algorithm considers realistic network structures and the dynamic energy variation of EHWSN.
Our proposed algorithm improves upon the FF algorithm in both the extension of the load flow and the network lifetime. First, our algorithm dynamically updates the capacity according the residual energy of the nodes considering the energy harvested by the nodes. Second, the flow distribution of FF is not balanced, leading to unbalanced energy consumption in the nodes. The update time is changed to achieve balanced energy consumption among the nodes and prolong the network lifetime.
Because of these two improvements, EB-DMF extends the load flow and the network lifetime. Our algorithms were applied to a regular network, a BA network, and a WS network, and the comparison provided information on application scenarios.
In future work, we will improve and extend the EB-DMF algorithms, taking other factors into account. First, we will consider different energy-harvesting rates in nodes, and second, we will consider a sleep–awake mechanism in nodes to prolong the network lifetime.
Footnotes
Handling Editor: Chang Wu Yu
Declaration of conflicting interests
The author(s) declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.
Funding
The author(s) disclosed receipt of the following financial support for the research, authorship, and/or publication of this article: This work was supported in part by the National Natural Science and Foundation of China under Grants 61702369 and Tianjin Municipal Science and Technology Commission under Grant 15JCYBJC52400.
