• No results found

Compensating for Respiratory Artifacts in Blood Pressure Waveforms

N/A
N/A
Protected

Academic year: 2021

Share "Compensating for Respiratory Artifacts in Blood Pressure Waveforms"

Copied!
69
0
0

Loading.... (view fulltext now)

Full text

(1)

Institutionen för systemteknik

Department of Electrical Engineering

Examensarbete

Compensating for Respiratory Artifacts in Blood

Pressure Waveforms

Examensarbete utfört i Reglerteknik vid Tekniska högskolan i Linköping

av

Martin Wikström

LITH-ISY-EX-3654-2004

Linköping 2005

Department of Electrical Engineering Linköpings tekniska högskola

Linköpings universitet Linköpings universitet

(2)
(3)

Compensating for Respiratory Artifacts in Blood

Pressure Waveforms

Examensarbete utfört i Reglerteknik

vid Tekniska högskolan i Linköping

av

Martin Wikström

LITH-ISY-EX-3654-2004

Handledare: Frida Eng

isy, Linköping university

Kenneth Danehorn

Siemens

Examinator: Fredrik Gustafsson

isy, Linköping university

(4)
(5)

Avdelning, Institution Division, Department

Division of Automatic Control Department of Electrical Engineering Linköpings universitet S-581 83 Linköping, Sweden Datum Date 2005-04-15 Språk Language  Svenska/Swedish  Engelska/English  ⊠ Rapporttyp Report category  Licentiatavhandling  Examensarbete  C-uppsats  D-uppsats  Övrig rapport  ⊠

URL för elektronisk version http://www.ep.liu.se

ISBNISRN

LITH-ISY-EX-3654-2004 Serietitel och serienummer Title of series, numbering ISSN

Titel

Title Hemodynamisk kompensering för andningsartefakterCompensating for Respiratory Artifacts in Blood Pressure Waveforms

Författare

Author Martin Wikström

Sammanfattning Abstract

Cardiac catheterization has for a long time been a valuable way to evaluate the hemodynamics of a patient. One of the benefits is that the entire blood pressure waveform can be recorded and visualized to the cardiologist. These measurements are however disturbed by different phenomenon, such as respiration and the dy-namics of the fluid filled catheter, which introduces artifacts in the blood pressure waveform. If these disturbances could be removed, the measurement would be more accurate. This report focuses on the effects of respiratory artifacts in blood pressure signals during cardiac catheterization.

Four methods, a standard bandpass filter, two adaptive filters and one wavelet based method are considered. The difference between respiratory artifacts in sys-tolic and diassys-tolic pressure is studied and dealt with during compensation. All investigated methods are implemented in Matlab and validated against blood pres-sure signals from catheterized patients.

The results are algorithms that try to correct for respiratory artifacts. The rate of success is hard to determine since only a few measured blood pressure signals have been available and since the size and appearance of the actual artifacts are unknown.

Nyckelord

(6)
(7)

Abstract

Cardiac catheterization has for a long time been a valuable way to evaluate the hemodynamics of a patient. One of the benefits is that the entire blood pressure waveform can be recorded and visualized to the cardiologist. These measurements are however disturbed by different phenomenon, such as respiration and the dy-namics of the fluid filled catheter, which introduces artifacts in the blood pressure waveform. If these disturbances could be removed, the measurement would be more accurate. This report focuses on the effects of respiratory artifacts in blood pressure signals during cardiac catheterization.

Four methods, a standard bandpass filter, two adaptive filters and one wavelet based method are considered. The difference between respiratory artifacts in sys-tolic and diassys-tolic pressure is studied and dealt with during compensation. All investigated methods are implemented in Matlab and validated against blood pres-sure signals from catheterized patients.

The results are algorithms that try to correct for respiratory artifacts. The rate of success is hard to determine since only a few measured blood pressure signals have been available and since the size and appearance of the actual artifacts are unknown.

(8)
(9)

Acknowledgements

I would like to thank my supervisors Kenneth Danehorn and Frida Eng for their help and support during this work. I also thank my examiner Fredrik Gustafsson for his ideas and opinions.

Furthermore I would specially like to thank my opponent and good friend Johan Wallin for providing useful corrections and remarks making this a better report.

Finally I would also like to thank my girlfriend and my family for their help and support.

Linköping 2005

Martin Wikström

(10)
(11)

Notation

Medical Terms

Angiography Cardiac angiography is an invasive proce-dure where a contrast medium is injected into blood vessels or heart chambers through a cardiac catheter. The medium will be more visible on X-ray images and is used to visualize specific anatomies in real-time.

Atria The atria are the two smaller chambers.

Blood is pumped from the atria to the ventricles.

Aorta The aorta is the largest artery. It begins at the left ventricle.

Artery Arteries are blood vessels transporting oxy-genated blood away from the heart out through the body.

Cardiac Output The Cardiac Output (CO) is the volume of blood ejected from a ventricle each minute. Cardiovascular system The cardiovascular system consists of the

heart, the blood vessels and the blood. Catheter A catheter is a flexible tube which can be

inserted into canal-shaped body parts such as blood vessels.

Diaphragm The diaphragm is the muscle that powers breathing the most. It is located just below the heart and lungs.

Electrocardiogram An electrocardiogram (ECG) is the mea-sured electrical activity of the heart. Electrogastrogram A non-invasive measurement of the electrical

activity in the stomach region. ix

(12)

Diastole The relaxation phase of the heart.

Diastolic Pressure The diastolic pressure (DP) is the lowest blood pressure during the heart cycle. In the ventricular blood pressure waveform, two distinct diastolic pressures can be measured. The begin diastolic pressure (BDP) is the pressure at the beginning of the diastolic pe-riod while the end diastolic pressure (EDP) is the pressure at its end. In the arter-ial blood pressure only one pressure point, the diastolic pressure (DP), which is the lowest pressure under one cardiac cycle, is determined.

Hemodynamics Hemo = blood; Dynamics = power. The forces involved in circulating blood through the body.

Preload The degree of stretch on the heart before contraction. A high degree of stretch in-creases the force of contraction [25]. Pulmonary Circulation Pulmon = lung. The pulmonary circulatory

system consists of pulmonary veins, capil-laries and arteries. The pulmonary arteries carrying deoxygenated blood from the right ventricle to the pulmonary capillaries in the lung. The oxygenated blood is then trans-ported through the pulmonary veins to the left atrium.

Respiratory Artifacts The unwanted variations in blood pressure caused by respiration are referred to as res-piratory artifacts.

Respiratory Sinus Arrhythmia Respiratory Sinus Arrhythmia (RSA) is a respiratory induced variation of the heart rate, also causing variations in the systolic pressure. (See Section 2.2.4.)

Stroke Volume Stroke Volume (SV) is the amount of blood ejected from a ventricle each stroke. Systole The contraction phase of the heart.

Systolic Pressure The systolic pressure (SP) is the highest pressure during systole.

Thorax The chest. (Intra-thoracic pressure = pres-sure inside the chest)

(13)

Vein Veins are the blood vessels transporting de-oxygenated blood to the heart.

Ventricles The ventricles are the inferior chambers. When the ventricles contract, blood is pumped out of the heart. The right ven-tricle pumps deoxygenated blood from the heart to the lungs, while the left ventricle pumps oxygenated blood out in the body through the aorta.

Ventilation, Mechanical A mechanical ventilator is a machine that generate a controlled flow of air into a pa-tient’s airways.

Abbreviations

ANC Adaptive Noise-Canceler. BDP Begin Diastolic Pressure. CO Cardiac Output.

EDP End Diastolic Pressure. FLC Fourier Linear Combiner. HR Heart Rate.

RSA Respiratory Sinus Arrhythmia SP Systolic Pressure.

(14)
(15)

Contents

1 Introduction 1

1.1 Overview of the Heart and the Respiratory System . . . 1

1.2 Cardiac Catheterization . . . 3

1.3 Purpose and Goals . . . 3

