0% found this document useful (0 votes)
124 views184 pages

Medical Embedded Systems

Embedded systems in medicine

Uploaded by

aloove66
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
124 views184 pages

Medical Embedded Systems

Embedded systems in medicine

Uploaded by

aloove66
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 184

University of California

Los Angeles

Medical Embedded Systems

A dissertation submitted in partial satisfaction of the requirements for the degree Doctor of Philosophy in Computer Science

by

Roozbeh Jafari

2006

c Copyright by Roozbeh Jafari 2006

The dissertation of Roozbeh Jafari is approved.

Benjamin M. Wu

Glenn Reinman

Milos D. Ercegovac

Majid Sarrafzadeh, Committee Chair

University of California, Los Angeles 2006

ii

To my parents, Zoya and Rahim for teaching me to love learning

iii

Table of Contents

1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 Recongurable Fabric Vest . . . . . . . . . . . . . . . . . . . . . . 2.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.1.1 2.1.2 Motivation . . . . . . . . . . . . . . . . . . . . . . . . . . . Driver Application . . . . . . . . . . . . . . . . . . . . . .

1 5 5 5 6 8 10 10 10 11 12 13 14 14 15 17 20 20

2.2 Related Work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.3 Design of Medical Jacket . . . . . . . . . . . . . . . . . . . . . . . 2.3.1 2.3.2 2.3.3 2.3.4 2.3.5 Interconnection Topology . . . . . . . . . . . . . . . . . .

Computational Units/Controllers . . . . . . . . . . . . . . Switches . . . . . . . . . . . . . . . . . . . . . . . . . . . . Sensing Components . . . . . . . . . . . . . . . . . . . . . Actuators . . . . . . . . . . . . . . . . . . . . . . . . . . .

2.4 Ischemia Detection and Drug Delivery Method (IDDD) . . . . . . 2.4.1 2.4.2 2.4.3 ECG Interpretation . . . . . . . . . . . . . . . . . . . . . . Ischemia Detection and Drug Delivery . . . . . . . . . . . Implementation of Algorithm on Processing Units . . . . .

2.5 Reconguration . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.5.1 2.5.2 Network Topology in Medical Jacket . . . . . . . . . . . . Processing, Synchronization and Reconguration in Medical Jacket . . . . . . . . . . . . . . . . . . . . . . . . . . .

21

iv

2.6 2.7

Experimental Analysis . . . . . . . . . . . . . . . . . . . . . . . . Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

24 28

3 An Ecient Placement and Routing Technique for Fault-tolerant Wearable Computers . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.1.1 3.1.2 Motivation . . . . . . . . . . . . . . . . . . . . . . . . . . . Driver Application . . . . . . . . . . . . . . . . . . . . . . 32 32 32 33 34 37 37 38 39 39 40 41 43 48 49 50 51 51 58

3.2 Related Work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.3 Preliminaries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.3.1 3.3.2 3.3.3 3.3.4 3.3.5 3.3.6 3.3.7 3.3.8 3.3.9 Interconnection Topology . . . . . . . . . . . . . . . . . .

Switch Model . . . . . . . . . . . . . . . . . . . . . . . . . Circuit Switching vs. Packet Switching . . . . . . . . . . . Power Lifetime . . . . . . . . . . . . . . . . . . . . . . . . Power Consumption Model . . . . . . . . . . . . . . . . . . Fault Lifetime . . . . . . . . . . . . . . . . . . . . . . . . . Fault Model . . . . . . . . . . . . . . . . . . . . . . . . . . Integer Linear Programming Formulation . . . . . . . . . . Terminology . . . . . . . . . . . . . . . . . . . . . . . . . .

3.4 Problem Denition . . . . . . . . . . . . . . . . . . . . . . . . . . 3.5 Problem Formulation . . . . . . . . . . . . . . . . . . . . . . . . . 3.5.1 3.5.2 Routing . . . . . . . . . . . . . . . . . . . . . . . . . . . . Placement . . . . . . . . . . . . . . . . . . . . . . . . . . .

3.6 3.7

Experimental Analysis . . . . . . . . . . . . . . . . . . . . . . . . Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

60 66

4 Adaptive Electrocardiogram Feature Extraction on Distributed Embedded Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.2 Related Work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.3 Automated Feature Set Detection . . . . . . . . . . . . . . . . . . 4.4 Software Proling . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.5 Target Architecture Model . . . . . . . . . . . . . . . . . . . . . . 4.6 Dynamic Reconguration . . . . . . . . . . . . . . . . . . . . . . . 4.7 Feature Set Partitioning . . . . . . . . . . . . . . . . . . . . . . . 4.8 Simulation Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . 4.9 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 Customizable Medical Monitoring Platform . . . . . . . . . . . . 5.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.2 System Description . . . . . . . . . . . . . . . . . . . . . . . . . . 71 71 73 74 79 80 81 82 86 87 97 97 99

5.3 Related Work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103 5.4 Design of CustoMed . . . . . . . . . . . . . . . . . . . . . . . . . 105 5.4.1 5.4.2 5.4.3 5.4.4 Sensors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105 Med Nodes . . . . . . . . . . . . . . . . . . . . . . . . . . 107 Pocket PC . . . . . . . . . . . . . . . . . . . . . . . . . . . 107 Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108

vi

5.5 5.6 5.7 5.8

Driver Application . . . . . . . . . . . . . . . . . . . . . . . . . . 108 Sensor Calibration . . . . . . . . . . . . . . . . . . . . . . . . . . 111 Experimental Analysis . . . . . . . . . . . . . . . . . . . . . . . . 111 Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114

6 CMAS: Clinical Movement Assessment System for Neuromotor Disorders . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119 6.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119 6.2 Related work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120 6.3 Hardware design . . . . . . . . . . . . . . . . . . . . . . . . . . . 120 6.3.1 6.3.2 6.3.3 6.3.4 Sensors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121 Handgrip device . . . . . . . . . . . . . . . . . . . . . . . . 121 Med node . . . . . . . . . . . . . . . . . . . . . . . . . . . 122 Pocket PC . . . . . . . . . . . . . . . . . . . . . . . . . . . 123

6.4 Software design . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123 6.4.1 6.4.2 Med node . . . . . . . . . . . . . . . . . . . . . . . . . . . 123 Pocket PC . . . . . . . . . . . . . . . . . . . . . . . . . . . 124

6.5 Test sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125 6.6 Experimental results . . . . . . . . . . . . . . . . . . . . . . . . . 127 7 On Minimal Energy Skew Routing in Lossy Wireless Sensor Networks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130 7.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130 7.2 Related Work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131

vii

7.3 7.4 7.5

Preliminaries and Models . . . . . . . . . . . . . . . . . . . . . . . 133 Denition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134 Minimal-Skew Routing . . . . . . . . . . . . . . . . . . . . . . . . 136 7.5.1 7.5.2 7.5.3 7.5.4 7.5.5 Problem Formulation and -Approximation Algorithm . . . 136 Discussion on Lossy Channels . . . . . . . . . . . . . . . . 145 Dissimilar Initial Energy Levels . . . . . . . . . . . . . . . 146 Time Complexity Analysis . . . . . . . . . . . . . . . . . . 147 Discussion on Multicommodity . . . . . . . . . . . . . . . 148

7.6 Experimental Results . . . . . . . . . . . . . . . . . . . . . . . . . 148 7.7 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158

viii

List of Figures
2.1 2.2 2.3 2.4 2.5 2.6 2.7 2.8 2.9 System Architecture of the Medical Jacket . . . . . . . . . . . . . Fabric with Mesh of Wires . . . . . . . . . . . . . . . . . . . . . . Switch Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A Dot-Mote along with a Switch . . . . . . . . . . . . . . . . . . 6 11 12 12 14 15 15 17 21 29 30 30 38 43 44 45 48 52 62 63 64

Electrode for Transdermal Iontophoresis System . . . . . . . . . . A typical ECG Signal . . . . . . . . . . . . . . . . . . . . . . . . . Normal and Abnormal ECG Signals . . . . . . . . . . . . . . . . . Ischemia Detection Operations . . . . . . . . . . . . . . . . . . . . Network Topology . . . . . . . . . . . . . . . . . . . . . . . . . .

2.10 Task Multiplexing in Medical Jacket Network . . . . . . . . . . . 2.11 Medical Jacket Prototype . . . . . . . . . . . . . . . . . . . . . . 2.12 Power Consumption of Medical Jacket . . . . . . . . . . . . . . . 3.1 3.2 3.3 3.4 3.5 3.6 3.7 3.8 3.9 Interconnection topology . . . . . . . . . . . . . . . . . . . . . . . Tear model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Representation of tears in dual graph . . . . . . . . . . . . . . . . Region subdivisions for every edge in dual graph . . . . . . . . . . Probability of edge failure in the grid for all possible distinct tears ILP variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Fault/power lifetime ratio for 7x7 mesh size . . . . . . . . . . . . Lifetime analysis (f = 1/24 h1 ) . . . . . . . . . . . . . . . . . . Lifetime analysis (f = 1/30 h1 ) . . . . . . . . . . . . . . . . . .

ix

3.10 Lifetime analysis (f = 1/36 h1 ) . . . . . . . . . . . . . . . . . .

65

3.11 Lifetime analysis on xed mesh size varying communication distance(f = 1/24 h1 ) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66

3.12 Lifetime analysis on xed mesh size varying communication distance(f = 1/30 h1 ) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67

3.13 Lifetime analysis on xed mesh size varying communication distance(f = 1/36 h1 ) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.14 Performance comparison of our technique with a greedy method (f = 1/24 h1 ) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.15 Performance comparison of our technique with a greedy method (f = 1/36 h1 ) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.1 ECG analysis schematic . . . . . . . . . . . . . . . . . . . . . . . 4.2 Automatic ECG segmentation performed on ltered signal . . . . 4.3 The sampling intervals of ECG morphologies 1 and 2. Morphology 1 consists of samples extracted from QRS onset and oset. Morphology 2 consists of samples from S-wave oset and T-wave oset. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.4 The sampling intervals of ECG morphologies 3 and 4. Morphology 3 consists of samples between 50 ms before and after the ducial point (FP). Morphology 4 consists of samples between 150 ms and 500ms after the ducial point. . . . . . . . . . . . . . . . . . . . . 4.5 Graph generated from proling analysis containing only major blocks required for feature extraction. . . . . . . . . . . . . . . . . 91 90 89 70 88 89 69 68

4.6

Delays corresponding to ECG feature detection modules extracted in proling phase . . . . . . . . . . . . . . . . . . . . . . . . . . . 92

5.1 5.2 5.3 5.4 5.5 5.6 5.7 5.8 5.9

System Components . . . . . . . . . . . . . . . . . . . . . . . . . 100 CustoMed GUI on a Personal Computer . . . . . . . . . . . . . . 101 Application Development Cycle . . . . . . . . . . . . . . . . . . . 102 A Med Node along with Sensors . . . . . . . . . . . . . . . . . . . 108 Data Monitoring on a Remote Server . . . . . . . . . . . . . . . . 109 System Hierarchy . . . . . . . . . . . . . . . . . . . . . . . . . . . 110 Med Nodes Placement on Body . . . . . . . . . . . . . . . . . . . 112 CustoMed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116 Base Station Med Node and a Pocket PC . . . . . . . . . . . . . . 117

5.10 Sensor Readings during Indoor Slow Walk . . . . . . . . . . . . . 118 6.1 6.2 6.3 6.4 6.5 7.1 7.2 7.3 7.4 7.5 Handgrip device . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122 Connection setup window . . . . . . . . . . . . . . . . . . . . . . 125 Calibration window . . . . . . . . . . . . . . . . . . . . . . . . . . 126 CMAS task window . . . . . . . . . . . . . . . . . . . . . . . . . . 127 Average and individual forces during Task 1 . . . . . . . . . . . . 128 Minimum Skew Denition . . . . . . . . . . . . . . . . . . . . . . 135 Node partitioning . . . . . . . . . . . . . . . . . . . . . . . . . . . 138 Original network and the resulting network after partitioning . . . 139 Flow exchange to obtain minimal-skew solution . . . . . . . . . . 143 Edge splitting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146

xi

7.6 7.7

Graph topology (n=100, grid distribution) . . . . . . . . . . . . . 150 Normalized energy consumption rate in sorted order (n=100, grid distribution) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151

7.8 7.9

Graph topology (n=100, random distribution) . . . . . . . . . . . 152 Normalized energy consumption rate in sorted order (n=100, random distribution) . . . . . . . . . . . . . . . . . . . . . . . . . . . 153

7.10 min-skew/min-cost lifetime for various number of splits - k (n=100, grid distribution) . . . . . . . . . . . . . . . . . . . . . . . . . . . 154 7.11 min-skew/min-cost lifetime for various number of splits - k (n=100, grid distribution) . . . . . . . . . . . . . . . . . . . . . . . . . . . 154 7.12 min-skew/min-cost lifetime for various number of splits - k (n=100, rand distribution) . . . . . . . . . . . . . . . . . . . . . . . . . . . 155 7.13 min-skew/min-cost lifetime for various number of splits - k (n=100, rand distribution) . . . . . . . . . . . . . . . . . . . . . . . . . . . 155 7.14 Average delay of min-skew/min-cost for various number of splits k (n=100, grid distribution) . . . . . . . . . . . . . . . . . . . . . 156 7.15 Average delay of min-skew/min-cost for various number of splits k (n=100, grid distribution) . . . . . . . . . . . . . . . . . . . . . 156 7.16 Average delay of min-skew/min-cost for various number of splits k (n=100, rand distribution) . . . . . . . . . . . . . . . . . . . . . 157 7.17 Average delay of min-skew/min-cost for various number of splits k (n=100, rand distribution) . . . . . . . . . . . . . . . . . . . . . 157

xii

List of Tables
2.1 2.2 2.3 2.4 3.1 3.2 4.1 4.2 4.3 Fault Detection/Reconguration Time . . . . . . . . . . . . . . . Power Consupmtion/Reliability of the Medical Jacket . . . . . . . Computational Capability of Dot-Motes . . . . . . . . . . . . . . Number of Unknown Beat Queries Sent to Pokcet PC . . . . . . . Power/fault lifetime comparison in 5x5 grid . . . . . . . . . . . . Power/fault lifetime comparison in 7x7 grid . . . . . . . . . . . . Features categorized by groups . . . . . . . . . . . . . . . . . . . . Benchmark statistics . . . . . . . . . . . . . . . . . . . . . . . . . Number of queries exchanged among processing units : sampling rate = 360 sample/sec . . . . . . . . . . . . . . . . . . . . . . . . 4.4 Number of queries exchanged among processing units : sampling rate = 200 sample/sec . . . . . . . . . . . . . . . . . . . . . . . . 4.5 Number of queries exchanged among processing units : sampling rate = 100 sample/sec . . . . . . . . . . . . . . . . . . . . . . . . 5.1 5.2 5.3 6.1 96 95 94 26 27 27 31 61 61 77 93

CustoMed System Specication . . . . . . . . . . . . . . . . . . . 112 Wireless Channel Characteristics during Indoor Slow Walk . . . . 114 Wireless Channel Characteristics during Outdoor Normal Walk . 114 Itemized force error and frequency dierence . . . . . . . . . . . . 129

xiii

Acknowledgments
First and foremost, I would like to thank my advisor, Professor Majid Sarrafzadeh. Without his invaluable support and guidance, my thesis work would not have been possible. I am very grateful for his patience, motivation, enthusiasm, and immense knowledge that, taken together, make him a phenomenal mentor. I would like to thank other great mentors I had the opportunity to work with: Professors V. Reggie Edgerton, Miodrag Potkonjak and Devin L. Jindrich. I would also like to extend my appreciation to my thesis committee members, Professors Milos Ercegovac, Glenn Reinman and Benjamin Wu. I would like to thank present and past members of Embedded and Recongurable lab for their friendship and constructive discussions we had. I had the opportunity to supervise and guide many undergraduate and graduate students. I wish to thank them for giving me the chance to discover my passion for teaching and academic research. I must thank the ones who played a decisive role: Hyduke Noshadi, Azad Zahoory and Andre Encarnacao. I would like to thank all my wonderful friends in Los Angeles for the great and joyous moments we shared together. It would be a long list to mention all of the friends that I am indebted to. I gratefully thank all of them. I wish to thank my relatives in the United States: my aunt Rafat, my uncles Karim, Farhad and Abbas, and my cousins Sepehr, Mehrdad, Maryam, Farnaz and Ali for their support and love. Most of all, my deepest gratitude goes to my family, my Mom Zoya, my Dad Rahim, my sister Ramak and my brother Ramin for the unconditional love and support that they have given me. One of my most wonderful childhood memories is when my mom used to read books to me and my sister with such great patience.

xiv

I will never forget the moment my Dad brought in my rst computer. Ramak and Ramin are the most amazing siblings one could ever have. Last but certainly not least a very special thanks to my Grandma for her love and encouragement. Thank you!

xv

Vita

1977 2000

Born, Tehran, IRAN. B.S. (Electrical Engineering), Sharif University of Technology, Tehran, IRAN.

2002

M.S. (Electrical Engineering), State University of New York at Bualo, NY.

2004

M.S. (Computer Science), University of California, Los Angeles, CA.

Publications

Optimal Register Sharing for CFG Synthesis in SSA Form Philip Brisk, Foad Dabiri, Roozbeh Jafari, Majid Sarrafzadeh IEEE Transactions on CAD (TCAD), vol 25 no. 5, pp 772-779, May 2006.

Light-weight Embedded Systems Foad Dabiri, Roozbeh Jafari, Ani Nahapetan, Majid Sarrafzadeh In Computer Engineering Handbook, Edited by Vojin Oklobdzija, Taylor & Francis/CRC Press, to appear.

A Unied Theory of Timing Budget Management Soheil Ghiasi, Elaheh Bozorgzadeh, Po-kuan Huang, Roozbeh Jafari, Majid Sarrafzadeh accepted for publication in IEEE Transactions on Computer Aided Design (TCAD), to appear.

xvi

Probabilistic Delay Budgeting for Soft Realtime Applications Soheil Ghiasi, Pokuan Huang, Roozbeh Jafari accepted for publication in IEEE Transactions on VLSI (TVLSI), to appear.

Recongurable Fabric Vest for Fatal Heart Disease Prevention Roozbeh Jafari, Foad Dabiri, Philip Brisk, Majid Sarrafzadeh accepted for publication in Journal of Embedded Computing (JEC), to appear.

-Optimal Minimal-Skew Battery Lifetime Routing in Distributed Embedded Systems Roozbeh Jafari, Foad Dabiri, Majid Sarrafzadeh Journal of Low Power Electronics (JOLPE), vol 1, no. 2, pp 97-107, September 2005.

Micro-Sequencer Approach Speeds Reconguration Roozbeh Jafari, Henry Fan, Majid Sarrafzadeh Computers O-The Shelf (COTS) Journal, vol 5, no. 6, pp 49-55, June 2003.

An Ecient Placement and Routing Technique for Fault-tolerant Distributed Embedded Computing Roozbeh Jafari, Majid Sarrafzadeh accepted for publication in ACM Transactions on Embedded Computing Systems (TECS), to appear.

Adaptive Electrocardiogram Feature Extraction on Distributed Embedded Systems Roozbeh Jafari, Hyduke Noshadi, Soheil Ghiasi, Majid Sarrafzadeh IEEE Transactions on Parallel and Distributed Systems special issue on High Performance Computational Biology (TPDS), vol. 17, no. 8, pp 1-11, August 2006.

xvii

Abstract of the Dissertation

Medical Embedded Systems


by

Roozbeh Jafari
Doctor of Philosophy in Computer Science University of California, Los Angeles, 2006 Professor Majid Sarrafzadeh, Chair

Light-weight embedded systems are now gaining more popularity due to recent technological advances in fabrication of more powerful tiny processors. In particular, the eld of pervasive computing and medical monitoring is emerging due to the development of tiny and low-prole computing nodes, mated with sensors and actuators, in close proximity to the human. In this thesis, I will demonstrate some of my Ph.D. work that has been focused on design and analysis of hardware and software for medical embedded systems. In particular, I will discuss two of our platforms: Recongurable Fabric Vest and CustoMed (Customizable Medical Monitoring System). I will further describe some of the fundamental problems I have been investigating: An Ecient Placement and Routing Technique for Fault-tolerant Wearable Computers Adaptive Electrocardiogram Feature Extraction on Distributed Embedded Systems -Optimal Minimal-Skew Battery Lifetime Routing in Distributed Embedded Systems

xviii

CHAPTER 1 Introduction
In recent years, exciting technological advances have been made in development of exible electronics. These technologies oer the opportunity to weave computation, communication and storage into the fabric of the every clothing that we wear, therefore, creating intelligent fabric. Chapter 2 presents a medical vest which has sensors for physiological readings and software-controlled, electricallyactuated trans-dermal drug delivery elements. Furthermore, computational elements are embedded in the vest for collecting data from sensors, processing them and driving actuation elements. Since this vest will be used for medical, life-critical applications, the single most critical requirement of such a vest is an extremely high level of robustness and fault tolerance. Meantime, the key technological constraint for these mobile systems is their power consumption. Our target application for our medical vest is the detection of possibly fatal heart problems, specically unstable angina pectoris or ischemia. We illustrate the design stages of our medical vest as well as the technical details of both software and network reconguration schemes (to enhance the robustness and the performance of our system). We also discuss the details of ischemia detection algorithm employed in our vest. Moreover, we evaluate the robustness of our system with existence of various faults. Finally we measure the performance of our algorithm as well the power consumption of several congurations of our vest. Chapter 3 presents an ecient technique for placement and routing of sen-

sors/actuators and processing units in a grid network. The driver application that we present is a medical jacket which requires an extremely high level of robustness and fault tolerance. The power consumption of such jacket is another key technological constraint. Our proposed interconnection network is a mesh of wires. A jacket made of fabric and wires would be susceptible to accidental damage via tears. By modeling the tears, we evaluate the probability of having failures on every segment of wires in our mesh interconnection network. Then we study two problems of placement and routing in the sensor networks such that the fault tolerance is maximized while the power consumption is minimized. We develop ecient integer linear programming (ILP) formulations to address these problems and perform both placement and routing simultaneously. This ensures that the solution is a lower bound for both problems. We evaluate the eectiveness of our proposed techniques on a variety of benchmarks. Tiny embedded systems have not been an ideal outt for high performance computing due to their constrained resources. Limitations in processing power, battery life, communication bandwidth and memory constrain the applicability of existing complex medical analysis algorithms such as the Electrocardiogram (ECG) analysis. Among various limitations, battery lifetime has been a major key technological constraint. In Chapter 4, the issue of partitioning such a complex algorithm while the energy consumption due to wireless transmission is minimized is addressed. ECG analysis algorithms normally consists of preprocessing, pattern recognition and classication. Considering the orientation of the ECG leads, we devise a technique to perform preprocessing and pattern recognition locally in small embedded systems attached to the leads. The features detected in pattern recognition phase are considered for the classication. Ideally, if the features detected for each heartbeat reside in a single processing node, the transmission will be unnecessary. Otherwise, to perform classication,

the features must be gathered on a local node and thus, the communication is inevitable. We perform such a feature grouping by modeling the problem as a hypergraph and applying partitioning schemes which yields a signicant power saving in wireless communications. Furthermore, we utilize dynamic reconguration by software module migration. This technique with respect to partitioning enhances the overall power saving in such systems. Moreover, it adaptively alters the system conguration in various environments and on dierent patients. We evaluate the eectiveness of our proposed techniques on MIT/BIH benchmarks and on average achieve 70% energy saving. Ubiquitous computing denes a new era in which a large number of heterogeneous systems collaborate to support the execution of medical applications and health care monitoring. In Chapter 5, we propose a system for rapidly constructing low-cost prototypes for medical monitoring by leveraging wireless sensor nodes. Our platform is a new architecture called CustoMed that will reduce the customization and reconguration time for medical systems. This architecture is a network enabled system that supports various wearable sensors. Moreover, it contains on-board general computing capabilities for executing individually tailored event detection, alerts, and network communication with various medical informatics services. The customization of such system with a large number of med nodes is extremely fast in a few minutes even by non-engineering sta. In this paper, we present the design stages of such system along with experimental analysis that evaluates its performance. We are developing a clinical movement assessment system (CMAS) to quantify motor eort following neuromotor injury. The system will allow for easy and versatile data collection by non-technical sta and patients from a variety of devices by using recent advances in technology for real-time reconguration. We

