Development of Respiratory Rate Estimation Technique Using Electrocardiogram and Photoplethysmogram for Continuous Health Monitoring

ABSTRACT


INTRODUCTION
Based on the Strategic Plan of the Ministry of Health of Malaysia for 2016-2020, the increased prevalence of infectious and non-infectious diseases implies the government's concern for hospital healthcare services and resources [1].Most high-risk patients suffering from diseases require full monitoring of vital signs, such as pulse rate, respiratory rate (RR), blood pressure, and body temperature [2], which are used as the main references to the patient's health level [3].
Brief changes in the RR is a sensitive marker for health deterioration in patients compared with other vital signs [4].However, less than 50% of RR information is recorded by medical personnel despite the presence of severe respiratory illnesses [5].Besides RR measurement, the respiratory sounds is also an  ISSN: 2302-9285 BEEI, Vol. 7, No. 3, September 2018 : 487 -494 488 important parameter where Abdul Malik et.al in 2017 [6] have conducted a study to classify normal respiratory sounds and crackles respiratory sounds in healthy individuals and lung cancer patients.Another parameter such as the cardiorespiratory information can be measured using multiple piezoelectric sensors as investigated by Igasaki et al. [7].
The existing equipment for RR measurement techniques create noises.An example is the spirometer, which measures airflow in and out of the mouth during breathing.It may interfere with the natural respiratory process.Similarly, noise-related problems are also encountered by an inductance plethysmography (IP), which transmits electrical current between two electrocardiogram (ECG) electrodes when the volume of air in the lungs changes.This detector causes discomfort because, it is tied to the patient's chest to record air volume changes [8].
Information regarding respiratory signal can be found in the cardiovascular physiological signals, such as ECG [9], photoplethymogram (PPG) [10], [11] arterial blood pressure [12], and peripheral arterial tonometry waves [13].However, ECG and PPG are the most widely recorded signals from acute patients during their stay in hospital or outside of intensive care units (ICUs).
PPG is a cardiovascular pulse signal that is recorded by a non-invasive pulse oximeter to measure the heart rate and oxygen saturation of arterial hemoglobin (SpO2) [14], Pulsatile PPG waveform is generated basically due to the blood volume changes in the tissue area involved.The alternating current part of PPG is the pulsatile physiological waveform that represents the changes in the blood pressure with each heart rate [15].The light across biological tissues, such as the tip of the fingers, the toe or ear lobes, is absorbed by the absorption substances, including the skin, bone, and blood capillaries.Arterial diameters increase if blood pressure increases during systole, compared with diastole, to accommodate a large volume of blood.The light intensity transmitted through the vessels to the photo detector is constantly fluctuating periodically according to the pulsatile blood flow due to aforementioned cardiac cycle [16] This event results in the development of heart rate readings.
The RR signal from the PPG waveform occurs when the chest cavity affects the venous blood flow to the heart during the respiratory process, causing blood perfusion fluctuations and impairing the vascular peripheral self-control.The fluctuation moves along with the fluctuations that occur due to respiration process.Because of this modulation effect, PPG signal contain respiratory information [3] through its amplitudes, base line, and pulse width modulation [17].
Karlen et al. [18] has combined three RR findings from PPG signals that change the frequency, intensity, and amplitude caused by the respiratory process.The developed algorithm can achieve a root mean square (RMS) error of 3.0 breaths/min (bpm), compared with referral (actual) RR.Sukor et al. [19] analyzed the morphology of the ECG and PPG signals and received a considerable error of 7.23 bpm.Nemati [13] combined Kalman filter and the quality of the signal index and obtained an error of 3.02 bpm.Fleming [20] analyzed PPG by comparing two techniques of autoregressive methods, namely, digital filters and small wave decomposition (wavelet decomposition).However, the study did not provide an estimated RMS error value of RR.Wavelet decomposition and power spectral density analysis methods have also been used to extract RR and presented 9.5% error rate [21].
Therefore, in this study, an algorithm development technique is presented to obtain reliable RR estimates from ECG and PPG signals that can reduce the use of bulky medical devices on patient's body.ECG data were recorded using a single lead (lead II) represented by a pair of electrodes, and a reference electrode.A pulse oximeter placed at the tip of the index finger was used to record the PPG signal.Furthermore, MIMIC-II patient data were used for the development of RR extraction algorithms.Signal quality index (SQI) is also applied to ensure high-quality ECG and PPG signals are used for the estimation process.

