key: cord-0047509-7bue4z5g authors: Chen, Jinlong; Jiang, Mengke title: Case Classification Processing and Analysis Method for Respiratory Belt Data date: 2020-06-22 journal: Advances in Swarm Intelligence DOI: 10.1007/978-3-030-53956-6_50 sha: 4a1096c32184725c3eba368907635bc35e02cb61 doc_id: 47509 cord_uid: 7bue4z5g Human respiratory signal is the important physiological indicator to reflect the physical condition. The respiratory belt, compared with the other human respiratory data measurement methods, has the advantages of being portable, cheap, non-invasive, etc. However, it is unclear which features of the breathing data can effectively classify the normal/abnormal state of breathing state. To solve the problem, we proposed a novel approach based on long-short-term-memory (LSTM) and breathing features of respiratory data. First, LSTM structure were used, then compared the result with the traditional method which extract the feature to experiment (in our paper which is RIE (ratio of inspiratory time to expiratory time)). In the end, a novel methodology proposed which combined the RIE feature with the LSTM structure. Experiment the three methods above using 342 normal and abnormal 24-h breathing data, the results show that the third method has higher classification accuracy. The intensity, shape, rate and other aspects of human respiratory signals largely reflect other human functions such as cardiopulmonary function [1] . Through the analysis of human respiratory signals, it can effectively prevent or serve as the basis for other diseases found. Traditionally, there are several methods for measuring the breathing: (1) Wet temperature detection [2] . The method for detecting respiration based on nano-temperature and humidity sensing materials has poor adaptability, it is susceptible to external interference, and has low detection sensitivity. (2) Impedance detection. Impedance detection is currently the most commonly used respiratory detection method in the clinic. It can work stably and only needs to measure the respiratory signal through two electrodes, which is convenient and simple to use. However, this kind of method not only requires high on electrodes, but also causes problems in which the ratio is difficult to determine due to disturbance of cardiac blood flow [1] . (3) Extracting the respiratory signal from the ECG signal. This is an emerging detection method with non-invasive advantages, such as S. Leanderson [3] extracting respiratory signals from the ECG vector map and estimating the respiratory rate from the power spectrum of the respiratory signal. However, this measurement accuracy is not high, and the electrocardiographic electrode is prone to cause skin irritation of the patient. Therefore, the medical community currently lacks a method to measure the respiratory function in a natural state, long-term, non-invasively. The respiratory belt compensates for the above problems to some extent. The respiratory belt is shown in Fig. 1 . Usually, the weight is ≤30 g. The user binds it to the outside of the underwear that is close to the skin of the abdomen. Above the belt, the flexible breathing force sensor can be used to obtain the breathing waveform of the person by abdominal pressure. An example of a breathing belt and acquired breathing data is shown in Fig. 1 . The respiratory belt has the following characteristics compared to the above method: (1) non-invasive, direct and continuous. Detection is the direct, continuous collection of human bio signals performed without any trauma to the patient. (2) Portable and inexpensive. This device measures the respiratory motility by placing a tension sensor in the subject's belt. The current low price of sensors and data storage devices allows these instruments to be purchased and used by most subjects. (3) Robust, stable and sensitive under natural conditions. Because it is bound to the waist of the subject, the subject can perform most of the daily activities without being affected, and has good stability and sensitivity for the measurement of respiratory data. Based on the above advantages of the respiratory belt, and the current analysis of the respiratory belt data is insufficient, this paper will explore the data obtained using the respiratory belt to analyze, trying to effectively distinguish the normal and abnormal breathing data. The normal inspiratory time is 0.8-1.2 s and the exhalation time is 0.5-1 s. That is, the normal breathing time is 1.3-2.2 s, plus the breathing interval is about 1-2 s, and the breathing time is 3.5 s a time. The ratio of inspiratory time to expiratory time is about 1:1.5-2. The expiratory time takes longer than inspiratory time because the exhaling generally does not require extra work, only the chest automatically retracted. However, the ratio of people with abnormal breathing state may reach 1:4 or higher, and the respiratory data obtained through the breathing belt can be further analyzed based on the similar parameter information. Most researchers currently focus on the acquisition of respiratory data or on disease warning through real-time respiratory data. Sebastijan Sprager [4] proposed a method for detecting respiration from optical interference signals. A. Raji [5] used two temperature sensors to indirectly obtain respiratory data, and to determine the occurrence of asthma by abnormality in real-time respiration rate, Agnel John K. J and Pamela. D [6] proposed a sleep apnea monitoring system based on single-chip microcomputer to detect sleep apnea. These studies are mainly to detect the real-time respiratory data to determine the onset of respiratory disease, not the overall evaluation of the patient's respiratory system. In order to judge whether the overall respiratory state of the subject is normal or abnormal, this paper uses the respiratory belt to observe the daily behavioral respiratory data of the subject, analyzes and processes the data to find the appropriate distinguishing features to evaluate the respiratory condition of the subject. For the problem of case classification based on the respiratory data acquired by the respiratory belt, this paper firstly filters the original respiratory signal, removes the corresponding abnormal value and baseline drift, and then uses the LSTM network, the absorption ratio combined with LSTM, the absorption ratio combined with SVM, respectively. The corresponding methods will be introduced separately below. Usually, the raw data has a phenomenon such as baseline drift. Baseline drift is generally caused by human breathing, electrode movement, etc., and needs to be removed from the original data before further research and analysis to obtain data that more reflects the original respiratory characteristics. Commonly used removal methods include median filtering, wavelet transform, and morphological filtering [7] . In this paper, wavelet transform is used to perform filtering processing. Wavelet transform is widely used in signal processing, image processing, pattern recognition and other fields. Through the telescopic translation operation, the signal (function) is gradually multi-scale refined, and finally reaches the time division at high frequency, and the frequency division at low frequency, which can automatically adapt to the requirements of time-frequency signal analysis, so that it can focus on any detail of the signal. The wavelet transform is an inner product of a square integrable function and a wavelet function with good local properties in the time-frequency domain, as shown in Eq. (1). Where a > 0 is the scale factor, b is the displacement factor, * means the complex conjugate, and ψ a,b (t) is the wavelet basis function. RIE is a commonly used index for current respiratory data analysis, and the value is the ratio of the inspiratory time to the expiratory time in one breathing cycle. Therefore, we identify the crests and troughs of the data. The trough to the crest is an "inspiration" process, and the crest to the trough is an "expiration" process, as shown in the following figure. The goal of the paper is to classify respiratory data as normal or abnormal by breathing characteristics. For this two-class problem, SVM is a suitable method. SVM is a twoclass classification model. It is one of the more mainstream domain classifiers before the widespread use of deep neural networks. It has been widely used in visual model recognition and many other fields [8] . The SVM can map the linear indivisible problem of the original data into the higherdimensional feature space through the kernel function, and transform it into a quadratic programming problem for solving linear constraints. Given a set of training samples D = ((x 1 , y 1 ), (x 2 , y 2 ), . . . . . . , (x m , y m )), y i ∈ {−1, 1}, suppose we can use a hyperplane in a certain space: w · x = 0 divides the training set into two categories. The most suitable hyperplane is the maximum margin hyperplane [9] . By solving the Eq. (2), the optimal values of w and b can be obtained. Where K(x, x i ) is a kernel function, which corresponds to constructing an optimal segmentation plane in the input space, and a i and b are solved by the SVC learning algorithm [9] . The respiratory data acquired by the respiratory belt is continuous data with time series characteristics. According to this feature, the LSTM network suitable for processing time series is also proposed for classification. LSTM is a special RNN that solves the problem of gradient explosion and gradient disappearance of RNN. This is mainly because LSTM eliminates the "multiply" calculation method in simple RNN and changes it to "accumulate" mode [10] . LSTM introduces a memory unit so that the network can control when to forget unwanted information, when to update the memory unit with new input information, and to protect and control information through forgetting, input, and output gates. The LSTM update method at time t is as follows: Where h t−1 is the output of the previous moment, x t is the input of time t, and σ is the activation function. The forgotten gate f t controls how much information each unit needs to forget, the input gate i t controls new information, and the output gate o t controls the output information (Fig. 2) . The data used in the experiments in this paper were from 342 samples of normal and abnormal breathing data collected by the Academy of Chinese Medicine, including 55 abnormal samples and 287 normal samples, each with a decimal data of about 24 h. The visualization results of the data are shown in the following figure. Since the difference between the sample can not be clearly distinguished from the naked eye, it is necessary to perform appropriate processing on the data and then use a certain analysis method to perform the discrimination. Firstly, the original data is filtered. For our data, the wavelet transform method is selected to remove the baseline drift operation. The wavelet transform result is shown in Fig. 3. Our goal is to determine whether the breathing is abnormal based on the data, to treat it as a sequence classification task, and because the respiratory data is time-correlated, we decided to use LSTM network structure. Using an LSTM unit, the parameter is set to 32 (unit_num), the training data is in one-to-one correspondence with the label, the training sample dimension is (7200, 10), the label is one-hot encoded, and (0, 1) indicates an exception, (1, 0) indicate normal, and the step size is set to 10. The network structure design is shown in the figure below. The processed data is input into the LSTM network of different hidden neurons, and the classified results are shown in Table 1 (Fig. 4) . The crests and troughs are identified according to the filtered result, then the respiratory time and the expiratory time of each breathing cycle can be obtained, and the RIE is calculated according to Eq. (2), as shown in Fig. 5 . The result is input into the SVM, and the classification accuracy is 73%, which is 6% higher than that of the single LSTM structure. The result of RIE is input into the part 4.3 designed LSTM network structure. According to the experimental results, when the LSTM hidden layer is 2 layers and the number of hidden units is 64+64, the classification effect is the best, about 80%, which has improved the accuracy by about 15% compared with simply using LSTM structure, and about 5% higher than the RIE+SVM. The results are shown in Table 1 . In this paper, the processed respiratory data were tested by LSTM, RIE+SVM, RIE+LSTM. The hidden layer of LSTM used different number of neural unit, some experimental results of the loss curve are shown in Fig. 6 . It can be seen that the method with the highest accuracy has the fastest and lowest drop in the RIE+LSTM (10+64+64+2) loss. The accuracy results are shown in Table 1 , from the results that the accuracy of using LSTM alone is not very high, about 62%, and the 64 hidden units has the best classification result. The accuracy of the combination of RIE and SVM increased to about 75%. After SVM changed to LSTM, the accuracy is greatly improved. When the nerve units set to 64+64 the accuracy is the best, reaching about 80%. Consider that there are currently few analytical methods for respiratory belt data, this paper aims to find relatively effective features for breathing data to distinguish between normal and abnormal populations. The single LSTM network structure compared with the traditional method which extracting features to distinguish the respiratory state, the result proved the effectiveness of that kind of network structure. At last combined the LSTM structure with the manual features. Through the above experimental results, it can be concluded that the classification effect of the third method is better than the others, and the accuracy rate is about 79%. Compared with the single LSTM structure, the accuracy is improved by about 15%, which proves the effectiveness of the proposed algorithm. The effectiveness also provides good data support for the next breath clinical trials and pathological tests. In the future, we consider using other network structures such as recurrent neural trees, random forests, etc., and discussing with medical personnel to find other features other than RIE and expect better classification results. Guangxi Key Laboratory of Trusted Software of Guilin University of Electronic Technology (No: KX201620), the grant of Guilin science and technology projectResearch and application demonstration of key technologies of somatosensory interaction based on gesture (No: 20180107-4). Study on respiratory signal detection belt based on PVDF Wireless breath detection system based on rapid response humidity sensor Estimation of the respiration frequency using spatial inform sction in the VCG Heartbeat and respiration detection from optical interferometric signals by using a multimethod approach Respiratory monitoring system for asthma patients based on IoT Arduino uno Based Obstructive Sleep Apnea Detection Using Respiratory signal Comparison of baseline drift removal methods and algorithm implementation in ECG signal Recognizing human actions a local SVM approach Statistical Learning Theory Molecular bases for circadian clocks Acknowledgements. This research work is supported by the grant of Guangxi science and technology development project (No: AB17195027), the grant of Guangxi scientific research and technology development plan project (No: AB18221011), the grant of