california state university, northridge ecg and...

71
CALIFORNIA STATE UNIVERSITY, NORTHRIDGE ECG AND WEARABLE COMPUTING FOR DROWSINESS DETECTION A thesis submitted in partial fulfillment of the requirements for the degree of Master of Science in Computer Science by Nipun Gupta May 2014

Upload: others

Post on 21-Jun-2020

4 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: CALIFORNIA STATE UNIVERSITY, NORTHRIDGE ECG AND …penguin.ewu.edu/cscd506/Theses/Gupta-Nipun-thesis-2014.pdf · 2018-02-10 · Nipun Gupta May 2014. The thesis of Nipun Gupta is

CALIFORNIA STATE UNIVERSITY, NORTHRIDGE

ECG AND WEARABLE COMPUTING FOR DROWSINESS

DETECTION

A thesis submitted in partial fulfillment of the requirements for thedegree of Master of Science in Computer Science

by

Nipun Gupta

May 2014

Page 2: CALIFORNIA STATE UNIVERSITY, NORTHRIDGE ECG AND …penguin.ewu.edu/cscd506/Theses/Gupta-Nipun-thesis-2014.pdf · 2018-02-10 · Nipun Gupta May 2014. The thesis of Nipun Gupta is

The thesis of Nipun Gupta is approved:

G. Michael Barnes, Ph.D Date

Richard Covington, Ph.D Date

Ani Nahapetian, Ph.D, Chair Date

California State University, Northridge

ii

Page 3: CALIFORNIA STATE UNIVERSITY, NORTHRIDGE ECG AND …penguin.ewu.edu/cscd506/Theses/Gupta-Nipun-thesis-2014.pdf · 2018-02-10 · Nipun Gupta May 2014. The thesis of Nipun Gupta is

Dedication

I would like to dedicate this thesis to my loving beautiful wife, my lovely daughter and my

parents for their support during my whole academic career.

iii

Page 4: CALIFORNIA STATE UNIVERSITY, NORTHRIDGE ECG AND …penguin.ewu.edu/cscd506/Theses/Gupta-Nipun-thesis-2014.pdf · 2018-02-10 · Nipun Gupta May 2014. The thesis of Nipun Gupta is

Acknowledgements

I would like to express my sincere gratitude to my supervisor, Dr. Ani Nahapetian for

providing continuous support, motivation, and immense knowledge during this research

study. Her guidance and advice has helped me to complete my dissertation.

I would like to express the heartfelt appreciation to Prof. G. Michael Barnes and Prof.

Richard Covington, for being my thesis committee members and for their help and guid-

ance throughout the program.

I would like to thank my wife Pooja for her personal support and great patience at all

times. Many thanks to my daughter, Prisha, for her smiles and infectious laugh. Special

thanks to my parents who have given me their unequivocal support throughout.

iv

Page 5: CALIFORNIA STATE UNIVERSITY, NORTHRIDGE ECG AND …penguin.ewu.edu/cscd506/Theses/Gupta-Nipun-thesis-2014.pdf · 2018-02-10 · Nipun Gupta May 2014. The thesis of Nipun Gupta is

Table of Contents

Signature page ii

Dedication iii

Acknowledgements iv

List of Tables vii

List of Figures viii

Abstract ix

1 INTRODUCTION 1

2 RELATED WORK 32.1 ECG Data Acquisition and Analysis . . . . . . . . . . . . . . . . . . . . . 32.2 Wearable Physiological Monitoring Systems . . . . . . . . . . . . . . . . . 32.3 Android Mobile Application Development . . . . . . . . . . . . . . . . . . 42.4 Techniques for Drowsiness Detection . . . . . . . . . . . . . . . . . . . . 4

3 BACKGROUND 53.1 Physiological Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

3.1.1 The Electrocardiogram . . . . . . . . . . . . . . . . . . . . . . . . 53.1.2 Posture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93.1.3 Skin Temperature . . . . . . . . . . . . . . . . . . . . . . . . . . . 103.1.4 Breathing Rate . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

3.2 Measurement of Physiological parameters . . . . . . . . . . . . . . . . . . 103.2.1 ECG machines . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113.2.2 Zephyr: Physiological Monitoring System . . . . . . . . . . . . . . 12

3.3 ECG Noise Cancellation . . . . . . . . . . . . . . . . . . . . . . . . . . . 143.4 Heart Rate Variability Analysis . . . . . . . . . . . . . . . . . . . . . . . . 15

4 SYSTEM AND IMPLEMENTATION 184.1 ECG Data Acquisition and Analysis System . . . . . . . . . . . . . . . . . 184.2 Driver Drowsiness Detection System . . . . . . . . . . . . . . . . . . . . . 204.3 Android Platform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22

4.3.1 Android Application Development . . . . . . . . . . . . . . . . . . 224.3.2 Bluetooth Data Transfer . . . . . . . . . . . . . . . . . . . . . . . 224.3.3 Android Application User Interface . . . . . . . . . . . . . . . . . 234.3.4 Activity Recognition . . . . . . . . . . . . . . . . . . . . . . . . . 254.3.5 Application Backend . . . . . . . . . . . . . . . . . . . . . . . . . 26

4.4 Data Analysis Platform . . . . . . . . . . . . . . . . . . . . . . . . . . . . 274.4.1 Plotting ECG Device Data . . . . . . . . . . . . . . . . . . . . . . 27

v

Page 6: CALIFORNIA STATE UNIVERSITY, NORTHRIDGE ECG AND …penguin.ewu.edu/cscd506/Theses/Gupta-Nipun-thesis-2014.pdf · 2018-02-10 · Nipun Gupta May 2014. The thesis of Nipun Gupta is

4.4.2 HRV Analysis Tools . . . . . . . . . . . . . . . . . . . . . . . . . 284.5 Drowsiness Detection Algorithms . . . . . . . . . . . . . . . . . . . . . . 31

4.5.1 Algorithm 1: Heart Rate algorithm using awake average . . . . . . 334.5.2 Algorithm 2: Heart Rate algorithm using partial sleep average . . . 344.5.3 Algorithm 3: Heart Rate algorithm with multiple constraints . . . . 344.5.4 Algorithm 4: LF-HF algorithm using awake average . . . . . . . . 354.5.5 Algorithm 5: LF-HF algorithm using partial sleep average . . . . . 364.5.6 Algorithm 6: LF-HF algorithm using multiple constraints . . . . . 36

5 DATA ANALYSIS AND RESULTS 385.1 ECG Data Collection and Analysis . . . . . . . . . . . . . . . . . . . . . . 385.2 Physionet Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38

5.2.1 CAP Sleep Database . . . . . . . . . . . . . . . . . . . . . . . . . 405.2.2 Stress Recognition in Automobile drivers . . . . . . . . . . . . . . 40

5.3 Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 425.3.1 Results of HR Algorithms . . . . . . . . . . . . . . . . . . . . . . 445.3.2 Results of LF-HF Algorithms . . . . . . . . . . . . . . . . . . . . 44

5.4 Algorithm comparison . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48

6 CONCLUSION 56

vi

Page 7: CALIFORNIA STATE UNIVERSITY, NORTHRIDGE ECG AND …penguin.ewu.edu/cscd506/Theses/Gupta-Nipun-thesis-2014.pdf · 2018-02-10 · Nipun Gupta May 2014. The thesis of Nipun Gupta is

List of Tables

4.1 Various detectable activities . . . . . . . . . . . . . . . . . . . . . . . . . . 26

5.1 Data analysis results with first HR algorithm. . . . . . . . . . . . . . . . . 455.2 Data analysis results with second HR algorithm. . . . . . . . . . . . . . . . 465.3 Data analysis results with third HR algorithm. . . . . . . . . . . . . . . . . 475.4 Case descriptions used in LF-HF result tables. . . . . . . . . . . . . . . . . 485.5 30 second data analysis results with first LF-HF algorithm. . . . . . . . . . 495.6 30 second data analysis results with second LF-HF algorithm. . . . . . . . 505.7 30 second data analysis results with third LF-HF algorithm. . . . . . . . . . 515.8 2 minute data analysis results with first LF-HF algorithm. . . . . . . . . . . 525.9 2 minute data analysis results with second LF-HF algorithm. . . . . . . . . 535.10 2 minute data analysis results with third LF-HF algorithm. . . . . . . . . . 54

vii

Page 8: CALIFORNIA STATE UNIVERSITY, NORTHRIDGE ECG AND …penguin.ewu.edu/cscd506/Theses/Gupta-Nipun-thesis-2014.pdf · 2018-02-10 · Nipun Gupta May 2014. The thesis of Nipun Gupta is

List of Figures

3.1 PQRST waveform in a cardiac cycle . . . . . . . . . . . . . . . . . . . . . 73.2 R-R interval . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83.3 Heart rate calculation using the ECG . . . . . . . . . . . . . . . . . . . . . 93.4 Zephyr Monitoring System . . . . . . . . . . . . . . . . . . . . . . . . . . 13

4.1 Diagram of ECG data acquisition and analysis system . . . . . . . . . . . . 184.2 Android application for ECG data acquisition. . . . . . . . . . . . . . . . . 194.3 Diagram for driver drowsiness detection system . . . . . . . . . . . . . . . 204.4 Android application for drowsiness detection. . . . . . . . . . . . . . . . . 214.5 Use case diagram for Android app for ECG data acquisition and analysis

system. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234.6 Use case diagram for Android app in drowsiness detection system. . . . . . 244.7 Class diagram for drowsiness detection system. . . . . . . . . . . . . . . . 254.8 Kubios HRV tool. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 294.9 PDF report sheet showing various HRV analyses. . . . . . . . . . . . . . . 304.10 Sample data from a database . . . . . . . . . . . . . . . . . . . . . . . . . 32

5.1 Zephyr device data plot in MATLAB . . . . . . . . . . . . . . . . . . . . . 395.2 Heart rate for normal sleeping data. . . . . . . . . . . . . . . . . . . . . . 415.3 Heart rate for narcolepsy data. . . . . . . . . . . . . . . . . . . . . . . . . 415.4 Heart rate for driver data. . . . . . . . . . . . . . . . . . . . . . . . . . . . 425.5 LF-HF ratio . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43

viii

Page 9: CALIFORNIA STATE UNIVERSITY, NORTHRIDGE ECG AND …penguin.ewu.edu/cscd506/Theses/Gupta-Nipun-thesis-2014.pdf · 2018-02-10 · Nipun Gupta May 2014. The thesis of Nipun Gupta is

ABSTRACT

ECG AND WEARABLE COMPUTING FOR DROWSINESS DETECTION

By

Nipun Gupta

Master of Science in Computer Science

This thesis examines the challenges of using Electrocardiogram (ECG) signals in wear-

able computing systems, specifically in addressing drowsiness detection while driving.

First, the analysis of ECG signal quality obtained from off-the-shelf wearable ECG mon-

itors is presented. Then various approaches for extrapolating a person’s waking/sleeping

state using ECG time-series data is provided, and verified against real ECG data available

from the PhysioBank data archives. Finally, the wearable system incorporating an ECG

monitor and a mobile application for carrying out the data analysis and computation is de-

scribed. The system’s interface design is also presented, along with the approach to alerting

drowsy drivers.

ix

Page 10: CALIFORNIA STATE UNIVERSITY, NORTHRIDGE ECG AND …penguin.ewu.edu/cscd506/Theses/Gupta-Nipun-thesis-2014.pdf · 2018-02-10 · Nipun Gupta May 2014. The thesis of Nipun Gupta is

Chapter 1

INTRODUCTION

This thesis presents the use of portable ECG devices to monitor the heart and physical

health of the subject via mobile application. The use of the application has been taken

further to detect the drowsiness in a driver and activating alarm to prevent the accidents

on the road. It has been shown in previous research studies that the fatigued and drowsy

drivers suffer from increased reaction times which cause a large number of both non-fatal

and fatal crashes during the nighttime and early morning hours. Statistics shows drowsy

driving causes more than 100,000 crashes a year attributing to 40,000 injuries and 1,550

deaths [1].

Due to technology advancements over time, personal health monitoring devices and

systems have gained popularity and are easily accessible to consumers. Portable ECG

sensors enabled devices are deemed one of the most important among such devices. The

raw data from the ECG sensors can be sent wirelessly to Bluetooth enabled devices such as

phones, tablets, etc., which enables individuals to collect their own ECG data and allows

both health professionals and individuals to view and monitor the data over time. In order

to extract meaningful ECG signals, raw ECG device data has to be filtered and processed.

ECG signal analysis consists of two phases. First is preprocessing, where noise and other

impurities in raw ECG signal are removed or suppressed. Second phase is feature extraction

where ECG data is analyzed and diagnostic information is obtained.

1

Page 11: CALIFORNIA STATE UNIVERSITY, NORTHRIDGE ECG AND …penguin.ewu.edu/cscd506/Theses/Gupta-Nipun-thesis-2014.pdf · 2018-02-10 · Nipun Gupta May 2014. The thesis of Nipun Gupta is

The upcoming option in the market are wearable ECG devices like Zephyr BioHarness,

