Professional Documents
Culture Documents
ii
Approval of the Department of Electronic and Telecommunication Engineering
This is to certify that we have read this project and that in our opinion it is fully
adequate, in scope and quality, as an Undergraduate Graduation Project.
Supervisor:
Date:
iii
Abstract
THESIS TITLE
The nature of the causes requires portability, ability to mass produce, afford-
ability in detection methods. However conventional detection technologies such
as CT scan and MRI, albeit being accurate and comprehensive, do not offer the
aforementioned features. A portable, affordable, safety abiding device to detect
intracranial hematoma has rich set of applications such as quick diagnosis, es-
pecially on patients with no external wounds, wider availability, by making the
devices available in virtually every infirmaries, pre-scanning before enlistment for
CT scans, on-site detection, especially on battle fields, nationwide catastrophes,
etc.
This report describes the design and development of the intracranial hematoma
detector (iHD) that detects the presence of the hematoma with above reasonable
accuracy. The solution consists of the iHD terminal and iHD mobile application
(iHDMA). iHD terminal consists of Near Infra-red (NIR) LED and sensor system
to measure the absorption of NIR light. The measured values are encoded and
transmitted, through BluetoothT M , to a mobile computer running iHDMA . In
iHDMA, using, optical density (OD) calculations, threshold detection, post detec-
tion integration and bidirectional associative memory, the presence of hematoma
is ascertained.
iv
“To our parents, teachers and friends.”
v
ACKNOWLEDGEMENTS
Dr. Ajith Pasqual has been a supportive and encouraging project advisor. He
showed a strong commitment and was very enthusiastic in extending a helping
hand. He was very approachable and open, on many occasions we were able to
contact him even in non-office hours, and notably one time, when he was on a
tour. Dr. Pasqual supervised two projects this year, and amidst his involvements
in numerous activities, he has always been there for us. In the middle, even when
we were about to follow through another project with another supervisor, he was
more than helpful. We thank him for being an excellent mentor and a guide.
Prof. J.A.K.S. Jayasinghe has been helpful is obtaining the enclosure within short
span of time. He, albeit his heavy schedule allocated time to check the design and
supervise the operation of the Rapid Prototyping Machine. We thank him for his
assistance.
Mr. Kithsiri Samarasinghe, former Head of the Department, offered valuable ad-
vices as a supervisor, mentor, lecturer, and Head of the Department. His popular
”five minute introduce yourself”, triggered many of us to reflect on ourselves and
encouraged us to be forward and assertive. More importantly his advices on final
year project procedures, engineering aspects and industry oriented preparation
were invaluable. We thank him for being a wonderful teacher.
Dr. Chulantha Kulasekare, Head of the Department, has served in the super-
visory panel during feasibility study presentation and offered valuable advices.
Further, during the project selection period, when we approached him with our
idea, he was very supportive and encouraging. He was clairvoyant in recognizing
the potential pitfalls and readily warned us about the caveats. We thank him for
being a supportive educator.
We are in debt to Dr. Kosala Ranatunga for proposing the idea, arranging meet-
ings with the Director of the Accident ward, General Hospital, Colombo and other
surgeons, and taking all the trouble in obtaining permissions. He was very sup-
portive during the last phase of the project and visited on the 17th of May to
vi
inspect the operation of the device as well. We thank him for his facilitation.
A number of people have helped us in iHD project. Sashitha Nalin, from De-
partment of Mechanical engineering, was helpful in designing the chassis. Few
other batch mates offered their valuable advice throughout the project. We also
thank the staff from Engineering Design Center for letting us use Rapid Prototype
machine and their help in using it. We also thank other staff members, technical
assistants, and non-academic staff for all their support.
We also thank our parents and friends for being there, during our tenure at Uni-
versity of Moratuwa, supporting us financially and otherwise, and tolerating us
during the hard times, especially during the busy days.
vii
TABLE OF CONTENTS
APPROVAL iii
ABSTRACT iv
DEDICATIONS v
ACKNOWLEDGEMENTS vi
ABBREVIATIONS xv
1 INTRODUCTION 1
1.1 Intracranial Hematoma Detector (iHD) . . . . . . . . . . . . . . . . 3
1.2 Organization of the Report . . . . . . . . . . . . . . . . . . . . . . . 5
2 LITERATURE SURVEY 6
2.1 Intracranial Hematoma (IH) . . . . . . . . . . . . . . . . . . . . . . 7
2.1.1 Types of Intracranial Hematoma . . . . . . . . . . . . . . . 7
2.1.2 Traumatic Brain Injury (TBI) . . . . . . . . . . . . . . . . . 9
2.2 Other diagnosis procedures . . . . . . . . . . . . . . . . . . . . . . . 10
2.2.1 Computed Axial Tomography (CAT) . . . . . . . . . . . . . 10
2.2.2 Magnetic Resonance Imaging (MRI) . . . . . . . . . . . . . 10
2.3 Near Infrared Spectroscopy (NIRS) . . . . . . . . . . . . . . . . . . 11
2.3.1 Application of near infrared spectroscopy for intracranial
hematoma detection . . . . . . . . . . . . . . . . . . . . . . 12
2.4 Safety Regulations . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
2.5 Algorithms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
2.5.1 Threshold detection . . . . . . . . . . . . . . . . . . . . . . . 15
2.5.2 Post detection integration . . . . . . . . . . . . . . . . . . . 15
2.5.3 Bidirectional Associative Memory (BAM) . . . . . . . . . . 16
2.6 Chapter Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
viii
3 SYSTEM OPERATION 17
3.1 Using the system . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
3.2 Operation of iHD terminal . . . . . . . . . . . . . . . . . . . . . . . 21
3.3 Operation of iHDMA . . . . . . . . . . . . . . . . . . . . . . . . . . 22
3.4 Chapter Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
4 SYSTEM ARCHITECTURE 26
4.1 iHD System Architecture . . . . . . . . . . . . . . . . . . . . . . . . 26
4.2 iHD Hardware Architecture . . . . . . . . . . . . . . . . . . . . . . 27
4.2.1 Signal generation and Sensor Subsystem . . . . . . . . . . . 28
4.2.1.1 Pulse generation . . . . . . . . . . . . . . . . . . . 29
4.2.1.2 NIR light emission . . . . . . . . . . . . . . . . . . 29
4.2.1.3 Signal reception, amplification and Analog to Dig-
ital Conversion (ADC) . . . . . . . . . . . . . . . . 31
4.2.1.4 Interfacing and Transmitter - Receiver Separation . 33
4.2.2 Processing & Controlling Subsystem . . . . . . . . . . . . . 36
4.2.2.1 PIC Microcontroller . . . . . . . . . . . . . . . . . 36
4.2.2.2 Sensor Interfacing . . . . . . . . . . . . . . . . . . 37
4.2.2.3 Possible methods of computation . . . . . . . . . . 38
4.2.3 Communication Subsystem . . . . . . . . . . . . . . . . . . . 39
4.2.3.1 UART . . . . . . . . . . . . . . . . . . . . . . . . . 40
4.2.4 Power Management Subsystem . . . . . . . . . . . . . . . . 42
4.2.4.1 Low Dropout (LDO) Regulators . . . . . . . . . . 42
4.2.4.2 Power Source . . . . . . . . . . . . . . . . . . . . . 43
4.2.4.3 DC Power and Charging . . . . . . . . . . . . . . . 43
4.2.4.4 Sleep, Power Saving Modes . . . . . . . . . . . . . 44
4.2.5 Input Output Subsystem . . . . . . . . . . . . . . . . . . . . 44
4.2.6 Safety concerns . . . . . . . . . . . . . . . . . . . . . . . . . 45
4.3 iHD Firmware Architecture . . . . . . . . . . . . . . . . . . . . . . 45
4.3.1 Communication state implementation . . . . . . . . . . . . . 46
4.3.2 Data Acquisition state implementation . . . . . . . . . . . . 46
4.3.3 User Indication IO . . . . . . . . . . . . . . . . . . . . . . . 46
4.4 Communication Protocol . . . . . . . . . . . . . . . . . . . . . . . . 47
4.4.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
4.4.2 Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
4.4.3 Message Starting Header . . . . . . . . . . . . . . . . . . . . 48
4.4.4 Message Body . . . . . . . . . . . . . . . . . . . . . . . . . . 49
4.4.5 Message-ending Header . . . . . . . . . . . . . . . . . . . . . 49
4.4.6 Frame . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
4.5 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
ix
5.1 Optical Density calculation on Isolated Scans . . . . . . . . . . . . 50
5.1.1 Merits and Demerits . . . . . . . . . . . . . . . . . . . . . . 51
5.2 Characteristics of Intensity values and OD . . . . . . . . . . . . . . 51
5.3 Reference Estimation through normalization . . . . . . . . . . . . . 52
5.3.1 Moving average based normalization . . . . . . . . . . . . . 52
5.4 Threshold detection . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
5.5 Post detection integration . . . . . . . . . . . . . . . . . . . . . . . 57
5.6 Application of Bidirectional Associative Memory (BAM) . . . . . . 58
5.7 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
7 CONCLUSION 69
7.1 Challenges . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
7.2 Contributions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
7.3 Future directions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
BIBLIOGRAPHY 72
APPENDICES 77
A iHD SCHEMATIC 77
C DATASHEETS 86
xi
LIST OF FIGURES
xii
6.3 Reference samples with normalization factor 9 . . . . . . . . . . . . 65
6.4 Reference samples with triangular normalization function . . . . . . 66
6.5 Reference samples with triangular normalization function . . . . . . 66
6.6 OD calculation on scan and reference intensities . . . . . . . . . . . 67
6.7 BAM to filter out unlikely cases . . . . . . . . . . . . . . . . . . . . 67
6.8 Visualization of the results. . . . . . . . . . . . . . . . . . . . . . . 68
6.9 Presentation of Quick scan OD output . . . . . . . . . . . . . . . . 68
xiii
LIST OF TABLES
xiv
ABBREVIATIONS
xv
Chapter 1
INTRODUCTION
1
to be misdiagnosed when sophisticated tests are not carried out [4]. In devel-
oping countries like Sri Lanka where the medical tests are costly and equip-
ments are scanty, this is not a rare case. Wider availability of an affordable,
less cumbersome device to provide positive confirmation of the disease will
be of great value to a physician in making a well informed decision (Courtesy
- Dr. E. C. Kulasekare)
• Reliable: The results should reflect the actual condition with high proba-
bility and device must be capable of self learning to adjust its parameter to
improve the accuracy in semi-supervised manner.
This report describes the design, implementation, and evaluation of iHD system
(figure: 1.1). It consists of hardware device - intracranial hematoma detector ter-
minal (iHD terminal), firmware running in the terminal and software application -
intracranial hematoma detector mobile application (iHDMA). The device operates
3
Figure 1.1: iHD with its top enclosure removed.
Figure 1.2: The assumed banana-shaped light path through tissue sample.
4
complexity and improve the feature set, we propose few enhancements that are
based on radar system principles.
Instead of single scan, continuous scans will be carried out to generate several sam-
ples that will be put through various methods and pattern matching algorithms to
semi-automatically detect the presence of hematoma, and provide visual imaging
of the head.
The remainder of this report discusses the background, design and development
of iHD system and evaluation of the system in real world application. Chapter
2 introduces to the general background and related work. Chapter 3 discusses
operation of the terminal and mobile application. We present the implementation
of the hardware and firmware of iHD system in Chapter 4. Chapter 5 describes the
algorithms used for hematoma likelihood estimation in iHDMA. Chapter 6 presents
the evaluation of the solution developed and discusses the results. Finally, Chapter
7 summarizes our work and discusses the possible future directions.
5
Chapter 2
LITERATURE SURVEY
This chapter presents the background and discusses the related work in the area
of intracranial hematoma detection. Section 2.1 begins with a general overview
of intracranial hematoma and discusses the causes and implications. Section 2.2
lists the current diagnosis procedures, merits and demerits. Section 2.3 gives an
overview of NIRS, examines its applicability for intracranial hematoma detection
and surveys related work in this area. Section 2.4 discusses the safety regulations.
Section 2.5 examines different techniques to estimate the presence of hematoma
from intensity data.
6
2.1 Intracranial Hematoma (IH)
• Intra-axial Hematoma
• Extra-axial Hematoma
7
of an artery, blood collection can cause rapid neurologic deterioration.
Although it occurs in 1-3 % of head injuries between 15 and 20% of
patients with epidural hematomas die of the injury [9] [10].
8
2.1.2 Traumatic Brain Injury (TBI)
The prime cause for the intracranial hemorrhage is Traumatic Brain Injury. TBI
(figure: 2.1) is often a result of direct hit to the brain from an external mechanical
force or high acceleration.
The yearly incidence in the US is estimated to be 1.5 per 1000 people (1.3 mild, 0.15
moderate and 0.14 severe injuries) which contributes to 52,000 deaths annually.
About two million people suffer from TBI and about 500,000 are hospitalized for
TBI in the United States alone [11]. In developing countries such as Sri Lanka,
the incidence of TBI has risen due to the alarming increase in automobile use and
9
industrialization with the absence of proportionate development in infrastructure,
and therefore corresponding rise in the number of vehicle accidents.
The mortality rate is estimated to be 21%, 30 days after TBI [11]. It is significant
as large percentage of TBI deaths occur weeks after the event [13], mainly due
to the secondary injury and complications developed. These secondary injuries
exacerbate the damage and contributes to great number of TBI deaths occurring
in hospitals [14].
Outcome for patients with head injury depends heavily on the cause. Patients
with TBI from falls have an 89% of survival rate while only 9% of patients with
firearm-related TBIs survive. Firearms and vehicle accidents are the most common
cause of fatal TBI [11].
A medical imaging technique used to visualize the internals and functions of the
organs and body. MRI offers greater contrast between different soft tissues and
clear picture than CT does, and hence useful in brain imaging. Further, unlike
10
CT, it uses no ionizing radiation, but a powerful magnetic field and therefore less
harmful to body. However MRI cannot be used on patients with metal implants,
and cardiac pacemakers due to effects of the strong magnetic field and powerful
radio frequency pulses [15].
Aforementioned methods share many merits like, high resolution, reliable opera-
tion and excellent accuracy. Nonetheless they also share the following common
drawbacks
• Unportable and hence cannot be deployed with field units to be used for
on-site detections.
11
Near-infrared spectroscopy (NIRS) is an optical noninvasive method of measuring
cerebral hemoglobin distribution. It is a useful technique to investigate biological
tissues, because in the near-infrared regions 750 − 900 nm (figure: 2.2), water has
a low absorption, while oxyhemoglobin (HbO2 ) and deoxyhemoglobin (Hb) still
have detectable absorption differences [12].
The basic principle of hematoma detection with NIRS is that water absorption
in the near infrared range is relatively small and hemoglobin contributes to most
of the tissue absorption; extra vascular blood absorbs NIR light more than nor-
mal brain tissue since there is a greater concentration of hemoglobin in an acute
hematoma. By comparing the re-reflected and diffusing optical signal I2 from the
12
suspicious hematoma side and I1 from the healthy side or from a standard model,
the optical density (OD) is calculated as in (Equation 2.1).
Figures 2.3 and 2.4 illustrate the direct correspondence between OD, and the
presence and type of hematoma. Hemorrhages, irrespective of their type, depth
or thickness produce an OD > 0.05 at high probability. Further extra cerebral
hemorrhages, irrespective of the depth or thickness produce an OD > 0.6 [18].
Intracerebral hemorrhages fall in the gray region and may be confused with small,
13
Figure 2.4: Optical density variations under different hematoma conditions
[17].
Food and Drug Administration (FDA), USA regulations limit the maximum power
irradiated to the skin to 2−5 mW/mm2 in the spectrum of wavelength of 700−900
nm for the exposure of 10 s or more. An LED source of high light intensity can
be considered for use when faced with this limitation.
Based on the experiments by Ito et al. [19], elevations in the temperature due to
NIR absorption is less than 0.5o C. In the experiments by Alper Bozkurt, et el
[20], the increase in the skin temperature was 0.5 ± 0.1o C due to the cushioning
14
material used to attach the light source, and that was mainly due to skin-air heat
exchange and sweating. However, the temperature increase due to semiconductor
junction is in the range of 1 to 10o C [20]. The major contributor is therefore the
semiconductor junction, which may cause burn injuries [21][22]. Further cell death
is possible in the event of sustained temperature rise above 41o C [23]. Therefore
care must be taken to control temperature.
2.5 Algorithms
When standard deviation (σ) and average noise (Vn ) can be calculated from the
sample vector, the dynamic threshold is established as in equation:2.2.
Vm = Vn + k × σ (2.2)
npositive
ppostdetectionintegration = (2.3)
n
Complex pattern matching algorithms can be used, and we demonstrate the ap-
plication of bidirectional associative memory in chapter 5.
BAM is an important tool available in Neural Networks and one of the most widely
used. It achieves heteroassociation with smaller correlation matrix. Once trained,
using a set of pairs of vectors, it could recall a pair (A, B) given initial pair (α, β).
Wang et al [24] illustrated the use of BAM for pattern recognition. Also it was
proved by Kosko [25], that BAM will converge for any correlation matrix W.
However it could not guarantee that energy will be at local minimum. But it was
shown by Yeou-Fang Wang et al [26] that guaranteed recall exists for all training
pairs thus trained relationship could be established. Additional mathematical
derivation is provided in Appendix D.
This chapter described background studies. Also it presented the current ap-
proaches and related work. The chapter then continued to explain the application
of NIR in IH detection. After that, it proposed enhancements in detection algo-
rithms to provide a new feature set and to improve accuracy. The next chapter
discusses the operation of iHD system.
16
Chapter 3
SYSTEM OPERATION
The complete solution consists of a portable remote device - iHD terminal - and a
mobile application - iHDMA - running on a mobile computer such as a Personal
Digital Assistant (PDA), notebook or netbook. In this chapter we will look at the
use of the device and operation of both iHD terminal and iHDMA. This chapter is
provided for the completeness only, and for a beginner level instruction User-Guide
must be referred to. Generic overview is given in section 3.1. Section 3.2 discusses
the use of iHD in-depth and section 3.2 leads through the use of iHDMA.
The iHD terminal is used to perform the scans and the iHDMA is used to compute
the results and visualize them.
• Mode 1 - Active Scan : Continuous scan over the injured side of the
head to obtain the intensity values over scanned area.
• Mode 2 - Reference scan : Continuous scan over the healthy side of the
head to obtain reference values.
• Mode 3 - Quick scan : Quick scan is performed in four stages over four
predefined locations (figure: 3.2) on the head. On each location a pair of
scan is performed on each side starting with left side of the head. Realtime
Bluetooth communication is enabled in this method.
17
Figure 3.1: Terminal is operated in four different modes. User can sequentially
move from one mode to another mode by pressing the mode button on the
device. User is also allowed to skip through modes and come back later.
18
– Mode 3a - Quick Scan on Frontal area : Over left (followed by right)
side of the forehead above the frontal sinus
Figure 3.2: Although Optical Density scans can be taken at any two identical
positions on either side of the head, these predefined positions will make the
process simpler and efficient.
Once the scans are completed, the data is transmitted to a mobile computer run-
ning iHDMA for analysis and semi-automatic diagnosis. iHDMA is run on a .Net
platform powered mobile computer with Windows Operating System (OS) in-
stalled. The computer should be Bluetooth enabled. The estimates are computed
by iHDMA and visualized (figures:3.3-3.4).
19
Figure 3.3: An important objective of iHD is to be simple to operate. The
results are visualized through a brain imaging, and thus provides greater us-
ability.
Figure 3.4: The summary is provided for a quick glance of all the details.
20
3.2 Operation of iHD terminal
Once the iHD terminal is powered on it will be put in mode 1 - active scan. The
user is indicated that the device is ready and waiting for user input. The device is
then moved gently over the injured side of the head from forehead to the occipital
protuberance while keeping the scan button pressed. The active state is indicated
to user.
If a scan is repeated under a particular mode before uploading the results to the
mobile application, data will be replaced allowing repeated scans to correct errors
in the process.
21
Once the required scans are completed, it moves into mode 4 - data transfer.
Here, the device is put into discovery mode searching for a serial profile enabled
Bluetooth connection. If one is found it is added to the list . No more user
interaction is needed on device side to complete the data transfer or diagnosis.
The use of mobile application is intuitive and designed to offer optimal user expe-
rience while enabling the maximum flexibility. The application is written on .Net
3.5 platform1 and has no other dependency.
The standard flow is to begin with data capture (figure: 3.5). Under this step, user
could verify the presence of a valid iHD terminal by pressing connect button. The
device would respond with a code that will be used to identify a valid terminal.
User could then proceed to capture data.
Figure 3.5: Under capture mode following the device validation user could
import the data with a single click. Should any error occur data buffer could
be flushed with reset button.
Capture is followed by save option, where record ID, medical officer ID and other
details can be stored together with the data. Also the integrity of the data is
1
.Net 3.5 runtime can be downloaded from Microsoft website :
http://www.microsoft.com/downloads
22
checked and it is processed (figure: 3.6). The data is stored in XML format so
that it could be subjected to further analysis with external applications.
Figure 3.6: Captured data can be completed with additional parameters and
saved as an XML file. User can then proceed to process data to generate anal-
ysis. Also user could load already saved or processed data for a re-analysis.
Further availability of active scan, reference scan and OD scan data are indi-
cated to the user; so is the data analysis results.
In the next step a quick snapshot of the results is produced for instant diagnosis.
Both intensity threshold (based on active and reference scans) and conventional
OD results are used to create visual imaging. The color variation is used to indicate
the severity and when the threshold is exceeded alert is generated, thus enabling
the quick identification of a hemorrhage. It is followed by advanced analysis (figure:
3.7).
The last step offers advanced configuration (figure: 3.8) for experienced users. If
Bluetooth connection port is configured with non-default parameters, correspond-
ing settings can be made here. Further signal intensity, pulse frequency and other
related parameters of iHD system can be configured here and synchronized with
the device.
23
Figure 3.7: In addition to quick results, advanced analysis can be opted for.
Parameters like normalization count, threshold limit, etc can be set with the
aid of visual indication under this section. Hence the parameters can be set to
attain the optimal performance.
Figure 3.8: Mobile computers may offer Bluetooth through a different port
or with different settings. Further user might prefer to change iHD terminal’s
firmware parameters for better performance. This section permit such config-
urations over Bluetooth, without modifying the actual firmware code. Also it
allows global level iHDMA parameter configurations.
24
3.4 Chapter Summary
This chapter described the use of iHD system. This chapter also described the
detailed use of software (iHDMA) and hardware (iHD) components of iHD system.
The next chapter discusses the architecture design and implementation of iHD
system.
25
Chapter 4
SYSTEM ARCHITECTURE
The critical component of the solution is the iHD terminal. In this chapter we will
look at the design architecture of the iHD terminal. We begin the chapter with
detailed description of the architecture of the iHD terminal in Section 4.1. We look
at the system from bird’s eye view and analyze the inter-operation between the
components. Section 4.2 is dedicated to the hardware design and implementation.
In Section 4.3 we describe the firmware component running the iHD terminal.
Section 4.4 examines the communication protocol specifications.
iHD terminal is used to perform different types of scans over both injured side
and reference side of the head, store them and transmit to the remote application.
The fundamental operation of a scan is to transmit a pulse modulated signal and
measure the intensity of the received signal. The transmitted signal is confined to
NIR spectrum with the aid of NIR LEDS, and differential analysis is performed
to cancel ambient noise. This atomic step is repeated at configured frequency on
26
a predetermined pattern to achieve several modes of operation. Further param-
eters pertinent to the signal generated and reception component are maintained
configurable to enable maximum flexibility.
The hardware implementation of the system (figure: 4.2) can be grouped into five
basic modules each with unique functionality considering the overall architecture.
The basic modules are,
• Communication Subsystem
27
• Power Management Subsystem
28
• Signal reception, noise cancelation and analog to digital conversion
Burst of pulses are generated through Pulse Width Modulation (PWM) program-
matically. This facilitates the power and time control in software. Microcontroller
is used to generate the PWM signal (figure: 4.3). Although it was initially con-
sidered to use an isolated signal generation circuit for better performance, due
to above reasonable power line noise, microcontroller based signal generation was
chosen. Further it allows greater control over the frequency, duty cycle and burst
time, while maintaining them configurable through firmware settings.
29
Wavelength consideration
One of the most important reasons for choosing a LED is that its radiation is within
the FDA limitations for the radiation power, and if needed multiple LEDs can be
30
operated together to attain required radiation intensity. Further glass top conver-
gence provided by LED was adequate to achieve the radiation intensity required
to penetrate the tissues and skull. Compared with quantitative measurement of
oxygen saturation or other applications, the incident light for hematoma detection
does not require as sharp a spectrum distribution as does the laser; hence LED is
used.
Following types of detectors, that can be used to measure the transmitted signals,
were considered.
The latter two options are not feasible on the basis of price and size.
31
Figure 4.4: OPT101. An integrated solution for high sensitive light to voltage
conversion over NIR region.
It is inexpensive compared to others such Si sensors and costs only 8U SDs [27].
TI’s free sample offer was used for the research and development process.
Dark Current Offset Correction: The dark current is the result of absence
of light falling on the photodiode and it makes small voltage at the output and it
should be avoided to have better performance.
32
summing junction (- input) is approximately 165 pA. Further it can is deducted
with the following circuit for improved performance (figure: 4.6).
Figure 4.6: The dark current will be subtracted from the amplifier’s bias
current, and this residual current will flow through the feedback resistor creating
an offset. The dark output voltage can be trimmed to zero with this optional
circuit. [27].
The primary concern was to achieve maximum coupling between transmitter and
receiver along the path through cerebrum while ensuring safety, minimum interface
noise addition, and least interference from ambient noise.
Separation : It was noted during the tests, due to the high sensitivity of the
sensor and narrow bandwidth of the transmitter, the direct noise from transmitter
to sensor could prevail at a meter separation even when they are not facing each
other. Further it was noted that the received power increases with the separation
up to 5 cm and then decreases according to inverse square law. The objective of
the design is to ensure maximum coupling through cerebrum and thus the perfect
separation was deemed to be 3 − 3.5 cm.
33
Interface : The photon current will be significant and unstable at the contact
boundary between the optical probe and the tissue surface. Poor optical contact
results in noise, false signals, and inconsistent readings. The surface of the head is
usually not flat. Further it was adequate to maintain perfect contact with sensor
while ensuring the emitted power of the LED is tunneled through the skull. It is
achieved by raising the sensor slightly above the surface of the device while placing
a pair of LEDs in a pit with aluminum and black rubber. This guarantees that full
LED power is channeled through head at minimum direct leakage to the sensor
(figure:4.8).
Figure 4.7: The design is planned such that, if necessary this could be further
improved to accommodate flexible elastic optical probes as shown.
The flexible probe improves optical contact, but we cannot say that it totally
solves the contact problem; for example, movement of the skin also results in
signal instability [28]. Thus the movement needs to be gentle and we advice a
speed of 16mms−1 .
34
Figure 4.8: The LED and photodiode are mounted on the baseboard, which
can be curved a little to fit the shape of a human head. A black sponge is used
to prevent leakage of light from the source to the detector [28].
Encapsulation : LED cannot be placed in direct contact with skin as the heat
transferred through conduction will be significant and will result in high temper-
ature rise of the skin (up to 9 degrees). This is taken care of by placing the LED
in an abyss while ensuring total enclosure. It requires encapsulation in a suitable
material:
A two-part clear silicon rubber satisfied all of the above requirements. Further,
to prevent direct leakage, it was first wrapped by aluminum foil followed by the
rubber material coated in black color. Encapsulation was carried out in three
stages
• Encapsulating the front of the PCB of LED board, except for the regions
directly above the LEDs and photo sensors
35
• Filling the regions directly above the LEDs and photo sensors
This is the brain of the blood clot detector and responsible for controlling all
the subsystems. The microcontroller is in charge of the whole operation, which
includes acquiring the signal, adjusting the incident light intensity, and commu-
nicating with the operator. The main functionalities required for this subsystem
will be Analog to Digital Convertor (ADC) to interface Sensor, controlling NIR
LED currents, adjusting intensity via use of pulse circuit, and UART operation
for serial communication between Bluetooth and Microcontroller. Due to the fact
that whole system is operated by low capacity small battery, it should operate
with low power consumption.
The major reason for selection of the PIC microcontroller is that it has emerging
development tools. Other reason for this selection was, this project was selected
to the second phase of the Microchip PIC32 Design Challenge. We were offered
the starter kits and other required resources free. Hence we selected PIC family
of Microcontroller as our main processing and controlling unit.
Features of PIC18F452
36
• UART Module
The OPT101 sensor produces an analog output which varies among two voltage
levels. But microcontroller processes only digital data. So we need to use analog
to digital conversion when interfacing the sensor to the Microcontroller. The
microcontroller has a 10 bit Analog-to-Digital converter (ADC) with externally
configurable voltage references. The 10-bit ADC includes the following features:
The data available from the sensor input can be read as digital after converting
them from analog by using ADC of the microcontroller. The absorption of NIR
light is the difference of the transmitted energy to the received energy. But these
two parameters cannot be calculated in practice.
The basic operation of hematoma detection is by exploiting the fact that water
absorption in the near infrared range is relatively small and hemoglobin contributes
to most of the tissue absorption which is calculated by comparing the reflected
and diffusing optical signal intensity Ilef t from left side and Iright from right side,
the optical density OD can be derived to:
OD = log10 (I0 /Ilef t ) − log10 (I0 /Iright ) = log10 (Ilef t /Iright ) (4.1)
37
Then intracranial hematoma can be detected by comparing the OD with the de-
tection threshold and historical data. According to position, different intracranial
hematomas can be divided into epidural, subdural, and intra-cerebral types. Back-
ground study given in section 2.3 provides the insight into this.
The exact depth of the hematoma from the surface that can be examined by NIRS
is still controversial. Further direct depth calculation is rendered impossible due
to short distances involved.
We will neither be able to generate nor detect at this high frequency (Equation
: 4.2) in a microcontroller based implementation. However through transmitting
38
burst of pulses of continuous intensity (type 3) and detecting patterns the charac-
teristics of the hematoma can be found.
The use of a remote connection to a wireless device such as PDA can help us
integrate great variety of flexibility into the system. The mobility of the device
is extremely high in such a design. Also it increases user friendliness by use of
graphical user interface on the remote device. Reasons for use of a Bluetooth (BT)
module (figure: 4.9):
39
• Relatively flexible, feature-rich software development and better graphic
quality are achieved. With use of BT we can maintain our functionality
in better quality and in very economic manner than other options.
1. SPP (Serial Port Profile) Support : All Mobile phones/PDAs support SPP
only
The BT module is compatible with UART interface controlling (figure: 4.10). The
module with AT command is dedicated to implement serial cable replacement. An
automatic point to point connection takes place when modules are switched on.
Modules are configured via macro instruction to play the role of master or slave.
4.2.3.1 UART
2. Data bits: 8
3. Stop bits: 1
4. Parity: None
When these settings are changed by the AT+UARTSETUP command, they are
stored in the flash memory to be reloaded when the module is powered up the
next time.
GPIO1 : This will be configured as output. GPIO1 is high when an SPP Blue-
tooth link to a remote device is present. GPIO1 is low when no Bluetooth link is
present.
41
accessed via the its protocol stack (figure: 4.11). The dataflow and command sets
are explained under section 4.3.
This subsystem manages power to the rest of the subsystems. To maximize the
power capacity and portability a rechargeable dual cell (7.4V - 8.4V ) will be used
to power the terminal. Provision of power at the appropriate voltages to the
other subsystems will be handled by this subsystem. The voltage and current
requirements for the device is tabulated below (Table 4.1).
42
versions, two currents 800mA and 1A. REG1117 characteristics
• Output tolerance: 1%
The requirement to have portability of the terminal requires small size battery op-
eration when considering the weight and the size of the device. Therefore we have
selected rechargeable dual cell with capacity of 2100mAh for major power source
for our device. The 2100mAh of capacity can operate the device continuously for
3 hours at full functionality.
The device can be simultaneously powered by both battery and external DC sup-
ply. A generic purpose DC adapter with 9V , 1A rating could be used to charge the
batteries while powering up the terminal. When the device is discharged the user
can connect to the charger and keep until the batteries get fully charged. However
to minimize the complexity and size of the device, no special power management
unit is provided.
43
4.2.4.4 Sleep, Power Saving Modes
The iHD terminal is an on-demand-use device and hence not expected to be pow-
ered on when it is not in use. Therefore special power saving and sleeping modes
other than the micro controller’s built in power saving modes of operation are not
considered.
This is the subsystem that interacts with user. The Sensor Subsystem could also
be categorized under this subsystem, but as it is the most critical component it
was considered separately. In this section we focus on controlling inputs to the
systems.
The main inputs used here to interact with user, are the mode selection button
and scan button. Visual imaging, statistical analysis and learning system will be
implemented in remote mobile computer such as a PDA which will act on the data
received via the Bluetooth connection.
As explained in section 3.1, once the device is powered on it will be put in mode
1. Through a push button, user could navigate through modes. The button is
connected to an interrupt enabled input of the microcontroller to give the highest
priority. User can then trigger the scan by pressing and holding the scan button
(under mode 1 - active scan and mode -2 reference scan) or pressing and releasing
the scan button. The button is provided with de-bouncing algorithm to improve
user interaction and allow accidental releases.
44
4.2.6 Safety concerns
As explained in section:2.5, care must be taken to ensure that the irradiated power
is within the safety limits. It was also earlier established that radiation up to 50
mW/cm2 is harmless as it is comparable to the irradiance of the NIR region of
the sunlight.
The average radiated power of an NIR LED is 20 mW, thus resulting in total
radiation of 40 mW assuming that 1 cm2 area is illuminated.
iHD Firmware Architecture is shown in (figure: 4.12). Due to the realtime nature
of the application both external input and internal clock triggered interrupts based
scheduler is implemented to switch between different states. A user input will take
priority and hence result in the state change wherever the program was. However
necessary care is taken to windup the current state properly and variables are
properly stored.
45
State maintainer chooses the appropriate state function and runs. There are two
such state implementations. In addition, it handles the user indication output
that reflects the current state and status of the operation.
This module handles the Bluetooth communication. When the state is entered,
the component resets the BT module through hardware reset, thus escaping from
whatever status the BT module is currently in. It is followed by initialization of
AT commands, and initial settings. Then BT is put in discovery mode, and when
it is contacted by a mobile computer running iHDMA it answers. This module
is also responsible for the responses to the commands sent from iHDMA. In this
context, it handles the formatting of replies and queueing them.
This module handles the different modes of scans. When one of the scan mode is
entered, settings of an atomic scan operation is loaded from EEPROM and stored
in global variables. Then the module chooses the properties depending on the scan
mode and calls the atomic scan function that is common for all. The operation is
then delegated to PWM generation, ADC sampling, encoding (10 bits output to
a word) and store functions.
The current state is displayed to user at all time, and changes in states are reflected
instantly, irrespective of the unloading and loading latency involved. Further, the
46
operation status such as scanning, busy, ready to scan and errors are displayed
appropriately.
This section describes the protocol that is adopted to be used for the commu-
nication between the remote intracranial hematoma detector (iHD) and Medical
Application (iHDMA) that is running in a Personal Computer, Notebook or Mo-
bile Computer. Detailed description of the protocol and examples are given in
Appendix B.
4.4.1 Introduction
The iHDMA will always be a host and iHD always be slaves. Therefore, only
iHDMA can initiate communication by querying the iHD and the iHD is obliged
to respond. The atomic unit of the data is a word (16 bits) which is in big-endian
format, i.e. the higher order byte is sent first. All the messages are encapsulated
between a message-starting header and message-ending header. Further frame
headers wrap all data frames.
One cycle of communication includes the command initiated by iHDMA and the
reply from iHD.
• Request Settings
• Update Settings
• Request Data
• Ping
47
4.4.2 Structure
The header identifies the type of the word (i.e. a Message Header) and type of
the command (Ping, Request Data, Request Settings or Update settings), and the
body is supplemented with any parameters if available. Hence, the body may be
absent when it is neither required by the command nor available. The command
or reply is ended with message-ending header which is 0xF F F F for all messages.
A 16 bits long word of the following format (Table : 4.2) will serve as a message-
starting header.
1 1 1 1 0 0 0 0 0 0 0 0 X X X X
Word Type Reserved Command / Message ID
(Message Header) (0 always) Reply
There are four types of commands (Table : 4.3) and they are replied with the
reply bit turned on:
Ping 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 1
Request Data 1 1 1 1 0 0 0 0 0 0 0 0 0 0 1 0
Request Settings 1 1 1 1 0 0 0 0 0 0 0 0 0 1 0 0
Update Settings 1 1 1 1 0 0 0 0 0 0 0 0 1 0 0 0
48
4.4.4 Message Body
For a command, message body is used to pass relevant parameters. For a reply,
message body consists of information that is queried through the command and
can vary depending on the type of the command.
All 16 bits are set to 1s and thus can be easily identified. Hence, data packets of
any type, settings-replies, frame headers and ping-replies cannot have all 16 bits
set.
4.4.6 Frame
4.5 Summary
This chapter described hardware architecture of iHD terminal explaining the in-
dividual subsystems and their operations. It discussed the firmware architecture
of iHD terminal. Also it presented the communication protocol specification. The
next chapter discusses the algorithms used to estimate the likelihood of hematoma
in iHDMA.
49
Chapter 5
Traditionally, for optical density calculations, scans are performed at selected pair
of locations, and they are used to estimate the likelihood of hematoma. We explore
alternative algorithms, mainly derived from a completely different area - radar
systems, for this purpose. In addition, we try to develop Artificial Neural Network
(ANN) based model for semi-automatic detection.
50
Absolute value of OD tells us the likelihood of a hematoma. The background
study given in section:2.5, provides us with a method of ascertaining it.
The sign of OD gives us the hematoma side. A positive OD means right side’s
intensity value is lower, and it translates to higher absorption of NIR on that side.
Hence it could be inferred that hematoma is on the right side.
Scans are performed on four predefined locations namely, frontal area, temporal
area, parietal area and occipital area. When a positive indication is generated more
scans can be carried out in the proximity and a clear picture can be generated.
The merits lie in the simplicity of the method and quick analysis. It gives the
results instantly, and an expert could offer the opinion instantly. Using his past
experience, he could be able to make the estimations without further analysis.
The demerits are possible false alarms due to noise and glitches that are not
accounted for. Further the absence of visual indication, advanced analysis and
intelligence makes this method unsuitable for less experienced personnel such as
first-aid crew.
Hematomas are generally of considerable size and hence identifiable from several
scans close by. Sensor, transmitter separation of 3 cm browses through an area of
1cm2 and hence by taking several measurements around that point false alarms
and misses can be avoided.
With regard to the absolute value of OD, an OD > 0.5 corresponds to 3 times
higher absorption and thus confirms the presence of hematoma. However an OD =
51
0.1 corresponds 1.26 times higher absorption which could have been caused by a
glitch or noise. An expert opinion is hence required under this method. Through
ANN we propose and automatic detection in the absence of an expert.
Further, the ability to make continuous scans give a promise for visualizing the
results easily. This requires us to acquire a number of samples over the injured
side of the head and find the corresponding reference value.
The caveat in carrying out continuous scans is the difficulty in controlling the
number of samples and uniformity. We could advice the personnel to move at a
constant slow pace over the head thus achieving reasonable level of uniformity in
the measurements. Further, knowing the total number of samples and end points
on the head we could estimate the average length covered by each sample.
However the problem of unequal number of samples from active scan and reference
scans still exists. We handle this by normalizing the reference sample count to that
of active scan.
For N number of active scan samples and M number of reference scan samples,
our objective is to achieve N number of reference scan samples (figure: 5.1 and
5.2) thus obtaining one-to-one correspondence between active scan samples and
reference scan samples. This is done by the normalization function (equation:
5.1).
52
Figure 5.1: The image depicts a possible scenario where unequal number of
samples might be acquired in Active and Reference scans.
Figure 5.2: The image illustrates the normalization operation. While unequal
sample counts have been normalized, spikes in reference samples also have been
been removed. This smoothing effect is controlled by the Normalization Factor
and in realtime controlled by the slider shown in the diagram.
53
let, X be the active scan sample vector, Y be the reference scan sample vector,
and Z be the normalize reference scan sample vector.
f or1 ≤ i ≤ N,
j = bi × N/M c
j − L if j − L > 1
Ns =
1 if else
j + L if j + L < M
Ne =
M if else
PN e
Y [k]
k=N s
Z[i] = (5.1)
Ne − Ns
However, with the distance from the current sample, the influence of other sample
values must decrease. That is if there are 20 active scan samples and 40 reference
scan samples the normalized reference scan sample corresponding to the 12th active
scan sample must heavily depend on 24th reference scan sample than on 26th or
22nd samples.
W1 = N e−k
if j ≤ k ≤ N e (5.2)
N e−j
0 if else
PN e
k=N s Y [k] × W1
Z[i] = (5.3)
Ne − Ns
However, for a larger normalization count along with a higher number of samples,
we go for an inverted-square windowing function (Equation: 5.4), that takes the
54
1
shape of 1+x2
.
1
if N s ≤ k ≤ N e
1+(k−j)2
W2 = (5.4)
0 if else
Once we generate two vectors of equal size, they can be directly compared and
anomalies can be identified. However to standardize the process and automate we
have to create a mathematical model.
The caveat is the intensity variation due to absorption, range from 1.2 times to
as high as 30 times. Adopting log model solves the problem by linearizing the
variation according to the order of the magnitude. Nonetheless, both linear and
logarithmical values are reported by iHDMA for completeness.
Further, the hematomas can be identified by setting a fixed threshold, for example,
OD = 0.2. However, this could cripple the flexibility and extensions. Therefore we
propose a probability based detection algorithm which will report the probability
of hematoma on individual locations based on normalized reference scans and
historical data.
Considering the reference vector as the sample set, standard deviation is found.
For a given probability of false alarm (pF A ) dynamic threshold (figure: 5.3) is
set. The outliers from set of reference scans (the samples exceeding this dynamic
threshold) are reported in terms of both OD and excess in times of standard
deviation (zstd ).
55
Figure 5.3: In threshold detection, dynamic threshold is generated by main-
taining constant probability of false alarm. A similar approach is taken and the
Threshold Factor is in realtime controlled by the slider shown in the diagram.
56
Figure 5.5: Post detection integration is used to improve the accuracy, and
automating detection. The key issue is to remove improbable scenarios similar
to one shown in figure: 5.4). As it can be seen from the above image, the
discrepancy is removed through post detection integration using algorithms such
as BAM.
This is coupled with the parameters derived earlier (either OD or standard devi-
ation) to give a better estimate (Equation:5.5).
57
Ihematoma = ppostdetectionintegration × zstd (5.5)
R
X
r r r T
W = q tp (5.6)
r=1
Where,
q is a constant found to minimize the energy of W and,
t is the expected results generated from the past experience.
58
5.7 Summary
59
Chapter 6
In this chapter we discuss the clinical trial procedures, output of the individual
components, performance metrics, and presentation of results.
The purpose of the trial is to assess the efficacy of the iHD and to obtain the
statistical data of the area and concentration of haemoglobin in intracranial haem-
orrhages.
To avoid bias, all the patients undergoing surgery due to intracranial hematoma
within a specified time period (from 5pm 21st May to 8am 22nd May), will be
taken for the trial.
60
The expected duration of subject participation is 5 minutes before undergoing
the surgery and a follow up trial after the surgery is conducted with a duration
of another 5 minutes, when possible. All patients undergoing the trial will be
scanned with the iHD. There will be 2 areal scans done in each side of the head
of the patient, and another 8 single scans on 8 specific areas of the head.
The discontinuation criteria for this trial is, if the patient shows signs of external
bleeding, or is the injured side of the patient cannot be touched without causing
pain to the subject.
The iHD project team will be accountable for conducting and managing the trial
procedure.
• Singular scan values are obtained in 8 different locations in the head shown
in figure:.3.2
61
6.1.5 Assessment of Efficacy
– The difference in the optical density on the injured side and the refer-
ence side.
– The correlation of the area of the hematoma from the CT scan and the
detected region by the iHD.
• Methods and timing for assessing, recording, and analyzing efficacy param-
eters: The efficacy parameters will be stored in electronic format, as an xml
file, and will be analyzed later by the iHD project team.
The safety regulations defined by FDA and discussed in section 2.4 have been
followed in the design as illustrated in section 4.2.6, and will be abided by in
conducting the tests as well.
6.1.7 Statistics
All the patients that satisfy the trial inclusion criteria at the Accident ward, Na-
tional Hospital, Colombo during the time period mentioned will be used for the
trial, and no sampling method will be used.
The number of subjects planned to be enrolled is 20. This number is used consid-
ering the average rate of reported cases of intracranial hematomas in the National
hospital and the statistical significance.
62
Data Handling and Recordkeeping : All the data of the trial will be kept and
handled by the iHD project team, until they are published.
Publication Policy : The data and records of the trial will be published by the
iHD project team, at the completion of the trials.
Light to voltage converter generates on average 700 mV when NIR light is sent
through the healthy side of the skull at frontal area. This is comparable with the
ambient noise of 50 mV . Therefore, the device is capable of detecting maximum
of 1.15 in OD.
On an unshaved head, the results have not been satisfactory and average results
ranged between 100 mV and 150 mV . As the hair absorption is significant, it will
be necessary to increase the power radiated. Therefore the device that is tuned
for the use on a shaved head will be ineffective when there is hair absorption, in
which case greater power is needed.
ADC has a resolution of 10 bits with reference voltage of 5V. Hence average sen-
sor output corresponds to a maximum of 143 of 1024 steps available, and there-
fore 8 least significant bits of 10 bit ADC output will be sufficient to detect the
hematoma. Therefore on continuous scan only last 8 bits are stored for analysis.
The complete process takes less than 15 minutes. Single scan takes on average
5 seconds and programmatically it is ended in 10 seconds. Further delays are
63
enforced to avoid accidental changes. Transfer of data from iHD to iHDMA over
Bluetooth is almost instantaneous. Full set of calculations in iHDMA on a note-
book with pentium AMD Turion 2.0 GHz processor and 2GB memory running
Vista OS takes less than 2 seconds.
Threshold detection is performed on the log ratio between scan and reference scan
values.
64
Figure 6.2: Reference samples with normalization factor 4
Figure 6.3: The image illustrates the effect of normalization factor in smooth-
ing reference scan values.
65
Figure 6.4: The image depicts the effect on using different functions for nor-
malization.
Figure 6.5: The image depicts the effect on using different functions for nor-
malization.
66
Figure 6.6: Threshold detection is performed on the log ratio between scan
and reference scan intensity values. The image shows the OD calculation.
Figure 6.7: The image demonstrates the use of BAM to filter out unlikely
detections semiautomatically by matching patterns.
67
Figure 6.8: The image shows the visualization of the results on a subject with
injury on left side of the head. Intensity variation on the injured side is shown
by the red color component. Further positive indications that are confirmed
by post detection integration - i.e. using BAM - are marked by white colored
circles.
68
Chapter 7
CONCLUSION
The report discussed the concepts behind the design of intracranial hematoma
detector, implementation, development of algorithm for semiautomatic detection,
and evaluation.
7.1 Challenges
69
power rating within the limits regulated by FDA. It is mainly achieved by
pulsing the source current, and producing NIR light in burst of pulses which
results in greater peak power while keeping the average power below the
limit.
• Compactness of the device: The size and design of the iHD should be
portable as it is expected to be a handheld. The circuits are arranged in
layers to stack them in smaller space. Also mobile phone batteries are used
to provide enough power while saving space.
• Field testings: The efficacy of the device can be only tested when it is
deployed in real world scenario. The difficulty is in obtaining the consensus
from the patients and relevant medical officers, and infrequency of arrival of
patients with extracerebral hematomas over a short time span. The testings
will be done.
7.2 Contributions
70
• Hardware device: iHD terminal is a simple microcontroller based system
that uses bursts of NIR light energy as per the specifications that are par-
tially configurable to measure the absorption differences. The system inter-
connects several subsystems including NIR transmitter and sensor, measures
the intensity of NIR light at reception, stores the data and transfers to the
mobile application.
In our discussions with neurologists, we understood they desire better imaging fea-
tures from this solution to substitute CT scans in peripheral hospitals. Currently
the system scans along a line, i.e. linear in dimension. By implementing an array
of LEDs and sensors it could be developed into a two-dimensional solution, which
could generate a complete visual imaging of the brain.
71
The device can be made more compact, resembling a mobile phone device by
using smaller surface mount components and advanced materials for chassis such
as recyclable glass and aluminum.
In order to keep the design simple and elegant it was decided to off-load all re-
porting functions to a mobile application. However, calculations such as OD value
can be moved to iHD.
72
BIBLIOGRAPHY
[1] L.A. Al-Gwaiz and H.H. Babay. The diagnostic value of absolute neutrophil
count, band count and morphologic changes of neutrophils in predicting bac-
terial infections. Medical Principles and Practice, 16(5):344–347, 2007. ISSN
1011-7571. URL http://www.karger.com/DOI/10.1159/000104806.
[3] Esther L Yuh, Alisa D Gean, Geoffrey T Manley, Andrew L Callen, and
Max Wintermark. Computer-aided assessment of head computed tomogra-
phy (ct) studies in patients with suspected traumatic brain injury. J Neu-
rotrauma, 25(10):1163–1172, Oct 2008. doi: 10.1089/neu.2008.0590. URL
http://dx.doi.org/10.1089/neu.2008.0590.
[4] L. L. Teunissen, G. J. Rinkel, A. Algra, and J. van Gijn. Risk factors for
subarachnoid hemorrhage: a systematic review. Stroke, 27(3):544–549, Mar
1996.
[6] Birsen Yazc Il-Young Son. Near infrared imaging and spectroscopy for brain
activity monitoring.
73
[7] S. P. Gopinath C. S. Robertson and B. Chance. Use of near infrared spec-
troscopy to identify traumatic intracranial hematomas. J. Biomed. Opt, 2:
3141, 1997.
[10] Sanders MJ and McKenna K. Head and Facial Trauma. Mosby, 2nd revised
edition, 2001. Chapter 22.
[14] Eugene Park, Joshua D Bell, and Andrew J Baker. Traumatic brain injury:
can the consequences be stopped? CMAJ, 178(9):1163–1170, Apr 2008. doi:
10.1503/cmaj.080282. URL http://dx.doi.org/10.1503/cmaj.080282.
[16] Patrick J. Treado, Ira W. Levin, and E. Neil Lewis. Near-infrared acousto-
optic filtered spectroscopic microscopy: A solid-state approach to chemical
74
imaging. Applied Spectroscopy, 46:553–559(7), 1 April 1992. doi: doi:10.
1366/0003702924125032. URL http://www.ingentaconnect.com.
[20] Alper Bozkurt and Banu Onaral. Safety assessment of near in-
frared light emitting diodes for diffuse optical measurements. Biomed
Eng Online, 3(1):9, Mar 2004. doi: 10.1186/1475-925X-3-9. URL
http://dx.doi.org/10.1186/1475-925X-3-9.
[24] Y. F. Wang, Jr. Cruz, J. B., and Jr. Mulligan, J. H. Two coding strategies
for bidirectional associative memory. 1(1):81–92, March 1990. doi: 10.1109/
72.80207.
75
[25] B. Kosko. Bidirectional associative memories. 18(1):49–60, Jan.–Feb. 1988.
doi: 10.1109/21.87054.
[26] Y. F. Wang, Jr. Cruz, J. B., and Jr. Mulligan, J. H. Guaranteed recall of all
training pairs for bidirectional associative memory. 2(6):559–567, Nov. 1991.
doi: 10.1109/72.97933.
[28] Q. Zhang, H. Ma, S. Nioka, and B. Chance. Study of near infrared technology
for intracranial hematoma detection. J Biomed Opt, 5(2):206–213, Apr 2000.
doi: 10.1117/1.429988. URL http://dx.doi.org/10.1117/1.429988.
76
Appendix A
IHD SCHEMATIC
Figure A.1: Schematic diagram of iHD terminal. Signal generation and sensor
subsystem and Communication subsystem are shown in the diagram.
77
Figure A.2: Schematic diagram of iHD. Microcontroller and power manage-
ment subsystem are show in the diagram
78
Appendix B
Version : 0.1
The document describes the protocol that is adopted to be used for the commu-
nication between the remote intracranial hematoma detector (iHD) and Medical
Application (iHDMA) running from a Personal Computer, Notebook or Mobile
Computer. Please note “iHD” and “iHD terminals” are used interchangeably to
denote the device.
• Bluetooth
• Serialport
In addition, other media may be supported, but have neither been tested nor docu-
mented.
B.1 Introduction
79
The atomic unit of the data is a word (16 bits) which is in big-endian format, i.e.
the higher order byte is sent first.
All the messages are encapsulated between a message-starting header and message-
ending header. Further frame headers wrap all data frames.
One cycle of communication includes the command initiated by iHDMA and the
reply from iHD.
• Request Settings
• Update Settings
• Request Data
• Ping
B.1.1 Structure
Figure B.1: The header identifies the type of the word (i.e. a Message Header)
and type of the command (Ping, Request Data, Request Settings or Update set-
tings), and the body is supplemented with any parameters if available. Hence,
the body may be absent when it is neither required by the command nor avail-
able. The command or reply is ended with message-ending header which is
0xFFFF for all messages.
80
B.2 Message-starting Header
A 16 bits long word of the following format will serve as a message-starting header
:
Figure B.3: Four types of words used for message starting header of com-
mands.
Figure B.4: Four types of words used for message starting header of replies.
For a reply, message body consists of information that is queried through the
command and can vary depending on the type of the command. All possible
message body combinations are explained below.
81
Figure B.5: Message body of ping reply. Ping reply can be anything, no
restriction is imposed on its format, but still it has to be divisible by 3.
Figure B.6: Message Body of update settings and request settings reply.
Replies are the same and both return all setting parameters, one per word
(Settings reply can be anything, no constraints on its format, but it cannot be
0xFFFF at any time to distinguish from Message-ending Header).
Figure B.7: Message body of request data reply. Data is packetized one level
further into frames. A typical request data - reply will be of this format, hence
making the frame a packet.
Figure B.8: Message-ending Header. All 16 bits are set to 1s and thus easily
identified. Hence, data packets of any type, settings-replies, frame headers and
ping-replies cannot have all 16 bits set.
B.5 Frame
82
Figure B.10: Data-Frame consists of a Frame-starting header, data packets,
and a frame-ending header.
Figure B.11: Typical word. The first 4 bits of a word are used to identify
the type of the word. This is possible because core information is of maximum
10 bits long (in the case of ADC output) and thus avoids unnecessary escaping
and processing that will be otherwise needed.
83
B.6.2 Message ID
1. Ping (0001)
1. Command (0)
2. Reply (1)
B.6.4 Frame ID
3. Stored OD Values
84
B.7 Summary
This protocol is designed with the scenario of multiple iHDs communicating with
iHDMA non-concurrently but simultaneously. Further, a typical communication
pattern of Pinging device, Request settings, Update settings, and Data acquisition
is assumed. The packets are formed from the atomic unit of word (of 16 bits with
first 4 bits identifying the type of the word).
85
Appendix C
DATASHEETS
Figure C.1: Datasheet of PIC 18F452 - the microcontroller used in iHD ter-
minal.
86
Figure C.2: Pin diagrams of PIC 18F452 - the microcontroller used in iHD
terminal.
87
Figure C.3: Specifications of OPT101 - the light to voltage converter used in
iHD terminal.
88
Figure C.4: OPAMP characteristics of OPT101 - the light to voltage converter
used in iHD terminal.
89
Figure C.5: Datasheet of 760/850 nm narrow bandwidth high power NIR
LEDS used in iHD terminal..
90
Appendix D
We will first look at the derivation and the algorithm of BAM. Then we will present
the conditions for complete recall.
R
X
r r r
W= q t pT (D.1)
r=1
r (0)
c = rp
r (k)
a = f (Wr c(k) )
r (k+1)
c = f (WT r a(k) ) (D.2)
r (N )
c = rp
r (N )
a = rt (D.3)
91
that happens when energy E is minimal.
E(r P, r t) = −r aT Wr c (D.4)
The equilibrium is ascertained when vectors c and a remain unchanged over iter-
ations.
For p and p1 are different by one Hamming Distance, a pair (l p, l t) can be recalled
iff
nl = l tT r tr pT l p − l t1T r tr pT l p1 (D.5)
R
X
r
∀l qnl ≥ 0 (D.6)
r=1
92