RR ESTIMATION FROM ECG AND PPG SIGNALS
Two types of dataset were used to determine the estimation of breathing rates.The first dataset was provided by the PysioNet archive site that contains 40 patient data from the Multiparameter Intelligent Monitoring in Intensive Care II (MIMIC-II) study.The second dataset comprised of 20 data, which were recorded and collected using a vital sign acquisition system.The vital data of 20 healthy subjects were obtained using the eDecron detector and CMD 50+ pulse oximeter due to its portability and affordability [22].ECG and PPG signals were recorded from 4 males and 16 females, aged 13 to 58 years old, with a median age of 26 years.The median for the body mass index of the subjects is 21.0, which ranges from 14.9 to 32.0.Heart rate and RR parameters were obtained with the median of 73 bpm (61-89 bpm) and 19 bpm (14-25 bpm).Throughout the experiment, 17 subjects opted to remain seated, whereas 3 subjects preferred to lie down.

489
The development of the ECG and PPG database for the data acquisition system received ethical approval from the Research Ethics Secretariat of Universiti Kebangsaan Malaysia Medical Center with reference number UKM PPI/111/8/JEP-2018-161.
Development of the algorithm for RR estimation started with ECG signal, followed by PPG signal.The signals underwent a pre-processing phase and SQI evaluation.Next, the signal underwent the RR estimating process, with QRS complex tracking for ECG and pulse peak for PPG.The QRS complex detector, using Pan and Tompkins method, started under the following conditions: (sum(abs(ecg-median(ecg))>MIN_AMP)/NB_SAMP)>0.05 where ecg is the ECG raw signal, MIN_AMP is the minimum amplitude in a 10-second window, NB_SAMP is the number of sample inputs, that is, 1,250 samples at 125 Hz frequency sampling.
Meanwhile, peak pulse sensor used 'rpeaks' algorithm through parametric adjustment method described in [23].The estimated respiratory waves were generated through respiratory-sinus arrhythmia (RSA) for ECG and respiratory-induced frequency variations (RIFV) for PPG.Subsequently, RSA and RIFV were filtered using band-pass filter of finite impulse response (FIR).Using MATLAB software, the FIR equation was as follows: Where, the FIR filter design used the 38 th level in the frequency range between 0.1 and 0.6 Hz.
In this study, referral respiratory signals underwent a pre-processing process to eliminate the noise.Fast Fourier transformation (FFT) was performed on the FIR filter wave to determine the estimated RR of the ECG and PPG signal, as follows: This equation was used to calculate a discrete Fourier transform (DFT) for the value of X by using the appropriate Fourier transformation algorithm (FFT).
Next, the estimated RR and RR of the reference signal were compared statistically to determine the probability of accurate estimation.The algorithm in this study was developed using MATLAB.

Signal Pre-processing
The ECG and PPG waves went through signal pre-processing to eliminate high and low frequency noise by using filtering algorithm.Baseline wander is a low-frequency noise absorbed by ECG and PPG signals that is usually caused by respiratory, body movements, and an inadequate electrode position [24].This noise results in confusion and annotation of signage signal characteristics [25], such as the ST segment on the PQRST morphology of the ECG signal, which has a low-frequency value [26].This baseline frequency component is usually below 0.5 Hz, but during stress tests, this frequency limit was higher.To overcome the problem of baseline wander in the signal, a high pass filter with a cut frequency of 0.5 Hz was used.Filters with linear phase from infinite pulse response (FIR) were required to remove this baseline, thereby avoiding phase distortion when changing the wave feature in the heart cycle.
Power line interruptions for a frequency of 50 or 60 Hz formed the amplified sinus noise on the ECG and PPG signals.The frequency of these power lines varied according to places; for instance, 50 Hz power lines are used in Europe and Asia, whereas 60 Hz power lines are used in North America [27].Among the causes for this disruption is electromagnetic disturbances, pervasive effects by rerouting currents due to loop in wires, improper grounding devices, and unclean ECG electrodes.Additionally, electrical equipment, such as air conditioning, elevators and X-ray units, attracts high power line currents capable of affecting the 50 Hz signal on the ECG circuit input.To obtain the right pulse detection, we used filters to remove high frequencies.In this study, the infinite impulse response (IIR) notch filter is used to eliminate 50 +/-0.2Hz.
High-frequency noise was overcome by using Savitzky-Golay digital filtering to smooth out the waves, especially if distortion gestures occur.This generally moving average filter help in keeping the peak and gap effectively.

