Optimal Data Routing Algorithm for Mine WSNs Based on Maximum Life Cycle

Coal mine shafts are narrow, the environment is complex and changeable, the wired monitoring system has poor scalability, complicated wiring, and high costs and maintenance costs. The use of Wireless Sensor Networks (WSNs) can effectively solve the defects of the wired system and improve the monitoring level. Node energy is the most valuable resource for WSNs deployed in the complex environment of coal mines. Due to the limited energy of sensor nodes, how to balance the energy consumption, extend the network lifetime and pursue the maximum resource utilization are the hot issues in WSNs research. Underground coal mines have narrow and long lanes, and WSNs are distributed in strips. Therefore, based on the existing research, this paper proposes that when sensor nodes are evenly deployed in narrow and narrow lanes, the node’s forwarded data volume and forwarded routing are dynamically adjusted to make nodes Energy consumption is balanced and network life cycle is maximized. The experimental simulation proves that the algorithm proposed in this paper is superior to other algorithms.


I. INTRODUCTION
Safe production is an eternal theme for the coal industry, a prerequisite for achieving sustainable and stable development of the enterprise, and a necessary guarantee for building a harmonious coal mine. The application of the safety monitoring system is real-time monitoring of the underground operating environment of a coal mine to ensure the safety of underground operations [1]. Coal mine underground roadway is a special limited space. Its environment is much more complicated than ordinary bridges and tunnels. The roadway is narrow, the ground and walls are rough, surrounded by coal and charcoal, as well as supports, dampers, power lines, etc.. In order to ensure safe and orderly production, comprehensive monitoring and monitoring of the underground is required. For example, the monitoring of the equipment operating status, the monitoring of harmful gases such as gas and carbon monoxide, the monitoring of the wind speed in the inlet tunnel, the monitoring of the water level in the underground pump house, the monitoring of the temperature and humidity The associate editor coordinating the review of this manuscript and approving it for publication was Peter Langendorfer. in the tunnel, etc. Different monitoring requires different types of sensors and different installation methods [2], [3].
At present, many mine safety monitoring systems are basically based on wired networks, with poor scalability, complicated wiring, high costs and maintenance costs, and easy to cause monitoring blind spots [4], [5]. With the development of technology and the development of wireless sensing technology, WSNs have developed rapidly. WSNs can monitor environmental information such as gas concentration, carbon monoxide concentration, downhole temperature and humidity in mines, and realize early warning of mine safety accidents, etc [6]. Compared with wired sensor networks, WSNs have the advantages of low cost, small node size, flexible deployment, ad hoc networking, and easy maintenance, and have been widely used in military, medical, agricultural and other fields [7]- [9]. The introduction of WSNs into the underground safety monitoring system can effectively solve the defects of the wired network system, improve the monitoring level, and lay the foundation for the future smart mine construction [10], [11].
The underground mine roadway is intricate and complicated with a narrow space. Its length is even up to several kilometers. The structure of the underground wireless monitoring system is shown in Fig. 1, and the topology of the roadway network is shown in Fig. 2.  WSNs system usually consists of task management nodes, sinks, and sensor nodes. Wireless sensor nodes are randomly deployed in the monitoring area, and they form a wireless connection network by self-organizing. The sensor nodes will directly or through other nodes jump and send the data sensed in the monitoring area to the sink [12]- [14]. The sink does not monitor the environment, but aggregates the data sensed by the sensor nodes for processing, and finally transmits it to the task management node. The sink node has strong data processing and storage capabilities, and sufficient energy and computing resources. It can communicate with all sensor nodes in the network and is a gateway to ensure that WSNs communicate with the Internet and satellites. Sometimes in order to monitor the needs, some relay nodes are deployed in WSNs to forward data without monitoring the environment. Relay nodes usually have relatively large energy, regardless of their energy consumption [15]- [17].
Sensor nodes not only sense data and process data, but also manage, store, and fuse data. Due to size constraints, sensors are often powered by small-capacity batteries. A typical sensor node consists of energy supply module, sensor module, processor module, transceiver module and related software [18], [19]. As shown in Fig. 3. The wireless sensor nodes are distributed in a strip shape along the roadway layout. They are large in scale and have hundreds or even thousands of detection terminals. The nodes transmit the data to the sink via multi-hopping. Due to the limited energy of sensor nodes, how to balance the energy consumption, extend the network lifetime and pursue the maximum resource utilization are the hot issues in WSNs research [20]- [22].
X. Bai and his team proposed a method to optimize the coverage in deployment, and studied the network coverage under the influence of node communication radius and network bandwidth, with a focus on the case where the node communication radius is much smaller than the network bandwidth [23]. But in fact, the roadway is narrow, only about 5 to 6 meters in width. And the communication radius of the sensor node is much greater than the width of the roadway. J. Lian and his team proposed Rectangular Network Deployment Algorithm(RNDA) in the mine. This method is able to give the nodes different initial energy. The further from the sink, the greater the initial energy is [24]. However, it is difficult to allocate different initial energy to a large number of sensor nodes. G.Z. Chen and his team studied the deployment of WSNs in the strip-shape region, suggesting it would be more energy efficient when beacon nodes are staggered along the two sides of the strip than deployed along the regional centerline [25]. T.T. Wang and his team proposed deploying the wireless sensor nodes in the roadway using Isosceles Triangle Deployment Algorithm(ITDA) to reduce the redundancy and the cost of node deployment when they studied the WSNs coverage in roadways [26].
In a coal mine WSN, ordinary nodes and base stations often use multi-hop routing to transmit information. Nodes close to the base station not only need to send the data collected by themselves, but also need to forward the data collected by the nodes farther away from the base station. Therefore, the energy consumption of nodes closer to the base station is fast, and there will be a problem of ''Energy Hole'' that die prematurely [27].
The ''Energy Hole'' occurring in the network is caused by the uneven energy consumption of the nodes. The sensor node that is closer to the sink consumes more energy to tranmit more data, resulting in energy running-out earlier. If the forwarding amount of data of the node is reduced, the energy consumption of the node will decrease under the condition of the same forwarding distance [28]- [32]. This paper studies how to adjust the forwarding data amount and forwarding distance of nodes when the sensor nodes are evenly deployed, so as to balance the node energy consumption and the extend the network lifetime. VOLUME 8, 2020 The mine roadway network is narrow, which requires the sensor nodes to transmit data to the sink one by one in a multi-hop manner from the node farthest from the sink [33], [34]. The closer the node is to the sink, the more data are received, the more data are transmitted, and the greater the energy is consumed. The nodes away from the sink transmit less data, consume relatively less energy, and have more residual energy. The amount of data sensed by the node is fixed. And only when the received data are reduced can the data to be transmitted be reduced. Therefore, adjusting the transmitting power of the node, increasing the forwarding distance, and transmitting the data to different nodes can help prevent a single node from receiving too much data. Although the increase of the forwarding distance will increase the energy consumption of the node, the network lifetime will not be reduced as long as its energy consumption does not exceed that of the node with the largest energy consumption in the network.

