Stable routing and energy-conserved data transmission over wireless sensor networks

Stable routing and energy conservation over a wireless sensor network (WSN) is a major issue in Internet of Things applications. The network lifetime can be increased when studying this issue with interest. Data transmission is a dominant factor in IoT networks for communication overhead and energy consumption. A proposed efficient node stable routing (ENSR\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$ENSR$$\end{document}) protocol is introduced to guarantee the stability of transmission data between the source and destination nodes, in a dynamic WSN conditions. ENSR\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$ENSR$$\end{document} minimizes energy consumption and selects more stable nodes for packets forwarding. Stability becomes the most important factor that qualifies the node's centrality. A node’s stability is characterized by residual energy, link quality, and number of hops needed to reach the destination from the node. To calculate node's stability, an enhanced centrality concept, known as stable betweenness centrality (SBC\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$SBC$$\end{document}) is introduced. In ENSR\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$ENSR$$\end{document}, at first, some nodes will be selected as the stable forwarding nodes, usually with maximum SBC\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$SBC$$\end{document} between their neighbors within a limited communication radio range of a particular region. Furthermore, each stable forwarding node then broadcasts its identity, including SBC\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$SBC$$\end{document}, to the source node separately. The source node can compute a stable path to forward packets to the corresponding stable forwarding node, based on a proper designed stable path routing metric (SPRM\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$SPRM$$\end{document}). Then, the stable forwarding node will behave as a new source node and start another stable path routing process until the packets are forwarded and reached to the destination node. In addition, the change of stable nodes over time balances and conserves node energy consumption, thereby mitigating “hot spots”. The proposed routing protocol is validated through simulation. The numerical results show that the proposed protocol outperforms the existing algorithms, global and local reliability-based routing (GLRR\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$GLRR$$\end{document}) and reliable energy-aware routing protocol (RER)\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$(RER)$$\end{document}, in terms of network efficiency and reliability.

