Indoor people counting method based on ultra-wideband channel impulse response

By employing an ultra-wideband channel impulse response-based method, utilizing channel impulse response data preprocessing, difference value calculation, and principal component analysis, combined with a support vector machine classifier, accurate, efficient, and reliable indoor people counting is achieved. This solves the privacy leakage and interference problems in existing technologies and is applicable to various scenarios.

CN120849937APending Publication Date: 2025-10-28NANJING TECH UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511011026.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-22
Publication Date
2025-10-28

AI Technical Summary

Technical Problem

Existing indoor headcount methods suffer from problems such as privacy violations, susceptibility to light interference, high costs, inability to detect stationary individuals, and signal interference from multipath effects, making it difficult to achieve accurate, efficient, and reliable indoor headcount statistics.

Method used

A method based on ultra-wideband channel impulse response is adopted. By preprocessing, filtering, calculating the difference value, performing principal component analysis, and constructing a support vector machine classifier on the collected channel impulse response data, key features related to changes in the number of people are extracted, thereby achieving accurate indoor people counting.

Benefits of technology

It effectively removes the influence of noise and indoor background environment, improves the accuracy of statistics and anti-interference ability, avoids the risk of privacy leakage, and is suitable for various scenarios such as smart homes, commercial venues and public safety. The method is simple, efficient, low-cost, and easy to expand and integrate.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure FT_1
    Figure FT_1
  • Figure FT_2
    Figure FT_2
  • Figure FT_3
    Figure FT_3
Patent Text Reader

Abstract

The invention provides an indoor people counting method based on ultra wide band channel impulse response (UWB CIR), and belongs to the field of context awareness. According to the method, CIR signals in an indoor environment are collected, and a series of operations such as preprocessing, sample screening, difference and principal component analysis (PCA) are performed, so that a first principal component vector is extracted as a key feature; and finally, carrying out accurate statistics on the number of indoor people by utilizing a machine learning classifier. According to the method, the influence of noise and an indoor background environment can be effectively removed, key features related to the change of the number of people are extracted, and high-precision indoor number of people classification is realized through a support vector machine (SVM) classifier. The method is suitable for various scenes such as smart home, location service and public security, and has the advantages of high accuracy, strong anti-interference capability and good privacy protection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of context awareness, specifically relating to an indoor people counting method based on ultra-wideband channel impulse response. Background Technology

[0002] Accurate occupancy statistics are crucial in fields such as smart homes, location services, and public safety. For example, in smart homes, occupancy information helps intelligent systems adjust lighting, temperature, and ventilation equipment according to demand, achieving efficient energy use and personalized environmental optimization. In commercial venues, businesses can rationally plan promotional activities and adjust display layouts based on the distribution of people at different times, thereby improving customer experience and business efficiency. In public safety, in densely populated places such as large event venues and transportation hubs, accurate occupancy information can provide crucial data for rescue personnel in the event of an emergency, helping them quickly formulate evacuation plans and maximize the safety of people.

[0003] Currently, indoor headcount counting methods are mainly divided into two categories: device-based and deviceless. Common technologies include RFID, vision-based methods, infrared sensors, CO2 sensors, and WiFi CSI, but these methods all have certain limitations, such as privacy violations, susceptibility to light interference, high cost, inability to detect stationary people, and susceptibility to multipath interference. Ultra-wideband (UWB) technology has wide bandwidth characteristics and strong anti-multipath interference capabilities, which makes UWB show great potential in deviceless headcount systems. UWB channel impulse response (CIR) can accurately capture the propagation changes of signals in complex environments, thereby achieving more accurate, reliable, and efficient headcount counting. Summary of the Invention

[0004] This invention aims to provide an indoor people counting method based on ultra-wideband channel impulse response, which can effectively remove the influence of noise and indoor background environment, extract key features related to changes in the number of people, thereby achieving accurate, efficient and reliable indoor people counting function, meeting the needs of various scenarios such as smart homes, commercial venues and public safety, while avoiding the risk of privacy leakage.

[0005] To achieve the above-mentioned objectives, the present invention adopts the following technical solution: an indoor people counting method based on ultra-wideband channel impulse response, the method comprising the following steps:

[0006] Step 1: Preprocess the acquired Channel Impulse Response (CIR) data;

[0007] Step 2: Filter the preprocessed data and extract valid data points;

