Research Internship Report, DA-IICT,2004

A Study on deriving Respiratory Signals from ECG

A Report Submitted to the faculty of DhirubhaiAmbani Institute of Information and Communication Technology, In partial fulfillment of the requirements for The Summer Research Internship, June-2004

By: Shailaja Sajja (200101029), D.V.S.Pallavi (200101032), Vasudha Chaurey (200101069), Chetan Gangwar (200101170)

--------------------------------------------------------------- 1 ---------------------------------------------------------------

Research Internship Report, DA-IICT,2004

Contents: Title...................................................................................................................Page No 1) 2) 3) 4)

5) 6)

7)

8) 9)

10)

Acknowledgements....................................................................................…..3 A note on the process..................................................................................….4 Electrical activity of heart.........................................................................…...5 Basics of ECG...............................................................................................…..6 A. Introduction...............................................................................…..6 B. Parts of ECG...............................................................................….6 C. How is the ECG recorded?.......................................................….7 D. Significance of the various leads..........................................…….8 E. Importance of 12 lead systems..............................................….....9 Physical relation between heart rate and respiration..................................10 EDR Method 1: AMEA.....................................................................................12 A. Using 2 lead......................................................................................13 B. Using 3 lead......................................................................................14 C. Using 8 lead......................................................................................14 D. Using 12 lead....................................................................................14 E. Methodology Implemented............................................................15 F. Noise Removal..................................................................................16 EDR Method 2: Wavelet Transform............................................................….18 A. DWT Fundamentals……………………………………………….18 B. Methodology…………………………………………………….…19 C. Methods Used………………………………………………………20 EDR Method 3: Adaptive Filtering...................................................................22 Appendices...........................................................................................................25 A. Algorithm for EDR from 8 lead ECG.............................................25 B. Program1……………………………………………………………27 C. Program2……………………………………………………………30 References.............................................................................................................32

--------------------------------------------------------------- 2 ---------------------------------------------------------------

Research Internship Report, DA-IICT,2004

Acknowledgements

We express our sincere gratitude to our faculty advisor, Prof. Vijay Kumar Chakka, for his guidance and moral support throughout this research. Without his help this thesis would have never been completed. Special thanks are extended to the Apollo Hospital, Ahmedabad for helping us have the practical knowledge at various stages of the project. We also thank DAIICT for providing the technical facilities for this study

--------------------------------------------------------------- 3 ---------------------------------------------------------------

Research Internship Report, DA-IICT,2004

A Note On The Process The group basically started to look into areas where Digital Signal Processing can be applied to biomedical signals. After 1st week of liberal search into this area, the group with the consent of the Instructor, started narrowing the focus to the areas mainly related to cardiac activity, respiration and their correlation. A trip to Apollo Hospitals (in 2nd week) made us aware of the real life problems and current status of Bio-medical engineering which unfortunately is quite behind the current biomedical field status. The first basic problem (in 3rd week) we tried to focus upon was to derive Respiratory Signal from the ECG signal of a given subject with reasonable reliability. The reason for which the topic was chosen was in the view of lack of methods of direct ambulatory monitoring of respiration over long hours. Besides this middle-of-the-road topic, we are also looking forward to devise solutions for improving upon the reliability of the real time instruments and techniques used for ECG and respiratory signals’ measurement. In the 4th week the group identified the basic approaches for the problem and divided the group to look deeply into various solutions to the problem. The different approaches studied used were : ECG derived Respiration (EDR) using a. Angle of Mean Cardiac Electrical Axis by multi lead ECGs b. Wavelet Transform of ECG c. Adaptive Filtering Techniques Each of the methods is implemented using Matlab. The problems faced till now were, the lack of real time data availability (all multi-lead ECG data and Respiratory data only available in hard copies) and lack of implementation of biomedical applications in hospitals. Doctors’ unawareness of any such advancements and available biomedical engineering solutions to the problems had been a major disadvantage for the progress of the research. However PhysioNet has provided with valuable data upon which the methods implemented are tried. Beyond the implementation of these headings a study on the human respiratory and cardiac functions is also done.

--------------------------------------------------------------- 4 ---------------------------------------------------------------

Research Internship Report, DA-IICT,2004

Electrical Activity Of The Heart The electrical activity and hence the heart rate are basically controlled by a natural pacemaker which is a collection of specialized electrical cells placed in the upper portion of the right atrium (RA) known as the SINUS or SINO-ATRIAL (SA) node. The electrical signals generated by the SA node travel across the walls of the heart via a specialized electrical pathway and stimulates the muscle wall of the four chambers to regularly contract (and thus empty) and relax them in a certain sequence or pattern. The upper chambers or atria are first stimulated. This is followed by a slight delay to allow the two atria to empty. Finally, the two ventricles are electrically stimulated. The stepwise movement and path of the electrical signals can be given as follows: 1. The S-A node (natural pacemaker) creates an electrical signal. 2. The electrical signal follows natural electrical pathways through both atria. The movement of electricity causes the atria to contract, which helps push blood into the ventricles. 3. The electrical signal reaches the A-V node, which sits just above the ventricles (electrical bridge). There, the signal pauses to give the ventricles time to fill with blood. The AV node thus acts as a "relay station" delaying stimulation of the ventricles long enough to allow the two atria to finish emptying. 4. The electrical signal spreads through the His-Purkinje system. The movement of electricity causes the ventricles to contract and push blood out to your lungs and body through the pulmonary artery and aorta respectively. In summary, the heart constantly generates a sequence of electrical activity with every single heartbeat. This can be recorded on paper or displayed on a monitor by attaching special electrodes to a machine that can amplify and record an EKG or ECG (electrocardiogram). The contraction of the heart in response to this electrical activity creates systole. A period of recovery follows called diastole

