+ All Categories
Home > Documents > Heart Rate Variability Biofeedback Application for Android676673/... · 2013-12-06 · include...

Heart Rate Variability Biofeedback Application for Android676673/... · 2013-12-06 · include...

Date post: 16-Mar-2020
Category:
Upload: others
View: 1 times
Download: 0 times
Share this document with a friend
40
i Heart Rate Variability Biofeedback Application for Android ANDREAS BERNDTSSON Master of Science Thesis in Medical Engineering Stockholm 2013
Transcript
Page 1: Heart Rate Variability Biofeedback Application for Android676673/... · 2013-12-06 · include muscle tension, skin temperature, heart rate, respiration, blood pressure, heart rate

i

Heart Rate Variability Biofeedback Application for

Android

ANDREAS BERNDTSSON

Master of Science Thesis in Medical Engineering Stockholm 2013

Page 2: Heart Rate Variability Biofeedback Application for Android676673/... · 2013-12-06 · include muscle tension, skin temperature, heart rate, respiration, blood pressure, heart rate

Heart Rate Variability Biofeedback Applicationfor Android

A Master of Science Thesis Performed at STH in Flemingsberg, Stockholm

ANDREAS BERNDTSSON

Master’s Thesis at STHSupervisor: Farhad AbtahiExaminer: Kaj Lindecrantz

TRITA-STH. EX 2013-114

Page 3: Heart Rate Variability Biofeedback Application for Android676673/... · 2013-12-06 · include muscle tension, skin temperature, heart rate, respiration, blood pressure, heart rate

Abstract

Heart rate variability (HRV) is the variations in time between consecutive heartbeats, and reflects the functioning of the autonomic nervous system. Not only isHRV a good marker for many physiological disorders, but it is well known that HRVcan be altered consciously by different approaches even though it is controlled by theautonomic nervous system. Respiration is an important factor in modulating HRVand this property is utilized in HRV biofeedback, which is a method that aims atincreasing heart rate variability. HRV biofeedback systems typically measures heartrate variability and display the parameters on a screen, enabling the user to gaincontrol and increase heart rate variations. In this thesis a software for biofeedbackof heart rate variability is presented. The software was implemented for Androidand runs on a tablet computer to make the biofeedback system portable and moreaccessible than most other biofeedback systems. The developed software has provento be fully functional in real-time providing the user with reliable information. Asmall pilot study on healthy volunteers has also been made to evaluate the effectsof the biofeedback training. These measurements give a preliminary indication thatbiofeedback session with the proposed solution increases HRV. However, a morecomprehensive study with a larger population needs to be carried out in order toconfidently confirm the positive effects of biofeedback sessions with the software.

iii

Page 4: Heart Rate Variability Biofeedback Application for Android676673/... · 2013-12-06 · include muscle tension, skin temperature, heart rate, respiration, blood pressure, heart rate

Sammanfattning

Heart rate variability (HRV) är variationerna i tid mellan två efterföljande hjärtslag,och återspeglar autonomiska nervsystemets funktion. HRV är en tydlig markör formånga sjukdomar, men det är också välkänt att HRV kan påverkas medvetet trotsatt det styrs av autonomiska nervsystemet. Andning är en viktig påverkande faktorav HRV och denna egenskap utnyttjas i HRV biofeedback, som är en teknik somsyftar till att öka HRV. Typiska system för HRV biofeedback mäter variationernai hjärtfrekvens och visar upp informationen på en display, vilket låter användarenta kontroll över denna parameter och öka HRV. I denna uppsats presenteras ettprogram för biofeedback av HRV. Mjukvaran har implementerats för Android ochkörs på en surfplatta för att skapa ett biofeedbacksystem som är portabelt ochdär tillgängligheten är hög, till skillnad från de flesta andra biofeedback systemsom är beroende av en dator. Programmet som utvecklats har visat sig vara fulltfunktionellt i realtid och visar upp pålitliga parametrar för användaren. En förstudiehar även utförts för att utvärdera effekterna vid användning av programmet. Dessamätningar indikerar att biofeedbackträning med den föreslagna lösningen ökar HRVefter användning. En mer omfattande studie med fler personer bör dock genomförasför att ge en tydligare bild av effekterna av träning med detta program.

iv

Page 5: Heart Rate Variability Biofeedback Application for Android676673/... · 2013-12-06 · include muscle tension, skin temperature, heart rate, respiration, blood pressure, heart rate

Contents

1 Introduction 11.1 Background and Problem definitions . . . . . . . . . . . . . . . . . . 11.2 Thesis Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21.3 Thesis Outline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

2 Theory 32.1 Cardiac Physiology . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32.2 Nervous System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42.3 Heart Rate Variability . . . . . . . . . . . . . . . . . . . . . . . . . . 4

2.3.1 Time-Domain Methods . . . . . . . . . . . . . . . . . . . . . 52.3.2 Frequency-Domain Methods . . . . . . . . . . . . . . . . . . . 6

2.4 Biofeedback . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62.4.1 HRV Biofeedback . . . . . . . . . . . . . . . . . . . . . . . . . 8

3 HRV Biofeedback Solution 113.1 System Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

3.1.1 Bluetooth Device . . . . . . . . . . . . . . . . . . . . . . . . . 123.1.2 Mobile Device . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

3.2 Signal Processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133.2.1 Peak Detection . . . . . . . . . . . . . . . . . . . . . . . . . . 133.2.2 The Lomb Periodogram . . . . . . . . . . . . . . . . . . . . . 13

3.3 Software Development . . . . . . . . . . . . . . . . . . . . . . . . . . 143.3.1 Data Management . . . . . . . . . . . . . . . . . . . . . . . . 163.3.2 User Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

3.4 Using the HRV Biofeedback Software . . . . . . . . . . . . . . . . . . 213.5 Experimental Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . 22

4 Results and Discussion 244.1 Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244.2 Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25

5 Conclusions 285.1 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 285.2 Suggested Future Work . . . . . . . . . . . . . . . . . . . . . . . . . 28

v

Page 6: Heart Rate Variability Biofeedback Application for Android676673/... · 2013-12-06 · include muscle tension, skin temperature, heart rate, respiration, blood pressure, heart rate

CONTENTS

Bibliography 29

A User Guide 31

vi

Page 7: Heart Rate Variability Biofeedback Application for Android676673/... · 2013-12-06 · include muscle tension, skin temperature, heart rate, respiration, blood pressure, heart rate

List of Figures

2.1 The ECG waveform for two heart beats. . . . . . . . . . . . . . . . . . . . . 32.2 ECG recording showing the variation in time between consecutive heart beats. 52.3 ECG (upper plot), RR interval (middle plot) and HRi (lower plot) for 30 sec-

onds of recording. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72.4 Heart rate and blood pressure reactions to stimuli if the baroreflex does not

work. Taken from [5]. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82.5 Heart rate and blood pressure reactions to stimuli if the baroreflex works. Taken

from [5]. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92.6 Heart rate and blood pressure oscillations elicited by the stimulus of respiration.

Taken from [5]. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

3.1 System overview of the biofeedback solution. . . . . . . . . . . . . . . . . . . 113.2 Block diagram of Pan and Tompkins peak detection algorithm. . . . . . . . . 133.3 Flowchart for the different threads. . . . . . . . . . . . . . . . . . . . . . . 153.4 Flowchart of the signal processing in the Bluetooth thread. . . . . . . . . . . 173.5 Flowchart for ECG thread. . . . . . . . . . . . . . . . . . . . . . . . . . . . 183.6 The first view of the biofeedback application. . . . . . . . . . . . . . . . . . 203.7 The second view of the biofeedback application. . . . . . . . . . . . . . . . . 21

