ECG Parameter Extraction and Motion Artifact Detection. Tianyang Li B.Eng., Dalian University of Technology, China, 2014

Size: px
Start display at page:

Download "ECG Parameter Extraction and Motion Artifact Detection. Tianyang Li B.Eng., Dalian University of Technology, China, 2014"

Transcription

1 ECG Parameter Extraction and Motion Artifact Detection by Tianyang Li B.Eng., Dalian University of Technology, China, 2014 A Report Submitted in Partial Fulfillment of the Requirements for the Degree of MASTER OF ENGINEERING in the Department of Electrical and Computer Engineering c Tianyang Li, 2016 University of Victoria All rights reserved. This report may not be reproduced in whole or in part, by photocopying or other means, without the permission of the author.

2 ii ECG Parameter Extraction and Motion Artifact Detection by Tianyang Li B.Eng., Dalian University of Technology, China, 2014 Supervisory Committee Dr. Xiaodai Dong, Supervisor (Department of Electrical and Computer Engineering) Dr. T. Aaron Gulliver, Departmental Member (Department of Electrical and Computer Engineering)

3 iii Supervisory Committee Dr. Xiaodai Dong, Supervisor (Department of Electrical and Computer Engineering) Dr. T. Aaron Gulliver, Departmental Member (Department of Electrical and Computer Engineering)

4 iv ABSTRACT Cardiovascular disease is the leading cause of death in the world. Long-term monitoring of heart condition through electrocardiogram (ECG) will provide vital information for prevention, early warning and detection of fatal heart disease. Recently, we developed a portable real-time ECG monitoring system which patients can use during their daily activity. The large amount of ECG data recorded needs to be processed for automatic detection and classification. This report focuses on the extraction of essential ECG parameters from the ECG waveforms and the detection of motion artifacts. Algorithms to calculate heart rate, QRS complex and duration, ST elevation, are designed. Due to body motion, ECG signals are often perturbed by motion induced artifacts. Motion artifacts (MA) severely affect the detection accuracy of ECG parameters and any meaningful interpretation of ECG waveforms. Though there have been a number of methods to eliminate motion artifacts, few of them are suitable for our portable device due to their high computational complexity or extra reference signal requirement. In this project, a new algorithm to detect motion artifacts is proposed, which applies Machine Learning based on the features we extracted. Experimental results show that this algorithm correctly detects over 90% of the motion artifacts. Finally, parameter extraction and MA detection algorithms are integrated into an Android application that reads in the raw ECG signal received by a smartphone from an ECG sensor and processes the real-time signal with these algorithms to generate an ECG report.

5 v Contents Supervisory Committee Abstract Table of Contents List of Tables List of Figures Acknowledgements ii iii v vii viii x 1 Introduction Background and Motivation Technical Challenges Contributions of the Project Outline of the Report ECG Parameters Extraction ECG Parameters Definitions and Measurements Pan-Tompkins Algorithm for QRS Complex Heart Rate (HR) QRS duration PR Interval QT/QTc Interval ST elevation/depression Summary Motion Artifacts Detection via Machine Learning Algorithms Motion Artifacts Definition and Properties

6 vi 3.2 Related Work Adaptive signal processing Discrete wavelet transformation Features extraction for machine learning algorithms Machine learning introduction Features extraction Data collection Feature scaling Data collection from hardware board Applying machine learning algorithms Making data more generic Performance analysis and cross validation Performance features sensitivity and specificity Cross validation introduction Summary Java Implementation MATLAB to Java conversion Algorithm structure in Java Java APIs design Summary Conclusions Conclusion Future work Bibliography 47

7 vii List of Tables Table 2.1 Voltage conversion Table 3.1 Cross validation of Pocket Algorithm

8 viii List of Figures Figure 1.1 Sport band vs Holter monitor [3][2] Figure 1.2 Architecture of the ECG system Figure 2.1 ECG of a heart in normal sinus rhythm [4] Figure 2.2 Detection result of Pan-Tompkins algorithm Figure 2.3 Definition of QRS duration [6] Figure 2.4 Q onset and S end detection Figure 2.5 Zoomed-in figure of Q onset point Figure 2.6 P onset detection results Figure 2.7 T wave end definition [7] Figure 2.8 Final results obtained via MATLAB Figure 2.9 ST elevation definition [24] Figure 3.1 Motion artifacts (muscle tremors) [25] Figure 3.2 Motion artifacts detected with our board Figure 3.3 Adaptive filter structure [17] Figure 3.4 Three-level wavelet decomposition tree [10] Figure 3.5 Motion artifacts during detection Figure 3.6 MATLAB code to calculate RR energy Figure 3.7 MATLAB code to calculate RR energy Figure 3.8 RR intervals during motion artifacts period Figure 3.9 Feature: SQ noise definition Figure 3.10Data plot example Figure 3.11In-sample error with iteration based on Pocket Algorithm Figure 3.12Beat Figure 3.13Beat Figure th -order target function and 15 noisy data points Figure th order fit (red curve) versus 2 nd order fit (red curve)[18]... 35

9 ix Figure 4.1 FIR filter realization [1] Figure 4.2 General structure of ECG signal processing module in Java Application Figure 4.3 Java APIs design and details

10 x ACKNOWLEDGEMENTS I would like to express my special thanks to my supervisor Dr. Xiaodai Dong who gave me the opportunity to do this wonderful project. I am thankful for her aspiring guidance and invaluably constructive advice during the project work. I would also like to thank my parents and friends who always support me and thank my group members for their help and suggestions.

11 Chapter 1 Introduction 1.1 Background and Motivation Since heart disease has become one of the leading causes of sudden death all over the world in recent years, more and more heart monitoring devices are invented to monitor heart conditions. Some of them are eligible to detect potential heart disease. These monitors have different functions as well as accuracy. Some of them are only used to display heart rates during exercise such as Fitbit and Apple Watch, and some can be used for clinical diagnosis with high accuracy, such as holter monitors. However, in order to monitor real-time heart conditions, these current devices have different disadvantages. For example, in Fig. 1.1, the sport bands, like Apple Watch and Fitbit [2] can be used to record and monitor heart rate changes during activity, but only heart rate is not enough for potential heart disease detection and heart condition diagnosis. In clinical diagnosis, holter monitors [3] can record electrocardiogram (ECG) wave for a long time and the data saved can be analyzed later to detect potential heart diseases, but holter mornitors are not capable of real-time monitoring. Our groups objective is to design a portable low-cost wireless heart monitoring system with real-time ECG analysis, intended for use during ones normal daily life. The basic system architecture of this ECG system is composed of an ECG sensor which can sense the ECG data from a human body, and then transmit the ECG data to an Android smartphone via Bluetooth Low Energy. The raw ECG data will be processed in an Android Application to display the ECG wave and heart rate in realtime, and also generate an ECG report, which includes the essential ECG parameters for diagnosis. In Fig. 1.2, the architecture of this portable ECG system is shown.

12 2 Figure 1.1: Sport band vs Holter monitor [3][2]. Figure 1.2: Architecture of the ECG system. The hardware board can collect raw ECG data and transmit it via Bluetooth Low Energy to smartphone. The ECG signal processing module developed in this work, which includes motion artifacts detection, digital filters and parameter extraction is integrated into the Android application. 1.2 Technical Challenges A number of technical challenges have to be addressed during the design and implementation of this ECG signal-processing module. First and foremost, in order to obtain more accurate parameters extraction results, several interferences, such as signal spikes that may occur during Bluetooth transmission, baseline wander and signal fluctuations need to be mitigated as much as possible. Among all of them, the most challenging one is to eliminate motion artifacts, which commonly occur during users respiration or other movements. Motion artifacts are versatile, which means they do not have a specific bandwidth, and hence specific fixed-bandwidth digital filters

13 3 cannot eliminate them. There are several ways to eliminate motion artifacts in theory. For example, adaptive filter in [17] is a popular method to deal with motion artifacts, but it requires a reference signal according to muscle movements, which is usually collected via a motion sensor or accelerometer module. Another common method is using discrete wavelet transformation (DWT) proposed in [10]. However, this method has high computational complexity and not suitable for real-time detection. Our project requires real-time detection, so low computational complexity and high computational speed are required. Considering the requirements and current available solutions above, we need to propose a new method to eliminate motion artifacts based on our objective and requirement. Since motion artifacts have inconsistent and unpredictable features, machine learning is an effective way to solve this kind of problem. However, choosing suitable features to apply machine-learning algorithms is another challenge in this project because there is nearly no reference about applying machine learning algorithms into motion artifacts elimination. In order to extract effective features, we collected and processed thousands of ECG data, and also tried several different features combinations. Finally, we selected three relevant features and the results of many examinations proved that this machine-learning algorithm is effective in motion artifacts elimination. Finally, another challenge we are facing is to implement the entire ECG signalprocessing module into Android application. During algorithm design stage, the digital filters module used is from MATLAB built-in module, such as Butterworth digital filter. However, there is no same module in Java library as these built-in modules in MATLAB. We tried to search for the similar digital filters open-source library in Java, but the results are far from satisfaction. In this case, we have to design our own digital filters based on the knowledge from Digital Signal Processing course. The details of this implementation will be described later in Chapter Contributions of the Project According to the main objective of the project, this report provides a detailed and high-level overview of ECG parameters and ECG signal processing techniques. Moreover, I propose an efficient and accurate way to identify and remove motion artifacts interference. More specifically, the following aspects are featured works and contri-

14 4 bution of this project. 1. Study the ECG parameters and methods to calculate them. 2. Learn how to apply digital filters to eliminate interference. 3. Identify three unique features from motion artifacts to use in Machine Learning algorithms. 4. Collect and process large amount of ECG data for the training procedure. 5. Verify the accuracy of this motion artifacts elimination algorithm. 6. Implement these algorithms into an Android Application and design the API. 1.4 Outline of the Report This report is organized as follows: Chapter 2 gives a brief overview of essential ECG parameters and introduces the algorithms for ECG parameters extraction. Furthermore, details of the signal processing and Pan-Tompkins algorithm for QRS complex detection are also presented. Chapter 3 introduces a new way to identify motion artifacts in the ECG signal via Machine Learning algorithms. Cross validation is done to verify the robustness of the extracted features. Chapter 4 describes the details about algorithm s Java implementation and introduces the APIs. Chapter 5 concludes the report and suggests future work.

15 5 Chapter 2 ECG Parameters Extraction Typically, a standard heart beat has five deflections, i.e., P, Q, R, S and T, which are shown in Fig. 2.1 [4]. The QRS complex is the central and most visually obvious part of a typical electrocardiogram (ECG or EKG). A typical ECG tracing includes a repeating cycle of the three electrical entities: a P wave (atrial depolarization), a QRS complex (ventricular depolarization) and a T wave (ventricular repolarization). All of the waves in an ECG tracing and the intervals between deflections have a predictable time duration, a range of acceptable amplitudes (voltages), and a typical morphology. These features can help doctors/clinics to detect potential arrhythmias and therefore are of clinical significance. In this project, we implemented several algorithms to extract ECG parameters in real time. These parameters mainly include: Heart Rate (HR), PR interval, QRS interval, QT/QTc and ST elevations/depressions. The definition of these parameters and algorithm details will be explained in the following sections. 2.1 ECG Parameters Definitions and Measurements Each parameter mentioned above has its own medical definition and different measurement methods. In this project, I mainly refer to a popular and widely cited algorithm Pan-Tompkins (P-T) algorithm for QRS complex detection [19]. Based on this algorithm, it is easy to obtain Q, R and S points, which are the basis for the following features calculations. In the next section, I will briefly introduce this P-T algorithm, and then present each parameters definition and measurement.

