You are on page 1of 6

Development of Full-Featured

ECG System for Visual Stress Induced

Heart Rate Variability (HRV) Assessment

Wanqing Wu

Jungtae Lee

Department of Computer Science and Engineering, Pusan

Department of Computer Science and Engineering, Pusan

National University

National University

Busan, South Korea

Busan, South Korea

wqwu@pusan.ac.kr

Abstract -Visual stress which can induce headache, migraines


and eyestrain affects our body often detrimentally. Heart rate
variability (HR analysis is commonly used as a quantitative
marker depicting the activity of autonomic nervous system
(ANS) that may be related to visual stress. In this paper, we
proposed an improved HRV methodology for HRV features
extraction and analysis. Firstly, a multi-channel portable EeG
device has been developed for signal collection, and then we
designed full-featured EeG monitoring system which suitable
for real-time EeG display, signal processing, high accuracy R
wave detection and HRV analysis in time and frequency
domain. Taking consideration of the simplicity and real-time,
the design of processing flow includes three stages. The first
stage is signal preprocessing, we introduced a simple and
reliable method termed the Mathematical Morphology (MM)
and Difference Operation Method (DOM) for de-noising and R
wave amplification. The second stage is to look for the point R
and extract R-R interval series based on the above processing.
The last stage focuses on HRV analysis from the aspects of time
domain and frequency domain. Moreover, this research
investigates the relationship between visual stress and HR V, 15
healthy, right-handed volunteers (all males aged from 19 to 25
years) participated in the experiment; there is significant
changes of HRV features of visual stress condition compared to
reference state. These results show that the HRV is affected by
the presence of visual stress and long-term visual stress may
weak the function of ANS, which may enable us for visual
stress monitoring and management in daily life.
Keywords: Portable EeG, Heart Rate Variability (HR,
Signal Processing, Visual Stress, Autonomic Nervous System
1.

INTRODUCTION

keffington viewed visual stress as resulting from "a


centered task which provokes an avoidance reaction
that becomes a drive to center nearer in space" [1]. Visual
stress is the experience of unpleasant visual symptoms
when focus on something, especially for prolonged
periods. Symptoms include illusions of shape, movement
and color in the text, distortions of the print, loss of print
clarity, and general visual irritation, which can also cause
sore eyes, headaches, frequent loss of place when reading,
and impaired comprehension. Visual stress belongs to the

978-1-4244-9991-5/11/$26.00 2011 IEEE

jtlee@pusan.ac.kr

general stress theory and the visual process is a dominant


function of a person in terms of operating in the world
and getting meaning from it and thus reflects the actions
of the body and mind in specific ways.
Heart rate variability (HRV) represents the variations
in the beat-to-beat alteration in the heart rate. HRV
analysis is prevalently used to assess the effect of
autonomic regulation on the heart rate. It provides a
dynamic nature of the interplay between the sympathetic
and parasympathetic branches. Sympathetic nervous
system (SNS) is flight or fight branch of autonomic
nervous system (ANS) that is essential during emergency
situations. The activation of SNS causes the increase of
sympathetic branch activity that accelerates the heart rate,
constricts blood vessels, and raises blood pressure. The
parasympathetic branch induces the relaxation response
that slows down the heart rate and decreases the force of
the heart's contractions. There is a balance between these
systems under normal situations, placing the body in a
state of homeostasis [2]. Hence, HRV can be used to
detect the change in system balance as measures of visual
stress.
However, the measurement of HRV is still a research
technique and not a routine clinical tool. There are several
potential reasons that can explain this situation. First, the
physio-pathological mechanism of HRV establishing the
direct link between mortality and reduced HRV is still not
fully elucidated. Second, despite the relative evidence of
the robust character of parameters such as SDNN and the
HRV index, there is still no consensus about the most
accurate HRV parameter for clinical use. Third, the
sensitivity, specificity and positive predictive accuracy of
HRV are limited. Finally, the most important reason is
the clinical application of HRV assessment limited by a
lack of standardized methodology due to variability of the
parameters according to ECG device, signal processing,
HRV analysis algorithm, individual's difference (such as
gender, age, drug interferences and concomitant diseases)
and so on.
The main purpose of this study is to propose a full set
of
methods
includes
hardware
design,
software
development and algorithm improvement for ECG signal

144

processing and HRV analysis, and applied it to


investigate the correlation of ANS, HRV and visual stress.
The researches have significant physiological and
psychological benefits, which can be enable stress
monitoring and management in daily life.
II.
A.

SYSTEM DESCRIPTION

Hardware module of Portable ECG (pECG)

The flash card based digital portable ECG monitoring


system illustrated in Fig.l basically consists of four major
units: active electrodes, ECG conditioning unit, digital
processing unit, and storage I transmission module.

2)