--------------------------------------------------------------- 5 ---------------------------------------------------------------

Research Internship Report, DA-IICT,2004

Electro-Cardiogram (ECG) A. Introduction The electric currents in the heart have been measured for more than a hundred years, but the fundamental function of the ECG, as we know the Dutch scientist Willem Einthoven today developed it in the beginning of the 20th century The ECG is electrical manifestation of the contractile activity of the heart, and can be recorded fairly easily with surface electrodes on the surface of the limbs or chest. The ECG is perhaps the most commonly known, recognized and used biomedical signal. B. The parts of ECG

Fig 1. The parts of typical ECG graph P wave – The P wave represents left and right atrial depolarization and is an initial low amplitude positive deflection preceding the QRS complex. PR interval – The PR interval is measured from the beginning of the P wave to the first part of the QRS complex. It includes time for atrial depolarization (the P wave), conduction through the AV node, and conduction through the His-Purkinje system. QRS complex – The QRS complex represents the time for ventricular depolarization. ST segment – The ST segment occurs after ventricular depolarization has ended and before repolarization has begun. It is a time of electrocardiographic silence. The initial part of the ST segment is termed the J point. --------------------------------------------------------------- 6 ---------------------------------------------------------------

Research Internship Report, DA-IICT,2004

T wave – The T wave represents the period of ventricular repolarization. Since the rate of repolarization is slower than depolarization, the T wave is broad, has a slow upstroke, and rapidly returns to the isoelectric line following its peak. Thus, the T wave is asymmetric and the amplitude is variable. QT interval – The QT interval consists of the QRS complex that represents only a brief part of the interval, and the ST segment and T wave which are of longer duration. U wave – A u wave may be seen in some leads, especially the right precordial leads V2 to V4. The exact cause of this wave is uncertain, although it has been suggested that it represents delayed repolarization of the His-Purkinje system. Alternatively, it may represent a mechanical event such as ventricular relaxation. C. How is the ECG recorded? In clinical practice, the standard 12-channel is obtained using four limb leads and chest leads in six positions. The right leg is used to place the reference electrode. The left arm, right arm, and left leg are used to get leads I, II and III. A combined reference known as Wilson’s central terminal is formed by combining the left arm, right arm, and left leg leads, and is used as reference for chest leads. The augmented limb leads known as aVR, aVL, and aVF (aV for the augmented lead, R for the right arm, L for the left arm, and F for the left foot) are obtained by using the exploring electrode on the limb indicated by the leads name, with the reference being Wilson’s central terminal. The hypothetical equilateral triangle formed by leads I, II and III are known as Einthoven’s triangle. Schematically the heart is assumed to be the center of the triangle.

Fig 2. Ethoven Triangle The Standard Leads (top) and the Augmented Leads (bottom) reflect the limb electrodes (left arm, right arm, left leg) used to record the heart' s electrical axis in the frontal plane.

--------------------------------------------------------------- 7 ---------------------------------------------------------------

Research Internship Report, DA-IICT,2004 D. Significance of the various leads The six leads measure projections of the three- dimensional (3D) cardiac electrical vector onto the axes as illustrated below

Fig 3. Projections of 3D cardiac electrical vector onto the axis The six chest leads (written asV1 – V6) are obtained from six standardized positions on the chest with Wilson’s central terminal as the reference. • The V1 and V2 leads are placed at the fourth intercostal space just to the right and left of the sternum, respectively. • V4 is recorded at the fifth intercostal space at the left mid clavicular line. • The V3 lead is placed halfway between the V2 and V4 leads. • The V5 and V6 leads are located at the same level as the V4 lead, but at the anterior axillary and the midaxillary line, respectively. • The six chest leads permit viewing the cardiac electrical vector from different orientations in a cross-sectional plane: V5 and V6 are most sensitive to left ventricular activity; V3 and V4 depict septal activity best; V1 and V2 reflect well activity in the right- half of the heart. • From applying Kirchoff’s Voltage Law we can derive some important lead interrelationships like: II = I + III (see figure 3) AVL = (I –III)/2. (see figure 3) Some of the important features of the standard clinical ECG are: • • •

A rectangular calibration pulse of 1 mV amplitude and 200 ms duration is applied to produce a pulse of 1 cm height on the paper plot. The ECG signal peak is normally about 1mV. The amplifier gain is 1000

--------------------------------------------------------------- 8 ---------------------------------------------------------------

Research Internship Report, DA-IICT,2004 • • •

Clinical ECG is usually filtered to a bandwidth is usually filtered to a bandwidth of about 0.05 – 100 Hz, with a recommended sampling rate of 500 Hz for diagnostic ECG. ECG for heart rate monitoring could use a reduced bandwidth 0.5 – 50 Hz. High resolution ECG requires a greater bandwidth of 0.05-500 Hz.

E. Importance of a 12-lead system The twelve leads in the ECG are I, II, III; aVR, aVL, aVF; V1, V2, V3, V4, V5, V6. From the inter-lead relationships given above, we find that any two of first six leads (I, II, III, aVR, aVL, aVF) includes exactly the same information as the other four. In principle, two of the limb leads (I, II, III) could reflect the frontal plane components, whereas one precordial lead could be chosen for the anterior-posterior component. The combination should be sufficient to describe completely the electric heart vector. However, in fact, the precordial leads detect also nondipolar components, which have diagnostic significance because they are located close to the frontal part of the heart. Therefore, the 12-lead ECG system has eight truly independent and four redundant leads. The main reason for recording all 12 leads is that it enhances pattern recognition. This combination of leads gives the clinician an opportunity to compare the projections of the resultant vectors in two orthogonal planes and at different angles.