[0008] Step 3: Select CIR data without personnel as the standard background, and calculate the difference value of the CIR data to be tested based on the standard background;

[0009] Step 4: Perform principal component analysis on the CIR difference data to be detected and extract the first principal component vector;

[0010] Step 5: Construct a classifier based on the first principal component vector to count the number of people indoors.

[0011] Furthermore, the CIR data collected in step 1 is divided into background data and data to be detected.

[0012] Furthermore, background data refers to CIR data collected when there is no human activity, used to establish a standard background model of the indoor environment. Background data collection is typically carried out when no one is in the room, collecting multiple sets of data and averaging them to obtain a stable and reliable background model.

[0013] Furthermore, the data to be detected refers to the CIR data collected during the actual number of people count, which is used to reflect the impact of the presence and activities of people indoors on the signal propagation path.

[0014] Furthermore, the background data and the data to be detected consist of multiple sets of CIR data, each set having the same data components, including:

[0015] Timestamp: The timestamp of the received UWB message, in milliseconds.

[0016] CIR i (i = 0, 1, …, 1015): This sample contains 1016 CIR values, reflecting the multipath propagation characteristics of UWB signals, and is the raw data for subsequent processing.

[0017] FP_IDX: This is the first path index of the accumulator reported by the Leading Edge Detection (LDE) algorithm in register file 0x15 (FP_INDEX field) of the DW1000 UWB chipset. It is a sub-nanosecond quantity consisting of an integer part and a fractional part.

[0018] FP_AMP1: The first path amplitude (point 1) value reported in the FP_AMPL1 field of DW1000 chipset register file 0x15.

[0019] FP_AMP2: The first path amplitude (point 2) value reported in the FP_AMPL2 field of the DW1000 chipset register file 0x12.

[0020] FP_AMP3: The first path amplitude (point 3) value reported in the FP_AMPL3 field of DW1000 chipset register file 0x12.

[0021] CIR_PWR: The Channel Impulse Response (CIR) power value reported in the CIR_PWR field of the DW1000 chipset register file 0x12. This value represents the sum of squares of the accumulator amplitudes starting from the highest power portion of the channel estimate, which is related to the received signal power.

[0022] RXPACC: The PreambleAccumulation Count (PAC) value reported in the rxpacc field of the DW1000 chipset register file 0x10. RXPACC reports the number of accumulated preamble symbols. The DW1000 chip estimates the CIR by associating a known preamble sequence with the received signal and accumulating the results over a time interval. The ordinal number used to estimate the CIR depends on the quality of the received signal. Since the size of the CIR depends on the number of preamble symbols, the size value is normalized using the PAC value measured for each CIR in the dataset.

[0023] MAX_NOISE: The maximum noise value reported by the DW1000 chipset.

[0024] STDEV_NOISE: The standard deviation of the estimated noise value of the channel impulse response reported in the STD_NOISE field of register file 0x12 of the DW1000 chip.

[0025] Furthermore, the preprocessing of CIR data in step 1 includes normalization and noise reduction.

[0026] Furthermore, for normalization, it is to convert {CIR} i The range of values ​​for the sample {i = 0, 1, …, 1015} is converted to between 0 and 1 to eliminate the dimensional differences between different groups of data. The formula is:

[0027]

[0028] Among them, CIR i Let be the i-th data point in the original CIR sample data, CIR_max be the maximum value in the original CIR sample data, and CIR_min be the minimum value in the original CIR sample data.

[0029] Furthermore, for denoising, exponentially weighted moving average (EWMA) filtering is used to denoise the normalized CIR sample data, effectively reducing random fluctuations while preserving the main characteristics of the CIR signal. The filtering formula is as follows:

[0030]

[0031] Among them, bk b represents the smoothed value of the current data point k. k-1 m represents the smoothed value of the previous data point k-1. k This represents the normalized sample value of the current data point k, i.e., CIR_norm. k α is the smoothing coefficient, which ranges from 0 to 1. This coefficient determines the weight of the smoothed value of the previous data point in the smoothed value of the current data point.

[0032] Furthermore, in step 2, the CIR data filtering process involves filtering the denoised CIR sample data. The specific method is as follows:

[0033] First, locate the first path in the CIR data. In CIR data, the first path refers to the shortest path the signal travels from the transmitter to the receiver, i.e., the path the signal takes directly to the receiver without any reflection or refraction. This path is extremely important for signal analysis, and its location can be determined using the FP_IDX field of each data set, using the following formula:

[0034] First_FP = [FP_IDX / 64]

[0035] Where First_FP is the position of the first path in the CIR sample data, FP_IDX is the measured index value of the first path of the accumulator, and [*] is the rounding function.

[0036] Then, by extracting the three data points before First_FP and the 60 data points after it, a set of 64 valid CIR sample data points is obtained.

[0037] Furthermore, in step 3, CIR data without personnel is selected as the standard background. The specific method is as follows:

[0038] The filtered valid CIR data without personnel are averaged by taking the arithmetic mean of the data points from multiple sets of filtered valid CIR data without personnel.

[0039]

[0040] Where N is the number of CIR sets used for arithmetic mean calculation. After calculation, the system obtains a more stable and reliable set of standard CIRs that can represent the indoor background environment when there are no people present.

[0041]

[0042] Furthermore, in step 3, the difference value of the CIR data to be detected is calculated:

[0043]

[0044] in,{ Let {i = 1, 2, …, 64} be the valid CIR samples to be detected. Then the CIR differential samples { The range , i = 1, 2, …, 64} mainly reflects the influence of the presence and activities of personnel on the signal propagation path.

[0045] Furthermore, in step 4, principal component analysis is performed on the CIR difference data to be detected. The specific method is as follows:

[0046] The first step involves interval extraction of several sets of CIR difference data to be detected. Specifically, starting from the first set of data, 30 consecutive sets of CIR difference data are selected to form a 30×64 CIR matrix. Then, after an interval of 10 sets of data (starting from the 11th set), another 30 consecutive sets of CIR difference data are selected to form the next 30×64 CIR matrix. This process continues until all the CIR difference data to be detected has been processed, resulting in Q matrices {X}. p , p = 1, …, Q}. This interval extraction method can ensure the continuity and relevance of data, while reducing the amount of data and improving processing efficiency.

[0047] The second step is to decenter the Q CIR matrices and calculate the corresponding covariance matrix.

[0048] Specifically, each CIR matrix is ​​X p Its size is m×n, where m is the number of samples and n is the number of features (in this invention, m = 30, n = 64). First, calculate the mean μ of each column. j (j = 1, 2,…, n)

[0049]

[0050] Where i and j represent the i-th row and j-th column of the matrix, respectively. Then, the corresponding column mean is subtracted from each data point.

[0051]

[0052] Obtain the decentralized matrix .

[0053] Finally, for the decentralized matrix Calculate its covariance matrix C p The covariance matrix has a size of n×n, and its elements are calculated using the following formula:

[0054]

[0055] Each element C of the covariance matrix p,jk Representation matrix The covariance between the j-th column and the k-th column.

[0056] The third step is to perform eigenvalue decomposition on the covariance matrix to find the first principal component vector corresponding to the largest eigenvalue.

[0057] Specifically, firstly, the covariance matrix C obtained in the previous step... p Perform eigenvalue decomposition, i.e., solve matrix C. p The eigenvalues ​​and eigenvectors of eigenvalues. The purpose of eigenvalue decomposition is to find a set of eigenvalues ​​{λ}. i {i = 1, … n} and their corresponding eigenvectors {v} i For any {i = 1, … n}, such that:

[0058]

[0059] Where, λ p,i It is matrix C p The i-th eigenvalue, v p,i These are the corresponding eigenvectors. Eigenvalues ​​represent the importance or variance of an eigenvector in the data; the larger the eigenvalue, the greater the degree of variation of the corresponding eigenvector in the data.

[0060] Then, find the largest eigenvalue λ from all eigenvalues. p,max Its corresponding feature vector v p,1 This is the first principal component vector.

[0061] Furthermore, in step 5, a classifier is constructed based on the first principal component vector. The specific method is as follows:

[0062] The first step is to select a Support Vector Machine (SVM) classifier as the classifier for this invention.

[0063] The second step is to divide the dataset into a training set and a test set. The training set is used to train the SVM classifier, enabling it to learn the mapping relationship between the number of people indoors and the first principal component vector (feature vector). The test set is used to verify the classifier's performance, ensuring its accuracy and reliability in practical applications.

