You are on page 1of 50

‫ﺴﻢ ﷲ اﻟﺮﲪﻦ اﻟﺮﺣﲓ‬

AlMughtaribeen University
College of Engineering
Biomedical Engineering Department

A dissertation submitted in partial fulfillment of the requirements for the


B.Sc. (Honors) Degree in Biomedical Engineering

NONINVASIVE GLUCOSE MONITORING

Presented By:
Mustafa Khalid Mustafa Elzubair
Noha Mohammed Talha Ahmed
ReemAwis Othman Awis

Supervisor:
Ola Salah
ACKNOWLEDGMENT

We are truly blessed, and utterly thankful for all the opportunities we have been
given in life, all these of which are the reason we are where we are today.
All the praise first and foremost goes to Allah, for guiding our path, and leading
our way.
Our parents who were always there for us with their time, money and all sorts
of support.
Our teachers and tutors throughout our years of education, and to anyone who ever
taught us a word.
A very deep and sincere acknowledgement to Dr. Ola Salah- our project
supervisor, who was always there for our group mates and we with her time,
guidance and support. We could have never asked for better guidance and
supervision.
To Ms. Eng. Fathia Garma and Mr. Mohammed Eltahir who they have generously
given their time and expertise to better our work. We thank them for their
contribution, the great co-ordination and their good-natured support.
To our friends and colleagues, for their never ending encouragement throughout
the years.
Thank you all.

I
DEDICATION

To caffeine and sugar, our companions through many a long nights of studying,
hard working, reading and writing.

II
TABLE OF CONTENTS

Title Page No

ACKNOWLEDGMENT………..…………………..………………….I
DEDICATION…………………….…………………………….…….II
TABLE OF CONTENTS……………………………………….……III
LIST OF FIGURES……….……………………………………….….V
LIST OF TABLES……………..……………………………………VII
NOMENCLATURE…….………………………………….………VIII
ABSTRACT………..…...……………...……………………………..IX
CHAPTER 1: INTRODUCTION……………………………….…….1
1.1.THESIS INTRODUCTION………………………………………………………………...….1
1.2.THESIS OBJECTIVES…………………………………………………………………………..1
1.3.PROJECT LAYOUT……………………………………………………………………..………1

CHAPTER 2 : LITERATURE REVIEWS…………………………..2


CHAPTER3:THEORETICA BACKGROUND……...……………7
3.1. DIABETES…………………………………………………………7
3.2. GLUCOSE MEASUREMENT…………………………………...…8
3.2.1 Invasive glucose measurement…………………………………………..….8
3.2.2 Noninvasive glucose measurement………………….………………………8
3.3. PHOTO-ACOUSTIC TECHNIQUE……………..…………………9
3.3.1 Photo-acoustic effect………………………………………………………..10
3.3.2 Laser sources……………………………………………………………….10
3.3.3 Selection of wavelength and transducer material………………………11
3.3.4 Acoustic detectors……………………………..………………………..12
3.4. ELECTRICAL TECHNIQUE……………………………………13
CHAPTER 4 : MATERIAL AND METHODOLOGY…………….14
4.1. SYSTEM DESIGN………………………………………...……..14
4.1.1. Design overview…………………………………………………...……….14
4.2. PHOTOACOUSTIC TECHNIQUE………………………………14
4.2.1 Simulation……………………………………………………...…..…….20
4.2.2 Implementation…………………..………………………………….……21
4.3. ELECTRICAL TECHNIQUE……………………………………22
4.3.1 Simulation……………………………..…………………………………..25

III
4.3.2 Implementation…………………………………….………………………26
CHAPTER 5 : RESULTS AND DISCUSSION…………………….28
5.1. RESULTS………………………………………………………….28
5.2. DISCUSSION……………………………………….……………..32
CHAPTER 6 : CONCLUSIONS AND RECOMMENDATIONS…35
6.1. CONCLUSION……………………………………………………..35
6.2. RECOMMENDATIONS………………………………………..….35
REFERENCES………………………………………………………36
APPENDIX I………………………………………………………...37

IV
LIST OF FIGURES

Figures Page No
Figure (3.1) Visualization of the photo-acoustic effect. 10
Figure (3.2) Absorption spectra of tissue. 11

Figure (3.3) Optical absorption spectra for glucose. 12


Figure (4.1) Photoacoustic design block diagram. 15

Figure (4.2) Laser Dot Diode. 16

Figure (4.3) Measurement champer. 17


Figure (4.4) Microphone 18

Figure (4.5) 741 Amplifier. 19

Figure (4.6) Microcontroller (pic 16f877A). 19

Figure (4.7) LCD. 20

Figure (4.8) Whole photoacoustic circuit simulation. 21

Figure (4.9) Photoacoustic circuit layout. 22

Figure (4.10) Electrical design block diagram. 23

Figure (4.11) Low current source. 24

Figure (4.12) ECG Electrodes. 25

Figure (4.13) Whole electrical circuit simulation. 26

Figure (4.14) Electrical circuit layout. 27

V
Figure (5.1) Relationship between voltage and glucose concentration for 29
10 persons by using photoacoustic technique.
Figure (5.2) Relationship between voltage and glucose concentration for 30
10 persons by using electrical technique.
Figure (5.3) Clarke's Error Grid Analysis for photoacoustic technique. 32

Figure (5.4) Clarke's Error Grid Analysis for electrical technique. 33

VI
LIST OF TABLES

Table (5.1) The results of test for persons by using photoacoustic 28


technique
Table (5.2) The results of test for persons by using electrical 30
technique.
Table (5.3) Final result for measuring glucose concentration by both 31
Invasive and Noninvasive methods.

VII
NOMENCLATURE

IR INFRARED
NBM NONINVASIVE HEMOGLOBIN MONITORING
NIR NEAR INFRARED
PRESS PRESSURE
OCT COHERENCE TOMOGRAPHY
PAS PHOTOACOUSTIC SPECTROSCOPY
TOF TIME-OF-FLIGHT
MC MONTE-CARLO
FWHM FULL WIDTH OF HALF MAXIMUM
PA PHOTO ACOUSTIC
EGA CLARKE’S ERROR GRID.
PZT LEAD ZIRCONATE TITANATE.
USART UNIVERSAL ASYNCHRONOUS RECEIVER TRANSMITTER
SPT™ SERIAL PERIPHERAL INTERFACE.
I²C™ 2-WIRE INTER-INTEGRATED CIRCUIT
EEPROM ELECTRICALLY ERASABLE PROGRAMMABLE READ ONLY
MEMORY.
LCD LIQUID CRYSTAL DISPLAY.
PIC PICK.
ECG ELECTROCARDIOGRAPHY.
Mg\dl MILLIGRAMS PER DECILITER
mv MILLIVOLT

