A channel state information indoor positioning method based on graph homogeneous network
By preprocessing and image construction of CSI amplitude measurements and using graph isomorphism networks for classification learning, the problems of low accuracy and nonlinear relationship bottlenecks in Wi-Fi indoor positioning are solved, achieving efficient and reliable indoor positioning.
Patent Information
- Application Number
- CN202411469666.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-21
- Publication Date
- 2025-09-26
- Estimated Expiration
- 2044-10-21
AI Technical Summary
Among existing Wi-Fi indoor positioning methods, RSSI-based positioning has low accuracy and is susceptible to interference, while CSI-based methods have a large bottleneck in finding the nonlinear relationship between the target location and fingerprint, making it difficult to achieve high-precision indoor positioning.
A graph isomorphism network (GIN) is used to preprocess the CSI amplitude measurement, remove outliers through local outlier factor detection, construct the CSI image and perform superpixel segmentation, establish the graph topology structure, and use GIN for classification learning to achieve position estimation.
It improves the accuracy and reliability of indoor positioning, can effectively identify anomalies, enhance the interpretability and operability of data, improves the ability to distinguish graph structures, and realizes efficient and reliable indoor location recognition and positioning.
Smart Images

Figure CN119342414B_ABST
Abstract
Description
Technical Field
[0001] The design of the present invention relates to a channel state information (CSI) indoor positioning method based on a graph isomorphic network (GIN). The CSI data collected by WIFI indoor positioning is converted into a CSI image, and then converted into a graph topology structure. Indoor positioning is achieved through training and classification of a graph neural network, belonging to the field of artificial intelligence application and indoor positioning technology. Background Art
[0002] With the rapid development of wireless communications and the ubiquity of mobile devices, location-based services such as indoor navigation and tracking have exploded. Providing reliable and accessible positioning information to users of these services is a critical issue. Global satellite navigation systems are mature and well-developed for outdoor positioning. However, due to the complex indoor wireless propagation environment, where direct paths to satellite signals are nonexistent, satellite-based positioning systems exhibit poor positioning performance.
[0003] Numerous wireless network-based indoor positioning systems have been proposed. These systems leverage technologies such as cellular, satellite, ultra-wideband, Wi-Fi, Bluetooth, radio frequency identification, and wireless local area networks to provide diverse user services in diverse scenarios. Furthermore, due to the widespread deployment of commercial WiFi devices in indoor environments, their low cost and ease of deployment have made indoor Wi-Fi positioning a research hotspot. Since every home and public space now has extensive Wi-Fi communication equipment, and many workplaces and living environments rely heavily on Wi-Fi signals, Wi-Fi-based indoor positioning methods are the easiest to implement on a large scale.
[0004] There are two mainstream algorithms in existing Wi-Fi indoor positioning solutions: geometry-based and fingerprint-based. Geometry-based positioning methods measure the propagation delay and direction of Wi-Fi signals and use geometric theorems to calculate the corresponding position. Typical positioning measurement parameters include time of arrival (TOA), time difference of arrival (TDOA), and angle of arrival (AOA). Fingerprint-based methods, on the other hand, build a fingerprint database during an offline training phase and estimate the target location based on real-time measurements during the online phase. Received signal strength indication (RSSI) and channel state information (CSI) are commonly used as fingerprint indicators. RSSI is a single-dimensional metric that indicates the magnitude of the received signal strength and provides information about the overall strength of the signal during transmission. However, it lacks detailed information about the signal, such as the propagation path, interference, and frequency characteristics. Therefore, RSSI is often used to measure the connection quality between devices in wireless networks, but its accuracy is relatively low and it is susceptible to interference and multipath propagation. CSI, on the other hand, is a multi-dimensional metric that provides more detailed information about channel conditions. It includes parameters such as subcarrier phase and amplitude. It not only provides information about signal strength but also provides detailed data on the channel's time and frequency domain characteristics, including the signal's propagation path, phase information, and spectral characteristics. CSI is often the subject of applied research in scenarios such as indoor positioning, gesture recognition, and wireless communication system optimization, which require more detailed channel information to achieve high-precision operations.
[0005] The biggest advantage of using Wi-Fi signal feature fingerprints for positioning is that it does not require additional hardware equipment to be deployed, making it a very cost-effective method. Professor Wang [1] and others proposed a deep learning network based on DeepFi to achieve indoor target positioning. The essence of this method is to use the weights in the deep network as fingerprints, and use the greedy learning algorithm to train the weights of the CNN network. This algorithm greatly reduces the complexity of the network. Finally, in the online stage, a probabilistic data fusion method based on radial basis function is used to achieve the position estimation of the target. Reference [2] studied a positioning algorithm based on CSI amplitude fingerprint. This algorithm uses a multidimensional scaling analysis method to calculate the Euclidean distance and time reversal resonance intensity between the unit to be measured and the reference point, and finally uses the KNN algorithm to estimate the position. However, this is not the final position. The conjugate gradient method is also used to improve the triangular centroid algorithm to obtain a position estimate. The final positioning result is obtained by combining this position estimate with the position estimated by KNN. Experimental results show that compared with some existing algorithms, the positioning error has been improved. The PhaseFi[3] positioning system uses calibrated CSI phase information as the positioning fingerprint. The authors first extract the original phase from the original CSI and then calibrate the phase using a linear transformation method. The positioning process is divided into a training phase and an online phase. In the training phase, CNN is used to train the input phase data. In the online phase, a probabilistic method based on radial basis function is used to estimate the target position. Experimental results verify the effectiveness and stability of the system. Although the fingerprint-based scheme generally provides more accurate positioning results, its bottleneck lies in finding the nonlinear relationship between the target position and the corresponding fingerprint. The graph convolutional network (GCN) proposed in recent years provides another dimension for extracting features from non-Euclidean data structures. Since the non-Euclidean data structure generated by the fingerprint positioning system has different propagation environments, it is a worthy research direction to apply GCN to mine the geometric relationship between different access points and extract their intrinsic features. The model is based on the graph neural network (GNN), which basically extends the concept of CNN. It uses geometric information for learning and reasoning through the graph, can consider the global relationship between nodes, is conducive to the modeling of complex relationships between signal features, can also capture spatial invariance, and has a certain adaptability to the changes of signal features at different positions.
[0006] Several neural network models for graph learning have been developed that have achieved better performance than traditional techniques. Inspired by the graph Fourier transform, Defferrard et al. [4] proposed a graph coconvolution operation as an analog of the standard convolution used in CNN. Just as the convolution operation in the image spatial domain is equivalent to multiplication in the frequency domain, the coconvolution operator defined by the graph Laplacian polynomials is equivalent to filtering in the graph spectral domain. In particular, applying Chebyshev polynomials to the graph Laplacian results in spatially localized filtering. Reference [5] proposed an image localization system based on graph neural networks (GNNs). The important features of each image are extracted using a pre-trained ResNet50 convolutional neural network (CNN) architecture. Next, the extracted features are input into the GNN to find the pose regression problem for each image by treating the image features as nodes in the graph and formulating the pose estimation problem as node pose regression or by modeling the image features themselves as a graph. The two proposed methods are extensively compared with the state-of-the-art single image localization methods, and it is shown that the use of GNNs can improve the performance in both indoor and outdoor environments. Reference [6] proposed a few-shot transfer learning system that uses only a small amount of labeled data from the current environment and reuses a large amount of existing labeled data previously collected in other environments, thereby greatly reducing the data collection and labeling costs for positioning in each new environment. The core method is few-shot transfer learning based on graph neural network (GNN) and its modification. Experimental results conducted in a real environment show that the proposed system achieves performance comparable to that of the convolutional neural network (CNN) model, with 40 times less labeled data. Reference [7] uses point cloud and RGB feature information to accurately obtain indoor three-dimensional space. Using a new visual positioning system (VPS) method, the user's position can be determined by matching the target pose information estimated by the improved point graph neural network (GNN) with the pose information labels of voxel database objects addressed in predefined voxel units. Summary of the Invention
[0007] The present invention discloses a channel state information (CSI) indoor positioning method based on a graph isomorphic network (GIN). First, a local outlier factor (LOF) is detected for each subcarrier in the CSI amplitude measurement to remove abnormal points in the CSI amplitude measurement value. Then, a time-frequency diagram of the CSI measurement value is obtained using the Morlet wavelet function, and a CSI image is constructed using color mapping. Then, a corresponding graph topology structure is constructed based on the CSI image, and the CSI image is superpixel segmented using the SLIC algorithm to achieve node selection and neighboring edge relationship construction. The position features and color features of the nodes are integrated to form a feature matrix. Finally, GIN is used for classification learning to train the final position estimation model. The method achieves the advantages of high efficiency, reliability, and feasibility.
[0008] The technical solution adopted by the present invention to solve the technical problem is:
[0009] A channel state information indoor positioning method based on a graph isomorphic network, the method comprising the following steps:
[0010] (1) Offline stage,
[0011] Step 1: Data Preprocessing
[0012] The received channel state information (CSI) amplitude value is preprocessed for subsequent CSI image fingerprint construction.
[0013] Step 2: CSI Image Construction
[0014] The pre-processed CSI amplitude measurement values are converted into CSI images using the wavelet transform method.
[0015] Step 3: Build the graph structure of the CSI image
[0016] Step 3-1: Use the SLIC algorithm to perform superpixel segmentation on the CSI image.
[0017] Step 3-2: Select nodes of the graph structure based on the superpixel segmentation results.
[0018] Step 3-3: Use the distance metric between nodes to construct the adjacency matrix of the graph structure.
[0019] Step 3-4: Use the position and color information of the nodes to construct the feature matrix of the graph structure.
[0020] Step 4: Classification Learning
[0021] A graph isomorphism network (GIN) is built for classification learning to obtain a location estimation model.
[0022] (2) Online stage,
[0023] Step 1: Data Preprocessing
[0024] The obtained CSI amplitude measurement value is preprocessed using the method of step 1 in the offline phase.
[0025] Step 2: CSI Image Construction
[0026] Using the method of step 2 in the offline phase, the CSI image is constructed using the preprocessed CSI amplitude measurements.
[0027] Step 3: Build the graph structure of the CSI image
[0028] The graph structure of the CSI image is obtained using the method in step 3 of the offline phase.
[0029] Step 4: Position Estimation
[0030] The position estimation model obtained in step 4 of the offline phase is used to complete the position estimation.
[0031] The data preprocessing in step 1 of the offline phase of the method includes the following steps:
[0032] The basic concepts involved are as follows:
[0033] (1) The distance between two CSI amplitude values
[0034] d(Amp j ,Amp p ): represents the distance from the jth CSI amplitude value to the pth CSI amplitude value.
[0035] (2) kth distance
[0036] dist k (Amp j ): From the j-th CSI amplitude value, the distance between the k-th closest CSI amplitude value and the j-th CSI amplitude value (from near to far) is called the k-neighborhood distance of the j-th CSI amplitude value.
[0037] (3) kth distance neighborhood
[0038] N k (j): The k-th distance neighborhood of the j-th CSI amplitude value is all CSI amplitude values within the k-th distance, including the k-th distance.
[0039] (4) Reachable distance
[0040] reachdist k (Amp j ,Amp p ): Select the maximum of the direct distance between two CSI amplitude values and the k-th distance to the j-th CSI amplitude value as the reachable distance to the j-th CSI amplitude value. If the j-th CSI amplitude value is outside the k-neighboring distance of the p-th CSI amplitude value, then the reachable distance is the direct distance between the two CSI amplitude values. If the j-th CSI amplitude value is within the k-neighboring distance of the p-th CSI amplitude value, then the reachable distance is the k-th distance.
[0041] (5) Local reachability density
[0042] lrd k (j): represents the inverse of the average reachable distance of the j-th CSI amplitude value, which is the sum of the distances in its k-neighborhood divided by the number of all CSI amplitude value measurements in the neighborhood.
[0043] (6) Local outlier factor
[0044] LOF k (j): The ratio of the average local reachable density of all CSI amplitude values in the k-th distance neighborhood of the j-th CSI amplitude value to the local reachable density of the j-th CSI amplitude value.
[0045] Step 1-2: Perform a local outlier factor (LOF) test on each subcarrier in the CSI amplitude measurement. For each subcarrier's CSI amplitude value, calculate its distance to all other CSI amplitude values, find the kth closest CSI amplitude value to it, and calculate the LOF value. If the LOF value is larger, it is more abnormal, and vice versa, if it is smaller, it is closer to normal. Specifically, first calculate the jth CSI amplitude value Amp under the i-th subcarrier j The distance to other amplitude values is as follows:
[0046] dist k (Amp j )=d(Amp j ,Amp p )
[0047] Among them, Amp p Indicates the CSI amplitude value closest to the jth CSI amplitude value k, d(Amp j ,Amp p ) represents the Euclidean distance from the jth CSI amplitude value to the pth CSI amplitude value. Then, Amp is calculated according to the following formula: j to Amp p The reachable distance:
[0048] reachdist k (Amp j ,Amp p )=max{dist k (Amp j ),d(Amp j ,Amp p )}
[0049] Then calculate Amp based on the reachable distance j The local reachability density is the inverse of the average reachable distance of all CSI amplitude values in the k-neighborhood of the j-th CSI amplitude value. The specific formula is as follows:
[0050]
[0051] Among them, N k (j) represents Amp jThen calculate Amp j The local outlier factor is the ratio of the average local reachable density of all CSI amplitude values in the k-neighborhood of the j-th CSI amplitude value to the local reachable density of the j-th CSI amplitude value itself. The specific formula is as follows:
[0052]
[0053] If Amp j If the LOF value of the j-th amplitude measurement value is much larger than 1, then the local density of the j-th amplitude measurement value is much smaller than the average local reachable density of all CSI amplitude values of the subcarrier in the k-neighborhood, and it can be determined as an abnormal point, otherwise it is a normal point.
[0054] Step 1-3: Filter out the CSI amplitude values detected as abnormal points in step 1-2
[0055] Step 1-4: Normalize the CSI signal after outlier filtering, scaling all values to the interval [0, 1]. The normalization formula is as follows:
[0056]
[0057] Amp i Indicates the CSI amplitude value of the i-th subcarrier, Amp min Indicates the minimum value of the CSI amplitude, Amp max Indicates the maximum value of the CSI amplitude.
[0058] The CSI image construction in step 2 of the offline phase includes the following steps:
[0059] Step 2-1: Select the Morlet wavelet function and calculate the expression of the wavelet transform coefficient as follows:
[0060]
[0061] Where Amp represents the CSI amplitude measurement vector, It represents the wavelet function after scaling and translation. It is the daughter wavelet obtained by operating the mother wavelet ψ(t). a* represents the scale parameter, which controls the scaling of the wavelet function. The scale a* is usually inversely proportional to the frequency. b* represents the translation parameter, which controls the position of the wavelet function. By changing the size of b*, the signal can be analyzed at different time points.
[0062] Step 2-2: Construct a two-dimensional image. According to the scaling scale a* and translation parameter b* in step 2-1, the corresponding frequency and time parameters are mapped to the two-dimensional plane to form a time-frequency matrix. Finally, the time-frequency diagram of the signal is obtained, where the horizontal axis of the image represents time and the vertical axis represents frequency.
[0063] Steps 2-3: Use the "viridis" colormap from the matplotlib library to map the two-dimensional matrix values to a different color space. This is a continuous color gradient that starts with blue, gradually transitions to green, and finally to yellow. This color mapping maps the minimum value to blue, the intermediate value to green, and the maximum value to yellow. It provides smooth transitions between blue, green, and yellow, allowing for detailed visualization of the data's details and layers.
[0064] The step 3 of constructing the CSI graph structure in the offline phase of the method includes the following steps:
[0065] Step 3-1: Use the SLIC algorithm to perform superpixel segmentation on the CSI image.
[0066] (1) Initialize the center point (cluster center): Convert the time-frequency image obtained in step 2 from RGB space to LAB space, and divide the image of size N (the number of pixels is N) into K super-pixel blocks. The size of each super-pixel block contains pixels, let For the length value of each pixel block, initialize the center point of each pixel block
[0067] (2) Gradient calculation and center point adjustment: Use the differential method to calculate the gradient and readjust the center point. Traverse the 8 pixel areas around the center point of the initial pixel block, calculate the pixel with the minimum gradient value, and use it as the new center point. The formula for differential gradient calculation is as follows:
[0068] Gradient(x,y)=dx(i,j)+dy(i,j);
[0069] dx(i,j)=I(i+1,j)-I(i,j);
[0070] dy(i,j)=I(i,j+1)-I(i,j);
[0071] Among them, (x, y) represents the initial pixel center coordinates, and (i, j) is used to represent the position index of the pixel points traversed during the gradient calculation process, dx(i, j) represents the gradient value along the x-axis at the pixel point (i, j), dy(i, j) represents the gradient value along the y-axis at the pixel point (i, j), and I(i, j) represents the weighted average grayscale value of the three RGB channels of the image at the pixel point (i, j).
[0072] (3) Pixel clustering and cluster center iteration: traverse the pixels in the 2S*2S neighborhood of the center of each superpixel block and calculate the distance from each superpixel block center. Use the K-means clustering algorithm to classify the pixels and use the transformed Euclidean distance formula to measure the distance. The distance measurement includes color distance and spatial distance. The formula is as follows:
[0073]
[0074] Among them, l i ,a i ,b i ,x i ,y i Represents the LAB color space value and position of the center point of each superpixel block, l j ,a j ,b j ,x j ,y j Represents the LAB color space value and position of the pixel point in the 2S*2S neighborhood, d c Represents color distance, d s Represents the spatial distance, N s is the maximum spatial distance within the cluster, N c is the maximum color distance within the cluster, take N c =m, and the fixed constant m (value range [1,40], generally 10) is the maximum possible distance in the LAB space. The final distance metric D' is as follows:
[0075]
[0076] Pixels are divided into the closest clusters based on the distance from the pixel point in the 2S*2S neighborhood to the center of each pixel block, and all pixels in the new cluster are averaged to obtain the new cluster center. Finally, the above steps are repeated until the error converges.
[0077] (4) Enhanced connectivity: Connectivity control is performed to address issues such as multi-connectivity in the iteratively completed clustering, small superpixel size, and a single superpixel being cut into multiple discontinuous superpixels. The main idea is to create a new label table with all elements being -1. Discontinuous superpixels and superpixels with small sizes are reassigned to adjacent superpixels in a "Z"-shaped direction (from left to right, from top to bottom). Traversed pixels are assigned to corresponding labels until all points are traversed.
[0078] Step 3-2: Select nodes of the graph structure based on the superpixel segmentation results.
[0079] The center point of each cluster (superpixel block) processed by the SLIC algorithm can be used as a node
[0080] Step 3-3: Use the distance metric between nodes to construct the adjacency matrix of the graph structure.
[0081] (1) For each superpixel block in step 3-2, the Euclidean distance between the center point (node) and other nodes is calculated as follows:
[0082]
[0083] Among them, Eij represents the Euclidean distance between the center points (nodes) of two superpixel blocks, and r', g', and b' represent the color values of each pixel in the three channels of the color space of the node.
[0084] (2) Using the k-NN algorithm based on the calculated Euclidean distance, find the k nearest neighbor nodes for each node and establish an edge between the node and these k nearest neighbor nodes.
[0085] (3) A two-dimensional adjacency matrix is constructed based on the adjacent edge relationships of the graph structure. Its rows and columns correspond to the nodes in the graph, and the elements in the matrix indicate whether there is an edge or connection between the nodes. If there is an edge between the nodes, the corresponding matrix element is set to 1, otherwise it is 0.
[0086] Step 3-4: Use the position and color information of the nodes to construct the feature matrix of the graph structure.
[0087] (1) Node location features: The coordinates of the center position of the superpixel block obtained after processing by the SLIC algorithm are used as the location features of the nodes in the graph structure.
[0088] (2) Node color feature: Calculate the average LAB value of all pixels in each superpixel block as the node color feature.
[0089] (3) Node fusion features: Merge the position features and color features of each node to form a node fusion feature matrix.
[0090] The classification learning in step 4 in the offline phase of the method includes the following steps:
[0091] Step 4-1: Use three GIN graph convolution layers to aggregate the neighbor node feature vectors to update the node features, and use the ReLU activation function for nonlinear transformation after each GIN layer.
[0092] Step 4-2: Use a graph readout layer and select the global sum pooling method to aggregate all node information into a global feature vector representation of the entire graph. Add L2 regularization after graph pooling to prevent overfitting.
[0093] Step 4-3: Use an MLP multi-layer perceptron layer to perform nonlinear mapping on the aggregated feature vector, and add a Softmax layer after the MLP to achieve multi-classification.
[0094] The beneficial effects of the present invention are:
[0095] (1) The present invention adopts the method of removing singular points by using the local outlier factor (LOF), which takes into account the local density of the data and can effectively identify outliers in areas of different densities. It has good robustness to noise and non-uniformly distributed data, has relatively low computational complexity, and can quickly identify outliers.
[0096] (2) The present invention uses wavelet transform to convert time series data into a two-dimensional image, which can simultaneously provide time and frequency information, allowing the local characteristics of the time series data in the time and frequency domain to be revealed, and more intuitively reflecting the changes in the signal at different times and frequencies. This not only provides a richer data representation, but also enhances the interpretability and operability of the data.
[0097] (3) The present invention implements a method for constructing an image into a graph structure by superpixel segmentation based on the SLIC algorithm. This method preserves the color characteristics of the image. The image structuring helps capture the spatial relationships and high-level structure in the image, and the node selection method contributes to the stability and robustness of the graph structure. Furthermore, the SLIC algorithm is relatively simple, easy to implement, and has high computational efficiency.
[0098] (4) This paper uses a GIN graph isomorphism network for classification learning to achieve indoor location recognition and positioning. It enhances the distinguishing ability of graph structures, allowing the model to capture fine-grained differences in the graph, thereby improving the performance of graph-level classification tasks. It also adopts a message-passing mechanism, making it more efficient when processing large-scale graph data, which helps achieve more accurate indoor positioning. BRIEF DESCRIPTION OF THE DRAWINGS
[0099] In order to make the contents of the present invention more clearly understood, the present invention is further described in detail below based on specific embodiments in conjunction with the accompanying drawings.
[0100] Figure 1 : Specific flow chart of the algorithm of the present invention;
[0101] Figure 2 : The collected CSI signal amplitude containing 60 subcarriers;
[0102] Figure 3 : The result of CSI signal amplitude after LOF preprocessing;
[0103] Figure 4 : The CSI signal amplitude at different locations is mapped using wavelet transform;
[0104] Figure 5 : The process of constructing the adjacent edge matrix in the graph structure;
[0105] Figure 6 : The process of constructing node feature matrix in graph structure;
[0106] Figure 7 : The graph neural network model framework used in this invention. DETAILED DESCRIPTION
[0107] The present invention will be further described below in conjunction with the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solutions of the present invention and are not intended to limit the scope of protection of the present invention.
[0108] This experiment collected and measured positioning data in the indoor environment of the 7th floor of the Nanjing University of Posts and Telecommunications Research Building. A total of 35 reference position points (RPs) were selected, with each adjacent RP separated by 0.6 meters. In the experiment, the present invention selected two channels: two transmitting antennas transmitting signals and a computer with one receiving antenna receiving the signals. This generated a CSI amplitude fingerprint consisting of 60 subcarriers, with each position point containing 1000 data packets.
[0109] Figure 2 The figure shows multiple CSI signals collected from the same reference point. Each CSI signal consists of 60 subcarriers. During the collection process, various uncertainties may cause a few CSI signals to be significantly affected by noise, resulting in significant differences from other signals. Therefore, to improve signal quality, these affected signals require denoising or outlier processing.
[0110] This paper uses the Local Outlier Factor (LOF) algorithm to detect outliers or outliers in the CSI amplitude data containing 60 subcarriers and 1000 data packets. The core idea of the LOF algorithm is to compare the local density of a data point with the local density of its neighbors and identify whether a data point is an outlier based on the local density deviation. The specific CSI amplitude outlier detection process is as follows:
[0111] For each subcarrier's CSI amplitude value, calculate its distance to all other CSI amplitude values, find the CSI amplitude value closest to it, and calculate the LOF value. If the LOF value is larger, it means it is more abnormal, otherwise, if it is smaller, it means it is more normal. Specifically, first calculate the j-th CSI amplitude value Amp under the i-th subcarrier j The distance to other amplitude values is as follows:
[0112] dist k (Amp j )=d(Amp j ,Amp p )
[0113] Among them, Amp p Indicates the CSI amplitude value closest to the jth CSI amplitude value k, d(Amp j ,Amp p ) represents the Euclidean distance from the jth CSI amplitude value to the pth CSI amplitude value. Then, Amp is calculated according to the following formula: j to Amp p The reachable distance:
[0114] reachdist k (Amp j ,Amp p )=max{dist k (Amp j ),d(Amp j ,Amp p )}
[0115] Then calculate Amp based on the reachable distance j The local reachability density is the inverse of the average reachable distance of all CSI amplitude values in the k-neighborhood of the j-th CSI amplitude value. The specific formula is as follows:
[0116]
[0117] Among them, N k (j) represents Amp j Then calculate Amp j The local outlier factor is the ratio of the average local reachable density of all CSI amplitude values in the k-neighborhood of the j-th CSI amplitude value to the local reachable density of the j-th CSI amplitude value itself. The specific formula is as follows:
[0118]
[0119] If Amp jIf the LOF value of the j-th amplitude measurement value is much larger than 1, then the local density of the j-th amplitude measurement value is much smaller than the average local reachable density of all CSI amplitude values of the subcarrier in the k-neighborhood, and it can be determined as an abnormal point, otherwise it is a normal point.
[0120] Figure 3 This figure shows the results of outlier detection and filtering using the LOF algorithm based on CSI amplitude data from 1000 data packets and 60 subcarriers at the same reference point. As shown in the figure, the LOF algorithm identifies and removes outliers, making the distribution of CSI amplitude data more compact and data points closer to the central trend of the dataset. This improves the stability of data features and makes them change more smoothly at different time points or under different conditions.
[0121] Next, the CSI signal after outlier filtering is normalized, and all values are scaled to the interval [0, 1]. The normalization operation formula is as follows:
[0122]
[0123] Amp i Indicates the CSI amplitude value of the i-th subcarrier, Amp min Indicates the minimum value of the CSI amplitude, Amp max The CSI amplitude value represents the maximum value. The collected CSI amplitude values for 60 subcarriers are then merged to obtain a one-dimensional measurement data vector. The present invention uses the wavelet transform method in the time-frequency analysis method to convert the one-dimensional CSI amplitude sequence data into a two-dimensional time-frequency diagram.
[0124] The Morlet wavelet function is selected based on the fused one-dimensional CSI amplitude measurement value Amp, and the expression for calculating the wavelet transform coefficient is as follows:
[0125]
[0126] Where Amp represents the CSI amplitude measurement vector, represents the scaled and translated wavelet function, which is the daughter wavelet derived from the mother wavelet ψ(t). a* represents the scale parameter, which controls the scaling of the wavelet function. The scale a* is usually inversely proportional to the frequency. b* represents the translation parameter, which controls the position of the wavelet function. By varying the value of b*, the signal can be analyzed at different time points.
[0127] According to the definition of wavelet transform, the specific encoding steps of the CSI signal amplitude Amp(t) are as follows:
[0128] Step 1 Determine the following parameters: Signal length Amp len , sampling frequency samplerate , mother wavelet function Morlet, center frequency sliding step cenfre step ;
[0129] Step 2 Calculate the maximum center frequency Set the current center frequency cenfre now , initialize the time-frequency matrix;
[0130] Step 3: Based on the center frequency and wavelet function, the mother wavelet is scaled and translated in time and frequency to adapt to the different scales of the signal. For each scaled and translated mother wavelet, it is convolved with the time series data to obtain the time distribution vector of the current frequency, and then the time-frequency matrix is updated;
[0131] Step 4 determines whether the current center frequency is greater than the maximum center frequency. If so, output the time-frequency matrix; otherwise, update the current frequency cenfre now =cenfre now +cenfre step , then jump back to step 2.
[0132] A two-dimensional image is constructed based on the aforementioned wavelet coefficients. Following the steps above, the scaling factor a and translation parameter b are mapped onto a two-dimensional plane corresponding to the frequency and time parameters, respectively, to form a time-frequency matrix. Ultimately, a time-frequency plot of the signal is obtained, where the horizontal axis of the image represents time and the vertical axis represents frequency. Simultaneously, the two-dimensional matrix values are mapped to different color spaces using the "viridis" colormap from the matplotlib library. This is a continuous color gradient that starts in blue, gradually transitions to green, and finally to yellow. This color mapping maps the minimum value to blue, the intermediate value to green, and the maximum value to yellow, providing smooth transitions between blue, green, and yellow, thereby meticulously displaying the details and layers of the data. Figure 4 The following are the results of the CSI amplitude at three different reference points after being mapped using the wavelet transform method in this paper. As can be seen from the figure, the mapping results corresponding to the same reference point are quite similar, while the mapping results corresponding to different reference points are quite different.
[0133] Next, the present invention uses the SLIC (Simple Linear Iterative Clustering) algorithm to perform superpixel segmentation on the CSI time-frequency map obtained by the wavelet transform. The specific steps of the SLIC algorithm are as follows:
[0134] (1) Initialize the center point (cluster center): Convert the time-frequency graph obtained in step 2 from RGB space to LAB space. First, divide each channel value in the RGB space by 255 to convert it to a decimal between 0 and 1, and obtain R*=R / 255, G*=G / 255, B*=B / 255, where R, G, and B are the original color components. Then perform inverse gamma correction on each RGB channel value, and f(x) is the inverse gamma function, and obtain r*=f(R*), g*=f(G*), and b*=f(B*). Then convert the RGB color from the RGB color space to the XYZ color space using the following matrix multiplication: [X, Y, Z]=[M]*[r*, g*, b*], where M is a 3×3 matrix:
[0135]
[0136] Next, convert the XYZ color from the XYZ color space to the LAB color space. Calculate using the following formula:
[0137]
[0138] L'=116*f Y -16,A'=500×(f X -f Y ),B'=200×(f Y -f Z )
[0139] where X n ,Y n ,Z n is the standard value of the D65 reference white point, f X ,f Y ,f Z is the value of X, Y, Z after inverse gamma correction, L', A', B' is the final LAB color space value. The image of size N (the number of pixels is N) is divided into K super pixel blocks, and the range size of each super pixel block contains pixels, let For the length value of each pixel block, initialize the center point of each pixel block
[0140] (2) Gradient calculation and center point adjustment: Use the differential method to calculate the gradient and readjust the center point. Traverse the 8 pixel areas around the center point of the initial pixel block, calculate the pixel with the minimum gradient value, and use it as the new center point. The formula for differential gradient calculation is as follows:
[0141] Gradient(x,y)=dx(i,j)+dy(i,j);
[0142] dx(i,j)=I(i+1,j)-I(i,j);
[0143] dy(i,j)=I(i,j+1)-I(i,j);
[0144] Among them, (x, y) represents the initial pixel center coordinates, and (i, j) is used to represent the position index of the pixel points traversed during the gradient calculation process, dx(i, j) represents the gradient value along the x-axis at the pixel point (i, j), dy(i, j) represents the gradient value along the y-axis at the pixel point (i, j), and I(i, j) represents the weighted average grayscale value of the three RGB channels of the image at the pixel point (i, j).
[0145] (3) Pixel clustering and cluster center iteration: traverse the pixels in the 2S*2S neighborhood of the center of each superpixel block and calculate the distance from each superpixel block center. Use the K-means clustering algorithm to classify the pixels and use the transformed Euclidean distance formula to measure the distance. The distance measurement includes color distance and spatial distance. The formula is as follows:
[0146]
[0147] Among them, l i ,a i ,b i ,x i ,y i Represents the LAB color space value and position of the center point of each superpixel block, l j ,a j ,b j ,x j ,y j Represents the LAB color space value and position of the pixel point in the 2S*2S neighborhood, d c Represents color distance, d s Represents the spatial distance, N s is the maximum spatial distance within the cluster, N c is the maximum color distance within the cluster, take N c =m, and the fixed constant m (value range [1,40], generally 10) is the maximum possible distance in the LAB space. The final distance metric D' is as follows:
[0148]
[0149] Pixels are divided into the closest clusters based on the distance from the pixel point in the 2S*2S neighborhood to the center of each pixel block, and all pixels in the new cluster are averaged to obtain the new cluster center. Finally, the above steps are repeated until the error converges.
[0150] (4) Enhanced connectivity: Connectivity control is performed to address issues such as multi-connectivity in the iteratively completed clustering, small superpixel size, and a single superpixel being cut into multiple discontinuous superpixels. The main idea is to create a new label table with all elements being -1. Discontinuous superpixels and superpixels with small sizes are reassigned to adjacent superpixels in a "Z"-shaped direction (from left to right, from top to bottom). Traversed pixels are assigned to corresponding labels until all points are traversed.
[0151] In the clustering process of the SLIC algorithm, the present invention uses the center point of each cluster (superpixel block) as a node. These center points are the results after the iterative convergence of the clustering algorithm and also represent the position and characteristics of each superpixel block.
[0152] After the node selection is completed, the distance metric between nodes is used to construct the adjacency matrix of the graph structure. The Euclidean distance between the center point (node) of each superpixel block and other nodes is calculated as follows:
[0153]
[0154] Among them, Eij represents the Euclidean distance between the center points (nodes) of two superpixel blocks, and r', g', and b' respectively represent the color values of each pixel in the three channels of the node's color space. Based on the calculated Euclidean distance, the k-NN algorithm is used to find the k nearest neighbor nodes for each node, and an edge is established between the node and these k neighbor nodes. A two-dimensional adjacency matrix is constructed based on the adjacent edge relationship of the graph structure, and its rows and columns correspond to each node in the graph, and the elements in the matrix indicate whether there is an edge or connection between the nodes. If there is an edge between the nodes, the corresponding matrix element is set to 1, otherwise it is 0. The position and color information of the node are further used to construct the feature matrix of the graph structure. For each superpixel block, the center position is the node coordinate feature, and the color feature information of the node is obtained by calculating the average value of the LAB values of all pixels in each superpixel block. Specifically, the node feature matrix F in the graph structure can be expressed by the following formula:
[0155] F=(f1,f2,...,f n ) T
[0156]
[0157] Among them, f i represents the node feature vector of the i-th superpixel, N i represents the total number of pixels in superpixel i, (L j ,A j ,B j) represents the LAB color value of the j-th pixel, (X j ,Y j ) represents the position coordinates of the j-th pixel in the image. Figure 6 This is a specific method for constructing a node feature matrix, which fuses the node's position features and color features into a five-dimensional feature vector for subsequent network training.
[0158] Finally, this paper uses a model based on the GIN graph isomorphism network to learn graph structure classification. This model effectively captures and represents the graph's topology through a unique node feature aggregation mechanism. Through its unique aggregation mechanism, GIN enhances the expressive power of graph embeddings, enabling it to demonstrate higher performance and potential in tasks such as graph classification. Figure 7 The proposed GIN network architecture consists of three GIN layers, a Readout layer and an MLP layer. The input of the network architecture is the CSI amplitude information graph structure representation and corresponding node features constructed using superpixel segmentation technology.
[0159] First, we use the GIN graph convolution layer to aggregate the neighbor node feature vectors to update the node features. The superposition of multiple layers of graph convolution can more effectively capture the local structural information in the graph, and use the ReLU activation function for nonlinear transformation.
[0160] Next, for the graph classification task, we construct the embedding of the entire graph through the embedding of the nodes, that is, adding a Graph Readout operation, which is regarded as a graph pooling or graph coarsening process, mainly through global pooling or aggregation technology to integrate the updated features of all nodes in the graph into a single graph-level feature representation. Specifically, we use the global sum pooling method to summarize the feature vectors of all nodes, and then generate a global feature vector that can represent the entire graph, namely the graph embedding. This graph embedding captures the key information of all nodes in the graph and provides a comprehensive feature representation for the graph classification task. The READOUT function in the graph isomorphic neural network is the SUM function, which obtains the graph features of the iteration by summing the features of all nodes obtained in each iteration, and then splicing the graph features of each iteration to obtain the final graph features:
[0161]
[0162] Among them, t' represents the number of iterations, v represents the current node, h G Represents the characterization vector of each graph G, h vRepresents the representation vector for each node v. We concatenate the graph features from each iteration rather than adding them because the representations of nodes at different layers belong to different feature spaces. This readout operation reduces the number of nodes involved in graph classification, thereby reducing the number of parameters and redundant information the model needs to learn. This helps alleviate the model's computational burden and enables more efficient training and inference of subsequent multilayer perceptron (MLP) layers, thereby improving classification accuracy. To prevent overfitting, L2 regularization is added after graph pooling to improve model generalization.
[0163] Then, we aggregate the features of each node with the features of its neighboring nodes to obtain graph-level features, which are then fed into the multi-layer perceptron (MLP) layer. The MLP layer then performs nonlinear mapping on the aggregated feature vectors. The specific process is as follows:
[0164]
[0165] in, Represents the feature vector of node v at the t'th iteration, v represents the current node, u represents the adjacent node, MLP is a multi-layer perceptron, (t') is a learnable parameter, and N(v) is the set of neighbor nodes of node v. In addition, a Softmax layer is added after the multi-layer perceptron MLP for multi-classification problems. It normalizes the output of the MLP to obtain the final classification result.
[0166] The GIN network of the present invention demonstrates excellent performance by learning the global feature representation of the graph, highlighting its potential and value in analyzing complex graph structures and improving its accuracy in indoor positioning.
Claims
1. A channel state information indoor positioning method based on graph isomorphic network, characterized in that: The method comprises the following steps: (1) Offline stage Step 1: Data preprocessing, Preprocess the received channel state information CSI amplitude value for subsequent CSI image fingerprint construction. Step 2: CSI image construction, The pre-processed CSI amplitude value is transformed into a CSI image using the wavelet transform method. Step 3: Construction of the graph structure of the CSI image, Step 3-1: Use the SLIC algorithm to implement superpixel segmentation on the CSI image. Step 3-2: Select nodes of the graph structure based on the superpixel segmentation results. Step 3-3: Use the distance measurement between nodes to construct the adjacency matrix of the graph structure. Step 3-4: Use the position and color information of the nodes to construct the feature matrix of the graph structure. Step 4: Classification learning; Build a graph isomorphism network (GIN) for classification learning to obtain a location estimation model; (2) Online stage Step 1: Data preprocessing, Use the method of step 1 in the offline phase to preprocess the obtained CSI amplitude value. Step 2: CSI image construction, Using the method of step 2 in the offline phase, the CSI image is constructed using the preprocessed CSI amplitude values. Step 3: Construction of the graph structure of the CSI image, Using the method in step 3 of the offline phase, the graph structure of the CSI image is obtained. Step 4: Position estimation, Use the location estimation model obtained in step 4 of the offline phase to complete the location estimation; In the offline phase, step 4 classification learning includes the following steps: Step 4-1: Use three GIN graph convolution layers to aggregate neighbor node feature vectors to update node features, and use ReLU activation function for nonlinear transformation after each GIN layer. Step 4-2: Use a Graph Readout layer and select the global sum pooling method to aggregate all node information into a global feature vector representation of the entire graph, and add L2 regularization after the graph pooling to prevent overfitting. Step 4-3: Use an MLP multi-layer perceptron layer to perform nonlinear mapping on the aggregated feature vector, and add a Softmax layer after the MLP to achieve multi-classification.
2. The channel state information indoor positioning method based on graph isomorphic network according to claim 1, characterized in that: In the offline phase, step 1 data preprocessing includes the following steps: The basic concepts involved are as follows: (1) The distance between two CSI amplitude values d(Amp j ,Amp p ): represents the distance from the jth CSI amplitude value to the pth CSI amplitude value, (2) kth distance, dist k (Amp j ): From the jth CSI amplitude value, the distance between the kth closest CSI amplitude value and the jth CSI amplitude value from near to far is called the k-neighborhood distance of the jth CSI amplitude value. (3) kth distance neighborhood, N k (j): The k-th distance neighborhood of the j-th CSI amplitude value is all CSI amplitude values within the k-th distance, including the k-th distance. (4) Reachable distance, reachdist k (Amp j ,Amp p ): Select the maximum of the direct distance between the two CSI amplitude values and the k-th distance from the j-th CSI amplitude value as the reachable distance from the j-th CSI amplitude value. If the j-th CSI amplitude value is outside the k-neighboring distance of the p-th CSI amplitude value, then the reachable distance is the direct distance between the two CSI amplitude values. If the j-th CSI amplitude value is within the k-neighboring distance of the p-th CSI amplitude value, then the reachable distance is the k-th distance. (5) Local reachability density, lrd k (j): represents the inverse of the average reachable distance of the j-th CSI amplitude value. The average reachable distance is the sum of the distances in its k-neighborhood divided by the number of all CSI amplitude value measurements in the neighborhood. (6) Local outlier factor, LOF k (j): the ratio of the average local reachability density of all CSI amplitude values within the k-th distance neighborhood of the j-th CSI amplitude value to the local reachability density of the j-th CSI amplitude value, Step 1-2: Perform local outlier factor (LOF) detection on each subcarrier in the CSI amplitude measurement. For each subcarrier's CSI amplitude value, calculate its distance to all other CSI amplitude values, find the CSI amplitude value closest to it, and calculate the LOF value. If the LOF value is larger, it is more abnormal. Conversely, if it is smaller, it is more normal. First, calculate the j-th CSI amplitude value Amp under the i-th subcarrier. j The distance to other amplitude values is as follows: dist k (Amp j )=d(Amp j ,Amp p ), Among them, Amp p Indicates the CSI amplitude value closest to the jth CSI amplitude value k, d(Amp j ,Amp p ) represents the Euclidean distance from the jth CSI amplitude value to the pth CSI amplitude value. Secondly, Amp is calculated according to the following formula: j to Amp p The reachable distance: reachdist k (Amp j ,Amp p )=max{dist k (Amp j ),d(Amp j ,Amp p )}, Then calculate Amp based on the reachable distance j The local reachability density is the inverse of the average reachable distance of all CSI amplitude values in the k-neighborhood of the j-th CSI amplitude value. The specific formula is as follows: Among them, N k (j) represents Amp j The k-distance neighborhood of , and then calculate Amp j The local outlier factor is the average of the local reachable density of all CSI amplitude values in the k-neighborhood of the j-th CSI amplitude value. The local reachable density lrd of the j-th CSI amplitude value itself k The specific formula is as follows: If Amp j If the LOF value of the j-th amplitude value is much larger than 1, then the local density of the j-th amplitude value is much smaller than the average value of the local reachable density of all CSI amplitude values of the subcarrier in the k-neighborhood, and it is determined as an abnormal point, otherwise it is a normal point. Step 1-3: Filter out the CSI amplitude values detected as abnormal points in step 1-2. Step 1-4: Normalize the CSI signal after outlier filtering, scaling all values to the interval [0, 1]. The normalization formula is as follows: Amp i Indicates the CSI amplitude value of the i-th subcarrier, Amp min Indicates the minimum value of the CSI amplitude, Amp max Indicates the maximum value of the CSI amplitude.
3. The channel state information indoor positioning method based on graph isomorphic network according to claim 1, characterized in that: In the offline phase, step 2 of CSI image construction includes the following steps: Step 2-1: Select the Morlet wavelet function and calculate the expression of the wavelet transform coefficient as follows: Where Amp represents the CSI amplitude measurement vector, It represents the wavelet function after scaling and translation. It is the daughter wavelet obtained by operating the mother wavelet ψ(t). a* represents the scale parameter, which controls the scaling of the wavelet function. The scale a* is usually inversely proportional to the frequency. b* represents the translation parameter, which controls the position of the wavelet function. By changing the size of b*, the signal can be analyzed at different time points. Step 2-2: Construct a two-dimensional image. According to the scaling scale a* and translation parameter b* in step 2-1, the corresponding frequency and time parameters are mapped to the two-dimensional plane to form a time-frequency matrix. Finally, the time-frequency diagram of the signal is obtained, where the horizontal axis of the image represents time and the vertical axis represents frequency. Step 2-3: Use the colormap viridis in the matplotlib library to map the two-dimensional matrix values to different color spaces. It is a continuous color gradient that starts from blue, gradually transitions to green, and finally gradients to yellow. This color mapping maps the minimum value to blue, the middle value to green, and the maximum value to yellow, and provides a smooth transition between blue, green, and yellow, thereby meticulously showing the details and levels of the data.
4. The channel state information indoor positioning method based on graph isomorphic network according to claim 1, characterized in that: In the offline phase, step 3 of CSI graph structure construction includes the following steps: Step 3-1: Use the SLIC algorithm to implement superpixel segmentation on the CSI image. (1) Initialize the center point, i.e., the cluster center: Convert the time-frequency map obtained by the offline step 2 from RGB space to LAB space, and divide the image with N pixels into K superpixel blocks. The size of each superpixel block includes pixels, let For the length value of each pixel block, initialize the center point of each pixel block (2) Gradient calculation and center point adjustment: Gradient calculation is performed using the differential method. The center point is readjusted and the eight pixel areas around the center point of the initial pixel block are traversed. The pixel point with the minimum gradient value is calculated and used as the new center point. The formula for differential gradient calculation is as follows: Gradient(x,y)=dx(i,j)+dy(i,j); dx(i,j)=I(i+1,j)-I(i,j); dy(i,j)=I(i,j+1)-I(i,j); Among them, (x, y) represents the initial pixel center coordinates, and (i, j) is used to represent the position index of the pixel point traversed during the gradient calculation process, dx(i, j) represents the gradient value along the x-axis at the pixel point (i, j), dy(i, j) represents the gradient value along the y-axis at the pixel point (i, j), and I(i, j) represents the weighted average grayscale value of the three RGB channels of the image at the pixel point (i, j). (3) Pixel clustering and cluster center iteration: traverse the pixels in the 2S*2S neighborhood of the center of each superpixel block, calculate the distance from the pixels to the center of each superpixel block, classify the pixels with the help of the K-means clustering algorithm, and perform distance measurement using the transformed Euclidean distance formula. The distance measurement includes color distance and spatial distance. The formula is as follows: Among them, l i ,a i ,b i ,x i ,y i Represents the LAB color space value and position of the center point of each superpixel block, l j ,a j ,b j ,x j ,y j Represents the LAB color space value and position of the pixel point in the 2S*2S neighborhood, d c Represents color distance, d s Represents the spatial distance, N s is the maximum spatial distance within the cluster, N c is the maximum color distance within the cluster, take N c =m, the fixed constant m is the maximum distance in the LAB space, and the final distance metric D' is as follows: According to the distance between the pixel point in the 2S*2S neighborhood and the center of each pixel block, the pixels are divided into the closest clusters, and all the pixels in the new cluster are averaged to obtain the new cluster center. Finally, the above steps are repeated until the error converges. (4) Enhanced connectivity: Connectivity control is performed to address issues such as multi-connectivity in the iteratively completed clustering, small superpixel size, and a single superpixel being cut into multiple discontinuous superpixels. The main idea is to create a new label table with all elements being -1. Discontinuous superpixels and superpixels with small sizes are reassigned to adjacent superpixels in a "Z"-shaped direction from left to right and from top to bottom. The traversed pixel points are assigned to the corresponding labels until all points are traversed. Step 3-2: Select nodes of the graph structure based on the superpixel segmentation results. The center point of each cluster or superpixel block processed by the SLIC algorithm is used as a node. Step 3-3: Use the distance measurement between nodes to construct the adjacency matrix of the graph structure. (1) For each node in step 3-2, calculate the Euclidean distance between it and other nodes, as follows: Among them, E ij Represents the Euclidean distance between two nodes, r', g', b' respectively represent the color value of each pixel in the three channels of the RGB color space. (2) Use the k-NN algorithm based on the calculated Euclidean distance to find the k nearest neighbor nodes for each node, and establish an edge between the node and these k nearest neighbor nodes. (3) A two-dimensional adjacency matrix is constructed based on the adjacent edge relationship of the graph structure. Its rows and columns correspond to each node in the graph. The elements in the matrix indicate whether there is an edge or connection between the nodes. If there is an edge between the nodes, the corresponding matrix element is set to 1, otherwise it is 0. Step 3-4: Use the position and color information of the nodes to construct the feature matrix of the graph structure. (1) Node location features: The coordinates of the center position of the superpixel block obtained after SLIC algorithm processing are used as the location features of the nodes in the graph structure. (2) Node color feature: Calculate the average LAB value of all pixels in each superpixel block as the node color feature. (3) Node fusion features: Merge the position features and color features of each node to form a node fusion feature matrix.
Citation Information
Patent Citations
Target positioning method and system based on CSI amplitude-phase information composition
CN117041864A
CSI indoor positioning method and device based on graph neural network
CN117939402A