*Article* **Efficient Graphical Algorithm of Sensor Distribution and Air Volume Reconstruction for a Smart Mine Ventilation Network**

**Yujiao Liu 1,2, Zeyi Liu 1,2, Ke Gao 1,2,\*, Yuhan Huang <sup>3</sup> and Chengyao Zhu 1,2**


**Abstract:** The accurate and reliable monitoring of ventilation parameters is key to intelligent ventilation systems. In order to realize the visualization of airflow, it is essential to solve the airflow reconstruction problem using few sensors. In this study, a new concept called independent cut set that depends on the structure of the underlying graph is presented to determine the minimum number and location of sensors. We evaluated its effectiveness in a coal mine owned by Jinmei Corporation Limited (Jinmei Co., Ltd., Shanghai, China). Our results indicated that fewer than 30% of tunnels needed to have wind speed sensors set up to reconstruct the well-posed airflow of all the tunnels (>200 in some mines). The results showed that the algorithm was feasible. The reconstructed air volume of the ventilation network using this algorithm was the same as the actual air volume. The algorithm provides theoretical support for flow reconstruction.

**Keywords:** mine ventilation network; wind speed sensors distribution; air volume reconstruction; independent cut set

#### **1. Introduction**

Coal is a primary energy source and plays a key role in economic development in many countries. In China, coal accounts for 40–45% of total carbon emissions [1]. Meanwhile, due to the unique working environment in coal mines, the requirements for safe operations are very high. The working environment affects the safety of those working in coal mines. Mining accidents could cause significant loss of life, as well as economic losses to a country. In 2020 alone, 573 Chinese miners died in 434 mining accidents such as leaks of poisonous gases, explosions of natural gases, and the collapsing of mine stopes, especially from underground coal mining [2]. An efficient and reliable ventilation system is essential for safe and efficient production of coal [3].

Intelligent ventilation is a development trend for coal mines and other types of mines. The Chinese National Development and Reform Commission and eight other ministries jointly issued *Guiding Opinions on Accelerating the Intelligent Development of Coal Mines* to improve the intelligence level of coal mines. A set of systems, including development design, geological guarantee, mining, transportation, and ventilation, are needed to achieve the goal of intelligent decision-making and automation systems operating collaboratively by 2025 [4,5]. Intelligent coal mining is to be fully realized by 2035 [6]. The reliable operation of mine ventilation systems is the basis for safe production in intelligent coal and noncoal mines. Intelligent mine ventilation is a new ventilation system that can be adjusted automatically on demand, which is the development trend of mine ventilation technology in China [7]. Proper monitoring of airflows for all tunnels plays a key role in the development of intelligent mine ventilation systems [8,9]. Airflow monitoring depends

**Citation:** Liu, Y.; Liu, Z.; Gao, K.; Huang, Y.; Zhu, C. Efficient Graphical Algorithm of Sensor Distribution and Air Volume Reconstruction for a Smart Mine Ventilation Network. *Sensors* **2022**, *22*, 2096. https:// doi.org/10.3390/s22062096

Academic Editors: Longjun Dong, Yanlin Zhao and Wenxue Chen

Received: 16 February 2022 Accepted: 4 March 2022 Published: 8 March 2022

**Publisher's Note:** MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

**Copyright:** © 2022 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https:// creativecommons.org/licenses/by/ 4.0/).

on sensors. Hu [10] studied the influence of wall roughness on wind speed distribution to improve the accuracy of monitoring. However, mine ventilation is a very complex network system involving hundreds or even thousands of tunnels. As shown in Figure 1, the Changcun coal mine in Shanxi province, China has 2061 tunnels. It may be impossible to install wind speed sensors in every tunnel due to the high installation and maintenance costs. Air monitoring was highlighted in the assessment of mine ventilation systems and air pollution to improve health and safety for miners [11]. Therefore, it is of great importance to economically determine the minimum number of wind speed sensors that can sample sufficient information to accurately reconstruct the whole network. Airflow reconstruction consists of well-posed reconstruction and underdetermined reconstruction. The so-called well-posed reconstruction is to reconstruct the airflows of the whole network with the minimum number of sensors when the number of sensors is sufficient. The underdetermined reconstruction is realized when the number of sensors is insufficient. The independent cut set algorithm is a well-posed airflow reconstruction algorithm.

A fully visual environment of ventilation parameters is very important to realize intelligent ventilation of mines. In order to visualize the air volume, an air volume reconstruction algorithm is proposed in this paper. In past studies, optimization and reconstruction technologies of sensor networks were widely used in flow monitoring [12], for the development of intelligent systems [13], and for leak location diagnosis for water [14–16], oil [17,18], and gas [19–21] pipeline networks. Singh et al. [22] proposed a method to identify ideal monitoring sites for water quality. Huang et al. [23] established a PSO-LSTM model to realize the identification of sources with abnormal radon exhalation rates. Castillo et al. [24] proposed a method of flow reconstruction by constructing a matrix of constraints to give bounds on the number of sensors required. In this method, the construction of a constraint matrix depends on all possible paths of the network. For complex networks, the measurement process in this method will also be very complex. The method was optimized to reduce the impact of network complexity [25]. However, the construction of a constraint matrix depends on the network path; although it has been optimized, the construction process is still very complex. Rinaudo et al. [26] proposed a minimum number of sensors arrangement method to determine the temperature. Although this method reduces the cost of monitoring, the measurement process is too complex. Balaji et al. [27] proposed a method to maximize sensor lifetime by activating sensor covers one at a time to monitor the whole network. This method mainly depends on the effective usage of available resources. Li et al. [28] put forward a novel method based on deep learning techniques and transfer learning to deal with large-scale missing data problems. Ng [29] proposed a method to calculate the number of sensors without depending on the path. He [30] developed an efficient algorithm to determine the smallest subset of links in a traffic network for sensor