[0064] The third step is to train the SVM classifier using the training set. By adjusting the classifier's parameters, it can accurately identify the first principal component vector (feature vector) for different numbers of people. During training, the classifier learns the feature patterns corresponding to different numbers of people, thus establishing a mapping relationship between the number of people indoors and the first principal component vector (feature vector).

[0065] The fourth step involves using the trained SVM classifier to classify the first principal component vector in the test set, thereby calculating the number of people indoors. The classifier outputs the corresponding number of people indoors based on the input first principal component vector (feature vector).

[0066] Compared with existing technologies, the present invention has the following advantages:

[0067] This invention effectively removes the influence of noise and indoor background environment, significantly improving the accuracy and anti-interference capability of statistics. Furthermore, this invention performs people counting based on UWB signals, without involving image acquisition or personal identification, completely avoiding the risk of privacy leakage and providing excellent privacy protection. In addition, this invention is applicable to various scenarios such as smart homes, commercial venues, and public safety, demonstrating broad applicability. Its method is simple, efficient, low-cost, and easily expandable and integrated, meeting the indoor people counting needs in different scenarios. Attached Figure Description

[0068] Figure 1 This is a schematic diagram of the method flow of the present invention.

[0069] Figure 2 This is a schematic diagram of the test site.

[0070] Figure 3 These are comparison images after preprocessing for different numbers of people.

[0071] Figure 4 This is a graph showing the difference between the background CIR data for different numbers of people.

[0072] Figure 5 This is the confusion matrix image for visualizing indoor crowd statistics in this example. Detailed Implementation

[0073] The present invention will now be described in detail with reference to the accompanying drawings and specific embodiments. It should be understood that these embodiments are for illustrative purposes only and are not intended to limit the scope of the invention. Unless otherwise specified, the operations involving but not described in detail the parameters in the embodiments are well known to those skilled in the art.

[0074] Example

[0075] The flowchart of the indoor people counting method based on ultra-wideband channel impulse response of the present invention is as follows: Figure 1 As shown, it includes a total of 5 steps.

[0076] Step 1: Preprocess the acquired Channel Impulse Response (CIR) data.

[0077] The data is divided into two parts: background data and data to be tested. Background data refers to CIR data collected when there is no human activity, used to establish a standard background model of the indoor environment. Background data collection is usually carried out when no one is in the room, collecting multiple sets of data and averaging them to obtain a stable and reliable background model.

[0078] The data to be detected refers to the CIR data collected during the actual number of people count, which is used to reflect the impact of the presence and activities of people indoors on the signal propagation path.

[0079] Background data and data to be detected consist of multiple sets of CIR data, each set having the same data components, including: timestamp, 1016 CIR values ​​{CIR...} i (i=0, 1, …, 1015)}, First Path Index (FP_IDX), First Path Amplitude Value (FP_AMP1, FP_AMP2, FP_AMP3), Channel Impulse Response Power (CIR_PWR), Preamble Accumulator Count (RXPACC), Maximum Noise Value (MAX_NOISE), and Noise Standard Deviation (STDEV_NOISE).

[0080] Preprocessing of CIR data includes normalization and noise reduction:

[0081] (1) Normalization

[0082] Normalize all collected CIR data, that is, normalize {CIR} i The sample values ​​(i=0, 1, …, 1015) are uniformly fixed between 0 and 1, and the formula is:

[0083]

[0084] Among them, CIR i Let be the i-th data point in the original CIR sample data, CIR_max be the maximum value in the original CIR sample data, and CIR_min be the minimum value in the original CIR sample data.

[0085] (2) Noise reduction

[0086] The Exponentially Weighted Moving Average (EWMA) filtering method is employed. This method effectively reduces random fluctuations in the data while preserving the main characteristics of the CIR signal. The EWMA formula is as follows:

[0087]

[0088] Among them, b k b represents the smoothed value of the current data point k. k-1 m represents the smoothed value of the previous data point k-1.k This represents the observation value of the current data point k, i.e., CIR_norm. k α is the smoothing coefficient, which ranges from 0 to 1. This coefficient determines the weight of the smoothed value of the previous data point in the smoothed value of the current data point.

[0089] Step 2: Filter the preprocessed data and extract valid data points.

[0090] Data filtering involves two steps:

[0091] (1) Finding the first path in CIR data. In CIR data, the first path refers to the shortest path the signal travels from the transmitter to the receiver, i.e., the path through which the signal reaches the receiver directly without any reflection or refraction. This path is extremely important for signal analysis, and its location can be determined by the FP_IDX field of each data set, using the following formula:

[0092]

[0093] Where First_FP is the position of the first path in the CIR sample data, FP_IDX is the measured index value of the first path of the accumulator, and [*] is the rounding function.

[0094] (2) Extract the 3 data points before First_FP and the 60 data points after it to obtain a set of 64 CIR valid sample data.

[0095] Step 3: Select CIR data without personnel as the standard background, and calculate the difference value of the CIR data to be tested based on the standard background.

[0096] (1) Calculation Standard Background

[0097] First, the filtered CIR background data is averaged, that is, the arithmetic mean of multiple sets of filtered valid CIR data without personnel is calculated at the corresponding data points.

[0098]

[0099] Where N is the number of CIR sets used for arithmetic mean calculation. After calculation, the system obtains a more stable and reliable set of standard CIRs that can represent the indoor background environment when there are no people present.

[0100] { , i = 1, 2, …, 64}

[0101] (2) Calculate the difference value of the CIR data to be detected.

[0102] The difference value of the CIR data to be tested is the difference between the effective sample value of the CIR to be tested and the standard background value:

[0103]

[0104] in,{ Let {i = 1, 2, …, 64} be the valid CIR samples to be detected. Then the CIR differential samples { The range , i = 1, 2, …, 64} mainly reflects the influence of the presence and activities of personnel on the signal propagation path.

[0105] Step 4: Perform principal component analysis on the CIR difference data to be detected and extract the first principal component vector. The specific process includes:

[0106] The first step is to perform interval extraction on the CIR difference data to be detected. Specifically, starting from the first set of data, 30 consecutive sets of CIR difference data are selected to form a 30×64 CIR matrix. Then, after an interval of 10 sets of data (i.e., starting from the 11th set of data), another 30 consecutive sets of CIR difference data are selected to form the next 30×64 CIR matrix. This process is repeated until all the CIR difference data to be detected has been processed, resulting in Q matrices {X}. p , p = 1, …, Q}. This interval extraction method can ensure the continuity and relevance of data, while reducing the amount of data and improving processing efficiency.

[0107] The second step is to decenter the Q CIR matrices and calculate the corresponding covariance matrix.

[0108] Specifically, each CIR matrix is ​​X p Its size is m×n, where m is the number of samples and n is the number of features (in this invention, m = 30, n = 64). First, calculate the mean μ of each column. j (j = 1, 2,…, n)

[0109]

[0110] Where i and j represent the i-th row and j-th column of the matrix, respectively. Then, the corresponding column mean is subtracted from each data point.

[0111]

[0112] Obtain the decentralized matrix .

[0113] Finally, for the decentralized matrix Calculate its covariance matrix C pThe covariance matrix has a size of n×n, and its elements are calculated using the following formula:

[0114]

[0115] Each element C of the covariance matrix p,jk Representation matrix The covariance between the j-th column and the k-th column.

[0116] The third step is to perform eigenvalue decomposition on the covariance matrix to find the first principal component vector corresponding to the largest eigenvalue.

[0117] Specifically, firstly, the covariance matrix C obtained in the previous step... p Perform eigenvalue decomposition, i.e., solve matrix C. p The eigenvalues ​​and eigenvectors of eigenvalues. The purpose of eigenvalue decomposition is to find a set of eigenvalues ​​{λ}. i {i = 1, … n} and their corresponding eigenvectors {v} i For any {i = 1, … n}, such that:

[0118]

[0119] Where, λ p,i It is matrix C p The i-th eigenvalue, v p,i These are the corresponding eigenvectors. Eigenvalues ​​represent the importance or variance of an eigenvector in the data; the larger the eigenvalue, the greater the degree of variation of the corresponding eigenvector in the data.

[0120] Then, find the largest eigenvalue λ from all eigenvalues. p,max Its corresponding feature vector v p,1 This is the first principal component vector.

[0121] Step 5: Construct a classifier based on the first principal component vector to count the number of people indoors.

[0122] The specific process includes:

[0123] The first step is to select a Support Vector Machine (SVM) classifier as the classifier for this invention.