VIII
ABSTRACT

This project demonstrated the feasibility study and design issues to measure
blood glucose concentration noninvasively in human subjects based on PA and
electrical techniques. PS used acoustic sensor and pulsed laser source (λ=650nm)
which was found to be the suitable range for detecting glucose signal. The mean
value of sensor output for non-diabetic individuals has been determined and
proportional relation between glucose concentration and sensor output voltage has
been derived. The electrical technique used low current source and ECG electrodes
to measure the impedance of human skin then compares it to invasive glucoses
reads.

IX
‫اﻟﻤﺴﺘﺨﻠﺺ‬

‫ﻓﻲ ھﺬا اﻟﻤﺸﺮوع ﺗﻤﺖ دراﺳﺔ ﺟﺪوى وﺗﺼﻤﯿﻢ ﺟﮭﺎز ﻟﻘﯿﺎس وﻣﺮاﻗﺒﺔ ﺗﺮﻛﯿﺰ اﻟﺠﻠﻜﻮز ﻓﻲ اﻟﺪم دون وﺧﺰ وأﻟﻢ‬
‫ﺑﺈﺳﺘﺨﺪام ﺗﻘﻨﯿﺔ اﻟﻠﯿﺰر اﻟﺴﻤﻌﻲ واﻟﺘﻘﻨﯿﺔ اﻟﻜﮭﺮﺑﺎﺋﯿﺔ‪.‬‬
‫ﺗﻘﻨﯿﺔ اﻟﻠﯿﺰر اﻟﺴﻤﻌﻲ ﺗﺴﺘﺨﺪم أﺟﮭﺰة اﻻﺳﺘﺸﻌﺎر اﻟﺼﻮﺗﯿﺔ وﻣﺼﺪر ﻟﯿﺰر ﺑﻨﻄﺎق ﻣﻌﯿﻦ ﻟﻨﺒﺾ اﻟﻠﯿﺰر ﻟﻠﻜﺸﻒ ﻋﻦ‬
‫إﺷﺎرة اﻟﺠﻠﻮﻛﻮز‪.‬‬
‫اﻣﺎ اﻟﺘﻘﻨﯿﺔ اﻟﻜﮭﺮﺑﺎﺋﯿﺔ اﻟﺘﻲ ﺗﺴﺘﺨﺪم ﻣﺼﺪر ﺗﯿﺎر ﻣﻨﺨﻔﺾ واﻗﻄﺎب ﺟﮭﺎز ﺗﺨﻄﯿﻂ اﻟﻘﻠﺐ ﻟﻘﯿﺎس ﻣﻘﺎوﻣﺔ ﺟﻠﺪ‬
‫اﻹﻧﺴﺎن وﻣﻦ ﺛﻢ ﻗﯿﺎس ﺗﺮﻛﯿﺰ اﻟﺠﻠﻜﻮز ﻓﻲ اﻟﺪم‪.‬‬
‫ﺛﻢ ﻣﻘﺎرﻧﮫ ﻗﺮاءة اﻟﺠﮭﺎزاﻟﺬي ﺗﻢ ﺗﺼﻤﯿﻤﮫ ﺑﻘﺮاءات ﺟﮭﺎز ﻗﯿﺎس ﺗﺮﻛﯿﺰ اﻟﺠﻠﻜﻮز ﻓﻲ اﻟﺪم ﺑﺴﺤﺐ ﻋﯿﻨﺎت ﻣﻦ اﻟﺪم؛‬
‫وﻣﻦ ﺛﻢ ﺗﻘﯿﯿﻢ اﻟﺠﮭﺎز‬

‫‪X‬‬
CHAPTER ONE
INTRODUCTION
1.1 General Overview
Diabetes is a chronic condition , it can usually be controlled with lifestyle changes
and medication. The main goal of treatment is to keep blood sugar levels in the
normal or near-normal range. Checking patient blood sugar is one of the best ways
to know how well his diabetes treatment plan is working. Continuous glucose
monitors have also become popular, especially for people who use an insulin
pump.
If the continuous monitoring is invasive by drawing blood it will cause pain to the
patient so this project intends to use a noninvasive glucose monitoring method to
measure the blood glucose levels. Noninvasive glucose refers to the measurement
of blood glucose levels without drawing blood, puncturing the skin or causing pain
or trauma.

1.2 Objectives
1.2.1 General objective
Designing multi-techniques noninvasive blood glucose monitoring prototype to
determine the blood glucose levels using electrical and photoacoutstic techniques.

1.2.2 Specific objectives


The objective of this study is to provide a diabetic with a device with:
1. Reduce pain.
2. Reliable measurements.
3. Portable and Easy to use

1.3 Project layout


The research had been divided into six chapters. Chapter one is an introduction
including the general view of the project, problem statement , and objectives.
While chapter two include Literature reviews and chapter three contains theoretical
background of photo acoustic and electrical and use them in non-invasive glucose
measurement. Circuit design, simulation and implementation are found in chapter

1
four. Chapter five shows the results obtained and discussion. Chapter six deals
with conclusion and future recommendations.

CHAPTER TWO
LITERATURE REVIEWS
1. Jason J. Burmeister and Mark A. Arnold studied that The chemical and physical
properties of the tongue make it an excellent site for noninvasive glucose
measurements with first-overtone near-IR spectroscopy. Transmission through the
tongue produces effective optical path lengths through water of .5 mm, which are
required for measuring clinically relevant concentrations of glucose. Furthermore,
tongue tissue contains little fat, which permits low noise in the spectral region
where the most reliable glucose-specific information resides. Comparing the
putative sites examined here, webbing tissue contains the largest percentage of
fatty tissue and, therefore, is clearly the worst measurement site. Differences in the
amount of fat are considerably less between the remaining measurement sites.
Overall, the order of fat content (from highest to lowest) is webbing .. lower lip ..
upper lip .. cheek . . tongue . [1]