16 6 Figure 2.1: ECG of a heart in normal sinus rhythm [4] Pan-Tompkins Algorithm for QRS Complex Pan-Tompkins algorithm is a popular algorithm that is widely cited and applied for detecting QRS complexes in many portable ECG devices due to its simplicity and fairly high accuracy. Besides, Pan-Tompkins algorithm is a real-time algorithm for detecting the QRS complexes of ECG signals. It can reliably recognize QRS complexes based upon analyses of slope, amplitude, and width. It applies a special digital bandpass filter to reduce various types of interference present in ECG signals, so that it can reduce false detections effectively. In the following parts, the implementation details of P-T algorithm will be prsented. Band-pass Filter The band-pass filter can reduce the influence of 60/50 Hz interference, baseline wander, and T-wave interference. Here, we choose the desirable pass band as 0.5 Hz to 45 Hz, which can effectively reduce baseline wander and high frequency noise, and also maintain the original shape of ECG signals. Moving Average Filter During practical detection, signal quality may be unstable, which could be caused by various reasons, such as unstable power voltage, data transmission interference and

17 7 so on. In these scenarios, some random signal fluctuations may happen in sequential sampling points that probably have a bad effect on the second-stage detection. In order to solve this problem, we use moving average filter and set the window size to three. Here, the window size can t be set too large, because it will affect the shape of ECG signal and affect the diagnosis of heart diseases. The first element of the moving average is obtained by taking the average of the initial fixed subset of the number series, which has three numbers in this case. Then the subset is modified by shifting forward ; that is, excluding the first number and including the next number following the original subset in the series. This creates a new subset of numbers, which is averaged. This process is repeated over the entire data series. Pan-Tompkins Algorithm Overview 1. First, the raw signal passes through a digital band-pass filter in order to attenuate noise and interference. 2. Next process is differentiation, followed by squaring, and then moving window integration. This step can obtain the information about the slope of the QRS. 3. Learning phase 1: requires 2 seconds data to initialize detection thresholds based upon in-coming signal and noise peaks detected during the learning process. 4. Learning phase 2: requires two heartbeats to initialize RR interval average and RR interval limit values. 5. Detection phase: complete the recognition process and produces a pulse for each QRS complex. The thresholds and other parameters of the algorithm are adjusted periodically to adapt to changing characteristics of the signal. The main advantage of this algorithm is that it uses two sets of thresholds to detect QRS complexes. One set provides the thresholds of filtered ECG, and the other thresholds the signal produced by moving window integration. By using thresholds on both signals, it improves the reliability of detection compared to using one waveform alone. The Fig. 2.2 below shows the detection result after running P-T algorithm to a raw ECG signal. This figure is drawn by MATLAB plot function.

18 8 Figure 2.2: Detection result of Pan-Tompkins algorithm Heart Rate (HR) Heart rate represents the speed of the heartbeats measured by the number of contractions of the heart per unit of time, typically beats per minute (bpm). For the normal resting adults, heart rate ranges from 60 to 100 bpm. When the heart is not beating in a regular pattern, this may be referred to as an arrhythmia. These abnormalities of heart rate sometimes indicate heart disease. The calculation of HR is quite straightforward. With the help of P-T algorithm, we can simply detect each R peak in ECG, as shown in Fig In order to make the result more accurate, we set an 8-second window and update the HR each eight seconds. In every 8-second window, R peaks are detected, and then calculate the average value of RR intervals. From (2.1), HR can be calculated. HR = 60 Avg RR Interval (s) (2.1) RR intervals calculation is related to the sampling rate of a digital signal. As for this project, we have 1000 Hz and 250 Hz hardware boards respectively, which means the interval between each sampling point is 1 ms and 4 ms. After running the P-T algorithm, the number of sampling points between each R peak can be obtained, and

19 9 Figure 2.3: Definition of QRS duration [6]. then multiplied by or sec to get each RR interval QRS duration The QRS complex is the most obvious part of a normal ECG. For adults, it normally lasts s and it may be shorter in children or during physical activities. QRS duration parameter is of clinical significance, such as prolonged duration indicates hyperkalemia or bundle branch block. QRS duration is measured from Q wave onset to S wave end [13], rather than simply measure the time intervals between Q and S point. Fig. 2.3 [6] below shows the exact definition of QRS duration. S wave end has another terminology called J-point [12], where the QRS complex meets the ST segment. The J-point is easy to identify when the ST segment is horizontal and forms a sharp angle with the last part of the QRS complex. However, in some heart diseases or noisy ECG signals, the location of J-point is less clear. Therefore, there are two possible definitions of J-point: The first point of inflection of the upstroke of the S wave. The point at which the ECG traces becomes more horizontal than vertical.

20 10 Here, we apply the same method to detect Q onset and J-point, which is the first derivation (slope) of the ECG signal. In practical application, moving average filter mentioned above solved the potential unstable signal problem, which makes the calculation more accurate. Besides, from [23], we could set proper thresholds for searching range to make results more convincing. From applying P-T algorithm, we have already obtained the Q, S and T peak points. The corresponding onset and offset values are the points having nearly zero or minimum slope region before the Q and after the S points. The Q onset point is detected as the minimum slope point within a window of 40 ms starting from the Q peak index along the start of the ECG data array. The J-point is detected as the minimum slope within a window of 40 ms starting from S point index towards the end of the ECG data array. Thus, QRS duration parameter is defined as follows: QRS Duration = S end Q onset (2.2) Fig. 2.4 below shows the detection results after applying the Q onset and S end detection algorithms via MATLAB. The pink circle indicates the Q onset and black ones indicate S end (J-point). Fig. 2.5 is the zoomed-in figure, which shows the exact Q onset point clearly in green circles PR Interval The PR interval is the period that extends from the beginning of the P wave until the beginning of the QRS complex (Q onset). Its duration is normally between 120 and 200 ms. This parameter is also an essential one for potential heart disease detection. Variations in the PR interval can be associated with certain medical conditions. For example: a long PR interval (of over 200ms) may indicate a first-degree heart block. Since we have already obtained Q onset position, the only work left is to find P wave beginning, which applies the same idea as mentioned above. From P-T algorithm, P peak points can be detected directly. And then, search the P onset point backward in a certain window. From [16], I set the size of search window to be 60 ms. Next, the slope of each point in that window is calculated and the minimum point is the P onset point.

21 11 Figure 2.4: Q onset and S end detection. Here, we use the equation below to calculate nth point slope: slope(n) = 2X(n 2) X(n 1) + X(n + 1) + 2X(n + 2) (2.3) In Fig. 2.6, the black circle shows the P onset points after detection QT/QTc Interval In cardiology, the QT interval is a measure of the time period between the start of the Q wave and the end of the T wave in the hearts electrical cycle. A prolonged QT interval is a potential sign for ventricular tachyarrhythmia and a risk factor for sudden death. Since QT interval is dependent on the heart rate in an obvious way (the faster the heart rate the shorter the QT interval), modern computer-based ECG machines can easily calculate a corrected QT, i.e., QTc. The standard clinical correction is to use Bazetts formula to calculate the heart rate-corrected QT interval. formula [22] is: QT c = Bazetts QT RR (2.4) Here, RR is often derived from the heart rate (HR) as 60/HR for easy measure-

22 12 Figure 2.5: Zoomed-in figure of Q onset point. Figure 2.6: P onset detection results. ment. Next problem is how to detect T wave end. The T wave end is where the tangent line for the steepest part of the T wave intersects with the baseline of the ECG. Fig. 2.7 [7] illustrates the definition. The accurate measurement of the QT interval is subjective because the end of the T wave is not always clearly defined and usually merges gradually with the baseline. QT interval in an ECG complex can be measured manually by different methods such as the threshold method, in which the end of the T wave is determined by the point at which the component of the T wave merges with the isoelectric baseline or the tangent method, in which the end of the T wave is determined by the intersection of a tangent line extrapolated from the T wave at the point of maximum downslope to the isoelectric baseline. The isoelectric baseline was obtained by a line joining the midpoints of the TP segment [20]. The method to detect maximum slope within T offset is also the threshold and first derivative. This time, the window size is set to 40 ms and the beginning of the searching range is T peak. Then, we can obtain the point of maximum slope and

23 13 Figure 2.7: T wave end definition [7]. calculate the T wave end based on the intersection of baseline and tangent line. From now, we can detect all the critical points that we need to calculate the key parameters introduced above. In order to test the result accuracy, I implement these algorithms via MATLAB and set one raw digital ECG signal (120-sec) as input. The average results of each parameter are obtained as: QT = ms, QT c = ms, QRS = ms, P R = ms, HR = 63 bps. In order to visualize the results, Fig. 2.8 plots the ECG signal and the key points detected. It can be seen that the detected points match well with their definations ST elevation/depression ST elevation/depression refers to a finding on an ECG signal wherein the trace in the ST segment is abnormally high/low above the baseline. The measurement of ST elevation and depression is similar. Here, we take ST elevation for example to introduce its definition and measurement. In Fig. 2.9 [24], red line is tangent to the signal tracing and the blue arrow points to the J-point, which has been introduced above for detecting QRS duration. The green line is 60 milliseconds after the J-point and lower black line is the baseline. Upper black line intersects the tracing where the green line and ECG signal intersect with each other. In this case, the distance between these two black lines is the value that we need to calculate. In addition, ST elevation/depression are the values that related to signal voltages.

24 14 Figure 2.8: Final results obtained via MATLAB. Table 2.1: Voltage conversion INPUT SIGNAL V IN IDEAL OUTPUT CODE >= V REF 7FFFh +V REF /(2 15 1) 0001h h V REF /(2 15 1) FFFFh <= V REF (2 15 /2) 8000h In order to calculate the ST parameters, we need to know the voltage values. Table 2.1 describes the conversion in our hardware board implementation. (V REF = 2.42 V) Besides, our board also increased the voltage values by 12, so we need to divided by 12 to obtain the accurate voltage values. The equation is as following: ST value = ST ( ) (2.5)

25 Summary Figure 2.9: ST elevation definition [24]. Until now, we have implemented the P-T algorithm as the basis to obtain the essential peak points for subsequent parameters calculation. In order to make the results more accurate, we also apply some DSP methods to preprocess the raw ECG signal to eliminate interferences and noise. Besides, the definition and measurement of each parameter have been described in details. From many experiments and tests with our hardware board data as well as the data from online database, the implemented algorithm works well and has the capability to provide relatively accurate results. However, during the tests, we notice that when the signal quality is poor, false detection would often happen. For example, when test subjects move their bodies during testing, like twisting or stretching, signals shape will be distorted, and hence false detection would happen. This situation is common in ambulatory ECG detection and such effect is called motion artifacts. In next chapter, methods to detect and label motion artifacts will be discussed in detail.

26 16 Chapter 3 Motion Artifacts Detection via Machine Learning Algorithms For portable ECG monitor devices, ECG records are often corrupted by various kinds of noise such as power line interference, motion artifacts and baseline drift with respiration. From chapter 2, we see that digital bandpass filters can be used for noise cancellation in real-time execution. However, motion artifacts are caused by changes in the electrode-skin impedance with electrode motion. It cannot be simply removed by the designed digital bandpass filters because the spectrum of motion artifacts completely overlaps with the ECG signal when the user is walking or running. Therefore, motion artifacts are the most difficult type of interference to eliminate. Besides, motion artifacts would affect the accuracy of ECG parameters detection, which may lead to heart diseases false detection. Recently, there are several studies on reducing motion artifacts with the filtered or differential method. Each method may work well for certain scenario or requirement. However, since motion artifacts often substantially distort the ECG waveform, not much useful information can be derived from the strongly processed signal. In this work, we propose a different handling of motion artifacts. Our objective is to identify and label signals plagued by motion artifacts, so that later analysis and diagnosis of heart conditions do not use these segments. To detect motion artifacts, we propose for the first time learning based models to fulfill the task. Here, the idea of machine learning is implemented. From lots of data testing results, it has been approved that this machine-learning algorithm has accuracy up to 90%.