ECG conditioning unit

The ECG signal is an electrical signal generated by


the heart's beating, which has a principal measurement
range of 0.5 to 5 mV and signal frequency range of O. I to
140 Hz are usually weak and easy to be interfered by
undesired other noise [3]. Therefore, both amplification
and filtering are required for signal processing.
To meet the requirement of our ECG amplifier, it is
necessary to design an ECG conditioning unit on the
basis of cascade circuit, which consists of a differential
amplifier (instrumentation amplifier), low pass filter, high
pass filter and a gain stage. They have a typical common
mode rejection ratio (CMRR) greater than 100dB, The
ECG signals can be amplified up to 1000 times. The
bandwidth of LPF/HPF filter is set to 0.5-50 Hz for a
quality ECG monitoring. The block diagram of ECG
conditioning
unit
is
shown
in
Fig.3.
pre.amp lifier unit

Main

>
".

:>

".

L-_---.J

Figure 1.

Right Leg Driver

'----r-

The Schematic diagram of the pECG monitoring system


Figure 3.

1)

active electrodes and right leg driver

3)

With respect to the power-line noise arising from the


magnetic field, we used the electrode line in twisted-pair
form, aimed at reducing the surface area of loop circuit
which is constituted by electrode lines, according to
Maxwell's equations. Regarding the noise caused by the
electric field, we used active electrodes (composed by
voltage followers) in place of conventional Ag-AgCI
electrodes in order to overcome the imbalanced
electrode-skin impedance which results in the noise's
transform from common mode to differential mode.
Therefore, even if with the higher common mode
rejection ratio (CMRR), noise can still be magnified.
Figure 2 shows the terminal of one active electrode.
Specially, the Right Leg Driver (RL-Driver) is
implemented in this ECG measurement system to counter
common mode noise in the body, and resist the 60Hz
power line noise. The common-mode voltage on the body
is inverted amplified and then fed back to the right leg.
This negative feedback drives the common mode voltage
to a low value. The circuit of right leg driver is also
shown in Fig.2.
,Rjfl1.':I!'Jt.vr.............................. .

The block diagram of ECG conditioning unit

Secure Digital Card (SD card)

Flash memory is an ideal storage medium for portable,


battery-powered devices because it features low power
consumption and it requires no power to maintain the
stored data with its non-volatile attribute. It also has a
relatively wide operating range subjected to temperature,
shock and vibration [4].
The Secure Digital Card (SD card) is a flash-based
memory card that is specifically designed to meet the
security, capacity, performance and environmental
requirements inherent in newly emerging audio and video
consumer
electronic
devices.
The
SD
Card
communication is based on an advanced nine-pin
interface (Clock, Command, 4xData and 3xPower lines)
designed to operate in a low voltage range. The SD Card
interface allows for easy integration into any design,
regardless of microprocessor used. For compatibility with
existing controllers, the SanDisk SD Card offers, in
addition to the SD Card interface, an alternate
communication protocol, which is based on the Serial
Peripheral interface (SPI) standard. The block diagram of
SO card is shown in FigA .

........_-_._- _ ... _--------

"'

oNAI28

A!.
<1,,"00.

l.MC6464