II. OPTIMAL FORWARDING ALGORITHM(OFA) A. MODEL
In general, sensor node has three main functions: perception of the surrounding environment, processing of data information, and communication with other nodes. There are two ways of communications: data transmission and data reception. The energy consumption distribution of the nodes is shown in Fig. 4. It can be seen from Fig. 4 that the sensor module and the processing module of the node consume relatively little energy, which is equivalent to the energy consumption when the wireless communication module sleeps. The node consumes the most energy when sending data, and the energy consumption is close when receiving data and when it is idle. It can be seen that the energy of the sensor node is mainly consumed by the transmission and reception of the wireless communication module and the interception of the channel. Therefore, how to reduce unnecessary message transmission and reception, and when no data is sent and received, make the node enter the sleep state in time In order to effectively use the energy of the nodes and extend the network life cycle, it is an important problem that the wireless sensor network needs to solve [35].
In order to facilitate the research of this issue, this paper focuses on the energy consumption of nodes during data forwarding, while the energy consumption of the perception of the surrounding environment and data processing are negligible. When using the node energy consumption model proposed by W.R. Heinzelman and his team [36], the energy consumption of the sensor node is as in (1).
where in, E t (d, l) refers to the energy consumption occurring in the node of transmitting l bit data to the position where is d away from the node, E r (l) represents the energy consumption occurring in the node of receiving l bit data. It can be seen from (1) that the energy consumed by the node of forwarding data is proportional to the amount of forwarded data and the forwarding distance. The farther the forwarding distance is, the greater the energy consumption is. The greater the amount of forwarded data is, the greater the energy consumption is. The energy consumed by the node to receive data is independent of the distance and is proportional to the amount of data. α refers to the energy consumed by the circuit when transmitting and receiving unit bit data, typically α = 50nJ /bit. ξ refers to the energy consumed by the amplifier circuit, usually ξ 1 = 10pJ /bit/m 2 , ξ 2 = 10 −3 pJ /bit/m 2 . d 0 refers to the distance threshold value, n represents the path loss index. When d < d 0 , n = 2, the free space consumption model is applicable. When d ≥ d 0 , n = 4, the multi-path fading consumption model is applicable. Assume that the length of the roadway is L, the width is w, the total number of the sensor nodes is N , the perceived radius of the node is R s , ITDA should be adopted. The nodes are sequentially numbered from near to far according to the distance from the sink, from 1 to N . The number of the sink is 0. When i > j, the node S i is defined as the predecessor node of the node S j , and the node S j is defined as the successor node of the node S i ; when i = j + 1, the node S i is defined as the direct predecessor node of the node S j , the node S j is defined as the direct successor node of the node S i . A multihop network can be formed between any sensor node and the sink. The network model is shown in Fig. 5, in which S 0 represents the sink. In the network model diagram, one node can transmit data to any successor node or transmit the data directly to the sink.
In a bid to facilitate the research, this paper makes the following assumptions: 1) The sink has enough energy to be fixed at one end of the roadway without any move and its energy consumption can be negligible; 2) The sensor nodes are identical; 3) The sensor node is deployed in the precise location; 4) The sensor node communicates with the sink via multihop transmission; 5) All data in the network flow from a node with a larger number to a node with a smaller number; 6) The monitoring area can be fully covered; 7) The network delay is neglected.