which measures ECG along with other physiological parameters like skin temperature, res-

piration rate, level of physical activity and posture simultaneously. This helps in monitoring

overall health of the person. The thesis presents the study of wearable physiological mon-

itoring system by gathering, processing and analyzing the physiological data from these

devices. To do so, a mobile application is developed which helps in monitoring the data. If

there are any abnormalities found, an alarm will be activated.

The aim of second part of this project is to develop an algorithm to detect drowsiness

at the wheel using the Zephyr monitoring system via mobile application. Drowsiness can

be a result of lack of sleep or sleep disorder. In this study, the heart rate and sensitivity of

the heart rate variability is used to distinguish between the awake and sleep/drowsy state.

In previous studies, both the parameters have shown a difference between awake and sleep

state. To do the study, validated data from the PhysioBank [2] is analyzed using the heart

rate variability tool [3].

This thesis is organized into the following chapters. Chapter 2 describes the related

work carried out by other researchers. In Chapter 3, the various physiological parameters

and their measurement tools are described in detail. The analysis method for the ECG

signal and its use in detecting the drowsiness is discussed. Chapter 4 elaborates on the

technical aspect of the system and its implementation. It describes the mobile application

development, drowsiness algorithms and analysis platforms. In Chapter 5, the results of the

algorithm from the various databases are presented and compared. Last chapter provides

our conclusions of this study.

2

Page 12: CALIFORNIA STATE UNIVERSITY, NORTHRIDGE ECG AND …penguin.ewu.edu/cscd506/Theses/Gupta-Nipun-thesis-2014.pdf · 2018-02-10 · Nipun Gupta May 2014. The thesis of Nipun Gupta is

Chapter 2

RELATED WORK

Monitoring the heart activity using the ECG leads to better management of the cardiac

diseases and detection of the cardiac abnormalities. It helps in prevention of the cardiac

diseases if an abnormality is detected early. Loss of sleep or sleep disorders result in

drowsiness which is a cause of accidents on the road. ECG and other physiological param-

eters can be used to help in detecting the drowsiness behind the wheel. In this chapter we

describe the previous and related work done in the context of this study.

2.1 ECG Data Acquisition and Analysis

There are a range of ECG machines available in the market today. The methods which

are used to analyze and interpret the ECG signal are described in [4]. The ECG data acqui-

sition and heart rate variability analysis methods [5][6] [7] using the Labview and Matlab

are discussed in [8][9][10]. Recent developments in the algorithms for ECG analysis can

be found in [11][12][13][14][32] and the use of Bluetooth in transferring the ECG data for

telemonitoring the subject in [15][16][33][34][35].

2.2 Wearable Physiological Monitoring Systems

Wearable health monitoring devices are the leading trend in research and health indus-

try. The physiological monitoring systems measures a variety of physiological parameters

simultaneously and also transfer the data wirelessly [37][38][39][40]. Zephyr BioHar-

ness2.0 [17][18][19] is used in this research work. The results from the Zephyr system

3

Page 13: CALIFORNIA STATE UNIVERSITY, NORTHRIDGE ECG AND …penguin.ewu.edu/cscd506/Theses/Gupta-Nipun-thesis-2014.pdf · 2018-02-10 · Nipun Gupta May 2014. The thesis of Nipun Gupta is

have been validated in [20]. More information about the Zephyr can be found at [21].

2.3 Android Mobile Application Development

Smartphones are indispensable now and can be used to monitor the health using apps

[36]. Android development being an open source platform is inexpensive and provide

flexibility in integrating utilities of different types [22]. It uses Java language environment

to create the applications. Mobile applications can be build using the android Software

Development Kit (SDK) tool [23].

2.4 Techniques for Drowsiness Detection

The development of technologies for detecting drowsiness while driving are based on

the various physiological parameters such as heart rate, respiration rate, posture, rapid eye

movement and head movement of the driver[24][25][26]. It has been found that heart rate

variability analysis of the driver can be helpful in determining the drowsiness[27][28][29].

Recent works include Electroencephalography (EEG) of the brain[30] and image process-

ing of the driver using PERCLOS[31].

4

Page 14: CALIFORNIA STATE UNIVERSITY, NORTHRIDGE ECG AND …penguin.ewu.edu/cscd506/Theses/Gupta-Nipun-thesis-2014.pdf · 2018-02-10 · Nipun Gupta May 2014. The thesis of Nipun Gupta is

Chapter 3

BACKGROUND

In this chapter, we discuss the physiological parameters used in the research work. We also

describe the various machines and method to obtain the parameters. Later we discuss the

Zephyr system which has been used in the research work. Lastly we discuss the ECG noise

cancellation and feature extraction and heart rate variability analysis in brief.

3.1 Physiological Parameters

The most important physiological parameters are the parameters obtained from heart

and respiratory system. They best describe the human health state. It has been shown in

previous studies that the heart rate decreases when a person falls asleep [41]. Hence for

our study of drowsiness detection, the electrocardiogram plays a vital role. We describe the

parameters that have been used in the research work below.

3.1.1 The Electrocardiogram

The word ”electrocardiogram” is derived from the Greek word, kardia, which means

heart. A normal heart beat is initiated by a small pulse of electric current which spreads

rapidly in the heart and makes the heart muscle contract. An electrocardiogram (ECG) can

be described as a process which records the heart activity through electrical signals gener-

ated by pacemaker cells in the heart specialized in producing electricity. These electrical

signals are detected by using electrodes attached to the surface of the skin, or in the near

distance from the skin using the ECG devices. The ECG signals can be used to analyze

5

Page 15: CALIFORNIA STATE UNIVERSITY, NORTHRIDGE ECG AND …penguin.ewu.edu/cscd506/Theses/Gupta-Nipun-thesis-2014.pdf · 2018-02-10 · Nipun Gupta May 2014. The thesis of Nipun Gupta is

heart’s health and functionality. as it picks up electrical impulses generated by the polar-

ization and depolarization of cardiac tissue and translates into a waveform. This waveform

is then used to measure the rate and regularity of heartbeats, as well as the size and posi-

tion of the chambers, the presence of any damage to the heart, and the effects of drugs or

devices used to regulate the heart, such as a pacemaker. Hence an ECG signal is the most

powerful tool that can be used for diagnosing a heart. The first ECG devices were built

in late 19th century. However, understanding the meaning of an ECG signals and analysis

were developed later. A breakthrough for these measurements was the discovering of a

string galvanometer by Willem Einthoven in the year 1901. Einthoven used his invention

to study how a human heart works by analyzing the ECG signal. He assigned the letters

to describe various deflections of an ECG signal and described the changes that a number

of cardiovascular disorders cause to the ECG signal. He was awarded the Nobel Prize in

Medicine in 1924 [42].

An ECG signal is a representation of heart electrical activity at different stages of the

blood flow in the heart. Every cardiac cycle produces ECG waves designated as P, Q, R,

S and T to represent certain phases of heart beat as shown in figure 3.1. These waveforms

represent potentials between rested and depolarized or depolarized and repolarized parts of

whole heart.

At first, the sino-atrial (SA) node initiates a heartbeat, which creates electrical flow

from the atria down to the ventricles. After producing impulse in SA-node, first wave P

is recorded, which represents the depolarization of both right and left atriums. During a

PR segment followed the P wave, the heart muscle does not do anything and hence the

6

Page 16: CALIFORNIA STATE UNIVERSITY, NORTHRIDGE ECG AND …penguin.ewu.edu/cscd506/Theses/Gupta-Nipun-thesis-2014.pdf · 2018-02-10 · Nipun Gupta May 2014. The thesis of Nipun Gupta is

Figure 3.1: PQRST waveform in a cardiac cycle

ECG line returns to baseline level. Delay of depolarization in atrioventricular (AV) node

recorded as PQ-interval in baseline. Then impulse spreads into middle part of septum and

heart apex. This event recorded as descend part of Q wave. In next depolarization of right

ventricle wall ECG line deflexed upward and formation of R wave begins. When impulse

spreads into left ventricle wall, the ECG line returned in contrary side towards the lowest

point of S wave. Depolarization of ventricles basis afterwards caused formation of S wave.

ST segment represents the moment where ventricle muscles stay activated. The T wave de-

picts the repolarization of the ventricles, and the subsequent period of inactivity reflects the

heart’s resting state [4]. Amplitude and duration of PQRST waves correspond to electrical

power fluctuation in entire heart. An ECG signal is therefore presented by using a graph,

where the y-axis represents voltage and the x-axis represents time. Any abnormalities in

7

Page 17: CALIFORNIA STATE UNIVERSITY, NORTHRIDGE ECG AND …penguin.ewu.edu/cscd506/Theses/Gupta-Nipun-thesis-2014.pdf · 2018-02-10 · Nipun Gupta May 2014. The thesis of Nipun Gupta is

the heart rate can be monitored by analyzing the graphs. Reader interested in more infor-

mation about the diagnostic of the different pathologies and potential malfunctions of the

heart and their interpretation should refer to [44, 45].

The R-R interval is referred as the interval from the peak of one QRS complex to the

peak of the next in an electrocardiogram as shown in figure 3.2. The R wave is usually

chosen to do this because it is the tallest and most conspicuous. In most rhythms, the

R-to-R interval will be the same as the P-to-P distance, or the distance between any two

analogous points on consecutive beats.

Figure 3.2: R-R interval

Heart rate is the number of heartbeats per unit of time which is typically expressed

as beats per minute (bpm). There are different ways to measure the heart rate. It can be

measured by finding the pulse of the heart. This pulse rate can be found at any point on

the body where the artery’s pulsation is transmitted to the surface by pressuring it with the

index and middle fingers [46].

Another method of determining heart rate is the using the R-R interval from the ECG.

Inverting the R-R interval (unit in seconds) and multiplying it with 60 give the number of

8

Page 18: CALIFORNIA STATE UNIVERSITY, NORTHRIDGE ECG AND …penguin.ewu.edu/cscd506/Theses/Gupta-Nipun-thesis-2014.pdf · 2018-02-10 · Nipun Gupta May 2014. The thesis of Nipun Gupta is

heart beats per minute. The whole ECG can be used to determine the heart rate too. The

number of PQRS waves is counted for 10 seconds and multiplying it with 6 can give the

heart rate as shown in figure 3.3. The heart rate varies from person to person. A normal

resting heart rate is about 72 bpm. There are many abnormalities of heart rate which can

be monitored by an ECG such as Arrhythmia, Bradycardia, Tachycardia, etc.[46].

Figure 3.3: Heart rate calculation using the ECG

3.1.2 Posture

Good posture is an easy and very important way to maintain a healthy mind and body.

While driving a good sitting posture is recommended for more practical safety concerns.

To measure the posture, inclinometers can be used. The orientation of a body segment

has three degrees of freedom. Two of the three degrees of freedom in orientation can be

measured by inclinometers [47]. In a study it has been found that head movements can be

a used as an indicator of sleepiness. When a person is sleep-deprived or fatigued, the head

movement is more and head movements are more extreme compared to a person who has

rested [48][49].

9

Page 19: CALIFORNIA STATE UNIVERSITY, NORTHRIDGE ECG AND …penguin.ewu.edu/cscd506/Theses/Gupta-Nipun-thesis-2014.pdf · 2018-02-10 · Nipun Gupta May 2014. The thesis of Nipun Gupta is

3.1.3 Skin Temperature

Skin temperature is an important vital sign for health. Normal body temperature de-

pends upon the place in the body at which the measurement is made, and the time of day

and level of activity of the person [50]. Temperature regulation in humans follows a cir-

cadian rhythm. Normally, body core temperature is decreasing with the sleep and when

the person is awake, temperature is increasing [51][52]. But, the problem is that the tem-

perature variations can only be detected in controlled laboratory environment. Outside, the

temperature variations occurring from the environment factor are similar to the variations

detected. There is no evidence of skin temperature change in awake to drowsiness state.

Less intrusive skin temperature measurement is the less reliable than measurement of the

body core temperature taken with standard invasive (rectal or intravenous probes) methods.

3.1.4 Breathing Rate

The breathing rate is the number of breaths a person takes per minute by counting how

many times the chest rises. Normal respiration rates for an adult person at rest range from

12 to 16 breaths per minute [53]. It has been found that the breathing frequency is lower at

sleep onset [54]. Regulation of respiration is closely linked to the sleep onset. Hence, the

sleep disorders can be detected by monitoring the breathing rate. The respiration rate can

help in detecting the drowsiness while driving in a controlled experiment [55].

3.2 Measurement of Physiological parameters

The physiological parameters can be measured by various methods. The heart rate can

be measured by pulse. But to measure it accurately, ECG machines are used. The breathing

10

Page 20: CALIFORNIA STATE UNIVERSITY, NORTHRIDGE ECG AND …penguin.ewu.edu/cscd506/Theses/Gupta-Nipun-thesis-2014.pdf · 2018-02-10 · Nipun Gupta May 2014. The thesis of Nipun Gupta is

rate can be measured counting the breaths by stethoscope or by pressure sensors which

measures the rise and fall of the chest cavity. The skin temperature can be measured by an