4.1 Power spectral density for the five-minute recordings. . . . . . . . . . . . . . 264.2 Tachograms for subject 1 before and after biofeedback. . . . . . . . . . . . . 27

vii

Page 8: Heart Rate Variability Biofeedback Application for Android676673/... · 2013-12-06 · include muscle tension, skin temperature, heart rate, respiration, blood pressure, heart rate

List of Tables

2.1 Frequency domain measures of HRV for short-term recordings (5 min).Adapted from [7]. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

4.1 Test results from measurements of four test subjects. M1 and M2 de-notes measurement before and after biofeedback training respectively.TP denotes LF + HF. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25

viii

Page 9: Heart Rate Variability Biofeedback Application for Android676673/... · 2013-12-06 · include muscle tension, skin temperature, heart rate, respiration, blood pressure, heart rate

Abbreviations and units

ANS Autonomic nervous system

ECG Electrocardiogram

FFT Fast Fourier transform

GUI Graphical user interface

HF High frequency

HRi Instantaneous heart rate

HRV Heart rate variability

IDE Integrated development environment

LF Low frequency

OS Operating system

RFT Resonant frequency training

RSA Respiratory sinus arrhythmia

SDK Software development kit

SDNN Standard deviation of NN intervals

SNS Parasympathetic nervous system

SNS Sympathetic nervous system

TEB Thoracic electrical bioimpedance

UI User interface

VLF Very low frequency

ix

Page 10: Heart Rate Variability Biofeedback Application for Android676673/... · 2013-12-06 · include muscle tension, skin temperature, heart rate, respiration, blood pressure, heart rate

Chapter 1

Introduction

Mobile devices such as smart phones and tablet computers have over the past yearsinvaded our lives. Due to the fast performance improvement of these devices manyof the computer’s previous main tasks can today be carried out by the mobile device.Since the mobility of these devices creates whole new possibilities a vast increasein number of available applications has been observed over the last years. Both oldand new markets have been eager to explore how to utilize this new technology toprovide new and enhanced services. The medical field is one of many areas thathas found its way to the mobile applications arena. Mobile medical applicationsprovide new and cost-effective ways to improve health.

1.1 Background and Problem definitions

The heart does not work like a metronome but instead, the instantaneous heartrate varies around the average heart rate. Heart rate variability (HRV) is thebeat-to-beat variations in time between two consecutive heart beats. HRV providesinformation about the functioning of the autonomic nervous system which controlsthe heart rate. Specific alterations in HRV have been shown to correlate with anumber of diseases and generally HRV provides information about cardiovascularhealth [7]. Not only is HRV an interesting parameter for the assessment of relateddiseases, but it has also been shown that HRV can be altered by different approaches.

Biofeedback is a method for improving biological functions by receiving informationabout the function in question. Biofeedback typically measures a physiologicalparameter and displays it back to the user on a screen. Most biofeedback systemsrely on a computer to process and display the information. HRV biofeedback isa technique which targets to control the variations of the heart rate and the aimis to increase these variations. Since HRV is under influence of the autonomicnervous system many biological components affects it and several protocols for HRVbiofeedback exists. However, the most promising approach seems to be resonant

1

Page 11: Heart Rate Variability Biofeedback Application for Android676673/... · 2013-12-06 · include muscle tension, skin temperature, heart rate, respiration, blood pressure, heart rate

CHAPTER 1. INTRODUCTION

frequency training [13]. This technique is based on the fact that heart rate is affectedby our breathing and that low respiration rates increases HRV. Biofeedback for HRVcan be used in a broad range of environments such as clinical, workplace and sportsfor improvement of health and performance [8]. For example, research by Sutartoet al. [13] has shown that HRV biofeedback improves cognitive functions and cantherefore be used to increase performance at workplaces.

In order for biofeedback to become a more frequently used method it has to be easyto use and accessibility has to be high. A natural step for biofeedback is to utilizethe fast improvement of today’s mobile devices, thus allowing biofeedback systemsto become mobile.

1.2 Thesis ObjectivesThis thesis aims at developing a prototype software for HRV biofeedback. A previ-ously developed Bluetooth device will be used to measure both ECG and respiration.The software will be implemented on a mobile device that will process the collecteddata and provide feedback to the user. The main part of the project will focus onimplementing methods to analyse and visualize HRV and the respiration signal. Thereal-time visualization of the data is critical to the application, in order to functiondesirable. A successful prototype would be fully functional in real-time, providethe user with correct parameters and produce the expected results presented in thetheory chapter.

1.3 Thesis OutlineIn chapter 2 the theory this thesis is based on is presented. A short review ofcardiac physiology and the autonomic nervous system is given. This is followedby a summary of heart rate variability, explaining standards of measurement andphysiological interpretations. The last section of this chapter gives a briefintroduction to HRV biofeedback training and specifically resonant frequencytraining.

Chapter 3 presents the proposed solution for this thesis. A brief description of thesystem overview is followed by the mathematics needed for the signal processingof the application. This is followed by an explanation of the software and how theapplication was implemented. The next section in this chapter is a description ofhow to use the biofeedback software, and the last section presents the experimentalsetup that was used to evaluate the effects of the biofeedback system.

In chapter 4 the results of this thesis is evaluated, and test measurements will bepresented. The last chapter contains a summary and suggestions for future works.

2

Page 12: Heart Rate Variability Biofeedback Application for Android676673/... · 2013-12-06 · include muscle tension, skin temperature, heart rate, respiration, blood pressure, heart rate

Chapter 2

Theory

This chapter provides the basic theory needed to gain insight into the biofeedbacksolution. A brief review of the heart’s physiology and the nervous system is given.This is followed by a more thorough introduction to heart rate variability and HRVbiofeedback training.

2.1 Cardiac Physiology

The heart is a muscle that pumps blood throughout the blood vessels throughrepeated contractions, providing the body with oxygen and nutrients. Each con-traction is controlled by a series of electrical signals that is spread through thewalls of the heart making the cardiac muscle cells to contract in a coordinatedmanner. These electrical signals can be measured by applying electrodes to theskin and record the voltage changes over the chest. This kind of recording is calledelectrocardiogram (ECG) (see figure 2.1).

Figure 2.1. The ECG waveform for two heart beats. This figure illustrates themost important characteristics of the ECG including P wave, QRS complex, Twave and the RR interval between two R peaks.

3

Page 13: Heart Rate Variability Biofeedback Application for Android676673/... · 2013-12-06 · include muscle tension, skin temperature, heart rate, respiration, blood pressure, heart rate

CHAPTER 2. THEORY

The figure displays the ECG waveform for two heart beats. For a normal heart beatthe ECG wave form will have several characteristic parts, which includes a P wave,a QRS complex and a T-wave (and also a small U wave not included in this figure).Each segment of the ECG wave form corresponds to a certain event in the cardiaccycle. For example, the QRS complex reflects depolarization of the ventricles [12].The highest point of the R wave is called the R peak and the time between twoconsecutive R peaks is known as the RR interval, which gives the time between twoheart beats.