B. ALGLGORITH DERIVATION
The energy consumption of the node is obtained according to the network model structure. Nodes are deployed in ITDA, therefore, the horizontal spacing between nodes d is equal (including sink), then Then find the communication distance between any two nodes. Let the distance between any two nodes is wherein, (i + j) %2 = 0 refers to that the node S i and the node S j are deployed on the wall of the same side of the roadway. Let E ij represent the energy consumed in the node S i of transmitting data to the node S j , wherein N ≥ i > j ≥ 0. Then Assume D ij , i > j ≥ 0 represents that the amount of data transmitted by the node S i to the node S j . According to the node energy consumption model, 2) d ij ≥ d 0 For the node S j , D ij represents the amount of data transmitted by the node S i . Then, the total amount of data received by the node S j can be expressed as D j , then When j = 0, D j represents the amount of data received by the sink. Since all the perceptual data in the network are finally aggregated into the sink, the amount of data received by the sink in the unit time is equal to the total amount of data perceived by all nodes. Then, For any node S i , the amount of data it forwards is equal to the sum of the amount of data it perceives and the amount of data it receives. Then, Calculate the energy consumed by the node when receiving data according to the node energy consumption model.
The node S N is the node farthest from the sink, which is at the last part of the roadway, and does not receive data transmitted by other nodes. Therefore E r−N = 0. The node S 0 represents the sink, of which the energy consumption is not considered. To facilitate the research, let E r−0 = 0. For any node in the network, the energy consumption of receiving data is expressed as Let E i represent the total energy consumed by the node S i , then In order to maintain the balance of the network energy consumption, the energy consumption of each node must gratify (13).
Assume the initial energy of the node is E init , the life cycle of the network can be expressed as In order to maximize the network life cycle and obtain the highest energy utilization efficiency, the maximum value VOLUME 8, 2020 of should be calculated, while taking into account the constraints of (8), (9) and (13). Then the problem of how to obtain the network maximum life cycle becomes a nonlinear programming optimization problem with the node energy consumption balance as the constraint condition, as is shown in (15).
Calculate the maximum value of T via the penalty function method, and obtain D ij at the same time, which is the target node of the forwarding node and the corresponding data amount. By adjusting the forwarding distance and the amount of data of the sensor nodes, and keeping the network lifetime of each sensor node consistent, the overall energy consumption of the network is balanced and the utilization of nodes is improved.