such as aggregation and minimizing energy consumption. Other stabilization efforts depend on route repair [20,21].
In this paper, a proposed efficient node stable routing ( ENSR ) protocol based on a designed stable path routing metric (SPRM) is introduced to select an optimal stable path between a source and destination node in data transmission. This guarantees node's global stability and node's local stability, while conserving the energy consumption across the WSN network. The paper introduces the betweenness centrality of a node associated with three parameters, namely the link quality with its neighbors, the hop distance between the node and destination, and the residual energy of a node, to reflect its global stability. Thus, a stable betweenness centrality ( SBC ) concept is introduced to properly evaluate the node stability.
The paper also introduces the locality dependency energy degree of a node on its adjacent neighbor to reflect its local stability. It is defined as the dependency degree for a node to select one of its neighbors as its next forwarder node according to their corresponding link energy cost quality. In ENSR , at first, some nodes will be selected as the stable forwarding nodes, usually with a maximum SBC between their neighbors within a limited broadcast radio range of a particular region. In addition, all stable forwarding nodes then broadcast their identities, including their SBCs , to the source node that constructs its own forwarding paths from itself to the stable forwarding nodes separately. Each node, includes source node, with routing decision on a stable forward path must calculate its locality dependency energy degree on its neighbors to choose its next hop.
A proper SPRM is designed to select the optimal stable path from all stable forwarding paths, by combining both network overhead and SBC of the stable forwarding node on the forwarding path. The source node, based on the proper designed SPRM , can compute an optimal stable path to forward packets to the stable forwarding node. Then, the stable forwarding node will behave as a new source node and start another stable path routing process until the packets are forwarded and reached to the destination node. Moreover, to conserve the energy consumption across the WSN network and to mitigate "hot spots", the proposed routing method changes the stable nodes dynamically. Thus, the proposed routing protocol guarantees the network stability while conserving the energy consumption.
The main contributions of this paper are presented as follows.
(1) Analytical expressions for packet retransmission times, and expected hop count are formulated. (2) A new centrality measure of a node, called stable betweenness centrality, is introduced to evaluate the node stability and reflects its global stability. (3) A locality dependency energy degree of a node is designed to reflect its local stability. (4) A network overhead, which is influenced by packet retransmission times and node's locality dependency energy degree, is formulated. (5) An efficient node stable routing ( ENSR ) is proposed to guarantee the global node's stability and local node's stability in transmission of data while conserving the energy consumption.
transmission of the residual energy and event packets of the sensor nodes and their neighbors. Lower limits on the mean squared error (MSE) for two classes of channel-based transmission schemes are presented in [30], namely, ordered and censoring transmissions. The presented schemes increase the lifetime of conventional WSNs by decreasing the number of transmissions and harvesting energy.
In [31], a novel Energy-Efficient Load Balancing Ant-based Routing Algorithm (EBAR) is proposed. EBAR uses an improved pheromone trail update scheme and a pseudo-random route discovery algorithm to balance the sensor nodes' energy consumption.
In [32], the authors propose an energy-saving algorithm, K-means, to solve short network cycle, low throughput, and node energy constraints problems in current wireless sensor networks. Multi-hop routing is constructed based on the factors of hop number and transmission distance to effectively minimize node energy consumption in data transmission.
The research in [33] focuses on an effective elective cluster head (CH) scheme that alternates the position of CH among the higher energy-level neighbor nodes as opposed to others. The selection of a cluster head will adequately balance the network load and increasing lifetime while reducing energy consumption.
Research in [34] addresses the issue of energy conservation through the development of a SensorRank dynamic sensor activation algorithm. SensorRank analyzes the network topology dynamically in terms of the relative distances and connecting qualities between devices and the remaining device energies, based on which the sensors are ranked.
The study in [35] addresses the issue of energy consumption through the development of a distance-based dynamic duty-cycle allocation (DBDDCA) algorithm. In DBDDCA, Cluster Head Longer Distance Nodes transmit comparatively less time to save energy.
The authors in [36] describe an adaptive data reduction method (AM-DR), a data reduction approach designed to reduce communication and overall data transmission among the sensor nodes in IoT networks. Authors provide a communication cost model to realize the energy savings enabled by AM-DR.
For heterogeneous WSNs, an Enhanced Stable Routing Algorithm (ESRA) is proposed in [37] to save the sensor nodes energy. ESRA is considered as improving cluster-based routing. The Cluster Head selection is improved by including the distance factor in the formula for the threshold. The duration of stability is greatly increased and energy consumption is also reduced.
In [38], a cluster head selection for a heterogeneous network based on thresholds is analyzed and implemented. The threshold shall preserve a uniform distribution of energy between CH nodes and member nodes.
In [39], a Link-stability and Energy-aware Routing Protocol (LAER) is proposed. The protocol seeks to compensate for the stability of the link connections and the energy usage at minimum drain rate. A biobjective optimization approach has been developed to check the accuracy of the proposed solution.
In [40], the authors examine the routing stability of the WSN nodes implemented by ZigBee PRO in a real world environment. They introduce three metrics; switching frequency count, use rate of unique next hop, relative routing path usage count; as routing stability indicators.
The research in [41] focuses on developing a framework for route stability. The used metrics are adapted to promote routes with greater stability under various dynamic network conditions. The core principle incorporates Neighborhood Heuristics (NHs). In [42], the authors propose an energy-efficient link stable routing (EELSR) to account for the stability of the links and conserve the energy of the smart devices to improve the network lifetime.
In [43], swarm intelligence (SI)-based clustering with multihop routing protocol for WSN is proposed. The CHs are decided and organized by applying an improved particle swarm optimization (IPSO) technique. Then, the optimal paths are selected through grey wolf optimization (GWO) routing algorithm in the WSN. The proposed IPSO-GWO technique incorporates the benefits of the routing protocol and clustering which leads to maximum energy efficiency, by reducing entire power conservation while considering network lifetime.
In [44], autoencoder-based energy conservation in hierarchical WSNs is proposed to extend the lifetime of WSNs. A trained partly-informed sparse autoencoder (PISAE) is used to encode input data partially using gate weights at sink and clusters. Each sensor node sends data to its own cluster header and waits for instructions on whether to put the energy consuming circuits into sleep or off. Cluster heads collect all data from their cluster members and determine the significance of each sensor using gate weights. The reliability and lifetime of the network are improved by putting the sensors with increased readings to sleep without losing important information.
In [45], the authors present a protocol that dynamically determines the size of the virtual grid to give the best performance of any WSN geographic sized. The protocol prolongs the WSN lifetime and improves energy efficiency of the nodes by considering distances between sensor nodes internally and sinks node(s) to transmit data dynamically. These distances can be minimized by transmitting the data via multi-hop nodes, which reduces energy expense of transmitting nodes.
An Energy efficient Least Edge Computation LEACH (ELEC-LEACH) is proposed in [46] to improve the LEACH by combining the ELEC routing protocol. The CHs are selected in the same manner as LEACH and the ELEC-LEACH follows the same routing mechanism of ELEC to improve the network lifetime, reduce the residual energy and the percentage of node failure and packet drop.
The above studies take the local information into consideration to elect the clustering headers when making the decision routing. The data is sent from sensor nodes and aggregated to CHs and then forward to the sink, which leads to conserve the energy. The energy consumption is considered only by transmitting nodes. The studies analyze the stability or reliability considering only the local node stability and it is limited to improve the stability of data transmission.
Compared to the previous work, this paper differentiates from them in the following aspects.
(1) Emphasis on the important role of node's global and local stability in data transmission. The ENSR is designed to select the stable forwarding nodes with greatest stable betweeness centrality to ensure the network stability. Most of the previous works do not take the node's global stability into consideration.
(2) Considering the effect of the link energy cost quality on the node's local stability, when selecting the next hop forwarder node. The ENSR is designed taking into consideration both the local and global stability of the node together. (3) Considering the impact of retransmission times on consumed energy of the node and stability of data transmission in the network. (4) Considering the energy consumption by both the transmitting and receiving nodes in data transmission. (5) Considering the impact of transmission distance on the energy consumption to guarantee the network stability.

