You are on page 1of 33

FOREWORD

Another semester has passed, but this is one I will remember longer than
others. I feel privileged to grow up in a time were it is easier than ever to study,
travel and explore whatever world one wants to explore. I am also very grateful
to be one of the many students who every year has the chance to spend one
semester in another European country, through the ERASMUS network.
My semester was spent in Latvia’s capital Riga, where I did my master thesis
work. The result of the work is an application which is not completely developed,
and the work with the application will continue after I hand over the project.
My intention is consequently to write a report, where I share my experiences of
working on the application and present my solutions for the person or persons
who continue my work, or similar works. Another intention of my report is
to present arguments for why new applications using photoplethysmography
(PPG) should be developed. This is done by a presentation of recent studies in
the field.

1
ACKNOWLEDGEMENT

Many thanks to Prof. Janis Spigulis and PhD student Renars Erts at the
University of Latvia, Institute of Atomic Physics and Spectroscopy. They made
me feel welcome and well taken care of during my time at the institute. The
inspiration and supervision they have given is invaluable. I am also grateful
to Prof. Göran Salerud at Linköping University, the Department of Biomedical
Engineering. Besides all work with the examination of the project, he has helped
me with the coordination of the exchange program.
Finally also thanks to Aino Järveläinen for being supportive and for helping
with the proofreading of the thesis.
Rasmus Andersson
Linköping, September 2006

2
CONTENTS

1 Preface 5
1.1 Background . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.2 Problem definition . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.3 Outlines of the thesis . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.4 Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

2 Photoplethysmography 7
2.1 History . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.2 Basic principles . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.3 Contour of the PPG-signal . . . . . . . . . . . . . . . . . . . . . 8

3 Research in the area 10


3.1 Signal components . . . . . . . . . . . . . . . . . . . . . . . . . . 10
3.2 Multi-channel PPG . . . . . . . . . . . . . . . . . . . . . . . . . . 10
3.3 Mean-algorithms . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

4 PPG-systems 13
4.1 General system . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
4.2 Commercial applications . . . . . . . . . . . . . . . . . . . . . . . 14
4.3 Dual and multi-channel applications . . . . . . . . . . . . . . . . 14

5 Environment of developing 15
5.1 Microcontroller . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
5.2 Development board . . . . . . . . . . . . . . . . . . . . . . . . . . 15
5.3 Compiler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

6 Application developing 18
6.1 Starting-points . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
6.2 Flow diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
6.3 Limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
6.4 Real time systems . . . . . . . . . . . . . . . . . . . . . . . . . . 19

7 Application Overview 21
7.1 Sampling and presentation . . . . . . . . . . . . . . . . . . . . . . 21
7.2 USART . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
7.3 Heart rate estimation . . . . . . . . . . . . . . . . . . . . . . . . 22

3
8 Implementation 23
8.1 Interrupts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
8.2 Circular ques . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
8.3 Presentation on GLCD . . . . . . . . . . . . . . . . . . . . . . . . 24

9 Results and discussion 25


9.1 Evaluation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
9.2 Advantages and limitations . . . . . . . . . . . . . . . . . . . . . 26

10 Conclusions and future work 27


10.1 Brief summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
10.2 Suggestions for improvement of the system . . . . . . . . . . . . 27

4
1.
PREFACE

The work with this theses was mainly carried out at the Institute of Atomic
Physics and Spectroscopy at the University of Latvia. The defending took place
at the Department of Biomedical Engineering at the university of Linköping.

1.1 Background

Photoplethysmography (PPG) is a noninvasive biomedical technology, which


derives from Hertzman’s work which started in 1937. With this technique it
is possible to examine how blood volumes change in the vascular bed, and is
commonly used in medical diagnostics.
New research in the area has explained the use for PPG-equipment with
multiple layers. By comparison of the PPG-signal from different parts in the
body vascular disorders can be diagnosed.
Equipment which combine the wish for multiple layers with a modern tech-
nique solution, would give a portable system which can do examinations faster.
An equipment like this would should be further researched.

1.2 Problem definition

The assignment of this work, is to program a microcontroller in a applica-


tion which can detect and present ppg-signals on a GLCD-screen from multiple
channels in real time.