III. EXPERIMENTAL SIMULATION
In order to verify the effectiveness of the data forwarding algorithm proposed in this paper, LINDO software was used for simulation experiments. The experimental parameters are shown in TABLE 1. The experimental data are from coal mine test base and field test. Assume that the data perceived by the node are uniformly generated. Among them, the value of d0 is obtained after many experiments.
According to Fig. 1, the sensor nodes are deployed on both sides of the roadway in ITDA. The sink and the first node are on the same side of the roadway with horizontal spacing between the nodes d = L/N = 500/25 = 20m. According to (3), the communication distance between any nodes can be calculated, and the target node of the forwarding node and the amount of forwarded data can be obtained through simulation.

A. DATA FORWARDING ANALYSIS
As shown in Fig. 6, the dot indicates the node that has forwarded data to the target node. As the figure shows, the nodes did not forward data one by one according to the node number when transmitting data. Most nodes would transmit 2-3 different successor nodes when transmitting data, and a few nodes close to the sink would transmit data directly to the sink. This forwarding method is beneficial to balance the energy consumption of the network.  The total distance of the nodes that are far away from the sink is greater than that of the nodes that are close to the sink. For the nodes that are farther away from the sink, the amount of data forwarded are relatively less. As the forwarding distance increases, the energy consumption of the network can be balanced. Fig. 8 indicates the amount of data forwarded by the sensor node and the total amount of data received from other nodes. As can be seen in the figure, the node that is far away from the sink receives no data because no node forwards data to it. The nodes near the sink have more data to forward and receive, which is consistent with Fig. 6. Based on Fig. 7 and Fig. 8, it can be seen that the nodes with long forwarding distance have relatively less data to be forwarded, and the nodes with short forwarding distance have relatively more data to be forwarded. And the balance of the node energy consumption is generally maintained. TABLE 2 indicates the forwarding target node of different sensor node and the amount of forwarding data.
As shown in Fig. 9, the life span of the network changes when the width of the tunnel is 5m, 6m, 7m and 8m. It can be seen from the simulation results that when the length of the roadway is constant, as the width of the roadway becomes larger, the life of the network decreases. When the width of the tunnel is constant, as the length of the tunnel becomes larger, the network life is also shortened. After the length of the roadway is greater than 400m, the decline of the network life cycle is slowed down, and the network lifespan corresponding to different roadway widths is not much different.
The width of the tunnel is 5m, 6m, 7m, 8m, and the length is 200m-1000m, which is increased by 200m. The impact on the average total length of the node data forwarding is analyzed. As shown in Fig. 10, when the length of the tunnel is constant, as the width increases, the average total distance of node data forwarding in the network becomes longer. When the width of the roadway is fixed, as the length of the roadway increases, the average total distance of node data forwarding in the network also becomes longer.

B. COMPARATIVE ANALYSIS OF DIFFERENT ALGORITHMS
At present, for the research on node uniform deployment based on network energy-saving, the clustering algorithm is mostly adopted. However, clustering algorithm is more suitable for the case where the node density is relatively large. When the sensor nodes are evenly deployed in the roadway, the distance between the nodes is farther. Therefore, the clustering algorithm is not suitable or effective.  Therefore, in general, data forwarding between nodes still adopts the way of one-by-one hop.
In addition to ITDA for the node uniform deployment, RNDA and Linear Bipartite Deployment Algorithm(LBDA) are also applicable [37], [38]. The following part will compare the forwarding optimization algorithm based on energy balance proposed in this paper with the traditional continuous forwarding algorithm. All algorithms use the same node energy consumption model and experimental parameters. VOLUME 8, 2020   Fig. 11 indicates the network life cycles of the four algorithms through experimental simulation. It is obvious from the figure that the node data forwarding optimization algorithm proposed in this paper has the longest network life cycle, and the network life cycle of the uniform deployment algorithm is relatively short. In the same case of adopting ITDA, the network life cycle of the optimal data forwarding algorithm is more than three times that of the traditional continuous forwarding algorithms. The network life cycle of LBDA is almost the same as that of ITDA, which are all slightly less than that of RNDA. The main reason is, under the condition of the same roadway length and total number of nodes, RNDA is equivalent to LBDA of two parallel linear. Although the spacing of the nodes becomes larger, the amount of data forwarded by the nodes is relatively less, therefore, the energy consumption is reduced.