27 17 Figure 3.1: Motion artifacts (muscle tremors) [25]. Figure 3.2: Motion artifacts detected with our board. 3.1 Motion Artifacts Definition and Properties Motion artifacts [26] are basically caused by muscle tremor/noise, which will result in minute electrode motion and change the electrode-skin impedance. When one s skeletal muscles undergo tremors, the ECG is interfered by seemingly random activities. Motion artifacts do not manifest under a fixed pattern and instead has a tendency to suddenly change depending on the users movements and actions. Fig. 3.1 shows the typical motion artifacts caused by muscle tremors. In this project, several motion artifacts were recorded during ECG monitoring with our in-house hardware board. They have various shapes, but they are similar to Fig Fig. 3.2 displays motion artifacts detected with our board. In addition, the bandwidth of motion artifacts changes over time, but usually manifest in the form of low-frequency elements. The useful ECG bandwidth for patient monitoring or healthcare purpose is between 0.05 Hz and 35 Hz. Therefore, low frequency noise elements that resulting from respiration and motion artifacts are known to overlap with the ST segment (0.8 Hz or below) of the ECG signal, and using a high pass filter to eliminate low frequency noise elements like these can

28 18 Figure 3.3: Adaptive filter structure [17]. lead to distortion of the ST segment, which contains clinical data on heart ischemia and myocardial infarction. Thus, simple filter sets can t effectively remove motion artifacts while maintaining signal integrity. In the following section, some related work will be introduced. 3.2 Related Work Among several different methods to detect or eliminate motion artifacts in ECG signal, there are two most popular methods : adaptive signal processing and wavelet transformation, which are widely discussed and applied. In this section, the introduction of each method will be given and their advantages and disadvantages will be discussed Adaptive signal processing In [17], the authors proposed a technique for cancelling motion artifacts in ambulatory ECG monitoring systems via adaptive signal processing method. The study described in that paper attempted to develop an ECG signal processing method that uses adaptive filter technology to eliminate ambulatory motion artifacts in ECG signal with high efficiency. The adaptive filter algorithm applied in the paper is the steepest decent method, which repeatedly calculates the mean squared error-minimizing factor. Fig. 3.3 shows the adaptive filter structure. Least mean square (LMS) adaptive filter bases on the given filter factor and relies on a minimum mean-square error algorithm to repeatedly calibrate the filter factor in eliminating noise, which would reduce motion artifacts effectively.

29 19 Figure 3.4: Three-level wavelet decomposition tree [10]. However, this system requires a reference input, which is used to generate moving average signal N R (left bottom of Fig. 3.3). In this case, a motion sensor or accelerometer module is required, which can generate tracking signals that are related to user s motion when it is attached near to ECG electrodes. After desired calculation of a microprocessor, reference input will be generated for adaptive filter. As for this project, the existing hardware board does not include this motion sensor module, so that this adaptive signal processing method is not suitable for this situation Discrete wavelet transformation In [10], ambulatory ECG signal analysis for detection of various motion artifacts using discrete wavelet transform (DWT) approach is addressed. Basically, biomedical signals can be analyzed in frequency domain, time domain, or time-frequency domain. Wavelet transform provides the time and frequency information simultaneously, hence giving a time-frequency representation of the signal. In DWT, a time-scale representation of the digital signal is obtained using digital filtering techniques. The DWT is performed by successive high pass and low pass filtering of a discrete time signal in Fig In the experiment, a GUI based tool called WAVEMENU from the MATLAB Wavelet toolbox are used. The key is to perform wavelet coefficients selection such that the synthesized signal approximates the pure cardiac signal. Here, they performed 9-level signal decomposition of ambulatory ECG signal. As coefficients selection was completed, the synthesized or reconstructed ECG signal, which approximates the pure cardiac component of an ambulatory ECG and the residual is termed as motion artifact signal. The motion artifact signal was obtained by subtracting the

30 20 synthesized ECG signal from the ambulatory ECG signal. However, this wavelet method is also not suitable for our project, because DWT will change the shape of ECG wave and may affect the heart condition diagnosis. 3.3 Features extraction for machine learning algorithms From the discussions above, it is obvious that simple digital filters are not suitable for motion artifact elimination and adaptive filters or wavelet transformation is also not good choices for real-time detection. Besides, motion artifacts have their own specific features and certain shapes, which provides basis for applying machine learning algorithms. In this scenario, a new method, which is based on machine learning concept is proposed in this project. Here, we mainly focused on supervised machine learning algorithms, which will be described in detail in the following sections Machine learning introduction Machine learning [8] is a type of artificial intelligence (AI) that provides computers with the ability to learn without being explicitly programmed. The process of machine learning is using the data to detect potential patterns in data and adjust program actions accordingly. Simply speaking, machine learning is the method to find hidden insights from existing data (usually big size data) and facilitate us to infer something outside these data. The basic assumption in this machine learning framework is that we have collected a set of observations called data, and the aim of learning is to uncover the governing law that is responsible for the production of the data observed. In the literature, this kind of learning strategy is called learning from examples, and the observations used in the learning process are called training data. Depending on the structure of the training data, machine-learning methods may be categorized as supervised or unsupervised learning. These two learning methods are:

31 21 A. Supervised Learning A training data in supervised learning assumes the form {(X n, y n ) n = 1, 2..., N}, where X n are examples from an input space X and y n γ are produced by a (unknown) casual system (i.e., a governing law) with X n as input. The most popular problems in supervised learning are classification and regression. In a classification problem, the goal is to assign each input (that is outside the training data) to one of the finite number of discrete categories. In a regression problem, the learning is aimed at finding a continuous-valued approximating function to fit a set of training data. B. Unsupervised Learning In unsupervised learning, we are just given a set of samples {X n, n = 1, 2..., N}, but the labels y n are not available. Because y n are missing, the available observations are called unlabeled data. The learning problems in this case are typically related to pattern classifications and structure identification (such as number of data clusters, center of clusters, and clusters themselves) of the input data. There are various machine-learning algorithms. In this project, we only apply supervised algorithms, such as Pocket Algorithm (PCA), Support Vector Machine (SVM) Features extraction In this project, we focus on supervised learning, so motion artifact features are required to be extracted as inputs X n. y n is the corresponding labels, where -1 represents no motion artifact and 1 is motion artifact. In this case, finding suitable features X n is the key point. From a large amount of data observation and examination, we extract three related features, which can use to represent motion artifacts quite well. A. Feature 1: RR energy From lots of ECG data recordings, we observe that motion artifacts signal is a combination of normal ECG signal and muscle noise, which is the extra energy recorded into ECG data. When the users move or twist their body during ECG detection,

32 22 Figure 3.5: Motion artifacts during detection. Figure 3.6: MATLAB code to calculate RR energy. the extra energy will be generated and recorded, and hence the energy tends to become larger when motion artifacts occur. Fig. 3.5 shows the typical motion artifacts that are recorded by our hardware board. From this figure, we can see that lots of spikes occur during the motion artifacts period. Fig. 3.2 shows the zoomed-in figure of motion artifacts, from which we can observe that the R peak pattern of ECG is still observable and also extra energy occurred between R peaks. Thus, the energy between RR intervals becomes a feature of motion artifacts. In addition, considering different users may have different ECG voltage amplitudes, we use normalized voltage value to make this feature usable for any condition. In each RR interval, we pick the largest value and convert it to one. Accordingly, other points are set to its own value divided by the largest value in this RR interval. Another issue to be taken into consideration is that different users may have different heart rate. High heart rate will result in shorter RR interval and vice versa. By dividing the number of points during RR interval to obtain average normalized RR energy, we can eliminate the HR impact. Fig. 3.6 is the MATLAB code to obtain each RR energy. Here, R i is the R peak point and R i (i+1) R i (i) is the RR interval.

33 23 Figure 3.7: MATLAB code to calculate RR energy. Next we give an example to calculate RR energy (Fig. 3.7). The data is from our hardware board and there are 10 R peaks, and hence there will be 9 RR energy values. After applying the calculation as Fig. 3.6, the RR energy results is obtained as follows: [0.0909, , , , , , , , ] [0.2513, , , , , , , , ] The first results is corresponding to the left figure in Fig. 3.6, which is a clean ECG signal. The second results are for the right figure, which contains motion artifacts signal at the beginning with values shown in red. From the comparison of these two results, we can observe that signal with motion artifacts usually have larger normalized RR energy. B. Feature 2: RR interval From the example above (Fig. 3.7), we can observe that R peak detection probably has false detection when motion artifacts occurred. It is because P-T QRS detection algorithm has certain learning process, which means the detection of upcoming R peaks depends on the previous data. In this case, the motion artifacts will affect the accuracy of R peaks detection. For example, in Fig. 3.8, motion artifacts occurred four times during ECG detection. It is obvious that the R peak detection is not accurate during these motion artifacts period, so that the RR interval values may be affected, which can result in extremely large or small RR interval values. From this circumstance, RR interval can be regarded as another special feature for motion

34 24 Figure 3.8: RR intervals during motion artifacts period. artifacts. The calculation of RR interval is relatively straightforward and simple. RR interval = R i(i+1) R i(i) (3.1) Here, we also take two ECG data shown in Fig. 3.7 for example. In the left figure, the RR interval values (in millisecond) are as following: [772, 688, 692, 676, 640, 644, 692, 716, 718]; In the right figure, the RR interval values are: [624, 720, 552, 1072, 2408, 752, 796, 816, 832]; From these two results, we can see that the values of RR intervals may have unstable ups and downs during motion artifacts period. C. Feature 3: SQ noise From a large amount of motion artifacts data observation, we extract this feature as a typical feature of motion artifacts. The definition of this feature is also quite straightforward, which is shown in Fig. 3.9 as follows. In Fig. 3.9, left one is one beat with motion artifact, and right one without motion artifact. This feature focuses on the period between S wave end and following R peaks Q wave onset (between the first black circle and the second pink circle). If there is a high spike, which is higher than one of the R peaks, SQ noise parameter will set to 1, otherwise, set to -1. This feature is effective because it is impossible to generate this high spike in normal ECG. Even if the users have potential heart diseases, which

35 25 Figure 3.9: Feature: SQ noise definition. sometimes may cause high T wave, R peak will still be the highest point in one beat. Besides, electrical noise sometimes will involve high spike, but it only occurred in a very short period and digital filters in signal preprocessing part will eliminate it. From Fig. 3.7, the SQ noise value of left figure is: [ 1, 1, 1, 1, 1, 1, 1, 1, 1]; SQ noise value of right figure is: [ 1, 1, 1, 1, 1, 1, 1, 1, 1]; In this project, we mainly apply these three typical features to detect motion artifacts. In the following sections, machine learnings training and testing procedures will be discussed in details. 3.4 Data collection Since the features have been extracted and determined, the next significant step for machine learning algorithms is to collect sufficient data to discover the potential properties of motion artifacts signal against normal ECG signal. In this project, we only focus on supervised learning, which means we have fixed outputs. Here, we use 1 to represent the beats with motion artifacts, and -1 to represent without motion artifacts. Next is to collect sufficient data, which includes normal ECG signal and motion artifacts signal. Besides, there are some rules that we need to pay attention to when we are doing collection, which will be discussed in details in the following sections.