Preliminaries
The introduced principles used in the proposed work are discussed in this section.

Expected hop count (Ehc)
In this section, an expression for the expected hop count is driven between source and destination nodes. Consider the source node S and a destination node D , as illustrated in Fig. 1, where the radius R indicates the radio transmission range. If the expected distance E(z) , between source and destination nodes, is greater than the radio transmission range R , the source will utilize its neighboring nodes to forward the packets to the destination across multi hops. If the source has n adjacent neighboring nodes (within the radius R ), the source node S will pick out the nearest neighboring node to the destination (like node M ) to act as the next forwarder node that forward the packets to the destination.
The expected one hop distance E(x) is calculated, between source node and its nearest neighboring relaying node, while computing the expected hop count. The expected distance E(z) is formulated and derived too. Assume that there are n neighbors M 1 , M 2 , M 3 . . . M n of the source node S in the forwarding transmission region R towards D and distributed over half circle. The angles and distances from the source S to the neighboring nodes are α i ,x i , where i = 1, 2, 3 . . . n . The probability density function ( PDF ) of the distance ( x ) between S and the neighbor nodes is f x (x) = 2x/R 2 .
To decrease the hop count to D , the neighboring node with the maximum distance ( x max ) from the source S is selected to forward the packets. The PDF of x max is is the cumulative distribution function (CDF ) of x . Therefore, the expected one hop distance E(x) is given by Now, consider S and D are located in a square area of size L × L . Hence, the maximum distance between S and D can be L √ 2 , CDF(F (z) ) and PDF( f (z) ) can be defined as z , respectively. Thus, E(z) is defined as Hence,

Residual energy metric (E RES )
The energy model as adopted in [10] is considered to evaluate the energy consumed by a sensor node in transmitting E Tx , and receiving E Rx a data bit. The energy required to transmit and receive data of size l bits to a distance d are represented as where E elec represents the energy dissipation per bit in the transmitter or receiver circuitry, ε fs and ε amp are the energy consumed by the power amplifier per data bit for free space and multi-path radio channel models respectively, d 0 = ε fs /ε amp is the threshold distance specifying the radio channel model, and d is the physical distance between sender and receiver nodes and is expressed as and (x 2 , y 2 ) are the coordinates of the two nodes. Assume any device node i has an initial energy IE i , and E Tx j is the dissipated energy for reception and transmission in each round. The residual energy of node i is formulated after a single round as

Link quality (Link_ETX)
In addition to the energy considerations and expected hop count of the nodes, ENSR also ensures a certain metric proposed specifically for wireless networks to estimate the desired link quality; the Expected Transmission Count (ETX) [47]. The link quality of a node pair is estimated using the ETX metric. Thus, link quality is defined as Link_ETX = 1 ETX . The ETX of a link is the expected number of successfully transmission packets over the link. If ETX increases, link quality decreases. The larger ETX is, the smaller link quality will be. The link quality over Link ij is denoted as Link_ETX ij . The ETX of a route is the sum of the ETX for each link in the route. The chosen route is the one with the largest sum of Link_ETX values along the route to the destination.

