Indoor Positioning Method and System Based on the Fusion of Channel State Information and Deep Features

Through the improved ResNet structure and dual attention mechanism, CSI data feature extraction is optimized, combined with a weighted moving average filter, the problems of insufficient feature extraction and noise sensitivity in traditional indoor positioning technology are solved, and high-precision and stable indoor positioning effect are achieved.

CN120075998BActive Publication Date: 2025-08-05SHANGHAI UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510526126.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-04-25
Publication Date
2025-08-05
Estimated Expiration
2045-04-25

AI Technical Summary

Technical Problem

When processing CSI data, existing indoor positioning technology has insufficient feature extraction capabilities, gradient vanishing problems and noise sensitivity, resulting in insufficient positioning accuracy and stability, making it difficult to meet the needs of high-precision applications.

Method used

The improved ResNet structure is used to combine residual blocks and dual attention mechanisms to solve the gradient vanishing problem through jump connections, and to extract the feature weighted optimization of channel and spatial attention, and to perform timing smoothing processing with weighted moving average filters.

Benefits of technology

It realizes sub-meter-level positioning accuracy, improves the robustness and adaptability of the positioning system, reduces the amount of parameters and improves the inference speed, and is suitable for embedded device deployment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120075998B_ABST
    Figure CN120075998B_ABST
Patent Text Reader

Abstract

The present invention provides an indoor positioning method and system based on the fusion of channel state information and deep features, wherein the method includes step S1, using ESP32 to collect channel state information data; step S2, extracting the amplitude data of each subcarrier; step S3, preprocessing the amplitude data; step S4, extracting shallow features from the preprocessed data through an initial convolutional layer; step S5, extracting deep spatiotemporal features through a residual block group; step S6, sequentially performing channel attention weighting and spatial attention weighting on the deep feature map; step S7, mapping the weighted feature map to a two-dimensional coordinate space and outputting a positioning result; step S8, using a weighted moving average filter to perform temporal smoothing on the positioning result. The present invention utilizes a deep learning algorithm to optimize signal processing, adopts a CNN combined with a ResNet structure, and integrates the channel attention and spatial attention mechanisms, effectively improving positioning accuracy and system adaptability, and enhancing the generalization ability of the model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of wireless communications and indoor positioning, and in particular to an efficient indoor positioning method and system based on the fusion of channel state information (CSI) and depth features. Background Art

[0002] In today's digital age, indoor positioning technology plays a crucial role in numerous fields, including smart buildings, intelligent logistics, navigation, and commercial services. High-precision indoor positioning can provide users with precise navigation, optimize logistics and transportation routes, and enhance the personalized experience of commercial services. Among the various research directions in indoor positioning technology, positioning technology based on channel state information (CSI) has become a current focus in the field of high-precision indoor positioning.

[0003] As a fine-grained data source for the physical layer of wireless communications, CSI, compared to traditional Received Signal Strength Indicator (RSSI) technology, not only covers signal strength information but also captures deeper features such as carrier frequency, phase offset, and multipath components, opening up a richer dimension for indoor environmental perception. In Orthogonal Frequency Division Multiplexing (OFDM) systems, by deeply analyzing the amplitude and phase information of each subcarrier, CSI-based indoor positioning technology can accurately capture the multipath effects and environmental interference during signal propagation, laying the theoretical foundation for achieving high-precision indoor positioning.

[0004] However, current traditional indoor positioning methods present a series of significant challenges when processing CSI data. First, when it comes to feature extraction, traditional convolutional networks are clearly insufficient when dealing with the complex spatiotemporal features in CSI data. CSI data contains rich and complex spatiotemporal information, making it difficult for traditional convolutional networks to fully exploit its key features. This directly limits further improvements in positioning accuracy. Second, deep network training suffers from a serious vanishing gradient problem. As network depth increases, training becomes more difficult, making it difficult for the model to achieve stable convergence, significantly compromising the reliability of the positioning system. Finally, this technology is sensitive to noise. In indoor environments, factors such as human movement, dynamic changes in object position, and multipath effects continuously and dynamically alter channel characteristics, causing significant fluctuations in positioning results and making it difficult to meet the stability and accuracy requirements of practical applications.