1.4 Previous Works . . . 3

1.5 Outline . . . 4

1.6 Methods . . . 4

2 Problem Definition 5 2.1 Available Measured Signals . . . 5

2.1.1 The Blood Pressure Waveform . . . 5

2.1.2 The Measured Respiratory Signal . . . 7

2.1.3 Electrocardiogram . . . 7

2.2 Causes of Respiratory Artifacts . . . 8

2.2.1 Intra-thoracic Pressure . . . 8

2.2.2 Difference Between Ventilated and Free-breathing Patients 9 2.2.3 Changing Preload, Afterload and Intra-ventricular depen-dencies . . . 10

2.2.4 Respiratory Sinus Arrhythmia . . . 10

2.3 Conclusions for this study . . . 12

3 Implementations 13 3.1 Bandstop Filtering . . . 13

3.2 Adaptive Filtering - Adaptive Fourier Linear Combiner . . . 15

3.3 Adaptive Noise Canceler . . . 20

3.3.1 Preprocessing the measured respiration signal . . . 21

3.3.2 Applying the generated respiratory reference . . . 23

3.4 Compensating for Systolic Pressure Variations . . . 24

3.4.1 Detecting RSA . . . 24

3.4.2 Calculating Amount of RSA . . . 26

3.4.3 Calculating Amount of Other Respiratory Influenced Sys-tolic Variations . . . 27

3.4.4 Applying Compensation to Systolic Pressure . . . 27

3.5 Wavelet de-noising . . . 31 xiii

(16)

3.5.1 Introduction to wavelets . . . 31

3.5.2 The Stationary Wavelet Transform . . . 32

3.5.3 Removing respiratory artifacts . . . 33

3.6 Other Possible Algorithms . . . 36

3.6.1 Empirical Mode Decomposition . . . 36

3.6.2 Independent Component Analysis . . . 36

4 Result 37 4.1 Validation of results . . . 37

4.2 Measurement . . . 37

4.3 Bandstopfilter . . . 38

4.4 Adaptive FLC . . . 39

4.5 Adaptive Noise Canceler . . . 40

4.6 Wavelet . . . 42

4.7 Comparison . . . 43

5 Concluding Remarks 45 Bibliography 47 A Calculating Pressures 51 A.1 Ventricular Pressures . . . 51

A.1.1 Systolic Pressure . . . 51

A.1.2 Begin Diastolic Pressure . . . 52

A.1.3 End Diastolic Pressure . . . 52

A.2 Arterial Pressures . . . 52

A.2.1 Systolic Pressure . . . 52

(17)

Chapter 1

Introduction

To diagnose patients with a suspected heart condition, or who has undergone heart surgery, cardiac catheterization can be a valuable tool for the cardiologist. During the procedure, the entire blood pressure waveform is measured. Characteristics of the waveform can indicate the condition of the cardiovascular system and can be used by the cardiologist to help diagnose the patient. This waveform is often affected by the work of the respiratory system, inducing a low-frequency variation in the waveform. These respiratory induced variations are referred to as respiratory artifacts. This thesis will investigate methods for eliminating these artifacts to get less disturbance in the blood pressure waveform.

Siemens is one of the largest producers of medical equipment in the world. One of their products is monitoring equipment used during cardiac catheterization. This thesis has been written in co-operation with Siemens AX ACS1and Linköping

University, Division of Automatic Control (ISY).

This chapter will provide a short overview of the background and purposes of this thesis.

1.1

Overview of the Heart and the Respiratory

System

The heart is the pump that circulates the blood through the estimated 100,000 km of blood vessels in the human body. In one day, the heart has beaten about 100,000 beats and pumped more than 14,000 liters of blood [25].

In an adult human, the size of the heart is about as a closed fist. It is located between the lungs, with two-third of its mass on the left side of the midline of the body.

The heart is divided into four chambers, two ventricles and two atria. A schematic image of the heart and its chambers are displayed in Figure 1.1.

Deoxygenated blood from the body enters the right atrium though the veins2.

1Advanced Cardiology Solutions, Solna, Sweden

2superior vena cava, inferior vena cava and coronary sinus.

(18)

2 Introduction

As the right atrium contracts, blood is pressed into the right ventricle. When the ventricle contracts, the blood is then pumped out through the pulmonary circulatory system where it is oxygenated in the lungs. Blood returning from the pulmonary system enters the left atrium and is pumped into the left ventricle. From there it is ejected out into the body through the aorta when the ventricle contracts.

Figure 1.1. Overview of the heart and its chambers

The heart is surrounded by a membrane called the pericardium. The peri-cardium protects the heart and holds the heart in place. Right under the heart lies the diaphragm, the muscle that drives respiration. During inhalation, the di-aphragm contracts and presses down on the stomach region, increasing the chest cavity and the volume of the lungs expands. When exhaling, the diaphragm re-laxes and the chest cavity decreases causing air to be pressed out from the lungs. The alternating pressures in the chest will affect the blood pressure and cause the respiratory artifacts. This is further explained in Section 2.2.

(19)

1.2 Cardiac Catheterization 3

1.2

Cardiac Catheterization

The hemodynamics of a patient can accurately be monitored during cardiac catheter-ization and used to diagnose cardiovascular diseases and defects. This is a min-imally invasive procedure where one or more catheters (thin, flexible tubes) are inserted into a suitable vein or artery. Usual entry points for the catheter is the patients neck, armpit or groin. The catheter is then guided into place under x-ray observation.

The catheter can be used to measure the entire blood pressure waveform in the chambers of the heart and in the blood vessels. It can be a valuable tool to examine patients with suspected cardiac defects or who has undergone cardiac surgery.

1.3

Purpose and Goals

This work will investigate and compare different methods of eliminating and iso-lating respiratory artifacts from pressure signals collected during cardiac catheter-ization.

The primary goals are

• Investigate which available methods exists for compensating for respiratory artifacts.

• Implement selected algorithms.

• Evaluate the methods to determine which performs best for the general case. • The implementations should if possible have real-time performance.

1.4

Previous Works

The origin and effects of respiratory artifacts has been subject to investigation in several articles. Some of these works investigate the possibilities to conduct diagnoses from respiratory artifacts [13] [11], while others investigate the source of certain artifacts [24], [5], [18], [8].

Attempts to compensate for these respiratory artifacts are made by Hoeskel et

al. [12], Korhonen et al. [15], [16] and Ellis [7].

Hoeskel et al. [12] uses an adaptive notch filter removing all stationary components at the estimated respiratory frequency. Korhonen et al. [15] uses an adaptive noise canceler, filtering ventricular blood pressure by using a low-passed filtered version of the measured aortic pressure signal as a reference for the artifacts.

Similar problems with artifacts have investigated for other sampled bio-signals. For example, compensation of respiratory artifacts in electrogastrogram (EGG) signals [17] using Empirical Mode Decomposition and similar low-frequency arti-facts in electrocardiogram [2] using a wavelet approach.

(20)

4 Introduction

1.5

Outline

In this report, four different methods for compensation of respiratory artifacts are implemented and compared using measured blood pressures from patients undergoing cardiac catheterization. In Chapter 2 the different available signals are presented and the cause and appearance of the respiratory artifacts are analyzed. The compensation methods are presented in Chapter 3. Results from compen-sations are presented in Chapter 4 and in the following Chapter 5 conclusions are drawn and guidelines of future work are proposed.

1.6

Methods

The work flow has been divided into three main phases, investigation, implemen-tation and validation.

In the investigation-phase, articles and methods were studied and minor tests made to determine if a method should be further implemented. Otherwise, it was rejected. Passed further to the implementation-phase was a static bandstop filter (mostly for comparison), a Wavelet approach (Section 3.5), two different adap-tive filters (Section 3.2, 3.3) and additional compensation for systolic variations (Section 3.4).

Methods rejected during this phase was Independent Component Analysis ap-proach and Empirical Mode Decomposition (see Other possible algorithms 3.6).

(21)

