Cheyne-Stokes Respiration Perception via Machine Learning Algorithms

: With the development of science and technology, transparent, non-invasive general computing is gradually applied to disease diagnosis and medical detection. Universal software radio peripherals (USRP) enable non-contact awareness based on radio frequency signals. Cheyne-Stokes respiration has been reported as a common symptom in patients with heart failure. Compared with the disadvantages of traditional detection equipment, a microwave sensing method based on channel state information (CSI) is proposed to qualitatively detect the normal breathing and Cheyne-Stokes breathing of patients with heart failure in a non-contact manner. Firstly, USRP is used to collect subjects’ respiratory signals in real time. Then the CSI waveform is ﬁltered, smoothed and normalized, and the relevant features are deﬁned and extracted from the signal. Finally, the machine learning classiﬁcation algorithm is used to establish a recognition model to detect the Cheyne-Stokes respiration of patients with heart failure. The results show that the system accuracy of support vector machine (SVM) is 97%, which can assist medical workers to identify Cheyne-Stokes respiration symptoms of patients with heart failure.


Introduction
In addition to normal breathing, there are many kinds of abnormal respiratory states, and an abnormal respiratory state may indicate that the human body has potential diseases. Therefore, timely detection of respiration can obtain important human health information and prevent the occurrence of related diseases. The abnormal breathing pattern studied in this paper is Cheyne-Stokes respiration, which was first described by John Cheyne and William Stokes in the 19th century.
Cheyne-Stokes respiration gradually changes from shallow to deep, then from deep to shallow, followed by a period of apnea, and then repeats the above periodic breathing. The period of Cheyne-Stokes respiration can be as long as 30 s to 2 min, and the pause time can be as long as 5~30 s. Therefore, it is necessary to observe carefully for a long time to understand the whole process of periodic rhythm changes. The appearance of Cheyne-Stokes respiration is the manifestation of decreased central respiratory excitability. During apnea, carbon dioxide retention in hypoxic homes stimulates the chemical receptors and respiratory centers of arterial sinuses and aortic bodies to some extent, leading to respiratory recovery and enhancement; with the increase of respiratory frequency and the deepening of amplitude, carbon dioxide is discharged in large quantities, and the respiratory center loses effective excitement. The respiration slows down and shallows again until it is suspended, and carbon dioxide is re-accumulated. Cheyne-Stokes respiration is a manifestation of observing the temperature changes of the chest, neck, mouth and nose during respiration and extracting dynamic thermal eigenvalues, but this method was greatly affected by ambient temperature [16]. Asanka G. Perera's team used images and signal processing designs from aerial video to detect breathing movements. First, they used the key points of adjacent image frames to stabilize the image information. Then, the time-domain band of the video is amplified and other frequencies are suppressed. Finally, image differential and time filtering were performed for each video to detect potential respiratory signals [17]. In 2021, a team used ultra-wideband radar sensors based on pulse radio to detect human motion and identify children's various respiratory states [18].
Most of these methods can only detect the frequency of breathing, and cannot meet the needs of Cheyne-Stokes respiration detection. Furthermore, if Cheyne-Stokes respiration in heart failure has reached the late stage of the disease, the patient's body itself is very fragile, and a non-contact detection device can reduce the patient's active cooperation and reduce the patient's body burden. According to the scattering characteristics of electromagnetic wave irradiating human body, it is proven that there is a certain correlation between the slight activity of human body surface and the reflected signal [19]. C-band sensing technology has been proven to be able to detect respiratory anomalies in real time [11]. The non-contact detection technology based on thesoftware defined radio can detect heart failure with Cheyne-Stokes respiration in real time. The main contributions of this paper are summarized as follows: 1.
We propose a non-contact, non-invasive method to help monitor chronic heart failure accompanied by Cheyne-Stokes respiration, and provide new ideas and methods for monitoring heart failure patients. We use wireless signals to convert Cheyne-Stokes respiration caused by heart failure into amplitude changes of subcarriers.

2.
Different from other methods for detecting heart failure, we assisted the detection of heart failure from the perspective of Cheyne-Stokes respiration. We show the abnormal physiological activity of Cheyne-Stokes respiration by using the peak changes of subcarriers collected by two antennas connected to USRP. After data processing and feature extraction, a machine learning algorithm is used to classify Cheyne-Stokes respiration and normal breathing.

3.
We carried out experiments to verify the performance of the proposed system, as well as the classification accuracy of normal respiration and Cheyne-Stokes respiration reached 97%. Because the patients with heart failure accompanied by Cheyne-Stokes respiration have been very weak, and at a later stage of the disease, our non-invasive non-contact detection method can minimize the burden and damage caused by the detection behavior for patients, which is of great significance for them.
The other parts of this paper are as follows: Section 2 introduces the experimental methods, including the theoretical basis of wireless sensor technology, experimental steps and data processing; Section 3 is an overview of the experimental environment and the design of the acquisition method; Section 4 describes the classification of experimental results and machine learning results; Section 5 discusses comparing existing research with specialized sensors; and Section 6 mainly summarizes the results obtained. In abbreviations, we summarize all the used abbreviations in this work to assist the reader.

Methods
In this section, we mainly introduce the system from the aspects of fundamental, experimental steps, data preprocessing, feature extraction, data set division and classification algorithm.

