Está en la página 1de 6

DESIGN AND IMPLEMENTATION OF A DETECTION ALGORITHM FOR SLEEPING APNEA BASED IN RESPIRATORY SIGNALS DERIVED FROM THE ELECTROCARDIOGRAM

DESIGN AND IMPLEMENTATION OF A DETECTION ALGORITHM FOR SLEEPING APNEA BASED IN RESPIRATORY SIGNALS DERIVED FROM THE ELECTROCARDIOGRAM
PINEDA LOPEZ FAVIO MINOS, MOROCHO CHECA DERLIN RUIZ QUINTEROS MONICA ALEXANDRA evident [4] [5].
Summary This paper describes the design and implementation of an algorithm for the detection of the syndrome of obstructive sleeping apnea (SAOS) by an electrocardiogram. This algorithm was designed from a derived respiratory signal (EDR), based on heart rate variation (RR interval) and power spectral analysis. The testing phase is carried out with 8 records of the ecg apnea database of Physionet. It is checked by means of correlation, that the RR interval is EDR that provides the characteristics necessary to implement the algorithm; it uses the RR interval signal non-interpolated and calculates the power spectral density of the signal. To validate, 35 registers without apnea annotations are analyzed, obtaining as results of sensitivity = 96%, specificity = 83% and accuracy = 96%.

Polysomnography is the most suitable and reliable study to diagnose SAOS. This diagnostic technique is the recording of multiple physiologic signals (ECG, EOG, EEG, EMG, SaO2, nasal and abdominal plethismographies, blood pressure and cardiac output) during the patient's sleep. Because this must remain hospitalized for one or more nights under personnel monitoring, polysomnography is a complex and costly, out of reach for most of the population. The electrocardiogram (ECG) is a simple registration, noninvasive and inexpensive to be used to monitor cardiac activity but can also be used to obtain respiratory information. For this purpose, various techniques have been proposed to derive the respiratory signal from the ECG [6]. Sample is taken as three methods for estimating the respiratory signal from ECG (EDR) and extraction of features. These are based in the area of the R wave, heart rate variability (RR interval) and the peak amplitude R, these are analyzed temporarily using cross-correlation and calculate the quality of these estimates by comparing them with real respiratory signals ( nasal airflow and thoracic and abdominal plethysmographic signals) of the patient simultaneously with the ECG, choosing the best results presented for the EDR with which the algorithm is validated by obtaining the power spectral density of the analyzed signal segment in the range between 0.01 and 0.04 Hz and see if it is greater than a certain limit. In the literature, various methods have been developed to detect sleep apnea based on algorithms on classification times [7], autoregressive models and artificial neural networks [8], [9].

INTRODUCTION

he syndrome of obstructive sleeping apnea (SAOS) is caused by the obstruction and collapse of the upper airway during sleep. This obstruction is due to collapse upon inspiration from the pharynx, resulting in negative intrathoracic pressure leading to a complete cessation (apnea) or partial (hypopnea) of airflow for longer than 10 seconds [1] and is repeated hundreds of times during sleep. The prevalence of sleeping apnea based on information obtained from "Wisconsin Sohort Study" is significant between 4-6% in men and 2% in women [3]. For patients over 65 years old, it is estimated that the prevalence is 2 to 3 times higher than that estimated for patients between 30 and 64 years old [2]. SAOS affects 2.1% of the population and its prevalence clearly increases with age [3], being associated with impaired quality of life [3,4], the presence of hypertension, development of cardiovascular and cerebrovascular diseases and the occurrence of traffic accidents [2]. The excess mortality associated with OSAS is
Para cada uno de los autores, describir el nombre de la institucin a la que pertenecen acompaada de la direccin de correspondencia y su correo electrnico de contacto.