will demonstrate the eectiveness of our system by developing a patient-friendly device in Chapter 6. A prototype of the device has been implemented and used to measure nger forces in exion and extension. The eciency of the CMAS devices will be demonstrated by making quantitative assessments of neuromotor eorts following stroke in a patient population. At present, our experimental results on two subjects show the eectiveness of our device. For several sensor networks applications, it is critical to extend the lifetime of each individual sensor node in order to remain operational for the longest time possible. Therefore, the power consumption rate should be evenly distributed over all the nodes in the system. Traditional routing algorithms attempt to minimize the total power consumption of the system, but they do not attempt to evenly distribute the load over all the nodes in the network. In Chapter 7, we present an ecient routing algorithms that minimizes the energy skew among nodes in a network with lossy links. We propose an -optimal polynomial time centralized multi-hop routing technique that maximizes the lifetime a system of distributed power sources, considering the quality of the wireless links and the vagaries of the radio communication channel. Our technique aims to evenly distribute the power consumption rate which yields in a minimal-skew solution. We theoretically prove that our technique is ecient. Finally, we illustrate the quality of the solutions provided by our algorithms on a set of benchmarks that consider the quality of the wireless channels based on models using real RF transcievers. We show that our solution provides signicant increase in the lifetime of the network (up to ve times) at the cost of a slight increase in the latency of the end-to-end paths (up to 10%).

CHAPTER 2 Recongurable Fabric Vest


2.1
2.1.1

Introduction
Motivation

Computation, storage, and communication are now woven into the fabrics of our society with much of the progress being due to the relentless march of the silicon-based electronics technology as predicted by Moores Law. The emerging technology of exible electronics, where electronics components such as transistors and wires are built on a thin exible material, oers a similar opportunity to weave computation, storage, and communication into the fabric of the very clothing that we wear. The implications of seamlessly integrating a large number of communicating computation and storage resources, mated with sensors and actuators, in close proximity to the human body are quite exciting. For example, one can imagine biomedical applications where biometric and ambient sensors are woven into the garment of a patient or a person in a hazardous environment to trigger or modulate the delivery of a drug. Realizing this vision is not just a matter of developing innovative materials for exible electronics, along with accompanying sensors and actuators. The characteristics of the exible electronics technology and the novel applications enabled by it require innovation at the system-level technology level. The natural applications of these systems have

environmental dynamics, physical coupling, resource constraints, infrastructure support, and robustness requirements that are distinct from those faced by traditional systems. This combination requires one to go beyond thinking of these systems as traditional systems in a dierent exible form factor. Instead, a rethinking of the architecture and the design methodology for all layers of these systems is required.

2.1.2

Driver Application

Figure 2.1: System Architecture of the Medical Jacket Although the goal of the our research is to investigate system architecture and design methodology concepts for electronic textiles, successful systems re-

search of this nature requires that one not only develop these concepts, but also validate them in context of real technology constraints and application requirements. Therefore, we use pervasive patient monitoring and sensor-driven personalized trans-dermal drug delivery as our driver application. One possibility of leveraging electronic textile technology in the context of such an application is to create a exible garment (i.e., vest) that the patient can wear, which has sensing, computation, communication, and actuation elements embedded in it. We are developing such a prototype vest called medical jacket. Ideally, such a personalized drug delivery vest should have sensors on both the interior (to measure physiological readings) and on the exterior (to measure environmental readings such as the presence of toxins in the surroundings), and a software-controlled, electrically-actuated trans-dermal drug delivery system. It should allow lowlatency, ne-grained adaptation of the drug dosage based on continual physiological measurements in the case of patients, and based on both environmental and physiological measurements in the case of people operating in hazardous environments. More generally, our application driver is representative of biomedical applications where information technology is integrated into fabrics and textiles. Figure 2.1 shows the overall system architecture of the medical jacket. As is evident from the Figure 2.1, the vest consists of four main subsystems: control (or computation), communication, sensing, and actuation. One of target applications of our medical jacket is the detection of possibly fatal heart problems, specically unstable angina pectoris. Angina Pectoris is a fatal medical condition with more than 7 million suerers in the U.S. alone. In the unstable angina pectoris form of the condition, fatal attacks happen in an unpredictable manner, even when the patient is at rest. Using the architecture that has been discussed in the previous sections, we can achieve constant monitoring and life-saving drug delivery in the emergency situation even when the patient

is away from any conventional emergency medical help. With the medical jacket the patient can have a personalized tuning for the system by his/her physician and can continue with the normal life activities with the vest. Drug delivery algorithms running on the vest, nely tuned by the patients physician, can be used prevent any fatal results. Angina pectoris is characterized as an acute chest pain or discomfort due to coronary heart disease and is considered as a symptom of myocardial ischemia. Electrocardiogram analysis is the standard used for the diagnosis of ischemia. However, ECG waves are highly patient dependent and the analysis is generally performed by the clinician manually (through observation of the ECG waves).

2.2

Related Work

Several wearable technologies exist to continually monitor patients vital signs, utilizing low cost, well-established disposable sensors such as blood oxygen nger clips and electrocardiogram electrodes. The Smart Shirt from Sensatex [sen] is a wearable health monitoring device that integrates a number of sensory devices onto the Wearable Motherboard from Georgia Tech [PMJ02]. The Wearable Motherboard is woven into an undershirt in the Smart Shirt design. Their interconnect is a exible data bus that can support a wide array of sensory devices. These sensors can then communicate via the data bus to a monitoring device located at the base of the shirt. The monitoring device is integrated into a single processing unit that also contains a transceiver. The SmartShirt design features plastic optical ber that can be used to detect punctures - however, they do not have any means of dealing with these punctures other than reporting them via the transceiver. In contrast, our design features a

recongurable interconnect - rather than a large data bus - which can dynamically adjust to punctures or tears. Moreover, we provide further fault tolerance through distributed control buttons. In the event that their single processing unit (and transceiver) is damaged or the control lines leading to the device are torn, the Smart Shirt is virtually inoperable. In our design, we distribute control to multiple processing elements and can accommodate multiple communication buttons. This ensures that a tear or puncture to our vest will not result in total system failure. This fault tolerance is essential in the demanding and/or hazardous environments targeted by this research. Fireghters, policemen, soldiers, astronauts, athletes, and others working in hazardous environments need robust material that can sustain damage and yet still reliably provide service. Finally, our design supports actuation, such as a drug delivery system that could provide immediate medical attention to individuals in environments that would be dicult to bring medical personnel - either due to their remoteness (i.e. in the case of an astronaut or mountain climber) or the danger involved (i.e. in the case of a potential biohazard or re). By automating the treatment, as well as the detection, our envisioned capability will provide more fault tolerant means of safeguarding the life of the wearer of garments such as the medical jacket described earlier. Several other technologies have been introduced by MIT called MIThril [DMP03], e-Textile from Carnegie Mellon University [MMK02] and Wearable e-Textile from Virginia Tech [MJE03]. None supports the concept of reconguration due to faults or tears as the medical jacket does.

2.3
2.3.1

Design of Medical Jacket


Interconnection Topology

The interconnection medium for our proposed system is a mesh of wire segments. The mesh interconnection topology is a wire-frame that has a regular structure, each vertex being connected to exactly four other vertices. Mesh networks have several signicant advantages. Each node has a dedicated communication link with every other node on the network and also has access to the full bandwidth available for that link. Nodes on buses must share the bandwidth available on the bus medium. Besides, in a mesh, multiple paths exist between devices. This brings a great robustness against faults. If a direct path between two nodes goes down, messages can be rerouted through other paths. Moreover, it has considerable scalability and can be easily manufactured. The manufacturing issues become more signicant because in our system wires are integrated into the fabric and with current fabric manufacturing technology, this can be easily achieved. Furthermore, the mesh interconnection is highly regular which assist us in routing and placement of sensors and computational units. A picture of our fabric with mesh interconnection is shown in Figure 2.2.

2.3.2

Computational Units/Controllers

The dot motes developed at the University of California, Berkeley oer a tiny, low cost computation platform for embedded applications. It comprises a programmable ATmega128 microcontroller from Atmel. The ATmega128 [atm] is a low-power CMOS 8-bit RISC microcontroller. The ATmega128 achieves a throughput of up to 1 MIPS per MHz. The ATmega128 also provides 128K

10

Figure 2.2: Fabric with Mesh of Wires bytes of In-System Programmable Flash, 4K bytes of EEPROM, 4K bytes of SRAM, and several peripherals including a real time counter, four timers, two UARTs (Universal Asynchronous Receiver and Transmitter), an ADC, and a byte oriented two-wire serial interface also called the Inter Integrated Circuit (I 2 C ) interface.

2.3.3

Switches

The dot motes are connected to UART lines through programmable switches to create the distributed computation fabric drawn in Figure 2.3. The switches used for this purpose are ADG714 ICs from Analog Devices. These are CMOS, octal SPST (single-pole, single-throw) switches controlled via a 3-wire serial interface.

All three terminals on each side is connected to a horizontal or a vertical wire segment. Six type of connection may be established with this switch. Two con-

11

Figure 2.3: Switch Model nections are straight connections whereas the other are bent connections.

Figure 2.4: A Dot-Mote along with a Switch

2.3.4

Sensing Components

Myocardial Ischemia is basically caused by lack of oxygen and nutrients to the contractile cells. Frequently it may lead to myocardial infraction. This causes severe consequence of heart failures or arrhythmia that may yield death. An electrocardiogram (ECG / EKG) is an electrical recording device of the heart signals and is used in the investigation of heart diseases including Ischemia. The ECG monitoring system that we use utilizes ten electrodes. The electrodes (or leads)

12

are attached to the patients arms, legs, and chest. The electrodes detect the electrical impulses generated by the heart, and transmit them to the ECG machine. From the ECG tracing, the heart rate, the heart rhythm, whether there has been a prior heart attack, whether there may be coronary artery disease and whether the heart muscle has become abnormally thickened can be determined. Digitized samples are sent to the dot-motes for Ischemia detection process through UART protocol. The ECG that we utilize is manufactured by Midmark Diagnostics Group [mid].

2.3.5

Actuators

Nitroglycerin is used to prevent Ischemia (Angina). It works by relaxing the blood vessels to the heart, so the blood ow and oxygen supply to the heart is increased. Various routes of administration are proposed such as sublingual tablets, extended-release capsule, skin patches (transdermal), spray and ointment. A rich area of research over the past 10 to 15 years has been focused on developing transdermal technologies that utilize mechanical energy to increase the drug ux across the skin by either altering the skin barrier (primarily the stratum corneum) or increasing the energy of the drug molecules. These so-called active transdermal technologies include iontophoresis (which uses low voltage electrical current to drive charged drugs through the skin). Ionotophosis is dened as the introduction, by means of a direct electrical current, of ions of soluble salts into the tissues of the body for therapeutic purposes [SM94]. It is a technique used to enhance the absorption of drugs across biological tissues, such as the skin. Transdermal iontophoresis is an excellent candidate for our application since it is controlled by electrical signals. Such a drug delivery unit is shown in Figure 2.5.

13

Figure 2.5: Electrode for Transdermal Iontophoresis System Nitroglycerin may lose its eectiveness over time, so physicians generally schedule nitrate-free breaks to prevent tolerance. A valid concern exists that nitrate-free periods might increase the risk for angina and adverse heart events. With on-line monitoring performed in our medical jacket, we avoid excessive amount of drug administration and eliminate its risks.

2.4
2.4.1

Ischemia Detection and Drug Delivery Method (IDDD)


ECG Interpretation

As the heart undergoes depolarization and repolarization, the electrical currents that are generated spread not only within the heart, but also throughout the body. This electrical activity generated by the heart can be measured by an array of ECG electrodes placed on the body surface. A typical ECG signal is shown in Figure 2.6. P, QRS and T Segments which are analyzed in the algorithm are shown in the Figure.

14

Figure 2.6: A typical ECG Signal 2.4.2 Ischemia Detection and Drug Delivery

Figure 2.7: Normal and Abnormal ECG Signals Our ischemia detection algorithm incorporates a collection of initial tuning sessions to extract the normal heart pattern of the patient. These initial ECGs are selected to include a range that span dierent activity levels and various days of the initial tuning period (rest, exercise, stress...etc). For diagnosis, common ECG patterns of the heart signal are used such as: heart rate, PR interval, QRS duration, QT interval duration, ST interval ...etc. In addition, a collection of abnormal ECG patterns associated with the ischemic conditions are stored. Normal

15

ECG patterns of the patient along with the standard indications and abnormal patterns of ischemia are incorporated as a basis for the rest of the automated analysis that is performed by the recongurable vest as shown in Figure 2.7. At the end of the initial tuning period, the drug delivery decision is based upon tuning information provided by the patients cardiologist. Tuning of the algorithm will determine the criticality of the wave according to the deviation from the normal values of the patient and the matching with abnormal ischemic patterns according to the guideline provided by the clinician through tuning. Nitroglycerin delivery through a patch is used as an initial response to heart attack. One of the main reasons that nitroglycerin is used in this system is the fact that it does not generate any risk to the patient if the condition is not actually a heart attack. For the initial version of the algorithm we focused on ST region analysis as one of the main indications of ischemia. Ischemia has common indications such as: lack or inversion of T region in the ECG signal, deviation in the elevation and slope of the ST interval. In the ischemic ECG, the ST region of the curve has values abnormally lower or non-existing compared to patients average heart signal shown in Figure 2.7. Similarly an abnormal heart signal detected with unusual QRS complex with extremely low 1mV R voltage on the specic probe of the ECG as shown in Figure 2.7. Our ischemia detection algorithm is capable of detecting ischemic heart attacks that show ST region indications such as: non-existing ST region, elevation, slope abnormalities according to the preset normal and abnormal ranges. Furthermore, the algorithm is capable of detecting other heart signal abnormalities such as QRS complex width, abnormal interval ranges and voltages for P,R,S,T,Q waves, etc. As a crucial part of its nature the algorithm is fast and runs on real-time data.

16

2.4.3

Implementation of Algorithm on Processing Units

Figure 2.8: Ischemia Detection Operations As shown in Figure 2.8, at the rst step of the algorithm, signals from ECG are passed through a bandpass lter to reduce the noise and remove the bias voltage. The lter is an FIR window band-pass lter with cuto frequencies adjusted at 6Hz and 400Hz . Rest of the algorithm can be partitioned into two sections, ECG signal characterization and ischemia pattern matching. ECG Signal Characterization: After the signal is ltered, QRS complex is detected and consequently heart rate is observed. Each time a local peak is detected, it is classied as QRS complex, T-Wave or noise. So, at the end of each period new values of QRS complex, ST interval and T-Wave amplitude are updated. Basic rules to nd a QRS and ST

17

segments are as follows:

Peaks that precede or follow larger peaks by less than 200 ms (50 samples) are ignored. If a peak has occurred after 360 ms (90 samples) of the previous peak and the maximum derivative of the signal is at least half of the previous peak (i.e. QRS complex), identify the peak as T-Wave. If the peak is larger than the threshold, call it QRS complex. Update the threshold as the mean of the last 8 QRS peaks detected multiplied by constant factor TH (T H = 0.9). A good estimate on QT duration can be achieved from the following equations [PMV01]:

0.384RR + 99 RR < 600ms QT = 0.156RR + 236 600ms RR 1000ms 0.166RR + 277 RR > 1000ms RR is the heart beat period. At the beginning, the threshold is estimated to be the mean of the two maximum peaks in a 2 second interval. Ischemia Pattern matching: When a beat is detected, it is characterized by a number of features such as width, amplitude, and R-to-R interval. The beat is also compared to previously detected beat templates. If the beat closely matches a previously classied beat template, its information is retrieved from its matching type. Otherwise, the beat is classied based on its beat features as described below:

18

Ischemia may change ECG signals in dierent ways and mostly aect ST-T complex. In our algorithm, four major patterns in ECG are considered as ischemic patterns [GLS98]:

T-Wave Enlargement: If the T-Wave Amplitude is increased by more than 1mV. ST Level increase: If ST segment deviation is greater than 1mV. QRS end change: An upper shift in the QRS end (S-wave) may be a sign of ischemia. QRST deformation: Myocardial ischemia may cause a deformation in ECG signals which results in increase of the integral of the waveform from Swave to T-wave. At each period this integral is evaluated and compared to a threshold. If a beat matches neither of the above criterion nor any of the beat templates already stored in the memory, it is considered as an UNKNOWN beat. In this case, the mote inquire about the type of the unknown beat from other processing units in the network and once the information is retrieved, the mote replaces the least recently accessed beat template with the new beat in its memory. This process increases the communication overhead of the system between various processing units and hence increases the power consumption. However, it is inevitable since the accuracy of the algorithm is extremely important and we may not tolerate to miss unknown beats.

Once an ischemic behavior is detected in one period of ECG signals, we keep track of ischemic patterns for at least 30 seconds [ZR03]. If we detect a con-

19

tinuous 30 second ischemic behavior, this would be considered as occurrence of ischemia and drug administration will start. There exists various tools on PhysioToolkit web-site [phyb] for bio-signal processing, however, our processing units (dot-motes) with their very constrained resources as well as the special communication requirements of electronic devices in our medical vest forced us to reproduce the algorithm and implement the software for our embedded system.

2.5
2.5.1

Reconguration
Network Topology in Medical Jacket

As discussed earlier, the interconnection medium of the medical jacket is a mesh of wire segments. We employ four dot-motes as computational units placed at the corners of a square in our interconnection network as shown in Figure 2.9. Every dot-mote is accompanied with a switch which is described in Section 2.3.3. In this prototype, we use a mesh of size 4x4. The center square of wire segments are associated with inter-mote communication and will be referred as inner square in this chapter. The outer square of wire segments (mesh of size 4x4) is responsible for carrying ECG and drug delivery signals. The switches, controlled by dot-motes, connect ECG, drug delivery or inter-mote communication lines to the motes. There exist two pairs of wires in inner square to improve the reliability of inter-mote communication. In case if a pair of wires fails, switches can swap to the other pair and recongure the circuit.

20

Figure 2.9: Network Topology 2.5.2 Processing, Synchronization and Reconguration in Medical Jacket The ischemia detection algorithm is previously elaborated in Section 2.4.3. The dot-motes perform the processing, however, since we have eight channels of ECG, the computational capability of one dot-mote does not suce to process the data from all ECG channels. Therefore, the algorithm is distributed over four dotemotes. Each mote accomplishes interpretation of ECG signals of two channels. The synchronization ensures that every ECG channel is being processed by at least a dot-mote. Therefore, synchronization among dot-motes is inevitable. Furthermore, in case of fault occurrence, the network is repaired in reconguration

21

stage. Once ischemia is detected, appropriate signals are sent to the drug delivery units. As for drug delivery units, due to some limitations, we do not utilize actual drug delivery units. Instead we exploit a Pocket PC for monitoring purposes. We emphasis that the pocket PC does not carry out any computations for ischemia detection algorithm. The only communication protocol that is available on dot-motes is UART (I 2 C still is not fully functional on mica2dots), hence all processing, synchronization and reconguration tasks are carried out through the UART protocol. Therefore, tasks are executed sequentially as shown in Figure 2.10.

According to [ZR03], when ischemia happens, the ECG signals stay deformed for at least 30 seconds. Physicians recommend that the appropriate drug is administered in about one minute once ischemia occurs. In the worst case, if a fault occurs at the same time when ischemia occurs, the network may require reconguration in order to accomplish successful drug administration. If ischemia is detected suddenly after synchronization/reconguration phase, the circuit will be recongured in the next synchronization/reconguration phase which takes 5T and drug is administered in the rst upcoming drug delivery phase which is 5T + 4T away from the time ischemia is detected. The time limit for drug administration is 60 seconds, therefore:

30 + 9T 60

(2.1)

We chose T = 2.5sec. Decreasing the time T would decrease the response time to the faults, however, it will increase the overhead of reconguration/synchronization and may aect the accuracy of processing and ischemia detection algorithm since the data sent by the ECG device during drug delivery or synchroniza-

22