2. Orna Amir, Daphna Weinstein, Silviu Zilberman, et.al. said that In vitro
analysis was used to validate the technology and algorithms. A clinical study was
performed to quantify the in vivo performance of the NBM device. A total of 23
patients with type 1 (n = 12) and type 2 (n = 11) diabetes were enrolled in the
clinical study and participated in 111 sessions. Accuracy was assessed by
comparing NBM data with paired self-monitoring of blood glucose meter readings
In vitro experiments showed a strong correlation between calculated and actual
glucose concentrations. The clinical trial produced a total of 1690 paired glucose
values (NBM vs reference). In the paired data set, the reference glucose range was
40–496 mg/dl. No systematic bias was found at any of the glucose levels examined
(70, 100, 150, and 200 mg/dl). The mean relative absolute difference was 17.2%,
and a Clarke error grid analysis showed that 95.5% of the measurements fall within
the clinically acceptable A and B regions (zone A, 69.7%; and zone B, 25.7%).
This study indicates the potential use of OrSense’s NBM device as a noninvasive
sensor for continuous blood glucose evaluation. The device was safe and well
tolerated. [2]

2
3. R. Marbach, TH. koschinsky, F. A. gris, and H. M. heise proved that A genuine
correlation between capillary blood glucose concentration and the NIR spectrum
has been proven, and a time lag of about 10 min of the glucose concentration in the
spectroscopically probed tissue volume has been established. The mean-square
prediction error (PRESS 1/2) was estimated between 45 and 55 mg/dL with the use
of the "leave-one-out" strategy of cross-validation. An analysis of error variance
showed this limitation to be due to the reduced measurement reproducibility (i.e.,
variations in lip position and contact pressure), whereas the signal-to-noise ratio
would have allowed for a PRESS V2 value of approximately 25 mg/dL for log(l/R)
signals. Measurement irreproducibility occurring for single patients is of the same
order of magnitude as those between different individuals. The results show that
NIR spectroscopy is feasible for the noninvasive measurement of blood glucose
and may be used for building a self-monitoring device usable by diabetic patients
at home. However, for such a device, sampling reproducibility is of paramount
importance and has to be further improved if the prediction performance is to
achieve clinical acceptance. A different approach using a fiberoptic accessory may
be worth realizing. [3]

4. Erkki Alarousu ; Jukka T. Hast ; Matti T. Kinnunen ; Mikhail Y. Kirillin and


their work group used optical measurement techniques, which enable non-invasive
measurement, are superimposed to glucose sensing in scattering media. Used
measurement techniques are Optical Coherence Tomography (OCT),
Photoacoustic spectroscopy (PAS) and laser pulse Time-of-Flight (TOF)
measurement using a streak camera. In parallel with measurements, a Monte-Carlo
(MC) simulation models have been developed. Experimental in vitro
measurements were performed using Intralipid fat emulsion as a tissue simulating
phantom for OCT and TOF measurements. In PAS measurements, a pork meat was
used as a subject but also preliminary in vivo measurements were done. OCT
measurement results show that the slope of the OCT signal's envelope changes as a
function of glucose content in the scattering media. TOF measurements show that
the laser pulse full width of half maximum (FWHM) changes a little as function of
glucose content. An agreement with MC-simulations and measurements with
Intralipid was also found. Measurement results of PAS technique show that
changes in glucose content in the pork meat tissue can be measured. In vivo
measurements with a human volunteer show that other factors such as
physiological change, blood circulation and body temperature drift may interfere
the PA response of glucose. The main goal is to make low cost individual devices
for everyday non-invasive monitoring of glucose concentration in home
3
conditions. However, there are many problems in computer modelling, device
development and integration before a commercial product is available. In the
future, research will be focused on the physiological range of glucose. The goal is
to find out how sensitive these techniques are to the glucose concentration. There
will be also development in measurement techniques for faster information
collection. Monte Carlo models will be improved and larger statistics in
simulations will be used to obtain better statistics to simulation results.
[4]

5. Alexeeva, Natalia V., and Mark A. Arnold proved Noninvasive glucose


measurements are possible by analysis of transmitted near-infrared light over the
4000- to 5000-cm−1 spectral range. Such measurements are highly sensitive to the
exact position of the fiber-optic interface on the surface of the skin sample. A
critical question is the degree of heterogeneity of the major chemical components
of the skin matrix in relation to the size of the fiber-optic probed used to collect
noninvasive spectra. Microscopic spectral mapping is used to map the chemical
distribution for a set of excised sections of rat skin
A Fourier transform near-infrared microspectrometer was used to collect
transmission spectra from 16 tissue samples harvested from a set of four healthy
Harlan-Sprague male rats. A reference point in the center of the tissue sample was
probed regularly to track dehydration, changes in tissue composition, and changes
in instrument performance. Amounts of the major skin constituents were
determined by fitting microspectra to a set of six pure component absorbance
spectra corresponding to water, type I collagen protein, keratin protein, fat, an
offset term, and a slope term [5]

6. Arnold, Mark A., Lingzhi Liu, and Jonathon T. Olesberg Noninvasive near-
infrared spectra are collected through a fiber-optic interface attached to a thin fold
of skin on the back of an anesthetized laboratory rat while glucose levels are varied
in a controlled manner.
Glucose-specific spectral information is present within noninvasive near-infrared
spectra collected from a rat model using a transmission geometry. Apparently
functional, yet incorrect, calibration models can be generated, and the propensity to
create such false PLS calibration models calls into question the validity of past
reports. An analysis of calibration vectors can provide valuable insight into the
chemical basis of selectivity for multivariate calibration models of complex
systems. [6]

4
7. Hassan Ali. Al Naam , Mohamed Osman Idrees , Abdalsalam Awad , Ola S.
Abdalsalam and Fragoon Mohamed designed a non-invasive blood glucose
measurement tool using pulsed Photo-Acoustic Spectroscopy. A system has been
designed and implemented, as a result it was found that there is a linear
mathematical relationship between acoustic signal produced across measuring site
and blood glucose concentration. The experimental results were analyzed using
Clarke Error Grid Analysis (EGA) with 90% of the results falling into the
clinically accurate zone A. the system overall error was (2.6±6.28 mg/dl). This
study presents a new effective, simple, portable and safe method that reduces
discomfort due to the measurement procedures. [7]

8. Katsuhiko Maruo, Mitsuhiro Tsurugi and Jakusei Chin assumed that the glucose
content in dermis tissue traces the variations in blood glucose. For dermis spectra
measurements, epidermis, especially stratum corneum, acts as an interference in
skin tissue. Thus, we have developed a method for the selective measurement of
dermis tissue spectra, enabling us to obtain better quality spectra for an accurate
blood glucose assay. The selective measurement of the dermis spectra realized by
using a newly developed fiber-optic probe that consists of source and detector
optical fibers separated by 0.65 mm on a skin surface. The light path in the skin
tissue for this geometry has been simulated by a Monte Carlo method. The
simulation results show that detected light mainly interrogates dermis tissue. As
the absorbance signal of glucose in human tissue is extremely small, the quality of
the measured spectra is critical for the reliable assay. The present method for blood
glucose assay has been applied to one Type 1 diabetic. The correlation coefficient
between the blood glucose content predicted by NIR spectra and those measured
by finger-prick was 0.928 and the standard error of prediction was 32.2 mg/dL.
These results demonstrate the potential of our methodology for noninvasive NIR
blood glucose assay.[8]