2.2 Nervous SystemThe human nervous system can be divided into the somatic and the autonomicnervous system. The somatic nervous system is associated with voluntary controlof the body by skeletal muscles. The autonomic nervous system (ANS) is responsiblefor involuntary actions in the body. The ANS serves as a control system regulatingfor example heart rate, respiration rate, digestion, perspiration, pupil dilation. TheANS can be further divided into two subsystems, the sympathetic nervous system(SNS) and the parasympathetic nervous system (PSNS). These two branches ofthe ANS have in many cases opposite effects, meaning that one branch activates aphysiological response and the other inhibits it. The SNS is activated in physicallydemanding and stressful situations causing physiological responses also known asthe "fight or flight" response. Sympathetic activation leads to responses like increasein heart rate, increase in blood pressure, pupil dilation, increased sweating. ThePSNS is activated during rest and counteracts the responses described by the SNS,thus lowering heart rate, blood pressure etc. Parasympathetic activation allow thebody to restore its energy levels and is therefore often referred to as "rest and digest".Note that both branches of ANS always are at some level active, but one or theother more or less dominant.

The heart receives inputs from both sympathetic and parasympathetic pathways.The sympathetic nervous system innervates the sinoatrial node (SA node) by spinalnerves which are responsible for increasing the heart rate. The parasympatheticnervous system on the other hand, innervates the SA node by the vagus nerve andcauses the heart to decrease the heart rate. Thus, like in many other parts of thebody SNS and PSNS counteracts each other and the sum of the sympathetic andparasympathetic inputs will influence the heart rate to either increase or decrease[10]. This interaction between the two branches of ANS is often referred to assympathovagal balance.

2.3 Heart Rate VariabilityHeart rate variability (HRV) is the variations in time between two consecutive heartbeats. With an ECG recording HRV can be evaluated by taking the time interval

4

Page 14: Heart Rate Variability Biofeedback Application for Android676673/... · 2013-12-06 · include muscle tension, skin temperature, heart rate, respiration, blood pressure, heart rate

2.3. HEART RATE VARIABILITY

0.923 sec0.860 sec0.980 sec

Figure 2.2. ECG recording showing the variation in time between consecutiveheart beats.

between successive R peaks (see figure 2.2). This time interval is called RR intervals,and can also be interpreted as instantaneous heart rate (HRi) by HRi=60/RR beatsper minute.

Different HRV characteristics have shown to be associated with several diseasesand disorders. HRV differences have been used to detect autonomic neuropathy inpatients with diabetes [7]. It has also been shown that changes in HRV has a highcorrelation with mortality after myocardial infarction [14]. Furthermore, HRV hasproven to provide information about the sympathetic and parasympathetic branchesof the autonomic nervous system which has strong correlations to cardiovascularhealth [7].

In 1996 a task force was formed by the European Society of Cardiology and theNorth American Society of Pacing and Electrophysiology. This task force estab-lished a set of standards of measurement and recommendations for the physiologi-cal interpretation of HRV [7]. The next two sections will summarize some of thesestandards.

2.3.1 Time-Domain MethodsAccording to Malik et al. [7] HRV measurements should be categorized into short-term recordings (≤ 5 min), and long-term recordings (24 h). This thesis will be re-stricted to analyzing short-term recordings. Sometimes the term normal-to-normal(NN) interval is used instead of RR interval. NN intervals also refers to the timebetween adjacent R peaks (or QRS complexes) but emphasizes that the beat in fact

5

Page 15: Heart Rate Variability Biofeedback Application for Android676673/... · 2013-12-06 · include muscle tension, skin temperature, heart rate, respiration, blood pressure, heart rate

CHAPTER 2. THEORY

is a normal beat resulting from a sinus node depolarization. Figure 2.3 illustratesan example for a 30 seconds segment of an HRV measurement. The upper plotshow ECG and the middle plot show the RR intervals extracted from the ECGsignal. Plots illustrating RR intervals against time are also known as tachograms.The lower figure illustrates the instantaneous heart rate (HRi). Note that this isan inverted tachogram, thus the middle plot and the lower plot contains the sameinformation.

Examples of time-domain variables when measuring HRV are mean RR interval,mean heart rate, difference between the longest and the shortest RR interval. Oneimportant parameter is the standard deviation of NN intervals (SDNN). For an Nsamples long series of RR intervals:

SDNN =√

1N − 1

∑N

j=1(RRj − RR)2, (2.1)

where RR is the mean value of the RR intervals. It is important to point out thatcomparisons of SDNN between different recordings must be of the same length,since HRV increases with the length of the recording [7]. Another parameter isNN50 which is the number of pairs of adjacent NN intervals that differ more than50 ms. pNN50 is equal to NN50 divided by the total number of NN intervals, thusexpressing the percentage of NN50.

2.3.2 Frequency-Domain MethodsIn the frequency-domain, power spectral density (PSD) estimations of HRV pro-vides other sets of information. In short-term recordings the spectrum is dividedinto three main spectral components: very low frequency (VLF), low frequency(LF) and high frequency (HF). The VLF band comprise frequencies ≤ 0.04 Hz,LF ranges between 0.04-0.15 Hz and HF consists of frequencies 0.15-0.4 Hz. Typ-ical frequency-domain measures from short-term recordings are given in table 2.1[7]. The physiologic interpretation of the VLF component is not well defined andshould be neglected when analysing short-term recordings. The HF component isaffected by vagal stimulation, thus representing parasympathetic activation. Thephysiologic interpretation of the LF component has been a matter of debate wheresome authors claim that LF is a pure marker for sympathetic activity while othersview it as a representation of both sympathetic and parasympathetic activity. Asa result, the LF/HF ratio is considered by many researchers to reflect sympathova-gal balance, providing a measure of the opposing forces between sympathetic andparasympathetic modulation.

2.4 BiofeedbackBiofeedback is the method of gaining awareness and improving health by providingphysiological information from the body. Biofeedback training aims at affect or

6

Page 16: Heart Rate Variability Biofeedback Application for Android676673/... · 2013-12-06 · include muscle tension, skin temperature, heart rate, respiration, blood pressure, heart rate

2.4. BIOFEEDBACK

125 130 135 140 145 150 155

400

500

600

700

EC

G

(µV

)

125 130 135 140 145 150 1550.6

0.65

0.7

0.75

0.8

RR

in

terv

al (s

)

125 130 135 140 145 150 15575

80

85

90

95

Time (s)

HR

i (b

pm

)

Figure 2.3. ECG (upper plot), RR interval (middle plot) and HRi (lower plot)for 30 seconds of recording.

Table 2.1. Frequency domain measures of HRV for short-term recordings (5 min).Adapted from [7].

Variable Units Description Frequency range5 min total power ms2 The variance of NN intervals approx. ≤ 0.4 HzVLF ms2 Power in very low frequency range ≤ 0.4 HzLF ms2 Power in low frequency range 0.04-0.15 HzLF norm n.u. LF power in normalized units

LF/(Total Power - VLF) x 100HF ms2 Power in high frequency range 0.15-0.4 HzHF norm n.u. HF power in normalized units

HF/(Total Power - VLF) x 100LF/HF Ratio LF [ms2]/HF [ms2]

improve different selected biological parameters. Typical biofeedback parametersinclude muscle tension, skin temperature, heart rate, respiration, blood pressure,heart rate variability, blood flow and brain electrical activity. Research by Yuchaet al. [15] have shown that biofeedback training is an effective treatment for avariety of physical and psychological diseases. A few examples of disorders wherebiofeedback has proven to be a successful treatment include: ADHD, chronic pain,epilepsy, headache and hypertension.