Chapter 2

Problem Definition

The problem addressed in this thesis is to eliminate respiratory artifacts from the blood pressure signal acquired during cardiac catheterization.

This section will describe the available signals and explain the origin of the respiratory artifacts and how they should be handled. The chapter is ended by a description of the limitations for this thesis.

2.1

Available Measured Signals

In this section all available signals that are used in this thesis are presented. These are the blood pressure, the electrocardiogram (ECG) and a respiratory measure-ment. They are all considered to be present during a cardiac catheterization. It is however only the blood pressure that is being measured by the cardiac catheter, the others are measured non-invasively.

2.1.1

The Blood Pressure Waveform

Three distinctive different blood pressure waveforms are measured during a car-diac catheterization, ventricular, atrial and arterial pressure. Of those are the ventricular and arterial pressures investigated here.

The pressures can be measured in both sides of the heart and the shape of the waveforms will be about the same in both sides, only with a difference in amplitude. The most common catheterization procedure is right heart catheterization. During such procedure, right atrium, right ventricle and pulmonary artery blood pressures are measured.

The waveform consist of a period where the ventricle contracts which causes the pressure to rise. This is the systolic period, and the top pressure during this period is called the Systolic Pressure (SP). After the contraction the pressure lowers. This is the diastolic period. Under diastole, the ventricles are then once again filled with blood from the atria. An example of a blood pressure waveform is presented in Figure 2.1.

(22)

6 Problem Definition

In the ventricular blood pressure waveform, two distinct diastolic pressures can be measured. The begin-diastolic pressure (BDP) is the pressure at the beginning of the diastolic period while the end-diastolic pressure (EDP) is the pressure at its end. In the arterial blood pressure only one pressure point, the diastolic pressure (DP), which is the lowest pressure during one cardiac cycle is determined. A more detailed description how these pressures are derived from a blood pressure signal is presented in Appendix A.

These pressures are important when diagnosing a patient. Below in Figure 2.1 is an example of a ventricular and arterial blood pressure signal measured during cardiac catheterization. 100 110 120 130 140 150 Arterial pressure (mmHg) 4 4.5 5 5.5 6 6.5 7 −10 0 10 20 Time (sec) Ventricular pressure (mmHg) Blood pressure Systolic pressure End Diastolic pressure Begin Diastolic pressure

Blood pressure Systolic pressure Diastolic pressure

Systole Diastole

Figure 2.1.Blood pressure waveform. Top : Ventricular blood pressure waveform with

systolic and diastolic pressure marked out. Bottom : Arterial pressure waveform with systolic, begin-diastolic and end-diastolic pressure marked out.

The blood pressure waveform measured in ventricles and arteries is however disturbed by different low-frequency variations [20]. These are

• Oscillations with a frequency around 0.2 to 0.4 Hz, a frequency similar to that of normal respiratory activity, defined as high-frequency (HF). These variations should be eliminated.

• Oscillations with a frequency of approximately 0.1 Hz, defined as mid-frequency (MF) and corresponding in the blood pressure to what is known as Mayer waves.

• Oscillations with a frequency between 0.02 and 0.07 Hz, defined as low-frequency (LF) are probably related to a variety of phenomena and mecha-nisms.

Mayer waves (MF) have been used to classify heart failures or predict death after heart attacks while the slope low frequency blood pressure oscillations (LF) has

(23)

2.1 Available Measured Signals 7 0 0.02 0.07 0.1 0.2 0.4 0.6 LF MF HF Heart−influenced variations Variations to remove

Figure 2.2. Low-frequency components in the blood pressure. ( LF = Low frequency,

MF = Mid frequency, HF = High frequency (respiratory artifacts))

been seen to be correlated to cardiovascular mortality [3]. The MF and LF oscilla-tions are not directly connected to respiration and since they contain information that may be important for the cardiologist, they should not be eliminated.

2.1.2

The Measured Respiratory Signal

The measured respiratory signal consists of a measurement of the level of CO2

in the air during expiration. This will result in a waveform with a clear rise during expiration period and thereafter a drop during inspiration. An example of a measured respiratory signal is displayed in Figure 2.3. The measurement suffers from disturbances and/or missing sequences of data, which must be handled when interpreting the signal.

The signal suffers a small time-delay caused by the time between air being expired and when it is detected by the CO2 sensor. Artifacts are induced in the

blood pressure from inspiration, but since the measured respiratory signal shows expiration, artifacts are visible in the blood pressure signal before corresponding respiratory is detected by the CO2sensor.

15 20 25 30 0 5 10 15 20 Time (sec) Units CO 2

Figure 2.3. Respiratory signal measuring the amount of CO2 in exhalated air.

2.1.3

Electrocardiogram

During all measurements an Electrocardiogram (ECG), is assumed to be available. The signal is a reading of the electrical activity in the heart. In this report, the ECG is used to determine the instantaneous heart-rate.

(24)

8 Problem Definition

The high peaks, denoted R in Figure 2.4, is the electric discharge stimulating the ventricles to contract. The heart rate is determined from inverse of the length of the interval between those peaks, normally known as R-R interval.

0 1 2 3 4 5 6 −4 −2 0 2 4 6 8 10 Time (sec) Voltage [mV] R R−R interval

Figure 2.4.Measured ECG-signal. The high peaks is the electrical discharge triggering

a new contraction of the ventricles.

2.2

Causes of Respiratory Artifacts

Effects of respiration in blood pressure is often divided into three components [14]. An additive, low frequency component at approximately 0.2-0.4 Hz corresponding to the variating pressure in the thoracic region caused by the respiratory system. This is further explained in Section 2.2.1.

The second effect is an amplitude modulation of the systolic pressure, having the same frequency as the respiration. The phase and amplitude of this variation may be different from the diastolic variations. The origin of this effect is discussed in 2.2.3 and 2.2.4.

The third is a frequency modulation of the heart rate, a cyclic variation due to respiration. The third effect appears to be caused by a phenomena known as

Respiratory Sinus Arrhythmia(RSA) which is described in further detail in Section

2.2.4.

2.2.1

Intra-thoracic Pressure

The contraction and relaxation of the diaphragm compresses and decompresses the lungs and variates the intra-thoracic pressure. Since the pressure measured by the catheter is referred to atmospheric pressure rather than the actual intra-pericardial pressure surrounding the heart, there is a cyclic variation in the observed pressures at the respiratory frequency, corresponding to the patients respiration.

The most correct blood pressure is found at the end of the expiration when the atmospheric and intra-thoracic pressures are almost equal.

The shape of the deformation of the heart caused by respiration is investi-gated by Shechter et al. [23]. There, using cardiovascular angiography systems, images of the displacement of the diaphragm is acquired. The movement of the

(25)

2.2 Causes of Respiratory Artifacts 9

diaphragm, and therefore the pressure upon the heart seems to have an even, sinu-soidal shape. This should indicate a sinusinu-soidal shaped respiratory artifact caused by the mechanical deformation of the heart. This also corresponds well to respira-tory artifacts found in signals from cardiac catheterized patients available in this study.

2.2.2

Difference Between Ventilated and Free-breathing

Pa-tients

During some catheterizations, often when the patient is a child, he or she is sedated and mechanically ventilated. When ventilated, a machine generates a controlled flow of air into the patients airways. The lungs expand by the increased pressure, and when the pressure is dropped the lungs return to normal size, pressing the air out. For a free-breathing patient, the diaphragm moves downward during inspiration, causing a negative pressure in the lungs sucking air down. The air is then pressed out during expiration.

The ventilated patient only experience a positive pressure increase, which may affect the cardiac system differently than the effects from the free-breathing pa-tient. Instead of showing a sinus-shaped wave in the blood pressure, the effects

0 2 4 6 8 10 12

0

Simulated free breathing patient

0 2 4 6 8 10 12

0

Time (sec) Simulated intubated patient

Figure 2.5. General appearance of effects in blood pressure from free-breathing and

mechanically ventilated patients

