Respiratory frequency detection method based on Hilbert-Huang transformation time-frequency analysis

Through Hilbert-Huang transform time-frequency analysis and principal component analysis, the problem of low accuracy and blind spots in the use of WiFi signals for respiratory frequency detection is solved, and non-contact respiratory frequency detection with higher accuracy and wider range is achieved.

CN118557173AActive Publication Date: 2024-08-30CHONGQING UNIV OF POSTS & TELECOMM
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202410678353.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-29
Publication Date
2024-08-30
Estimated Expiration
2044-05-29

AI Technical Summary

Technical Problem

Existing WiFi signals used for respiratory frequency detection have problems such as low accuracy, time-varying phase offset and blind spots, which limit the detection accuracy and sensing range.

Method used

Hilbert-Huang transform time-frequency analysis combined with CSI ratio and principal component analysis is used to eliminate time-varying phase offsets, remove high-frequency noise, and extract respiratory features through signal decomposition and projection to expand the sensing range and improve detection accuracy.

Benefits of technology

It improves the accuracy and sensing range of respiratory frequency detection without the need for wearing equipment, eliminates blind spots, and provides a more accurate non-contact respiratory frequency detection method.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118557173A
    Figure CN118557173A
Patent Text Reader

Abstract

The invention provides a respiratory rate detection method based on Hilbert-Huang transformation time frequency analysis. The method comprises the following steps of: firstly, selecting a WiFi (Wireless Fidelity) link with relatively high environmental perception sensitivity to construct a channel state information (CSI) ratio model; secondly, projecting the filtered CSI ratio time sequence, and generating a candidate set of different breathing mode signals by combining amplitude and phase information; and thirdly, carrying out signal variational mode decomposition (VMD) and Hilbert-Huang transform time-frequency analysis on the selected breathing mode, and further, removing a non-human body breathing frequency component. The method comprises the following steps of: carrying out reconstruction on the basis, and fusing a reconstructed signal by utilizing principal component analysis (PCA). And finally, calculating the respiratory rate through a false peak detection algorithm. According to the breathing frequency detection algorithm designed by the invention, while time-varying phase offset and high-frequency noise are removed and the optimal subcarrier is selected, the sensing range is expanded, blind spots are eliminated, the breathing frequency detection precision is also improved, and a more accurate detection method is provided for non-contact breathing frequency detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of realizing perception by using commercial WiFi equipment, and specifically is a respiratory rate detection method based on Hilbert-Huang transform time-frequency analysis, which is used to realize non-contact respiratory rate detection by processing channel state information (CSI) signals. Background Art

[0002] With the improvement of living standards, daily respiratory rate monitoring has attracted people's attention. In the medical field, respiratory rate is an important physiological indicator to measure a person's health status. Respiratory-related diseases include chronic obstructive pulmonary disease, sleep apnea syndrome, nocturnal hypopnea syndrome, etc. If the abnormal changes in the human respiratory rate can be detected earlier, early medical advice can be provided to people, thereby improving the health level. Existing research methods are divided into two categories: wearable detection systems and non-contact detection systems. However, commonly used wearable devices, such as sleep polygraphs and respiratory belts, are inconvenient to carry and are not suitable for daily use. Therefore, non-contact solutions are a feasible option. Non-contact solutions include video-based and wireless technology-based. Video-based solutions may have potential privacy issues and are easily affected by light, and the use environment is greatly restricted. Wireless technology can protect privacy well and is not sensitive to light. Therefore, respiratory rate detection based on wireless technology has been favored by researchers.

[0003] In the field of wireless technology, radar-based solutions usually use Doppler radar to measure periodic motions generated by breathing, heartbeats, etc., but the disadvantage is that dedicated hardware needs to be deployed. Solutions based on (Radio Frequency Identification, RFID) usually use the radio wave information reflected by the tag to detect breathing, but the tag information of RFID is easy to be illegally read or even tampered with without permission. Since commercial WiFi devices are low-cost and WiFi devices are very popular at present. Therefore, respiratory rate detection based on WiFi signals has become a hot topic of research. And WiFi-based solutions do not require additional hardware equipment deployment because they are based on existing indoor WiFi devices. Initially, researchers used WiFi's received signal strength indicator (RSSI) information to detect respiratory rate. Limited by the coarse granularity of the received signal strength index itself and the uncertainty of signal fluctuations, the early sensing accuracy and application scope based on WiFi RSSI were greatly limited. In addition, there is another available information on WiFi devices, which is CSI. Unlike RSSI, CSI can provide more fine-grained wireless channel information at the physical layer, so it is considered an alternative solution for precise sensing. CSI contains the channel amplitude and phase information on different subcarriers, which can distinguish multipath characteristics. This information reveals the signal scattering, reflection and power attenuation of the carrier as the transmission distance changes. By analyzing and studying the changes in CSI, the changes in the physical environment that cause the channel state to change can be inferred, thereby achieving contactless breathing perception.