7

Page 17: Heart Rate Variability Biofeedback Application for Android676673/... · 2013-12-06 · include muscle tension, skin temperature, heart rate, respiration, blood pressure, heart rate

CHAPTER 2. THEORY

2.4.1 HRV BiofeedbackHRV biofeedback is a method that aims at maximizing the heart rate variability.Several protocols for HRV biofeedback exists, but the most promising approachseems to be resonant frequency training (RFT) [13]. The typical procedure forHRV biofeedback involves encouraging the subject to first put himself in a relaxedand positive state of mind, and then the actual training begins. This procedureengages the subject to breathe at a specific respiratory rate called the resonantfrequency. It has been shown that due to the nature of the baroreflex, each personhas a resonant frequency for breathing where the blood pressure and heart rateoscillates in synchronization which maximizes HRV [5].

The baroreflex is a reflex that regulates blood pressure, by providing a negativefeedback loop to the heart. Baroreceptors are stretch-sensitive receptors that senseschanges in blood pressure. Baroreceptors are located at different locations in thecirculatory system but the most sensitive ones are found in the carotid sinusesand the aortic arch. When blood pressure rises the baroreceptors signals to theautonomic nervous system to decrease the heart rate in order for the blood pressureto reduce. Oppositely, when blood pressure falls ANS is ordered to increase theheart rate which causes blood pressure to rise.

Figure 2.4. Heart rate and blood pressure reactions to stimuli if the baroreflexdoes not work. Taken from [5].

Lehrer et al. [5] illustrates this phenomenon and explains how it relates to HRV.Figure 2.4 shows how the system would look like without the baroreflex. An increasein heart rate would result in an elevated blood pressure which is delayed by about5 seconds. This delay results from inertia in the vascular system so blood pressurechanges are slower in taller people than in short people because of larger amount ofblood. Without the baroreflex the elevated blood pressure would after some time

8

Page 18: Heart Rate Variability Biofeedback Application for Android676673/... · 2013-12-06 · include muscle tension, skin temperature, heart rate, respiration, blood pressure, heart rate

2.4. BIOFEEDBACK

Figure 2.5. Heart rate and blood pressure reactions to stimuli if the baroreflexworks. Taken from [5].

Figure 2.6. Heart rate and blood pressure oscillations elicited by the stimulusof respiration. Taken from [5].

subside. In figure 2.5 a normal functioning baroreflex is depicted. An elevation inblood pressure is immediately followed by a decrease in heart rate. The resultingfall in blood pressure about 5 seconds later causes a new change in heart rate (thistime an increase) which in turn causes a new change in blood pressure. This way

9

Page 19: Heart Rate Variability Biofeedback Application for Android676673/... · 2013-12-06 · include muscle tension, skin temperature, heart rate, respiration, blood pressure, heart rate

CHAPTER 2. THEORY

stimulus on the baroreflex creates an oscillatory behavior in blood pressure. Thebaroreflex is constantly effected by stimulus. Each time we inhale we get an increasein heart rate and each time we exhale the heart rate decreases. This phenomenonis called respiratory sinus arrhythmia (RSA) and is understood to be the result ofcardiac vagal efferent modulation created by respiration. [4]. Now, if we start tobreathe in a pace according to the oscillations in blood pressure the heart rate andthe blood pressure will oscillate at the same frequency and will be in a 180 phaserelationship. This will enhance the amplitude of the blood pressure variations andthereby increasing HRV. The period for one oscillation will be the 5 second delaymultiplied by two which gives a period of around 10 seconds, which corresponds toa frequency of approximately 0.1 Hz and a respiration rate of 6 breaths per minute.By training HRV biofeedback the baroreflex will be exercised and becomes moreefficient. Lehrer et al. found that HRV biofeedback training daily for about threemonths in healthy people results in a long-term increase in the resting baroreflexgain, causing a larger response in heart rate for each mm Hg change in bloodpressure. In other words, modulation of blood pressure becomes more efficient [6].

10

Page 20: Heart Rate Variability Biofeedback Application for Android676673/... · 2013-12-06 · include muscle tension, skin temperature, heart rate, respiration, blood pressure, heart rate

Chapter 3

HRV Biofeedback Solution

3.1 System Overview

SUBJECT

BLUE TOOTH DEVICE

ANDROID DEVICE

ECG

ECG

ECG

RESP

Figure 3.1. System overview of the biofeedback solution. ECG and respirationare measured by the Bluetooth device and sent by Bluetooth to the mobiledevice.

11

Page 21: Heart Rate Variability Biofeedback Application for Android676673/... · 2013-12-06 · include muscle tension, skin temperature, heart rate, respiration, blood pressure, heart rate

CHAPTER 3. HRV BIOFEEDBACK SOLUTION

The proposed Biofeedback solution consists of a Bluetooth device and an Androidapplication running on a Sony Xperia Tablet Z (see figure 3.1). The Bluetoothdevice is connected to the user with electrodes and measures ECG and respiration(Thoracic electrical bioimpedance). The Bluetooth device passes the measured datacontinuously by Bluetooth connection to the Xperia tablet. The HRV Biofeedbacksoftware processes the data and provides a graphical user interface (GUI), presentingthe parameters of interest back to the user.

3.1.1 Bluetooth Device

The hand-held Bluetooth device measures both ECG and Thoracic electrical bio-impedance (TEB). These two signals are measured by electrodes attached to theskin and connected by cables to the Bluetooth device. The ECG signal is measuredacross the thorax by two electrodes and are used to extract the RR intervals. TheTEB signal provides monitoring of the respiration. In this thesis the terms TEB orrespiration signal are used interchangeably. The TEB is measured by four electrodesacross the thorax. The TEB measuring is carried out by a high precision impedanceconverter system named AD5933 from Analog Devices Inc.[1]. This system togetherwith a synchronized ECG make up the total system.

The Bluetooth device is set at a sampling frequency of 200 Hz, and sends the datacontinuously by Bluetooth connection to the mobile device. To be able to measureTEB the device needs to be calibrated first. This is done with a 50 Ω resistor andis carried out through the software.

3.1.2 Mobile Device

The developed software for this thesis runs on a mobile device, Sony Xperia TabletZ. Running the software on a mobile device provides a convenient way to use thesoftware not being dependent of a computer which is the case with many otherbiofeedback systems. The Xperia Tablet Z runs with the operating system (OS)Android 4.2 Jellybean. It has a 10.1" screen which makes it easy to visualize all theimportant parameters in the software. The software should function on all androiddevices with Android 3.0 or higher.

Putting aside the aforementioned advantages with using a mobile device, there areof course some drawbacks. Despite the fast improvement of today’s mobile devices,the performance is not yet comparable with a computer. This yields a challengefor developing the software, considering the real-time processing of large amountsof data, and heavy computations for extracting the desired parameters.

12

Page 22: Heart Rate Variability Biofeedback Application for Android676673/... · 2013-12-06 · include muscle tension, skin temperature, heart rate, respiration, blood pressure, heart rate

3.2. SIGNAL PROCESSING