Global stability (stable betweenness centrality (SBC))
Betweenness Centrality, introduced by Freeman [48], is considered as the most important centrality metrics to measure the significance of a node in network communication. Betweenness Centrality of a node is defined as the number of the shortest paths from all nodes to all the other nodes which pass through it in a graph. The nodes with higher Betweenness Centralities represent a higher degree of connectivity in a network, and removal of these nodes may partition the network or can affect communication between the other node pairs [49].
Assuming a network is modeled as graph G(V , E) , where E represents the set of links and V represents the set of nodes, an adjacency matrix A = (a ij ) , which encodes the full topology of the network: a ij = 1 if there is a link from node i to node j , and a ij = 0 otherwise. It is assumed that the network has N nodes, thus i, j ∈ {1, · · · , N } . The adjacency matrix is used as an input to compute the centrality of a node. Hence, the Betweenness Centrality of node v is given as where σ x,y (v) represents the number of shortest paths from x to y that pass through v , and σ x,y is the number of shortest paths from x to y.
A modified centrality concept known as stable Betweenness Centrality ( SBC ) is introduced to properly evaluate the node stability in a dynamic environment. A node's stability is characterized by residual energy, link quality, and number of hops needed to reach the destination from the node. Thus, a normalized weighted adjacency matrix is introduced as an input to compute the centrality of a node, each element in the matrix is assigned weight with three parameters known as Link_ETX , the average residual energy of node pair, and Ehc . The introduced pairwise weighted adjacency matrix is constructed as Ehc j . The parameters β 1 , β 2 , and β 3 are normalized factors. Hence, the SBC of node v is given as To reduce the time complexity, the approximate Betweenness Centrality introduced in [50] has been used for the proposed work. Thus, the time complexity is reduced from

Local stability (locality dependency energy degree (LDED))
The locality dependency energy degree is introduced to reflect the node local stability. It is defined as the dependency degree for a node to select one of its neighbors as its next forwarder node according to their corresponding link energy cost quality. Two kinds of link cost functions introduced in [51] are combined, an inverse energy cost and energy cost assignment using exponential-sine function, to propose a new link exp-sine cost function as f (y) = exp (1/ sin y) . Small changes in variables can cause significant changes in exponential and sine functions values.
The exp-sine cost function is introduced as a function of the residual energy. To transmit data from node i to node j , node j should have high residual energy. If node j has low residual energy and data is transmitted via it, node j loses more energy and dies rapidly. When data is transmitted via multi-hop, there exist several paths between source and destination. It is therefore beneficial to have relatively higher energy nodes along that path direction. This can be achieved by assigning an energy exp-sine cost to each link such that where EC ij is the energy cost assigned to link between nodes i and j , E RES j is the residual energy of node j, and IE j is the initial energy of node j. Thus, the links associated with low residual energy nodes will be assigned a high energy cost. Hence, the locality dependency energy degree LDED ij of node i on node j is defined as The node with more residual energy, i.e., with high link energy cost quality, has more chance to forward packet, which would reduce the overhead of the network and balance the energy consumption correspondingly. The higher LDED ij of node i , the higher local stability it has.

Packet retransmission times (PRT ) and network overhead (NOV )
The quality of the links between each pair of nodes is expected to deteriorate and can be influenced by changing parameters. The instability of link quality leads to instability of locality dependency energy degree, and thus affects the node's local stability. The link quality has significant impact on the transmission of data. The good link quality could guarantee the stability of the transmission of data, while the poor link quality would cause significant change in the loss of packets and a great part of the retransmission of the packets.
It is therefore worth noting that packet retransmission times between the neighboring nodes could incur lots of network overheads. The greater the packet retransmission times, the higher network overhead between nodes. Then, it is important to accurately estimate the packet retransmission times, which ensures precise overhead measurement of the network. Therefore, a new comprehensive metrics are introduced to realize these, NOV and PRT .
Two assumptions are considered when selecting the next hop node in data transmission: (1) the nodes in one-hop adjacent neighbors can only send packets through the stable forward path, and (2) the impact of the locality dependency energy degree on node's local stability. Therefore, when node i transmits a packet to j once, the probability of a successful transmission is LDED ij and the probability of a failed transmission is 1 − LDED ij .
The sender should resend and retransmit the packet several times to the next hop node in its stable forward path, in case of failed reception. Then, the probability of a failed reception for a next hop node j after n retransmission times is (1 − LDED ij ) n+1 , while the probability of a successful reception is considered as With the retransmission mechanism, the sender is allowed to retransmit the packet for at most MRt (maximum retries) times before giving up. To estimate the expected packet retransmission times (PRT ij ) between node i and its next hop-node j accurately, it is considered both the transmission cost and the probability of a failed reception. Thus, the expected packet retransmission times PRT ij can be defined as calculates the expected transmission counts that a packet fails to pass. Therefore, the network overhead between adjacent neighbor nodes i and j on a stable forward path is introduced as NOV ij = NOV ij without packet retransmission + NOV ij with PRT ij retransmissions Hence, The network overhead is related to the locality dependency energy degree and the packet retransmission times, based on (14). Therefore, it is possible to calculate the network overhead for any two adjacent neighboring nodes. The larger the LDED ij , the smaller the NOV ij .