Fundamental
The system proposed in this paper is based on software defined radio technology to obtain the respiratory condition caused by heart failure through CSI. In this experiment, the breathing human body was used as a reflector to map the movement of the relative position of chest and abdomen in the process of breathing to the phase and amplitude changes caused by the length change of the reflection path, so as to establish a quantitative mapping between human breathing activity and CSI signal fluctuation [20]. During respiration, the chest fluctuates periodically with a displacement distance of 4.2-5.4 mm [21]. However, when Cheyne-Stokes respiration occurs in patients with heart failure, the chest displacement distance can be increased to 12.6 mm [22]. The specific schematic diagram of detecting breathing is shown in Figure 1. Based on the specific circumstances of the above medical exploration, it can be seen that the chest displacement of healthy people and patients during breathing is significantly different, and the CSI data based on physical background mapping will also be significantly different. Based on this theory, this paper proposes a system to detect patients with heart failure accompanied by Cheyne-Stokes respiration.
position of chest and abdomen in the process of breathing to the phase and changes caused by the length change of the reflection path, so as to establish a q mapping between human breathing activity and CSI signal fluctuation [20]. piration, the chest fluctuates periodically with a displacement distance of 4.2-5 However, when Cheyne-Stokes respiration occurs in patients with heart failur displacement distance can be increased to 12.6 mm [22]. The specific schema of detecting breathing is shown in Figure 1. Based on the specific circumsta above medical exploration, it can be seen that the chest displacement of hea and patients during breathing is significantly different, and the CSI data based background mapping will also be significantly different. Based on this theory proposes a system to detect patients with heart failure accompanied by Che respiration. The system proposed in this paper is based on the Orthogonal Frequen Multiplexing (OFDM) technology to extract CSI, using USRP equipment as a r transmitter for C-band signal analysis. OFDM is a special multi-carrier transm nology. Multi-carrier transmission decomposes data stream into several bit r bit rate, and modulates the corresponding subcarriers through low rate multi bols formed by low bit rate, thus forming a concurrent transmission system low rate symbols. In addition, each subcarrier of OFDM is orthogonal to each o mutual interference between subcarriers is greatly reduced and the frequenc utilization is greatly improved. Moreover, in this system, all subcarriers in well-describe the WCSI under each propagation path, and then obtain quantita atory behavior data [23]. In this system, there are 64 subcarriers of channel fre sponse where H is channel frequency response (CFR), n = 64 is the total number of s and the CFR of any subcarrier can be expressed as which represent the subcarrier number ∈ 1,64 , each child carrier c phase and amplitude information, andrepresents the amplitude in The system proposed in this paper is based on the Orthogonal Frequency Division Multiplexing (OFDM) technology to extract CSI, using USRP equipment as a receiver and transmitter for C-band signal analysis. OFDM is a special multi-carrier transmission technology. Multi-carrier transmission decomposes data stream into several bit rates of low bit rate, and modulates the corresponding subcarriers through low rate multi-state symbols formed by low bit rate, thus forming a concurrent transmission system of multiple low rate symbols. In addition, each subcarrier of OFDM is orthogonal to each other, so the mutual interference between subcarriers is greatly reduced and the frequency spectrum utilization is greatly improved. Moreover, in this system, all subcarriers in OFDM can well-describe the WCSI under each propagation path, and then obtain quantitative respiratory behavior data [23]. In this system, there are 64 subcarriers of channel frequency response where H is channel frequency response (CFR), n = 64 is the total number of subcarriers, and the CFR of any subcarrier can be expressed as which represent the subcarrier number k ∈ [1, 64], each child carrier contains the phase and amplitude information, and represents the amplitude information, and ||H( f k )|| represents the amplitude information, ∠H( f k ) on behalf of the phase information. In order to obtain a continuous breathing signal, the measured values of the CSI within a given time window are shown below where m represents the total number of data packets (CFRs) received, wireless data containing the raw data of breathing behavior. The number of data packets is positively correlated with the length of detection time. With the increase in detection time, the number of data packets keeps increasing. Figure 2a shows a subcarrier waveform of breathing conditions of a normal person in a calm state within one minute, collected in a static environment without interference. It can be clearly seen from the figure that the amplitude information is similar to a cosine function, presenting a periodic fluctuation state, and the respiratory rate is relatively stable. Figure 2b shows the situation of 64 subcarriers of data collected at one time in the experiment. In previous studies, the respiration waveform was basically a sinusoidal waveform [24]. The experimental waveform is consistent with the sinusoidal waveform. Waveform data contains amplitude information and phase information, among which a large number of experiments have found that sampling frequency deviation, symbol timing deviation and carrier frequency shift deviation will cause an excessive phase amplitude change. Therefore, phase information is difficult to be used as a detection method to identify Cheyne-Stokes respiration in patients with heart failure. Relatively speaking, the amplitude data is easy to obtain, and can reflect the breathing situation more intuitively and efficiently. Therefore, it is feasible to carry out Cheyne-Stokes respiration detection in patients with heart failure based on amplitude signal in this paper.
CSI within a given time window are shown below = , , , … , where represents the total number of data packets (CFRs) received, wireless data containing the raw data of breathing behavior. The number of data packets is positively correlated with the length of detection time. With the increase in detection time, the number of data packets keeps increasing. Figure 2a shows a subcarrier waveform of breathing conditions of a normal person in a calm state within one minute, collected in a static environment without interference. It can be clearly seen from the figure that the amplitude information is similar to a cosine function, presenting a periodic fluctuation state, and the respiratory rate is relatively stable. Figure 2b shows the situation of 64 subcarriers of data collected at one time in the experiment. In previous studies, the respiration waveform was basically a sinusoidal waveform [24]. The experimental waveform is consistent with the sinusoidal waveform. Waveform data contains amplitude information and phase information, among which a large number of experiments have found that sampling frequency deviation, symbol timing deviation and carrier frequency shift deviation will cause an excessive phase amplitude change. Therefore, phase information is difficult to be used as a detection method to identify Cheyne-Stokes respiration in patients with heart failure. Relatively speaking, the amplitude data is easy to obtain, and can reflect the breathing situation more intuitively and efficiently. Therefore, it is feasible to carry out Cheyne-Stokes respiration detection in patients with heart failure based on amplitude signal in this paper.