SQI
SQI is one of the artifact tracking algorithms that assess the quality of physiological data [28].Through this study, the raw signal underwent ECG morphology observations in a 10-second window of ,250 sample data.The method of obtaining SQI has been adopted from Behar [29] and Johnson [30] with the following steps.First, QRS annotations for ECG or peak signals for PPG are obtained using Behar [29] and Johnson [30] peak detectors.Second, using signal samples, the QRS and the peaks are marked to ensure that the mark is correct at the top.Both sets of annotations are inputs to the SQI algorithm, which provides signaling index and index values depending on the level of the peak detection equality for both detectors.If the peaks detected by the two sensors are equal, the SQI value is 1 for the signal in the 10-second window.If both detectors cannot agree with each other on the detected peaks, the value is less than 1.For this study, only windows that have a value of 0.9 and above were gathered for RR estimation.According to Sukor [19], the quality of a signal depends on the amplitude, width, and ECG and PPG waveforms.Initially, we hypothesized that this morphological detection could differentiate between the actual ECG and PPG waves with artificial disturbances.

Respiratory Signal Extraction
RSA is the correlation between variations of the heart rate cycle and the respiratory system.Heart rate increased when the person breathes in and decreased when breathing out.This method started by detecting R peak to obtain R-R interval in time series.Then, the R-R interval was used as the value for the amplitude of the new waveform.To perform FFT process in the next stage, the wave formed by RSA was resampled at a frequency of 4 Hz using spline interpolation.

RR Estimation from Respiratory Signals
Hence, the estimated respiratory wave obtained from the final process in the band-pass filter was determined by the RR.By using the developed algorithm, each of the ECG and PPG peaks was annotated to calculate the RR.

Statistical Analysis
The estimated RR derived from the ECG and PPG signal derivation methods was produced in the form of a sine wave.For confirmation, the RR signals were also recorded as referral respiratory signals at the same time.Referral respiratory signals went through the process of preparing and filtering pathways to obtain referral RR.The method used in determining the RR estimation from the ECG signal was assessed by determining the mean absolute error (MAE) in bpm.MAE was calculated, as described in Equation 3: where n is the number of data windows used, and ȳi is an estimate of RR that refers to the RR reference for window i.

Signal Pre-processiong
Figure 1(a) shows the raw ECG wave obtained from the MIMIC-II database.The signal processing began with the removal of baseline wander.Figure 1(b) shows that the baseline at low frequency was eliminated using the algorithm.Furthermore, this process proceeded with the removal of a 50 Hz power line disturbance, as shown in Figure 1(c).For MIMIC-II data, this power line disturbance was relatively minimal, which was likely due to the MIMIC-II data acquisition system that automatically eliminated this noise element.The next filtering, as depicted in Figure 1(d), eliminated the high frequency by applying the Savitzky-Golay filter.As depicted in Figure 2, the power line interference was clearly visible for the ECG data that were obtained using the data acquisition system.In the single-sided spectrum, the peak was at 52 and 59 Hz, thereby clearly demonstrating that electric power line noise in Malaysia exists in that frequency range.Figure 3 shows the results of the signal processing for the MIMIC-II database.The same method for ECG preprocessing was applied to PPG signal processing, which was completed by applying the Savitzky-Golay filter, as shown in Figure 3(d).