will more likely be a large pressure increase during inspiration and thereafter a slower decreasing pressure. A simulation of the general appearance of these effects are displayed in Figure 2.5.

During this thesis, all available pressure signals have been acquired from free-breathing patients, but the possibility of compensating data from ventilated pa-tients have still been considered throughout the report. The effects of respiratory artifacts are generally more marked in patients who are mechanically ventilated.

(26)

10 Problem Definition

2.2.3

Changing Preload, Afterload and Intra-ventricular

de-pendencies

Increased intra-thoracic pressure during respiration will also put pressure on blood vessels such as the arteries. This will lead to an increase in right ventricular afterload. Afterload is the load the heart must eject blood against during systole. Higher afterload results in higher systolic pressure when ejecting the blood.

The filling of the left atrium will increase when blood is pressed from the pulmonary veins. This increases preload1of the left ventricle resulting in a increase

in left ventricle output and pressure. After a few heartbeats, the reduced right ventricle output will reach the left half of the heart and lead to a decrease in left ventricle output and systolic pressure. This is investigated by Denault et. al [5] and Michard et al.[19] [18].

The net effect of all this will be that the diastolic pressure in the ventricles will be affected more or less directly by intra-thoracic pressure while ventricular systolic pressure will be affected by an additional cyclic variation caused by changes in afterload, preload and by intra-ventricular dependencies.

To help visualize these variations, two independent attempts to isolate respi-ratory artifacts in a ventricular blood pressure signal are calculated. One will consider the respiratory artifacts as the variations in diastolic pressure, while the other as the variations in systolic pressure. (The calculations are done with the method described later in Section 3.2.) The resulting isolated artifacts are dis-played below in Figure 2.6. There is a clear difference between the two curves. If for example only the curve formed by diastolic pressure is used to compensate the entire waveform, the variations in diastolic pressure will decrease, but there will still be large variations in systolic pressure.

2.2.4

Respiratory Sinus Arrhythmia

Respiratory Sinus Arrhythmia, RSA, is a respiratory dependent phenomena that affects the blood pressure. This section will in more detail describe the effect and discuss if a compensation would be useful.

RSA is primarily a heart-rate variation synchronous with respiration. During inspiration, there is an increase in heart-rate, while there is a corresponding de-crease during expiration. The effects of RSA has been a subject for study in many recent articles such as [24], [8], [6], [16]. The origin of RSA has been debated in severla articles such as [24], it’s use for diagnosing patients discussed in [16] and methods to detect the phenomenon are established [6].

Other studies [24] [8] [20] have investigated how the fluctuations in heart-rate affect the arterial blood pressure waveform, which is important in this thesis. Stud-ies have shown that the RSA is a mechanism for keeping the cardiac output (CO) more stable during the variations in intra-thoracic pressure caused by respiration [24],[8]. Cardiac output is the amount of blood being pumped out of the heart. It is dependent on heart-rate and cardiac stroke volume (SV) according to the

1Preload - The degree of stretch on the heart before contraction. A high degree of stretch increases the force of contraction [25] caused by respiration.

(27)

2.2 Causes of Respiratory Artifacts 11 0 20 40 60 Pressure (mmHg) 0 2 4 6 8 10 12 −15 −10 −5 0 5 10 15 Time (sec) Pressure (mmHg)

Blood pressure signal

Artifacts from DP Artifacts from SP

Figure 2.6. Top : Blood pressure (Right ventricle). Bottom : Isolated respiratory

artifact. Solid curve : Artifacts considered as variations in diastolic pressure. Dashed : Artifacts considered as variations in systolic pressure

following relationship [25]:

CO = HR · SV (2.1)

So when the stroke volume is altered by changing intra-thoracic pressure, the heart-rate is instantly adjusted to compensate for this. This adjustment in heart-heart-rate is RSA. This effect is most clearly visible in the arterial pressure waveform.

Elstad et al. [8] verified this by a test where patients respiration and cardiac values were recorded before and after the administration of drugs that almost com-pletely eliminates the variations in heart rate. The results shows that a reduction in heart rate variations causes more influence from stroke volume in cardiac output resulting in a larger cardiac output variance around the frequency of the respira-tion. Interestingly the systolic pressure, which in the non-medicated control state shows large variations at the respiratory frequency, in the medicated state shows only small variations, which appears to be independent from respiration. The same conclusions are drawn with similar tests by Taylor et al. [24]. According to these reports, RSA reduces variations in cardiac output caused by respiration, but in return cause larger variations in the systolic pressure in the aorta. These variations are therefore strongly correlated with changes in heart rate. The varia-tion in heart rate, and therefore also variavaria-tions in systolic pressure, often appear slightly phase-shifted from the effect of intra-thoracic pressure, making the two artifacts distinguishable from each other. The variations in systolic pressure is also often considerably larger than the intra-thoracic pressure variations visible in the diastolic pressure in the aorta.

(28)

12 Problem Definition

2.3

Conclusions for this study

The three effects investigated are intra-thoracic pressure variations described in Section 2.2.1, the effects of Preload and afterload in Section 2.2.3 and Respiratory Sinus Arrhythmia described in Section 2.2.4.

Since this report investigates the possibilities to compensate for respiratory ar-tifacts, should the effects of RSA and other systolic pressure variations be compen-sated for? They are products of the heart regulatory system and can not really be considered artifacts. If they should be compensated for depends entirely on what the cardiologist is searching for in the pressure waveform. When investigating the work of the heart, these effects may be an interesting parameter [16], and valuable information may be lost if it is removed. However, if the features in the pressure waveform the cardiologist is looking for is completely separate from respiration, it could be useful to remove these effects to get a reading of the blood pressure less disturbed from respiration. RSA as a phenomenon can still be identified by the variation in heart rate, which is its main characteristic.

Compensating for respiratory induced systolic pressure variations in the blood pressure waveform can be seen as a complement to only removing the artifact directly originating from intra-thoracic pressure variations.

(29)

Chapter 3

Implementations

In this chapter all tested and implemented methods are presented and their dif-ferent advantages are discussed. The results from the implemented methods are presented in Chapter 4.

3.1

Bandstop Filtering

A normal approach to separate an unwanted disturbance from an interesting signal is to apply some sort of filter. Since respiratory artifacts are a low-frequency disturbance, a natural approach would be to apply a high-pass filter. But if a high-pass filter were applied, the DC-component, the drift and other low-frequency components (see Section 2.1.1) would be lost.

Instead, a band-pass filter only filtering out signal components at the frequency of the respiration is constructed. The general frequency characteristics of a band-stop filter is displayed in Figure 3.1.

0 A pass Apass A stop | F pass1 | F pass2 | F stop1 | F stop2 Frequency (Hz) Magnitude (dB) 0 F s / 2

Figure 3.1. Bandstop filter characteristic. Fpassand Fstopdefine the boundaries for the

pass- and stop band in the frequency range, while Apassand Astopdefines the dampening

in each band. Fsis the sample rate.

(30)

14 Implementations

Normal respiration is about 8-30 breath per minute, which is 1/7.5 - 1/2 breath per second. A bandstop filter to remove respiration would therefore have a stop-band between 1/7.5 and 1/2 Hz. Since the stopstop-band is fairly small, a short transi-tion between bandpass and bandstop is required. For this reason, an elliptic filter is selected. Elliptic filters provide the shortest possible transition band for given specifications and filter order [9]. A 12:th order elliptic filter is constructed with the specifications listed in Table 3.1.

Filter specifications Fpass1 0.1 Hz Fstop1 0.133 Hz Fstop2 0.5 Hz Fpass2 0.55 Hz Apass 1 db Astop 40 dB

Filter type: Elliptic

Table 3.1. Bandstop filter specifications. The notation is the same as in Figure 3.1.

There are problems when creating a bandstop filter with such small stopband. The elliptic filter is stable, but has a strong non-linear phase characteristic that deforms the signal in some cases. If the filter was created as a butterworth fil-ter, the phase characteristic would improve, but a butterworth filter has too long transition between stopband and passband to fulfill the requirements.