installation. Muduli et al. [31] proposed a novel wireless sensor network deployment scheme for environmental monitoring in longwall coal mines, which provided the best area coverage and was very cost-effective. Automated ventilation system adjustment software has been developed by monitoring the air volume of the minimum remainder branch in the network, and all air volumes of the branches in the network can be obtained by inverse calculation of associated branches [32]. Song et al. [33] proposed a method for determining the changing trend of gas concentration in the goaf. Lyu et al. [34] proposed a gas concentration prediction method based on the ARMA model, the CHAOS model, and the encoder–decoder model (single-sensor and multisensor). Foorginezhad et al. [35] proposed advanced sensing systems utilized for relevant monitoring and recommendations for improving sensing accuracy.

Mine ventilation networks are similar to traffic networks on topology. Mine ventilation networks are high-order nonlinear systems [36]. In the literature, different approaches have been used for determining the minimum number of sensors needed to identify the location of a ventilation system's faults [37], such as the coverage of node flowrate method [38], the least full-coverage distribution method [39], minimum tree principle [40], tabu search (TS), Pareto ant colony algorithm (HPACA) [41], and the GA-DBPSO algorithm [42,43]. Changing the airflow in any one of the tunnels leads to changes in other associated tunnels. The sensitivity is used for measuring the airflow relationship between all the tunnels [44].

However, a mine ventilation system is a complex network, with different complexity levels in different areas. There are some problems with considering the accuracy to determine the minimum sensors' location and reconstruct the air volume of all tunnels in the mines. In this study, we aimed to solve the problems of sensor optimization and air flow reconstruction, and realize the air volume monitoring of the whole air network economically and effectively. In this paper, we propose an algorithm for the well-posed reconstruction of the airflow in a mine ventilation network. The algorithm is based on the structure of the underlying graph, and makes it possible to have a unique, optimized solution to the air volume of tunnels. Compared with other methods, this algorithm involves lower costs and a simpler process.

The rest of this paper is organized as follows. We state the problems we aimed to study, provide a theoretical analysis of our research, and explain some concepts that need to be used in Section 2. In Section 3, we introduce the methods of sensor location optimization and flow reconstruction. The above-mentioned methods are transformed into algorithms, and the specific calculation process is expressed by matrices and formulas, which are verified by taking a single-source and single-sink network as an example in Sections 4 and 5. In Section 6, we verify the algorithm by taking multisource and multisink network by the ventilation data of a coal mine. The main conclusions of this paper are given in Section 7.

#### **2. Problem Statement**

Our goal was to locate wind speed sensors so that the airflow of a ventilation network could be inferred from the measurements while minimizing the number of sensors used. We propose a well-posed flow reconstruction algorithm, which uses the flow conservation equations and breadth-first search algorithm to search the whole ventilation network, establish the equations, and then solve the airflow reconstruction problem.

#### *2.1. Possibility Analysis on Well-Posed Flow Reconstruction*

The correlation between the junction number and tunnel number was obtained, as shown in Figure 2. The junction number increases linearly with the tunnel number. This means that there is more mass conservation at the junctions as the tunnel number increases. For a mine ventilation network with a single sink and a single source, *m* − 1 mass conservation equations can be established for *m* junctions with a connecting sink and source as a virtual junction. There are *n* tunnels in the mine, and *n* unknown parameters, so *n* − *m* + 1 wind speed sensors are needed for the well-posed flow reconstruction if the sensors are set up accurately. Similarly, *n* − *m* + *k* − 1 wind speed sensors are used for multisinks and

a multisource network (*k* denotes the total number of the sinks and sources). The above analysis indicates that the minimum number of sensors needed for a well-posed solution may be under 100 when the tunnel number is less than 380, while more than 300 sensors need to be installed when the tunnel number is over 1500; 100–300 sensors are needed if the range of tunnel numbers is 380–1500, as shown in Figure 3. This shows that the calculation complexity is also affected by the network structure.

**Figure 2.** Correlation between the junction number and tunnel number.

**Figure 3.** The number of sensors required for well-posed reconstruction.

Figure 4 shows that the ratio of sensor to tunnel number (RST) for well-posed reconstruction is over 30% and even up to 63% when there are fewer than 150 tunnels in the mine, while the RST is below 30% when the tunnels number more than 150. The above data demonstrated that sensors in some mines can be set up for well-posed flow reconstruction where the RST is less than 30% or there are few tunnels. However, there will be no solution or multiple solutions for the reconstruction if the locations of sensors are inaccurate. Therefore, the installation locations of sensors are critical for flow reconstruction.

**Figure 4.** Ratio of sensor to tunnel number.

#### *2.2. Flow Conservation Equation*

Ventilation networks are represented by means of a directed graph:

$$G = (V, E),\tag{1}$$

where

*V* = {*v*1, *v*2, ··· , *vm*} corresponds to the set of junctions,

*m* is the junction number,

*E* = {*e*1,*e*2, ··· ,*en*} represents the set of tunnels, and

*n* is the tunnel number.