9. Yang, Won S., and Yoon O. Kim studied a method and apparatus for measuring
blood glucose concentration by irradiating blood vessels with electromagnetic
radiation, where the method and apparatus uses near-infrared radiation diffuse-
reflection laser spectroscopy. This invention uses electromagnetic radiation of a
wavelength that is transmitted through the skin to the measurement region, for
example, a blood vessel. Since skin is mostly composed of water (H2 O), which
absorbs infrared radiation in nearly the entire infrared spectral range, only radiation
from a certain, narrow portion of the infrared spectral range called the "water
transmission window" is transmitted through the skin. The present invention uses
electromagnetic radiation with a wavelength of 1.3 μm- 1.8 μm radiation from a
5
semiconductor diode laser. When electromagnetic radiation of these wavelengths
irradiates the skin, light is transmitted through the skin to the blood vessel where
the light interacts with the heterogeneous components of the blood. The light
transmitted to the blood is then diffusely reflected by the blood. The reflected light
will have been modulated by the characteristic vibrations of the molecules which
are major components of blood. The reflected light is detected and provided as a
digital signal to a one-chip microcomputer. The one-chip microcomputer calculates
a blood glucose concentration from the digital signal by reference to a calibration
curve stored in the memory of the one-chip microcomputer. The one-chip
microcomputer causes the calculated blood glucose concentration to be displayed
on a digital display. [9]

6
CHPTER THREE
THEORETICAL BACKGROUND

3.1 Diabetes
Glucose is a form of sugar produced when the body digests carbohydrates
(sugars and starches). Glucose is the body's major fuel for the energy it needs.
When insulin is absent or ineffective, the blood glucose (blood sugar) level
increases. High blood glucose levels can lead to both short and long-term
problems. The normal cycle of glucose and insulin
Diabetes is the condition in which the body does not properly process food for
use as energy. Most of the food we eat is turned into glucose, or sugar, for our
bodies to use for energy. The pancreas, an organ that lies near the stomach, makes
a hormone called insulin to help glucose get into the cells of our bodies. When you
have diabetes, your body either doesn't make enough insulin or can't use its own
insulin as well as it should. This causes sugars to build up in your blood. This is
why many people refer to diabetes as “sugar.” Diabetes can cause serious health
complications including heart disease, blindness, kidney failure, and lower-
extremity amputations. Whether it’s termed type 1 (previously known as “juvenile-
onset”), type 2 (“adult-onset”), or the gestational diabetes that is a complication of
pregnancy, the end result is the same glucose may be present in the blood in
dangerously low (“hypoglycemia”) or high (“hyperglycemia”) amounts, and
without a means of measuring glucose, treatment is a dangerous guessing game of
taking pills, injecting insulin, or deciding how much and what kind of food to eat?
People who think they might have diabetes must visit a physician for diagnosis.

They might have SOME or NONE of the following symptoms:


1. Frequent urination
2. Excessive thirst
3. Unexplained weight loss
4. Extreme hunger
5. Sudden vision changes
6. Tingling or numbness in hands or feet
7. Feeling very tired much of the time
8. Very dry skin
9. Sores that are slow to heal
10. More infections than usual

7
At present, no cure is available for diabetes but if patients adhere strictly to a
proper diet, exercise, medication and make frequent measurements of blood
glucose, they are able to maintain their health, and indeed, lead relatively normal
lives. If simple, inexpensive, reliable tests were available, they could make those
measurements as well and as often as required. The measurement of blood glucose
by any technique is inherently complex because of the wide range of potentially
interfering components. For a non-invasive technique, not only are there many
analytes within human blood that could interfere with the measurement, but there
are also other problems such as the variability and inhomogeneity of human skin
and the constantly changing human physiology. The invasiveness of the testing
procedure for diabetes plays a contributing role to the fact that nearly one-third of
the population with diabetes goes undiagnosed. It is for this reason that a method
for noninvasively monitoring glucose levels is highly desirable for patients with
diabetes which would allow for more frequent and possibly continuous monitoring
without the pain that is associated with current commercial glucose monitors.
According to the World Health Organization . “As per facts about diabetes, 90 to
95% of the world diabetics have diabetes type 2.They get it around age 40. It is an
alarming fact that, of late, this global epidemic has started coming up in children
too.
More alarming is that 90% of them are also obese. What is dangerous about
diabetes type 2 is that more than 15% of those do not know that they have it. It
comes up silently without showing its symptoms.
According to the World Health Organization, 170 million people have diabetes
worldwide and this number may well double by the year 2030. If a family history
of diabetes exists; there is a more likely opportunity to develop diabetes. [10]

3.2 Glucose measurement


There are two ways to control blood sugar for diabetics and are:
3.2.1 Invasive glucose measurement
Measurement are done by pricking a finger and extracting a drop of blood
which is applied to a test strip composed of chemicals sensitive to the glucose in
the blood sample. An optical meter (glucometer) is used to analyze the blood
sample and gives a numerical glucose reading.
3.2.2 Noninvasive glucose measurement
Refers to the measurement of blood glucose levels (required by people with
diabetes to prevent both chronic and acute complications from the disease) without
drawing blood, puncturing the skin, or causing pain or trauma.
All non-invasive optical methods utilize a beam of light to irradiate some selected
part of the human body, such as a finger, the forearm, tongue, lip, thigh or
abdomen and so on. Light that is transmitted through, reflected or scattered out of
8
the skin comprises information about the composition of the illuminated tissue.
This light is then received by optical detectors and analyzed to determine the
concentrations of certain analytes, such as oxygen or hemoglobin.

3.3 Photo-acoustic Technique