To further improve the results, the respiratory artifacts are extracted from the signal through a bandpass filter. This signal is then subtracted from a delayed version of the original signal. The delay is calculated to match the phase delay of the filtered signal. The benefits with this will be that the original signal itself will not have to pass through the filter, reducing the negative effects of the non-linear phase in the stopband.

The proposed filtering solution offers simplicity and low computational cost, but suffers some drawbacks. If the respiratory frequency should increase or de-crease and fall outside the filter stop-bands, artifacts will not be completely re-moved. The respiratory disturbance may also have harmonics at higher frequen-cies, which will not be removed. There might also be non-artifact components in the blood pressure waveform appearing at frequencies close to the one of the respiration. If so, they will also be eliminated.

As described in Section 2.2 the systolic and end-diastolic pressures in the pres-sure signal is affected differently by respiration (see Figure 2.6 for an example). The filtered curve from the proposed bandstop solution will be a middle-way be-tween theses variations, not correctly compensating for either the outside pressure changes on the heart nor for the effects of RSA (Section 2.2.4) or effects of pre-load/afterload (Section 2.2.3). This makes an ordinary causal filter presented here less useful for this particular task.

(31)

3.2 Adaptive Filtering - Adaptive Fourier Linear Combiner 15

3.2

Adaptive Filtering - Adaptive Fourier Linear

Combiner

The filter described in Section 3.1 had some disadvantages.

• It would not filter respiratory artifacts at a frequency outside the set bound-aries.

• One-time variations caused by other phenomenon than respiration would be filtered out.

• Different variations in systolic and diastolic pressure were not handled cor-rectly.

To correct for these problems, two adaptive algorithms are described in Sections 3.2 and 3.3. One of the main differences between them lies in how the respiratory artifacts in the pressure signal are modeled. A more accurate model will result in a better compensation.

The measured blood pressure signal y(t) can be described as the correct blood pressure s(t) and a disturbance v(t) caused by respiration.

y(t) = s(t) + v(t) (3.1)

Hoeskel et al. [12] and Riviere et al. [22] address the problem of de-noising a signal with a periodic disturbance of a known frequency. The disturbance (in this case, respiratory artifacts) can be described as series of sinusoids, called a dynamic Fourier series model. The coefficients of this series are dynamically adapted. This concept is presented as an Adaptive Fourier Linear Combiner (FLC) [22]. A block diagram of an FLC is presented in Figure 3.2. The respiratory frequency f0 (Hz)

can be extracted from the respiratory signal and used to model the respiratory disturbance in the blood pressure as

ˆ v(w, t) = w0(t) + M X k=1 [w2k−1(t) sin(2πf0tk) + w2k(t) cos(2πf0tk)] . (3.2) w(t) = [w0(t), w1(t), ..., w2M(t)]T (3.3) An approximation to the correct blood pressure s(t) is then

ˆ

s(t) = y(t) − ˆv(w, t). (3.4)

Both the phase and the amplitude of the respiratory signal ˆv(w, t) are estimated when adapting equation (3.4) by adjusting the weights w using an adaptive al-gorithm. Different adaptive algorithms can be used such as the Recursive Mean Square algorithm as in Hoeskel [12] or the Least-Mean-Square in [22].

This system acts as a kind of adaptive bandstop filter for the respiratory fre-quency f0and its M harmonics. It will however have a significant difference from

(32)

16 Implementations -y(t)   P ε(t) = ˆs(t) - Adaptive alg. 6 v(t)   P   -  1 sin ω0k cos ω0k sin M ω0k cos M ω0k w0 w1 w2 w2M −1 w2M ? B B B B B B BBN J J J JJ^     -    -    -    -  r r r r r r – +

Figure 3.2. Fourier Linear Combiner. A correct signal s(t) is approximated from the

measured signal y(t) by removing a periodical, sinusoidal disturbance v(t).

pressure signal will be removed. Variations appearing once or for a short time are considered as not related to respiration and will not alter the compensation much. If the number of coefficients is set too high, components from the correct blood pressure waveform may be described by the sinus serie and therefore falsely re-moved. To ensure that this does not happen, the length is set so the highest frequency that can be described by the series is lower than the heart-rate fre-quency. If the respiratory frequency is f0 and heart-rate frequency f1, that gives

a maximum limit for M to

M ≤ f1

(33)

3.2 Adaptive Filtering - Adaptive Fourier Linear Combiner 17

rounded downwards to the closest integer value. (Usual values : f0≈ 13Hz, f1≈ 1Hz ⇒ M ≤ 3)

When tested against measured signals, M = 2 was enough to estimate the respi-ration and to ensure that there is no frequency overlap between the sinus series and heart-rate. This also corresponds well with results from [12].

To simplify the following calculations the sum of sinusoidal elements is written as xr(t) =        1, r = 1 sin [r2πf0t] , 2 ≤ r ≤ M + 1 cos [(r − M ) 2πf0t] , M + 2 ≤ r ≤ 2M + 1 (3.6) x(t) = [x0(t), .., xN(t)]T (3.7) w(t) = [w0(t), .., wN(t)]T (3.8)

The result of the system, when artifacts are subtracted, can be written as ˆ

s(t) = y(t) − wT(t)x(t) (3.9)

The coefficients w should be chosen so the estimated prediction error

V (w) = E(y(t) − wTx(t))2 (3.10)

is minimized. Two ways to accomplish this is described here.

Maybe the most natural approach would be to calculate the negative gradient in reference to w

− d

dwV (w) = E x 

y(t) − wT(t)x(t) (3.11)

and adjust the filter weights in that direction with a specified step-size µ. w(t) = w(t − 1) + µx(t)(y(t) − wT(t − 1)x(t)) (3.12) This is the Least Mean Square algorithm (NLMS) [10], commonly used in adaptive signal processing. The reason for selecting this algorithm is for its simplicity, the low computational cost and possibility to easily select a step-size µ. By selecting a low step-size, the system will respond slowly to changes in the pressure signal, adapting only to low-frequency variations of the pressure.

(34)

18 Implementations

Algorithm 1Least Mean Square / Normalized Least Mean Square

The adjustment will be

w(t) = w(t − 1) + K(t)(y(t) − wT(t − 1)x(t)) (3.13)

K(t) = µx(t) (3.14)

where µ is the step-length taken in the direction of the negative gradient. The step-size is often normalized to be independent of the scale of the samples, resulting in the Normalized Least Mean Square (NLMS) where the step is set as :

K(t) = µ x(t)

α+ | x(t) |2. (3.15)

α is as small constant to avoid division by zero.

Another common adaptive algorithm is the recursive least mean square (RLS). The advantage of that algorithm lies in how recent samples can be weighted against older ones. The updating is done according to algorithm 2. The derivation of this algorithm can be found in [10] and is not presented here.

Algorithm 2Recursive Least Mean Square with forgetting factor

Updating is done recursively by:

w(t) = w(t − 1) + K(t)y(t) − xT(t)w(t − 1) (3.16) K(t) = P (t)x(t) (3.17) P (t) =  P (t − 1) − P (t − 1)x(t)x T(t)P (t − 1) λ + xT(t)P (t − 1)x(t)  /λ (3.18)

This algorithm has a faster convergence-rate than the NLMS, but is a little more computationally demanding. The forgetting factor λ determines the weight of a new sample passed through the least-square fitting algorithm and are set according to how new samples are weighted against old ones. A high λ (close to one) gives a high weight to old measurements which makes the convergence of the filter slow. A lower λ makes the filter faster but more sensitive to changes. Samples older than 1/(1 − λ) has a weight lower than 1/3 compared to the most recent sample [9]. A filter with λ = 0.99 would then remember ≈ 100 old samples. Since the algorithms alg. (1) and (2) are updated by the difference between the measured blood pressure signal y(t) and the modeled respiration, it is obvious that the large pressure differences between the systolic and diastolic phase might affect the updating. If not the step-size is small enough (or forgetting factor close enough to one), that will affect the filter weights causing the removed artifact to