[0124] The second step is to divide the dataset into a training set and a test set. The training set is used to train the SVM classifier, enabling it to learn the mapping relationship between the number of people indoors and the first principal component vector (feature vector). The test set is used to verify the classifier's performance, ensuring its accuracy and reliability in practical applications.

[0125] The third step is to train the SVM classifier using the training set. By adjusting the classifier's parameters, it can accurately identify the first principal component vector (feature vector) for different numbers of people. During training, the classifier learns the feature patterns corresponding to different numbers of people, thus establishing a mapping relationship between the number of people indoors and the first principal component vector (feature vector).

[0126] The fourth step involves using the trained SVM classifier to classify the first principal component vector in the test set, thereby calculating the number of people indoors. The classifier outputs the corresponding number of people indoors based on the input first principal component vector (feature vector).

[0127] Indoor people counting effect test

[0128] To verify the performance of the indoor people counting method based on ultra-wideband channel impulse response (CIR) of this invention, an experiment was conducted in a conference room at the university. The conference room measured 7m × 5m × 3m. A large conference table was placed in the center of the room, with comfortable chairs on both sides. A laptop computer was placed on the conference table for data acquisition and processing. To simulate a real indoor environment, books, tissues, teacups, and other everyday items were also placed on the table. Two Decawave DWM1000 modules were used in the experiment, serving as the transmitter and receiver respectively. The bandwidth was set to 500MHz, and they were placed at opposite ends of the conference table, approximately 2.8m apart. Each module was about 1m above the ground and fixed on a tripod. The receiver calculated the channel impulse response (CIR) at approximately 1ns intervals. The experimental setup was as follows. Figure 2 As shown.

[0129] During the experiment, the number of people in the room varied from 0 to 3. All participants were free to move around in the room, but the room layout had to remain unchanged. Approximately 1500 sets of CIR data were collected when the room was empty; approximately 1000 sets of CIR data were collected for each of the three different numbers of participants (1, 2, and 3), for a total of approximately 5000 sets of CIR data. Because the presence of personnel in the empty room could potentially affect the data, the first and last 100 sets of CIR data under the empty room condition were deleted to ensure the accuracy and reliability of the collected data.

[0130] After data normalization and denoising using exponentially weighted moving average (EWMA) filtering, the interference of noise on the CIR data was effectively reduced while preserving the key characteristics of the CIR signal. After the filtering process, the number of valid data points in each group of CIR data was precisely determined to be 64. Figure 3It can be clearly observed that the CIR curves under different number of people conditions show significant differences. This phenomenon strongly proves the feasibility and effectiveness of using CIR data for indoor population statistics.

[0131] Furthermore, by implementing CIR differential processing, interference caused by indoor obstacles in the CIR data was successfully eliminated. For example... Figure 4 As shown, in the case of 0 people, the CIR curve is almost a straight line, which is highly consistent with the expected baseline signal when no people are present. However, when the number of people indoors increases to 1 to 3, the fluctuation amplitude and the number of peaks of the CIR curve increase significantly. This intuitively reflects that the presence and movement of people have a significant impact on the signal propagation path, resulting in an increase in signal scattering and reflection.

[0132] In the feature extraction stage, Principal Component Analysis (PCA) was used to extract features from the preprocessed CIR data. By calculating the covariance matrix of the CIR data and extracting the first principal component vector, key information closely related to changes in the number of people can be efficiently captured.

[0133] In the classifier performance evaluation phase, the Support Vector Machine (SVM) classifier was selected for testing, and its corresponding confusion matrix is ​​as follows: Figure 5 As shown, after rigorous training and testing, the SVM classifier achieved a remarkable 100% accuracy in indoor people counting tasks. Specifically, when faced with four different numbers of people—0, 1, 2, and 3—the SVM classifier achieved perfect 100% accuracy, recall, and F1 score. This result fully demonstrates that the SVM classifier can accurately identify the CIR features under different numbers of people and can accurately classify different numbers of people without errors in this experimental scenario. This undoubtedly strongly proves that the indoor people counting method based on ultra-wideband channel impulse response of this invention is not only feasible but also highly reliable, and can provide accurate indoor people counting services for various scenarios in practical applications.

Claims