--------------------------------------------------------------- 9 ---------------------------------------------------------------

Research Internship Report, DA-IICT,2004

Physical Relation Between Heart Rate And Respiration Heart rate fluctuations can be readily measured from the electrocardiogram (ECG), a graphical recording of the electrical potentials generated by cardiac muscle cells. While clinicians often refer to the healthy heartbeat as "regular sinus rhythm", healthy subjects typically display more complex patterns than those found in unhealthy ones. For example, following a heart attack, patients whose heart rates are overly regular may be at increased risk of fatal cardiac arrhythmias.

Fig 4. Electrocardiographic recording of the heartbeat. The QRS complexes represent electrical activation of the ventricles. The RR interval is the time between consecutive QRS complexes. The heart' s normal beats are initiated by impulses from pacemaker cells in the sinus node, hence the term normal sinus rhythm. The sinus node frequency is modulated primarily by input from the autonomic (involuntary) nervous system. There are two major components of this system: the sympathetic -- which increases heart rate -- and the parasympathetic (or vagal) -- which decreases the heart rate. The nonlinear interaction between these two competing components is responsible for much of the heart rate' s complex intrinsic fluctuations. Mechanical and other metabolic influences may also contribute to HRV(heart rate variability). Autonomic regulation mechanisms that affect heart rate variability include thermoregulation, respiratory sinus arrhythmia (RSA) and baroreflex regulation. These three mechanisms can be detected from RR intervals. Thermoregulation (VLF component) operates at very low frequencies below 0.04 Hz, while baroreflex regulation is the lowfrequency component (LF component), as it is located within the frequency range of 0.04 to 0.15 Hz. Finally, the frequency range between 0.15 and 0.4 Hz is known as the highfrequency component (HF-component). The effects of RSA can be found within this frequency band, depending on respiratory frequency. Table 2 summarizes the spectral estimates of the different regulation mechanisms calculated from the RR interval.

--------------------------------------------------------------- 10 ---------------------------------------------------------------

Research Internship Report, DA-IICT,2004 Table 1. Frequency ranges for different autonomic regulation mechanisms and their frequency components (ESC/NASPE Task Force 1996). Frequency range [Hz] 0.04 0.04–0.15 0.15–0.40

Frequency component VLF LF HF

Regulation mechanism Thermoregulation Baroreflex RSA

Major factor regulating heart rate variations over the short term are the effects of respiration that are mediated via the parasympathetic branch of the autonomic nervous system. Under resting conditions, the ECG of healthy individuals exhibits periodic variation in R-R intervals. This rhythmic phenomenon, known as respiratory sinus arrhythmia (RSA), fluctuates with the phase of respiration -- cardio-acceleration during inspiration, and cardio-deceleration during expiration i.e. during inspiration heart rate typically increases, while during expiration it decreases. RSA is the natural cycle of arrhythmia that occurs through the influence of breathing on the flow of sympathetic and vagus impulses to the sinoatrial node. The rhythm of the heart is primarily under the control of the vagus nerve, which inhibits heart rate and the force of contraction. When we inhale, the vagus nerve activity is impeded and heart rate begins to increase. When we exhale this pattern is reversed. The degree of fluctuation in heart rate is also controlled significantly by regular impulses from the baroreceptors (pressure sensors) in the aorta and carotid arteries. When RSA is enhanced through biofeedback, the goal is usually to reinforce the natural feedback activity of the baroreceptors through our breathing pattern.

--------------------------------------------------------------- 11 ---------------------------------------------------------------

Research Internship Report, DA-IICT,2004

ECG Derived Respiratory Signal, EDR EDR Method 1: AMEA (Angle Of Mean Cardiac Electrical Axis) As already mentioned before the ECGs recorded from the surface of the chest are affected by the motion of electrodes with respect to the heart and result in changes in the potential difference that is measured between the different points on heart through those electrodes. During inspiration, the apex of the heart is stretched towards the abdomen because of the filling of the lungs, helped by the shifting down of the diaphragm (the layer that separates lungs and abdominal cavity). During expiration, the elevation of the diaphragm, which helps the emptying of the lungs, compresses the apex of the heart toward breast. These anatomical influences of respiration result in apparent amplitude modulation in the ECG signal.

Fig5. Figure showing ECG signal and Respiratory Volume Changes Hence, respiration induces a modulation of cardiac signal’s “electrical axis”. Kian Loh mentions in his thesis [1], that the respiration changes the angle that the electrical cardiac vector makes with the reference line. Besides amplitude modulation, respiration also influences cardiac signal in the variability of occurrence of R-R peaks, which is termed as Heart Rate Variability and the process is called as Respiratory Sinus Arrhythmia (RSA). The reasons for this can be attributed to sympathetic aparasympathetic nervous system that is responsible for controlling both the signals (cardiac and respiratory). However for this particular method studied to derive respiratory signal from changes in the Angle Of Mean Cardiac Electrical Axis (AMEA) is not affected by RSA, as we will see that the method depends upon ‘how large’ QRS peaks occur and not upon ‘when’ do they occur. Further in this report, the various methods that can be used to derive respiratory signal using AMEA, though using different number of leads, are explained. Later the approach implemented, kinds of noise present is described. In the end, the algorithm /program written to calculate the respiratory signal by removing noise is described. --------------------------------------------------------------- 12 ---------------------------------------------------------------

Research Internship Report, DA-IICT,2004