(35)

3.2 Adaptive Filtering - Adaptive Fourier Linear Combiner 19

get a somewhat uneven appearance. This is especially true for the RLS which converges faster. The effect is visible in the solid curve in Figure 3.3. The pressure signal do not have a normal distribution which would be ideal. To avoid this problem completely, the step-size must be set very low. That would however cause an unacceptable long convergence-rate.

There is also the problem of respiratory variations in systolic pressure (see Section 2.2.4 and 2.2.3). Since these variations are phase shifted and of different amplitude than variations in diastolic pressure, the resulting compensation will be a middle way between the changes in systolic pressure and diastolic pressure. To avoid this problem, only samples during the diastolic period are chosen to update the filter weights. The step-size can now be increased which leads to faster convergence still with an even artifact curve (see Figure 3.3).

0 2 4 6 8 10 12 −10 −5 0 5 10 Time (sec) Pressure (mmHg)

1. Filtered artifacts using all samples 2. Filtered artifacts using diastolic samples

Figure 3.3. Filtered artifacts using all samples/only diastolic samples.

The proposed algorithm offers some solutions to the problems listed at the beginning of this section. Only stationary, periodical artifacts will be removed. The filter can be adjusted according to the respiratory frequency. The different variations in systolic and diastolic pressures can be handled.

But the method also suffers some drawbacks. It responds poorly to changes in the respiratory frequency. If the patient changes his or hers breathing, it may take several new breaths before the algorithm has adapted. If the patient is ventilated, the respiratory frequency is fixed which will minimize that problem.

Results from compensations using this algorithm is presented in Section 4.4. Not all signals were able to converge due to changes in respiratory frequency, therefore the amount of results from this compensation is limited.

(36)

20 Implementations

3.3

Adaptive Noise Canceler

A common way to reduce noise from a signal when the noise originates form a measurable source is to use an Adaptive Noise Canceler. In such systems, a measured signal y(t) = s(t) + v(t) where s(t) is the desired signal and v(t) is a disturbance signal uncorrelated with s(t). A reference signal for the disturbance u(t) is measured which is highly correlated to the disturbance. The adaptive filter output ˆy(t) is subtracted from the measured signal y(t) to form an error signal ǫ(t) which is used to update the filter. This would be an estimate to s(t)

In this problem, y(t) is the measured blood pressure signal and u(t) would be a reference of the respiratory signal.

The system S in fig. (3.4) is the system describing the transfer of the actual respiratory artifacts to the measured or generated respiration signal.

-s(t)   P -v(t)   7

S u(t)- Adaptive filter

y(t) -ˆ y(t) 6   P ε(t) = ˆs(t) - – +

Figure 3.4. Adaptive Noice Canceler. The signal s(t) is approximated by ε(t).

However, this method can not be used directly in this case. First, there is no correct reference signal for the disturbance. The measured respiratory signal is a measurement of the level of CO2, not the intra-thoracic pressure, and must first

be processed before it can be used as a reference. How this preprocessing is done is described next in Section 3.3.1.

(37)

3.3 Adaptive Noise Canceler 21

3.3.1

Preprocessing the measured respiration signal

Since the measured respiration signal is a measurement of the level of CO2in the

patients expiration air, not a direct measurement of respiratory pressure changes inside the chest, the signal is not suited to be used directly as a reference signal to the adaptive filter. The appearance of the signal is different from the artifacts seen in blood pressure. An example of this is displayed below in Figure 3.5.

59 60 61 62 63 64 0 5 10 15 20 25 Time (sec) Units CO 2 59 60 61 62 63 64 −2 −1.5 −1 −0.5 0 0.5 1 1.5 Time (sec) Pressure (mmHg)

Figure 3.5. Left : Measured respiratory signal. Right: The corresponding actual

artifacts, approximated from the blood pressure signal.

A ventilated patient will probably produce a similar respiratory signal but the corresponding artifacts in the pressure signal will be different (see Section 2.2.2). These effects make the measured signal hard to work with directly. Instead, a new respiratory signal is generated from the acquired. To generate this new signal, the measured respiratory signal is analyzed and the start, stop, and a max point Rmax for each breath is calculated.

From the calculated values, a function is generated with the same length as the original. The signal is generated by adjusting a sinus-curve to match length, amplitude changes or adjust for an intubated patient.

The new curve is generated by the following formula p(t) =      Ainspsin(t), 0 ≤ t < π/2 Ainsp 

sin(t) − (sin(t) − 1)1+Aexp

2



, π/2 ≤ t < 3π/2

−Aexpsin(t), 3π/2 ≤ t < 2π

(3.19) where Aexpis the expected change in pressure during expiration compared to the

inspiration Ainsp. If the patient is free-breathing, the value of Ainsp is assumed

to be about −Aexp, meaning the change during expiration is the opposite from

inspiration. For a mechanically ventilated patient on the other hand, Aexpcan be

assumed to be around 0.1Ainsp, indicating a constant positive pressure, highest

during inspiration.

The change in amplitude between breaths is adjusted by the variable Ainsp

which is set to Rmax. The equation (3.19) was created in an ad hoc fashion

(38)

22 Implementations

in [16] and the appearance of artifacts in the signal from non-ventilated patients available here.

An example of how a generated signal will appear, compared with the original, is displayed below in Figure (3.6).

0 5 10 15 20 −30 −20 −10 0 10 20 7 8 9 10 11 12 13 14 15 16 17 −5 0 5 10 15 20 Time (sec)

Figure 3.6. Top : Original measured respiration. Middle : Corresponding generated