infrared thermometer. In this section, we discuss the types of ECG machines available and

the smart monitoring system: Zephyr which can measure all the parameters simultaneously.

3.2.1 ECG machines

There are different types of ECG machines available to check for cardiac abnormali-

ties. These machines differ in the extent of data capture, the data recorded, their mobility,

and their featured applications. The extent of data capture depends upon the number of

leads present in the ECG machines, in other words, the number of electrical signals can be

monitored at a time.

3.2.1.1 Traditional ECG machines

The 12-lead ECG is the standard ECG machine which is used for medical diagnostic

testing for chest pain, fainting or seizures. It has 10 electrodes, six are placed on the chest

and four are placed on each of the limbs which provide a printed record of the ECG. They

are used to diagnose heart attacks and heart murmurs. There are two types of electrode:

wet gel and dry electrode. Wet gel electrodes provide maximum skin contact and reduce

skin impedance which helps in avoiding baseline drift and provide a fast and accurate ECG

trace. However, dry electrodes are skin-friendly and minimize epidermal reactions and easy

to remove without hurting sensitive skin and allows some electrode types to be repositioned.

The other type of traditional ECG machine is 5-lead ECG machine which uses 5 elec-

trodes. It is usually used for continuous monitoring, like during a major surgical procedure

11

Page 21: CALIFORNIA STATE UNIVERSITY, NORTHRIDGE ECG AND …penguin.ewu.edu/cscd506/Theses/Gupta-Nipun-thesis-2014.pdf · 2018-02-10 · Nipun Gupta May 2014. The thesis of Nipun Gupta is

or while a patient is being transported in an ambulance. A 3-lead ECG machine uses 4

electrodes placed on each of the limbs, which is enough to produce adequate data on heart

rhythm monitoring.

3.2.1.2 Portable Handheld ECG Monitors

The portable handheld ECG monitors are the single channel and smallest ECG monitors

which are designed for patient home use or professional doing routine check use. They are

not a powerful diagnostic tool as multi-channel ECG machine but they can record and

display critical data. They are portable, inexpensive and easy to use which is helpful in

improving heart disease management.

3.2.1.3 Wireless ECG

Wireless ECGs are similar to a standard ECG machine, but without the wires. The

electrodes have wireless units that transmit data to the computer or telemetry station. A

wireless ECG is less intrusive and provides more functionality and comfort for patients

as caregivers and their patients can get total freedom from lead wires, enabling focus on

patient care, not on wire management and false alarms. In addition, patients can move

about more freely and ambulate more easily.

3.2.2 Zephyr: Physiological Monitoring System

The physiological monitoring systems which are portable, wireless and transfer data

via Bluetooth and Wi-Fi are quite upcoming and very popular. Along with the ECG read-

ings of the person, they can provide the breathing rate, skin temperature, posture, heart

12

Page 22: CALIFORNIA STATE UNIVERSITY, NORTHRIDGE ECG AND …penguin.ewu.edu/cscd506/Theses/Gupta-Nipun-thesis-2014.pdf · 2018-02-10 · Nipun Gupta May 2014. The thesis of Nipun Gupta is

rate which can help tremendously in studying and continuous monitoring the physiological

parameters of the person without being intrusive. The Zephyr BioHarness [17] is one such

system. The Zephyr BioHarness consists of a chest strap and the BioHarness module as

shown in figure 3.4. This system helps in remote monitoring of the patients, sports training,

physiology and exercise physiology research, wireless monitoring of first responders.

Figure 3.4: Zephyr Monitoring System

The BioHarness strap is a lightweight elasticized component which incorporates Zephyr

Smart Fabric ECG and Breathing Rate sensors which is worn by the subject [18]. Attached

to the strap is the BioHarness Module. The module contains a temperature sensor and a

3-axis accelerometer for monitoring posture and activity. It captures and analyses sensor

data from the strap and then records or transmits this data to a remote location.

Before transmitting the data, the raw data is filtered, processed and analyzed within

the device. It can operate in various modes which are software configurable [19]. It can

transmit the live data in short range via Bluetooth and can be received by a Bluetooth

receiver on a device. It can also transmit and display the data on a mobile application

using Bluetooth. The data can be transmitted to remote location via long haul radio link.

Also, subject and wear and record it and then download it using the USB charging cradle.

13

Page 23: CALIFORNIA STATE UNIVERSITY, NORTHRIDGE ECG AND …penguin.ewu.edu/cscd506/Theses/Gupta-Nipun-thesis-2014.pdf · 2018-02-10 · Nipun Gupta May 2014. The thesis of Nipun Gupta is

More information about the data transmission can be found in the documents mentioned in

reference [21].

The Bioharness (2.0) module has a memory of up to 570 hours and battery life of up to

24 hours in logging mode. The five physiological parameters are simultaneously measured.

The ECG data is captured through electrode sensors housed within the chest strap sampled

at 250 Hz and heart rate is calculated by detecting the R waveforms. It can measure heart

rate from 25 BPM to 240 BPM. The breathing rate is provided using a capacitive pressure

sensor that detects circumference expansion and contraction of the torso. The breathing rate

ranges from 3 - 70 breaths per minute. To measure the level of activity it uses three axis

acceleration measurements, using piezoelectric technology. Acceleration data is measured

in gravitational force(g) and ranges from -16g to +16g. The posture is measured using the

same technology acting as an inclinometer. The device monitors how far the device is “off

the vertical” and reports the data is in angular degrees(◦), ranges between -180◦ and +180◦.

Lastly, the skin temperature is measured at inferior sternum by an infrared sensitive sensor

behind a clear window on the apex of the monitoring device. The data is reported in degrees

Celsius (◦C) and ranges from 10-60 ◦C[19] [20].

3.3 ECG Noise Cancellation

The normal unamplified ECG signal has of very low amplitude and low signal to noise

ratio. But there are many factors which affect the ECG signal quality. Human factors

such as breath, lung or bowel sounds, and any muscle activity can contaminate the signal.

Measuring equipment factors such as motion artifact in the ECG, variation of electrode

14

Page 24: CALIFORNIA STATE UNIVERSITY, NORTHRIDGE ECG AND …penguin.ewu.edu/cscd506/Theses/Gupta-Nipun-thesis-2014.pdf · 2018-02-10 · Nipun Gupta May 2014. The thesis of Nipun Gupta is

skin contact impedance, 50-60 Hz power-line interference, baseline wander and noise from

electronic devices are another cause. Electrical interference from external environment may

increase interfering signals [6][7]. The primary aim is to remove low frequency noise such

as baseline drift, powerline interference which could result in false positives at the QRS

detection stage. Usually the ECG signal acquisition hardware can remove the power line

interference using the band pass filter. Baseline wandering comes at frequencies wandering

between 0.15 and 0.3 Hz which can be suppressed by using highpass digital filter.

To get the most of the QRS complex, a passband can be set to approximately 5-30

Hz. After removing the baseline wandering, the resulting ECG signal is more stationary

and explicit than the original signal but some other types of noise might still affect feature

extraction of the ECG signal. To remove the wideband noises the wavelet transform method

is used. In addition, the non-linear transformation such as signal amplitude squaring may

also reduces the noise. Using the decision rule algorithms such as adaptive thresholds and

T-wave discrimination techniques filters the QRS signal further [7][8][58]. After noise

filtering, the various features such as QRS intervals, QRS amplitudes, PR intervals, QT

intervals are extracted. They provide information about the heart rate and the condition of

the heart.

3.4 Heart Rate Variability Analysis

Heart rate variability (HRV) is defined as the beat to beat variation in the heart rhythm.

HRV can be measured with the variation of RR intervals exhibited in a sequence of ECG

sample. The sinus rhythm time series is derived from the RR interval by extracting only

15

Page 25: CALIFORNIA STATE UNIVERSITY, NORTHRIDGE ECG AND …penguin.ewu.edu/cscd506/Theses/Gupta-Nipun-thesis-2014.pdf · 2018-02-10 · Nipun Gupta May 2014. The thesis of Nipun Gupta is

normal sinus to normal sinus (NN) interbeat intervals. Relatively high frequency varia-

tions in sinus rhythm are associated with the parasympathetic (vagal) modulation, and low

frequency variations are associated with a combination of both parasympathetic and sym-

pathetic modulation and non-autonomic factors [5][24]. The high frequency component

ranges from 0.15 to 0.4 Hz and low frequency component ranges from 0.04-0.15 Hz [5].

For HRV analysis, the measures are usually divided into two categories: time domain

and frequency domain [10]. Geometric method and non-linear methods [5][56] are not dis-

cussed here. The time-domain methods are the simplest to perform since they are applied

straight to the series of successive RR interval values to give variables such as: SDNN,

the standard deviation of NN intervals; RMSSD, the root mean square of successive differ-

ences; SDSD, the standard deviation of successive differences; NN50, the number of pairs

of successive NNs differ by more than 50 ms; pNN50, the proportion of NN50 divided by

total number of NNs; similarly NN20 & pNN20 [10][56].

In the frequency-domain methods, the RR interval series is converted to an equidistantly

sampled series and then a power spectrum density (PSD) estimate is calculated. In HRV

analysis, the PSD estimation is usually carried out using Fast-Fourier Transformation (FFT)

based methods [58]. The PSD is divided into frequency bands: the very low frequency

(VLF, 0-0.04 Hz), low frequency (LF, 0.04-0.15 Hz), and high frequency (HF, 0.15-0.4

Hz). For each frequency band, the absolute and relative powers of VLF, LF, and HF bands,

LF and HF band powers in normalized units, the LF/HF power ratio, and peak frequencies

are calculated. The ratio of LF to HF power is often used as a metric of sympathetic-

parasympathetic balance.

16

Page 26: CALIFORNIA STATE UNIVERSITY, NORTHRIDGE ECG AND …penguin.ewu.edu/cscd506/Theses/Gupta-Nipun-thesis-2014.pdf · 2018-02-10 · Nipun Gupta May 2014. The thesis of Nipun Gupta is

In previous studies, HRV analysis has shown a difference between waking and sleep

stages [25][27]. It has been found LF/HF ratio decreases when a person becomes sleepy and

hence can be an effective method for the detection of driver drowsiness [24][26][28][29].

17

Page 27: CALIFORNIA STATE UNIVERSITY, NORTHRIDGE ECG AND …penguin.ewu.edu/cscd506/Theses/Gupta-Nipun-thesis-2014.pdf · 2018-02-10 · Nipun Gupta May 2014. The thesis of Nipun Gupta is

Chapter 4

SYSTEM AND IMPLEMENTATION

In this chapter, we define systems which use the information on various physiological pa-

rameters. The first system is “Data Acquisition and Analysis System” which is useful in

health monitoring and can be extended as continuous health monitoring system. The sec-

ond system would determine if a person (mainly driver) is fatigued or drowsy. The heart

rate is one of the most popular and accurate parameter to determine drowsiness. It has been

described in detail in the previous chapter.

4.1 ECG Data Acquisition and Analysis System

In order to completely understand all aspects of ECG, a system is designed and devel-

oped where data is acquired from an individual who is wearing an ECG device. This data

could essentially be filtered and used to extract ECG features which help in analyzing heart

functionality and arrhythmia.

Figure 4.1: Diagram of ECG data acquisition and analysis system

Figure 4.1 shows the diagram of an ECG data acquisition and analysis system. This sys-

18

Page 28: CALIFORNIA STATE UNIVERSITY, NORTHRIDGE ECG AND …penguin.ewu.edu/cscd506/Theses/Gupta-Nipun-thesis-2014.pdf · 2018-02-10 · Nipun Gupta May 2014. The thesis of Nipun Gupta is

tem consists of a wearable Bluetooth ECG device, an Android application for data acqui-

sition and an analysis platform which often is a computer. The ECG sensor device collects

and digitizes the analog ECG signal. The data is transmitted by a Bluetooth module. The

android application establishes a Bluetooth connection with the device. The application

then collects and displays the transmitted data.

Figure 4.2: Android application for ECG data acquisition.

Figure 4.2 shows the android application for ECG data acquisition. The application

contains a drop down list for activity which could be Low, Medium, High or Auto, selected

by the user. The application writes data chunks to a text file in local storage according

the activity and date. At the bottom of the application, current status for device connec-

tivity is shown. Once the user stops the data acquisition, the ECG data is transferred to a

computer via ftp or other means for further analysis. There are a number of frameworks

like LabVIEW and MATLAB which are very flexible and provide a variety of toolkits for

extensive signal processing and data analysis, such as Simulink library for MATLAB and

19

Page 29: CALIFORNIA STATE UNIVERSITY, NORTHRIDGE ECG AND …penguin.ewu.edu/cscd506/Theses/Gupta-Nipun-thesis-2014.pdf · 2018-02-10 · Nipun Gupta May 2014. The thesis of Nipun Gupta is

NI LabVIEW biomedical toolkit.

4.2 Driver Drowsiness Detection System

Various studies as mentioned in section 2.4, suggest that variety of physiological pa-

rameters can be used to determine driver drowsiness. Many of such physiological param-