tion/reconguration process is lost. No data ow control mechanism is designed by the manufacturer of the ECG device. The ECG device transmits its data at 115200 bps. The motes communicate with each other using UART. The interconnection reconguration algorithm needs to maintain a broadcast medium in the face of link failures. The general idea of the algorithm is that the nodes collect connectivity information by sending ping messages to each other periodically at synchronization/reconguration phase. When a node notices that it has not received a response from one or more nodes within some timeout period, the node attempts to recongure its local switch to regain connectivity. Because a node has a map of the interconnect topology (based on the results of sending ping messages) it can determine how the network has been partitioned. In our prototype, there are only four nodes. Therefore, the only partitions possible are horizontal, vertical, or a corner partitions. In the case of a horizontal (vertical) partition there are two groups of two nodes. Because a nodes horizontal and vertical connectivity are independent, a dot-mote is able to change its horizontal connectivity without aecting its vertical connectivity (and vice versa. When a node detects a horizontal (vertical) partition, it only changes its vertical (horizontal) connectivity bus. In the case of a corner partition, a single node is partitioned from the other three. The single node must change both its horizontal and vertical data bus. In the three node partition, only the two adjacent nodes can aect the connectivity. A broadcast algorithm is designed to check the connectivity of the network periodically. In case of a partition, a token is generated to circulate among the partitioned nodes. After some predened time, when no response is received from one or more motes, the mote which has the token sends a halt message to all the motes on the UART bus and will attempt to x the topology based on the algorithm described before. Upon receiving the halt message, all the other

23

motes initiate to x the topology as well. When xing topology is nished, they all go into the halt mote. The master mote wakes all the motes up by broadcasting a wake up message once it observes that the network is xed and connected again. In our implementation, each node is connected to two horizontal and two vertical buses. Therefore, in the worst case, three faults can be sustained while maintaining connectivity.

2.6

Experimental Analysis

This section presents various experimental analysis performed on our medical jacket. Initially we present a picture of our prototype in Figure 2.11. As shown in the picture, a PC sends ECG signals (extracted from ECG database) to the medical jacket and a pocket PC is employed as a drug delivery unit (for monitoring purposes). The Pocket PC also assists the dot-motes with beat template recognition by storing the new beat templates in its memory. It, however, does not carry any computations. The sole processing units in the system responsible for computations are dot-motes. Our medical jacket is designed such that it could be attached to the ECG device introduced in Section 2.3.4, however, for experimental analysis, we used already recorded benchmarks. All the experiments are carried out with real ECG signals. We used ECG signals from MIT-BIH Arrhythmia Database. The MIT-BIH Arrhythmia Database contains 48 half-hour excerpts of two-channel ambulatory ECG recordings, obtained from 47 subjects studied by the BIH Arrhythmia Laboratory between 1975 and 1979. The recordings were digitized at 360 samples per second per channel with 11-bit resolution over a 10 mV range. We used 25 of 48 complete records freely available from PhysioNet [phya]. We also downsampled all the benchmarks to 250 samples

24

per second to facilitate the compatibility with our ECG device. Each MIT-BIT record has the recordings of two channel, therefore, in order to generate ECG signals for 8 channels, each record is replicated and redundantly broadcasted.

The signals extracted from the database are sent to the medical jacket by a PC through UART. The data format of PC is exactly the same as ECG device. Hence, our medical jacket is fully functional when we replace the PC with the ECG device. In the rst set of experiments, we measured the latency of fault detection and circuit reconguration for various types of faults as shown in Table 2.1. Wire faults in general are referred to wire disconnection in the network. V/H wire faults refer to vertical/horizontal partitions of the broadcast medium. Corner wire faults refer to corner partitions. ECG and drug delivery faults refer to the disconnection of wires responsible for carrying ECG and drug delivery signals. Finally, mote fault corresponds to the loss of dot-motes (due to either physical failures or power outage).

The next set of experiments are performed on power consumption versus reliability trade-os of the medical jacket. In general, when we decrease the number of dot-motes on the jacket, the power consumption is reduced while the reliability of the system also degrades. Reducing the number of dote-motes, however, has another impact on the system. Since dot-motes are closely collaborating with each other, reducing them would decrease the amount of memory available to the system for storing new unknown beat templates. Therefore, there will be a larger number of unknown beat template queries sent to the Pocket PC. This would increase the power consumption of the system due to the fact that the

25

Fault Type

Fault Detection Time (msec)

Detection + Reconguration Time (msec)

V/H Wire Fault Corner Wire Fault ECG Wire Fault Drug Delivery Wire Fault Mote Fault 4 92 5 N/A 8 9 59 67 58 63

Table 2.1: Fault Detection/Reconguration Time

Pocket PC has a greater power consumption rate than dot-motes. A summary on the maximum number of faults which can be tolerated while the system is still functional is presented in Table 2.2. This table also presents the average power consumption of the system performing Ischemia Detection on MIT-BIT benchmarks. As shown in the table, the power consumption increases when the number of dot-motes decreases to one from two. This is mainly due to the heavy utilization of the Pocket PC for storing the new templates. The Pocket PC that we employ is iPAQ H5550. During the experiments all unused modules including the LCD and frontlight were turned o. Also the iPAQ is programmed such that it automatically goes to the sleep mode after being idle for 30 seconds. Dot-motes can wake up the Pocket PC when needed. Figure 2.12 illustrates the power consumption of the system for each record of MIT-BIH benchmarks.

26

# of Dot-Motes

Power Consumption (mW)

# of Failed Motes Tolerated 3 1 0

Worst Case # of Failed Wires Tolerated 3 1 1

4 2 1

155.39 137.20 216.95

Table 2.2: Power Consupmtion/Reliability of the Medical Jacket

Moreover, in Table 2.3 we present a brief summary on the processing time required for ischemia detection on each channel of ECG device on average. As shown, the processing time increases largely with complex ECG signals of the MIT-BIT benchmarks.

Signal Complexity

Sample(/Channel) Processing Time (usec)

Sample Rate (Hz) 250 250

Average Highest

250 420

Table 2.3: Computational Capability of Dot-Motes

Finally Table 2.4 illustrates the number of requests sent to the Pocket PC to inquire about the unknown new beat templates generated for each MIT-BIT record in various congurations of our medical jacket. As mentioned before, dotmotes are very constrained in terms of their resources. Their limited memory

27

size allows us to store a limited number of templates. Moreover, once the number of dot-motes decreases due to the faults, since the remaining motes must process more ECG channels, the amount of memory assigned for storing beat template decreases. Therefore, the system experiences more new unknown templates and they must inquire from the Pocket PC (which has a large memory). Second column in Table 2.4 refers to the number of request messages sent to the Pocket PC when the medical jacket employs four motes. The third and the fth columns represents the case where a fault has occurred and the medical jacket is functioning with two or one mote respectively. The forth column illustrates in percentage how the number of request messages are increased in the 2-mote conguration compared to the 4-mote conguration. The sixth column shows the same comparison between 1-mote and 2-mote congurations.

2.7

Conclusion

Our project promises to make advances in sensors, materials, and system architecture for intelligent garments. In the future we plan to expand our prototype, creating larger topologies, and updating our link reconguration algorithm for use in larger topologies. In addition, we plan to work on a medical jacket prototype where stand-by mode would be supported on the dot-motes. This can reduce the power consumption of our jacket drastically. Lastly, we plan to connected the ECG sensors directly to the motes to increase the reliability of the system.

28

Figure 2.10: Task Multiplexing in Medical Jacket Network

29

Figure 2.11: Medical Jacket Prototype

Figure 2.12: Power Consumption of Medical Jacket

30

Record #

4 Motes

2 Motes

Overhead Percentage Compared to 4 Motes 0.0 N/A 411.1 0.0 88.9 15.7 166.7 300.0 N/A 0.0 192.9 120.0 83.3 64.6 N/A 34.1 59.1 150.0 68.2 N/A 150.0 175.0 133.3 368.2 N/A 129.0

1 Mote

Overhead Percentage Compared to 2 Motes N/A 40.0 541.3 N/A 401.5 21.1 662.5 312.5 150.0 N/A 290.2 363.6 54.5 69.8 340.0 52.2 817.1 40.0 164.9 100.0 350.0 263.6 314.3 253.4 233.3 265.3

100 101 102 103 104 105 106 107 118 119 200 201 202 203 205 207 208 209 210 212 213 214 215 217 219

0 0 9 0 36 115 15 2 0 0 14 5 6 223 0 170 22 4 22 0 4 12 3 22 0

0 5 46 0 68 133 40 8 2 0 41 11 11 367 5 228 35 10 37 3 10 33 7 103 3

1 7 295 1 341 161 305 33 5 7 160 51 17 623 22 347 321 14 98 6 45 120 29 364 10

Average Overhead Percentage

Table 2.4: Number of Unknown Beat Queries Sent to Pokcet PC

31

CHAPTER 3 An Ecient Placement and Routing Technique for Fault-tolerant Wearable Computers
3.1
3.1.1

Introduction
Motivation

The past few years have seen exciting advances in the development of pervasive computing technologies. Computation, storage, and communication are now more or less woven into the fabrics of our society with much of the progress being due to the relentless march of Silicon-based electronics technology as predicted by Moores Law. The emerging eld of exible electronics, where electronic components such as transistors and wires are built on a thin exible material, oers a similar opportunity to weave computation, storage, and communication into the fabric of the very clothing that we wear, thereby creating an intelligent fabric (also called electronic textiles or e-textiles) [MM02]. The implications of seamlessly integrating a large number of communicating computation and storage resources, mated with sensors and actuators, in close proximity to the human body are quite exciting; for example, one can imagine biomedical applications where biometric and ambient sensors are woven into the garment of a patient to trigger and modulate the delivery of a drug. Realizing such novel applications is not just a matter of developing innovative materials for exible electronics, along with

32

accompanying sensors and actuators. The characteristics of the exible electronics technology and the requirements of the applications enabled by it necessitate radical innovation in system-level design. Electronic components built of exible materials have characteristics that are very dierent from that of silicon and PCB-based electronics. Fault tolerance become more eminent in this architecture due to criticality of the applications running on this architecture. Further, the operating scenarios of these systems involve environmental dynamics, physical coupling, resource constraints, infrastructure support, and robustness requirements that are distinct from those faced by traditional systems. This unique combination requires one to go beyond thinking of these systems as traditional electronic systems in a dierent form factor. Instead, a re-thinking and complete overhaul of the system architecture and the design methodology for all layers of these systems is required.

3.1.2

Driver Application

Although the goal of our project is to investigate system architecture and design methodology concepts for electronic textiles, successful systems research of this nature requires that one not only develop these concepts, but also validate them in context of real technology constraints and application requirements. Therefore, we use pervasive patient monitoring and sensor-driven personalized trans-dermal drug delivery as our driver application. One possibility of leveraging electronic textile technology in the context of such an application is to create a exible garment (i.e., vest) that the patient can wear, which has sensing, computation, communication, and actuation elements embedded in it. We are developing such a prototype vest called medical jacket. Ideally, such a personalized drug delivery

33

vest should have sensors on both the interior (to measure physiological readings) and on the exterior (to measure environmental readings such as the presence of toxins in the surroundings), and a software-controlled, electrically-actuated transdermal drug delivery system. It should allow low-latency, ne-grained adaptation of the drug dosage based on continual physiological measurements in the case of patients, and based on both environmental and physiological measurements in the case of people operating in hazardous environments. More generally, our application driver is representative of biomedical applications where information technology is integrated into fabrics and textiles. Figure 2.1 shows the overall system architecture of the medical jacket. As is evident from the Figure 2.1, the vest consists of four main subsystems: control (or computation), communication, sensing, and actuation.

3.2

Related Work

Placement and routing problems on a grid have been studied extensively in the eld of VLSI CAD. There has been considerable research eort to solve these problems. Like most other VLSI layout problems, it is believed that placement and routing cannot be solved optimally in a reasonable amount time [She93] [SW96]. Therefore, heuristic algorithms are used to obtain near-optimal solutions. Placement algorithms can be generally classied into two main categories: constructive method and iterative improvement [SW96]. Constructive methods generate a placement layout in a global sense. This category includes the min-cut algorithm [DK85] , the quadratic placement algorithm [Hal70] and the forcedirected algorithm [QB79]. Iterative improvement algorithms starts from an ini-

34

tial solution and tries to improve the solution quality by making changes to the current solution. Simulated annealing [SS95] and genetic algorithm [SM90] belong to the iterative improvement method. Regardless of the basic algorithm being used, most recent placement tools [KSJ91] [CCK99] [WYS00] [CCK00] adopt hierarchical or multilevel paradigm by incorporating well-established graph partitioning [KAK97a] or clustering techniques, in order to handle the high complexity of current designs. The most basic approach to the routing problem is maze-running algorithm based on the breadth rst search [Lee61]. Heuristic Steiner tree algorithms are used to nd a minimum cost path for a multi-terminal net. To route multiple nets, various approaches can be used such as sequential greedy algorithm, hierarchical approach [BP83], multicommodity ow-based algorithm [SK87], or integer linear programming [LTK92]. The main dierence between our approach and other existing techniques is that we perform both placement and routing simultaneously. The solution that we nd is also a lower bound for both problems. Our technique easily accommodates our requirements in terms of the instance size and the number of sensors, actuators and processing units to be placed and routed. Message routing in large interconnection networks has received a great deal of attention in recent years in the eld of parallel computing. To decrease the amount of time in transmitting data, second generation multicomputers adopt wormhole routing mechanism, e.g., Ametek 2010, nCUBE-2, Intel Paragon, J-machine, and iWARP [NM93]. Adaptive wormhole routing algorithms have been proposed for mesh, torus, and hypercube topologies. With wormhole routing, a message is divided into a sequence of xed-size units of data, called its. The header it of a message contains all the information needed to decide the selection of next channel on the route. As the header it advances, the remaining its follow it in a

35

pipeline fashion. When the header it reaches a node that has no suitable output channel available, all of the its in the message are blocked until the channel is freed. This form of routing technique makes the message transmission time almost independent of the distance between two nodes if the network is contention-free. A good survey paper on wormhole routing techniques can be found in [NM93]. The main dierence between our approach and wormhole routing is that we employ the concept of circuit switching for communication while wormhole routing utilized packet switching technique. In our model, since we have continuous data collection from sensors, we employ the concept of circuit switching which provides dedicated communication line between nodes. Barrenechea et al. studied optimal routing algorithms for regular sensor networks, namely, square and torus grid sensor networks, in both, the static case (no node failures) and the dynamic case (node failures) [BBV04]. Their model, however, utilizes packet switching approach. Multihop routing in wireless networks with respect to power optimization and fault-tolerance have been studied extensively. Generally speaking, a node in a wireless network independently explores its surrounding region and establishes connections with other neighboring nodes that are within its transmission and reception range. Our model signicantly diers since the interconnect network is not via wireless media. The wired interconnect networks reduces the environmental eects on the reliability of the network and greatly reduces the communication power consumption. Furthermore, energy-aware routing for e-textile platforms was studied in [KM05]. This paper derives an analytical upper bound for the achievable number of jobs completed over all possible routing strategies. Their routing technique achieves about fty percent of this analytical upper bound. [SMM03] addresses the modeling of computation, communication and failure in e-textile and investigate the

36

performance of code migration and remote execution. Despite their interesting approach, our main focus is to recongure/congure the architecture optimally based on routing/routing an placement. Furthermore, we model the tears and evaluate the probability of having failures on every segments of wires in our mesh interconnection network.

3.3
3.3.1

Preliminaries
Interconnection Topology

The interconnection medium for our proposed system is a mesh of wire segments. The mesh interconnection topology is a wire-frame that has a regular structure, each vertex being connected to exactly four other vertices. Mesh networks have several signicant advantages. Each node has a dedicated communication link with every other node on the network and also has access to the full bandwidth available for that link. Nodes on buses must share the bandwidth available on the bus medium. Besides, in a mesh, multiple paths exist between devices. This brings a great robustness against faults. If a direct path between two nodes goes down, messages can be rerouted through other paths. Moreover, it has considerable scalability and can be easily manufactured. The manufacturing issues become more signicant because in our system wires are integrated into the fabric and this can be easily achieved with the current fabric manufacturing technology. Furthermore, the mesh interconnection is highly regular which assists us in routing and placement of sensors and processing units. A picture of our fabric with mesh interconnection is shown in Figure 2.2. In the remainder of this chapter, we refer to mesh interconnection topology by terminology grid. The interconnection topology is modeled as a grid graph

37

illustrated in Figure 3.1. Each edge in the grid represent a wire or a communication link and each node represents a processing unit and a switch. Most nodes are connected to four edges. Switches are responsible for either connecting the processing units to any of the edges or establish the connections between edges. In this chapter, we focus on routing and placement of sensors and processing units. We emphasize on nding disjoint paths between every pair of communicating nodes because our communication medium is a mesh of wires and each wire cannot handle more than one communication at a time. In addition, we chose the wired interconnection medium due to high available bandwidth of wires and the requirements of our application (Electrocardiogram signals transmit at 115.2Kbps in our application).

Figure 3.1: Interconnection topology

3.3.2

Switch Model

Our proposed switch model is shown in Figure 2.3. Our switches are capable of connecting any terminals to any other terminals.

38

3.3.3

Circuit Switching vs. Packet Switching

Circuit switching has been considered for our proposed technique due to many advantages it oers to our applications. Our scheme has been designed for applications with high bandwidth requirements. Therefore, dedicated paths for communication enhances the overall performance of such systems. Moreover, due to low delay requirements of most time-sensitive medical applications, the quality of service can be guaranteed through the circuit switching approach. The circuit switching scheme demand circuit setup time which may assess an overhead on the system. Yet, once setup, its overhead on the network becomes negligible over time. In packet switching scheme, however, the path of each packet is determined independently. Each packet may travel by a dierent path. Considering our objective in nding the lower-bound on the system lifetime and the complexity of our formulation, it may not be feasible to impose such overhead for every packet being transmitted. Finally circuit switching facilitates composition of larger packets and reduces the overhead of packet headers.

3.3.4

Power Lifetime

The mobility of our system requires the use of constrained power sources (i.e. batteries). Therefore, in the design of such system, power optimization is one of the major objectives. The amount of power resources available to the system determines the life time of the system which will be referred to as power lifetime (lp ) in this chapter. As shown in the following equations, E indicates the remaining energy of the system power source while Pw represents the power consumption rate of each node in the grid which includes the power consumption of both the

39

processing unit and the switch. lp E = System power lifetime = Energy remaining in the system power source

Pw = power consumption of each active node V is a set of all the nodes of the grid while Rv consists of the nodes chosen and utilized for routing. Moreover, the size of set Rv is denoted by n.

V = {vi |vi is a node in the grid} Rv = {vi |vi V vi used in routing} n = |Rv | Finally, we dene the power lifetime of the system as follows: E 1 Pw = where p = Pw n p n E

lp =

(3.1)

We also dene p which will be used in the ILP problem formulation of routing and placement.

3.3.5

Power Consumption Model

In our proposed architecture, it is crucial to minimize the power consumption since the system is battery-powered. The power consumption due to processing is rather constant as long as the processing units remain operational. We, however, can reduce the power consumption of inter-node communications. When a communication between a pair of nodes is established, a number of switches is utilized. The power consumption of the communication is proportional to the

40

number of switches along the path considering that they must remain operational throughout the communication. The other important factor which is generally considered is the delay. However, in our system, the communications are established using circuit switching scheme. Therefore, the wire length of each path is rather small and delay concerns become a non-issue.

3.3.6

Fault Lifetime

As discussed in Section 3.3.1, our system is made of fabric which is susceptible to accidental damage via tears and punctures. Such faults may yield loss of a connection and therefore, may result in total system failure. Fireghters, policemen, soldiers, astronauts, athletes working in hazardous environments may experience more faults than others. We dene f as the rate of fault occurrence per unit time. We dene E and Re as set of edges in the grid and set of edges used in routing, respectively:

= {ei |ei is an edge in the grid}

Re = {ei |ei E ei used in routing} The set of edges not used in routing is dened by Re :

Re = E Re = {ei |ei E ei NOT used in routing} When a fault occurs, probability of loosing a particular edge ei is represented by P (ei ).

P (ei ) = Pr{ei fails|a fault has occurred}

(3.2)

41

Assuming that the routing is performed (i.e. the edges for inter-communication between nodes are selected), when a fault happens, the probability of having system failure due to link failures is depicted by P (eR ).

P (eR ) = Pr{an edge in Re fails|a fault has occurred} =


ei Re

P (ei ) =

Obviously, failures in ei Re does not aect the system functionality since ei Re is not utilized for routing. The probability of not having system failure when a fault occurs is shown with P (eR ).

P (eR ) = 1 P (eR ) = 1 The expected fault lifetime of the system now can be dened in the following equation. The rst term in the series indicates the probability of having system failure after the occurrence of the rst fault. The second term denotes the probability of system failure with two faults while the rst fault refrains the system intact. The same arguments hold for all the remaining terms.

lf = Expected lifetime of the system = =


f f

2(1) f i=1

3(1)2 f

i(1 )i1

The expected fault lifetime is shown by Equation 3.3 where f and are the fault occurrence rate and probability of having system failure respectively. 1 = 2 f (1 (1 )) f

lf =

(3.3)

42

3.3.7

Fault Model

In this section we model tears or cuts that may occur to the fabric and yield loss of a connection in the network. For simplicity, we consider only monotone tears. In practice, this assumption is not far from reality because he results from tear and puncture analysis experiments on textile conrm that the nature of tears is usually monotone (WARP and WEFT tears) [WF04]. Various mechanical instruments are being used for these experiments such as Elmendorf (falling pendulum) [Bon94] and COMPUTE (COMbined PUncture and TEar) [Pri01] on cotton fabric. In addition, several standards have been implemented for tear analysis on textile such as PE-P-04640:1976 Fabric measurement methods. Woven and knitted fabrics. Determination of tear strength and PE-EN ISO 13937-3:2002:1-4 Textiles - Tear properties of fabrics - Parts 1-4. Unfortunately most reports published in this area only describe statistics about the strength/length of tears and not about their physical distribution throughout the fabric. Therefore, the following theoretical tear analysis was carried out with the assumptions based on the outcome of practical tear analysis experiments. In Figure 3.2, a few tears are shown. Each tear can be modeled as a path

Figure 3.2: Tear model

43

Figure 3.3: Representation of tears in dual graph between two nodes in the dual graph of the grid as shown in Figure 3.3. The dual graph refers to the graph in which each region of the grid is presented with a node. Whenever two regions in the grid have an edge in common, there exists an edge between corresponding nodes in the dual graph. According to this model, the total number of dierent tears that may happen in the fabric is the total number of distinct paths in the dual graph. Therefore, the number of distinct tear occurrence on a wire segment in the grid is the same as the number of paths going through the corresponding edge in the dual graph. Consequently, we must count the number of paths which passes through each edge in the dual graph. To show how this is performed, initially, we present the following lemmas.

Lemma 3.3.1. The number of distinct paths from node v11 to vnm on a grid is:

P (v11 , vnm ) =

n1 r1

(3.4)

44

Proof: Length of each path from v11 to vnm is m + n 1 and each path can be represented with a string of length m + n 2 containing of right (R) and up (U) moves. Each string has exactly n 1 (U)s. The total number of distinct strings is shown in (3.4) which is equivalent to the number of paths. Now, consider an edge w which connects nodes vij to vij +1 as shown in Figure

Figure 3.4: Region subdivisions for every edge in dual graph 3.4. Since we consider only monotone tears, the total number of paths which passes through w, T (w), can be evaluated by (3.5):

T (w) = R(I, vij ) R(IV, vij +1 ) + R(III, vij ) R(II, vij +1 )

(3.5)

R(X, vij ) is the total number of paths connecting every node in rectangle X to node vij . Possible rectangles for X are shown in Figure 3.4. We have:
i j

R(I, vi,j ) =
s=1 t=1

P (vst , vij )

45

To nd a closed form for R(I, vi,j ) we observe that:


i i

P (vs1 , vij ) =
s=1 s=1

j1+is j1

j+i1 j

This implies that the total number of paths originating from every node on the left border of rectangle I to vij is equal to P (v11 , vij +1 ). Finally we conclude that:
j

R(I, vij ) =
t=1

i+t1 t

i+j j

(3.6)

Similar equations hold for R(IV, vij +1 ), R(III, vij ), R(II, vij +1 ). Note that we only considered horizontal edges. The same argument is valid for vertical edges. We previously showed that each tear in the grid is represented by a path in the corresponding dual graph. Therefore, assuming that a tear occurs, the probability of loosing an edge ei in the grid is proportional to the number of distinct paths in the dual graph crossing that edge. In other words, it would be proportional to the total number of paths that passes through wi (i.e. T (wi )), which corresponds to ei in the dual graph. To nd the probability of loosing an edge, we calculate total possible tears in the network which is equivalent to all possible paths between any two nodes (vij , vpq ) in the dual graph. Therefore, the total number of possible tears in the network is:
n+1 m+1 i j

jq+ip jq

Tstraight (3.7)

TN = 2
i=1 j =1 p=1 q =1

The nested summation is taken over all pairs of (vij , vpq ) and is multiplied by two to take into account both descending and ascending paths. Tstraight is the total number of straight paths including paths with length zero (single nodes).

46

Since straight paths are being considered as both ascending and descending, they will be counted twice in the rst term of the above equation. Therefore, Tstraight must be deducted from the nested summation in Equation 3.7. Tstraight can be simply written as:

Tstraight = (n + 1)

m+1 n+1 + (m + 1) + (n + 1)(m + 1) 2 2

(3.8)

The latter term in Equation 3.8 is basically the number of paths in the graph with length zero (the number of nodes in the graph). Therefore, the total number of possible tears in the network can be expressed as: i+j j 1)[(n+1) m + 1 +(m+1) n + 1 +(n+1)(m+1)] 2 2 (3.9) Hence, probability of having failure on edge ek is calculated as follows:

n+1 m+1

TN = 2
i=1 j =1

P r(ek ) =

T (wk ) TN

(3.10)

In Equation 3.10, each wi in dual graph corresponds to ei in the grid. Figure 3.5 illustrates the probability of failure on each edge in the grid when a tear occurs.

In the model we illustrated, our analysis show that some wires are more susceptible to failures. If the wires already utilized for communication fail, the system will fail. Furthermore, since the lifetime of the system is determined by the shortest lifetime of all wire segments selected for routing, we prefer to employ

47

Figure 3.5: Probability of edge failure in the grid for all possible distinct tears wires which are less susceptible to faults.

3.3.8

Integer Linear Programming Formulation

ILP is used to specify problems where a function has to be maximized or minimized and the variables are constrained by inequality and equality constraints and/or integral restrictions on either a subset or all the variables. The objective function and the inequality or equality constraints are all linear. We dene the mixed integer programming problem (MIP) as:

n n } , y R+ max{cx + hx : Ax + Gy b, x Z+

48

n n where Z+ is the set of non-negative integral n-dimensional vectors, R+ is

the set of non-negative integral p-dimensional vectors, and x = {x1 , ..., xn } and y = {y1 , ..., yp } are the variables in the problem. We restrict our attention to a special case of the MIP where all variables may have only integer values. The integer linear programming (ILP) is dened as

n max{cx : Ax b, x Z+ }

More specically, we restrict the integer values of x to be either 0 or 1. Therefore, 0-1 ILP where x is redened as x Bn where Bn is a set of n-dimensional binary vector.

3.3.9

Terminology

In the remainder of this work, we will specify the ILP problem in the following way.

y = M AX (cx)

(3.11)

Ax b

(3.12)

Equation 3.11 species the objective function for the problem where we dene x = x1 , ..., xn as 0-1 variables. The constraints of the problem can be formulated in matrix form as shown in Equation 3.12. In the remainder of the chapter, we will use uppercase letter representation to specify constant matrices or values,

49

and lowercase letters to represent variables.

3.4

Problem Denition

We introduced the terminologies power lifetime and fault lifetime as well as the tear analysis technique. The lifetime of our system is highly dependent on the remaining energy in the power source and the frequency of fault occurrence. Sometimes the system may fail due to lack of energy and in some cases, faults may parallelize the system. To increase the power lifetime, once we perform placement and routing, we seek to minimize the total length of routing. To improve the fault lifetime, we attempt to use the edges which are less susceptible to faults. The overall lifetime of the system is dependent both on power and fault lifetime. Therefore, to maximize the overall lifetime of the system, we shall maximize the minimum of power and fault lifetimes.

M AX (M IN (lp , lf ))

(3.13)

However, the objective function in an ILP formulation may not contain both M AX and M IN as shown in (3.13). Therefore, we redene the objective functions as illustrated in (3.14) and (3.15) and have the solver optimize both objectives individually in two dierent runs.

M AX (lp ) with constraint lp < lf

(3.14)

50

M AX (lf ) with constraint lf < lp

(3.15)

The maximum value of (3.14) and (3.15) is the value of objective function (3.13). In Section 3.5 we specify in details how the objective functions are constructed.

3.5
3.5.1

Problem Formulation
Routing

In both placement and routing problems, we assume that the interconnection network is a grid of size M N . The vertices correspond to processing units along with switches while the edges corresponds to the links between them. Each vertex and edge in the grid is assigned a variable. These variables specify if an edge and/or vertex is selected for routing and/or placement. Further details on how these variables are used will be explained later. However, the accordance between the indices of variables and the position of vertices and/or edges are as follows: Variable xpij represent if node with coordinations i and j in the grid is chosen for the pth communication pair. As shown in Figure 3.6, variables yhij and yvij represents horizontal and vertical edges corresponding to node ij in the grid, respectively.

51

Figure 3.6: ILP variables

Problem: Routing to Minimize the Power Consumption Instance: Graph G(V, E ) s.t. G is a grid, collection of disjoint vertex pairs (s1 , t1 ), (s2 , t2 ), ..., (sl , tk ) Question: Find k mutually vertex-disjoint paths in G, connecting si to ti for each i, 1 i k s.t. the total length of paths is minimum

In the ILP formulation we dene variables xpij where p = 1, ..., k . xp ij represents whether vertex vij is selected as a part of the path between (sp , tp ). We also dene qpij as follows:

52

1, xpij =

if vetex vij is selected for (3.16)

y(h/v)pij

qpij

communicating pair (sp , tp ) 0, otherwise. 1, if edge y(h/v)pij is selected for = communicating pair (sp , tp ) 0, otherwise. 1, if vertex vij = sp vij = tp = 0, otherwise.

(3.17)

(3.18)

Using the above variables, we dene the constraints (3.19), (3.20) and (3.21) for the ILP formulation. (3.19) ensures that a feasible path is found between sp and tp while (3.20) denotes that an each edge in the grid may not be used for more than one path. (3.21) enforces that the paths are vertex disjoint. To ensure that a path is feasible, we enforce the condition that exactly two neighboring edges of a vertex must be selected if the vertex is chosen for routing. In the case where the vertex is not chosen, none of the neighboring edges may be selected. This condition is slightly dierent for the source and sink vertices of the path since exactly one neighboring edge must be selected for routing. This condition is expressed in (3.19). Finally the objective function, represented in (3.22), attempts to minimize the power consumption or the number of nodes employed for routing. Subsequently, this would maximize the power lifetime.

53

2xpij yphij 1 ypvi1j yphij ypvij qpi = 0 1pk 1iM 1jN


k

(3.19)

yp(h/v)ij 1
p=1 k

(3.20)

xpij 1
p=1 k m n

(3.21)

M IN (
p=1 i=1 j =1

xpij )

(3.22)

Problem: Routing to Maximize the Fault Tolerance Instance: Graph G(V, E ) s.t. G is a grid, fault occurrence weights on edges of G, collection of disjoint vertex pairs (s1 , t1 ), (s2 , t2 ), ..., (sl , tk ) Question: Find k mutually vertex-disjoint paths in G, 1 i k s.t. connecting

si to ti for each i,

(3.23) is minimum.

Tear analysis described in Section 3.3.7 generates probability of having failures in every edge of the grid once a tear occurs. This information helps us to improve the fault tolerance of the system. As opposed to the previous problem, the objective function is to pick edges for routing such that the probability of fault occurrence in the selected edges is minimized. Therefore, the constraints (3.19), (3.20) and (3.21) still hold while the objective function (3.22) changes according to the new requirements.

54

M IN (
p=1 i=1 j =1

(P (ehij )yhpij + P (evij )yvpij ))

(3.23)

Problem: Routing to Maximize the Fault Tolerance and Minimize the Power Consumption Instance: Graph G(V, E ) s.t. G is a grid, fault occurrence weights on edges of G, collection of disjoint vertex pairs (s1 , t1 ), (s2 , t2 ), ..., (sl , tk ) Question: Find k mutually vertex-disjoint paths in G, connecting si to ti for each i, 1 i k s.t. (3.24) and/or (3.25) is minimum.

The rst problem that we discussed earlier in Section 3.5.1 addresses the issue of power optimization. It attempts to minimize the total number of nodes selected for routing. Since selecting each node in the grid requires activation of a switch and a processing unit, therefore the objective function minimizes the power consumption of the network. The previous problem, however, denotes how we can improve the fault tolerance of our interconnection medium through using edges which are less exposed to faults. Now we present a new problem formulation which addresses both power optimization and fault tolerance issues simultaneously. The constraints (3.19), (3.20) and (3.21) are still valid, however, the objective functions (3.24) and (3.25) determine the lower bound for the lifetime of our system as described in Section 3.4.

55

M IN (
k p=1 k p=1 m i=1

k p=1

m i=1

n j =1

xpij ) (3.24)

with respect to
m i=1 n j =1

xpij > + P (evij )yvpij )

n j =1 (P (ehij )yhpij

M IN (
k p=1

k p=1

m i=1

n j =1 (P (ehij )yhpij

+ P (evij )yvpij )) (3.25)

with respect to
m i=1 n j =1 (P (ehij )yhpij k p=1 m i=1 n j =1

+ P (evij )yvpij ) > xpij

The next problem that we present is an extension to the previous problem where each edge in the grid carries more than one wire. We dene the channel capacity for each edge in the grid and assume that each edge contains c wires. Thus, at most c disjoint paths may use one edge simultaneously.

Problem: Routing to Maximize the Fault Tolerance and Minimize the Power Consumption Instance: Graph G(V, E ) s.t. G is a grid, fault occurrence weights on edges of G, collection of disjoint vertex pairs (s1 , t1 ), (s2 , t2 ), ..., (sl , tk ) Question: Find k mutually vertex-disjoint paths in G, connecting si each edge in E is not asso-

to ti for each i, 1 i k s.t.

ciated with more than c paths and (3.24) and/or (3.25) is minimum.

With our new assumption, constraint (3.19) is still eective while (3.26) and

56

(3.27) are enforced as well. The objective function remains the same as (3.24) and (3.25).
k

yp(h/v)ij c
p=1 k

(3.26)

xpij c
p=1

(3.27)

The last ILP formulation for routing is for the case where a processing unit is connected to multiple sensors. This case happens where multiple sensors communicate with a single processing unit simultaneously and eciently.

Problem: Routing to Maximize the Fault Tolerance and Minimize the Power Consumption Instance: Graph G(V, E ) s.t. G is a grid, fault occurrence weights on edges of G, collection of disjoint tuples (S1 , t1 ), (S2 , t2 ), ..., (Sk , tk ) Question: Find k mutually vertex-disjoint paths in G, connecting all si Si to ti for each i, 1 i k s.t. each edge in E is not as-

sociated with more than c paths and (3.24) and/or (3.25) is minimum.

Constraints (3.20), (3.21) and (3.26) still hold. Only constraint (3.19) is modied and redened in (3.28). |Sp | is the cardinality (i.e. the number of members) of Sp .

57

|Sp |xpij yphij 1 ypvi1j yphij ypvij qpi = 0 1pk 1iM 1jN 3.5.2 Placement (3.28)

Traditional placement and routing problems in VLSI CAD are considered as two separate problems. In this section, we present an ILP formulation where we solve both placement and routing of our sensor network simultaneously. In most cases, the medical application itself derives the location of sensors. However, in some applications, the exibility of placing sensors within a specic range may be bestowed. This can be easily accommodated by our proposed ILP technique and the optimal location of sensor to minimize our objective function will be found. For instance, a temperature sensor may be required to be placed on chest, but its exact location is not given. In this case, our technique attempts to optimize its location too.

58

Problem: Placement and Routing to Maximize the Fault Tolerance and Minimize the Power Consumption Instance: Graph G(V, E ) s.t. G is a grid, fault occurrence weights on edges of G, collection of disjoint vertex set (S1 , S1 ), (S2 , S2 ), ..., (Sk , Sk ) s.t. si Si V and ti Si V , Si and Si are set of nodes which can potentially be source or sink of a path. Question: Find k mutually vertex-disjoint paths in G, connecting si to ti for every i, 1 i k s.t. (3.24) and/or (3.25) is minimum.

In this problem, the nodes which are candidates to be either source or sink of the paths are given in sets Si s and Si s. For each tuple (Si , Si ), however, exactly one node from Si and one node from Si will be selected. In the case where the position of a node is xed (i.e. the node must be placed at a specic position), the set Si or Si may have only one member. To solve this problem, our ILP formulation is modied and we dene two sets of new variables for each communication pair.

spij Sp

spij = 1 (3.29)

1pk 1iM 1jN

59

spij Sp

spij = 1 (3.30)

1pk 1iM 1jN

2xpij yphij 1 ypvi1j yphij ypvij spij spij = 0 1pk 1iM 1jN The constraints (3.29) and (3.30) enforce that only one node from sets Si or Si is selected as a source or a sink of a path. Constraint (3.31) is modied from (3.19) to ensure that a feasible path for every communication pair is found. Constraint (3.20), (3.21) and objective functions (3.24) and (3.25) still hold for this problem. We can apply all the variations of routing problems described in Section 3.5.1 to the placement and routing formulations. (3.31)

3.6

Experimental Analysis

In this Section, we present the simulation results on fault/power lifetime optimization on various benchmarks. We used the CPLEX solver on a 400MHz Sun Ultra-10 machine and allowed the maximal runtime to be 30 minutes. Various benchmarks are generated for the experimental analysis. The size of benchmarks varies from 5 5 to 11 11. The number of communication pairs are altered

60

as well. The communication pairs are placed across the grid randomly for each instance size. The power consumption of the processing units is assumed to be Pw = 24mW (Berkeley mica2dots - power supply voltage = 3V ). We also assume that the system is equipped with ten 1.5V , 2000mAh AA batteries. Hence, p = 0.0008h1 . Fault occurrence rate, f , picks the values of 1/24h1 , 1/30h1 and 1/36h1 . f = 1/24h1 implies that on average, a random tear occurs in every 24 hours.

Fault Lifetime (hours) f = 1/24 h1 f = 1/30 h1 f = 1/36 h1 51.35 56.25 N/A

Power Lifetime (hours) N/A 55.30 64.38

Table 3.1: Power/fault lifetime comparison in 5x5 grid

Fault Lifetime (hours) f = 1/24 h1 f = 1/30 h1 f = 1/36 h1 31.74 33.71 N/A

Power Lifetime (hours) N/A 33.15 40.11

Table 3.2: Power/fault lifetime comparison in 7x7 grid

Table 3.1 illustrates the simulation results for a 5 5 grid with 8 communication pairs. The rst and the second columns present the values of objective function (3.25) and (3.24), respectively. As shown in the Table 3.1, for small values of f (i.e. = 1/24), the routing must be performed with most emphasis on power lifetime optimization while for larger f s, (i.e. = 1/36), the fault lifetime

61

Figure 3.7: Fault/power lifetime ratio for 7x7 mesh size is optimized to achieve the best results. For f = 1/30h1 , both fault and power objective functions yields approximately similar lifetimes. Table 3.2 exhibits similar simulation results for a 7 7 grid. Figure 3.7 represents fault/power lifetime ratio for a 7 7 grid. In this set of experiments, the location of source and sink nodes in each communication pair was selected randomly across the grid such that the rectilinear distance between source and sink nodes is not greater than lmax where 1 lmax 7. Both the number of communication pairs and lmax are varied. Each plot in Figure 3.7 corresponds to a specic lmax . For each data-point, 20 benchmarks were generated and the average ratio of all 20 benchmarks is shown in the diagram. Overall, 1540 benchmarks were generated for f = 1/30h1 . Ratio greater than one indicates that the system is less sensitive to faults and most probably dies due to the power outage while ratio less than 1 implies that most likely the system becomes paralyzed due to the faults. According to Figure 3.7, the fault/power lifetime ratio drops to less than one for large

62

number of communication pairs distributed randomly with lmax 3. Hence, more eorts must be spent on fault lifetime optimization of such benchmarks while in less congested networks, power lifetime gains more importance. This is due to the fact that in congested networks we are forced to use edges that are highly susceptible to faults and therefore fault lifetime decreases rapidly while the power lifetime is not decreasing at the same order.

Figure 3.8: Lifetime analysis (f = 1/24 h1 ) Figures (3.8), (3.9) and (3.10) present lower bounds for both power and fault lifetime of systems with various congurations. Each data-point again reects the average of lifetime acquired from 20 benchmarks. In each benchmark, the source and the sink of communication pairs are placed with uniform distribution across the grid where lmax = instance size. As shown, once the fault occurrence rate, f , increases, the overall lifetime of the system decreases and more eorts must be spent on fault tolerant routing. As illustrated in all diagrams, the solver was unable to nd a feasible solution for any 30 communication pairs placed randomly on a 5 5 grid within 30 minutes.

63

Figure 3.9: Lifetime analysis (f = 1/30 h1 ) In Figures (3.11), (3.12) and (3.13), the lower bounds for both power and fault lifetime are represented where the size of the grid was set to 7 7 and lmax as well as the number communication pairs are varied accordingly. Each data-point is the average of 20 benchmarks. The other observation is that when the number of communication pairs grows, if the network becomes relatively congested, both power and fault lifetime become relatively constant and similar. The reason is that most resources of the system is already utilized and the routing algorithm do not have the exibility of choosing the best solution with respect to either power optimized or fault tolerant routing techniques.

Our objective may not be achieved by a greedy method since it attempts to maximize the minimum of two objective functions. However, to exhibits the benets of our proposed formulation over a greedy approach, we considered a method where a communication pair is selected randomly and its shortest path based on the power objective function is calculated. This process is repeated until shortest paths between all pairs are determined. If a feasible solution is

64

Figure 3.10: Lifetime analysis (f = 1/36 h1 ) not found, another sequence of communication pairs is selected until a solution is found. The system lifetime in such network corresponds to the minimum of fault and power lifetimes. The same greedy approach is repeated while the fault objective functions is considered. The greedy fault lifetime is compared against the greedy power lifetime and the maximum is picked and reported in Figures 3.14 and 3.15. These set of experiments are performed on a 7 7 grid while the fault rate are assumed to be f = 1/24h1 and f = 1/36h1 for Figures 3.14 and 3.15, respectively. Each data-point is the average of 20 7 random benchmarks where 1 lmax 7. In some benchmarks, the greedy approach was not successful in nding a feasible solution. In such cases, the benchmark did not contribute to the data-point. On average, the lifetime of the system designed by our proposed technique for f = 1/24h1 is 79% higher than the greedy method. The improvement has been 103% for f = 1/36h1 . It illustrates the eectiveness of our proposed technique when the fault rate increases.

65

Figure 3.11:

Lifetime analysis on xed mesh size varying communication

distance(f = 1/24 h1 )

3.7

Conclusion

Our proposed ILP technique has the two following properties:

It considers placement and routing problems at the same time targeting our performance objective. Generally, placement and routing are being treated as two independent design steps and each is quite complex. Therefore, optimizing the nal solution or nding near optimal answer become even more challenging. Yet, our proposed formulation attempts to perform both two design steps simultaneously while acquiring a lower bound on the solution.

Power consumption and reliability are two major performance measures

66

Figure 3.12:

Lifetime analysis on xed mesh size varying communication

distance(f = 1/30 h1 ) in embedded computing systems. Given that the aforementioned objective metrics have dierent nature, optimizing both is impossible. However, both aect the lifetime of the system independently. By applying the concept of lifetime and dening fault lifetime and power lifetime, these objectives are merged into a single measure. The resulting ILP algorithm guarantees to optimize system lifetime taking into consideration both objectives. Usually in such scenarios, the problem is treated as a constrained optimization in which one objective is bounded (becomes a constraint) while the other is optimized. Our proposed ILP scheme uses the same concept in two dierent phases which provably results in optimizing both objectives.

67

Figure 3.13:

Lifetime analysis on xed mesh size varying communication

distance(f = 1/36 h1 ) Our proposed ILP technique is an oine task in our system design procedure. In other words, it does not attempt to recongure the system after the design stage. The oine solution is used to optimally place and route sensors and actuators in grid based networks. In this chapter, we are not considering any recovery scheme from faults. The main objective is to avoid faults by placing and routing the sensors using locations less prune to tears. Specically, with respect to our target architecture and the nature of faults in corresponding applications, a tear can potentially cut many communication links at the same time whereas in fault tolerant routing algorithms, recovery from single link loss (or a limited number of link loss) is being considered. Maximizing system lifetime in more general network topologies may be considered for future works. Although a grid network is a common topology for many wearable embedded networked systems, removing this limitation can potentially

68

Figure 3.14: Performance comparison of our technique with a greedy method (f = 1/24 h1 ) lead to a more general methodology for fault prune networks. In addition, exploiting network architectures in which recovery from faults can be done eciently is unquestionably an interesting and a challenging problem that may be studied in future.

69

Figure 3.15: Performance comparison of our technique with a greedy method (f = 1/36 h1 )

70

CHAPTER 4 Adaptive Electrocardiogram Feature Extraction on Distributed Embedded Systems


4.1 Introduction

The electrocardiogram (ECG) is the record of variation of bioelectric potential with respect to time as the human heart beats. Due to its ease of use and noninvasiveness, ECG plays an important role in patient monitoring and diagnosis. Multichannel electrocardiogram (ECG) data provide cardiologists with essential information to diagnose heart disease in a patient. Our primary objective is to address feasibility verication of implementing an ambulatory ECG analysis algorithm with real-time diagnosis functions for wearable computers. ECG analysis algorithms have always been very dicult tasks in the realization of computer aided ECG diagnosis. Implementation of such algorithms becomes even harder for small and mobile embedded systems that should meet the given latency requirements while minimizing overall energy dissipation for the system. Distributed embedded systems are successfully deployed in various wearable computers. Distributed architectures have been developed for cooperative detection, scalable data transport, and other capabilities and services. However, the complexity of algorithms running on these systems has introduced a new set of challenges associated with resource constrained devices and their energy concerns. These

71

obstacles may dramatically reduce the eectiveness of embedded distributed algorithms. Thus, a new distributed, embedded, computing attribute, dynamically recongurable, must be developed and provided to such systems. In these systems, reconguration capability in particular, may be of great advantage. This capability can adaptively alter the system conguration to accommodate the objectives and meet the constraints for highly dynamic systems. There have been exciting advances in the development of pervasive computing technologies in the past few years. Computation, storage, and communication are now more or less woven into the fabrics of our society with much of the progress being due to the relentless march of Silicon-based electronics technology as predicted by Moores Law. The emerging eld of exible electronics, where electronic components such as transistors and wires are built on a thin exible material, oers a similar opportunity to weave computation, storage, and communication into the fabric of the very clothing that we wear, thereby creating an intelligent fabric (also called electronic textiles or e-textiles) [MM02]. The implications of seamlessly integrating a large number of communicating computation and storage resources, mated with sensors and actuators, in close proximity to the human body are quite exciting; for example, one can imagine biomedical applications where biometric and ambient sensors are woven into the garment of a patient to trigger and modulate the delivery of a drug. Realizing such novel applications is not just a matter of developing innovative materials for exible electronics, along with accompanying sensors and actuators. The characteristics of the exible electronics technology and the requirements of the applications enabled by it necessitate radical innovation in system-level design. Electronic components built of exible materials have characteristics that are very dierent from that of silicon and PCB-based electronics. Further, the operating scenarios of these systems involve environmental dynamics, physical coupling, resource

72

constraints, infrastructure support, and robustness requirements that are distinct from those faced by traditional systems. This unique combination requires one to go beyond thinking of these systems as traditional electronic systems in a dierent form factor. Instead, re-thinking and complete overhaul of the system architecture and the design methodology for all layers of these systems are required.

4.2

Related Work

Several wearable technologies exist to continually monitor patients vital signs, utilizing low cost, well-established disposable sensors such as blood oxygen nger clips and electrocardiogram electrodes. The Smart Shirt from Sensatex [sen] is a wearable health monitoring device that integrates a number of sensory devices onto the Wearable Motherboard from Georgia Tech [PMJ02]. The Wearable Motherboard is woven into an undershirt in the Smart Shirt design. Their interconnect is a exible data bus that can support a wide array of sensory devices. These sensors can communicate via the data bus to a monitoring device located at the base of the shirt. The monitoring device is integrated into a single processing unit that also contains a transceiver. The SmartShirt design features plastic optical ber that can be used to detect punctures - however, they do not have any means of dealing with these punctures other than reporting them via the transceiver. In the event that their single processing unit (and transceiver) is damaged or the control lines leading to the device are torn, the Smart Shirt is virtually inoperable. In our design, we distribute control to multiple processing elements and can accommodate multiple communication buttons. This ensures that a fault in our system

73

will not result in total system failure. The fault tolerance is essential in demanding and/or hazardous environments targeted by this research. Fireghters, policemen, soldiers, astronauts, athletes, and others working in hazardous environments need robust material that can sustain damage and yet still reliably provide service. Several other technologies have been introduced by MIT called MIThril [DMP03], e-Textile from Carnegie Mellon University [MMK02], Wearable e-Textile from Virginia Tech [MJE03], CustoMed and RFab-Vest from UCLA [JEZ05][JDB05]. Furthermore, the Lifeguard project being conducted at Stanford University is a physiological monitoring system comprised of physiological sensors (ECG/Respiration electrodes, Pulse Oximeter, Blood Pressure Monitor, Temperature probe), a wearable device with built-in accelerometers (CPOD), and a base station (Pocket PC). The CPOD acquires and logs the physiological parameters measured by the sensors [lif]. The Assisted Cognition Project conducted at the University of Washingtons Department of Computer Science explored the use of AI systems to support and enhance the independence and quality of life of Alzheimers patients. Assisted Cognition systems use ubiquitous computing and articial intelligence technology to replace some of the memory and problem-solving abilities that have been lost by an Alzheimers patient [KEF03]. Nevertheless, none of the above projects/systems supports the concept of scalability and adapting complex processing algorithms.

4.3

Automated Feature Set Detection

Given the goal of classifying objects based on their attributes, the functionality of an automated pattern recognition system can be divided into two basic tasks: the description task generates attributes of an object using feature extraction techniques, and the classication task assigns a group label to the object based

74

on the attributes with a classier. There are two dierent approaches for implementing a pattern recognition system: statistical and structural. Each approach utilizes dierent schemes within the description and classication tasks which incorporates a pattern recognition system. Statistical pattern recognition [DHS00][JDM00] concludes from statistical decision theory to discriminate among data from dierent groups based upon quantitative features of the data. The quantitative nature of statistical pattern recognition, however, makes it dicult to discriminate among groups based on the morphological (i.e., shape-based or structural) subpatterns and their interrelationships embedded within the data. This limitation provided the impetus for development of structural approaches to pattern recognition. Structural pattern recognition [Gra95][Pav77] relies on syntactic grammars to discriminate among data from dierent groups based upon the morphological interrelationships (or interconnections) present within the data. Structural pattern recognition systems are eective for image data as well as time-series data. We have investigated an accurate ECG processing algorithm based on structural pattern recognition (as depicted in Figure 4.1) mapped onto our processing units (dot-motes) [xbo]. The algorithm consists of three stages: preprocessing, pattern recognition and classication. We perform preprocessing and pattern recognition locally, i.e. within close proximity to the ECG leads. The preprocessing includes ltering while the pattern recognition includes heartbeat detection (through the QRS complex detection), segmentation as well as feature extraction. Once the features are extracted, they will be processed for classication. The ltering is performed by nite impulse response (FIR) lters with cut-o frequencies of 5-150 Hz for sampling rate of 360 samples/sec. The heartbeat detection is implemented with a QRS detector based on the algorithm of Pan and Tompkins [PT85] with some improvements that employs slope information. The

75

scheme proposed by Laguna et al [LMG97] is used to extract the ducial points. All oset and onset points are detected based on the location and convexity of R point. We detect each point onset by locating the largest isoelectric region before the point. Then we search for the inection point followed by largest negative slope for convex R-wave or largest positive slope for concave R-wave. We also detect the point oset by searching for signicant up slope following the end of the last down slope for P, T and S osets in particular. Consequently, features relating to heartbeat intervals and ECG morphology are calculated for each heartbeat. The list of features is included in Table 4.1 and are based on [COR04] and [CB04] with minor additions. In addition, a sample ltered ECG signal which was automatically segmented by our tool is depicted in Figure 4.2.

We extract a total of 23 features from the ECG signals, and each derives from one of the groups below: RR Interval Features: We extract four features based on RR Intervals. The RR interval is the interval between two successive heartbeat ducial points, obtained from the maximum of the R-wave. The pre-RR interval is the RR-interval between a detected heartbeat and the previous one. The post-RR interval is the interval between a given heartbeat and next detected one. The average-RR interval is the average of all detected RR intervals, and the local average-RR interval is the average of the ten most recent RR-intervals. Heartbeat Interval Features: We extract ve features related to heartbeat intervals. QRS duration is the time between QRS oset and QRS onset. T-wave duration is the time between T-wave onset and T-wave oset. The PR, ST, and QT duration are additions to the automated classication system. ST duration is the time between S-wave oset and T-wave onset. The PR duration is the time between P-wave onset and R. The QT duration is the time between Q-wave

76

Group label RR Interval

Features Pre-RR interval Post-RR interval Average-RR interval Local average-RR QRS duration T-wave duration PR duration ST duration QT duration Baseline (DC level) Number of samples in 70%-100% of R-amplitude Maximum positive peak Maximum negative peak Slope velocity between Q-onset and R Slope velocity between R and S ECG morphology (10 samples for sampling rate: 360 s/sec) between Q and S Normalized ECG morphology (10 samples for sampling rate: 360 s/sec) between Q and S ECG morphology (9 samples for sampling rate: 360 s/sec) between S and T-wave oset Normalized ECG morphology (9 samples for sampling rate: 360 s/sec) between S and T-wave oset ECG morphology (10 samples for sampling rate: 360 s/sec) between R-50 ms and R+100 ms Normalized ECG morphology (10 samples for sampling rate: 360 s/sec) between R-50 ms and R+100 ms ECG morphology (8 samples for sampling rate: 360 s/sec) between S + 150 ms and S + 500ms Normalized ECG morphology (8 samples for sampling rate: 360 s/sec) between S + 150 ms and S + 500ms

Heartbeat Interval

Geometric

Morphology 1A Morphology 1B Morphology 2A Morphology 2B Morphology 3A Morphology 3B Morphology 4A Morphology 4B

Table 4.1: Features categorized by groups

77

onset and T-wave oset. All of these features are obtained by rst determining the start and end point of each interval, and then subtracting the end point from the start point. Geometric Points: We calculate the signal DC shift level by taking the average base line of the previous ve successive detected heartbeats. The maximal positive and minimal negative peaks are detected by computing the voltage difference between each sample in the heartbeat and DC shift level. In addition, we extract the number of samples in 70-100% range of absolute peak value. Finally we compute the slope velocity of Q-onset - R as well as R - S segments. ECG Morphology Features: We extract eight features based on ECG morphologies arranged into four groups. Two groups consist of samples from heartbeat segments and two groups consist of samples from xed intervals. Within each group, one feature consists of samples from the original ECG signal, while the other feature is extracted from the normalized ECG signal. The normalization is done through scaling down the amplitude of samples by standard deviation of the same heartbeat. We extract samples from heartbeat segments in ECG morphology 1 and 2 (see Figure 4.3). In morphology 1, ten samples between QRS onset and oset are extracted, and in morphology 2, nine samples between S-wave oset and T-wave oset are obtained. The number of samples collected is also contingent upon the sampling rate and scales with various sampling rates (the aforementioned numbers are for the original sampling rate of 360 samples per second).

We extract samples from a xed interval in ECG morphology 3 and 4 (see Figure 4.4). In morphology 3, ten samples between R 50ms before and R + 100ms are extracted, and in morphology 4, eight samples between between R + 150ms and R + 500ms are acquired.

78

For all ECG morphologies, the elements that fall in between two samples are estimated using linear polarization. We have repeated such feature extraction for three input sampling rates of 360, 200 and 100 samples per second. 360 samples/seconds is the original sampling rate for the MIT/BIH [MM90] benchmarks and the sampling rates of 200 and 100 samples/second was acquired by downsampling the input. Despite our objective is to minimize the communication among processing nodes before the classication phase, this study does not investigate the problem of classication. Therefore, we did not implement a classier for our platform. However, any classier suitable for constrained embedded systems may be deployed.

4.4

Software Proling

To measure the execution delay of our heartbeat detection and feature extraction system, we used Avrora [TLP05], a microcontroller simulator framework developed at UCLA. Avrora is a precise and exible simulator that preserves all timing and behavior of the instrumented program, while allowing user-dened proling of application information. With Avrora, users can easily prole application specic information such as branch frequency, maximum stack size, and memory access by adding custom program monitors. For our experiments, we implemented a program monitor on Avrora that generates the control ow graph (CFG) while measuring the execution frequency and delay of each basic block. Since the CFG of our system is very large, only the major processes are shown in Figure 4.5. The CFG is dynamically generated based upon our compiled and assembled ECG program while Avrora simulates the program execution. Unlike static analysis, parts of a program that are not

79

executed during the simulation will not be accounted for. Also the generated graph will accurately reect compiler optimizations. Hardware interrupts, which occur intermittently during execution, are accounted for as well. Delay analysis for each function is performed during CFG generation for practicality since basic block information may be too detailed. Function delay is measured as the duration when execution enters a function to when execution exits. Calls to other functions are accounted for, while interrupts are not. Since execution delay may be inconsistent due to functions containing dierent execution paths, the average function delay is gathered from each execution instance. However for our purposes, the functions that extract features from heartbeat signals all consist of a single execution path. Therefore we lost no precision in our analysis. The delays of feature detection modules for sampling rate of 360 sample/second are illustrated in Figure 4.6.

4.5

Target Architecture Model

Networked sensor nodes containing constrained, often battery-powered embedded computers can densely sample phenomena that were previously dicult or costly to observe. Sensor nodes can be placed anywhere on patients body [JEZ05] [JDB05]. Due to the mobility of such systems, wireless sensor networks are expected to be both autonomous and long-lived, surviving environmental hardships while conserving energy as much as possible.

It is well-known that the amount of energy consumed for a single wireless communication of one bit can be many orders of magnitude greater than the energy required for a single local computation [SHC04]. Thus, we focus on the energy used for wireless communication. In our model, since all nodes are placed

80

within close proximity of each other, we assume they communicate directly and multi-hop communication is not required. Therefore, the total energy consumed for in-network communication is:

(n) = b(n) e(n)

(4.1)

where b(n) is the number of packets transmitted and e(n) is the average amount of energy required to transmit one packet. In our design, we consider Collision Free Model (CFM) which simplies the programming by abstracting out all of the details of low level channel contention and packet collision from the algorithm designers. By abstracting reliable communication as an atomic operation, programming based on CFM bears resemblance to existing algorithm design in parallel and distributed computation. CFM does not really capture the impact of packet collision that distinguishes wireless communication from wired communication, which makes performance analysis under CFM not very accurate. However, for the sake of simplicity, we consider CFM in our design.

4.6

Dynamic Reconguration

Sensor nodes are composed of embedded systems as well as general-purpose systems, introducing a tension between resource and energy constraints and the layers of indirection required to support true general-purpose operating systems. TinyOS [LMG04], the state-of-the-art sensor operating system, tends to prioritize embedded system constraints over general-purpose OS functionality. TinyOS consists of a collection of software components written in the NesC language [GLB03], ranging from low-level parts of the network stack to application-level routing logic. However, our target operating system is SOS, a new operating sys-

81

tem for mote-class sensor nodes that takes a more dynamic point on the design spectrum [HKS05]. SOS consists of dynamically-loaded modules and a common kernel, which implements messaging, dynamic memory, and module loading and unloading, among other services. Dynamic recongurability is one of our primary assumptions. In the domain of embedded computing, recongurability is the ability to modify the software on individual nodes of a network after the network has been deployed and initialized. This provides the ability to incrementally update the sensor network after it is deployed, add new software modules to a sensor node after deployment, and remove unused software modules when they are no longer needed. The growing tensions between large hard to update networks and complex applications with incremental patches has made recongurability an issue that can no longer be ignored. SOS supports a mechanism that enables over the air reprogramming of the sensor nodes. Using this methods, software modules may be modied, added or removed.

4.7

Feature Set Partitioning

A hypergraph is a generalization of a graph, where the set of edges is replaced by a set of hyperedges. A hyperedge extends the notion of an edge by allowing more than two vertices to be connected by a hyperedge. Formally, a hypergraph H = (V, E h ) is dened as a set of vertices V and a set of hyperedges E h , where each hyperedge is a subset of the vertex set V [DD96], and the size a hyperedge is the cardinality of this subset. Let wi denote the weight of vertex vi V . A K-way vertex partition = {V1 , V2 , . . . , Vk } of H is said to be balanced with an overall load imbalance tolerance 1 if each Vi satises the following equation:

82

Wk Wavg (1 + ), for k = 1, 2, . . . , K where,

(4.2)

Wk =
vi Vk

wi wi )/K