[0004] However, existing methods require close-range detection. The main reason is that CSI perception relies on weak reflected signals, and subtle signal changes caused by breathing are easily masked by noise. In addition, WiFi transceivers do not have strict clock synchronization, which will cause random phase offsets. CSI data will introduce outliers and high-frequency noise due to the influence of transmission rate, transmission power, and fluctuations in the CSI reference level inside the Wi-Fi network card. In addition, existing work also has the problem of blind spots, that is, when the human body is close to the sensing device, breathing cannot be effectively detected in certain positions. The short sensing distance and "blind spot" constraints greatly limit the practical application of existing methods.

[0005] In order to solve the above problems, the present invention provides a respiratory rate detection method based on Hilbert-Huang transform time-frequency analysis. In view of the above problems of low precision, time-varying phase offset and blind spots, a WiFi link with strong sensitivity to environmental perception is selected, and the CSI ratio is used to eliminate the time-varying phase offset while projecting the CSI ratio, making full use of amplitude and phase information, and selecting "good" subcarriers. As for the problem of high-frequency noise introduced by equipment and network cards, special signal decomposition and Hilbert-Huang transform time-frequency analysis are used to remove non-human respiratory frequency components and then reconstruct, and principal component analysis is used for fusion, so as to achieve the purpose of expanding the perception range and improving the accuracy of respiratory rate detection, and it has strong robustness. Summary of the invention

[0006] The purpose of the present invention is to provide a respiratory rate detection method based on Hilbert-Huang transform time-frequency analysis to improve the accuracy of respiratory rate detection without wearing any equipment or camera and in the presence of relative interference of human targets.

[0007] The respiratory rate detection method based on Hilbert-Huang transform time-frequency analysis described in the present invention specifically comprises the following steps:

[0008] Step 1: The transmitting device sends a radio frequency signal to the receiving device. The data is transmitted through orthogonal frequency-division multiplexing (OFDM) so that the signal can be modulated to achieve parallel transmission of multiple subcarriers. Use Intel5300 network card to obtain WiFi signal CSI information. If the number of WiFi device antennas is I, the number of subcarriers is K, and the number of data packets is N. Then the CSI data matrix can be written as:

[0009]

[0010] Among them, H i represents the CSI data of the i-th (1≤i≤I) WiFi link, represents the CSI data of the kth (1≤k≤K)th subcarrier of the i-th (1≤i≤I)th WiFi link, Indicates the CSI data of the kth (1≤k≤K) subcarrier of the ith (1≤i≤I) antenna in the nth (1≤n≤N) data packet.

[0011]

[0012] in, and are the real and imaginary parts of the kth subcarrier for the ith antenna in the nth data packet, respectively. and Indicates the amplitude and phase of the kth subcarrier of the ith antenna in the nth data packet.

[0013] Step 2: Use the double difference to set the threshold to select the "sensitive" WiFi link. The specific algorithm flow is as follows:

[0014] First, calculate the CSI amplitude variance of each subcarrier on different links. The amplitude variance of I antennas and K subcarriers can be expressed as:

[0015]

[0016] Among them, V i is the vector of the amplitude variance of the K subcarriers of the i-th (1≤i≤I) antenna, is the amplitude variance of the kth (1≤k≤K) subcarrier of the ith (1≤i≤I)th antenna, expressed as:

[0017]

[0018] Among them, μ i,k is the mean value of the amplitude of N data packets of the kth (1≤k≤K)th subcarrier of the ith (1≤i≤I)th antenna, expressed as:

[0019]

[0020] Secondly, set the threshold to ε i =0.7·max{V i}(1≤i≤I), where max{·} represents the maximum value of {·}, and selects the subcarriers whose amplitude variance of each WiFi link is greater than the threshold, and the number of subcarriers is K i , K i =card{k|{V i}>ε i}, where card{·} represents the number of calculated{·} elements. And the average amplitude variance of the subcarriers in the set is taken, then the average amplitude variance of the subcarriers selected by I antennas is recorded as: v = [v1,…,v i ,…,v I ]. Among them, v i It represents the average amplitude variance of the selected subcarrier of the i-th (1≤i≤I) WiFi link, which is a numerical value. It is expressed as:

[0021]