36 Feature scaling Feature scaling [11] is a method used to standardize the range of independent variables or features of data. In data processing, it is also known as data normalization and is generally performed during the data-preprocessing step. The motivation to do feature scaling is that when the range of values of raw data varies widely, in some machine learning algorithms, objective functions will not work properly without normalization or scaling. For example, if one of the features has a broad range of values, the classification distance will be governed by this particular feature. Therefore, the range of all features should be scaled to the similar range so that each feature contributes approximately proportionately to the final results. Among the three features mentioned in previous section, the value of RR interval is around 700 milliseconds. However, the values of RR energy and SQ noise are around 1. In this case, RR interval will become the governing feature and may eliminate the effects of RR energy and SQ noise. Here, we implement feature scaling to RR interval feature to make its unit from millisecond to second, so that the range will be around 0.7 second, which makes all three features in the similar range as well as the output [-1, 1] Data collection from hardware board In the first stage, we mainly collected data from our hardware board to testify the effectiveness of three features. Next, the procedures to collect training data via MAT- LAB is introduced. 1. Users use our hardware board to do ECG testing. While doing the tests, users are required to twist their bodies or do some daily activities, such as walking and sitting up and down on purpose in order to cause some motion artifacts to be collected. 2. After testing, the data collected via an Android phone can be uploaded to database which can be downloaded anytime in the future. Then, data will be read into MATLAB for further processing. 3. The data collected will be filtered first to eliminate baseline wandering and electrical interference. Next apply the ECG parameter extraction algorithm that was discussed in Chapter 2 to obtain P, Q, R, S and T critical points.

37 27 4. Based on the critical points from the last step, three feature values can be calculated and extracted. Here, we use MATLAB command dlmwrite() to save the feature values into a CSV file. 5. The last step is to determine if the beat contains motion artifact manually and record the results into the CSV file. Here is an example to illustrate the whole procedure in detail.figure 3.10 shows the data that we need to process. Firstly, from the MATLAB results, we can obtain the values of three features as follows. RR Interval = [0.660, 0.636, 0.676, 0.700, 0.716, 0.644, 0.456, 0.744] RR Energy = [0.1403, , , , , , , ] SQ Noise = [ 1, 1, 1, 1, 1, 1, 1, 1] Secondly, using dlmwrite command to save the data into a CSV file for record: dlmwrite( ecg d ata.csv, RRinterval, append, roffset, 1, coffset, 0); Thirdly, we visually observe the ECG signal in Fig and input the label results manually. In this example, the results about motion artifacts are: Result = [ 1, 1, 1, 1, 1, 1, 1, 1] Thus, we finish the whole procedure of collecting the data. Following this method, we need to process sufficient data and collect the features and results into a CSV file for further analysis. After the data collection, the machine learning algorithms can be applied Applying machine learning algorithms There are lots of different machine learning algorithms and each of them has its own characteristics and suitable conditions. For example, Principal Component Analysis can decrease data dimensions via singular value decomposition (SVD), which can improve calculation speed and decrease calculation complexity. Another popular machine learning algorithm is called Support Vector Machines (SVM), which can offer bigger margins for separating two sets and has more robust performance against data uncertainty.

38 28 Figure 3.10: Data plot example. In this project, considering the number of features and complexity, a simple algorithm called Pocket Algorithm [14], which is a variant of the Perceptron Learning Algorithm, is chosen to test at the beginning. Pocket Algorithm is a simple and useful algorithm, which can also deal with non-separable data sets with improved performance. Here, we apply Pocket Algorithm with the data we collected from our hardware board to do the initial test and see if these three features can produce proper results. In the first stage, the data collected is about 700 beats and was separated into two sets training data and testing data (427 vs 275). First, we apply Pocket Algorithm to training data via MATLAB and set the iteration number to 500. The in-sample error we obtained is around 5.39%. The in-sample error with iteration times is plotted in Fig It is obvious that the in-sample error decreased as the number of iteration increased and after around 60 iterations, the in-sample error became stable around 5%. The function interface for calling Pocket Algorithm in MATLAB: 1 f u n c t i o n [ wt, t, e i n p o c k e t ] = 2 p o c k e t s e m i c i r c l e ( x, y, xp, xn, l r, w0, st1, st2,k) Besides, the out-of-sample error is also required to test because when both insample and out-of-sample errors are relatively small, the features we extracted could be regarded as effective. The process to obtain out-of-sample error is different from

39 29 Figure 3.11: In-sample error with iteration based on Pocket Algorithm. in-sample error. Firstly, we obtain the weights after applying Pocket Algorithm to training data. The number of weights is equal to the number of features plus one because there is a constant number needed for this Pocket Algorithm. The weights obtained after training process is: wt = [0.2; 0.044; ; 0.2] which is related to feature = [constantnumber : 1, RR I nterval, RR E nergy, SQ N oise] respectively. Thus for the testing data, the results are equal to wt.* features. If result is bigger than zero, which means potential motion artifacts, otherwise no motion artifacts. The MATLAB code for out-of-sample error is given here: 1 wt = [ 0. 2 ; 0.044; ; 0. 2 ] ; 2 SampleResult = [ ] ; 3 4 f o r k = 1 : 1 : length ( RRinterval ) 5 temp = wt ( 1 ) 1.0+wt ( 2 ) ( RRinterval ( k ) )+ 6 wt ( 3 ) ( RRenergy ( k ) )+wt ( 4 ) ( SQnoise ( k ) ) ; 7 i f temp>0 8 f o r i = 1 : 1 : RRsize 9 SampleResult = [ SampleResult, 1 ] ;

40 30 10 end 11 e l s e 12 f o r i = 1 : 1 : RRsize 13 SampleResult = [ SampleResult, 0 ] ; 14 end 15 end 16 end After calculation, the out-of-sample error is around 4.36%, which means the features extracted works well for motion artifacts detection Making data more generic In previous section, the inital testing data used to apply machine-learning algorithms are from our hardware board and several our group testing results, which has limited data diversity. In order to make the machine learning results more accurate and generic, we should include more data from different identities, like people with healthy hearts and with arrhythmias. In this case, online ECG database is helpful to provide diverse ECG data. In this project, the online database we mainly referred to is called MIT-BIH Arrhythmia Database [5]. We downloaded several different arrhythmias ECG data, which includes: Left/Right bundle branch block beats, Atrial premature beats, Aberrated atrial premature beats, Fusion of ventricular and normal beats, and Normal sinus rhythm. Then, we process these data with the help of MATLAB and collected their features values and recorded into the CSV file mentioned above. Finally, the whole data size of our recording is 3153, which includes motion artifacts data around Performance analysis and cross validation Performance features sensitivity and specificity Sensitivity and specificity [9] are two common terms used to evaluate a clinical test. They are statistical measures of the performance of a binary classification test. Sensitivity (also called the true positive rate) measures the proportion of positives that are correctly identified as such (e.g., the percentage of sick people

41 31 who are correctly identified as having the condition). Specificity (also called the true negative rate) measures the proportion of negatives that are correctly identified as such (e.g., the percentage of healthy people who are correctly identified as not having the condition). There is usually a trade-off between the measures. sensitivity, the lower the specificity, and vice versa. In general, the higher the The sensitivity of a clinical test refers to the ability of the test to correctly identify those patients with the disease. Sensitivity = True positives True positives + False negatives (3.2) A test with 100% sensitivity correctly identifies all patients with the disease. A test with 80% sensitivity detects 80% of patients with the disease (true positives) but 20% with the disease go undetected (false negatives). A high sensitivity is clearly important where the test is used to identify a serious but treatable disease (e.g. cervical cancer). Specificity of a clinical test refers to the ability of the test to correctly identify those patients without the disease. Specificity = True negatives True negatives + False positives (3.3) Therefore, a test with 100% specificity correctly identifies all patients without the disease. A test with 80% specificity correctly reports 80% of patients without the disease as test negative (true negatives) but 20% patients without the disease are incorrectly identified as test positive (false positives). As discussed above, a test with a high sensitivity but low specificity results in many patients who are disease free being told of the possibility that they have the disease and are then subject to further investigation. For clinical diseases, this kind of results will be more helpful. However, in this project, high specificity and relatively low sensitivity are desirable, which means some motion artifacts signal may be missed but most of normal ECG signal will be kept. This approach is conservative but more safe proof because it can largely eliminate the possibility that some arrhythmias are detected as motion artifacts due to its irregular shape.

42 32 Figure 3.12: Beat1. Next, we applied the total generic data and Pocket algorithm to obtain sensitivity and specificity parameters. The results are as following: Average sensitivity : Average specificity : From the results, the specificity is high but sensitivity is a bit low, which meets our requirements. Then we tried to figure out the reasons causing relatively low sensitivity. We used MATLAB to plot the signal and compare the machine learning results with the actual ECG signal. After several tests, we found that if the motion artifacts were not obvious, which means the QRS pattern can still be recognized in one beat, the algorithm probably regarded it as normal beat. Fig and Fig described this condition. The beats in red circles have slightly motion artifacts resulting in some irregular shapes, but they are misclassified as normal beats. Thus, one of the main reasons for low sensitivity is slightly polluted motion artifacts signal. However, this misclassification would not largely affect detection accuracy in that slightly noise could be eliminated by our digital filters Cross validation introduction Overfitting [21] is an important issue to understand and address in machine learning: it is a phenomenon where good fitting of training data does not necessarily imply satisfactory generalization. And cross validation is a useful technique for estimating

43 33 Figure 3.13: Beat2. out-of-sample error. Roughly speaking, overfitting refers to fitting the data more than is warranted. The main case of overfitting is when the learning model yields a hypothesis with a low in-sample error but a high out-of-sample error. Overfitting generally occurs when noise or random error is involved. Here is an example of overfitting. In Fig. 3.14, it describes a function in black line and its 15 noisy data points, which deviated from its original function due to random noise interferences. Figure 3.15 [18] shows the 10 th order and 2 nd order fits separately. It is obvious that 10 th order fit curve fits the noisy points much better than 2nd order, which also produces a smaller in-sample error. However, the 2 nd order can be expected to generalize better and has a better prediction. Here, we apply cross validation technique [15] to estimate out-of-sample error. The idea of doing cross validation is as follows: Given a data set C = {(x n, y n ), n = 1, 2,..., N}, we partition it into a training set of size N K and a validation set of size K. As expected, training set is used in learning process like before, except that its size is reduced from N to N K. The role of validation set is nearly the same as a test set in the sense that it is independent of the training data and it is used to compute a validation error E val (g). Thus, the

44 34 Figure 3.14: 10 th -order target function and 15 noisy data points. Table 3.1: Cross validation of Pocket Algorithm Part 20% 20% 20% 20% 20% In-sample error Out-of-sample Sensitivity Specificity estimation of the out-of-sample error is: E val (g) = 1 K K e(g(x n ), y n ) (3.4) n=1 where e(g(x n ), y n ) represents g(x n ) y n. In common, a rule of thumb is to set 20% of the data (i.e. K = N/5) for validation. Cross Validation of Pocket Algorithm Following the procedures described above, we partition the whole data set into 5 subsets. The results are recorded in Table 3.1.

45 35 Figure 3.15: 10 th order fit (red curve) versus 2 nd order fit (red curve)[18]. wt1 = [ 0.2; ; ; 0.6] wt2 = [ 0.2; ; ; 0.2] wt3 = [ 0.2; ; ; 0.2] wt4 = [ 0.4; ; ; 0.4] wt5 = [0; ; ; 0.4] Average out-of-sample error:7.462% Average sensitivity: Average specificity: From the results above, we can see that the average out-of-sample error is around 7%, which shows the effectiveness and accuracy of extracted features and the weights calculated from this machine-learning algorithm. Cross Validation of SVM SVM is a popular machine learning algorithm. Here, we use MATLAB built-in SVM tool to apply cross validation in order to test the algorithms s performance under different machine learning methods. The MATLAB code of this part is as following: 1 k=10;