DESIGN AND IMPLEMENTATION OF A DETECTION ALGORITHM FOR SLEEPING APNEA BASED IN RESPIRATORY SIGNALS DERIVED FROM THE ELECTROCARDIOGRAM MATERIALS In this study we used the database freely distribution ApneaECG Database. This database was developed by PhyisioNet / Computers in Cardiology Challenge 2000. ECG records were extracted from a database of polysomnographic measurements provided by the Philipps University, Marburg, Germany. The signal is sampled at 100 Hz, with a resolution of 16 bits, where each bit represents 5 mV. For the measurement of the registers were used the standards sleep positions of the ECG electrodes. The database does not contain episodes of pure central apnea, only has the obstructive apnea. Of the 70 signals recorded, 35 contain information of apnea and the QRS complex. Of these 35 recordings, 8 have 4 respiratory signals: oronasal plethysmographic chest, abdominal and oxygen saturation. In these 8 signs, apnea annotations were developed by medical experts and recorded every minute. The records are men and women aged between 27 and 63 years (mean: 43.8 10.8 years) with weights between 53 and 135 kg (mean: 86.3 22.2 kg). It has patient records healthy volunteers and patients with obstructive sleep apnea. Originally the sleep recordings were applied to 32 persons, 25 men and 7 women. In the database, signals are divided into 3 groups, patients with apnea (group A), borderline patients (group B) and normal or control patients (group C). It contains 40 recordings (20 with annotations) of patients with apnea, 10 borderline (6 with annotations) and 20 normal (5 with annotations). The apnea records consist of recordings with a duration of 60 to 100 minutes with an apnea index of 10 or more of the approximately 8 hours of recording. Every minute is identified with 'A' or 'N' indicating the presence or absence of sleep apnea in such minutes respectively. In patients classified as borderline, there are between 5 and 99 minutes of recording classified as apnea. Finally, records classified as normal containing less than 5 minutes with apnea. To load the signals were used the ATM PhysioBank [8] which is a tool that lets you download PhysioNet signals through the web browser. This allows you to convert from PhysioToolKit libraries of PhysioNet in various formats to download. Once downloaded the signals are read from the emulator Cygwin to use in MATLAB. For processing the signals from the database and the construction of the algorithm is used Matlab program, which allows adequate timing for each structure. A. Preprocessing Preprocessing of the ECG signal is based on the method proposed by Chazal et al. [43], which takes place in three steps, corrected drift line, QRS detection and correction of the QRS complex. To remove baseline drift, the filter to be used is mobile medium, a variation to the moving average filter that replace a value for average values close, in a size range 2n +1. The greater the range, better will be the filter, but has drawbacks with the Fourier transform, for this reason is used the median filter which replaces a mobile median value for nearby values in an interval of 2n + 1, and is effective to clear the unusual values. Since P and T waves have a duration of 0.2 s and 0.6 seconds respectively the applied filters are 200 and 600ms respectively. For detection of R peak is necessary the annotations of the database, we can detect the R peak as the maximum peak in a 300 ms window centered at time of occurrence of peak A. The resulting time series is used to obtain the RR intervals as the difference between the time instants of two consecutive R peaks. In order to correct false detections and missed heartbeats used an algorithm based on differences in temporal location of the beats, ie RR intervals. The purpose of the correction algorithm of the QRS complex is to obtain the RR interval as the distance between two consecutive R peaks. For the RR robust interval is made median of five consecutive intervals. Comparing each RR interval series with the corresponding robust series, it will be detect the existence of RR intervals suspects. Consequently, when the sum of two consecutive intervals was less than 1.2 times the corresponding robust estimate both intervals were merged. On the other hand, were considered to have no heartbeat detected (false negatives) when the RR interval was greater than 1.8 times its estimate robust. In which case the study interval was divided into subintervals whose sizes were adjusted to the corresponding robust estimate of the RR series. Next, was updated the series of the R peaks from the corrected series of RR intervals. R peaks corresponding to new discoveries were found by finding the maximum amplitudes within a 100 ms window centered at the instants of occurrence of new peaks R found. Finally, the time series of RR intervals was recalculated updated considering these amendments. B. Extraction of respiratory signals derived from electrocardiogram Once the signal has been preprocessed, our next objective is to extract as many features that allow us to obtain information and respiratory signals derived, EDR (ECG Derived

DESIGN AND IMPLEMENTATION OF DETECTION SAOS ALGORITHM To design the algorithm that allows us to detect the SAOS is first carried out a study of QRS and the duration values of its component waves in order to extract the greatest number of features that provides the ECG signal.

DESIGN AND IMPLEMENTATION OF A DETECTION ALGORITHM FOR SLEEPING APNEA BASED IN RESPIRATORY SIGNALS DERIVED FROM THE ELECTROCARDIOGRAM Respiratory), to determine which of these offers the best features to make an apnea detection algorithm.The work will be based on three important derived signals; the first is obtained based on the area of the R wave, the second in the variability of heart rate or frequency (RR interval) and the third peak amplitude A. R wave area which was calculated as the sum of absolute values of the R wave locked in a fixed window of 100 meters centered on the position of each peak and was selected because the R wave is affected by an effect modulation which produces breathing. Heart rate variability was obtained as the RR interval series and was chosen because patients with SAOS in heart rate is strongly influenced by the respiratory system in a process called respiratory sinus arrhythmia, resulting in a sequence of bradycardia - tachycardia [5], [13]. R peak amplitude, which similarly to the area R is modulated by the respiration [7]. Figure 1 shows these three characteristics of ECG signals give rise to EDR. FREQUENCY STUDY The basic idea in the study of frequency is to quantify the intervals of frequency sinusoidal in the various signals that move. Analyzed, these were made by the detection algorithm used sleep of apnea the respiratory signal of heart rate variability. Spectral analysis of signals related to heart rate variability shows oscillations that are related to the sympathetic and vagal activity. The spectral components ranging from 0.003 to 0.5 Hz, where the range between 0.003 and 0.04 Hz (very low frequency component, VLF) represents the regulatory mechanisms in the long run, the range between 0.04 and 0.15 Hz (low frequency component , LF) represents the sympathetic and parasympathetic modulation, although an increase in potency is usually associated with increased sympathetic. The range of 0.15 to 0.5 Hz (high frequency, HF) corresponds to the parasympathetic modulation, and is synchronized with the respiratory rate. Finally, the ratio between low and high frequency (LF / HF) is an index representing simpato-vagal balance. These ranges presented will be useful for respiratory rates at all times. RR sequence was considered as a signal that reflects the activity of the autonomic nervous system, it should be noted that the sampling of said activity is not uniform, the frequency is measured in cycles per second but in cycles per beat.
Ans C Ans A Ans N Amplitude R Correlation 0,52 0,45 0,45 Interval RR correlation 0,53 0,6 0,61 Amplitude S correlation 0,54 0,58 0,55