Wireless sensor network model
The WSN model is considered as undirected weighted graph. The sensor nodes (vertices) are distributed randomly and each node has a positive integer ID . The sensors are connected by edges within the communication radio range R . The sensing data are collected periodically through sensor nodes cooperation. The aim is to find an energy efficient stable route such that the lifetime of the network is prolonged and the energy consumption is balanced. It is assumed the following: (1) Each sensor node has the same capacity, the same processing power and the same storage memory. (2) The node may adjust its transmitter power level, depending on the distance of the receiver. Initially in the WSN model, it is assumed that all sensor nodes have the same maximum residual energy and the link quality of each node pair is good.

ENSR routing protocol
The ENSR detailed design process is introduced in this section. The ENSR is divided into four stages: (1) normalized weighted adjacent matrix construction; (2) stable node determination; (3) stable node path construction, and (4) stable routing construction.

Normalized weighted adjacent matrix construction
At the beginning of the ENSR protocol, in its initialization phase, the adjacency matrix A = (a ij ) of the WSN deployment topology is constructed. On the contrary to initialization phase, in dynamic phase, the quality of the links between each pair of nodes is expected to deteriorate or the residual energy of sensor nodes may drain when the data is frequently accessed through the WSN network. If ETX exceeds maximum transmission times threshold MaxTr or the node residual energy decreases beyond minimum energy threshold EngTh , the weights are re-evaluated and a new weighted adjacent matrix is introduced. The normalized weighted adjacent matrix plays a crucial role in ENSR protocol to determine the stable nodes. The detailed design of the normalized weighted adjacent matrix construction is shown in Algorithm 1.

Stable node determination
In the stable node determination, the source node S broadcasts a probe message within the limited broadcasting range bR > R to all nodes. The probe message includes the IDs of S and D . Each node receives this probe message then calculates its SBC between S and D by using the received IDs and the information stored in the normalized weighted adjacent matrix. Several nodes with maximum SBC between these nodes and their neighbors will be determined and selected as the stable forwarding nodes. The stable forwarding node is distinguished among its neighbors by setting its stable forwarding tag mark ( SFM ) to 1, otherwise SFM = 0. There are two cases to determine and select the stable forwarding node as follows. Case 1 If D can receive and overhear the probe message of S and under bR of S , it will be directly determined and selected as a stable forwarding node and sets its SFM = 1.
Case 2 Each adjacent neighbor j of S , which has other adjacent neighbors except S , start comparing its SBC with all SBCs of its adjacent neighbor nodes. Then, the node with the maximum SBC will be determined and selected as a stable forwarding node and sets its SFM = 1, and set SFM = 0 to all its adjacent neighbors.
The above process continues until some nodes with maximum SBC among their neighbors can be determined and selected as the stable forwarding nodes of S . The detailed process is shown in Algorithm 2.

Stable node path construction
Once the stable forwarding nodes are explored and selected, each stable forwarding node then broadcasts its identity, including its SBC , to the source node S separately. Therefore, the source node S can construct its stable forwarding path from itself to the stable forwarding node. In addition, each node on a stable forward path, includes source node, should calculate the locality dependency energy degree (LDED ij ) on its neighbors to choose its next hop.
If the stable node is one of adjacent source node S neighbors, the source S will select it as its next hop node directly and calculate its LDED ij on this next hop node. On the other hand, if the stable node is not one of adjacent source node S neighbors, all adjacent source neighbors calculate their SBCs between the source S and the current stable node. Then, the source S selects the adjacent neighbor with the maximum SBC as its next hop node. The selected hop node then calculates its LDED ij on the source node S and acts as a new current source node to continue to select its next hop node. Therefore, source node S can construct its stable node paths from itself to the stable forwarding nodes separately. The detailed path construction process is shown in Algorithm 3 (extension and modification of path construction in [24]).

Stable routing construction
In this process, a SPRM by combining both network overhead and SBC of the stable forwarding node is designed to specify an optimal path from all stable forwarding paths and ensure both nodes' global and local stability. The network overhead for a stable forwarding path Pn is regarded as the average of the network overhead for all pairs of the neighboring nodes on the stable forwarding path. Thus, the network overhead is considered as where LP is the path length of Pn , and NOV Pn ≥ 1 . Hence, the SPRM is designed as where w ∈ [0, 1] is weight coefficient and (1 − w) is the weight residue factor. The weight coefficient w is used to balance the effect of network overhead and stable betweeness centrality on designing SPRM to determine the optimal stable path. The optimal stable path is selected as the stable forwarding path with greater SBC and fewer networks overhead. Hence, from the entire stable forwarding paths, the optimal stable path with maximum value of the SPRM will be selected by the source node S to forward packets to the corresponding stable forwarding node. The ENSR protocol is shown in Algorithm 4. (SNn, (S, D)), To illustrate how the routing constructs and selects the optimal stable path, assume that there are four stable nodes explored, SN 1 − SN 4 , as shown in Fig. 2. Taking SN 1 as an example, the source S will select an adjacent neighbor m with the maximum value of SBC(0.75) between S and SN 1 as its next hop node, and node m will select SN 1 directly as its next hop node. Thus, stable forwarding path from S to SN 1 is constructed as P 1 : S → m → SN 1 . Subsequently, the stable forwarding paths P 1 − P 4 are constructed for SN 1 − SN 4 separately. Then, the stable forwarding paths P 1 − P 4 are sorted according to their SPRM values and select the stable forwarding path with the maximum SPRM value as the optimal stable path. If P 1 is the optimal stable path,S will forward packets to the stable forwarding node SN 1 along P 1 , and node SN 1 has to be chosen as a new source S to start another stable path routing process until the packets be forwarded to the destination D.