1.3 Outlines of the thesis

This thesis has been divided into two parts, one part being the more theo-
retical part, which includes chapters 2-5. Chapter 2 and 3 are related to photo-
plethysmography and the research of this area. These two chapters are a result
of a literature overview, which has been one part of the task for the thesis. In
chapter 4 a brief overview of existing application is done. Chapter 5 is more

5
technical in it´s nature and introduce the equipment which has been used to
follow out the task. Here the features and performances of the microcontroller
and developmentboard are presented.
The second part includes the remaining chapters and is an analysis of the
performance. Chapter 6 is dedicated to describe the basic performances which
the system shall be able to perform. The limitation and problems are also
analyzed here. The report continues with one chapter which is an overview of
the result of the work and how to use the system. A brief description of the
implementation is presented in chapter 8. In the last two chapters a discussion
on the result is done, as well as a summarisation of the final conclusion.

1.4 Method

The task of the thesis was defined by my supervisor. During the work some
circumstances in the requirements has led to changes in the task.
The studies have contained a literature overview of photoplethysmography
and a pilot study to investigate the possibilities of the development environment.
The literature overview has been used to lay the basis for what features and
performances the application has.

6
2.
PHOTOPLETHYSMOGRAPHY

In this chapter an overview of the area is presented, based on research of


the field. The chapter starts with a brief history review and continues with the
physical principles, and finally an analysis of the typical PPG signal curve.

2.1 History

In the mid 1930’s the first reports of how to measure blood volume changes
in tissue with light was published. One of the first scientists who did research
in this area was Hertzman who published his first paper in the area 1937 [7].
He continued with research during the three decades to come, and built a solid
base for PPG. Contemporaries to Hertzman demonstrated changes in skin blood
flow due to external influences. During the first four decades many applications
where PPG was applied to the skin were founded. For example investigations
of the effects of drugs, and assessment of the effectiveness of vascular surgery
[5].
The early set-ups utilized tungsten lamps as light sources [5], and this light
had a broad spectra of wavelengths. Today the development of semi-conductor
technology has caused that Light Emitted Diodes (LED:s) is the most common
light source, and the effects of different wavelengths has been exhaustively inves-
tigated. Other research in the area has made a survey of frequencies components
in the signal.

2.2 Basic principles

Normally one looks at the body as rigorous, as something which visible light
cannot penetrate. For soft tissue this is definitely true, which is best illustrated
if you imagine how you hold your hand against a strong lamp in a dark room.
You can see that some light transverses, and this light is often colored red. The
red color occur because of the absorbtion in blood cells. Some light is also
reflected in tissue, but also in this light some wavelengths have been absorbed
more than others. The basic idea of photoplethysmography is to detect this light,

7
transmitted or reflected, and observe the changes of intense. The intensity is
presumed to change by the pulsation of blood in vascular.

2.3 Contour of the PPG-signal

The complexity of the PPG-signal makes it difficult to tell what the expec-
tations of a PPG-signal could look like. The signal depends of wavelengths of
light, signal processing, and what is measured. A commonly used simplification
is to refer to all low frequency components as DC-components [17]. The more
high frequency components that originate from the heart rate, and often the
focus of the studies, are referred to as the AC-components (see figure 1).

Figure 1: The PPG signal curve is divided up in a DC component and a AC


component. A simplification of its complex nature.

This being a simplification of something greatly more complex. The AC-


component characteristics differ between subjects, and therefore it can be used
for medical diagnostics. For example we get different results depending on the
age of the subject, related to differences in artery stiffness, arteriosclerosis etc
[11]. If the subject is a healthy young person, we can expect a contour of the
PPG-signal, as in figure 2, a waveform with a steep rise and a notch on the
falling slope, the dicrotic notch. In a study by Hlimonenko et al., we can see
how the dicrotic notch disappears with the increase of age in the subjects [8].
The characteristic of the PPG signal curve is also body site specific, with
differences in shape, pulse, transit time etc. But two signals detected from
anatomically symmetric sites simultaneously, from a healthy subject can be
expected to be highly correlated [1].

8
Figure 2: An typical ppg-curve for one pulse wave initialized by heart-beat

9
3.
RESEARCH IN THE AREA