eters are mentioned in section 3.1. Modern portable and wearable devices simultaneously

measure and provide many of these parameters. Zephyr Bioharness 2.0 is one such ECG

device, which is used in the development of this system.

Figure 4.3: Diagram for driver drowsiness detection system

Figure 4.3 shows the diagram for driver drowsiness detection system. This system is

quite similar to the first system as far as the ECG data acquisition is concerned. The android

application for ECG data acquisition is extended to obtain additional parameters such as

posture, worn status, skin temperature, Respiration rate, RR interval and Heart Rate and

detect drowsiness. This android application is shown in figure 4.4.

These parameters except for the RR intervals and ECG data are displayed on the screen

if the device is on and worn, as shown by the “Worn Status:” on the application. The focus

of this system is to analyze the heart rate and posture changes in addition to acquiring ECG

and RR interval data. However as discussed in the previous chapters that physiological

20

Page 30: CALIFORNIA STATE UNIVERSITY, NORTHRIDGE ECG AND …penguin.ewu.edu/cscd506/Theses/Gupta-Nipun-thesis-2014.pdf · 2018-02-10 · Nipun Gupta May 2014. The thesis of Nipun Gupta is

Figure 4.4: Android application for drowsiness detection.

parameters such as skin temperature, breathing rate, rapid eye movement, EEG can also

be used to detect drowsiness. This could potentially strengthen the detection system if

used in conjunction with currently used parameters. The system is enabled as soon as

the user presses the “Start” button in the application. Current activity is automatically

detected and displayed on the screen. The system allows user to enable or disable the alerts

while driving. If alerts are enabled and the user is driving, the system activates one or

both drowsiness detection algorithm mention in section below. If driver’s drowsiness is

detected, system activates audio, visual and vibration alerts. These alerts continue unless

user presses the “Stop Alert” button from the application. Finally, the user may press the

“Stop” button to disable the system.

21

Page 31: CALIFORNIA STATE UNIVERSITY, NORTHRIDGE ECG AND …penguin.ewu.edu/cscd506/Theses/Gupta-Nipun-thesis-2014.pdf · 2018-02-10 · Nipun Gupta May 2014. The thesis of Nipun Gupta is

4.3 Android Platform

The system makes use of Android platform, which contribute to the system either as a

gateway or core processing platform. Handheld devices have become sophisticated devices

with various sensors and offers extensive processing power. The application is developed

on Samsung Galaxy Note II, which is a mobile phone device. A mobile device is ideal

for systems such as these, since most of people carry one at all times. There are few other

platforms available for use. Android platform is selected because it has well developed

libraries and development support available, and more importantly it is an ideal platform

for mobile development for existing Java developers as it is based on Java.

4.3.1 Android Application Development

The Android SDK is used to develop the android application. The SDK provides API

libraries and developer tools necessary to design, build, test and debug apps for Android.

The SDK bundle provides Eclipse with ADT (Android Developer Tools) to streamline the

development, Android SDK Tools to install and uninstall packages, Android Platform-

tools, latest Android platform and latest Android system image for the emulator. The latest

Android platform, 4.4, is used for this application because it provides all the latest libraries

like google play services etc.

4.3.2 Bluetooth Data Transfer

Zephyr Bioharness device uses a Bluetooth connection to send data to other devices.

The Bluetooth communication has been encapsulated in the android API and no developer

intervention is required. The android application utilizes the android API to enable the

22

Page 32: CALIFORNIA STATE UNIVERSITY, NORTHRIDGE ECG AND …penguin.ewu.edu/cscd506/Theses/Gupta-Nipun-thesis-2014.pdf · 2018-02-10 · Nipun Gupta May 2014. The thesis of Nipun Gupta is

device to transmit different data packets. The data packets are the ECG Data packet, the

R-R data packet and the general data packet.

4.3.3 Android Application User Interface

For ECG data acquisition and analysis system, an android app with very simple inter-

face is developed. With this app, the user selects the activity and press “Start” button to

connect to the device and start getting ECG data. User can then select “Stop” button to

stop gathering ECG data and close the connection. The connection and activity status are

displayed at the bottom of the application. The figure 4.5 shows the use case diagram for

android application for the ECG data acquistion and analysis system.

Figure 4.5: Use case diagram for Android app for ECG data acquisition and analysis sys-tem.

For driver drowsiness detection system, the use case diagram is shown in figure 4.6.

23

Page 33: CALIFORNIA STATE UNIVERSITY, NORTHRIDGE ECG AND …penguin.ewu.edu/cscd506/Theses/Gupta-Nipun-thesis-2014.pdf · 2018-02-10 · Nipun Gupta May 2014. The thesis of Nipun Gupta is

In addition to the features of above system, the application has “Enable Alert” checkbox,

“Stop Alert” button to stop and reset the alarms, and display of “Current Activity” us-

ing google play services for activity recognition, “Worn Status”, “Posture”, “Heart Rate”,

“Respiration Rate” and “Skin Temperature”. RR interval data packets are stored behind the

scenes along with ECG data.

Figure 4.6: Use case diagram for Android app in drowsiness detection system.

24

Page 34: CALIFORNIA STATE UNIVERSITY, NORTHRIDGE ECG AND …penguin.ewu.edu/cscd506/Theses/Gupta-Nipun-thesis-2014.pdf · 2018-02-10 · Nipun Gupta May 2014. The thesis of Nipun Gupta is

4.3.4 Activity Recognition

There are many ways to determine user’s activity. First and the easiest way is simply

depends on user’s input to the application. A user can select “High”, “Medium” or “Low”

for high activities like running, medium activities like walking and low activities like sit-

ting or lying down respectively. Second option is through the ECG device like Zephyr

Bioharness, which can identify if the user is stationary, walking or running using the built

in accelerometer. Third and perhaps most useful is activity recognition using google play

services, shown in the class diagram in figure 4.7.

Figure 4.7: Class diagram for drowsiness detection system.

Activity recognition client in Google play services tries to detect the user’s current phys-

ical activity, such as walking, driving, or standing still by processing the update requests

which uses a similar pattern as location client used by location or geofencing. Based on se-

lected interval, location services sends out activity updates containing one or more possible

25

Page 35: CALIFORNIA STATE UNIVERSITY, NORTHRIDGE ECG AND …penguin.ewu.edu/cscd506/Theses/Gupta-Nipun-thesis-2014.pdf · 2018-02-10 · Nipun Gupta May 2014. The thesis of Nipun Gupta is

Activity DescriptionIN VEHICLE The device is in a vehicle, such as a car.ON BICYCLE The device is on a bicycle.

ON FOOT The device is on a user who is walking or running.STILL The device is still (not moving)

TILTING The device angle relative to gravity changed significantly.UNKNOWN Unable to detect current activity.

Table 4.1: Various detectable activities

activities and confidence level for each activity. Activities supported by DetectedActivity

are listed in the table 4.1. The system checks if the confidence level is more than 50 and

activity is “IN VEHICLE” and uses this information to enable drowsiness detection.

4.3.5 Application Backend

The main activity class for this android application is SensorActivity which extends Ac-

tivity and implements OnItemSelectedListener to listen to selections and GooglePlaySer-

vicesClient.ConnectionCallbacks and GooglePlayServicesClient.OnConnectionFailedListener

to request activity recognition. At the launch of the application, a message to the android

device is sent indicating that the application will initiate the pairing request. Objects of

BTBondReciever and BTBroadcastReceiver, both extend BroadcastReceiver, are created

and registered with the main activity of android application. BTBroadcastReceiver indi-

cates the pairing request event while BTBondReceiver indicates that the state has changed

to paired.

Once the “Start” button is pressed, the communication thread gets created which han-

dles all the communication between the android and ECG device. NewConnectedListener

extends ConnectListenerImpl and override connected() method where ZephyrProtocol ob-

26

Page 36: CALIFORNIA STATE UNIVERSITY, NORTHRIDGE ECG AND …penguin.ewu.edu/cscd506/Theses/Gupta-Nipun-thesis-2014.pdf · 2018-02-10 · Nipun Gupta May 2014. The thesis of Nipun Gupta is

ject is created and a new ZephyrPacketListener is attached to it. ReceivedPacket() method

retrieves and processes the enabled data packets. A handler is created in SensorActivity

class to retreive and processes the messages from Zephyr API. ActivityRecognitionSer-

vice extends IntentService and receives ActivityRecognition updates. It receives updates

in the background, even if the main activity is not visible. Util, FixedHRQueue and Fixe-

dResultQueue are the supporting classes for algorithm and application to run.

4.4 Data Analysis Platform

A computer is used as an analysis platform for the systems. Commercial and non-

commercial frameworks and tools like MATLAB and Kubios HRV, respectively, are used

for data representation and analysis.

4.4.1 Plotting ECG Device Data

Before starting the analysis, it is important to understand and plot bulky signals such as

ECG. ECG signals are usually sampled with high frequency (i.e. 250 Hz, 500 Hz and 1000

Hz) and thus have lot of data points. A MATLAB script “ECG Plot.m” is created, which

takes the ECG data file created by android application and transferred over ftp connection

and plot the graph. Zephyr Bioharness ECG device samples at frequency 250 Hz and data

ranges from 0 to 1024. The ADC resolution for ECG sensor is 10 bits. Time as x-axis is

calculated using sample rate 250 Hz with following calculation:

time = transpose(0 : 1/Fs ECG : length(Actual ECG Data)/Fs ECG−1/Fs ECG)

27

Page 37: CALIFORNIA STATE UNIVERSITY, NORTHRIDGE ECG AND …penguin.ewu.edu/cscd506/Theses/Gupta-Nipun-thesis-2014.pdf · 2018-02-10 · Nipun Gupta May 2014. The thesis of Nipun Gupta is

The ADC resolution is used to normalize the data and create a signed signal using following

calculation:

Actual ECG Data Signed = (Actual ECG Data−(2(̂ADC Resolution−1)))∗(−1)

Together this information is used to plot the graphs using plot command as shown below:

plot(time,Actual ECG Data Signed);

The graphs involving various activities are shown in chapter 5.

4.4.2 HRV Analysis Tools

HRV analysis, as described in chapter 3, is proven and effective technique in analyzing

the ECG data. An HRV tool is used to determine the LF-HF ratio from ECG signal. There

are various open source HRV analysis tools available. One of such tool is Kubios HRV

created by Biosignal Analysis and Medical Group at University of Eastern Finland. It is

an advance tool to study individual’s heart beat variability. It offers wide variety of various

analysis options with easy to use interface, which makes it suitable for researchers and

clinical studies [3].

The tool is compatible with various file formats such as ASCII ECG and RR data,

EDF (European Data Format), GDF (General Data Format), Custom ECG and RR data etc.

Physionet database is used in the project, which outputs the file in EDF and Custom ECG

data format and can be used in this software. ECG data is preprocessed and RR interval is

28

Page 38: CALIFORNIA STATE UNIVERSITY, NORTHRIDGE ECG AND …penguin.ewu.edu/cscd506/Theses/Gupta-Nipun-thesis-2014.pdf · 2018-02-10 · Nipun Gupta May 2014. The thesis of Nipun Gupta is

determined using QRS detection algorithm. Tools for RR interval artifact correction such

as interpolation are also available.

Versatile analysis option such as time-domain (mean/STD of RR intervals, RMSSD,

pNN50, etc.) and frequency-domain (VLF, LF, and HF band powers and peak frequencies)

are available. In the frequency-domain analysis the power spectrum is calculated which is

then used to calculate LF/HF ratios [3]. For FFT spectrum Welch’s periodogram method

and for AR spectrum, autoregressive modeling based method is used [58]. In addition to

these most common options, several nonlinear methods such as Poincare plot, approxi-

mate/sample entropy, de-trended fluctuation analysis (DFA), recurrence plot analysis, and

correlation dimension are also available [3]. A screenshot is shown in the figure 4.8.

Figure 4.8: Kubios HRV tool.

The detailed report sheets can be printed or saved in Portable Document Format (PDF)

one sample per page, and as an ASCII text file and MATLAB .mat file [3]. An example of

report sheet is shown in the figure 4.9.

29

Page 39: CALIFORNIA STATE UNIVERSITY, NORTHRIDGE ECG AND …penguin.ewu.edu/cscd506/Theses/Gupta-Nipun-thesis-2014.pdf · 2018-02-10 · Nipun Gupta May 2014. The thesis of Nipun Gupta is

04−Apr−2014 14:47:23

Nipun Gupta

CS, CSUN

Kubios HRV, version 2.1

Department of Applied Physics

University of Eastern Finland, Kuopio, Finland

HRV Analysis Resultsn11.edf − 29.11.07 − 22.36.46

Page 1/1

Results for a single sampleRR Interval Time Series

00:00:00 00:05:03

Selected RR Series

Time−Domain Results

Variable Units Value

Mean RR*STD RR (SDNN)Mean HR*STD HRRMSSDNN50pNN50RR triangular indexTINN

(ms)(ms)

(1/min)(1/min)

(ms)(count)

(%)

(ms)

949.6 62.363.474.41 50.4 8827.8

13.250200.0

Distributions*