Simulation platform
A simulation is implemented under MATLAB R2015b in order to evaluate the efficiency of the proposed ENSR protocol. The simulation is carried out within an area of 300 × 300 m 2 network. The sensor nodes are distributed randomly over this area. The broadcast range bR of the node varies from 20 to 140 m, and the communication range R is set at 20 m. The weight w is set to 0.7, the optimal weight value as introduced in GLRR protocol [24]. Table 1 shows the parameters of the simulation. With regard to all simulations, each simulation results are the mean value from 25 run times with different seed numbers.
The simulation platform is developed using Graphical User Interfaces (GUI) Matlab environment. The GUI is a kind of user interface tool that provides the flexibility to interact with the different graphical objects without knowing the exact technical details of the simulation model. The implemented simulation programs are embedded within the GUI. The simulation platform, as shown in Fig. 3, consists of two panels to input variable parameters values and choose between different routing process methods, and several buttons that are pressed to perform certain operations.
The variable node density parameter is edited to input number of sensor nodes required to configure the WSN, the broadcasting range variable is edited to input the sensing range, and the location of the destination node (x and y coordinates values). It is noticeable only, in this context, that editing data is adopted for the parameters that need to be changed and the values of the other parameters are fixed, as shown in Table 1, and included in the simulation programs as constants.
To create the main WSN, the "Create WSN" button is pressed, and a new graphic screen is introduced showing a new WSN includes the deployment of the nodes randomly through the fixed geographic dimension of 300 × 300 m 2 and the links between these nodes. The link between any two nodes can be established only if the Euclidean distance between these two nodes is smaller than the radio transmission range ( R = 20 m). The destination node is indicated by a circle in green colored. For example, Fig. 3  An adjacent matrix for the created main WSN is obtained and the initial energy is assigned for each sensor node. The next step is to choose one of the different routing protocols by selecting its corresponding radio button within the routing protocol panel. To execute the selected routing method, the push button "Routing Process" is pressed to start the transmission of data from the source to the destination through the specific rules of the selected routing protocol until the completion of the simulation process. A new message appears indicating the end of the simulation process and simulation data is saved to be analyzed. The statistics of the results are plotted and optimized their view through the Matlab as well. The push button "Reset Parameters" is pressed to eliminate all the parameters values and start a new entry.
The performance of both network reliability and network efficiency for the proposed protocol is evaluated. Also, the performance of the proposed ENSR protocol is compared with existing global and local reliability-based routing ( GLRR ) [24] and reliable energyaware routing protocol (RER) [28].
The three routing protocols are similar in designing retransmission mechanisms to improve the reliability of data transmission. In GLRR , the retransmission times is estimated based on target link quality to guarantee the node's local reliability. The RER uses hop-by-hop retransmission acknowledgement mechanism to guarantee the reliability of message transmission, and data is received only by certain nodes of interest according to the node's RECBD. A unified comparison of the performance for the three routing protocols is presented.

Network reliability
This section presents discussions and simulation analysis results concerning the effects of broadcasting range bR , and node density on network reliability. Packet delivery ratio ( PDR ) is considered to measure the network reliability and is defined as the percentage of packets delivered successfully from source to destination node.