"""",

SO BusiSPI
Interface

Micro
Controller
(MCS51)

Data In/Out
Control

Flash
Modules

IohIsSV

Figure 2.

The active electrodes and right-leg driver circuit

978-1-4244-9991-5/11/$26.00 2011 IEEE

Figure 4.

SD Card Block Diagram

145

Despite AT89C51 chip has neither SD card hardware


controller, nor SPI interface module, we can use software
to simulate SPI time series. Due to the logic level of SD
card to be equivalent to 3.3V TTL level standard,
however, the logic level of micro-controller (AT89C51)
is about 5V CMOS level standard, thus, SD card cannot
be connected with micro-controller directly. First of all, it
is necessary to design an electrical level transfer circuit
for the level matching between SD card and
micro-controller. Otherwise, data write-in method of SD
card taking the block as the unit (512 byte) whereas the
internal RAM of AT89C51 is only 128 byte, thereby, a
static random access memory (SRAM) chip KM6264
with 8K byte capability is added to this application. The
interface design between SD card and AT89C51 is
depicted in Fig.5.

B.

Software module of Portable ECG

Electrocardiographic (ECG) signals may be corrupted


by various kinds of noise, typically examples are: power
line interference, electrode contact noise, motion artifacts,
muscle contraction, baseline drift, instrumentation noise
generated by electronic devices used in signal processing,
electrosurgical noise and other, less significant noise
sources [5]. The disastrous effect of noise is severe
distortion of ECG waveform, the loss of important ECG
signal information and deviation of HRV parameters.
Because the noises cannot be filtered completely by
ECG conditioning unit, so a computer-based module
named as ECG Viewer which comprised of waveform
display
component,
signal preprocessing module,
adaptive R wave detector and a HRV analysis component.
Fig.7 shows the flowchart of ECG Viewer.
R.w E CG
Sil!l1.i

r------ r------

---W--

L...

Wavefonndisplay

p:

component

I
I
I
I NonLinear I
I
Filtering I

Linear
Filtering

L _____ L _____ ..!

IY

Preprocessing Stage

r------

r------

I
I
II
Peak
. .
.
I 0 eclon
II DeciSion I
I
Rules
I
II
L ___ __I l ______,

Sl

Adaptive R wave detector

r---------,

Re-sampling

Algorithm
I
I
L _________ ,

R-R interval
Series

HRV analysis component

Figure 5.

The schematic of hardware interface design

In order to realize the read/write operation of SD card,


firstly, it is essential to initialize SD card by adopting
reset functional module which defined in this system and
set SD card to SPI mode. After initiation stage, we can
read or write SD card through corresponding read/write
command and function. Importantly, all the operations
should follow the SD card time series which defined in
SD card specification.

4)

Prototype and PCB device

of ECG conditioning unit goes to the digital circuit part.


inexpensive

(AT89C51)

and

8-bit

8051-based

12-bit

resolution

J)

The flowchart of d ECG Viewer

Waveform display component


A

digital

60Hz

notch

filter

was

integrated

line interference in real time. The digital filter in this


research is FIR filter with hamming windows. The filter
is a band-pass filter, cut-off frequency between 3 Hz to 40
Hz, which is screen out other components such as P wave,
T wave, and baseline drift from human motion [6]. The

microcontroller
A/D

converter

(LTCI274) are employed in this design. The prototype

wave frequency spectrum is higher than 10 Hz, and lower


than 40 Hz. The cut off frequency at 40 Hz can protect
the noise from power line (60Hz). The sampling rate is
512 Hz because we interested in R wave. After filtering,
the ECG signal has been shown on Fig.8.

and PCB device of pECG is shown in Fig.6.

Figure 8.
Figure 6.

to

waveform display component for minimizing the power

normal ECG spectrum is around 3 - 40 Hz [7]. The R

After amplification and filtering, the analog output


An

Figure 7.

Prototype of ECG acquisition system

978-1-4244-9991-5/11/$26.00 2011 IEEE

2)

The filter result after FIRlNotch filter

Preprocessing stage

146

Multi-scale Mathematical Morphology (3M filter),


based on set operations, provides a way to analyze signals
using nonlinear signal processing operators that
incorporate the geometry information of the signal. The
shape information of the signal is extracted by using a
structure element to operate on the signal, such operators
serve two purposes, i.e. extracting the useful signal and
removing the artifacts [8].
Erosion and dilation are the two basic morphological
operators, termed byEeand 8, respectively. The dilation
and erosion of a signal f (t) by a structuring element (SE),
g(s) are depicted as follows, respectively [8]:

(f Ee g)(t)
(f 8 g)(t)

maxs{f(t - s) + g(s)}

(1)

mins{f(t

(2)

s) - g(s)}

Blackman-Nuttall window which has similar shape with


R wave. Results of applying this algorithm to ECG signal
are shown in Fig.10.

Baseline Signal

Another two popular morphological operators are


opening and closing, defined respectively as:

fog
f g

(f 8 g) Ee g

(3)

(f Ee g) 8 g

(4)

In this stage, the 3M filter used to eliminate baseline


drift and reduce interference noises (motion artifacts,
muscle contraction), which includes two steps: impulsive
noise suppression and waveform normalization. The
block diagram of the algorithm is shown in Fig.9.
FIRJNotch filter

Structuring Element
10

..(}

Outpnt Signal

Figure 9.

14 11011161922252Ul34]74043464952555861

Block diagram of 3M filter

The most important operation is to design proper


structuring element (SE) which depends on the shape of
the signal that is to be preserved, since the opening and
closing operations are intended to remove impulses, the
SE must be designed so that the waves in the ECG signal
are not removed by the process. The values of SE is
largely determined by the duration of the major waves
and the sampling rate, denoting the duration of one of the
waves as T sec and the sampling rate as S Hz, the length

Figure 10.

The filter result after 3M filter

After 3M filter, the output ECG series is differentiated


by Differential Operation Method (DOM) [10] in order to
further remove motion artifacts and baseline drifts.

3)

Adaptive R wave detector

The output signal of preprocessing stage then


transformed to the adaptive R wave detector. The
flowchart of this stage is shown in Fig.6.
This adaptive R wave detection algorithm includes
three steps: candidate R wave detection, R peak judgment
and adaptive threshold update. The first step is to search
the preliminary amplitude threshold (ARInitial) and the
location of the first R peak in initial 512 samples. And
then according to general R-R interval (0.4 to 1.5 sec),
decision processes make the final determination as to
whether or not a detected event was a R peak, if the
detected R-R interval is greater than 1.5 sec (40bpm),
normally implied a false detection of R wave, else if the
detected R-R interval is less than 0.4 sec (l 50bpm),
probably generated a missing detection. Finally, Adaptive
amplitude thresholds applied to the sample series based
on continuously updated estimates of the peak signal
level and R-R interval. Each of the stages in this R wave
detection algorithm is explained in Fig.l l .

of the SE must be less than T X S [9].


Impulsive suppression was used to further decrease
60Hz power line noise. Waveform normalization is
performed by estimating the drift in the raw ECG signal,
and subtracting it from incoming data. The waveform
drift is estimated by removing the ECG signal from the
data. In this step, two structuring elements are used: one
for removing peaks and the other for removing the pit left
after the previous operation. By considering of the shape
information of ECG signal, the SE is modeled as

978-1-4244-9991-5/11/$26.00 2011 IEEE

R- R interval series
Figure

II.

Schematic of R peak detection algorithm steps

147

4)

HRVanalysis component

III.

In the frequency-domain methods, a power spectrum


density (PSD) estimate is calculated for the R-R interval
series. The regular PSD estimators implicitly assume
equidistant sampling and, thus, the R-R interval series is
converted to equidistantly sampled series by interpolation
methods prior to PSD estimation. In the software a cubic
spline interpolation method is used and the HRV
spectrum is calculated with FFT based Welch's
periodogram method. In the Welch's periodogram
method the HRV sample is divided into overlapping
segments (128 points). The spectrum is then obtained by
averaging the spectra of these segments. This method
decreases the variance of the FFT spectrum. The
frequency-domain measures extracted from the PSD
estimate for each frequency band include absolute and
relative powers of VLF (0-0.04 Hz), LF(0.04-0.15 Hz),
and HF(0.15-0A Hz) bands, LF(n.u.) and HF(n.u.) band
powers in normalized units, the LFIHF power ratio, and
peak frequencies for each band [11].
The time-domain methods are the simplest to perform
since they are applied straight to the series of successive
RR interval values. The most evident such measure is the
mean value of R-R intervals

(RR) or, correspondingly, the

mean HR (HR). In this application, we adopted the


standard deviation of R-R intervals (SDNN) for time
domain analysis.
Table!. Description and definitions of HRV parameters [II)
Units Description

unit

Variable

Selected Time Domain Measures of HRV


SDNN

ms

Standard deviation of all NN interval

Mean RRI

ms

Average R-R interval

Selected Frequency Domain Measures of HRV


LF/HF ratio
Normalized
LF

Normalized
HF

A.

Reflect sympathetic activity

n.u.

Reflect parasympathetic activity

Participants

Fifty healthy subjects (all males aged from 22 to 30,


and no prior history of cardiovascular disease) took part
in this study. Before the experiment, questionnaires were
administered for general personal information (age, sex,
disease history and risk factors). The subjects are asked to
be free of coffee and alcoholic drinks at least three hours
before each experiment. The laboratory environment is
kept at room temperature, and the subjects are posed in a
sitting position during the experiments. Lead II and III
ECG signals are acquired simultaneously for each subject
under the controlled conditions.
B.

Procedures

All subjects are tested during a rest state session and a


stimulus session. During the rest state session (S1), no
stimulus was presented. ECG recordings in the rest state
were performed over a period of 5 minutes. All subjects
were instructed to keep their eyes closed in order to
minimize blinking and eye movements, and asked to
adjust respiration rhythm. And then, we investigated the
effect of stressor according to different degree of visual
stimulus, by using landscaped movie (S2) to induce
positive stimulus, and a monochrome cross picture to
induce visual stress. During the visual stimulus
experiment (S3), the subjects were asked to stare at the
black and white picture and keep their body in resting
state for 5 minutes. The subjects seated in relaxed posture
for 5 minutes under the rest state and non visual stress
state.
IV.

reflect sympatho-vagal balance


n.u.

A.

The successful implementation was evidenced in the


overall results where a clean stream of ECG signals was
displayed in real time and analyzed on the PC, which is
shown in Fig.12.

METHODS

RESULTS AND ANALYSIS

Time Domain Analysis

Fig.13 shows the RRI series of a subject during


different stimulus states, we can see clearly that both
mean instantaneous RRI and the variability of RRI were
large when the subject was at rest or normal state, and
became smaller during the visual stress state, which is a
widely accepted physiological phenomenon.
Time domain analysis results show that the mean
value of inter-beat interval during rest state was 762 msec,
it apparently increased to 904 msec during visual stress
state, and has no significantly change compared to normal
state (792 msec). It is obvious that the mean SDNN value
of rest state (36.518) and normal state (36A13) is
significantly different from visual stress state (31.117).

[AR!,__ )
00-0

Im/Offl

0-

llO.u..l ...

:::::,Ti,::.:",.:ain:
SOWI

G05'

IINSSO'I"

,!!,cy Domain
..
_.

t.r

..

'"

5U1

......

,,

f.

"I
<

_Jd

lv- I ..
P d'I !
rFT)
'tbic,spline Rsa
_ _

'

PSD

w_,

!,

Figure 12.

,
>

___ _

""",,=.