Frequency−Domain ResultsFFT spectrum (Welch’s periodogram: 256 s window with 50% overlap) AR Spectrum (AR model order = 16, not factorized )

FrequencyBand

Peak(Hz)

Power

(ms2)

Power(%)

Power(n.u.)

VLF (0−0.04 Hz)LF (0.04−0.15 Hz)HF (0.15−0.4 Hz)TotalLF/HF

0.02340.05080.3086

2023 1045 1105 41750.945

48.525.026.5

48.6 51.4

FrequencyBand

Peak(Hz)

Power

(ms2)

Power(%)

Power(n.u.)

VLF (0−0.04 Hz)LF (0.04−0.15 Hz)HF (0.15−0.4 Hz)TotalLF/HF

0.00390.04300.3242

1465 1151 842 34591.366

42.433.324.3

57.7 42.2

Nonlinear ResultsVariable Units Value

Poincare plot SD1 SD2

Recurrence plot Mean line length (Lmean) Max line length (Lmax) Recurrence rate (REC) Determinism (DET) Shannon Entropy (ShanEn)

Other Approximate entropy (ApEn) Sample entropy (SampEn)

Detrended fluctuations (DFA): α1 Detrended fluctuations (DFA): α2 Correlation dimension (D2)

(ms)(ms)

(beats)(beats)

(%)(%)

35.7 80.5

10.96 83

35.1898.083.189

1.1021.5860.9810.8993.708

Poincare Plot Detrended fluctuations (DFA)

*Results are calculated from the non−detrended selected RR series.

Detrending method: none R

R (

s)

00:00:00 00:01:40 00:03:20 00:05:00 00:06:40 00:08:20 00:10:00 00:11:40 00:13:20

0.8

0.9

1

1.1

00:00:00 00:00:50 00:01:40 00:02:30 00:03:20 00:04:10 00:05:00

0.8

0.9

1

1.1

Time (h:min:s)

RR

(s)

0.8 0.9 1 1.1

RR (s)

55 60 65 70 75 80

HR (beats/min)

0 0.1 0.2 0.3 0.4 0.50

0.05

0.1

0.15

Frequency (Hz)

PS

D (

s2/H

z)

EDR=0.19 Hz

0 0.1 0.2 0.3 0.4 0.50

0.05

0.1

0.15

Frequency (Hz)

PS

D (

s2/H

z)

800 900 1000 1100

800

900

1000

1100 SD2SD1

RRn (ms)

RR

n+

1 (

ms)

0.6 0.8 1 1.2 1.4 1.6 1.8

−1.6

−1.4

−1.2

−1

−0.8

−0.6

α1

α2

log10

n (beats)

log

10 F

(n)

Figure 4.9: PDF report sheet showing various HRV analyses.

30

Page 40: CALIFORNIA STATE UNIVERSITY, NORTHRIDGE ECG AND …penguin.ewu.edu/cscd506/Theses/Gupta-Nipun-thesis-2014.pdf · 2018-02-10 · Nipun Gupta May 2014. The thesis of Nipun Gupta is

4.5 Drowsiness Detection Algorithms

For data analysis and computation, algorithms are developed which make use of the

physiological parameters provided by the monitoring device mentioned in chapter 3. These

algorithms are developed by analyzing various datasets from physionet. These datasets are

explained in chapter 5 on data analysis and results.

First set of algorithms uses heart rate to detect drowsiness. Android application can

obtain heart rate by three methods from the ECG device. First method simply reads the

value from device ranging between 25 and 240 Beats per Minute (BPM). Second method

uses RR intervals provided by the device with minimum of 250 milliseconds (ms) apart.

A reciprocal of the intervals are calculated and result is multiplied by 60 to get the heart

rate in beats per minute. Third and last method is using ECG signal, where RR intervals

are detected by preprocessing ECG signal using QRS complex detection techniques. These

RR intervals go through the same calculations as in second method in order to get heart

rate in beats per minute. Sample data used in heart rate algorithm is shown in figure 4.10

(a).

Another set of algorithms is developed which analyzes ECG data using LF-HF ratio.

Heart rate variance (HRV) is performed using frequency domain method to determine LF-

HF ratio. HRV analysis is based on the RR intervals. Some ECG devices provide RR

intervals like the one used for this project and others provides only ECG signal. RR in-

tervals can be calculated from ECG signal if not provided by the device. RR intervals

time series are non-uniform which is not suitable for the Frequency-domain analysis. The

31

Page 41: CALIFORNIA STATE UNIVERSITY, NORTHRIDGE ECG AND …penguin.ewu.edu/cscd506/Theses/Gupta-Nipun-thesis-2014.pdf · 2018-02-10 · Nipun Gupta May 2014. The thesis of Nipun Gupta is

(a) HR algorithm sample data. (b) LF-HF algorithm sample data.

Figure 4.10: Sample data from a database

32

Page 42: CALIFORNIA STATE UNIVERSITY, NORTHRIDGE ECG AND …penguin.ewu.edu/cscd506/Theses/Gupta-Nipun-thesis-2014.pdf · 2018-02-10 · Nipun Gupta May 2014. The thesis of Nipun Gupta is

given time series is resampled and uniform time series is constructed, this process is called

interpolation [57]. After interpolation, regular frequency domain analysis method can be

applied where a power spectrum density (PSD) estimate is calculated for RR interval time

series. In HRV, the PSD is generally estimated using fast Fourier transformation (FFT)

based method. One of the important advantages of using FFT method over other avail-

able ones is simplicity of implementation. FFT algorithm is written and freely available in

many language libraries. An absolute power value for each frequency band is obtained by

simply integrating the FFT spectrum over the band limits [58]. LF and HF power values

are used to calculate the LF-HF ratio. Sample data used in LF-HF algorithm is shown in

figure 4.10(b).

4.5.1 Algorithm 1: Heart Rate algorithm using awake average

The first HR algorithm used for data analysis uses average heart rate from awake sec-

tion of the dataset. Three threshold values are then calculated using threshold percentage

values i.e. 95%, 90% and 85%. When the reported heart rate goes below this threshold set

value, the algorithm consider it as drowsy/sleep state. The pseudocode for this algorithm is

described in the following sub section.

4.5.1.1 Pseudocode for Algorithm 1

1: Define percentage value to be used2: Read available awake data3: Calculate average of awake data4: Calculate threshold value using average and percentage value5: If (reported heart rate value < threshold set value){Activate Alarm}

33

Page 43: CALIFORNIA STATE UNIVERSITY, NORTHRIDGE ECG AND …penguin.ewu.edu/cscd506/Theses/Gupta-Nipun-thesis-2014.pdf · 2018-02-10 · Nipun Gupta May 2014. The thesis of Nipun Gupta is

4.5.2 Algorithm 2: Heart Rate algorithm using partial sleep average

This algorithm unlike previous one uses the average of highest 10 heart rate values from

sleep section of dataset. Three threshold values are calculating and drowsiness is detected

in similar way as first algorithm. It is a learning algorithm which monitors subject’s sleep

in order to determine the threshold. The pseudocode for this algorithm is described in the

following sub section.

4.5.2.1 Pseudocode for Algorithm 2

1: Define percentage value to be used2: Read available sleep data3: Calculate average of highest 10 data samples4: Calculate threshold value using average and percentage value5: If (reported heart rate value < threshold set value){Activate Alarm}

4.5.3 Algorithm 3: Heart Rate algorithm with multiple constraints

For this algorithm, when the driver starts driving, a unique heart rate is calculated by

taking average of heart rate values obtained over the period of sixty seconds or one minute.

This unique heart rate is different for every driver. A threshold value is then determined

using the calculated average heart rate. System tracks last six heart rate values along with

last five changes in values i.e. +1 for and an increase and -1 for a decrease. Then an

average of last six values is calculated. If the calculated average is less than or equal to

threshold value, the algorithm progresses to next step where last five changes are analyzed

to determine if heart rate values have decreasing trend (i.e. if decreasing value is more

than increasing value of heart rate). If decreasing trend is detected, system will activate the

34

Page 44: CALIFORNIA STATE UNIVERSITY, NORTHRIDGE ECG AND …penguin.ewu.edu/cscd506/Theses/Gupta-Nipun-thesis-2014.pdf · 2018-02-10 · Nipun Gupta May 2014. The thesis of Nipun Gupta is

alarm. Six heart rate values were selected because we would want to check for drowsiness

more frequently (i.e. every six seconds) and also six recorded values provide five differ-

ences, so we do not need to handle a tie i.e. equal number of increases and decreases (e.g.

+3 and -3). Similar algorithm can be employed for other parameters the device has of-

fers, to potentially strengthen the overall outcome of the system. The pseudocode for this

algorithm is shown in the following sub-section.

4.5.3.1 Pseudocode for Algorithm 3

1: Calculate threshold using average HR for first 60 seconds2: Store and track last 6 heart rate (HR) values3: Track last 5 changes // +1 - increase and -1 - decrease4: Calculate an average of last 6 HR values5: If(Average of last 6 value is <= Threshold value){// -1 are more than +1. No ties due to 5 valuesIf( change from step 3 has decreasing trend){Activate Alarm}}

4.5.4 Algorithm 4: LF-HF algorithm using awake average

This algorithm is very similar to the first HR algorithm. Instead of heart rate this algo-

rithm uses LF-HF ratio for threshold value calculations. The pseudocode for this algorithm

is shown in the following sub-section.

35

Page 45: CALIFORNIA STATE UNIVERSITY, NORTHRIDGE ECG AND …penguin.ewu.edu/cscd506/Theses/Gupta-Nipun-thesis-2014.pdf · 2018-02-10 · Nipun Gupta May 2014. The thesis of Nipun Gupta is

4.5.4.1 Pseudocode for Algorithm 4

1: Define percentage value to be used2: Read available awake data3: Calculate average of awake data4: Calculate threshold value using average and percentage value5: If (LF-HF < threshold set value){Activate Alarm}

4.5.5 Algorithm 5: LF-HF algorithm using partial sleep average

This algorithm is very similar to the second HR algorithm and uses LF-HF ratio instead

of heart rate. The pseudocode for this algorithm is shown in the following sub-section.

4.5.5.1 Pseudocode for Algorithm 5

1: Define percentage value to be used2: Read available sleep data3: Calculate average of highest 10 data samples4: Calculate threshold value using average and percentage value5: If (LF-HF ratio < threshold set value){Activate Alarm}

4.5.6 Algorithm 6: LF-HF algorithm using multiple constraints

This algorithm has somewhat similar structure to the third HR algorithm. Instead of

heart rate this algorithm uses LF-HF ratio to detect drowsiness. The algorithm uses the

threshold calculated by the average of first few LF-HF ratios. A percent change between

LF-HF ratio of awake stage and sleep stage is determined. Then if current LF-HF ratio

is less than or equal to threshold ratio and if current ratio is less than previous ratio, the

36

Page 46: CALIFORNIA STATE UNIVERSITY, NORTHRIDGE ECG AND …penguin.ewu.edu/cscd506/Theses/Gupta-Nipun-thesis-2014.pdf · 2018-02-10 · Nipun Gupta May 2014. The thesis of Nipun Gupta is

algorithm checks if the percent change between the two ratios is more than or equal to pre-

viously calculated percent change threshold value. If all conditions satisfy system activates

the alarm. The pseudocode for this algorithm is shown in the following sub-section.

4.5.6.1 Pseudocode for Algorithm 6

1: Calculate a threshold value using first few LF-HF ratios2: Get % change threshold by analyzing awake and sleep data3: If (current_LF-HF_Ratio <= threshold ratio){If( current_LF-HF_Ratio < previous_LF-HF_Ratio){//checking variance rangeIf(% change between two LF-HF ratio >= % change threshold){Activate Alarm}

}}

37

Page 47: CALIFORNIA STATE UNIVERSITY, NORTHRIDGE ECG AND …penguin.ewu.edu/cscd506/Theses/Gupta-Nipun-thesis-2014.pdf · 2018-02-10 · Nipun Gupta May 2014. The thesis of Nipun Gupta is

Chapter 5

DATA ANALYSIS AND RESULTS

In this chapter the results of the data analysis are presented. There are two aspects of this

project. The first part is ECG data collection and its analysis, the second part consists of an-

alyzing existing annotated data to construct a system with drowsiness detection algorithm.

This chapter represents necessary information to cover both aspects.

5.1 ECG Data Collection and Analysis

Figure 5.1 shows the data collected from the zephyr monitoring device which is ana-

lyzed using MATLAB. Images on the left side show complete set of captured data while the

ones on the right show zoomed-in images showing PQRS complex as described in chapter

3.

As mentioned in chapter 3, that various types of noises are present in the collected ECG

signal which can be filtered out. After analyzing the data, it turned out that the data contains

minimal noise and no further noise cancellation is required.

5.2 Physionet Data

In addition to the collected data, the analysis is performed on annotated data from

databases available at PhysioNet website. PhysioNet offers large collections of recorded

physiologic signals called PhysioBank, freely available on their website [10]. Along with

data PhysioNet offers related open-source software called PhysioTookit which can be used

38