The Experimental Steps
In this paper, a computer and two USRP devices are used to carry out the experiment [25]. After the respiration information of the subjects was extracted, the original CSI data were further processed in this paper, and after feature extraction, the different features of Cheyne-Stokes respiration of normal respiratory patients and heart failure patients were obtained. The classification model was constructed by machine learning method, and then the identification of patients was completed.
Universal Software Radio Periphehal (USRP) is a Software Radio device produced by Ettus Research for Software Radio design and development. USRP can mainly realize

The Experimental Steps
In this paper, a computer and two USRP devices are used to carry out the experiment [25]. After the respiration information of the subjects was extracted, the original CSI data were further processed in this paper, and after feature extraction, the different features of Cheyne-Stokes respiration of normal respiratory patients and heart failure patients were obtained. The classification model was constructed by machine learning method, and then the identification of patients was completed.
Universal Software Radio Periphehal (USRP) is a Software Radio device produced by Ettus Research for Software Radio design and development. USRP can mainly realize digital up-conversion, digital down-conversion, digital-to-analog conversion, analog-todigital conversion and other signal processing functions, so that common computers can work like high-bandwidth software radio peripherals. The hardware device used in this system is USRP B210. The USRP operates in a frequency range of 47 MHz to 6.0 GHz, and supports channel bandwidths ranging from less than 200 kHz to 56 MHz.
The Figure 3 describes the overall framework of the system, which is mainly divided into three parts. The experimental environment shown in the upper left corner consists of a computer and two USRP devices with antennas. The following module introduces the data pretreatment method, which is mainly divided into three steps: eliminating outliers, filtering and data normalization processing. The upper right corner introduces the feature extraction method and machine learning classifier. Finally, a classification model was established to effectively distinguish Cheyne-Stokes respiration from normal respiration in patients with heart failure. digital up-conversion, digital down-conversion, digital-to-analog conversion, analog-todigital conversion and other signal processing functions, so that common computers can work like high-bandwidth software radio peripherals. The hardware device used in this system is USRP B210. The USRP operates in a frequency range of 47 MHz to 6.0 GHz, and supports channel bandwidths ranging from less than 200 kHz to 56 MHz.
The Figure 3 describes the overall framework of the system, which is mainly divided into three parts. The experimental environment shown in the upper left corner consists of a computer and two USRP devices with antennas. The following module introduces the data pretreatment method, which is mainly divided into three steps: eliminating outliers, filtering and data normalization processing. The upper right corner introduces the feature extraction method and machine learning classifier. Finally, a classification model was established to effectively distinguish Cheyne-Stokes respiration from normal respiration in patients with heart failure.

Pre-Processing
This summary mainly introduces the purpose and steps of preprocessing for collected CSI data and the effect after preprocessing. For the CSI collected in the experiment, due to environmental noise, multipath effect, signal attenuation and other factors, the subcarrier directly obtained will contain more interference factors, thereby affecting the judgment of the results of patients with Cheyne-Stokes respiratory heart failure. Thus, it is necessary to preprocess the collected CSI data, and there are two main objectives: (1) to remove noise interference from the environment, and; (2) the abnormal values caused by the relatively drastic changes in the dynamic path of the receiving signal caused by the movement of the subjects, except breathing in the experiment, are excluded. As long as there are three steps in the pretreatment, the main contents are as follows: Step 1: Eliminating outliers in experimental data using Hampel filter. The principle is to use a sliding window which can move in the time series. The window is composed of the sample points of the selected area and three samples on both sides. The value of the sample point is used as the median of the window, and the standard deviation of each sample to the median is estimated. If a sample is more than three