1. A method for indoor people counting based on ultra-wideband channel impulse response, characterized in that, Includes the following steps: Step 1: Preprocess the acquired Channel Impulse Response (CIR) data; Step 2: Filter the preprocessed data and extract valid data points; Step 3: Select CIR data without personnel as the standard background, and calculate the difference value of the CIR data to be tested based on the standard background; Step 4: Perform principal component analysis on the CIR difference data to be detected and extract the first principal component vector; Step 5: Construct a classifier based on the first principal component vector to count the number of people indoors.

2. The method according to claim 1, characterized in that, In step 1, the collected CIR data is divided into background data and data to be detected, as detailed below: Background data refers to CIR data collected when there is no human activity, used to establish a standard background model for the indoor environment. Background data collection is typically carried out when no one is in the room, collecting multiple sets of data and averaging them to obtain a stable and reliable background model. The data to be detected refers to the CIR data collected during the actual number of people count, which is used to reflect the impact of the presence and activities of people indoors on the signal propagation path. Background data and data to be detected consist of multiple sets of CIR data, each set having the same data components, including: Timestamp: The timestamp of the received UWB message, in milliseconds. CIR i (i = 0, 1, …, 1015): This sample contains 1016 CIR values, reflecting the multipath propagation characteristics of UWB signals, and serves as the raw data for subsequent processing. This is the first path index of the accumulator reported by the Leading Edge Detection (LDE) algorithm in register file 0x15 (FP_INDEX field) of the UWB DW1000 chipset. It is a sub-nanosecond quantity consisting of an integer part and a fractional part. FP_AMP1: The first path amplitude (point 1) value reported in the FP_AMPL1 field of DW1000 chipset register file 0x15. FP_AMP2: The first path amplitude (point 2) value reported in the FP_AMPL2 field of the DW1000 chipset register file 0x12. FP_AMP3: The first path amplitude (point 3) value reported in the FP_AMPL3 field of DW1000 chipset register file 0x12. CIR_PWR: The Channel Impulse Response (CIR) power value reported in the CIR_PWR field of the DW1000 chipset register file 0x12. This value represents the sum of squares of the accumulator amplitudes starting from the highest power portion of the channel estimate, which is related to the received signal power. RXPACC: The PreambleAccumulation Count (PAC) value reported in the RXPACC field of the DW1000 chipset register file 0x10. RXPACC reports the number of accumulated preamble symbols. The DW1000 chip estimates the CIR by associating a known preamble sequence with the received signal and accumulating the results over a time interval. The ordinal number used to estimate the CIR depends on the quality of the received signal. Since the size of the CIR depends on the number of preamble symbols, the size value is normalized using the PAC value measured for each CIR in the dataset. MAX_NOISE: The maximum noise value reported by the DW1000 chipset. STDEV_NOISE: The standard deviation of the estimated noise value of the channel impulse response reported in the STDEV_NOISE field of register file 0x12 of the DW1000 chip.

3. The method according to claim 1, characterized in that, The preprocessing of CIR data includes normalization and noise reduction.

4. The method according to claim 3, characterized in that, The normalization is to normalize {CIR} i The sample values ​​(i = 0, 1, …, 1015) are converted to the range of 0 to 1 to eliminate the dimensional differences between different groups of data. The formula is: Among them, CIR i Let be the i-th data point in the original CIR sample data, CIR_max be the maximum value in the original CIR sample data, and CIR_min be the minimum value in the original CIR sample data.

5. The method according to claim 3, characterized in that, The denoising process employs exponentially weighted moving average (EWMA) filtering to denoise the normalized CIR sample data, effectively reducing random fluctuations while preserving the main characteristics of the CIR signal. The filtering formula is as follows: in, This represents the smoothed value of the current data point k. This represents the smoothed value of the previous data point k-1. This represents the normalized sample value of the current data point k, i.e., CIR_norm. k α is the smoothing coefficient, which ranges from 0 to 1. This coefficient determines the weight of the smoothed value of the previous data point in the smoothed value of the current data point.

6. The method according to claim 1, characterized in that, In step 2, the preprocessed CIR data is filtered. The specific method is as follows: First, locate the first path in the CIR data. In CIR data, the first path refers to the shortest path the signal travels from the transmitter to the receiver, i.e., the path the signal takes directly to the receiver without any reflection or refraction. This path is extremely important for signal analysis, and its location can be determined using the FP_IDX field of each data set, using the following formula: Where First_FP is the position of the first path in the CIR sample data, FP_IDX is the index value of the measured accumulator first path, and [*] is the rounding function. Then, by extracting the three data points before First_FP and the 60 data points after it, a set of 64 valid CIR sample data points is obtained.