(4.3) (4.4)

Wavg = (
vi V

In a partition of H, a hyperedge that has at least one vertex in a partition is said to connect that partition. Connectivity set j of a hyperedge ej is dened as the set of partitions connected by ej . Connectivity j = |j | of a hyperedge ej denotes the number of partitions connected by ej . A hyperedge hj is said to be cut (external) if it connects more than one partitions (i.e. j > 1), and uncut (internal) otherwise (i.e. j = 1). Therefore, the denition of cut-size is as follows:

cutsize() =
ej E h

(j 1)

(4.5)

Hence, the cutsize is equal to the number of cut nets. The hypergraph partitioning is dened as dividing it into two or more parts such that the cutsize is minimized, while a given balance criterion among the partition weights is achieved. The hypergraph partitioning problem is known to be NP-hard [GJ79b]. During the software partitioning, it is quite important to be able to divide the system specication into clusters so that the inter-cluster (inter-mote) connections are minimized. Hypergraphs can be used to naturally represent feature extraction algorithms. The vertices of the hypergraph are modeled as features, their weights represent the computational time required for features detection,

83

and the hyperedges resemble the number of times a set of features is triggered simultaneously. Partitioning the graph such that the cut-size is minimized while the partitions are balanced can reduce the communication that is required among various processing units for classication phase. The vision is that all features selected must be classied at a local node, thus, in the events where selected features reside on distributed nodes, inter-node communication is inevitable. A high quality hypergraph partitioning algorithm greatly aects the feasibility, quality, and the cost of the resulting system. We employed a hypergraph partitioning algorithm that is based on the multilevel paradigm. In the multilevel paradigm, a sequence of successively coarser hypergraphs is constructed. A bisection of the smallest hypergraph is computed and used to obtain a bisection of the original hypergraph by successively projecting and rening the bisection to the next level ner hypergraph. We have used hMETIS, a program for partitioning hypergraphs implemented for PCs [KAK97b]. Same algorithm can be easily ported on a mobile computer such as a Pocket PC to facilitate dynamic reconguration. The vision is that the hypergraph information is collected real-time from the processing nodes of the wearable computer. Subsequently, the algorithm running on the motes are recongured. The number of partitions is determined as described below: The preprocessing tasks as well as pattern recognition must be completed before the next heartbeat arrives. Let the heartbeat be N beats per minute (bpm). Therefore, the heartbeat rate period can be obtained from:

Theartbeat = 60/N

(4.6)

Let the time required for preprocessing and pattern recognition be tpre and trecog respectively.

84

tpre + trecog < (Theartbeat ) where < 1

(4.7)

The factor is selected to be 0.9 to ensure a margin that prevents from overloading the processing units. Therefore, the maximum CPU time that may be assigned to pattern recognition is (Theartbeat ) tpre where tpre is xed and can be computed from proling stage. As described earlier, the weight on vertices represents the required computational time for each feature. In addition, Wk is already outlined in Equation 4.4. Therefore, the following objective should be accommodated:

Minimize K s.t. Wk < trecog k = 1..K (4.8)

To determine the value of K , we consider the total time required for pattern recognition on all features , Trecog , (extracted from proling analysis). It is trivial that the lowerbound on K can be obtained from the following Equation:

K = Trecog /trecog

(4.9)

Once partitioning is performed based on the value of K , the solution may be imbalanced and violates the constraint described in Equation 4.8. In this case, K must be incremented and the features are re-partitioned until a feasible solution is determined.

85

4.8

Simulation Analysis

This section presents various simulation analysis performed to exhibit the eectiveness of our technique. All experiments were carried out with ECG signals from MIT-BIH Arrhythmia database. The MIT-BIH Arrhythmia database contains 48 half-hour excerpts of two-channel ambulatory ECG recordings, obtained from 47 subjects studied by the BIH Arrhythmia Laboratory between 1975 and 1979. The recordings were digitized at 360 samples per second per channel with 11-bit resolution over a 10 mV range. We used all 48 complete records freely available from PhysioNet [phya]. We also repeated the experiments by downsampling all the benchmarks to 200 and 100 samples per second. As illustrated in Table 4.2, each MIT-BIH record has the recordings of two channels. Yet, we only used the rst channel. The second channel was not used for the sake of simplicity. Originally, in MIT/BIH benchmarks, the electrodes placed on the chest were selected due to their small noise level.

We performed proling analysis on the algorithm described in Section 4.3 using Avrora to compute the computational delay of feature detection modules. The ECG algorithm was ported both for dot-motes (SOS) and PCs. The algorithm for PC was written in C language. The simulation for feature and hypergraph extraction was done on PC due to a number of software instability that we encountered in SOS. As for hypergraph partitioning, we utilized hMETIS. The MIT/BIH benchmarks were used with three sampling rates as illustrated in Tables 4.3, 4.4 and 4.5. The original sampling rate was 360 samples/sec while 200 and 100 samples/sec were acquired by downsampling the data. In Tables 4.3, 4.4 and 4.5, two scenarios for conguration was considered. In one scenario, features were adaptively assigned to processing units based on hypergraph parti-

86

tioning. In the other scenario, the optimized conguration was determined using hypergraph partitioning on benchmark 100 and remained xed throughout our experiments (xed conguration). The number of partitions were obtained from Equation 4.9 for each benchmark. Table 4.3 gures the number of queries exchanged in both scenarios. Considering that the experiments were carried out through simulations, we were unable to measure the wireless power consumption. However, given the number of features we examined - twenty three, each query may be incorporated in a wireless packet of dot-motes (30 bytes). Therefore, taking into account Equation 4.1, the wireless power consumption is proportional to the number of queries exchanged. On average, the communication energy consumption was reduced approximately by 70% in all set of experiments. The wireless communication overhead for partitioning was negligible due to the small size, sparsity and slowly changing nature of our hypergraphs. The reconguration was performed only once for each benchmark. Therefore, its eect on the performance of the system was negligible.

4.9

Conclusion

We proposed a technique for software partitioning in tiny embedded systems. Our target application was an ECG analysis algorithm which is generally classied as a complex medical application. We addressed the problem of mapping such application onto resource constrained embedded systems while extending the lifetime of the system. This was achieved by reducing the energy consumption due to wireless communications. We demonstrated the eectiveness of our technique on various ECG excerpts form MIT/BIH benchmarks. On average, the energy consumption rate was reduced by 70%.

87

Figure 4.1: ECG analysis schematic

88

Figure 4.2: Automatic ECG segmentation performed on ltered signal

Figure 4.3: The sampling intervals of ECG morphologies 1 and 2. Morphology 1 consists of samples extracted from QRS onset and oset. Morphology 2 consists of samples from S-wave oset and T-wave oset.

89

Figure 4.4: The sampling intervals of ECG morphologies 3 and 4. Morphology 3 consists of samples between 50 ms before and after the ducial point (FP). Morphology 4 consists of samples between 150 ms and 500ms after the ducial point.

90

Figure 4.5: Graph generated from proling analysis containing only major blocks required for feature extraction. 91

Figure 4.6: Delays corresponding to ECG feature detection modules extracted in proling phase

92

Record # 100 101 102 103 104 105 106 107 108 109 111 112 113 114 115 116 117 118 119 121 122 123 124 200 201 202 203 205 207 208 209 210 212 213 214 215 217 219 220 221 222 223 228 230 231 232 233 234

Channel used MLII MLII V5 MLII V5 MLII MLII MLII MLII MLII MLII MLII MLII V5 MLII MLII MLII MLII MLII MLII MLII MLII MLII MLII MLII MLII MLII MLII MLII MLII MLII MLII MLII MLII MLII MLII MLII MLII MLII MLII MLII MLII MLII MLII MLII MLII MLII MLII

Patient male, age 69 female, age 75 female, age 84 male, age not recorded female, age 66 female, age 73 female, age 24 male, age 63 female, age 87 male, age 64 female, age 47 male, age 54 female, age 24 female, age 72 female, age 39 male, age 68 male, age 69 male, age 69 female, age 51 female, age 83 male, age 51 female, age 63 male, age 77 male, age 64 male, age 68 male, age 68 male, age 43 male, age 59 female, age 89 female, age 23 male, age 62 male, age 89 female, age 32 male, age 61 male, age 53 male, age 81 male, age 65 male, age not recorded female, age 87 male, age 83 female, age 84 male, age 73 female, age 80 male, age 32 female, age 72 female, age 76 male, age 57 female, age 56

Medication Aldomet, Inderal Diapres Digoxin Diapres, Xyloprim Digoxin, Pronestyl Digoxin, Nitropaste, Pronestyl Inderal Digoxin Digoxin, Quinaglute Quinidine Digoxin, Lasix Digoxin, Pronestyl None Digoxin None None None Digoxin, Norpace Pronestyl Digoxin, Isordil, Nitropaste Digoxin, Lasix, Pronestyl Digoxin, Inderal Digoxin, Isordil, Quinidine Digoxin, Quinidine Digoxin, Hydrochlorthiazide, Inderal, KCl Digoxin, Hydrochlorthiazide, Inderal, KCl Coumadin, Digoxin, Heparin, Hygroton, Lasix Digoxin, Quinaglute Digoxin, Quinaglute None Aldomet, Hydrodiuril, Inderal None None Digoxin Digoxin, Dilantin None Digoxin, Lasix, Quinidine Digoxin Digoxin Hydrochlorthiazide, Lasix Digoxin, Quinidine None Digoxin, Norpace Dilantin None Aldomet, Inderal Dilantin None

Table 4.2: Benchmark statistics

93

Record # 100 101 102 103 104 105 106 107 108 109 111 112 113 114 115 116 117 118 119 121 122 123 124 200 201 202 203 205 207 208 209 210 212 213 214 215 217 219 220 221 222 223 228 230 231 232 233 234 Average

# of queries exchanged with adaptive partitioning 10 76 121 53 37 187 35 64 112 58 144 63 63 4 19 52 53 26 13 86 32 5 49 17 2 41 19 83 232 20 225 143 7 63 145 181 117 35 74 23 6 144 54 15 4 13 47 73 65.52

# of queries exchanged with xed conguration 10 154 157 96 281 258 186 162 302 490 378 218 100 57 70 457 78 169 204 179 160 21 183 48 217 71 233 170 547 292 272 183 119 552 177 603 237 160 155 244 170 328 468 27 16 189 328 192 216.00

Transmission power saving with adaptive partitioning (%) 0.00 50.65 22.93 44.79 86.83 27.52 81.18 60.49 62.91 88.16 61.90 71.10 37.00 92.98 72.86 88.62 32.05 84.62 93.63 51.96 80.00 76.19 73.22 64.58 99.08 42.25 91.85 51.18 57.59 93.15 17.28 21.86 94.12 88.59 18.08 69.98 50.63 78.13 52.26 90.57 96.47 56.10 88.46 44.44 75.00 93.12 85.67 61.98 69.67

Table 4.3: Number of queries exchanged among processing units : sampling rate = 360 sample/sec

94

Record # 100 101 102 103 104 105 106 107 108 109 111 112 113 114 115 116 117 118 119 121 122 123 124 200 201 202 203 205 207 208 209 210 212 213 214 215 217 219 220 221 222 223 228 230 231 232 233 234 Average

# of queries exchanged with adaptive partitioning 5 58 173 58 49 169 41 68 101 62 194 56 26 17 48 154 51 63 2 88 12 15 61 1 206 35 132 78 201 32 244 163 37 123 153 136 25 68 42 85 12 117 62 16 34 46 125 72 79.50

# of queries exchanged with xed conguration 5 84 276 170 188 252 343 229 314 478 347 114 156 141 265 361 69 273 237 255 127 105 223 222 296 194 495 222 497 319 387 339 312 207 187 180 160 286 160 443 183 528 433 157 177 217 529 271 258.60

Transmission power saving with adaptive partitioning (%) 0.00 30.95 37.32 65.88 73.94 32.94 88.05 70.31 67.83 87.03 44.09 50.88 83.33 87.94 81.89 57.34 26.09 76.92 99.16 65.49 90.55 85.71 72.65 99.55 30.41 81.96 73.33 64.86 59.56 89.97 36.95 51.92 88.14 40.58 18.18 24.44 84.38 76.22 73.75 80.81 93.44 77.84 85.68 89.81 80.79 78.80 76.37 73.43 69.26

Table 4.4: Number of queries exchanged among processing units : sampling rate = 200 sample/sec

95

Record # 100 101 102 103 104 105 106 107 108 109 111 112 113 114 115 116 117 118 119 121 122 123 124 200 201 202 203 205 207 208 209 210 212 213 214 215 217 219 220 221 222 223 228 230 231 232 233 234 Average

# of queries exchanged with adaptive partitioning 11 71 101 45 15 196 48 78 47 30 94 31 38 43 21 15 25 28 26 70 37 13 60 14 128 45 104 85 311 25 227 168 107 51 113 300 6 29 58 12 11 154 217 71 14 24 139 61 75.35

# of queries exchanged with xed conguration 11 152 267 86 186 594 296 181 188 414 354 242 149 120 70 284 103 185 169 257 407 136 147 181 250 231 272 109 557 253 623 291 365 598 183 532 174 374 95 242 98 331 494 287 185 301 425 178 263.06

Transmission power saving with adaptive partitioning (%) 0.00 53.29 62.17 47.67 91.94 67.00 83.78 56.91 75.00 92.75 73.45 87.19 74.50 64.17 70.00 94.72 75.73 84.86 84.62 72.76 90.91 90.44 59.18 92.27 48.80 80.52 61.76 22.02 44.17 90.12 63.56 42.27 70.68 91.47 38.25 43.61 96.55 92.25 38.95 95.04 88.78 53.47 56.07 75.26 92.43 92.03 67.29 65.73 71.36

Table 4.5: Number of queries exchanged among processing units : sampling rate = 100 sample/sec

96

CHAPTER 5 Customizable Medical Monitoring Platform


5.1 Introduction

Computation, storage, and communication are now woven into the fabrics of our society with much of the progress being due to the relentless march of the silicon-based electronics technology as predicted by Moores Law. The emerging technology of exible electronics, where electronics components such as transistors and wires are built on a thin exible material, oers a similar opportunity to weave computation, storage, and communication into the fabric of the very clothing that we wear. The implications of seamlessly integrating a large number of communicating computation and storage resources, mated with sensors, in close proximity to the human body are quite exciting. For example, one can imagine biomedical applications where biometric and ambient sensors are woven into the garment of a patient or a person in a hazardous environment to trigger or modulate the delivery of a drug. The natural applications of these systems have environmental dynamics, physical coupling, resource constraints, infrastructure support, and robustness requirements that are distinct from those faced by traditional systems. This combination requires one to go beyond thinking of these systems as traditional systems in a dierent exible form factor. Instead, a rethinking of the architecture and the design methodology for all layers of these systems is required. An innovative system such as our proposed architecture for

97

biomedical monitoring requires that the spatially distributed components on its surface be able to communicate and coordinate to achieve the desired sensing and possibly actuation function. Sensing will take advantage of the spatial dispersion over the human body surface to improve detection eciency, eectiveness and robustness. Such collaboration requires exible communication among the elements. While the resource constraints imply that the communication must be done in a highly ecient manner, the distributed control nature of the applications requires that the communication be highly predictable (latency) and reliable. The ultimate goal of this research is to develop the communication, coordination and control primitives with which a wide variety of applications will be enabled, and to demonstrate their eectiveness compared to other approaches, using a biomedical application as a motivator. Ubiquitous and pervasive computing environments are typically researched and developed by means of rapid prototyping. A common approach is to use othe-shelf networked embedded systems or to design and implement specialized hardware, which is then post hoc attached to an existing object or into the environment. Moreover, ubiquitous computing environments for health care are extremely dynamic systems with ever changing requirements and constantly rened specications. Therefore, a prototype-based development cycle is most appropriate to cope with new demands. While utilizing ubiquitous components for biomedical applications is an exciting approach, medical researchers face considerable hurdles if they wish to create even simple application for health care monitoring. Most lack the necessary technical training. Even technical sta who are willing to learn will nd themselves spending most of their time building and debugging circuit boards, rmware and low-level protocols rather than building their medical monitoring systems. One interesting approach to creating rapidly recongurable medical system is to build

98

a software-based GUI on a PC that interfaces with the individual components of the system. The GUI is responsible for obtaining the application requirements from the medical personnel and program various components of the system to meet the applications needs. Such architecture allows early evaluation of service ideas, prot opportunities, user aspects, and technological feasibility of the applications. Besides, it generates an evolving pool of innovation prototypes for future services and products. Moreover, it creates services that can be productied and forwarded to product development. One major concern in design of such prototype is that it provides justication and prove for services. It also has to work and allow reliable test settings.

5.2

System Description

Our proposed CustoMed is a fascinating and critical class of distributed embedded systems. The main attribute of CustoMed is its rapid prototyping and fast and easy customizability capability based on patients needs. Firstly, the customization may be at the device level. The choice of the device, the placement of the device on the body, and the interaction level of the device with the environment will be tailored to the individual and his/her needs. Secondly, the software downloaded onto the devices can be customizable. Depending on the gender, age, medical condition, and other variables, the software downloaded onto the devices diers. The idea of customization has not been emphasized before, but is an important concern, if the system is made to be robust enough to handle many dierent needs, as well as unexpected needs that may arise. Non engineering-sta can easily custom-built CustoMed for patients. The system will be quickly assembled from basic parts and congured for use. The vision is that in the doctors oce in about ve minutes, the appropriate devices and

99

Figure 5.1: System Components the correct number of them will be assembled and axed to the patient. Other system take months or even years to built, and hence lack the adaptability the system we propose. The physician will also pick from a wide range of code to download onto the devices. We developed such a tool which enables physicians/ developers to pick a specic variation of a code for a particular application and download it to the system components of CustoMed. This tools ensures the abstract design of medical monitoring application and software programming independence. Furthermore, it works with the environment made available to the patient. For example, in case of an emergency, the sensors can alert the security system in the house. In less urgent case, an email can be sent across the Internet or a home appliance can be turned o or on.

Figure 5.2 shows the Graphical User Interface of our system on a PC. This GUI supports scripting such that the specications of the application may be eas-

100

Figure 5.2: CustoMed GUI on a Personal Computer ily loaded onto the components. Some parameters that may be obtained from the personnel includes the type of medical sensors employed, the frequency of data sampling and information regarding sensor calibration. Students and researchers who were not involved in the design of the supporting infrastructure built easily some of these applications. Using the scripting capabilities, we implemented a distributed bootstrap mechanism that automated the initialization process. We dened conguration les with information about the required system services, initial parameters, and communication schemes. The bootstrap mechanism implements the following functionality: automatically starts the services in the specied components and registers the services in the base component. The bootstrap process made the

101

system portable. Every ubiquitous computing environment has its own bootstrap conguration le. Figure 5.3 illustrates the development cycle of the applications. The rapid prototyping and fast customization capabilities enable the developers to easily evaluate inter-application behavior and test its performance on various subjects. By observing this, developers can incrementally improve the reliability and the eciency of the system very fast.

Figure 5.3: Application Development Cycle The main component of our system is called med nodes which incorporate sensing, processing and communications (both wired and wireless). The processors of med nodes support variety of analog and digital sensors and are programmable to process the collected data from sensors. Figure 5.1 illustrates our CustoMed architecture connected to the Internet through a Pocket PC. The list of supported services by our system which facilitates rapid prototyping and customization are as follows:

102

Distributed med node management: All med nodes directly communicate with a base station med node which is connected to a Pocket PC. Since they all share the same communication medium, a token cycling algorithm is implemented on the base station. Possession of the token grants the right to transmit. If a node receiving the token has no information to send, it passes the token to the next end station. Each station can hold the token for a maximum period of time which is specied by the developers. Med node presence detection: Base station med node detects active med nodes based on their recent activities and accordingly adapt the token cycling algorithm. Distributed med node database: The developer can choose whether sensor readings must be stored locally and some specic trigger points will be transmitted to the Pocket PC or all the sensor readings will be directed to the Pocket PC. Moreover, the architecture supports inter med nodes query processing. This feature specically assist with data correction in med nodes considering high correlations among data of sensor readings. Notication service: to disseminate information about the state of the ubiquitous computing environment (i.e. radio channel characteristics). This service is based on events and event channels that decouple the information senders from the information receivers.

5.3

Related Work

Several wearable technologies exist to continually monitor patients vital signs, utilizing low cost, well-established disposable sensors such as blood oxygen nger clips and electrocardiogram electrodes.

103

The Smart Shirt from Sensatex [sen] is a wearable health monitoring device that integrates a number of sensory devices onto the Wearable Motherboard from Georgia Tech [PMJ02]. The Wearable Motherboard is woven into an undershirt in the Smart Shirt design. Their interconnect is a exible data bus that can support a wide array of sensory devices. These sensors can then communicate via the data bus to a monitoring device located at the base of the shirt. The monitoring device is integrated into a single processing unit that also contains a transceiver. The SmartShirt design features plastic optical ber that can be used to detect punctures - however, they do not have any means of dealing with these punctures other than reporting them via the transceiver. In the event that their single processing unit (and transceiver) is damaged or the control lines leading to the device are torn, the Smart Shirt is virtually inoperable. In our design, we distribute control to multiple processing elements and can accommodate multiple communication buttons. This ensures that a fault in our system will not result in total system failure. This fault tolerance is essential in the demanding and/or hazardous environments targeted by this research. Fireghters, policemen, soldiers, astronauts, athletes, and others working in hazardous environments need robust material that can sustain damage and yet still reliably provide service. Moreover, our design supports an alert system which could provide immediate medical attention to individuals in emergency medical situations. Several other technologies have been introduced by MIT called MIThril [DMP03], e-Textile from Carnegie Mellon University [MMK02] and Wearable e-Textile from Virginia Tech [MJE03]. Furthermore, the Lifeguard project being conducted at Stanford University is a physiological monitoring system comprised of physiological sensors (ECG/Respiration electrodes, Pulse Oximeter, Blood Pressure Monitor, Temperature probe), a wearable device with built-in accelerometers (CPOD), and a base station (Pocket PC). The CPOD acquires and logs the physiological parame-

104

ters measured by the sensors [lif]. The Assisted Cognition Project conducted at the University of Washingtons Department of Computer Science is exploring the use of AI systems to support and enhance the independence and quality of life of Alzheimers patients. Assisted Cognition systems use ubiquitous computing and articial intelligence technology to replace some of the memory and problem-solving abilities that have been lost by an Alzheimers patient [KEF03]. Nevertheless, none of the above projects/systems supports the concept of being custom-built in minutes and reconguration in the extent that CustoMed does.

5.4

Design of CustoMed

CustoMed is composed of the following devices:

5.4.1

Sensors

We employ various types of sensors for continual physiological measurements as well as environmental measurements to identify wearers physiological conditions and disorders and the case where people operating in hazardous environments. We have available to us pressure sensors, galvanic skin response sensors, ex sensors, piezoelectric lm sensors, temperature sensors and accelerometers. Flex Sensors: The ex sensor changes resistance when bent. It will only change resistance in one direction. They can be used to measure the angular motion of various parts of body such as knees and neck. Pressure Sensors: These sensors are ideal for measuring forces without disturbing the dynamics of a test. They can be used to measure both static and dynamic forces. They are thin enough to enable non-intrusive mea-

105

surement. The resistance of the sensor decreases as force is applied. Measurement of pressure under the foot is of particular interest to the clinician and researcher, particularly in the elds of diabetes, orthopaedics, sports science and rheumatology. The pressure sensors could be placed in shoes to perform such measurements.

Piezoelectric Film Sensors: Piezoelectric thin lm sensors generate analog voltage signals in response to applied dynamic forces. They can be used to monitor if a patient being attacked or abused by other patients.

Galvanic Skin Response (GSR) Sensors: The galvanic skin response (GSR) also referred to as the electrodermal response (EDR), measures electrical skin conductance from the ngers or palms that is associated with sweat gland activity. It is commonly used in psychophysiology experiments to infer emotional state and cortical arousal. The GSR is commonly used in Biofeedback experiments.

Temperature Sensors: The polymer based bulk heterojunction solar cells have demonstrated the ability to act as temperature sensor. These high performance photodetectors combined with organic-thin lm transistors can be used to realize sensors that can be fabricated on exible substrates including fabric. Such devices possess a combination of electrical performance with superior properties such as light weight, low cost of fabrication, and exibility [CXY04]. Accelerometers: Such sensors can be used for orientation and body move-

106

ment tracking. The idea is to track the orientation of each segment of the body by a sensor to determine the body posture for medical monitoring.

5.4.2

Med Nodes

The most important component of our system is the med nodes. Med nodes are stand-alone components equipped with processing units and batteries. They support various types of sensors for physiological reading from human body. These blocks enable the system to be exible, however their basic structure remains xed almost all the time and thus the reconguration time is no longer a severe limitation. Furthermore, customization of such system with a large number of med nodes is extremely fast. The med nodes can possess several parameters such that they can be complex enough to suit a range of applications. They can as well be more basic that can perform multiple operations. Furthermore, they support variety of analog and digital sensors such as ex sensors, piezoelectric sensors, pressure sensors, etc. Also the block is left software programmable which can be customized for various applications and sensors. On-chip memory blocks are also available for data storage. The processors of med nodes are dot-motes developed at University of California, Berkeley and manufactured by Crossbow [xbo]. A med node along with a few sensors is shown in Figure 5.4.

5.4.3

Pocket PC

A pocket PC is responsible for collecting data from med nodes and classifying them. It dispatches the critical events detected by med nodes or the pocket PC, itself, to the Internet. Moreover, it coordinates and controls the overall functionality of the system. Pocket PC is also equipped with Global Positioning System (GPS) that reports the location of the patient to the Hospital in case of

107

Figure 5.4: A Med Node along with Sensors emergency.

5.4.4

Server

Pocket PC transmits the real-time data to an external server through the Internet. The server provides with various monitoring and data logging capabilities. A screen-shot of the server program is shown in Figure 5.5. Figure 5.6 depicts the system hierarchy of CustoMed along with the communication scheme employed in various levels.

5.5

Driver Application

The design and development of the system framework is meant to be versatile enough to be applied to many dierent medical applications. The requirements of the system, specically with the ability to quickly and easily make a custommade system per patient, were deeply aected by this vision. The following is a sample application that have inspired the overall system requirements and the

108

Figure 5.5: Data Monitoring on a Remote Server initial idea. Post-knee surgery tracking of patients: Structuring of imaging data from the musculoskeletal system will be accomplished utilizing novel MR pulse sequences to support canonical imaging values from tissue independent of acquisition techniques. Two med nodes are placed on knees and two on the ankles. The med nodes on the knees are equipped with ex sensors while med nodes on the ankles utilizes pressure sensors. Med nodes on the knees are responsible for tracking the angular motion of the knees and transmitting the collected data to the pocket PC. Med nodes on the ankles, however, measure the forces and pressures under the foot as well as the load distribution. In addition, we place another med node on the neck to measure the angular motion of the back/neck.

Used to aid Alzheimers patients:

109

Figure 5.6: System Hierarchy The rise of Alzheimers disease is one of the greatest health crises facing the industrialized world. Today, approximately four million Americans suffer from Alzheimers disease; by 2050, the number is expected to rise to 15 million people. CustoMed can make huge dierences in the quality of life of Alzheimers patients. It would be appropriate of the walking well Alzheimers patients, who are patients that are fully mobile. Galvanic skin response sensors, which detect arousal and/or agitation by measuring skin conductance, can be placed on the patients body. Perhaps they can be placed in their socks or in the nap of theirs neck, two places, where there is large amount of perspiration. When agitation is sensed, proper verbal cues can be issues to the patient, to reorient them or calm them down. Also, in case of emergency CustoMed can email physicians and/or family members. CustoMed can extend the time span when patients are independent, and hence improves the quality of their life and reduce the cost incurred. Cus-

110

toMed can prove to be very useful in assisted living homes, also, where the ratio of the sta to patients is about one to ten. In such situations, being hit or abuse has been a problem. Pressure sensors placed on the patients can determine a hit, but even more importantly the detection of agitation, before any harm has been done can be used to protect the patients and the sta. Perhaps, during times of agitation the stas pagers can be cued.

5.6

Sensor Calibration

Sensor calibration is the process of forcing a sensor to conform to a given input/output mapping. This is often done by adjusting the sensor internally but can equivalently be done externally by passing the sensors output through a calibration function that maps the actual sensor response to the desired response. We observe each sensors behavior in a controlled environment and map its observed output to the desired output by a mapping function. The developer download such function to the appropriate med node during the implementation.

5.7

Experimental Analysis

In this section, we illustrate system specications of CustoMed along with the experimental analysis that we performed to evaluate the performance of the system. The processing units in med nodes are mica2dot motes developed at the University of California, Berkeley. The code on mica2dots is implemented with NesC under TinyOS [HSW00]. The software on Pocket PC is written with Embedded Visual C++ while the tools on PC are written with Visual C++. A summary on the system specications of the CustoMed is presented in Table 5.1.

111

All the experiments were carried with med nodes transceivers operating at Max Sampling Rate Bits per Sample Max Number of Sensors per Med Node Power Consumption of each Med Node (Wireless ON, CPU active) Battery Lifetime of each Med Node 200Hz 10bit 5 54 mW 34 hours

Table 5.1: CustoMed System Specication

433M Hz . All med nodes were equipped with one 3V Duracell DL2450 batteries except the base station med node placed at location 5 (with three batteries) since it is connected to the Pocket PC and must remain on continuously.

Figure 5.7: Med Nodes Placement on Body We considered various systems with dierent combinations of med nodes/sensors on the body as depicted in Figure 5.7. Base station med node 5 was responsible for collecting data from other med nodes and transmitting it to the Pocket

112

PC through UART (Universal Asynchronous Receiver/Transmitter). Overall, 8 congurations of med nodes were implemented and was tested on 3 subjects in 5 dierent environments. The loss rate in wireless communication on average was measured less than 4% which exhibits the reliability of the system. As for wearability, all test subjects indicated that the system is comfortable. Due to the small size of the med nodes and its compact design, the system did not greatly interfere with wearers daily activities. Figure 5.8 shows a system conguration of CustoMed with four med nodes (two with piezoelectric sensors, one with ex and one with pressure sensor). Figure 5.9 depicts the base station med node connected to the Pocket PC. In regards to the channel characterization, we performed various experiments with CustoMed. The antenna utilized was a standard mica2dots 17.3cm solid copper antenna. One major consideration on med nodes is their wearability factor. Therefore, we made the antenna circular since we could easily t it in the case of med nodes. We conducted our experiments with transmission power setting in med nodes set to 0dBm. The transmission power setting can be easily changed in dot-motes through ChipCon CC1000 chip. In these experiments, we transmitted TinyOS [HSW00] default packets and measured the reliability of channel between every communicating pair. Tables 5.2 and 5.3 illustrate the loss rate in terms of percentage along with packet round-trip time delay (RTT) in terms of milliseconds between every pair of med nodes for two dierent walking speeds as well as indoor and outdoor environments. As shown, the channel characteristics (delay and packet round-trip delay) is highly dynamic due to the mobility and the close proximity of the med nodes to the body.

113

RTT(ms)/Loss Rate(%) 1 2 3 4 5

1 62.1 / 16.9 82.7 / 12.4 62.5 / 10.7 59.9 / 5.6

2 62.1 / 16.9 63.6 / 4.0 53.0 / 2.1 74.6 / 0

3 82.7 / 12.4 63.6 / 4.0 72.9 / 4.9 135.6 / 3.6

4 62.5 / 10.73 53.0 / 2.1 72.9 / 4.9 94.4 / 0

5 59.9 / 5.6 74.6 / 0 135.6 / 3.6 94.4 / 0 -

Table 5.2: Wireless Channel Characteristics during Indoor Slow Walk


RTT(ms)/Loss Rate(%) 1 2 3 4 5 1 52.9 / 11.5 75.7 / 14.4 62.2 / 9.3 53.4 / 10.1 2 52.9 / 11.5 54.3 / 15.2 65.7 / 7.7 86.3 / 6.3 3 75.7 / 14.4 54.3 / 15.2 75.8 / 2.6 106.8 / 2.6 4 62.2 / 9.3 65.7 / 7.7 75.8 / 2.6 99.3 / 0 5 53.4 / 10.1 86.3 / 6.3 106.8 / 2.6 99.3 / 0 -

Table 5.3: Wireless Channel Characteristics during Outdoor Normal Walk

5.8

Conclusions

In this paper, we proposed a system architecture which enables rapid prototyping and quick customization. We tested our proposed architecture under various conditions and with dierent applications. Dynamic power management techniques such as shutdown have emerged as powerful methods for power-aware computing systems including signal-processing systems. New system-wide power-aware operation is critically important in the system envisioned in this paper. This requires distributed versions of power management techniques, which consider communication and sensing aspects as well as computation. Privacy and security is another major concern. Such technology become less acceptable if the privacy of individuals is compromised. The dangers do not stop when the data is transmitted. Indeed, CustoMed may be invasive, delivering drugs and life-saving debrillator shocks to the patients as needed. Of course, for both passive and active CustoMeds, security is a big concern and a technological obstacle to large-scale deployment. The data must be safely and wirelessly transmitted among the med nodes and to the hospital. This involves encryption, error-correction and authentication protocols, where all of these must

114

be suciently light-weight in the sense of computational resources, battery needs and transmission cost to make it realizable for the CustoMed. Furthermore, the CustoMed should be able to execute light-weight wireless identication scheme with the hospital/base station. Such an identication scheme should be robust in the sense that no adversary can pretend to be a hospital base-station to a CustoMed and at the same time an adversary should not be able to masquerade as a legitimate CustoMed and send erroneous or out-dated data.

115

Figure 5.8: CustoMed

116

Figure 5.9: Base Station Med Node and a Pocket PC

117

Figure 5.10: Sensor Readings during Indoor Slow Walk

118

CHAPTER 6 CMAS: Clinical Movement Assessment System for Neuromotor Disorders


6.1 Introduction

Emerging technologies are generating opportunities for improving medicine and public health. We are currently focusing on using recent advances in wireless networks and real-time reconguration to improve diagnosis and treatment of neuromotor impairments. Strokes, spinal cord injuries, traumatic orthopedic injuries, and other disorders commonly lead to a loss of motor functions of the upper limbs. Currently, clinical assessments of motor functions are routinely scored subjectively or using ordinal scales [1-3]. New treatment and rehabilitation strategies are creating a need for more accurate and quantitative measures of motor function that can be made readily and accurately [4, 5]. Such Standardized, quantitative functional measurements would contribute to understanding neuromotor injuries. Moreover, quantitative measurements of motor function are the rst step in developing appropriate population databases to enable rapid, patient-specic assessments of motor function. The architecture we propose is a mobile and low prole system that may be used in home settings and can potentially assist stroke survivors with several

119

therapy exercises.

6.2

Related work

Many studies have characterized individual nger function and coordination in both unimpaired and impaired populations [6-12]. Quantitative measurements of maximum force, time course of force onset and oset, and nger coordination yield valuable information about neuromotor function following injury, and could be very helpful in describing the characteristics of use-dependent plasticity during recovery. Although most current eorts are primarily limited to a research setting, there is growing interest in using quantitative measurements of function as clinical tools [13-17].

6.3

Hardware design

Our CMAS is based on a system architecture called CustoMed (Customizable Medical Monitoring device) developed at UCLA [JEZ05]. CustoMed is a platform for health monitoring using wireless sensor networks (WSN). This architecture is a network enabled system that supports various wearable sensors and contains on-board general computing capabilities for executing individually tailored event detection, alerts, and network communication with various medical informatics services. Our platform is composed of sensors, med nodes and a pocket PC. The most important component of our system, the med node, is a stand-alone component consisting of a processing unit and a battery which can support various types of sensors for physiological reading from human body. The customization of such system with a large number of med nodes is extremely fast even by non-engineering sta. In addition to support of various wearable

120

sensors, the software downloaded onto the devices can be customizable over-theair. Depending on sex, age, medical condition, and other variables, the software downloaded onto the devices diers. The idea of customization has not been emphasized before, but is an important concern, if the system is made to be robust enough to handle many dierent needs, as well as unexpected needs that may arise.

6.3.1

Sensors

CustoMed can interface with various types of sensors, such as pressure, galvanic skin response, ex, piezo-electric lm and temperature sensors. These sensors can provide continual physiological measurements as well as environmental measurements, even when people operating in hazardous environments. In our rst CMAS prototype, we utilize pressure sensors to measure the force applied by individual hand digits to a handgrip. Pressure sensors are ideal for measuring forces without disturbing the dynamics of a test. They can be used to measure both static and dynamic forces. They are thin enough to enable non-intrusive measurement. The resistance of the sensor decreases as force is applied.

6.3.2

Handgrip device

The CMAS handgrip device is capable of measuring forces generated by individual ngers using pressure sensors. The resistance against squeeze force in our handgrip device is adjustable. A picture of the handgrip device along with sensors and a med-node is shown in Figure 6.1.

121

Figure 6.1: Handgrip device 6.3.3 Med node

Med Nodes enable the system to be exible. Although their basic structure can remain xed most of the time, customization of the system with a large number of med nodes is extremely fast. The med nodes can be complex enough to suit a range of applications, such as tracking knee motion after knee surgery to aiding Alzheimer patients residing in assisted living homes by detecting arousal and/or agitation (by measuring skin conductance). Furthermore, they support a variety of analog and digital sensors. The block is software programmable and can be customized for various applications and sensors. On-chip memory blocks are also available for data storage. The processors of med nodes are dot-motes developed at the University of California, Berkeley. A med node along with a handgrip and pressure sensors is shown in Figure 6.1.

122

6.3.4

Pocket PC

A pocket PC is responsible for collecting data from med nodes and classifying them. It dispatches the critical events detected by med nodes or the pocket PC, itself, to the Internet. Moreover, it coordinates and controls the overall functionality of the system. It can as well perform resource management to accommodate several objectives such as optimizing the power or enhancing the fault-tolerance. In many medical monitoring applications, pocket PCs can facilitate interactions with patients with their large displays while the mobility is not sacriced.

6.4
6.4.1

Software design
Med node

The software for med nodes has been developed in C and under SOS, a new operating system for mote-class sensor nodes that takes a more dynamic point on the design spectrum [19]. SOS consists of dynamically-loaded modules and a common kernel, which implements messaging, dynamic memory, and module loading and unloading, among other services. Dynamic recongurability is one of our primary objectives. In the domain of embedded computing, recongurability is the ability to modify the software on individual nodes of a network after the system has been deployed and initialized. This provides the ability to incrementally update and add new software modules to med nodes after deployment, and remove unused software modules when they are no longer needed. This in particular is benecial when the medical sta ought to remotely update the software that runs on med nodes. The ability to recongure the software on med nodes may potentially enhance the power consumption of the system (and the lifetime) by limiting the wireless transmission to only the most valuable data. In tiny

123

embedded systems that we utilize Berkeley dot-motes the most power hungry component is the radio module. In addition, the local processing in med-nodes may be dynamically altered based on individuals need.

6.4.2

Pocket PC

The software on Pocket PC provides both serial connection with a gateway med node and Internet connection with an external server. The existing radio communication protocol on med-nodes is incompatible with the wireless receiver on Pocket PCs. Therefore, we utilize a base-station med node that collects information from all med-nodes and sends to the pocket PC through the serial connection. The base station med-node also facilitates the software reconguration (in SOS the new software modules that is installed must be dispatched from a base station). The Internet connection with an external server may be utilized for remote monitoring. As shown in Figure 6.2, in the rst window of CMAS terminal on pocket PC, the user species the proper port conguration for both serial and Internet connections. When the external server is not available, the user may choose to bypass the Internet connectivity. For the particular handgrip device we utilize, four pressure sensors are employed. Hence, it is imperative that patients hand digits are placed properly on individual sensors. In addition, due to the variable physical capabilities of patients, the applied force must be normalized. Hence, the screen shot shown in Figure 6.3 is designed to assess the maximum voluntary contraction (MVC) and ensure that the ngers are properly placed on the sensors. Following the calibration process, the main window of CMAS terminal is displayed as shown in Figure 6.4. The top window features a guide or a target cursor that moves on a sinusoidal wave (Fig. 6.4, black dot). The patients

124

Figure 6.2: Connection setup window response (i.e. the average forces applied to the pressure sensors) is displayed in the same window (Fig. 6.4, blue dot bounded by horizontal lines). The objective is to have the patient follow the guide by applying appropriate force to the handgrip device. The force may be scaled to 80%, 60%, 40% or 20% of the MVC force. Moreover, forces applied by individual ngers are illustrated on the CMAS terminal in four separate windows. Finally, the patient can choose from several test sets which will be described in the next section.

6.5

Test sets

Four test sets have been developed for the CMAS: Test 1: The guide or the target travels on a sinusoidal waveform between

125

Figure 6.3: Calibration window zero and 100% of the patients maximum strength. The period of the sine wave six seconds. Test 2: The objective in test 2 is to evaluate the fatigability in patients. The target moves between 20% and 40% of the MVC with the period of 200ms. The patient is expected to follow the indicator by rapidly squeezing the handgrip device. Test 3: This test is developed for evaluating the ability to nely modulate force production. The guide moves between 15% and 30% of the MVC on a sinusoidal wave with period of six seconds. Test 4: This test is the high strength ne grain motor control. This test is similar to test 3 except that the guide moves between 45% and 65% of the

126

Figure 6.4: CMAS task window MVC.

6.6

Experimental results

Preliminary experiments conducted on unimpaired subjects (N=2) showed that subjects were able to nely modulate nger forces to achieve a desired average force (Figure 6.5). The variance in errors between average force and target forces were 6.4 1.0%, 0.9 5%, 38 0.3% and 0.3 0.3% of the guide variance for Task 1, 2, 3 and 4, respectively for both subjects over 6 trials. Subjects precisely matched the guide frequency (frequency dierences < 0.005 Hz for all trials). Crosscorrelating the guide signal with the average force signal revealed that average forces from subjects lagged the guide forces by 80 100 ms and 300

127

0 ms for tasks 2 and 3. For tasks 1 and 4, the time mean time lags of -50 ms and -21 ms fell well within the variance 170 and 470 ms, respectively.

Figure 6.5: Average and individual forces during Task 1 Whereas subjects were able to precisely track the guide signals, they did not accomplish this by generating comparable forces with each nger (Figure 6.5). Large forces produced by middle ngers compensated for small forces generated by index and little ngers, reecting an eective force synergy that maintained target average forces. The variance in errors between each individual force and the target forces is shown for every task and subject in Table 6.1. In addition, in frequency domain, the dierence of the peak in the power spectrum between each individual force and the target forces is shown. Please note that each data point in Table 6.1 is the average taken over 3 trials.

128

Task

Subject

129

1 1 2 2 3 3 4 4

1 2 1 2 1 2 1 2

Variance Average 5.56 7.34 0.78 1.06 61.15 15.89 0.44 0.15

in errors with respect to Little nger Ring nger 88.18 46.00 77.40 30.58 89.40 10.82 72.51 21.22 93.55 44.39 78.44 33.18 88.74 32.95 77.29 29.64

the target force (%) Middle nger Index nger 23.51 90.80 57.48 99.26 66.63 99.78 67.61 100.00 54.84 98.34 55.23 100.00 40.56 86.11 40.44 98.48

Frequency dierence (Hz) Average Little nger Ring nger 0.002 -0.085 0.000 0.002 0.003 0.002 0.000 -0.023 -0.008 0.000 -0.025 0.000 0.360 -0.368 0.356 0.003 -0.204 0.003 -0.001 -0.022 -0.031 0.001 -0.035 -0.015

Middle nger 0.002 0.003 -0.002 -0.011 0.361 0.002 -0.022 -0.010

Index nger 0.001 -0.052 -0.044 -0.049 -0.037 -0.683 -0.029 -0.023

Table 6.1: Itemized force error and frequency dierence

CHAPTER 7 On Minimal Energy Skew Routing in Lossy Wireless Sensor Networks


7.1 Introduction

Battery-powered networked embedded systems are being widely used in various application domains. Practical limitations do not allow replacement of dead batteries after system deployment. Hence, reduction of energy consumption, as a mechanism to prolong the battery lifetime, has gained signicant attention in sensor networks community. Previous research eorts have shown that communication dissipates signicant amount of energy [SHC04]. Consequently, design choices and protocols that aect the amount of required transmission have a great impact on system lifetime. For example, minimum-hop routing algorithm reduces the number of transmissions required to deliver a message at the destination, and improves system energy dissipation [IGE03]. On the other hand, many applications heavily rely on robust and non-stop operation of sensing and computing nodes (or simply nodes) to perform their intended functionality. In such classes of applications, failure of a node causes the entire system to fail, and hence, the lifetime of the system is determined by the lifetime of the rst node that fails. Consequently, even distribution of energy dissipation becomes an important design concern in addition to total system energy

130

dissipation. Intuitively, even distribution of (minimum-skew) energy dissipation maximizes the lifetime of the nodes with shortest lifetime, and prolongs the application lifetime. The existing energy-aware routing algorithms are generally oblivious to fair distribution of energy consumption among nodes, and exhibit poor results. In this paper, we present an ecient routing algorithms that minimizes the energy skew among nodes in a mesh network. Our algorithm is a centralized scheme that is globally optimal. This algorithm eciently nds the best routing strategy for a given trac pattern in any network topology, including mesh networks. Experimental results on our benchmarks show an increase of up to ve times in system lifetime when comparing with optimal shortest path routing with a slight penalty in the overall latency of the end-to-end paths. Before we continue, we would like to clarify some assumptions used in the remaining of our work. First, our solution is applicable when the quality of the links used for routing does not dramatically change over time. This assumption is conrmed for good quality links by [CWK05b]. Second, our solution works only in the case of unicast routing algorithms. The use of broadcast or multicast routing mechanisms has been left for future work.

7.2

Related Work

Most of the previous routing protocols ([JM96][MG96][PC97] [BMS01][PR99]) for wireless a d-hoc networks concentrate on nding and maintaining routes in the face of changing topology caused by mobility or other environmental changes. Typical protocols use shortest path algorithms based on hop count, geographic distance, or transmission power. The rst two are important in minimizing delay

131

and maximizing throughput. The third objective is peculiar to wireless a d-hoc networks, and is important because typically the nodes involved have a limited power supply, and radio communication consumes a large fraction of this supply. To address this issue, several power-aware routing protocols have been developed ([SWR98] [RM98] [SL01] [RH00] [WLB01]). In most of these approaches, the aim is to minimize the energy consumed per packet in order to deliver it to the destination. The typical approach is to use a distributed shortest path algorithm in which the edge costs are related to the power required to transmit a packet between the two nodes involved. The problem with this technique is that nodes on the minimum-energy path are quickly drained of power, aecting the network connectivity when they fail. While some of the most sophisticated routing algorithms associate a cost with routing through a node with low power reserves ([SWR98] [SL01]), they present at best heuristic solutions. Researchers have explored the fundamental limits of energy-ecient collaborative data-gathering by deriving upper bounds on the lifetime of increasingly sophisticated sensor networks [BC02]. But they do not devise any ecient algorithm for routing. Another method proposed to extend the sensor network operational time consist of organizing the sensors into a maximal number of disjoint set covers that are activated successively. Only the sensors from the current active set are responsible for monitoring all targets and for transmitting the collected data, while nodes from all other sets are in a low-energy sleep mode [CD05]. The proposed method, however, is a heuristic. Furthermore, a shortest cost path routing algorithm is studied which uses link costs that reect both the communication energy consumption rates and the residual energy levels at the two end nodes [CT04]. This approach also formulates the technique as a linear programming problem.

132

Nevertheless, an -optimal polynomial time routing algorithm that maximizes the lifetime of the system with respect to the distributed energy sources has not been devised in any of the prior studies. Furthermore, to the best of our knowledge, no probabilistic distributed routing scheme that attempts to minimize the skew in energy have been proposed. Authors in [SL04] present a distributed method for lifetime maximization. Their method starts out with assuming a certain lifetime and attempts to search for the optimal lifetime with a bounded error (by starting out with an arbitrary lifetime) within a certain number of rounds. Our method however, proposes a simpler approach (despite being centralized) that calculates the optimal lifetime in polynomial time. More importantly, the main advantage of our method is that we take into account the lossy channels. Authors in [JDS05] also propose a similar approach assuming the communication links are lossless.

7.3

Preliminaries and Models

The problem at hand is to design an eective routing mechanism to maximize the application lifetime, which is given by the lifetime of the rst node that fails. If nodes have identical initial energy resources, the objective can be rephrased as minimizing the maximum energy consumption rate of the nodes. We model the network using an unconstrained connected directed graph Gs = (Vs , Es ), where Vs denotes set of nodes v1 , v2 , . . . , vn , and Es represents the set of directed links lij . Note that directed graphs can be utilized to model any network topology. We will show that our algorithm is optimal for any directed graph. We represent the energy consumed by node vi to transmit or receive an information unit (also called packet or message in this paper) by ti and ri , respec-

133

tively. These two parameters account for the energy consumption incurred by communication and computation (or possibly other sources of energy consumption) required to transmit or receive a packet. We assume that node vi has an energy level Ei , which is initially equal to Ei,0 ((i, j ) Vs Ei,0 > 0). Note that Ei decreases as packets are received and/or sent by node vi . Let fij be the number of packets transmitted from node i to its immediate neighbor node j over link lij in a routing scenario. We assume that network has some periodicity property in data transmission, in which case, fij can be interpreted as the number of packets transmitted over lij in unit of time or its transmission rate. The lifetime of node vi is dened as follows: Ei,0 j ; lij Es fij ) + (ri .

Ti = Where
j ; lij Es

(ti .

j ; lji Es

fji )

(7.1)

fij is the total number of packets transmitted from node vi , fji is the total number of packets received by vi .

and similarly,

j ; lji Es

7.4

Denition

In the following formulation we attempt to minimize the skew in energy consumption (due to wireless communication) in the network. The skew is dened as follows: There exists exponential number of paths connecting source to destination nodes. For every path, we form the following denition. There exists a node in every path that has the maximum energy consumption (ideally if each path is isolated from the rest of the network, the energy consumption rate must be identical throughout the path, however, in reality, nodes may have incoming/outgoing edges from/to the rest of the network. Therefore, the energy consumption rate may not be

134

necessarily uniformly distributed). In every path Pi connecting a source to a destination node, we identify the node with maximum energy consumption rate as pimax . We dene the skew of energy consumption as the dierence between pimax and pjmax of paths i and j . In the following Sections, we will illustrate how our formulation minimizes the dierence of maximum energy consumption in every two paths. Please note that despite the number of paths are exponential, the upper bound on the number of nodes with maximum energy consumption is still n (where n is total number of nodes). The denition of minimum skew is rephrased in Equation 7.2.

Pi &Pj

connecting source(s) to destination(s) Minimize|pimax pjmax | (7.2)

Figure 7.1: Minimum Skew Denition

135

7.5
7.5.1

Minimal-Skew Routing
Problem Formulation and -Approximation Algorithm

Given a sensor network Gs and a specic trac pattern, the objective is to route the packets so that after completion of packet routing, the minimum remaining battery energy among all of the nodes is maximized. This objective would maximize the lifetime of the rst failing node, and subsequently, maximizes the application lifetime. We assume that there is a specic node t in Gs , which serves as the gateway or base station or destination node, and all of transmitted packets have to be delivered to t. Specically, the given trac pattern is composed of a set of (node, quantity ) pairs, which species the source and the number of packets that need to be sent to t. Our formulation, however, accommodates a more extensive objective which covers the aforementioned objective as described in Equation 7.2. Furthermore, we temporarily assume that all nodes have identical initial energy levels. In Subsection 7.5.3, we will extend our results to show that our model and technique is extensible to cases where nodes have dissimilar initial energy levels. Each packet transmitted from a source node to t can be viewed as a unit ow in the network Gs . More precisely, xij units of ow going through the link lij represent xij packets transmitted from vi to vj . This trac decreases the energy resources at vi and vj by xij ti and xij rj , respectively. The given trac pattern can be interpreted as a ow supply vector, F S , which specied the amount of ow supply at nodes. All of packets have to be received at node t, and hence, Node t is the only node with negative ow supply (positive ow demand). The supply for node t is set such that the total supply over all the nodes in the

136

network is zero. The problem of packet routing is equivalent to nding a feasible network ow in Gs . Intuitively, the objective of maximizing the minimum remaining energy of the nodes is equivalent to minimizing the maximum ow passing through nodes. Note that the remaining energy at intermediate (not a source or destination) node vi with xi units of ow passing through it is Ei xi .(ri + ti ). In the remainder of this section, we transform Gs to a new network Gt in which, mincost ow solution generates the optimal solution. We proceed to describe the transformation procedure, along with mathematical properties of our technique and proofs of correctness. We construct the network Gt = (Vt , Et ) from the graph Gs according to the following rules. Each node in graph Gs is split into k + 2 nodes where k is a tunable parameter that controls the accuracy of the solution. We refer to the resulting set of nodes as a partition. In each partition, two nodes serve as receiver and transmitter (or input and output) and the rest of the nodes are called splits. Figure 7.2 illustrates an example partition in which, nodes v(k+2)(i1)+1 and v(k+2)i are the receiver and the transmitter of the partition, respectively. Figure 7.3 shows an example network Gs and the resulting network Gt after transformation. Each intermediate node vi in Gs consumes ri + ti units of energy to relay a packet. Therefore, vi can relay at most ui = Ei /(ri + ti ) packets before running out of battery. ui forms an upper bound on the number of packets that can pass through node vi . In order to embed this constraints into the problem, we assign the ow upper bound of ui = ui /k to each of the split nodes. The upper bounds guarantee that a partition cannot pass more ow after relaying ui units of ow, or equivalently, a node cannot route packets after its battery is dead. The ow upper bound for all of the receiver and transmitter nodes is innity. Note that the

137

Figure 7.2: Node partitioning upper bound ui = ui /k on the split nodes in partition i, implicitly sets the upper bound of ui for the receiver and transmitter nodes of the partition. The receiver, transmitter and split nodes are assigned a special sequence of costs for passing the unit ow. The cost associated with receiver and transmitter nodes of a partition is zero. The costs associated with split nodes of a partition are increasing from left to right (Figure 7.2). This directs the min-cost ow solution to utilize the split nodes from left to right, when passing ow through the partition. Specically, we assign the following costs to the nodes in partition i:

138

Figure 7.3: Original network and the resulting network after partitioning c(k+2)(i1)+1 = 0 c(k+2)(i1)+2 = 1 c(k+2)(i1)+3 = n + c(k+2)(i1)+4 = n(n + 1 + ) + . . . c(k+2)i1 = n
k j =2 c(k+2)(i1)+j

(7.3)

c(k+2)i = 0 The cost on each split node is enforced such that it would be greater than the cumulative cost of the split nodes with smaller indices over all of the partitions. Intuitively, our cost assignment technique enforces the optimal min-cost ow solution to utilize the split nodes with smaller indices, before trying to utilize a particular split node. This simple yet eective idea exhibits the main property of

139

our technique by which, we minimize the maximum energy consumption of the nodes. For simplicity, we dene cost rank where cost rank Ri has the following property: Ri >
j<i

n Rj

(7.4)

Consequently, Equations 7.3 may be reworded as follows: c(k+2)(i1)+1 = 0 c(k+2)(i1)+2 = R1 c(k+2)(i1)+3 = R2 c(k+2)(i1)+4 = R3 . . . c(k+2)i1 = Rk c(k+2)i = 0

(7.5)

The loss in edges may also be accommodated easily. For the sake of simplicity, we add the extensions for lossy edges in Section 7.5.2 The aforementioned procedure provides a well-dened set of steps to create Gt from Gs . A packet routed from a sensor node s, to the base station t, in Gs , corresponds to a unit of s > t ow in Gt . Similarly, our partition construction scheme along with the upper bound settings on split nodes guarantee that any ow solution in Gt represents a feasible routing solution in Gs . Note that the given trac pattern for Gs can be readily translated into a ow supply vector (F S ) for Gt . F S species the amount of ow supply or demand for all of the nodes. We now prove that our cost assignment strategy implies that the min-cost ow solution in Gt corresponds to a routing scheme in Gs that minimizes the maximum consumed energy at the nodes (or equivalently, maximizes the minimum remaining energy over all of the nodes). Let xij represent the amount of ow on edge (i, j ). Let yi represent the amount of ow going through split node k in partition i. Similarly, let ci denote the associated cost of unit ow passing through that node in Gt . The min-cost ow problem for graph Gt with the given

140

supply and demand vector, F S , can be written as:

Minimize
i

ci,k yi,k

(7.6)

Subject to: xij


{j :(i,j )A} {j :(j,i)A}

xji = b(i) (i, j ) Vt (i) Vt

(7.7) (7.8) (7.9)

0 xij uij ; 0 y i ui ;

Equation (7.7) is the ow conservation condition at each node and Equations (7.8) and (7.9) are capacity constraints for the arcs and the nodes respectively. We assume that the lower bounds on arc ows as well as the lower bounds on node ows are zero. Moreover, the number of nodes in network Gs is denoted by n. The ow that passes through the receiver or transmitter nodes of a partition represents the total ow passing through that partition, or equivalently, it determines the energy consumption at the sensor node corresponding to the partition. The more the ow, the shorter the lifetime of the sensor node. Therefore, the objective is to minimize the maximum amount of ow passing through partitions. The ow passing through any partition has to pass through its split nodes, and subsequently, min-cost ow solutions utilize the splits with lower costs before higher cost splits. We denote the number of split nodes in partition i that carry a non-zero ow by i .
k+1 j =2

i =

y(k+2)(i1)+j ui

(7.10)

141

Theorem 7.5.1. The objective function in Equation 7.6 minimizes the maximum ow in the nodes of network Gs = (Vs , Es ) with maximum error where ui = ui /k = 1/k . This is equivalent to maximizing the minimum battery lifetime of the nodes in network Gs (or its transformed network Gt ) and therefore analogous to maximizing the lifetime of the system. Proof. Proof is formed by contradiction. Assume our technique generates solution L where the ow entering each partition is represented by fi . Let fmax = (max(fi )i). Assume there exist another solution L with maximum ow denoted
by fmax where fmax < fmax + .

Thus, (7.10) conveys that:


max < max

Considering the cost on splits in Figure 7.2 and Equation (7.3), we conclude that the overall cost of ow for solution L is greater than the overall cost of ow for solution L . This contradicts the optimality of min-cost ow technique since the solution found (L) does not have the minimum cost. Therefore, by contradiction, the solution L cannot exist and our formulation minimizes the maximum ow (or maximizes the minimum lifetime). Due to the ow conservation condition in min-cost ow technique, it is trivial that the ow in any nodes may not be reduced individually to minimize the objective function. The intuition behind our proposed technique is that the cost assignment on the splits forces the network to rout a ow from the k th split of node vi , if it cannot be routed through any number of other nodes whose (k 1)th splits is empty.

142

Theorem 7.5.2. The solution L , generated by our technique, minimizes the dierence of the maximum node ows throughout every two disjoint paths connecting source to a destination node (with tolerance of = 1/k - minimal-skew). In other words, these two nodes further must have the minimum lifetime of the nodes along each path and are regarded as the bottleneck nodes (i.e. such nodes have the maximum energy consumption rate along their corresponding paths). Proof. This proof is presented by contradiction as well. Assume there exists a feasible solution L which was transformed from L and the ows of two partitions i and j was altered such that their dierence is reduced. We denote the new ows in solution L by fi and fj . Without loss of generality, we assume fi < fj .

Figure 7.4: Flow exchange to obtain minimal-skew solution We investigate both possible scenarios. One scenario occurs when the transformation involves changing the ow in only one partition (increasing fi or decreasing fj ) According to the ow conservation theorem, this scenario is not feasible. The other scenario, as shown in Figure 7.4, takes place when the ow of partition i is increased and the ow of partition j is decreased (by a value of

143

greater than ) such that: |fj fi | < |fj fi | + and fj + fi = fj + fi + From Equation 9, it can be easily shown that: fi < fi < fj < fj (7.12) (7.11)

Therefore, the number of splits that are utilized for passing the ow follows the same convention:
i < i < j < j

(7.13)

As discussed before, in each partition, each split has a cost that alone is greater than n times the cumulative cost of all the precedent splits with smaller indices (n = number of nodes in Gs (original graph)). Since the solutions L and L are similar except in partitions i and j , therefore, the overall cost of solution L is
greater than the cost of L (j > j ). This contradicts the optimality of min-cost

ow algorithm as the solution L must have the minimum cost. Hence, solution L cannot exist. Theorem 7.5.3. The solution of minimal-skew routing is unique in the sense that the lifetime of nodes in the network in descending order is unique. Proof. Assume F and F are the vectors containing the ow of all nodes in descending order for two optimal solutions, L and L . Obviously F [1] = F [1], otherwise the two total costs would be dierent (that contradicts the optimality of the solution). Inductively, this argument holds for every index. Assume F [i] = F [i], for i = 1 . . . k . If F [k + 1] < F [k + 1] then because of the special cost assignment of the splits, the cost of F [k + 1] itself would be larger than the total cost of F [i]s, i = k + 1 . . . n. Therefore, the total cost of solution L is

144

greater than the cost of L. This contradicts the optimality of solution L . This completes the proof.

7.5.2

Discussion on Lossy Channels

In general, accommodating lossy communication channels in minimum cost ow technique is not quite an easy task due to ow conservation conditions. In the case where the existence of lossy communication links are inevitable, the packets received at the receiver is less than the number of packets transmitted. This scenario corresponds to ow attenuation in our minimum cost formulation. To address the data/ow loss in communication links, ideally we prefer to remove certain portion of the ow traveling through an edge and transfer it to a auxiliary node which is considered as a dummy sink node. Other gateways and sink nodes are also connected to the aforementioned node. This can be accomplished by adding intermediate nodes on every interconnection edge. Moreover, the intermediate nodes have to be connected through lossy edges with cost zero a dummy sink node. The upper bound on lossy edges corresponds to the loss rate of every interconnection edge. The limitation we face, however, is that the initial ow in every edge tends to be directed through the lossy edge until the lossy edge reaches its capacity. This causes a potential problem where the interconnection edges are not utilized with their full capacity. Therefore, this will incur in an increase in loss rate. To address this issue, we propose the following transformation: Each edge is divided into k split edges eik , ..., ei(k+1)1 and k lossy edges lik , ..., li(k+1)1 connecting intermediate nodes to a dummy node as shown in Figure 7.5. The costs on split edges correspond to R1 , R3 , ...R2k while the cost on lossy edges correspond to R2 , R4 , ...R2k+1 . This will ensure that initially edge eik

145

Figure 7.5: Edge splitting is utilized and subsequently lossy edge lik . Despite, we attempt to characterize the probabilistic nature of loss with a deterministic approach, over a long run, the behavior of our model become analogous to steady behavior of real systems. The above cost distribution will ensure that edges eik , lik , eik+1 , ..., ei(k+1)1 , li(k+1)1 are utilized accordingly. Changing the cost ranks associated with the edges enables us to accommodate other combinations of edge utilization. All Theorems and Lemmas proven in the this Section still holds for graphs with lossy edges (with minor modications). The proofs are omitted due to lack of space.

7.5.3

Dissimilar Initial Energy Levels

Throughout our formulation, we assumed that the initial energy levels in all nodes are similar. Dissimilar initial energy levels, however, can be simply accommodated by modifying the capacity of the splits (upper-bounds on the splits). Throughout our formulation, we assumed that the initial energy levels in all nodes are similar. Dissimilar initial energy levels, however, can be simply accom-

146

modated by modifying the capacity of the splits (upper-bounds on the splits). The main property of our technique is that we assign various costs to dierent levels of energy stored in a battery. When a battery is fully charged, it can be used more easily than the case it has half of the full charge. Therefore, in the case where some nodes in the network do not have full energy level, the already used portion of their battery corresponds to the splits with lesser cost. Hence, those splits could be assigned upper bound of zero in the min-cost ow formulation as if they have been already used.

7.5.4

Time Complexity Analysis

The formulation used for the proposed min-cost ow problem in Equations (2) through (7.9) is an LP formulation which can be solved with standard LP solvers. Throughout our experiments, we used Matlab as an LP solver. The use of LPsolvers enabled us the ability to have non-integral capacity in the formulation and non-integral ow in the solution. In order to provide combinatorial algorithms to solve such problem, integrality constraints must be enforced. Fortunately all the problem parameters such as supply/demands and capacities assigned to splits can be scaled by a factor of k (the number of splits) and meet the integrality constraints. Therefore, the time complexity of our technique is after scaling would be O((m log(nk ))(m + nk log(nk ))) where m is the number of edges in the graph; n and k are the number of nodes and splits in each partition, respectively. The time complexity can be easily derived from the time complexity of the min-cost ow algorithms and the size of our constructed network (O(nk )). The original time-complexity of min-cost ow is reported in [AMO93].

147

7.5.5

Discussion on Multicommodity

In scenarios where several sources and destinations are involved and the communication pairs exchange dierent type of messages, routing problems can be modeled as multicommodity ow. Out technique can not directly address this class of problems [GJ79a]. The problem itself is known to be NP-complete. However, we believe that our methodology can be applied in conjunction with the known heuristics for multicommodity ow problems and generate reasonable results. We have not considered this class of networks but we plan to study it in near future.

7.6

Experimental Results

We generated various benchmarks based on random graphs with relatively large number of nodes to illustrate the eectiveness of our centralized technique. For simplicity, we assumed that the energy level in all benchmarks is uniform. Our benchmark sets resemble real-world networks. In most network applications, it might be unlikely that a large portion of sensor nodes are placed within close proximity of each other. Instead, they are placed on a grid with certain random properties. It can be envisioned as a locally random globally regular networks. Such scenario can be imagined with the following example: Certain number of sensor nodes is required to be placed in a building. Each room has a specic number of sensor nodes which is constant, yet, the position of the nodes is random within each room. We call this set as random networks with grid distribution. We generate such benchmarks by dividing the area into unit-size tiles. A tile that does not have a sensor node is selected randomly. We place a node in the tile with uniform distribution. This procedure is repeated until all tiles are covered.

148

If more sensor nodes are required to be inserted, the same course is recurred until all sensor nodes are placed. One hundred sensors are placed within areas of size 160 40, 160 60, 160 80, 200 40, 200 60, 200 80 and 200 100. We refer to this set of benchmarks as grid networks. In all networks, three source nodes are placed on far left side of the square area while the destination nodes/ gateways are placed on the right side of the square. This particularly assist us to place the source/destination not within the close proximity of each other. The connectivity between nodes is determined by statistical models developed using real RF transcievers under dierent conditions and scenarios [CWK05a]. Only communication links with reliability greater than 80% are considered. In the next set of experiments, the locations of the nodes are generated conforming to a random uniform distribution over areas various size. The We refer to this class of random networks as random networks. Firstly, we illustrated the eectiveness of our technique on two benchmarks. One benchmark belongs to our class of grid networks while the other resembles random network. Each network consists of 100 nodes scattered over an area of 200 square meters. The graph topology of grid and random networks are illustrated in Figures 7.6 and 7.8 respectively. Figure 7.7 depict the normalized energy consumption rate of the nodes in the system sorted in ascending order for various numbers of splits (k ) in the grid network. The eectiveness of our algorithm on how the energy consumption rate becomes evenly distributed is clearly demonstrated when k is increased. Figure 7.7 illustrates the same graph for the random network shown in Figure 7.8. In the next set of experiments, the size on benchmarks is varied. For every particular size, twenty benchmarks are generated with three source and three

149

Graph Topology grid200x100 100

90

80

70

60 (meter)

50

40

30

20

10

20

40

60

80

100 (meter)

120

140

160

180

200

Figure 7.6: Graph topology (n=100, grid distribution) destination nodes. To compare our scheme against other routing algorithms, we consider a shortest path routing algorithm based on minimum cost ow. Figures 7.10, 7.11 , 7.12 and 7.13 demonstrate the lifetime resulted from our scheme compared to min-cost technique. In all diagrams, each data-point corresponds to the average taken over twenty benchmarks. Throughout all diagrams, as the number of splits increases, the lifetime improves due to forcing the network to utilize vertex disjoint paths more eectively. Overall, the average lifetime of the systems (for k = 4) is increased by a factor of 4.38 compared to min-cost routing approach. Figures 7.14, 7.15, 7.16 and 7.17 exhibits the delay trade-os of our routing algorithm with respect to the min-cost shortest path for various benchmarks. Overall, the average delay of our scheme (for k = 4) is 10% greater than

150

grid200x100

1 Normalized energy consumption rate

0.8

0.6

0.4

0.2

0 100 80 60 40 20 node # 0 1 2 1.5 k (number of splits) 3 2.5 3.5 4

Figure 7.7: Normalized energy consumption rate in sorted order (n=100, grid distribution) the min-cost shortest path. The average delay is not vastly increased due to existence of multiple vertex disjoint paths between sources and destinations in our benchmarks. The average delay also increases slightly as the k (number of splits) is increased. In general, highly connected networks such as grids provide a large number of parallel paths between nodes which is of our interest and enhances the exibility of data routing.

151

Graph Topology rand200x100 100

90

80

70

60 (meter)

50

40

30

20

10

20

40

60

80

100 (meter)

120

140

160

180

200

Figure 7.8: Graph topology (n=100, random distribution)

7.7

Conclusion

We proposed a polynomial time -optimal technique for multi-hop routing in wireless networks with distributed battery sources. Our technique maximizes the lifetime of the system. Furthermore, it evenly distributes the energy consumption rate which yields in a minimal-skew solution for node utilization. We theoretically proved that our technique is ecient and has polynomial time complexity. Furthermore, our technique accommodates routing through lossy links while the optimality is not sacriced. Our investigation on various benchmarks revealed the quality of the solutions generated by our methodology even with a small number of splits.

152

rand200x100

1 Normalized energy consumption rate

0.8

0.6

0.4

0.2

0 100 80 60 40 20 Node # 0 1 2 1.5 k (number of splits) 3 2.5 3.5 4

Figure 7.9: Normalized energy consumption rate in sorted order (n=100, random distribution)

153

Figure 7.10: min-skew/min-cost lifetime for various number of splits - k (n=100, grid distribution)

Figure 7.11: min-skew/min-cost lifetime for various number of splits - k (n=100, grid distribution)

154

Figure 7.12: min-skew/min-cost lifetime for various number of splits - k (n=100, rand distribution)

Figure 7.13: min-skew/min-cost lifetime for various number of splits - k (n=100, rand distribution)

155

Figure 7.14: Average delay of min-skew/min-cost for various number of splits k (n=100, grid distribution)

Figure 7.15: Average delay of min-skew/min-cost for various number of splits k (n=100, grid distribution)

156

Figure 7.16: Average delay of min-skew/min-cost for various number of splits k (n=100, rand distribution)

Figure 7.17: Average delay of min-skew/min-cost for various number of splits k (n=100, rand distribution)

157

References
[AMO93] Ravindra K. Ahuja, Thomas L. Magnanti, and James B. Orlin. Network ows: theory, algorithms, and applications. Prentice-Hall, Inc., 1993. ATmega128L Manual. http://www.atmel.com. Guillermo Barrenechea, Baltasar Beferull-Lozano, and Martin Vetterli. Lattice sensor networks: capacity limits, optimal routing and robustness to failures. In IPSN04: Proceedings of the third international symposium on Information processing in sensor networks, pp. 186195. ACM Press, 2004. M. Bhardwaj and A. Chandrakasan. Bounding the lifetime of sensor networks via optimal role assignments., 2002. Prosenjit Bose, Pat Morin, Ivan Stojmenovi&#263;, and Jorge Urrutia. Routing with guaranteed delivery in ad hoc wireless networks. Wirel. Netw., 7(6):609616, 2001. M. Bona. Textile Quality. Texilia, 1994. M. Burstein and R. Pelavin. Hierarchical Wire Routing. IEEE Transactions on Computer-Aided Design of Integrated Circuits, pp. 223234, 1983. I Christov and G Bortolan. Ranking of pattern recognition parameters for premature ventricular contractions classication by neural networks. Physiological Measurement, 25(5):12811290, 2004. A.E. Caldwell, H. Choi, A.B. Kahng, S. Mantik, M. Potkonjak, G. Qu, and J.L. Wong. Eective Iterative Techniques for Fingerprinting Design IP. In Design Automation Conference, pp. 843848. ACM/IEEE, 1999. T. F. Chan, J. Cong, T. Kong, and J. R. Shinnerl. Multilevel Optimization for Large-Scale Circuit Placement. pp. 171176. IEEE, 2000. M. Cardei and D.-Z. Du. Improving Wireless Sensor Network Lifetime through Power Aware Organization. ACM Wireless Networks, 11(3), May 2005.

[atm] [BBV04]

[BC02] [BMS01]

[Bon94] [BP83]

[CB04]

[CCK99]

[CCK00]

[CD05]

158

[COR04]

Philip de Chazal, Maria ODwyer, and Richard B. Reilly. Automatic Classication of Heartbeats Using ECG Morphology and Heartbeat Interval Features. IEEE TRANSACTIONS ON BIOMEDICAL ENGINEERING, 51(7):11961206, 2004. Jae-Hwan Chang and Leandros Tassiulas. Maximum lifetime routing in wireless sensor networks. IEEE/ACM Trans. Netw., 12(4):609619, 2004.

[CT04]

[CWK05a] Alberto Cerpa, Jennifer L. Wong, Loaune Kuang, Miodrag Potkonjak, and Deborah Estrin. Statistical Model of Lossy Links in Wireless Sensor Networks. In Proceedings of the ACM/IEEE Fourth International Conference on Information Processing in Sensor Networks (IPSN05), Los Angeles, CA, USA, April 2527 2005. ACM/IEEE. [CWK05b] Alberto Cerpa, Jennifer L. Wong, Loaune Kuang, Miodrag Potkonjak, and Deborah Estrin. Temporal Properties of Low Power Wireless Links: Modeling and Implications on Multi-Hop Routing. In Proceedings of the Sixth ACM/IEEE MOBIHOC05), UrbanaChampaign, IL, USA, May 2528 2005. ACM/IEEE. [CXY04] Fang-Chung Chen, Qianfei Xu, and Yang Yang. Enhanced eciency of plastic photovoltaic devices by blending with ionic solid electrolytes. Applied Physics Letter., p. 3181, 2004. Shantanu Dutt and Wenyong Deng. A probability-based approach to VLSI circuit partitioning. In DAC 96: Proceedings of the 33rd annual conference on Design automation, pp. 100105, New York, NY, USA, 1996. ACM Press. Richard O. Duda, Peter E. Hart, and David G. Stork. Pattern Classication. John Wiley and Sons, Inc., second edition, 2000. A. E. Dunlop and B. W. Kernighan. A Procedure for Placement of Standard Cell VLSI Circuits. IEEE Transactions on ComputerAided Design of Integrated Circuits, 4(1):9298, January 1985. R. DeVaul, J. Gips M. Sung, and A. Pentland. MIThril 2003: applications and architecture. In Wearable Computers, Seventh IEEE International Symposium on,, pp. 411. IEEE, 2003. M. R. Garey and D. S. Johnson. Computers and intractability: a guide to the theory of NP-completeness. W. H. Freeman, 1979.

