developing a new method for mri triggering using doppler ...1344757/fulltext01.pdf · erly. when...

42
IN DEGREE PROJECT MEDICAL ENGINEERING, SECOND CYCLE, 30 CREDITS , STOCKHOLM SWEDEN 2019 Developing a new method for MRI triggering using Doppler Ultrasound USAMA GAZAY KTH ROYAL INSTITUTE OF TECHNOLOGY SCHOOL OF ENGINEERING SCIENCES IN CHEMISTRY, BIOTECHNOLOGY AND HEALTH

Upload: others

Post on 11-Oct-2020

5 views

Category:

Documents


0 download

TRANSCRIPT

  • IN DEGREE PROJECT MEDICAL ENGINEERING,SECOND CYCLE, 30 CREDITS

    , STOCKHOLM SWEDEN 2019

    Developing a new method for MRI triggering using Doppler Ultrasound

    USAMA GAZAY

    KTH ROYAL INSTITUTE OF TECHNOLOGYSCHOOL OF ENGINEERING SCIENCES IN CHEMISTRY, BIOTECHNOLOGY AND HEALTH

  • ii

  • iii

    AbstractPurpose: Magnetic Resonance Imaging (MRI) is a medical imaging tech-nique used in radiology to produce high quality images of the anatomy andthe physiological processes of the body. Cardiac gating is a triggering systemused for the MRI scanner to synchronize the MRI scanner with the cardiac cy-cle of the patient while imaging. When applying cardiac gating, artifacts thatresults from small movement in the heart and blood �ow are neglected. Re-cent MRI scanners uses Electrocardiogram (ECG) as a cardiac gating method,but with higher magnetic �eld strength the ECG signal get distorted. In thisthesis DUS signal will be examined as a replacement cardiac gating methodfor the MRI scanner. In theory the DUS signal should not be a�ected by thehigh magnetic �eld strength.Methods: Di�erent sets of data were collected from three di�erent subjects.The data contain a synchronized ECG and DUS signal without the e�ect ofthe MRI magnetic �eld. A Filtering and peak detection algorithm were de-veloped in MATLAB to process the DUS signal and the result was comparedto the ECG signal as a reference method.Results: The �ltering algorithm showed good results in terms of being ableto increase the signal to noise ration (SNR) of the signal to enable the pro-cessing phase. The peak detection algorithm was able to detect the peaksin the di�erent data sets with low false positive (19 out of 24 data sets hadlower FP errors then 10%) and false negative errors (17 out of 24 data setshad lower FN errors then 10%). Some data sets had low SNR even after the�ltering phase, peak detection on those data sets were not functioning prop-erly. When comparing the DUS signal to the ECG signal, an average delaywas detected to be around 0.26 seconds for the forward signal and around0.5 seconds for the backward signal.Conclusion: The DUS signal shows promising results to be able to be usedas a cardiac gating method for the MRI scanner.

  • Contents

    1 Introduction 11.1 Research question . . . . . . . . . . . . . . . . . . . . . . . . 2

    2 Methods 42.1 Hardware setup . . . . . . . . . . . . . . . . . . . . . . . . . 42.2 Data collection . . . . . . . . . . . . . . . . . . . . . . . . . . 42.3 Software setup . . . . . . . . . . . . . . . . . . . . . . . . . . 5

    2.3.1 Filtering of the Doppler Ultrasound signal . . . . . . 52.3.2 Peak detection algorithm . . . . . . . . . . . . . . . . 6

    2.4 Evaluation of results . . . . . . . . . . . . . . . . . . . . . . . 72.4.1 Delay and jitter . . . . . . . . . . . . . . . . . . . . . 72.4.2 False positive and false negative . . . . . . . . . . . . 8

    3 Results 93.1 Results from the �ltering algorithm . . . . . . . . . . . . . . 93.2 Results from the peak detection algorithm . . . . . . . . . . 113.3 Evaluation of the Doppler Ultrasound signal compared to the

    reference ECG signal . . . . . . . . . . . . . . . . . . . . . . 13

    4 Discussion 174.1 Data acquisition . . . . . . . . . . . . . . . . . . . . . . . . . 174.2 The �ltering algorithm . . . . . . . . . . . . . . . . . . . . . 174.3 The peak detection algorithm . . . . . . . . . . . . . . . . . 184.4 Evaluation of the method . . . . . . . . . . . . . . . . . . . . 184.5 Future work . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

    5 Conclusions 20

    Bibliography 21

    v

  • vi CONTENTS

    A Theoretical background 1A.1 Magnetic Resonance Imaging . . . . . . . . . . . . . . . . . . 1

    A.1.1 Magnetic Resonance Imaging principles . . . . . . . 2A.1.2 Excitation . . . . . . . . . . . . . . . . . . . . . . . . 3A.1.3 Relaxation . . . . . . . . . . . . . . . . . . . . . . . . 4A.1.4 MRI synchronization . . . . . . . . . . . . . . . . . . 4A.1.5 The magnetohydrodynamic e�ect . . . . . . . . . . . 6A.1.6 The 7 Tesla facility in Lund . . . . . . . . . . . . . . 6

    A.2 Doppler Ultrasound . . . . . . . . . . . . . . . . . . . . . . . 7A.3 Digital signal processing . . . . . . . . . . . . . . . . . . . . 7

    A.3.1 Digital �lters . . . . . . . . . . . . . . . . . . . . . . 8A.3.2 Anti-aliasing �lter . . . . . . . . . . . . . . . . . . . 8A.3.3 Quadrature signals . . . . . . . . . . . . . . . . . . . 8A.3.4 Complex band-pass �lter . . . . . . . . . . . . . . . . 9

    A.4 Evaluation of results . . . . . . . . . . . . . . . . . . . . . . . 10A.4.1 Delay . . . . . . . . . . . . . . . . . . . . . . . . . . 10A.4.2 Jitter . . . . . . . . . . . . . . . . . . . . . . . . . . . 11A.4.3 False positive and false negative . . . . . . . . . . . . 11

  • Chapter 1

    Introduction

    Magnetic Resonance Imaging (MRI) is a medical imaging technique used inradiology to produce high quality images of the anatomy and the physiolog-ical processes of the body [1]. MRI uses a strong magnetic �eld and radiowaves to generate images of the body. More in detail, MRI uses the fact thatthe body consists of roughly 70% water. Water molecules contain hydrogenatoms, and when the hydrogen atoms get exposed to high magnetic �eld thehydrogen atoms become aligned with the magnetic �eld of the MRI scanner(the protons magnetic �eld precess around the Z axis). To be able to detectthe magnetic �eld of the hydrogen atoms, a radio wave is sent to �ip thespins of the hydrogen atoms to precess around the X and Y axis. When theradio wave is turned o�, the atoms gradually return to their normal spin.The �ip and return process produces an echo in a form of a radio signal thatcan be measured by receivers in the scanner and made into an image [2].To construct the �nal image several echoes needs to be taken by the MRIscanner.

    When using MRI the body movement needs to be limited as much aspossible to increase the quality of the image. Since one image needs severalechoes, all echoes that are needed to construct an image should be takenwhile the body is in the same position in each sequence. But there are somebody movements that can not be eliminated such as the heart beat, breathingand blood �ow. Therefore a triggering system needs to be used to synchro-nise the MRI imaging sequences with the cardiac cycle. This is to ensurethat each echo of the MRI is taken with as little as possible body movementcompared to the next echo [3].

    Recent MRI scanners use Electrocardiogram (ECG) to synchronise thesampling sequence of the MRI scanner. However, ECG signals are distorted

    1

  • 2 CHAPTER 1. INTRODUCTION

    during MRI scans due to the Magnetohydrodynamic (MHD) e�ect, radiofrequency pulses and fast-switching magnetic �eld gradients [4]. To avoidthis problem several techniques have been tested that are in theory not af-fected by the MHD e�ect, such as Pulse Oximetry (POX), acoustic gatingand Doppler Ultrasound (DUS) [5]. POX is the easiest and cheapest methodto implement but in theory the acquired POX signal will have a delay com-pared to the ECG signal. This delay is caused by the nature of the POX signalwhich is taken normally from the �nger of the patient. Since the pressurehas to �ow from the heart to the �nger before a signal is generated, a delayin the POX signal will occur. This delay makes the POX method unreliable.

    Acoustic gating is a method that uses phonocardiography to determinethe cardiac cycle. This method is a promising method for cardiac gating butsince we do not have access to any acoustic gating device in Lund’s researchfacilities any research on this �eld could not be done in this thesis.

    DUS has been used in several MRI applications for motion and organtracking and has shown promising results [6]. In a recent study, DUS hasbeen used as cardiac gating method for MRI. The result of that researchshowed that the DUS setup needs further improvements in the algorithmof the signal �ltering and peak detection [7]. Hence, the aim of this workwas to examine the performance of DUS as a triggering method for the MRIscanner. To compare the results the performance of the DUS signal will becompared to the ECG signal as a reference method. This is because in thecurrent MRI scanners, ECG is the method that is used for cardiac gating.

    1.1 Research questionIn this thesis I will examine the usage of DUS signals to replace the ECGsignals as a trigger for the MRI scanner.Speci�cally:

    • Data gathering: A synchronized DUS- and ECG signals will be ac-quired from di�erent subjects without the e�ect of the MRI magnetic�eld.

    • Data processing The synchronized signal will be processed and ana-lyzed using MATLAB.

    – A �ltering algorithm will be developed to increase the SNR of thesignal.

  • CHAPTER 1. INTRODUCTION 3

    – A peak detection algorithm will be developed to detect the peaksin the signal.

    • Evaluate the results The result of the DUS signal will be comparedto the ECG signal as a reference signal. The evaluation will be in termsof; delay, jitter, false positive- and false negative errors.

  • Chapter 2

    Methods

    This section is divided into four parts; hardware setup, data collection, soft-ware setup and evaluation of results. The hardware setup section describesthe hardware device that is used to collect the data for this study. The datacollection section describes the di�erent data that is included in this study.The software setup section describes the software algorithm that is used toprocess the ECG and DUS signals. Finally, the evaluation of results describeshow the results are being evaluated in terms of comparing the DUS signal toECG signal as a reference.

    2.1 Hardware setupTo acquire data for this thesis, a commercial DUS device with synchronizedECG was used provided from Northh Medical (Hamburg, Germany). Thedevice have a built in ECG device that gives analog output ECG signal. TheDUS signal is acquired by sending an ultrasound signal of 1 MHz towards theheart of the volunteer. The re�ected signal will have a shift in the frequencybeing slightly larger or slightly lower then the transmitted frequency. Thefrequency shift corresponds to the motion of the measured tissue. The outputDUS signal is a complex signal that have two parts the real part I (in-phase)and the imaginary part Q (quadrature).

    2.2 Data collectionThe data that were used in this thesis are taken from three di�erent subjectsand are acquired without the e�ect of the MRI magnetic �eld. DUS signal

    4

  • CHAPTER 2. METHODS 5

    is acquired from two di�erent locations in the chest area for each subject.Two di�erent DUS data collection were preformed from each location; 60seconds free breathing, and 15 second breath hold. In each measurementtwo di�erent DUS signals were measured, one to represent the heart wallmotion caused by the contraction and relaxation phases of the heart and thesecond to represent the blood �ow in the aorta caused by the blood pumpingfunction of the heart. This results in 24 di�erent data sets to study. All dataare acquired by the same device.

    2.3 Software setupIn order to get an interpretable signal, the noise must be extracted from thesignal and the desired signal must be ampli�ed. This was done to obtaina high signal-to-noise ratio (SNR) which thus facilitates the analysis of thesignal. For this reason, a �ltering algorithm was developed for the acquiredDUS signals.

    When the signal was interpreted, a peak detection algorithm was imple-mented on the �ltered signal. The result of the peak detection algorithmwas compared to the ECG peak detection method as a reference. Both the�ltering algorithm and the peak detection algorithm were developed usingMATLAB 2018b (The MathWorks Inc, Natick, United States).

    2.3.1 Filtering of the Doppler Ultrasound signalThe method of the �ltering algorithm of the DUS signal is described in thefollowing steps:

    1. A Low-pass �lter at 4 kHz was applied: To be able to resample thesignal it is important to implement a low-pass �lter before the resam-pling step to eliminate aliasing in the signal.

    2. Resampling the signal from 16 kHz to 4 kHz: The �ltering algo-rithm started with a resampling step from 16 kHz to 4 kHz. This wasdone to minimize the size of data in the signal. Large unused data willslow the algorithm, and since the signal is used to acquire informa-tion about the cardiac cycle which can be at maximum 220 pulses ina minute 4 kHz sampling rate is enough. Therefore all data that havehigh frequency will not have any information about the heart rate ofthe patient.

  • 6 CHAPTER 2. METHODS

    3. The Q and I signals are added together: After the resampling stepthe Q and I DUS signals were added together, where I was the real partand Q the imaginary part of the signal described in the formula,

    Signal = I + iQ.

    4. A complex band-pass �lter was applied: The complex band-pass�lter (as described in the appendix) was applied to generate the for-ward DUS signal and the backward DUS signal.

    5. A �nal low-pass �lter at 100 Hz was applied: Finally, a low-pass�lter was applied for both signals to �lter the unwanted high frequencyin the forward and backward signals. The cuto� frequency of the �nallow-pass �lter was 100 Hz. This was chosen since it is known that thedata that acquire information about the heart rate does not have higherfrequency then 4-5 Hz because of the limitation of the heart pumpingrate.

    2.3.2 Peak detection algorithmThe peak detection algorithm was developed in such a way to mimic a realtime situation, because in a real situation the algorithm does not have accessto all the data as it does now. In a real situation, the DUS data are beinggathered in the same time as the MRI scanner is running. The algorithm isbuild so it in theory could work for a real situation purpose. This is done byhaving 5 seconds of data to treat at each time and adding new data in a forloop. The construction of the peak detection algorithm is described in thefollowing steps:

    1. Creating a bu�er that holds 5 seconds of DUS data at a time.

    2. Creating a for loop that adds 1 second of DUS data to the end of thebu�er every time until it reaches the end of the DUS signal.

    3. Data removal When new DUS data are added old DUS data are re-moved from the beginning of the bu�er.

    4. Peak detection implementation For each for loop a peak detectionis applied on the bu�er to �nd the peaks in the 5 second bu�er signal.

    5. Saving the peaks The peaks found in the bu�er are added to a �nalmatrix that holds all the peaks in the DUS signal.

  • CHAPTER 2. METHODS 7

    6. Presentation of all peaks When the peak detection algorithm hastreated all the signal. The algorithm presents all the the peaks on theplotted DUS signal and the plotted ECG reference signal.

    2.4 Evaluation of resultsThe results of the peak detection algorithm for the DUS signal was comparedto the algorithm applied for the ECG signal. The algorithm was compared interms of; delay, accuracy , jitter and false positive/false negative.

    2.4.1 Delay and jitterThe delay in the DUS signal was measured by comparing the position of thepeaks in the DUS signal compared to their position in the reference ECGsignal. The jitter e�ect in the DUS signal was measured by taking standarddeviation of the time for each cardiac cycle (time from peak to peak) in theDUS signal. The jitter e�ect in the DUS signal will be compared to the jittere�ect in the ECG signal. To have a better understanding of this have a lookat Figure 2.1.

    Figure 2.1: The ECG signal and the DUS signal with marked peaks, wherethe blue signal is the ECG signal and the red signal is the DUS signal. Delayis taken by comparing the position of each peak in the DUS signal comparedto its location at the ECG signal. Jitter is measured by taking the standarddeviation of the peak to peak time in the DUS signal

  • 8 CHAPTER 2. METHODS

    2.4.2 False positive and false negativeFalse positive (FP) errors were measured by counting the number of timesthe peak algorithm shows a peak in the DUS signal when there were no peakin that location of the ECGsignal. False negative (FN) errors were measuredby counting the number of times the peak algorithm does not show a peakin the DUS signal when there were a peak present in the ECG signal.

  • Chapter 3

    Results

    3.1 Results from the filtering algorithmThe signal is presented after each step in the �ltering algorithm. Figure 3.1shows the raw Q and I signals. Figure 3.2 shows the signal after it beingresampled and added as a complex signal. Finally Figure 3.3 and Figure 3.4shows the signals after the last step, the complex band pass �lter. The �lter-ing algorithm divides the signal into two di�erent signals, one to representthe forward DUS signal in Figure 3.3 and the second to represent the back-ward DUS signal in Figure 3.4. All of these �gures are taken from the �rstdata set of the 24 studied.

    Figure 3.1: The raw Q and I DUS signals. The blue signal in the Figure rep-resent the Q DUS signal and the red signal in the Figure represent the I DUSsignal

    9

  • 10 CHAPTER 3. RESULTS

    Figure 3.2: The absolute value of the added complex DUS signal

    Figure 3.3: The forward DUS signal after the �ltering algorithm

  • CHAPTER 3. RESULTS 11

    Figure 3.4: The backward DUS signal after the �ltering algorithm

    3.2 Results from the peak detection algorithmThe result of the peak detection algorithm is presented in Figure 3.5 and Fig-ure 3.6. Figure 3.5 represent the forward DUS signal and Figure 3.6 representthe backward DUS signal. Some data sets su�ered from low SNR even afterthe �ltering algorithm. Theses data enable FP and FN errors when applyingthe peak detection algorithm on them. Figure 3.7 and 3.8 shows DUS signalsthat su�ers from low SNR resulting in high FN errors in Figure 3.7 and highFP errors in Figure 3.8.

  • 12 CHAPTER 3. RESULTS

    Figure 3.5: The forward DUS signal after the �ltering and peak detectionalgorithm

    Figure 3.6: The backward DUS signal after the �ltering and peak detectionalgorithm

  • CHAPTER 3. RESULTS 13

    Figure 3.7: The forward DUS signal with low SNR which enable high FNerrors after the peak detection algorithm

    Figure 3.8: The backward DUS signal with low SNR which enable high FPerrors after the peak detection algorithm

    3.3 Evaluation of theDoppler Ultrasound sig-nal compared to the reference ECG sig-nal

    The evaluation of all 24 data sets of the DUS signal is compared with theECG signal as a reference signal. The comparison in terms of; delay, jitter,

  • 14 CHAPTER 3. RESULTS

    false positive and false negative is presented in Table 3.1 for the forward DUSsignal and Table 3.2 for the backward DUS signal.

  • CHAPTER 3. RESULTS 15

    Table 3.1: The evaluation of the forward DUS signal in terms of; delay com-pared to the ECG signal, jitter e�ect in the DUS signal and FP and FN errorsin the DUS signal

    Evaluation of the forward DUS signalData sets Delay

    (s)Jitter(s)

    JitterECG

    FP (%) FN (%) SNR

    S1 P1 15s Wall 0.318 0.064 0.017 0% 0% 7.1Blood 0.309 0.053 0.017 0% 0 % 3.3

    60s Wall 0.333 0.062 0.031 2% 0% 2.5Blood 0.356 0.235 0.031 1% 1% 2.1

    P2 15s Wall 0.287 0.064 0.017 0% 0% 3.5Blood - - 0.017 0% 100% 1.3

    60s Wall 0.321 0.090 0.044 0% 19% 2.1Blood - - 0.044 0% 96% 1.5

    S2 P1 15s Wall 0.233 0.006 0.007 0% 0% 3.7Blood - - 0.007 70% 0% 1.6

    60s Wall 0.230 0.027 0.023 1% 0% 2.6Blood 0.300 0.423 0.023 15% 6% 2.1

    P2 15s Wall 0.249 0.084 0.011 0% 0% 3.4Blood 0.267 0.244 0.011 0% 11% 2.3

    60s Wall - - - - - -Blood 0.320 0.159 0.018 0% 31% 1.9

    S3 P1 15s Wall 0.217 0.167 0.015 0% 0% 4.1Blood - - 0.015 0% 53% 1.7

    60s Wall 0.240 0.350 0.039 25% 0% 1.9Blood 0.230 0.286 0.039 3% 0% 2.9

    P2 15s Wall 0.121 0.044 0.013 0% 0% 3.6Blood 0.235 0.121 0.013 0% 0% 4.1

    60s Wall 0.268 0.078 0.078 0% 0% 3.5Blood 0.210 0.293 0.078 25% 0% 1.9

    STD Wall 0.060 0.094 0.020 7.16% 5.48% 1.40Flow 0.051 0.115 0.020 20.6% 37.8% 0.821

    STD (Wall + Flow) 0.045 0.207 0.020 15.8% 29.5% 1.28Mean Wall 0.256 0.094 0.026 2.33% 1.58% 3.45

    Flow 0.278 0.227 0.026 9.5% 24.8% 2.23Mean (Wall + Flow) 0.266 0.15 0.026 6.45% 13.8% 2.81

  • 16 CHAPTER 3. RESULTS

    Table 3.2: The evaluation of the backward DUS signal in terms of; delaycompared to the ECG signal, jitter e�ect in the DUS signal and FP and FNerrors in the DUS signal

    Evaluation of the backward DUS signalData sets Delay

    (s)Jitter(s)

    JitterECG

    FP (%) FN (%) SNR

    S1 P1 15s Wall 0.532 0.028 0.017 0% 0 % 7.1Blood 0.554 0.037 0.017 0% 0% 5.3

    60s Wall 0.468 0.179 0.031 8% 0% 3.7Blood 0.452 0.040 0.031 0% 0% 3.5

    P2 15s Wall 0.513 0.032 0.017 0% 0% 4.2Blood 0.509 0.033 0.017 0% 0% 4.6

    60s Wall 0.475 0.096 0.044 0% 0% 3.5Blood 0.512 0.212 0.044 0% 0% 3.7

    S2 P1 15s Wall - - 0.007 88% 5% 1.9Blood 0.502 0.167 0.007 5% 0% 3.2

    60s Wall 0.560 0.366 0.023 0% 20% 2.2Blood - - 0.023 85% 1% 1.4

    P2 15s Wall 0.568 0.191 0.011 0% 11% 2.3Blood 0.579 0.380 0.011 5% 23% 2.1

    60s Wall 0.271 0.214 0.018 1% 0% 4.0Blood - - 0.018 0% 73% 1.5

    S3 P1 15s Wall 0.170 - 0.015 0% 45% 1.3Blood - - 0.015 0% 100% 1.2

    60s Wall 0.130 0.577 0.039 0% 14% 2.9Blood 0.135 0.255 0.039 18% 27% 2.6

    P2 15s Wall 0.551 0.278 0.013 20% 0% 2.3Blood 0.586 0.281 0.013 20% 0% 2.3

    60s Wall - - 0.078 77% 1% 1.9Blood - - 0.078 66% 0% 1.7

    STD Wall 0.168 0.174 0.020 31.6% 13.48% 1.56Flow 0.146 0.133 0.020 28.7% 33.6% 1.32

    STD (Wall + Flow) 0.156 0.152 0.020 20.0% 25.5% 1.43Mean Wall 0.424 0.218 0.026 16.2% 8.00% 3.11

    Flow 0.479 0.217 0.026 16.6% 18.7% 2.76Mean (Wall + Flow) 0.448 0.204 0.026 16.4% 13.3% 2.93

  • Chapter 4

    Discussion

    4.1 Data acquisitionIn this thesis 24 data sets have been studied, where all of them di�ers inappearance. This is due to the fact that those data sets di�ers from each otherin; the position they are taken from (two di�erent positions in the chest areaare used), the measured entity (two di�erent functions are measured: heartwall motion and blood �ow), and the measurement procedure (two di�erentprocedures are measured: 15 sec hold breath and 60 seconds free breathing).

    The data acquisition could be improved in the sense of being more con-sistent in appearance. The acquisition of a good consistent DUS signal re-quires training when it comes to the positioning of the ultrasound trans-ducer. When comparing the acquired data sets in this thesis, the amplitudeof the signal di�ers from each data sets. This di�erentiation makes it harderfor the peak detection algorithm to process all of those di�erent data setswith di�erent amplitudes. The algorithm needs to be adjusted slightly foreach data set to be able to achieve the desired results. To overcome thisproblem, an automatic amplitude adjustment function needs be added to thealgorithm. In this case the algorithm would be able to process di�erent datawith di�erent amplitudes.

    4.2 The filtering algorithmThe �ltering algorithm is functioning as desired when it comes to �lteringthe noise data from the signal and amplify the needed data in the signal. The-oretically, all the sources of noise are treated and �ltered and the algorithmful�lls the function of improving the SNR of the measured DUS signal.

    17

  • 18 CHAPTER 4. DISCUSSION

    Since there are di�erent data sets that have been studied and they dif-fers in appearance from each other, the developed algorithm was developedcarefully to be user friendly, so that the parameters of the �ltering algorithmcould be adjusted easily to suit di�erent types of DUS signals.

    4.3 The peak detection algorithmThe peak detection algorithm has shown good results. When the signal isconsistent the algorithm has been able to detect all the peaks in the DUSsignal compared to the ECG signal as a reference. The biggest challenge forthe peak detection algorithm to work was to feed it with a consistent DUSsignal that has around the same SNR.

    One of the errors observed while gathering the results was that in somesignals, some parts have a low SNR which in return make the it impossiblefor the peak detection algorithm to detect a peak there. It is thought that thiserror depends on small movements on the ultrasound transducer while ac-quiring the data. Some adjustments in the �ltering algorithm may be neededto overcome such errors.

    When observing the results in Figure 3.1 and Figure 3.2, it shows that forthe majority of the data sets the FP and the FN is 0%. That means that thepeak detection algorithm worked perfectly on those data sets. The data setsthat have FP and/or FN errors su�ers from low SNR on some parts of thesignal which enable FP and FN errors. To achieve a 0% FP and/or FN errorsthe minimum SNR required is more then 3 (see Table 3.1 and Table 3.2).

    4.4 Evaluation of the methodWhen comparing the DUS signal with the ECG signal, a delay in the DUSsignal is present as expected. The physiological explanation of this error isthat the ECG signals acquire the electrical signals in the heart cells to gener-ate a signal, while DUS acquire the displacement of the blood to generate asignal (see Appendix A.4.1). For the purpose of this thesis, a delay in peaksin the DUS signal compared to the ECG signal is not unacceptable as longas the delay is consistent. In clinical use, the MRI scanner uses a delay afterthe detection of peaks in the ECG signal, if the DUS signal has a delay com-pared to the ECG and it is consistent the MRI scanner could be programmedto take account for that consistent delay. However, if the delay is inconsis-tent it would be unpractical to use a DUS signal that have inconsistent delays

  • CHAPTER 4. DISCUSSION 19

    since it would a�ect the MRI scanner timings resulting in artifacts in the MRIimages.

    The jitter e�ect in the DUS signal is slightly higher compared to the ECGsignal as observed in Table 3.1 and Table 3.2. However, it is believed thatit will not have any e�ect on the MRI scanner. FP and FN errors were notpresent for the major part of the data sets. although, some data sets su�ersfrom one of those errors. The FN errors were at it maximum in the 18thdata set (Subject 3, Pos 1, 60 sec, Blood �ow) see Figure 3.7. The FP errorswere at it maximum in the 9th data set (Subject 2, Pos 1, 15 sec, Wall motion)see Figure 3.8. The reason behind those errors are discussed in the previouschapter.

    4.5 Future workThe result of this research is that the usage of the DUS signal as a cardiacgating method for the MRI scanner shows promising results. Before a con-clusion can be made about the DUS as a cardiac gating method for the MRIscanner more practical research should be done. Such as implementing thismethod on a hardware and acquire DUS signals under the e�ect of the mag-netic �eld of the MRI scanner.

    For future work, the �ltering and peak detection algorithm needs to beadjusted to be able to handle di�erent data sets that have di�erent appear-ance. Also a microcontroller that would be able to receive DUS signals andregulate the MRI scanner should be programmed with the developed �lter-ing algorithm and peak detection algorithm and observe the results of thosemethods when they are applied in a practical usage. It is thought that someadjustments will be needed on the developed algorithms since programmingin a MATLAB environment di�ers from programming in a microcontrollerenvironment.

  • Chapter 5

    Conclusions

    After completion of this thesis work, it can be concluded that,

    • The �ltered DUS signal shows clear peaks in the signal that representthe cardiac cycle.

    • The developed peak detection algorithm was able to detect the peaksin the DUS signals as long as the DUS signals were consistent.

    • The DUS signal shows promising results to be able to be used as acardiac gating method for the MRI scanner.

    20

  • Bibliography

    [1] Joseph P Hornak. “The Basics of MRI”. In:Biomedical Engineering (2008).issn: 1431-8784. doi: citeulike-article-id:591572.

    [2] Tanya Lewis. What is an MRI (Magnetic Resonance Imaging)? 2014.

    [3] Lanzer et al. “ECG-synchronized cardiac MR imaging: method andevaluation.” In: Radiology (1985). issn: 0033-8419. doi: 10.1148/radiology.155.3.4001369.

    [4] Marcus Schmidt et al. “Filtering of ECG signals distorted by magnetic�eld gradients during MRI using non-linear �lters and higher-orderstatistics”. In: Biomedizinische Technik 63.4 (2018), pp. 395–406. issn:00135585. doi: 10.1515/bmt-2016-0232. arXiv: 1807.11359.

    [5] Fabian Kording et al. “Doppler Ultrasound Triggering for Cardiovas-cular MRI at 3T in a Healthy Volunteer Study”. In: Magnetic Resonancein Medical Sciences (2017). issn: 14321955. doi: 10.1007/s00436-016-5269-x.

    [6] Fabian Kording et al. “Doppler ultrasound compared with electrocar-diogram and pulse oximetry cardiac triggering: A pilot study”. In:Mag-netic Resonance in Medicine (2015). issn: 15222594. doi: 10.1002/mrm.25502.

    [7] Karin Markenroth Bloch, Fabian Kording, and Johannes Töger. “In-tracranial �ow measurements at 7T gated with Doppler Ultrasound”.In: Proc. Joint Annual Meeting ISMRM-ESMRMB, Paris, France. 2018.

    [8] Bottomley et al. “A review of 1H nuclear magnetic resonance relax-ation in pathology: Are T1 and T2 diagnostic?” In: Medical Physics(1987). issn: 00942405. doi: 10.1118/1.596111.

    [9] Cheng et al. “Susceptibility-weighted imaging: technical aspects andclinical applications, part 1.” In: AJNR. American journal of neuroradi-ology (2009). doi: 10.3174/ajnr.A1400.

    21

    https://doi.org/citeulike-article-id:591572https://doi.org/10.1148/radiology.155.3.4001369https://doi.org/10.1148/radiology.155.3.4001369https://doi.org/10.1515/bmt-2016-0232http://arxiv.org/abs/1807.11359https://doi.org/10.1007/s00436-016-5269-xhttps://doi.org/10.1007/s00436-016-5269-xhttps://doi.org/10.1002/mrm.25502https://doi.org/10.1002/mrm.25502https://doi.org/10.1118/1.596111https://doi.org/10.3174/ajnr.A1400

  • 22 BIBLIOGRAPHY

    [10] Le Bihan et al. “MR imaging of intravoxel incoherent motions: appli-cation to di�usion and perfusion in neurologic disorders.” In: Radiol-ogy (2014). issn: 0033-8419. doi: 10.1148/radiology.161.2.3763909.

    [11] Jos Westenberg et al. “Bramwell-Hill modeling for local aortic pulsewave velocity estimation: A validation study with velocity-encodedcardiovascular magnetic resonance and invasive pressure assessment”.In: Journal of CardiovascularMagnetic Resonance (2012). issn: 10976647.doi: 10.1186/1532-429X-14-2.

    [12] Jiming Zhang and Raja Muthupillai. “Magnetic resonance elastogra-phy”. In: Handbook of Imaging in Biological Mechanics. 2014. isbn:9781466588141. doi: 10.1201/b17566.

    [13] Marc André Weber et al. “Comparison of Arterial Spin-Labeling Tech-niques and Dynamic Susceptibility-Weighted Contrast-Enhanced MRIin Perfusion Imaging of Normal Brain Tissue”. In: Investigative Radiol-ogy (2003). issn: 00209996. doi: 10.1097/01.rli.0000084890.57197.54.

    [14] Jacobus F. A. Jansen et al. “1 H MR Spectroscopy of the Brain: AbsoluteQuanti�cation of Metabolites ”. In: Radiology (2007). issn: 0033-8419.doi: 10.1148/radiol.2402050314.

    [15] Emanuel Kanal et al. “ACR guidance document on MR safe practices:2013”. In: Journal ofMagnetic Resonance Imaging (2013). issn: 10531807.doi: 10.1002/jmri.24011.

    [16] Levitt. Spin Dynamics: Basics of NuclearMagnetic Resonance. 2000. isbn:9780470511183. doi: 10.1002/cmr.a.20130.

    [17] Donald B. Plewes and Walter Kucharczyk. Physics of MRI: A primer.2012. doi: 10.1002/jmri.23642.

    [18] Lars G. Hanson. “Is quantum mechanics necessary for understand-ing magnetic resonance?” In: Concepts in Magnetic Resonance Part A:Bridging Education and Research (2008). issn: 15466086.doi: 10.1002/cmr.a.20123.

    [19] Evert J Blink. MRI : Physics. 2013.

    [20] Stuart Currie et al. Understanding MRI: Basic MR physics for physicians.2013. doi: 10.1136/postgradmedj-2012-131342.

    https://doi.org/10.1148/radiology.161.2.3763909https://doi.org/10.1148/radiology.161.2.3763909https://doi.org/10.1186/1532-429X-14-2https://doi.org/10.1201/b17566https://doi.org/10.1097/01.rli.0000084890.57197.54https://doi.org/10.1097/01.rli.0000084890.57197.54https://doi.org/10.1148/radiol.2402050314https://doi.org/10.1002/jmri.24011https://doi.org/10.1002/cmr.a.20130https://doi.org/10.1002/jmri.23642https://doi.org/10.1002/cmr.a.20123https://doi.org/10.1002/cmr.a.20123https://doi.org/10.1136/postgradmedj-2012-131342

  • BIBLIOGRAPHY 23

    [21] Philippa Tyler and Sajid Butt. “Basic principles of MRI”. In: Radionu-clide and Hybrid Bone Imaging. 2012. isbn: 9783642024009. doi: 10.1007/978-3-642-02400-9_7.

    [22] Harry J. Gri�ths. “MRI: The Basics”. In: Radiology (2014). issn: 0033-8419. doi: 10.1148/radiology.204.1.152.

    [23] Daniel E. Becker. “Fundamentals of Electrocardiography Interpreta-tion”. In: Anesthesia Progress (2006). issn: 0003-3006. doi: 10.2344/0003-3006(2006)53[53:foei]2.0.co;2.

    [24] Euan a Ashley and Josef Niebauer. “Cardiology explained”. In: Remed-ica (2004).

    [25] Anne Brandts et al. “Quantitative assessment of left ventricular func-tion in humans at 7 T”. In: Magnetic Resonance in Medicine (2010). issn:07403194. doi: 10.1002/mrm.22529.

    [26] Tobias Frauenrath, Thoralf Niendorf, and Malte Kob. “Acoustic methodfor synchronization of Magnetic Resonance Imaging (MRI)”. In: ActaAcustica united with Acustica (2008). issn: 16101928. doi: 10.3813/AAA.918017.

    [27] Tobias Frauenrath et al. “Acoustic cardiac triggering: A practical so-lution for synchronization and gating of cardiovascular magnetic res-onance at 7 Tesla”. In: Journal of Cardiovascular Magnetic Resonance(2010). issn: 10976647. doi: 10.1186/1532-429X-12-67.

    [28] Stoneham, G. M. Saville, and I. H. Wilson. “Knowledge about pulseoximetry among medical and nursing sta�”. In: The Lancet (1994). issn:01406736. doi: 10.1016/S0140-6736(94)90697-1.

    [29] Edward D. Chan, Michael M. Chan, and Mallory M. Chan. Pulse oxime-try: Understanding its basic principles facilitates appreciation of its lim-itations. 2013. doi: 10.1016/j.rmed.2013.02.004.

    [30] James E. Sinex. Pulse oximetry: Principles and limitations. 1999. doi:10.1016/S0735-6757(99)90019-0.

    [31] Susan DeMeulenaere. “Pulse Oximetry: Uses and Limitations”. In: Jour-nal for Nurse Practitioners (2007). issn: 15554155. doi: 10.1016/j.nurpra.2007.02.021.

    [32] Burkhard Sievers et al. “In�uence of the trigger technique on ventricu-lar function measurements using 3-Tesla magnetic resonance imaging:Comparison of ECG versus pulse wave triggering”. In: Acta Radiolog-ica (2011). issn: 02841851. doi: 10.1258/ar.2011.100505.

    https://doi.org/10.1007/978-3-642-02400-9_7https://doi.org/10.1007/978-3-642-02400-9_7https://doi.org/10.1148/radiology.204.1.152https://doi.org/10.2344/0003-3006(2006)53[53:foei]2.0.co;2https://doi.org/10.2344/0003-3006(2006)53[53:foei]2.0.co;2https://doi.org/10.1002/mrm.22529https://doi.org/10.3813/AAA.918017https://doi.org/10.3813/AAA.918017https://doi.org/10.1186/1532-429X-12-67https://doi.org/10.1016/S0140-6736(94)90697-1https://doi.org/10.1016/j.rmed.2013.02.004https://doi.org/10.1016/S0735-6757(99)90019-0https://doi.org/10.1016/j.nurpra.2007.02.021https://doi.org/10.1016/j.nurpra.2007.02.021https://doi.org/10.1258/ar.2011.100505

  • 24 BIBLIOGRAPHY

    [33] David A. Feinberg et al. “Hybrid ultrasound MRI for improved cardiacimaging and real-time respiration control”. In: Magnetic Resonance inMedicine (2010). issn: 07403194. doi: 10.1002/mrm.22250.

    [34] David A. Feinberg and M Guenther. “Simultaneous MR and UltrasoundImaging : towards US-navigated MRI”. In: Optimization (2003).

    [35] Thomas Stanley Gregory et al. The Magnetohydrodynamic E�ect andIts Associated Material Designs for Biomedical Applications: A State-of-the-Art Review. 2016. doi: 10.1002/adfm.201504198.

    [36] Michael K. Laudon et al. “Minimizing interference from magnetic res-onance imagers during electrocardiography”. In: IEEE Transactions onBiomedical Engineering (1998). issn: 00189294. doi: 10.1109/10.661264.

    [37] Nijm et al. “Characterization of the Magnetohydrodynamic E�ect asa Signal from the Surface Electrocardiogram during Cardiac MagneticResonance Imaging”. In: Computers in Cardiology (2006).

    [38] Aaslid, T M Markwalder, and H Nornes. “Noninvasive transcranialDoppler ultrasound recording of �ow velocity in basal cerebral ar-teries.” In: Journal of neurosurgery (1982). issn: 0022-3085. doi: 10.3171/jns.1982.57.6.0769.

    [39] Robert H. Walden. “Analog-to-digital converter survey and analysis”.In: Software Radio Technologies: Selected Readings. 2001. isbn: 9780470546444.doi: 10.1109/9780470546444.ch2.

    [40] Candes and M.B. Wakin. “An Introduction To Compressive Sampling”.In: IEEE Signal Processing Magazine (2008). issn: 1053-5888. doi: 10.1109/MSP.2007.914731.

    [41] Derenyi and R. Yazdani. “Computer processing of remotely sensed im-ages”. In: Photogrammetria (2003). issn: 00318663. doi: 10.1016/0031-8663(89)90016-1.

    [42] Richard Lyons. “Quadrature Signals : Complex , But Not Complicated”.In: Dspguru.Com (2008).

    https://doi.org/10.1002/mrm.22250https://doi.org/10.1002/adfm.201504198https://doi.org/10.1109/10.661264https://doi.org/10.1109/10.661264https://doi.org/10.3171/jns.1982.57.6.0769https://doi.org/10.3171/jns.1982.57.6.0769https://doi.org/10.1109/9780470546444.ch2https://doi.org/10.1109/MSP.2007.914731https://doi.org/10.1109/MSP.2007.914731https://doi.org/10.1016/0031-8663(89)90016-1https://doi.org/10.1016/0031-8663(89)90016-1

  • Appendix A

    Theoretical background

    MRI scanners that have higher magnetic �eld strength gives higher resolu-tion MRI images. That is why researchers always try to develop new MRIscanners with higher magnetic strength. But higher magnetic strength havesome drawbacks. One of the major drawbacks it causes a distortion in theECG signal that is taken simultaneously with the MRI to monitor the patientinside the MRI machine and gate the MRI scanner when cardiac gating isnecessary. This signal distortion is caused by an e�ect that arises when aconducting �uid is �owing under the in�uence of an external magnetic �eld.This e�ect is called the magnetohydrodynamic e�ect. To solve this problemresearchers have studied di�erent methods then ECG that are not e�ectedby the magnetohydrodynamic e�ect such as POX, acoustic gating and DUS.The method that is used in this thesis is the DUS method and the results ofthis method will be compared to the ECG siganl as a reference.

    To be able to apply this method basic knowledge about MRI machineand DUS needs to be known. Also knowledge about signal processing andprogramming is needed.

    A.1 Magnetic Resonance ImagingMRI exquisite soft tissue contrast of high spatial resolution, with a 3D to-mographic presentation and the capability of demonstrating dynamic phys-iologic changes. It is possible to generate images that report an enormousarray of physical/physiologic phenomena based on the physics of NuclearMagnetic Resonance (NMR). Images can be created with contrast re�ectingproton density, T1 and T2 relaxation times [8], tissue susceptibility varia-tions [9], di�usion [10], �elds of motion [11], biomechanical properties [12],

    1

  • 2 APPENDIX A. THEORETICAL BACKGROUND

    tissue perfusion [13], and spectra of key biochemical molecules [14]. MRIdoes this in a non-invasive manner, which permits safe repeated scans withno known harm [15]. These advantages have made MRI to become a centralpillar to much of modern medical practice.

    A.1.1 Magnetic Resonance Imaging principlesNMR is enabled due to the existence of a property of many subatomic par-ticles known as spin. The spin feature is restricted to those with an oddnumber of neutrons or protons [16]. In the case of MRI, the majority ofimaging that is performed today is based on the nucleus of hydrogen. Thisis because hydrogen is the most abundant isotope in the human body and ithas the highest gyromagnetic ratio. Those two factors are important to gen-erate large NMR signals. But other elements can also be used, some of themare listed in Table A.1. The spin is expressed in fractional values of Planck’sconstant. This is a measure of the angular momentum of the nucleus, whichis a feature of rotating objects to continue in their rotation unless disturbed.

    Table A.1: MRI elements

    To have a better understanding of the spin feature consider Figure A.1,where a proton is described as a spinning sphere with charge. The spin of theproton, seen as a rotation of the nucleus about some axis, gives the protona magnetic property. If this magnetic structure was placed in an externalmagnetic �eld B0, it would tend to align with that magnetic �eld, as shownin Figure A.1. Further more, the spin gives the proton angular momentum.If the proton is left uninterrupted, it would naturally align vertically parallelto the direction of the magnetic �eld B0.

    However, if the spin was tipped from its natural alignment with the ap-plied magnetic �eld, it would precess about the direction of the applied mag-net �eldB0, as shown in Figure A.1. Its precessional frequency known as theLarmor frequency (ω), is dictated by the strength of the applied magnetic

  • APPENDIX A. THEORETICAL BACKGROUND 3

    Figure A.1: Spin FeatureReprinted with permission from [17]

    �eld B0 through a constant γ known as the gyromagnetic ratio. For exam-ple, at a �eld strength of 1 Tesla, the proton Larmor frequency is 42.57MHz.The Larmor frequency is the product of the �eld strength B0 and the gyro-magnetic ratio γ.

    A.1.2 ExcitationIn the absence of a magnetic �eld, spins are expected to point randomly inall directions. When a magnetic �eld is applied, the spins will still pointrandomly in all directions, but they will have a minor tendency to pointalong the direction of the magnetic �eld [18]. The number of protons thatwill point along the direction of the �eld are approximately 3 per millionwithin a 0.5T �eld, in a 1.0T system there are 6 per million. The amountof a�ected protons is proportional with the magnetic �eld B0 [19]. This is

  • 4 APPENDIX A. THEORETICAL BACKGROUND

    also the reason why higher magnetic �eld systems generate better imagesthan systems with lower �eld strengths. In order to generate an NMR signal,the magnetization must be tipped away from this equilibrium alignment sothat a component of the magnetization lies in the transverse plane whereit is free to precess. In order to accomplish this, the spins are exposed to analternating magnetic �eldB1 that must have a frequency equal to the Larmorfrequency of the nucleus. This process is called excitation.

    A.1.3 RelaxationThe excitation part lifts the protons into a higher energy state. This happensbecause the protons absorb energy from the RF pulse. Protons prefer to alignwith the main magnetic �eld (be in a low energy state) [20]. The action ofthe protons going from higher energy state to the lower energy state that isaligned with the magnetic �eld is called relaxation and can be divided intotwo parts: T1 and T2 relaxation. T1 is de�ned as the time it takes for thelongitudinal magnetization (Mz) to reach 63% of the original magnetization[20] and T2 is de�ned as the time it takes for the spins to de-phase to 37% ofthe original value [21]. Di�erent tissue have di�erent T1 and T2 values andthat is what gives MRI the good contrast resolution property.

    A.1.4 MRI synchronizationThe fundamental challenges of Cardiac Magnetic Resonance Imaging (CMR)is the movement and the function of the heart throughout the cardiac cycle.When the heart is in the systole phase (working phase of the heart) it pumpsthe blood to the body and this blood �ow creates a movement in the bodywhich in return produce motion artifacts in the image. Cardiac gating canbe used to solve this problem. It allows MRI scanner to acquire data onlyduring a speci�ed part of the cardiac cycle, typically during diastole whenthe heart is not moving [22]. There are several di�erent methods that havebeen used for cardiac gating.

    Electrocardiogram

    One of the most used methods for cardiac gating is using ECG. ECG is amethod of imaging the heart’s activity. With electrodes on the chest, electri-cal activity is captured from the heart muscle and represents this as a func-tion of time in a chart [23]. This electrical activity arises from the heart cells

  • APPENDIX A. THEORETICAL BACKGROUND 5

    when they depolarize and repolarize during each heartbeat. The pattern ofthis electrical activity includes three waves, which have been named P, QRS(a wave complex), and T wave, where R wave represents depolarization ofthe main mass of the ventricles hence it is the largest wave [24]. The MRIdata acquisition uses the R wave of the ECG signal as a reference when us-ing ECG for cardiac gating. When an R wave is detected MRI uses a givendelay before sampling the data. This insures that data acquisition takes placewith as little as possible heart movement. Final images are created from datasampling over a portion of cardiac cycles.

    Even though ECG is a great method for cardiac gating, it su�ers froma major drawback. When using ECG as a cardiac gating in an MRI systemthat uses a high magnetic �eld, the ECG signal gets distorted because of theMHD e�ect [4]. When the ECG signal gets distorted, it becomes hard for theMRI system to detect the R wave in the ECG signal this results in artifacts inthe �nal MRI images [25].

    Acoustic gating

    Unlike ECG-triggering the acoustic approach employs the phonocardiogram’s�rst heart tone for triggering instead of electrophysiological signals [26].When using acoustic gating, recordings of a phonocardiogram inside of themagnet bore are paralleled by acoustic noise due to gradient coil switchingconsisting of several sharp harmonic segments, which are related to the echotime and the repetition time. For this reason, acoustic measurements needsto be controlled to evaluate the acoustic signal-to-noise ratio between thesound pressure level generated by the cardiac activity and the sound pres-sure level induced by the gradient noise [27].

    Pulse oximetry

    Pulse oximetry is very common in medical care that it is often regarded asa �fth vital sign [28]. Pulse oximetry is based on the principle that oxyhe-moglobin absorbs more near-IR light than deoxyhemoglobin, and deoxyhe-moglobin absorbs more red light than oxyhemoglobin [29]. It uses two light-emitting diodes in the transducer that each emit light of speci�c wavelengththrough the skin, such as that of the digits or the ear lobe. A photo diodedetector at the far side detect the intensity of transmitted light at each trans-mitted wavelengths, from which oxygen saturation can be derived [30]. Thedetected signal displays as a sharp waveform with a clear notch indicates the

  • 6 APPENDIX A. THEORETICAL BACKGROUND

    cardiac cycle [31]. It has been reported that pulse wave triggering seems tobe robust and might be advantageous to ECG triggering [32].

    Doppler Ultrasound

    Another method that is theoretically not a�ected by MHD e�ect is ultra-sound [33]. Doppler ultrasound (DUS) re�ects the physiologic activity of theheart in terms of blood �ow and cardiac wall motion and hence directly re-�ects the motion that should be �xed in time. Moreover, depending on thelocation of the transducer, the DUS signal corresponds to distinct times inthe cardiac cycle, potentially providing more precise information for cardiactriggering than conventional ECG [34].

    A.1.5 The magnetohydrodynamic effectThe MHD e�ect is a physical phenomenon describing the motion of a con-ducting �uid �owing under the in�uence of an external magnetic �eld [35].The MHD e�ect, due to blood �owing through the static magnetic �eld B0,may induce electrical �elds superimposed on the ECG signal. This elevatesthe T-wave portion of the ECG signal, which can compromise the determi-nation of R-R segments of the cardiac cycles [36]. The magnitude of thevoltages produced by the MHD e�ect is determined by the �ow velocity ofthe blood, the diameter of the vessel, and the strength of the magnetic �eld[37].

    A.1.6 The 7 Tesla facility in LundAs mentioned earlier, research’s have showed a correlation between the strengthof the magnetic �eld of an MRI scanner and a the resolution of the imagestaken by that MRI scanner. Higher magnetic �eld tend to give higher res-olution on the MRI images. With higher resolution images, researcher’s inLund have carried out imaging the brain activity in the human body. Oneof the vital parameters to image in the brain is the blood �ow. To be able toimage the blood �ow with high resolution cardiac gating needs to be used forthe MRI scanner. One problem that arises is the distortion of the ECG signalthat is used for cardiac gating. Due to the MHD e�ect the ECG signal getsdistorted and cardiac gating becomes impossible to do. This is the primaryreason behind this thesis to examine and develop a new method for cardiacgating for the 7 Tesla MRI scanner that is not a�ected by the MHD e�ect.The method of cardiac gating using DUS signals is enabled to examine due

  • APPENDIX A. THEORETICAL BACKGROUND 7

    to a collaboration with Northh Medical. Northh Medical have have providedresearchers at 7T facility in Lund with a device that gives a synchronizedECG and DUS signals as output. This will enable us to acquire synchronizedECG and DUS data to analyze and compare using di�erent �ltering and peakdetection algorithm in MATLAB.

    A.2 Doppler UltrasoundDoppler ultrasonography is a technique that can give a relatively inexpen-sive, noninvasive real-time measurement of the blood �ow. According to theprinciple of DUS, ultrasound waves emitted from the Doppler transducer aretransmitted through the human body and re�ected by the moving red bloodcells within the blood vessels or the heart. The di�erence in the frequencybetween the emitted and re�ected waves, referred to as the “Doppler shiftfrequency” is directly proportional to the speed of the moving red blood cells(blood �ow velocity) [38]. In this thesis we will acquire two di�erent types ofDUS signals. The �rst DUS signal is measuring the heart wall motion whilethe heart is pumping. The second DUS signal is measuring the blood �owof the aorta. Those two di�erent signals can be acquired by aiming the DUStransducer at di�erent locations on the chest area of the volunteers.

    A.3 Digital signal processingDigital signal processing is the use of digital processing (computers or morespecialized digital signal processors) to achieve a wide variety of signal pro-cessing operations. The signals processed are a sequence of numbers thatrepresent samples of a continuous variable in a domain such as time, space,or frequency.

    To digitally analyze and process an analog signal, it must be digitizedwith an analog-to-digital converter (ADC) [39]. Sampling is usually done intwo stages, discretization and quantization. Discretization means that thesignal is divided into equal sequences of time, and each interval is repre-sented by a single measurement of amplitude. Quantization means eachamplitude measurement is approximated by a value from a �nite set. TheNyquist–Shannon sampling theorem states that a signal can be exactly re-constructed from its samples if the sampling frequency is greater than twicethe highest frequency component in the signal [40].

  • 8 APPENDIX A. THEORETICAL BACKGROUND

    A.3.1 Digital filtersIn signal processing, a digital �lter is a system that performs mathematicaloperations on a sampled, discrete-time signal to decrease or increase certainaspects of that signal.

    A low-pass �lter is a �lter that pass through signals with a frequencylower than a determined cuto� frequency and attenuates signals with fre-quencies higher than the cuto� frequency. The exact frequency response ofthe �lter depends on the �lter design. An ideal low-pass �lter completelyeliminates all frequencies higher then the cuto� frequency while passingthose below unchanged.

    A high-pass �lter is a �lter that pass through signals with a frequencyhigher than a determined cuto� frequency and attenuates signals with fre-quencies lower than the cuto� frequency. The amount of attenuation foreach frequency depends on the �lter design.

    High-pass and low-pass �lters are also used in digital image processingto perform image modi�cations, enhancement, noise reduction, etc., usingdesigns done in either the spatial domain or the frequency domain [41].

    A.3.2 Anti-aliasing filterAn anti-aliasing �lter (AAF) is a �lter used before a signal sampler to re-strict the bandwidth of a signal to approximately or completely satisfy theNyquist–Shannon sampling theorem over the band of interest. Since the the-orem states that unambiguous reconstruction of the signal from its samplesis possible when the power of frequencies above the Nyquist frequency iszero. A realizable anti-aliasing �lter will typically have a trade o� to eitherpermit some aliasing to occur or else attenuate some in-band frequenciesclose to the Nyquist limit. For this reason, many practical systems samplehigher than would be theoretically required by a perfect AAF in order toensure that all frequencies of interest can be reconstructed, this practice iscalled oversampling.

    A.3.3 Quadrature signalsA complex signal, also called quadrature signals, is a two-dimensional signalwhose value at some instant in time can be speci�ed by a single complexnumber having two parts the real part (in-phase) and the imaginary part(quadrature). [42]. A pair of periodic signals are said to be in “quadrature”when they di�er in phase by 90 degrees. The “in-phase” or reference signal

  • APPENDIX A. THEORETICAL BACKGROUND 9

    is referred to as “I,” and the signal that is shifted by 90 degrees (the signal inquadrature) is called “Q.”

    A.3.4 Complex band-pass filterComplex band-pass �lters are used in many applications. They are designedby starting with a simple low-pass prototype and apply a complex shift fre-quency transformation. More in detail, a low-pass or high pass �lters are�lters that �lter either the high or the low frequencies in the signal. Whenhaving both negative and positive frequencies in one complex signal, bothpositive and negative frequencies needs to be treated. To have a better un-derstanding of this have a look at Figure A.2.

    Figure A.2: Complex band-pass �lter, where the orange signal represent anormal low-pass �lter. The blue signal is the shifted low-pass frequency thatresult in a complex band-pass �lter that attenuate the positive frequencyspectrum (that is quadrant 1 and quadrant 4 in the complex signal). Theresulting signal from this �lter is a signal that contains only of quadrant 2 andquadrant 3 data of the complex signal which consists of negative frequencies.this signal will represent the backward DUS signal. This �lter is shifted by3.18Hz in the positive spectrum

    The �lter equation looks like following:

    Y (n) =∞∑

    n=−∞X(n) ∗ AejW

  • 10 APPENDIX A. THEORETICAL BACKGROUND

    WhereX(n) is the signal before the �lter, and Y (n) is the signal after the�lter. Ae−jW is the �lter coe�cient. To shift the �lter, a shifted factor mustbe multiplied with the �lter coe�cient resulting in the following formula:

    Yshift(n) =∞∑

    n=−∞X(n) ∗ AejW ∗ ejWshift

    Where ejWshift is the shifted factor. The formula can then be simpli�ed to:

    Yshift(n) =∞∑

    n=−∞X(n) ∗ Aej(W+Wshift)

    By shifting the �lter in the opposite direction a �lter that attenuate thenegative frequency spectrum (that is quadrant 2 and quadrant 3 in the com-plex signal) is achieved. This will give the forward DUS signal.

    A.4 Evaluation of resultsTo evaluate the result of this thesis, the algorithm for �ltering and peak de-tection of the DUS signal will be compared to the reference ECG signal. Thealgorithm was compared in terms of; delay, accuracy , jitter and false posi-tive/false negative. In this section each one of those terms will be described.

    A.4.1 DelayIn theory, a DUS signal that is acquired from a patient will have a delaycompared to an ECG signal that is taken from the same patient. This delayis caused by the nature of the DUS signal. DUS signal acquire informationabout the cardiac function by sending ultrasound signals to the heart and de-tect the re�ected ultrasound signals from the heart. Those signals representthe heart contraction and relaxation phase. While ECG signal is acquired bythe electrical activities in the cells of the heart.From a physiological point of view, it is known that the contraction of theheart is a response to the electrical depolarization in the cells of the heart.With that said, it means that the contraction of the heart will happen shortlyafter an electrical depolarization in the cells of the heart. This results in adelay between a signal that represent the electrical depolarization and a sig-nal that represent the heart contraction.Since cardiac gating requires precise detection of the heart function and thegoal of this thesis is to study the usage of DUS signal as a cardiac gatingmethod for the MRI scanner, delay becomes an important factor to considerwhen studying di�erent cardiac gating methods.

  • APPENDIX A. THEORETICAL BACKGROUND 11

    A.4.2 JitterJitter e�ect is the e�ect that occurs when a process that is to be repeated atregular intervals does not occur at a stable rate. In this case, if the DUS signalhave irregular delay between each peaks or if the delay is irregular betweenthe DUS signal and the ECG signal then a jitter e�ect is present in the signal.Since the DUS signal is used to gate the MRI scanner, jitter e�ect in the signalwill give irregular pulses to the MRI scanner resulting in artifacts in the MRIimages.

    A.4.3 False positive and false negativeIn peak detection, false positive error means that the peak algorithm showsa peak in the signal when there were no peak in that location of the signal.a false negative error means that the peak algorithm does not show a peakin the signal when a peak is present.False positive errors will result in artifacts in the MRI images because thescanner is scanning without concern to the cardiac cycle. Many false posi-tive errors in the algorithm will result as if the MRI scanner is functioningwithout cardiac gating. False negative errors will a�ect the running time forthe MRI scanner. Since a cardiac gated MRI scanner will not scan the patientif there is no detected heart beats, many false negative errors will result intomaking the session time for the MRI procedure longer.

  • TRITA CBH-GRU-2019:087

    www.kth.se

    IntroductionResearch question

    MethodsHardware setupData collectionSoftware setupFiltering of the Doppler Ultrasound signalPeak detection algorithm

    Evaluation of resultsDelay and jitterFalse positive and false negative

    ResultsResults from the filtering algorithmResults from the peak detection algorithmEvaluation of the Doppler Ultrasound signal compared to the reference ECG signal

    DiscussionData acquisitionThe filtering algorithmThe peak detection algorithmEvaluation of the methodFuture work

    ConclusionsBibliographyTheoretical backgroundMagnetic Resonance ImagingMagnetic Resonance Imaging principlesExcitationRelaxationMRI synchronizationThe magnetohydrodynamic effectThe 7 Tesla facility in Lund

    Doppler UltrasoundDigital signal processingDigital filtersAnti-aliasing filterQuadrature signalsComplex band-pass filter

    Evaluation of resultsDelayJitterFalse positive and false negative