Different Methods are available to achieve Respiratory Signal through Angle of Mean Cardiac Electrical Axis. ECG, as already discussed previously, uses 12 different leads which are spatially attached all over the body, that measure the signal in terms of potential difference (mV) within the two points the lead is attached to. The basic criteria to which distinguishes one method from the other is number of leads used to calculate the changes in the cardiac electrical vector. The different number of leads can be 2 [2], 3 [3], 8 [4], 12[5] that can derive respiratory signal with varying accuracies from ECG data. A recapitulation of the ECG signal and its leads is given below. The twelve leads in the ECG are I, II, III; aVR, aVL, aVF; V1, V2, V3, V4, V5, V6. In principle, two of the limb leads (I, II, III) could reflect the frontal plane components, whereas one precordial lead could be chosen for the anterior-posterior component. The combination should be sufficient to describe completely the electric heart vector. In principle, two of the limb leads (I, II, III) could reflect the frontal plane components, whereas one precordial lead could be chosen for the anterior-posterior component. The combination should be sufficient to describe completely the electric heart vector. Actually, the 12-lead ECG system has eight truly independent and four redundant leads, which are actually used for better pattern recognition. Following will be different methods explained in brief. A. Using 2 lead ECG: The approach is simple, reasonably accurate and computationally simple. It is like this 1. The areas of QRS complexes of ECG waveforms from Leads I and II is calculated over a fixed window. 2. Since the both leads are almost spatially orthogonal, the arctangent of the ratio of the areas measured in the two leads gives the angle of the mean axis with respect to one of the lead axes. 3. The values obtained are the discrete samples of EDR, which are obtained at a rate of one EDR sample per cardiac cycle. Generally, heart rate > 2* (respiration rate), an idea of respiratory signal and its frequency can be easily derived. 4. To produce a continuous signal, cubic spline interpolation is used. This is the method adopted and implemented by us, which will be described after the different methodologies explanation.

--------------------------------------------------------------- 13 ---------------------------------------------------------------

Research Internship Report, DA-IICT,2004 B. Using 3 Lead ECG: As we have learned previously that out of six leads from the limb leads and augmented leads any two can accurately determine the cardiac vector, this method forms a 3d vector out of three leads and then calculates EDR. C. Using 8 Lead ECG: The eight leads are: I, II, V1, V2, V3, V4, V5 and V6. The method is based on the hypothesis that the breath is represented by the vectorial sum of the 8d of the 8 leads. And the resultant gives the respiratory direction. The primary motive behind following the methodology is that it provides more stable and reliable output. Though this is method is more reliable but the even the 2-lead EDR is accurate to a reasonable extent and even 8-lead method is more complicated for ambulatory recordings. For more detail of the Algorithm see Appendix A D. Using 12 Lead ECG: The modus operandi of this algorithm is same as the 8 lead ECG algorithm explained above, the difference being that it can be used directly over a 12 lead ECG Holter machine. E. Methodology Implemented: We have followed 2 lead ECG approach to derive respiratory signal. The reasons for the using 2 lead ECGs approach were 1. Approach is simple, reasonably accurate and computationally simple 2. Lack of multi-lead data availability. (Not more than two lead ECG data was available on PhysioNet or other biomedical databases.) 3. Lack of proper medical background to make any changes in the approach mentioned in the papers. The algorithm uses classical sampling rate 1Khz to maintain generality with most of the ECG data. We have used lead I and II to derive respiratory signal. A sample of data can be seen in Fig 2. The algorithm detects R peaks of both the leads differently. This is done because it is not necessary that different leads have peaks at exactly same point. The algorithm follows a normalization procedure of entire data to detect R peaks (temp=ecg/max (ecg)), which firstly ignores all the data below 0.5 and then uses a moving window (of size less than an RR interval) to detect peaks.

--------------------------------------------------------------- 14 ---------------------------------------------------------------

Research Internship Report, DA-IICT,2004 Then it calculates the area of the QRS complexes over a fixed window. The window width has been assumed to be 40 milliseconds, which is the normal QRS width. Any abnormalities from this computationally convenient assumption lead to systematic but harmless error. Since the window width is fixed, area is proportional to the mean amplitude of the signal over the course of the window, and hence, to the projection of mean cardiac electrical vector on the lead axis.

Fig 6.Area plots of the 2 leads Normal area detection mentioned in the reference papers also employ computations for subtracting the baseline area, which is not required in this algorithm because it is taken care by the baseline wandering removal module, which takes a reference from the minimum of the values (module’s functionality explained later). Once location of R peaks and window width is known, QRS area can be computed. Since the ECG has discrete samples, the sum of all the samples within the QRS window gives the area (Fig7). A cubic spline interpolation is done to obtain a continuous signal.

--------------------------------------------------------------- 15 ---------------------------------------------------------------

Research Internship Report, DA-IICT,2004

Fig7.EDR after interpolation G. Noise Removal There are basically 3 types of noises that are present in the cardiac signal. 1. Baseline wandering 2. Muscle Artifacts and EMG noise 3. Power line Interference Out of these, the most harmful one that can possibly fail the algorithm to detect any RR peaks is the Baseline wandering noise. This arises due to the thoracic movement during respiration and brings about a wavy appearance in the baseline of ECG (figure 4). Reference papers and conference papers have used methods like adaptive filtering, median filter, and cubic spline interpolation to remove baseline wander. Here we have tried and explained an entirely new and effective approach to remove baseline wandering. This uses a sliding window of fairly larger size than a QRS complex width and replaces all the elements of the window by the minimum value in that sample. The signal generated is then subtracted from the original signal, which gives the baseline corrected signal. (Fig 8)

--------------------------------------------------------------- 16 ---------------------------------------------------------------

Research Internship Report, DA-IICT,2004

Fig 8. Noise removal

--------------------------------------------------------------- 17 ---------------------------------------------------------------

Research Internship Report, DA-IICT,2004