[DD96]

[DHS00] [DK85]

[DMP03]

[GJ79a]

159

[GJ79b]

Michael R. Garey and David S. Johnson. Computers and Instractability: A Guide to the Theory of NPCompleteness. W.H Freeman, San Francisco, CA, 1979. [The Bible. An indispensible guide to NPcompleteness and related issues. Updated by Johnsons semiregular column in the Journal of Algorithms.]

[GLB03]

David Gay, Philip Levis, Robert von Behren, Matt Welsh, Eric Brewer, and David Culler. The nesC language: A holistic approach to networked embedded systems. In PLDI 03: Proceedings of the ACM SIGPLAN 2003 conference on Programming language design and implementation, pp. 111, New York, NY, USA, 2003. ACM Press. J. Garcia, P. Lander, L. Sornmz, S. Olmos, G. Wagner, , and P. Laguna. Comparative Study of Local and Karhunen-Loeve-Based STT Indexes in Recordings from Human Subject with Induced Myocardial Ischemia. Computer and Biomedical Research, 31(CO981481), 1998. Amara Graps. An Introduction to Wavelets. IEEE Computational Sciences and Engineering, 2(2):5061, 1995. K.M. Hall. An r-dimensional Quadratic Placement Algorithm. Management Science, pp. 219229, 1970. Chih-Chieh Han, Ram Kumar, Roy Shea, Eddie Kohler, and Mani Srivastava. A dynamic operating system for sensor nodes. In MobiSys 05: Proceedings of the 3rd international conference on Mobile systems, applications, and services, pp. 163176, New York, NY, USA, 2005. ACM Press. Jason Hill, Robert Szewczyk, Alec Woo, Seth Hollar, David E. Culler, and Kristofer S. J. Pister. System Architecture Directions for Networked Sensors. In Architectural Support for Programming Languages and Operating Systems, pp. 93104, 2000. Chalermek Intanagonwiwat, Ramesh Govindan, Deborah Estrin, John Heidemann, and Fabio Silva. Directed diusion for wireless sensor networking. IEEE/ACM Trans. Netw., 11(1):216, 2003. Roozbeh Jafari, Foad Dabiri, Philip Brisk, and Majid Sarrafzadeh. Adaptive and fault tolerant medical vest for life-critical medical monitoring. In SAC 05: Proceedings of the 2005 ACM symposium