Page 48: CALIFORNIA STATE UNIVERSITY, NORTHRIDGE ECG AND …penguin.ewu.edu/cscd506/Theses/Gupta-Nipun-thesis-2014.pdf · 2018-02-10 · Nipun Gupta May 2014. The thesis of Nipun Gupta is

(a) Low activity. (b) Low activity showing RR intervals.

(c) Medium activity. (d) Medium activity showing RR intervals.

(e) High activity. (f) High activity showing RR intervals.

Figure 5.1: Zephyr device data plot in MATLAB

39

Page 49: CALIFORNIA STATE UNIVERSITY, NORTHRIDGE ECG AND …penguin.ewu.edu/cscd506/Theses/Gupta-Nipun-thesis-2014.pdf · 2018-02-10 · Nipun Gupta May 2014. The thesis of Nipun Gupta is

for data analysis such as HRV analysis[10]. We have used two multi-parameter databases

from this site which are described in the sections below. Multi-parameter database is se-

lected so that parameters other than ECG could potentially be used in future.

5.2.1 CAP Sleep Database

The first database used is Cyclic Alternating Pattern (CAP) sleep database. Each record

in the database includes three or more EEG signals together with EOG, EMG, airflow, res-

piratory effort, ECG signals, and reference sleep stage along with CAP annotations. This

database provides a useful number of carefully annotated examples of CAP in a repre-

sentative variety of pathophysiologic contexts, for research and advanced studies [59]. The

database offers various records depending on subject’s pathology, out of which “No pathol-

ogy” and “Narcolepsy” records were selected for the study. One record from each type of

recording has been represented in figure 5.2 and 5.3.

The graphs are color coded according to the sleep stages and awakening. Per literature,

sleep is mainly divided into two types: REM (Rapid eye movement) and NREM (non-rapid

eye movement) [61]. NREM is further divided into four stages S1, S2, S3 and S4, which

are shown in the graph above along with REM and awake stage represented by “W”. The

database shows that the sleep proceeds in cycles i.e. “W” and any combination of S1-S4

and REM, depending on the individual.

5.2.2 Stress Recognition in Automobile drivers

This database has been created and contributed to PhysioNet by Michigan Institute of

Technology. Multiple physiological parameters, including ECG, have been recorded from

40

Page 50: CALIFORNIA STATE UNIVERSITY, NORTHRIDGE ECG AND …penguin.ewu.edu/cscd506/Theses/Gupta-Nipun-thesis-2014.pdf · 2018-02-10 · Nipun Gupta May 2014. The thesis of Nipun Gupta is

Figure 5.2: Heart rate for normal sleeping data.

Figure 5.3: Heart rate for narcolepsy data.

41

Page 51: CALIFORNIA STATE UNIVERSITY, NORTHRIDGE ECG AND …penguin.ewu.edu/cscd506/Theses/Gupta-Nipun-thesis-2014.pdf · 2018-02-10 · Nipun Gupta May 2014. The thesis of Nipun Gupta is

Figure 5.4: Heart rate for driver data.

healthy volunteers driving on a predefined route including streets and highways in and

around Boston and Massachusetts [60]. The objective of the study has been to investigate

the feasibility of automated stress recognition based on multiple physiological parameters.

Each record in the database is a complete experiment and is about 65 to 93 minutes in

length. Figure 5.4 shows the heart rate (calculated from ECG data) graph created for one

of the driver record.

5.3 Results

The algorithms described in chapter 4 are simulated on the records from both databases

mentioned above. The datasets used from CAP sleep database are n1, n3, n4, n7, n8, n9,

n10, n11, n13, n14, n15 from normal or no pathology records and narco2, narco4, narco5

from narcolepsy records and the datasets used from stress database is drive. The second

and fifth algorithms are not applicable on the driver database since these algorithms are

based on sleep data. While analyzing the awake and sleep data from various datasets, it is

42

Page 52: CALIFORNIA STATE UNIVERSITY, NORTHRIDGE ECG AND …penguin.ewu.edu/cscd506/Theses/Gupta-Nipun-thesis-2014.pdf · 2018-02-10 · Nipun Gupta May 2014. The thesis of Nipun Gupta is

Figure 5.5: LF-HF ratio

observed that the difference between their averages ranges from 5 percent to 15 percent.

This information is utilized in the analysis by using the threshold percentages i.e. 95%,

90% and 85%. If the heart rate value is lower than the threshold the person is considered

to be sleepy/drowsy. Similarly, as shown in figure 5.5, a downward trend is seen in LF-HF

ratio when a person transitions to sleep from awake state. Thus, the LF-HF ratio may be

suitable in detecting driver drowsiness.

The results of analysis using the algorithms mentioned in chapter 4 are shown in various

tables below. The first column shows the datasets used from two databases. Second and

third columns show the number of data points used from awake and sleep data respectively.

Fourth column shows the threshold percentages. Next two columns show the final results

in percentage. False positive means that the subject is awake but system detects it as asleep

43

Page 53: CALIFORNIA STATE UNIVERSITY, NORTHRIDGE ECG AND …penguin.ewu.edu/cscd506/Theses/Gupta-Nipun-thesis-2014.pdf · 2018-02-10 · Nipun Gupta May 2014. The thesis of Nipun Gupta is

and thus activates the alarm. False negative means that the subject is asleep but the system

detects it as awake and no alarm is activated. These results can be used to determine true

positive and true negative as well. True positive means that the subject is asleep and the

system detects it and alarm is activated. True negative means the subject is awake and

system detects it and no alarm is activated. True positive and false negative does not apply

to the driver database, hence marked “n/a” for not applicable in the respective cells.

5.3.1 Results of HR Algorithms

This section shows the results of the HR algorithms. The results are shown in the

tables 5.1, 5.2and 5.3 for first, second and third algorithms respectively.

In table 5.1, it can be seen that as the threshold percentage is reduced from 95% to 85%,

the number of false negatives increase while the number of false positives decrease. Re-

laxing the threshold percentage increases the number of points passing the awake criteria.

Therefore, the rise in the false negative and fall in the false positive is seen. The same trend

is seen in the table 5.2 and the results for the false negatives improve tremendously as the

second algorithm is based on sleep data. In table 5.3, the results show that the third HR

algorithm performs well in the case of false positives.

5.3.2 Results of LF-HF Algorithms

This section shows the results of LF-HF algorithms. The results are shown in the ta-

bles 5.5 - 5.10. The results are placed in two set of tables: First set contains the results

of thirty seconds interval LF-HF samples and second two minutes interval LF-HF samples.

The table structure for first two LF-HF algorithms is same as of HR algorithms. However

44

Page 54: CALIFORNIA STATE UNIVERSITY, NORTHRIDGE ECG AND …penguin.ewu.edu/cscd506/Theses/Gupta-Nipun-thesis-2014.pdf · 2018-02-10 · Nipun Gupta May 2014. The thesis of Nipun Gupta is

Dataset Awake Data Sleep Data Average Threshold False +ve False -vePoints Points Percentage (%) % %

95 51 3n1 451 4619 85 90 30 34

85 3 9895 31 39

n3 284 1205 72 90 9 7085 1 9595 58 43

n4 6076 1854 87 90 52 5285 45 5995 38 37

n7 1152 2221 71 90 22 6885 9 8595 51 44

n8 2534 3465 73 90 33 7185 2 9995 46 1

n9 829 3153 62 90 17 1285 4 5495 39 49

n10 2621 1608 84 90 15 7785 3 9695 53 15

n11 754 4760 79 90 44 4185 31 7495 39 33

n13 614 785 68 90 26 4885 21 6295 38 5

n14 310 3422 78 90 5 6385 0 10095 64 3

n15 1020 1521 79 90 55 785 43 1995 35 10

narco2 1631 1433 73 90 14 2585 1 5995 57 1

narco4 1322 2997 84 90 46 185 27 395 49 4

narco5 669 3153 86 90 43 685 39 1695 26 n/a

drive 5156 0 62 90 10 n/a85 2 n/a

Table 5.1: Data analysis results with first HR algorithm.

45

Page 55: CALIFORNIA STATE UNIVERSITY, NORTHRIDGE ECG AND …penguin.ewu.edu/cscd506/Theses/Gupta-Nipun-thesis-2014.pdf · 2018-02-10 · Nipun Gupta May 2014. The thesis of Nipun Gupta is

Dataset Awake Data Sleep Data Average Threshold False +ve False -vePoints Points Percentage (%) % %

95 80 1n1 451 4619 91 90 57 2

85 30 3495 100 1

n3 284 1205 148 90 100 185 100 195 98 1

n4 6076 1854 238 90 97 185 97 195 55 6

n7 1152 2221 74 90 38 3785 17 7595 66 18

n8 2534 3465 78 90 54 4185 33 7195 36 2

n9 829 3153 61 90 10 2285 2 7095 83 3

n10 2621 1608 97 90 72 1085 52 3695 97 1

n11 754 4760 136 90 96 185 96 195 79 4

n13 614 785 78 90 59 1485 42 2995 94 1

n14 310 3422 96 90 86 185 79 195 80 1

n15 1020 1521 87 90 71 285 62 395 74 2

narco2 1631 1433 79 90 52 585 20 1995 43 2

narco4 1322 2997 79 90 27 385 12 2895 53 2

narco5 669 3153 90 90 48 485 43 6

Table 5.2: Data analysis results with second HR algorithm.

46

Page 56: CALIFORNIA STATE UNIVERSITY, NORTHRIDGE ECG AND …penguin.ewu.edu/cscd506/Theses/Gupta-Nipun-thesis-2014.pdf · 2018-02-10 · Nipun Gupta May 2014. The thesis of Nipun Gupta is

Dataset Awake Data Sleep Data Average Threshold False +ve False -vePoints Points Percentage (%) % %

95 21 83n1 451 4619 92 90 15 84

85 8 8695 30 67

n3 284 1205 76 90 10 8085 0 9395 34 65

n4 6076 1854 107 90 31 6885 29 7195 22 65

n7 1152 2221 75 90 17 7285 6 9095 9 94

n8 2534 3465 75 90 7 9885 0 10095 16 62

n9 829 3153 62 90 3 6485 0 9095 18 78

n10 2621 1608 85 90 6 9285 0 10095 25 65

n11 754 4760 79 90 21 7685 14 9195 13 73

n13 614 785 68 90 3 8485 1 9695 5 81

n14 310 3422 77 90 0 10085 0 10095 22 67

n15 1020 1521 76 90 16 6885 13 7495 39 55

narco2 1631 1433 81 90 32 5585 16 5795 0 100

narco4 1322 2997 66 90 0 10085 0 10095 9 68

narco5 669 3153 77 90 7 8885 5 9895 13 n/a

drive 5156 0 62 90 3 n/a85 0 n/a

Table 5.3: Data analysis results with third HR algorithm.

47

Page 57: CALIFORNIA STATE UNIVERSITY, NORTHRIDGE ECG AND …penguin.ewu.edu/cscd506/Theses/Gupta-Nipun-thesis-2014.pdf · 2018-02-10 · Nipun Gupta May 2014. The thesis of Nipun Gupta is

for the third algorithm, instead of just threshold percentage, another percentage value was

determined by analyzing the change between last awake ratio and first sleep ratio. Various

combinations of these percentage values were used for the analysis. These combinations

are listed and described in the table 5.4.

Case ID Case descriptionCase A MIN 40% CHANGE FROM PREVIOUS VALUECase B MIN 40% CHANGE FROM PREVIOUS VALUE + 95% WAKE AVG LF/HF RATIOCase C MIN 50% CHANGE FROM PREVIOUS VALUE + 95% WAKE AVG LF/HF RATIOCase D MIN 40% CHANGE FROM PREVIOUS VALUE + 85% WAKE AVG LF/HF RATIO

Table 5.4: Case descriptions used in LF-HF result tables.

The results from the algorithms 4 and 5 are similar to the algorithms 1 and 2 respec-

tively. But the change in the values of false negative and false positive is not prominent.

Third LF-HF algorithm performs better in the case of false positives as shown in tables 5.7

and 5.10. Sufficient data is not available for 2 minute LF/HF ratio analysis and hence the

results are not satisfactory compared to 30 sec LF/HF ratio analysis. Results may improve

with the use of larger datasets.

5.4 Algorithm comparison

The analysis of various datasets from previous section clearly illustrates that the de-

crease in the threshold percentage negatively impacts false negative and favors false posi-

tive in algorithms 1 through 5. Since the goal of the algorithm is to minimize false nega-

tives, a higher threshold percentage i.e. 95% is suitable. Also, from the results and analysis

of data from LF-HF algorithm, it is evident that 30 seconds interval LF-HF results are

overall better than 2 minutes interval LF-HF results. Another benefit of this result is that 30

seconds interval is favorable for systems such as drowsiness detection so that the driver can

48

Page 58: CALIFORNIA STATE UNIVERSITY, NORTHRIDGE ECG AND …penguin.ewu.edu/cscd506/Theses/Gupta-Nipun-thesis-2014.pdf · 2018-02-10 · Nipun Gupta May 2014. The thesis of Nipun Gupta is

