Communication performance optimization of coal mine goaf LoRa AD hoc network sensor system based on tree topology

Real-time accurate monitoring of goaf gas, temperature, and other parameters is of key significance for the prevention and control of spontaneous coal combustion in the goaf. In this paper, a tree network and communication protocol for LoRa technology are proposed to solve the problems of small communication coverage and short endurance of the traditional goaf wireless monitoring system. In this paper, a geometric topology structure is designed for wireless sensor nodes to find relay nodes through the path loss model, and an energy-saving optimization algorithm routing scheme is designed. In addition, LoRa AD hoc network experiment platform and upper computer system are developed and designed. Through numerical analysis and experimental results in coal mines, it is proved that the proposed method significantly reduces the energy consumption of the whole network. The coverage radius is increased by 300% compared with the traditional star wireless sensor system, which makes the endurance time and communication quality have higher reliability.


Introduction
There are many kinds of coal mine disasters.As the main disaster during coal mining, mine fire seriously threatens the safe and efficient mining of coal mines [1] .It is of great significance for accurate and efficient monitoring of goaf gas temperature and other parameters to make early warning and timely measures for spontaneous coal combustion and to effectively prevent disasters and ensure the safety and efficient production of coal mines [2] .At present, coal spontaneous combustion monitoring methods are mainly beam tube gas measuring systems and optical fiber temperature measuring systems [3,4] .However, limited by the arrangement of beam tube and optical fiber, it is difficult to obtain comprehensive monitoring of the state information between the two roadways in the goaf.The wireless sensor node has the characteristics of small size and low cost.It can be placed behind the hydraulic support at any time to monitor important fire warning parameters such as gas concentration and temperature in the central goaf [5,6] .
Traditional LoRa topology is based on a star network.The connection between the node and the network base station is a single-hop network based on ALOHA protocol [7] .Current research has introduced adaptive data rate (ADR) to optimize data rate, airtime, and power consumption, but such an approach has instability problems in dense, highly variable wireless environments.In the underground goaf, the caved gangue poses a high challenge to the penetration of wireless communication.The single-hop network is difficult to realize the deep monitoring of the goaf, and the node has the risk of unexpected offline, which damages the stability of the network [8] .At present, most of the research on optimizing LoRa energy consumption is carried out without modifying the physical layer of the protocol.The routing strategy in multi-hop LoRa communication is subject to the objective function, especially when seeking maximum throughput and the minimum number of base stations [9] .Therefore, a new wireless transmission mode is needed to solve the pain point of online monitoring of coal spontaneous combustion prevention in the goaf.
Based on this, this paper proposes to use LoRa communication technology and design a multi-hop routing scheme.Through the tree topology network structure, nodes automatically find nodes with an appropriate distance in the direction of the base station for relay communication.Compared with the traditional star network, the tree multi-hop network protocol proposed in this study based on LoRa communication technology can efficaciously settle the problems of high energy consumption, low coverage, and poor communication reliability of the wireless sensor in the goaf.It can improve the coal spontaneous combustion monitoring system in the goaf.

Path loss model
Communication capability depends on path loss, transmitting power and receiving sensitivity.Due to the influence of temperature, environment and weather conditions, it is difficult to establish a perfect path loss model.In this study, a common log-distance path loss model is adopted [10] , as shown in Equation ( 1) where  is the reference distance,   is the average path loss at a distance,  is the path loss parameter, and  (dB) is a random variable with a Gaussian mean of zero, reflecting the stochastic attenuation caused by smooth fading.Considering  , the path loss abides by a normal distribution with  variance.This results in a lognormal distribution of the received power.For problems of fast fading and multipath propagation, the received power is modeled using Rayleigh distribution or Ritchie random variables.Data can be transmitted successfully only when the received power captured by the receiver exceeds the receiving sensitivity threshold.

Algorithm strategy and routing scheme of star topology
In the star topology network, each node communicates directly with the base station, that is, the single-hop network, and the coverage of the network is determined by the transmission capacity of a single node.In the star topology network, N nodes are randomly distributed around the base station.The parameter settings of each node are determined by the distance between the node and the base station.The algorithm proposed in this paper to minimize the energy consumption of each node in the star network is as follows.
(1) According to the above equation, the distance between the node and the base station is used to calculate the path loss.
(2) According to the limited conditions in Equation ( 2), all configurable parameters such as bandwidth, expansion factor (SF), and transmission power are brought in to calculate the power consumption.
where E TX is the transmission energy, P TX is the transmission power, t TX is the transmission time, P RX is the received power, and   is path loss at distance d.The ability of the LoRa base station to receive information depends on the bandwidth and SF Settings.A larger SF will increase the intensity of signal reception, while a larger bandwidth will decrease the intensity of signal reception.
(3) The minimum energy consumption is compared and calculated, and the bandwidth, SF, and transmission power of each node are recorded in this case.
The algorithm can determine the parameter settings of each node separately (Figure 1).Due to the discrete choice of parameters, the energy consumption of each node is piecewise constant, so the average energy consumption per packet of the LoRa star network is as follows.