[GLS98]

[Gra95] [Hal70] [HKS05]

[HSW00]

[IGE03]

[JDB05]

160

on Applied computing, pp. 272279, New York, NY, USA, 2005. ACM Press. [JDM00] Anil K. Jain, Robert P. W. Duin, and Jianchang Mao. Statistical Pattern Recognition: A Review. IEEE Trans. Pattern Anal. Mach. Intell., 22(1):437, 2000. Roozbeh Jafari, Foad Dabiri, and Majid Sarrafzadeh. -Optimal Minimal-Skew Battery Lifetime Routing in Distributed Embedded Systems. Journal of Low Power Electronics, 1(2):97107, 2005. Roozbeh Jafari, Andre Encarnacao, Azad Zahoory, Foad Dabiri, Hyduke Noshadi, and Majid Sarrafzadeh. Wireless Sensor Networks for Health Monitoring. In MobiQuitous 05: Proceedings of the Second Annual International Conference on Mobile and Ubiquitous Systems, 2005. David B Johnson and David A Maltz. Dynamic Source Routing in Ad Hoc Wireless Networks. In Imielinski and Korth, editors, Mobile Computing, volume 353. Kluwer Academic Publishers, 1996.

[JDS05]

[JEZ05]

[JM96]

[KAK97a] G. Karypis, R. Aggarwal, V. Kumar, and S. Shekhar. Multilevel Hypergraph Partitioning: Application in VLSI Domain. pp. 526 529. IEEE/ACM, 1997. [KAK97b] George Karypis, Rajat Aggarwal, Vipin Kumar, and Shashi Shekhar. Multilevel hypergraph partitioning: application in VLSI domain. In DAC 97: Proceedings of the 34th annual conference on Design automation, pp. 526529, New York, NY, USA, 1997. ACM Press. [KEF03] Henry Kautz, Oren Etzioni, Dieter Fox, and Dan Weld. Foundations of Assisted Cognition Systems. Technical report, University of Washington, Computer Science Department, Technical Report, 2003. Jung-Chun Kao and Radu Marculescu. Energy-Aware Routing for E-Textile Applications. In DATE 05: Proceedings of the conference on Design, Automation and Test in Europe, pp. 184189, Washington, DC, USA, 2005. IEEE Computer Society. J. M. Kleinhans, G. Sigl, F. M. Johannes, and K. J. Antreich. GORDIAN: VLSI Placement by Quadratic Programming and Slicing Optimization. IEEE Transactions on Computer-Aided Design of Integrated Circuits, 10(3):365365, 1991.