Dataset Awake Data Sleep Data Average Threshold False +ve False -vePoints Points Percentage (%) % %

95 60 43n1 10 117 1 90 60 45

85 60 4795 50 53

n3 8 34 2 90 50 5685 50 5995 67 53

n4 150 40 2 90 66 5385 63 5395 65 4

n7 32 66 3 90 53 585 53 895 81 9

n8 70 95 6 90 78 1085 74 1195 61 3

n9 26 114 3 90 61 485 61 595 70 19

n10 62 38 7 90 70 1985 70 2295 70 23

n11 20 129 2 90 65 2585 65 2895 77 8

n13 18 25 1 90 77 885 77 895 37 3

n14 8 92 1 90 37 385 37 495 60 43

n15 28 47 1 90 57 4585 57 4795 61 12

narco2 44 43 2 90 59 1285 56 1795 78 4

narco4 32 87 5 90 78 485 71 595 68 23

narco5 16 88 5 90 68 2485 68 2795 62 n/a

drive 5156 0 4.5 90 61 n/a85 59 n/a

Table 5.5: 30 second data analysis results with first LF-HF algorithm.

49

Page 59: CALIFORNIA STATE UNIVERSITY, NORTHRIDGE ECG AND …penguin.ewu.edu/cscd506/Theses/Gupta-Nipun-thesis-2014.pdf · 2018-02-10 · Nipun Gupta May 2014. The thesis of Nipun Gupta is

Dataset Awake Data Sleep Data Average Threshold False +ve False -vePoints Points Percentage (%) % %

95 100 2n1 10 117 5 90 100 2

85 100 295 100 18

n3 8 34 5 90 100 1885 87 1895 100 8

n4 150 40 14 90 100 885 100 895 53 8

n7 32 66 2 90 50 885 46 1095 84 7

n8 70 95 7 90 84 885 84 895 61 6

n9 26 114 2 90 61 685 61 695 72 14

n10 62 38 7 90 70 1985 70 1995 90 4

n11 20 129 6 90 90 585 90 595 61 20

n13 18 25 0 90 61 2085 61 2095 37 5

n14 8 92 1 90 37 585 37 595 92 11

n15 28 47 3 90 92 1385 92 1395 59 12

narco2 44 43 2 90 56 1285 56 1995 78 3

narco4 32 87 6 90 78 385 78 395 81 3

narco5 16 88 11 90 81 385 81 3

Table 5.6: 30 second data analysis results with second LF-HF algorithm.

50

Page 60: CALIFORNIA STATE UNIVERSITY, NORTHRIDGE ECG AND …penguin.ewu.edu/cscd506/Theses/Gupta-Nipun-thesis-2014.pdf · 2018-02-10 · Nipun Gupta May 2014. The thesis of Nipun Gupta is

Dataset Awake Data Sleep Data Average Case ID False +ve False -vePoints Points % %

Case A 30 80n1 10 117 1 Case B 30 85

Case C 20 89Case D 30 85Case A 25 71

n3 8 34 2 Case B 12 92Case C 0 95Case D 12 92Case A 23 88

n4 150 40 2 Case B 19 93Case C 14 93Case D 19 93Case A 21 60

n7 32 66 3 Case B 18 60Case C 12 70Case D 18 60Case A 21 80

n8 70 95 6 Case B 20 82Case C 11 85Case D 20 82Case A 34 64

n9 26 114 3 Case B 19 64Case C 7 72Case D 19 64Case A 17 61

n10 62 38 7 Case B 14 64Case C 12 74Case D 14 64Case A 25 70

n11 20 129 2 Case B 20 73Case C 20 77Case D 20 73Case A 33 76

n13 18 25 1 Case B 33 76Case C 33 84Case D 33 76Case A 25 67

n14 8 92 1 Case B 0 67Case C 0 74Case D 0 67Case A 25 69

n15 28 47 1 Case B 14 79Case C 3 86Case D 14 79Case A 31 70

narco2 44 43 2 Case B 25 70Case C 18 77Case D 25 70Case A 15 76

narco4 32 87 5 Case B 15 76Case C 9 83Case D 15 76Case A 6 71

narco5 16 88 5 Case B 6 74Case C 6 83Case D 6 74Case A 20 n/a

drive 5156 0 5 Case B 14 n/aCase C 10 n/aCase D 13 n/a

Table 5.7: 30 second data analysis results with third LF-HF algorithm.

51

Page 61: CALIFORNIA STATE UNIVERSITY, NORTHRIDGE ECG AND …penguin.ewu.edu/cscd506/Theses/Gupta-Nipun-thesis-2014.pdf · 2018-02-10 · Nipun Gupta May 2014. The thesis of Nipun Gupta is

Dataset Awake Data Sleep Data Average Threshold False +ve False -vePoints Points Percentage (%) % %

95 50 30n1 2 30 1 90 50 37

85 50 4795 50 100

n3 2 8 1 90 0 10085 0 10095 59 59

n4 37 12 1 90 54 7585 48 8495 50 24

n7 8 17 2 90 50 2485 50 2495 82 16

n8 17 25 3 90 82 1685 76 2095 50 0

n9 6 30 2 90 50 085 50 095 66 80

n10 15 10 3 90 53 8085 33 8095 60 46

n11 5 33 1 90 60 4985 60 5295 75 29

n13 4 7 0 90 50 2985 50 2995 50 0

n14 2 23 1 90 50 085 50 095 57 75

n15 7 12 1 90 42 7585 42 7595 54 10

narco2 11 11 2 90 54 1985 54 2895 62 23

narco4 8 22 2 90 62 2385 62 2395 25 91

narco5 4 22 1 90 25 9185 0 9695 63 n/a

drive 5156 0 3 90 61 n/a85 61 n/a

Table 5.8: 2 minute data analysis results with first LF-HF algorithm.

52

Page 62: CALIFORNIA STATE UNIVERSITY, NORTHRIDGE ECG AND …penguin.ewu.edu/cscd506/Theses/Gupta-Nipun-thesis-2014.pdf · 2018-02-10 · Nipun Gupta May 2014. The thesis of Nipun Gupta is

Dataset Awake Data Sleep Data Average Threshold False +ve False -vePoints Points Percentage (%) % %

95 100 10n1 2 30 1 90 100 10

85 100 1095 100 50

n3 2 8 2 90 100 5085 100 5095 94 34

n4 37 12 3 90 91 3485 91 3495 50 24

n7 8 17 2 90 50 3085 50 3695 76 20

n8 17 25 2 90 76 2085 70 2095 33 20

n9 6 30 1 90 33 2085 33 2795 80 60

n10 15 10 4 90 80 6085 66 7095 80 10

n11 5 33 2 90 80 1385 80 1395 100 29

n13 4 7 1 90 100 2985 100 2995 0 18

n14 2 23 0 90 0 1885 0 1895 85 34

n15 7 12 1 90 85 5085 85 5995 36 46

narco2 11 11 1 90 27 4685 27 5595 75 14

narco4 8 22 3 90 75 1485 75 1495 100 23

narco5 4 22 5 90 100 2385 100 23

Table 5.9: 2 minute data analysis results with second LF-HF algorithm.

53

Page 63: CALIFORNIA STATE UNIVERSITY, NORTHRIDGE ECG AND …penguin.ewu.edu/cscd506/Theses/Gupta-Nipun-thesis-2014.pdf · 2018-02-10 · Nipun Gupta May 2014. The thesis of Nipun Gupta is

Dataset Awake Data Sleep Data Average Case ID False +ve False -vePoints Points % %

Case A 0 60n1 2 30 1 Case B 0 64

Case C 0 70Case D 0 64Case A 0 75

n3 2 8 1 Case B 0 100Case C 0 100Case D 0 100Case A 43 59

n4 37 12 1 Case B 32 67Case C 18 92Case D 32 67Case A 12 53

n7 8 17 2 Case B 0 59Case C 0 59Case D 0 59Case A 23 72

n8 17 25 3 Case B 23 76Case C 17 84Case D 23 76Case A 33 54

n9 6 30 2 Case B 33 54Case C 16 64Case D 33 54Case A 66 70

n10 15 10 3 Case B 60 90Case C 33 100Case D 60 90Case A 40 64

n11 5 33 1 Case B 40 79Case C 20 85Case D 40 79Case A 25 58

n13 4 7 0 Case B 25 58Case C 0 58Case D 25 58Case A 0 83

n14 2 23 1 Case B 0 83Case C 0 83Case D 0 83Case A 0 50

n15 7 12 1 Case B 0 84Case C 0 92Case D 0 84Case A 36 37

narco2 11 11 2 Case B 36 37Case C 27 46Case D 36 37Case A 12 69

narco4 8 22 2 Case B 12 73Case C 12 78Case D 12 73Case A 50 60

narco5 4 22 1 Case B 25 100Case C 0 100Case D 25 100Case A 15 n/a

drive 5156 0 5 Case B 13 n/aCase C 15 n/aCase D 20 n/a

Table 5.10: 2 minute data analysis results with third LF-HF algorithm.

54

Page 64: CALIFORNIA STATE UNIVERSITY, NORTHRIDGE ECG AND …penguin.ewu.edu/cscd506/Theses/Gupta-Nipun-thesis-2014.pdf · 2018-02-10 · Nipun Gupta May 2014. The thesis of Nipun Gupta is

be alerted sooner than later. The HR algorithms show better results than LF-HF algorithms.

In addition, HR algorithm is much quicker since it uses only 6 RR intervals, usually adds

up to less than 10 seconds, which is another positive point for HR algorithm. Each HR

algorithm shows slightly different results which can be very useful. First algorithm can

be considered neutral i.e. shows balanced false positives and false negatives. The second

algorithm favors false negative while third favors false positives. This information can be

used to create a hybrid algorithm using second and third algorithms. This hybrid algorithm

may potentially improve results by minimizing both false positive and false negative.

55

Page 65: CALIFORNIA STATE UNIVERSITY, NORTHRIDGE ECG AND …penguin.ewu.edu/cscd506/Theses/Gupta-Nipun-thesis-2014.pdf · 2018-02-10 · Nipun Gupta May 2014. The thesis of Nipun Gupta is

Chapter 6

CONCLUSION

This thesis examines the challenges of using Electrocardiogram (ECG) signals in wearable

computing systems, specifically in addressing drowsiness detection while driving. The

wearable system incorporating an ECG monitor and a mobile app for carrying out the data

analysis and computation is described. The systems interface design is also presented,

along with the approach to alert drowsy drivers. The ECG signal is obtained from off-

the-shelf wearable ECG monitor. The ECG data is then analyzed using the MATLAB to

determine the level of noise which came out to be minimal during various levels of physical

activity.

Various algorithms are developed to detect the drowsiness of the driver using physio-

logical data. Heart Rate (HR) algorithms are based on the change in the heart rate and are

fast in response. LF-HF algorithms are based on the LF/HF ratio which is calculated using

the HRV tool and require the data to be collected for some time to get the values for LF

and HF. The efficiencies of the algorithms are compared for various stages such as driving,

awake and sleep from real and annotated ECG data available at PhysioBank archives. Re-

sults shows that the heart rate and LF/HF ratio fall when a person transitions to sleep. It

has been illustrated that both heart rate and LF/HF ratio can be used to detect drowsiness.

The HR algorithms show better results than the LF-HF algorithms. Sufficient data is

not available for 2 minute LF/HF ratio analysis and hence the results are not satisfactory

56

Page 66: CALIFORNIA STATE UNIVERSITY, NORTHRIDGE ECG AND …penguin.ewu.edu/cscd506/Theses/Gupta-Nipun-thesis-2014.pdf · 2018-02-10 · Nipun Gupta May 2014. The thesis of Nipun Gupta is

compared to 30 sec LF/HF ratio analysis. Results may improve with the use of larger

datasets.

The second algorithm favors false negative while third favors false positives. This in-

formation can be used to create a hybrid algorithm using second and third algorithms. This

hybrid algorithm may potentially improve results by minimizing both false positive and

false negative. Overall results of this study are encouraging. In future, more sophisticated

and complex algorithms based on multiple correlated parameters can be made for detecting

the drowsiness.

57

Page 67: CALIFORNIA STATE UNIVERSITY, NORTHRIDGE ECG AND …penguin.ewu.edu/cscd506/Theses/Gupta-Nipun-thesis-2014.pdf · 2018-02-10 · Nipun Gupta May 2014. The thesis of Nipun Gupta is

References

[1] National Highway Traffic Safety Administration(NHTSA): Drowsy driving and au-tomobile crashes, http://www.nhtsa.gov/people/injury/drowsy driving1/Drowsy.html,April 2014.

[2] PhysioBank Data, http://www.physionet.org/cgi-bin/atm/ATM, April 2014.

[3] Kubios HRV - Heart Rate Variability Analysis Software, Biosignal Analysis and Med-ical Imaging Group, University of Eastern Finland, http://kubios.uef.fi/, March 2014.

[4] G. D. Clifford, F. Azuaje, and P. E. McSharry, “Advanced Methods and Tools for ECGData Analysis”, Artech House, Norwood, MA, USA(2006).