[0022] Finally, the WiFi links with the largest and second largest average amplitude variance are selected and renamed H′1 and H′2.

[0023] Step 2: For the two "sensitive" WiFi links obtained in step 1, first, use the CSI ratio method to eliminate the time-varying phase offset and divide the CSI readings of the two receiving antenna subcarriers. The CSI ratio calculation formula is as follows:

[0024]

[0025] Among them, x k Indicates the CSI ratio data of the kth subcarrier, and They are the CSI data of the kth subcarrier of the two selected WiFi links H′1 and H′2 respectively.

[0026] Secondly, the CSI ratio is still a complex number. The CSI data collected in the Monitor mode may be lost, and the packet loss rate is about 0.1%-0.05%, which will affect the accuracy of the original data. Furthermore, in order to make the collected data more accurate. First, linear interpolation is performed on the original data. Secondly, each subcarrier is passed through Hampel to remove outliers, and the data after removing outliers is smoothed again through the Savitzky-Golay filter. The present invention reconstructs the processed CSI ratio data as:

[0027] X′=[x′1,…,x′ k ,…,x′ K ]

[0028] Among them, x k ′ is represented by x k The CSI ratio data of the kth subcarrier after filtering.

[0029]

[0030] in, and Respectively represent the kth subcarrier x′ of the CSI ratio data k The real and imaginary parts of and They represent the real part and imaginary part of the nth data packet of the kth subcarrier of the CSI ratio data respectively.

[0031] Step 3: Project the CSI ratio data, extract the breathing feature short-term breathing-to-noise ratio (Breathing-to-Noise Ratio, BNR), and select the subcarrier that meets the BNR requirements. The specific algorithm flow is as follows:

[0032] The filtered CSI ratio signal obtained in step 2 is projected, and the amplitude and phase information are combined to generate a candidate set representing different breathing pattern signals.

[0033] First, the time series x′ of the filtered CSI ratio k (1≤k≤K) is projected onto the rotation axis [cosθsinθ], and the parameter θ is gradually increased from 0 to generate different candidate sequences:

[0034]

[0035] Among them, y k Represents subcarrier x′ k The candidate sequence generated when the rotation angle of the projection coordinate axis is θ. Set the projection angle θ range to [0,π], the step size to π / P, and generate a total of P candidate time sequences for each subcarrier. The different candidate sequences generated after all subcarriers are projected are expressed as follows:

[0036]

[0037] in, represents the p-th (0≤p≤P-1) candidate sequence of the k-th subcarrier, that is, the candidate time sequence obtained when the projection angle of the k-th subcarrier is θ=(p-1)·π / P.

[0038] Secondly, the short-term breathing noise ratio of the signal is calculated to extract the breathing feature to measure the performance of the combined candidate. The periodicity of the signal pattern over a period of time represents its ability to perceive breathing. The specific calculation steps are as follows:

[0039] First, if the sampling rate f s =100Hz, using a window length of 12, corresponding to 1200 samples, using 6992 zero-value samples plus zero padding to obtain 8192 samples, and Fourier transform all samples. Secondly, the maximum energy is screened out within the range of human breathing (10-37bpm), which is the energy of the breathing signal, and the energy is compared with the total energy in the frequency domain to obtain the short-term breathing noise ratio.

[0040] Find the breathing feature BNR of all candidate time series of K subcarriers, expressed as follows:

[0041]

[0042] in, It represents the BNR value of the candidate time series obtained when the projection angle of the k-th subcarrier is θ=(p-1)·π / P, which is a numerical value.

[0043] Then, find the maximum BNR value of the kth subcarrier under different projection axes, that is, Composition set {b k}. Take the set {b k} has a maximum value of b, and the threshold is set to δ = 0.7b, and the set {bk} is greater than the threshold value k The corresponding subcarrier candidate sequence. The number of selected subcarriers is: S = card {k | {b k}>δ}, and find the corresponding set {k|{b k The candidate time sequence of the kth subcarrier in}>δ}. The selection results are as follows:

[0044] Y′=[y′1,…,y′ s ,…,y′ S ]

[0045] Among them, y′ s Indicates the candidate time sequence corresponding to the selected sth (1≤s≤S) subcarrier.

[0046] Step 4: Signal variational mode decomposition (VMD) and Hilbert-Huang transform time-frequency analysis, remove non-human breathing frequency components for reconstruction. The specific algorithm flow is as follows:

[0047] First, the S subcarriers selected in step 3 are subjected to variational mode decomposition:

[0048]

[0049] Among them, y′ s (t) is the sth subcarrier in Y′, M is the number of modal components, u m (t) is the mth (1≤m≤M) modal component signal.