This chapter was written with the purpose of rendering research in the area.
In particular it is oriented towards analyzing what has happened recently in the
area, and why the need for new applications has arisen. Thereby the chapter
also works as a background for my task. Some of the research which is presented
is out of outside the limits for the task, and is included as a reminder of why
other applications can be needed for other tasks.

3.1 Signal components

The PPG signal is complex in its nature. The simplification of referring to


low frequent components as a DC component, as in section 2.3, exclude several
body functions which show in the PPG signal. Besides the signal component
which originate from the heart rate, there is the component which originate from
the respiratory rate, the one which has been in focus for most studies. Table
3.1 gives an overview of body functions which correspond to signal components
in the PPG signal.

Frequency range (Hz) Origin


0.67 - 3.33 Heart rate
0.08 - 0.67 Respiratory rate
0.09 - 0.11 Blood pressure regulation
0.067 - 0.15 Vasomotion
0.03 - 0.05 Temperature regulation

Table 1: Frequencies of the signal components of the PPG-signal for adults. [17]

3.2 Multi-channel PPG

By using multiple channels you can detect and compare PPG-signals from
different parts of the body. Several of the more recent studies have used equip-
ment which simultaneously have detected PPG-signals in various body sites [1]

10
[2] [3] [4] [12] [14] [13] [6]. The studies of J Allen and A Murray investigate
differences between bilateral PPG-signals detected on anatomically symmetric
sites on the human body (for example both index fingers) [1] [2] [3] [4]. The
characteristics of the PPG-signals from two anatomically symmetric sites can
be supposed to be highly correlated for a healthy subject [1]. It is accepted that
arterial stiffness increase through ageing, and this includes a changing in the
shape of the PPG-signal. The Pulse Transit Time(PTT) seems to be decreased
as a function of the subject’s age and systolic blood pressure [12] and older sub-
ject’s also seem to have an elongation of the systolic rising edge and a damping
of the dicrotic notch [3] [4].
This work was expended by studies at the University of Latvia, these studies
propose that multi-channel PPG can be used to detect several occasions of
changed resistance in vessels [13]. More specifically, it has been shown that the
benefit of using multi-channel PPG is for diagnosing arterial stenosis in legs [6].

Figure 3: The difference between Pulse Wave Transit Time for two channels.

The principle R Erts et al. uses in the study is that increased resistance in
vessels brings increased Pulse Wave Transit Time (PWTT) [6]. PWTT means
the time between heart contraction and the resulting beginning of the steep raise
in the PPG signal curve. The signals recorded from anatomically symmetric
sites of the human body is compared and in a healthy subject their should only
be a negligible time delay between the two channels (as in figure 3).

11
3.3 Mean-algorithms

The complexity of the signal and its sensitiveness for disruptions, makes it
interesting of mean-algorithms for the signal. Normally these are taken out over
a single pulse period. A proposal for how to do this was suggested by J Spigulis
et. al. by the single pulse photoplethysmography (SPPPG)-algorithm [15]. The
use of this algorithm gives a better validity when you calculate information from
the curve, or just watch its general shape.

12
4.
PPG-SYSTEMS

To gain a better understanding of photoplethysmographys field of appli-


cation, existing solutions have been studied. This chapter summarizes some
existing applications, both commercial and applications in use for research.

4.1 General system

In different kinds of systems the solutions from emitting light to monitoring


the signal differ a great deal. Figure 4 illustrates a set-up for a general appli-
cation. Simplifying, there are three steps emitting/detecting, signal processing
and monitoring. The first step can differ in what kind of light which is emitted,
the absorbtion in tissue differ by the wavelength. There are also two different
kinds of solutions in regards to the receiving photo detector. These can be po-
sitioned either adjacent to (reflection mode) or opposed to (transmission mode)
the light source. The received signal is normally noisy and has only minor dif-
ferences in amplitude and that is why there needs to be signal processing. The
signal processing consist normally of amplification and band-pass filtering. The
most common thing to monitor is the heart rate, but also the respiratory rate
is sometimes monitored by photoplethysmography [17]. In earlier applications
the analog signal was monitored by oscilloscopes et cetera, but today it is more
common with digital applications.

Figure 4: Typical set-up for a reflection mode system

