## 2 Three-Dimensional Ray-Tracing Model
### Total Transmission Loss  
Due to the complex underground environment of coal mines, the wireless signal transmission process is subjected to rough loss and tilt loss caused by reflection, refraction, and scattering from the rough wall of the roadway and dielectric loss caused by reflection of lossy media such as dust and mist in the roadway. The shape and size of the roadway cause the signal pattern to attenuate; thus, the equation for total attenuation of the wireless signal in the roadway is:  
\[A_{total}=A_{r}+A_{t}+A_{a}+A_{E_{max}^{(\text{th})}} \tag{1}\]where \(A_{total}\) is the total loss of the wireless signal, \(A_{r}\) is the roughness loss, \(A_{t}\) is the tilt loss, \(A_{a}\) is the dielectric loss, and \(A_{E_{nm}^{(2n)}}\) is the mode attenuation loss. Based on waveguide theory, the attenuation equations for horizontally and vertically polarized waves are:  
\[ \begin{array}{l}A_{E_{nm}^{(k)}}=4.343\lambda^{2}z(\frac{m^{2}\varepsilon_{1} }{a^{2}\sqrt{\varepsilon_{1}-1}}+\frac{n^{2}}{b^{3}\sqrt{\varepsilon_{2}-1}}) \\ A_{E_{nm}^{(v)}}=4.343\lambda^{2}z(\frac{m^{2}}{a^{2}\sqrt{\varepsilon_{1}-1}}+ \frac{n^{2}\varepsilon_{2}}{b^{3}\sqrt{\varepsilon_{2}-1}})\end{array}  \tag{2}\]  
where \(m\) is the half wavenumber in the horizontal direction, \(n\) is the half wavenumber in the vertical direction, \(z\) is the distance from the transmitting end, and \(a\) and \(b\) are the width and height of the rectangular roadway, respectively. Assuming that the material of the roadway wall is the same and the distribution is even, i.e., \(\varepsilon_{1}=\varepsilon_{2}=\varepsilon\), and \(\tau=a/b\) represents the ratio of the width to the height of the roadway. Equation (2) can be rewritten as  
\[ \begin{array}{l}A_{E_{nm}^{(k)}}=4.343\lambda^{2}z\frac{m^{2}\varepsilon+n^{ 2}\tau^{3}}{a^{2}\sqrt{\varepsilon-1}}\\ A_{E_{nm}^{(v)}}=4.343\lambda^{2}z\frac{m^{2}+n^{2}\tau^{3}}{a^{2}\sqrt{ \varepsilon-1}}\end{array}  \tag{3}\]  
Figure 1: Three-dimensional ray tracing flowchart. Rough roadway walls can cause reflection, refraction, and scattering, which causes the outward diffusion of wireless signal energy and energy loss. The effect of roadway wall roughness on a wireless signal is given in Ref. [25]:  
\[A_{R}=8.636\pi^{2}\Delta h^{2}z(\frac{1}{a^{4}}+\frac{1}{b^{4}}) \tag{4}\]  
where \(\Delta h\) is the average roughness/height of the roadway. The tilt of the roadway wall converts a part of the energy of the main mode of the wireless signal, and the transmission of the main mode generates loss. Assuming that the tilt angle of the roof and sidewall of the coal mine roadway is \(\theta\), the expression of the tilt loss is rewritten as:  
\[A_{\rm t}=\frac{4.343\pi^{2}\theta^{2}z}{2\lambda}(\rm{m}+\rm{n}) \tag{5}\]  
In addition to the size factors of the roadway, the mode attenuation of the wireless signal is related to the medium used for the roadway. The electromagnetic characteristics of the medium used for the roadway mainly include the permittivity \(\epsilon\), magnetic permeability \(\mu\) and conductivity \(\sigma\). When studying the effect of the medium on wireless signal attenuation, the complex relative permittivity can be expressed as:  
\[\epsilon_{r}{}^{\prime}=\epsilon_{r}+\frac{\sigma}{j\rm{w}\epsilon_{0}} \tag{6}\]  
Figure 2: Schematic diagram of spatial segmentation. (The different blue forms represent objects that are divided by spatial segmentation. The orange line is the transmission path of the signal. The orange dots M and N are the start and end points of the signal transmission path. 1, 2, 3, 11, 12, 21, 22, 31, 32 are the different objects and surfaces involved in the transmission path). where \(\epsilon_{r}\) is the permittivity, \(\epsilon_{r}\) is the complex relative permittivity, and \(\epsilon_{0}\) is the vacuum permittivity. The expression for propagation attenuation can be derived as follows:  
\[