[KM05]

[KSJ91]

161

[Lee61] [lif] [LMG97]

J.F. Lee. An Algorithm for Path Connection and Its Application. IRE Transactions on Electronic Computer, pp. 346365, 1961. Lifeguard Monitoring System. http://lifeguard.stanford.edu. Pablo Laguna, Roger G. Mark, Ary Goldberger, and George B. Moody. A Database for Evaluation of Algorithms for Measurement of QT and Other Waveform Intervals in the ECG., 1997. Philip Levis, Sam Madden, David Gay, Joseph Polastre, Robert Szewczyk, Alec Woo, Eric Brewer, and David Culler. The Emergence of Networking Abstractions and Techniques in TinyOS. In First Symposium on networked system design and implementation (NSDI04), pp. 114, San Francisco, California, USA, 2004. N. Lek, R.W. Thaik, and S.M. Kang. A New Global Router Using Zero-One Integer Linear Programming Techniques for Sea-of-Gates and Custom Logic Arrays. IEEE Transactions on Computer-Aided Design of Integrated Circuits, 1992. Shree Murthy and J. J. Garcia-Luna-Aceves. An ecient routing protocol for wireless networks. Mob. Netw. Appl., 1(2):183197, 1996. MIDMARK Diagnostics Group. http://midmarkdiagnostics.com. T. Martin, M. Jones, J. Edmison, and R. Shenoy. Towards a design framework for wearable electronic textiles. In Wearable Computers, Seventh IEEE International Symposium on,, pp. 190 199. IEEE, 2003. G. B. Moody and R. G. Mark. The MIT-BIH Arrhythmia Database on CD-ROM and software for use with it. In Computers in Cardiology 1990, pp. 185188, Los Alamitos, 1990. IEEE Computer Society Press. D. Meoli and T. May-Plumlee. Interactive Electornic Textile Development: A Review of Technologies. Journal of Textile and Apparel, Technology and Management, 2(2), 2002.

[LMG04]

[LTK92]

[MG96]

[mid] [MJE03]

[MM90]

[MM02]

[MMK02] D. Marculescu, R. Marculescu, and P.K. Khosla. Challenges and opportunities in electronic textiles modeling and optimization. In Design Automation Conference, 2002. Proceedings. 39th, pp. 175 180. ACM/IEEE, 2002.

162

[NM93]

Lionel M. Ni and Philip K. McKinley. A Survey of Wormhole Routing Techniques in Direct Networks. IEEE Computer, 26(2):6276, 1993. T. Pavlidis. Structural Pattern Recognition, volume 1 of Springer Series in Electrophysics. Springer-Verlag, 1977. Vincent D. Park and M. Scott Corson. A Highly Adaptive Distributed Routing Algorithm for Mobile Wireless Networks. In INFOCOM 97: Proceedings of the INFOCOM 97. Sixteenth Annual Joint Conference of the IEEE Computer and Communications Societies. Driving the Information Revolution, p. 1405, Washington, DC, USA, 1997. IEEE Computer Society. PhysioBank - physiologic signal archives for biomedical research. http://www.physionet.org/physiobank/. PhysioToolkit - open source software for biomedical science and engineering. http://www.physionet.org/physiotools/. Sungmee Park, K. Mackenzie, and S. Jayaraman. The wearable motherboard: a framework for personalized mobile information processing (PMIP). In Design Automation Conference, 2002. Proceedings. 39th, pp. 170174. ACM/IEEE, 2002. S. Papadimitriou, S. Mavroudi, L. Vladutu, , and A. Bezerianos. Ischemia Detection with a Self-Organizing Map Supplemented by Supervised Learning. IEEE Trans. on Neural Networks, 12(3), 2001. Charles E. Perkins and Elizabeth M. Royer. Ad-hoc On-Demand Distance Vector Routing. In WMCSA 99: Proceedings of the Second IEEE Workshop on Mobile Computer Systems and Applications, p. 90, Washington, DC, USA, 1999. IEEE Computer Society. Anthony Primentas. Puncture and Tear of Woven Fabrics. Journal of Textile and Apparel, Technology and Management, 1(4), 2001. J. Pan and W. J. Tompkins. A real-time QRS detection algorithm. IEEE Trans. Biomed. Eng, 32(3):230236, 1985. N.R. Quinn and M.A. Breuer. A Force Directed Component Placement Procedure for Printed Circuit Boards. IEEE Transactions on Circuits and Systems, pp. 377388, 1979.

[Pav77] [PC97]

[phya] [phyb] [PMJ02]

[PMV01]

[PR99]

[Pri01] [PT85] [QB79]

163

[RH00]

Ram Ramanathan and Regina Hain. Topology Control of Multihop Wireless Networks Using Transmit Power Adjustment. In INFOCOM (2), pp. 404413, 2000. V. Rodoplu and T. Meng. Minimum energy mobile wireless networks., 1998. Sensatex. http://www.sensatex.com. Victor Shnayder, Mark Hempstead, Bor rong Chen, Geo Werner Allen, and Matt Welsh. Simulating the power consumption of largescale sensor network applications. In SenSys 04: Proceedings of the 2nd international conference on Embedded networked sensor systems, pp. 188200, New York, NY, USA, 2004. ACM Press. N. A. Sherwani. Algorithms For VLSI Physical Design Automation. Kluwer Academic Publishers, 1993. E. Shargowitz and J. Keel. A Global Router Based on Multicommodity Flow Model. The VLSI Journal, pp. 316, 1987. Ivan Stojmenovic and Xu Lin. Power-Aware Localized Routing in Wireless Networks. IEEE Transactions on Parallel and Distributed Systems, 12(11):11221133, 2001. Arvind Sankar and Zhen Liu. Maximum Lifetime Routing in Wireless Ad-hoc Networks. In INFOCOM, 2004. K. Shahookar and P. Mazumder. A Genetic Approach to Standard Cell Placement Using Meta-genetic Parameter Optimization. IEEE Transactions on Computer-Aided Design of Integrated Circuits, 9(5):500511, 1990. P. Singh and HI. Maibach. Iontophoresis in drug delivery: basic principles and applications. Crit Rev Ther Drug Carrier Syst., 11:161213, 1994. Phillip Stanley-Marbell, Diana Marculescu, Radu Marculescu, and Pradeep K. Khosla. Modeling, Analysis, and Self-Management of Electronic Textiles. IEEE Trans. Comput., 52(8):9961010, 2003. W. J. Sun and C. Sechen. Ecient and Eective Placement for Very Large Circuits. IEEE Transactions on Computer-Aided Design of Integrated Circuits, 14(3):349359, March 1995.

[RM98] [sen] [SHC04]

[She93] [SK87] [SL01]

[SL04] [SM90]

[SM94]

[SMM03]

[SS95]

164

[SW96] [SWR98]

M. Sarrafzadeh and C.K. Wong. An Intorduction to VLSI Physical Design. McGraw-Hill, 1996. Suresh Singh, Mike Woo, and C. S. Raghavendra. Power-aware routing in mobile ad hoc networks. In MobiCom 98: Proceedings of the 4th annual ACM/IEEE international conference on Mobile computing and networking, pp. 181190, New York, NY, USA, 1998. ACM Press. Ben L. Titzer, Daniel Lee, and Jens Palsberg. Avrora: Scalable Sensor Network Simulation with Precise Timing. In IPSN05, Fourth International Conference on Information Processing in Sensor Networks, 2005. B. Witkowska and I. Frydrych. A Comparative Analysis of Tear Strength Methods. Fibers and Textiles in Eastern Europe, 12(2), June 2004. Roger Wattenhofer, Li Li, Paramvir Bahl, and Yi-Min Wang. Distributed Topology Control for Wireless Multihop Ad-hoc Networks. In INFOCOM, pp. 13881397, 2001. M. Wang, X. Yang, and M. Sarrafzadeh. Dragon2000: Fast Standard-cell Placement for Large Circuits. pp. 260263, 2000. Crossbow Technology Inc. http://www.xbow.com. MW Zimmerman, MT Johnson RJ Povinelli, , and KM Ropella. A Reconstructed Phase Space Approach for Distinguishing Ischemic from Non-Ischemic ST Changes using Holter ECG Data. Computers in Cardiology, 30, 2003.

[TLP05]

[WF04]

[WLB01]

[WYS00] [xbo] [ZR03]

165

You might also like