r-vl1'('f.,,\I:.""j '" I .,.. .....'1 1tqr

/-

r1
;---t;
piing

il:'lJ'l\:t)Nl'"O'''\M.rl.,

....-

/-

Software module of pECG

978-1-4244-9991-5/11/$26.00 2011 IEEE

..J......

Figure 13.

RRI series of different visual stimulus

148

B.

Frequency Domain Analysis

Referred to baseline period, frequency domain


analysis results show that both of mean LF power and HF
power
increased
during
visual
stress
state.
Correspondingly, the mean value of ratio between LF and
HF increased. The comparisons of HRV measurement
parameters in different stimulus are shown in Table II.
TableI!. Comparisons of HRV parameters in different stimulus

unit

SI

S2

And next, we are planning to measure the ECG and


Electroencephalogram (EEG) simultaneously with respect
to visual stress. The feasibility of using the mobile ECG
sensor in monitoring HRV may enable stress monitoring
and management program anywhere and anytime. In
conjunction with increasing capability of mobile phones,
comprehensive study of mobile ECG sensing technology
is required to advance personal stress management
programs in near future.

S3

REFERENCES
[1)

Skeffington AM . Nearpoint optometry. Santa Ana, CA:Optom

Mean RRI

ms

762107

792158.

90443

SDDNmcan

