Convolutional neural network train location fingerprinting method based on adaptive attention
Patent Information
- Application Number
- CN202610891406.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-18
- Publication Date
- 2026-09-22
AI Technical Summary
[0005]针对现有技术的不足,本发明提供了基于自适应注意力的卷积神经网络列车位置指纹定位方法,进而解决了背景技术中提及的技术问题
[0019]1.采用的改进SPM模型获取的数据可信度较高,可以解决高速铁路实际上道采集指纹难度高、工作量大的问题,且本发明所采用的方法可以使采样指纹间距增大到100m,若应用于实际数据采集中,相比传统位置指纹定位的指纹采集间距来说极大的降低了离线阶段指纹采集的工作量,经过对比分析不仅验证了卷积神经网络在列车位置指纹定位中的可用性和有效性,也证明了本发明采用的AAM-CNN位置指纹定位模型,定位精度最高,定位误差可以减小到8.5m以内,定位结果时间解算最短,满足列车运行控制系统在中密度线路上对列车实时性及高精度的要求,具有一定的工程应用价值。
Smart Images

Figure CN122803032A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of railway train wireless communication positioning technology, and in particular to a train position fingerprinting method based on adaptive attention convolutional neural networks. Background Technology
[0002] High-precision and real-time transmission of train location information is fundamental to ensuring safe transportation. While GNSS (Global Navigation Satellite System) can meet train positioning requirements in open plains, the environment of China's high-speed railway lines is complex. In some areas, tunnels constitute a significant portion of the railway network, and visible satellites are obstructed in tunnel environments, rendering GNSS positioning unusable and unable to meet train positioning requirements. Furthermore, the internal environment of tunnels is more complex, with mobility, heterogeneity, multipath effects, and non-line-of-sight effects making positioning in tunnels more challenging than in open plains. The next-generation train control system proposes to eliminate trackside equipment such as transponders and track circuits, posing an even greater challenge to high-precision train positioning in tunnel environments. Wireless communication technology, due to its ease of deployment, lack of need for auxiliary equipment, and no increase in construction costs, is being applied in positioning research. The next-generation 5G-R railway train communication system achieves seamless coverage across the entire railway line, providing train positioning services to the train control system. Location fingerprinting is a commonly used method in wireless communication positioning technology. It mainly includes the establishment of a fingerprint database in the offline stage and fingerprint matching and solving in the online stage. This method has attracted high attention at home and abroad due to its high cost-effectiveness, ability to directly use signal strength values to establish a database for positioning, the ability to complete positioning with only a single base station, the ability to effectively reduce the error caused by multipath propagation in tunnel environments, and the relatively stable positioning accuracy.
[0003] Current publicly available literature indicates that convolutional neural network (CNN) algorithms significantly outperform traditional location fingerprinting algorithms in location fingerprinting. However, most current applications of CNN location fingerprinting are in indoor Wi-Fi environments, where the spatial area is relatively small, the number and location of signal sources can be set according to actual needs, and offline data collection is convenient and easy. A large amount of measured data can be acquired to build an offline database, meeting the training sample requirements of the CNN model. Indoor positioning uses three-dimensional coordinates. However, the high-speed railway tunnel environment differs from indoor positioning. The signal sources received by the train are constantly changing, and the location information is in kilometer markers. The signal source locations are relatively fixed and far away. Due to access restrictions during actual track testing, the amount of location fingerprint data collected offline is limited, and the collection difficulty and workload are significant. If changes occur due to changes in the positioning environment and layout, or changes in access points (APs), fingerprints need to be re-collected. Currently, research on how to obtain a sufficient number of LTE-R signal strength values, how to create a grayscale image fingerprint database that conforms to the operating characteristics of high-speed railways, and how to build a suitable CNN location model remains lacking.
[0004] This invention employs an improved SPM model for simulation to obtain RSRP values. An improved grey relational analysis method is used to analyze the consistency of spatial geometry and amplitude between the data obtained from the simulation model and the data from the real system. After verification of simulation credibility, the timing advance of the mobile terminal's transmission is incorporated into the fingerprint data based on the simulation data to enhance fingerprint features. This data is then transformed to generate a grayscale image location fingerprint database suitable for high-speed railway tunnel environments. A convolutional neural network classification and localization model (AAM-CNN model) incorporating an adaptive attention mechanism is established. The adaptive attention mechanism enables the learning of inter-channel correlations and adaptive adjustment of feature weights, allowing the model training process to focus more on valuable fingerprint information and improve the positioning accuracy of the train positioning model. Case studies demonstrate that the AAM-CNN model established in this invention has higher positioning accuracy and real-time performance compared to traditional CNN models and traditional location fingerprinting methods, meeting the requirement of less than 10m train positioning accuracy on medium-density lines. Summary of the Invention
[0005] To address the shortcomings of existing technologies, this invention provides a train position fingerprint localization method based on adaptive attention convolutional neural networks, thereby solving the technical problems mentioned in the background section.
[0006] To achieve the above objectives, this invention provides the following technical solution: A train position fingerprint localization method based on an adaptive attention-based convolutional neural network. Train position fingerprint localization based on an attention mechanism (CNN) is divided into two stages: offline and online.
[0007] Offline phase: Based on the wireless propagation model, the received signal strength data of each reference point in the tunnel environment is obtained through simulation, and the reliability of the data is verified; the timing advance is mapped to radio propagation loss and incorporated into fingerprint features, and the processed fingerprint data is converted into a grayscale image fingerprint database; a convolutional neural network localization model incorporating an adaptive attention mechanism is constructed. The adaptive attention mechanism learns the correlation between channels dynamically and adaptively adjusts the feature weights. The localization model is trained using the grayscale image fingerprint database to establish the mapping relationship between the position fingerprint and the train position.
[0008] Online phase: Real-time acquisition of signal strength data of the current cell and adjacent cell access points in the train operation environment, conversion into grayscale image fingerprints and input into the trained positioning model, outputting the train position positioning result.
[0009] Furthermore, the wireless propagation model is based on the SPM model and improved by introducing correction factors related to speed, network environment, geographical environment and tunnel width to adapt to the high-speed railway tunnel environment.
[0010] Furthermore, the credibility verification adopts an improved grey relational analysis method, which verifies the credibility of the simulation data by comprehensively analyzing the geometric similarity and amplitude closeness between the simulation data and the measured data.
[0011] Furthermore, the step of converting fingerprint data into a grayscale image fingerprint database includes: statistically processing the received signal strength data according to the fingerprint acquisition cycle, constructing a two-dimensional matrix containing the signal strength of the current cell and neighboring cells as well as timing advance information, and transforming the two-dimensional matrix into a grayscale image format.
[0012] Furthermore, the adaptive attention mechanism is set in the feature extraction layer of the convolutional neural network. It uses global average pooling to compress spatial features, learns the correlation between channels through adaptive convolutional kernels, generates channel attention weights and fuses them with the feature map to achieve adaptive adjustment of features.
[0013] Furthermore, the size of the adaptive convolutional kernel is adaptively determined based on the number of channels to enable cross-channel interaction.
[0014] Furthermore, the online phase includes: collecting field strength data of access points deployed in the current cell and adjacent cells in the train operation environment at a set period, performing interpolation processing on the collected data to match the model input dimension, constructing a grayscale image fingerprint bar and inputting it into the positioning model for position calculation.
[0015] Furthermore, in the offline phase, the fingerprint sampling interval is greater than the acquisition interval of traditional location fingerprint positioning.
[0016] Furthermore, the specifications of the grayscale image fingerprint are determined based on the balance requirements between positioning accuracy and model training time.
[0017] Furthermore, the convolutional neural network localization model employs the ReLU activation function and the cross-entropy loss function, and uses regularization and Dropout strategies to prevent overfitting.
[0018] Beneficial effects compared to existing technologies:
[0019] 1. The improved SPM model used in this invention provides data with high reliability, solving the problems of high difficulty and large workload in actual fingerprint collection on high-speed railways. Furthermore, the method employed in this invention can increase the sampling fingerprint spacing to 100m. When applied to actual data collection, this significantly reduces the workload of offline fingerprint collection compared to traditional location fingerprint positioning. Comparative analysis not only verifies the usability and effectiveness of convolutional neural networks in train location fingerprint positioning but also proves that the AAM-CNN location fingerprint positioning model used in this invention has the highest positioning accuracy, reducing the positioning error to within 8.5m, and the shortest time to calculate the positioning result. This meets the real-time and high-precision requirements of train operation control systems on medium-density lines, demonstrating significant engineering application value. Attached Figure Description
[0020] The above description is merely an overview of the technical solution of the present invention. In order to better understand the technical means of the present invention and to implement it in accordance with the contents of the specification, the preferred embodiments of the present invention are described in detail below with reference to the accompanying drawings.
[0021] Figure 1 This is a diagram of the improved SPM path loss curve of the present invention.
[0022] Figure 2 This is a graph showing the received signal strength of the mobile station in the improved SPM model of this invention.
[0023] Figure 3 This is a schematic diagram showing the comparison between measured and simulated data of the received signal strength according to the present invention.
[0024] Figure 4 This is a graph showing the change in field strength at three APs over a fixed 200-second interval, as presented in this invention.
[0025] Figure 5 This is a schematic diagram of a grayscale image fingerprint strip obtained at a certain sampling point of the present invention;
[0026] Figure 6 This is a schematic diagram of the convolutional neural network location fingerprinting model of the present invention;
[0027] Figure 7This is a graph showing the influence of fingerprint spacing and fingerprint sampling period on positioning accuracy according to the present invention.
[0028] Figure 8 This is a schematic diagram of the fingerprint sampling point distribution in a tunnel environment according to the present invention;
[0029] Figure 9 A curve comparing the accuracy of different positioning methods;
[0030] Figure 10 The graph shows the impact of timing advance on positioning accuracy. Detailed Implementation
[0031] Preferred embodiments of the present invention will be described in detail with reference to the accompanying drawings. However, the present invention can also be implemented in various different forms, and therefore the present invention is not limited to the embodiments described below.
[0032] The technical solutions in this application are designed to address the problems described in the background art and are divided into the following parts;
[0033] 1. 5G-R Simulation Model and Credibility Analysis
[0034] 5G-R Modeling and Simulation:
[0035] Existing technologies have conducted in-depth research on wireless propagation models (e.g., Zhai Tiantian. Research on Channel Parameter Estimation and Modeling of 5G Vehicle Network [D]. Xi'an University of Electronic Science and Technology, 2023). Detailed analyses and comparisons of the applicability and characteristics of most existing macrocell and microcell propagation models have been performed, proving that the SPM model, compared to the other two propagation models, is not limited by frequency factors and geographical environment, making it more suitable as a 5G propagation model. In various environments along railway lines (plains, tunnels, or stations, etc.), the SPM model is not limited by changes in environmental factors and can more accurately calculate channel path loss. Therefore, this invention uses the SPM model as the basis for modeling and simulating the 5G-R system. The SPM model is shown in equation (1).
[0036] (1)
[0037] Wherein, λ1 is the offset constant, which is set to 69.55 in this invention after least squares parameter fitting; λ2 is a correction factor related to distance d, generally with a default value of 26.1; λ3 represents the correlation factor of the effective height of the base station, which remains unchanged after the base station is built, generally with a default value of 5.83; λ4 represents the correction factor for diffraction during signal transmission in the tunnel environment, with a default value of 0.2; λ5 is the right-hand side of the equation lg(d)lg(h) te) is a correction factor, representing the effective factor for base station height and distance correction, which generally takes the default value of 6.55; λ6 is a correction factor for the effective height of a train, with a value of 0; d is the distance from the base station to the train, in km; h te is the effective length of the transmitting antenna of the base station, in m; h re is the effective height of the train, in m; Diff is the diffraction loss during signal transmission.
[0038] Since the SPM model given by formula (1) is a general model, it needs to be improved in combination with the operation characteristics of high-speed railway tunnels. When the train operation speed is less than 500km / h, the received signal strength will not cause excessive distortion, and the actual carriage loss is 15~20dBm.
[0039] This part of the content can be obtained from the following references:
[0040] [1] Huang Fengxiang, Duan Hongguang, Liu Hexin. Channel estimation based on fast super-resolution reconstruction and residual connection[J]. Telecommunication Engineering, 2024, 64(05): 678-684.;
[0041] [2] Xiang Youwei. Research on intelligent channel prediction for 5G-Advanced[D]. Beijing Jiaotong University, 2023..
[0042] However, due to the influence of the environment and other factors, certain correction factors need to be added for correction, and the present invention mainly improves the following aspects.
[0043] (1) Speed correction factor δ1: when the speed is less than 200km / h, δ1=0; when the speed is greater than 200km / h and less than 300km / h, δ1=1; when the speed is greater than 300km / h, δ1=3.
[0044] (2) 5G-R network correction factor δ2: δ2=-5 for suburban areas; δ2=-20 for plains; δ2=15 for mountainous areas; δ2=-15 for tunnels.
[0045] (3) Environment correction factor δ3: obeys the normal distribution N~(0,2).
[0046] (4) Width correction factor L3: L3=alg(d' / 2), where 0<a<20, d'=8 is the distance from the mobile terminal to the leaky cable.
[0047] The improved SPM loss model is:
[0048] (2)
[0049] Adopting formula (2) as the channel transmission model of 5G-R in tunnel environments, the received signal power at any collection point in the tunnel area can be calculated by formula (3).
[0050] (3)
[0051] Among them, P r P represents the desired received signal strength. t The base station's transmitted signal strength is set to 43dBm; AP power For base station antenna gain; FP power σ represents the mobile station antenna gain; L(d) is the path loss value in the channel propagation model; σ is Gaussian noise with a mean of 0 and a standard deviation of 6 in a tunnel environment. The path loss curve of the improved SPM model is shown below. Figure 1 As shown, the mobile station received signal strength curve obtained from the simulation of the improved SPM model is as follows: Figure 2 As shown.
[0052] Using the parameters of the AP point at kilometer marker K217 in a real tunnel environment of a certain railway bureau as a reference, the simulation model parameters were set, with the base station antenna gain set to 17 dBi and the antenna gain on the train set to 0 dBi. The simulated signal reception strength data and measured data were compared. Figure 3 As shown.
[0053] Credibility analysis:
[0054] This invention uses the simulation model described in 1.1 to obtain the RSRP values of sampling points and establish an offline database. However, the reliability of this model is a key factor affecting the availability and accuracy of the database in the offline stage of train position fingerprint positioning. Grey relational analysis uses grey relational degree to quantify the consistency of the geometric shape of the data sequence in space to analyze the correlation of the data sequence. It is a useful tool for verifying the feasibility of the simulation model. However, the traditional grey relational method has certain defects. It only considers the similarity of the geometric shape between a set of data, but does not consider the similarity of the amplitude between the data. This invention analyzes the RSRP values obtained by the 5G-R simulation model, and considers the consistency of the magnitude and trend of the RSRP values obtained by simulation with the measured RSRP values. An improved grey relational analysis method is used to analyze and verify the reliability of the simulation model.
[0055] Let P be the output data from the train's 5G-R wireless field strength and frequency sweeping subsystem. ref (n), the output data of the simulation model is P sim (n), where n is the data length, and k = 1, 2, 3, ..., n. Assume that each data sequence is an equally spaced sequence and satisfies the conditions of equal sampling intervals and the same sequence length (if the sequence lengths are different or there are gaps in the intermediate data, a GM(1,1) model can be built to predict and fill in the gaps, or redundant data can be removed). The specific process is as follows:
[0056] (1) Determine the grey relational difference information space Δ GR P was obtained ref (n) and P sim Grey relational degree between (n):
[0057] Difference information: , (4)
[0058] Distance space: (5)
[0059] Environmental parameters: (6)
[0060] in, These are environmental parameters at the two poles in the distance space; These are environmental parameters at the two poles in the distance space.
[0061] Resolution factor: Under the principle of least information, the resolution coefficient is set to 0.5;
[0062] Grey Difference Information Space (7)
[0063] Here, we consider two attributes simultaneously: the similarity in spatial geometry between the data sequences generated by the simulation model and those generated by the real system, and the similarity in numerical values. Instead of using the weighted sum method commonly employed in traditional grey relational analysis, we perform multiplicative synthesis on the two attributes. This quantifies the numerical similarity of the data sequences from both the absolute and relative error perspectives, yielding P. ref (n) and P sim The improved grey relational degree between (n) is shown in Equation (8).
[0064] (8)
[0065] (2) Calculation Value:
[0066] (9)
[0067] (3) The consistency result between the measured RSRP data and the simulated RSRP data can be calculated by formula (10).
[0068] (10)
[0069] (4) Verify the credibility of the simulation model based on the given grey relational degree threshold λ0.
[0070] If obtained This indicates that the simulation model can be verified under the given gray relational degree threshold λ0, and the credibility of the simulation model meets the requirements. In this invention, λ0=0.8.
[0071] according to Figure 3 The data was used to evaluate the credibility of the simulation model, and the credibility of the improved SPM model established in this invention was found to be 0.85, which meets the credibility requirements.
[0072] 2. Train position fingerprint localization based on attention mechanism-CNN
[0073] Offline phase:
[0074] (1) Generate grayscale fingerprint database
[0075] Based on the locations of the reference point and the access points (APs), and according to the signal propagation model described in Section 1.1, the received signal strength values obtained from 200 seconds of simulation using three APs at a certain sampling point are as follows: Figure 4 As shown.
[0076] according to Figure 4 First, the theoretical values of each AP at the reference point are calculated. Then, based on the variation characteristics of the AP field strength at the reference point, statistics are performed at certain time intervals, and the average of multiple RSRP values of each AP at the reference point within this time period is calculated as the RSRP value of that reference point. Considering the characteristics of high-speed railway operation, where the train always runs along the track direction, each acquisition point mainly collects the signal strength values of the current cell and the AP points in the two adjacent cells before and after it, obtaining the final RSRP value vector f formed by the fingerprint at each location. j , can be represented as:
[0077] (11)
[0078] Where U is the number of location fingerprint sampling points, which is determined by the total length of the line and the fingerprint spacing; V represents the number of AP points receiving a certain reference point, which is 3 in this invention, representing the current and previous three cells of the train operation.
[0079] The RSRP values obtained from the reference point are divided according to a certain fingerprint acquisition cycle. The average value of the RSRP values in each acquisition cycle is calculated to obtain multiple RSRP values at the reference point. The obtained RSRP values are then represented as a two-dimensional matrix with the number of calculations N as the rows, the number of AP points V as the columns, and the RSRP values as the values.
[0080] (12)
[0081] Where f(N,V) represents the Nth RSRP value collected from the Vth AP point by the jth reference point; N is determined by the fingerprint collection cycle and is the square of a positive integer; the value of V is generally taken as 3 according to the operating characteristics of high-speed railway trains, representing the current cell and the cells before and after the fingerprint sampling point.
[0082] During actual positioning, to compensate for transmission delay, the base station instructs the train to initiate a burst pulse with a certain time lead. This time lead is defined as the timing lead, which can be calculated based on the round-trip time of electromagnetic waves between the mobile terminal and the base station. The relationship between the distance between the mobile terminal and the base station and the timing lead is as follows:
[0083] (13)
[0084] In the formula: d is the distance between the train and the base station, in km; T A denoted as _c_, where _c_ is the propagation speed of electromagnetic waves in the medium, km / s; and _b_ is the bit duration of the 5G-R system, s.
[0085] The more feature values contained in a fingerprint strip, the stronger the fingerprint's feature identification capability. This invention incorporates the timing advance of the transmitting end into the fingerprint strip to increase its feature identification capability and improve positioning accuracy. However, as can be seen from equation (13), the timing advance has a different dimension than the signal strength. This invention uses the improved SPM wireless propagation model given in Section 1.1 to map the timing advance to radio propagation loss.
[0086] Substituting equation (13) into equation (2), we obtain the mapping between timing advance and radio propagation loss, denoted as f(T). A ),Right now
[0087] (14)
[0088] Introducing timing advance into location fingerprints can improve positioning accuracy. The fingerprint strip with timing advance can be obtained as follows:
[0089] (15)
[0090] Equation (12) can be rearranged as follows:
[0091] (16)
[0092] To transform the original location fingerprint database into a grayscale image fingerprint database, it is necessary to process the above F... j The matrix undergoes transformations in both form and content. First, F... j Each column in the matrix is transformed into The matrix form, after transformation, will form 4 submatrices, namely Aj,1 B j,2 C j,3 D j,4 The new matrix F j Change to size The matrix is of the form:
[0093] (17)
[0094] Where, submatrix A j,1 B j,2 C j,3 D j,4 They are in the following forms:
[0095]
[0096]
[0097]
[0098]
[0099] The above transformation allows the fingerprint collection point at a certain location to be analyzed using different RSRP values from the current cell and three APs in the preceding and following cells, along with the corresponding timing advance, via F. j The matrix representation of D on a grayscale image, without introducing a timing advance, is... j,1 Fill in the same value consistently to ensure F j The format should be consistent to avoid affecting the data content. For example, grayscale images with pixel sizes of 16×16, 20×20, and 28×28 are obtained as follows: Figure 5 As shown, Figure 5 (a) A grayscale image fingerprint bar generated without introducing a timing advance. Figure 5 (b) A grayscale image fingerprint bar generated when introducing timing advance. It can be seen that the upper right part of the grayscale image represents the current cell where the sampling point is located, and the grayscale value corresponding to the received signal strength in this part is the largest; the upper left and lower left parts of the image correspond to the signal strength received by the previous and next cells before sampling, respectively, and the grayscale values are smaller compared to the current cell; as shown... Figure 5 The lower right parts of the images in (a) and (b) represent D without the timing advance. j,1 When filling in the same value for some parts and adding the timing advance, D j,1 It will correspond to different grayscale values, but the timing advance does not change at the same point, so the image shows a uniform grayscale value.
[0100] (2) Constructing a convolutional neural network classification and localization model
[0101] Convolutional neural networks mainly consist of an input layer, convolutional layers, activation functions, pooling layers, fully connected layers, and loss functions. Their essence is feature extraction and decision inference. By combining these network structures and modifying their parameters for different problems, the accuracy of feature extraction and decision inference can be improved.
[0102] In convolutional neural network localization models, multiple convolutional and pooling layers process the grayscale value matrix T of the input grayscale image to achieve dimensionality reduction, dimensionality increase, or feature extraction. The output of the i-th layer in the convolutional neural network model can be represented by Ht, where Ht0 = T. If the i-th layer is a convolutional layer, then Ht... i It can be described as:
[0103] (18)
[0104] Among them, W i Represents the weight values of the i-th convolutional kernel; * indicates the convolution operation; W i With the feature matrix Ht of the (i-1)th layer in the convolutional network i The feature matrix Ht of layer -1 i -1 is used for convolution, b i It is the current offset, and f() is the excitation of a linear function.
[0105] Pooling amplifies important information while downplaying unimportant information, reducing the dimensionality of the matrix while maintaining the feature scale. Two common pooling methods are max pooling and average pooling. Pooling the convolutional feature matrix yields the pooled feature matrix Ht. i .
[0106] (19)
[0107] Grayscale fingerprint images are processed through convolutional and pooling layers, then through a fully connected layer for classification, completing the input-output mapping to obtain the localization result. Because trains use similar speeds and base station parameters at certain times and locations along railway lines, the grayscale image location fingerprint database may contain images with high similarity, significantly impacting the accuracy of the final localization result. To address this issue, an adaptive attention mechanism is introduced into the system for performance optimization. The key is to utilize dynamic convolutional kernels to handle the extraction of different input features and features across different ranges. The kernel size is adaptively variable, allowing layers with a large number of channels in the CNN network to interact more extensively across channels, improving the globality and accuracy of feature extraction.
[0108] This invention introduces an adaptive attention mechanism after the C3 layer of the model, which automatically learns the correlation between channels and adjusts the feature map weights, enabling the network to focus more on key fingerprint features during training and improve the accuracy of the network model. The adaptive convolution kernel function used in this invention is defined as shown in equation (20).
[0109] (20)
[0110] in, It represents the size of the convolution kernel; x represents the number of channels, || odd express Only odd numbers can be chosen. c is mainly used to adjust x and the convolution kernel. Size ratio.
[0111] The core of this adaptive attention mechanism is to extract the importance of each channel and integrate features through global average pooling to improve the correlation between global channels. This mechanism can solve the complex relationship between channels, calculate attention weights and perform weight allocation to achieve adaptive adjustment of features, and finally reconstruct a feature map that highlights important features while effectively suppressing redundant information.
[0112] The established model structure is as follows Figure 6 As shown in the figure, the boxed portion illustrates the structure of adaptive attention.
[0113] The image is transformed into a grayscale fingerprint image database using the method described in Section 2.1, and divided into a training sample set (including a validation sample set) and a test sample set. The data sample set consists of two-dimensional grayscale images representing location fingerprint sampling points, which have high similarity to the handwritten digit dataset. Based on LetNet-5, which has extremely high accuracy in handwritten digit dataset classification, and combined with the grayscale image fingerprint bar features established in this invention, an attention interaction mechanism is introduced to establish an AT_CNN model suitable for high-speed railway train positioning fingerprint localization. Its specific structure is as follows... Figure 7As shown. The model input is a grayscale image with dimensions 20×20×1. In the designed model, the convolutional layer C1 has a kernel size of 5×5, a depth of 6, a stride of 1, zero-padding, and ReLU activation function, outputting a 20×20×6 node matrix. The pooling layer S2 has a filter size of 2×2, a stride of 1, and ReLU activation function. The convolutional layer C3 has a kernel size of 5×5, a depth of 16, a stride of 1, zero-padding, and ReLU activation function, outputting a node matrix. An adaptive attention module is introduced after layer C3 to extract the importance of each channel. The module takes the feature map of layer C3 as input (16@10×10), then uses global average pooling to compress the spatial features of the feature map to obtain a 1×1×16 feature map. Then, channel features are learned through convolution, and the channel attention features are incorporated. Figure 1 The original feature maps 16@10×10 in C3 and C4 are multiplied channel-wise to output a feature map with channel attention. The pooling layer S4 has a filter size of 2×2, a stride of 1, and a ReLU activation function, outputting a 5×5×16 matrix. At the front end of the network, CNN is used to automatically extract relevant features of the input grayscale image based on the output of the model at the previous time step. F5 and F6 are fully connected layers, containing 455 and 65 neurons respectively. The output of F6 is then passed through a softmax layer to output the final localization result.
[0114] This invention uses ReLU as the activation function, as shown in equation (21).
[0115] (twenty one)
[0116] Because the grayscale fingerprint images in this invention are relatively small, the size of the convolutional kernels and pooling layers in the network structure is reduced to improve feature extraction capabilities. The ReLU function is used as the activation function, leveraging its simple derivative calculation to improve model convergence speed. Compared to LeNet-5, this invention reduces one fully connected layer to decrease network complexity. To prevent overfitting and maintain model simplicity, a Dropout layer with a value of 0.5 is added after the fully connected layer.
[0117] Online phase:
[0118] The online location phase consists of the following three steps:
[0119] Step 1. Collect RSRP field strength information. When a user initiates a location request, the positioning terminal collects the AP field strength of the cells before and after the train in the tunnel environment and the current cell at a period of 100ms, and stores the collected field strength data into the positioning field strength matrix.
[0120] Step 2. Obtain the grayscale image fingerprint. When the localization request period is reached, perform linear interpolation between the columns of the localization field strength matrix to make the number of columns of the matrix equal to the length of the input layer of the training model, and construct image data using the image fingerprint construction method of the offline stage;
[0121] Step 3. Return Results: Input the image data into the AT-CNN localization and classification model. The localization model returns the localization results to the terminal, completing the localization process.
[0122] Experimental verification and result analysis
[0123] Experimental parameter settings:
[0124] To verify the effectiveness of the proposed algorithm, a simulation model was used to acquire fingerprint data. The simulation scenario was set according to the basic parameters of a high-speed railway tunnel environment, with a line length of 28.7km, 20 5G-R base stations with an average spacing of 1.8km, 227 fingerprint reference points with a fingerprint spacing of 100m, and a training set of 11821 grayscale fingerprint images (including 2364 grayscale fingerprint images from the validation set) and a test set of 3179 grayscale fingerprint images. This invention mainly sets model parameters based on previous experiments and continuously adjusts them to optimal values during experiments. The relevant parameters of the constructed positioning reference model are shown in Table 1. The sampling period is 600ms, and the training set for each reference point contains 6000 samples. The initial learning rate of the training model is 0.05, using an exponential decay method. To obtain a better solution with a larger learning rate, the learning rate decay coefficient is set to 0.96. The learning rate decreases continuously with the number of iterations, ensuring the stability of the model training in later stages. The moving average model decay rate is 0.9999; the larger this value, the more stable the model tends to be. In order to enable the model to update faster in the early stage of training, the num-updates parameter is used to dynamically set the moving average decay rate, as shown in equation (22).
[0125] (twenty two)
[0126] This invention uses the cross-entropy function as the loss function for model training, as shown in equation (23).
[0127] (twenty three)
[0128] Where p is the probability distribution of the given correct value, and q is the probability distribution of the given predicted value.
[0129] Both L2 regularization and dropout are used to address overfitting. The formula for calculating L2 regularization is:
[0130] (twenty four)
[0131] Where w is a weight value that determines the model complexity.
[0132] Table 1 Experimental Parameters
[0133]
[0134] Factors affecting positioning accuracy
[0135] (1) The impact of fingerprint sampling period, fingerprint spacing and sample size on positioning accuracy
[0136] Previous studies have shown that the selection of fingerprint spacing is a key factor affecting localization results.
[25] The fingerprint sampling period and the size of the training sample set for a single sampling point directly affect the accuracy and speed of the convolutional neural network fingerprint localization model. Therefore, this invention focuses on the impact of the selection of fingerprint spacing, fingerprint sampling period and the number of reference training samples for a single localization point on the accuracy and training time of the localization model. Figure 7 (a) shows the positioning accuracy under different fingerprint spacings. Figure 7 (b) is a graph showing the relationship between fingerprint sampling period and positioning accuracy. Figure 7 (a) It can be seen that the larger the fingerprint spacing, the lower the positioning accuracy. Considering both the workload of fingerprint acquisition and the fact that the positioning accuracy is less than 10m in medium-density lines, this invention selects 100m as the fingerprint sampling spacing. This fingerprint acquisition spacing is larger than the commonly used values (10m, 20m, 50m) in traditional location fingerprint positioning methods, greatly reducing the workload of fingerprint acquisition. The fingerprint sampling period can be understood as the number of times the positioning terminal scans the AP point to obtain the field strength in the actual positioning environment. The positioning terminal scans the field strength values of different AP points captured by the 5G-R wireless communication network once every 100ms, which is a group. If the positioning period is set to 300ms, it means that the positioning terminal needs to continuously collect 3 groups of fingerprints at the positioning point to obtain the corresponding RSRP value. Figure 7 (a) reflects the relationship between fingerprint sampling period and positioning error, from Figure 7 (b) It can be seen that the localization accuracy of the AAM-CNN network model increases rapidly with the increase of the sampling period, reaching its highest level when the sampling period reaches 1000ms. In practice, in addition to considering the model's localization accuracy, the training time also needs to be considered to meet the real-time requirements of train localization. Table 2 shows the model training time and accuracy values corresponding to different training samples when the fingerprint sampling period is 650ms. From Table 2, it can be seen that when the sampling period is 650ms and the training samples are 7000, the localization accuracy can reach 8.50m, and the model training time is 273. After the training samples exceed 7000, although the localization accuracy improves, the change is not significant, while the model training time increases considerably.
[0137] Table 2. Relationship between the number of samples per single localization point and model training time and localization accuracy.
[0138]
[0139] (2) The impact of image size on positioning accuracy
[0140] Following the grayscale image fingerprint generation process in Section 2.1, and based on 7000 training samples per single positioning point, three image formats (16×16, 20×20, and 28×28) were generated in the experimental stage, incorporating timing advance. Different image sizes resulted in different RSRP values; smaller images required shorter training times. Table 3 shows the training results of the convolutional neural network positioning model under the three image formats. Table 3 shows that when the image size is selected as 20×20, both positioning accuracy and model training time reach a good level, meeting the high accuracy and real-time requirements of train positioning.
[0141] Table 3. The Influence of Different Image Sizes on Positioning Results
[0142]
[0143] After experimental verification, this invention selected 7000 training samples with a single localization reference point and input grayscale images of size 20×20.
[0144] Comparison with other positioning methods:
[0145] In order to verify the availability, effectiveness and accuracy of the location fingerprint model based on AT_CNN established in this invention, it was compared with the CNN model and the traditional WKNN algorithm and LS_SVM algorithm. In the previous research work, WKNN and Least Squares Support Vector Machine (LS_SVM) were optimized and improved and good results were obtained. Therefore, the location results were mainly compared with the Chaos Immune Particle Swarm Optimization (CIPSO_WKNN) algorithm and the Fuzzy Least Squares Support Vector Machine (FLS_SVM) algorithm. When using the convolutional neural network location model for location, the fingerprint spacing was 100m. The literature
[32] verified that the smaller the fingerprint spacing, the higher the location accuracy under the traditional location method. In the experiment, the fingerprint spacing of the FLS_SVM location fingerprint algorithm and the CIPSO_WKNN location fingerprint algorithm was 20m to obtain the highest location accuracy. The fingerprint sampling point layout diagram in the tunnel environment is shown in the figure. Figure 8 As shown.
[0146] Figure 9 The localization results are presented under four different location fingerprinting methods. Figure 10 As can be seen, the AT-CNN method applied to train position fingerprint localization yields better results than traditional methods. Traditional CNN models can improve positioning accuracy to approximately 14.7m, while the AAM-CNN position fingerprint train positioning method used in this invention achieves a positioning error of less than 8.5m with a 100% probability when the fingerprint spacing is 100m. When using FLS_SVM position fingerprint localization, the probability of a positioning error less than 10m is 40%, and the probability of a positioning error less than 20m is approximately 85%. However, when using CIPSO_WKNN position fingerprint localization, the probability of a positioning error less than 10m is only 20%, and the probability of a positioning error less than 20m is only 41.2%. These results demonstrate that only the AAM-CNN algorithm used in this invention can meet the positioning accuracy requirements of train control systems on medium-density lines. Figure 10 The localization results of the AAM-CNN model are presented when using grayscale fingerprint images with and without timing advance. It can be seen that because grayscale fingerprint images have more feature values after adding timing advance, the fingerprint feature discrimination ability is stronger during model training, thus resulting in higher accuracy of the model's localization results.
[0147] The test set data was input into the AAM-CNN location fingerprint localization model established in this invention for localization testing. The time to obtain the localization result was no more than 10 seconds. Under traditional localization methods, the time to calculate the localization result after making a localization request is relatively long, as shown in Table 4. The comparison of results shows that the method adopted in this invention significantly shortens the location fingerprint localization calculation time under traditional localization methods, solving the problem of low real-time performance in traditional fingerprint localization methods.
[0148] Table 4 Comparison of real-time positioning performance under different positioning methods
[0149]
[0150] By comparing the above schemes and experiments, we can conclude that:
[0151] This invention addresses the requirement for real-time and accurate train positioning in high-speed railway tunnel environments by proposing a CNN-based position fingerprinting method incorporating an attention mechanism. The method consists of two parts: an offline stage and an online stage. First, the reliability of the improved SPM model is discussed, and the 5G-R signal strength value RSRP is obtained through simulation. Simultaneously, a timing advance is introduced into the fingerprint bar to enhance fingerprint features. Then, the obtained field strength fingerprint is converted into a grayscale image fingerprint bar of the received signal strength conforming to the characteristics along the high-speed railway line, establishing an AAM-CNN model to achieve train position positioning. This invention focuses on the impact of fingerprint spacing, fingerprint sampling period, and the size of the training samples for a single positioning point and the grayscale image specifications on positioning accuracy when the sampling period is 600ms. It also compares the method with traditional CNN models, the CIPSO-WKNN algorithm, and the FLS_SVM algorithm, and analyzes the impact of adding a timing advance on the model's positioning accuracy. The results show that the improved SPM model used in this invention has high data reliability and can solve the problems of high difficulty and large workload in actual fingerprint collection on high-speed railways. Moreover, the method used in this invention can increase the sampling fingerprint spacing to 100m. If applied to actual data collection, it greatly reduces the workload of fingerprint collection in the offline stage compared with the fingerprint collection spacing of traditional position fingerprint positioning. Comparative analysis not only verifies the availability and effectiveness of convolutional neural networks in train position fingerprint positioning, but also proves that the AAM-CNN position fingerprint positioning model used in this invention has the highest positioning accuracy, the positioning error can be reduced to within 8.5m, and the shortest positioning result calculation time. It meets the requirements of train operation control system for real-time performance and high precision on medium-density lines and has certain engineering application value.
[0152] Finally, it should be noted that the above embodiments are merely examples for clearly illustrating the present invention and are not intended to limit the implementation. Those skilled in the art will recognize that other variations or modifications can be made based on the above description. It is neither necessary nor possible to exhaustively list all possible implementations. However, obvious variations or modifications derived therefrom are still within the scope of protection of this invention.
Claims
1. A train position fingerprint localization method based on adaptive attention convolutional neural network, characterized in that, include: Train position fingerprint localization based on attention mechanism-CNN is divided into two stages: offline and online. Offline phase: Based on the wireless propagation model, the received signal strength data of each reference point in the tunnel environment is obtained through simulation, and the reliability of the data is verified; the timing advance is mapped to radio propagation loss and incorporated into fingerprint features, and the processed fingerprint data is converted into a grayscale image fingerprint database; a convolutional neural network localization model incorporating an adaptive attention mechanism is constructed. The adaptive attention mechanism learns the correlation between channels dynamically and adaptively adjusts the feature weights. The localization model is trained using the grayscale image fingerprint database to establish the mapping relationship between the position fingerprint and the train position. Online phase: Real-time acquisition of signal strength data of the current cell and adjacent cell access points in the train operation environment, conversion into grayscale image fingerprints and input into the trained positioning model, outputting the train position positioning result.
2. The train location fingerprint positioning method according to claim 1, characterized in that, The wireless propagation model is based on the SPM model and improved by introducing correction factors related to speed, network environment, geographical environment and tunnel width to adapt to the high-speed railway tunnel environment.
3. The train location fingerprint positioning method according to claim 1, characterized in that, The credibility verification adopts an improved grey relational analysis method, which verifies the credibility of the simulation data by comprehensively analyzing the geometric similarity and amplitude closeness between the simulation data and the measured data.
4. The train position fingerprint positioning method according to claim 1, characterized in that, The process of converting fingerprint data into a grayscale image fingerprint database includes: statistically processing the received signal strength data according to the fingerprint acquisition cycle, constructing a two-dimensional matrix containing the signal strength of the current cell and neighboring cells as well as timing advance information, and transforming the two-dimensional matrix into a grayscale image format.
5. The train position fingerprint positioning method according to claim 1, characterized in that, The adaptive attention mechanism is set in the feature extraction layer of the convolutional neural network. It uses global average pooling to compress spatial features, learns the correlation between channels through adaptive convolutional kernels, generates channel attention weights and fuses them with the feature map to achieve adaptive adjustment of features.
6. The train position fingerprint positioning method according to claim 5, characterized in that, The size of the adaptive convolution kernel is adaptively determined based on the number of channels to enable cross-channel interaction.
7. The train position fingerprint positioning method according to claim 1, characterized in that, The online phase includes: collecting field strength data of access points deployed in the current cell and adjacent cells in the train operation environment at a set period; performing interpolation processing on the collected data to match the model input dimension; constructing grayscale image fingerprint bars and inputting them into the positioning model for position calculation.
8. The train location fingerprint positioning method according to claim 1, characterized in that, In the offline phase, the fingerprint sampling interval is greater than the acquisition interval of traditional location fingerprint positioning.
9. The train position fingerprint positioning method according to claim 1, characterized in that, The specifications of the grayscale image fingerprint are determined based on the balance requirements between positioning accuracy and model training time.
10. The train position fingerprint positioning method according to claim 1, characterized in that, The convolutional neural network localization model employs the ReLU activation function and cross-entropy loss function, and uses regularization and Dropout strategies to prevent overfitting.