7. The method according to claim 1, characterized in that, In step 3, CIR data without personnel is selected as the standard background. The specific method is as follows: The filtered valid CIR data without personnel are averaged by taking the arithmetic mean of the data points from multiple sets of filtered valid CIR data without personnel. Where N is the number of CIR sets used for arithmetic mean calculation. After calculation, the system obtains a more stable and reliable set of standard CIRs that can represent the indoor background environment when there are no people present.

8. The method according to claim 1, characterized in that, In step 3, calculating the difference value of the CIR data to be detected is the difference between the effective sample value of the CIR to be detected and the standard background value: in,{ Let {i = 1, 2, …, 64} be the valid CIR samples to be detected. Then the CIR differential samples { The range , i = 1, 2, …, 64} mainly reflects the influence of the presence and activities of personnel on the signal propagation path.

9. The method according to claim 1, characterized in that, In step 4, principal component analysis is performed on the CIR difference data to be detected to extract the first principal component vector. The specific method is as follows: The first step involves interval extraction of several sets of CIR difference data to be detected. Specifically, starting from the first set of data, 30 consecutive sets of CIR difference data are selected to form a 30×64 CIR matrix. Then, after an interval of 10 sets of data (starting from the 11th set), another 30 consecutive sets of CIR difference data are selected to form the next 30×64 CIR matrix. This process continues until all the CIR difference data to be detected has been processed, resulting in Q matrices {X}. p , p = 1, 2, …, Q}. This interval extraction method can ensure the continuity and relevance of data, while reducing the amount of data and improving processing efficiency. The second step is to decenter the Q CIR matrices and calculate the corresponding covariance matrix. Specifically, each CIR matrix is ​​X p Its size is Where m is the number of samples and n is the number of features (in this invention, m = 30, n = 64). First, calculate the mean of each column. , Where i and j represent the i-th row and j-th column of the matrix, respectively. Then, the corresponding column mean is subtracted from each data point. Obtain the decentralized matrix . Finally, for the decentralized matrix Calculate its covariance matrix C p The covariance matrix has a size of n×n, and its elements are calculated using the following formula: Each element C of the covariance matrix p,jk Representation matrix The covariance between the j-th column and the k-th column. The third step is to perform eigenvalue decomposition on the covariance matrix to find the eigenvector corresponding to the largest eigenvalue. Specifically, firstly, the covariance matrix C obtained in the previous step... p Perform eigenvalue decomposition, i.e., solve matrix C. p The eigenvalues ​​and eigenvectors of eigenvalues. The purpose of eigenvalue decomposition is to find a set of eigenvalues ​​{λ}. i , i = 1, 2, …, n} and the corresponding eigenvectors {v i Let there be a set of integers, i = 1, 2, …, n, such that: Where, λ p,i It is matrix C p The i-th eigenvalue, v p,i These are the corresponding eigenvectors. Eigenvalues ​​represent the importance or variance of an eigenvector in the data; the larger the eigenvalue, the greater the degree of variation of the corresponding eigenvector in the data. Then, find the largest eigenvalue λ from all eigenvalues. p,max Its corresponding feature vector v p,1 This is the first principal component vector.

10. The method according to claim 1, characterized in that, In step 5, a classifier is constructed based on the first principal component vector to count the number of people indoors. The specific method is as follows: The first step is to select a Support Vector Machine (SVM) classifier as the classifier for this invention. The second step is to divide the dataset into a training set and a test set. The training set is used to train the SVM classifier, enabling it to learn the mapping relationship between the number of people indoors and the first principal component vector (feature vector). The test set is used to verify the performance of the classifier and ensure its accuracy and reliability in real-world applications. The third step is to train the SVM classifier using the training set. By adjusting the classifier's parameters, it can accurately identify the first principal component vector (feature vector) for different numbers of people. During training, the classifier learns the feature patterns corresponding to different numbers of people, thus establishing a mapping relationship between the number of people indoors and the first principal component vector (feature vector). The fourth step involves using the trained SVM classifier to classify the first principal component vector in the test set, thereby calculating the number of people indoors. The classifier outputs the corresponding number of people indoors based on the input first principal component vector (feature vector).