13
4.2 Commercial applications

In commercial applications there are many systems which use photoplethys-


mography in combination with other techniques. Monitoring the PPG-signal
together with the electrocardiogram (ECG) is a common practice in applica-
tions for an overall heart-rate monitoring. Another example of a hybrid which
gives useful systems is combination of a doppler and PPG [9]. To the au-
thor’s knowledge there are today no commercial applications which monitor
ppg-signals from multiple channels.

4.3 Dual and multi-channel applications

In the research of this field there has been nearly as many applications
developed as there has been studies. Recently some applications with multi
channels has been introduced. One application is used in J. Allen and A. Mur-
ray’s research of bilateral examinations [1] [2]. The application first has elec-
tronic amplifiers then it is digitalized via a DAQ-card (National Instruments
AT-MIO-16-2). The signal processing is then done in MATLAB, using their
functions for digital processing. The system is using a butterworth filter for
both low-pass-filtering and high-pass-filtering (0.5 & 20 MHz). Another multi-
channel system has been used at the University of Latvia, with four channels
for PPG-measurement [13] [6]. The system is similar in edification, and also
uses a computer for monitoring.

14
5.
ENVIRONMENT OF DEVELOPING

This fifth chapter is separated from the other theory chapters in the aspect
that this is concentrated on the technical equipment used for developing. Here
the development tools which have been used in the project are introduced.

5.1 Microcontroller

The microcontroller chosen for this system is a PIC18F4620. The device has
40 pins, and is equipped with 4 timer modules and an A/D-converter with 13
channels. The program memory constitutes of as flash memory at 64 Kbytes,
and the data memory constitutes of a SRAM at 3986 bytes and a EEPROM at
1024 bytes. [10]
The proportionately big amount of storage, comparing to other microcon-
trollers in the PIC18-family, is needed to enable a buffer from samples of the
multi-channels. Since the system does not include an extern oscillator the intern
oscillator in the microcontroller is used. The microcontroller can without using
the 4x Phase Look Loop (PPL) feature, work with frequencies up to 8 MHz
[10].
The microcontroller is also equipped with several solutions for communica-
tion. Beside the Master Synchronous Serial Port(MSSP), there also is a mod-
ule for Enhanced Universal Synchronous Receiver Transmitter (EUSART). The
EUSART is useful for communication with computers.

5.2 Development board

For this project an easyPIC3-board from MikroElektronika was used. This


board has many features which make the development easier. The board has
diodes and press buttons in connection with all I/O pins on the microcontroller
and it also has connectors for both LCD and GLCD-screens. The power supply
can be chosen from both an external source or from an USB-port. The USB is
also used to program the controller. Output port from the board includes both
an USB and a serial port. All the I/O ports can be connected through ICD
connectors.

15
The serial communication from the development board uses the RS-232 Stan-
dard (EIA232 Standard). The board can easily be connected by a DB9-male
socket and can be read from a standard communication-port of a computer [16].

Figure 5: The development board, an easypic3 from MikroElektronika.

16
5.3 Compiler

For coding, compiling and programming, software from MikroElektronika


was used. The compiler, MikroC, has an advanced Integrated Development
Environment (IDE), and an integrated software for flash-programming using the
USB. An existing tool for debugging is included in the software. The compiler
also has existing libraries adjusted for the development board enclosed. The
libraries include for example functions for getting data from the AD-converter
and functions to control the GLCD-screen.

Figure 6: The compiler software. MikroC from mikroelektonika.

17
6.
APPLICATION DEVELOPING

6.1 Starting-points

To get a starting-point for the developing of the application, some demands


were designed. The main demands are described below.
Realtime presentation The microcontroller should be able to detect and present
the sample in realtime, which means that the time from detection to pre-
sentation should not exceed a determined level. It is also desirable to make
this time as short as possible.
Multi-channeled detecting The application should be able to detect and display
ppg-signals from more than one different channel.
USART-transfer The application must be able to send the unprocessed data to
USART.
Good resolution To get useful information the sampling has to be fast enough
to make it possible to distinctly monitor the signal. It is desirable to
sample the signal with a minimum of 30 samples per heartbeat.
Multiple sample speeds The system should be useful for examination of human
subjects. Which means that it should be able to present heart rates be-
tween 30 to 200 heartbeat per second. The demand on the system is that
at least heart rates up to 100 heartbeats should be monitored with good
resolution.