a respiratory rate of 0. 33 Hz.

Figure 2. Blocks of obtaining EDR

Figure 1. Features extracted from the ECG for the calculation of the signals

Once extracted from the signals derived from the ECG, and in order to obtain the same sampling frequency as the rest of signals the database and thus can perform comparative studies, interpolation is performed and a subsequent low-pass filter which removes frequency components in a range not consistent with the respiratory frequency range (0-5 Hz).

Table. 1 Data derived respiratory signal correlation and plethysmographic signals

Spline Cubic interpolation was performed, and requires a lowfrequency filtering; the filter used is of order Butterworth type 3. We can find many frequency bands to perform this filtering; however, this project has determined that the VLF band (frequencies below 0.04 Hz) corresponds to the characteristics necessary because as the subjects of our database are adults, the respiratory rate is usually 10 to 20 breaths/minute at rest. Thus, a rate corresponding to 20 breaths/minute equivalent to SAOS DETECTION ALGORITHM It was found that heart rate variability (RR interval) is the respiratory signal with better characteristics for use in implementing the algorithm for detecting obstructive sleep apnea as described in the design, the study of the EDR derived

DESIGN AND IMPLEMENTATION OF A DETECTION ALGORITHM FOR SLEEPING APNEA BASED IN RESPIRATORY SIGNALS DERIVED FROM THE ELECTROCARDIOGRAM from electrocardiogram. RR signal is used as a signal to be analyzed, as well as, one chooses to use a non-uniform sampling (non-interpolated signal) to have a heartbeat cycle detection and quantified bypower. We detect obstructive sleep apnea to get through the section of the spectralsignal analyzed in the range between 0.01 and 0.04 Hz and see if it is greater than a certain limit. Analysis is performed using the Welchs periodogram method. This method allows for variations in the windowing of the signal, as well as, this feature allows changes in the truncation of the signal using time windows at the same time also used for calculating the Fourier spectral density and compared results. Power is calculated over the entire length of signal, called TPWR (Total power spectrumsignal), and the relative potency is obtained in the band between 0.01 and 0.04 Hz, called DPWR (differential power signal Espectrum), and defined as: In Figure 4. Observed spectral density of a stretch of the electrocardiogram signal at the location of the apnea, thanks to the power spectral density and the limit value (Threshold) used.

Figure 4. SAOS Detection using the spectral density and its location on the Threshold

In order to compare the performance of the apnea detection method proposed, we calculated the following statistical parameters: Specificity (Sp), sensitivity (Se), precision (Pr) [15] In the figure 3 shows the frequency response to an apnea stretch RR interval.

Where VP and VN are the number of True Positive and Negative decisions, respectively, while FP and FN are the quantity of False Positives and Negatives decisions. These values were obtained by comparing the decisions of 'apnea' or 'No Apnea' made with SAOS detection algorithm As described in the Materials section, the algorithm is performed using 8 polysomnographic recordings with annotations of presence or absence of apnea, applying the methods described above. If the patient presents 10% of apneas in the signal, is considered a patient with apnea and if the result is less than 10% the patient is considered healthy. In Table 2. Are the results of the eight patients tested.