Tree topology algorithm strategy and routing scheme
In this paper, the characteristics of a typical LoRa WSN are considered, and a routing scheme is designed (Figure 1).
(1) Multiple nodes send their data to the nodes in the direction of the base station, and each layer node sets a certain delay to wait for distant nodes to upload data.This may add a few seconds of network latency, but this is not a problem in the coal mine application scenario.
(2) Sensors are usually static, but the base station moves according to the movement of the working face, so the routing scheme needs to be continuously evaluated.
(3) As the number of sensors is large, the average energy consumption of the network calculated by the model is more in line with reality.
(4) Reducing energy consumption is the main goal; therefore, a node only uses the nodes between it and the base station for relaying.

Tree topology algorithm geometric topology design and energy consumption calculation
Many factors, such as node distance, link stability, and packet size, will affect the performance of the LoRa network.In this paper, the following model is set in the polar coordinate system.It is supposed that the base station is located at the origin (0,0), and N nodes r, φ are randomly and evenly distributed in the circular region, where    . is chosen based on the LoRa communication range, and  is a lower bound to prevent nodes from being placed very close to the base station while ensuring that the number of relays between nodes is not excessive.Thus, the nodes are scattered with size     .So, the polar distribution looks like this: Figure 1.Star and tree topology routing algorithm flowchart In the tree topology, in order to make nodes cooperate in transmission and avoid nodes moving away from the base station for long-distance transmission, the following schemes are designed: First, parameters 0  1 and 0   are determined.Then, for the polar coordinates (r*, φ*) on each node V *, regional    *  and |  * |  are considered.Therefore, this region is a circular sector with a maximum radius r^* α at the central angle 2θ around the base station (Figure 2).More specifically, V*'s relay node is the node closest to V* in the region, and if there are no nodes in the region, V* sends data directly to the base station.
The strategy of this paper is that V* sends all its data packets to A relay node in the direction of the base station in this area.If there are no nodes in this area, V* is directly sent to the base station; if there are multiple nodes in the area, the distant node is preferentially selected (node B rather than node A is preferred in Figure 2).As shown in Figure 2, A 1 , O A , O B , B 1 is described in the area of boundary point (   *  and |  * | ), the area A 1 , O A , O B , B 1 radial is divided into K narrowband I 1 , I 2 ..., I K (K≥1).The area of I is θ  *   , and the probability that there are no nodes in this region is as follows: The energy required by a packet to transmit from V* to the base station is the sum of the energy required by the packet from V* to the relay node and from the relay node to the base station.Of course, the relay node may also use other relay nodes during this process.Due to the relay node being located in one of the narrow bands, the upper limit | *  | is set and the distance between V* and I i is calculated.Further, set   is the average energy consumption of nodes in each narrow band.The mean represents the remaining i node energy consumption.Next, the upper bound of   is determined first, and then the average over r is calculated.We can limit the   * value by plugging in the upper bound.

Comparison of energy consumption between star topology and tree topology
It is a complex problem to precisely derive the energy consumption of the aforementioned star and tree topologies.So, MATLAB is used to perform numerical calculations of the two routing algorithms.
Figure 3. Relationship between θ and α and percentage improvement of energy consumption 100 nodes were set for the network during the calculation.Figure 3 shows the percentage increase in energy consumption of the tree relative to the star topology under different θ and α.The energy consumption improvement percentage % , ,  is shown in Equation ( 14).Numerical results show that a tree with 100 nodes can achieve up to 79.68% (α=0.94,θ=38•) energy consumption improvement over a star network by applying the proposed tree algorithm.Given the upper limit of energy consumption set in the model, it is expected that the improvement in energy consumption would be even better in practice if the upper limit were further raised.

Downhole single-node communication distance and penetration test
The spread factor, bandwidth, and other parameters of the sensor LoRa module are adjusted to the best so that the node works in the balanced mode.In the goaf of 7436 working face in Kongzhuang Coal Mine, a single sensor node is arranged to send and receive 200 packets of data respectively at the

Downhole multi-node coverage test
The test results of the packet loss rate of the system communication at different distances are shown in Figure 4. Within a 20 m distance, the packet loss rate of the network is less than 2%; over a 30 m distance, the packet loss rate increases significantly.When the distance increases to 100 m, the packet loss rate reaches 78.5%, and the communication capability is basically lost.In other words, the effective communication distance of the LoRa single-hop network in the goaf is usually limited to less than 20 m.After advancing 80 m in the working face, a total of 58 nodes are laid in the gob, of which 6 nodes are offline, but the system communication remains stable.The data of 9 nodes in the initial 10 nodes are effectively transmitted, which indicates that the effective communication range of the LoRa communication system based on this tree network is 80 m in the mine.Compared to the star-shaped single-hop network, the effective communication distance of 20 m is improved by 300%.A closed air chamber is designed, and the wireless node is placed in the air chamber.In order to simulate the real process of spontaneous coal combustion in goaf, CO standard sample gas of 25 ppm, 50 ppm, 100 ppm, 200 ppm, 500 ppm, and 2000 ppm are respectively injected, and each concentration is sampled 20 times.The time required for the upper computer to display data and display value to reach 90% of the sample gas is recorded.