6.2 Flow diagram

A flow diagram over the program is presented in appendix B. The idea is


that the program spends most of the time in a main loop during the medical
examination. Several things are suggested to take place in the main loop. The
data is processed here and monitored on the GLCD-screen. New commands from
the user on the keyboard are processed. Data transfer is done by the USART if
this is requested. And finally a heart rate estimation is done if there is enough
time for this (See 6.3). The main loop computes one sample value at a time and
deletes this sample from the buffer. The buffer is continuously filled with new

18
samples during the interrupts, which take place with a constant sample time.
When the interrupt routine has been run, the program continues at the same
address it was on when the interrupt occurred. If the user gives a command to
stop the sampling, the program freezes in a standby mode which waits for the
user to start sampling again. The GLCD-screen shows the PPG signal curve up
to the point where the stop was commanded. During this process the processor
is still active and not stand by in the sense that it requires a minimum of power
supply.

6.3 Limitations

In section 6.1 some demands on the application were presented. The need for
multi-channeled detecting is linked to the examination of time-shifts from two
different layers (see also section 3.2). The major problem which occurs when
using more than one channel is time-related. The monitoring of one sample in
the signal on the GLCD-screen calls for approximately 1 to 5 ms1 . Attaining
a good resolution, for example a heart rate of 80 beats per minute, means
there are 15 ms for computation between two samples. To keep the system in
realtime, one has to do as many communications to GLCD as there are number
of channels, a fact which sharply limits the number of possible channels.
The system is limited to only using one microcontroller. For example using
an extern oscillator, a higher working frequency could be gained. The sys-
tem is supposed to work in real-time and has no external memory storage.
This limitation implies that there are for example no functions for calculating
a SPPPG-curve (see 3.3)

6.4 Real time systems

The concept real time system is nowadays more widely used, and can be
confusing. So that is why there is a need to explain how the concept is construed
and how the application can be called a real time system.

”An operation within a larger dynamic system is called a real-time operation if


the combined reaction- and operation-time of a task operating on current
events or input, is no longer than the maximum delay allowed, in view of
circumstances outside the operation. The task must also occur before the
system to be controlled becomes unstable.” Definition of real time operations
by Wikipedia [18]
1 The numbers are from the debugger in software.

19
The application works with a constant sample time, which of course is im-
portant to gain a scientific result. To get this system to work in real time it
needs to compute and monitor the samples faster than it takes to get a new
sample. In the program flow events (i.e. Clear Screen, Calculate Heart Rate)
which sometimes exceed this time, have to take place. This is why samples have
to be stored in a que. The que has place for extra elements when time requiring
events take place, but the number of elements in the que converges over time.
This gives that the time from a sample being sampled to getting monitored,
never exceeds the number of elements in que multiplied by sample time.

20
7.
APPLICATION OVERVIEW

In this chapter there will be a presentation of the system and its functions.

7.1 Sampling and presentation

The PPG-signal is sampled by a 10 bits AD-converter which is internal to the


micro controller. The sampling occurs with four different predefined sampling
frequencies (see Table ??). Changing between sample modes can be done by
commands on the keyboard. The fastest sample mode implies that a subject
with a heart rate of 110 is sampled with a resolution of at least 50 samples/beat.

Sample mode Frequency (Hz) Sample Time (ms)


0 37,38 26,75
1 49,13 20,35
2 67,78 14,75
3 92,99 10,75

Table 2: Data table for the samplings modes

Before monitoring on GLCD-screen, the samples are scaled. The difference


from highest to lowest amplitude for sampled signals is always 25 pixels on
screen. In the time direction there is no scaling.

7.2 USART

The system is capable of sending the sampled ppg-values to a computer via


the EUSART module in the microcontroller. This communication executes in
9600 baud, 8-bits mode without parity-bit. Calculations from the datasheet
of the microcontroller show that the actual baudrate equals 9615, an error by
-0.16% [10].
The sample from the A/D-converter is 10 bits and has a range from 0 to 1023.
There also needs to be sent information about which channel the value originates
from. By sending 2 bytes (see figure 7), there are 16 bits of information. 10 bits