[0005] While the CSI acquisition mechanism defined in the IEEE 802.11n / ac standards theoretically enables commercial Wi-Fi devices to achieve fine-grained channel response analysis and even support sub-meter positioning accuracy, in typical indoor scenarios, the ranging error of raw, unoptimized CSI data can reach as high as 2-3 meters, far from meeting the requirements of high-precision applications.

[0006] A search of patent documents revealed an invention patent with publication number CN 115209341 A, which discloses a weighted random forest indoor positioning method based on channel state information. The method includes: setting offline reference points within the positioning area, collecting channel state information, and extracting channel fingerprint features; extracting new channel fingerprint features from the offline reference points based on the channel state information; preprocessing the new channel fingerprint features of the offline reference points according to the offline transmitter selection principle to construct a channel fingerprint database; inputting the offline reference point coordinates and the new channel fingerprint features into a random forest for training, outputting two offline training models; extracting new channel fingerprint features from the target positioning point based on the channel state information; inputting the new channel fingerprint features of the target positioning point into the offline training models, and performing a weighted K-nearest neighbor algorithm for prediction to obtain the final predicted target positioning point coordinates. This patent does not utilize deep learning to extract features, but only uses random forest training. It does not incorporate optimization features such as convolution, residual blocks, and attention mechanisms for feature extraction, which may limit positioning accuracy and efficiency.

[0007] In summary, in response to the above-mentioned problems of the existing technology, studying an efficient indoor positioning method and system based on the fusion of channel state information and deep features has become a key task that needs to be solved urgently. Summary of the Invention

[0008] In view of the defects in the prior art, the purpose of the present invention is to provide an efficient indoor positioning method and system based on the fusion of channel state information and depth features.

[0009] According to the present invention, an indoor positioning method based on the fusion of channel state information and depth features includes the following steps:

[0010] Step S1, collecting channel state information data of Wi-Fi transceiver devices through multiple ESP32;

[0011] Step S2, extracting amplitude data of each subcarrier from the channel state information data;

[0012] Step S3, preprocessing the amplitude data to obtain preprocessed data;

[0013] Step S4, extracting shallow features from the preprocessed data through the initial convolution layer to obtain a shallow feature map;

[0014] Step S5, extracting deep spatiotemporal features from the shallow feature map through the residual block group to obtain a deep feature map;

[0015] Step S6, performing channel attention weighting and spatial attention weighting on the deep feature map in sequence to obtain a weighted feature map;

[0016] Step S7: Map the weighted feature map to a two-dimensional coordinate space through a fully connected layer and output the positioning result;

[0017] Step S8: Use a weighted moving average filter to perform time series smoothing on the positioning results.

[0018] Preferably, in step S1, the Wi-Fi module of ESP32 is used to collect channel state information data of the Wi-Fi transceiver device in accordance with the IEEE 802.11n / ac protocol. The ESP32 is connected to the router as a Station, and the channel state information data is collected by sending data packets to the router. The real location information corresponding to the channel state information data is synchronously recorded, and the channel state information data is stored in the SD card. The collection parameters of the channel state information data are set through preset configuration items.

[0019] Preferably, in step S2, the amplitude data of the subcarrier is calculated based on the real part and imaginary part of the subcarrier in the channel state information data. , is the real part of each subcarrier, is the imaginary part of each subcarrier.

[0020] Preferably, in step S3, the preprocessing includes the following sub-steps:

[0021] Step S3.1, use a 6th-order Butterworth low-pass filter to remove high-frequency noise with a cutoff frequency of 30 Hz;

[0022] Step S3.2: Use a sliding window to calculate the moving average to eliminate the static component. The sliding window length is set according to the sampling rate of 60 Hz.

[0023] In step S3.3, the denoised CSI data and position data are respectively normalized to the interval [0, 1] using the following formula: .

[0024] Preferably, in step S4, the initial convolution layer includes a 3×3 convolution kernel, a ReLU activation function, and a 2×2 maximum pooling operation.

[0025] Preferably, in step S5, the residual block group includes multiple residual blocks, each residual block includes: a skip connection path and a main path, the main path is: a 3×3 convolution layer, a ReLU activation function and a 2×2 maximum pooling layer connected in sequence; the skip connection path is: if the number of input channels of the main path is inconsistent with the number of output channels, the channel dimension is adjusted through a 1×1 convolution layer, and the adjusted main path output and the skip connection output are added element by element, and then output through a ReLU activation function, wherein the activation function ReLU introduces nonlinearity, and the maximum pooling reduces the size of the feature map by half, thereby reducing the computational complexity.

