You are on page 1of 57

Design and Development of a Physiological Stress Monitoring/Alert System

Using a Wristband

By

Ritesh Varma Pathapati Thyagaraju


Bachelor of Engineering in Biomedical Engineering
Bapuji Institute of Technology

A thesis submitted to the College of Engineering at


Florida Institute of Technology
In partial fulfillment of the requirements
For the degree of

Master of Science
In
Biomedical Engineering

Melbourne, Florida
December, 2016
© Copyright 2016 Ritesh Varma Pathapati Thyagaraju

All Rights Reserved

The author grants permission to make single copies

___________________________________________
We the undersigned committee hereby approve the attached thesis,

“Design and Development of a Physiological Stress Monitoring/Alert System


Using a Wristband”

By

Ritesh Varma Pathapati Thyagaraju

_________________________________________________
Dr. Mehmet Kaya
Professor, Biomedical Engineering
Major Advisor

_________________________________________________
Dr. Meredith Carroll
Assistant Professor, Aviation Human Factors
Committee Member

_________________________________________________
Dr. Lucas Stephane
Assistant Professor, Human-Center Design
Committee Member

_________________________________________________
Dr. Ted Conway, Ph.D.
Department Head, Biomedical Engineering
Abstract

Title:

Design and Development of a Physiological Stress Monitoring/Alert System Using a


Wristband

Author:
Ritesh Varma Pathapati Thyagaraju

Principal Advisor:
Dr. Mehmet Kaya

The design and development of wearable physiological systems for stress

monitoring have gathered a lot of attention during the past few years. These systems

have undergone much-needed development to tackle long-term effects such as a

headache, depression, insomnia, high blood pressure, confusion, inability to make

correct choices, etc. Accurately measuring physiological signals that are helpful to

detect stress in its early stages using wearable technology have long been a goal in

the healthcare industry. Current commercial products such as Fitbit and Empatica

only monitor either the heart rate (Fitbit) or electrodermal activity in real time

(Empatica) but these devices have limited features in alerting the user to situations

such as abnormalities in stress levels through the device itself and need some special

iii
software which has to stay connected always in order to get this information. In

addition, they are quite costly ranging from $250 up to $1690.

Previously, studies based on stress detection were confined to a closed

environment limited to laboratories in which the patient was more often rested in a

sedentary position during treatment or evaluation. When it comes to real-time

periodic stress monitoring such systems fail by a huge margin. Hence a design has

been proposed to provide better methods to monitor PPG (Photoplethysmography)

and HR in real time with a user alert system to enrich user experience in tackling

abnormality in the recorded signals and during stress encounters on a daily basis. The

preliminary results from the data recorded after evaluating a user under stress when

compared side by side to those of a same user experiencing no stress showed

noticeable changes in Heart Rate Variability (HRV) and Galvanic Skin Response

(GSR). This correlation can be used to prevent stress-related health problems that

will eventually improve the quality of life.

iv
Table of Contents
List of Figures ......................................................................................................... vi
Chapter 1: Introduction .........................................................................................1
1.1 Motivation .............................................................................................................. 1
1.2 Background ........................................................................................................... 3
1.3 Current Technology .............................................................................................. 5
1.4 PPG and Heart Rate Variability.......................................................................... 7
1.5 HRV frequency distribution .............................................................................. 10
1.6 Kubios Software for HRV Analysis ................................................................... 13
1.7 Galvanic Skin Response...................................................................................... 14
Chapter 2 Materials and Methods ........................................................................16
2.1 System Design ...................................................................................................... 16
2.2 Design ................................................................................................................... 18
2.2.1 Heart Rate Monitoring System .......................................................................... 18
2.2.2 Galvanic Skin Resposne System Design............................................................ 23
2.3 Algorithm ............................................................................................................. 27
2.3.1 Algorithm Overview .......................................................................................... 28
2.4 3D model for Proposed Future Design .............................................................. 30
2.5 Experimental Protocol ........................................................................................ 34
Chapter 3: Results and Discussion ......................................................................35
3.1 Subject 1 Recordings .......................................................................................... 35
3.2 Subject 2 Recordings .......................................................................................... 38
Chapter 4: Conclusions and Future Work .........................................................41
References ...............................................................................................................44

v
List of Figures