respiration (free breathing, Ainsp = −1, Aexp = 1. Bottom : Corresponding generated

respiration (mechanically ventilated, Ainsp= 1, Aexp= 0.1

The curves in Figure (3.6) is generated in an off-line implementation, where the measured and generated curves can be aligned. In a real-time implementa-tion, where the length and amplitude of a breath is not known in advance, such alignment is not possible and the length of a new generated breath can not be determined before an entire breath has been measured. The updates in length and amplitude will then be delayed one breath. But it is assumed that the length and amplitude of a breath vary slowly. If this is accurate, using the length of the last breath as a approximation of the current breath, is a valid assumption and will work adequately.

In the case of ventilated patients, the respiration is at a fixed rate and ampli-tude, and this will not be a problem.

(39)

3.3 Adaptive Noise Canceler 23

3.3.2

Applying the generated respiratory reference

When a reference signal is created, the actual compensation can begin.

The problem can now be described much like in Section 3.2, but instead of modeling the respiration as a sinus, there is a reference signal available which is supposed to be highly correlated with the respiration. There is then to decide how to model ˆy(t), the estimation of the respiratory artifacts in the blood pressure signal.

This can be done by describing ˆy(t) as an FIR-model, defined as ˆ

y(t) = w1(t)u(t − 1) + ... + wm(t)u(t − m) + e(t).

By letting ˆ

w(t) = [w1(t), .., wn(t)]T (3.20)

x(t) = [u(t), .., u(t − m)]T, (3.21)

the result of the system can then be written as ˆ

ε(t) = y(t) − ˆy(t), (3.22)

where ˆ

y(t) = ˆw(t)Tx(t). (3.23)

The filter weights can then be updated according to alg. (1) (Normalized Mean Square) or alg. (2) (Recursive Mean Square). To keep computational cost down to get real-time performance, the Normalized Least Mean Square adaptation is chosen.

If the low-frequency variations in the diastolic pressure appears as a phase-shifted version in systolic pressure, a normal filter approach will not give a correct result. The filtered curve will be some kind of middle-way between the two curves, not describing any of the effects correctly. To counter this problem, only the end-diastolic pressure is used for updating the adaptive algorithm. This ensures that the correct respiratory artifact is reduced.

(40)

24 Implementations

3.4

Compensating for Systolic Pressure Variations

The adaptive compensations described in Section 3.2 and 3.3 only compensate for the respiratory artifacts visible in the diastolic pressure since this corresponds to the pressure variations in the chest caused by respiration. There are however still respiratory induced variation in systolic pressure that might be interesting to compensate for to completely eliminate respiratory variations.

As described in Section 2.2.4, RSA is a phenomenon variating the heart rate, causing variations in systolic pressure. In this section, a method to compensate for these systolic pressure variations in aortic pressure is proposed. The compensation is considered to be applied after the low-frequency variations from intra-thoracic pressure has been removed.

Before calculating a compensation it is important to determine if it really is this effect that is being compensated for. Therefore, a test for detecting RSA is implemented.

3.4.1

Detecting RSA

If RSA should be compensated for, it has to be detectable in the pressure signal. Several tests exist. Since the methods should be able to show work in real-time, a test constructed by Dinh et al. [6] is implemented. The test has been shown to work for ventilated as well as free-breathing patients, and does not require the patient to follow a specific breathing pattern, which is required by some other methods.

The idea is to look for a pattern in the heart-rate variations during a breath. A breath is defined as the sequence between two zero-crossings in the removed low-frequency artifact signal. The instantaneous heart rate for each beat in the sequence is h = [h1, ..., hN] where N is the number of beats in the sequence.

The heart-rate is calculated using a ECG-signal by identifying the easy-detectable R-peaks (see Section 2.1.3). With R(n) representing the sample when beat n is detected, the heart-rate is calculated as

hn =

1

R(n) − R(n − 1)Fs (3.24)

where Fs is the sample frequency. Secondly, the mean heart-rate h is calculated

for the breath as h = 1 N N X n=1 hn, (3.25)

which is used to calculate the relative heart rate, r, defined as the difference of the actual heart rate to the mean rate over a given window [6].

r= h − h (3.26)

This will work as a detrending procedure for the heart rate, suppressing other low-frequency variations.

(41)

3.4 Compensating for Systolic Pressure Variations 25

If RSA is present, the heart rate will increase during inspiration and decrease during expiration. This is tested by creating the test variable

T =

N

X

n=1

r(n)c(n) (3.27)

where c is a contrast, defined asnc(n), n ∈ [1, N ],R1Nc(n)dn = 0o. Since the in-spiration is assumed to occupy about half of the breath and expiration the other half, the contrast equals one during the first half of the window and minus one during the second. (See Figure 3.7)

1 N / 2 N −2 −1 0 1 2

Figure 3.7. Contrast used to detect increase during inspiration and decrease during

expiration.

If no RSA is present, the value of r(τ) will not depend on the phase of respi-ration and T can be expected to be negative or positive with equal probability. Otherwise, T will be greater than zero.

With this in mind, a null hypothesis is created :

H0: P (T < 0) = P (T > 0) (3.28)

H1: P (T > 0) > P (T < 0) (3.29)

If the data was assumed to have a normal distribution or if a large number of samples (breaths) where available, the normal t-test could be used to test the hypothesis. Since neither of this can be assumed, the non-parametric Wilcoxon signed rank test is used instead.

The principle of the signed rank test is to assign a rank Ri to every T1, ..., Tm

from m breaths, according to their magnitude. The smallest |Tn| will be ranked 1,

the second ranked 2 and so on. Since the test is based on rank order rather than the actual value measured, the normal distribution assumption is avoided.

The only requirement is that the variable T is independent between different breaths. Some dependence can occur, since a cardiac cycle can stretch over two breaths, but the effect of this would be small.

The null hypothesis is rejected if the test variable

S = X

i:Ti<0

(42)

26 Implementations

which is the sum of the ranks for all negative Ti, does not exceed a set threshold.

The threshold is set to give a 5% significance level.

When applied to available measurements, the test shows the presence of RSA in practically all cases. About eight breaths are required to get an accurate reading of breaths and to get a strong enough significance to the test.

The implementation is not made as a real-time application. Due to the lim-ited length of measurements, about twelve breaths at most, a real-time detection and compensation system would therefore only affect about a third of the signal. Instead, the RSA detection test described is done for the entire signal. If there is a high probability of RSA after the last breath has been analyzed, it is assumed that the phenomenon is present during the whole signal.

The test can however easily be implemented as a true real-time application where continuous data is available for a longer period of time.

3.4.2

Calculating Amount of RSA

If RSA is detected by the test above, the amount of compensation for the effect is calculated.

The method is to calculate a compensation according to the change in instanta-neous heart-rate. This is done by letting the remaining systolic pressure variations, after the compensation for changing intra-thoracic pressure by a method in Section 3.2 or 3.3 has been applied, be modeled as an ARX-model with the input r(n) corresponding to the change in heart-rate.

The systolic pressure for the current heart beat n is denoted pSP(n). The

interesting variations from the mean systolic pressure is then

pSP V ar(n) = pSP(n) − pSP (3.31) pSP = 1 l n X i=n−l pSP(n) (3.32)

where l is the number of heart beats to remember. The ARX-model can be written as

ˆ pSP V ar(n)+a1(n)ˆpSP V ar(n − 1) + ... + aN(n)ˆpSP V ar(n − N ) = (3.33) b1(n)r(n − 1) + ... + bM(n)r(n − M ) + e(n). With ˆ w(n) = [a1(n), .., aN(n), b1(n), .., bM(n)]T (3.34) x(n) = [−ˆpSP V ar(n − 1), ..., −ˆpSP V ar(n − N ), r(n), .., r(n − M )]T. (3.35) the estimated ˆpSP V ar(n) can be written as

ˆ

pSP V ar(n) = ˆw(n)Tx(n) (3.36)

The result of the system can then be written as ˆ

(43)

3.4 Compensating for Systolic Pressure Variations 27

An adaptive algorithm will update the parameters recursively in a similar way as the FIR-model in Section 3.3.2 to minimize the model error between pSP V ar(n)

and ˆpSP V ar(n). Since the adaptation only is performed once every beat, the

more computationally demanding recursive mean square (RLS) can be used. The forgetting factor is set to λ = 0.95 (≈ 20 beats remembered) which gives a fast convergence.

The output ˆpSP V ar(n) is the systolic pressure originating from heart-rate

vari-ations. That is the amount that should be removed from the measured systolic pressure pSP(n). How this pressure is altered from systolic pressure is described

in Section 3.4.4.

3.4.3

Calculating Amount of Other Respiratory Influenced

Systolic Variations

Both adaptive algorithms described in Sections 3.2 and 3.3 can be used to calcu-late the respiratory variations in systolic pressure. In those previous sections the algorithms are adapted using only diastolic pressures. By also applying a second algorithm, only adapting to systolic pressures, the amount of periodic variations at the respiratory frequency can be assessed.

In both adaptive algorithms, the estimated correct pressure is estimated as ˆ

s(t) = y(t) − wT(t)x(t) (3.38)

where y(t) is the measured pressure signal, wT(t)x(t) is an estimate to the

respi-ratory artifacts in diastolic pressure.

The new, second compensation then is written as ˆ

ssp(t) = y(t) − wsp

T(t)x(t) (3.39)

where the filter weights wsp are updated only from systolic pressures.

The amount of systolic pressure in the compensated signal ˆs considered to be respiratory artifacts at beat n is then

ˆ

pSP V ar(n) = ˆssp(tsp(n)) − ˆs(tsp(n)) (3.40)

where tsp(n) is the occurrence in time of the systolic pressure in beat n. Next in

Section 3.4.4 the actual compensation will take place.

3.4.4

Applying Compensation to Systolic Pressure

In both Section 3.4.2 and 3.4.3 an amount of pressure ˆpSP V ar(n) is calculated for

each beat.

To reduce the systolic pressure at beat n by the amount ˆpSP V ar(n) without

al-tering the shape of the signal, a dampening is calculated between the end-diastolic pressure point pEDP(n) and the begin-diastolic pressure point pBDP(n + 1)

sur-rounding the systolic pressure pSP(n) that is being reduced. This is illustrated on

(44)

28 Implementations 0 10 20 30 40 50 60 70 Time (sec) Pressure (mmHg) pSP(n) pEDP(n) pBDP(n + 1) ˆ pSP V ar(n) τ1 τ2

(45)

3.4 Compensating for Systolic Pressure Variations 29

The largest of the two values pEDP(n) and pBDP(n + 1) is chosen as a bottom

level b(n). A dampening constant d(n) should be set so the systolic pressure pSP(n) is reduced by ˆpSP V ar(n).

pSP(n) − b(n) − ˆpSP V ar(n) = (pSP(n) − b(n))d(n) (3.41)

which can be rewritten as

d(n) = pSP(n) − b(n) − ˆpSP V ar(n) pSP(n) − b(n)

(3.42) Every pressure sample p(t) between τ1 and τ2 is altered in the following way :

ˆ p(t) =



(p(t) − b(n))d(n) + b(n), p(t) ≥ b(n)

p(t), p(t) < b(n) (3.43)

This will result in a compensation only during systole, without any transition errors. The shape of the waveform will still be the same as before.

Since future samples such as pBDP(n+1) are required to calculate the

compen-sation, this does not give real-time performance. One solution would be to insert a buffer of a constant size. The buffer should be long enough to always include the entire systolic period and then give access to the samples needed, but this also causes a time-delay.

To avoid this time-delay, some approximations can be made instead of inserting the buffer. First, the bottom level b(n) is approximated by

ˆb(n) = max(pEDP(n), bpBDP(n + 1)) (3.44) where b pBDP(n + 1) = pBDP(n) + σBDP (3.45) σBDP = v u u t1 l n X i=n−l (pBDP(i) − mBDP)2 (3.46) mBDP = 1 i n X i=n−l pBDP(i). (3.47)

Here l is the number of recent pressure points to include in the calculation. The approximation makes sure that ˆb(n) is not underestimated.

The upcoming systolic pressure pSP(n) is approximated by the mean systolic

pressure as ˆ pSP(n) = 1 i n−1X i=n−l pSP(i) (3.48)

(46)

30 Implementations

Every sample p(t) will now be compensated by b d(n) = pˆSP(n) − bb(n) − c(n) ˆ pSP(n) − bb(n) (3.49) b prt(t) = ( (p(t) − bb(n)) bd(n) + bb(n) , p(t) ≥ bb(n) p(t) , p(t) < bb(n) (3.50)

This will give the algorithm real-time performance, but the compensation will not be exact. The difference eτ between the wanted compensation and the actual

real-time compensation is

ert(t) = bp(t) − bprt(t). (3.51)

When the algorithm is applied to measured data, this error has however proved to be small.

An error can also occur if the next pBDP(n) is of a higher magnitude than

bb(n). In such case the compensation is applied during the diastolic period until the pressure is below bb(n) to avoid transition errors. The choices are to accept a time-delay when introducing a buffer or risk small errors in the compensation to acquire true real-time.

Applying such a compensation described here decrease respiratory related vari-ations in systolic pressure. It can be a good complement to the intra-thoracic compensation described in previous sections.

(47)

3.5 Wavelet de-noising 31

3.5

Wavelet de-noising

In this chapter a wavelet based method is implemented to separate respiratory artifacts from the blood pressure signal. First, a short introduction to the wavelet transform is presented. The introduction is mainly based on [21].

3.5.1

Introduction to wavelets

A wavelet is a waveform of effectively limited duration that has an average value of zero. While Fourier analysis is based on sine waves, which are smooth, predictable and have an unlimited duration, wavelets are often irregular and asymmetric. Fourier analysis consists of breaking up a signal into sine waves of various fre-quencies. In a similar way, in wavelet analysis the signal is broken into translated and scaled versions of the original (or mother) wavelet. A signal with sudden changes, like the rise in blood pressure during a ventricular contraction, may be better analyzed with an irregular wavelet than with a smooth sinusoid. It also makes sense that local features can be described better with wavelets that have local extent rather than with a periodical sinus of infinite length. The continuous wavelet transform, which is the basic wavelet transform, is defined as

CW Txψ(τ, s) = 1 p |s| Z x(t)ψ  t − τ s  dt (3.52)

where ψ is the transforming function, the wavelet.

As seen above in eq. (3.52), the transformed signal is a function of two vari-ables, τ and s, the translation and scale parameters. Translation τ describes the location of the wavelet as it is shifted through the measured signal. The scale is defined as

Scale = 1

F requency (3.53)

describing the width of the transforming wavelet. A transformation using high scales describes the signals low frequencies characteristics while low scale capture the high frequency components of the transformed signal.

The definition of the CWT shows that the wavelet transform is a measurement of the similarity between the wavelet ψ and the signal itself. The amplitude of the calculated CWT can be described as the similarity of the signal to the wavelet at the current scale and translation. By applying the transform at different scales, the signal can be decomposed.

Since the sampled signal is discrete rather than continuous, a discrete version of the wavelet transform is used. The discrete wavelet transform (DWT) calculates the wavelet transform of a digital signal using digital filtering techniques. Filters of different cutoff frequencies are used to analyze the signal at different scales. The filters coefficient and length are set according to the chosen wavelet.

A lowpass filter removing all frequencies above half the highest frequency and a corresponding highpass filter removing all components below the same frequency

(48)

32 Implementations

produces the following two components. The low-frequency components are re-ferred to as the approximation and the high frequency components are the details and calculated as ydetail(k) = X n x(n)whigh(k − n) (3.54) yapprox(k) = X n x(n)wlow(k − n) (3.55)

where whigh and wlow are the corresponding highpass and lowpass filters.

After passing the signal through the half band lowpass filter, half of the samples can be removed without losing any information by downsampling the signal with a factor 2. This filtering step can be performed several times to decompose the signal.

Figure 3.9. Left: Wavelet decomposition of a signal s into approximation and detail,

Right : A number of levels of decomposition

Since the low-passed signal is downsampled, the same filter can be used in the next decomposition step.

For a more complete introduction to wavelets, a nice tutorial is given at [21] and there are several books such as [4] written about wavelets.

3.5.2

The Stationary Wavelet Transform

The stationary wavelet transform (SWT) is a variant of the normal DWT, mostly used for denoising. Instead of downsampling the signal after each decomposition step, the filters are upsampled to twice their size by inserting zeros between every second filter coefficient.

The resulting decomposition will be a redundant representation, since all details and the approximation will have the same length as the original signal. This gives a high sample rate in the lower frequency bands which will lead to a smoother result.

References

Related documents

Hodnocení celkového vzhledu oděvních textilií je poměrně složitá metodika. Zasahuje do ní spousta faktoru a některé z nich jsou subjektivní záležitostí, kterou není

FOOD AND AGRICULTURE ORGANIZATION OF THE UNITED NATIONS, INTERNATIONAL ATOMIC ENERGY AGENCY, INTERNATIONAL LABOUR ORGANIZATION, OECD NUCLEAR ENERGY AGENCY, PAN AMERICAN

K analýze dat byl z obou zařízení vybrán pro každou polohu jeden graf, který bude porovnáván s odpovídajícím grafem z druhého zařízení. Učinilo se tak

Från den teoretiska modellen vet vi att när det finns två budgivare på marknaden, och marknadsandelen för månadens vara ökar, så leder detta till lägre

On a number of occasions, the Annual Shareholders’ Meeting of Biotage AB has authorized the Board of Directors to implement employee share option programs directed at all employees.

We recommend that the Annual General Meeting adopt the income statements and balance sheets of the Parent Company and the Group, that the profit in the Parent Company be dealt with in

CiRA has been trained to solve causality detection as a binary classification problem. Specifically, CiRA is capable of classifying single sentences or even multiple

Due to the rail pressure fast transients, the available pressure can vary significantly from the actual pressure at the injector: The given injection ontime