Photo-acoustic is the measurement of the effect of absorbed electromagnetic
energy (particularly of light) on matter by means of acoustic detection. The
discovery of the photo-acoustic effect dates to 1880 when Alexander Graham Bell
showed that thin discs emitted sound when exposed to a beam of sunlight that was
rapidly interrupted with a rotating slotted disk. The absorbed energy from the light
is transformed into kinetic energy of the sample by energy exchange processes.
This results in local heating and thus a pressure wave or sound. Later Bell showed
that materials exposed to the non-visible portions of the solar spectrum. The photo-
acoustic effect can be used to study solids, liquids and gases.
Modern photo-acoustic detectors still rely on the same principles as Bell’s
apparatus, however to increase the sensitivity the following modifications have
been made:
1. Use of intense lasers instead of the sun to illuminate the sample since the
intensity of the generated sound is proportional to the light intensity.
2. The ear has been replaced by sensitive microphones. The microphone signals are
further amplified and detected using lock-in amplifiers.
The alternative technique of pulsed laser photo-acoustic spectroscopy. In this
technique, short pulses of laser light are directed into the tissue. The resulting
acoustic signal depends on the optical and physical characteristics of the sample
and may be the basis of determining blood glucose concentrations noninvasively.
Recent developments in optoelectronic technologies give the photo-acoustic
method of measurement the potential for portability and long component life with
the use of piezoelectric and compact electronics and diode lasers with levels of
optical radiation that are several orders of magnitude below pain or tissue damage
thresholds.
The photo-acoustic process involves the conversion of optical energy into acoustic
energy by a multistage energy Conversion process. The fraction of incident optical
energy that is absorbed is determined by the optical absorption coefficient the
photo-acoustic pulse consists of an isolated pressure wave
comprising a compressive pulse followed by a rarefaction. Generally, the peak-to-
peak amplitude of the detected photo-acoustic pulse is used for analysis and is
directly proportional to the absorbed energy. Accordingly, an energy measurement
is used to normalize the peak-to-peak measurement. [11]

9
3.3.1 Photo-acoustic effect
The photo-acoustic effect is a conversion between light and acoustic waves due to
absorption and localized thermal excitation. When rapid pulses of light are incident
on a sample of matter, they can be absorbed and the resulting energy will then be
radiated as heat. This heat causes detectable sound waves due to pressure variation
in the Surrounding medium.

Figure (3.1) Visualization of the photo-acoustic effect First, pulsed light that is incident on a sample is
absorbed (a) and the constituent molecules become thermally excited (b). Periodic heat flow from the
sample to the surrounding gas causes pressure waves (c) that are in turn detected by an acoustic sensor
(d).

3.3.2 Laser sources


PA waves can be generated by any radiation energy source with a short duration.
Thermo elastic generation, however, requires a high power radiation source, due to
the low efficiency (< 0.0001) of optical to acoustic transformation. Pulsed laser
sources have some advantages over continuous-wave modulating sources in terms
of PA techniques. Pulsed lasers offer higher detection sensitivity owing to their
high output power producing a correspondingly strong PA signal.
In spite of their high output power, pulsed laser are free of convection currents.
Unlike continuous-wave lasers, PA signals generated by pulsed lasers exhibit no
complex dependence on the thermal diffusion length and chopping frequency.

10
3.3.3 Selection of wavelength and transducer material
Absorption of light by tissue causes localized heating, which causes expansion and
subsequent contraction, which gives rise to a PA signal. As composition of blood is
quite
complex and has various constituents, wavelength needs to be chosen judiciously.
Figure (3.2) shows how optical properties of tissue vary over the wavelength with
respect to melanin, water and oxyhaemoglobin. It can be seen that absorption by
water, melanin, and oxy-haemoglobin is less in red and NIR region. This region
extending from 600nm to 1300nm is known as optical window of biological tissue.
Also, in this region the depth of penetration of light in tissue is several millimeters.

Figure (3.2): Absorption spectra of tissue.

Further, it can be seen from Figure (3.3) that glucose has highest absorption at
1037nm, but absorption of water at this wavelength his also high. One more fact
that needs to be considered is that, in wavelengths ranging from 1000nm to
1200nm absorptions for oxyhaemoglobin and deoxy-haemoglobin are different,
whereas this difference is fairly small at around 900nm. This may lead to errors as
light absorption will change with the changes in amount of blood oxygenation.
Considering the above phenomena tissue’s optical window (wavelength around
900nm) is the most suitable for glucose detection. Although glucose has relatively
lower absorption n around this wavelength, but due to minimum attenuation of
optical signal by other constituents, desired depth of penetration can be achieved
with substantial energy available for absorption by the glucose. Excitation signal
has nanosecond pulse duration and hence microphone cannot be used due to its
limited bandwidth. PZT (Lead Zirconate Titanate), being a highly sensitive
material is selected for detection of PA signal. [7]

11
Figure (3.3): Optical absorption spectra for glucose showing absorption peaks.

3.3.4 Acoustic detectors


Several different types of acoustic detectors are available for PA detection.
They include microphones, piezoelectric transducers, capacitance transducers,
fiber-optic sensors, noncontact optical detectors, and so on. The choice of detector
for a particular application is mainly based on factors such as detection style,
sensitivity, response time, bandwidth, impedance matching, noise, size and
ruggedness. In the PA study of condensed matter, the most common detectors are
the piezoelectric transducer and the non-contact optical detector. The former has a
good acoustic impedance match while the latter can requires no contact with the
object of study or form all optical device.

12
3.4 Electrical Technique
Electrical Technique is based on the flow of a low electrical current through the
skin, between an anode and cathode positioned on the skin surface. An electric
potential is applied between the anode and cathode, thus causing the migration of
sodium and chloride ions from beneath the skin toward the cathode and anode,
respectively. In particular, it is sodium ion migration that mainly generates the
current.[12] This measurement is possible because neutral molecules, such as
glucose, are extracted through the epidermis surface during this convective flow.
This flow causes interstitial glucose to be transported, collecting at the cathode,
where a traditional glucose sensor is placed to measure glucose concentration
directly. The “GlucoWatch” device (Cygnus Inc., Redwood City, CA) is based on
this technology, and it was approved by the US Food and Drug Administration.
The device collects glucose molecules through the cathode disk and measures the
amount with a sensor that contains enzyme glucose oxidase. Blood glucose
concentration is predicted by comparing the premeasured blood glucose value with
the signal generated by glucose molecules collected at the cathode. However, this
product was withdrawn from the market due to poor accuracy, skin irritation, and
long procedural problems. [13]

The advantage of this technology is that the electrodes are easily applied to the
skin, by which a physiologically relevant fluid sample is collected, in that there is a
correlation between glucose concentration in the physiological fluid and glucose
concentration in blood.

While electrical technology has great potential, the only device ever marketed
using it had such serious practical drawbacks that it was withdrawn from the
market. First, the electrodes irritated the skin. Second, the electrodes needed to be
in place for at least 60 minutes, which exceeded the patience of many users. Third,
readings were inaccurate, especially when the subject was sweating. Fourth, it was
not able to detect rapid changes in blood glucose, due to its long “wakeup” time.
[14]

13
CHAPTER FOUR
Material and Methodology