Pre-Processing
This summary mainly introduces the purpose and steps of preprocessing for collected CSI data and the effect after preprocessing. For the CSI collected in the experiment, due to environmental noise, multipath effect, signal attenuation and other factors, the sub-carrier directly obtained will contain more interference factors, thereby affecting the judgment of the results of patients with Cheyne-Stokes respiratory heart failure. Thus, it is necessary to preprocess the collected CSI data, and there are two main objectives: (1) to remove noise interference from the environment, and; (2) the abnormal values caused by the relatively drastic changes in the dynamic path of the receiving signal caused by the movement of the subjects, except breathing in the experiment, are excluded. As long as there are three steps in the pretreatment, the main contents are as follows: Step 1: Eliminating outliers in experimental data using Hampel filter. The principle is to use a sliding window which can move in the time series. The window is composed of the sample points of the selected area and three samples on both sides. The value of the sample point is used as the median of the window, and the standard deviation of each sample to the median is estimated. If a sample is more than three standard deviations from the median, replace that sample with the median.
In the above formula, MAD i represents the mean value within the sliding window. Figure 4 is a schematic diagram of Hampel's treatment of filtering outliers, which is an example of a normal person moving at a constant speed under static conditions. Where the blue line represents the initial signal amplitude value, the yellow line shows the filtered signal amplitude value, and the outliers in the data are marked by white boxes. It can be clearly seen from Figure 4 that after exception processing, a large number of discrete values and the prominent positions of some waveforms are removed.
In the above formula, represents the mean value within the sliding window. Figure 4 is a schematic diagram of Hampel's treatment of filtering outliers, which is an example of a normal person moving at a constant speed under static conditions. Where the blue line represents the initial signal amplitude value, the yellow line shows the filtered signal amplitude value, and the outliers in the data are marked by white boxes. It can be clearly seen from Figure 4 that after exception processing, a large number of discrete values and the prominent positions of some waveforms are removed. The purpose of this step is to remove the abnormal value caused by noise interference from the environment. It can be seen from Figure 4 that after processing, the relative clutter subcarrier waveform is smoother and cleaner, and some burrs of curve vibration and some negligible abnormal points are eliminated, but some others are not eliminated, so further processing is needed.
Step 2: Smoothing the experimental data.
The main method used is the Loess method. That is, by dividing the sample into multiple intervals, the samples in the interval are polynomially fitted, and the weighted regression curve is obtained after continuous repetition, and finally the complete regression curve is combined. Firstly, the sample data is divided into multiple intervals, each interval is a time window with a certain length. The larger the length is selected, the smoother the curve that is finally obtained. Secondly, local weighted regression is performed on the data in the time window.
Finally, quadratic function is used for regression smoothing. The final result is shown in Figure 5. The purpose of this step is to remove the abnormal value caused by noise interference from the environment. It can be seen from Figure 4 that after processing, the relative clutter subcarrier waveform is smoother and cleaner, and some burrs of curve vibration and some negligible abnormal points are eliminated, but some others are not eliminated, so further processing is needed.
Step 2: Smoothing the experimental data.
The main method used is the Loess method. That is, by dividing the sample into multiple intervals, the samples in the interval are polynomially fitted, and the weighted regression curve is obtained after continuous repetition, and finally the complete regression curve is combined. Firstly, the sample data is divided into multiple intervals, each interval is a time window with a certain length. The larger the length is selected, the smoother the curve that is finally obtained. Secondly, local weighted regression is performed on the data in the time window.
Finally, quadratic function is used for regression smoothing. The final result is shown in Figure 5.ŷ  Figure 5 shows that after smoothing, the waveform of cluttered s smoother and cleaner, and the burrs of curve vibration and the negligible o pear almost completely.
Step 3: Normalize the experimental data.
In order to better simulate the real patient's situation, the subjects are n maintain absolute prohibition with regard to respiratory activities. Therefo to the Fresnel zone perception theory [26], in the process of the experiment, t of the received signal will fluctuate violently when the subjects do not a shake their body or appear other relatively obvious displacement movemen produce abnormal amplitude data and affect the judgment of respiratory m the same time, in the actual process, the overall amplitude of the collected w be quite different in different positions of the vertical line of LOS in the Fre order to more conveniently combine with the actual detection situation, thi into account the elimination of this effect in the subsequent data processing, a ure is normalization.
The steps of data normalization are as follows where x is the value before conversion and y is the value after conversi y are the maximum and minimum values of a group of subcarriers pro sample, respectively. In this paper, we take 1 and −1.
and are t and minimum values in sample raw data.

