## 1 Introduction  
In recent years, with the continuous development of wireless communication and wireless sensor network, wireless localization technology is widely used in disaster first aid, target tracking, vehicle navigation, pedestrian navigation, and other fields. Outdoor localization technology based on a global navigation satellite system has become viable. However in indoor and underground scenes without satellite signals, accurate localization has become a problem to be solved [1; 2; 3]. Ultra-wideband (UWB) has the advantages of high localization accuracy, high communication rate, strong multi-path resolution, and low power consumption. Thus, UWB has a good application prospect in the wireless localization field without satellite signals [4; 5; 6; 7; 8].  
Facing the environment of an underground mine, in the existing UWB positioning systems, most of the channel impulse response (CIR) data of UWB are selected as the data for classifying NLOS [9; 10; 11]. However, because the length of the CIR data is too long, when the tag capacity is large, it may not be possible to obtain the full-length CIR data. In addition, in the actual use of UWB positioning system, the number of LOS data is usually larger than that of NLOS data. Even if all NLOS data is misidentified as LOS data, a high recognition rate can be achieved [12]. Thus, although NLOS data are scarce, they are more important than LOS data. Finally, after NLOS is identified, the distance value measured by UWB still contains other errors, and the positioning accuracy cannot be improved without eliminating them [13; 14; 15].  
To address the aforementioned issues, we develop a LOS/NLOS classification method based on deep learning for the UWB localization system in coal mines. The problem of imbalanced classification and NLOS classification can be overcome in this study, and a person in a coal mine can be precisely located. However, it is worth mentioning that we merely introduced map limitations after the localization process to fix the results, while the actual situation needs to be considered much more than that. Nevertheless, the methods proposed in this paper, as a foundation, are constructive.  
Our contributions in this paper are four-fold:  
1. We propose a NLOS recognition method based on deep learning to distinguish whether a UWB signal transmission is blocked in coal mines. We use the diagnostic data in theDW1000 register as the data feature of deep learning, and analyze the classification performance of multilayer perceptrons and a convolutional neural network;
2. We propose a method for data enhancement based on generative adversarial networks (GAN) to solve the problem of class imbalance of data samples. We use this method to generate a new data set and compare the performance of the new data set with the original data set on the same classifier;
3. We propose a trilateral centroid positioning algorithm, and propose how to calculate the location result of the algorithm when a non-ideal situation occurs. Finally, we corrected the results with the map constraints;
4. We designed static and dynamic experiments to verify our system, and evaluated the proposed techniques through experiments and analysis.  
The rest of this paper is structured as follows. Section 2 reviews the related works and presents the system architecture that we propose. Sections 3 and 4 describe the mathematical principles of the method used in the system. Section 5 introduces our experimental system and analyzes and discusses the experimental results. Finally, we present our conclusions in Section 6.