[0050] Secondly, construct the analytical signal for each modal component. The analytical signal is based on the combination of the original signal and its Hilbert transform. The instantaneous frequency and instantaneous energy are obtained according to the analytical signal:

[0051]

[0052] where z m Represents the analytical signal, represents the Hilbert transform, a m and θ m denote the instantaneous amplitude and instantaneous phase of the mth modal component, respectively, |a m (t)| 2 and w m represent the instantaneous energy and instantaneous frequency of the mth modal component respectively.

[0053] Then, the instantaneous frequency and instantaneous energy obtained by the above formula are used to perform Hilbert-Huang transform time-frequency analysis on each modal component, the first two high-frequency components that are irrelevant to the breathing frequency are removed, and the modal components within the remaining breathing range are reconstructed. The reconstructed s (1≤s≤S)th subcarrier time series is expressed as:

[0054]

[0055] All reconstructed subcarrier combinations are denoted as Y″:

[0056] Y″=[y″1,…,y″ s ,…,y″ S ]

[0057] Step 5: Signal fusion. The specific algorithm is as follows:

[0058] The signal reconstructed in step 4 is fused using principal component analysis (PCA). PCA transforms the original eigenvector into a set of linearly independent principal components. The algorithm first calculates the covariance matrix of all samples, and then solves the eigenvalues ​​and eigenvectors through singular value decomposition. Finally, the main breathing signal is obtained using the maximum eigenvalue and eigenvector as the principal component analysis signal:

[0059]

[0060] Among them, a n Represents the principal component analysis signal after fusion The nth (1≤n≤N) data packet.

[0061] Step 6: The main component breathing signal obtained in step 5 Perform peak detection and extract the respiratory rate. The specific algorithm flow is as follows:

[0062] First, the principal component breathing signal Get the local peak set: Maxset = {τ j ,1≤j≤J}. The verification window is set to: M;

[0063] Secondly, for each peak point τ j Find the position and peak locs: = locatio(τ j );amp:=amplitude(τ j );

[0064] Again, yes Each point in the range first determines whether n is within the range of 1<n<N. If so, by comparing Each point in the range is used to determine whether there is a point greater than the current peak point. If: amp<x(n), delete τ from MarSet k ; and update MarSet;

[0065] Finally, the updated Maxset = {τ l ,1≤l≤L} to obtain the total time interval between adjacent true peaks, recorded as sum; by the formula: Get the respiratory rate, f s is the sampling rate.

[0066] Beneficial Effects

[0067] This method first selects two WiFi links with larger fluctuations through the double difference of the three obtained WiFi links, and then compares them to eliminate the random phase offset problem of commercial WiFi that changes over time. Secondly, the CSI ratio is projected to extract the breathing feature BNR, and the subcarriers that meet the threshold are selected for VMD signal decomposition and Hilbert-Huang transform for time-frequency analysis, thereby removing non-human breathing frequency components. On this basis, reconstruction is performed, and the reconstructed signal is fused using principal component analysis. Finally, the breathing rate is extracted using peak detection.

[0068] The present invention provides a respiratory rate detection method based on Hilbert-Huang transform time-frequency analysis. While removing the time-varying phase offset and a large amount of high-frequency noise and selecting the optimal subcarrier, it not only expands the sensing range, but also eliminates the "blind spot" and improves the respiratory rate detection accuracy, providing a more accurate detection method for non-contact respiratory rate detection. BRIEF DESCRIPTION OF THE DRAWINGS

[0069] Figure 1 The block diagram of the respiratory rate detection method based on Hilbert-Huang transform time-frequency analysis of the present invention is as follows Specific implementation plan

[0070] The purpose of the present invention is to provide a respiratory rate detection method based on Hilbert-Huang transform time-frequency analysis to improve the accuracy of respiratory rate detection without wearing any equipment or camera and in the presence of relative interference of human targets.

[0071] The respiratory rate detection method based on Hilbert-Huang transform time-frequency analysis described in the present invention specifically comprises the following steps:

[0072] Step 1: The transmitting device sends a radio frequency signal to the receiving device. The data is transmitted through orthogonal frequency-division multiplexing (OFDM) so that the signal can be modulated to achieve parallel transmission of multiple subcarriers. Use Intel5300 network card to obtain WiFi signal CSI information. If the number of WiFi device antennas is I, the number of subcarriers is K, and the number of data packets is N. Then the CSI data matrix can be written as:

[0073]