ms

36.518

36.413

31.l17

LFmean

ms2

439335

475325

520281

Heart Rate Variability Using a Prototype Mobile ECG Sensor",

HFmean

ms2

225195

232204

290238

Information Technology, 2006, Vo!. 02, pp. 453-459.

2.152.2

2.151.6

2.382.96

LF/HFmcan

Our study was aimed to investigate whether persons


who suffered from visual stress have the imbalance in the
functionality of the ANS as determined by HRV, which is
commonly used to evaluate parasympathetic tone and
sympatho-vagal balance. By examining the results
presented above, we can see clearly that the relationship
between visual stress and HRV features. Under the state
of visual stress, sympathetic nerve was activated which
caused LF power increased and the HF power
representing the parasympathetic also increased for
parasympathetic modulation. Consequently, the balance
of sympatho-vagal was upset which induced the LF to HF
ratio increases. The inside stress of body produced by
sympathetic activation cannot be released appropriately,
which resulted in a decrease in heart rate variability and
an increase in mean R-R interval.

Extension Prog CUIT 2; 1950


[2)

Lizawati Salahuddin, Desok Kim. "Detection of Acutes Stress by


Proc.

[3)

IEEE

ICHIT'06

[nternation

Conference

on

Ying-Chien Wei, Yu-Hao Lee, Ming-Shing Young.

ECG

Signal Monitor and Analyzer",

Hybrid

"A Portable

Proc. IEEE [CBBE2008.The

2nd International Conference on Bioinformatics and Biomedical


Engineering, 16-18 may,2008, pp. 1336-1338.
[4)

Tacim Deniz ja Atila Yilmaz. "Design and implementation of a


digital ambulatory ECG recorder based on flash MultiMediaCard
memory", Proceedings of the 46th IEEE [nternational Midwest
Symposium on Circuits and Systems, Kairo, Egypti,joulukuu,
2003, volume I, s. 368-371.

[5)

Friesen, GM, Jannett, TC, Jadallah, MA, Yates, SL, Quint, SR,
and Nagle, HT. (1990): 'A comparison of the noise sensitivity of
nine QRS detection algorithms',IEEE Trans. Biomed. Eng.,VoI.37,
pp. 85-98, doi: 10.1109110.436200

[6)

Naiyanetr

P.,

Watanapa

B.W.,

Wongrojira

K.,"R-R

interval

detection with Cardiovascular Autonomic Function test system, "


The Third International Symposium on Communications and
Information Technologies, [SCIT 2003, pp335-337.
[7)

Mitra SK., Digital Signal Processing A Computer-Based Approach.

[8)

Fei Zhang, Yong Lian. "Electrocardiogram QRS Detection Using

Singapore: The McGraw Hill Company; 1998. p.15.


Multisca[e

Filtering

Based

on

Mathematical

Morphology".

Proc.[EEE Conf. Engineering in Medicine and Biology society,

V.

CONCLUSION AND DISCUSSION

In modem times, a number of people who spent much


time in front of computer are easy to suffer from visual
stress which affects our body often detrimentally. In order
to study on the relationship between HRV features and
visual stress, a non-invasive multi-channel ECG
monitoring system has been designed and implemented,
and a series of experiments have been done to assess the
changes of HRV features under the visual stress state.
The results show that the HRV is affected by the presence
of visual stress and long-term visual stress may weak the
function of ANS, which may enable us for visual stress
monitoring and management in daily life.

978-1-4244-9991-5/11/$26.00 2011 IEEE

France,August 23-26, 2007, pp. 3196-3[99.


[9)

CHEE-HUNG

HENRY.

CHU,

E.1.

Delp,

Impulsive

noise

suppression and background normalization of electrocardiogram


signals using morphological operators, IEEE Trans. Biomed. Eng.
Vol.36 (No.2) (1989) 262-273.
[10) Yun-Chi Yeh, Wen-June, Wang, "QRS complexes detection for
ECG

signal: The

Difference

Operation

Method",

Computer

Methods and Programs in Biomedicine., Vo!.91,pp. 245-254,doi:


10.1016/ j.cmpb.2008.04.006.
[11)

Ali

Dorukl,

Ciyiltepe,

Turner

Atilla

Turkbay, Zekeriya

iyisoy,

Levent

Sutcigil,

Yelbo.a,
Aytekin

Muzeyyen
Ozflahin.

"Autonomic Nervous System [mbalance in Young Adults with


Developmental

Stuttering",

Bulletin

of

Clinical

Psychopharmacology, Vol. 18, pp. 274-281, April 2008.

149

You might also like