[0026] Preferably, step S6 includes the following sub-steps:

[0027] Step S6.1, channel attention weighting uses dual-path pooling: global average pooling and spatial maximum pooling are calculated in parallel for deep feature maps. Global average pooling takes the average along the spatial dimension to capture the overall features; spatial maximum pooling takes the maximum value along the spatial dimension to capture significant features. The results of dual-path pooling are reduced in dimension and transformed in the fully connected layer, and then weight generation is completed. The results of average pooling and maximum pooling are added together and activated by the Sigmoid function. Generate channel attention weights ,in is the input deep feature map, is the activation function, which outputs the attention weight of each channel [0,1];

[0028] Step S6.2, spatial attention weighting uses two-way compression: calculate the mean and maximum of the feature map along the channel dimension, then perform feature fusion, complete the two-way feature splicing, and generate spatial attention weights through convolution operation , complete the spatial feature weighting, multiply the channel attention weight and the spatial attention weight to output the weighted feature map.

[0029] Preferably, in step S7, the Huber loss function is used ,in, is the true value, is the predicted value, Set to 1.0. This is similar to mean squared error when the error is small and to absolute error when the error is large. It balances the error loss in coordinate regression tasks and is more robust to outliers. The optimizer uses the Adam optimization algorithm with an adaptive learning rate to promote stable Adam optimization.

[0030] Preferably, in step S8, the weighted moving average filter adopts a fixed window size, and the filtering calculation formula is: ,in, is the moment, weight coefficient w=[w0,w1,w2]=[0.5,0.3,0.2], is the window size, is currently The estimated value after weighted moving average filtering at each moment, yes The data value before the moment weighted average filtering.

[0031] The present invention also provides an indoor positioning system based on the fusion of channel state information and depth features, based on the above-mentioned indoor positioning method based on the fusion of channel state information and depth features, comprising:

[0032] Module M1, including multiple ESP32s, is used to collect channel status information data;

[0033] Module M2, including an embedded processor, is used to deploy a residual-attention model to process channel state information data and output positioning results;

[0034] Module M3 includes a weighted moving average filter module, which is used to perform post-processing optimization on the positioning results.

[0035] Compared with the prior art, the present invention has the following beneficial effects:

[0036] 1. This paper adopts an improved ResNet structure, introduces residual blocks based on traditional CNN, solves the gradient vanishing problem through skip connections, and optimizes feature extraction efficiency by adopting a multi-level pooling strategy.

[0037] 2. This invention adopts a dual attention mechanism, combining channel attention and spatial attention to dynamically assign feature weights. Channel attention optimizes channel-dimensional features through global averaging / max pooling, while spatial attention enhances spatial position correlation through convolution operations, effectively extracting spatiotemporal features from CSI data, thereby enhancing robustness to multipath effects and improving positioning accuracy.

[0038] 3. The present invention realizes end-to-end filtering, combines the traditional signal processing algorithm (WMA) with deep learning output, and seamlessly connects the model output with the signal processing algorithm, effectively suppressing noise.

[0039] 4. By optimizing the model structure, this invention reduces the number of parameters by about 25% and increases the inference speed by 1.5 times, making it suitable for deployment on embedded devices.

[0040] 5. Experiments show that the present invention can achieve sub-meter positioning accuracy in typical indoor scenarios, significantly improving positioning accuracy and robustness, and providing an efficient and reliable solution for indoor positioning. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] Other features, objects and advantages of the present invention will become more apparent upon reading the detailed description of non-limiting embodiments with reference to the following drawings:

[0042] Figure 1 This is a flow chart of a high-precision indoor positioning method based on the fusion of channel state information (CSI) and depth features in an embodiment of the present invention;

[0043] Figure 2 This is a schematic diagram of the CSI data acquisition hardware deployment in an embodiment of the present invention;

[0044] Figure 3 : is a residual block structure diagram in an embodiment of the present invention;

[0045] Figure 4 is the channel attention weight map in the embodiment of the present invention;

[0046] Figure 5 This is a spatial attention heat map in an embodiment of the present invention;