[0074] Among them, H i represents the CSI data of the i-th (1≤i≤I) WiFi link, represents the CSI data of the kth (1≤k≤K)th subcarrier of the i-th (1≤i≤I)th WiFi link, Indicates the CSI data of the kth (1≤k≤K) subcarrier of the ith (1≤i≤I) antenna in the nth (1≤n≤N) data packet.

[0075]

[0076] in, and are the real and imaginary parts of the kth subcarrier for the ith antenna in the nth data packet, respectively. and Indicates the amplitude and phase of the kth subcarrier of the ith antenna in the nth data packet.

[0077] Step 2: Use the double difference to set the threshold to select the "sensitive" WiFi link. The specific algorithm flow is as follows:

[0078] First, calculate the CSI amplitude variance of each subcarrier on different links. The amplitude variance of I antennas and K subcarriers can be expressed as:

[0079]

[0080] Among them, V i is the vector of the amplitude variance of the K subcarriers of the i-th (1≤i≤I) antenna, is the amplitude variance of the kth (1≤k≤K) subcarrier of the ith (1≤i≤I)th antenna, expressed as:

[0081]

[0082] Among them, μ i,k is the mean value of the amplitude of N data packets of the kth (1≤k≤K)th subcarrier of the ith (1≤i≤I)th antenna, expressed as:

[0083]

[0084] Secondly, set the threshold to ε i =0.7·max{V i}(1≤i≤I), where max{·} represents the maximum value of {·}, and selects the subcarriers whose amplitude variance of each WiFi link is greater than the threshold, and the number of subcarriers is K i , K i =card{k|{V i}>ε i}, where card{·} represents the number of calculated{·} elements. And the average amplitude variance of the subcarriers in the set is taken, then the average amplitude variance of the subcarriers selected by I antennas is recorded as: v = [v1,…,v i ,…,v I ]. Among them, v i It represents the average amplitude variance of the selected subcarrier of the i-th (1≤i≤I) WiFi link, which is a numerical value. It is expressed as:

[0085]

[0086] Finally, the WiFi links with the largest and second largest average amplitude variance are selected and renamed H′1 and H′2.

[0087] Step 2: For the two "sensitive" WiFi links obtained in step 1, first, use the CSI ratio method to eliminate the time-varying phase offset and divide the CSI readings of the two receiving antenna subcarriers. The CSI ratio calculation formula is as follows:

[0088]

[0089] Among them, x k Indicates the CSI ratio data of the kth subcarrier, and They are the CSI data of the kth subcarrier of the two selected WiFi links H′1 and H′2 respectively.

[0090] Secondly, the CSI ratio is still a complex number. The CSI data collected in the Monitor mode may be lost, and the packet loss rate is about 0.1%-0.05%, which will affect the accuracy of the original data. Furthermore, in order to make the collected data more accurate. First, linear interpolation is performed on the original data. Secondly, each subcarrier is passed through Hampel to remove outliers, and the data after removing outliers is smoothed again through the Savitzky-Golay filter. The present invention reconstructs the processed CSI ratio data as:

[0091] X′=[x′1,…,x′k ,…,x′ K ]

[0092] Among them, x k ′ is represented by x k The CSI ratio data of the kth subcarrier after filtering.

[0093]

[0094] in, and Respectively represent the kth subcarrier x′ of the CSI ratio data k The real and imaginary parts of and They represent the real part and imaginary part of the nth data packet of the kth subcarrier of the CSI ratio data respectively.

[0095] Step 3: Project the CSI ratio data, extract the breathing feature short-term breathing-to-noise ratio (Breathing-to-Noise Ratio, BNR), and select the subcarrier that meets the BNR requirements. The specific algorithm flow is as follows:

[0096] The filtered CSI ratio signal obtained in step 2 is projected, and the amplitude and phase information are combined to generate a candidate set representing different breathing pattern signals.

[0097] First, the time series x′ of the filtered CSI ratio k (1≤k≤K) is projected onto the rotation axis [cosθsinθ], and the parameter θ is gradually increased from 0 to generate different candidate sequences:

[0098]

[0099] Among them, y k Represents subcarrier x′ k The candidate sequence generated when the rotation angle of the projection coordinate axis is θ. Set the projection angle θ range to [0,π], the step size to π / P, and generate a total of P candidate time sequences for each subcarrier. The different candidate sequences generated after all subcarriers are projected are expressed as follows:

[0100]

[0101] in, represents the p-th (0≤p≤P-1) candidate sequence of the k-th subcarrier, that is, the candidate time sequence obtained when the projection angle of the k-th subcarrier is θ=(p-1)·π / P.