3.2 Signal ProcessingThe central part of this application is the signal processing. In order for the appli-cation as well as the biofeedback system as a whole to work satisfactory, the signalprocessing of the incoming data need not only to be reliant, but also efficient enoughto provide the user with real-time data with a minimal delay. In every step duringimplementation a Matlab prototype has been used to confirm the reliability of thesignal processing parts of the software. The two signals used are ECG and respira-tion. However, the ECG is the signal of interest for analysing purposes. The ECGis used to extract the RR interval to be able to calculate the Heart rate variability(HRV) and related parameters both in time-domain and frequency-domain.

3.2.1 Peak Detection

The first step towards HRV extraction is to detect the R peaks in the ECG signal.To accomplish this the QRS detection algorithms by Pan and Tompkins[9] havebeen implemented. These algorithms consists of six steps in order to retrieve the Rpeaks from the raw ECG signal (see figure 3.2). When an R peak has been detectedthe RR interval is calculated by counting the time since the previous R peak.

Low pass filter

High pass filter

Derivative filter

Squaring function

Moving window

integration

Thresholding and peak detection

ECG

R peaks

Figure 3.2. Block diagram of Pan and Tompkins peak detection algorithm.

3.2.2 The Lomb Periodogram

The frequency-domain parameters in this software is calculated with a rather un-conventional method. In digital signal processing, spectral components are oftencomputed with Fast Fourier Transform (FFT) or similar methods. The time se-ries which in this case is the tachogram (RR intervals vs time) have a problematicproperty, it is unevenly sampled. Calculations with the FFT requires the signalto be evenly sampled. Therefore, in order to use FFT on the tachogram, one hasto first interpolate the tachogram and evenly resample the signal. This procedure

13

Page 23: Heart Rate Variability Biofeedback Application for Android676673/... · 2013-12-06 · include muscle tension, skin temperature, heart rate, respiration, blood pressure, heart rate

CHAPTER 3. HRV BIOFEEDBACK SOLUTION

would yield large operations and considering the limited performance capacity ofthe mobile device, using FFT in this system is not optimal. Instead, there is anothermethod more appropriate to the unevenly nature of the tachogram, called the Lombperiodogram. It has been shown that the Lomb periodogram is better at estimatingHRV frequency-domain parameters than FFT [3].

Consider a discrete time-series with N observed samples x0, x1, ..., xN−1, at timest0, t1, ..., tN−1. In order to estimate the power spectral density (PSD), the meanvalue x and the variance σ2 first have to be defined by standard calculations:

x = 1N

N−1∑j=0

xj (3.1)

σ2 = 1N − 1

N−1∑j=0

(xj − x) (3.2)

The normalized PSD is then calculated with the Lomb periodogram [3]:

P (ω) = 12σ2

([∑

j(xj − x) cos(ω(tj − τ))]2∑j cos2(ω(tj − τ)) +

[∑

j(xj − x) sin(ω(tj − τ))]2∑j sin2(ω(tj − τ))

)(3.3)

where:

τ = tan−1( ∑

j sin(2ωtj)2ω∑

j cos(2ωtj)

)(3.4)

By multiplying by variance the absolute values are calculated. The Lomb method isbased on a minimization of the squared error between xj and a sinusoidal function.The parameter τ makes the periodogram time-invariant, which means identical PSDestimations are calculated no matter were in time the samples are located [11].

3.3 Software Development

The software in this thesis is developed for Android, which is a Linux-based op-erating system primarily designed for mobile devices such as mobile phones andtablet computers. Android applications are primarily written in the Java program-ming language. Before starting developing, the Android Software Development Kit(SDK) needs to be installed. The Android SDK comprise a set of developmenttools, including software libraries, debugger, emulator, documentation, sample codeand tutorials. To make development easier it is recommended to use an integrateddevelopment environment (IDE). In this project I have used Eclipse, which is theofficially supported IDE using the Android Development Tools.

14

Page 24: Heart Rate Variability Biofeedback Application for Android676673/... · 2013-12-06 · include muscle tension, skin temperature, heart rate, respiration, blood pressure, heart rate

3.3. SOFTWARE DEVELOPMENT

ECGThread

FrequencyIntentService

BluetoothThread

TEB Thread

UI ThreadTime-Domain

PlotThreads*

PSD PlotThread

Start

Start StartStart

ECG

TEB

Peak Detection

Handler

ECG,Update Array

Start

Sleep 50ms

Copy StaticArray

Notify Observer

Plot Redraw

Handler

StartMeasure

Read Data

RR interval, Update Array

Start

PSD Calculations

PSD

Start

Handler

UpdateArray

Notify Observer

Plot Redraw

PSD Param-eters

Handler

Update Text

Update Progress Bar

End

TEB,Udate Array

UpdateText

Time-Domain

Parameters

Handler

Update Progress Bar

Time-Domain Calculations

Figure 3.3. Flowchart for the different threads. Note that the time-domainplots consists of three different threads (ECG, TEB and tachogram), eachworking as illustrated in the figure.

15

Page 25: Heart Rate Variability Biofeedback Application for Android676673/... · 2013-12-06 · include muscle tension, skin temperature, heart rate, respiration, blood pressure, heart rate

CHAPTER 3. HRV BIOFEEDBACK SOLUTION

3.3.1 Data Management

When an application is launched, the system creates a thread of execution calledthe main thread or the UI thread (User Interface thread). The UI thread is re-sponsible for user interface events such as drawing events, buttons etc. Performingheavy operations on the UI thread leads to poor performance and might even blockthe UI causing the application to hang from a user’s point of view. [2]. To managethe real-time processing and visualization of data this application is accomplishedby multithreading. A thread is a concurrent unit of execution. By implementingnew threads responsible for different tasks (also called working threads) the appli-cation is allowed to perform these tasks in parallel making the software much moreefficient, and at the same time releasing the UI thread from heavy work keepingthe application responsive to user interactions. Figure 3.3 illustrates an overview ofthe implemented threads, and also a simplified flowchart to show how the data isprocessed both inside and between the threads. When the application is launchedthe UI thread is started and the user interface comes to the foreground. By hittingthe button Start the other threads are initialized and started (except for Frequencyintent service which are discussed later). Handler is a class that allows messagesto be sent between threads. Each handler instance corresponds to one thread andhandles a message queue of incoming messages. In other words, a handler waits forincoming messages and process them as they arrive. I will describe these threadsin more detail now.

The User Interface Thread

The UI thread is started when the application is launched (see figure 3.3). Oneof the fundamental rules for Android development is to always handle UI eventsfrom the UI thread [2]. This means that all the parameters we want to display tothe user on the screen has to be updated from this thread. This is managed byimplementing handlers or observers depending on the case.

Bluetooth Thread

The Bluetooth thread is responsible for all Bluetooth communication. This threadestablishes contact automatically with the Bluetooth device and stay connecteduntil the application is closed. When the user hit Start button a message is sent tothe Bluetooth device which in turn starts measuring. The Bluetooth device sendsthe data in packages of 8 bytes containing one sample of ECG and one sample ofTEB. Figure 3.4 illustrates the basic steps for reading a data package. The firstbyte in each package is a start indicator with value 255. When a start byte hasbeen read the two subsequent bytes contain the ECG sample. The first byte beingthe least significant byte and the second being the most significant byte. Thesetwo bytes gets read as an integer value. The next four bytes contains the TEB asa 32-bit float value. The last byte contains a Cyclic redundancy check (CRC) to

16

Page 26: Heart Rate Variability Biofeedback Application for Android676673/... · 2013-12-06 · include muscle tension, skin temperature, heart rate, respiration, blood pressure, heart rate