4.1 System design

4.1.1 Design overview

The designed system was developed and simulated for the purpose of measuring
glucose concentration using Photo-Acoustic and Electrical techniques.

In first technique- photoacoustic technique the NIR signal will act as a heating
source to the tissues and cause it to expand and contract according to the heating
pulse rate, which will consequently produce a pressure wave. The acquisition
system will be responsible for detecting the pressure wave. The acquired signal
will be preprocessed and prepared to become a proper input for the
microcontroller. The microcontroller will calculate the equivalent glucose
concentration according to the amplitude of the detected pressure wave.

In the second technique- electrical the ECG electrodes is there, to detect the
reverse iontophoresis signal due to the interaction of the low current with human
tissue. The acquired signal will be preprocessed and prepared to become a proper
input for the microcontroller. The microcontroller will process the signal and
calculate the equivalent glucose concentration.

Finally glucose values will be matched into one appropriate value and the final
value will be displayed to the user.

4.2 photoacoustic technique


For photo-acoustic signal generation a sample is irradiated with either amplitude
modulated or pulsed light. The molecules of interest present in the sample absorb
radiation of a characteristic part of the spectrum and convert the incoming optical
energy into periodic heating of the sample by means of non-radiative relaxation
processes. This leads to a modulated volumetric expansion and to the propagation
of a thermal and acoustic wave inside the sample. The acoustic wave can be
detected either with a microphone in the coupling gas within a photo-acoustic cell
placed on the sample surface or with a piezoelectric transducer in direct contact
with the sample surface. The mechanism of PA signal generation is depicted.
14
Block Diagram

IR SOURCE CHAMPER TRANSDUCER

PREPROCESSI
LCD PROCESSOR
NG

Figure (4.1): Photoacoustic design block diagram.

IR Source
650nm Laser sensor Module 6mm 5V 5mW Red Laser Dot Diode Copper Head
Module Details
1\ Laser sensor Module
2\ Operating voltage 5V
3\ Output wavelength 650 nm
4\ 3 pins module
-Pin1 = Vdc
-Pin2 = Ref
-Pin3 = GND

15
Figure (4.2): Laser Dot Diode.

Measurement champer
It is a part of the components of the circuit used and it's made from (Teflon). It
occurs to generate a sound wave as we enter the finger in the cuvette and shine of
Pulses of a 650nm near-IR laser light. It occurs absorption in human tissue is
excited at the wavelength absorbed by the molecules of glucose absorption will
cause the local heating. Increase in temperature causes a rapid thermal expansion,
which generates a pressure wave.

Characteristics
From the specific characteristics of Teflon is that it:
1. A green waxy substance.
2. Strong resistance to chemical acid.
3. Smooth surface.
4. It retains physical properties unchanged at temperatures ranging from 260 - to
240 Silesia.
5. Insulating material for electricity.
6. To dissolve in organic solvents.
7. A flexible material.

16
Figure (4.3): Measurement champer.

Transducer (microphone)
Audio transducer that convert an acoustic wave generated by pulsed laser which
interact with the tissue into electrical signal.

17
Figure (4.4): Microphone.

Operation amplifier
The 741 is the godfather of all operational amplifiers (amplifiers on a chip).
Although most up-to-date designs beat it for speed, low noise, etc. It still works
well as a general purpose device. One of its advantages is that it is compensated
(its frequency response is tailored) to ensure that under most circumstances it won't
produce unwanted spurious oscillations.

18
Figure (4.5): 741 Amplifier.

Microcontroller (pic 16f877A)


The PIC16F877A microcontroller features 256 bytes of EEPROM data memory,
self programming, an ICD, 2 Comparators, 8 channels of 10-bit Analog-to-Digital
(A/D) converter, 2 capture/compare/PWM functions, the synchronous serial port
can be configured as either 3-wire Serial Peripheral Interface (SPI™) or the 2-wire
Inter-Integrated Circuit (I²C™) bus and a Universal Asynchronous Receiver
Transmitter (USART). All of these features make it ideal for more advanced level
A/D applications in automotive, industrial, appliances and consumer applications.

Figure (4.6): Microcontroller (pic 16f877A).

19
LCD
The LCD screen consist of two lines with 16 characters, each character consist of
(5×8 or 5×11 dot matrix). Display contrast depends on the power supply voltage
whether messages are displayed in one or two lines. For this reason, varying
voltage 0-5volt is applied on the pin marked as Vee. In this project Vee had been
set to zero.

Figure (4.7): LCD.

4.2.1 Simulation
The validity of the design had to be checked. Simulation is a useful mean of
validating electronic circuits. A version of PROTEUS 7.7 had been used as a
simulation tool.

20
Figure (4.8): Whole photoacoustic circuit simulation.
4.2.2 Implementation
The circuit applied as in figure (4.9) shows the implemented prototype of the
design

21
Figure (4.9) : Photoacoustic circuit layout.

4.3 Electrical technique

For electrical signal generation there is a process called Iontophoresis. which


uses a small electrical current to drive charged and highly polar compounds across
the skin at much higher rates than normally would be permitted by the natural
passive permeability of the compound. As a result the voltage difference will be
measured between the electrodes.
The value of applied current and measured voltage will be used to calculate the
skin impedance and consensually the glucose concentration.

22
Block Diagram

CURRENT MASUREMEN
ELECTRODE
SOURCE T

PREPROCESSI
LCD PROCESSOR
NG

Figure (4.10): Electrical design block diagram.

Current source
We design a voltage to current convertor circuit to give us low current range
(5.1mA).

23
Figure (4.11): Low current source.

24
Electrodes ( ECG Electrodes)
For electrical systems which use alternating current, the electrodes are the
connections from the circuitry to the object to be acted upon by the electric current
but are not designated anode or cathode because the direction of flow of the
electrons changes periodically, usually many times per second.

Figure (4.12): ECG Electrodes.

4.3.1 Simulation
The validity of the design had to be checked. Simulation is a useful mean of
validating electronic circuits. A version of PROTEUS 7.7 had been used as a
simulation tool.

25
Figure (4.13): Whole electrical circuit simulation.

4.3.2 Implementation
The circuit applied as in figure (4.14) shows the implemented prototype of the
design

26
Figure (4.14): Electrical circuit layout.

27
CHAPTER FIVE
RESULTS AND DISCUSSION
5.1 Results
To design the device firstly, we measure the output voltage from the transducer
and compare it with invasive blood glucose concentration.

Figures (5.1) and (5.2) show the relationship between voltage and glucose
concentration on 10 persons by using the two techniques.

Table (5.1): The results of test for persons by using photoacoustic technique.