[5] European Society of Cardiology and the North American Society of Pacing and Elec-trophysiology, “Heart Rate Variability: Standards of measurement, physiological in-terpretation, and clinical use”, European Heart Journal, 19, 354-381(1996).

[6] 0. Pahlm, L. Sornmo, “Software QRS detection in ambulatory monitoring - A review”,Med. Biol. Eng.Comput., 22, 289-297(1984).

[7] J. Pan, W. J. Tompkins, “A Real-Time QRS Detection Algorithm”, IEEE Transactionson Biomedical Eng, 32(3), 230-236(1985).

[8] LabVIEW for ECG Signal Processing, http://www.ni.com/white-paper/6349/en/,April 2014.

[9] Lina Zhang and Xinhua Jiang, “Acquisition and Analysis System of the ECG SignalBased on LabVIEW”,The Ninth International Conference on Electronic Measurement& Instruments, 4, 557-539(2009).

[10] A. L. Goldberger,et.al, “PhysioBank, PhysioToolkit, and PhysioNet: Components ofa New Research Resource for Complex Physiologic Signals”, Circulation, 101, e215-e220(2000).

[11] J.Lee, K.J. Lee and S.K. Yoo, “Development of a new Signal Processing Algorithmbased on Independent Component Analysis for Single Channel ECG Data”, Pro-ceedings of the 26th Annual International Conference of the IEEE EMBS, 1, 224-226(2004).

[12] Li Nianqiang, Wang Yongbing and Zhao Guoyi, “Preferable Method on Digital Fil-ter in ECG Signals Processing Based on FPGA”, Third International Symposium onIntelligent Information Technology and Security Informatics, 184-187(2010).

58

Page 68: CALIFORNIA STATE UNIVERSITY, NORTHRIDGE ECG AND …penguin.ewu.edu/cscd506/Theses/Gupta-Nipun-thesis-2014.pdf · 2018-02-10 · Nipun Gupta May 2014. The thesis of Nipun Gupta is

[13] Dilpreet Buxi, Torfinn Berset, Martijn Hijdra, Marc Tutelaers, Di Geng, Jos Hulzink,Michel van Noorloos, Inaki Romero, Tom Torfs, Nick van Helleputte, “Wireless 3-lead ECG System with on-board Digital Signal Processing for Ambulatory Monitor-ing”, Proceeding of the IEEE International Conference on Biomedical Circuits andSystems, 308-312(2012).

[14] D. Balasubramaniam and D. Nedumaran, “Implementation of ECG Signal Processingand Analysis Techniques in Digital Signal Processor based System”, Proceeding ofthe IEEE International Workshop on Medical Measurements and Applications, 60-63(2009).

[15] T.K. Kho,et.al, “Bluetooth-enabled ECG Monitoring System”, TENCON 2005 IEEERegion 10, 1-5(2005).

[16] Bin Yu, Lisheng Xu, Yongxu Li, “Bluetooth Low Energy (BLE) based mobile elec-trocardiogram monitoring system”, Proceeding of the IEEE International Conferenceon Information and Automation, 763-767(2012).

[17] Zephyr, http://www.zephyranywhere.com and http://www.zephyr-technology.com,April 2014.

[18] Zephyr BioHarness BT UserGuide, http://www.zephyranywhere.com/media/pdf/BH UG P-BioHarnessBTUserGuide 20130121 V03.pdf, April 2014.

[19] Zephyr BioHarness BT DataSheet, http://www.kwic.nl/healthcare/files/BioHarnessBT Data Sheet 2011-03-08.pdf, April 2014.

[20] J. A. Johnstone, et. al., “Bioharness multivariable monitoring device. Part I: Validity”,Journal of Sports Science and Medicine, 11, 400-408(2012).

[21] Zephyr Manuals and papers, http://www.zephyranywhere.com/support/downloads,April 2014.

[22] Android App Development, http://developer.android.com/guide/index.html, April2014.

[23] Android Software Development Kit, http://developer.android.com/tools/help/index.html,April 2014.

[24] X. Yu, “Real-time Nonintrusive Detection of Driver Drowsiness”,http://conservancy.umn.edu/bitstream/97650/1/CTS 2009-15.pdf, March 2014.

[25] L. Toscani, et.al, “Human heart rate variability and sleep stages”, The Italian Journalof Neurological Sciences, 17, 437-439(1996).

[26] H. S. Shin, et. al, “Real Time Car Drivers Condition Monitoring System”, Proceed-ings of IEEE Sensors Conference, 951.954(2010).

[27] S. Elsenbruch, M. Harnish, and W. C. Orr, “Heart rate variability during waking andsleep in healthy males and females”, Sleep, 22, 1067-1071(1999).

59

Page 69: CALIFORNIA STATE UNIVERSITY, NORTHRIDGE ECG AND …penguin.ewu.edu/cscd506/Theses/Gupta-Nipun-thesis-2014.pdf · 2018-02-10 · Nipun Gupta May 2014. The thesis of Nipun Gupta is

[28] M. Patel, S. K. L. Lal, D. Kavanagh, P. Rossiter, “Applying neural network analysison heart rate variability data to assess driver drowsiness”, Exp. Syst. Appl., 38, 7235-7242(2011).

[29] M. Mahachandra, Yassierli; I.Z. Sutalaksana, K. Suryadi, “Sensitivity of Heart RateVariability as Indicator of Driver Sleepiness”, Proceedings of the 2nd InternationalConference of the South East Asian Network of Ergonomics Societies, 1-6(2012).

[30] H. J. Eoh, M. K. Chung, and S. H. Kim, “Electroencephalographic study of drowsi-ness in simulated driven with sleep deprivation”, International Journal of IndustrialErgonomics,35,307-320(2005).

[31] Wu Qing, Sun BingXi, Xie Bin, Zhao Junjie, “A PERCLOS-Based Driver FatigueRecognition Application for Smart Vehicle Space”, Proceedings of Third Interna-tional Symposium on Information Processing, 437-441(2010).

[32] Sunghoon Ivan Lee, Charles Ling, Ani Nahapetian, Majid Sarrafzadeh. A Frameworkfor Data Quality Estimation of On-Body Cardiac Sensor Networks. IEEE ConsumerCommunications and Networking Conference (CCNC), January 2012.

[33] Myung-kyung Suh, Chien-An Chen, Jonathan Woodbridge, Michael Kai Tu, JungIn Kim, Ani Nahapetian, Lorraine S. Evangelista, Majid Sarrafzadeh. A Remote Pa-tient Monitoring System for Congestive Heart Failure. Springer Journal of MedicalSystems (JOMS), Vol 35, No. 5, pp. 1165-1179, June 2011.

[34] Myung-kyung Suh, Lorraine S. Evangelista, Chien-An Chen, Kyungsik Han, JinhaKang, Michael Kai Tu, Victor Chen, Ani Nahapetian, Majid Sarrafzadeh. An Au-tomated Vital Sign Monitoring System for Congestive Heart Failure Patients. ACMInternational Health Informatics Symposium (IHI), November 2010.

[35] Myung-kyung Suh, Lorraine S. Evangelista, Victor Chen, Wen-Sao Hong, JamieMacbeth, Ani Nahapetian, Florence-Joy Figueras, Majid Sarrafzadeh. WANDA B.:Weight and Activity with Blood Pressure Monitoring System for Heart Failure Pa-tients. IEEE Workshop on Interdisciplinary Research on E-Health Services and Sys-tems (IREHSS) held in conjunction with WoWMoM 2010, June 2010.

[36] Jonathan Woodbridge, Ani Nahapetian, Hyduke Noshadi, William Kaiser, Majid Sar-rafzadeh. Wireless Health and the Smart Phone Conundrum. HCMDSS/MDPnP, Heldin conjunction with IPSN, April 2009.

[37] Sunghoon Ivan Lee, Jonathan Woodbridge, Ani Nahapetian, Majid Sarrafzadeh.MARHS: Mobility Assessment System with Remote Healthcare Functionality forMovement Disorders. ACM SIGHIT International Health Informatics Symposium(IHI), January 2012. pdf

[38] Armen Babakanian, Ani Nahapetian. Data Fusion for Movement Visualization in aRemote Health Monitoring System. IEEE International Conference on Mobile Com-puting, Applications, and Services (MobiCASE), October 2011.

60

Page 70: CALIFORNIA STATE UNIVERSITY, NORTHRIDGE ECG AND …penguin.ewu.edu/cscd506/Theses/Gupta-Nipun-thesis-2014.pdf · 2018-02-10 · Nipun Gupta May 2014. The thesis of Nipun Gupta is

[39] Myung-kyung Suh, KyuJoong Lee, Alfred Heu, Ani Nahapetian, Majid Sarrafzadeh.Bayesian Networks-Based Interval Training Guidance System for Cancer Rehabili-tation. Conference on Mobile Computing, Applications, and Services (MobiCASE),October 2009.

[40] Mars Lan, Ani Nahapetian, Alireza Vahdatpour, Lawrence Au, William Kaiser, MajidSarrafzadeh. SmartFall: An Automatic Fall Detection System Based on SubsequenceMatching for the SmartCane. International Conference on Body Area Networks (Bo-dyNets), April 2009.

[41] R. T. Pivik, K. Busby,“ Heart rate associated with sleep onset in preadolescents”,Journal of Sleep Research, 5(1) 3336(1996).

[42] Moukabary, “Willem Einthoven (1860-1927): Father of electrocardiography”, T.Cardiology Journal 14, No. 3, 316-317(2007)

[43] J. Malmivuo and R. Plonsey, “ Bioelectromagnetism: Principles and Applications ofBioelectric and Biomagnetic Fields”, Oxford University Press (Web Edition), 1995.

[44] A.L. Goldberger, “ Clinical electrocardiography: a simplified approach”, Mosby El-sevier 2006.

[45] D. Dubin, “Rapid Interpretation of EKGs, Sixth Edition”, Cover Publishing Com-pany, October 2000.

[46] Heart Rate, http://en.wikipedia.org/wiki/Heart rate, April 2014.

[47] G. Hansson, et.al., “Validity and reliability of triaxial accelerometers for inclinometryin posture analysis”, S. Medical and Biological Engineering and Computing, 39(4),405-413 (2001).

[48] J. VAN DEN BERG, “Sleepiness and Head Movements”, Industrial Health, 44,564576 (2006).

[49] Ki Chang Nam, Min Kyung Kwon and Deok Won Kim, “Effects of Posture and AcuteSleep Deprivatio on Heart Rate Variability”, Yonsei Med Journal, 52(4), 569-573(2011).

[50] Skin Temperature, http://en.wikipedia.org/wiki/Human body temperature, April2014.

[51] A. C. Czeisler et. al., “Timing of rem sleep is coupled to the circadian rhythm of bodytemperature in man”, Sleep, 2(3), 329346 (1980).

[52] K. Krauchi, C. Cajochen, and A. Wirz-Justice, “Waking up properly: is there a role ofthermoregulation in sleep inertia?”, Journal of Sleep Research, 13(2), 121127 (2004).

[53] Breathing Rate, http://en.wikipedia.org/wiki/Respiratory rate, April 2014.

61

Page 71: CALIFORNIA STATE UNIVERSITY, NORTHRIDGE ECG AND …penguin.ewu.edu/cscd506/Theses/Gupta-Nipun-thesis-2014.pdf · 2018-02-10 · Nipun Gupta May 2014. The thesis of Nipun Gupta is

[54] J. Trinder,et.al, “Correlation between ventilation and eeg-defined arousal during sleeponset in young subjects”, Journal of Applied Physiology, 83(6) 20052011 (1997).

[55] H. De Rosario, J.S. Solaz, N. Rodriguez L.M. Bergasa, “Controlled inducement andmeasurement of drowsiness in a driving simulator”, IET Intell. Transp. Syst., 4(4),280288(2010).

[56] HRV, http://en.wikipedia.org/wiki/Heart rate variability, April 2014.

[57] “Task force of the European society of cardiology and the North American society ofpacing and electrophysiology. Heart rate variability standards of measurement, phys-iological interpretation,and clinical use”, Circulation, 93(5):1043-1065, March 1996.

[58] Kubios HRV 2.1 user guide, http://kubios.uef.fi/media/Kubios HRV 2.1 Users Guide.pdf,March 2014.

[59] MG Terzano, L Parrino, A Sherieri, R Chervin, S Chokroverty, C Guilleminault, MHirshkowitz, M Mahowald, H Moldofsky, A Rosa, R Thomas, A Walters. Atlas, rules,and recording techniques for the scoring of cyclic alternating pattern (CAP) in humansleep. Sleep Med 2001 Nov; 2(6):537-553.

[60] Healey JA. Wearable and automotive systems for affect recognition from physiology.MIT Dept. of Electrical Engineering and Computer Science, Ph.D. thesis, 2000.

[61] National Institute of Neurological Disorders and Stroke. (2007, May 21).Brain basics: Understanding sleep. Retrieved November 25, 2013, fromhttp://www.ninds.nih.gov/disorders/brain basics/understanding sleep.htm.

62