21
are used for the number, 2 bits for identify channel(prepared for four channels),
and 2 bits are for differentiating the four sample rates. Remaining 2 bits are
used for identification. First the most significant byte is sent, which contain one
bit set to one which identifies that it is the most significant byte. The second
byte has 1 bit for identification and 7 bits for the value. The most significant
bit is zero, and indicate that it is the less significant byte. The second equals
to the corresponding bit in the most significant byte.

Figure 7: The USART-conversation divides the value and sends the information
with two bytes with extra information of which channel it belongs to

7.3 Heart rate estimation

There has been a function implemented for heart rate estimation in the
application. The application searches for minimums (eg. maximums because the
signal is sampled mirrored) in the sampled data. This is a simple function which
just takes the adjacent values into calculation for each point. This makes the
calculations as simple as possible for a faster processing. The found minimum
is controlled so that it is not a dicrotic notch, by controlling its amplitude.

22
8.
IMPLEMENTATION

In this chapter some of the more important solutions in the programming


are being discussed. These solutions will be given a clear justification.

8.1 Interrupts

One of the most important conditions in developing is to guarantee that the


samples are sampled with a constant measurable sample time. To just add the
read of the A/D-converter into a normal loop in the program, will not carry out
this demand. This is due to that the program may take different ways depending
on different conditions. Also the arithmetic/logic unit (ALU) will need different
time to do various calculations. The solution used to take care of this problem is
to use interrupts. An interrupt causes the controller to stop the normal program
flow and to jump to a specified part of the program memory. This interrupt
can occur for example by an extern signal, or when a timer overflows. In this
implementation the timer 0 is used and a prescaler is set to 16. In the interrupt
the AD-converter is read and the timer is given a preset. By the formula below
the period time can be calculated precisely. The timer is used in an 8-bit mode,
and that causes the interrupt to take place when the timer exceeds 255. The
TMR0L is in reality the name for a register of the timers, but in the formula
this means the value that this register has when the preset is done. This taking
account for that there will pass some time between when the interrupt occur
and the timer will be preset again. The Fosc is the speed on the oscillator which
control the timer, and the number 4 in the formula originates from the timer
increasing every forth oscillation.

period = (65536 + T M ROL − preset) × 4 × prescaler ÷ F osc

8.2 Circular ques

The interrupts occur with constant time and the samples have to be saved
somewhere to be computed later and to be monitored on the GLCD-screen. For
this purpose the circular que is being used. This que contains 115 integers in an

23
array, where the values can be saved. It also contains variables for controlling
the starting point of the que and its number of elements. The que works as a
buffer. To control that no overflow occurs one byte has also been declared to
verify this.

Figure 8: The circular que store all data in pairs, containing sample value and
a pointer to the next pair.

A couple of functions have been implemented to take care of writing, deleting


and reading from the que. In Appendix A an overview of all commands is being
used. The que controlling functions can be found under the table ”que.h”.

8.3 Presentation on GLCD

The most important difference between this application and already devel-
oped multi-channel applications is the presentation on the GLCD-screen in real
time. When no external storage can be used the time to compute and present
the data cannot exceed the sample time (See 6.4). The functions used in the
program to communicate with GLCD-screen for writing or clearing the screen
require a relatively great amount of time. The program solely uses functions
from a predefined library by the Mikroelektrika team.

24
9.
RESULTS AND DISCUSSION

9.1 Evaluation

The application has been evaluated and compared with a two channel system
which monitor PPG signals on a desktop computer. The reference system was
hard to calibrate with a good result of both channels without noise. Evaluating
in one signal gave a valid result (See 9) for the application. The result was
verified on both channels. In the two signal mode an unknown process made
disturbance on the signals, which made the resolution poor.

Figure 9: An examination in the one channel mode

Even if the attempt to make out the PPG signal curve on the GLCD in
two signal mode failed, easier signals were successfully detected and monitored.
It also appeared that if each sample was made as a mean value estimation of
several quick sampled values from the AC/DC converter, a better result was
given. This affirms the assumption that the disturbance is composed by noise.
The good result from detecting and monitoring a PPG signal curve (without
mean value estimation) from the one channel mode leads to the assumption that
the noise originates before the AC/DC transformation.
Also the heart rate function has been evaluated. The function was evaluated
only in single channel mode. The estimation gave a pleasant value most of