Impact of broadcasting range (bR)
The impact of broadcasting range bR on PDR is studied in this section by comparing the proposed ENSR with GLRR and RER classical routing protocols. In this experiment, there are 400 nodes deployed randomly in the network size area, and source node S and destination node D locates at (0, 0) and (0, 200), respectively. The link reliability in RER is set to 0.8, while the target link quality in GLRR is set to 0.9. To explore the impact of broadcasting range bR and determine the appropriate bR , the source node will broadcast messages by various broadcasting ranges, as indicated in Table 1. As shown in Fig. 6, PDR increases gradually as bR rises from 20 to 100 m, for the three routing protocols. When bR > 100 m, there is declining trend of PDR for all routing protocols, and the PDR in ENSR outperforms both GLRR and RER.
With the growth of bR , the stable forwarding path length in GLRR increases and this may increase the retransmission times to guarantee the local reliability of the node according to the target link quality, which further affects the PDR in data transmission. The RER employs hop-by-hop retransmission acknowledgment and reliable energy cost based on distance (RECBD) metric to guarantee the reliability in data transmission for each hop. Consequently, when the broadcasting range increases, the average hop count and RECBD increases subsequently, thus the length of the stable forwarding path increases, which affects the PDR in data transmission.
The energy efficiency is considered in ENSR protocol. When the length of the stable forwarding path increases as bR increases, hop counts decreases and residual energy increases that leads to high link energy cost quality, and thus reduces the network overhead and improves the PDR . When bR exceeds 100 m, the global node stability for all the routing protocols could not be guaranteed in data transmission.

Impact of node density
In this section, the impact of node density on PDR is verified. The number of nodes in the network size area as indicated in Table 1, the broadcasting range bR is set to 100 m, and source node S and destination node D locates at (0, 0) and (0, 200), respectively. Figure 7 shows PDR under different number of nodes. As the number of nodes increases, the network node density increases, thus improves the PDR . The RER has the lowest PDR , which is only 85.5% at maximum. The PDR of GLRR is slightly higher than that of RER , whereas the PDR of ENSR is the highest, with a maximum value of 95.2%.
As shown in Fig. 7, the ENSR achieves almost 27.82% and 58.24% enhancement in PDR over GLRR and RER , respectively, when the node density ranges from 200 to 1200 nodes. Due to the increasing of nodes densities, change of stable nodes over time increases, which balances and conserves node energy consumption, and thus increases PDR.

Network efficiency
In this section, three performance metrics are considered to quantify the network efficiency: (1) Network Overhead Ratio (NOR) : The number of transmitted packets per node, i.e., the ratio of the total number of forwarding packets through the optimal path to the number of nodes on that path. (2) Energy Consumption Ratio (ECR) : The ratio between total energy consumed in the network to the number of data packets successfully transmitted to the destination node. (3) Average Time Delay (ATD) : The average time to send a packet from the source node to the destination node. The ATD includes both the times required to find the stable nodes and the time for path construction to send packets successfully from source to destination.

Network overhead ratio (NOR)
Two experiments are implemented to assess the performance of NOR on the optimal stable path according to the number of nodes and the broadcasting range bR.
In first experiment, the simulation is designed to evaluate the impact of NOR , according to the broadcasting range bR , on the optimal stable path. There are 400 nodes deployed randomly in the network size area, and source node S and destination node D locates at (0, 0) and (0, 200), respectively. The link reliability in RER is set to 0.8, while the target link quality in GLRR is set to 0.9.
It is shown from Fig. 8 that the NOR in the three routing protocols increases gradually as bR increases, and which in ENSR is much less than that in GLRR and RER . As the broadcasting range bR increases, encounters between nodes gradually become more frequent, and more nodes will be shared in forwarding the packets, which incurs greater NOR in the network. It is also shown that ENSR outperforms GLRR and RER , and consumes 26.30% and 48.20% less NOR than both of them, respectively.
The reason is that both GLRR and RER attempts to guarantee the node's local reliability, according to the target link quality in GLRR or the link reliability in RER , by increasing the retransmission times between the neighboring nodes, which results in a higher NOR directly. It is also shown that GLRR performs better than RER . The reason is that GLRR adopts high link quality to reduce the PRT between neighboring nodes, which decreases NOR . However, in the proposed ENSR protocol, the PRT can be calculated accurately according to (13), which significantly decreases the network overhead, and thus incurs less NOR than in GLRR and RER.
In second experiment, the number of nodes in the network size area as indicated in Table 1, the broadcasting range bR is set to 100 m, and source node S and destination node D locates at (0, 0) and (0, 300), respectively. The link reliability in RER is set to 0.9, while the target link quality in GLRR is set to 0.9. The impact of node density on NOR is explored in this experiment. As shown in Fig. 9, the NOR in the network increases with the growth of node density.
As the number of nodes increases, the connectivity of network is enhanced and the PRT between adjacent nodes becomes greater for the same stable forwarding path length, which incurs more NOR . It is also shown that ENSR outperforms GLRR and RER , and consumes 34.23% and 56.34% less NOR than both of them, respectively. In the proposed ENSR protocol, the PRT can be calculated accurately, which significantly decreases the network overhead, and thus incurs less NOR than in GLRR and RER.

