A wireless indoor people counting method based on complex domain channel state information
By extracting multiple feature vectors from the complex domain channel state information and combining with the CNN network, the problem of single features of the existing CSI method is solved, and high-accuracy wireless indoor number statistics are achieved to adapt to different environments and pedestrian speeds.
Patent Information
- Application Number
- CN202310278469.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-21
- Publication Date
- 2025-08-29
- Estimated Expiration
- 2043-03-21
AI Technical Summary
The existing CSI matrix-based amplitude or phase difference statistics method has a single feature, low accuracy, and cannot effectively reflect the impact of the number of active people on channel state information.
The complex domain channel state information is used to eliminate outliers of the amplitude information through the Butterworth filter, the phase difference is calibrated using linear phase fitting, and multiple feature vectors are extracted, including variance, extreme difference, time-frequency domain probability and incremental feature values, and the number of people is counted in combination with the CNN network.
The accuracy of the number of people statistics has been improved to 94.7%, and the probability of an estimated number of people errors is less than or equal to 1 is 100%, which enhances the robustness and adaptability of the system and reduces equipment costs.
Smart Images

Figure CN116340821B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of wireless communication people counting, and in particular relates to a wireless indoor people counting method based on complex domain channel state information. Background Art
[0002] The basic concept of people counting is to determine whether there is human activity within the detection area and the number of people involved. It has significant application value in indoor services such as intrusion detection, child and elderly safety, and emergency response. Traditional people counting technologies require specialized equipment such as infrared receivers, cameras, and RFID tags. These technologies are costly, inconvenient for users, and raise serious privacy concerns. Wi-Fi devices are widely deployed and low-cost. Wi-Fi-based people counting methods are a device-free people detection solution. This means that testers do not need to wear wireless transceivers, and the test environment does not require specialized transceiver equipment.
[0003] In the past few years, a large number of people counting applications based on received signal strength indicator (RSSI) have emerged. However, RSSI is a coarse-grained measurement that is subject to significant fluctuations due to multipath propagation, reducing detection accuracy. Channel state information (CSI), on the other hand, can reflect multipath effects. Its amplitude and phase information can reveal fine-grained signal variations, enabling more accurate people counting. Current CSI-based people counting methods use amplitude or phase difference information, which is a single dimensionality and results in low accuracy. Summary of the Invention
[0004] In view of the problem that existing work extracts features from the amplitude or phase difference of the CSI matrix, the features used are single and cannot fully reflect the impact of the number of active people on the CSI, and the accuracy is not ideal, the present invention provides an indoor people counting method.
[0005] In order to achieve the above object, the present invention adopts the following technical solutions:
[0006] A wireless indoor people counting method based on complex domain channel state information comprises the following steps:
[0007] Step 1: extract complex domain channel state information from the Wi-Fi device and perform denoising preprocessing on the original complex domain channel state information based on amplitude and phase difference;
[0008] Step 2: Extract feature vectors from the pre-processed complex domain channel state information. The CSI obtained under different activity numbers shows significant differences in the extracted features.
[0009] Step 3: Input the different feature vectors obtained in step 2 into different CNN networks, add a weight layer to adjust the output of each network, and the output result of the weight layer is the counted number of people.
[0010] Furthermore, the specific method of performing denoising preprocessing on the original complex domain channel state information from the amplitude and phase difference in step 1 is: performing outlier elimination on the amplitude information in the complex domain channel state information through a Butterworth filter; and performing linear phase denoising fitting on the phase difference information in the complex domain channel state information. The transformation formula is:
[0011]
[0012]
[0013] in, represents the fitted value of the delay caused by the symbol time offset on the i-th packet, M represents the total number of antennas at the receiving end, N represents the number of subcarriers under OFDM modulation, m represents the antenna index, and n represents the subcarrier index; represents the original phase response of the nth subcarrier on the ith packet received by the mth antenna, f δ is the frequency spacing of subcarriers under OFDM modulation, ρ represents the linear fitting time offset result, and β represents the fitting residual; (m,n) is the CSI phase after fitting.
[0014] Furthermore, the specific method of extracting the feature vector from the pre-processed complex domain channel state information in step 2 is:
[0015] Calculate the variance and range of the complex domain on each subcarrier in the CSI data packet within the sliding time window to form the first eigenvector, specifically:
[0016] Feature=[Var1,R1,Var2,R2,...,Var ML ,R ML ]
[0017] Var i×m =Var[Re(H m,i,1 ),Re(H m,i,2 ),...,Re(H m,i,L )]
[0018] +Var[Im(H m,i,1 ),Im(H m,i,2 ),...,Im(H m,i,L )]
[0019] R i×m =max[|Hm,i,1 |,...,|H m,i,L |]-min[|H m,i,1 |,...,|H m,i,L |]
[0020] Among them, Feature represents the feature vector, Var[x] represents the variance of x; R[x] represents the range of vector x; Var i×m Represents the i×mth variance in the eigenvector, Re[x] represents the real part of x, H m,i,l represents the lth packet received on the ith subcarrier of the mth antenna. The sliding window includes L frames of CSI. The total number of receiving antennas is M. Im[x] represents the imaginary part of x. R i×m Represents the i×mth range in the feature vector;
[0021] Perform a fast Fourier transform on the CSI data packet within the sliding time window to obtain a time-frequency domain matrix. Then calculate the probability of the frequency point within this time range to form the second eigenvector, which is:
[0022] Feature=[P1(f5),...,P M (f5),P1(f6),...,P M (f6),P1(f 50 ),...,P M (f 50 )]
[0023] Among them, P m (f i ) represents the probability value of the mth antenna when the sliding window frequency is i Hz;
[0024] P(f i )=sum(TF m [i,:]) / sum[TF m ]
[0025] TF m represents the time-frequency matrix formed by the mth pair of antennas; the collected CSI data contains data streams. Since the amplitude of the time-frequency matrix of each pair of antennas needs to be added during the above feature extraction, the number of eigenvectors of the extracted CSI data is L, where L represents the number of sliding windows;
[0026] Extract the subcarrier correlation matrix of the real and imaginary parts of the CSI data packet in the sliding time window as the feature matrix, calculate the incremental eigenvalues of the real and imaginary parts of the CSI relative to the previous time sliding window, and form the third eigenvector: Feature = [Δλ Re ,Δλ Im ].
[0027] Compared with the prior art, the present invention has the following advantages:
[0028] This method combines amplitude and phase difference information, extending the analysis of CSI information from the real domain to the complex domain. This method achieves an accuracy of 94.7%, with a 100% probability that the estimated number of people is less than or equal to 1. This improves accuracy by 8.2% compared to existing methods based on CSI amplitude. Extracting feature vectors from the complex domain improves robustness and adapts to different environments and pedestrian speeds. This method significantly reduces equipment cost and application difficulty, effectively utilizing complex domain channel state information for indoor occupancy estimation. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] Figure 1 Flowchart of an indoor people counting method according to an embodiment of the present invention;
[0030] Figure 2 This is the flow chart of the CSI amplitude and phase denoising preprocessing in this example;
[0031] Figure 3 Schematic diagram of feature extraction for pre-processed CSI;
[0032] Figure 4 Flowchart for inputting features into CNN and obtaining the result of people counting through the weight layer.
[0033] Figure 5 This is the scene diagram of the indoor people counting method in this example;
[0034] Figure 6 A confusion matrix plot to visualize the accuracy of the headcount in this example;
[0035] Figure 7 It is the CSI amplitude diagram received by the three antennas at the receiving end;
[0036] Figure 8 is the CSI phase diagram received by the three antennas at the receiving end;
[0037] Figure 9 The I domain and Q domain diagrams of the CSI received by the receiver. DETAILED DESCRIPTION
[0038] Existing work extracts features from the amplitude or phase difference of the CSI matrix. However, the features used are limited and cannot fully reflect the impact of the number of active people on the CSI, resulting in suboptimal accuracy. Building on this existing work, the present invention analyzes complex CSI data to combine amplitude and phase difference information, extending the analysis of CSI information from the real domain to the complex domain. This extracts more features from the CSI complex domain and inputs them into a CNN, which then outputs a headcount result. The present invention can use commercial Wi-Fi equipment to effectively extract complex-domain channel state information from the system's coverage area, thereby estimating the number of people within the detection area.
[0039] Example 1
[0040] Step 1: Obtain multiple domain commercial Wi-Fi information from commercial Wi-Fi devices. In order to calculate the number of people in real time, set a sliding window to segment the received CSI.
[0041] Due to hardware imperfections, outliers may appear in the CSI. A Butterworth filter is used to eliminate outliers from the amplitude information in the complex domain channel state information.
[0042] The CSI phase collected by commercial Wi-Fi devices often exhibits signal distortion due to various offsets, including sampling frequency offset (SFO), packet detection delay (PDD), and carrier frequency offset (CFO). SFO and CFO are caused by unsynchronized frequency oscillators or Doppler shift between the transmitter and receiver, while PDD occurs when the receiver fails to detect a packet in a timely manner. Therefore, a linear phase fitting method is used to calibrate the phase of the interfered CSI.
[0043] The transformation formula is
[0044]
[0045]
[0046] in, represents the fitted value of the delay caused by the symbol time offset on the i-th packet, M represents the total number of antennas at the receiving end, N represents the number of subcarriers under OFDM modulation, m represents the antenna index, and n represents the subcarrier index; (m,n) represents the original phase response of the nth subcarrier on the ith packet received by the mth antenna, f δ is the frequency spacing of subcarriers under OFDM modulation, ρ represents the linear fitting time offset result, and β represents the fitting residual; (m,n) is the CSI phase after fitting.
[0047] This transformation eliminates random phase errors, but the linear calibration method does not give the exact true phase. Instead, the fluctuation of the true phase can be restored through linear transformation.
[0048] Step 2: Extract three eigenvectors with significant differences under different number of active people from the preprocessed complex domain channel state information.
[0049] (1) Calculate the variance and range of the complex domain on each subcarrier in the CSI data packet within the sliding time window to form the first eigenvector;
[0050] Feature=[Var1,R1,Var2,R2,L Var i ,R i ]
[0051] Var i =Var[Re(H i,1 ),Re(H i,2 )L Re(H i,L )]
[0052] +Var[Im(H i,1 ),Im(H i,2 )L Im(H i,L )]
[0053] R i =max[H i,1 |L|H i,L |]-min[H i,1 |L|H i,L |]
[0054] Among them, Feature represents the feature vector, Var[x] represents the variance of x; R[x] represents the range of vector x; Var i×m Represents the i×mth variance in the eigenvector, Re[x] represents the real part of x, H m,i,l represents the lth packet received on the ith subcarrier of the mth antenna. The sliding window includes L frames of CSI. The total number of receiving antennas is M. Im[x] represents the imaginary part of x. R i×m Represents the i×mth range in the feature vector;
[0055] (2) Perform fast Fourier transform on the CSI data packet in the sliding time window to obtain the time-frequency domain matrix,
[0056] Feature=[P1(f5),...,P M (f5),P1(f6),...,P M (f6),P1(f 50 ),...,P M (f50 )]
[0057] Where P(f i ) represents the probability value when the sliding window frequency is i Hz;
[0058] P(f i )=sum(TF[i,:]) / sum[TF]
[0059] Among them, P m (f i ) represents the probability value of the mth antenna when the sliding window frequency is i Hz
[0060] P(f i )=sum(TF m [i,:]) / sum[TF m ]
[0061] TF m represents the time-frequency matrix formed by the mth pair of antennas; the collected CSI data contains data streams. Since the amplitude of the time-frequency matrix of each pair of antennas needs to be added during the above feature extraction, the number of eigenvectors of the extracted CSI data is L, where L represents the number of sliding windows;
[0062] Then calculate the probability of the frequency point within this time range to form the second eigenvector;
[0063] (3) Extract the subcarrier correlation matrix of the real and imaginary parts of the CSI data packet within the sliding time window as the characteristic matrix, and calculate the incremental characteristic value Δλ of the real and imaginary parts of the CSI relative to the previous time sliding window Re ,Δλ Im , as the third eigenvector.
[0064] Feature=[Δλ Re ,Δλ Im ]
[0065] Step 3, in order to avoid interference between different feature vectors, different features are input into the CNN model for training. The number of input layer nodes of each CNN neural network is equal to the number of features of each type, and the number of nodes in the two hidden layers satisfies the empirical formula, where m and n are the number of nodes in the input layer and the output layer respectively, and a is a constant between 1 and 10. The output layer result of the network is the number of people corresponding to the training process. After the CNN network model is trained once, the optimizer updates the network weights according to the preprocessed training wireless data until the training cycle of the CNN network model is greater than or equal to the preset training cycle. The training of the CNN network model is completed. The loss function for training the CNN network model is the cross entropy function, and the optimizer for training the CNN network model is an adaptive moment estimation optimizer.
[0066] The outputs of different networks are usually inconsistent, so a weight layer is added to adjust the weights of different outputs. The output of the CNN is weighted and approximated by the weight layer to obtain the final people counting result.
[0067] Figure 5 The following diagram shows the scenario of the people counting method used in this example. To achieve a universal indoor environment, this embodiment of the present invention selects an empty room as the experimental environment. The receiving end uses four omnidirectional antennas, which are connected to a router via a coaxial cable. The transmitting end is configured with a single antenna. In fact, mobile devices that support the 802.11ac protocol, such as mobile phones and tablets, can be used as transmitters without the need for additional protocols or the installation of antenna arrays. The detection area is a 10m×10m area between the receiving and transmitting ends. Volunteers walk at a normal speed within the detection area.
[0068] During the test, the number of active people ranged from 0 to 4, with volunteers walking in random directions at an average speed of 1.2 m / s. The final results showed that the accuracy of the headcount reached 94.7%, and the probability of the headcount error being less than or equal to 1 was 100%. Clearly, the technical solutions and methods of the present invention are effective and efficient in improving the accuracy of wireless indoor people counting.
[0069] In summary, current commercial Wi-Fi devices have the problem of asynchrony between the transmitter and receiver. The phase difference of CSI always contains additional delay, of which the symbol time offset (STO) and the symbol frequency offset (SFO) are the two main sources. STO comes from the residual of the symbol synchronization module in the receiver after starting the detection data frame, and SFO comes from the sampling frequency asynchrony between the receiver and the transmitter. These two factors have a great impact on the CSI phase difference and are difficult to eliminate, so the phase difference is generally difficult to reflect the number of people. The present invention proposes a linear phase denoising algorithm based on the characteristics that the additional phase caused by STO is the same on specific subcarriers across antennas and SFO does not change in a short time, eliminating the influence of STO and SFO. At the same time, the error introduced by the packet detection delay can also be eliminated by this algorithm. The phase difference after linear phase denoising can effectively reflect the number of people information, and thus be used for feature extraction. This example combines CSI real domain and complex domain information to improve the accuracy and robustness of headcount.
[0070] Included in the accompanying drawings are flow charts and frame diagrams, illustrating the systems and methods of the embodiments of the present disclosure. The boxes therein represent a module, a program segment or a portion of a code, and the module described may contain one or more logical functions for implementing the specified functions. It should also be noted that when some replacements are implemented, the named functions may be in a different order than the order marked in the accompanying drawings. For example, the functions represented by two parallel boxes may also be executed basically in sequence, and may be executed in the opposite order in some cases, depending on the functions involved. In addition, the boxes and combinations of boxes in the block diagram or flow chart can be used not only to perform the specified functions but also to be implemented in a specified combination of specialized hardware and computers.
[0071] The units used to describe the embodiments of the present disclosure may be implemented by software, for example, and may also be implemented by programmable hardware.
[0072] Any matters not described in detail in this specification are prior art known to those skilled in the art. Although the above description of the present invention is based on specific embodiments to facilitate understanding of the present invention by those skilled in the art, it should be understood that the present invention is not limited to the scope of the specific embodiments. As long as various modifications are within the spirit and scope of the present invention as defined and determined by the appended claims, such modifications will be obvious to those skilled in the art, and all inventions and creations utilizing the concepts of the present invention are protected.
Claims
1. A wireless indoor people counting method based on complex domain channel state information, characterized by: The following steps are involved: Step 1: extract complex domain channel state information from the Wi-Fi device and perform denoising preprocessing on the complex domain channel state information based on amplitude and phase difference; Step 2: extracting feature vectors from the preprocessed complex domain channel state information; Calculate the variance and range of the complex domain on each subcarrier in the CSI data packet within the sliding time window to form the first eigenvector; Perform a fast Fourier transform on the CSI data packet within the sliding time window to obtain a time-frequency domain matrix. Then calculate the probability of the frequency point within this time range to form the second eigenvector. Extract the subcarrier correlation matrix of the real and imaginary parts of the CSI data packet in the sliding time window as the characteristic matrix, calculate the incremental eigenvalues of the real and imaginary parts of the CSI relative to the previous time sliding window, and form the third eigenvector; Step 3: Input the different feature vectors obtained in step 2 into different CNN networks, add a weight layer to adjust the output of each network, and the output result of the weight layer is the counted number of people.
2. The method for wireless indoor people counting based on complex domain channel state information according to claim 1, characterized in that: The specific method of performing denoising preprocessing on the complex domain channel state information based on amplitude and phase difference in step 1 is: The Butterworth filter is used to eliminate outliers in the amplitude information of the complex domain channel state information; the linear phase denoising fitting is performed on the phase difference information in the complex domain channel state information. The transformation formula is: ; ; in, represents the fitted value of the delay caused by the symbol time offset on the i-th packet, M represents the total number of antennas at the receiving end, N represents the number of subcarriers under OFDM modulation, m represents the antenna index, and n represents the subcarrier index; represents the original phase response of the nth subcarrier on the ith packet received by the mth antenna, is the frequency spacing of subcarriers under OFDM modulation, ρ represents the linear fitting time offset result, and β represents the fitting residual; is the CSI phase after fitting.
3. The wireless indoor people counting method based on complex domain channel state information according to claim 1, characterized in that: The specific method of step 2 of extracting the feature vector from the pre-processed complex domain channel state information is as follows: Calculate the variance and range of the complex domain on each subcarrier in the CSI data packet within the sliding time window to form the first eigenvector, specifically: ; Among them, Feature Ⅰ Represents the eigenvector, Var x represents the variance of x; R x represents the range of vector x; Represents the i×mth variance in the eigenvector, Re(x) represents the real part of x, represents the lth packet received on the i-th subcarrier of the m-th antenna. The sliding window includes L frames of CSI. The total number of receiving antennas is M. Im(x) represents the imaginary part of x. Represents the i×mth range in the feature vector; Perform fast Fourier transform on the CSI data packet within the sliding time window to obtain the time-frequency domain matrix. Then calculate the probability of the frequency point within this time range to form the second eigenvector, which is: ; in Indicates that the mth antenna has a sliding window frequency of Probability value at Hz; ; represents the time-frequency matrix formed by the mth pair of antennas. Since the amplitudes of the time-frequency matrices of each pair of antennas need to be added when extracting the second eigenvector, the number of eigenvectors of the extracted CSI data is K, where K represents the number of sliding windows. Extract the subcarrier correlation matrix of the real and imaginary parts of the CSI data packet in the sliding time window as the characteristic matrix, calculate the incremental eigenvalues of the real and imaginary parts of the CSI relative to the previous time sliding window, and form the third eigenvector: .
Citation Information
Patent Citations
CSI-based people number identification method, apparatus and device, and computer storage medium
CN111753686A
KR20210082749A