46 36 2 cvfolds = c r o s s v a l i n d ( Kfold, Y, k ) ; %# get i n d i c e s o f 10 f o l d CV 3 cp = c l a s s p e r f (Y) ; %# i n i t performance t r a c k e r 4 5 f o r i = 1 : k %# f o r each f o l d 6 t e s t I d x = ( cvfolds == i ) ; %# get i n d i c e s o f t e s t i n s t a n c e s 7 t r a i n I d x = t e s t I d x ; %# get i n d i c e s t r a i n i n g i n s t a n c e s 8 %# t r a i n an SVM model over t r a i n i n g i n s t a n c e s 9 svmmodel = svmtrain (X( trainidx, : ), Y( t r a i n I d x ) ) ; 10 %# t e s t using t e s t i n s t a n c e s 11 pred = s v m c l a s s i f y ( svmmodel, X( testidx, : ) ) ; 12 %# e v a l u a t e and update performance o b j e c t 13 cp = c l a s s p e r f ( cp, pred, t e s t I d x ) ; 14 end %# get accuracy 17 cp. CorrectRate 18 %# get c o n f u s i o n matrix 19 %# columns : actual, rows : predicted, l a s t row : u n c l a s s i f i e d i n s t a n c e s 20 cp. CountingMatrix We can choose different kernels to test and the results are as following: 1. Linear Kernel: Average correct rate: Average error rate: = 7.64% 2. Quadratic Kernel: Average correct rate: Average error rate: = 7.33% 3. rbf Kernel: Average correct rate:

47 37 Average error rate: = 7.96% From the results above, we can observe that the average correct rates, i.e., accuracy are closed to each other under different kernels. And the accuracy is about 92%, which represents the effectiveness of these features Summary In this chapter, the defination of motion artifacts and the approaches to apply machine learning algorithms are presented in details. The results from in-sample error and outof-sample error that are lower than 0.1 can show the effectiveness of three selected features. In order to verify the accuracy of the results, cross validation is used to test out-of-sample errors and another machine learning algorithm - SVM is applied to compare. Besides, we use two performance features: sensitivity and specificity to evaluate its trade-off. The results with a high sensitivity and low specificity are secure, conservative and meet our requirements.

48 38 Chapter 4 Java Implementation The ultimate goal of this ECG signal-processing project is to implement motion artifacts identification and QRS detection algorithms into our group developed ECG Android application, which can be connected with the hardware board to gather ECG signal and process the signal in real time to generate an ECG report. Therefore, there are mainly two aspects to be considered in order to achieve this function. Firstly, we need to convert the previous MATLAB code into Java code and testify the accuracy of algorithms and results. Here, we have to consider the computing accuracy differences between MATLAB and Java. Also, the previous MATLAB buildin functions need to be replaced in Java program. Secondly, since these detection algorithms must be integrated into the whole Android App, the encapsulation of this signal processing module is important. The module encapsulation can let us modify the single module later easily without impacting the whole application. In this case, the APIs are key parts for program inner communication and data transmission. Thus, we need to design proper APIs for this signal processing module to ensure the encapsulation and communication. 4.1 MATLAB to Java conversion The challenge for this part is how to properly convert the build-in functions that have been used in MATLAB code. For example, in the initial signal processing part in Chapter 2, the build-in band-pass filter is applied to eliminate noise and interference. And build-in moving average filter is used for smoothing the raw signal in order to improve the detection accuracy. In the following section, the Java version of build-in

49 39 functions is presented in details. A. Band-pass filter design In MATLAB code, the build-in Butterworth Band-pass filter is used in the signalprocessing step. The function to implement Butterworth filter is as follows. [B, A] = butter(n, W n ) (4.1) Which designs an N th order band-pass digital Butterworth filter and returns the filter coefficients in length N + 1 vectors B (numerator) and A (denominator). The coefficients are listed in descending powers of z. After obtaining the coefficients of filter, we use build-in filter function to realize the function of digital filter. Y = filter(b, A, X) (4.2) Which filters the data in vector X with the filter described by vector A and B to create the filtered data Y. The filter actually is an implementation of the standard difference equation: a(1) y(n) =b(1) x(n) + b(2) x(n 1) b(nb + 1) x(n nb) a(2) y(n 1)... a(na + 1) y(n na) (4.3) The MATLAB code for this band-pass filter is simple as the code described below: 1 %Noise c a n c e l a t i o n ( F i l t e r i n g ) 2 f 1 =0.5; %c u t t o f f low frequency to get r i d o f b a s e l i n e wander 3 f 2 =45; %c u t t o f f frequency to d i s c a r d high frequency n o i s e 4 Wn=[ f 1 f 2 ] 2/ f s ; % cutt o f f based on f s 5 N = 3 ; % order o f 3 l e s s p r o c e s s i n g 6 [ a, b ] = butter (N,Wn) ; %bandpass f i l t e r i n g 7 ecg = f i l t e r ( a, b, ecg ) ; However, there are no such build-in filter functions in Java library, so we need to design our own digital filters to replace them and make sure the similar performance. From Digital Signal Processing aspect, finite impulse response (FIR) filters are easy to design and implement via programming. Fig. 4.1 [1] describes the basic idea of

50 40 Figure 4.1: FIR filter realization [1]. FIR filter. For this FIR filter of order N, each output value is a weighted sum of the most recent input values. The equation below describes the implementation of this FIR filter. The next step is to obtain the weighted value of this N order FIR filter. y[n] = b 0 x[n] + b 1 x[n 1] + + b N x[n N] N = b i x[n i] (4.4) i=0 From the Digital Signal Processing course, we can easily design the band-pass filter given certain bandwidth, filter order and sampling frequency. The code below is the MATLAB code used to replace the build-in band-pass filter. After lots of examination, we decide to use N= 21 order FIR filter, which has similar performance as the build-in one. 1 %bandpass f i l t e r%%% 2 f p a r a = [ / f s 45 2/ f s ] ; 3 N=21; 4 M = (N 1) / 2 ; 5 n = 0 :M 1; 6 7 % Generate impulse response o f the i d e a l f i l t e r 8 omec1 = pi f p a r a ( 1 ) ; 9 omec2 = pi f p a r a ( 2 ) ; 10 hd = ( s i n ( ( n M) omec2 ) s i n ( ( n M) omec1 ) ). / ( ( n M) pi ) ; 11 hd = [ hd ( omec2 omec1 ) / pi f l i p l r ( hd ) ] ;

51 41 12 %w type == 2, % Hamming 13 w = cos ( pi n/m) ; 14 w = [w 1 f l i p l r (w) ] ; % Obtain impulse response 17 h = w. hd ; e c g l e n=length ( ecg ) ; 20 e c g f=ecg ; 21 f o r n=(n 1) : e c g l e n 1 22 ecg=ecg (n+1) : 1:( n+1 (N 1) ) ) ; 23 e c g f ( n+1)=h ecgn ; 24 end e c g f=e c g f (N: e c g l e n N) ; 27 ecg=e c g f B. Moving average filter design The functionality of moving average filter is to make the signal smoother, so that the accuracy of QRS detection would be improved. The MATLAB code for moving average filter is as following: 1 %%%moving window averaging f i l t e r 2 Nw=3; 3 B=1/Nw ones (Nw, 1 ) ; 4 ecg= f i l t e r (B, 1, ecg ) ; Where Nw represents the number of points will be averaged. The idea of this filter is quite straightforward - replace the original point values with the average of its N surrounding points. The replaced MATLAB code is as following: 1 %moving average f i l t e r in order 3 2 ecg new = [ ecg ( 1 ) ] ; 3 f o r i = 2 : 1 : length ( ecg ) 1 4 ecg new = ( ecg ( i 1)+ecg ( i )+ecg ( i +1) ) / 3 ; 5 end

52 42 The implementation of above code is quite simple in Java, thus we can get rid of the MATLAB build-in filter( ) function. 4.2 Algorithm structure in Java In the section, the general structure of this ECG signal-processing project will be introduced, which include the connection/interface between each algorithm and the communication between each algorithm. Figure 4.2: General structure of ECG signal processing module in Java Application. In Fig. 4.2, we use flow chart to describe the procedure and basic logic of this ECG signal processing module. Firstly, the raw signal will pass into the Motion Artifacts Detection module, which applies machine learning results to detect motion artifacts signal. If the ratio of detected motion artifacts signal is greater than 50%,

53 43 this sequence of signal is regarded too noisy and give a warning signal instead of passing to ECG Parameters Extraction module. Otherwise, a list of beat marks will be generated to represent motion artifacts signal, which then will be passed to ECG Parameters Extraction module to assit parameters calculation. Finally, with the help of beat marks, ECG Parameters Extraction module can generate the ECG report based on the parameters average values. 4.3 Java APIs design In Java, each function model should be implemented in a Class. And in class, we can realize module encapsulation and design the interfaces for other programs to call. In this project, we design two classes to achieve different functions. From previous chapter, we know that there are two processing units: Motion Artifacts Detection and ECG Parameters Extraction unit. Therefore, we define two classes MADetec.java and ECGDetect.java, which include motion artifacts detection algorithm and ECG parameters extraction algorithm respectively. Firstly, in order to make these algorithms function well, there must be an API to let raw ECG data pass into the MADetect class. Therefore, there is a public function named read( ) in MADetect class to read the raw data in. Then, after processing and calculation, the results with marks (1-motion artifacts, 0- no motion artifacts) need to be passed to the second class ECGDetect for further processing. Another public method marks( ) can be called to return the list of motion artifacts marks. Finally, the results from ECGDetect should be obtained by a displaying class, so that the results can be displayed properly in the app. We design five public methods for the displaying class to call to obtain the paramters values. Fig. 4.3 shows the APIs. 4.4 Summary In this chapter, we mainly discuss the challenges we met to apply the algorithms into Java application and the methods we use to conquer these problems. Besides, the general structure of ECG signal processing system is presented to further explain the relation and communication between each module. Finally, the APIs are introduceds with details.

54 Figure 4.3: Java APIs design and details. 44

Optimizing the detection of characteristic waves in ECG based on processing methods combinations

Optimizing the detection of characteristic waves in ECG based on processing methods combinations Date of publication xxxx 00, 0000, date of current version xxxx 00, 0000. Digital Object Identifier 10.1109/ACCESS.2017.Doi Number Optimizing the detection of characteristic waves in ECG based on processing

More information

Heart-Rate Detector Report

Heart-Rate Detector Report Heart-Rate Detector Report Matthew Hu SUID: matthu TA: Alexander Gonzalez 1. Introduction In this project, I will be using the DSP Shield in order to calculate a patient's heart rate. Electrocardiography

More information

Online Neural Network Training for Automatic Ischemia Episode Detection

Online Neural Network Training for Automatic Ischemia Episode Detection Online Neural Network Training for Automatic Ischemia Episode Detection D.K. Tasoulis,, L. Vladutu 2, V.P. Plagianakos 3,, A. Bezerianos 2, and M.N. Vrahatis, Department of Mathematics and University of

More information

1D internal multiple prediction in a multidimensional world: errors and recommendations

1D internal multiple prediction in a multidimensional world: errors and recommendations 1D internal multiple prediction 1D internal multiple prediction in a multidimensional world: errors and recommendations Pan Pan and Kris Innanen ABSTRACT Internal multiples are more difficult to estimate

More information

ADAPTIVE TILE CODING METHODS FOR THE GENERALIZATION OF VALUE FUNCTIONS IN THE RL STATE SPACE A THESIS SUBMITTED TO THE FACULTY OF THE GRADUATE SCHOOL

ADAPTIVE TILE CODING METHODS FOR THE GENERALIZATION OF VALUE FUNCTIONS IN THE RL STATE SPACE A THESIS SUBMITTED TO THE FACULTY OF THE GRADUATE SCHOOL ADAPTIVE TILE CODING METHODS FOR THE GENERALIZATION OF VALUE FUNCTIONS IN THE RL STATE SPACE A THESIS SUBMITTED TO THE FACULTY OF THE GRADUATE SCHOOL OF THE UNIVERSITY OF MINNESOTA BY BHARAT SIGINAM IN

More information

Classification of Subject Motion for Improved Reconstruction of Dynamic Magnetic Resonance Imaging