[0102] Secondly, the short-term breathing noise ratio of the signal is calculated to extract the breathing feature to measure the performance of the combined candidate. The periodicity of the signal pattern over a period of time represents its ability to perceive breathing. The specific calculation steps are as follows:

[0103] First, if the sampling rate f s =100Hz, using a window length of 12, corresponding to 1200 samples, using 6992 zero-value samples plus zero padding to obtain 8192 samples, and Fourier transform all samples. Secondly, the maximum energy is screened out within the range of human breathing (10-37bpm), which is the energy of the breathing signal, and the energy is compared with the total energy in the frequency domain to obtain the short-term breathing noise ratio.

[0104] Find the breathing feature BNR of all candidate time series of K subcarriers, expressed as follows:

[0105]

[0106] in, It represents the BNR value of the candidate time series obtained when the projection angle of the k-th subcarrier is θ=(p-1)·π / P, which is a numerical value.

[0107] Then, find the maximum BNR value of the kth subcarrier under different projection axes, that is, Composition set {b k}. Take the set {b k} has a maximum value of b, and the threshold is set to δ = 0.7b, and the set {b k} is greater than the threshold value k The corresponding subcarrier candidate sequence. The number of selected subcarriers is: S = card {k | {b k}>δ}, and find the corresponding set {k|{b k The candidate time sequence of the kth subcarrier in}>δ}. The selection results are as follows:

[0108] Y′=[y′1,…,y′ s ,…,y′ S ]

[0109] Among them, y′ s Indicates the candidate time sequence corresponding to the selected sth (1≤s≤S) subcarrier.

[0110] Step 4: Signal variational mode decomposition (VMD) and Hilbert-Huang transform time-frequency analysis, remove non-human breathing frequency components for reconstruction. The specific algorithm flow is as follows:

[0111] First, the S subcarriers selected in step 3 are subjected to variational mode decomposition:

[0112]

[0113] Among them, y′ s (t) is the sth subcarrier in Y′, M is the number of modal components, u m (t) is the mth (1≤m≤M) modal component signal.

[0114] Secondly, construct the analytical signal for each modal component. The analytical signal is based on the combination of the original signal and its Hilbert transform. The instantaneous frequency and instantaneous energy are obtained according to the analytical signal:

[0115]

[0116] where z m Represents the analytical signal, represents the Hilbert transform, a m and θ m denote the instantaneous amplitude and instantaneous phase of the mth modal component, respectively, |a m (t)| 2 and w m represent the instantaneous energy and instantaneous frequency of the mth modal component respectively.

[0117] Then, the instantaneous frequency and instantaneous energy obtained by the above formula are used to perform Hilbert-Huang transform time-frequency analysis on each modal component, the first two high-frequency components that are irrelevant to the breathing frequency are removed, and the modal components within the remaining breathing range are reconstructed. The reconstructed s (1≤s≤S)th subcarrier time series is expressed as:

[0118]

[0119] All reconstructed subcarrier combinations are denoted as Y″:

[0120] Y″=[y″1,…,y″ s ,…,y″ S ]

[0121] Step 5: Signal fusion. The specific algorithm is as follows:

[0122] The signal reconstructed in step 4 is fused using principal component analysis (PCA). PCA transforms the original eigenvector into a set of linearly independent principal components. The algorithm first calculates the covariance matrix of all samples, and then solves the eigenvalues ​​and eigenvectors through singular value decomposition. Finally, the main breathing signal is obtained using the maximum eigenvalue and eigenvector as the principal component analysis signal:

[0123]

[0124] Among them, a n Represents the principal component analysis signal after fusion The nth (1≤n≤N) data packet.

[0125] Step 6: The main component breathing signal obtained in step 5 Perform peak detection and extract the respiratory rate. The specific algorithm flow is as follows:

[0126] First, the principal component breathing signal Get the local peak set: Maxset = {τ j ,1≤j≤J}. The verification window is set to: M;

[0127] Secondly, for each peak point τ j Find the position and peak locs: = locatio(τ j );amp:=amplitude(τ j );

[0128] Again, yes Each point in the range first determines whether n is within the range of 1<n<N. If so, by comparing Each point in the range is used to determine whether there is a point greater than the current peak point. If: amp<x(n), delete τ from MarSet k ; and update MarSet;

[0129] Finally, the updated Maxset = {τ l ,1≤l≤L} to obtain the total time interval between adjacent true peaks, recorded as sum; by the formula: Get the respiratory rate, f s is the sampling rate.

Claims