3.3. SOFTWARE DEVELOPMENT

Read byte from Bluetooth stream

If byte == 255

Read ECG,2 bytes

Read TEB,4 bytes

Calculate CRC value

Read CRC byte

If CRC is correctSend ECG sample to

ECG threadSend TEB sample to

TEB thread

True

False

TrueFalse

Figure 3.4. Flowchart of the signal processing in the Bluetooth thread.

verify that the data has been correctly processed. If the CRC is correct the ECGsample is sent to the ECG thread and the TEB is sent to the TEB thread.

ECG Thread

Figure 3.5 illustrates the ECG thread more in detail. The ECG thread receives onesample at the time. Each ECG sample gets stored in an array for the possibilityto save the raw data. Then the ECG sample gets processed by implementation ofPan and Tompkins peak detection algorithms [9] described in section 3.2.1. When

17

Page 27: Heart Rate Variability Biofeedback Application for Android676673/... · 2013-12-06 · include muscle tension, skin temperature, heart rate, respiration, blood pressure, heart rate

CHAPTER 3. HRV BIOFEEDBACK SOLUTION

Peak detection

Detected peak?

No

YesCalculate RR

interval

Respiratory cycle finished?

Yes

No

Update raw ECG array

Update RR interval array

Start Frequency Intent Service

Update heart rate, send to UI thread

Update RRmax-RRmin

Update filtered ECG array

Send RRmax-RRmin to UI thread

Receive ECG sample from Bluetooth

thread

Figure 3.5. Flowchart for ECG thread.

an ECG sample processing results in a detected peak the peak is first stored in anarray which also is plotted in the ECG plot. Then the RR interval is calculatedby counting the time since the previous peak, and subsequently stored. The RRinterval is sent to Frequency intent service which will do the frequency domaincalculations. Then the average heart rate is updated by the new RR interval. Afterthat the difference between the maximum and minimum RR interval is updated.This value is calculated for each respiratory cycle and is used in the biofeedbacktraining as a measure of HRV oscillations.

18

Page 28: Heart Rate Variability Biofeedback Application for Android676673/... · 2013-12-06 · include muscle tension, skin temperature, heart rate, respiration, blood pressure, heart rate

3.3. SOFTWARE DEVELOPMENT

TEB Thread

The TEB thread is responsible for handling the respiration signal. Each TEBsample gets stored in a static array just like the ECG signal. The respiration plotalso includes a pacer which the user is supposed to breathe in accordance to. Thispacer appears as a sine curve in the plot and is controlled from this thread byadapting to the respiration signal.

Frequency Intent Service

The spectral estimations are handled in a different way compared to the otherthreads. An Android class called IntentService is implemented. This class alsoruns on its own thread but gets instantiated and subsequently terminated eachtime it is performed. The advantage of this is that memory used for calculatingthe spectral components are freed up when it is finished. When Frequency intentservice executes the power spectrum is calculated by an implementation of the Lombperiodogram, which is sent to the PSD plot thread. Also the sum of the power ineach frequency band is calculated which is sent to the UI thread for updating textfields and progress bar.

Plot Threads

Figure 3.3 illustrates the principle scheme for the plotting. The time-domain plotsincludes three different plots, including ECG, TEB and RR interval. These plots allwork on their own background thread but follows the same principle. ECG, TEBand RR interval are stored in static arrays which means these arrays are accessiblefrom other threads. For example, the TEB samples are stored in a static array inthe TEB thread. By declaring this array as static it can be accessed by the TEBplot thread. When measuring starts the TEB thread enters a loop that waits for 50milliseconds, then copy the static array from the TEB thread and notify observerin the UI thread which redraws the TEB plot. The PSD plot works different fromthe time-domain plots. Since the spectral data is calculated in an Intent Service allvariables are destroyed when the Intent Service is finished. My solution to this isto pass the spectral components in an array to a handler in the PSD plot thread.So the handler waits for data and when it is received the PSD is updated and thecorresponding observer in the UI thread is notified.

3.3.2 User Interface

The design of the user interface (UI) is a critical part for this software in order tonot only provide a clear representation of the parameters, but also motivate theuser to achieve the desired goals. In Android development, the layout is createdin separate files written in XML (Extensible Markup Language). The UI in thisapplication is mainly built up of plots, text views, progress bars and buttons. Theplots are implemented by using the open source library AndroidPlot. Four different

19

Page 29: Heart Rate Variability Biofeedback Application for Android676673/... · 2013-12-06 · include muscle tension, skin temperature, heart rate, respiration, blood pressure, heart rate

CHAPTER 3. HRV BIOFEEDBACK SOLUTION

Figure 3.6. The first view. This is the default view when launching the appli-cation, showing from top to bottom: ECG, respiration, tachogram and powerspectral density. Bottom right corner shows the power in different frequencybands. The maximum peak in the power spectrum at 0.1 Hz corresponds to arespiration rate at 6 breaths per minute.

plots are used providing: ECG (filtered), respiration, tachogram and power spectraldensity. The UI consists of two different views that can be switched between at anytime by clicking switch view in the action bar at the top of the screen.

First View

The first view (see figure 3.6), and also the default view when launching the appli-cation, has been used during development as a control view to make sure that theparameters are correctly estimated. This view is not intended for biofeedback train-ing but might be useful for detecting errors during measurement such as electrodedisplacement. The uppermost plot show the ECG and also the detected R peaks asdots. The second plot from the top shows the respiration signal along with a pacer.The pacer is a sine curve further described in the next section. The third plot fromthe top shows the tachogram where each dot corresponds to an RR interval. Theplot in the bottom shows the power spectrum for the tachogram. The text views inthe bottom right shows the power distribution in the different frequency bands.

20

Page 30: Heart Rate Variability Biofeedback Application for Android676673/... · 2013-12-06 · include muscle tension, skin temperature, heart rate, respiration, blood pressure, heart rate

3.4. USING THE HRV BIOFEEDBACK SOFTWARE

Figure 3.7. The second view. This is the view used for biofeedback training.

Second View

The second view is the actual biofeedback training view (see figure 3.7). The plotsthat are being used in this view are the respiration and tachogram. The plot in thetop is the respiration plot. The sine curve is the pacer which is able to change todifferent respiration rates, and also adapts to the maximum and minimum valuesof the respiration signal. The default setting for the pacer is set at a respirationrate of 6 breaths per minute, and by clicking on the plus or minus buttons the usercan increase or decrease the pacer. A beep sound is also generated each time thepacer reaches a maximum or a minimum value. This sound therefore signals to theuser the either inhale or exhale. This sound can be switched off by pressing SoundOff. Three different progress bars are being used. The uppermost bar presents RRamplitude which display the difference between the maximum and the minimumRR interval within each respiratory cycle. This bar expands to the right whenRR amplitude gets larger. The middle bar represents the normalized power in thelow frequency band. The lower bar is representing normalized power in the highfrequency band.

3.4 Using the HRV Biofeedback SoftwareAs described in chapter 2, the ultimate objective of HRV biofeedback training is toincrease the variations in RR intervals, or in other words create large amplitudes in

21

Page 31: Heart Rate Variability Biofeedback Application for Android676673/... · 2013-12-06 · include muscle tension, skin temperature, heart rate, respiration, blood pressure, heart rate

CHAPTER 3. HRV BIOFEEDBACK SOLUTION