Figure. 3 Frequency response of a section of the RR interval with apnea

RESULTS In the algorithm testing phase, was used the signals of the records that contained annotations of apnea, to be compared by calculation of percentage of apnea that is offered in the result. Is performed a calculation from the function 'fft' (Fourier Transform) in different windowing. It performs the same calculation but from the function 'pwelch' without overlap. Windowing is applied in beats, in this case 300 beats. To validate the algorithm is applied to the logs of the 35 signals that have not previously been analyzed

Table 2. Evaluation results in 8 test records

DESIGN AND IMPLEMENTATION OF A DETECTION ALGORITHM FOR SLEEPING APNEA BASED IN RESPIRATORY SIGNALS DERIVED FROM THE ELECTROCARDIOGRAM It was determined that the implementation of the algorithm is better from the RR interval without interpolation because it makes detection by pulse cycles and no cycles per minute because RR sequence is considered as a signal that reflects the activity of the autonomic nervous system, and should be noted that the sampling of said activity is not uniform. This is due to Heartbeat domain instead of the frequency domain. That is, the frequency is not measured in cycles per second but is measured in cycles per beat.

For the real validation of the algorithm uses 35 registers of population that does not contain annotations, but you know the percentage of apnea in the signal. Obtaining: Sensitivity = 96%; Specificity = 83% Accuracy = 91%. The results are shown in Table 3.

DISCUSSION This algorithm sleep apnea detection based on heart rate variability and the spectral density calculation does well in the test of 8 polysomnographic recordings. Precision results obtained in the 35 recordings for validation of the algorithm, can be recognized as a good determination for a medical diagnosis of presence or absence of obstructive sleep apnea. However, in some cases, an overestimation of the cases of sleep apnea may occur. On the other hand the presence of sleep apnea cant be detected by the algorithm due to a basic limitation as the requirement of existing regional changes in case of sleep apnea. These changes result in fluctuations heart rhythm and consequently the variation of the cardiac cycle. Changes in autonomic functions are clearly diminished in patients suffering from diseases such as Parkinson's Syndrome, Diabetes, or in patients after heart transplantation, these characteristics also seen in patients using medication such as beta blockers that react in disorders sleep breathing. It is considered that the sophistication of this algorithm can be used in patients with comorbidities in combination with apnea. CONCLUSION Have been exposed the techniques and general procedures used for processing and analyzing recorded signals. Were studied the elements used for evaluating diagnostic tests. The origins in its definition and medical foundations of respiratory dysfunction known as syndrome of obstructive sleeping apnea have been treated. After the temporal analysis of the respiratory signals derived of electrocardiogram (EDR), could determined that the variability of heart rate or RR interval is the EDR that provides better results with polysomnography studies or breaths types. Therefore the series of RR intervals was chosen to be used in the detection algorithm of obstructive sleeping apnea, because in patients with SAOS heart rate is strongly influenced by the respiratory system in a process called Respiratory Sinus Arrhythmia, resulting in a sequence of bradycardia - tachycardia.

The obstructive sleeping apnea was detected by obtaining the spectral power of the analyzed signal segment in the range between 0.01 and 0.04 Hz and determining if it is greater than a certain limit. Having analyzed the spectral power are concludes that this is highly variable to changes in posture produced by the patient during the process of daydreaming. To solve this problem, power is also calculated over the entire length of signal, and the relative potency was obtained in the band between 0.01 and 0.04 Hz The evaluation results for validating the algorithm are high in all three measurement parameters such as sensitivity = 96%, specificity = 83%, and accuracy = 91%. These parameters give a good performance result of the implementation of the algorithm. It can be concluded that with respect to the detection method of SAOS by spectral analysis of the signal of heart rate variability, the procedure is effective in detecting the condition of the disorder, but appears ineffective during graduating the severity of the disease. A statistically more significant, beyond the scope of this work should be done to corroborate these results. It is concluded that diagnostic accuracy can be recognized as good determination for a clinical decision of presence or absence of sleep disordered breathing (apnea) clinically relevant. However, in some cases, false positives can occur due to very low frequency in which we recognize apnea, on the other hand the presence of sleep apnea cannt be detected by the algorithm due to a basic limitation of the nonrecognition cone autonomic changes in existing case of sleep apnea. These changes result in fluctuations in heart rate and consequently the variation of the cardiac cycle. The variations of the cardiac cycle (RR interval) are diminished or almost disappear in patients with autonomic dysfunction of central nervous system. Some patients on medication to control heart rate may also have loss of autonomic changes of ECG and determination of RR intervals is complicated, making the patient a false negative, but as the sensitivity indicates, the algorithm determines if the patient is really sick by 96%. It is concluded that the technique described can be applied to the classification of states and the determination of respiratory events of apnea, although further study as a representative of