1. A respiratory rate detection method based on Hilbert-Huang transform time-frequency analysis, comprising the following steps: Step 1: The transmitting device sends a radio frequency signal to the receiving device. The data is transmitted through orthogonal frequency-division multiplexing (OFDM) so that the signal can be modulated to achieve parallel transmission of multiple subcarriers. Use Intel5300 network card to obtain WiFi signal CSI information. If the number of WiFi device antennas is I, the number of subcarriers is K, and the number of data packets is N. Then the CSI data matrix can be written as: Among them, H i represents the CSI data of the i-th (1≤i≤I) WiFi link, represents the CSI data of the kth (1≤k≤K)th subcarrier of the i-th (1≤i≤I)th WiFi link, Indicates the CSI data of the kth (1≤k≤K) subcarrier of the ith (1≤i≤I) antenna in the nth (1≤n≤N) data packet. in, and are the real and imaginary parts of the kth subcarrier for the ith antenna in the nth data packet, respectively. and Indicates the amplitude and phase of the kth subcarrier of the ith antenna in the nth data packet. Step 2: Use the double difference to set the threshold to select "sensitive" WiFi links. The specific algorithm flow is as follows: First, calculate the CSI amplitude variance of each subcarrier on different links. The amplitude variance of I antennas and K subcarriers can be expressed as: Among them, V i is the vector of the amplitude variance of the K subcarriers of the i-th (1≤i≤I) antenna, is the amplitude variance of the kth (1≤k≤K) subcarrier of the ith (1≤i≤I)th antenna, expressed as: Among them, μ i,k is the mean value of the amplitude of N data packets of the kth (1≤k≤K)th subcarrier of the ith (1≤i≤I)th antenna, expressed as: Secondly, set the threshold to ε i =0.7·max{V i }(1≤i≤I), where max{·} represents the maximum value of {·}, and selects the subcarriers whose amplitude variance of each WiFi link is greater than the threshold, and the number of subcarriers is K i , K i =card{k|{V i }>ε i }, where card{·} represents the number of calculated{·} elements. And the average amplitude variance of the subcarriers in the set is taken, then the average amplitude variance of the subcarriers selected by I antennas is recorded as: v = [v1,…,v i ,…,v I ]. Among them, v i It represents the average amplitude variance of the selected subcarrier of the i-th (1≤i≤I) WiFi link, which is a numerical value. It is expressed as: Finally, the WiFi links with the largest and second largest average amplitude variance are selected and renamed H′1 and H′2. Step 2: For the two "sensitive" WiFi links obtained in step 1, first, use the CSI ratio method to eliminate the time-varying phase offset. Divide the CSI readings of the two receiving antenna subcarriers. The CSI ratio calculation formula is as follows: Among them, x k Indicates the CSI ratio data of the kth subcarrier, and They are the CSI data of the kth subcarrier of the two selected WiFi links H′1 and H′2 respectively. Secondly, the CSI ratio is still a complex number. The CSI data collected in the Monitor mode may be lost, and the packet loss rate is about 0.1%-0.05%, which will affect the accuracy of the original data. Furthermore, in order to make the collected data more accurate. First, linear interpolation is performed on the original data. Secondly, each subcarrier is passed through Hampel to remove outliers, and the data after removing outliers is smoothed again through the Savitzky-Golay filter. The present invention reconstructs the processed CSI ratio data as: X′=[x′1,…,x′ k ,…,x′ K ] Among them, x k ′ is represented by x k The CSI ratio data of the kth subcarrier after filtering. in, and Respectively represent the kth subcarrier x′ of the CSI ratio data k The real and imaginary parts of and They represent the real part and imaginary part of the nth data packet of the kth subcarrier of the CSI ratio data respectively. Step 3: Project the CSI ratio data, extract the breathing feature short-term breathing-to-noise ratio (Breathing-to-Noise Ratio, BNR), and select the subcarrier that meets the BNR requirement. The specific algorithm flow is as follows: The filtered CSI ratio signal obtained in step 2 is projected, and the amplitude and phase information are combined to generate a candidate set representing different breathing pattern signals. First, the time series x′ of the filtered CSI ratio k (1≤k≤K) is projected onto the rotation axis [cosθ sinθ], and the parameter θ is gradually increased from 0 to generate different candidate sequences: Among them, y k Represents subcarrier x′ k The candidate sequence generated when the rotation angle of the projection coordinate axis is θ. Set the projection angle θ range to [0,π], the step size to π / P, and generate a total of P candidate time sequences for each subcarrier. The different candidate sequences generated after all subcarriers are projected are expressed as follows: in, represents the p-th (0≤p≤P-1) candidate sequence of the k-th subcarrier, that is, the candidate time sequence obtained when the projection angle of the k-th subcarrier is θ=(p-1)·π / P. Secondly, the short-term breathing noise ratio of the signal is calculated to extract the breathing feature to measure the performance of the combined candidate. The periodicity of the signal pattern over a period of time represents its ability to perceive breathing. The specific calculation steps are as follows: First, if the sampling rate f s =100Hz, using a window length of 12, corresponding to 1200 samples, using 6992 zero-value samples plus zero padding to obtain 8192 samples, and Fourier transform all samples. Secondly, the maximum energy is screened out within the range of human breathing (10-37bpm), which is the energy of the breathing signal, and the energy is compared with the total energy in the frequency domain to obtain the short-term breathing noise ratio. Find the breathing feature BNR of all candidate time series of K subcarriers, expressed as follows: in, It represents the BNR value of the candidate time series obtained when the projection angle of the k-th subcarrier is θ=(p-1)·π / P, which is a numerical value. Then, find the maximum BNR value of the kth subcarrier under different projection axes, that is, Composition set {b k }. Take the set {b k } has a maximum value of b, and the threshold is set to δ = 0.7b, and the set {b k } is greater than the threshold value k The corresponding subcarrier candidate sequence. The number of selected subcarriers is: S = card {k | {b k }>δ}, and find the corresponding set {k|{b k The candidate time sequence of the kth subcarrier in}>δ}. The selection results are as follows: Y′=[y′1,…,y′ s ,…,and' S ] Among them, y′ s Indicates the candidate time sequence corresponding to the selected sth (1≤s≤S) subcarrier. Step 4: Signal variational mode decomposition (VMD) and Hilbert-Huang transform time-frequency analysis, remove non-human breathing frequency components for reconstruction. The specific algorithm flow is as follows: First, the S subcarriers selected in step 3 are subjected to variational mode decomposition: Among them, y′ s (t) is the sth subcarrier in Y′, M is the number of modal components, u m (t) is the mth (1≤m≤M) modal component signal. Secondly, construct the analytical signal for each modal component. The analytical signal is based on the combination of the original signal and its Hilbert transform. The instantaneous frequency and instantaneous energy are obtained according to the analytical signal: where z m Represents the analytical signal, represents the Hilbert transform, a m and θ m denote the instantaneous amplitude and instantaneous phase of the mth modal component, respectively, |a m (t)| 2 and w m represent the instantaneous energy and instantaneous frequency of the mth modal component respectively. Then, the instantaneous frequency and instantaneous energy obtained by the above formula are used to perform Hilbert-Huang transform time-frequency analysis on each modal component, the first two high-frequency components that are irrelevant to the breathing frequency are removed, and the modal components within the remaining breathing range are reconstructed. The reconstructed s (1≤s≤S)th subcarrier time series is expressed as: All reconstructed subcarrier combinations are denoted as Y″: Y″=[y″1,…,y″ s ,…,and" S ] Step 5: Signal fusion. The specific algorithm is as follows: The signal reconstructed in step 4 is fused using principal component analysis (PCA). PCA transforms the original eigenvector into a set of linearly independent principal components. The algorithm first calculates the covariance matrix of all samples, and then solves the eigenvalues ​​and eigenvectors through singular value decomposition. Finally, the main breathing signal is obtained using the maximum eigenvalue and eigenvector as the principal component analysis signal: Among them, a n Represents the principal component analysis signal after fusion The nth (1≤n≤N) data packet. Step 6: The main component breathing signal obtained in step 5 Perform peak detection and extract the respiratory rate. The specific algorithm flow is as follows: First, the principal component breathing signal Get the local peak set: Maxset = {τ j ,1≤j≤J}. The verification window is set to: M; Secondly, for each peak point τ j Find the position and peak locs: = locatio(τ j );amp:=amplitude(τ j ); Again, yes Each point in the range first determines whether n is within the range of 1<n<N. If so, by comparing Each point in the range is used to determine whether there is a point greater than the current peak point. If: amp<x(n), delete τ from MarSet k ; and update MarSet; Finally, the updated Maxset = {τ l ,1≤l≤L} to obtain the total time interval between adjacent true peaks, recorded as sum; by the formula: Get the respiratory rate, f s is the sampling rate.

Citation Information

Patent Citations

  • Human respiration detection method based on WiFi channel state information

    CN109998549A

  • Respiration state monitoring system based on WIFI-CSI

    CN115002822A

  • Respiration detection method and system based on WiFi signal and storage medium

    CN115481652A

  • Sleep / motion determination based on wi-fi signals

    EP3692898A1

  • Respiration rate detection using wi-fi

    US20230109057A1