1) COMPARISON OF NETWORK LIFETIME
As shown in Fig. 12, the network life cycle of the four data forwarding algorithms has decreased significantly with the increase in the length of the roadway when the node sensing radius, roadway width, and the total number of sensor nodes remain unchanged. However, the network lifecycle of OFA Higher than the other three algorithms. Therefore, it is shown that the OFA forwarding algorithm makes the roadway network life cycle longer.  Under the condition that the width and length of the roadway are unchanged, change the induction radius of the node and analyze the change of network life under different deployment strategies. On the premise of satisfying the full coverage of the roadway, the length of the roadway is 200m and the width is 5m. As shown in Fig. 13, with the same length and width of the roadway, as the induction radius increases, the network life also extends. Under any induction radius, the network life of OFA algorithm is higher than the other three algorithms. At the induction radius of 40m, the network life trend line of each algorithm rises significantly because the distance between nodes is greater than the distance threshold, and the node energy consumption calculation is caused by the transition from the free space consumption model to the multipath fading consumption model.

2) COMPARISON OF LIFE OF DIFFERENT NODES
When nodes are deployed evenly in WSNs, the continuous forwarding algorithms make the energy consumption of the nodes unbalanced. The node closest to the sink runs out of energy firstly, causing network interruption and generating ''Energy Hole''. Fig. 14 indicates the lifetime of nodes at different locations under various algorithms. The algorithm proposed in this paper is an algorithm based on network energy balance. Therefore each node consumes the same amount of energy, runs out of energy at the same time, and has the same lifetime, which is showed in a horizontal line in the figure. For the other three algorithms, the spacing between the nodes is relatively shorter, the hopping distance is short therefore. The nodes away from the sink have lower energy consumption and longer lifetime. As the node is approaching to the sink, the amount of data forwarded by the node increases linearly, the energy consumption increases, and the node lifetime is getting shorter. For the three consecutive forwarding algorithms, although the lifetime of nearly half of the nodes is greater than that of the nodes in the forwarding optimization algorithm, their network life cycle depends on the lifetime of the node closest to the sink. Therefore, the network life cycles of these three algorithms are all less than that of the forwarding optimization algorithm.  Fig. 15 indicates the comparison of the residual energy of the nodes at different locations in the four algorithms. The energy consumption of node in the forwarding optimization algorithm is even. Therefore, there is no residual energy in the node. While most of the nodes in the networks of the other three algorithms have residual energy after they are terminated and the total residual energy of the three algorithms exceeds 50%. It can be seen from the figure that the residual energy of the nodes of the three consecutive forwarding algorithms decreases linearly as the nodes approach the sink. The maximum residual energy of a signal node is even as high as 90%. Only less than 10% of the energy is utilized, leading to an extremely low utilization rate and a great waste of resources.

3) COMPARISON OF RESIDUAL ENERGY FOR A SINGLE NODE
Through experimental simulation and analysis, the data forwarding optimization algorithm proposed in this paper is capable of calculating the maximum life cycle of the network by the nonlinear programming method, and obtaining the optimal forwarding distance and forwarding data amount of the node. Compared with the traditional continuous forwarding algorithms, the forwarding optimization algorithm greatly improves the utilization of nodes and prolongs the life cycle of the network in the case of uniform deployment of nodes.

IV. CONCLUSION
This paper studies the node routing algorithm of mine wireless sensor network based on the maximum life cycle. The energy consumption of the sensor node is mainly determined by the amount of data to be forwarded and the forwarding distance. When both are reduced, the energy consumption of the node is also decreased. The algorithm proposed in this paper is that, in the case of the uniform deployment of WSNs nodes, the nodes no longer forward data to the next node in the way of continuous hopping, but forward data to any successor nodes. Through the energy balance analysis and calculation, the optimal target node of the forwarding node and the optimal forwarding data amount can be obtained. In this way, the network energy consumption is balanced, the utilization of the node is improved, and the network lifetime is prolonged. Through experimental simulation analysis, compared with the currently prevalent uniform deployment algorithms, the algorithm proposed in this paper can achieve significantly longer network life cycle than that of other algorithms, the optimal node energy utilization, and almost no residual energy in nodes.
However, the energy consumption models and assumptions used in the research in this paper are under ideal conditions, and they do not consider the attenuation and delay caused by the interference of environmental factors in the actual node propagation signal, and the impact caused by the failure of the node. It will also be future research work.