The out branches set is denoted as *E*+(*vi*), *vi*, *vj* <sup>∈</sup> *<sup>E</sup>*+(*vi*). The in branches set is denoted as *E*−(*vi*), (*vk*, *vi*) ∈ *E*−(*vi*). {*s*}, {*t*} are the set of the source junctions and the sink junctions, respectively. For any junction *v* ∈/ {*s*, *t*}, inflow equals outflow:

$$
\sum \rho\_{\bar{i}\bar{j}} q\_{\bar{i}\bar{j}} = \sum \rho\_{\bar{k}\bar{i}} q\_{\bar{k}\bar{i}}.\tag{2}
$$

A generalized equation of mass can be derived from Equation (2) and the algebraic sum of the tunnels' flow mass is *Qt* in any directed cut set of the network with sinks and sources:

$$SQ^T = \left(\sum\_{j=1}^n s\_{ij} q\_j\right)\_{s \times 1} = Q\_{t\_{\prime}} \tag{3}$$

where

*S* = *sij <sup>s</sup>*×*<sup>n</sup>* represents the directed cut set;

*s* is the cut set number;

*Qt* is the total mass of the network.

#### *2.3. Improved Breadth-First Search*

An exact mathematical model (i.e., a direct solution) may not be found for some problems. In this case, search methods are generally used to solve the issues, among which a breadth-first search (BFS) is the simplest method.

A BFS is one of the graph algorithms. The process is to search for every possible edge by traditional BFS; each junction can only be visited once. The basic idea is to start from a junction *v* in the graph. In turn, the graph is traversed in breadth first from the unreachable adjacent junctions of *v* until the junctions in the graph are connected with the paths of *v* visited. If any junctions in the graph are not visited at this time, the breadth-first traversal is performed again from a junction that has not been visited until all the junctions in the graph have been accessed.

Figure 5 is a ventilation network diagram of single source and single sink. It shows a schematic diagram of an independent cut set. If we launch a BFS from junction *v*<sup>2</sup> (the following access order is not unique, and the second point can be either *v*<sup>3</sup> or *v*4), we may get an access process as follows: *v*<sup>2</sup> − *v*<sup>3</sup> − *v*<sup>7</sup> − *v*8. We then go back to *v*3. We can get the access process as follows: *v*<sup>2</sup> − *v*<sup>3</sup> − *v*<sup>5</sup> − *v*<sup>6</sup> − *v*<sup>7</sup> − *v*8. For the same reason, we can go back to *v*2. We can then continue to search *v*<sup>2</sup> − *v*<sup>4</sup> − *v*<sup>6</sup> − *v*<sup>7</sup> − *v*8. The search is finished when all junctions are visited. The result of each BFS must be a connected component of the graph.

**Figure 5.** Schematic diagram of independent cut set. (Red line *A* represents cut line, and *I* and *O* represent source junction and sink junction respectively).

According to the analysis in Section 2.1, the spanning tree structure meets the requirements of well-posed reconstruction. Therefore, an improved breadth-first search (IBFS) method is proposed, based on the spanning tree structure instead of the whole network.

An IBFS is a search algorithm based on the spanning tree structure. The first step of an IBFS is to determine the spanning tree and sort the junctions and tunnels of the spanning tree. Then, all source and sink junctions of the spanning tree must be determined. The source junction is taken as the starting junction to start the search, and the incidence branches of the junction are searched. After searching all incidence branches, the search must be continued according to the previous step with the end junction of the incidence branch as the starting junction until the sink junction is searched. The previous junction must then be considered as the starting junction, and other branches are searched for. If there are no other branches, the retreat is continued until the starting junction with other

branches is found and the search is maintained. When all branches of the spanning tree are searched, the search ends.

Take Figure 5 as an example; *e*1,*e*2,*e*3,*e*4,*e*6,*e*9,*e*<sup>10</sup> form a spanning tree. If we launch an IBFS from junction *v*1, we may get an access process as follows: *v*<sup>1</sup> − *v*<sup>2</sup> − *v*<sup>3</sup> − *v*4. Because *v*<sup>4</sup> is a sink of the spanning tree, we need to go back to *v*2. The adjacent junction *v*<sup>3</sup> of junction *v*<sup>2</sup> has an incidence branch. The next search starts from *v*3. The process is as follows: *v*<sup>3</sup> − *v*<sup>5</sup> − *v*<sup>6</sup> − *v*<sup>7</sup> − *v*8. When all branches of the spanning tree have been searched, the search ends. The IBFS is the basis of our research on sensor optimization and air volume reconstruction. The following algorithms need to use IBFS.

#### *2.4. Definition of Single Junction Cut Sets*

In the directed graph *G* = (*V*, *E*), *vi* ∈ *v*, after deleting junction *vi*, all tunnels associated with *vi* from the graph cannot be connected. This is called a single junction cut set (*S* = *Dvi* ).

In Figure 5, *V* = {*v*1, *v*2, *v*3, *v*4, *v*5, *v*6, *v*7, *v*8} and *m* = 8. In other words, there are eight single junction cut sets in the directed graph:

$$\begin{array}{l} G = (V, E), \\ D = \{D\_{v\_1}, D\_{v\_2}, D\_{v\_3}, D\_{v\_4}, D\_{v\_5}, D\_{v\_6}, D\_{v\_7}, D\_{v\_8}\}, \\ D\_{v\_1} = \{e\_1\}, \\ D\_{v\_2} = \{e\_1, e\_2, e\_3\}, \\ D\_{v\_3} = \{e\_2, e\_4, e\_7\}, \\ D\_{v\_4} = \{e\_3, e\_5, e\_8\}, \\ D\_{v\_5} = \{e\_4, e\_5, e\_6\}, \\ D\_{v\_6} = \{e\_6, e\_8, e\_9\}, \\ D\_{v\_7} = \{e\_7, e\_9, e\_{10}\}, \\ D\_{v\_8} = \{e\_{10}\}. \end{array}$$