25
Figure 10: An examination in the two channel mode. Disturbance makes the
signal unusable.

times, but was sensitive for noise in the signal. With knowledge of the signal’s
characteristic, a better function for finding local extreme points can easily be
created. For example taking more values in consideration for calculations is
assumed to give a better result. The problem with this is that the calculations
tend to be time requiring and conflict with the real time demands.

9.2 Advantages and limitations

The result of this work is an application which can present two signals syn-
chronously detected on a GLCD-screen. The advantage compared to earlier
applications which can perform examinations on multiple sites is that no com-
puter is needed. The application can in that way be called more portable, and
more user-friendly.
For some analysis of the PPG signal (i.e. mean-algorithms), data from longer
investigation times is needed. External storage is necessary for this occasion.
To satisfy this demand, a function for serial communication has been build in,
using EUSART. One limitation which still stands is a poorer resolution in the
signal compared with a system which does not compute data in real time.

26
10.
CONCLUSIONS AND FUTURE WORK

10.1 Brief summary

Previously, PPG applications which simultaneously sample and monitore


multiple PPG-signals has not been common. The more recent research has
however shown that there is use for applications like these. One can assume that
this is an improvement when it comes to diagnosing arterial stenosis, because
the diagnosis can be made faster than the procedures which are used in medicine
today.
This work has proven that it is technically possible to sample and present
two signals with a microcontroller and to present the signals on a GLCD-screen
in real time. The application are able to present two signals for a subject with
a heart rate up to at least 100 beats per minute with satisfied resolution.

10.2 Suggestions for improvement of the system

One of the the major limitations of why it seems difficult to present more
than two signals at the same time on the GLCD-screen, is the time limit. To
improve the performance of the application a solution with an extern oscillator
is suggested.
Greater application with one microcontroller for each channel may also be an
interesting solution. Each microcontroller can then do all the processing of the
signal, and the parallel computing decreases the need for time. A disadvantage
is that the costs for an application like this will be higher.
While the programming is done solely in C, there may also be many improve-
ments to do in the code if it is improved by better solutions in the assembler.

27
REFERENCES

[1] J. Allen and A. Murray. Similarity in bilateral photoplethysmographic


peripheral pulse wave characteristics at the ears, thumbs and toes. Physiol.
Meas., 21:369–377, 2000.
[2] J. Allen and A. Murray. Variability of photoplethysmography peripheral
pulse at the ears,thumbs and toes. IEE Proc-Sci. Meas. Technol., 147:403–
407, 2000.
[3] J. Allen and A. Murray. Age-related changes in peripheral pulse timing
characteristics at the ears, fingers and toes. Jour. Hum. Hyper., 16:711–
717, 2002.
[4] J. Allen and A. Murray. Age-related changes in the characteristics of the
photoplethysmographic pulse shape at various body sites. Physiol. Meas.,
24:297–307, 2003.
[5] Challenor. Non-invasive physiological measurements, volume 1, chapter ?,
pages 125–151. Academic Press,London, 1979.
[6] R. Erts, J. Spigulis, I. Kukulis, and M. Ozols. Bilateral photoplethysmog-
raphy studies of the leg arterial stenosis. Physiol. Meas., 26:865–874, 2005.
[7] A.B. Hertzman. Photoelectric plethysmograph of the finger and toes in
man. Proc. Soc. Astron. Soc., 37:1633–1637, 1937.
[8] I. Hlimonenko, K. Meigas, and R. Vahisalu. Waveform analysis of periph-
eral pulse wave detected in the fingertip with photoplethysmograph. Mea.
Sci. Rev., 3:49–52, 2003.
[9] Inc. Medical Resources is a division of EOI. Webpage.
http://www.medicalresources.com/shopping/proddisplay.asp?catalogid=4915
got 15-05-2006.

[10] Microchip Technology Inc., U. S. A. PIC18F2525/2620/4525/4620 Data