Classification of Subject Motion for Improved Reconstruction of Dynamic Magnetic Resonance Imaging 1 CS 9 Final Project Classification of Subject Motion for Improved Reconstruction of Dynamic Magnetic Resonance Imaging Feiyu Chen Department of Electrical Engineering ABSTRACT Subject motion is a significant

More information

Fine muscular activity recognition using Electromyography. Ala Shaabana

Fine muscular activity recognition using Electromyography. Ala Shaabana Fine muscular activity recognition using Electromyography Ala Shaabana Outline What is Electromyography? A little Biology. Surface EMG (semg) Signal Classifying semg. Myoelectric Control strategies. Our

More information

A Syntactic Methodology for Automatic Diagnosis by Analysis of Continuous Time Measurements Using Hierarchical Signal Representations

A Syntactic Methodology for Automatic Diagnosis by Analysis of Continuous Time Measurements Using Hierarchical Signal Representations IEEE TRANSACTIONS ON SYSTEMS, MAN, AND CYBERNETICS PART B: CYBERNETICS, VOL. 33, NO. 6, DECEMBER 2003 951 A Syntactic Methodology for Automatic Diagnosis by Analysis of Continuous Time Measurements Using

More information

ESPCI ParisTech, Laboratoire d Électronique, Paris France AMPS LLC, New York, NY, USA Hopital Lariboisière, APHP, Paris 7 University, Paris France

ESPCI ParisTech, Laboratoire d Électronique, Paris France AMPS LLC, New York, NY, USA Hopital Lariboisière, APHP, Paris 7 University, Paris France Efficient modeling of ECG waves for morphology tracking Rémi Dubois, Pierre Roussel, Martino Vaglio, Fabrice Extramiana, Fabio Badilini, Pierre Maison Blanche, Gérard Dreyfus ESPCI ParisTech, Laboratoire

More information

Mathematically Modeling Fetal Electrocardiograms

Mathematically Modeling Fetal Electrocardiograms Pursuit - The Journal of Undergraduate Research at the University of Tennessee Volume 5 Issue 1 Article 10 June 2014 Mathematically Modeling Fetal Electrocardiograms Samuel Estes University of Tennessee,

More information

LOW POWER FPGA IMPLEMENTATION OF REAL-TIME QRS DETECTION ALGORITHM

LOW POWER FPGA IMPLEMENTATION OF REAL-TIME QRS DETECTION ALGORITHM LOW POWER FPGA IMPLEMENTATION OF REAL-TIME QRS DETECTION ALGORITHM VIJAYA.V, VAISHALI BARADWAJ, JYOTHIRANI GUGGILLA Electronics and Communications Engineering Department, Vaagdevi Engineering College,

More information

Embedded Systems. Cristian Rotariu

Embedded Systems. Cristian Rotariu Embedded Systems Cristian Rotariu Dept. of of Biomedical Sciences Grigore T Popa University of Medicine and Pharmacy of Iasi, Romania cristian.rotariu@bioinginerie.ro May 2016 Introduction An embedded

More information

PERFORMANCE COMPARISON OF BACK PROPAGATION AND RADIAL BASIS FUNCTION WITH MOVING AVERAGE FILTERING AND WAVELET DENOISING ON FETAL ECG EXTRACTION

PERFORMANCE COMPARISON OF BACK PROPAGATION AND RADIAL BASIS FUNCTION WITH MOVING AVERAGE FILTERING AND WAVELET DENOISING ON FETAL ECG EXTRACTION I J C T A, 9(28) 2016, pp. 431-437 International Science Press PERFORMANCE COMPARISON OF BACK PROPAGATION AND RADIAL BASIS FUNCTION WITH MOVING AVERAGE FILTERING AND WAVELET DENOISING ON FETAL ECG EXTRACTION

More information

cubestress your profession our mission

cubestress your profession our mission The CARDIOLINE wireless stress testing system combines combina the high performance of the software and of the acquisition unit clickecgbt. is the complete solution to manage ECG Stress tests. combines

More information

Serial Data, Smoothing, & Mathematical Modeling. Kin 304W Week 9: July 2, 2013

Serial Data, Smoothing, & Mathematical Modeling. Kin 304W Week 9: July 2, 2013 Serial Data, Smoothing, & Mathematical Modeling Kin 304W Week 9: July 2, 2013 1 Outline Serial Data What is it? How do we smooth serial data? Moving averages (unweighted and weighted) Signal averaging

More information

Character Recognition

Character Recognition Character Recognition 5.1 INTRODUCTION Recognition is one of the important steps in image processing. There are different methods such as Histogram method, Hough transformation, Neural computing approaches

More information

Probabilistic Models for Automated ECG Interval Analysis in Phase 1 Studies

Probabilistic Models for Automated ECG Interval Analysis in Phase 1 Studies Probabilistic Models for Automated ECG Interval Analysis in Phase 1 Studies Technical Report BSP 08-01 Nicholas P. Hughes and Lionel Tarassenko Institute of Biomedical Engineering University of Oxford

More information

Patient Simulator Series

Patient Simulator Series 7 Multi-Parameter Simulators Features - PS-2200 Series ± Simple to Operate ± Independent Lead Outputs produce a true 12 Lead ECG Signal ± 1, 2 or 4 Invasive BP Channels ± All BP Waveforms Available on

More information

A CONFIGURABLE LOW POWER MIXED SIGNAL FOR PORTABLE ECG MONITORING SYSTEM

A CONFIGURABLE LOW POWER MIXED SIGNAL FOR PORTABLE ECG MONITORING SYSTEM A CONFIGURABLE LOW POWER MIXED SIGNAL FOR PORTABLE ECG MONITORING SYSTEM BAYYA RAMESH 1, P.NAGESWARA RAO 2 1 Bayya Ramesh, student, Vignan institute of Technology &Science, Hyderabad, Telangana, India.

More information

3 Nonlinear Regression

3 Nonlinear Regression CSC 4 / CSC D / CSC C 3 Sometimes linear models are not sufficient to capture the real-world phenomena, and thus nonlinear models are necessary. In regression, all such models will have the same basic

More information

Faros Explorer Manual

Faros Explorer Manual Faros Explorer Manual Date of issue: May 30, 2017 Mega Electronics Ltd, Pioneerinkatu 6, FI-70800 Kuopio, Finland, http://www.megaemg.com Contents 1. Introduction... 1 1.1. Intended use... 1 1.2. Symbols...

More information

ERPEEG Tutorial. Version 1.0. This tutorial was written by: Sravya Atluri, Matthew Frehlich and Dr. Faranak Farzan.

ERPEEG Tutorial. Version 1.0. This tutorial was written by: Sravya Atluri, Matthew Frehlich and Dr. Faranak Farzan. ERPEEG Tutorial Version 1.0 This tutorial was written by: Sravya Atluri, Matthew Frehlich and Dr. Faranak Farzan. Contact: faranak.farzan@sfu.ca Temerty Centre for Therapeutic Brain Stimulation Centre

More information

A Data Classification Algorithm of Internet of Things Based on Neural Network

A Data Classification Algorithm of Internet of Things Based on Neural Network A Data Classification Algorithm of Internet of Things Based on Neural Network https://doi.org/10.3991/ijoe.v13i09.7587 Zhenjun Li Hunan Radio and TV University, Hunan, China 278060389@qq.com Abstract To

More information

TMSEEG Tutorial. Version 4.0. This tutorial was written by: Sravya Atluri and Matthew Frehlich. Contact:

TMSEEG Tutorial. Version 4.0. This tutorial was written by: Sravya Atluri and Matthew Frehlich. Contact: TMSEEG Tutorial Version 4.0 This tutorial was written by: Sravya Atluri and Matthew Frehlich Contact: faranak.farzan@sfu.ca For more detail, please see the Method article describing the TMSEEG Toolbox:

More information

A granular resampling method based energy-efficient architecture for heartbeat classification in ECG

A granular resampling method based energy-efficient architecture for heartbeat classification in ECG This article has been accepted and published on J-STAGE in advance of copyediting. Content is final as presented. IEICE Electronics Express, Vol.*, No.*, 1 10 A granular resampling method based energy-efficient

More information

Cover Page. The handle holds various files of this Leiden University dissertation.

Cover Page. The handle   holds various files of this Leiden University dissertation. Cover Page The handle http://hdl.handle.net/1887/22055 holds various files of this Leiden University dissertation. Author: Koch, Patrick Title: Efficient tuning in supervised machine learning Issue Date:

More information

CS 229 Project report: Extracting vital signs from video

CS 229 Project report: Extracting vital signs from video CS 229 Project report: Extracting vital signs from video D.Deriso, N. Banerjee, A. Fallou Abstract In both developing and developed countries, reducing the cost of medical care is a primary goal of science

More information

Performance Evaluation of Various Classification Algorithms

Performance Evaluation of Various Classification Algorithms Performance Evaluation of Various Classification Algorithms Shafali Deora Amritsar College of Engineering & Technology, Punjab Technical University -----------------------------------------------------------***----------------------------------------------------------

More information

code pattern analysis of object-oriented programming languages

code pattern analysis of object-oriented programming languages code pattern analysis of object-oriented programming languages by Xubo Miao A thesis submitted to the School of Computing in conformity with the requirements for the degree of Master of Science Queen s

More information

BioBeat User Guide. Warning

BioBeat User Guide.  Warning www.i-cubex.com BioBeat User Guide Warning The BioBeat sensor is to be used only with extreme caution according to the following instructions. It is intended for research purposes only and not intended

More information

Auto-Digitizer for Fast Graph-to-Data Conversion

Auto-Digitizer for Fast Graph-to-Data Conversion Auto-Digitizer for Fast Graph-to-Data Conversion EE 368 Final Project Report, Winter 2018 Deepti Sanjay Mahajan dmahaj@stanford.edu Sarah Pao Radzihovsky sradzi13@stanford.edu Ching-Hua (Fiona) Wang chwang9@stanford.edu

More information

Clustering Analysis based on Data Mining Applications Xuedong Fan

Clustering Analysis based on Data Mining Applications Xuedong Fan Applied Mechanics and Materials Online: 203-02-3 ISSN: 662-7482, Vols. 303-306, pp 026-029 doi:0.4028/www.scientific.net/amm.303-306.026 203 Trans Tech Publications, Switzerland Clustering Analysis based

More information

TERM PAPER ON The Compressive Sensing Based on Biorthogonal Wavelet Basis

TERM PAPER ON The Compressive Sensing Based on Biorthogonal Wavelet Basis TERM PAPER ON The Compressive Sensing Based on Biorthogonal Wavelet Basis Submitted By: Amrita Mishra 11104163 Manoj C 11104059 Under the Guidance of Dr. Sumana Gupta Professor Department of Electrical

More information

Unsupervised learning in Vision

Unsupervised learning in Vision Chapter 7 Unsupervised learning in Vision The fields of Computer Vision and Machine Learning complement each other in a very natural way: the aim of the former is to extract useful information from visual

More information

Let s start with occluding contours (or interior and exterior silhouettes), and look at image-space algorithms. A very simple technique is to render

Let s start with occluding contours (or interior and exterior silhouettes), and look at image-space algorithms. A very simple technique is to render 1 There are two major classes of algorithms for extracting most kinds of lines from 3D meshes. First, there are image-space algorithms that render something (such as a depth map or cosine-shaded model),

More information

MINI-PAPER A Gentle Introduction to the Analysis of Sequential Data

MINI-PAPER A Gentle Introduction to the Analysis of Sequential Data MINI-PAPER by Rong Pan, Ph.D., Assistant Professor of Industrial Engineering, Arizona State University We, applied statisticians and manufacturing engineers, often need to deal with sequential data, which

More information

iworx Sample Lab Experiment HP-3: Interference of Stimuli on Associative Tasks - The Stroop Effect