Volt (mv) Glucose (mg\dl)


31.11 67
34.4 71
38.65 77
41.8 82
42.2 89
63.69 98
100.6 117
102.43 122
126.3 143
163.7 188

28
Gulcose
200
44.478x + 0.8084y =
180
0.9804= ² R
160

140

120
1Series
100
( 1Linear (Series
80 ( 1Linear (Series

60

40

20

0
0 20 40 60 80 100 120 140 160

Figure (5.1): Relationship between voltage and glucose concentration for 10 persons by using
photoacoustic technique.

29
Table (5.2): The results of test for persons by using electrical technique.

Volt (mv) Glucose (mg\dl)


3 67
3.34 71
3.8 77
3.92 82
4.01 89
4.2 98
4.7 117
5.06 122
5.9 143
7.5 188

30
Gulcose
200
22.921x - 28.246y =
180 0.9862= ² R
160

140

120

100 1Series
( 1Linear (Series
80

60

40

20

0
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 5.5 6 6.5 7 7.5 8

Figure (5.2): Relationship between voltage and glucose concentration for 10 persons by using
electrical technique.

The circuits was designed and tested on 10 volunteers in the age range of (17-44);
Table (5.3) shows the final result for measuring glucose concentration by the
circuits we designed compared with non-invasive method.

Table (5.3): Final result for measuring glucose concentration by both Invasive and Noninvasive
methods:
Noninvasive by using Noninvasive by using Invasive (mg\dl)
electrical (mg\dl) photoacoustic (mg\dl)
61.817 69.37 67
71.42 72.078 71
84.41 75.56 77
87.8 78.153 82
90.34 82.58 89
95.71 96.123 98
109.83 126.42 117
120 127.924 122
143.73 147.51 143
188.92 178.22 188

31
5.2 Discussion
The Clarke error grid approach is used to assess the clinical significance of
differences between the glucose measurement technique under test and the venous
blood glucose reference measurements. The method uses a Cartesian diagram, in
which the values predicted by the technique under test are displayed on the y-axis,
whereas the values received from the reference method are displayed on the x-axis.
The diagonal represents the perfect agreement between the two, whereas the points
below and above the line indicate, respectively, overestimation and
underestimation of the actual values. Zone A (acceptable) represents the glucose
values that deviate from the reference values by ±20% or are in the hypoglycemic
range (<70 mg/dl), when the reference is also within the hypoglycemic range. The
values within this range are clinically exact and are thus characterized by correct
clinical treatment. Zone B (benign errors) is located above and below zone A; this
zone represents those values that deviate from the reference values, which are
incremented by 20. The values that fall within zones A and B are clinically
acceptable, whereas the values included in areas C-E are potentially dangerous,
and there is a possibility of making clinically significant mistakes. A total of 10
persons were tested during the trial period, producing 10 data pairs. Using Clarke
error grid analysis, 100% of the readings fell in the clinically acceptable zones A
and B, with 90% in the A zone, and 10% in B zone.

32
Clarke's Error Grid Analysis
400
E C B
350

300
Concentracion Predicha [mg/dl]

250
B

200

150 D
D
100

50

A C E
0
0 50 100 150 200 250 300 350 400
Reference Concentration [mg/dl]

Figure (5.3): Clarke's Error Grid Analysis for photoacoustic technique.

33
Clarke's Error Grid Analysis
400
E C B
350

300
Concentracion Predicha [mg/dl]

250
B

200

150 D
D
100

50

A C E
0
0 50 100 150 200 250 300 350 400
Reference Concentration [mg/dl]

Figure (5.4): Clarke's Error Grid Analysis for electrical technique.

34
CHAPTER SIX
6.1 Conclusions
This study proposed a noninvasive measurement system for glucose concentration;
using the photoacoustic and electrical techniques. The equations relating glucose
concentration with the two techniques was derived from experiments. The system
design was simulated using PROTEUS 7.7 and Matlab 7.12 was used in the EGA
evaluation. The design has been implemented and results were analyzed.

6.2 Recommendations
1. Increasing the number of experimental results from 10 to few hundred
including hypoglycemic and hyperglycemic readings, to provide better
evaluation of the photoacoustic device.
2. Laser used should be 905nm wavelength.

35
References
[1] Burmeister, Jason J., and Mark A. Arnold. "Evaluation of measurement sites for noninvasive
blood glucose sensing with near-infrared transmission spectroscopy." clinical chemistry 45.9
(1999): 1621-1627.
[2] Amir, Orna, et al. "Continuous noninvasive glucose monitoring technology based on
“occlusion spectroscopy”." (2007): 463-469.
[3] Marbach, Ralf, et al. "Noninvasive blood glucose assay by near-infrared diffuse reflectance
spectroscopy of the human inner lip." Applied Spectroscopy 47.7 (1993): 875-881.
[4] Alarousu, Erkki, et al. "Noninvasive glucose sensing in scattering media using OCT, PAS,
and TOF techniques." Proceedings of SPIE. Vol. 5474. 2003.
[5] Alexeeva, Natalia V., and Mark A. Arnold. "Near-infrared microspectroscopic analysis of rat
skin tissue heterogeneity in relation to noninvasive glucose sensing." (2009): 219-232.
[6] Arnold, Mark A., Lingzhi Liu, and Jonathon T. Olesberg. "Selectivity assessment of
noninvasive glucose measurements based on analysis of multivariate calibration vectors."
(2007): 454-462.
[7] Al Naam, Hassan Ali, et al. "Non invasive blood glucose measurement based on Photo-
Acoustic Spectroscopy." Computing, Control, Networking, Electronics and Embedded Systems
Engineering (ICCNEEE), 2015 International Conference on. IEEE, 2015.
[8] Maruo, Katsuhiko, et al. "Noninvasive blood glucose assay using a newly developed near-
infrared system." IEEE Journal of selected topics in quantum electronics 9.2 (2003): 322-330.
[9] Yang, Won S., and Yoon O. Kim. "Non-invasive method and apparatus for measuring blood
glucose concentration." U.S. Patent No. 5,267,152. 30 Nov. 1993.
[10]Patel CKN & Tam AC (1981) Pulsed optoacoustic spectroscopy of condensed matter.
Reviews of Modern Physics 53(3): 517-550.
[11] Amos AF, McCarty DJ & Zimmett P (1997) The rising global burden of diabetes and its
complications: estimates and projections to the year 2010. Diabetic Medicine, Supplement 5: S1-
S5.
[12] Sieg A, Guy RH, Delgado-Charro MB. Noninvasive glucose monitoring by reverse
iontophoresis in vivo: application of the internal standard concept. Clin Chem. 2004;50(8):1383–
1390
[13] The Diabetes Control and Complications Trial Research Group. The effect of intensive
treatment of diabetes on the development and progression of long-term complications in insulin-
dependent diabetes-mellitus. N Engl J Med 1993;329:977–86.
[14] Recent advances in noninvasive glucose monitoring Chi-Fuk So1 Kup-Sze Choi1 Thomas
KS Wong2 Joanne WY Chung2,3 Appendices

36
APPENDIX
Clarke’s error grid function

function [total, percentage] =clarke(y,yp)


% CLARKE Performs Clarke Error Grid Analysis
%
% The Clarke error grid approach is used to assess the clinical
% significance of differences between the glucose measurement technique
% under test and the venous blood glucose reference measurements. The
% method uses a Cartesian diagram, in which the values predicted by the
% technique under test are displayed on the y-axis, whereas the values
% received from the reference method are displayed on the x-axis. The
% diagonal represents the perfect agreement between the two, whereas the
% points below and above the line indicate, respectively, overestimation
% and underestimation of the actual values. Zone A (acceptable) represents
% the glucose values that deviate from the reference values by ±20% or are
% in the hypoglycemic range (<70 mg/dl), when the reference is also within
% the hypoglycemic range. The values within this range are clinically exact
% and are thus characterized by correct clinical treatment. Zone B (benign
% errors) is located above and below zone A; this zone represents those
% values that deviate from the reference values, which are incremented by
% 20%. The values that fall within zones A and B are clinically acceptable,
% whereas the values included in areas C-E are potentially dangerous, and
% there is a possibility of making clinically significant mistakes. [1,2]
%
% Syntax:
%
% [total, percentage] = clarke(y,yp)
%
% Inputs:
% y = reference values (mg/dl)
% yp = predicted/estimtated values (mg/dl)
%
% Outputs:
% total = total points per zone:
% total(1) = zone A,
% total(2) = zone B, and so on
% percentage = percentage of data which fell in certain region:
% percentage(1) = zone A,
% percentage(2) = zone B, and so on.
%
% Example: load example_data.mat
% [tot, per] = clarke(y,yp)
%
% References:

37
% [1] A. Maran et al. "Continuous Subcutaneous Glucose Monitoring in Diabetic Patients"
% Diabetes Care, Volume 25, Number 2, February 2002
% [2] B.P. Kovatchev et al. "Evaluating the Accuracy of Continuous Glucose-Monitoring
Sensors"
% Diabetes Care, Volume 27, Number 8, August 2004
%
% Edgar Guevara Codina
% codina@REMOVETHIScactus.iico.uaslp.mx
% File Version 1.1
% November 18 2008
%
% Ver. 1.1 corrected upper B-C boundary, lower B-C boundary slope ok
%
% MATLAB ver. 6.5.0.180913a (R13)
% -------------------------------------------------------------------------

% Error checking
if nargin==0
error('clarke:Inputs','There are no inputs.')
end
if length(yp) ~= length(y)
error('clarke:Inputs','Vectors y and yp must be the same length.')
end
if (max(y) > 400) || (max(yp) > 400) || (min(y) < 0) || (min(yp) < 0)
error('clarke:Inputs','Vectors y and yp are not in the physiological range of glucose
(<400mg/dl).')
end
% ---------------------- Determine Screen Size ----------------------------
scrsz = get(0,'ScreenSize')-[0 -5 0 72];
% ---------------------- Determine data length ----------------------------
n = length(y);
% ---------------------- Plot Clarke's Error Grid -------------------------
figure
h = plot(y,yp,'ko','MarkerSize',4,'MarkerFaceColor','k','MarkerEdgeColor','k');
xlabel('Reference Concentration [mg/dl]');
ylabel ('Predicted Concentration [mg/dl]');
ylabel ('Concentracion Predicha [mg/dl]');
title('Clarke''s Error Grid Analysis');
set(gca,'XLim',[0 400]);
set(gca,'YLim',[0 400]);
axis square
hold on
plot([0 400],[0 400],'k:') % Theoretical 45º regression line
plot([0 175/3],[70 70],'k-')
plot([175/3 320],[70 400],'k-')
plot([70 70],[84 400],'k-')

38
plot([0 70],[180 180],'k-')
plot([70 290],[180 400],'k-') % Corrected upper B-C boundary
plot([70 70],[0 175/3],'k-')
plot([70 400],[175/3 320],'k-')
plot([180 180],[0 70],'k-')
plot([180 400],[70 70],'k-')
plot([240 240],[70 180],'k-')
plot([240 400],[180 180],'k-')
plot([130 180],[0 70],'k-') % Lower B-C boundary slope OK
text(30,20,'A','FontSize',12);
text(30,150,'D','FontSize',12);
text(30,380,'E','FontSize',12);
text(150,380,'C','FontSize',12);
text(160,20,'C','FontSize',12);
text(380,20,'E','FontSize',12);
text(380,120,'D','FontSize',12);
text(380,260,'B','FontSize',12);
text(280,380,'B','FontSize',12);
set(gcf, 'color', 'white'); % sets the color to white
%print(gcf,'-dmeta','Clarke_EGA'); % Saves plot as a Enhanced MetaFile
total = zeros(5,1); % Initializes output
percentage = zeros(5,1); % Initializes output
for i=1:n,
if (yp(i) <= 70 && y(i) <= 70) || (yp(i) <= 1.2*y(i) && yp(i) >= 0.8*y(i))
total(1) = total(1) + 1; % Zone A
else
if ( (y(i) >= 180) && (yp(i) <= 70) ) || ( (y(i) <= 70) && yp(i) >= 180 )
total(5) = total(5) + 1; % Zone E
else
if ((y(i) >= 70 && y(i) <= 290) && (yp(i) >= y(i) + 110) ) || ((y(i) >= 130 && y(i) <=
180)&& (yp(i) <= (7/5)*y(i) - 182))
total(3) = total(3) + 1; % Zone C
else
if ((y(i) >= 240) && ((yp(i) >= 70) && (yp(i) <= 180))) || (y(i) <= 175/3 && (yp(i) <=
180) && (yp(i) >= 70)) || ((y(i) >= 175/3 && y(i) <= 70) && (yp(i) >= (6/5)*y(i)))
total(4) = total(4) + 1;% Zone D
else
total(2) = total(2) + 1;% Zone B
end % End of 4th if
end % End of 3rd if
end % End of 2nd if
end % End of 1st if
end % End of for loop
percentage = (total./n)*100;

39

You might also like