SQI
Figure 4 shows the ECG signal quality test with pulse peak tracking using two different peak detectors, namely, Behar [29] for QRS1 and Johnson [30] for QRS2.High-quality signal issues in 10-second window are shown for (a) QRS1 ('*') and (b) QRS2 ("o"); meanwhile, (c) SQI is provided after comparing QRS1 and QRS2, achieving good quality (1) and low quality (less than 1 at t=10 s).The data source is the MIMIC-II dataset.Figure 5(a) shows the PPG raw signal through the SQI process to determine the good quality (blue) and low quality (red).Figure 5(b) illustrated the assessment of the quality signal: good (1) and low quality (0 or less than 1).The database source also used the MIMIC-II data set.

Respiratory Signal Extraction
Figure 6 illustrates the breathing process of respiratory waves from ECG.The peak R detection of the raw ECG wave was shown in Figure 6(a).For diagram 6(b), the fiducial point of the distance difference between the adjacent R values was used.It was similar to (c) when defined as an ingestion of the respiratory sinus arrhythmia signal induced by frequency variation.The database source used was the MIMIC-II data set.Figure 7 shows the respiratory signal induced by frequency variation or fiducial point for the distance between the pulse peaks of PPG.The data source used was the set of PPG MIMIC-II data.   1, the MAE indicated that the estimation of the ECG and PPG respiration rates for the MIMIC-II database was 1.25 and 1.15, whereas those for the vital sign acquisition system were 1.05 and 0.90, respectively.The algorithm was used well in PPG signals versus ECG because the angle of respiratory modulation for each signal is different on both datasets.RR estimation from ECG and PPG signals were performed using 40 subjects for the MIMIC-II database and 20 subjects for the database acquisition system.The signal is processed using a 1-minute window in the time domain to issue estimates of RR.Respiratory sinus arrhythmic method and frequency-induced frequency variation show favorable results in determining the estimated respiratory waves.The obtained waveform is determined by the RR to be compared with the actual RR.[10] 3.02 Karlen [14] 7.23 7.00 Sukor [15] 3.00

CONCLUSION
RR from the ECG and PPG signals were estimated using the signal processing method, where the peak R-R values for ECG and pulse peaks of PPG were collected to form respiratory sinus waves.After determining the estimated RR, the obtained MAEs of ECG signal were 1.25 (MIMIC-II) and 1.05 bpm (acquisition system), and 1.15 (MIMIC-II) and 0.90 bpm (acquisition system) for PPG signal.In identifying the estimate of RR, the measurement system factor implied that data on acquisition system, age factor, and patient's condition, should also be analyzed.For example, in MIMIC-II database, the majority of the subjects were elderly patients in the ICU.The subjects were admitted and included in the database because of respiratory problem.With the determination of RR estimation through combined physiological ECG and PPG signals, subjects recruited for the database acquisition system experienced enhanced comfort, flexibility, and ease in evaluating their health level under the supervision of a medical officer or guardian.
Development of Respiratory Rate Estimation Technique Using Electrocardiogram… (Nazrul AnuarNayan)

Figure 2 .
Figure 2. Power line interference at 52 Hz and 59 Hz.Data source from vital signs acquisition system.

Figure 4 .Figure 5 .
Figure 4. Determination of SQI for MIMIC-II dataset ECG Figure 5. Determination of PPG SQI or MIMIC-II

Figure 6 .Figure 7 .
Figure 6.The ECG waveform for (a) the peak detection of R (b) varies between the peak R-R values (c) of the respiratory-arrhythmic artery.MIMIC-II dataset source Development of Respiratory Rate Estimation Technique Using Electrocardiogram… (Nazrul Anuar Nayan)493 indicated for RR calculation.The results via ECG and PPG signal evaluations were compared with the reference respiratory signals, which were included together in the PhysioNet MIMIC-II archive.These comparative results were statistically analyzed to obtain the MAE.

Table 1 .
Results of MAE for ECG and PPG Signals