Error and response time test
The concentration monitoring data of standard gas by the wireless sensor is shown in Figure 6.When the concentration is 25 ppm, the average error is 0.95 ppm.At 2000 ppm, the mean error is 7.21 ppm.The results show that with the increase of the measured gas concentration, the average error value also increases.The reason is that the error is generated by the adsorption characteristics and response characteristics of the sensor probe device itself to the gas molecules.At the same time, the uneven distribution of gas molecules in the gas chamber space will also affect the accuracy of measurement.The average error value and percentage of error change with the concentration of the measured gas, as shown in Figure 7.The average error value increases with the increase of the concentration, but the percentage of error decreases with the increase of the concentration on the whole.When the concentration of the measured gas is 25 ppm, the error is 3.81%; when the concentration of the measured gas is 2000 ppm, the error is 0.36%.The monitoring precision achieves the ideal effect.As shown in Figure 7, the higher the concentration of sample gas is, the shorter the response time is.Under the low concentration of 10 ppm, the response time can meet the requirements of practical application conditions within 5 s.

Conclusion
In this paper, the LoRa AD hoc sensor system is applied to the gob in the coal mine, and the optimization algorithm of a tree topology is designed so that each node can be used as a relay to effectively expand the coverage of the wireless sensor system.At the same time, the energy EEICE-2023 Journal of Physics: Conference Series 2625 (2023) 012059 consumption of each node of the wireless sensor network becomes more uniform to achieve the optimization effect of energy saving.The simulation and experimental results show that the effective coverage radius of the LoRa wireless communication system is increased by 300% compared with the traditional star topology.The energy consumption difference of each level node is less than 6%, and in a network of 58 nodes, each node is equipped with a 1470 mA battery, which can achieve 43 days of service life.The sensor system of the LoRa wireless network based on the tree network proposed in this paper effectively expands the monitoring range of the goaf.It has a good application effect and practical significance for monitoring the spontaneous combustion of coal in the goaf.On the other hand, the tree shaped LoRa proposed in this paper has certain prospects for application in underground space, complex shopping malls, industrial transportation, and other fields, which can effectively expand the coverage range and application scenarios of LoRa, while reducing the number of base stations and reducing the cost of Internet of Things hardware.

Figure 2 .
Figure 2. Trunk node search principle and search scope A recursive equation is used to associate   with nodes with smaller i and r values.The probability values involved in the assessment are as follows. & , ⋯ .1088/1742-6596/2625/1/012059 6 distance of 10 m, 20 m, 30 m, 50 m, and 100 m from the gateway, and the packet loss rate of communication is calculated.

Figure 4 .
Figure 4. Packet loss rate test of system communication at different distances Figure 5. Goaf layout scheme of wireless network Using the tree topology provided for the Internet of Things working mode in Section 2 of this paper, greater coverage can be achieved while meeting downhole monitoring needs.The goaf layout scheme is shown in Figure 5.The length of the working face is 150 m, and the depth of the oxidation zone from the working face is 40~70 m.Considering the economy and referring to the single-node communication range determined in Section 3.1, the spacing of nodes is set at 10~20 m.With the advance of the working face, a random layout is carried out behind the frame.After advancing 80 m in the working face, a total of 58 nodes are laid in the gob, of which 6 nodes are offline, but the system communication remains stable.The data of 9 nodes in the initial 10 nodes are effectively transmitted, which indicates that the effective communication range of the LoRa communication system based on this tree network is 80 m in the mine.Compared to the star-shaped single-hop network, the effective communication distance of 20 m is improved by 300%.

Figure 6 .Figure 7 .
Figure 6.Monitoring data recording of standard gas by wireless sensor *  .Given that   is negative, it is impossible to transform   into a closed upper bound equation for   * because of the discreteness of E*.However, it is possible to evaluate numerically the upper bound   * by discretizing the domains.In addition, the average energy consumption of each node in the LoRa network with tree topology is calculated in Equation (13). *

Table 1 .
Instantaneous current acquisitionThe working state of the wireless sensor system is set as standby state (state A), single acquisition state (state B), acquisition and emission state (state C), and networking state (state D).The single acquisition status is once every 3 minutes, and the duration is 10 s.The acquisition and launch state are once 6 minutes, with a duration of 10 s; The networking status is updated once every 1 hour to adapt to node changes.The dynamic current displayed and recorded by the oscilloscope during operation is shown in Table1.The current under-node state ABCD is about 0.444 mA, 133.4 mA, 230 mA, and 128.5 mA.The energy consumption of 10 nodes is within 6% of the average value, and the energy consumption is relatively uniform.This experiment's power module capacity is 1470 mAh.According to the above working time by calculation, the battery power can support about 43 days of service time.