Designing a web-based health information system

Embed Size (px)

Citation preview

  • 8/10/2019 Designing a web-based health information system

    1/10

    Designing a Web-based Health Information

    System Using Photoplethysmogram (PPG) Signal

    AbstractThis paper researchs about the non-invasive meth-ods of measuring health parameters based on the optical signalPhotoplethysmography (PPG). Then, this paper proposes themethods of processing PPG signals using Wavelet transform.From the theoretical research, this paper proposes to designand build a web-based system to monitor the health parametersusing PPG signals. The PPG signals will be processed onSAM4E-EK board to obtain the desired results, then they arestored in a database and displayed on the website for remotemonitoring.

    Index Termsphotoplethysmography, PPG, NIBP, SAM4E-EK, health information, non-invasive, blood glucose, bloodpressure, heart rate.

    I. INTRODUCTION

    With the development of science and technology, there are

    plenty of personal health parameters monitor (e.g. heart rate,

    blood pressure, oxygen saturation concentration, ...) which

    have been produced and used widely. However, most of

    users do not have much knowledge of medicine. Perhaps

    they can know this parameters, but they cannot know their

    health status definitely. And in the other hand, for example,

    people with heart disease, although patients can understand

    the state of their heart rate, but when one has a heart attack,

    without person next to do some helps, he will be in a very

    dangerous situation. So a problem arises that how we canmonitor patients health status remotely to be able to solve

    the situation. This paper will research to build that system.

    An important problem in the process of the system above

    is the methods to determine the parameters of personal

    health. The classical methods are often complicated, require

    the assistance of doctors so it is difficult to use them

    individually. For example, the method of determining blood

    glucose. Normally to measure this parameter, patients must

    take blood from the fingertip, this often causes pains and

    risks. The classical method for measuring blood pressure

    using pressure cuff manually depends on the experience

    of doctors of nurses, therefore it is not used widely for

    individuals.

    Many methods have been proposed to solve these prob-

    lems, such as Photoplethysmography, Electrocardiography,

    Electromyography, .... In which, the photoplethysmography

    - PPG method has been widely used. PPG [1] is an optical,

    non-invasive measuring technique that provides immediate

    diagnostic information on the cardiovascular state. PPG

    signals reflect the change in blood volume caused by blood

    vessel expansion and contraction, which can be detected by

    a photodiode if external light is illuminated into the tissue.

    Time intervals between the PPG peaks can be converted into

    the heart rate or pulse, but the waveform characteristics of

    each individual PPG pulse contain hemodynamic informa-tion. The PPG signal consists of two components - a slow,

    varying DC offset representing the skin: blood volume in the

    probe-covered area, and a fast, alternating AC component

    that reflects the blood volume pulsations. The amplitude of

    the AC-component is only 0,5-4% of the DC offset in a PPG

    signal.

    The advantage of the method measuring health parame-

    ters based on PPG signal which is simple in theory, low

    implementation costs, can be done automatically and easy

    deployed in practice widely. In this paper, the method of

    determining the value such as: heart rate, blood pressure,

    blood glucose-based PPG signal will be introduced. Based

    on theoretical study, some methods will be implemented

    in MATLAB simulation and on the hardware. The PPG

    signals used for determining blood pressure in this paper

    are measured on mice and provided by the laboratoryMABEL (Mannheim Biomedical Engineering Laboratories),

    Mannheim University [2]. In addition, this laboratory also

    provides us with SAM4E-EK board for the construction of

    the system. This is a powerful board from Atmel. We will

    introduce more about this board lately.

    Method of determining the value of heart rate using PPG

    signal is implemented on real hardware, the results are

    checked with the actual device OMRON. For the method

    of determining blood glucose based on PPG signals, this

    method is relatively new and is still continuing research. At

    present there are only a few actual models of this method,

    but they all require complicated techniques. Therefore in this

    paper, the method of determining the blood glucose just stop

    at theoretical research.

    One of the important aspects of research methods is

    the PPG signal processing. The majority of signal analysis

    methods currently use Fourier analysis. But in practice,

    sometimes Fourier analysis has limitations, especially for

    unstable signals (non-stationary) as PPG signal. Therefore

    this paper is focused on the application of Wavelet transform

    in signal processing. Continuous Wavelet Transform (CWT)

    and Discrete Wavelet transform (DWT) will be studied to

    determine the value of heart rate as well as remove noise

    from PPG signals. The rest of this paper focuses on building

    a web-based model to monitor personal health parametersbased PPG signal remotely . This process includes: designing

    a simple device to measure health parameters; applying

    wavelet-based denoising theory in the equipment; building

    a Java-based software to display health information as well

    as transmit data over the Internet; build a website to monitor

    the health parameters remotely.

    II. A NON -I NVASIVEB LOOD P RESSUREM EASUREMENT

    METHOD U SING P PG S IGNAL

    A. Principles

    A heterogeneous selection of mice (different age, weightand genealogy) was taken into account in order to validate

    the new method without requiring drugs for a specific

    increase or reduction of BP. Figure 1 illustrates a schematic

    diagram of the device.

  • 8/10/2019 Designing a web-based health information system

    2/10

    Fig. 1. Schematic diagram for indirect measurement of mouse bloodpressure.

    The system consists of two photodiodes a separated a

    minimum 15 mm from each other. This distance is based on

    the minimum detectable PTT of our system (3 ms) and the

    maximal pulse wave velocity reported in mice (4.60 m/s) [3].

    They record the reflected light of an infrared LED attachedto the tail of the mice. At the same time, a pressure cuff is

    initially inflated to a pressure (180 mm Hg) that exceeds the

    systolic arterial pressure of the mice. It is then reduced by

    a rate of approximately 2.5 mm Hg/s. The recorded signals

    of the photodiodes are then used to estimate the PTT curve,

    this curve will be later correlated with the recorded signal

    of the cuff pressure. The method described in this paper can

    also be implemented in a transmission mode if the distance

    between the light source and the sensors is smaller than 1

    cm.

    The result of the external pressure applied to the artery by

    the cuff is the modulation of the artery characteristics suchas the compliance. This modulation can be described through

    the formula equation (1) [4].

    C(Pi, Pcuff) =R2max

    P1(

    1

    1 + (Pi Pcuff

    P1)2

    ) (1)

    P1: relates to the slope at the inflection point, Pi: internal

    pressure,Pcuff: cuff pressure,Rmax: is the maximal asymp-

    totic vessel radius.

    Based on the Bramwell-Hill equation (2) can be demon-

    strated the relation between the PTT, the compliance, and

    cuff pressure [5].

    v= d

    PTT =

    1

    C(Pi, Pcuff) (2)

    : blood density, d: distance between sensors.

    Figure 2 shows the relation between the PTT and compli-

    ance. The three BP values are indicated.

    The method used in this study takes advantage of this

    effect in order to estimate the BP indirectly. The PTT is

    calculated between the recorded signals of the photodiodes.

    It is obtained from the sensor nearest to the heart (proximal)

    and the signal of the sensor situated further away from the

    heart (distal). It shows the three characteristic features forthe determination of the systolic, the mean and the diastolic

    BP (figure 3).

    The following paragraph explains the method developed

    on which we based this study.

    Fig. 2. Modulation of the artery characteristics: compliance and PTT asfunction of the internal and the cuff pressure. It shows too the three BPvalues.

    Fig. 3. Characteristic points in the PTT curve. The descending curve showsthe cuff pressure.

    The cuff is initially inflated to a pressure of 180 mmHg

    that exceeds the systolic arterial pressure of the mouse.

    As a result of the external pressure, the artery is totallycompressed and therefore the blood cannot circulate and

    thus the pulse cannot be detected. The cuff pressure is

    reduced by a rate of approximately 2.5 mm Hg/s.

    At the time at which the cuff pressure is the same as

    the systolic BP, the blood can circulate again and the

    wave appears distal of the cuff, the transit time is at its

    minimum point. The increase of the transit time curve

    is considered a characteristic feature.

    Maximum of the transit time curve. At this point,

    the cuff pressure is equal to the mean BP. Due to

    this pressure; the compliance of the artery is maximal.

    Hence, the pulse wave velocity is minimal while the

    PTT is maximal [6].

    Once the compliance reaches the maximal point it starts

    to decrease and with it the PTT. When the cuff pressure

    is the same as the diastolic value, the modulation of

    the artery be the cuff is completed and the compliance

    remains constant. The buckling in the PTT curve is the

    diastolic BP.

    B. Results

    Figure 4 shows a typical change of the transit time

    compared to a simultaneous direct BP measurement during

    the deflation phase of the cuff. The calculation of the indirect

    BP is based on the beat to beat measurement of the transittime and the locations of the three characteristic features:

    systolic, diastolic and mean blood pressures.

    Figure 5 shows an example of the recordings of the prox-

    imal and distal signals (A), the PTT curve as a result of the

  • 8/10/2019 Designing a web-based health information system

    3/10

    Fig. 4. Typical PTT alterations during a deflation phase of the cuff (X-

    axis) compared to the direct measurements (right Y-axis). The vertical linesshow the BP determined by the interpolation with the cuff pressure. At the100 mm Hg cuff pressure the blood could circulate and the transit time isat its minimum point, it is the systolic pressure. At the 80 mm Hg cuffpressure, the pressure is equal to the mean pressure and the PTT curve hasa maximum. At the 60 mm Hg cuff pressure the PTT curve has a bucklingand it is the diastolic pressure.

    time difference between both signals with the corresponding

    BPs (B) and the cuff pressure (C).

    Fig. 5. An example of the recorded distal and proximal signals (A). PTTcurve with the SBP, MBP and DBP points (B). Cuff pressure curve withthe corresponding BP points (C).

    Value differences can be explained by the fact that there

    is a certain significant distance between the measuring posi-

    tioning of the sensors and the heart. Therefore, the indirect

    systolic BP values are higher and the mean and diastolic

    BP values are lower than those of the direct measurements.

    In order to be able to compare our measuring values to the

    values described in the literature, the average BP values from

    several measuring cycles of a session were calculated. Withthis procedure, the comparison of the blood pressure-value

    pairs is more related to the mice than to the measuring cycles.

    Table I summarizes the comparison between the direct and

    the indirect measurements.

    TABLE ISTATISTICALC OMPARISON B ETWEEN D IRECT ANDI NDIRECT B P

    MEASUREMENTS

    No.DBP MBP SBP

    PTT Direct PTT Direct PTT Direct

    1 123.7 121 122.5 118 118.5 111

    2 116.8 114 113.1 110 106.6 101

    3 131.4 133 130.2 128 122.5 120

    4 118.5 120 107.8 115 98.06 97

    5 116.5 118 109.5 112 96.44 98

    6 118.3 121 115.2 112 106.8 105

    7 93.8 99 85.45 82 70.2 72

    8 113.7 111 96.52 104 88.3 93

    9 127.4 129 107.8 118 97.07 103

    10 127.8 127 120.8 119 98.06 107

    III. A NON -I NVASIVE B LOOD G LUCOSE M EASUREMENT

    METHOD U SING P PG S IGNAL

    A. Theoretical Analysis

    1) Molecular Composition and Relative Absorptivities:

    When a photon is incident on a molecule, there will be

    bond deformations or bond vibrations at different energy

    levels related to different bonds, depending on the energy

    of incident photon [7]. So, only the photon with energy that

    corresponds to the difference between two of its energy levels

    can be absorbed. The frequency of the vibration is given by

    the equation (3).

    = 1

    2

    k

    m (3)

    wherek is the bond strength and m is the reduced mass.For a glucose molecule, the molecular structure is as

    shown in figure 6.

    Fig. 6. Molecular structure of D-glucose.

    Table II shows the frequencies corresponding to different

    bond vibrations in glucose molecule [8].

    TABLE IIABSORPTIONBANDS OFG LUCOSE B ONDS

    Overto ne Wavelength Bond Wavelen gth Bond

    Fundamental 3377nm vC-H 2817nm vO-H

    First overtone 1688nm 2vC-H 1408nm 2vO-H

    Second overtone 1126nm 3vC-H 939nm 3vO-H

    At a deeper level absorption of light can be seen as

    dependent on the probability of absorbance of a photon by

    the molecule. For nth overtone final energy is (n+1)E, whereE is the fundamental energy. As n increases, probability

    of absorbance decrease rapidly and hence intensities of

    absorbance decrease as overtones increase. The absorption

    at fundamental frequency is calculated and from that the

  • 8/10/2019 Designing a web-based health information system

    4/10

    absorption at second overtone is calculated relatively [9].

    Table III depicts the relative absorptivities of C-H bond at

    different overtones with respect to the fundamental. It is

    evident that the absorptivity decreases rapidly as one goes

    from fundamental to the overtones in sequence.

    TABLE IIIRELATIVEA BSORPTIVITIES OFC-H BON D

    Overtone Wave number cm1 Relative Absorptivity

    Fundamental 3019 1

    First overtone 5912 0.088

    Second overtone 8677 3.2 103

    2) Selection of the Wavelength of Peak absorption: The

    absorption spectrum of the glucose has been studied in order

    to choose the wavelengths for LEDs. For this purpose a IR

    absorption spectrum of 0.1M aqueous glucose solution has

    been collected and analyzed in second overtone region of

    the near-infra red spectra using the Bruker tensor 27 FTIR

    spectrometer. Figure 7 shows the absorption spectrum of theglucose over the second overtone region where the selected

    wavelengths are shown.

    Fig. 7. Spectrum showing the transmittance of glucose.

    We can observe that the absorption peaks in this region

    are very narrow typically of the order of the 2nm to 5nm but

    the LED emits the light over a range of wavelengths. The

    wavelengths are chosen such that the weighted average of the

    absorption over the spectral bandwidth of the LED is high.

    While calculating this weighted average the intensity of light

    emitted by the LED acts as weight for the absorption at that

    particular wavelength. The expected value of the absorbance

    over a range has been calculated as equation (4).

    E[A] =

    A() f() d (4)

    where A is the absorbance of glucose over a range of

    wavelengths and f() is the probability density function ofintensity of light emitted.

    By multiplying the relative intensity of the light emitted

    by the LED shown in figure 8 and the absorbance value

    of glucose taken from the spectrum and averaging it over

    spectral distribution of LED we calculate the mean value ofthe absorbance which is shown in figure 9.

    In order to improve the accuracy of the prediction of blood

    glucose level, the wavelengths have been chosen such that

    mean value of the absorbance of glucose over the frequency

    Fig. 8. Graph showing the relative sensitivity of light emitted by 1070nmLED.

    Fig. 9. Intensity weighted mean absorbances over 920nm to 1100nm.

    range of LED is high. For the current research, wavelengths

    of 935nm, 950nm, and 1070nm have been chosen.

    B. Method

    According to Beer-lamberts law the absorbance of light

    by a liquid is related to the concentration of the material by

    equation (5).

    A= Cl (5)

    where the molar absorptivity of solute at a particular

    wavelength, Cis is the concentration of the solute andl is the

    path length. Hence for a specific wavelength i, equation (5)

    may be written as

    Ai = iCili (6)

    In our particular case, i= 1 corresponds to a wavelengthof 935nm, i = 2 corresponds to a wavelength of 950nmand i = 3 corresponds to a wavelength of 1070nm. As the

    concentrations and path lengths are same for a person at aparticular time, we can write

    C1 = C2 = C3 (7)

    l1 = l2 = l3 (8)

    As discussed in the previous section, three different wave-

    lengths have been selected which have peak absorption of

    glucose in the near infrared region of the spectrum, 1070, 950

    and 935nm. For getting glucose level in blood the absorbance

    which is mainly due to blood glucose is calculated from AC

    component of PPG wave as follows [10]

    OD = log[1 + ItiIti+1

    ] (9)

    where OD is the difference between optical densities attime ti and ti+1, Iti is the pulsatile component at timeti and Iti+1 is the intensity of light at time ti+1.

  • 8/10/2019 Designing a web-based health information system

    5/10

    This difference has the effect of removing the venous

    and the tissue contributions to yield only the change in

    intensity due to the pulsating arterial blood compartment

    [11], [12]. The optical densities have been calculated at three

    wavelengths for 35 subjects. The actual glucose values have

    also been determined using standard invasive glucometer.

    Regression analysis has been done on these values using

    neural network toolbox in MATLAB.

    C. Regression Analysis Using Artificial Neutral Networks

    Multivariate calibration models have come into wide use

    in quantitative spectroscopic analyses due to their ability to

    overcome deviations from the Beer Lamberts law caused by

    effects such as overlapping spectral bands and interactions

    between components [13]. PLS and PCR are the most widely

    used chemo-metric techniques for quantitative analysis of

    complex multicomponent mixtures. These methods are not

    optimal when the relationship between the IR absorbances

    and the constituent concentration deviates from linearity.

    The theory and the application of Artificial Neural networks

    (ANN) in modeling chemical data have been widely pre-sented in the literature [14]. In this current work, ANN has

    been used for function fitting to develop a model based on the

    PPG data and invasive glucose measurements. For calculating

    glucose concentration from beer-lamberts law we can say

    that

    A[{Ci}, ] =i

    (CiAi()) (10)

    where Ai() is the optical density at wavelength , ofthe ith component, whose concentration is Ci, A() theoptical density of the mixture. If we have the spectra of all

    the components{Ai()} and measure the spectrum of themixture {Ai()}, we can use a mathematical tool to estimatethe{Ci}. The three wavelengths have been chosen suchthat glucose has considerable amount of absorption when

    compared to other components. So we have given the matrixA1i=1...25A2i=1...25A3i=1...25

    (11)

    as input andCi=1...25

    as output which are measured using

    standard invasive method. In this way we have three different

    optical densities as inputs and one output for a single sample.

    MATLAB neural network toolbox has been used. A two

    layer feed forward network with sigmoid hidden neurons and

    linear output neurons has been chosen. Number of hidden

    layers have been chosen as 10.

    IV. APPLICATION OF WAVELETS IN P PG S IGNAL

    PROCESSING

    A. PPG Signal Improvement Using DWT

    The PPG signal profile has a very small amplitude, so

    some artifact can arise due to patient motion during measure-

    ment that are of comparable amplitude, as well as transport

    artifacts arising when a patient is being transported by

    ambulance. The other artifact can be patients body vibration,

    which can have large amplitude and a frequency close to the

    patient heart rate. This close proximity in frequency makesremoval of vibration artifact from PPG signals especially

    difficult by Fourier techniques. The PPG signal has been

    used for recognizing much variabilitys of health, so it is very

    important to get the parameters of this signal clear without

    noises and artifacts in order to support clinical decision

    making. To address this issue, DWT allows effective noise

    reduction. The DWT splits the signal into two components,

    each of half the original length, with one containing the

    low-frequency or smooth information and the other the

    high-frequency or difference information. The process is

    performed again on the smooth component, breaking it

    up into low-low and high-low components and it is

    repeated several times. The simpler way to remove noise orto reconstruct the original signal from a contaminated signal,

    in case of 1D or 2D, using the wavelet coefficients which

    are the result of decomposition in wavelet transform, is to

    eliminate the small coefficient associated to the noise. After

    updating the coefficients by removing the small coefficients

    assuming as noise, the original signal can be obtained by

    the reconstruction algorithm using the noise free coefficients.

    Because it is usually considered that the noise has high

    frequency coefficients, the elimination of the small coeffi-

    cient generally applied on the detail coefficients after the

    decomposition. Indeed, the main idea of the wavelets de-

    noising method to obtain the ideal components of the signalfrom the noisy signal requires the estimation of the noise

    level. The estimated noise level is used in order to threshold

    the small coefficient assumed as noise. The noise reduction

    procedure follows the flowchart in figure 10.

    Fig. 10. The flowchart of the noise reduction algorithm.

    The crucial issue of this approach is determination of an

    appropriate threshold value. In this paper, the authors applies

    the following hard thresholding rule on the coefficients ci,k.

    ci,k =

    ci,k, |ci,k| i0, |ci,k| i

    (12)

    wherei is the threshold that depends on the noise level at

    the ith level; the signal is then reconstructed by the IDWT

    of the ci,k coefficients. It is essential to find the appropriatevalue for the threshold. In this paper, we use the universal

    threshold estimator proposed by Donoho. It uses a fixed

    threshold form given as:

    =

    2log n (13)

    where n denotes the length of the analyzed signal and is

    given by:

    =median(dL,k)

    0.6745 (14)

    wheredL,k are the coefficients at the highest decomposition

    level.

    In this section, the authors implement the noise reduction

    algorithm in MATLAB. Firstly the considered signal was

    decomposed using a five-level wavelets decomposition. Thereason for five-level decomposition is that it is the maximum

    level that the approximation component is least distorted

    compared to the original signal. The other factor deciding

    this methods efficiency is the mother wavelet. One of the

  • 8/10/2019 Designing a web-based health information system

    6/10

    key criteria of a good mother wavelet is its ability to fully

    reconstruct the signal from the wavelets decompositions. We

    used in our analysis the Daubechies db4. Figure 11 shows

    DWT results with all approximation and detail components.

    Fig. 11. Signal decomposition using db4 mother wavelet.

    The high frequency components of the signal decreases

    as lower details are removed from the original signal. As

    the lower details are removed, the signal becomes smoother

    and the noises disappears since noises are marked by high

    frequency components picked up along the ways of trans-

    mission. This is the contribution of the discrete wavelet

    transform where noise filtration is performed implicitly.

    Figure 12 presents the signal before and after denoising.

    Fig. 12. Removing background noise from the PPG signal.

    In addition, the PPG signal artifact removal algorithm

    also makes use of DWT. This algorithm is based on the

    observation that the discrete wavelet transform puts thebiomedical waveform in a very different region of the

    transform plane than the signal components attributable to

    artifact. This can be seen clearly by a visualization of the

    discrete wavelet transform in which the absolute values of

    the wavelet transform coefficients, as a function of time

    and level of the transform (scale), usually called time-scale

    plot, or scalogram. The artifacts, if show up, usually present

    most prominent in the short scale (high level of transform)

    portions of the scalogram. So in order to remove the artifacts,

    these portions should be zeroed out. The rest of the DWT

    coefficients may then be reconstructed to be used as an input

    to an PPG pressure determination algorithm in the usual way

    for the measurement of desired patient pressure values.

    B. PPG Signal Frequency Estimation Using CWT

    In order to estimate PPG signal frequency using CWT,

    there is two problems that we have to clarify, they are

    scale and frequency. Obviously, there is clearly a relationship

    between scale and frequency. Recall that higher scales corre-

    spond to the most stretched wavelets. The more stretched

    the wavelets, the longer the portion of the signal with which

    it is being compared, and therefore the coarser the signal

    features measured by the wavelet coefficients. To summarize,

    the general correspondence between scale and frequency is:

    Low scale a Compressed wavelets Rapidly chang-ing details High frequency . High scale a Stretched wavelets Slowly changing,

    coarse features Low frequency .While there is a general relationship between scale and

    frequency, no precise relationship exists. Users familiar with

    Fourier analysis often want to define a mapping between a

    wavelet at a given scale with a specified sampling period

    to a frequency in hertz. You can only do this in a general

    sense. Therefore, it is better to talk about the pseudo fre-

    quency corresponding to a scale. The Wavelet ToolboxTM

    in MATLAB provides two functions centfrq and scal2frq,

    which enable you to find these approximate scale-frequency

    relationships for specified wavelets and scales. The algorithm

    of this method follows the flow chart below (figure 13).

    Fig. 13. The flowchart of the frequency estimation algorithm.

    The important factors influencing algorithms result are

    scale and Wavelet family. In our calculation, signals fre-

    quency is usually between 5 and 15 Hz, so we choose

    scale with the minimum value is 50, the maximum value

    is 256, and the step is 0.1. The other important condi-

    tion affecting the result of wavelet transform is the base

    (mother) wavelet.The advantages of wavelet transform for

    signal analysis is the abundance of the base wavelets. From

    such abundance arises a natural question of how to choose a

    base wavelet that is best suited for analyzing a specific signal.

    Since the choice in the first place may affect the result of

    wavelet transform at the end, the question is valid.

    The complex-valued Morlets wavelet is often selected

    as the choice for signal analysis using the CWT. Morlets

    wavelet insures that the time-scale representation can be

    viewed as a time-frequency distribution. This wavelet has

    the best representation in both time and frequency because

    it is based on the Gaussian window. The Gaussian function

    guarantees a minimum time-bandwidth product, providing

    for maximum concentration in both time and frequency

    domains. This is the best compromise for a simultaneous

    localization in both time and frequency as the Gaussian

    functions Fourier transform is simply a scaled version of

    its time domain function. In order to evaluate algorithms

    quality, first we implement 16384-point FFT (best fit signalslength). Figure 14 shows spectrum plot.

    We can see the fundamental frequency of this signal is

    9.56 Hz. To evaluate this method, we apply the algorithm

    with 4 different wavelet functions: Haar, Morlet, Daubechies

  • 8/10/2019 Designing a web-based health information system

    7/10

    Fig. 14. Spectrum plot of PPG signal.

    4 and Coiflet 1. Figure 15 is the CWT result with the Morlet

    mother wavelet.

    Fig. 15. Continuous Wavelet Transform visualization.

    The area with lighter color represents large coefficients

    area. From the flowchart and algorithm, max coefficientcorresponds to scale value 88.2, and so we get frequency

    9.43 Hz. We can see that with the Morlet mother wavelet,

    the Wavelets based approach gives a similar result to the

    Fourier based one. Table IV shows the results of the other

    mother Wavelet as well as the other signals.

    TABLE IVRESULT OF A PPLYINGA LGORITHM TOS OM E P PG S IGNALS

    No. FFT Morlet Haar Db4 Coif1

    1 10.56 10.43 11.93 9.64 11.17

    2 9.56 9.40 10.21 8.60 9.90

    3 11.25 11.39 11.93 9.72 11.22

    4 9.68 9.78 20.4 7.45 8.20

    5 8.75 8.72 9.94 8.70 9.60

    Based on the tables, different wavelet functions produces

    different results compared to the Fourier transform. The

    Morlet function has the smallest error (less than 2%), these

    results can be accepted, but the Haar function has the largest

    error value, so it isnt suitable for signal processing. Other

    functions, such as db4 and Coif 1, have the error less than

    the Haar function but it is still not acceptable.

    V. SIGNAL D ENOISINGU SINGDWT ON H ARDWARE

    DWT with db4 mother Wavelet has proved its effective-

    ness. Noise is basicly removed from the original signal.

    In this section, we will introduce a method to implement

    DWT with db4 on hardware. The coefficients of db4s scale

    function are:

    h0 = 1 +

    3

    4

    2; h1 =

    3 +

    3

    4

    2; h2 =

    3 34

    2; h3 =

    1 34

    2(15)

    The wavelet function coefficients are:

    g0 = h3; g1 =

    h2; g2 = h1; g3=

    h0 (16)

    Each step of the wavelet transform applies the scale

    function and wavelet function to the input data. If the original

    data set has N values, the wavelet function will be applied to

    calculate N/2 smoothed values and N/2 differences (reflecting

    change in the data). In the forward wavelet transform, the

    smoothed values are stored in the lower half of the N element

    input vector and the differences are stored in the upper half

    of the N element input vector.

    The scaling and wavelet functions are calculated by taking

    the inner product of the coefficients and four data values. The

    equations are shown in equation (17) and equation (18).

    Scaling function:

    ai = h0s2i+h1s2i+1+h2s2i+2+h3s2i+3 (17)

    Wavelets function:

    ci = g0s2i+g1s2i+1+g2s2i+2+g3s2i+3 (18)

    Each iteration in the wavelet transform step calculates a

    scaling function value and a wavelet function value. The

    index i is incremented by two with each iteration, and new

    scaling and wavelet function values are calculated. In the case

    of the forward transform, with a finite data set (as opposed

    to the mathematicians imaginary infinite data set), i will be

    incremented until it is equal to N-2. In the last iteration the

    inner product will be calculated from calculated from s[N-2], s[N-1], s[N] and s[N+1]. Since s[N] and s[N+1] dont

    exist (they are beyond the end of the array), this presents

    a problem. This is shown in the transform matrix below

    (figure 16). Note that this problem does not exist for the

    Fig. 16. Forward transform matrix for an 8 element signal.

    Haar wavelet, since it is calculated on only two elements,

    s[i] and s[i+1]. A similar problem exists in the case of the

    inverse transform. Here the inverse transform coefficients

    extend beyond the beginning of the data, where the first

    two inverse values are calculated from s[-2], s[-1], s[0] and

    s[1]. This is shown in the inverse transform matrix below

    (figure 17).

    Three methods for handling the edge problem:

    Treat the data set as if it is periodic. The beginning ofthe data sequence repeats rolling the end of the sequence

    (in the case of the forward transform) and the end of

    the data wraps around to the beginning (in the case of

    the inverse transform).

  • 8/10/2019 Designing a web-based health information system

    8/10

    Fig. 17. Inverse transform matrix for an 8 element signal.

    Treat the data set as if it is mirrored at the ends. This

    means that the data is reflected from each end, as if a

    mirror were held up to each end of the data sequence.

    Gram-Schmidt orthogonalization. Gram-Schmidt or-

    thogonalization calculates special scaling and wavelet

    functions that are applied at the start and end of the

    data set.

    Zeros can also be used to fill in for the missing elements,

    but this can introduce significant error. The algorithm pub-lished in this paper treats the data as if it were periodic.

    After building DWT and IDWT algorithm, the next thing

    that we have to do is to build the de-noising algorithm on

    hardware. First of all, we need to estimate the threshold used

    for de-noising. Using Donohos method as discussed in the

    previous section, now we need to build a function to calculate

    median. According to the median algorithm, firstly input data

    sequence x with data length N are arranged from small to

    large. Then:

    median(x) =

    x[n

    2] +x[

    n

    2 1]

    2 if N is evenx[

    n

    2] if N is odd

    (19)

    After calculating the median, using equation (13) and

    equation (14) to calculate the threshold value. After deter-

    mining the threshold, the samples of signals whose absolute

    values are less than the threshold are set to 0 (hard threshold

    method). The remaining values will be preserved.

    V I. SYSTEMD ESIGN

    A. Hardware Implementation

    To calculate the heart rate continuously, a sensor is de-

    signed to acquire the PPG signal. The proposed design of

    the hardware is shown in figure 18.

    Fig. 18. Proposed hardware design.

    The transmitter is a LED emitting light in the near IR

    whose wavelength is 940 nm. The LEDs intensity is driven

    by a Digital-to-Analog module (DAC) of the microcontroller(MCU). After the transmitted infrared signal passes through

    the test site (usually a reasonably translucent area with good

    blood flow, such as a finger or earlobe), it is received at

    the photo-detector. However, this is a current signal and its

    amplitude is very small. Thus it needs to be amplified and

    converted to a voltage signal so that it can be measured by

    MCUs Analog-to-Digital module (ADC). This amplifying

    and converting module is called transimpedance (TIA). In

    practice, we can use the IC OPT101 by Texas Instruments.

    This IC already contains a TIA module and a photodiode to

    detect light signal.

    The signal after photo-detector contains lots of other

    undesired frequency components. Thus, a band-pass filter isneeded to remove the undesired signal, leaving the frequency

    which is desired. Peoples heart rate is from around 40 - 160.

    The filters pass band should be in this range. The receiver

    filter is set 0.8 Hz to 3 Hz as the pass band. In addition, the

    filter should provide some gain added to the signal, because

    even though TIA is put behind photo-detector, the overall

    gain is not enough. Figure 19 shows a proposed design

    of the filter and amplifier stage. Using Multisim Electronic

    Workbench to simulate this design, the actual pass band is

    0.714 - 3.2 Hz, the total gain is about 38 dB (it means the

    PPG signal will be amplified up to 80 times).

    Fig. 19. Schematic of the filter and amplifier stage.

    The most important module of this design is the MCU.

    The more powerful the MCU is, the higher efficiency we

    will get. Nowadays, there are plenty of MCUs from many

    manufacturers, such as TI, Atmel, Microchip, STMicroelec-

    tronics In this paper, An ARM Cortex-M4 processor-based

    MCU is used. Its called SAM4E16E. For convenience, this

    MCU is integrated to an evaluation board called SAM4E-

    EK, which is shown in figure 20. The language used for

    programming is C/C++. We use Iar Embedded Workbench

    as an IDE to compile code and download to board.

    Fig. 20. SAM4E evaluation board.

    MCU will process the PPG signal to calculate the heart

    beat value. This heart beat value will be sent to PC via UART

    and displayed in a Graphic User Interface (GUI).

  • 8/10/2019 Designing a web-based health information system

    9/10

    B. Software Implementation

    1) Board Programming: As discussed in the theory sec-

    tion, the signal received from the photo-detector and the

    human heart beat is congruent. It means every time your

    heart beats, it generates a pulse signal. Although the signal

    received from the photo-detector is weak, but after the block

    of filtering and amplification, the signal is amplified many

    times and can be measured by the ADC on board SAM4E-EK. Heart rate is the number of beats in 60 seconds, but

    if you read all data in the 60s, it will take a lot of time. A

    more simple way, because heart rate usually does not change

    continuously, so we can just read the ADC data in 10s, then

    use FFT to calculate signals frequency multiply with 60,

    we will get your heart rate parameters. An alternative way

    to calculate heart beat is using the Timer Counter function

    of MCU. Signal passing through the filter and amplifier will

    become a pulse, so it can be counted by Timer Counter. This

    result is then multiply with 6 only. Both FFT and Timer

    Counter methods have their own advantages and disadvan-

    tages. FFT method requires a large memory, because it needs

    at least 8192 points to give an acceptable resolution (the

    suggestion is 16384 points). However, the higher resolution

    is, the higher accurate the result is. With Timer Counter

    method, memory requirement is not a problem, but the result

    is less accurate than FFT. Figure 21 shows the flowchart of

    the main program.

    Fig. 21. Main program flowchart.

    While doing delay routine, the Interrupt Service Routine

    (ISR) will execute. In the ISR, ADC module will read the

    converted result and save to the memory; or the Timer

    Counter will read the number of pulse appearing if we use

    the second method. Figure 22 shows the flowchart of the

    ISR. A real device has been used to check the accuracy of

    this design. This device is manufactured by OMRON. Some

    tests were made on some people using both this design and

    OMRON device. Table V shows the results of these tests.

    As we can see, the difference between them is not really

    significant. Instead of buying an expensive device, we can

    use this design to get an acceptable result.2) Designing PC Program: As discussed above, the heart

    rate value after being calculated will be sent to PC and

    displayed in a GUI. The GUI can be created by various of

    language such as Java, C/C++, C#... In this paper, we use

    Fig. 22. ISR program flowchart.

    TABLE VPROPOSEDD ESIGN VSO MROND EVICE

    No. Proposed design OMRON device Error (%)

    1 81 80 1.25

    2 73 73 0.00

    3 66 67 1.49

    4 50 52 3.85

    5 77 77 0.00

    6 55 56 1.79

    7 61 61 0.00

    8 69 69 0.00

    9 90 88 2.27

    10 70 71 1.41

    Java because it is a powerful language, with high perfor-

    mance and security. More over, a Java program just needs

    to be written once on a platform (like Windows, Unix...),

    and when we bring it to another platform, it still works

    well. First of all, we need to build a connection between

    PC and board. One of the most common interface used onMCU is UART. SAM4E-EK has already integrated a RS232

    port. The advantages of this interface are simplicity and

    convenience. Therefore in this paper, we use UART as the

    interface between PC and board. In Java, the library for this

    interface is called Java Communication API (also known as

    javax.com). However, this library supports Linux and Solaris

    platforms only. To be able to use this interface in Windows,

    it is necessary to install a third-party library called RXTX.

    This library is available at www.rxtx.qbang.org. Figure 23

    is the GUI of the UART setting. On this GUI, the user can

    select the COM port to communicate as well as install the

    parameters of the UART interface such as Stop bits, FlowControl, Data bits ...

    Fig. 23. UART interface setting.

    The next thing is the main GUI. In this main GUI, the

    health information such as heart rate, blood pressure and

  • 8/10/2019 Designing a web-based health information system

    10/10

    blood glucose will be displayed. Figure 24 shows the main

    GUI that we have designed.

    Fig. 24. The main GUI.

    In the system that were building, each time a user wants

    to update their health information to the server, they need

    to provide their personal information. So we need to build

    a GUI to enter information. This GUI can be constructed as

    shown in figure 25.

    Fig. 25. The GUI for entering information.

    The final function of the PC program that we need to

    build is the connection to Internet, because we need to

    upload the information such as health parameters, personalinformation... to the web-server. In Java, the java.net library

    provides the methods to access to the Internet. After being

    constructed, this program will continuously read data via

    UART interface and show up to the GUI. Each time user

    fills in their information and presses the button Update,

    data will be sent via Internet to the web server.

    3) Designing Web Page: There are plenty of language that

    we can use to design a web page. In this paper, we choose

    ASP.NET to create our web page. The reason for choosing

    ASP.NET because it is a powerful platform supported by

    Microsoft, with a simple programming model, supporting

    multi-language, high security ability, convenient for web

    application configuration. Figure 26 is the designed web

    page.

    Fig. 26. Web page for monitoring health information.

    VII. CONCLUSION

    This paper has focused on researching methods of de-

    termining the health parameters such as the heart rate, the

    blood pressure, the blood glucose by non-invasive, using the

    algorithms to analyze the PPG signal to determine the desired

    parameters. In the other hand, we have also researched the

    theory and application of Wavelets in Biomedical Signal

    Processing, they are the use of CWT to determine the value

    of heart rate and DWT to remove noise from original PPG

    signals. The denoising method based on DWT has been also

    implemented on hardware. In addition, a personal health

    information system has been designed. This system contains

    a circuit to measure heart rate value of humans with the

    support of SAM4E-EK board, a software to display and

    transmit those values over the Internet, a website system

    to display measured results for remote monitoring. In the

    future, we plan to research some other methods to determine

    more health parameters and develop this system to give users

    more advantages, such as a mobile-based health monitoring

    system.

    REFERENCES

    [1] J. Allen, Photoplethysmography and its application in clinical physio-logical measurement, Physiological Measurement (United Kingdom),vol. 28, pp. 139, 2007.

    [2] P. H. A. M. Z. D. X. N. B. K. X.P. Nguyen, R. Kronemayer andN. Gretz, Validation of a new non-invasive blood pressure measure-ment method on mice via pulse wave propagation time measurementon a cuff, Biomed Tech Journal (Berlin), vol. 56, pp. 153158, 2011.

    [3] M. L. P. T. E. M. Hartley CJ, Taffet GE, Noninvasive determinationof pulse-wave velocity in mice, Journal of Physiology - Heart andCirculatory Physiology (USA), vol. 273, pp. 494500, 1997.

    [4] G. W. Langewouters GJ, Wesseling KH, The static elastic propertiesof 45 human thoracic and 20 abdominal aortas in vitro and theparameters of a new model, Journal of Biomechanics (USA), vol. 17,pp. 425435, 1984.

    [5] H. A. Bramwell J., The velocity of the pulse wave in man,Proceed-ings of the Royal Society of London. Series B, Containing Papers ofa Biological Character (1905-1934), vol. 93, pp. 298306, 1922.

    [6] S. M. K. A. Yamakoshi KI, Shimazu H, New oscillometric methodfor indirect measurement of systolic and mean arterial pressure in thehuman finger, Medical Biological Engineering Computing Journal(Heidelberg, Germany), vol. 20, pp. 307313, 1982.

    [7] A. M. A. Amerov Airat K., Chen Jun, Molar absorptivities of glucoseand other biological molecules in aqueous solutions over the firstovertone and combination regions of the near infrared spectrum,Proceedings of the Royal Society of London. Series B, Containing

    Papers of a Biological Character (1905-1934), vol. 58, pp. 11951204, 2004.

    [8] S. H. K. J. Jeon, I. D. Hwang and G. Yoon, Comparison betweentransmittance and reflectance measurements in glucose determina-tionusing near infrared spectroscopy, Journal of Biomedical Optics(USA), vol. 11, pp. 1422, 2006.

    [9] E. V. V. A. I. Pavlyuchko and L. A. Gribovb, Calculations of molec-ular ir spectra in the overtone and combination frequency regions,

    Journal of Applied Spectroscopy (USA), vol. 78, pp. 639645, 2011.[10] K. B. C. S. Ramasahayam S., Haindavi K.S., Non invasive estima-

    tion of blood glucose using near infra red spectroscopy and doubleregression analysis, Seventh International Conference on SensingTechnology (New Zealand), pp. 627631, 2013.

    [11] Y. T. T. T. Y. K. K. Yamakoshi, Ogawa M, Multivariate regressionand discreminant calibration models for a novel optical non-invasiveblood glucose measurement method named pulse glucometry, ConfProc IEEE Eng Med Biol Soc (USA), vol. 126, 2009.

    [12] Y. Y. Yamakoshi K., Pulse glucometry: A new approach for non-invasive blood glucose measurement using instantaneous differentialnear infrared spectrophotometry, Journal of Biomed Optics (USA),vol. 11, 2006.

    [13] M. Y. P. R. Bhandare, P., Multivariate determination of glucose inwhole blood using partial least-squares and artificial neural networksbased on mid-infrared spectroscopy, Journal of Applied Spectroscopy(USA), vol. 47, pp. 12141221, 1993.

    [14] M. W. B. L. K. G. Smits, J.R.M., Using artificial neural net- worksfor solving chemical problems. part 1. multi-layer feed-forward net-works, Journal of Chemometrics and Intelligent Laboratory Systems(Netherlands), vol. 22, pp. 165189, 1994.