iworx Sample Lab Experiment HP-3: Interference of Stimuli on Associative Tasks - The Stroop Effect Experiment HP-3: Interference of Stimuli on Associative Tasks - The Stroop Effect Background In his doctoral thesis published in 1935, J.R. Stroop reported that the completion of a task could be strongly

More information

Web Based Online Dynamic Electrocardiogram System. He Ma Bachelor of Engineering, Shanghai Maritime University, 2013

Web Based Online Dynamic Electrocardiogram System. He Ma Bachelor of Engineering, Shanghai Maritime University, 2013 Web Based Online Dynamic Electrocardiogram System by He Ma Bachelor of Engineering, Shanghai Maritime University, 2013 A Report Submitted in Partial Fulfillment of the Requirements for the Degree of MASTER

More information

Pedestrian Detection Using Correlated Lidar and Image Data EECS442 Final Project Fall 2016

Pedestrian Detection Using Correlated Lidar and Image Data EECS442 Final Project Fall 2016 edestrian Detection Using Correlated Lidar and Image Data EECS442 Final roject Fall 2016 Samuel Rohrer University of Michigan rohrer@umich.edu Ian Lin University of Michigan tiannis@umich.edu Abstract

More information

Fourier Transforms and Signal Analysis

Fourier Transforms and Signal Analysis Fourier Transforms and Signal Analysis The Fourier transform analysis is one of the most useful ever developed in Physical and Analytical chemistry. Everyone knows that FTIR is based on it, but did one

More information

An Exercise ECG Database With Synchronized Exercise Information

An Exercise ECG Database With Synchronized Exercise Information APSIPA ASC 2011 Xi an An Exercise ECG Database With Synchronized Exercise Information Yuanjing Yang 1, Lianying Ji 1, JiankangWu 1 1 Sensor Networks and Applications Joint Research Center (SNARC) Graduate

More information

Arrhythmia Classification via k-means based Polyhedral Conic Functions Algorithm

Arrhythmia Classification via k-means based Polyhedral Conic Functions Algorithm Arrhythmia Classification via k-means based Polyhedral Conic Functions Algorithm Full Research Paper / CSCI-ISPC Emre Cimen Anadolu University Industrial Engineering Eskisehir, Turkey ecimen@anadolu.edu.tr

More information

Introduction to Massive Data Interpretation

Introduction to Massive Data Interpretation Introduction to Massive Data Interpretation JERKER HAMMARBERG JAKOB FREDSLUND THE ALEXANDRA INSTITUTE 2013 2/12 Introduction Cases C1. Bird Vocalization Recognition C2. Body Movement Classification C3.

More information

Image Compression With Haar Discrete Wavelet Transform

Image Compression With Haar Discrete Wavelet Transform Image Compression With Haar Discrete Wavelet Transform Cory Cox ME 535: Computational Techniques in Mech. Eng. Figure 1 : An example of the 2D discrete wavelet transform that is used in JPEG2000. Source:

More information

The framework of the BCLA and its applications

The framework of the BCLA and its applications NOTE: Please cite the references as: Zhu, T.T., Dunkley, N., Behar, J., Clifton, D.A., and Clifford, G.D.: Fusing Continuous-Valued Medical Labels Using a Bayesian Model Annals of Biomedical Engineering,

More information

ECG DATA COMPRESSION: PRINCIPLE, TECHNIQUES AND LIMITATIONS

ECG DATA COMPRESSION: PRINCIPLE, TECHNIQUES AND LIMITATIONS ECG DATA COMPRESSION: PRINCIPLE, TECHNIQUES AND LIMITATIONS #1 Nitu and Mandeep Kaur *2 #1 M.Tech Scholar, Department of ECE BCET, Gurdaspur, Punjab, India *2 AP, Department of ECE, BCET, Gurdaspur, Punjab,

More information

ECE 285 Class Project Report

ECE 285 Class Project Report ECE 285 Class Project Report Based on Source localization in an ocean waveguide using supervised machine learning Yiwen Gong ( yig122@eng.ucsd.edu), Yu Chai( yuc385@eng.ucsd.edu ), Yifeng Bu( ybu@eng.ucsd.edu

More information

Jasminder Kaur* and J.P.S. Raina*

Jasminder Kaur* and J.P.S. Raina* I J C International Journal of lectrical, lectronics and Computer ngineering 1(1): 47-51(2012) An Intelligent Diagnosis System for lectrocardiogram (CG) Images Using Artificial Neural Network (ANN) Jasminder

More information

Lecture 7: Most Common Edge Detectors

Lecture 7: Most Common Edge Detectors #1 Lecture 7: Most Common Edge Detectors Saad Bedros sbedros@umn.edu Edge Detection Goal: Identify sudden changes (discontinuities) in an image Intuitively, most semantic and shape information from the

More information

Big Data Methods. Chapter 5: Machine learning. Big Data Methods, Chapter 5, Slide 1

Big Data Methods. Chapter 5: Machine learning. Big Data Methods, Chapter 5, Slide 1 Big Data Methods Chapter 5: Machine learning Big Data Methods, Chapter 5, Slide 1 5.1 Introduction to machine learning What is machine learning? Concerned with the study and development of algorithms that

More information

Dynamic Analysis of Structures Using Neural Networks

Dynamic Analysis of Structures Using Neural Networks Dynamic Analysis of Structures Using Neural Networks Alireza Lavaei Academic member, Islamic Azad University, Boroujerd Branch, Iran Alireza Lohrasbi Academic member, Islamic Azad University, Boroujerd

More information

Ultrasonic Multi-Skip Tomography for Pipe Inspection

Ultrasonic Multi-Skip Tomography for Pipe Inspection 18 th World Conference on Non destructive Testing, 16-2 April 212, Durban, South Africa Ultrasonic Multi-Skip Tomography for Pipe Inspection Arno VOLKER 1, Rik VOS 1 Alan HUNTER 1 1 TNO, Stieltjesweg 1,

More information

A New Technique of Extraction of Edge Detection Using Digital Image Processing

A New Technique of Extraction of Edge Detection Using Digital Image Processing International OPEN ACCESS Journal Of Modern Engineering Research (IJMER) A New Technique of Extraction of Edge Detection Using Digital Image Processing Balaji S.C.K 1 1, Asst Professor S.V.I.T Abstract:

More information

A Network Based Fetal ECG Monitoring Algorithm

A Network Based Fetal ECG Monitoring Algorithm Australian Journal of Basic and Applied Sciences, 5(11): 1505-1512, 2011 ISSN 1991-8178 A Network Based Fetal ECG Monitoring Algorithm 1 M.I. Ibrahimy, 1 M.A. Hasan, 2 S.M.A Motakabber 1 Electrical and

More information

Tips and Guidance for Analyzing Data. Executive Summary

Tips and Guidance for Analyzing Data. Executive Summary Tips and Guidance for Analyzing Data Executive Summary This document has information and suggestions about three things: 1) how to quickly do a preliminary analysis of time-series data; 2) key things to

More information

Review and Implementation of DWT based Scalable Video Coding with Scalable Motion Coding.

Review and Implementation of DWT based Scalable Video Coding with Scalable Motion Coding. Project Title: Review and Implementation of DWT based Scalable Video Coding with Scalable Motion Coding. Midterm Report CS 584 Multimedia Communications Submitted by: Syed Jawwad Bukhari 2004-03-0028 About

More information

Performance Degradation Assessment and Fault Diagnosis of Bearing Based on EMD and PCA-SOM

Performance Degradation Assessment and Fault Diagnosis of Bearing Based on EMD and PCA-SOM Performance Degradation Assessment and Fault Diagnosis of Bearing Based on EMD and PCA-SOM Lu Chen and Yuan Hang PERFORMANCE DEGRADATION ASSESSMENT AND FAULT DIAGNOSIS OF BEARING BASED ON EMD AND PCA-SOM.

More information

Scanner Parameter Estimation Using Bilevel Scans of Star Charts

Scanner Parameter Estimation Using Bilevel Scans of Star Charts ICDAR, Seattle WA September Scanner Parameter Estimation Using Bilevel Scans of Star Charts Elisa H. Barney Smith Electrical and Computer Engineering Department Boise State University, Boise, Idaho 8375

More information

Clustering and Visualisation of Data

Clustering and Visualisation of Data Clustering and Visualisation of Data Hiroshi Shimodaira January-March 28 Cluster analysis aims to partition a data set into meaningful or useful groups, based on distances between data points. In some

More information

Rapid Natural Scene Text Segmentation

Rapid Natural Scene Text Segmentation Rapid Natural Scene Text Segmentation Ben Newhouse, Stanford University December 10, 2009 1 Abstract A new algorithm was developed to segment text from an image by classifying images according to the gradient

More information

FEATURE EVALUATION FOR EMG-BASED LOAD CLASSIFICATION

FEATURE EVALUATION FOR EMG-BASED LOAD CLASSIFICATION FEATURE EVALUATION FOR EMG-BASED LOAD CLASSIFICATION Anne Gu Department of Mechanical Engineering, University of Michigan Ann Arbor, Michigan, USA ABSTRACT Human-machine interfaces (HMIs) often have pattern

More information

3 Nonlinear Regression

3 Nonlinear Regression 3 Linear models are often insufficient to capture the real-world phenomena. That is, the relation between the inputs and the outputs we want to be able to predict are not linear. As a consequence, nonlinear

More information

White Pixel Artifact. Caused by a noise spike during acquisition Spike in K-space <--> sinusoid in image space

White Pixel Artifact. Caused by a noise spike during acquisition Spike in K-space <--> sinusoid in image space White Pixel Artifact Caused by a noise spike during acquisition Spike in K-space sinusoid in image space Susceptibility Artifacts Off-resonance artifacts caused by adjacent regions with different

More information

CS 229 Final Project Report Learning to Decode Cognitive States of Rat using Functional Magnetic Resonance Imaging Time Series

CS 229 Final Project Report Learning to Decode Cognitive States of Rat using Functional Magnetic Resonance Imaging Time Series CS 229 Final Project Report Learning to Decode Cognitive States of Rat using Functional Magnetic Resonance Imaging Time Series Jingyuan Chen //Department of Electrical Engineering, cjy2010@stanford.edu//

More information

Yunfeng Zhang 1, Huan Wang 2, Jie Zhu 1 1 Computer Science & Engineering Department, North China Institute of Aerospace

Yunfeng Zhang 1, Huan Wang 2, Jie Zhu 1 1 Computer Science & Engineering Department, North China Institute of Aerospace [Type text] [Type text] [Type text] ISSN : 0974-7435 Volume 10 Issue 20 BioTechnology 2014 An Indian Journal FULL PAPER BTAIJ, 10(20), 2014 [12526-12531] Exploration on the data mining system construction

More information

The art of well tying with new MATLAB tools

The art of well tying with new MATLAB tools Art of well tying The art of well tying with new MATLAB tools Heather J.E. Lloyd and Gary F. Margrave ABSTRACT To tie seismic data to well logs, four steps are required. The first step involves editing

More information

Lecture 6: Edge Detection

Lecture 6: Edge Detection #1 Lecture 6: Edge Detection Saad J Bedros sbedros@umn.edu Review From Last Lecture Options for Image Representation Introduced the concept of different representation or transformation Fourier Transform

More information

Canny Edge Based Self-localization of a RoboCup Middle-sized League Robot

Canny Edge Based Self-localization of a RoboCup Middle-sized League Robot Canny Edge Based Self-localization of a RoboCup Middle-sized League Robot Yoichi Nakaguro Sirindhorn International Institute of Technology, Thammasat University P.O. Box 22, Thammasat-Rangsit Post Office,

More information

packet-switched networks. For example, multimedia applications which process

packet-switched networks. For example, multimedia applications which process Chapter 1 Introduction There are applications which require distributed clock synchronization over packet-switched networks. For example, multimedia applications which process time-sensitive information