Figure 1 - Graphical l representation of PPG recording (source –


Homecaremag.com) ......................................................................................8
Figure 2 - Typical Waveform of PPG Signal ....................................................9
Figure 3 - Details in one cycle of PPG waveform .............................................9
Figure 4 - HRV Frequency distribution curve ...............................................12
Figure 5 - Application Overview ......................................................................16
Figure 6 – Hardware Architecture ...................................................................17
Figure 7 - Pulse Sensor Hardware (Source- www.pulsesensor.com).............19
Figure 8 - Pulse Sensor schematic.....................................................................22
Figure 9 - GSR Hardware (https://www.seeedstudio.com/Grove---GSR-
sensor-p-1614.html)............................................................................................24
Figure 10 - GSR Sensor (Ag/AgCl electrode plate) (Source -
ttps://www.seeedstudio.com) ............................................................................25
Figure 11 - Microduino Core (Source - https://www.microduino.cc/index-
mcookie ) ............................................................................................................25
Figure 12 - Galvanic skin response schematic ................................................26
Figure 13 – Flowchart ........................................................................................27
Figure 14 – Signal Acquisition System Board Dimensions ............................30
Figure 15 – Signal Acquisition Board Top Overlay 3D .................................30
Figure 16 - Signal Acquisition Board Bottom Overlay 3D .............................31
Figure 17 – Display Section 3D ........................................................................31
Figure 18 – Board Side View 3D ......................................................................32
Figure 19 - Board Top View 3D .......................................................................32
Figure 20 – Display board bottom view ..........................................................33
Figure 21 – Boards Stack View ........................................................................33
Figure 22 - Subject when at no stress frequency response calculated from
PPG ......................................................................................................................35
Figure 23 - Subject when at stress frequency response calculated from PPG
..............................................................................................................................35
Figure 24 - Normalization of the raw PPG waveform at no stress ...............36
Figure 25 - Normalization of the raw PPG waveform at stress ....................36
Figure 26 - GSR response when at stress and no stress .................................37
Figure 27 - Subject when at no stress frequency response calculated from
PPG ......................................................................................................................38
Figure 28 - Subject when at stress frequency response calculated from PPG
..............................................................................................................................38
Figure 29 - Normalization of the raw PPG waveform at no stress ...............39
Figure 30 - Normalization of the raw PPG waveform at stress ....................39
vi
Figure 31 - GSR response when at stress and no stress .................................40

vii
Acknowledgement

Successfully completing a Masters graduate degree in Biomedical

Engineering and authoring this thesis was indeed a great journey that would not have

been possible without the support of many individuals at Florida Institute of

Technology and also my family back in India who have been a never-ending source

of inspiration and motivation. I am using this opportunity to express my gratitude to

everyone who has supported me throughout this project.

First and foremost, I would like to thank God for having blessed me with the

gift of wonderful parents who were and still are supportive to this day of my life.

Sincere and heartfelt thanks to my advisor Dr. Mehmet Kaya, Assistant Professor of

Biomedical Engineering, Florida Institute of Technology. The door to Dr. Kaya’s

office was always open whenever I ran into trouble during my research. Without his

passionate participation and mentoring this project would not have been successful.

His expertise and insight to this project are second to none. Dr. Mehmet Kaya has

been very supportive and enthusiastic from the very inception of this project. I must

make a special mention about his patience while resolving crucial issues. Most

importantly Dr. Mehmet Kaya has been graciously kind and treated me like a friend,

which helped me in approaching him for guidance without any apprehension.

viii
Furthermore, I would also like to acknowledge with much appreciation the

crucial role of the staff in the Department of Biomedical Engineering at Florida Tech,

who gave me permission to use all required equipment and materials.

Special thanks to my dear friends for their constant motivation and love to

overcome obstacles throughout this fantastic journey.

Last but not the least I am very grateful to Dr. Ted Conway, Ph.D.

Department Head of Biomedical Engineering, for having given me the opportunity

to work on this project. I also express my sincere gratitude to the committee members

Dr. Lucas Stephane, Assistant Professor, Human-Center Design and Dr. Meredith

Carroll, Assistant Professor, Aviation Human Factors for their valuable inputs and

feedback that helped me sail through the development process and stay on track to

finish this project ahead of time.

ix
Chapter 1: Introduction

Chapter 1:
Introduction
1.1 Motivation

Recent studies have shown that over 25 percent of adults in the global population

use wearable technology as of the date (Trends in Wearable Technology &

Preventative Healthcare, 2016). The devices are either fitness trackers, smartwatches

or mobile applications. Studies have also shown that of the global population of

adults who use such devices, America is by far the largest consumer of wearable

technology with over 3 million devices having been sold till date. Europe comes in

second having 1.7 million consumers of wearable technology, followed by rest of the

world being 0.5 million (Svanberg, 2013). This gave the opportunity for several

companies to invest in developing more efficient systems wherein previously,

unattained data could be recorded for use in preventive health care strategies.

However, a large percent of the remaining population does not wish to use wearable

technology; reasons being either high cost of the device, the quality, unfriendly user

interface or lack of knowledge that such devices exist. The quality of data that was

recorded in the earlier versions of these devices leaves large room for further

development of these device at a lower cost, added efficiency and additional features

compared to the existing ones. Over the past few years, the number of companies

1
Chapter 1: Introduction

developing wearable technology has increased. These companies make extravagant

plans to release their product with a hope of becoming the next major providers in

the wearable healthcare industry (Stinson, 2013). The limitations noticed in most of

these companies are data scrutiny which has been difficult to help further research,

with this ideology in mind a design model has been proposed to develop a system to

record Photoplethysmogram (PPG), which is commonly found in most of the

wearable technology and in addition a GSR system has been implemented so as to

enable detection of stress. Stress can be regarded as one of the most common

healthcare problems; every individual is known to struggle with stress either at work

or within their private/social lives. Although stress is a major concern and is very

common, there is not a device that monitors for stress continuously and alerts the

user to take action; in that sense, the proposed system is unique. This proposed device

aims to measure levels of stress using both heart rate variability (HRV) and

electrodermal activity (EDA)/galvanic skin resistance (GSR). None of the wearable

devices detect stress using these two parameters. They only look into heart rate data,

not even online HRV analysis or online GSR analysis. The future prototypes will

also include a mobile app where the users will get instructions on how to relieve their

stress in a very short time (less than 30 seconds). The proposed system is built with

its primary focus on two areas: 1. Market and 2. For research. The required hardware

and software is made open source meaning that it can be obtained free of charge and

2
Chapter 1: Introduction

can also be further modified to suit one's needs without infringement of any

copyrights or rules. However, the modified device if intended to be sold as a

consumer product will have to abide by the laws and regulations put in place by the

government or FDA.

1.2 Background
Stress is defined as a physiological response to the mental and emotional state of

mind. If the body detects a response to one of these, it then activates “fight or flight”

response (Cannon W. B 1915).

In general, regulation of the physiological states is achieved by balancing the

activities within the sympathetic and parasympathetic nervous system; this brings the

system down from the excited state.

Stress can also be defined as a phenomenon that occurs when individuals are

unable to manage the demands or expectations placed on them (Bongers et al. 1993).

It occurs when the body fails to resist its capabilities to any situations. Research by

Backs et al. (1998) was focused on identifying the factors responsible for Heart Rate

(HR) based on the fact that its response may be due to a different pattern of the

Autonomic Nervous System (ANS) activity. Research has found that there is a higher

risk of cardiovascular diseases due to higher physical and mental stress in certain

groups of working people (Collins, S.M et al. 2005, Karasek 1979). These stress-

3
Chapter 1: Introduction

related issues may cause increased HR, excessive sweating and increase in blood

flow. Since the HR is dependent on multiple factors, they may have different

physiological consequences that impact HR, but most often mental workload alone

is not necessarily deemed responsible.

It is very unfortunate that a large number of people encounter various causes of

stress in their daily life. Chronic stress is one among the various causes of stress that

has high-risk factors as it affects both physical and mental health leading to anxiety

disorder and depression (Herbert J., 1997). Stress is normally difficult to manage

since it is not quantitative and difficult to characterize. Therefore, one approach to

measure stress is to interview the individual under stress and request the individual

to answer a simple questionnaire. Such an interview or session has to be conducted

by a certified physician or psychologist. Although this process might seem simple,

is actually not very efficient by itself since the individual may or may not be able to

recollect all the events that occurred to clearly trace the root cause of stress. Hence

continuous monitoring of various physiological markers is essential for stress

monitoring. Features such as Galvanic Skin Response (GSR), different patterns in

Heart Rate (HR), Blood Pressure (BP) and irregular breathing patterns, can be

utilized. With these parameters, one can closely monitor vital signs of their body and

correlate their health problems associated with stress and several other health issues

(Lunberg Ulf, et al., 1994).

4
Chapter 1: Introduction

Continuous monitoring of individual vital signs for detecting stress every day in

real time is a complex task as the predictability percentage of error is quite large

compared to other quantifiable signs. The physiological changes can be related to

several factors and not just stress. Second, the signal artifacts are caused due to

physical body movement, purely based on electrode contact. Third, it is not easy to

achieve high accuracy in showing a user’s stress level as data analysis is based on

train set of pulses which includes user under stress and normal state. These

parameters increase the complexity level in developing software to detect actual

stress levels.

1.3 Current Technology

In the year 2016, companies producing wearable technology have continued to

remain at the pinnacle of the electronics consumer market. They market their

products with lucrative tag lines and colorful designs under variously categorized

options namely: home use, work, and exercise. Being able to use the device on a

daily basis without any interruption has redefined the general conception of data

analysis that is presented to the end-user of that product.

Some of the popular wearable technology devices are Jawbone UP3 (Up3 by

Jawbone 2016), FitBit Surge (FitBit Surge 2016) and FitBit Charge (FitBit Charge

2016). The common feature between these three designs is that all of these track HR

5
Chapter 1: Introduction

and all of them create logs which can be synced at the end of the day to smartphones

via Bluetooth to keep track of the current day’s activity. Each product uses state of

the art sensors built-in to track user activity. The price of each device varies between

100 to 300 US dollars.

Gymwatch (Gymwatch 2016) is another product available in the market to help

those who exercise regularly plan their exercise routine. It also allows the user to

upload activity reports to gym club applications to keep track of weekly activity logs.

Even smartphone companies are joining the ever so increasing competition of

wearable technology to integrate existing technology into their mobile devices. They

offer more user-friendly experiences in recording information obtained by activity

trackers that can be visualized on the go by the simple touch of a button. The

downside of these devices is that most of the data is pre-processed and displayed on

the mobile devices as real-time data. Currently, very few devices are available in the

market making use of Internet of things (IoT) to save data in the Cloud. This data is

not as much sufficient to continue to deliver into data trends just to improve user

experience, namely a user alert system for various conditions. The proposed design

is intended to tackle these problems and make more room for developers and

researchers to increase the bandwidth of used data to detect different patterns in

recorded vital signals in real-time and help improve the quality of life with alert

systems. Enabling IoT features is a huge advantage for the system regarding opening

6
Chapter 1: Introduction

new opportunities for treatment and monitoring in the long term for researchers. For

example, consider a class full of students wearing our stress monitor and a person in

charge of the class (instructor, professor) using a device enabled to observe the entire

class signals. By doing so, people in charge can evaluate their teaching techniques

by looking into each student stress level linked to content information delivered to

the student. Thus, our stress monitoring system can help instructors to improve their

teaching techniques, and at the same time could help students to focus better on the

learning content delivered.

1.4 PPG and Heart Rate Variability

PPG is a measurement of oxygen saturation in blood. The principle behind

recording the pulse is by using an ambient light sensor with a receiver and transmitter

at either end of a finger as shown in the figure-1 (Sinex J.E 1999).

The transmitter of the sensor comes in contact with the tissue. The transmitter

has an emitter configuration emitting either red or green light; a green LED is used

in locations where more penetration power is required. When light from the LED is

projected through the fingernail, the light passes through blood vessels and

capillaries and finally falls on the receiver side, which is placed exactly on the

opposite side of the transmitter. The receiver on the other end receives light intensity

slightly less than that of which was originally emitted. The intensity of the received

7
Chapter 1: Introduction

signal is dependent on the amount of blood oxygen present in blood vessels; the

received signal is recorded and analyzed to calculate the HR and blood oxygen

saturation level.

Figure 1 - Graphical l representation of PPG recording (source –

Homecaremag.com)

8
Chapter 1: Introduction

Figure 2 - Typical Waveform of PPG Signal

Figure 3 - Details in one cycle of PPG waveform

9
Chapter 1: Introduction

Heart Rate Variability (HRV) is calculated from the recorded signal, which is the

beat-to-beat analysis of variation between R-R (peak-peak) intervals in a consecutive

heartbeat. The heartbeat is modulated by the electrical impulses from the sinoatrial

(SA) node, which is controlled by both sympathetic and parasympathetic branches

of the autonomic nervous system (Sztajzel J., 2004).

The power spectrum of Heart Rate Variability (HRV) was introduced in 1981 by

Akselrod et al. where they discuss the fluctuations in frequency components within

each beat-to-beat pattern by using frequency domain analysis. The fluctuations in

HR are caused by variables such as the age of a person, body posture, physical

fitness, cardiac cycle and mental health (Lefebvre J.H. et al. 1993). Frequency

domain analysis gives the insight to understand R-R beat interval fluctuation that is

used in several medical applications to calculate stress and cardiac health status

(Seona H.M. et al. 2004, Kurths J. et al. 1995).

1.5 HRV Frequency Distribution

Frequency domain, also known as Power Spectral Density (PSD) provides

information on different bands of intensities and its relative intensity embedded in a

heart rate signal (Malik M et al. 1995, Ori Z et al. 1992). PSD can be performed

either by applying Fast Fourier Transform (FFT) (Pichon et al. 2006) or by

autoregressive model estimation (Pichon et al. 2006). An autoregressive model is


10
Chapter 1: Introduction

considered mostly for long-term data because it produces a continuous smooth

spectrum and it could be helpful for wearable devices, whereas FFT is used as a rapid

method of estimation.

The order of frequency spectrum in an R-R interval is divided as shown below

(Seong H.M. et al. 2004).

• Ultra-Low Frequency (ULF) – 0.0001HZ ≥ ULF < 0.003 Hz

• Very Low Frequency (VLF) – 0.003 Hz ≥ 0.04 Hz

• Low Frequency – 0.04 Hz ≥ LF < 0.15 Hz

• High Frequency – 0.15 ≥ HF < 0.4

ULF data is considered during long-term recording (greater than 10 minutes)

(Sztajzel, J. 2004).

The low-frequency band reflects the activity of sympathetic nervous system

and high-frequency band defines the activity of the parasympathetic nervous system.

LF/HF ratio represents the balance between sympathetic and parasympathetic

nervous system (McCraty R. et al. 1995).

11
Chapter 1: Introduction

Figure 4 - HRV Frequency distribution curve

The primary objective of the current design is to record the physiological signal

with greater feasibility to estimate HRV and to utilize these signals to assess

conditions such as stress from recorded data.

Sensors can either be implemented into clothing or wristbands to record

physiological signals in our daily life. Choosing the right way to implement sensors

for a specific application is an important concern in designing any equipment. For

example, a GSR sensor can be implemented on a car steering (Healey J.A 2005)

rather than having it attached to skin to assess emotional status while driving.

Likewise having a wrist sensor to detect HR makes more sense than having a chest
12
Chapter 1: Introduction

belt or sensors attached to fingers to record the signal for continuous monitoring.

When designing such systems, it is important to keep in mind that the device should

last long on a single charge and the design should allow for further processing by

providing an adequate amount of data.

1.6 Kubios Software for HRV Analysis


Kubios is an advanced HRV analysis software tool (Tarvainen, M.P. et al. 2014).

It supports several input data formats related to ECG. The software provides

packages for QRS detection, artifact correction, and trend removal. It mainly uses

time domain and frequency domain patterns for HRV analysis. In addition to all these

features, the software allows calculating several nonlinear parameters such as

Pointcare plot, recurrence plot analysis, trending and correlation dimensions.

The software requires data which is sampled at the rate of 500-1000 Hz and R

wave occurrence time estimation is required to be 1.00-2.00 milliseconds, these

requirements match with the hardware acquisition system, thus this software is

chosen for offline analysis of HR data to estimate the HRV parameters (Task Force

of the European Society of Cardiology 1996). During the offline analysis, frequency

domain method is utilized to derive the frequency components from the mother

wavelet and Power Spectrum Density (PSD) is calculated for the R-R interval series

and the same PSD band is used in extracting frequency bands integrated into the

13
Chapter 1: Introduction

signal. At the same time, the software calculates the powers associated with each

band.

1.7 Galvanic Skin Response

Galvanic skin response is one among the several Electrodermal Responses (EDR)

(Braithwaite, J. J. 2013). EDR typically is a change in the electrical property of skin

due to the interaction between objects or environment (Moore, M.M & Dua U. 2004).

Under normal conditions, human skin is a good conductor of electricity, when a weak

current is induced on top of the skin the body offers resistance that is measured in

terms of impedance (Blank I.H & Finesinger J.E 1946). According to Ohm’s Law,

Resistance (R) is directly proportional to Voltage (V) and inversely proportional to

current (C). Changes in the resistance of the skin are equal to the voltage applied

between the electrodes (placed on the skin) and divided by the current supplied

through them (Montagu J. D & Coles E.M 1966).

In a general application, the amplifier circuit offers a minimal and measurable

quantity of voltage to the skin through electrodes (Cutmore et al. 2007). On the other

end, the current that flows backward due to skin impedance can be measured as the

voltage, and resistor values are known parameters using Ohm’s law. The measured

output is expressed regarding microSiemens (µS).

14
Chapter 1: Introduction

EDR is divided into two types:

∙ Tonic

∙ Phasic

Tonic Skin conductance is referred to Skin Conductance Level (SCL) since it is

independent of discrete changes in an environment whereas Phasic is dependent on

stimuli such as light, sound, smell, etc. The phasic signal level shifts from base to a

higher level and stays at a high level typically for 10-20 seconds. It is therefore

termed as Skin Conductance Response (SCR) (Braithwaite, J. J. 2013).

In real world applications, these signals are measured on an individual’s

fingertips and toes because of high response on these areas of the body (Elie B &

Guiheneuc P 1990). The measurement of these signals is used for applications such

as stress detection (Sun, F.T et al. 2010), lie detection (Lykken D. T 1959), emotional

status recognition (Zhai J & Barreto A 2006), etc.

15
Chapter 2: Materials and Methods

Chapter 2
Materials and Methods

2.1 System Design

Server

Internet/Bluetooth

GSR

Fitness
Tracker PPG PC/Mobile Application
Alert
User

Stress
Monitoring

Figure 5 - Application Overview

16
Chapter 2: Materials and Methods

USB

Li-PO battery (3.3-5V)

Charging DC-DC

A1 Analog
GSR
User
acquisition Software Alert
Pulse Signal A0
System
port

Wi-Fi Server

Storage

Figure 6 – Hardware Architecture

The complete system hardware is divided into two main parts.

1. Pulse Sensor

2. Galvanic Skin Response (GSR)

17
Chapter 2: Materials and Methods

Output signals from both ports are read by analog input ports of a microduino

board through an onboard 12bit ADC. The proposed design as shown in Figure 5 has

a built-in memory. For the current layout, an SD card hardware from Adafruit has

been utilized to write the data directly on the SD card for offline processing.

2.2 Hardware/Software Design and Development


The main hardware components of the system are the HR detection circuit and

the galvanic skin response detection circuit. The main schematics for these

measurements are as shown in Figure 6 and Figure 7.

2.2.1 Heart Rate Monitoring System

This system was designed using open source hardware provided by

Pulsesensor (Open Hardware nd), few hardware additions have been introduced in

the filtering unit as the initial design was made for the purpose of recording signals

only from fingertips.

The current design utilizes an ambient light sensor from Avago, part# APDS-

9008 and bright LED from kingbright, part# AM2520ZGC09. A linear 5 volts is

delivered to the controller-Microduino-Core with a 12-bit onboard ADC to which

the signal output from the circuit is delivered to port A0. Before the signal is fed to

the controller, the circuit is placed in series with a diode-IN4005 to provide circuit

18
Chapter 2: Materials and Methods

protection over voltage variations if any; this helps when a battery or power supply

is accidentally plugged in reverse polarity. Once the LED starts emitting, the light

passes through the skin and some reflections are captured by the sensor-

AM2520ZGC09 placed next to it, as the power of signal goes up, the current on the

sensor goes low which is tapped by the controller and displayed on the output port.

A notch filter is designed with a bandwidth of 1-3 Hz is used to filter required

portions of the signal. The output of the notch filter is a weak signal; this is then

amplified by passing it through a low power operational-amplifier- MCP6001 from

Microchip. The overall current consumption of the HR alone is measured at 4.5mA.

Figure 7 - Pulse Sensor Hardware (Source- www.pulsesensor.com)

19
Chapter 2: Materials and Methods

Once the signal is captured at a sampling rate of 500Hz (Pinna, G. D 1994)

and fed to the algorithm which computes the successive heart beats, a sample count

of 30 seconds is set while reading the sensor value and thus the signal is saved in the

30 seconds’ window to measure the number of peaks.

Pseudo code :

Interrupt Service routine (Timer)

{Pulse Signal = analogRead(A0);

sampleCount += 30;}

The upper limit for HR is set to 95bpm (beats per minute), once the signal

reaches the threshold, Boolean statement is set to TRUE which in turn activates

PWM pin on microduino to power the coin vibrator which is used as a user alarm

indication for high HR. HR is calculated by arranging the peak values of the original

signal as an array capable of handling 10 elements. Since it is based on moving

average, the 11th sample falls to position 0 on the array.

Pseudo code:

Function count =0;

for (int i=0; i<9; i++) {

Rate[i] = Rate [i+1];

Count Total /= 10;

HR = 60000/count;}

20
Chapter 2: Materials and Methods

If the variables on the algorithm fail to read the signal under defined threshold

then the count is reinitialized to zero before it starts, sort of a reset function when

there is no contact between skin and the sensor.

To implement this code, a PIC16F876 microcontroller is recommended since it

can be easily implemented with EEPROM for saving data and running the algorithm.

The controller has a 10-bit A/D converter with oscillating frequency up to 20MHz.

The power consumption is as low as 25mW, serving thus as an ideal embedded

environment to implement code for data processing.

21
Chapter 2: Materials and Methods

Figure 8 - Pulse Sensor schematic

22
Chapter 2: Materials and Methods

2.2.2 Galvanic Skin Response System Design

To measure the electrical conductance of skin we need a good source for

measuring minute changes in skin impedance as low as 10-50 uS (microSiemens),

Ag/AgCl (Silver/Silver Chloride) electrodes have proven to be a dependable source

as most of the devices currently available are FDA approved. In the experimental

stage, GSR signals have been recorded via fingertip rather than from the wrist

location; this is done so to observe the original pattern to differentiate the feedback

response from stress to a non-stress state of a person with HR and HRV. The

hardware consists of a simple low powered op-amp-LM324. Due to weak signal

strength, a gain of 2 dB is added to the signal source to boost the signal strength.

Since the microduino resolution is 10 bit, the initial signal saturates at 5V hence a

voltage divider is introduced near the output with two resistors of value 1M Ω and

200k Ω, this also helps in tackling some of the artifacts of the signal as those will

have a higher amplitude than that of the GSR raw signal. The output signal is fed to

pin A1 on the controller and signal goes directly to SD card/save it to a server for

further processing. The schematics from Figure - 12 are transferred to the final

prototype board. Instead of using vibration alone as a user feedback, a multicolored

LED is recommended in the design to emit light of different intensity for different

levels of stress. Varying levels of stress will be characterized by the clinical studies

once the final prototype is design ready. The data from the clinical studies data will

23
Chapter 2: Materials and Methods

be used to characterize the stress levels into separate groups such as mild, medium,

high and very high levels and each group of data will be assigned with individual

color code. For example, if the user is at the medium stressed yellow light would be

enabled on LED along with vibration so that user can know at what level of stress

they are in that particular instance of time.

Figure 9 - GSR Hardware (https://www.seeedstudio.com/Grove---GSR-sensor-

p-1614.html)

24
Chapter 2: Materials and Methods

Figure 10 - GSR Sensor (Ag/AgCl electrode plate) (Source -

https://www.seeedstudio.com/Grove---GSR-sensor-p-1614.html)

Figure 11 - Microduino Core (Source - https://www.microduino.cc/index-

mcookie )

25
26
Figure 12 - Galvanic skin response schematic
Chapter 2: Materials and Methods
Chapter 2: Materials and Methods

2.3 Algorithm

Star
Wait for Hardware Response

Not Active HR

Start Collecting Samples Start GSR


(Baud Rate-115000) Collection

Detect Peak
Not Detected Detect

Read->HR = 256, GSR = 512 BPM = Number of Peaks Read->HR, GSR

Display

Record to Memory When Record to Memory


Peak not Detected When Peak Detected
Save to Memory
(SD/IoT)

Data Transfer to PC
If HR > 90
Activate Coin
Vibrator for user
feedback
Load Data to Kubioz Software
(HRV) Analysis)

Calculate Signal Strength


using Frequency Domain

Figure 13 - Flowchart

27
Chapter 2: Materials and Methods

2.3.1 Algorithm Overview


The current implementation is done in a way that the algorithm starts

read/write data once the true value is determined which is any number less than the

base value. The base value of GSR is defined as 256 and of HR is 512. This system

determines the hardware failure status or even if the sensor is not in contact with the

skin by outputting the base values specified above.

If the hardware fails to read the data, it goes into an infinite loop until it

detects an activity. Once the activity is detected it starts collecting the data on both

GSR and HR acquisition system. Samples are collected at a baud rate of 115000; all

the collected data is loaded into a 30-second buffer window. GSR data is kept as such

whereas on HR data; software detects the number of beats stored in a count variable

which is further utilized to calculate the total number of beats. In case if hardware

fails to read any signal or lost contact with the skin the algorithm still keeps reading

the data, but the software waits until it detects the true value to estimate the HR.

Before the detection of signal peaks, the software soft checks if the data points are

less than base value if true then it proceeds to calculate HR.

28
Chapter 2: Materials and Methods

Since it is an offline analysis, the data from storage is moved to a PC and

loaded into Kubios software.

For a user alert based system, a coin vibrator is introduced with the design.

This coin vibrator gets activated when the value of HR reaches above 95, alerting the

patient to become aware of the current situation.

29
Chapter 2: Materials and Methods

2.4 3D Model for Proposed Future Design

Figure 14 – Signal Acquisition System Board Dimensions

Figure 15 – Signal Acquisition Board Top Overlay 3D

30
Chapter 2: Materials and Methods

Figure 16 - Signal Acquisition Board Bottom Overlay 3D

Figure 17 – Display Section 3D

31
Chapter 2: Materials and Methods

Figure 18 – Board Side View 3D

Figure 19 - Board Top View 3D

32
Chapter 2: Materials and Methods

Figure 20 – Display board bottom view

Figure 21 – Boards Stack View

33
Chapter 2: Materials and Methods

2.5 Experimental protocol


We thought of combining several tasks related to stress dynamics. One task is

cognitive/rational. We varied the levels of stress in users by testing their

mathematical solving ability. If the user response is fast, then the difficulty levels are

increased. Another task is related to attention and emotion. To relieve the person

form stress, we asked her to meditate (mostly concentration and deep breathing

exercise) during the recording. The last task is physical (i.e. walking) to determine

the software ability to remove higher artifacts.

4 participants were monitored, two men and two women. Members involved were

students and working professionals, age varying between 23-30 years of age.

Participants were asked to answer mathematical questions within a given period like

in Montreal Imaging Stress Task (MIST) which is proved to have a positive impact

on creating mental stress on an individual (Mizrahi, R., 2012). The mathematical

equations were changed based on the correct response and time limit to increase the

level of difficulty. Each is confronted with stress on two different tasks: Walking or

Seated. Each measurement had a baseline of two conditions: mental task segment,

and recovery/pre-mental task segment. Both the tasks were completed sequentially.

34
Chapter 3: Results and Discussion

Chapter 3:
Results and Discussion
3.1 Subject 1 Recordings
Subject 1 - (Gender: Female; Age: 26)

Figure 22 - Subject when at no stress frequency response calculated from PPG

Figure 23 - Subject when at stress frequency response calculated from PPG

35
Chapter 3: Results and Discussion

Figure 24 - Normalization of the raw PPG waveform at no stress

Figure 25 - Normalization of the raw PPG waveform at stress

36
Chapter 3: Results and Discussion

Figure 26 - GSR response when at stress and no stress

When the subject is not under stress the power(ms2) of LF is observed to be

0.16326, and HF is 0.093799, whereas when the subject is at stress, the strength of

LF is at 2.4412 and HF at 0.17143. Since the LF power is higher under stress, the

ratio of LF/HF also increases and in this case when not at stress it is at 1.7405 and

while under stress it is 14.240. While determining the condition of a user, it is

recommended to look into ratio rather than the individual frequency component

because the signal might already have noise in it contributing to higher value.

Similarly, the GSR recording shows that the amplitude of the signal is greater when

at stress and the signal hits lower when at normal.

37
Chapter 3: Results and Discussion

3.2 Subject 2 Recordings

Gender – Male; Age – 23

Figure 27 - Subject when at no stress frequency response calculated from PPG

Figure 28 - Subject when at stress frequency response calculated from PPG

38
Chapter 3: Results and Discussion

Figure 29 - Normalization of the raw PPG waveform at no stress

Figure 30 - Normalization of the raw PPG waveform at stress

39
Chapter 3: Results and Discussion

Figure 31 - GSR response when at stress and no stress

To identify the exact response of the signal under stress, subject-2 is first

induced by stress and suggested to calm down for few minutes (5-10) before

recording data for under no stress condition to see the actual response of the signal.

Similarities were observed in both cases where the ratio of LF/HF under no stress is

at 11.463 and when at stress ratio is shown to be 25.523. From the GSR pattern, it

clearly indicates the baseline of the signal shifting towards higher amplitude and

while relaxation it moves towards the opposite end.

40
Chapter 4: Conclusion and Future Work

Chapter 4:
Conclusions and Future Work
The design provides a compact and low-cost wearable technology for

measurement of HRV, GSR and stress monitoring with a user alert system. This

system is unique since it uses the most reliable parameters for stress detection. Not

only it is taking into account the heart rate as existing technologies, but furthermore

it analyzes the stress data continuously, and it offers a vibrating alert system in times

of elevated stress.

The experimental data analysis showed that both HRV and GSR were

indicators of stress. When a patient/user was under stress, both of these parameters

were validating the presence of stress. From the results obtained LF/HF ratio is

greater when the person is under stress and at the GSR signal amplitude shifts to

higher amplitude from base line starting from 0 mV, the signal goes up to max 400

mV and saturates at 500 mV when the user stress is at highest level. There is no set

point for LF/HF ratio to choose as of now because of limited data availability and

more clinical trials to be followed in near future in order to decide on a set point for

stress.

Another advantage of this prototype system is the ability to access raw data.

If we use a commercial device like FitBit, there is no access to raw data that limits

41
Chapter 4: Conclusion and Future Work

the degree of the data analysis. Our customized system provides us the flexibility to

do all kinds of data analysis.

Given the versatility of the system, the data is accessible through either a

mobile device or a computer (IoT). Also, the system could be used alongside or

integrated with devices such as Neurosky MindWave and Emotive Insight that record

brain signal activity (EEG), adding additional benefits to research in monitoring

mobile patients. Also, by using this device, researchers can monitor long-term

sympathetic nervous system activity to understand more about neurological

conditions that may include autism and sleep disorders. The existing systems allow

to record data during the day and analyze this data offline, but continuous and online

stress monitoring may prove to have many benefits.

The Wearable technology is an emerging technology that is believed to

improve workforce training and productivity based on their vital biological signal

data. For a wearable to succeed, it's not just the right information to deliver to users,

but the right insight and alerting users in stressful conditions.

However, this study is limited due to the number of subjects tested since this

part of the project was focused on the design and development of the device more

than validation studies. We will be conducting larger scale clinical trials once the

online HRV analysis is completely implemented and the mobile app is finalized.

42
Chapter 4: Conclusion and Future Work

This device can be used for more than stress detection, since HRV and GSR

are indicators of many cardiovascular and autonomic nervous system functions

including diabetic neuropathy, aging, etc.

43
References

References
Technology_Adv. "Trends in Wearable Technology & Preventative Healthcare."
TechnologyAdvice. N.p., 2016. Web. 05 Dec. 2016.

Cannon, W. B. (1915). Bodily changes in pain, hunger, fear, and rage: An account
of recent researches into the function of emotional excitement. D. Appleton and
company.

Bongers, P. M., de Winter, C. R., Kompier, M. A., & Hildebrandt, V. H. (1993).


Psychosocial factors at work and musculoskeletal disease. Scandinavian journal of
work, environment & health, 297-312.

Collins, S. M., Karasek, R. A., & Costas, K. (2005). Job strain and autonomic indices
of cardiovascular disease risk. American journal of industrial medicine, 48(3), 182-
193.

Karasek Jr, R. A. (1979). Job demands, job decision latitude, and mental strain:
Implications for job redesign. Administrative science quarterly, 285-308.

Herbert, J. (1997). Fortnighly review. Stress, the brain, and mental illness. BMJ:
British Medical Journal, 315(7107), 530.

Lundberg, U., Kadefors, R., Melin, B., Palmerud, G., Hassmén, P., Engström, M., &
Dohns, I. E. (1994). Psychophysiological stress and EMG activity of the trapezius
muscle. International journal of behavioral medicine, 1(4), 354-370.

Sinex, J. E. (1999). Pulse oximetry: principles and limitations. The American journal
of emergency medicine, 17(1), 59-66.

Sztajzel, J. (2004). Heart rate variability: a noninvasive electrocardiographic method


to measure the autonomic nervous system. Swiss medical weekly, 134, 514-522.

Akselrod, S., Gordon, D., Ubel, F. A., Shannon, D. C., Berger, A. C., & Cohen, R.
J. (1981). Power spectrum analysis of heart rate fluctuation: a quantitative probe of
beat-to-beat cardiovascular control. science, 213(4504), 220-222.

Seong, H. M., Lee, J. S., Shin, T. M., Kim, W. S., & Yoon, Y. R. (2004, September).
The analysis of mental stress using time-frequency distribution of heart rate
44
References

variability signal. In Engineering in Medicine and Biology Society, 2004. IEMBS'04.


26th Annual International Conference of the IEEE (Vol. 1, pp. 283-285). IEEE.

Kurths, J., Voss, A., Saparin, P., Witt, A., Kleiner, H. J., & Wessel, N. (1995).
Quantitative analysis of heart rate variability. Chaos: An Interdisciplinary Journa

McCraty, R., Atkinson, M., Tiller, W. A., Rein, G., & Watkins, A. D. (1995). The
effects of emotions on short-term power spectrum analysis of heart rate
variability. The American journal of cardiology, 76(14), 1089-1093.

Healey, J. A., & Picard, R. W. (2005). Detecting stress during real-world driving
tasks using physiological sensors. IEEE Transactions on intelligent transportation
systems, 6(2), 156-166.

Sztajzel, J. (2004). Heart rate variability: a noninvasive electrocardiographic method


to measure the autonomic nervous system. Swiss medical weekly, 134, 514-522.

Ori, Z., Monir, G., Weiss, J., Sayhouni, X., & Singer, D. H. (1992). Heart rate
variability. Frequency domain analysis. Cardiology clinics, 10(3), 499-537.

Pichon, A., Roulaud, M., Antoine-Jonville, S., de Bisschop, C., & Denjean, A.
(2006). Spectral analysis of heart rate variability: interchangeability between
autoregressive analysis and fast Fourier transform. Journal of
electrocardiology, 39(1), 31-37.

Blank, I. H., & Finesinger, J. E. (1946). Electrical resistance of the skin: effect of
size of electrodes, exercise and cutaneous hydration. Archives of Neurology &
Psychiatry, 56(5), 544-557.

Tarvainen, M. P., Niskanen, J. P., Lipponen, J. A., Ranta-Aho, P. O., & Karjalainen,
P. A. (2014). Kubios HRV–heart rate variability analysis software. Computer
methods and programs in biomedicine, 113(1), 210-220.

Task Force of the European Society of Cardiology. (1996). Heart rate variability
standards of measurement, physiological interpretation, and clinical use. Eur Heart
J, 17, 354-381.

Braithwaite, J. J., Watson, D. G., Jones, R., & Rowe, M. (2013). A guide for
analysing electrodermal activity (EDA) & skin conductance responses (SCRs) for
psychological experiments. Psychophysiology, 49, 1017-1034.
45
References

Moore, M. M., & Dua, U. (2004, October). A galvanic skin response interface for
people with severe motor disabilities. In ACM SIGACCESS Accessibility and
Computing (No. 77-78, pp. 48-54)

Montagu, J. D., & Coles, E. M. (1966). Mechanism and measurement of the galvanic
skin response. Psychological Bulletin, 65(5), 261.

Cutmore, T. R., & James, D. A. (2007). Sensors and sensor systems for
psychophysiological monitoring: A review of current trends. Journal of
Psychophysiology, 21(1), 51-71.

Elie, B., & Guiheneuc, P. (1990). Sympathetic skin response: normal results in
different experimental conditions. Electroencephalography and clinical
neurophysiology, 76(3), 258-267.

Sun, F. T., Kuo, C., Cheng, H. T., Buthpitiya, S., Collins, P., & Griss, M. (2010,
October). Activity-aware mental stress detection using physiological sensors.
In International Conference on Mobile Computing, Applications, and Services (pp.
211-230). Springer Berlin Heidelberg.

Lykken, D. T. (1959). The GSR in the detection of guilt. Journal of Applied


Psychology, 43(6), 385.

Zhai, J., & Barreto, A. (2006, August). Stress detection in computer users based on
digital signal processing of noninvasive physiological variables. In Engineering in
Medicine and Biology Society, 2006. EMBS'06. 28th Annual International
Conference of the IEEE (pp. 1355-1358). IEEE.

Stinson, B. (2013) ‘Google Glass and its rival smart glasses’, Stuff, No.205, p.5

Svanberg, J. (2013). Wearable technology is a new promising segment in the


consumer M2M market. Gothenburg: Berg Insight AB.

UP3 by Jawbone | A Smarter Activity Tracker For A Fitter You. Retrieved December
03, 2016, from https://jawbone.com/fitness-tracker/up3

FitBit Surge. (n.d.). Retrieved December 03, 2016, from


https://www.fitbit.com/surge
46
References

FitBit Charge. (n.d.). Retrieved December 03, 2016, from


https://www.fitbit.com/charge

Smart Strength Training to Go. Strenx by Gymwatch. (n.d.). Retrieved December 03,
2016, from https://www.gymwatch.com/en/

Mizrahi, R., Addington, J., Rusjan, P. M., Suridjan, I., Ng, A., Boileau, I., ... &
Wilson, A. A. (2012). Increased stress-induced dopamine release in
psychosis. Biological psychiatry, 71(6), 561-567.

Pinna, G. D., Maestri, R., Di Cesare, A., Colombo, R., & Minuco, G. (1994). The
accuracy of power-spectrum analysis of heart-rate variability from annotated RR lists
generated by Holter systems. Physiological measurement, 15(2), 163.

Open Hardware. (n.d.). Retrieved December 04, 2016, from


http://pulsesensor.com/pages/open-hardware

Fish, K., & Kang, H. G. (2014). Learning outcomes in a stress management course:
Online versus face-to-face. Journal of Online Learning and Teaching, 10(2), 179.

47

You might also like