Disclosure of Invention
The invention aims to solve the problems of the prior art and provides a home respiration monitoring device integrating radar and WiFi channel state information.
The technical scheme for realizing the purpose of the invention is that the home respiration monitoring device integrating radar and WiFi channel state information comprises a radar signal acquisition processing module, a WiFi signal acquisition processing module, a data communication module and a respiration information fusion module;
The radar signal acquisition processing module is used for detecting human respiratory signals through the millimeter wave FMCW radar and processing the I/Q orthogonal echo signals acquired by the FMCW radar to obtain respiratory signals;
the WiFi signal acquisition processing module is used for acquiring the CSI signal containing the breathing activity information through the WiFi wireless network card, calculating the CSI ratio of the receiving channel, removing time-varying noise and further extracting the breathing signal;
the data communication module is used for constructing a networking system based on millimeter wave FMCW radar and WiFi through different network cable transmission modes;
And the respiratory information fusion module is used for dynamically fusing the respiratory signals output by the radar signal acquisition and processing module and the WiFi signal acquisition and processing module.
Further, the radar signal acquisition processing module is configured to detect a respiratory signal of a human body through a millimeter wave FMCW radar, and process an I/Q quadrature echo signal acquired by the FMCW radar to obtain a respiratory signal, and specifically includes:
The method comprises the steps of 1-1, acquiring and extracting in-phase quadrature signals (I/Q signals) in a plurality of range gates by adopting a millimeter wave FMCW radar, wherein a transmitting synthesizer of the FMCW radar generates a linear frequency modulation continuous wave signal, the signal is reflected when encountering a human body;
step 1-2, preprocessing in-phase and quadrature signals, i.e. I/Q signals, in the plurality of distance gates to eliminate direct current bias in the signals, demodulate target information and filter interference noise;
Step 1-3, reconstructing the plurality of distance gate signals preprocessed in step 1-2 by adopting a method based on nonnegative matrix factorization, and eliminating random body movement interference;
And step 1-4, outputting a respiratory signal by selecting a distance gate based on the respiratory quality index according to the signals of the distance gates obtained after the reconstruction in the step 1-3.
Further, the WiFi signal acquisition processing module is configured to acquire a CSI signal containing respiratory activity information through a WiFi wireless network card, calculate a CSI ratio of a receiving channel, so as to remove time-varying noise, and further extract a respiratory signal, and specifically includes:
Step 2-1, acquiring an original CSI signal containing respiratory activity information through a WiFi wireless network card, wherein the WiFi wireless network card captures a CSI data packet containing the respiratory activity information under a multiple-transmission multiple-reception configuration, wherein the CSI data packet is a complex matrix, the dimension is N multiplied by M multiplied by P, N is the number of transmitting antennas, M is the number of receiving antennas, and P is the number of subcarrier paths grabbed by the WiFi wireless network card;
Step 2-2, calculating the CSI Ratio of two receiving antennas to obtain a CSI Ratio data packet, thereby removing time-varying noise;
For each CSI data packet corresponding to one time stamp respectively, calculating CSI Ratio values of all possible combined receiving antenna pairs, namely CSI Ratio, for each transmitting antenna, generating Ratio values of W rows and 1 columns, and then forming a W X Q CSI Ratio matrix, wherein W is the total number of sub-carrier paths of all possible receiving antenna pairs, and Q is the number of the CSI Ratio data packets;
Step 2-3, correcting the CSI Ratio data packet output in the step 2-2 based on prior information, compensating phase static component and compensating phase jump, outputting an updated CSI Ratio matrix of W X Q1, wherein Q1 is the number of the updated CSI Ratio data packets;
step 2-4, dividing the CSI Ratio matrix of the W×Q1 output in the step 2-3 into W channels, each channel comprising Sub-carriers for each channelSub-carrier wave, carrying out sub-carrier wave fusion based on RQI maximum ratio combining-principal component analysis method, namely RQI-MRC-PCA; the w channels are then selected based on the respiratory quality index RQI, generating the final respiratory waveform.
Further, the breath information fusion module is used for dynamically fusing the breath signals output by the radar signal acquisition and processing module and the WiFi signal acquisition and processing module, and specifically comprises:
step 4-1, extracting the respiratory frequency changing along with time for the respiratory signals output by the radar signal acquisition and processing module and the WiFi signal acquisition and processing module, specifically comprising:
(1) Wavelet transformation extracting time-frequency information, namely wavelet transformation is carried out on the respiratory signal x (t) to obtain values of parameters of a scale a and a time b and a time-frequency representation W f (a, b) expression:
wherein a is a scale parameter inversely proportional to frequency, b is a time parameter corresponding to a time axis position, ψ is a mother wavelet function for local frequency analysis, Wavelet transformation decomposes the signal into components of different scales to obtain a time-scale joint distribution, i.e. an instant frequency representation W f (a, b), reflecting the energy distribution of the signal at time b and scale a;
(2) Calculating candidate instantaneous frequencies, for W f (a, b) noteq0, by phase derivative to calculate candidate instantaneous frequencies ω (a, b):
wherein, the deflection is guided The rate of change over time b, symbol i representing the imaginary unit;
(3) Synchronous compression transformation, namely, reassigning the time-frequency representation W f (a, b) along a frequency axis to generate a high-resolution time-frequency distribution T f (omega, b):
Wherein A (b) is an effective scale set, satisfies |W f (a, b) | > E, and E is a threshold value for noise suppression, delta (·) is a Dirac function, and energy is redistributed to an estimated instantaneous frequency omega;
(4) The instantaneous respiratory rate is extracted by searching the frequency corresponding to the energy peak value in the time-frequency distribution T f (omega, b) for each time b as the instantaneous respiratory rate f r (T):
fr(t)=arg max(Tf(ω,b))
Wherein arg max (T f (ω, b)) represents an argument ω corresponding to the maximum value of the return energy intensity;
step 4-2, comprehensively evaluating the signal quality of the sensor on the respiratory signals output by the radar signal acquisition and processing module and the WiFi signal acquisition and processing module through three independent indexes of respiratory quality index, respiratory frequency and signal fluctuation standard deviation, wherein the method specifically comprises the following steps:
Step 4-2-1, calculating a SQI value SQI RQI of the sensor based on the respiratory quality index RQI:
The sensors comprise millimeter wave FMCW radar and WiFi wireless network cards, SQI represents a signal quality index, max RQI represents that the RQI value of a certain sensor is ranked highest in all sensors, the 2th max RQI represents that the RQI value of a certain sensor is ranked second highest in all sensors, the 2th min RQI represents that the RQI value of a certain sensor is ranked second lowest in all sensors, and min RQI represents that the RQI value of a certain sensor is ranked lowest in all sensors;
Step 4-2-2, calculating a respiratory rate based sensor SQI value SQI RR:
Wherein RR represents the respiratory rate;
Step 4-2-3, calculating a sensor SQI value SQI SDFD based on the first order differential standard deviation, SDFD:
Wherein, min sigma represents a minimum sigma of a certain sensor, the 2th min sigma represents a second minimum sigma of a certain sensor, max sigma represents a maximum sigma of a certain sensor, the 2th max sigma represents a second maximum sigma of a certain sensor;
Sigma is the standard deviation of the first order difference of the original signal:
D[i]=x[i]-x[i-1]
wherein, x [ i ], x [ i-1] are the ith and ith-1 sampling points of the original respiratory signal, D [ i ] is the difference value of adjacent sampling points, N is the length of the first-order difference of the signal, and mu is the average value of the first-order difference of the original signal;
Step 4-2-4, calculating the final SQI of the sensor based on the three SQI values of steps 4-2-1 through 4-2-3:
SQI=SQIRQI×SQIRR×SQISDFD
Step 4-3, dynamically selecting a sensor output strategy based on the final SQI of the sensor, wherein the strategy comprises single-sensor direct output, multi-sensor preferred output and fusion output;
output rule of time-varying breathing rate TRR:
Th is a threshold value of radar and WiFi signals SQI, SQI radar is the SQI of the radar, SQI wifi is the SQI of the WiFi, TRR radar is the time-varying breathing frequency of the radar, TRR wifi is the time-varying breathing frequency of the WiFi, and TRR fusion is the time-varying breathing frequency of the radar and the WiFi in a fused mode.
Compared with the prior art, the invention has the remarkable advantages that:
(1) After the signal reconstruction algorithm based on nonnegative matrix factorization and the range gate selection algorithm based on the respiratory quality index in the radar signal processing flow provided by the invention are used for respiratory rate detection, the influence of random body movement and range gate signal quality spread is eliminated. Under the error range of 2BPM (times per minute), the average breath detection rate of the algorithm reaches more than 98%, the method is improved by about 8% compared with the traditional fixed distance gate method, and the anti-interference capability on random motion is enhanced.
(2) The signal optimized by the data correction algorithm in the WiFi signal processing flow is completely matched with the reference sensor signal, the static component bias and the phase jump are eliminated by the signal processed by the phase correction algorithm, RQI-MRC-PCA is fused, and the respiratory frequency average absolute error of the optimal channel output signal processing method is small. The measured data show that after the processing of the algorithm, the average absolute error (MAE) of the respiratory frequency is respectively 0.29BPM, 0.25BPM, 0.42BPM and 0.54BPM, which are far lower than those of other comparison algorithms, and the average absolute error of the respiratory frequency of RQI-MRC-PCA is only increased from 0.29BPM (2 meters) to 0.54BPM (5 meters) along with the increase of the distance, and the increase is less than 0.25BPM, so that the stable performance can be maintained at different distances.
(3) The SQI-based output state judgment and improved Bayesian model fusion algorithm-based multi-sensor data fusion method provided by the invention can accurately select the optimal respiratory frequency output at the current moment based on the characteristic parameters of signal quality. The respiratory rate of the fused system in the error range of 1BPM reaches 95.3%, the respiratory rate is improved by more than 2.6 times compared with that of a single radar/WiFi sensor (36.4% at maximum), the average absolute error is reduced to 0.38BPM, and the respiratory rate is reduced by more than 95% compared with that of an optimal single sensor (7.9 BPM).
The invention is described in further detail below with reference to the accompanying drawings.
Detailed Description
The present application will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present application more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the application.
It should be noted that, if there is a description of "first", "second", etc. in the embodiments of the present invention, the description of "first", "second", etc. is only for descriptive purposes, and is not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include at least one such feature. In addition, the technical solutions of the embodiments may be combined with each other, but it is necessary to base that the technical solutions can be realized by those skilled in the art, and when the technical solutions are contradictory or cannot be realized, the combination of the technical solutions should be considered to be absent and not within the scope of protection claimed in the present invention.
In one embodiment, the invention provides a home respiration monitoring device integrating radar and WiFi channel state information, which comprises a radar signal acquisition processing module, a WiFi signal acquisition processing module, a data communication module and a respiration information fusion module;
The radar signal acquisition processing module is used for detecting human respiratory signals through the millimeter wave FMCW radar and processing the I/Q orthogonal echo signals acquired by the FMCW radar to obtain respiratory signals;
the WiFi signal acquisition processing module is used for acquiring the CSI signal containing the breathing activity information through the WiFi wireless network card, calculating the CSI ratio of the receiving channel, removing time-varying noise and further extracting the breathing signal;
the data communication module is used for constructing a networking system based on millimeter wave FMCW radar and WiFi through different network cable transmission modes;
And the respiratory information fusion module is used for dynamically fusing the respiratory signals output by the radar signal acquisition and processing module and the WiFi signal acquisition and processing module.
The principle of the device of the invention is shown in figure 1.
Further, in one embodiment, the radar signal acquisition processing module is configured to detect a respiratory signal of a human body through a millimeter wave FMCW radar, and process an I/Q quadrature echo signal acquired by the FMCW radar to obtain the respiratory signal, and specifically includes:
The method comprises the steps of 1-1, acquiring and extracting in-phase quadrature signals (I/Q signals) in a plurality of range gates by adopting a millimeter wave FMCW radar, wherein a transmitting synthesizer of the FMCW radar generates a linear frequency modulation continuous wave signal, the signal is reflected when encountering a human body;
Step 1-2, preprocessing the in-phase and quadrature signals, i.e. the I/Q signals, in the plurality of distance gates, eliminating direct current offset in the signals, demodulating target information and filtering interference noise;
Step 1-3, reconstructing the plurality of distance gate signals preprocessed in step 1-2 by adopting a method based on nonnegative matrix factorization, and eliminating random body movement interference;
And step 1-4, outputting a respiratory signal by selecting a distance gate based on the respiratory quality index according to the signals of the distance gates obtained after the reconstruction in the step 1-3.
Further, in some embodiments, the preprocessing of the in-phase quadrature signals, i.e. I/Q signals, in the plurality of range gates in step 1-2 specifically includes:
Step 1-2-1, performing direct current bias elimination on I/Q signals in a plurality of distance gates, namely solving the circle center offset of an I/Q track by a least square circle fitting method, and respectively subtracting the offset from the original I/Q signals so as to eliminate the direct current bias;
Here, according to the complex signal theory, an ideal I/Q signal constitutes a unit circular trace on a complex plane centered at an origin. Direct current bias is introduced into an actual system under the influence of factors such as non-ideality of a radio frequency front end, nonlinearity of a device, power supply noise and the like, and the direct current bias causes the center drift of an I/Q track moving with an origin, so that the direct current bias needs to be eliminated;
Step 1-2-2, demodulating the I/Q signal using differential Cross-phase multiplication (DIFFERENTIATE AND Cross-multiple, DACM);
and step 1-2-3, filtering the demodulated signal through a band-pass filter.
The demodulated signal is preferably filtered here with a bandpass filter having a passband in the range of 0.1-0.5 Hz.
Further, in some embodiments, the step 1-3 is performed on the plurality of distance gate signals preprocessed in step 1-2 by reconstructing the plurality of distance gate signals by a method based on non-negative matrix factorization, thereby eliminating Random Body Motion (RBM) interference.
Step 1-3-1, performing Short Time Fourier Transform (STFT) on the plurality of distance gate signals preprocessed in step 1-2 to obtain a time spectrum, and performing non-negative matrix factorization on the time spectrum;
Here, the preprocessed plurality of range gate signals include chest motion and Random Body Motion (RBM) interference during breathing, the Random Body Motion (RBM) is mapped into the radar signal, the amplitude is usually much stronger than the breathing motion, so that the required breathing signal is submerged by the Random Body Motion (RBM) and the breathing frequency and breathing amplitude information cannot be extracted.
The step 1-3-1 specifically comprises the following steps:
taking out a certain distance gate signal X (T) from the preprocessed distance gate signals, and performing Short-time Fourier transform (Short-Time Fourier Transform, STFT) to obtain a time spectrum |X|, wherein the signal length of X (T) is N, the parameters of STFT are window length L and sliding window step length S, and the calculation formula of the time frame number T is T= [] Is rounded, whereby the dimension of |X| is L×T;
non-negative matrix factorization of |X|:
Wherein K is the preset base number and represents the combination of K frequency-time bases, the dimension of the matrix W is L multiplied by K, each column W i is a frequency base and represents different frequency components, the dimension of the matrix H is K multiplied by T, each row Reflecting the contribution of the frequency component in different time periods for corresponding time intensity changes of the frequency base w i;
step 1-3-2, detecting random body movement interference, namely RBM interference, according to the two characteristics of high amplitude and sparsity, and carrying out signal reconstruction to eliminate the random body movement interference;
here, the Random Body Motion (RBM) is a short-time high-intensity motion whose energy is significantly higher than that of the periodic respiratory signal in the time-frequency domain, resulting in an energy burst corresponding to the base component h i, the Random Body Motion (RBM) disturbance is usually dominated by a single frequency component (e.g., high frequency impact), while the respiratory signal is distributed in a low frequency band, and the energy of other base components approaches the noise level when the RBM occurs, and thus, the RBM disturbance is detected according to two features of ultra-high amplitude and sparsity.
The step 1-3-2 specifically comprises the following steps:
step 1-3-2-1, detecting an abnormal high-amplitude time window;
The short-time Fourier transform divides a long-time continuous signal into a plurality of local time segments, and calculates the average energy of all time base components h i in the current time window, takes the average energy value as a first threshold value, and marks the time window as an abnormally high amplitude candidate if the energy of a certain time base component h i in the current time window exceeds the first threshold value;
Step 1-3-2-2, detecting sparsity;
For each abnormal high-amplitude candidate time window, checking whether the energy of all other base components h j in the time window is continuously lower than a preset second threshold (a minimum value), if so, indicating that sparsity exists, wherein RBM exists in the time window, and an interference source is the base component h i;
step 1-3-2-3, spectrum reconstruction during signal;
reconstructing the signal time spectrum |X| to
Where s i is a selection function, if the presence of RBM is detected within the ith time window, s i = 0, otherwise s i = 1;
here, by eliminating the time base component h i (i.e., setting s i =0) for which a certain time window is determined to be RBM interfering, all time windows are so processed by retaining the base component that is not interfered (i.e., setting s i =1).
Step 1-3-2-4, combining the reconstructed time spectrum with the original phase, and generating a respiration time domain signal for eliminating random body movement interference through inverse short time Fourier transform.
The reconstruction method as above is also performed on the signals of the other range gates to eliminate Random Body Motion (RBM) interference.
Further, in some embodiments, the signals of the plurality of distance gates obtained after the reconstruction in the steps 1-3 in the steps 1-4 are selected by the distance gate based on the respiratory quality index, and the output respiratory signals specifically include:
Step 1-4-1, signal segmentation cutting, namely cutting the reconstructed plurality of range gate signals (each range gate corresponds to a respiratory signal with different detection distances) into continuous time slices according to a preset time length, wherein the preset time is preferably 30 seconds;
Step 1-4-2, respectively calculating a respiratory quality index RQI of each time segment of each range gate;
The definition of the respiratory quality index (Respiratory Quality Indices, RQI) is:
Wherein, P max is the sum of the spectrogram peak value and the front and rear two continuous Fourier coefficients (total 3 coefficients) in the respiratory frequency range (0.1-0.7 Hz), and P RB is the sum of all Fourier coefficients in the whole respiratory frequency range;
Here, if the signal is sinusoidal, all signals are concentrated on a single spectrum, RQI is 1, and if the signal quality is too poor, the energy is spread over all frequencies, RQI is low. Thus, the higher the RQI, the more concentrated the energy of the respiratory component, the better the respiratory signal quality;
step 1-4-3, dynamically selecting and signal splicing, namely respectively calculating the respiratory quality indexes RQI of all range gates for the same time segment, comparing the RQI values of all range gates in the time segment, selecting the range gate signal with the highest RQI as the optimal range gate signal of the time segment, and then splicing the optimal range gate signals selected by each time segment according to time sequence to form continuous output so as to obtain respiratory signals.
Further, in one embodiment, the WiFi signal acquisition processing module is configured to acquire CSI signals containing respiratory activity information through a WiFi wireless network card (such as Intel 5300 network card series), calculate a CSI ratio of a receiving channel to remove time-varying noise, and further extract respiratory signals, and specifically includes:
Step 2-1, acquiring an original CSI signal containing respiratory activity information through a WiFi wireless network card, wherein the WiFi wireless network card (such as Intel 5300 network card series) captures a CSI data packet containing the respiratory activity information under a multiple-transmission and multiple-reception configuration, wherein the CSI data packet is a complex matrix, the dimension is N multiplied by M multiplied by P, N is the number of transmitting antennas, M is the number of receiving antennas, and P is the number of subcarrier paths grabbed by the WiFi wireless network card;
Preferably, a 2-transmit and 3-receive configuration is adopted, and only 30 sub-carriers in 56 paths of effective sub-carriers in the IEEE 802.11n protocol are grabbed under the limitation of CSI Tool, the WiFi network card continuously monitors channels, and captures CSI data packets containing breathing activity information, wherein the content of the data packets is a complex matrix, and the dimension is 2 (transmitting antenna) x 3 (receiving antenna) x 30 (sub-carrier).
Step 2-2, calculating the CSI Ratio of two receiving antennas to obtain a CSI Ratio data packet, thereby removing time-varying noise;
For each CSI data packet corresponding to one time stamp respectively, calculating CSI Ratio values of all possible combined receiving antenna pairs, namely CSI Ratio, for each transmitting antenna, generating Ratio values of W rows and 1 columns, and then forming a W X Q CSI Ratio matrix, wherein W is the total number of sub-carrier paths of all possible receiving antenna pairs, and Q is the number of the CSI Ratio data packets;
for the above described 2-transmit-3-receive configuration, for example, the CSI Ratio is calculated for each transmit antenna (TX 1 and TX 2), the CSI Ratio is calculated for all possible combinations of receive antenna pairs, the receive antenna pair of TX1 (RX 2/RX1, RX3/RX 2), the receive antenna pair of TX2 (RX 2/RX1, RX3/RX 2);
calculating the CSI Ratio of all the receiving antenna pairs for each data packet, generating Ratio values of 180 rows and 1 columns, and finally forming a matrix of 180 XN (N is the number of the data packets) containing 180 sub-carrier CSI Ratio;
Step 2-3, correcting the CSI Ratio data packet output in the step 2-2 based on prior information, compensating phase static component and compensating phase jump, outputting an updated CSI Ratio matrix of W X Q1, wherein Q1 is the number of the updated CSI Ratio data packets;
step 2-4, dividing the CSI Ratio matrix of the W×Q1 output in the step 2-3 into W channels, each channel comprising Sub-carriers for each channelSub-carrier wave, carrying out sub-carrier wave fusion based on RQI maximum ratio combining-principal component analysis method, namely RQI-MRC-PCA; the w channels are then selected based on the respiratory quality index RQI, generating the final respiratory waveform.
Here, by way of example, the 180×m CSI Ratio matrix (M is the number of valid data packets) output in step 2-3 is composed of 6 channels, each channel containing 30 subcarriers. The 30 sub-carriers of each channel are subjected to RQI-MRC-PCA (maximum ratio combining-principal component analysis) sub-carrier fusion based on RQI, and finally signals of 6 channels are selected based on a respiratory quality index RQI to generate a final respiratory waveform.
Further, in some embodiments, step 2-3 specifically includes:
Step 2-3-1, for each sub-carrier CSI Ratio, performing correction based on prior information, specifically including:
and 2-2, screening the CSI Ratio matrix of the W X Q (180X N) output in the step, namely traversing the time stamp of the adjacent CSI Ratio data packet, calculating the time difference, marking as repeated data packets when the time difference is smaller than a preset threshold value, eliminating one of the CSI Ratio data packets, outputting the CSI Ratio matrix of the W X Q1, and obtaining the Q1 as the total number of the residual effective CSI Ratio data packets after elimination, wherein the time difference is expressed as follows by a formula:
CSI Ratioi=CSI Ratioi×Remaini
Wherein Remain i is a retention factor of the i-th CSI Ratio packet, i.e., CSI Ratio i, T i and T i-1 represent time stamps of the i-th CSI Ratio packet and the i-1-th CSI Ratio packet, respectively, T TH is a preset threshold, and if the value of T i-Ti-1 is smaller than the preset threshold, the sampling interval of the packet is considered to be abnormal, and the i-th CSI Ratio packet needs to be removed;
step 2-3-2, performing phase jump compensation for each sub-carrier CSI Ratio, specifically including:
calculating the phase difference scores of adjacent time sequences for the CSI Ratio of each sub-carrier, taking the average value of all phase difference absolute values, and setting 10 times of the average value as a dynamic threshold value, wherein the phase difference scores are obtained by subtracting the phase at the last time from the phase at the previous time;
Traversing time sequence data, judging phase jump if the absolute value of the phase difference at a certain moment exceeds the dynamic threshold value, multiplying the CSI Ratio data packet (real part and imaginary part) at the moment by a compensation factor-1 to counteract jump, otherwise, keeping the original value;
Expressed by the formula:
Dphase[i]=Phasei-Phasei-1 i≥2
PhaseTH=10×ave(abs(Dphase))
real(CSI Ratioi)=real(CSI Ratioi)×Compensatei
imag(CSI Ratioi)=imag(CSI Ratioi)×Compensatei
Calculating a difference value between an i-th CSI Ratio data packet Phase i and an i-1-th CSI Ratio data packet Phase i-1, wherein the difference value is used for detecting whether mutation exists in adjacent time intervals;
a second formula, calculating an average value (ave) according to the absolute value abs (D phase) of the Phase difference of all data packets of the current subcarrier, and taking 10 times of the average value as a dynamic threshold value (Phase TH);
Calculating a compensation factor, namely calculating the phase difference absolute value of two adjacent CSI Ratio data packets, judging that phase jump occurs if the absolute value exceeds a dynamic threshold, and setting the compensation factor to be-1, otherwise, keeping the compensation factor to be-1 (no jump, no compensation is needed);
The fourth and fifth formulas are that the real part and the imaginary part of the CSI Ratio at the jump time are multiplied by a compensation factor-1 at the same time to realize phase compensation;
Wherein, phase i and Phase i-1 respectively represent the phases of the ith CSI Ratio data packet and the (i-1) th CSI Ratio data packet, D phase [ i ] is the Phase difference, phase TH is the threshold value, compensate i is the compensation factor of the ith CSI Ratio data packet;
step 2-3-3, for each sub-carrier CSI Ratio, performing phase static component compensation, specifically including:
And (3) adopting a circle fitting method based on a least square method, and performing iterative calculation to ensure that the error of the horizontal coordinate, the vertical coordinate and the radius is smaller than a preset allowable error, and further outputting the circle center coordinate and the radius to finish the phase static component compensation.
Here, first, the least square method performs a circle fit to the constellation of CSI Ratio. Let the center coordinates be (a, b), the radius of the circle be r, the distance from the points (x i,yi) on the circle to the center of the circle be d i:
(x-a)2+(y-b)2=r2
Where (x i,yi) is the coordinates of a point on the circle and d i is the distance of the point from the center of the circle. According to the least square idea, only Σ is needed (d i-r)2 is the minimum time, and the estimated circle is the target circle fitted by the least square method:
E=min[(∑(di-r)2)]
unfolding the following steps:
The partial derivatives are calculated for a, b and r respectively, the partial derivatives are set to be 0, and an iteration formula is obtained by combining an iteration idea:
and n is the iteration number, iterating until the error is smaller than a set threshold value, outputting a circle center (a, b) and a radius r, and respectively subtracting a and b from the real part and the imaginary part of the CSI Ratio to finish the phase static component compensation.
Further, in some embodiments, steps 2-4 specifically include:
Step 2-4-1, sub-carrier screening is carried out by sub-channel processing, sub-carriers with RQI higher than a channel average threshold value are reserved, and the rest sub-carriers are removed, specifically:
For each channel, calculating a respiratory quality index RQI of each sub-carrier;
Calculating average RQI values of all subcarriers of a current channel, wherein the average RQI values are used as subcarrier rejection thresholds, when the RQI value of a certain subcarrier is larger than the subcarrier rejection threshold, the subcarrier is reserved, otherwise, the subcarrier is rejected, and the calculation formula of the reserved factor value of the subcarrier is as follows:
where RQI i is the RQI value for the ith sub-carrier, RQI th is the sub-carrier removal threshold, Is a reserved factor of the i-th sub-carrier;
Step 2-4-2, performing gain calculation and direction factor calculation on the subcarriers reserved by each channel;
(1) The gain of the sub-carrier reserved by each channel is calculated based on the Maximum Ratio Combining (MRC), and the calculation formula is as follows:
Wherein gain i is the gain of the ith sub-carrier, and RMS i E(breath) and RMS i E(noise) are the root mean square of the respiratory signal and noise signal energy of the ith sub-carrier, respectively;
(2) The direction correction is performed on the reserved subcarriers of each channel based on Principal Component Analysis (PCA), specifically:
and (3) carrying out principal component analysis on the reserved subcarrier signals, extracting a first principal component, wherein if the first principal component is positive, the direction factor value of the subcarrier signals is 1, otherwise, the direction factor value is-1, and the calculation formula is as follows:
Wherein factor PCA is a direction factor of the i-th sub-carrier, and PCA i is a first main component of the i-th sub-carrier;
Step 2-4-3, performing weighted calculation on the phase and gain values, the reserved factor value and the direction factor value of the subcarrier signals, and fusing all subcarriers in one channel into one respiration waveform:
Where Phase initial is the original Phase of the i-th sub-carrier, phase i is the Phase of the i-th sub-carrier calculated by weighting, and Phase fusion is the Phase of the fusion output;
And 2-4-4, cutting the phase of the fusion output in the step 2-4-3 into segments according to a preset time length t, wherein t is in seconds, recalculating a respiratory quality index RQI value for the t second segment of each channel, selecting the channel segment with the highest RQI value as the optimal channel segment for w channel segments in the same time period, and connecting the optimal channel segments in each time period in time sequence to generate a final respiratory waveform.
Further, in one embodiment, the data communication module constructs a networking system based on radar and WiFi through different network cable transmission modes, and specifically includes:
And 3-1, connecting the radar with a host, and pre-configuring a remote target IP address matched with the host in radar equipment before the radar respiration monitoring operation. Then, connecting the radar with a host computer by utilizing a network cable;
step 3-2, connecting WiFi with a host, specifically comprising:
Step 3-2-1, respectively constructing environments at a server and a client, completing software package installation, and performing Samba configuration such as sharing folders;
and 3-2-2, setting at a server, and storing the CSI data acquired by the WiFi respiration monitoring system into a shared folder to realize networking of equipment at the WiFi respiration monitoring system and a PC. And the WiFi respiration monitoring system is used as end equipment and is responsible for collecting and transmitting respiration data to the side equipment.
Further, in one embodiment, the respiratory information fusion module is configured to dynamically fuse the respiratory signals output by the radar signal acquisition processing module and the WiFi signal acquisition processing module, and specifically includes:
step 4-1, extracting the respiratory frequency changing along with time for the respiratory signals output by the radar signal acquisition and processing module and the WiFi signal acquisition and processing module, specifically comprising:
(1) Wavelet transformation extracting time-frequency information, namely wavelet transformation is carried out on the respiratory signal x (t) to obtain values of parameters of a scale a and a time b and a time-frequency representation W f (a, b) expression:
Wherein a is a scale parameter inversely proportional to frequency (a smaller corresponding to a high frequency component and a larger corresponding to a low frequency), b is a time parameter corresponding to a time axis position, ψ is a mother wavelet function for local frequency analysis, Wavelet transformation decomposes the signal into components of different scales to obtain a time-scale joint distribution, i.e. an instant frequency representation W f (a, b), reflecting the energy distribution of the signal at time b and scale a;
(2) Calculating candidate instantaneous frequencies, for W f (a, b) noteq0, by phase derivative to calculate candidate instantaneous frequencies ω (a, b):
wherein, the deflection is guided The change rate of the time b is represented, the symbol i represents an imaginary unit, and the phase change of the complex domain is converted into the instantaneous frequency of the real domain through the imaginary unit i;
(3) Synchronous compression transformation, namely, reassigning the time-frequency representation W f (a, b) along a frequency axis to generate a high-resolution time-frequency distribution T f (omega, b):
Wherein A (b) is an effective scale set, meeting the condition that |W f (a, b) | > E, E is a threshold value and used for suppressing noise, delta (·) is a Dirac function, energy is redistributed to an estimated instantaneous frequency omega, and energy dispersed on a plurality of scales is concentrated to the vicinity of a real instantaneous frequency through synchronous compression, so that time-frequency resolution is improved;
(4) The instantaneous respiratory rate is extracted by searching the frequency corresponding to the energy peak value in the time-frequency distribution T f (omega, b) for each time b as the instantaneous respiratory rate f r (T):
fr(t)=argmax(Tf(ω,b))
wherein argmax (T f (ω, b)) represents an argument ω corresponding to the maximum value of the return energy intensity;
step 4-2, comprehensively evaluating the signal quality of the sensor on the respiratory signals output by the radar signal acquisition and processing module and the WiFi signal acquisition and processing module through three independent indexes of respiratory quality index, respiratory frequency and signal fluctuation standard deviation, wherein the method specifically comprises the following steps:
Step 4-2-1, calculating a SQI value SQI RQI of the sensor based on the respiratory quality index RQI:
The sensors comprise millimeter wave FMCW radar and WiFi wireless network cards, SQI represents a signal quality index, max RQI represents that the RQI value of a certain sensor is ranked highest in all sensors, the 2th max RQI represents that the RQI value of a certain sensor is ranked second highest in all sensors, the 2th min RQI represents that the RQI value of a certain sensor is ranked second lowest in all sensors, and min RQI represents that the RQI value of a certain sensor is ranked lowest in all sensors;
The calculation flow of RQI can refer to steps 1-4-2, and the above formula indicates that if RQI values of a certain sensor are ranked highest among all sensors in the same time period, SQI RQI =1 (quality is optimal). If the rank is the second highest, SQI RQI =0.6, and so on.
Step 4-2-2, calculating a respiratory rate based sensor SQI value SQI RR:
Wherein RR represents the respiratory rate;
The main frequency in a fixed time window is extracted through Fourier transformation and converted into breathing times/min, the breathing frequency (RR) is calculated, the RR is in a 9-25 times/min interval, SQI RR =1 (ideal range), and other gradient assignment is set beyond the range;
Step 4-2-3, calculating a sensor SQI value SQI SDFD based on a first order differential standard deviation (Standard deviation of first-order differential, SDFD):
Wherein, min sigma represents a minimum sigma of a certain sensor, the 2th min sigma represents a second minimum sigma of a certain sensor, max sigma represents a maximum sigma of a certain sensor, the 2th max sigma represents a second maximum sigma of a certain sensor;
Here, for the sensor with the smallest σ, this means that the stability of the sensor is the best, SQI SDFD is assigned 1, for the sensor with the second smallest σ, SQI SDFD is assigned 0.9, and the rest are the same;
Sigma is the standard deviation of the first order difference of the original signal:
D[i]=x[i]-x[i-1]
wherein, x [ i ], x [ i-1] are the ith and ith-1 sampling points of the original respiratory signal, D [ i ] is the difference value of adjacent sampling points, N is the length of the first-order difference of the signal, and mu is the average value of the first-order difference of the original signal;
Step 4-2-4, calculating the final SQI of the sensor based on the three SQI values of steps 4-2-1 through 4-2-3:
SQI=SQIRQI×SQIRR×SQISDFD
step 4-3, dynamically selecting a sensor output strategy based on the final SQI of the sensor, wherein the strategy comprises direct output of a single sensor, preferential output and fusion output of multiple sensors, and the algorithm effect is shown in figure 4;
output rule of time-varying breathing rate TRR:
Th is a threshold value of radar and WiFi signals SQI, SQI radar is the SQI of the radar, SQI wifi is the SQI of the WiFi, TRR radar is the time-varying breathing frequency of the radar, TRR wifi is the time-varying breathing frequency of the WiFi, and TRR fusion is the time-varying breathing frequency of the radar and the WiFi in a fused mode.
Here, the output rule of the time-varying breathing rate (TRR) states:
If the dual sensors are reliable (the radar and WiFi signals SQI are higher than the threshold value), outputting a fusion result TRR fusion;
Only radar reliable (radar signal SQI above threshold, wiFi signal SQI below threshold) or single radar position, directly outputs TRR radar of radar;
Only WiFi reliable (WiFi signal SQI above threshold, radar signal SQI below threshold) or single WiFi position, directly outputting TRR wifi of WiFi;
the dual sensors are unreliable (both radar and WiFi signals SQI are below the threshold), and still output the fusion result TRR fusion, which may alleviate the single sensor failure problem due to fusion.
Here, in some embodiments, the radar and WiFi fused time-varying respiratory rate is fused by a bayesian fusion algorithm, and the specific process includes:
Let kth respiratory rate measurements from radar and WiFi be BR r (k) and BR w (k), respectively, and the posterior probability density functions of radar and WiFi p (br|br r (k)) and p (br|br w (k)) be;
Based on the first 15 seconds of time-varying respiratory rate data of a reference signal (such as a respiratory sensor in the department of Huake), the probability density function of the respiratory rate data is subjected to ideal Gaussian distribution (normal distribution), and parameters (mean value eta and standard deviation sigma) of the Gaussian distribution are calculated through a statistical method by utilizing the data segment;
the probability density function after fusion is p (br|br r(k)BRw (k)):
The numerator is the joint likelihood probability of the radar and the WiFi at the current moment, and the denominator is the prediction probability of the radar at the previous moment, and p (BR|BR r(k-1))、p(BR|BRw (k-1)) is the posterior probability density function corresponding to the k-1 th respiratory frequency measurement value of the radar and the WiFi respectively;
The breathing frequency corresponding to the maximum value of the fusion probability density function is selected as the output frequency f' r (t):
f'r(t)=arg max(p(BR|BRr(k)BRw(k)))ω=[0.1,0.7]Hz。
as a specific example, in one embodiment, the present invention is further illustrated.
In this embodiment, the respiratory rate is selected as an evaluation index, that is, respiratory times per minute (Breathe per minute, BPM), and the number of sampling points in the absolute errors of the respiratory rates of the radar and the reference sensor, 1BPM, 1.5BPM, and 2BPM, are counted, and divided by the total sampling points, so as to obtain a corresponding accuracy, that is, a respiratory detection rate. The breath detection rates of 6 subjects to which the algorithms of the present invention were applied are shown in table 1.
TABLE 1 respiratory detection rate of subjects
The average breath detection rate in table 1 is shown in table 2.
TABLE 2 average breath detection rate
Based on the quantitative experimental results in tables 1 and 2, the body movement section has a significant effect on the respiratory rate detection, and the respiratory detection rate is maintained to be more than 90% when the absolute error is within 2BPM after the RBM which is manually calibrated is eliminated by a plurality of algorithms. However, when the RBM segment is not processed, the breath detection rate can be greatly reduced, and the breath detection rate is only 66.4% when the absolute error is within 1BPM, which is a difficulty related to the non-contact vital sign monitoring research of the human body at present. The results in individual cases (e.g., subject 4 in table 1) resulted in lower breath detection rates based on NMF signal reconstruction methods than untreated breath detection rates, analysis was due to damage to the normal band during signal reconstruction, resulting in reduced signal quality.
From the above, after the non-negative matrix factorization-based signal reconstruction algorithm and the respiratory quality index-based distance gate selection algorithm provided by the invention are used for respiratory rate detection, the accuracy is greatly improved relative to the original algorithm, and the average respiratory detection rate of the NMF+RQI algorithm is more than 98% in the 2 BPM.
In this embodiment, the positions and sensors corresponding to the output states of the algorithm of the present invention are shown in table 3, and the scene is shown in fig. 2.
TABLE 3 output State corresponding position and sensor
As can be seen from fig. 3 and table 3, the algorithm always selects one optimal sensor to output alone or fuses the results of two optimal sensors to output.
In stage 1, the algorithm selects the radar 1 result to be output alone, which is state 1.
In phase 2, both radar 2 and WiFi 1 contain valid respiration data, and WiFi 1 signal quality is better. When the SQI of the radar 2 and WiFi 1 signals is larger than the threshold value, the algorithm selects the results of the two sensors to be output in a Bayesian fusion mode, wherein the result is in a state 2 (251-300 second red circle part in the figure), otherwise, the WiFi 1 result with better signal quality is selected to be output independently, and the result is in a state 3.
The phase 3 algorithm selects the WiFi 2 result to output alone, which is state 4.
The SQI-based algorithm output state selection algorithm can accurately select the optimal respiratory frequency output at the current moment based on the characteristic parameters of the signal quality.
In this embodiment, the respiration monitoring experiment is performed on the multi-sensor network by using the algorithm of the present invention, and the results are shown in table 4.
TABLE 4 respiration monitoring experiment results
As can be seen from table 4 above, the detection rates of radar 1, radar 2, wiFi 1, wiFi2 and sensor fusion results within 1BPM error are 33.7%, 21.6%, 36.4%, 31.5% and 95.3%, respectively, and the overall average absolute errors are 9.9BPM, 11.1BPM, 7.9BPM, 9.6BPM and 0.38BPM, respectively. The respiratory detection rate of the fusion output of the sensor is highest, and the total average absolute error is smallest, so that the effectiveness of the algorithm in detecting the time-varying respiratory rate is proved.
In summary, the non-negative matrix factorization-based signal reconstruction algorithm and the respiratory quality index-based distance gate selection algorithm provided by the invention are effective and feasible in each algorithm and reliable in performance, and are based on a priori information-based data correction algorithm, an iterative circle fitting phase correction algorithm, an RQI-MRC-PCA-based subcarrier fusion algorithm, a respiratory quality index-based long-time channel switching algorithm, SQI-based output state judgment and an improved Bayesian model fusion algorithm.
The foregoing has outlined and described the basic principles, features, and advantages of the present invention. It will be understood by those skilled in the art that the foregoing embodiments are not intended to limit the invention, and the above embodiments and descriptions are meant to be illustrative only of the principles of the invention, and that various modifications, equivalent substitutions, improvements, etc. may be made within the spirit and scope of the invention without departing from the spirit and scope of the invention.