#### *2.5. Definition of Independent Cut Set*

A new concept called independent cut set is proposed. The source–sink matrix describes the ventilation flow in the mine. The source junction set is *I*, and the sink junction set is *O.* In the mine ventilation network *G* = (*V*, *E*), *I* ⊂ *V*, *O* ⊂ *V*, a cut *C* = (*S*, *T*) partitions *V* into two subsets, *S* and *T*. The cut set *A* of a cut *C* = (*S*, *T*) is the set {(*u*, *v*)*E*|*uS*, *vT*, *I* ⊂ *S*,*O* ⊂ *T*}, which is called the independent cut set. The independent cut set can divide the input and output junctions into two disjointed parts, which means that the removal of all edges disconnects all paths from the input to output junctions, as shown in Figure 5.

#### *2.6. Algorithm of Independent Cut Set*

An independent cut set search algorithm for a single-source, single-sink ventilation network was studied. The graph is described as:

*G* = (*V*, *E*), *E* = {*e*1,*e*2,......,*en*}, *n* = |*E*|, *V*= {*v*1, *v*2,......, *vm*}, and *m* = |*V*|.

The sources set is denoted by *I* ⊂ *V*, *I* = {*vi*|*E*−(*vi*) = 0}, where *O* represents the sink set, *<sup>O</sup>* <sup>=</sup> {*vi*|*E*+(*vi*) <sup>=</sup> <sup>0</sup>} <sup>⊂</sup> *<sup>V</sup>*. First, single-junction cut sets *Dv*<sup>2</sup> , *<sup>i</sup>* <sup>=</sup> 1, 2, ... , *<sup>m</sup>*, were obtained, such as *Dv*<sup>2</sup> = {*e*1,*e*2,*e*3} for the junction *v*2. A spanning tree that connects all junctions in the mine network without forming a cycle was created, including some tunnels on demand. The spanning tree was then changed to an undirected graph. The breadth-first search starts from the source junction *S* = *Dv*<sup>1</sup> . When it comes to junction *vb* in the spanning tree, the independent cut set is calculated by *S* = *S* ∪ *Dvb* − *S* ∩ *Dvb* . It was followed until the searching of all the junctions of the spanning tree was completed (see Figure 6).

**Figure 6.** Flow diagram for the independent cut set.

Take the network shown in Figure 5, for example; the network graph is: *G* = (*V*, *E*),

*E* = {*e*1,*e*2,*e*3, *e*4,*e*5,*e*6,*e*7,*e*8,*e*9,*e*10}, *n* = 10, *V* = {*v*1, *v*2, *v*3, *v*4, *v*5, *v*6, *v*7, *v*8}, *m* = 8, *I* = {*e*1}, *O* = {*e*10}. The spanning tree is: *T* = {*e*<sup>1</sup> ,*e*2,*e*3,*e*4,*e*6,*e*9,*e*10}. The single junction cut sets for every junction are: *Dv*<sup>1</sup> = {*e*1}, *Dv*<sup>2</sup> = {*e*1,*e*2,*e*3}, *Dv*<sup>3</sup> = {*e*2,*e*4,*e*7}, *Dv*<sup>4</sup> = {*e*3,*e*5,*e*8}, *Dv*<sup>5</sup> = {*e*4,*e*5,*e*6}, *Dv*<sup>6</sup> = {*e*6,*e*8,*e*9}, *Dv*<sup>7</sup> = {*e*7,*e*9,*e*10},