EDR Method 2:Wavelet Transforms Before getting into the fundamentals of wavelet transform we need to first understand the significance of using wavelet transform over Fourier Transform. Fourier Transform as such tells us which frequency components are present in a signal, but it does not provide information as to at what time these frequency components are present. The wavelet transform overcomes this deficiency by providing both time and frequency information simultaneously. Short time Fourier transform can also be used to determine the frequency components over a small period of time (depending on the window size), but increase the time resolution reduces the frequency resolution, because reducing the number of samples used in Fourier transform calculation reduces the number of discrete frequencies that can be represented in the frequency domain hence reduces the frequency resolution. On the other hand in wavelet transform, due to the scaling as explained below, the different frequency components are analyzed differently, for high frequency components, good time resolution is used, since signals are changing very fast and vice versa for low frequency components. A. Fundamentals of DWT: Similar to Fourier series analysis, where sinusoids are chosen as the basis function, wavelet analysis is also based on a decomposition of a signal using an orthonormal (typically, although not necessarily) family of basis functions. Unlike a sine wave, a wavelet has its energy concentrated in time. Sinusoids are useful in analyzing periodic and time-invariant phenomena, while wavelets are well suited for the analysis of transient, time-varying signals (well suited for ECG signals).

A wavelet expansion is similar in form to the well-known Fourier series expansion, but is defined by a two-parameter family of functions

Where j and k are integers and the functions are the wavelet expansion functions. As indicated earlier, they usually form an orthogonal basis. The two-parameter expansion coefficients are called the discrete wavelet transform (DWT) coefficients of and the equation given above is known as the synthesis formula (i.e., inverse transformation). The coefficients are given by

--------------------------------------------------------------- 18 ---------------------------------------------------------------

Research Internship Report, DA-IICT,2004 The wavelet basis functions are a two-parameter family of functions that are related to a function

called the generating or mother wavelet by

where k is the translation and j the dilation or compression parameter. Therefore, wavelet basis functions are obtained from a single wavelet by translation and scaling. There is, however, no single and universal mother wavelet function. The mother wavelet must simply satisfy a small set of conditions, which are admissibility and the regularity condition and is typically selected based on the signal processing problem domain. Almost all useful wavelet systems satisfy the multi-resolution condition. This means that given an approximation of a signal using translations of a mother wavelet up to some chosen scale, we can achieve a better approximation by using expansion signals with half the width and half as wide translation steps. This is conceptually similar to improving frequency resolution by doubling the number of harmonics (i.e., halving the fundamental harmonic) in a Fourier series expansion. The wavelet transform as such decomposes a signal into two subsignals – detail signal and approximation signal. Detail signal contains the upper half of the frequency components and approximation signal contains the lower half. The decomposition can be further repeated on the approximation signal in order to get the second detail and approximation signal.

B. Methodology used for deriving respiratory waveforms from ECG signals Based on the paper [6], if we continue to decompose the ECG signal till the nth level of

--------------------------------------------------------------- 19 ---------------------------------------------------------------

Research Internship Report, DA-IICT,2004 decomposition, and reconstruct the detail signal of nth decomposition, we get the respiratory signal. The value of n depends upon the sampling rate. This is because the maximum frequency that can be represented is taken approximately equal to (sampling frequency)/2. Hence accordingly we need to calculate as to the detail signal at what level of decomposition will contain the frequency range of 0.2 –0.4 Hz as the respiration signal is contained in this frequency range. Note: D.S.- detail signal containing upper half of the frequency components, A.S. – approximation signal containing lower half of the frequency components. C. Our methodology In our case the data taken is sampled at 100Hz. Hence the frequency components contained in the detail signal of 8th decomposition corresponds to the frequency range of 0.2 –0.4 Hz .The respiration periods of this derived signal can be calculated by the zero-crossing periods in the falling direction. Besides in the original paper [6], it is not mentioned as to which wavelet (from the whole family of wavelets) is most suitable. But by checking out the results for different wavelets and putting in a bit of perception the Daubechies-4 wavelet is found to be the most suitable the most suitable. Since the signal has to be expressed as the combination of the various scaled and translated versions of the original wavelet – a wavelet whose shape most closely resembles that of an ECG signal.

A typical ECG signal

--------------------------------------------------------------- 20 ---------------------------------------------------------------

Research Internship Report, DA-IICT,2004

Daubechies family of wavelets

--------------------------------------------------------------- 21 ---------------------------------------------------------------

Research Internship Report, DA-IICT,2004