[0047] Figure 6 Comparison of the actual and predicted positions before WMA in an embodiment of the present invention;

[0048] Figure 7 This is the comparison between the actual and predicted positions after WMA in an embodiment of the present invention. DETAILED DESCRIPTION

[0049] The present invention will be described in detail below with reference to specific embodiments. The following examples will help those skilled in the art to further understand the present invention, but are not intended to limit the present invention in any form. It should be noted that, for those skilled in the art, several changes and improvements can be made without departing from the scope of the present invention. These all fall within the scope of protection of the present invention.

[0050] The present invention provides a high-precision indoor positioning method and system based on the fusion of channel state information (CSI) and deep features. This method aims to address the shortcomings of traditional indoor positioning technologies in terms of insufficient feature extraction capabilities, gradient vanishing problem, and noise sensitivity. The present invention utilizes deep learning algorithms to optimize signal processing, adopts a CNN combined with a ResNet structure, and integrates channel attention and spatial attention mechanisms to effectively improve positioning accuracy and system adaptability, thereby enhancing the generalization ability of the model.

[0051] Specifically, this paper proposes a deep learning model that combines a residual network (ResNet), an attention mechanism, and a weighted moving average filter (WMA) for high-precision indoor positioning based on channel state information (CSI). Specifically, an innovative three-level error compensation architecture is constructed:

[0052] (1) Deep residual feature extraction network: uses the improved ResNet structure for multi-level feature extraction and solves the gradient vanishing problem through skip connections;

[0053] (2) Dual attention mechanism: The channel attention module and the spatial attention module work together, and the channel attention module dynamically weights the subcarrier features and spatial regions;

[0054] (3) Weighted moving average post-processing: The predicted trajectory is smoothed in time by a weighted moving average filter, which can reduce the timing jitter of the positioning result.

[0055] This paper innovatively integrates dual-path normalization preprocessing and Huber loss function optimization. Through these measures, it effectively suppresses multipath effects and dynamic noise interference while maintaining a 25% parameter reduction and a 1.5-fold increase in inference speed.

[0056] Example 1:

[0057] Figure 1 This is a flowchart of a high-precision indoor positioning method based on the fusion of channel state information (CSI) and depth features in an embodiment of the present invention.

[0058] like Figure 1 As shown, this embodiment provides an indoor positioning method based on the fusion of channel state information (CSI) and depth features, including the following steps:

[0059] Step S1: Collect channel state information data of Wi-Fi transceiver devices through multiple ESP32s.

[0060] Specifically, the ESP32-based Wi-Fi module collects channel state information from Wi-Fi transceivers according to the IEEE 802.11n / ac protocol. The ESP32, acting as a station, connects to a router (AP) and sends data packets to the router to collect channel state information. The data is then recorded and stored on an SD card. Channel state information collection parameters are set using pre-configured configuration items.

[0061] Step S2: extracting the amplitude data of each subcarrier from the channel state information data.

[0062] Specifically, in step S2, the amplitude data of the subcarrier is calculated based on the real part and imaginary part of the subcarrier in the channel state information data. , is the real part of each subcarrier, is the imaginary part of each subcarrier.

[0063] Step S3: preprocess the amplitude data to obtain preprocessed data.

[0064] In this embodiment, the preprocessing includes Butterworth low-pass filtering denoising, sliding window elimination of static components, and dual-path normalization.

[0065] Specifically, in step S3, the preprocessing includes the following sub-steps:

[0066] Step S3.1, use a 6th-order Butterworth low-pass filter to remove high-frequency noise with a cutoff frequency of 30 Hz;

[0067] In step S3.2, a sliding window is used to calculate a moving average to eliminate the static component. The sliding window length is set according to the sampling rate of 60 Hz.

[0068] Specifically, if you use The moving average of each CSI is calculated using a sliding window of seconds. The length of the sliding window is In step S3.3, the denoised CSI data and position data are respectively normalized to the interval [0, 1] using Min-Max normalization.

[0069] In this embodiment, the formula is: ,The dual-path normalization design eliminates dimensional differences and improves the robustness of the model.

[0070] Step S4: extract shallow features from the preprocessed data through the initial convolution layer to obtain a shallow feature map.

[0071] Specifically, in step S4, the initial convolution layer includes a 3×3 convolution kernel, a ReLU activation function, and a 2×2 maximum pooling operation.