Energy consumption ratio (ECR)
Two experiments are implemented to assess the performance of ECR on the optimal stable path according to the number of nodes and the broadcasting range bR.
In first experiment, there are 400 nodes deployed randomly in the network size, and source node S and destination node D locates at (0, 0) and (0, 300), respectively. The link reliability in RER is set to 0.9, while the target link quality in GLRR is set to 0.9. It is shown from Fig. 10 that the ECR in the three routing protocols increases as bR increases, and which in ENSR is less than that in GLRR and RER.
In RER , when bR increases, the length of the stable forwarding path increases and therefore the RECBD increases subsequently, which increases the ECR . In GLRR and ENSR , the growth of bR increases the lengths of the stable forwarding paths and then the packets are forwarded by more nodes, thus increasing ECR.
In second experiment, the number of nodes in the network size area as indicated in Table 1, the broadcasting range bR is set to 100 m, and source node S and destination node D locates at (0, 0) and (0, 300), respectively. The link reliability in RER is set to 0.9, while the target link quality in GLRR is set to 0.9. The impact of node density on energy consumption is explored in this experiment. As shown in Fig. 11, the ECR in the network increases with the growth of node density. As the number of nodes increases, more nodes will cooperate in forwarding the packets of the same stable forwarding path length, resulting in more ECR.
It is worth noting that the energy consumption reduction, using the ENSR protocol in both cases, is also due to that the change of stable nodes over time balances and conserves node energy consumption.

Average time delay (ATD)
Two experiments are implemented to assess the performance of ATD on the optimal stable path according to the number of nodes and the broadcasting range bR.
In first experiment, there are 400 nodes deployed randomly in the network size, and source node S and destination node D locates at (0, 0) and (0, 200), respectively. The link reliability in RER is set to 0.9, while the target link quality in GLRR is set to 0.9. The experiment results of the ATD can be obtained under different broadcasting range bR.
From Fig. 12, it is shown that the ATD decreases as bR increases in the three routing protocols, and which in ENSR is less than that in GLRR and RER . It is also observed that ENSR can decrease the ATD by approximately 4.13% and 13.49% compared to GLRR and RER , respectively. The results illustrate that GLRR and ENSR show nearly the same performance under a low broadcasting range and that RER has the highest ATD.
The performance of the three routing protocols becomes better as the broadcast range increases, and RER remains worse than the other routing protocols. As the broadcasting range bR increases, encounters between nodes gradually become more frequent, the number of effective intermediary hops is decreased and packets can be forwarded between nodes more quickly. Thus, the delivery of packets increases successfully; thus, it decreases the number of retransmissions and hence decreases the transmission ATD.
In second experiment, the number of nodes in the network size area as indicated in Table 1, the broadcasting range bR is set to 100 m, and source node S and destination node D locates at (0, 0) and (0, 300), respectively. The link reliability in RER is set to 0.9, while the target link quality in GLRR is set to 0.9. The impact of node density on ATD is explored in this experiment. As shown in Fig. 13, the ATD in the network decreases with the growth of node density for the three routing protocols, the PDR in ENSR outperforms both GLRR and RER.
It is observed that ENSR can decrease the ATD by approximately 6.46% and 18.23% compared to GLRR and RER , respectively. As the number of nodes increase in the network, the chances of meeting and cooperation between the nodes become easier and the data transmission time between them decreases, which reduces the ATD.

Conclusions
In this paper, a proposed efficient node stable routing ( ENSR ) protocol is introduced to guarantee the stability of transmission data between the source and destination nodes, in a dynamic WSN conditions. The stability of the node is defined in both the global and local aspects of stability. The stable node is explored by introducing the stable betweenness centrality and switching packets based on the locality dependency energy degree to guarantee the global and local stability of the node, respectively. The packet retransmission times is taken into account, where the accurate calculated packet retransmission times decrease the extra overhead of the network.
The proposed routing algorithm guarantees the energy conserving factor and mitigates "hot spots", by changing the stable nodes over time. Simulation analysis is provided to advocate the effectiveness and flexibility of ENSR , and it is proved that ENSR can choose almost optimal stable routes related to significant network efficiency and network reliability. Moreover, the results of the simulation show that the proposed stable routing protocol greatly reduces overhead routing, and behaves better than the existing classic routing protocols in terms of network efficiency and network reliability.
One of the future works is to examine the efficiency of the proposed routing protocol to guarantee the reliability of data transmission under network breakdown. The WSN will be exposed to two types of attack, one of which is intentional for stable sensor nodes and the other is random. The efficiency of the routing model will be studied to make the network more reliable through joint cooperation between the sensor nodes. This will avoid losing a lot of energy as a result of this attack and disconnecting some nodes from the network. The purpose of this design will be to ensure the ability of the model to continue transferring data through the network with high reliability in exceptional circumstances.