the tachogram plot. In the biofeedback training view the user can see the amplitudeof the tachogram translated into a progress bar, and the goal is to fill the bar as faras possible to the right. This is achieved by breathing at the resonant frequency,which is aided with a green sine curve with the same frequency which acts as apacer in the respiration plot. The user should breathe accordingly to the pacer inorder to reach the resonant frequency. The pacer is by default set at 0.1 Hz whichcorresponds to a respiration rate at 6 breaths per minute. However, as the resonantfrequency does not need to be exactly 0.1 Hz, the user is able change the rate ofthe pacer increasing or decreasing the respiration rate. The subject is thereby ableto test which respiration rate produces the highest RR interval oscillations, findingthe resonant frequency.

If the subject breaths consistently at the resonant frequency a peak in the HRVpower spectrum will appear at that frequency, and also the power spectrum willbe concentrated in the low frequency band. The second progress bar labelled LFcorresponds to the normalized power in the low frequency band and therefore thisbar also should be maximized, making the bar go right.

3.5 Experimental SetupTo evaluate the physiological effects of the proposed biofeedback solution, a smallpilot study on healthy volunteers have been have been executed and analysed. Thegoal of these tests was to assess the impacts on heart rate variability by the HRVbiofeedback system. The test subjects consisted of four healthy and non-medicatingadults(1 female and 3 males), in the ages of 29 to 46 years old (mean age was 35.3).Subject 1 and 2 perform physical exercise sporadically, and subject 3 and 4 exerciseon a daily basis. The test procedure consisted of three steps:

1. 5 minutes of HRV recording

2. 10 minutes of HRV biofeedback training

3. 5 minutes of HRV recording

The whole test session was carried out in sitting position. All three steps wereexecuted sequentially without any interruptions. The first five minutes were usedto establish a baseline measurement of HRV. During this step the mobile device wasnot visible to the test subject and sound was turned off. The next step consisted often minutes of HRV biofeedback training according to the description in section 3.4.The participants were instructed to start the session at 6 breaths per minute andwere regularly asked if this respiration rate felt comfortable. If any discomfort wasexperienced the respiration rate was increased. After the ten minutes of biofeedbacktraining a follow-up HRV measurement of five minutes was made (step 1 repeated).

22

Page 32: Heart Rate Variability Biofeedback Application for Android676673/... · 2013-12-06 · include muscle tension, skin temperature, heart rate, respiration, blood pressure, heart rate

3.5. EXPERIMENTAL SETUP

With these two five-minute recordings an analysis could be made to compare HRVmetrics before and after a biofeedback session, and hopefully provide informationabout the effectiveness of the treatment.

23

Page 33: Heart Rate Variability Biofeedback Application for Android676673/... · 2013-12-06 · include muscle tension, skin temperature, heart rate, respiration, blood pressure, heart rate

Chapter 4

Results and Discussion

The developed software has been proven to work satisfactory in terms of signal pro-cessing and mathematical calculations. Comparisons with reliable Matlab functionsverify that the software calculates and displays the parameters correctly. Also, thesoftware is able to accomplish this in real time as intended.

4.1 Results

The results of the test measurements are presented in table 4.1. Columns M1and M2 contains the results from the first and the second five-minute measurementrespectively (before and after biofeedback training). By comparing column M1 withM2 for each test subject the changes of HRV parameters over the biofeedback sessioncan be interpreted. Note that TP in this table denotes power in low frequency bandplus power in high frequency band (LF + HF).

Table 4.1 shows that HRV in fact has increased after the biofeedback session. Thestandard deviation of NN intervals (SDNN) increased in all subjects, with largeincreases for subject 1 and 2, and more moderate increases for subject 3 and 4.pNN50 and heart rate does not show any significant trends in these recordings. Alarge increase in LF power and total power is present in all test subjects, as expected.Figure 4.1 illustrates the power spectral density (PSD) for all test subjects. The leftcolumn shows the PSD for the five-minute recording before biofeedback training,and the right column shows the PSD for the second recording. It is clear thatboth the LF component and the total power has increased after the biofeedbacksession, as expected. The second column shows that breathing at a respiration rateat 6 breaths per minute makes the HRV to oscillate at the same frequency, thusproducing a peak in the PSD at 0.1 Hz, and furthermore that these oscillations arepresent after the biofeedback session has ended. As a complement to these analysisa more intuitive illustration of the changes of HRV is given in figure 4.2. This figuredisplays the tachogram for subject 1. The upper plot shows the tachogram for the

24

Page 34: Heart Rate Variability Biofeedback Application for Android676673/... · 2013-12-06 · include muscle tension, skin temperature, heart rate, respiration, blood pressure, heart rate

4.2. DISCUSSION

Table 4.1. Test results from measurements of four test subjects. M1 and M2 denotesmeasurement before and after biofeedback training respectively. TP denotes LF +HF.

Measures Subject 1 Subject 2 Subject 3 Subject 4

M1 M2 M1 M2 M1 M2 M1 M2

SDNN (ms) 47.4 71.7 58.5 88.7 48.0 50.9 53.3 56.4

pNN50 (%) 2.1 21.5 35.5 39.3 11.4 13.7 19.4 18.0

HR (bpm) 84 73 58 58 62 62 65 68

LF (ms2) 363 1957 514 2405 372 558 587 1389

HF (ms2) 130 475 545 567 375 436 167 135

TP (ms2) 493 2432 1059 2972 747 994 754 1524

first recording and the lower plot shows the second recording after biofeedback,illustrating an obvious increase in amplitude.

4.2 Discussion

The conclusions that can be made from these tests are that HRV is increased by theuse of the proposed biofeedback solution. SDNN and total power is increased for allfour test participants. However, while subject 1 and 2 shows significant increases,subject 3 and 4 shows more moderate increases, especially considering SDNN. Apossible reason for this might be that subject 3 and 4 ought to be considered morewell trained and had also exercised previously on the day of measurement. Sincephysical exercise increases HRV an explanation might be that the baseline HRV forsubjects 3 and 4 already was relatively high for these individuals, and subsequentlythe biofeedback training had less effect.

It is important to point out that the protocol for this biofeedback session is notoptimized. First of all, the resonant frequency was never determined in these tests,but instead all subjects used a respiration rate of 6 breaths per minute. This meansthat the optimal respiration rate for each participant was not established, and higherimprovements of HRV should be expected if the resonant frequency is used. Alsothe length of the biofeedback session could be questionable, and longer sessions oftraining might provide greater results. Furthermore, like any other training ourability improves the more we train and test measurements over multiple sessionsshould also lead to greater increases of HRV.

25

Page 35: Heart Rate Variability Biofeedback Application for Android676673/... · 2013-12-06 · include muscle tension, skin temperature, heart rate, respiration, blood pressure, heart rate

CHAPTER 4. RESULTS AND DISCUSSION

0 0.1 0.2 0.3 0.4 0.50

0.02

0.04

0.06

PS

D (

s2/H

z)

Subject 1 before biofeedback

0 0.1 0.2 0.3 0.4 0.50

0.02

0.04

0.06Subject 1 after biofeedback

0 0.1 0.2 0.3 0.4 0.50

0.02

0.04

0.06

0.08

PS

D (

s2/H

z)

Subject 2 before biofeedback

0 0.1 0.2 0.3 0.4 0.50

0.02

0.04

0.06

0.08Subject 2 after biofeedback

0 0.1 0.2 0.3 0.4 0.50

0.005

0.01

0.015