Feature Extraction
This summary mainly introduces the main purpose of extracting the fe processed data. The main purpose of feature extraction is to select represent for subsequent classifier recognition. Appropriate features can comprehen the characteristics of CSI amplitude variation from multiple perspectives [  Figure 5 shows that after smoothing, the waveform of cluttered subcarriers is smoother and cleaner, and the burrs of curve vibration and the negligible outliers disappear almost completely.
Step 3: Normalize the experimental data.
In order to better simulate the real patient's situation, the subjects are not required to maintain absolute prohibition with regard to respiratory activities. Therefore, according to the Fresnel zone perception theory [26], in the process of the experiment, the amplitude of the received signal will fluctuate violently when the subjects do not autonomously shake their body or appear other relatively obvious displacement movements, which will produce abnormal amplitude data and affect the judgment of respiratory movement. At the same time, in the actual process, the overall amplitude of the collected waveform will be quite different in different positions of the vertical line of LOS in the Fresnel zone. In order to more conveniently combine with the actual detection situation, this paper takes into account the elimination of this effect in the subsequent data processing, and the measure is normalization.
The steps of data normalization are as follows where x is the value before conversion and y is the value after conversion. y Max and y Min are the maximum and minimum values of a group of subcarriers processed in the sample, respectively. In this paper, we take 1 and −1.
x Max and x Min are the maximum and minimum values in sample raw data.

Feature Extraction
This summary mainly introduces the main purpose of extracting the features of preprocessed data. The main purpose of feature extraction is to select representative features for subsequent classifier recognition. Appropriate features can comprehensively reflect the characteristics of CSI amplitude variation from multiple perspectives [21]. Different data sets correspond to different prediction results, and the most representative features can be derived from the advantages and disadvantages of the predicted results. It makes it easier to identify patients with heart failure accompanied by Cheyne-Stokes respiration, so as to improve the authenticity and accuracy of the recognition effect. Feature extraction transforms and maps the original CSI data samples with mathematical methods to obtain the features that can best characterize the normal respiratory data that is different from the Cheyne-Stokes respiration data of patients with heart failure. This operation can remove the redundant information of the original data to the greatest extent.
There are three main existing methods of signal feature extraction: the time domain analysis method; frequency domain analysis method; and time-frequency analysis combined method [27].
In this paper, a large number of experiments were carried out to verify the preprocessed respiratory data from both time domain and frequency domain perspectives, and different features were changed several times. By comparing the corresponding recognition results of different feature data sets, the appropriate feature data was finally selected as the feature set.
In the time domain, the mean value, standard deviation, variance, root mean square value, wave form factor, impact factor, skewness value, skewness value and crest factor are mainly selected from the traditional features. The selection of mean value mainly reflects the central trend of CSI signal distribution. The selection of standard deviation and variance reflects the dispersion of CSI signal from the mean value. In addition to these common feature accidents, this paper also adds the quartile distance to reflect the dispersion of CSI data samples. The median and quartile distance reflect the intensity of respiration to some extent.
In frequency domain, Fourier transform is carried out on CSI sample signals, and the time series in time domain is transformed into frequency components, so as to extract the frequency domain features of CSI samples. The characteristics in the frequency domain mainly include energy spectral density, power decline rate, entropy, fast Fourier transform (FFT) coefficient and so on. Conversion to the frequency domain can clearly see the breathing frequency, and the result can be very intuitive distinction. The frequency domain features of the selection in this paper are energy spectral density and information entropy. Information entropy is a measure to describe the complexity of a system proposed by Shannon. If the system is more complex and there are more kinds of different situations, then his information entropy is relatively large. The CSI data of Cheyne-Stokes respiration obviously have apnea and severe breathing, and the information contained should be redundant to normal breathing, similar to a sine wave. The energy spectral density is the sum of the square of the amplitude per unit frequency, and the area of the energy spectral density curve is the total energy of CSI signal. The formulas of information entropy and power spectral density are given below: We extracted a total of 12 features: the mean value, standard deviation, median, variance, root mean square value, wave form factor, impact factor, skewness value, crest factor, Quartile distance, information entropy and power spectral density. At the same time, in order to eliminate redundant features, we conducted principal component analysis on feature sets to reduce dimension before machine learning. We list all the extracted feature columns and their corresponding expressions in Table 1.
Crest factor max(|x i |) RMS

Dividing the Dataset
The obtained feature data set is divided into the training set and test set. The training set is mainly used to train the CSI feature data set mentioned above, and then obtain the classification model. The test set is a data set used to verify the performance of the obtained classification model. The main verification method is to use the trained normal breathing and Cheyne-Stokes respiration classification model to predict the new untrained CSI data, and to judge the quality of the classification prediction model based on the classification results. In this paper, there are two main principles for dividing the data set. First, the selected samples of the training set and the test set are mutually exclusive. The second principle is that the number of normal breathing data and Cheyne-Stokes respiration data of heart failure patients in the training set and the test set is the same. The consistency of data distribution is kept as far as possible in the partitioning process to avoid the impact of additional deviation introduced by the data partitioning process on the test.
There are three commonly used data set partitioning methods: the hold-out method, cross validation method; and self-help method. The data set partitioning verification method adopted in this paper is cross validation, which mainly divides the data set into several parts and estimates the accuracy of each part to prevent overfitting. In this experiment, the feature data set is divided into 5 mutually exclusive subsets of the same size by sub-volume sampling. The number of samples in the training set is 4/5 of the total number of samples, and the number of samples in the test set is 1/5 of the total number of samples. 5 different division methods can be generated, a total of 5 training and testing are carried out, and the average value of the 5 testing results will be returned in the end. This method can minimize the impact of different division methods on the recognition model.

Classification Algorithm
To quantify the differences in Cheyne-Stokes respiration between normal and heart failure patients in our experiments, we used a variety of classification algorithms, including ensemble learning, logistic regression, linear discriminant, decision trees, K-NN and support vector machines. Because the Gaussian SVM algorithm works best, this section describes the SVM algorithm. SVM algorithm has been widely used in classification recognition problems. The basic model is to find the best sub-hyperplane once in the feature space to maximize the interval between positive and negative samples on the training set. SVM can complete the flexible decision boundary at higher dimensions, and optimize the training results at the same time [28].
In general, the following formula is usually used to indicate the way of dividing hyperplanes in the sample space: For the so-called "interval", it can be expressed as: Thus, the basic type of SVM can be described as: The Lagrange multiplier method can be applied to this formula to obtain its dual problem solution: Thus, when the KKT (Karush-Kuhn-Tucker conditions) [29] condition is satisfied, the solution of the original problem can be equivalent to the solution of the dual problem, and the solution of the above problem can be transformed into the solution of α, through which the support vector can be obtained.
At the same time, the kernel function is introduced to solve the problem of not finding an appropriate hyperplane in the actual scene, so that it can accurately distinguish two different samples in the original sample space. Suppose the formula is: By this formula, the inner product in higher dimensional or even infinite dimensional eigenspace is avoided.

Experimental Design
In this section, the experimental setup and implementation are described. Extensive experiments were conducted to verify the performance of software-defined radio-based detection of heart failure with Cheyne-Stokes respiration disease. In the test to detect heart failure with Cheyne-Stokes respiration disease, the equipment included a computer, two USRP devices, two antennas and two stands, which could be adjusted at any height.
The test area of this experiment is located in an independent room of 5 m × 6 m. The transmitting antenna and receiving antenna are 1 m apart, and both antennas are located at a height of 59-77 cm. The subject sat in a relaxed posture between the two antennas at a slightly backward position of 10-20 cm, and when the subject sat on a chair between the antennas, the height of his abdomen was exactly the same as the height of the two antennae. The reason for taking seated breathing is shortness of breath due to heart failure, or even coma in severe cases. Sitting breathing can reduce shortness of breath during sleep. The specific experimental conditions are shown in Figure 6.
The breathing test data collected in this experiment came from five different volunteers, all of whom agreed to perform the experiment. The volunteers were fully informed of all the conditions of the experiment. First of all, we have trained many volunteers professionally. The subjects were mainly asked to watch the medical videos of patients with Cheyne-Stokes respiration, and to have a clear cognition of Cheyne-Stokes respiration through the introduction of medical professional description. Subjects were then trained to mimic Cheyne-Stokes respiration, and sampling with the HKH-11C digital breathing sensor was used to verify that the simulated Cheyne-Stokes respiration was similar to the medical standard Cheyne-Stokes respiration. Finally, before the formal experiment, we also conducted a series of preliminary tests to detect the measured breathing waveform, so that the subjects could achieve breathing behaviors similar to those of the real patients in the medical videos after repeated practice. Finally, five subjects were selected to simulate the patient's situation perfectly. The details of the subjects are shown in Table 2. lectronics 2022, 11, x FOR PEER REVIEW Figure 6. Collection schematic.
The breathing test data collected in this experiment came from five d teers, all of whom agreed to perform the experiment. The volunteers were of all the conditions of the experiment. First of all, we have trained many v fessionally. The subjects were mainly asked to watch the medical videos o Cheyne-Stokes respiration, and to have a clear cognition of Cheyne-Stok through the introduction of medical professional description. Subjects wer to mimic Cheyne-Stokes respiration, and sampling with the HKH-11C dig sensor was used to verify that the simulated Cheyne-Stokes respiration was medical standard Cheyne-Stokes respiration. Finally, before the formal ex also conducted a series of preliminary tests to detect the measured breathi so that the subjects could achieve breathing behaviors similar to those of th in the medical videos after repeated practice. Finally, five subjects were sel late the patient's situation perfectly. The details of the subjects are shown i In this experiment, the subjects always kept a sitting position, and the equipment collected the ordinary breathing of each participant for two m time, which was repeated ten times. Then, the apparatus took the subjects' C respiration for two minutes in real time, and repeated them 10 times. Th collection time was chosen here, as Cheyne-Stokes respiration cycles range min. When collecting the signal, it can be seen that with the slight undulat of the chest and abdomen during breathing, the amplitude of the collected dergo a certain change.  In this experiment, the subjects always kept a sitting position, and the experimental equipment collected the ordinary breathing of each participant for two minutes in real time, which was repeated ten times. Then, the apparatus took the subjects' Cheyne-Stokes respiration for two minutes in real time, and repeated them 10 times. The two-minute collection time was chosen here, as Cheyne-Stokes respiration cycles range from 30 s to 2 min. When collecting the signal, it can be seen that with the slight undulating movement of the chest and abdomen during breathing, the amplitude of the collected signal will undergo a certain change.

Results
The normal breathing data collected in Figure 7 is shown below, which shows the waveform of 64 subcarriers when the subject is breathing normally. In the figure, the horizontal axis represents the 120-s acquisition time in seconds, and the vertical axis represents the subcarrier amplitude. The breathing rhythm of normal adults is stable, uniform and orderly, and the breathing rate is 12-20 times per minute when it is quiet. It can be clearly seen from Figure 7 that the breathing times detected within 120 s counted 30 times, which is in line with the above medical common sense. represents the subcarrier amplitude. The breathing rhythm of normal adults is stable, uniform and orderly, and the breathing rate is 12-20 times per minute when it is quiet. It can be clearly seen from Figure 7 that the breathing times detected within 120 s counted 30 times, which is in line with the above medical common sense. The Cheyne-Stokes respiration data of patients with heart failure collected in Figure  8 is shown below, which shows the waveform of 64 subcarriers during Cheyne-Stokes respiration of the subjects. The horizontal axis in the figure represents the experiment time in seconds. Professional medical books introduce Cheyne-Stokes respiration from shallow slow to deep fast, and then from deep slow to shallow fast, followed by a period of apnea. Then, the breathing cycle is repeated. It can be seen from Figure 8 that within two minutes of detection, there were three nearly smooth line segments, representing three instances of apnea. The three breaths occurred at the same time, and also changed from small to large and then to small, showing a trend of increase first and then decrease. The experimental waveform results are in accordance with the medical professional books. In this summary, we describe the results of machine learning classification of normal breathing behavior and abnormal breathing with Cheyne-Stokes respiration in patients with heart failure in turn.
The results tested in this experiment were machine learned, using a variety of mainstream classification methods. These include Ensemble Learning, Logistic Regress, Linear Discriminant, Decision Tree, K-NN and SVM. The results show that the average accuracy of SVM algorithm is the highest, which is 97%. Figure 9 shows the comparison of different algorithms in the analysis. From Figure 9, we can see that the SVM model presents the best overall performance. The Cheyne-Stokes respiration data of patients with heart failure collected in Figure 8 is shown below, which shows the waveform of 64 subcarriers during Cheyne-Stokes respiration of the subjects. The horizontal axis in the figure represents the experiment time in seconds. Professional medical books introduce Cheyne-Stokes respiration from shallow slow to deep fast, and then from deep slow to shallow fast, followed by a period of apnea. Then, the breathing cycle is repeated. It can be seen from Figure 8 that within two minutes of detection, there were three nearly smooth line segments, representing three instances of apnea. The three breaths occurred at the same time, and also changed from small to large and then to small, showing a trend of increase first and then decrease. The experimental waveform results are in accordance with the medical professional books.
times, which is in line with the above medical common sense. The Cheyne-Stokes respiration data of patients with heart failure coll 8 is shown below, which shows the waveform of 64 subcarriers during respiration of the subjects. The horizontal axis in the figure represents the ex in seconds. Professional medical books introduce Cheyne-Stokes respiratio slow to deep fast, and then from deep slow to shallow fast, followed by a p Then, the breathing cycle is repeated. It can be seen from Figure 8 that with of detection, there were three nearly smooth line segments, representing t of apnea. The three breaths occurred at the same time, and also changed large and then to small, showing a trend of increase first and then decrea mental waveform results are in accordance with the medical professional b In this summary, we describe the results of machine learning classifica breathing behavior and abnormal breathing with Cheyne-Stokes respirat with heart failure in turn.
The results tested in this experiment were machine learned, using a v stream classification methods. These include Ensemble Learning, Logistic R Discriminant, Decision Tree, K-NN and SVM. The results show that the av of SVM algorithm is the highest, which is 97%. Figure 9 shows the comparis algorithms in the analysis. From Figure 9, we can see that the SVM mod best overall performance. In this summary, we describe the results of machine learning classification of normal breathing behavior and abnormal breathing with Cheyne-Stokes respiration in patients with heart failure in turn.
The results tested in this experiment were machine learned, using a variety of mainstream classification methods. These include Ensemble Learning, Logistic Regress, Linear Discriminant, Decision Tree, K-NN and SVM. The results show that the average accuracy of SVM algorithm is the highest, which is 97%. Figure 9 shows the comparison of different algorithms in the analysis. From Figure 9, we can see that the SVM model presents the best overall performance.   Figure 10 shows the confusion matrix under the SVM classification mode them, the extraction feature mark of ordinary respiratory data is 0, and the extra ture mark of Cheyne-Stokes respiration data of patients with heart failure is 1. A clearly seen from Figure 10, the predicted accuracy of normal respiration was 96% failure rate was 4%, while the predicted accuracy of Cheyne-Stokes respiration in with heart failure was 98% and the failure rate was only 2%. It can be seen that t proposed in this paper can accurately distinguish Cheyne-Stokes respiration from respiration in healthy people, as well as in patients with heart failure.  Figure 10 shows the confusion matrix under the SVM classification model. Among them, the extraction feature mark of ordinary respiratory data is 0, and the extraction feature mark of Cheyne-Stokes respiration data of patients with heart failure is 1. As can be clearly seen from Figure 10, the predicted accuracy of normal respiration was 96% and the failure rate was 4%, while the predicted accuracy of Cheyne-Stokes respiration in patients with heart failure was 98% and the failure rate was only 2%. It can be seen that the model proposed in this paper can accurately distinguish Cheyne-Stokes respiration from normal respiration in healthy people, as well as in patients with heart failure.  Figure 10 shows the confusion matrix under the SVM classification model. A them, the extraction feature mark of ordinary respiratory data is 0, and the extractio ture mark of Cheyne-Stokes respiration data of patients with heart failure is 1. As c clearly seen from Figure 10, the predicted accuracy of normal respiration was 96% an failure rate was 4%, while the predicted accuracy of Cheyne-Stokes respiration in pa with heart failure was 98% and the failure rate was only 2%. It can be seen that the m proposed in this paper can accurately distinguish Cheyne-Stokes respiration from n respiration in healthy people, as well as in patients with heart failure.

Estimation Ability of Proposed Method
We do a lot of work to explore the optimal number of principal components to retain in our experiments.
The Figure 11 shows the accuracy of the svm algorithm with different numbers of principal components retained. The horizontal axis represents the 12 eigenvalues mentioned above, and the vertical axis represents the accuracy of the model prediction. We conducted experiments on three SVM algorithms with different kernel functions, namely Medium gaussian SVM, linear SVM and quadratic SVM. According to the broken line graph, it can be clearly seen that when more than six principal components are selected, the accuracy tends to be flat; thus, we think it is reasonable to keep 4-6 principal components. We think this can alleviate the problem of data redundancy to a certain extent.
Electronics 2022, 11, x FOR PEER REVIEW 15 We do a lot of work to explore the optimal number of principal components to re in our experiments.
The Figure 11 shows the accuracy of the svm algorithm with different numbe principal components retained. The horizontal axis represents the 12 eigenvalues m tioned above, and the vertical axis represents the accuracy of the model prediction conducted experiments on three SVM algorithms with different kernel functions, nam Medium gaussian SVM, linear SVM and quadratic SVM. According to the broken graph, it can be clearly seen that when more than six principal components are sele the accuracy tends to be flat; thus, we think it is reasonable to keep 4-6 principal com nents. We think this can alleviate the problem of data redundancy to a certain extent

Research Comparison
Three main methods were used in Giannini's study to measure Cheyne-Stokes re ration. First, Cheyne-Stokes respiration is measured with an inductive plethysmogra tape placed on the person's chest or abdomen, according to individual respiratory chanics. Then, Cheyne-Stokes respiration is detected by detecting carbon dioxide from nasal airflow. Finally, Cheyne-Stokes respiration is detected by measuring oxygen sat tion with a finger pulse oximeter, combining the detection of the three relevant chara istics to verify whether the patient has Cheyne-Stokes respiration [30]. Compared Giannoni's method, the system proposed in this paper can detect Cheyne-Stokes res tion non-contact, and will not impose a further burden on the patient's body during detection process.
Javed developed an algorithm (ResCSRF) to detect Cheyne-Stokes respiration. mainly collects four kinds of signals (nasal flow, thoracic, abdominal and finger oxy saturation), and distinguishes them by calculating respiratory characteristics. The re atory characteristics include cycle length, lung-to-peripheral circulation time and p flow time. Finally, the output statistics of these characteristics (mean, median, stan deviation and percentiles) from CSR cycle (cycle length (CL)), apnea length (AL), ven tion length (VL) and peak flow time (time-to-peak flow, TTPF) are extracted from ce time-domain features for classification [31]. The information collected by Javed is oxy saturation, and experiments are carried out through respiration characteristics. Howe this paper collects channel state information from another angle for classification.

Research Comparison
Three main methods were used in Giannini's study to measure Cheyne-Stokes respiration. First, Cheyne-Stokes respiration is measured with an inductive plethysmography tape placed on the person's chest or abdomen, according to individual respiratory mechanics. Then, Cheyne-Stokes respiration is detected by detecting carbon dioxide from the nasal airflow. Finally, Cheyne-Stokes respiration is detected by measuring oxygen saturation with a finger pulse oximeter, combining the detection of the three relevant characteristics to verify whether the patient has Cheyne-Stokes respiration [30]. Compared with Giannoni's method, the system proposed in this paper can detect Cheyne-Stokes respiration non-contact, and will not impose a further burden on the patient's body during the detection process.
Javed developed an algorithm (ResCSRF) to detect Cheyne-Stokes respiration. This mainly collects four kinds of signals (nasal flow, thoracic, abdominal and finger oxygen saturation), and distinguishes them by calculating respiratory characteristics. The respiratory characteristics include cycle length, lung-to-peripheral circulation time and peak flow time. Finally, the output statistics of these characteristics (mean, median, standard deviation and percentiles) from CSR cycle (cycle length (CL)), apnea length (AL), ventilation length (VL) and peak flow time (time-to-peak flow, TTPF) are extracted from certain time-domain features for classification [31]. The information collected by Javed is oxygen saturation, and experiments are carried out through respiration characteristics. However, this paper collects channel state information from another angle for classification.
The use of an electrocardiogram (ECG) signal to detect Cheyne-Stokes respiration has also been explored [32], and it is clear that our method is relatively less expensive.
Yee Siong Lee presented an evaluation of the use of microwave Doppler radar to capture different dynamic breathing patterns, in addition to breathing rates [33]. The system proposed in this paper uses communication signals, and is suitable for OFDM modulation devices (WiFi, mobile phones, base stations) without special radar equipment.
Umer Saeed also used USRP equipment to detect abnormal breathing, but Cheyne-Stokes respiration was not mentioned in the paper [34].
The main purpose of the experiment is to provide a new idea and method for the verification of Cheyne-Stokes respiration, and explore the potential feasibility of the application of the technology. Therefore, it is necessary to compare and verify mature medical equipment.
The HKH-11C wearable breathing sensor mentioned above is selected for the comparative experiment. Figure 12 shows the comparison diagram of CSI data collected by HKH-11C wearable respiratory sensor and this system at the same time and place within 1 min. In the comparison test, subjects wore HKH-11C breathing sensor and sat between two USRP devices for breathing movement. Figure 12 shows the breathing waveform in a period of time, while Figure 13 shows the Cheyne-Stokes respiration waveform in a period of time.
onics 2022, 11, x FOR PEER REVIEW 1 system proposed in this paper uses communication signals, and is suitable for O modulation devices (WiFi, mobile phones, base stations) without special radar equip Umer Saeed also used USRP equipment to detect abnormal breathing, but Ch Stokes respiration was not mentioned in the paper [34].
The main purpose of the experiment is to provide a new idea and method f verification of Cheyne-Stokes respiration, and explore the potential feasibility of t plication of the technology. Therefore, it is necessary to compare and verify mature ical equipment.
The HKH-11C wearable breathing sensor mentioned above is selected for the parative experiment. Figure 12 shows the comparison diagram of CSI data collect HKH-11C wearable respiratory sensor and this system at the same time and place w 1 min. In the comparison test, subjects wore HKH-11C breathing sensor and sat be two USRP devices for breathing movement. Figure 12 shows the breathing wavefo a period of time, while Figure 13 shows the Cheyne-Stokes respiration waveform in riod of time.  It can be seen from the figure that the system can fully detect normal breathin Cheyne-Stokes respiration. In the comparison diagram of Cheyne-Stokes respirat Figure 13, the system in this paper can show even more detailed changes and contain information.

Conclusions
In this paper, we propose a non-contact heart failure detection method based o onics 2022, 11, x FOR PEER REVIEW 1 system proposed in this paper uses communication signals, and is suitable for O modulation devices (WiFi, mobile phones, base stations) without special radar equip Umer Saeed also used USRP equipment to detect abnormal breathing, but Ch Stokes respiration was not mentioned in the paper [34].
The main purpose of the experiment is to provide a new idea and method f verification of Cheyne-Stokes respiration, and explore the potential feasibility of t plication of the technology. Therefore, it is necessary to compare and verify mature ical equipment.
The HKH-11C wearable breathing sensor mentioned above is selected for the parative experiment. Figure 12 shows the comparison diagram of CSI data collec HKH-11C wearable respiratory sensor and this system at the same time and place w 1 min. In the comparison test, subjects wore HKH-11C breathing sensor and sat be two USRP devices for breathing movement. Figure 12 shows the breathing wavefo a period of time, while Figure 13 shows the Cheyne-Stokes respiration waveform in riod of time.  It can be seen from the figure that the system can fully detect normal breathin Cheyne-Stokes respiration. In the comparison diagram of Cheyne-Stokes respirat Figure 13, the system in this paper can show even more detailed changes and contain information.

Conclusions
In this paper, we propose a non-contact heart failure detection method based o ware-defined radio. Patients with heart failure, especially those with Cheyne-Stok It can be seen from the figure that the system can fully detect normal breathing and Cheyne-Stokes respiration. In the comparison diagram of Cheyne-Stokes respiration in Figure 13, the system in this paper can show even more detailed changes and contain more information.

Conclusions
In this paper, we propose a non-contact heart failure detection method based on software-defined radio. Patients with heart failure, especially those with Cheyne-Stokes respiration, a common risk factor, should be highly vigilant and tested in a timely manner. For patients with heart failure as well as Cheyne-Stokes respiration, timely treatment with non-invasive positive pressure ventilation can greatly improve cardiac function in addition to basic anti-heart failure drug therapy. In this paper, the respiratory state information of patients was collected by wireless sensing technology to detect the symptoms of Cheyne-Stokes respiration, and the accuracy of the classification algorithm was 97.0%.
This method is a non-contact, non-invasive detection method, which can minimize the secondary injury to the critical patients with heart failure in the detection process, and does not require the patient to carry out complex cooperation. The device is also easy to carry, and can be in the ward or at home for a long term. Real-time detection of Cheyne-Stokes respiration in patients with heart failure is an early warning signal that is convenient for further targeted treatment of patients. However, this method has two disadvantages. One is that, due to the limitation of the condition, the condition tested is not the real patient, but the simulated condition of the patient through professional training. Another drawback is the inability to test multiple patients at once, rather than one subject at a time. Therefore, further work in the future is to optimize the classification algorithm to distinguish Cheyne-Stokes respiration as much as possible, and collect real real-time patients with heart failure, accompanied by Cheyne-Stokes respiration. According to the situation of real patients, the classification and discrimination algorithm is optimized to improve the persuasiveness and authenticity of the device in detecting this disease.  Informed Consent Statement: Informed consent was obtained from all subjects involved in the study.

Data Availability Statement:
The data presented in this study are available on request from the corresponding author.

Conflicts of Interest:
The authors declare no conflict of interest.