Sheet, ds39626b edition, 2004.
[11] S.C. Millasseau, R.P. Kelly, J.M. Ritter, and P.J. Chowienczyk. Deter-
mination of age-related increases in large artery stiffness by digital pulse
contour analysis. Clin. Sci., 103:371–377, 2002.

[12] M. Nitzan, B. Khanokh, and Y. Slovik. The difference in pulse transit time
to the toe and finger measured by photoplethysmography. Physiol. Meas.,
23:85–93, 2002.

28
[13] J. Spigulis. Optical noninvasive monitoring of skin blood pulsations. Appl.
Opt., 44:1850–1857, 2005.
[14] J. Spigulis, R. Erts, I. Kukulis, M. Ozols, and K. Prieditis. Optical multi-
channel sensing of skin blood pulsations. Proc. SPIE, 5459:46–53, 2004.

[15] J. Spigulis, I. Kukulis, E. Fridenberga, and G. Venckus. Potential of ad-


vanced photoplethysmography sensing for non-invasive vascular diagnostics
and early screening. Proc. of SPIE, 4625:38–43, 2002.
[16] Christopher E. Strangio. The RS232 Standard - Tutorial with Signal Names
and Definitions. CAMI Research Inc., Lexington, Massachusetts. Internet
http://www.camiresearch.com/Data Com Basics/RS232 standard.html
got 03-05-2006.
[17] Håkan Ugnell. Photoplethysmographic Heart and Respiratory Rate Mon-
itoring. Instrumental Design and Evalution. PhD thesis, Department of
Biomedical Enginering, Linköpings University, Sweden, 1995.
[18] Wikipedia. Webpage. http://www.wikipedia.com.

29
Functions and procedures
File q.h and q.c certain all functions and definitions witch uses the buffer.

Table 3: Q.H
Struct Variables Description
circular que
int elements[MAXELEMENTS] An array with integers.
int front Which element is first in que.
int rear Which element is in the back.
int nr of elements Number of elements in que.
char overflow Equals 1 if there have been an overflow.
unsigned int max Maximum value in que.
unsigned int min Minimum value in que.
unsigned int interval Max - Min
unsigned short old y Last presented value (scaled)
unsigned short channel coor Movement in y-led
int heart rate Distance between sys. peaks

File funcs.h and funcs.c certain general functions and definitions.

30
Table 4: Q.H

Functions & Procedures Description

char empty Q(circular que *q) Empty the que be setting front to
rear, zero the nr of elements and
clear possible overflows.
void de Q(circular que *q) Delete the element first in que by
move front one step and decrease
nr of elements with one.
int read Q(circular que *q, int pos) Returns the value of the element at
position pos in que. Pos = 1 means
that front element is returned.
int max Q(circular que *q) Returns the maximum value of the
elements in que.
int min Q(circular que *q) Returns the minimum value of the
elements in que.
int pos of next systolic max Q Find the next local max in que,
(circular que *q, int pos, int ma, int mi) starts at position pos, and step
until an max with value higher
than 90 % of max is found.
void init Q(circular que *q) Initialize que.
void add Q(circular que *q, int value) Add an new element to que on last
last place in que.
void calc values Q( Refresh values as max, min,
circular que *q1, circular que *q2, float s fr) heart rate and interval.
void send USART(char SETTINGS, Send first value in que by USART,
char sample rate, circular que *q1, if channel is set. See also heading
circular que *q2) USART-transmission.
void scale and write( Scale and write value to the screen,
char SETTINGS, char w p, circular que *q) if channel is set. Notice that
signal is mirrored up-side-down.
void clear and redraw screen( Clear screen, write values about
char SETTINGS, circular que *q1, settings and heart rate to it.
circular que *q2)

31
Table 5: FUNCS.H
#Define Replace with Description
MAXELEMENTS 118 Number of elements in ques.
WIN HEIGHT 20 Number of pixels from
maximum to minimum on GLCD-Screen.
WIN WIDTH 128 Number of pixel from left to right on screen.
PRESENT SAMPLE 80 Position in que for element which are
presentet on GLCD-Screen.
DIFF CHANNELS 13 Movement of second channel in
y direction on GLCD-Screen.
Enable To Read T0CON.TMR0ON Controls the TIMER0 (1=on, 0=off).

32
Flowdiagram

Figure 11: Flow-diagram

33

You might also like