0.02

PS

D (

s2/H

z)

Subject 3 before biofeedback

0 0.1 0.2 0.3 0.4 0.50

0.005

0.01

0.015

0.02Subject 3 after biofeedback

0 0.1 0.2 0.3 0.4 0.50

0.02

0.04

0.06

Frequency (Hz)

PS

D (

s2/H

z)

Subject 4 before biofeedback

0 0.1 0.2 0.3 0.4 0.50

0.02

0.04

0.06

Frequency (Hz)

Subject 4 after biofeedback

PSD

VLF

LF

HF

Figure 4.1. Power spectral density for the five-minute recordings. Left columnillustrates PSD before biofeedback session and the right column shows PSDafter biofeedback.

26

Page 36: Heart Rate Variability Biofeedback Application for Android676673/... · 2013-12-06 · include muscle tension, skin temperature, heart rate, respiration, blood pressure, heart rate

4.2. DISCUSSION

0 50 100 150 200 250 3000.6

0.7

0.8

0.9

1

1.1

RR

inte

rval (s

)

0 50 100 150 200 250 3000.6

0.7

0.8

0.9

1

1.1

Time (s)

RR

inte

rval (s

)

Figure 4.2. Tachograms for subject 1 before and after biofeedback training.Upper plot illustrates RR intervals for the first five-minute recording and thelower plot shows RR intervals for the second recording after biofeedback session.

The performed tests indicates that the HRV biofeedback solution has positive effectson heart rate variability. However, the biofeedback protocol should be improvedby optimizing the parameters discussed previously. A more comprehensive testconsisting of a larger amount of test subjects will also reveal a deeper understandingof the effects from HRV biofeedback training.

27

Page 37: Heart Rate Variability Biofeedback Application for Android676673/... · 2013-12-06 · include muscle tension, skin temperature, heart rate, respiration, blood pressure, heart rate

Chapter 5

Conclusions

5.1 SummaryIn this thesis a software for HRV biofeedback has been developed. The software hasshown to provide accurate HRV parameters in real-time back to the user. By imple-menting the software on a tablet computer for Android the biofeedback solution ismobile and expands the possibilities for the use of biofeedback training. Performingthe required signal processing and visualization in real-time on a mobile device hasits limitations but has proven to be manageable. To evaluate the biofeedback sys-tem as a training method a set of test measurements have been performed. Thesemeasurements indicates that the use of this biofeedback solution increases HRVafter training session, but more extensive tests should be performed with a largerpopulation to provide better knowledge of the impacts from biofeedback sessions ofthe proposed system.

5.2 Suggested Future WorkFor future work with the software I recommend to implement a function for findingthe resonant frequency for each user. This can be achieved by implementing aprocedure where the user breaths at different respiration rates in an appropriateinterval, and measure which rate produces the highest HRV. More generally, newapproaches for how to visualize the biological parameters should also be considered.Perhaps the sound for aiding the respiration rate is enough and the screen canbe used for other purposes. An example could be to implement games where theoutcome depends on HRV parameters which would take the software to anotherlevel.

28

Page 38: Heart Rate Variability Biofeedback Application for Android676673/... · 2013-12-06 · include muscle tension, skin temperature, heart rate, respiration, blood pressure, heart rate

Bibliography

[1] Analog Devices. AD5933 Datasheet Document. www.analog.com/ad5933, 2013.

[2] Android Developers. Processes and Threads.http://developer.android.com/guide/components/processes-and-threads.html,2013.

[3] GD Clifford. Signal processing methods for heart rate variability. PhD thesis,Department of Engineering Science, University of Oxford, 2002.

[4] J Hayano, F Yasuma, A Okada, S Mukai, and T Fujinami. Respiratory sinusarrhythmia a phenomenon improving pulmonary gas exchange and circulatoryefficiency. Circulation, 94(4):842–847, 1996.

[5] P Lehrer and E Vaschillo. The future of heart rate variability biofeedback.Biofeedback, 36(1):11–14, 2008.

[6] P Lehrer, E Vaschillo, B Vaschillo, S Lu, D Eckberg, R Edelberg, WJ Shih,Y Lin, T Kuusela, K Tahvanainen, et al. Heart rate variability biofeedbackincreases baroreflex gain and peak expiratory flow. Psychosomatic Medicine,65(5):796–805, 2003.

[7] M Malik, AJ Camm, JT Bigger, G Breithardt, S Cerutti, RJ Cohen, P Coumel,EL Fallen, HL Kennedy, RE Kleiger, et al. Heart rate variability: standardsof measurement, physiological interpretation and clinical use. task force of theeuropean society of cardiology and the north american society of pacing andelectrophysiology. Circulation, 93(5):1043–1065, 1996.

[8] R McCraty and D Tomasino. Heart rhythm coherence feedback: A new tool forstress reduction, rehabilitation, and performance enhancement. In Proceedingsof the First Baltic Forum on Neuronal Regulation and Biofeedback, pages 2–4,2004.

[9] J Pan and W Tompkins. A real-time qrs detection algorithm. IEEE Transac-tions on Biomedical Engineering, BME-32(3):230–236, 1985.

[10] D Purves, GJ Augustine, D Fitzpatrick, WC Hall, AS LaMantia, JO McNa-mara, and LE White. Neuroscience. Sinauer Associates, 2008.

29

Page 39: Heart Rate Variability Biofeedback Application for Android676673/... · 2013-12-06 · include muscle tension, skin temperature, heart rate, respiration, blood pressure, heart rate

BIBLIOGRAPHY

[11] L Sörnmo and P Laguna. Bioelectrical signal processing in cardiac and neuro-logical applications [electronic resource]. Academic Press, 2005.

[12] G Stouffer. Practical ECG interpretation: clues to heart disease in youngadults. John Wiley & Sons, 2009.

[13] AP Sutarto, MNA Wahab, and NM Zin. Heart rate variability (hrv) biofeed-back: A new training approach for operator’s performance enhancement. Jour-nal of industrial engineering and management, 3(1):176–198, 2010.

[14] MM Wolf, GA Varigos, D Hunt, and JG Sloman. Sinus arrhythmia in acutemyocardial infarction. The Medical Journal of Australia, 2(2):52–53, 1978.

[15] C Yucha and D Montgomery. Evidence-based practice in biofeedback and neu-rofeedback. AAPB Wheat Ridge, CO, 2008.

30

Page 40: Heart Rate Variability Biofeedback Application for Android676673/... · 2013-12-06 · include muscle tension, skin temperature, heart rate, respiration, blood pressure, heart rate

Appendix A

User Guide

Following is a short guide for using the HRV biofeedback software.

1. Switch on Bluetooth device.

2. Start the HRV biofeedback application.

3. Connect a 50 Ω resistor to the TEB inputs/outputs (labelled RESP) on theBluetooth device. Then press button CALIBRATE in the top right of thescreen. This step only needs to be taken the first time after the device hasbeen turned off.

4. Connect electrodes according to the figure on the device and connect thecables in the corresponding inputs/outputs.

5. Press Start button on the screen.

6. Press SWITCH VIEW button at the top of the screen and begin biofeedbacktraining according to the previous section.

7. When finished, press Stop button. A dialog window will appear asking if thesession should be saved. If you click Yes a new dialog window will appear.Enter your name and click Save.

8. To start a new session, repeat the instructions from step 5. To close theapplication, click the home button at the bottom of the screen.

31


Recommended