More information

URGENT - Medical Device Correction IntelliVue MX40 Missing Warnings in IFU

URGENT - Medical Device Correction IntelliVue MX40 Missing Warnings in IFU Dear Customer, A problem has been found with the Philips IntelliVue MX40 Instructions for Use (IFU) for software revisions B.05, B.06 and B.06.5X. Your IntelliVue MX40 remains safe to use. These IFUs are

More information

Design and Implementation of Remote Medical Monitoring System for. Homecare

Design and Implementation of Remote Medical Monitoring System for. Homecare 2nd International Conference on Electronics, Network and Computer Engineering (ICENCE 2016) Design and Implementation of Remote Medical Monitoring System for Homecare Juan Zhong1, a, * Hua Liao2, b 1 College

More information

A Guide to Open-Access Databases and Open-Source Software on PhysioNet

A Guide to Open-Access Databases and Open-Source Software on PhysioNet A Guide to Open-Access Databases and Open-Source Software on PhysioNet George B. Moody Harvard-MIT Division of Health Sciences and Technology Cambridge, Massachusetts, USA Outline Background Open-Access

More information

Manual. User Reference Guide. Analysis Application. Cardiac Impedance (IMP) Customer Support: Phone: (888)

Manual. User Reference Guide. Analysis Application. Cardiac Impedance (IMP) Customer Support:   Phone: (888) Phone: (888) 765-9735 WWW.MINDWARETECH.COM User Reference Guide Analysis Application Manual Cardiac Impedance (IMP) Copyright 2014 by MindWare Technologies LTD. All Rights Reserved. Phone: (614) 626-4888

More information

Mapping of Hierarchical Activation in the Visual Cortex Suman Chakravartula, Denise Jones, Guillaume Leseur CS229 Final Project Report. Autumn 2008.

Mapping of Hierarchical Activation in the Visual Cortex Suman Chakravartula, Denise Jones, Guillaume Leseur CS229 Final Project Report. Autumn 2008. Mapping of Hierarchical Activation in the Visual Cortex Suman Chakravartula, Denise Jones, Guillaume Leseur CS229 Final Project Report. Autumn 2008. Introduction There is much that is unknown regarding

More information

CHAPTER 4 WAVELET TRANSFORM-GENETIC ALGORITHM DENOISING TECHNIQUE

CHAPTER 4 WAVELET TRANSFORM-GENETIC ALGORITHM DENOISING TECHNIQUE 102 CHAPTER 4 WAVELET TRANSFORM-GENETIC ALGORITHM DENOISING TECHNIQUE 4.1 INTRODUCTION This chapter introduces an effective combination of genetic algorithm and wavelet transform scheme for the denoising

More information

Cursor Design Considerations For the Pointer-based Television

Cursor Design Considerations For the Pointer-based Television Hillcrest Labs Design Note Cursor Design Considerations For the Pointer-based Television Designing the cursor for a pointing-based television must consider factors that differ from the implementation of

More information

Improving Positron Emission Tomography Imaging with Machine Learning David Fan-Chung Hsu CS 229 Fall

Improving Positron Emission Tomography Imaging with Machine Learning David Fan-Chung Hsu CS 229 Fall Improving Positron Emission Tomography Imaging with Machine Learning David Fan-Chung Hsu (fcdh@stanford.edu), CS 229 Fall 2014-15 1. Introduction and Motivation High- resolution Positron Emission Tomography

More information

LOESS curve fitted to a population sampled from a sine wave with uniform noise added. The LOESS curve approximates the original sine wave.

LOESS curve fitted to a population sampled from a sine wave with uniform noise added. The LOESS curve approximates the original sine wave. LOESS curve fitted to a population sampled from a sine wave with uniform noise added. The LOESS curve approximates the original sine wave. http://en.wikipedia.org/wiki/local_regression Local regression

More information

A fully functional single lead electrocardiograph analog front-end module designed for prototyping and integration in user designs.

A fully functional single lead electrocardiograph analog front-end module designed for prototyping and integration in user designs. Page 1 of 8 A fully functional single lead electrocardiograph analog front-end module designed for prototyping and integration in user designs. As Featured In DesignSpark "Designed to offer the user a

More information

Emerge Workflow CE8 SAMPLE IMAGE. Simon Voisey July 2008

Emerge Workflow CE8 SAMPLE IMAGE. Simon Voisey July 2008 Emerge Workflow SAMPLE IMAGE CE8 Simon Voisey July 2008 Introduction The document provides a step-by-step guide for producing Emerge predicted petrophysical volumes based on log data of the same type.

More information

Integration of information security and network data mining technology in the era of big data

Integration of information security and network data mining technology in the era of big data Acta Technica 62 No. 1A/2017, 157 166 c 2017 Institute of Thermomechanics CAS, v.v.i. Integration of information security and network data mining technology in the era of big data Lu Li 1 Abstract. The

More information

Adaptive Filtering using Steepest Descent and LMS Algorithm

Adaptive Filtering using Steepest Descent and LMS Algorithm IJSTE - International Journal of Science Technology & Engineering Volume 2 Issue 4 October 2015 ISSN (online): 2349-784X Adaptive Filtering using Steepest Descent and LMS Algorithm Akash Sawant Mukesh

More information

Edge and corner detection

Edge and corner detection Edge and corner detection Prof. Stricker Doz. G. Bleser Computer Vision: Object and People Tracking Goals Where is the information in an image? How is an object characterized? How can I find measurements

More information

Analysis of Modified Rule Extraction Algorithm and Internal Representation of Neural Network

Analysis of Modified Rule Extraction Algorithm and Internal Representation of Neural Network Covenant Journal of Informatics & Communication Technology Vol. 4 No. 2, Dec, 2016 An Open Access Journal, Available Online Analysis of Modified Rule Extraction Algorithm and Internal Representation of

More information

Segmentation of Images

Segmentation of Images Segmentation of Images SEGMENTATION If an image has been preprocessed appropriately to remove noise and artifacts, segmentation is often the key step in interpreting the image. Image segmentation is a

More information

Correcting INS Drift in Terrain Surface Measurements. Heather Chemistruck Ph.D. Student Mechanical Engineering Vehicle Terrain Performance Lab

Correcting INS Drift in Terrain Surface Measurements. Heather Chemistruck Ph.D. Student Mechanical Engineering Vehicle Terrain Performance Lab Correcting INS Drift in Terrain Surface Measurements Ph.D. Student Mechanical Engineering Vehicle Terrain Performance Lab October 25, 2010 Outline Laboratory Overview Vehicle Terrain Measurement System

More information

International Journal of Electrical and Computer Engineering 4: Application of Neural Network in User Authentication for Smart Home System

International Journal of Electrical and Computer Engineering 4: Application of Neural Network in User Authentication for Smart Home System Application of Neural Network in User Authentication for Smart Home System A. Joseph, D.B.L. Bong, and D.A.A. Mat Abstract Security has been an important issue and concern in the smart home systems. Smart

More information

Table of Contents USER GUIDE. Android 2

Table of Contents USER GUIDE. Android 2 Android Android 2 Table of Contents 1. Taking into use... 3 2. Taking an electrocardiogram (ECG)... 4 3. Analysing recordings... 6 3.1 Signal analysis for a limited time interval... 10 4. Beat2Phone in

More information

See your health with this modern alternative

See your health with this modern alternative 1 See your health with this modern alternative Works on Android phones 4+, tablets and iphones 5+ 2 3 4 help people and earn money: When it comes to Aura Technology you should trust the best! We have a

More information

Artificial Neural Networks (Feedforward Nets)

Artificial Neural Networks (Feedforward Nets) Artificial Neural Networks (Feedforward Nets) y w 03-1 w 13 y 1 w 23 y 2 w 01 w 21 w 22 w 02-1 w 11 w 12-1 x 1 x 2 6.034 - Spring 1 Single Perceptron Unit y w 0 w 1 w n w 2 w 3 x 0 =1 x 1 x 2 x 3... x

More information

Ansur ProSim 6/8. Users Manual. Software Plug-In

Ansur ProSim 6/8. Users Manual. Software Plug-In Ansur ProSim 6/8 Software Plug-In Users Manual FBC-0002 April 2011, Rev. 2, 8/11 2011 Fluke Corporation. All rights reserved. All product names are trademarks of their respective companies. Table of Contents

More information

Supervised Learning with Neural Networks. We now look at how an agent might learn to solve a general problem by seeing examples.

Supervised Learning with Neural Networks. We now look at how an agent might learn to solve a general problem by seeing examples. Supervised Learning with Neural Networks We now look at how an agent might learn to solve a general problem by seeing examples. Aims: to present an outline of supervised learning as part of AI; to introduce

More information

Solving Word Jumbles

Solving Word Jumbles Solving Word Jumbles Debabrata Sengupta, Abhishek Sharma Department of Electrical Engineering, Stanford University { dsgupta, abhisheksharma }@stanford.edu Abstract In this report we propose an algorithm

More information

A System for Managing Experiments in Data Mining. A Thesis. Presented to. The Graduate Faculty of The University of Akron. In Partial Fulfillment

A System for Managing Experiments in Data Mining. A Thesis. Presented to. The Graduate Faculty of The University of Akron. In Partial Fulfillment A System for Managing Experiments in Data Mining A Thesis Presented to The Graduate Faculty of The University of Akron In Partial Fulfillment of the Requirements for the Degree Master of Science Greeshma

More information

Feature Selection. CE-725: Statistical Pattern Recognition Sharif University of Technology Spring Soleymani

Feature Selection. CE-725: Statistical Pattern Recognition Sharif University of Technology Spring Soleymani Feature Selection CE-725: Statistical Pattern Recognition Sharif University of Technology Spring 2013 Soleymani Outline Dimensionality reduction Feature selection vs. feature extraction Filter univariate

More information

A Singular Example for the Averaged Mean Curvature Flow

A Singular Example for the Averaged Mean Curvature Flow To appear in Experimental Mathematics Preprint Vol. No. () pp. 3 7 February 9, A Singular Example for the Averaged Mean Curvature Flow Uwe F. Mayer Abstract An embedded curve is presented which under numerical

More information

A Comparative Study of Locality Preserving Projection and Principle Component Analysis on Classification Performance Using Logistic Regression

A Comparative Study of Locality Preserving Projection and Principle Component Analysis on Classification Performance Using Logistic Regression Journal of Data Analysis and Information Processing, 2016, 4, 55-63 Published Online May 2016 in SciRes. http://www.scirp.org/journal/jdaip http://dx.doi.org/10.4236/jdaip.2016.42005 A Comparative Study

More information

Creating an Automated Blood Vessel. Diameter Tracking Tool

Creating an Automated Blood Vessel. Diameter Tracking Tool Medical Biophysics 3970Z 6 Week Project: Creating an Automated Blood Vessel Diameter Tracking Tool Peter McLachlan - 250068036 April 2, 2013 Introduction In order to meet the demands of tissues the body

More information

SIMULATED LIDAR WAVEFORMS FOR THE ANALYSIS OF LIGHT PROPAGATION THROUGH A TREE CANOPY

SIMULATED LIDAR WAVEFORMS FOR THE ANALYSIS OF LIGHT PROPAGATION THROUGH A TREE CANOPY SIMULATED LIDAR WAVEFORMS FOR THE ANALYSIS OF LIGHT PROPAGATION THROUGH A TREE CANOPY Angela M. Kim and Richard C. Olsen Remote Sensing Center Naval Postgraduate School 1 University Circle Monterey, CA

More information

Lab 9. Julia Janicki. Introduction

Lab 9. Julia Janicki. Introduction Lab 9 Julia Janicki Introduction My goal for this project is to map a general land cover in the area of Alexandria in Egypt using supervised classification, specifically the Maximum Likelihood and Support

More information