scieee AI-readable full text Open interactive document viewer

The heart as an adaptive oscillator

Serra, Álvaro,Montmany, Martí,Sainz, Víctor

Full text

The heart as an adaptive oscillator ´ Alvaro Serra, Mart´ı Montmany, and V´ıctor Sainz (Dated: June 1, 2018) Heart Rate determination through ECG processing, study of its variability to detect activity on the Autonomous Nervous System and evaluate stress. Acknowledgment: We would like to thank the ISI group for their hospitality and specially professor Jaime Oscar Casas for his mentorship, enthusiasm and proficiency. I. INTRODUCTION The main objective of our project is to be capable to perform stress measures in humans using electrocardiogram signal (ECG). To do that, we treated the heart as a Chronotaxic System oscillator. This model sustains that the heart can be treated as an oscillators which have time-varying frequencies that can be perturbed by noise but remain stable [1]. Our heart has been proved to adapt its Heart Rate (HR) depending on the necessity of the body (it will increase for example when you start doing exercise). The parameter that quantifies those changes on the HR is the Heart Rate Variability (HRV) which is the parameter we have used on our work to detect physical and mental stress situations. II. FUNDAMENTALS The HRV has been widely studied and used for countless different proposes. For example there is a study that tries to monitor emotional state from physiological signals acquired remotely using a simple camera detecting the HRV [2]. Or other works in the medical field such as monitoring mental health conditions such as bipolar disorder and borderline personality disorder [3], detecting the severity of obstructive sleep apnea (OSA) condition [4]. The part of our body in charge of the regulation of the HR is the autonomic nervous system, divided anatomically into the sympathetic and parasympathetic (or vagal) systems. The vagal system regulates responses related with the maintenance and conservation of the body function with actions such as the slowing of the heart rate. The sympathetic system is more related with stress situations response. Therefore, the HR is modulated by this two systems that act in the opposite way. It has been proved that it is possible to detect the activity of both systems studying the HRV in the frequency domain, providing a non invasive tool for stress measurements. III. TESTS The tests were carried out in the laboratories of the Instrumentation, sensors and interfaces research group (isi.upc.edu) in Castelldefels campus. We were provided a machine, developed by the ISI Group, capable of performing 4 diferent types of acquisition and processing of noninvasive cardiovascular signals that were limb-to-limb impedance plethysmogram (IPG), ballistocardiogram (BCG), electrocardiogram (ECG) and tonometry in carotid artery. We opted for using only the ECG signal because it was the best one in order to measure the HR, which was the magnitude we wanted to study. The device used to measure ECG was an horizontal bar with two electrodes that were supposed to be gripped with the hands. We performed different tests in order to alter the stress level of the subject, therefore affecting the HR and obtaining different data. Subjects of these experiments are tagged AS-subject1, MM-subject2 and VS-subject3. These tests involved rest, physical or mental stimulation: •Relax Test: The subject lies on a table quietly for 3 minutes at rest. •Physical Effort Test: In this test the subject warms up on a stationary bicycle and when he is already excited his ECG signal is measured during 2 minutes, in which intense physical activity is performed on the bike. •Calmdown Test: Data is recorded for two minutes after the subject stops doing physical activity on the bike. The purpose of these test is to measure how the body comes back from stress to normality •Stroop Test: The participant sits on a chair and reads a list of words for colours on the screen of a computer, but the words are printed in a colour different to the word itself. Then, the participant should name the colours that the words are printed in. So, when the word orange” is printed in green, the participant should say green and move on to the next word. The test begins with 2 minutes of rest, then 6 of the colour challenge and 2 last minutes of rest, for a total recording time of 10 minutes. •Math Test: The participant has to make a series of arithmetic calculations in front of the computer including sums and subtractions of 3 digit numbers. 150 seconds of rest, then 120 seconds of arithmetic operations, 120 seconds of rest, 120 seconds of arithmetic and finally 90 seconds of rest. Total recording time is 10 minutes, as with the Stroop Test. 2 In the Stroop and Math tests a computer was used. The codes in python of these tests were obtained from Ricard Cuervo’s TFG [5] and modified to meet our requirements. IV. DATA TREATMENT As we have explained in the previous sections, we aim to deduce whether a person is in a stressful situation or not solely by measuring and analyzing his Electrocardiogram signals (ECG). However, we cannot do so by looking directly into the signal itself for there are lots of non-controllable artifacts that might arise much more dependent on the person being measured and not necessarily on whether he is stressed or not. On the other hand, the changes of oscillating period in the heart are considered to be a more objective indicator of being in stress than the raw ECG signal. These variations on the signal period are registered in the tachogram of the ECG signal. Therefore, given a raw ECG signal, the first step is to obtain the latter by applying the Pan Tompkins Algorithm. Then, we perform Time-Frequency Analysis on the Tachogram signal obtained in order to check for stress indicators in the ECG signal. A. The Pan Tompkins Algorithm The Pan Tompkins Algorithm is the procedure we follow in order to extract the tachogram from the raw ECG signal by checking the variation of time between consecutive periodic impulses. The results obtained from such algorithm will serve as basis in order to detect whether the person whose signal was recorded was suffering from stress or not. The Pan Tompkins Algorithm is composed by the following parts: •Filtering of the signal: First of all, we apply a third order Butterworth bandpass filter to the raw ECG signal. Usually the bandwith goes from 0.5 Hz to 12 Hz. However, we may adapt the lower bound up to 5 Hz in order to deal with noisier acquired data. •Derivation: A derivative operator is applied to the resulting signal in order to increase the high frequency components of the QRS complex and lower the low frequency components of the PT waves. The operator applied is: y(n) = 1 8(2x(n) + x(n− 1) −x(n−3) −2x(n−4)) [5] •Squaring: Squaring the signal makes it all positive and increases relative difference between big and small values. •Smoothing: The signal is smoothed by performing its mean along a sliding window. The purpose of this step is to deal and lower the multiplicity of peaks during a single QRS complex. The size of the sliding window so as to avoid confusion between the QRS complex and the T wave. However, when the T wave is too high to avoid confusion between both peaks, we might merge both signals so as to at least get just one of the two, even though this results in a decrease of accuracy in time. •Thresholding: In order to start the search for local maxima, a threshold is set and those points from the signal not surpassing it are filtered out. In addition, those data points presenting a negative slope are filtered out as well as they usually present a greater delay with respect to the QRS complex. •Find local maxima: We find the local maxima corresponding to QRS peaks in both the filtered and raw signals. This allows us to double check our local maxima candidates and filter out those that are susceptible to be false positives. •Inter-beat (RR) interval: We compute the RR interval by checking the time distance from one QRS peak to the next. •Check for false positives or negatives: Finally, we check for false positives or negatives throughout the QRS peaks candidates. It is assumed that every QRS peak represents a single heart beat and, therefore, our resulting sequence of QRS peaks is subject to biological limitations. For example, detected beats at a distance lower than 0.2 seconds are biologically impossible (HR of 300 beats per minute) and just one of these two should be selected as a correction measure as one of them is certainly a false positive [6]. Another example would be changes of more than 30-40 in the RR intervals which are biologically impossible too. This is likely to be the consequence of not detecting a QRS peak (false negative), in which case we interpolate the position in time of the missing one in order to correct the misdetection. It is by applying the previous steps that we are able to obtain the tachogram signal. Ahead, we show an example of the ECG signal where the QRS peaks have been identified and its respective tachogram. In 1 the QRS complex peaks of a small interval are shown, on 2 a 120 second ECG signal is depicted with all its peaks and on 3 the corresponding tachogram of that previous signal. This signal was obtained conducting the Calmdown Test on AS-subject1. B. Time-Frequency Analysis Before going on with this section, we must remark that all transformations into the frequency domain of the aforementioned signals have been performed using the continuous wavelet transform (CWT), not the Fourier 3 FIG. 1. A few peaks R peaks of QRS complex detected on a ECG signal. FIG. 2. Complete ECG signal with QRS complex peaks. FIG. 3. Corresponding tachogram of the signal. transform. The problem with the Fourier transform arises from the fact that it uses a single analysis window. This results in a loss of resolution at lower than nominal frequencies for the window size and makes impossible to obtain information about the Heart Rate Variation spectrum (the signal measured in the tachogram) over time at higher frequencies than the ones the window has been designed for. In order to tackle this problem, we use the CWT as it allows to obtain a similar transform but using a size adapting window. As we have hinted previously, the interesting information provided by the tachogram signal is enclosed in the frequency domain. In order to extract such information, we extract the power spectral density (PSD) of three main frequency ranges: •Very low frequency range (VLF): All frequencies below 0.04 Hz. •Low frequency range (LF): Frequencies ranging from 0.04 Hz to 0.15 Hz. •High frequency range (HF): Frequencies ranging from 0.15 Hz to 0.4 Hz. Apart from that, the total power (TP) is defined as the power in the frequency band going from 0 Hz up to 1 Hz. This latter measurement is mostly considered in order to normalize the signal by the PSD contained in the bandwidth: 0.04 Hz - 1 Hz. When interpreting the obtained normalized PSD signals for LF and HF, we usually try to relate the obtained results to vagal and sympathetic activity of the Autonomous Nervous System (ANS). While the HF PSD is mostly related to vagal activity that does not mean LF is the same to the sympathetic. Actually, LF is related to the activity of both systems. This is why, in order to extract the most information out of the computed results, we will extract both the ratio LF/HF, providing symptovagal balance information, and HF, related to vagal activity information. Depending on the behaviour of the frequency bands, when a shift toward relative vagal enhancement is expected, we should encounter one of the following possible scenarios [7]: •LF decreases and HF is unchanged: reflects a change in sympathetic activity with no decrease in vagal activity. •LF is unchanged and HF increases: indicates a decrease in sympathetic activity and an increase in vagal activity. •Both LF and HF increase but their ratio does not: reflects an increase in vagal activity but no increase in sympathetic activity. •Both LF and HF and their ratio decrease: reduced vagal and sympathetic activities with a shift in balance towards relative vagal enhancement. In exchange, a shift toward relative sympathetic enhancement should manifest in one of the following ways: •HF decreases, LF does not: vagal activity decreases and sympathetic activity increases. •LF increases and HF remains unchanged: reflects an increase in sympathetic activity and no changes in vagal activity. 4 FIG. 4. Tachogram of MM-subject2. FIG. 5. Power of frequency bands of MM-subject2. V. RESULTS We performed the tests aforementioned. Ahead, the tachogram, PSD distribution and both HF and LF normalized that result from the Math Test on patient MMsubject2 are shown on 4, 5 and 6. A low pass filter on 6 has been applied because the changes on the trend of power of each frequency band (Low and High) are very slow but when plotted they appear to oscillate very fast because of the numerical calculation used to calculate them. On 6 it is clear how the weights of the LF and HF change evolve between a relaxing and a stressing phase and how they take time to adapt when the situation switches from stress to relaxation and vice-versa. On 7 the power on the previously mentioned AS-subject1 Calmdown Test is depicted. Whereas the average of HR reaches a uniform value around second 70 (see 3), power distribution has not change from what it was before, thus the sympathetic remains active and the person is still stressed. FIG. 6. Normalized power of High and Low bands on MMsubject2. FIG. 7. Normalized power of High and Low bands on AScalmdown. VI. CONCLUSIONS This work shows how the heart acts as an oscillator with a frequency HR whose variability can be used to extract information about the activity of the ANS and prediction of stress, outperforming other criteria such as HR average alone. Results of AS-subject1 and VS-subject3 on the Math Test are not included on this paper due to lack of space. They were similar to MM-subject2 but differed on the amplitude of the curves and their evolution on time, suggesting that each individual reacts differently for the same stressor. 5 VII. REFERENCES [1] P. T. Clemson, Y. F. Suprunenko, T. Stankovski, and A. Stefanovska, The Heart as a Chronotaxic System - Why its Rate Variability is both Complex and Simple: Theory and Analysis Methods (2014). [2] Y. Benezeth, P. Li, R. Macwan, K. Nakamura, R. Gomez, and F. Yang, Remote heart rate variability for emotional state monitoring (2018). [3] O. C. F. Andreotti, K. E. A. Saunders, A. C. Bilderbeck, and . Guy M Goodwin Maarten De Vos1, Linking Changes in Heart Rate Variability to Mood Changes in Daily Life (2017). [4] M. J. Rahman, R. Mahajan, and B. I. Morshed, Severity Classification of Obstructive Sleep Apnea Using Only Heart Rate Variability Mesures With Ensamble Classifier (2018). [5] R. C. Salin´e, Heart rate variability acquisition from ambulatory measurements of IPG (ETSETB, UPC, Barcelona, 2017). [6] G. D. Clifford, ECG Statistics, Noise, Artifacts, and Missing Data (2006). [7] E. Toledo, O. Gurevitz, H. Hod, M. Eldar, and S. Akselrod, Computers in Cardiology (2002) pp. 657–660.