EDR Method 3: Adaptive filtering approach As discussed in the previous sections, an ECG is the graphical representation of the electrical activity of the heart measured using the leads placed at several points on the chest and the limbs. This signal, like other biomedical signals, is not free from the artifacts and noise. There can be several factors responsible for adding this noise - like noise due to power supply, noise added by measuring device and moreover the noise due to other electrical signals generated in the body on account of body movement and other functions of the body generating electrical pulses. Also since the amplitude or the magnitude of the biological signals is quite small, it becomes furthermore difficult to directly measure some single function of the body without effects from any other factor. This “unwanted” noise, in this case may prove to be favorable. The reason for this can be elaborated upon as follows: It has been observed that during the measurement of ECG, respiration is an important factor introducing noise in the signal. This is due to the change in the volume of the thoracic cavity with the respiratory cycle of inspiration and expiration. This change in volume is reflected in the chest movement leading to the movement of leads. This effect reflects itself in the ECG in the form of periodically changing amplitude of the R-wave. Apart from this relation between ECG and respiration, which comes into play just externally, the two processes are more closely related at the physiological level where respiration actually affects the heart rate. This physiological relation can be understood in terms of Heart Rate Variability (HRV) and Respiratory Sinus Arrhythmia (RSA). Heart rate, although is basically controlled by the Sino Atrial (SA) node, which generates starting pulses for the complete pumping action of the heart, is also affected by the autonomous nervous system’s sympathetic and parasympathetic activities and hence indirectly by the activities which generate stimulating signals for the autonomous nervous system. There are three basic regulatory activities in the body affecting the cardiovascular activity. These are the thermoregulation, baroreflex (the reflex action generated as a response to arterial blood pressure) and the respiration. Looking more closely at the respiration aspect of it one finds that when a people inhale, their heart rate increases (sympathetic activity) and when they exhale their heart rate decreases (parasympathetic activity). The effect of all the three activities can be studied independently on account of the fact that the three give rise to heart rate variability in different frequency ranges, respiration being in the highest frequency range of approximately 0.2-0.4 Hz (exact frequency depends on the respiration frequency). This effect of respiration on the heart rate is termed as RSA. Thus, one can conclude from the above discussion that the respiratory signal exists in the ECG in two forms namely the R-wave (amplitude) and R-R interval. Now in order to extract this signal completely from the ECG one can use the “adaptive filtering”. Adaptive filters in very simple terms are the models of the systems, transfer functions of which are continuously monitored and adapted to give the optimum model in real time scenarios where it is difficult to presume the complete statistical characteristics of the signal. The basic structure of an adaptive filter can be given as follows:

--------------------------------------------------------------- 22 ---------------------------------------------------------------

Research Internship Report, DA-IICT,2004

The system has six main components to be defined: • xk- Input signal • dk- Desired signal • yk- Output signal • ek- Error signal • FILTER - Filtering process • Adaptive process - Some kind of algorithm The purpose of the general adaptive system is to filter the input signal xk so that it resembles (in some sense) the desired signal input dk. The system is fed with the input signal xk to produce the output signal yk. The error signal ek is calculated as the difference between the desired output and the system output. This error signal forms the basis of the adaptive algorithm as any algorithm in some form or the other tries to minimize this error signal. The error signal is the parameter of measuring how well the system is adapted as per the requirement. In a stationary environment with time such systems converge to the optimum solution and in case of nonstationary environment the algorithm offers tracking capability [Simon Haykin]. The applications of the adaptive filter theory can be broadly classified in four categories namely • Identification of an unknown system • Developing a system to undo the effect of a given system of unknown system response. • Prediction of a random signal. • Noise cancellation. Although there is no unique solution to the adaptive filtering problem, there are two basic approaches, which form the basis of all the different adaptive filtering algorithms. The first is the stochastic gradient approach wherein one tries and minimizes the mean square error. The mean square error is found to form a paraboloid surface with a well defined minima (in stationary environment). Thus the basic aim is to achieve this minimum based on the method of steepest descent. The filter coefficients are adapted with the gradient vector. One of the most widely used algorithms of this approach is known as Least Mean Square (LMS) algorithm. The second approach is the approach of least square estimation. In this case the cost function is the sum of weighted error squares instead of mean square error. The filter coefficients are adapted so as to minimize the cost function. This approach can be applied in two possible ways namely•

Recursive estimation where the system is adapted at every sample

--------------------------------------------------------------- 23 ---------------------------------------------------------------

Research Internship Report, DA-IICT,2004 Block estimation where the system is adapted over a fixed block length. Of the two the recursive algorithm is more frequently used and one of the most common of these algorithms is Recursive Least Square (RLS) algorithm. Now looking at the problem at hand i.e. to derive the respiratory signal from the given ECG and the adaptive filtering, one can device some way of solving the problem using this approach. First of all we find that we have two signals derived from the ECG which are supposed to contain the information regarding the respiratory signal – • The RR interval signal. • The R wave or the signal depicting the R wave amplitude of the ECG. Thus the problem at the hand is that of the prediction of an unknown signal. One can solve it by using one of the available signals as the input signal and the other as the desired output. The system is adapted so as to generate the best possible estimate of the one using the other. In the process the system enhances the common feature between the two and suppresses the uncommon or the uncorrelated parts of the two signals. The basic block diagram of the system can be given as •

This solution although seems to be very straight but in fact it is based on certain assumptions, which can be given as follows: • The system environment is assumed to be stationary which is the basic requirement for the adaptive filter solution to converge to the optimum solution. • The noises in the two signals namely the RR interval and the R-wave are assumed to be totally uncorrelated so as to ensure that the only correlated feature between the two signals is the respiratory signal and only it is enhanced in the process of adaptation. • The effect of respiratory signal on the two given signals is assumed to be linear so that it can be modeled using a linear filter.

--------------------------------------------------------------- 24 ---------------------------------------------------------------

Research Internship Report, DA-IICT,2004

Appendix A

Algorithm. It requires the basic understanding of vectors. First we need to go through the learning phase: 1) The first 16 beats are elaborated. 2) Area of each of the QRS complex is measured over a fixed window. 3) The ECG-analysis program determines the width. (This is given by the acquisition board, the supplicant of the ECG) 4) The QRS area is proportional to the QRS amplitude. 5) The baseline is set as the average of the 8 samples that precede the QRS, and it is subtracted from the QRS to deal with the problem of baseline wandering. 6) The sample rate is 250 samples/sec. 7) A vector of 8 elements, 1 element for each lead, represents every beat. 8) The center of gravity for each lead or the mean is set from the 16 beats. Mathematically, G: center of gravity, G = (Gx1, Gx2, Gx3, Gx4, Gx5, Gx6, Gx7, Gx8) Where Gxi = (Xi1 + Xi2+................+ Xi15 + Xi16) 16 for, i =1 to 8. 9) Now we change the coordinates, for each of the 16 vectors. y1= x1 ΒGx1 , .......... y8= x8 ΒGx8 . 10) To produce the “respiratory direction” we need to consider the inertia hyper-ellipsoid relative to the 16 vectors obtained. The corresponding equation is, A11y12 + .......+A88y82 + 2A12y1y2 + .....2A78y7y8 = 0 Aij are the elements of inertia matrix Where , A11= y1,22 +..................y16,82 A22= y1,32 +..................y16,12 ................................. A77= y1,82 +..................y16,62 A88= y1,12 +..................y16,72 For i≠j Aij= −Σ(S=1to16)(yS,iyS,j) 11) The solution of , Aij − λ= 0 gives the eigen values of the inertia matrice. The matrix is symmetric and defined positive, therefore all eigen values are to be positive. 12) It will be observed that all the eigen values calculated will have unitary multiplicity. The length of the main semi—axis is associated with the smaller eigen value, λ . The corresponding eigen vector locates the main vector. 13) The solution of:

--------------------------------------------------------------- 25 ---------------------------------------------------------------

Research Internship Report, DA-IICT,2004 (Aij − λ) (X1; X2;....X8) = (0;0;0....0) produces infinity eigen vectors here we take the normalised eigen vectors, along the straight line r : (x1 ΒGx1)/l1=.........=(x8 ΒGx8)/l8 14) The main direction to the hyper ellipsoid is the respiration direction. 15) After this learning phase, for the every new heart beat, we calculate the area of QRS complex. And we obtain a vector of 8 elements, B = (X1,...X8). And the free vector would be WB = (X1- Gx1,....X8- Gx8) And the EDR value would be , EDR_value = l1(x1- Gx1) + .....+ l8(x8 – Gx8) And the main direction would be in the same as that of r. 16) The respiratory waveform is thus obtained through interpolation of those values.

--------------------------------------------------------------- 26 ---------------------------------------------------------------

Research Internship Report, DA-IICT,2004 Appendix B

!"

#$ %

#

% & ' (% & ' )%

(

% ***************************************************************************************** +,-./0 1.2,13.40 15 4.678,/*************************************************** ***************************************************************************************** ( 9 ( 9 &

'% : '% :

( % (%

(

( &; * % % &; * % %

( & % * & % *

(

***************************************************************************************** 1 < ************************************ ***************************************************************************************** 9 <': $ % <= $ 4 < 8 > * &; > % % < = 8% 4? 4 <

@

$

%

& % A # B " % "

%

%

***************************************************************************************** 1 < % *************** *****************************************************************************************

--------------------------------------------------------------- 27 ---------------------------------------------------------------

Research Internship Report, DA-IICT,2004 9 <': <=

$

(% $ 4 > * &; (> %

(@

$

<

8 % < =

8%

4? 4

<

(%

& % A # B " (% "

(%

%

***************************************************************************************** 4 C74 /.,3 ******************************************************* ***************************************************************************************** > A

*! "

% D " *( &;( % 9 $' : $ % $> % ;*( * >> ; ;) ;

***************************************************************************************** , ************************************************ ***************************************************************************************** E F4% ' $% % & >

$% * %

$% @ (% & $% ; % ;

@ (% > % %

--------------------------------------------------------------- 28 ---------------------------------------------------------------

Research Internship Report, DA-IICT,2004

***************************************************************************************** 4 C74 /.,3 (******************************************************* ***************************************************************************************** > A

*! " (% D " ( *( &;( % 9 $' : $ % $( > % ;*( * >> ; ;)

;

***************************************************************************************** , ********************************************* ***************************************************************************************** ( ' $(% % E F4% & $(% > $( % * @ (% & $( % ; @ (% (% (% ; (> % %

***************************************************************************************** .34 **************************************** ***************************************************************************************** (% ' &

%$(% @

% % % %

***************************************************************************************** > # ***************************************************************************************** & &# & ' $' % %

--------------------------------------------------------------- 29 ---------------------------------------------------------------

Research Internship Report, DA-IICT,2004

Appendix C WAVELET TRANSFORM PROGRAM:

#$ % & ' (% #$ % & ' )% G H ***************************************************************************************** ' ( % ' ***************************************************************************************** $ ( % $= % $@ $' % *

% D

%

$% D

%

% %

$ H*$

$

%

H @

$ ' % * % %

$ H;$

--------------------------------------------------------------- 30 ---------------------------------------------------------------

Research Internship Report, DA-IICT,2004

***************************************************************************************** I J 7 1 / 3 K 2 I , ***************************************************************************************** 9': ' ' !% H % H (% %

***************************************************************************************** ***************************************************************************************** & A

H% L= %

H; H; % % %

$ '' !% $ $# @ $ $% $ $9 & E : ' & % (''% $% %

# @ $ 9& E

% : ' & %

('' (% % %

--------------------------------------------------------------- 31 ---------------------------------------------------------------

Research Internship Report, DA-IICT,2004

References:

[1] “Wearable Personal Monitoring”, by Kian Loh, Department of Electrical and Computer Engineering, University of Queensland. [2] G. Moody, R. Mark, A. Zoccola, S. Mantero, “Derivation of respiratory signals from multi-lead ECGs”, Computers in Cardiology. Vol. 12, pp. 113-116, 1985. [3] Pinciroli, F., Pozzi, G., Rossi, R., “Processing electrocardiograms towards respiratory signals” Dipartimento di Elletronica, Politecnico di Milano , Italy; [4] Travaglini, A.; Lamberti, C.; DeBie, J.; Ferri, M.,” Respiratory signal derived from eight-lead ECG”, Computers in Cardiology 1998 [5] A.P.Rocha , S.Gouveia , A.Leite , P.Lago , O.Costa , F.Freitas, M.Carvalho. “A Study On The Estimation of the Respiratory Signal in 12-lead holter recordings”, Departamento de Matemática Aplicada, Univ. do Porto, Porto, Portugal. [6] W.J.Yi, K.S.Park, ”Derivation of Respiration from ECG Measured Without Subject’s Awareness Using Wavelet Transform”, Proceedings of the Second Joint EMBS/BMES Conference, October 2326,2002. [7] http://butler.cc.tut.fi/~malmivuo/bem/bembook/15/15x/1504x.htm

--------------------------------------------------------------- 32 ---------------------------------------------------------------

A Study on deriving Respiratory Signals from ECG

The AV node thus acts as a "relay station" delaying stimulation of the ventricles long enough to allow the two atria to finish emptying. 4. The electrical ...... starting pulses for the complete pumping action of the heart, is also affected by the autonomous nervous system's sympathetic and parasympathetic activities and hence ...

330KB Sizes 1 Downloads 197 Views

Recommend Documents

A Study on deriving Respiratory Signals from ECG
After 1st week of liberal search into this area, the group with the consent of the Instructor ... (all multi-lead ECG data and Respiratory data only available in hard copies) and lack of implementation of ... A period of recovery follows called diast

A Study on deriving Respiratory Signals from ECG
ECG for heart rate monitoring could use a reduced bandwidth 0.5 – 50 Hz. ..... This signal, like other biomedical signals, is not free from the artifacts and noise.

Recovery of EMG Signals from the Mixture of ECG and EMG Signals
signals by means of time-variant harmonic modelling of the cardiac artefact. ... issue of explicit nonstationary harmonic modelling of the ECG signal component.

Recovery of EMG Signals from the Mixture of ECG and EMG Signals
IJRIT International Journal of Research in Information Technology, Volume 2, Issue 5, May 2014, Pg: 227-234. M. Nuthal Srinivasan,IJRIT. 229. Fig.1.3: ECG Signal Waveform. III. Related Works. There are extensive research efforts dedicated to helping

A Pilot Study: Deriving a Users' Goal Framework from ...
and hence are not readily applicable to the applications which need to deal with complex practical users‟ goals. .... the goals concrete enough to allow useful inferences and ..... Page 5 ... iPhone next month” implies both INTEND TO DO STH.

Deriving Operational Semantics from Denotational ...
aim is to build equivalence between the operational and de- ... transition types for Verilog and define a phase semantics of ... support parallel expansion laws.

Uni-channel PCA for noise reduction from ECG signals
very useful in most cases where only the lead II ECG signals are available, in ..... Automation, Robotics and Vision, Singapore, pp. 1688-1693,. December 2-5 ...

Deriving Configuration Interfaces from Feature Models ...
as of task, user, discourse and business models found in the ... plications have permeated a number of markets such as car manufacturers, clothing or computer ...

Deriving Customer Loyalty and Its Determinants from ...
through various social media including online reviews. It is known that ... We implement our framework in section 5 and refine our model in section 6. A brief ...

RESPIRATORY SYSTEM STUDY GUIDE.pdf
Lungs are made of spongy tissue with lots of. surface area to increase contact with the air. Asthma makes it hard for people to breathe because it narrows the ...

Deriving information structure from convergent derivations
DP VP. Nom. DP]]. From (4), the alternative configuration in which Dat internally merges above T is convergent, as it no longer is an intervenor. We assume that ...

Towards deriving conclusions from cause-effect relations
Department of Computer Science ... a central aim of the special sciences. ..... aand P5) we may understand causal literals in the top part of the program as a ...

Deriving Correct Prototypes from Formal Z Specifications
Miranda. Neither sets, binary relations, mappings, nor bags are directly available. Hence data refine- ..... the validation cycle is easier. Finally, this paper has only ...

Electroencephalogram Signals from Imagined Activities ...
Dept. of Computer Science, University of Essex, Colchester, United Kingdom ... rhythm EEG signals were used to classify 4 subjects, while in another study [11], ...

A case study from the Mackenzie River
(b) The difference between autumn and summer freshwater change (i.e., November–December minus .... MISRA, V. M.; K. YAU and N. BADRINATH. 2000.

Estimating actigraphy from motion artifacts in ECG ...
Dec 9, 2015 - Motto A L, Galiana H L, Brown K A and Kearney R E 2004 Detection of movement artifacts in respiratory inductance plethysmography: performance analysis of a neyman-pearson energy-based detector Proc. of the Annual Int. Conf. of the IEEE

Estimating actigraphy from motion artifacts in ECG and ...
Dec 7, 2015 - 3 Philips Chair for Medical Information Technology, RWTH Aachen University,. Pauwelsstrasse 20, D-52074 ... with a data set comprising polysomnographic (PSG) recordings of 15 healthy subjects and 25 ... together with respiratory feature

Deriving German scrambling without information ...
man is scope-transparent (Bobaljik & Wurmbrand 2012), movement of the QP to the edge of. vP is both acceptable at the semantic interface and reflected in the ...

Removing streak artifacts from ECG-gated ...
69621 Villeurbanne Cedex, France, office phone +33472357412, email : [email protected]. 2Philips ..... [3] Feldkamp L A, Davis L C and Kress J W 1984 Practical cone-beam algorithm J. Opt. Soc. Am. .... List of figure captions. Fig.

HOIST: A System for Automatically Deriving Static ...
ABSTRACT. Embedded software must meet conflicting requirements such as be- ... ing which the value of a storage location does not change, has been used to ...

A Study on Double Integrals
This paper uses the mathematical software Maple for the auxiliary tool to study two types of ... The computer algebra system (CAS) has been widely employed in ...