^{*}

This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution license (

The measurement of human respiratory signals is crucial in cyberbiological systems. A disordered breathing pattern can be the first symptom of different physiological, mechanical, or psychological dysfunctions. Therefore, a real-time monitoring of the respiration patterns, as well as respiration rate is a critical need in medical applications. There are several methods for respiration rate measurement. However, despite their accuracy, these methods are expensive and could not be integrated in a body sensor network. In this work, we present a real-time cloud-based platform for both monitoring the respiration rate and breath pattern classification, remotely. The proposed system is designed particularly for patients with breathing problems (e.g., respiratory complications after surgery) or sleep disorders. Our system includes calibrated accelerometer sensor, Bluetooth Low Energy (BLE) and cloud-computing model. We also suggest a procedure to improve the accuracy of respiration rate for patients at rest positions. The overall error in the respiration rate calculation is obtained 0.53% considering SPR-BTA spirometer as the reference. Five types of respiration disorders, Bradapnea, Tachypnea, Cheyn-stokes, Kaussmal, and Biot's breathing are classified based on hierarchical Support Vector Machine (SVM) with seven different features. We have evaluated the performance of the proposed classification while it is individualized to every subject (case 1) as well as considering all subjects (case 2). Since the selection of kernel function is a key factor to decide SVM's performance, in this paper three different kernel functions are evaluated. The experiments are conducted with 11 subjects and the average accuracy of 94.52% for case 1 and the accuracy of 81.29% for case 2 are achieved based on Radial Basis Function (RBF). Finally, a performance evaluation has been done for normal and impaired subjects considering sensitivity, specificity and G-mean parameters of different kernel functions.

Different studies show the importance of monitoring and analyzing the respiration signals in fields such as medicine and physiology [

One recent development is the use of motion sensors to detect the small movements of the chest wall that occur during expansion and contraction of the lungs. In preliminary trials on hospital patients, it has been shown that with proper signal processing; this approach can produce results that match closely the measurements of nasal cannula pressure [

In addition to obtaining an accurate respiration rate, several methods have been also suggested for identification of respiration disorders, such as sleep apnea. In fact, statistical features of different signals, such as nasal air flow, the thorax and abdomen effort signals, Electroencephalography (EEG), and ECG are mostly used in the detection. In [_{2}) and the ECG in order to evaluate sleep quality and apnea detection. The Bagging with REP Tree classifier achieved 79.75% and 85.89% of sensitivity and specificity respectively, while the overall accuracy obtained 84.40%. In [

Indeed, there are several methods for classification of normal and sleep apnea breathing patterns. However, in this paper five different types of respiration disorders either with or without apnea are considered and remotely classified using hierarchical SVM, based on the best extracted features from accelerometer sensors data. SVM introduced by Vapnik [

The advanced low-cost and energy efficient data transport architectures for body sensor networks allow the doctors and physicians monitor their patient remotely with serious focus and effect on successful results in healthcare [

The accelerometer data is transmitted via Bluetooth Low Energy (BLE) to PC/smartphones and then it is sent to the cloud to be processed and saved, immediately. The algorithms and models run on the backend and feed the application with relevant data in a reasonable amount of time. It is worth mentioning that in case of network disconnection, the data is saved in the intermediate interface. Therefore, the physicians can track the patients wherever they are with devices such as smartphones, tablets or the web regardless of their proximity to the patients. Moreover, in this study the accuracy of respiration rate compared to previous works [

In Section 2, a new method is used to accurately calculate the respiration rate. In Section 3, the hierarchical SVM has been applied on respiration signals which derived from the accelerometer to classify different types of the respiration patterns. Experimental results are presented and discussed in Section 4. In Section 5, normal and impaired respirations classification is investigated. Finally, Section 6 concludes the paper.

In this section, we describe a procedure to estimate the respiration rate at rest positions.

In order to make sure that the sensors' readings are accurate enough to be processed, we calibrate our accelerometer sensor using least square method proposed by [

The calibration procedure can be briefly explained as:

Vector

Vector

Matrix

In our experiments, the accelerometer sensor is mounted on the subject's chest for respiration rate analysis. The raw sensor data is filtered through a 10th order Butterworth low pass filter with cut of frequency 1 Hz; and spirometer signal is smoothed with window size 30.

The main preprocessing steps for breath patterns classifications are calibration, filtering and resampling explained in Section 2. Once the data are processed, they must be collated and labeled based on the different classes such as Normal, Bradapnea, Tachypnea, Cheyn-stokes, Kaussmal, and Biot's respiration patterns. Then a hierarchical structure is built for modeling the classification problem. This is a tree like structure describing the patterns we are trying to classify. At each level of the tree, a SVM classifier is used based on the extracted features and data are separated into one of the branches. Once we reach a leaf node, a final classification is made. The classification structure is shown in Section 4 in more details.

Features can be thought of as statistically unique elements of the sensor data, which are used to differentiate diverse classes or states. In the proposed system, classes are the different respiration patterns inferred from various types of breath disorders such as Normal, Bradapnea, Tachypnea, Kaussmal and two types of constraint breathing, such as Cheyn-stokes and Biot's respiration patterns. Features such as energy, mean, maximum, standard deviation, inter-axes correlation and number of local maxima are calculated on both three axes (x,y,z) of the accelerometer and the magnitude of them
_{i} corresponding to the signal, and n is number of samples. Besides, we extract the Approximate Entropy (ApEn) from the accelerometer signals as one of the main feature in our classifier explained in the next subsection. Indeed, there are a vast number of diverse features providing freedom in selection that best suit each application. A window of a fixed length (10 s) shifted in increments of 2 s was experimentally selected. We asked the subjects to pause breathing for at least 3 s to simulate the apnea in Cheyn-stokes and Biot's breathing patterns (in our experiments, no subject paused breathing more than about 5 s). The best features are extracted based on the obtained accuracy resulted from the training set.

ApEn is a technique introduced by Pincus [

For an

For each ^{−1} times the number of vectors

ApEn is obtained from the

The ApEn calculation returns a nonnegative number where higher value shows irregularity of the signal and more regularity resulted from the lower ApEn. Note that, ApEn can be used for small data samples even in real time [

A support vector machine is based on constructing one or a set of hyperplane in a high dimensional space, which can be used for classification purposes. SVM constructs linear functions from a set of labeled training dataset. The linear separator is constructed considering maximum distance from the hyper plane to a fraction of the data points, named support vectors [_{i}_{i}_{i}_{i}_{i}^{d}

The decision boundary of a linear classifier can be written as follows:

Designing linear separator is to find the best _{i}^{T}_{i}_{i}_{i}

Indeed, this problem is a convex quadratic optimization with quadratic function subject to linear constraints which can transformed into the Lagrangian dual with the Karush-Kuhn-Tucker (KKT) conditions. Lagrange multiplier _{i}

Usually only a small parts of _{i}

_{sv}

A kernel function _{i}_{j}_{i}^{T}_{j}_{i}_{j}

Three types of kernels are evaluated in this paper which are:

Linear kernel: _{i}_{j}_{i}^{T}_{j}

Polynomial kernel with degree 3: _{i}_{j}_{i}^{T}_{j}^{3},

Radial basis function (RBF) kernel:

The SVM performance depends on the choice of the kernel function to transform data from input space to a higher dimensional feature space. There are no defined rules for choosing the kernel type, except satisfactory performance by simulation study [

In this section, we provide experimental results on 12-bit resolution data derived from SensorTag [

The participants of this study were five males and six females aged 4 to 48 with Mean ± SD, 26.54 ± 11.9026. They were instructed how to perform each breath exercise before their recording sessions. The experimental trials lasted for about 45 min per subject. We asked the subjects to perform Normal, Bradapnea, Tachypnea, and Cheyn-stokes patterns, each for 2 min (6000 samples) and the other two types for 1 min with a 3 min rest interval. For simulating apnea in Cheyn-stokes and Biot's breathing exercises, we requested the participants to pause breathing for at least 3 s. The sensor was mounted on the subject's chest in the middle of sternum region (

In this section, first the correlation between the spirometer and accelerometer signal is calculated on 11 different subjects with various ages, each for five types of breathing disorders. Next, the respiratory rate which recognized as important indicators of physical health or the exacerbation of medical conditions is calculated. In our test, the subjects are asked to perform six breathing patterns

Bradapnea is regular in rhythm but slower than normal in rate. Tachypnea is the condition of rapid breathing, with respiration rate higher than 20 respirations per minute (rpm). Tachypnea may occur due to physiological or pathological problems [

Biot's breathing is characterized by periods of rapid respirations followed by regular periods of apnea. There are different reasons which causes Biot's breathing, such as damage to the medulla oblongata by stroke (CVA) or trauma, or pressure on the medulla due to uncal or tenorial herniation and prolonged opioid abuse [

The correlation of spirometer and accelerometer signals of all subjects for each breath pattern is shown in

According to the procedure explained in section 2, the average respiration rates are extracted from the 10-second windows for 11 subjects and 6 breath conditions. The overall error in respiration rate calculation is obtained 0.53% considering SPR-BTA spirometer as the reference. Thus, we could obtain better accuracy for respiration rate compared to [

The proposed classification method is performed by using a cloud-computing and the results are sent to our monitoring platform. We categorized breathing data into six classes based on the features evaluations. Considering the proposed tree structure in

We have evaluated the performance of the proposed classification while it is individualized to every subject (case 1) as well as considering all subjects (case 2). Five samples of extracted features and accuracies in training phase for an individual subject are listed in

In _{ij} represents the j_{th} group and f_{ik} is the k_{th} feature of the i_{th} branch.

The ApEn is applied on the normalized data while energy performs on x, y and z dimension after removing DC levels.

There are totally 168 and 42 training trials for G_{11} and G_{12} for training subject's data individually. The numbers of trials for training all subjects' data are 1680 and 378, respectively. We calculate all combinations of defined features in each branch and then select the one with the best SVM training accuracy.

The processing window for testing data was experimentally selected to be 10 s in order to include at least one complete cycle including pause period (Apnea) for Cheyn-stokes and Biot's breathing patterns. As we mentioned before, the window is shifted in increments of 2 s. The average classification accuracy of 94.50% was obtained for RBF kernel function for 11 subjects while the proposed classification is individualized to every subject. In this case, the system is effectively tuned to every individual and the subjects can either perform training at home or during periodic visits to breath specialist or a physician. The classification performance of 81.29% was also attained when only a single system was trained with all subjects' data.

As performance of SVM depends on the choice of the kernel function, we also evaluate the linear and polynomial degree 3 of kernel functions.

In another aspect, our classification problem could be modeled as a binary classification for detecting healthy (positive) or unhealthy (negative) subjects. In this case,

Another parameter often used is the geometric mean of sensitivity and specificity (G-mean) which is defined as the square root of the product between sensitivity and specificity as

Therefore, the best classification parameters are achieved for distinguishing between Normal and impaired respiration patterns while using RBF kernel function.

In this paper, we presented an accurate, reliable and real-time respiration monitoring system. In fact, early identification through such portable monitoring systems and timely treatment of exacerbations can decrease the hospital admissions and slow deterioration while reducing early mortality and disease costs [

This paper is part of a Ph.D. thesis written by Atena Roshan Fekr under supervision of professors Zeljko Zilic and Katarzyna Radecka. Majid Janidarmian is participated in the hierarchical classification algorithm, experimental results and also contributed regarding final paper structure.

The authors declare no conflict of interest.

Overall view of the proposed cloud-based respiration monitoring platform.

Signal processing of respiration rate analysis.

(

Respiration disorder classification procedure using different kernel functions in hierarchical SVM classifier.

(

(

Average correlation between spirometer and accelerometer signals and the standard deviations for five different disorders.

Tree structure of proposed hierarchical SVM classifier.

Selected features for (

SVM classification based on (

The features for SVM classification.

Mean |
_{i} corresponds to the samples, i = 1, …, n |

Standard Deviation |
_{i} corresponds to the samples, i = 1, …, n |

Inter-axis Correlation |
_{1i} and _{2i} are samples from two axes, i = 1, …, n |

Energy |
_{i} corresponding to the samples, i = 1, …, n |

Approximate Entropy |
_{i}, |

Maximum | Max ( |

Respiration rate measurements with both accelerometer and spirometer for different subjects.

| |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|

M/48 | 13.01 | 7.45 | 46.73 | 37.03 | 17.44 | 33.70 | 13.87 | 7.46 | 46.58 | 36.80 | 17.21 | 33.79 | |

F/37 | 26.66 | 19.18 | 104.89 | 68.80 | 47.43 | 38.86 | 26.52 | 19.10 | 104.16 | 69.44 | 47.24 | 39.01 | |

M/30 | 15.82 | 6.34 | 108.69 | 61.64 | 55.14 | 36.36 | 15.85 | 6.39 | 108.69 | 61.50 | 54.64 | 36.43 | |

M/29 | 25.90 | 8.52 | 53.09 | 44.52 | 69.35 | 27.80 | 26.01 | 8.47 | 52.79 | 44.29 | 69.75 | 27.66 | |

F/28 | 24.27 | 17.42 | 30.00 | 34.96 | 50.00 | 76.92 | 24.23 | 17.52 | 29.97 | 34.88 | 49.88 | 77.41 | |

F/28 | 23.62 | 19.82 | 25.02 | 36.23 | 50.00 | 33.70 | 23.78 | 19.60 | 24.97 | 36.40 | 49.83 | 33.63 | |

F/28 | 24.56 | 9.63 | 74.62 | 51.72 | 51.72 | 34.70 | 24.50 | 9.70 | 74.25 | 51.42 | 51.28 | 34.66 | |

F/27 | 25.90 | 11.78 | 53.95 | 37.50 | 39.78 | 45.80 | 25.64 | 11.75 | 53.83 | 37.40 | 39.57 | 45.91 | |

F/24 | 16.42 | 14.45 | 113.92 | 26.93 | 48.61 | 33.18 | 16.23 | 14.63 | 113.92 | 26.78 | 48.83 | 33.11 | |

M/9 | 20.17 | NA | 89.28 | NA | NA | NA | 20.54 | NA | 89.82 | NA | NA | NA | |

M/4 | 31.25 | 28.51 | NA | NA | NA | NA | 30.98 | 28.41 | NA | NA | NA | NA |

Respiration per minute (rpm). Two kids were asked to perform only two breathing patterns out of Normal, Bradapnea and Tachypnea types. NA (Not Applicable) here means that the kids did not perform the trials.

The average volume of air (liter) inhaled/exhaled per breath for each subject.

0.58 ± 0.0036 | 0.72 ± 0.0249 | 1.22 ± 9.58E-04 | 2.78 ± 0.4120 | 3.20 ± 0.0030 | 2.78 ± 0.0030 | |

0.67 ± 0.0088 | 1.15 ± 9.33E-04 | 0.53 ± 6.67E-05 | 1.32 ± 0.2660 | 2.22 ± 0.0048 | 2.25 ± 0.0048 | |

0.54 ± 0.0015 | 1.54 ± 0.0021 | 0.53 ± 6.25E-04 | 0.88 ± 0.3938 | 1.34 ± 0.0044 | 1.70 ± 0.0044 | |

0.64 ± 3.00E-04 | 3.12 ± 0.0171 | 0.41 ± 0.0014 | 1.38 ± 0.1649 | 2.85 ± 0.0033 | 3.50 ± 0.0033 | |

0.80 ± 0.0023 | 0.93 ± 0.0013 | 1.51 ± 0.0065 | 1.27 ± 0.2107 | 1.83 ± 0.0028 | 1.36 ± 0.0028 | |

0.72 ± 0.0016 | 1.50 ± 0.0017 | 0.46 ± 1.00E-04 | 1.00 ± 0.2632 | 1.22 ± 0.0013 | 1.03 ± 0.0013 | |

0.40 ± 2.33E-04 | 0.71± 0.0016 | 0.65 ± 4.33E-04 | 1.02 ± 0.0544 | 1.31 ± 0.0018 | 1.59 ± 0.0018 | |

0.64 ± 0.0025 | 1.71 ± 0.0305 | 0.58 ± 0.0028 | 1.15 ± 0.2871 | 1.42 ± 2.33E-04 | 1.78 ± 2.33E-04 | |

0.59 ± 0.0019 | 0.79 ± 0.0032 | 0.83 ± 0.0043 | 0.93 ± 0.0780 | 2.39 ± 0.0036 | 2.51 ± 0.0036 | |

0.54 ± 0.0018 | NA | 0.38 ± 9.67E-04 | NA | NA | NA | |

0.30 ± 4.67E-04 | 0.27 ± 5.67E-04 | NA | NA | NA | NA |

Five samples of all features combinations and training accuracies for different branches of the proposed classification for case 1.

_{11} |
_{12} |
_{21} |
_{22} |
_{31} |
_{32} |
_{42} |
_{42} |
_{51} |
_{52} |
|||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|

SD(x) | ApEn(z_{N}) |
98 | SD(y) | Mean(Mag) | 100 | SD(y) | SD(x) | 100 | E(y_{d}) |
SD(x) | 100 | SD(y) | P(z) | 100 |

Max(x) | Mean(x) | 96 | Mean(x) | ApEn(y_{N}) |
100 | SD(y) | P(x) | 100 | SD(z) | Max(x) | 100 | Max(z) | P(x) | 100 |

Max(y) | Mean(z) | 96 | Corr(x, y) | Max(Mag) | 100 | SD(y) | P(y) | 100 | SD(y) | Mean(y) | 100 | Max(x) | ApEn(y_{N}) |
100 |

SD(x) | Max(y) | 94 | SD(y) | Max(y) | 98 | ApEn(x_{N}) |
ApEn(y_{N}) |
100 | SD(y) | ApEn(x_{N}) |
100 | SD(y) | Max(y) | 97 |

Max(y) | E(x_{d}) |
94 | SD(y) | SD(y) | 97 | SD(z) | Mean(x) | 95 | Mean(x) | P(x) | 92 | SD(y) | Max(Mag) | 94 |

E(.) is the energy of a signal, Corr(.) refers to the correlation of the signals, Max(.) shows the maximum of the signal, x_{d}, y_{d} and z_{d} correspond to x, y and z after removing the DC levels. x_{N}, y_{N} and z_{N} are the normalized values of the accelerometer data. P(.) is the number of local maxima derived from corresponding signal.

The best selected features combinations and training accuracies for different branches of the proposed classification for case 2.

_{11} |
_{12} |
_{21} |
_{22} |
_{31} |
_{32} |
_{42} |
_{42} |
_{51} |
_{52} |
|||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|

Corr(x, y) | E(y_{d}) |
92 | Max(y) | Mean(y) | 94 | E(y_{d}) |
ApEn(z_{N}) |
98 | Mean(x) | ApEn(y_{N}) |
99 | Max(y) | Max(Mag) | 99 |

Selected features and training accuracy for different branches of the proposed classification with different kernel functions for both cases.

Best Features | _{11} |
_{12} |
_{21} |
_{22} |
_{31} |
_{32} |
_{42} |
_{42} |
_{51} |
_{52} |
|||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|

RBF | SD(x) | ApEn(z_{N}) |
98 | SD(y) | Mean(Mag) | 100 | SD(y) | SD(x) | 100 | E(y_{d}) |
SD(x) | 100 | SD(y) | P(z) | 100 |

Linear | Max(x) | Mean(x) | 93 | Max(Mag) | Mean(Mag) | 97 | P(z) | E(Mag) | 100 | Max(x) | ApEn(z_{N}) |
100 | SD(y) | P(y) | 100 |

Polynomial | SD(x) | ApEn(x_{d}) |
97 | SD(y) | P(y) | 100 | SD(y) | SD(x) | 100 | SD(y) | Max(Mag) | 100 | SD(z) | SD(y) | 100 |

Best Features | _{11} |
_{12} |
_{21} |
_{22} |
_{31} |
_{32} |
_{42} |
_{42} |
_{51} |
_{52} |
|||||

RBF | Corr(x,y) | E(y_{d}) |
92 | Max(y) | Mean(y) | 94 | E(y_{d}) |
ApEn(z_{N}) |
98 | Mean(x) | ApEn(y_{N}) |
99 | Max(y) | Max(Mag) | 99 |

Linear | ApEn(z_{N}) |
SD(x) | 81 | SD(y) | Mean(Mag) | 86 | P(z) | E(Mag) | 94 | E(y_{d}) |
ApEn(y_{N}) |
97 | Max(y) | P(z) | 99 |

Polynomial | ApEn(z_{N}) |
P(y) | 89 | SD(y) | SD(x) | 90 | P(z) | SD(y) | 95 | Mean(y) | P(z) | 97 | SD(z) | SD(y) | 99 |

Test performances of the classification for case 1 (in average for 11 subjects).

RBF | 18 | 72 | 0 | 0 | 1 | 1 | 1 | 1 |

Polynomial | 18 | 67.97 | 0 | 4.03 | 1 | 0.94 | 0.95 | 0.97 |

Linear | 16.28 | 72 | 0 | 1.72 | 1 | 0.97 | 0.98 | 0.98 |

Test performances of the classification for case 2.

RBF | 167 | 647 | 37 | 31 | 0.81 | 0.95 | 0.92 | 0.96 |

Polynomial | 161 | 641 | 43 | 37 | 0.78 | 0.94 | 0.91 | 0.95 |

Linear | 150 | 626 | 58 | 48 | 0.72 | 0.93 | 0.88 | 0.94 |