[0072] Step S5: extract deep spatiotemporal features from the shallow feature map through the residual block group to obtain a deep feature map.

[0073] In this embodiment, the residual block group performs deep feature extraction and performs addition operation, main path output + jump connection output → ReLU activation, and completes residual learning through convolution operation, activation function and jump connection to improve feature abstraction ability. becomes , simplify the optimization objectives, solve the gradient vanishing problem, allow the network depth to increase, and extract high-order spatiotemporal features.

[0074] Specifically, the residual block group contains multiple residual blocks, each residual block includes: a skip connection path and a main path. The main path is: a 3×3 convolution layer, a ReLU activation function, and a 2×2 maximum pooling layer connected in sequence; the skip connection path is: if the number of input channels of the main path is inconsistent with the number of output channels, the channel dimension is adjusted through a 1×1 convolution layer, and the adjusted main path output is added to the skip connection output element by element, and then output through the ReLU activation function. Among them, the activation function ReLU introduces nonlinearity, and the maximum pooling reduces the size of the feature map by half, reducing the computational complexity.

[0075] In step S6, channel attention weighting and spatial attention weighting are performed on the deep feature map in sequence to highlight key features and obtain a weighted feature map.

[0076] Specifically, step S6 includes the following sub-steps:

[0077] Step S6.1, channel attention weighting uses dual-path pooling: global average pooling and spatial maximum pooling are calculated in parallel for deep feature maps. Global average pooling takes the average along the spatial dimension to capture the overall features; spatial maximum pooling takes the maximum value along the spatial dimension to capture significant features. The results of dual-path pooling are reduced in dimension and transformed in the fully connected layer, and then weight generation is completed. The results of average pooling and maximum pooling are added together and activated by the Sigmoid function. Generate channel attention weights ,in is the input deep feature map, is the activation function, which outputs the attention weight of each channel [0, 1]. The channel attention module performs feature recalibration, dynamically enhances the characteristic response of important subcarriers, and suppresses noise.

[0078] Step S6.2, spatial attention weighting uses two-way compression: calculate the mean and maximum of the feature map along the channel dimension, then perform feature fusion, complete the two-way feature splicing, and generate spatial attention weights through convolution operation , completing spatial feature weighting, multiplying the channel attention weights and spatial attention weights to output the weighted feature map. The spatial attention module focuses on key spatial regions, strengthening key region detection in multipath signals and improving positioning accuracy.

[0079] In step S7, the weighted feature map is mapped to a two-dimensional coordinate space through a fully connected layer, and the positioning result is output to achieve coordinate regression.

[0080] Specifically, in step S7, the Huber loss function is used ,in, is the true value, is the predicted value, Set to 1.0. This is similar to mean squared error when the error is small and to absolute error when the error is large. It balances the error loss in coordinate regression tasks and is more robust to outliers. The optimizer uses the Adam optimization algorithm with an adaptive learning rate to promote stable Adam optimization.

[0081] In step S8, a weighted moving average filter (WMA) is used to perform temporal smoothing on the positioning results to improve the smoothness of the predicted trajectory and suppress instantaneous noise.

[0082] Specifically, in step S8, the weighted moving average filter uses a fixed window size (window size is 3) to traverse the time series data, and the filtering calculation formula is: ,in, is the moment, weight coefficient w=[w0,w1,w2]=[0.5,0.3,0.2], is the window size, is currently The estimated value after weighted moving average filtering at each moment, yes The data value before the moment weighted average filtering.

[0083] Example 2:

[0084] The present invention also provides an indoor positioning system based on the fusion of channel state information and depth features. The indoor positioning system based on the fusion of channel state information and depth features can be implemented by executing the process steps of the indoor positioning method based on the fusion of channel state information and depth features. That is, those skilled in the art can understand the indoor positioning method based on the fusion of channel state information and depth features as a preferred implementation of the indoor positioning system based on the fusion of channel state information and depth features.

[0085] Specifically, the indoor positioning system based on the fusion of channel state information and depth features is based on the indoor positioning method based on the fusion of channel state information and depth features in the above embodiment 1, including:

[0086] Module M1, including multiple ESP32s, is used to collect channel status information data;

[0087] Module M2, including an embedded processor, is used to deploy a residual-attention model to process channel state information data and output positioning results;