DESIGN AND IMPLEMENTATION OF A DETECTION ALGORITHM FOR SLEEPING APNEA BASED IN RESPIRATORY SIGNALS DERIVED FROM THE ELECTROCARDIOGRAM subjects of different physiological characteristics is necessary in order to further evaluate the negative dependence of the effectiveness of the method with a variable morphological character as in the present case the patient's X15. The OSA detection algorithm implemented in this thesis provides a simple alternative to current methods of diagnosis such as polysomnography, allowing its application home by using a noninvasive diagnostic test such as the electrocardiogram, thereby reducing costs and allowing comfort patient, in order to provide a better quality of sleep to be evaluated.

x14 x15 x16 x17 x18 x19 x20 x21 x22 x23 x24 x25 x26 x27 x28 x29 x30 x31 x32 x33 x34 x35

88,21 38,64 13,59 0,25 0,55 82,92 52,10 23,74 0,83 22,33 0,23 57,59 66,15 97,99 87,24 0,00 61,22 92,61 78,97 1,06 0,84 0,00

13,81 6,88 55,88 1,68 2,95 91,80 54,88 64,51 0,35 43,01 4,23 16,28 42,50 92,41 65,38 0,00 31,18 88,96 66,67 6,91 7,76 0,35

Si Si Si No No Si Si Si No Si No Si Si Si Si No Si Si Si No No No

Si No Si No No Si Si Si No Si No Si Si Si Si No Si Si Si No No No

REFERENCES [1] [2] [3] [4] [5]


[6] Guilleminault C, Partinen M. Obstructive sleep apnea syndrome.Clinical research and treatment. New York: Raven Press, 1990. Young T, Palta M, Dempsey J, Skatrud J, Weber S, Badr S. The occurrence of sleep disoEDRred breathing among middle aged

adults.N Engl J Med 1993;328:1230-1235.


Zamarrn C, lvarez JM, Otero Y et al. Epidemiology of sleep apnea syndrome in people from 20 to 70 years of age. Eur Respir J 1995;8(Suppl 19):436. Casas Rojo JM, Fernndez Snchez-Alarcos JM, Alvarez-Sala Walther JL. Alteraciones de la ventilacin alveolar. Sndrome de apnea del sueo. Editorial Mdica Panamericana, 1994;607-614. Hoffstein V, Szalai JP. Predictive value of clinical features in diagnosing obstructive sleep apnea. Sleep1993; 16:118-122. S.-B. Park, Y-S. Noh, S.-J. Park, H.-R. Yoon, An improved algorithm for respiration signal extraction from electrocardiogram measured by conductive textile electrodes using instantaneous frequency estimation, Med. Bio. Eng. Comput, 2008, 46: pp. 147-158. P de Chazal, T. Penzel, C. Heneghan, Automated dete obstructive sleep apnoea at different time scales us electrocardiogram, Physiol. Meas., 2004, 25: pp. 967-983. P. Vrady, T. Micsik, S. Benedek, Z. Beny, A novel method for the detection of apnea and hipopnea events in respiration signals IEEE Trans. on Biomed. Eng., 2002, 49: pp. 936-942. J Y Tian, J Q Liu Apnea detection based on time delay neural network, Proc. 27th Annual. Conf. IEEE EMBS , Shangai, China,. 2005, pp.25712574.
% Apnea real %Apnea Algoritmo Apnea real Deteccin Apnea

Table 3. Results of validation of the algorithm in database records apnea-ecg.

[7] [8]

[9]

Grabacin

x01 x02 x03 x04 x05 x06 x07 x08 x09 x10 x11 x12 x13

71,70 44,25 2,58 0,00 63,61 0,00 47,30 62,84 32,87 18,84 3,07 10,80 57,44

26,94 54,89 12,54 0,00 84,24 10,40 53,02 75,07 44,69 18,30 1,03 40,31 27,90

Si Si No No Si No Si Si Si Si No Si Si

Si Si Si No Si Si Si Si Si Si No Si Si

También podría gustarte