**No.** *va ek*∈〈*va***,***vb*〉∈*T S <sup>E</sup>* **Search |***Dvb***|** 1 *S*<sup>1</sup> = *Dv*<sup>1</sup> = {*e*1} 0 <sup>2</sup> *<sup>v</sup>*<sup>1</sup> *<sup>e</sup>*<sup>1</sup> ∈ *<sup>v</sup>*1, *<sup>v</sup>*<sup>2</sup> ∈ *T S*<sup>2</sup> = {*e*2,*e*3} *<sup>e</sup>*<sup>1</sup> *<sup>v</sup>*<sup>1</sup> → *<sup>e</sup>*<sup>1</sup> *<sup>v</sup>*<sup>2</sup> <sup>0</sup> <sup>3</sup> *<sup>v</sup>*<sup>2</sup> *<sup>e</sup>*<sup>2</sup> ∈ *<sup>v</sup>*2, *<sup>v</sup>*<sup>3</sup> ∈ *T S*<sup>3</sup> = {*e*3,*e*4,*e*7} *<sup>e</sup>*1,*e*<sup>2</sup> *<sup>v</sup>*<sup>2</sup> → *<sup>e</sup>*<sup>2</sup> *<sup>v</sup>*<sup>3</sup> <sup>1</sup> <sup>4</sup> *<sup>v</sup>*<sup>2</sup> *<sup>e</sup>*<sup>3</sup> ∈ *<sup>v</sup>*2, *<sup>v</sup>*<sup>4</sup> ∈ *T S*<sup>4</sup> = {*e*4,*e*7,*e*5,*e*8} *<sup>e</sup>*1,*e*2,*e*<sup>3</sup> *<sup>v</sup>*<sup>2</sup> → *<sup>e</sup>*<sup>3</sup> *<sup>v</sup>*<sup>4</sup> <sup>0</sup> <sup>5</sup> *<sup>v</sup>*<sup>3</sup> *<sup>e</sup>*<sup>4</sup> ∈ *<sup>v</sup>*3, *<sup>v</sup>*<sup>5</sup> ∈ *T S*<sup>5</sup> = {*e*7,*e*6,*e*8} *<sup>e</sup>*1,*e*2,*e*3,*e*<sup>4</sup> *<sup>v</sup>*<sup>3</sup> → *<sup>e</sup>*<sup>4</sup> *<sup>v</sup>*<sup>5</sup> <sup>0</sup> <sup>6</sup> *<sup>v</sup>*<sup>5</sup> *<sup>e</sup>*<sup>6</sup> ∈ *<sup>v</sup>*5, *<sup>v</sup>*<sup>6</sup> ∈ *T S*<sup>6</sup> = {*e*7,*e*9} *<sup>e</sup>*1,*e*2,*e*3,*e*4,*e*<sup>6</sup> *<sup>v</sup>*<sup>5</sup> → *<sup>e</sup>*<sup>6</sup> *<sup>v</sup>*<sup>6</sup> <sup>0</sup> <sup>7</sup> *<sup>v</sup>*<sup>6</sup> *<sup>e</sup>*<sup>9</sup> ∈ *<sup>v</sup>*6, *<sup>v</sup>*<sup>7</sup> ∈ *T S*<sup>7</sup> = {*e*10} *<sup>e</sup>*1,*e*2,*e*3,*e*4,*e*6,*e*<sup>9</sup> *<sup>v</sup>*<sup>6</sup> → *<sup>e</sup>*<sup>9</sup> *<sup>v</sup>*<sup>7</sup> <sup>0</sup> 8 *v*<sup>7</sup> *e*<sup>10</sup> ∈ *v*7, *v*<sup>8</sup> ∈ *T* 0

**Table 1.** The independent cut set of the graph in Figure 5.

*Dv*<sup>8</sup> = {*e*10}.

shown in Table 1.

#### **3. Methods of Location Optimization and Flow Reconstruction**

*3.1. Location Optimization of Wind Speed Sensors*

In order to study the minimum number and location of sensors that can completely recover the airflow in a mine network, an algorithm based on the topological structure of the network and the information was developed. The algorithm creates spanning trees and uses the IBFS, a well-known graph traversal algorithm, to search. The inputs of the algorithm on the location of wind speed sensors are the directed graph *G* = (*V*, *E*) and single junction cut set, while the output is the independent cut set. The procedures of the algorithm are as follows:

According to the flow diagram, the process of obtaining the independent cut set is as


#### *3.2. Flow Reconstruction Method by the Wind Speed Sensors*

According to the Chinese industry standards GB/T51272-2018 and AQ2031-2011, it is compulsory to install wind speed sensors in main return tunnels, the return tunnels of all mining areas, and the return tunnels of all sublevels. These tunnels are seen as cotrees for the spanning tree, which can be generated according to the cotrees by the Kruskal algorithm.

As shown in Figure 6, the independent cut sets can be searched by the spanning tree. There is a flow equation, Equation (3), for every independent cut set. Taking Table 1 as an example, seven flow equations can be set. *Qt* is the air volume of the main fan that must be monitored. It is assumed that *Qt* = 15, *Q*<sup>5</sup> = 4, *Q*<sup>7</sup> = 5, and *Q*<sup>8</sup> = 2.

$$\begin{cases} \begin{aligned} Q\_1 &= Q\_t \\ Q\_2 + Q\_3 &= Q\_t \\ Q\_3 + Q\_4 + Q\_7 &= Q\_t \\ Q\_4 + Q\_7 + Q\_5 + Q\_8 &= Q\_t \\ Q\_6 + Q\_7 + Q\_8 &= Q\_t \\ Q\_7 + Q\_9 &= Q\_t \\ Q\_{10} &= Q\_t \end{aligned} \end{cases} \tag{4}$$

Equation (4) is solved by the Gaussian elimination method. The air volume of the tunnels in the spanning tree is *Q*<sup>1</sup> = 15, *Q*<sup>2</sup> = 9, *Q*<sup>3</sup> = 6, *Q*<sup>4</sup> = 4, *Q*<sup>6</sup> = 8, *Q*<sup>9</sup> = 10, and *Q*<sup>10</sup> = 15.

#### **4. Algorithm Optimization of Sensor Location Problem**

In this paper, we propose an independent cut set algorithm for well-posed reconstruction of the airflow in a mine ventilation network; however, its process is too complex. For a large-scale ventilation network, the calculation amount and complexity are very large. In order to simplify the calculation process, the independent cut set algorithm can be optimized by matrixing the calculation process, i.e., all equations in the calculation process can be expressed by matrix. With the help of matrix characteristics, the sensor location problem can be calculated more quickly and intuitively. In addition, there is a mature calculation program for the matrix problem. It is more convenient to solve the matrix problem by computer than to directly solve the newly defined algorithm. Especially for large-scale network problems, faster and more accurate calculations can be made.

#### *4.1. Optimization of Single Junction Cut Set*

In order to more clearly represent the single junction cut sets, we can use the complete incidence matrix to express the single junction cut sets of each junction. The complete incidence matrix is a 0-1-(−1) matrix that describes the mine ventilation network structure through the spatial relationships between the tunnels and junctions of the network. Each column element of the matrix represents each tunnel of the mine ventilation network. Each row element denotes the junction. The matrix can be expressed as follows:

$$L\_{m \times n} = \begin{pmatrix} l\_{11} & \dots & l\_{1k} & \dots & l\_{1n} \\ \vdots & \ddots & \vdots & \ddots & \vdots \\ l\_{j1} & \dots & l\_{jk} & \dots & l\_{jn} \\ \vdots & \ddots & \vdots & \ddots & \vdots \\ l\_{m1} & \dots & l\_{mk} & \dots & l\_{mn} \end{pmatrix} \tag{5}$$

where *Lm*×*<sup>n</sup>* is the complete incidence matrix of the network of dimension (*m* × *n*) and *lij* is 0, 1, or −1. *lij* = 1 indicates that *ej* and junction *vi* are associated, and *ej* is the out branch of *vi*. *lij* = −1 indicates that *ej* is the in branch of *vi*. Through the definition of single junction cut sets, if branch *ej* and junction *vi* are associated, then *ej* belongs to *Dvi* . Therefore, *ej* is an element of *Dvi* when *lij* <sup>=</sup> 1. On the contrary, *lij* <sup>=</sup> 0 indicates that *ej* and junction *vi* are not related.

The matrix can be represented through a set of column vectors. *Lm*×*<sup>n</sup>* denotes the complete incidence matrix with *m* junctions and *n* tunnels, and can be expressed as follows:

$$L\_{\rm un \times n} = \left[L\_1 L\_2 \cdot \cdots \cdot L\_j \cdot \cdots \cdot L\_m\right]^T \,\,\,\,\,\tag{6}$$

where *Lj* is the *jth* row vector of dimension (1 × *n*). *Dvj* = *ek ek* <sup>=</sup> *<sup>E</sup> vj* , i.e., *Dvj* = *ek ljk* = 0 (*j* = 1, 2, ··· , *m*; *k* = 1, 2, ··· , *n*). *ek*, corresponding to all nonzero entries *ljk* in *Lj*, is the single-junction cut set corresponding to junction *vj*; that is, *ek* is all the elements of *Dvj* .

#### *4.2. Optimization of Independent Cut Set Algorithm*

In Section 2.6, it is revealed that the independent cut set is calculated by *S* = *S* ∪ *Dvb* − *S* ∩ *Dvb* , which is a equation related to the single junction cut set and independent cut set. From Section 4.1, we know the matrix form of the single junction cut sets *Dvj* , i.e., complete incidence matrix (see Equations (5) and (6)). Therefore, we can convert the solution process of the independent cut set into matrix form. An independent cut set–branch incidence matrix can be established to obtain the independent cut set of the ventilation network. The matrix can be expressed as follows:

$$S\_{m \times n} = \begin{pmatrix} s\_{11} & \dots & s\_{1k} & \dots & s\_{1n} \\ \vdots & \ddots & \vdots & \ddots & \vdots \\ s\_{j1} & \dots & s\_{jk} & \dots & s\_{jn} \\ \vdots & \ddots & \vdots & \ddots & \vdots \\ s\_{m1} & \dots & s\_{mk} & \dots & s\_{mn} \end{pmatrix} \tag{7}$$

where *Sm*×*<sup>n</sup>* is the independent cut set–branch incidence matrix of the network of dimension (*m* × *n*) and *sij* is 0 or 1. *sij* = 1 indicates that *ej* is a subset of the independent cut set *Si* at junction *vi*. *sij* = 0 denotes that *ej* does not belong to the independent cut set *Si* at junction *vi*. Compared with the complete incidence matrix, each column element of the new matrix still represents each branch of the ventilation network. However, row elements are expressed by independent cut sets *S*. In Section 4.1, the complete incidence matrix (see Equation (6)) is expressed as follows:

$$L\_{m \times n} = \begin{bmatrix} L\_1 L\_2 \cdots \cdot L\_j \cdot \cdots \cdot L\_m \end{bmatrix}^T.$$

Through the calculation formula of independent cut sets *S* = *S* ∪ *Dvb* − *S* ∩ *Dvb* , we can obtain the matrix expression:

$$\begin{cases} S\_{j+1} = S\_j + L\_{j+1} \\ S\_1 = L\_1 \end{cases} (j = 1, 2, \dots, m - 1),\tag{8}$$

where *ek* corresponds to all nonzero entries and *sjk* in *Sj* is the independent cut sets. According to Equation (8), we can obtain the matrix form of the independent cut set.

#### **5. Sensor Location and Flow Reconstruction Based on Algorithm Optimization**

*5.1. Sensor Location Based on Algorithm Optimization*

Take the network shown in Figure 5 as an example; according to Equation (1), the network graph is:

$$\begin{array}{c} G = (V, E); \\ E = \{\varepsilon\_1, \varepsilon\_2, \varepsilon\_3, \varepsilon\_4, \varepsilon\_5, \varepsilon\_6, \varepsilon\_7, \varepsilon\_8, \varepsilon\_9, \varepsilon\_{10}\}, n = 10; \\ V = \{\upsilon\_1, \upsilon\_2, \upsilon\_3, \upsilon\_4, \upsilon\_5, \upsilon\_6, \upsilon\_7, \upsilon\_8\}, m = 8. \end{array}$$

The junctions and tunnels have been sorted in Figure 5. The whole calculation process is carried out according to the IBFS. According to Equations (5) and (6), we can obtain the single junction cut set expressed by the matrix, that is, the complete incidence matrix of ventilation network *G* = (*V*, *E*). In order to facilitate the presentation of the row vector and column vector corresponding to each element of the complete incidence matrix, we show the complete incidence matrix corresponding to Figure 5 in the form of Table 2.


