Falling event detection method based on channel state information in indoor environment
Technical Field
The invention relates to a method for detecting a falling event, in particular to a method for detecting the falling event based on channel state information of Wi-Fi signals in an indoor environment, which is used for detecting whether the falling event occurs in the indoor environment and belongs to the technical field of wireless network channel state information application methods.
Background
In recent years, with the great increase of the number of the elderly, the safety problem of the elderly in the indoor environment has attracted people's attention. Among the various daily activities and activities, falls are one of the most dangerous events for elderly people, especially those living alone. In the absence of timely alarm and assistance, a fall incident can easily cause serious and unpredictable damage to the health of the elderly. Studies have shown that about 50% of elderly fall events occur indoors. Therefore, the rapid and accurate detection of the falling event in the indoor environment plays an important role in improving the safety of the daily activities of the elderly.
At present, a large number of fall detection methods relying on wearable devices are put into use. These methods mainly utilize various types of sensors in wearable devices, such as accelerometers, optical heart rate sensors and galvanic skin response sensors, to monitor the daily activities of the user to discover fall incidents. However, most elderly people are not adapted to wear these wearable devices, especially in situations like bathing, cooking or sleeping, which further increases the inconvenience for the elderly people to live. Meanwhile, the fall detection method relying on special equipment also has the defects of high deployment cost and high maintenance difficulty. In addition, there are some methods of fall detection using a camera. The methods shoot the daily activities of the old through a camera and then find out a fall incident by combining a visual processing technology. However, the method relying on visual information requires good lighting conditions, and has problems that a blind area cannot be detected, and privacy is easily revealed.
The commercial Wi-Fi equipment provides a feasible scheme for indoor fall detection due to the characteristics of low deployment cost, simplicity in maintenance, wide signal coverage, no need of wearing special equipment and the like. Some fall detection methods based on Wi-Fi devices detect fall behavior of a user indoors by analyzing Channel State Information (CSI) of Wi-Fi signals. However, these methods only use coarse-grained CSI information, and cannot consider interference caused by indoor environment changes, which results in low accuracy.
In summary, there is a need for an efficient and accurate method for detecting whether a user, especially the elderly, in an indoor environment has a fall event by using a common commercial Wi-Fi device.
Disclosure of Invention
The invention aims to solve the problems that whether a user has a falling event or not is high in cost and low in anti-interference performance when the user is detected in an indoor environment at present, and creatively provides a method for detecting whether the user has the falling event or not in the indoor environment by using commercial Wi-Fi equipment.
The core idea of the invention is as follows: the method comprises the steps of generating a wireless signal by using commercial Wi-Fi equipment, deploying an antenna to receive the wireless signal, analyzing channel state information of the received Wi-Fi signal, extracting fine-grained information in the channel state information by using a designed denoising and calibrating algorithm, calibrating bias of the signal, obtaining indoor activity information of a user, and distinguishing falling events and non-falling events from indoor activities by combining a machine learning method, so that falling event detection is realized. The method is particularly suitable for the indoor environment of a single user.
The purpose of the invention is realized by the following technical scheme:
a method for detecting falling events based on channel state information in an indoor environment comprises the following steps:
step 1: the commercial Wi-Fi equipment is used as a transmitting end, and a group of antennas are used as receiving ends. Collecting Wi-Fi signals of a user when the user moves between a sending end and a receiving end, and calibrating the collected signals, wherein the calibration comprises amplitude calibration and phase calibration. And then, aiming at the Wi-Fi signals respectively eliminated with the amplitude and the phase offset, extracting a component corresponding to a dynamic path from the channel state information by using a dynamic path selection algorithm.
Specifically, the implementation method of step 1 is as follows:
step 1.1: in an indoor environment, a commercial Wi-Fi device is used as a transmitting end, M antennas are used as receiving ends, and the sampling frequency of the antennas is f. And collecting Wi-Fi signals of the user when the user moves between the sending end and the receiving end. The Wi-Fi signal collected by each antenna is divided into samples of length t, and each sample is a two-dimensional complex matrix of 30 × tf.
Step 1.2: aiming at the Wi-Fi signal samples collected in the step 1.1, firstly, Discrete Wavelet Transform (DWT) is carried out on each subcarrier in each sample, and then, direct current components of each subcarrier are removed to obtain the Wi-Fi signal samples with amplitude offset removed.
Step 1.3: for the Wi-Fi signal samples obtained in step 1.2, first, discrete wavelet transform is performed on each subcarrier in each sample. Then, Inverse Fast Fourier Transform (IFFT) is performed on each subcarrier to obtain a power delay profile for each sample. The Carrier Frequency Offset (CFO) of the sample is calculated using the power delay profile and the phase offset is cancelled by subtracting the carrier frequency offset from the sample. Thereafter, the Packet Detection Delay (PDD) of each packet in each sample is calculated using a least squares linear regression method, and the phase offset is removed by subtracting the packet detection delay from the sample. And finally, obtaining Wi-Fi signal samples with two phase offsets eliminated.
Step 1.4: for the Wi-Fi signal obtained in step 1.3 after the offset is removed, the channel state information of every two samples is first multiplied in a conjugate manner, and then the direct current component in the product is removed, that is, the component corresponding to the static path is removed. The corresponding component of the reactable dynamic path is obtained by subtracting the minimum value of the channel state information amplitude from the channel state information amplitude of one of the samples and increasing the channel state information amplitude of the other sample.
Step 2: and (3) selecting p components which can reflect the change of the channel state information characteristics most from each Wi-Fi signal sample as the channel state information characteristics of the sample by utilizing a Principal Component Analysis (PCA) method for the Wi-Fi signals which are obtained in the step (1) and are used for eliminating the offset and extracting the dynamic path components. The start and end times of the user activity are identified from within the time period of the sample using an activity segmentation algorithm based on a sliding window and a dynamic threshold.
Specifically, the implementation method of step 2 is as follows:
step 2.1: and (3) for the Wi-Fi signals which are obtained in the step (1) and respectively eliminate the offset and extract the dynamic path components, performing principal component analysis on each Wi-Fi signal sample, selecting p components which can most reflect the change of the channel state information of the group of signals, and forming a p multiplied by tf two-dimensional complex matrix as the channel state information characteristic of the group of signals, thereby reducing the characteristic dimensionality of the channel state information.
Step 2.2: aligning the M samples obtained in step 2.1 in the same time period, and adding a length t1Each sliding length is t2The sliding window of (1). And calculating a user activity threshold value according to the signal amplitude in the sliding window and the whole sample amplitude, and judging whether the signal in the sliding window is influenced by the user activity by comparing the signal in the sliding window with the threshold value, thereby determining the starting time and the ending time of the user activity (such as falling, walking, jumping and the like) in the time period of the sample.
And step 3: and (3) extracting five types of characteristics of each user activity, namely activity time, activity average amplitude, fluctuation number, activity attenuation rate and median percentage, of the user activity division result obtained in the step (2), and splicing the characteristics into a characteristic vector. And then, the feature vectors are sent into a pre-trained Support Vector Machine (SVM) for classification, and whether the user activity corresponding to the feature vectors is a falling event or a non-falling event is judged, so that the real-time detection of the falling event is realized.
Specifically, the implementation method of step 3 is as follows:
step 3.1: for the user activity partition obtained in step 2, the activity duration and the average signal amplitude of the signal during activity are first calculated. Then, the fluctuation number characteristic of the signal in the activity time is calculated, namely a length t is set3Finding the maximum frequency maximum of each component in the sliding window and recording the maximum frequency maximum as a primary fluctuation, and then starting the sliding windowThe point is moved to the undulation position until the sliding window slides to the end of the sample and the number of undulations per component of the sample is recorded. Then, the activity attenuation characteristic of the sample is calculated, namely, the ratio of the time from the position of the frequency maximum of each component to the activity end to the total activity time is calculated. And then, calculating the median percentage characteristic of the sample, namely calculating the ratio of the number of sampling points of the amplitude in each component in a designed interval to the total number of sampling points of the component in the activity time. Finally, the features of each user activity are spliced into a 5-dimensional feature vector, i.e., each detected user activity corresponds to a 5-dimensional feature vector.
Step 3.2: and (3) sending the feature vector obtained in the step (3.1) into a pre-trained SVM for classification, judging whether the user activity corresponding to the feature vector is a falling event or a non-falling event, and finally realizing the real-time detection of the falling event in the indoor environment.
Advantageous effects
1. Compared with the prior art, the method can realize the detection of the falling event of the user only by continuously collecting the Wi-Fi signals in the indoor environment through commercial Wi-Fi equipment and an antenna. Therefore, the invention does not depend on various wearable devices and visual sensors, has low deployment and maintenance cost, convenient use and no privacy leakage problem, and is suitable for the indoor detection environment of a single person.
2. The method of the invention utilizes the channel state information of Wi-Fi signals in indoor environment to design a corresponding calibration algorithm and a dynamic path selection algorithm to eliminate the influence of signal offset and multipath effect, so that the system has stronger robustness to environmental change.
3. According to the method, effective CSI characteristics are extracted according to different influences of a falling event and a non-falling event on CSI of Wi-Fi signals, and real-time detection of the indoor falling event is efficiently and accurately achieved by combining a machine learning technology.
Drawings
Fig. 1 is a schematic diagram of a fall event detection method according to an embodiment of the invention.
FIG. 2 is a graph of overall accuracy for an embodiment of the present invention.
FIG. 3 shows the accuracy of the present invention in various indoor environments.
Fig. 4 shows the detection performance of the embodiment of the invention for different fall events of a user.
Detailed Description
The method of the present invention will be described in further detail with reference to the following examples and the accompanying drawings.
As shown in fig. 1, a method for detecting a fall event based on channel state information in an indoor environment includes the following steps:
step 1: the method comprises the steps of taking commercial Wi-Fi equipment as a transmitting end and a group of antennas as a receiving end, collecting Wi-Fi signals of a user when the user moves between the transmitting end and the receiving end, and calibrating the collected signals, namely amplitude calibration and phase calibration. And then, aiming at the Wi-Fi signals respectively eliminated with the amplitude and the phase offset, extracting a component corresponding to a dynamic path from the CSI by using a dynamic path selection algorithm.
Step 1.1: in an indoor environment, a commercial Wi-Fi device with one antenna is used as a transmitting end, M antennas are used as receiving ends, the sampling frequency of the antennas is f, and Wi-Fi signals of different users in falling, walking, turning, jumping and other activities between the transmitting end and the receiving ends are collected. And the distance between every two receiving antennas is lambda/2, and lambda is the wavelength of the Wi-Fi signal. The Wi-Fi signal collected by each antenna is sliced into samples of length t, and each sample is a complex matrix of 30 × tf.
Step 1.2: for the Wi-Fi signal samples collected in the step 1.1, Discrete Wavelet Transform (DWT) is performed on each subcarrier in each sample, and then direct current components of each subcarrier are removed, so that the Wi-Fi signal samples with amplitude offset removed are obtained.
Step 1.3: for the Wi-Fi signal samples obtained in step 1.2, DWT is performed on each subcarrier in each sample. Then, Inverse Fast Fourier Transform (IFFT) is performed on each subcarrier to obtain a power delay curve for each sample, according to the formula Δ ψm=2π(fm-f0) τ calculate the Carrier Frequency Offset (CFO) for the sample, where Δ ψmIs the CFO, f of the m-th sub-carrier relative to the reference value, i.e. sub-carrier No. 0mAnd f0The frequencies of the mth and 0 th subcarriers, respectively, and τ is the time delay of the sample, here a constant. By subtracting delta phi from each sub-carrier of the samplemThe CFO can be eliminated, the Packet Detection Delay (PDD) of each packet in each sample is calculated using the least squares linear regression method, and the phase offset can be eliminated by subtracting the PDD from the sample. And finally, obtaining Wi-Fi signal samples with two phase offsets eliminated.
Step 1.4: for the Wi-Fi signal obtained in step 1.3 after the offset is removed, the CSI conjugates of every two samples are multiplied, that is:
wherein S is
iAnd S
jSet of static paths, D, contained in the ith and jth samples, respectively
iAnd D
jThe ith sample and the jth sample respectively contain dynamic path sets;
and
are all amplitude values; ω represents a complex number; s
i、d
iRespectively representing a dynamic path and a static path of the ith sample;
and
respectively representing the ith sample in the dynamic path s
iAnd a static path d
i(ii) a lower transmission delay; f is the antenna sampling frequency; e is a natural constant. Then, the direct current component in the product is removed, i.e. the static path corresponding component is removed. By subtracting the minimum of the CSI amplitude values from the CSI amplitude value of one of the samples (assumed to be the ith sample) and increasing the other oneThe CSI amplitude of a sample (assumed to be the jth sample) yields the corresponding component that may reflect the dynamic path, i.e., the
Step 2: and (3) for the Wi-Fi signals which are obtained in the step (1) and are subjected to offset elimination and dynamic path component extraction, p components which can reflect CSI characteristic changes most are selected from each Wi-Fi signal sample by utilizing a Principal Component Analysis (PCA) method and serve as the CSI characteristics of the sample. An activity segmentation algorithm based on a sliding window and a dynamic threshold identifies the start and end times of the user's activity from within the time period the sample is in.
Step 2.1: and (3) for the Wi-Fi signals which are obtained in the step (1) and respectively subjected to offset elimination and dynamic path component extraction, performing principal component analysis on each Wi-Fi signal sample, selecting p components which can most reflect the CSI change of the group of signals, and forming a p multiplied by tf two-dimensional complex matrix as the CSI characteristics of the group of signals, so that the CSI characteristic dimensionality is reduced.
Step 2.2: aligning the M samples obtained in step 2.1 in the same time period, and adding a length t
1Each sliding length is t
2The sliding window of (1). Let the variance of the signal amplitude in the sliding window of the sliding ith sample be
And the mean variance and standard deviation variance of the signal amplitude in all sliding windows of the sample are recorded as
And
l represents the total number of times the sliding window has slid within the sample, based on
Calculating a user activity threshold δ
i. If the variance of the signal amplitude within a sliding window of the sample is greater than a threshold value, then
And if not, determining that the sliding window has no user activity within the time. The start time and the end time of the user's activity (fall, walk, jump, etc.) during the time period of the sample are determined by a sliding window marked with the user's activity.
And step 3: and (3) extracting five types of characteristics of each user activity, namely activity duration, activity average amplitude, fluctuation number, activity attenuation rate and median percentage, of the user activity division result obtained in the step (2), and splicing the characteristics into a characteristic vector. And then, the feature vectors are sent into a pre-trained Support Vector Machine (SVM) for classification to judge whether the user activity corresponding to the feature vectors is a falling event or a non-falling event, so that the real-time detection of the falling event is realized.
Step 3.1: for the user activity partition obtained in step 2, the activity duration and the average signal amplitude of the signal during activity are first calculated. Then, the fluctuation number characteristic of the signal in the activity time is calculated, namely, a length t is set3Finding the maximum frequency maximum value of each component in the sliding window, recording the maximum frequency maximum value as a primary fluctuation, then moving the starting point of the sliding window to the fluctuation position until the sliding window slides to the tail end of the sample, and recording the fluctuation number of each component of the sample. The activity decay characteristic of the sample is then calculated, i.e. the ratio of the time between the position of the frequency maximum of each component to the end of the activity to the total activity time is calculated. And then calculating the median percentage characteristic of the sample, namely calculating the ratio of the number of sampling points of the amplitude in each component within a designed interval to the total number of sampling points of the component within the activity time. Finally, the features of each user activity are spliced into a 5-dimensional feature vector, namely, each detected user activity corresponds to one 5-dimensional feature vector.
Step 3.2: and (3) sending the feature vector obtained in the step (3.1) into a pre-trained SVM for classification to judge whether the user activity corresponding to the feature vector is a falling event or a non-falling event, and finally realizing the real-time detection of the falling event in the indoor environment. The SVM classifier adopts a Gaussian radial basis kernel function as a kernel function, adopts a cross validation method to select optimal parameters, and finally adopts a LibSVM software package to realize.
Examples
In order to test the performance of the method, one Wi-Fi device and three antennas are deployed for data collection in an indoor scene. The Wi-Fi signal adopts a No. 64 channel of a 5G frequency band, the center frequency of the channel is 5320MHz, and the bandwidth is 20 MHz. The sampling rate of the antenna is set to 1000 packets per second. And 3 volunteers were recruited as users to fall and daily activities in different indoor scenarios.
First, the overall accuracy of the method in an indoor environment was tested. Figure 2 shows the overall accuracy of the present method and two other Fall detection methods (RT-Fall and Fall-Defi). As can be seen from the figure, the overall accuracy of the method for detecting a fall event is 95.8%, while the overall accuracy of the other two methods is only 81.6% and 88.9%, which fully indicates that the method has higher accuracy in an indoor environment.
And then, testing the detection performance of the method under different indoor scenes. Fig. 3 shows the detection performance of the method in a conference room, a laboratory and a living room, respectively. As can be seen from the figure, the average accuracy of the fall incidents in the three scenes is 95.87%, the average sensitivity is 96.86%, and the average specificity is 94.06%. The falling detection accuracy in three indoor scenes is not lower than 95.1%, and the method has strong universality to different environments.
Finally, the fall detection performance of the method for different users is tested. Fig. 4 shows the fall detection performance of three users in a living room environment, and it can be seen from the graph that the fall detection performance of the three users is relatively high, wherein the average accuracy of the three users is 94.91%, the average sensitivity is 95.77%, and the average specificity is 94.19%. The falling detection accuracy of three users in the living room environment is not lower than 93.5 percent, and the invention has strong universality to different users.
The above-described embodiments are further illustrative of the present invention and are not intended to limit the scope of the invention, which is to be accorded the widest scope consistent with the principles and spirit of the present invention.