[0088] Module M3 includes a weighted moving average filter module, which is used to perform post-processing optimization on the positioning results.

[0089] Example 3:

[0090] Standard configuration implementation

[0091] See also Figures 1 to 7 , including the following steps:

[0092] Step 1: Data Collection: Place a router and multiple ESP32s in an indoor environment to collect CSI data from different locations and simultaneously record the actual location information.

[0093] Step 2: Preprocessing: The CSI data format is adjusted to suit the input requirements of the deep learning model. The adjusted CSI data undergoes Butterworth filtering, static component elimination, and Min-Max normalization. The position data is independently normalized, and a dual-path normalization design eliminates dimensional differences.

[0094] Step 3: Deep learning model training. First, a CNN model is used in combination with a ResNet module for feature extraction. The convolutional layer uses a 3×3 convolution kernel, ReLU activation, and outputs 32 channels; the residual block completes a 32→64→128 channel jump connection; the pooling layer uses two 2×2 maximum poolings, see Figure 3 We then used channel attention and spatial attention mechanisms to improve the model's feature representation capabilities. The channel attention module used a 128→8→128-dimensional fully connected structure with a reduction of 16. The spatial attention module performed a dual-channel fusion of 7×7 convolution kernels. The model was then trained and optimized using a loss function.

[0095] Step 4: Predict location coordinates. Use the trained model to predict the CSI data and obtain preliminary location information.

[0096] Step 5: WMA optimization: Use WMA to smooth the predicted position information.

[0097] Step 6: Positioning result output. Record the final smooth positioning coordinates, see Figure 7 , and perform error assessment.

[0098] Example 4:

[0099] Optimization and implementation of attention mechanism parameters for industrial plant scenarios

[0100] Step 1: Adjust the reduction in the channel attention module to 8 to improve feature utilization.

[0101] Step 2: The spatial attention module reduces the convolution kernel size and sets kernel_size to 5, so that the receptive field is small enough to adapt to the dense device environment.

[0102] Step 3: Adjust the training strategy. For the first 10 epochs, increase the learning rate linearly from 0.0001 to 0.001 to warm up the training. Adjust the batch size to 64 to improve training stability.

[0103] Attention weights see Figure 4 , 5.

[0104] Example 5:

[0105] Moving average filter enhancement implementation

[0106] Step 1: Data collection. In the experimental scenario, collect CSI data and record the real coordinates of multiple locations. Figure 2 .

[0107] Step 2: Data processing: Normalize the data to ensure consistent dimensions; train the CNN-ResNet model and adjust the learning rate strategy; use the trained model to make preliminary position predictions.

[0108] Step 3: Optimize the weighted moving average filter with different window sizes. Use different window sizes (such as 3, 5, and 7) to smooth the prediction results, compare the errors under different window sizes, and select the optimal parameters.

[0109] Step 4: Output the final positioning result.

[0110] Moving average filtering effect see Figure 6 , 7.

[0111] Those skilled in the art will appreciate that, in addition to implementing the system and its various devices, modules, and units provided by the present invention in purely computer-readable program code, it is entirely possible to implement the same functions of the system and its various devices, modules, and units provided by the present invention in the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers by logically programming the method steps. Therefore, the system and its various devices, modules, and units provided by the present invention can be considered a hardware component, and the devices, modules, and units included therein for implementing various functions can also be considered as structures within the hardware component; the devices, modules, and units for implementing various functions can also be considered as both software modules implementing the method and structures within the hardware component.

[0112] The above describes specific embodiments of the present invention. It should be understood that the present invention is not limited to the specific embodiments described above, and those skilled in the art may make various changes or modifications within the scope of the claims, which do not affect the essence of the present invention. The embodiments of this application and the features in the embodiments may be combined with each other in any manner unless there is a conflict.

Claims