**Table 2.** The complete incidence matrix (corresponding to Figure 5).

The matrix can be expressed as *L*8×10. According to Equation (6), the form of its column vector is *<sup>L</sup>*8×<sup>10</sup> = *L*<sup>1</sup> *L*<sup>2</sup> ··· *Lj* ··· *L*<sup>8</sup> *T* . All nonzero entries in *L*<sup>1</sup> are the result of *Dv*<sup>1</sup> , that is, *L*<sup>1</sup> = {1000000000}; the first single junction cut set is *Dv*<sup>1</sup> = {*e*1}. Similarly, all nonzero entries in *L*<sup>2</sup> are the result of *Dv*<sup>2</sup> , that is, *L*<sup>2</sup> = {−1110000000}, and the second single junction cut set is *Dv*<sup>2</sup> = {*e*1,*e*2,*e*3}, etc. Through the matrix, we can easily obtain the single-junction cut sets of each junction, and the result conforms to the definition of single-junction cut sets.

In order to obtain the independent cut set, *L*8×<sup>10</sup> is substituted into Equation (8). The results are shown in Table 3.



The matrix can be expressed as *S*8×10. The form of its column vector is *<sup>S</sup>*8×<sup>10</sup> = *s*<sup>1</sup> *s*<sup>2</sup> ··· *sj* ··· *s*<sup>8</sup> *T* . All nonzero entries in *sj* are the results of the independent cut set. For example, *s*<sup>1</sup> = {1000000000} and the first independent cut set is *S*<sup>1</sup> = {*e*1}; *s*<sup>2</sup> = {0110000000} and the second independent cut set is *S*<sup>2</sup> = {*e*2, *e*3}; *s*<sup>3</sup> = {0011001000} and the first independent cut set is *S*<sup>1</sup> = {*e*3,*e*4, *e*7}, etc.

Through comparison, it can be seen that the results obtained through the matrix in Table 3 are consistent with those in Table 1.

#### *5.2. Flow Reconstruction Based on Algorithm Optimization*

In order to simplify the calculation process, the solution of the independent cut set is obtained by a matrix. Therefore, we can also express the calculation of Equation (3) by a matrix. According to Equation (3), the air volume in each tunnel can be denoted by air volume set *Q*, and its expression is as follows:

$$\boldsymbol{Q}^{\mathrm{T}} = \{\boldsymbol{Q}\_1 \: \boldsymbol{Q}\_2 \: \cdots \colon \boldsymbol{Q}\_n\}\_{\prime} \tag{9}$$

where *n* denotes the tunnel number and *Qn* represents the air volume of the *n*th tunnel. According to Equation (3), the following equation can be obtained:

$$SQ = Q\_{t\_{m \times 1} \prime} \tag{10}$$

where *Qtm*×<sup>1</sup> is the column vector of dimension (*<sup>m</sup>* <sup>×</sup> <sup>1</sup>), *Qtm*×<sup>1</sup> <sup>=</sup> {*Qt Qt* ··· *Qt*}*<sup>T</sup>*

In Figure 5, *S* = *S*8×<sup>10</sup> = [*s*1*s*<sup>2</sup> ··· *s*8] *<sup>T</sup>* and *<sup>Q</sup>* <sup>=</sup> {*Q*<sup>1</sup> *<sup>Q</sup>*<sup>2</sup> ··· *<sup>Q</sup>*8}*T*. It is assumed that *Qt* = 15, *Q*<sup>5</sup> = 4, *Q*<sup>7</sup> = 5, and *Q*<sup>8</sup> = 2. From Equation (10),


After simplifying the above formula, the following equation can be obtained:

$$\begin{array}{l} Q\_1 = Q\_t \\ Q\_2 + Q\_3 = Q\_t \\ Q\_3 + Q\_4 + Q\_7 = Q\_t \\ Q\_4 + Q\_7 + Q\_5 + Q\_8 = Q\_t \\ Q\_6 + Q\_7 + Q\_8 = Q\_t \\ Q\_7 + Q\_9 = Q\_t \\ Q\_{10} = Q\_t \end{array}$$

The air volume of the tunnels in the spanning tree is *Q*<sup>1</sup> = 15, *Q*<sup>2</sup> = 9, *Q*<sup>3</sup> = 6, *Q*<sup>4</sup> = 4, *Q*<sup>6</sup> = 8, *Q*<sup>9</sup> = 10, and *Q*<sup>10</sup> = 15.

#### **6. Case Study**

.

According to the standards AQ1028-2006 and GB/T 10178, the ventilation network is a fluid network formed by conveying air flow pipelines; various regulating facilities, power facilities, and air flow pipelines are connected. Figure 7 is the ventilation network of a coal mine run by Jinmei Co., Ltd. *G* = (*V*, *E*), where the tunnel number is |*E*| = 100, and the junction number is |*V*| = 71. Table 4 shows the whole tunnel's reconstructed air volume and simulated air volume. The test air volume [45] is obtained by a mine ventilation simulation system (MVSS) [46]. The principle of solving the network by MVSS is to establish the mathematical equations for the ventilation resistance law, the air volume balance law, the air pressure balance law, the known total air volume of the fans, and the ventilation resistance coefficient, and then solve them. The main fans are installed in *e*9, *e*39, and *e*78, and their characteristic equations are shown in Equation (11). For a multisource and multisink ventilation network, all sources and sinks should be connected to become a single-source and single-sink network. In a ventilation network, if the spanning tree is removed, the remaining part is called the cotree. As shown in Figure 8, 33 wind speed sensors are used for the network, including 30 cotrees and 3 wind shafts with fans. The tunnels that must be set up with wind speed sensors are *e*3, *e*9, *e*22, *e*28, *e*33, *e*39, *e*55, *e*68, *e*72, *e*76, *e*78, *e*84, *e*92, and *e*94. A spanning tree is generated that does not include the above tunnels (the magenta in Figure 8). Considering the difficulty of testing the lower wind speed, most of the cotrees should not contain the tunnels with structures such as throttles and confined walls. Based on the flow diagram in Figure 5, the air volume of the spanning trees can be calculated by the linear flow equation system of the independent cut sets.