1. An indoor positioning method based on the fusion of channel state information and depth features, characterized in that: The following steps are involved: Step S1, collecting channel state information data of Wi-Fi transceiver devices through multiple ESP32; Step S2, extracting amplitude data of each subcarrier from the channel state information data; In step S2, the amplitude data of the subcarrier is calculated based on the real and imaginary parts of the subcarrier in the channel state information data. , is the real part of each subcarrier, is the imaginary part of each subcarrier; Step S3, preprocessing the amplitude data to obtain preprocessed data; Step S4, extracting shallow features from the preprocessed data through an initial convolutional layer to obtain a shallow feature map; In step S4, the initial convolutional layer includes a 3×3 convolution kernel, a ReLU activation function, and a 2×2 maximum pooling operation; Step S5, extracting deep spatiotemporal features from the shallow feature map through the residual block group to obtain a deep feature map; In step S5, the residual block group includes multiple residual blocks, each residual block includes: a skip connection path and a main path, the main path is: a 3×3 convolution layer, a ReLU activation function and a 2×2 maximum pooling layer connected in sequence; the skip connection path is: if the number of input channels and the number of output channels of the main path are inconsistent, the channel dimension is adjusted through a 1×1 convolution layer, the adjusted main path output and the skip connection output are element-wise added, and then output through a ReLU activation function, wherein the activation function ReLU introduces nonlinearity, and the maximum pooling reduces the size of the feature map by half; Step S6, performing channel attention weighting and spatial attention weighting on the deep feature map in sequence to obtain a weighted feature map; Step S7, mapping the weighted feature map to a two-dimensional coordinate space through a fully connected layer, and outputting a positioning result; Step S8: Using a weighted moving average filter to perform time series smoothing on the positioning result.

2. The indoor positioning method based on the fusion of channel state information and depth features according to claim 1, characterized in that: In step S1, the Wi-Fi module of ESP32 is used to collect channel state information data of the Wi-Fi transceiver device in accordance with the IEEE 802.11n / ac protocol. The ESP32 is connected to a router as a station, and data packets are sent to the router to collect channel state information data. The real location information corresponding to the channel state information data is simultaneously recorded. The channel state information data is stored in an SD card, and the collection parameters of the channel state information data are set through preset configuration items.

3. The indoor positioning method based on the fusion of channel state information and depth features according to claim 1, characterized in that: In step S3, the preprocessing includes the following sub-steps: Step S3.1, use a 6th-order Butterworth low-pass filter to remove high-frequency noise with a cutoff frequency of 30 Hz; Step S3.2: Use a sliding window to calculate the moving average to eliminate the static component. The sliding window length is set according to the sampling rate of 60 Hz. In step S3.3, the denoised channel state information data and position data are respectively normalized to the interval [0, 1] using the following formula: .

4. The indoor positioning method based on the fusion of channel state information and depth features according to claim 1, characterized in that: The step S6 includes the following sub-steps: Step S6.1, channel attention weighting uses dual-path pooling: global average pooling and spatial maximum pooling are calculated in parallel for the deep feature map. The global average pooling takes the mean along the spatial dimension to capture the overall features; the spatial maximum pooling takes the maximum value along the spatial dimension to capture the significant features. The results of the dual-path pooling are reduced in dimension and transformed in the fully connected layer, and then the weight generation is completed. The results of the average pooling and the maximum pooling are added together and activated by the Sigmoid function. Generate channel attention weights ,in is the input deep feature map, is the activation function, which outputs the attention weight of each channel [0,1]; Step S6.2, spatial attention weighting uses two-way compression: calculate the mean and maximum of the feature map along the channel dimension, then perform feature fusion, complete the two-way feature splicing, and generate spatial attention weights through convolution operation , complete the spatial feature weighting, multiply the channel attention weight and the spatial attention weight to output the weighted feature map.

5. The indoor positioning method based on the fusion of channel state information and depth features according to claim 1, characterized in that: In step S7, the Huber loss function is used ,in, is the true value, is the predicted value, When set to 1.0, the optimizer uses the Adam optimization algorithm with adaptive learning rate to promote stable Adam optimization.

6. The indoor positioning method based on the fusion of channel state information and depth features according to claim 1, characterized in that: In step S8, the weighted moving average filter adopts a fixed window size, and the filter calculation formula is: ,in, is the moment, weight coefficient w=[w0,w1,w2]=[0.5,0.3,0.2], is the window size, is currently The estimated value after weighted moving average filtering at each moment, yes The data value before the moment weighted average filtering.

Citation Information

Patent Citations

  • Weighted random forest indoor positioning method based on channel state information

    CN115209341A

  • Fingerprint indoor positioning method based on attention enhancement mechanism and depth divisible convolution

    CN117528769A