$$\begin{cases} \begin{array}{l} H(q\_{\mathfrak{P}}) = 1932.25 + 44.84q\_{\mathfrak{P}} - 0.64q\_{\mathfrak{P}}^2 \\ H(q\_{\mathfrak{P}}) = 1932.25 + 44.84q\_{\mathfrak{P}} - 0.64q\_{\mathfrak{P}}^2 \\ H(q\_{\mathfrak{P}8}) = 1932.25 + 44.84q\_{\mathfrak{P}8} - 0.64q\_{\mathfrak{P}8}^2 \end{array} \end{cases} \tag{11}$$

**Figure 7.** A coal mine ventilation system used by Jinmei Co., Ltd. (Red indicates the position of air doors or wind windows, and black arrows indicate the exhaust air flow. Green is the incoming air flow as well as the fresh air flow. Each number indicates the junction number and tunnel number).


**Table 4.** Ventilation system of Jinmei coal mine.

The reconstructed air volume in Table 4 was obtained by the independent cut set algorithm. Similarly, the results obtained by the independent cut set algorithm followed the three basic laws of air volume distribution. Their basic principles are similar. We also used part of the test air volume as a known quantity for the calculation. Therefore, their calculation results should be the same; otherwise, they will prove that the independent cut set algorithm is incorrect. It can be seen from Table 4 that their results were exactly the same. It is feasible to use the independent cut set algorithm to determine the minimum number and location of sensors through the case study. By placing sensors on the cotrees, the air volume of the spanning trees can be obtained. Due to the uniqueness of the well-posed solution, the error of flow reconstruction is zero (see Table 4). There will be no errors or other solutions.

**Figure 8.** Coal mine ventilation used by Jinmei Co., Ltd. The magenta represents spanning trees and the blue represents cotrees.

Figure 5 is an example of a simple network with a single source and single sink, and Figure 8 is an example of a complex ventilation network with multiple sources and multiple sinks. Through the calculation of these two examples, it was found that the independent cut-set algorithm was suitable for both of the examples. Therefore, the independent cut set algorithm can be used to solve the sensor optimization and air volume reconstruction problems of all types of ventilation networks. In line with previous research, the calculation complexity was also affected by the network structure. Due to the uniqueness of the wellposed solution, the error of the result can only come from the measurement accuracy of the sensor and will not be affected by other factors. Moreover, the existing solution is unique and has no errors.

#### **7. Conclusions**

In this research, the wind speed sensor location problem of the mine ventilation network was solved by using the independent cut set algorithm, which is a new concept based on the structure of the underlying graph. Firstly, we found the problems: the sensor number was *n* − *m* + *k* − 1, and we located flow sensors in the cotrees that must be set up with sensors according to the Chinese standards. The calculation complexity was affected by the network structure. Secondly, we discussed the possibility of well-posed reconstruction based on the mine ventilation networks. Fewer than 30% of tunnels need to be set up with wind speed sensors to achieve a well-posed reconstruction of the airflow in all the tunnels if the mines have over 200 tunnels. For mines with fewer than 200 tunnels, more than 30% of tunnels should be installed with sensors. Due to the uniqueness of the well-posed solution, there is no error in the results unless the sensor accuracy does not meet the standard. Lastly, the algorithm of independent cut sets was presented for the well-posed reconstructions. The flow reconstructions were shown to be computationally efficient for the coal mine ventilation system used by Jinmei Co., Ltd. This algorithm

works on velocity sensor distribution rather than sensors of hazardous and combustible gas. This algorithm is a well-posed reconstruction algorithm. It can only be used to determine the minimum number and location of sensors and cannot solve the underdetermined reconstruction of a given number of sensors. Therefore, the premise of using this algorithm is that the number of sensors will be sufficient. This study provides researchers with a sensor optimization scheme when the number of sensors is insufficient and provides the possibility for air volume reconstruction. At the same time, it reduces the cost for the air volume monitoring of the whole air network and provides some theoretical support for the realization of intelligent ventilation. In the following research, we will discuss the sensor location under the condition of underdetermined reconstruction.

**Author Contributions:** Conceptualization, K.G.; writing—original draft preparation, K.G. and Z.L.; writing—review and editing, K.G., Z.L., Y.L., Y.H. and C.Z.; supervision, K.G., Z.L. and Y.L. All authors have read and agreed to the published version of the manuscript.

**Funding:** The work is supported by National Natural Science Foundation of China (No.52104194 and 52074148).

**Institutional Review Board Statement:** Not applicable.

**Informed Consent Statement:** Not applicable.

**Data Availability Statement:** The datasets generated and analyzed during the current study are available from the corresponding author upon reasonable request.

**Conflicts of Interest:** The authors declare no conflict of interest.

#### **References**

