UBC Theses and Dissertations

UBC Theses Logo

UBC Theses and Dissertations

A disconnect/pressure monitor Campbell, Michael A. 1982

Your browser doesn't seem to have a PDF viewer, please download the PDF to view this item.

Item Metadata

Download

Media
831-UBC_1982_A7 C35.pdf [ 6.91MB ]
Metadata
JSON: 831-1.0065493.json
JSON-LD: 831-1.0065493-ld.json
RDF/XML (Pretty): 831-1.0065493-rdf.xml
RDF/JSON: 831-1.0065493-rdf.json
Turtle: 831-1.0065493-turtle.txt
N-Triples: 831-1.0065493-rdf-ntriples.txt
Original Record: 831-1.0065493-source.json
Full Text
831-1.0065493-fulltext.txt
Citation
831-1.0065493.ris

Full Text

A DISCONNECT/PRESSURE MONITOR by MICHAEL A. CAMPBELL B.Sc., E l e c t r i c a l E n g i n e e r i n g , Queen's U n i v e r s i t y , 1979 A THESIS SUBMITTED IN PARTIAL FULFILMENT OF THE REQUIREMENTS FOR THE DEGREE OF MASTER*. OF APPLIED SCIENCE i n THE FACULTY OF GRADUATE STUDIES (Department o f E l e c t r i c a l E n g i n e e r i n g ) We a c c e p t t h i s t h e s i s as c o n f o r m i n g t o t h e r e q u i r e d s t a n d a r d THE UNIVERSITY OF BRITISH COLUMBIA NOVEMBER 1981 © M i c h a e l A. C a m p b e l l In p r e s e n t i n g t h i s t h e s i s i n p a r t i a l f u l f i l m e n t of the requirements f o r an advanced degree at the U n i v e r s i t y o f B r i t i s h Columbia, I agree t h a t the L i b r a r y s h a l l make i t f r e e l y a v a i l a b l e f o r r e f e r e n c e and study. I f u r t h e r agree t h a t p e r m i s s i o n f o r e x t e n s i v e copying of t h i s t h e s i s f o r s c h o l a r l y purposes may be granted by the head of my department o r by h i s or her r e p r e s e n t a t i v e s . I t i s understood t h a t c o p y i n g or p u b l i c a t i o n of t h i s t h e s i s f o r f i n a n c i a l g a i n s h a l l not be allowed without my w r i t t e n p e r m i s s i o n . Department of The U n i v e r s i t y of B r i t i s h Columbia 2075 Wesbrook P l a c e Vancouver, Canada V6T 1W5 Date DE-6 (2/79) i i ABSTRACT P r e s e n t methods o f m o n i t o r i n g ^ a n e s t h e t i c b r e a t h i n g c i r c u i t s f o r m e c h a n i c a l f a u l t s a r e f l a w e d by i n a d e q u a c i e s i n t h e d e s i g n of d i s c o n n e c t / p r e s s u r e m o n i t o r s (DPMs), d e v i c e s w h i c h m o n i t o r b r e a t h i n g c i r c u i t p r e s s u r e waveforms. Such i n a d e q u a c i e s a r e i n v e s t i g a t e d , and t h e i r c a u s e i s i d e n t i f i e d . A m i c r o p r o c e s s o r b a s e d DPM, which a p p l i e s p a t t e r n r e c o g n i t i o n t e c h n i q u e s t o t h e t a s k of d i s c o n n e c t m o n i t o r i n g i s p r o p o s e d , and i t s d e s i g n and i m p l e m e n t a t i o n a r e p r e s e n t e d . T e c h n i c a l and c l i n i c a l t r i a l s show t h a t t h e p r o t o t y p e DPM c o n s i s t e n t l y d e t e c t s a l m o s t a l l m e c h a n i c a l f a u l t s i n t h e a n e s t h e t i c b r e a t h i n g c i r c u i t . I t i s c o n c l u d e d t h a t p a t t e r n r e c o g n i t i o n b a s e d DPMs a r e s i g n i f i c a n t l y more e f f e c t i v e t h a n t h e i r p r e s e n t day c o u n t e r p a r t s . i i i TABLE OF CONTENTS ABSTRACT i i TABLE OF CONTENTS . .. i i i L I S T OF TABLES v L I S T OF FIGURES v i ACKNOWLEDGEMENTS v i i i 1. INTRODUCTION 1 1.1 An A n e s t h e t i c I n c i d e n t . 1 1.2 A n e s t h e t i c I n c i d e n t s In Review 2 2. VENTILATION AND MONITORING 4 2.1 M e c h a n i c a l V e n t i l a t i o n ,4 2.2 D i s c o n n e c t / P r e s s u r e M o n i t o r i n g 10 2.3 Towards A New DPM •. 12 2.4 The New G e n e r a t i o n .' 14 2.5 Summary 17 3. METHODOLOGY 19 3.1 I n t r o d u c t i o n 19 3.2 A P a t t e r n R e c o g n i t i o n A p p r o a c h 19 3 . 3 Summary 33 4. DPM ALGORITHM 34 4.1 I n t r o d u c t i o n 34 4.2 L e a r n i n g 34 4.3 D a t a C y c l i n g .. 37 4.4 F e a t u r e E x t r a c t i o n 39 4.5 Q u a l i t y C o n t r o l 40 4 . 6 M o n i t o r i n g 41 4.7 A l a r m s 42 i v 4.8 Summary 44 5. DPM HARDWARE 45 5.1 I n t r o d u c t i o n 45 5.2 The P r o c e s s i n g System 45 5.3 I n p u t Systems 47 5.4 T i m i n g / M o n i t o r i n g C i r c u i t s 51 5.5 O u t p u t C i r c u i t s 54 5.6 C a l i b r a t i o n 56 5.7 Summary 58 6. The DPM/SDK D e v i c e 59 6.1 H a r d w a r e / S o f t w a r e B a s i c s ... 59 6.3 A F u n c t i o n a l D e s c r i p t i o n 61 6.4 D e v i c e C a p a b i l i t i e s And L i m i t a t i o n s 64 6.5 Summary 65 7. DPM/SDK E v a l u a t i o n 66 7.1 I n t r o d u c t i o n 66 7.2 T e c h n i c a l T r i a l s 66 7.3 C l i n i c a l T r i a l s 70 7.4 The Next G e n e r a t i o n 72 7 . 5 Summary 74 8. C o n c l u s i o n s 75 REFERENCES 77 APPENDIX A: DPM/SDK OPERATOR'S MANUAL 79 APPENDIX B: DPM5 PROGRAM LISTING 90 APPENDIX C: CLINICAL TRIAL CHART RECORDINGS 119 V LIST OF TABLES 7.1 DPM/SDK Technical T r i a l s Results 68 v i L I S T OF FIGURES 2.1 The C i r c l e B r e a t h i n g System 5 2.2 The D r a g e r AV V e n t i l a t o r 7 2.3 A Non F a u l t B r e a t h i n g C i r c u i t P r e s s u r e Waveform 9 2.4 Non F a u l t and F a u l t P r e s s u r e Waveforms •••• 1 6 3.1 A Non F a u l t P r e s s u r e Waveform, D r a g e r V e n t i l a t o r 20 3.2 A Non F a u l t P r e s s u r e Waveform, A i r S h i e l d s V e n t i l a t o r 20 3.3 A Non F a u l t P r e s s u r e Waveform, B i r d Mk. IV V e n t i l a t o r 20 3.4 A Two Compartment P a t i e n t - V e n t i l a t o r S ystem Model 23 3.5 P r e s s u r e Waveform From an E n d o t r a c h e a l D i s c o n n e c t 27 3.6 P r e s s u r e Waveform From an E n d o t r a c h e a l O c c l u s i o n 27 3.7 P r e s s u r e Waveform From an E n d o t r a c h e a l D i s c o n n e c t W i t h Flow R e s i s t a n c e 28 3.8 P r e s s u r e Waveform From a F r e s h Gas D i s c o n n e c t 28 3.9 P r e s s u r e Waveform From a F r e s h Gas O c c l u s i o n 29 3.10 P r e s s u r e Waveforms W i t h I n c r e a s e d , D e c r e a s e d F r e q u e n c y 30 3.11 P r e s s u r e Waveforms W i t h I n c r e a s e d , D e c r e a s e d T i d a l Volumes 31 3.12 P r e s s u r e Waveforms W i t h I n c r e a s e d , D e c r e a s e d I n s p i r a t o r y Flow 32 4.1 S y n c h r o n i z a t i o n By H a l f Peak P r e s s u r e D e t e c t i o n 36 5.1 DPM/SDK P e r i p h e r a l Memory and A d d r e s s D e c o d i n g C i r c u i t s 46 5.2 DPM/SDK Data A c q u i s i t i o n S ystem 48 5.3 DPM/SDK T i m i n g / M o n i t o r i n g C i r c u i t s 50 5.4 DPM/SDK S o n a l e r t and M a l f u n c t i o n LED D r i v e C i r c u i t s ... 54 5.5 DPM/SDK V i s u a l O u t p u t C i r c u i t 55 5.6 DPM/SDK C l i p p a r d V a l v e A c t u a t i o n C i r c u i t 57 v i i 6.1 The DPM/SDK D e v i c e 60 6.2 A DPM/SDK S t a t e D i a g r a m . 62 7.1 DPM/SDK T e c h n i c a l T r i a l S e t u p 67 VI 1 1 ACKNOWLEDGEMENTS I would l i k e t o thank my s u p e r v i s o r s , D r . M.R. I t o , and D r . J.A. McEwan, f o r t h e i r g u i d a n c e . I would l i k e t o e x p r e s s my g r a t i t u d e t o G.B. Boyd, f o r t h e many u s e f u l i d e a s he has p r e s e n t e d t o me o v e r t h e p a s t two y e a r s . D r . D. S m i t h and M.J. Ahmed a r e g r a t e f u l l y a c k n o w l e d g e d f o r t h e i r c o n t i n u e d s u p p o r t and a d v i c e . D.P. Dean i s t h a n k e d f o r h i s s m a l l , but v e r y i m p o r t a n t c o n t r i b u t i o n t o t h e t i m e l y c o m p l e t i o n of t h i s work. Dr. J . B l a c h u t i s t h a n k e d f o r t h e t i m e and e f f o r t he p ut i n t o t h e t e c h n i c a l and c l i n i c a l t r i a l s of t h e p r o t o t y p e DPM. F i n a l l y , t h e N a t u r a l S c i e n c e s and E n g i n e e r i n g R e s e a r c h C o u n c i l i s g r a t e f u l l y a c k n o w l e d g e d f o r t h e i r f i n a n c i a l s u p p o r t . 1 CHAPTER 1  INTRODUCTION 1.1 An A n e s t h e t i c I n c i d e n t The F e b r u a r y 10, 1981 e d i t i o n o f t h e V a n c o u v e r m o r n i n g newspaper, The P r o v i n c e , c o n t a i n e d a s t o r y e n t i t l e d "Oxygen Hose F a i l s , Y o u t h D i e s " 1 , i n w h i c h d e t a i l s of t h e d e a t h o f a young s u r g i c a l p a t i e n t a t t h e V a n c o u v e r G e n e r a l H o s p i t a l were p r e s e n t e d . T h i s y o u t h d i e d , not of t h e i n j u r i e s he had s u s t a i n e d i n an e a r l i e r a u t o m o b i l e a c c i d e n t , but r a t h e r as a r e s u l t of a m e c h a n i c a l f a i l u r e i n t h e t h e s y s t e m t h a t was s u p p o r t i n g h i s r e s p i r a t i o n d u r i n g t h e e n s u i n g s u r g e r y . [28] T h i s was u n f o r t u n a t e l y not an i s o l a t e d i n c i d e n t . F a i l u r e s s u c h as t h e s e have been i d e n t i f i e d as t h e s i n g l e most common t y p e o f p r e v e n t a b l e a n e s t h e t i c m i s h a p . [1] A l t h o u g h o n l y a s m a l l p e r c e n t a g e o f t h e s e f a i l u r e s have s u c h s e r i o u s c o n s e q u e n c e s , t h e m a j o r i t y c o u l d be p r e v e n t e d by t h e use of more c o m p r e h e n s i v e r e s p i r a t o r y m o n i t o r i n g d e v i c e s and t e c h n i q u e s . One s u c h d e v i c e i s t h e d i s c o n n e c t / p r e s s u r e m o n i t o r (DPM), wh i c h m o n i t o r s t h e b r e a t h i n g c i r c u i t p r e s s u r e waveform, and a l a r m s when h a z a r d o u s c o n d i t i o n s a r e d e t e c t e d . However,, d e s p i t e t h e p r e s e n c e of a DPM i n t h e above n o t e d i n c i d e n t , t h e h a z a r d o u s c o n d i t i o n r e m a i n e d u n d e t e c t e d , l e a d i n g u l t i m a t e l y t o a p a t i e n t f a t a l i t y . I t i s t o w a r d s t h e improvement of t h e s e m o n i t o r s t h a t 1Tom Koch, "Oxygen Hose F a i l s , Y o u t h D i e s " , The P r o v i n c e , p A6, 10 F e b r u a r y 1981 2 t h i s t h e s i s i s d i r e c t e d . 1.2 A n e s t h e t i c I n c i d e n t s i n Review A n e s t h e t i c l i t e r a t u r e f r e q u e n t l y c a r r i e s r e p o r t s of m a l f u n c t i o n s of b r e a t h i n g m a c h i n e s , or v e n t i l a t o r s , as t h e y a r e more commonly c a l l e d . The p a t i e n t s i n v o l v e d u s u a l l y s u f f e r some form of a d v e r s e c o n s e q u e n c e , r a n g i n g from h y p o x i a ( i n s u f f i c i e n t b l o o d oxygen) t o c a r d i a c a r r e s t , and o c c a s i o n a l l y d e a t h . Numerous r e c e n t s t u d i e s ( [ 1 ] - [ 4 ] ) have a t t e m p t e d t o d e t e r m i n e t h e c a u s e o f t h e s e f r e q u e n t m e c h a n i c a l f a i l u r e s , and have a r r i v e d a l m o s t u n i f o r m l y a t t h e c o n c l u s i o n t h a t machine d e s i g n and human e r r o r have been r e s p o n s i b l e . Most have f u r t h e r c o n c l u d e d t h a t t h e m a j o r i t y of t h e s e i n c i d e n t s c o u l d have been p r e v e n t e d w i t h t h e use o f a d e q u a t e m o n i t o r i n g t e c h n i q u e s . By f a r t h e most f r e q u e n t l y o c c u r r i n g o f t h e s e m e c h a n i c a l f a i l u r e s has been f o u n d t o be b r e a t h i n g c i r c u i t d i s c o n n e c t i o n s . The f r e q u e n c y of s u c h i n c i d e n t s i s due l a r g e l y t o t h e l o o s e c o u p l i n g w h i c h e x i s t s between t h e h o s i n g segments w h i c h c o m p r i s e p o r t i o n s o f t h e b r e a t h i n g c i r c u i t . T i g h t e r c o u p l i n g s have been s u g g e s t e d [ 5 ] , but t h e l o o s e c o u p l i n g s have been r e t a i n e d by t h e t h e m e d i c a l i n s t i t u t i o n as a means of p r o t e c t i n g t h e c i r c u i t p a t i e n t i n t e r f a c e , a t u b e p l a c e d t h r o u g h t h e p a t i e n t ' s mouth i n t o t h e t r a c h e a . T h i s e n d o t r a c h e a l t u b e i s f r e q u e n t l y d i f f i c u l t t o i n s e r t , and so i t i s f e l t t h a t i n t i m e s o f sudden m e c h a n i c a l s t r e s s , i t i s p r e f e r r a b l e t o have t h e c i r c u i t become d i s c o n n e c t e d from t h e p a t i e n t , r a t h e r t h a n have t h e p a t i e n t e x t u b a t e d , a c o n d i t i o n w h i c h may n o t be e a s i l y c o r r e c t a b l e . 3 The r e s p e c t e d Emergency C a r e R e s e a r c h I n s t i t u t e ( E C R I ) , a non p r o f i t o r g a n i z a t i o n w h i c h p e r f o r m s t e c h n i c a l e v a l u a t i o n s of m e d i c a l d e v i c e s , r e c e n t l y r e p o r t e d a s t u d y of t h r e e h o s p i t a l s , i n w h i c h b r e a t h i n g c i r c u i t d i s c o n n e c t i o n s were r e s p o n s i b l e f o r 8%, 9%, and 15% of a l l a n e s t h e s i a m i s h a p s . [ 6 ] C o o p e r e t a l [ 1 ] , i n a s t u d y c o v e r i n g a t h r e e y e a r p e r i o d , r e p o r t e d 3 9 4 a n e s t h e t i c i n c i d e n t s , 2 0 of w h i c h were b r e a t h i n g c i r c u i t d i s c o n n e c t i o n s . Ten o f t h e s e r e s u l t e d i n s e r i o u s c o n s e q u e n c e s f o r t h e p a t i e n t s i n v o l v e d ; i n two of t h e 10 c a s e s , d e a t h . S t u d i e s d e a l i n g s o l e l y w i t h d e a t h s as a r e s u l t of s u r g i c a l a n e s t h e s i a ( [ 2 ] - [ 4 ] ) have r e p o r t e d i n c i d e n c e r a t e s as h i g h as 0 . 5 9 p e r 1 0 0 0 a n e s t h e t i c s , and as low as 0 . 0 7 p e r 1 0 0 0 a n e s t h e t i c s . T h e s e i n c i d e n c e r a t e s show t h a t t h e r e e x i s t s much room f o r improvement i n t h e q u a l i t y of a n e s t h e t i c c a r e . T o t a l e l i m i n a t i o n of a n e s t h e t i c r e l a t e d d e a t h may n e v e r be a c h i e v e d , but t h e p r e s e n t s i t u a t i o n can be i m p r o v e d by t h e i m p l e m e n t a t i o n o f more c o m p r e h e n s i v e m o n i t o r i n g methods. A m o n i t o r c a p a b l e of d i a g n o s i n g most, i f n o t a l l , of t h e m e c h a n i c a l f a u l t s w h i c h f r e q u e n t l y o c c u r w i t h i n t h e p a t i e n t v e n t i l a t o r s y s t e m would be a m a j o r s t e p f o r w a r d i n a n e s t h e t i c s a f e t y . 4 CHAPTER 2  VENTILATION AND MONITORING 2.1 Mechanical V e n t i l a t i o n P r i o r to surgery, p a t i e n t s are f r e q u e n t l y given a muscle re l a x a n t and are, as a r e s u l t , unable to breath without the a s s i s t a n c e of a mechanical v e n t i l a t o r . - These v e n t i l a t o r s p e r i o d i c a l l y move a known volume of gas i n t o and out of the p a t i e n t ' s lungs, through a system of f l e x i b l e hosing which connects the p a t i e n t to the machine. Such machines are c l a s s i f i e d as volume c y c l e d , as c y c l i n g i s based upon the volume of gas which i s d e l i v e r e d to the p a t i e n t . V e n t i l a t o r s which c y c l e a f t e r a preset pressure has been achieved, or a f t e r a preset time has elapsed, are a l s o i n use, although they are not so common as the volume c y c l e d type. Such machines may be c l a s s i f i e d as pressure c y c l e d and time c y c l e d , r e s p e c t i v e l y . A v e n t i l a t o r , f r e s h gas supply, t u b i n g , and p a t i e n t together form a complete breathing c i r c u i t , through which gas i s moved i n t o a p a t i e n t ' s lungs, h e l d there f o r a p e r i o d of time, and then e x p e l l e d by e l a s t i c c o n t r a c t i o n of the c h e s t . T h i s e x p e l l e d gas i s passed through a carbon d i o x i d e (C0 2 ) absorber, augmented with f r e s h gas c o n t a i n i n g a n e s t h e t i c agent, and moved back i n t o the p a t i e n t ' s lungs. T h i s e n t i r e process c o n s t i t u t e s one r e s p i r a t o r y c y c l e . Breathing c i r c u i t s may be c o n f i g u r e d i n a v a r i e t y of ways, the commonest of which i s the " c i r c l e sytem", shown s c h e m a t i c a l l y in F i g u r e 2.1 _ . T h i s c i r c u i t c o n s i s t s of a Figure 2.1 The Circle Breathing System 6 v e n t i l a t o r , whose b e l l o w s c o n t a i n s t h e v o l u m e t o be d e l i v e r e d t o t h e p a t i e n t , s o u r c e s o f o x y g e n , n i t r o u s o x i d e , a n d a n e s t h e t i c a g e n t , w h i c h t o g e t h e r f o r m t h e " f r e s h g a s " s u p p l y , a v a p o r i z e r , w h i c h i n j e c t s t h e a n e s t h e t i c a g e n t i n t o t h e g a s s u p p l y , a c a r b o n d i o x i d e a b s o r b e r , t o remove e x p i r e d C0 2, and f i n a l l y , a p a t i e n t . The e n t i r e s y s t e m i s c o n n e c t e d t o g e t h e r by a s e r i e s of h o s e s a n d one way v a l v e s , and i s c o m p l e t e l y m e c h a n i c a l , r e c e i v i n g i t s d r i v i n g power f r o m a h i g h p r e s s u r e g a s s u p p l y , w h i c h i s c o n t r o l l e d s u c h t h a t i t p e r i o d i c a l l y c o m p r e s s e s t h e b e l l o w s , d e l i v e r i n g gas t o t h e p a t i e n t . F i g u r e 2.2 shows a w i d e l y u s e d v e n t i l a t o r , t h e D r a g e r AV. ( T e c h n i c a l i n f o r m a t i o n oh t h i s v e n t i l a t o r i s a v a i l a b l e i n [7].) B r e a t h i n g c i r c u i t s a r e p r o n e t o many m e c h a n i c a l f a u l t s , o f w h i c h t h e most commmon i s t h e p r e v i o u s l y m e n t i o n e d d i s c o n n e c t i o n o f b r e a t h i n g c i r c u i t h o s e s , f r e q u e n t l y a t t h e e n d o t r a c h e a l t u b e . O t h e r " f r e q u e n t " e v e n t s i n c l u d e d i s c o n n e c t i o n s o r o c c l u s i o n s o f t h e f r e s h gas s u p p l y , o c c l u s i o n s of t h e e n d o t r a c h e a l t u b e , f a i l u r e s o f t h e v a r i o u s one way v a l v e s w h i c h c o n t r o l t h e f l o w o f g a s w i t h i n t h e c i r c u i t , and d i s c o n n e c t i o n s a t t h e v a p o r i z e r . A l s o w a r r a n t i n g m e n t i o n a r e d i s c o n n e c t i o n s o f t h e e n d o t r a c h e a l t u b e where t h e d i s c o n n e c t e d t u b e comes t o r e s t upon s u r g i c a l s h e e t s o r p i l l o w s , c r e a t i n g f l o w r e s i s t a n c e , a n d h e n c e , b a c k p r e s s u r e . B e c a u s e t h e human r e s p i r a t o r y t r a c t o f f e r s r e s i s t a n c e t o t h e f l o w o f g a s , and b e c a u s e t h e c h e s t a n d l u n g s behave much l i k e an e l a s t i c c o n t a i n e r , a i r w a y p r e s s u r e r i s e s a nd f a l l s a s gas i s moved i n t o a n d o u t o f a p a t i e n t ' s l u n g s . The p r e s s u r e w a v e f o r m s w h i c h r e s u l t i f t h e i n s t a n t a n e o u s p r e s s u r e i s t r a c e d F i g u r e 2.2 The Drager AV V e n t i l a t o r 8 as a f u n c t i o n of time a r e q u i t e r e g u l a r and r e p e t i t i v e , and have a maximum b a n d w i d t h of a p p r o x i m a t e l y 10 Hz. The e x a c t shape of t h e s e waveforms i s h e a v i l y d e p e n d e n t on b o t h t h e p a t i e n t and t h e v e n t i l a t o r i n u s e , but c e r t i a n e l e m e n t s a r e common t o a l l . C o n s i d e r F i g u r e 2.3, a c a s e r e c o r d e d d u r i n g non-pulmonary e l e c t i v e s u r g e r y . The r e s p i r a t o r y c y c l e b e g i n s w i t h t h e d e l i v e r y o f a volume of gas t o t h e p a t i e n t ' s l u n g s , c h a r a c t e r i z e d by a r a p i d r i s e i n t h e s y s t e m p r e s s u r e . T h i s i n s p i r a t o r y p e r i o d i s f o l l o w e d by an i n s p i r a t o r y p a u s e , r e s u l t i n g i n a p r e s s u r e p l a t e a u . T h i s pause i s f o l l o w e d by e x p i r a t i o n of t h e gas from t h e l u n g s , c h a r a c t e r i z e d by a s h a r p f a l l i n s y s t e m p r e s s u r e , and t h e n an e x p i r a t o r y p a u s e , w h i c h p r e c e d e s t h e s t a r t of t h e n e x t c y c l e . V e n t i l a t o r s a l l o w many o f t h e f e a t u r e s o f t h e r e s p i r a t o r y waveform t o be d i r e c t l y o r i n d i r e c t l y c o n t r o l l e d . T h e s e i n c l u d e t h e peak p r e s s u r e , w h i c h may be c o n t r o l l e d by a d j u s t i n g t h e b r e a t h t o b r e a t h volume ( t h e " t i d a l volume") o r t h e f r e s h gas f l o w r a t e , t h e b r e a t h i n g f r e q u e n c y ( c a l i b r a t e d i n B r e a t h s P er M i n u t e , BPM), w h i c h may be d i r e c t l y c o n t r o l l e d , and i n some c a s e s , t h e r a t i o of t h e i n s p i r a t o r y t i m e p l u s pause t o t h e e x p i r a t o r y t i m e p l u s p a u s e . T h i s i n s p i r a t o r y / e x p i r a t o r y r a t i o , o r more s i m p l y , I/E r a t i o , i s f r e q u e n t l y f i x e d a t 1:2, and f o r p h y s i o l o g i c r e a s o n s , r a r e l y e x c e e d s 1:1. F i n a l l y , t h e i n s p i r a t o r y p r e s s u r e g r a d i e n t may be c o n t r o l l e d by a d j u s t m e n t of t h e i n s p i r a t o r y f l o w r a t e , w h i c h d e t e r m i n e s t h e r a t e o f f l o w w i t h w h i c h t h e d e s i r e d t i d a l volume i s d e l i v e r e d t o t h e p a t i e n t . O p t i o n a l l y , t h e end e x p i r a t o r y p r e s s u r e ( e s s e n t i a l l y , t h e DC o f f s e t o f t h e waveform) may be c o n t r o l l e d by t h e p l a c e m e n t of a 9 28 inspiratory peak pressure gradient / 1 A—1 J '1 end expire / J '\ pressures^ / 1 i \ • 5 i i 1 SEC io 15 —* insp 1 exp J period J period i <—waveform period—»i Figure 2.3 A Non Fault Breathing Circuit Pressure Waveform 10 P o s i t i v e End E x p i r a t o r y P r e s s u r e (PEEP) v a l v e i n t h e e x p i r a t o r y l i m b of t h e b r e a t h i n g c i r c u i t . (PEEP l e v e l s , w h i c h r a r e l y e x c e e d 10 cmH 20, a r e o f t e n d e s i r a b l e t o p r e v e n t t h e c o l l a p s e o f d i s e a s e d o r damaged l u n g s e c t i o n s . ) Peak p r e s s u r e s g e n e r a t e d d u r i n g m e c h a n i c a l v e n t i l a t i o n v a r y between 5 and 50 cmH 20, d e p e n d i n g upon t h e t i d a l volume, f r e q u e n c y , and t h e p a t i e n t ' s m e c h a n i c a l c h a r a c t e r i s t i c s ; minimum p r e s s u r e s t y p i c a l l y l i e nea r a t m o s p h e r i c , r a r e l y becoming subambient d u r i n g n o r m a l o p e r a t i o n . B r e a t h i n g f r e q u e n c i e s a r e n o r m a l l y i n t h e range 10 t o 30 BPM. 2.2 D i s c o n n e c t / P r e s s u r e M o n i t o r i n g The f r e q u e n c y of b r e a t h i n g c i r c u i t d i s c o n n e c t i o n s has l e d t o t h e a v a i l a b i l i t y of a l a r g e number o f d i s c o n n e c t / p r e s s u r e m o n i t o r s , most of w h i c h a r e b a t t e r y powered, and o p e r a t e on a s i m p l e t i m i n g p r i n c i p l e . T y p i c a l l y , t h e s e d e v i c e s c o n s i s t of one or more p r e s s u r e a c t u a t e d e l e c t r i c a l s w i t c h e s c o u p l e d t o some form of d e l a y t i m e r , and a u d i o and v i s u a l a l a r m s . . A i r w a y p r e s s u r e s above t h e t h r e s h o l d of t h e p r e s s u r e s w i t c h t r i g g e r t h e t i m i n g c i r c u i t , w h i c h must be r e t r i g g e r e d w i t h i n some p r e d e t e r m i n e d p e r i o d of time' ( f r e q u e n t l y , 15 s e c o n d s ) t o a v o i d a l a r m s . I f t h i s does not o c c u r , t h e a l a r m c i r c u i t s a r e engaged, and w i l l c o n t i n u e t o p r o v i d e a l a r m s u n t i l t h e p r e s s u r e s w i t c h i s r e s e t . R e c e n t e n t r i e s i n t o t h e DPM ma r k e t i n c o r p o r a t e s e p a r a t e PEEP and h i g h p r e s s u r e a l a r m s , a s w e l l a s subambient p r e s s u r e a l a r m s and m a n u a l l y o p e r a b l e a l a r m s u p p r e s s i o n s w i t c h s , w h i c h 11 p r o v i d e f r o m 30 s e c o n d s t o 2 m i n u t e s of a l a r m s u p p r e s s i o n , ( d e p e n d i n g on t h e m a n u f a c t u r e r ) a f t e r w hich a l a r m s w i l l c o n t i n u e i f t h e u n d e r l y i n g c a u s e has n o t been c o r r e c t e d . [ 6 ] , [8] The t i m e d r e s e t a p p r o a c h a d o p t e d by most DPMs p r e v e n t s them from a l a r m i n g d u r i n g a v a r i e t y of commonly o c c u r r i n g p r o b l e m s , as any a b n o r m a l c o n d i t i o n p r o d u c i n g a p e r i o d i c s y s t e m p r e s s u r e r i s e w i l l r e t r i g g e r t h e t i m e r . Among s u c h c o n d i t i o n s a r e o c c l u s i o n s o f t h e e n d o t r a c h e a l t u b e , d i s c o n n e c t i o n s of t h e e n d o t r a c h e a l t u b e i n v o l v i n g f l o w r e s i s t a n c e s , v a p o r i z e r d i s c o n n e c t i o n s , and s m a l l c i r c u i t l e a k s . DPMs s u f f e r two o t h e r m a j o r p r o b l e m s . The f i r s t of t h e s e , r e s u l t i n g d i r e c t l y from t h e t i m e d r e s e t a p p r o a c h , i s t h e f a i l u r e o f t h e s e d e v i c e s t o d e t e c t a c c i d e n t a l c h a n g e s i n v e n t i l a t i o n p a r a m e t e r s . Such c h a n g e s c a n o c c u r as a r e s u l t o f i n s u f f i c i e n t c o n s i d e r a t i o n of human f a c t o r s p r i n c i p l e s d u r i n g t h e d e s i g n of v e n t i l a t o r c o n t r o l s [ 1 ] , and have t h e p o t e n t i a l t o be j u s t a s d a n g e r o u s as m e c h a n i c a l f a u l t s . The s e c o n d of t h e s e p r o b l e m s i n v o l v e s t h e n e c e s s i t y f o r manual a c t i v a t i o n of most DPMs. T h i s has l e d t o o c c a s i o n a l i n c i d e n t s i n w h i c h d i s c o n n e c t m o n i t o r s have not even been t u r n e d on, r e n d e r i n g them u n a b l e t o f u l f i l t h e i r f u n c t i o n . P r o b l e m s s u c h a s t h e s e l e d t h e ECRI t o c o n c l u d e , i n a r e c e n t s t u d y of s e v e r a l c o m m e r c i a l l y a v a i l a b l e DPMs, t h a t a l l o f t h e u n i t s t e s t e d were l e s s t h a n c o m p l e t e l y a d e q u a t e f o r t h e t a s k o f d i s c o n n e c t m o n i t o r i n g . The newest of t h e u n i t s t e s t e d , t h e D r a g e r DPM-S, e x h i b i t e d t h e b e s t p e r f o r m a n c e , as a r e s u l t of i t s s e p e r a t e low and h i g h p r e s s u r e a l a r m s , but was s t i l l u n a b l e t o d e t e c t d i s c o n n e c t i o n s i n v o l v i n g f l o w r e s i s t a n c e s . [6] 12 2.3 Towards a New DPM The d e f i c i e n c i e s o u t l i n e d above, as w e l l a s c o n c e r n s f o r t h e c o m p l e x i t y o f o p e r a t i o n o f many DPMs, have l e d t o numerous e f f o r t s t o improve t h i s d e v i c e . Cooper e t a l [9] d e s c r i b e s n ot j u s t a new m o n i t o r , b u t a t o t a l l y new a n e s t h e s i a d e l i v e r y s y s t e m , w h i c h i n c o r p o r a t e s an i n t e g r a l d i s c o n n e c t m o n i t o r . ( S u p r i s i n g l y , few o f t h e m a j o r v e n t i l a t o r m a n u f a c t u r e r s even p r o v i d e DPMs w i t h t h e i r p r o d u c t s . In a 1979 s u r v e y of s i x w i d e l y u s e d v e n t i l a t o r s , t h e ECRI f o u n d t h a t o n l y two even i n c l u d e d d i s c o n n e c t monitors., and t h a t o n l y one of t h e s e two was a d e q u a t e . [ 1 0 ] ) C o o p e r ' s p r o t o t y p e machine i s q u i t e a d v a n c e d i n many r e s p e c t s , b u t i t s d i s c o n n e c t m o n i t o r i n g a p p e a r s t o be q u i t e s i m p l i s t i c , p r o d u c i n g a l a r m s o n l y i f a c y c l e i s n o t d e t e c t e d w i t h i n any 30 s e c o n d i n t e r v a l . F o r e s t and Lamarche [11] d e s c r i b e a m o n i t o r w h i c h w i l l a l a r m n o t o n l y a t t h e a b s e n c e o f s u f f i c i e n t p e r i o d i c p r e s s u r e , b u t a l s o a t t h e o c c u r r e n c e o f u n u s u a l l y h i g h o r u n u s u a l l y low p r e s s u r e s . T h i s machine r e c o g n i z e s h i g h and low p r e s s u r e s as t h o s e p r e s s u r e s w h i c h l i e above o r below two i n t e r n a l l y p r e s e t t h r e s h o l d s , t h e l o w e r o f w h i c h may be a d j u s t e d upwards t o a l l o w o p e r a t i o n w i t h PEEP. T h e s e t h r e s h o l d s , b e i n g s u f f i c i e n t l y g e n e r a l t o accommodate most p a t i e n t s w i l l u n f o r t u n a t e l y a l s o accommodate most f a u l t s r e s u l t i n g i n a p e r i o d i c p r e s s u r e r i s e , a s w e l l a s most a d j u s t m e n t s of v e n t i l a t o r y p a r a m e t e r s . T h i s d e v i c e must be m a n u a l l y a c t i v a t e d , and r e q u i r e s a f a i r d e a l of immediate a t t e n t i o n f o l l o w i n g a c t i v a t i o n . In an a t t e m p t t o do away w i t h t h e p r o l i f e r a t i o n of c o n t r o l s 1 3 w h i c h has l e d some n u r s i n g p e r s o n n e l t o r e j e c t or m i s u s e DPMs, F o d o r e t a l [12] d e v e l o p e d a c o m p l e t e l y c o n t r o l f r e e a l a r m , w h i c h a c t i v a t e s a u t o m a t i c a l l y when p r e s s u r e i s a p p l i e d . To a c h i e v e i t s l a c k of c o n t r o l s , t h i s a l a r m u t i l i z e s two i n t e r n a l l y p r e s e t t h r e s h o l d s , a l a r m i n g i f t h e r e i s a f a i l u r e t o e x c e e d t h e h i g h t h r e s h o l d w i t h i n any 20 s e c o n d i n t e r v a l , o r i f t h e r e i s a f a i l u r e t o d r o p below t h e low t h r e s h o l d i n t h e same p e r i o d o f t i m e . B e c a use .the low t h r e s h o l d i s o n l y 2 cmH 20 below t h e h i g h t h r e s h o l d , t h i s u n i t i s u n a f f e c t e d by PEEP. The a p p r o a c h i s an i n t e r e s t i n g v a r i a n t on t i m e d r e s e t , b u t t h e l a c k of f l e x i b i l i t y i t s u f f e r s as a r e s u l t of i t s f i x e d t h r e s h o l d s l e a v e s i t v u l n e r a b l e t o many of t h e p r o b l e m s p r e v i o u s l y d e t a i l e d f o r t h i s t y p e o f DPM. A n o t h e r c o n t r o l f r e e v e n t i l a t o r a l a r m i s d e s c r i b e d by B a r n e t t and Koeze [ 1 3 ] , T h i s a l a r m i s not o n l y c o n t r o l f r e e , b u t a l s o s o l v e s a p r e s s i n g p r o b l e m w i t h many DPMs: f a i l u r e t o o p e r a t e p r o p e r l y due t o u n d i a g n o s e d b a t t e r y f a i l u r e [ 1 4 ] , B a r n e t t and Koeze s o l v e d t h i s p r o b l e m by d e v e l o p i n g a DPM whose b a t t e r i e s a r e r e c h a r g e d by a s o l a r c e l l , o p e r a b l e under ambient room l i g h t i n g . T h i s a l a r m f e a t u r e s a u t o m a t i c a c t i v a t i o n upon o c c u r r e n c e o f s y s t e m p r e s s u r e p u l s e s , and h i g h and low p r e s s u r e c h e c k s a g a i n s t i n t e r n a l l y p r e s e t t h r e s h o l d s . W h i l e ' an i n t e r e s t i n g d e v i c e , t h i s a l a r m has i t s v e r s a t i l i t y l i m i t e d by t h e p r o b l e m s i n h e r e n t w i t h p r e s e t t h r e s h o l d s . S enczuk e t a l [15] a t t e m p t e d t o s o l v e t h e p r o b l e m o f p r e s e t l o w e r t h r e s h o l d s , i n as much as t h e y a f f e c t d e v i c e o p e r a t i o n i n t h e p r e s e n c e of PEEP, by u t i l i z i n g a p r e s s u r e t r a n s d u c e r i n a s e n s i n g s y s t e m t h a t r e s p o n d s o n l y t o c h a n g e s i n p r e s s u r e , r a t h e r 14 t h a n t o l e v e l s of p r e s s u r e . T h i s u n i t does away w i t h a manual o n / o f f s w i t c h , and has a w ater t r a p t o p r e v e n t a l t e r a t i o n of t h e t r a n s d u c e r ' s s e n s i t i v i t y as a r e s u l t of c o n d e n s a t i o n from th e e x p i r e d g a s e s . D e s p i t e t h e s e improvements, t h e d e v i c e u s e s t h e t i m e d r e s e t p r i n c i p l e , w i t h a l l of t h e s h o r t c o m i n g s t h i s i n t r o d u c e s . 2.4 The New G e n e r a t i o n A l l o f t h e above d e v i c e s r e p r e s e n t v a l i d a t t e m p t s t o improve t h e DPM. N o n e t h e l e s s , a l l of t h e s e a u t h o r s have c o n t i n u e d t o base t h e i r d e s i g n s on t h e p r i n c i p l e t h a t a p e r i o d i c s y s t e m p r e s s u r e r i s e i s an i n d i c a t i o n t h a t t h e p a t i e n t i s b e i n g c o r r e c t l y v e n t i l a t e d . As has been p o i n t e d o u t , t h i s i s s i m p l y n o t s o . To r e p r e s e n t a s u b s t a n t i a l improvement o v e r p r e s e n t DPMs, a new g e n e r a t i o n d e v i c e must be b a s e d on p r i n c i p l e s o t h e r t h a n t i m e d r e s e t ; p r i n c i p l e s w h i c h a l l o w i t t o meet t h e f o l l o w i n g r e q u i r e m e n t s : [27] 1. I t must be c a p a b l e of d e t e c t i n g a l l commonly o c c u r r i n g d i s c o n n e c t i o n s . 2. I t must be a b l e t o d e t e c t c h a n g e s i n v e n t i l a t o r y p a r a m e t e r s . 3. I t must p r o d u c e few t o no f a l s e p o s i t i v e a l a r m s . 4. I t must be e x t r e m e l y e a s y t o u s e , r e q u i r i n g a minimum of s e t u p , c a l i b r a t i o n , and s u b s e q u e n t o p e r a t o r a t t e n t i o n . 5. I t must be a b l e t o a d a p t t o v a r i o u s p r e s s u r e waveforms, e l i m i n a t i n g p r e s e t o r o p e r a t o r a d j u s t e d t h r e s h o l d s . 6. I t must be s u f f i c i e n t l y u n i v e r s a l t o a l l o w i t s a p p l i c a t i o n t o b r e a t h i n g c i r c u i t s i n v o l v i n g any t y p e o f v e n t i l a t o r . 15 7. I t s h o u l d a c t i v a t e a u t o m a t i c a l l y when t h e v e n t i l a t o r i s t u r n e d on. 8. I t must be a b l e t o d e t e c t i n t e r n a l m a l f u n c t i o n s , and p r o d u c e e x t e r n a l a l a r m s t o warn o f t h e same. 9. I t s h o u l d be b a t t e r y powered, t o a l l o w p a r t f o r p a r t r e p l a c e m e n t w i t h p r e s e n t DPMs. To a c h i e v e t h e s e g o a l s , a new g e n e r a t i o n DPM w i l l have t o overcome t h e most p r o m i n e n t f a i l u r e of p r e v i o u s d e v i c e s o f t h i s t y p e ; t h e i r f a i l u r e t o a d d r e s s t h e i s s u e of waveform shape. E x a m i n a t i o n o f waveforms r e c o r d e d under s i m u l a t e d f a u l t c o n d i t i o n s show s i g n i f i c a n t d e v i a t i o n s from t h e non f a u l t w aveforms. T h i s i s i l l u s t r a t e d i n F i g u r e 2.4, w h i c h shows a non f a u l t waveform, and two s i m u l a t e d f a u l t waveforms. R e c o g n i z i n g t h i s , t h e B i o m e d i c a l E n g i n e e r i n g D e p a r t m e n t of t h e V a n c o u v e r G e n e r a l H o s p i t a l (VGH) p r o p o s e d , i n e a r l y 1980, a " s m a r t " DPM, b a s e d on a low power m i c r o p r o c e s s o r , w h i c h would memorize t h e shape o f a " n o r m a l " waveform, and t h e n compare a l l i n c o m i n g waveforms t o t h i s n o r m a l , a l a r m i n g i f t h e r e was a s i g n i f i c a n t d e v i a t i o n . [16] T h i s i n i t i a t i v e l e d , i n t h e summer of 1980, t o t h e d e v e l o p m e n t o f a f i r s t p r o t o t y p e , b a s e d on t h e I n t e l 8085 p r o c e s s o r . T h i s d e v i c e t r a n s d u c e d t h e p r e s s u r e waveform w i t h a s e r i e s of c a l i b r a t e d p r e s s u r e s w i t c h e s , and was a b l e t o d e t e c t a b n o r m a l l y h i g h p r e s s u r e , n e g a t i v e p r e s s u r e , l a c k of p r e s s u r e , and c h a n g e s i n t h e I/E r a t i o . [ 1 7 ] , [18] T h i s DPM was an improvement o v e r p r e v i o u s m o d e l s , but f e l l s h o r t o f t h e o r i g i n a l g o a l , o n l y p a r t i a l l y a c c o u n t i n g f o r t h e shape o f t h e waveform, and i n c l u d i n g a number of s o f t w a r e p r e s e t t h r e s h o l d s Figure 2.4 Non Fault (A) and Fault (B and C) Pressure Waveforms 1 7 w h i c h l i m i t e d i t s g e n e r a l i t y . The p r e s e n t work began i n p a r a l l e l w i t h work on t h e f i r s t p r o t o t y p e , and i n c l u d e d t h e d e v e l o p m e n t of s o f t w a r e waveform a n a l y s i s t o o l s , an i n v e s t i g a t i o n of s e v e r a l p a t t e r n r e c o g n i t i o n t e c h n i q u e s , and c l i n i c a l d a t a c o l l e c t i o n t o s u p p o r t a l g o r i t h m d e v e l o p m e n t . T h i s e f f o r t has r e s u l t e d i n t h e d e v e l o p m e n t of an a l g o r i t h m f o r e f f e c t i v e d i s c o n n e c t / p r e s s u r e m o n i t o r i n g , a s e l f m o n i t o r i n g hardware d e s i g n , and i m p l e m e n t a t i o n o f b o t h f o r t h e I n t e l 8085 p r o c e s s o r . The hardware i m p l e m e n t a t i o n , a s s e m b l e d on an I n t e l System Development K i t 85 (SDK85), i s c o n s i d e r e d t o be a t e s t i n g e n v i r o m e n t f o r t h e d e v e l o p e d a l g o r i t h m and m o n i t o r i n g h a r d w a r e , and as s u c h , does not meeet a l l o f t h e p r e v i o u s l y s t a t e d r e q u i r e m e n t s of a new g e n e r a t i o n DPM. In p a r t i c u l a r , t h e p r o c e s s o r and a s s o c i a t e d s u p p o r t p e r i p h e r a l s a r e n o t low power components, as would be d e s i r e a b l e f o r a b a t t e r y o p e r a t e d d e v i c e . The u n i t i s , i n f a c t , powered by l i n e v o l t a g e , and has a d i s c r e t e o n / o f f s w i t c h . I t i t e x p e c t e d t h a t t h i s p r o t o t y p e w i l l be m o d i f i e d a s c l i n i c a l and t e c h n i c a l t r i a l s show n e c e s s a r y ( s e e C h a p t e r 7 ) , and r e a s s e m b l e d u s i n g low power e q u i v a l e n t components, w h i c h a r e j u s t now becoming a v a i l a b l e . 2.5 Summary B a c k g r o u n d i n f o r m a t i o n on m e c h a n i c a l v e n t i l a t i o n and d i s c o n n e c t m o n i t o r i n g has been p r e s e n t e d . C u r r e n t DPMs have been examined and f o u n d t o be i n s u f f i c i e n t f o r t h e t a s k o f d i s c o n n e c t m o n i t o r i n g . E f f o r t s t o improve t h e DPM have been d e t a i l e d , and 18 each has been found to be i n s u f f i c i e n t due.to lack of waveform shape c o n s i d e r a t i o n . F i n a l l y , s p e c i f i c goals f o r a new DPM have been i d e n t i f i e d . 19 CHAPTER 3  METHODOLOGY 3. 1 I n t r o d u c t i o n I t has been seen t h a t m e c h a n i c a l f a u l t s w i t h i n t h e p a t i e n t v e n t i l a t o r s y s t e m i n t r o d u c e s u b s t a n t i a l d e v i a t i o n s i n t o t h e s y s t e m ' s p r e s s u r e waveform. E f f e c t i v e d i s c o n n e c t m o n i t o r i n g may t h e r e f o r e be implemented by any t e c h n i q u e c a p a b l e o f r e c o g n i z i n g t h a t t h e p r e s e n t l y o b s e r v e d p r e s s u r e p a t t e r n d o e s n o t c l o s e l y match a p r e d e f i n e d non f a u l t p a t t e r n , or t h a t i t does c l o s e l y match a p r e d e f i n e d f a u l t p a t t e r n , o r b o t h . D i s c o n n e c t m o n i t o r i n g i s , t h e n , a p a t t e r n r e c o g n i t i o n t a s k , w h i c h must r e c o g n i z e e i t h e r a non f a u l t p a t t e r n , o r one of a s e r i e s o f f a u l t p a t t e r n s . 3.2 A P a t t e r n R e c o g n i t i o n A p p r o a c h An i d e a l d i s c o n n e c t m o n i t o r s h o u l d be a b l e n ot o n l y t o d e t e c t c i r c u i t f a u l t s , but a l s o t o d i a g n o s e t h e e x a c t n a t u r e of t h e s e f a u l t s . The waveforms p r e s e n t e d i n C h a p t e r 2 s u g g e s t t h a t e a c h of t h e commonly o c c u r r i n g d i s c o n n e c t s has a d i s t i n c t i v e p a t t e r n . I t mi g h t t h e r e f o r e be i n f e r r e d t h a t t h e s e p a t t e r n s c o u l d be p r o f i t a b l y u s e d w i t h any number of p a t t e r n r e c o g n i t i o n t e c h n i q u e s t o r e a l i z e an i d e a l DPM. T h i s u n f o r t u n a t e l y i s n o t t h e c a s e . C o n s i d e r F i g u r e s 3.1 -3.3. A l l a r e r e c o r d i n g s o f n o r m a l c o n d i t i o n s i n b r e a t h i n g c i r c u i t s , and y e t e a c h i s v a s t l y d i f f e r e n t from t h e o t h e r s . The c h a r a c t e r i s t i c s of d i f f e r e n t v e n t i l a t o r s and d i f f e r e n t p a t i e n t s 28 o CN X E 10 15 SEC Figure 3.1 A Non Fault Pressure Waveform, Drager Ventilator Figure 3.2 A Non Fault Pressure Waveform, Air Shields Ventilator Figure 3 . 3 A Non Fault Pressure Waveform, Bird Mk. IV Ventilator 21 combine t o p r o v i d e an a l m o s t i n f i n i t e r ange of non f a u l t p a t t e r n s . T h i s wide v a r i a n c e i n n o r m a l b r e a t h i n g p a t t e r n s s u g g e s t s t h a t an e q u a l l y l a r g e v a r i a n c e w i l l e x i s t i n e a c h of t h e f a u l t s p e c i f i c p a t t e r n s , r e n d e r i n g i m p o s s i b l e t h e a p p l i c a t i o n of s t a t i c p a t t e r n r e c o g n i t i o n t e c h n i q u e s , as t h e p a t t e r n s t o be u s e d t o i d e n t i f y t h e f a u l t s c a n n o t t h e m s e l v e s be i d e n t i f i e d . I t m i g h t a p p e a r t h a t t h i s d i f f i c u l t y c o u l d be a l l e v i a t e d by m o d e l l i n g t h e m e c h a n i c s of t h e p a t i e n t - v e n t i l a t o r s y s t e m , and u s i n g t h e r e s u l t a n t model t o p r e d i c t f a u l t s p e c i f i c p a t t e r n s . I f a model c o u l d be d e v e l o p e d f o r t h e non f a u l t c o n d i t i o n , and i f t h e p a r a m e t e r s of t h e model c o u l d be " l e a r n e d " , on l i n e , by a DPM, t h e i n f o r m a t i o n c o n t a i n e d i n t h e s e p a r a m e t e r s would embody t h e s p e c i f i c c h a r a c t e r i s t i c s of t h e p a r t i c u l a r p a t i e n t a t t a c h e d t o t h e v e n t i l a t o r , and t h e p a r t i c u l a r v e n t i l a t o r i n u s e . I f , i n a d d i t i o n , e a c h of t h e commonly o c c u r r i n g f a u l t s c o u l d be m o d e l l e d as a c h a r a c t e r i s t i c a l t e r a t i o n o f t h e b a s i c model, a DPM c o u l d g e n e r a t e f a u l t s p e c i f i c p a t t e r n s as needed, a l l o w i n g i d e n t i f i c a t i o n of a l l f a u l t s f o r w h i c h i t was s u p p l i e d m o d e l s . T h i s , however, i s n o t t h e c a s e , as r e v e a l e d by an e x a m i n a t i o n of r e s p i r a t o r y m o d e l l i n g . Of the. many models put f o r t h f o r human r e s p i r a t o r y m e c h a n i c s , ( [ 1 9 ] , [ 2 0 ] ) p e r h a p s t h e s i m p l e s t i s a s e r i e s RC c o m b i n a t i o n , where t h e r e s i s t a n c e r e p r e s e n t s t h e r e s i s t a n c e o f t h e a i r w a y t o gas f l o w , and t h e c a p a c i t a n c e r e p r e s e n t s t h e c o m p l i a n c e 1 o f t h e c h e s t w a l l and C o m p l i a n c e may be t h o u g h t o f as t h e o p p o s i t e of s t i f f n e s s , and i s d e f i n e d as volume i n c r e a s e p e r u n i t i n c r e a s e i n p r e s s u r e . 22 l u n g s . To c o m p l e t e t h e s y s t e m model f o r a DPM, a v e n t i l a t o r must be m o d e l l e d . T h i s t a s k i s most s i m p l y a c c o m p l i s h e d w i t h a c u r r e n t s o u r c e , r e p r e s e n t i n g t h e f r e s h gas s u p p l y , and a p a r a l l e l c a p a c i t a n c e , r e p r e s e n t i n g t h e i n t e r n a l c o m p l i a n c e of t h e m a c h i n e . B o t h o f t h e s e e l e m e n t s a r e p l a c e d i n p a r a l l e l w i t h t h e p r e v i o u s p a t i e n t model, r e s u l t i n g i n t h e s y s t e m model of F i g u r e 3.4. T h i s model, i n w h i c h c u r r e n t r e p r e s e n t s g a s , and v o l t a g e r e p r e s e n t s p r e s s u r e , c o n t a i n s t h r e e components, r e q u i r i n g t h r e e e q u a t i o n s t o a l l o w a u n i q u e s e p a r a t i o n of t h e same. A DPM, however, c a n have a t b e s t o n l y two e q u a t i o n s a v a i l a b l e ; one w h i c h g o v e r n s i n s p i r a t i o n , and one w h i c h g o v e r n s e x p i r a t i o n . S e p a r a t i o n o f components i s c o m p l i c a t e d f u r t h e r by t h e unknown form o f t h e d r i v i n g gas f u n c t i o n . A l t h o u g h t h i s i s f r e q u e n t l y a p e r i o d i c s t e p f u n c t i o n o r a s i n u s o i d , t h i s c a n n o t be assumed f o r a l l v e n t i l a t o r s . Y e t f u r t h e r c o m p l i c a t i o n s a r e i n t r o d u c e d by t h e f a c t t h a t not a l l v e n t i l a t o r s a r e volume c y c l e d ; an a s s u m p t i o n made by t h i s m odel. Such c o n s i d e r a t i o n s r e s u l t i n t h e c o n c l u s i o n t h a t a DPM w i l l not be a b l e t o l e a r n t h e p a r a m e t e r s o f even t h i s s i m p l e m o d e l , g i v e n t h e a v a i l a b l e i n f o r m a t i o n . More complex models make t h e s i t u a t i o n a l l t h a t much more d i f f i c u l t . I f m o d e l s c a n n o t be s t a t i c a l l y p r e d e f i n e d , and c a n n o t be d y n a m i c a l l y g e n e r a t e d , i t i s n o t p o s s i b l e t o i s o l a t e s p e c i f i c f a u l t s w i t h p a t t e r n r e c o g n i t i o n t e c h n i q u e s . I f a DPM c a n n o t d i a g n o s e t h e e x a c t t y p e o f a f a u l t , i t can a t l e a s t d e t e c t t h a t a f a u l t has o c c u r r e d . Such an a p p r o a c h r e q u i r e s o n l y t h a t e a c h i n c o m i n g waveform be compared t o a p r e v i o u s l y d e f i n e d non f a u l t Rp © c v Figure 3.4 A Two Compartment P a t i e n t - V e n t i l a t o r System Model to CO 24 waveform, and t h a t a l a r m s be r a i s e d when t h e c o m p a r i s o n i n d i c a t e s an i n t o l e r a b l e d i f f e r e n c e between t h e two. A s t r a i g h t f o r w a r d method of i m p l e m e n t i n g t h i s a p p r o a c h i s t o s t o r e d a t a f o r an e n t i r e c y c l e , and t h e n compare, p o i n t by p o i n t , e a c h new c y c l e t o t h e s t o r e d c y c l e . Any c o n v e n i e n t measure of d e v i a t i o n , s u c h as mean s q u a r e d d i f f e r e n c e , may t h e n be computed, and u s e d t o d e t e r m i n e t h e n e c e s s i t y , or l a c k o f t h e same f o r a l a r m s . T h i s t e c h n i q u e i s e s s e n t i a l l y t h a t f i r s t p r o p o s e d by t h e VGH B i o m e d i c a l E n g i n e e r i n g D e p a r t m e n t . W h i l e d e f i n i t e l y s u f f i c i e n t , t h i s a p p r o a c h u n f o r t u n a t e l y o f f e r s no d i a g n o s t i c c a p a b i l i t y , a s i t s u f f e r s from an i n a b i l i t y t o p r o v i d e t h e d e v i c e o p e r a t o r w i t h any u s e f u l i n f o r m a t i o n c o n c e r n i n g t h e f a u l t w hich has c a u s e d an a l a r m . A l l t h a t c a n be s a i d i s t h a t a s i g n i f i c a n t d e v i a t i o n from n o r m a l has o c c u r r e d . A f u r t h e r p r o b l e m r e s u l t s from t h e n e c e s s i t y of p r o v i d i n g a p o t e n t i a l l y l a r g e a r e a of RAM s t o r a g e , w h i c h i s b o t h e x p e n s i v e , and power i n t e n s i v e . P a r a m e t e r i z a t i o n of t h e r e s p i r a t o r y d a t a o f f e r s a s o l u t i o n t o t h e s e p r o b l e m s w h i l e r e t a i n i n g t h e b a s i c t e c h n i q u e . A s e t of p a r a m e t e r s i s e x t r a c t e d from e a c h c y c l e , and i s t h e n compared t o a s e t p r e v i o u s l y e x t r a c t e d from a known non f a u l t c y c l e . T h i s a p p r o a c h i s b o t h f a s t e r and l e s s memory i n t e n s i v e , as p o i n t by p o i n t c o m p a r i s o n s a r e not needed, and o n l y a b a s e l i n e p a r a m e t e r s e t need be r e t a i n e d . I f a m e a n i n g f u l p a r a m e t e r s e t i s c h o s e n , a DPM e m p l o y i n g t h i s m e t h o d o l o g y c a n p r o v i d e u s e f u l i n f o r m a t i o n on f a u l t s by m e r e l y i n d i c a t i n g w h i c h p a r a m e t e r s a r e out of bounds. Th e s e m e r i t s have l e d t o t h e a d o p t i o n o f t h i s a p p r o a c h f o r t h e p r e s e n t work. 25 "To a c h i e v e t h e g r e a t e s t p o s s i b l e d i a g n o s t i c c a p a b i l i t y , t h e c h o s e n p a r a m e t e r s e t must c o n t a i n i n f o r m a t i o n w h i c h c a n be e a s i l y u n d e r s t o o d by m e d i c a l p e r s o n n e l , w h i l e a t t h e same t i m e b e i n g s u f f i c i e n t f o r t h e t a s k o f r e l i a b l e d i s c o n n e c t m o n i t o r i n g . S u c h a p a r a m e t e r s e t may be c h o s e n a f t e r a r e - e x a m i n a t i o n o f t h e f u n d a m e n t a l r e q u i r e m e n t s o f t h i s d e v i c e ; n a m e l y : 1. The r e l i a b l e d e t e c t i o n o f a l l commonly o c c u r r i n g f a u l t s , a n d 2. The r e l i a b l e d e t e c t i o n o f i n a d v e r t a n t c h a n g e s t o v e n t i l a t i o n p a r a m e t e r s . F o r t h e p u r p o s e s o f t h i s w o r k , t h e commonly o c c u r r i n g f a u l t s a r e d e f i n e d t o be: 1. C o m p l e t e o r p a r t i a l e n d o t r a c h e a l d i s c o n n e c t s 2. C o m p l e t e o r p a r t i a l e n d o t r a c h e a l o c c l u s i o n s 3. E n d o t r a c h e a l d i s c o n n e c t s w i t h b a c k p r e s s u r e due t o f l o w r e s i s t a n c e 4. C o m p l e t e o r p a r t i a l d i s c o n n e c t i o n s o f t h e f r e s h g a s t u b i n g 5 . C o m p l e t e o r p a r t i a l o c c l u s i o n s o f t h e f r e s h gas t u b i n g 6. C o m p l e t e o r p a r t i a l v a p o r i z e r d i s c o n n e c t s 7. B r e a t h i n g c i r c u i t l e a k s 8. F a i l u r e o f t h e v e n t i l a t o r t o c y c l e 9. C o m p l e t e o r p a r t i a l o b s t r u c t i o n o f t h e i n s p i r a t o r y o r e x p i r a t o r y b r e a t h i n g l i n e s A l l o f t h e above f a u l t s e i t h e r i n t e r r u p t t h e f l o w o f gas f r o m t h e m a c h i n e t o t h e p a t i e n t , o r d i v e r t i t t o a t m o s p h e r e . S u c h f a u l t s w i l l t h e r e f o r e a f f e c t one o r more o f t h e f o l l o w i n g p a r a m e t e r s o f t h e r e s p i r a t o r y p r e s s u r e w a v e f o r m : 1. The maximum p r e s s u r e 26 2. The minimum p r e s s u r e 3. The a v e r a g e p r e s s u r e 4. The waveform p e r i o d 5. The I/E r a t i o T h e s e e f f e c t s a r e c o n f i r m e d i n r e l e v a n t l i t e r a t u r e ( [ 2 1 ] -[ 2 3 ] ) , and a r e i l l u s t r a t e d i n F i g u r e s 3.5 t o 3.9, w h i c h a r e waveforms r e c o r d e d d u r i n g s i m u l a t e d f a u l t s o f s e v e r a l of t h e above t y p e s . A d j u s t a b l e v e n t i l a t o r y p a r a m e t e r s a r e h e r e d e f i n e d t o be: 1. F r e q u e n c y 2. T i d a l Volume 3. I/E r a t i o 4. I n s p i r a t o r y Flow R a t e 5. F r e s h Gas Flow R a t e By t h e i r v e r y n a t u r e , a d j u s t m e n t s of t h e s e p a r a m e t e r s must d i r e c t l y a f f e c t one o r more o f t h e f o l l o w i n g waveform p a r a m e t e r s : 1. The waveform p e r i o d 2. The maximum p r e s s u r e 3. The a v e r a g e p r e s s u r e 4. The I/E r a t i o T h a t s u c h i s t h e c a s e may be seen i n F i g u r e s 3.10 t o 3.12, wh i c h a r e r e c o r d i n g s made d u r i n g i n d i v i d u a l a d j u s t m e n t s t o s e v e r a l o f t h e above v e n t i l a t i o n p a r a m e t e r s . To meet the r e q u i r e m e n t s o f a new g e n e r a t i o n DPM, a p a r a m e t e r s e t which i s a u n i o n o f t h i s s e t and t h e s e t a f f e c t e d Figure 3.6 Pressure Waveform From an Endotracheal Occlusion 28 o CM I » S E C U^ 7 Figure 3.7 Pressure Waveform From an Endotracheal Disconnect With Flow Resistance 281 o * Ml 10 15 S E C Figure 3.8 Pressure Waveform From a Fresh Gas Disconnect 29 28 u 10 15 SEC Figure 3.9 Pressure Waveform From a Fresh Gas Occlusion Figure 3.10 Pressure Waveforms With Increased ( B ) , Decreased (C) Frequency Figure 3.11 Pressure Waveforms With Increased (B), Decreased (C) Tidal Volumes Figure 3.12 Pressure Waveforms With Increased (B), Decreased (C) I n s p i r a t o r y Flow 33 by f a u l t s w i l l be s u f f i c i e n t . T h i s s e t i s : 1. The w a v e f o r m p e r i o d 2. The maximum p r e s s u r e 3. The minimum p r e s s u r e 4. The I/E r a t i o 5. The a v e r a g e p r e s s u r e A l l o f t h e s e p a r a m e t e r s a r e e a s i l y v i s u a l i z e d c h a r a c t e r i s t i c s o f t h e p r e s s u r e w a v e f o r m , m a k i n g t h i s s e t n o t o n l y s u f f i c i e n t , b u t a l s o e a s i l y u n d e r s t o o d by non t e c h n i c a l p e r s o n n e l . I m p l e m e n t a t i o n o f a r e l a t i v e m o n i t o r i n g t e c h n i q u e b a s e d on t h i s s e t w i l l y i e l d a r e l i a b l e a n d d i a g n o s t i c a l l y u s e f u l d i s c o n n e c t m o n i t o r . 3.3 Summary V a r i o u s methods f o r d e t e c t i o n o f f a u l t o c c u r r e n c e h a v e been i n v e s t i g a t e d . C o m p a r i s o n w i t h p r e d e f i n e d s t a t i c f a u l t p a t t e r n s h a s been e x a m i n e d and f o u n d t o be n o t p o s s i b l e . M o d e l l i n g , and d y n a m i c g e n e r a t i o n o f f a u l t p a t t e r n s h a s a l s o been e x a m i n e d and f o u n d t o be n o t p o s s i b l e . C o m p a r i s o n w i t h on l i n e m e m o r i z e d , non f a u l t p a t t e r n s h a s been f o u n d t o be f e a s i b l e , a n d w i t h p a r a m e t e r i z a t i o n , d i a g n o s t i c a l l y u s e f u l . A s e t o f p a r a m e t e r s w h i c h i s b o t h s u f f i c i e n t a n d - i n f o r m a t i v e h a s been i d e n t i f i e d . 34 CHAPTER 4  DPM ALGORITHM 4.1 I n t r o d u c t i o n I m p l e m e n t a t i o n of a b a s e l i n e r e l a t i v e m o n i t o r i n g a l g o r i t h m , b a s e d on t h e m e t h o d o l o g y o u t l i n e d i n C h a p t e r 3, may be d i v i d e d i n t o s e v e r a l i n d e p e n d e n t t a s k s , c o r r e s p o n d i n g t o i n i t i a l i z a t i o n , l e a r n i n g , and m o n i t o r i n g . At power up t i m e , an i n t e l l i g e n t DPM must s y n c h r o n i z e w i t h t h e i n c o m i n g d a t a and b e g i n t o c o r r e c t l y d e t e c t new c y c l e s , a d a p t i n g t o t h e waveform as n e c e s s a r y . A b a s e l i n e o f e x t r a c t e d f e a t u r e s must t h e n be b u i l t , f o l l o w e d by a c o n t i n u a l p r o c e s s of f e a t u r e e x t r a c t i o n , b a s e l i n e c o m p a r i s o n , d e c i s i o n , and a l a r m i n g , as i s n e e d e d . T h i s c h a p t e r w i l l examine t h e methods by w h i c h e a c h o f t h e s e t a s k s has been a c c o m p l i s h e d on t h e p r o t o t y p e DPM d e v e l o p e d as a r e s u l t of t h i s work. 4.2 L e a r n i n g As o u t l i n e d i n s e c t i o n 3.2, n o r m a l i t y i n r e s p i r a t o r y waveforms i s a r e l a t i v e m a t t e r . As a r e s u l t , t h e p r o t o t y p e DPM makes no a s s u m p t i o n s r e g a r d i n g t h e n o r m a l i t y o f t h e d a t a when when i t i s powered up. R a t h e r , i t w a i t s u n t i l t h e o p e r a t o r c o n v e y s t o i t a d e c i s i o n t h a t t h e d a t a i s n o r m a l , by way of a f r o n t p a n e l mounted s w i t c h , and t h e n p r o c e e d s t o l e a r n , as d e t a i l e d b elow. The o p e r a t o r may, a t any t i m e d u r i n g l e a r n i n g , c hange t h i s d e c i s i o n and a b o r t t h e l e a r n i n g p r o c e s s , by use of t h e same s w i t c h w h i c h i n i t i a t e d i t . L a c k of c a n c e l l a t i o n i m p l i e s a d e c i s i o n t h a t t h e d a t a i s i n d e e d v a l i d . 35 F o l l o w i n g t h e o p e r a t o r d e c i s i o n of n o r m a l i t y , t h e DPM must s y n c h r o n i z e i t s e l f w i t h t h e d a t a , and t h e n e s t a b l i s h c o r r e c t c y c l i n g . S y n c h r o n i z a t i o n , a t a s k b a s e d on d e t e c t i o n o f h a l f peak p r e s s u r e c r o s s o v e r s ( s e e b e l o w ) , r e q u i r e s a measurement of t h e peak p r e s s u r e . T h i s i s a c c o m p l i s h e d j o i n t l y w i t h an e s t i m a t i o n of t h e PEEP l e v e l , by p a s s i v e o b s e r v a t i o n of t h e d a t a s t r e a m f o r t h e immediate 15 s e c o n d s f o l l o w i n g t h e n o r m a l i t y d e c i s i o n . T h i s d u r a t i o n a l l o w s c o r r e c t f u n c t i o n i n g down t o a f r e q u e n c y of 4 BPM, w e l l below t h e n o r m a l r e s p i r a t o r y r a n g e . W i t h t h e peak v a l u e e s t a b l i s h e d , s y n c h r o n i z a t i o n p r o c e e d s . F i v e c r o s s i n g s of t h e h a l f peak p r e s s u r e (50%) l e v e l a r e s e a r c h e d f o r . An i n i t i a l a s s u m p t i o n i s made t h a t t h e d a t a l i e s below t h e 50% l e v e l . I f t h i s a s s u m p t i o n i s v a l i d , t h e f i r s t c r o s s o v e r w i l l be on a r i s i n g edge, t h e s e c o n d an a f a l l i n g edge, and so on, w i t h t h e f i n a l c r o s s i n g b e i n g on a r i s i n g - e d g e . I f t h e i n i t i a l a s s u m p t i o n i s i n v a l i d (as i s shown i n F i g u r e 4.1), an immediate, a p p a r e n t c r o s s o v e r w i l l be d e t e c t e d , a s t h e v e r y f i r s t sample w i l l l i e above t h e 50% l e v e l , a nd t h e s e c o n d c r o s s o v e r w i l l be on a f a l l i n g edge, j u s t a s i f t h e i n i t i a l a s s u m p t i o n had been v a l i d . The f i n a l c r o s s o v e r w i l l a g a i n o c c u r on a r i s i n g edge. T h i s p r o c e s s t h e r e f o r e , a l w a y s l e a v e s t h e d a t a p o s i t i o n e d on a r i s i n g edge, and so s y n c h r o n i z e s t h e a l g o r i t h m and t h e d a t a . T h i s method of s y n c h r o n i z a t i o n w i l l work e q u a l l y w e l l w i t h o n l y t h r e e c r o s s o v e r s , but f i v e a r e us e d t o a l l o w n ot o n l y s y n c h r o n i z a t i o n , but a l s o a measurement o f t h e waveform p e r i o d , w h i c h i s e q u a l t o t h e t i m e d i f f e r e n t i a l between t h e f i f t h 10 SEC Figure 4.1 Synchronization By Half Peak Pressure Detection 37 c r o s s i n g and t h e t h i r d . T h i s e s t i m a t e of t h e p e r i o d i s u s e d i n d a t a c y c l i n g , as s h a l l be e x p l a i n e d p r e s e n t l y . R e m a i n i n g i n t h e l e a r n i n g p r o c e s s a r e t h e e s t a b l i s h m e n t of d a t a c y c l i n g , and t h e c o n s t r u c t i o n of t h e m o n i t o r i n g b a s e l i n e . T h e s e i t e m s a r e d e t a i l e d i n S e c t i o n s 4.3 and 4.5, as t h e l e a r n i n g b e h a v i o r c l o s e l y p a r a l l e l s t h e m o n i t o r i n g b e h a v i o r . 4.3 D a t a C y c l i n g D a t a c y c l i n g i s h e r e d e f i n e d a s t h e a b i l i t y of t h e a l g o r i t h m t o d e t e c t new c y c l e s i n t h e r e s p i r a t o r y d a t a . A r e s p i r a t o r y c y c l e b e g i n s w i t h t h e d e l i v e r y of a volume of gas t o t h e p a t i e n t , r e s u l t i n g i n an i n c r e a s e i n t h e s y s t e m p r e s s u r e . D a t a c y c l i n g has been e s t a b l i s h e d when t h e s e p r e s s u r e i n c r e a s e s c a n be d e t e c t e d by t h e a l g o r i t h m . D a t a c y c l i n g i s a c c o m p l i s h e d by l i n e a r r e g r e s s i o n d i f f e r e n t i a t i o n o f t h e c o n t e n t s o f a 160 ms. moving window on t h e d a t a . In e s s e n c e , a new c y c l e i s t r i g g e r e d when t h e computed d e r i v a t i v e e x c e e d s a t h r e s h o l d s e t a d a p t i v e l y when d a t a c y c l i n g i s f i r s t e s t a b l i s h e d ( s e e b e l o w ) . T h i s same method i s u s e d t o d e t e c t t h e o n s e t o f e x p i r a t i o n , w h i c h i s c h a r a c t e r i z e d by a s h a r p f a l l i n g edge i n t h e waveform. A d a p t i o n of t h e r i s i n g and f a l l i n g t h r e s h o l d s i s a c c o m p l i s h e d by a s e r i e s of a t t e m p t s t o d e t e c t new c y c l e s . I f a r i s i n g edge above t h e t h r e s h o l d i s not d e t e c t e d w i t h i n a p r e s e t i n t e r v a l of t i m e from t h e b e g i n n i n g of t h e c y c l i n g a t t e m p t , e q u a l t o t h r e e t i m e s t h e o r i g i n a l l e a r n - t i m e p e r i o d e s t i m a t e , a c y c l i n g f a i l u r e i s s i g n a l l e d , and t h e t h r e s h o l d i s r e d u c e d . The. 38 c y c l i n g attempt i s then begun a g a i n . S i m u l t a n e o u s l y , the f a l l i n g t h r e s h o l d . i s , i n l i k e manner, decremented. T h i s p r o c e s s c o n t i n u e s u n t i l e i t h e r c y c l i n g i s e s t a b l i s h e d or one of the t h r e s h o l d s i s reduced t o z e r o , a t which time the c y c l i n g attempt i s abandoned. In most c a s e s , however, the i n i t i a l s e t t i n g (± 4 cmH 20/sec) i s s u f f i c i e n t , and the d a t a , p o s i t i o n e d on a r i s i n g edge, c y c l e s i m m e d i a t e l y . I f t h i s i s not the c a s e , the s y n c h r o n i z a t i o n p r e v i o u s l y ~ e s t a b l i s h e d i s m a i n t a i n e d , as the passage of t h r e e complete c y c l e s l e a v e s the data s t i l l p o s i t i o n e d on a r i s i n g edge. A DPM must be a b l e t o c o r r e c t l y c y c l e the r e s p i r a t o r y d a t a i n the presence of both e x t e r n a l l y induced n o i s e and p h y s i c a l a r t i f a c t , such as can be caused by s u r g i c a l m a n i p u l a t i o n s of the p a t i e n t , or r e s p i r a t o r y e v e n t s l i k e coughing and s i g h i n g . P r o t e c t i o n a g a i n s t n o i s e and a r t i f a c t i s p r o v i d e d both by the d a t a a c q u i s i t i o n system, which f i l t e r s the p r e s s u r e i n p u t s i g n a l , and by the p r o c e s s i n g a l g o r i t h m , which d i s a b l e s c y c l e t r i g g e r i n g over a f i x e d p e r c e n t a g e of each c y c l e . T h i s may be done as the s t a t i o n a r i t y of the r e s p i r a t o r y p r o c e s s makes i t p o s s i b l e t o p r e d i c t , u s i n g the p e r i o d e s t i m a t e g a i n e d a t l e a r n t i m e , the approximate time a t which the next c y c l e w i l l o c c u r . Employing such a n o i s e p r o t e c t i o n methodology c r e a t e s a c o n f l i c t between d e s i g n g o a l s . D i s a b l i n g c y c l i n g u n t i l v e r y near the p r e d i c t e d new c y c l e time w i l l p r o v i d e p r o t e c t i o n a g a i n s t almost a l l s p u r i o u s t r i g g e r i n g , but w i l l p r e v e n t the d e t e c t i o n of sudden i n c r e a s e s i n the b r e a t h i n g f r e q u e n c y . To a l l o w o p t i m a l d e t e c t i o n of sudden f r e q u e n c y i n c r e a s e s , c y c l i n g s h o u l d be r e - e n a b l e d i m m e d i a t e l y a f t e r e x p i r a t i o n has been d e t e c t e d . T h i s , 39 however, p r o v i d e s no n o i s e p r o t e c t i o n a t a l l , and l e a v e s t h e d e v i c e v u l n e r a b l e t o s p u r i o u s c y c l i n g r e s u l t i n g from " n o i s e " sometimes a s s o c i a t e d w i t h t h e end o f e x p i r a t i o n . Such " n o i s e " i s c l e a r l y v i s i b l e i n F i g u r e 3.1. The c o n f l i c t i n g r e q u i r e m e n t s of h i g h f r e q u e n c y d e t e c t i o n and n o i s e s u p p r e s s i o n have been met, on t h e p r e s e n t p r o t o t y p e , w i t h compromise. To p r o v i d e b o t h n o i s e p r o t e c t i o n , and a b i l i t y t o d e t e c t i n c r e a s i n g f r e q u e n c y , c y c l i n g i s d e l a y e d f o r a d u r a t i o n e q u a l t o 3/4 of t h e i n i t i a l p e r i o d e s t i m a t e . T h i s , i n v o l v e s some l o s s o f a b i l i t y t o d e t e c t r a d i c a l f r e q u e n c y c h a n g e s ( f o r example, f o r t h e same I/E r a t i o , e x a c t d o u b l i n g o f f r e q u e n c y w i l l be i n c o r r e c t l y d i a g n o s e d ) , but w i l l a l l o w t h e d e t e c t i o n o f f a i r l y m ajor s h i f t s . L i k e w i s e , a l a r g e i n d u c e d n o i s e d i s t u r b a n c e near t h e end o f a c y c l e may c a u s e s p u r i o u s c y c l i n g , b u t t h e m a j o r i t y o f t h e c y c l e i s p r o t e c t e d . 4.4 F e a t u r e E x t r a c t i o n The c h o s e n f e a t u r e s a r e c o n t i n u o u s l y e x t r a c t e d from t h e d a t a on a p e r c y c l e b a s i s , o r u n t i l c y c l i n g f a i l u r e i s d e t e c t e d . The m e c h a n i c s of e x t r a c t i o n a r e r e a s o n a b l e s t r a i g h t f o r w a r d . The maximum and minimum p r e s s u r e s a r e e x t r a c t e d by s i m p l e c o m p a r i s o n of e a c h p o i n t w i t h t h e p r e v i o u s maxima and minima, and t h e a v e r a g e p r e s s u r e i s computed as t h e sum t h e d a t a p o i n t s f o r t h e p e r i o d , d i v i d e d by t h e p e r i o d . A t t h e end o f a c y c l e , t h e I/E r a t i o i s computed as : (end i n s p i r e t i m e ) I/E = p e r i o d - (end i n s p i r e t i m e ) . 40 The p e r i o d i s d e f i n e d as t h e e l a p s e d t i m e a t t h e end of a c y c l e , and t h e end i n s p i r e t i m e i s d e f i n e d as t h e t i m e a t e x p i r a t i o n o n s e t . A l l d a t a samples a r e c o r r e c t e d , as t h e y a r e o b t a i n e d , f o r t h e PEEP l e v e l measured d u r i n g l e a r n t i m e . 4.5 Q u a l i t y C o n t r o l B e f o r e f e a t u r e s a r e m o n i t o r e d f o r b a s e l i n e d e v i a t i o n s , i t must be a s c e r t a i n e d t h a t t h e c y c l e f r o m w h i c h t h e y were e x t r a c t e d was a v a l i d r e s p i r a t o r y e v e n t ; t h a t i s , an i n s p i r a t i o n f o l l o w e d by an e x p i r a t i o n , t e r m i n a t e d by a new c y c l e d e t e c t i o n . I f t h i s i s not t h e c a s e , a c y c l i n g ' f a i l u r e has o c c u r r e d , and a c t i o n o t h e r t h a n m o n i t o r i n g must be u n d e r t a k e n , as t h e f e a t u r e s may be m e a n i n g l e s s . In t h e c a s e o f l e a r n i n g , b e f o r e d a t a c y c l i n g has been e s t a b l i s h e d , t h i s a c t i o n i s t h r e s h o l d r e d u c t i o n , as o u t l i n e d p r e v i o u s l y , b a s e d on t h e a s s u m p t i o n o f o v e r l y h i g h t h r e s h o l d s . In t h e c a s e o f l e a r n i n g , a f t e r d a t a c y c l i n g has been e s t a b l i s h e d , and i n a l l o t h e r c a s e s , t h e a c t i o n t a k e n i s t h e d i s a b l i n g of m o n i t o r i n g f o r t h e c y c l e i n v o l v e d , t h e p o s t i n g of a c y c l i n g a l a r m , and t h e immediate r e s u m p t i o n of p r o c e s s i n g f o r t h e n e x t c y c l e ( f o r t h e p r o t o t y p e DPM, p o s t i n g of a l a r m s c o n s i s t s o f f l a s h i n g an e r r o r message on a s e t o f 8 a l p h a n u m e r i c LED d i s p l a y s , and s o u n d i n g an a u d i o a l a r m ) . . 41 4.6 M o n i t o r i n g T h e r e a r e two s t a g e s i n v o l v e d i n t h e m o n i t o r i n g of DPM d a t a . The f i r s t s t a g e i n v o l v e s t h e e s t a b l i s h m e n t of a b a s e l i n e of e x t r a c t e d f e a t u r e s , w h i l e t h e s e c o n d i n v o l v e s a c o m p a r i s o n of t h e l a s t c y c l e ' s f e a t u r e s w i t h t h e b a s e l i n e v a l u e s , and a d e c i s i o n on t h e need o r l a c k of t h e same f o r a l a r m s . The f i r s t s t a g e c o r r e s p o n d s t o l e a r n i n g ; t h e s e c o n d t o m o n i t o r i n g . D u r i n g l e a r n t i m e , t h e f e a t u r e s e x t r a c t e d from t h e p r e v i o u s c y c l e a r e c h e c k e d a g a i n s t a s e t of p r e s e t a b s o l u t e l i m i t s , and, i f t h e c h e c k i s s u c c e s s f u l , a r e added t o t h e n a s c e n t b a s e l i n e , i n a r u n n i n g sum f a s h i o n . The use of p r e s e t l i m i t s may sound v e r y much l i k e one o f t h e p r o b l e m s p l a g u i n g p r e s e n t DPMs, but t h i s i s n o t t h e c a s e . The l i m i t s u s e d a r e of s u c h an extreme n a t u r e t h a t f e a t u r e s w h i c h do not t e s t f a v o u r a b l y a r e w i t h o u t d o u b t from an i n v a l i d waveform. ( f o r example, t h e upper and l o w e r l i m i t s a p p l i e d t o t h e peak p r e s s u r e a r e 3 and 52 cmH 20, r e s p e c t i v e l y ) I t w o u l d be d e s i r e a b l e on an a b s o l u t e t e s t f a i l u r e t o o n l y sound an a l a r m , l e a v i n g t h e d e v i c e o p e r a t o r t o be t h e f i n a l a r b i t e r o f n o r m a l and a b n o r m a l , but t h i s c a n n o t be done. To f u n c t i o n c o r r e c t l y , t h i s d e v i c e must n o t be " d i s t u r b e d " d u r i n g b a s e l i n e e s t a b l i s h m e n t , a s any d i s r u p t i o n a t t h i s s t a g e may l e a d t o i m p r o p e r b a s e l i n e v a l u e s . Such v a l u e s would l e a d t o c o n t i n u o u s f a l s e p o s i t i v e a l a r m s a f t e r l e a r n i n g c o n c l u d e d . C o n s i d e r a c a s e where a d i s c o n n e c t i o n o c c u r s d u r i n g l e a r n t i m e , a f t e r t h e b a s e l i n e has been p a r t i a l l y c o n s t r u c t e d . I f t h e d e v i c e o n l y a l a r m s , and t h e o p e r a t o r c h o s e s t o c o r r e c t t h e d i s c o n n e c t 42 but n o t r e s t a r t t h e m o n i t o r , t h e b a s e l i n e w i l l c o n t a i n a minimum of one c y c l e of e r r o n e o u s d a t a , and w i l l not be r e p r e s e n t a t i v e of t h e n o r m a l s t a t e . When t h e d e v i c e moves i n t o m o n i t o r i n g mode, e a c h c y c l e may compare p o o r l y a g a i n s t t h i s c o r r u p t e d b a s e l i n e , c a u s i n g c o n t i n u o u s s p u r i o u s a l a r m s . Thus, a l e a r n t i m e f a i l u r e o f an a b s o l u t e t e s t r e s u l t s i n an a u t o m a t i c i n t e r n a l r e s e t , s i g n a l l e d t o t h e o p e r a t o r by a r e t u r n t o t h e d e v i c e ' s power up s t a t e , w h i c h a l a r m s and f l a s h e s a s t a r t up message. T h i s does not g u a r a n t e e t h a t a l l l e a r n t i m e p r o b l e m s w i l l not r e s u l t i n f a l s e b a s e l i n e s , b u t does e n s u r e t h a t many d a n g e r o u s s i t u a t i o n s w i l l be d e t e c t e d . When d a t a from a s u i t a b l e number of c y c l e s has been added t o t h e b a s e l i n e sums, t h e y a r e d i v i d e d by t h e number of c y c l e s u s e d , and t h e b a s e l i n e i s c r e a t e d , e f f e c t i v e l y r e m o v i n g t h e d e v i c e f r o m t h e l e a r n i n g s t a g e , and p l a c i n g i t i n t o t h e m o n i t o r i n g s t a g e . D u r i n g m o n i t o r i n g , d i f f e r e n c e s between t h e e x t r a c t e d f e a t u r e s and t h o s e i n t h e b a s e l i n e a r e computed. I f , f o r any f e a t u r e , t h e m a g n i t u d e of t h i s d i f f e r e n c e e x c e e d s a p r e s e t t o l e r a n c e , an a l a r m c o n d i t i o n i s p o s t e d . 4.7 A l a r m s A l a r m s a r e b o t h p r i o r i t y o r d e r e d and non l a t c h i n g ; t h a t i s , o n l y t h e most i m p o r t a n t o f a s e t o f c o n c u r r e n t a l a r m c o n d i t i o n s i s p r e s e n t e d t o t h e d e v i c e o p e r a t o r , and t h i s a l a r m w i l l r e s e t a u t o m a t i c a l l y when t h e u n d e r l y i n g e r r o r c o n d i t i o n i s c o r r e c t e d . I f more t h a n one e r r o r i s p r e s e n t , c o r r e c t i o n o f t h e h i g h e s t l e v e l e r r o r w i l l r e s u l t i n t h e p r e s e n t a t i o n o f t h e n e x t l e v e l , 43 i f b o t h a r e not l i n k e d t o t h e same p h y s i c a l c o n d i t i o n . The DPM a l g o r i t h m s u p p o r t s b o t h a u d i o and v i s u a l ( a l p h a n u m e r i c ) a l a r m s . A u d i o a l a r m s sound i m m e d i a t e l y upon d e t e c t i o n ' of a b a s e l i n e d e v i a t i o n , t o r e d u c e t o a minimum t h e t i m e d e l a y from e r r o r o c c u r r e n c e t o d e v i c e a l a r m . V i s u a l a l a r m s r e p r e s e n t t h e d e v i c e ' s e x p l a n a t i o n o f t h e c a u s e of an a u d i o a l a r m , and as s u c h , a r e f i l t e r e d t o e n s u r e t h a t t h e i n f o r m a t i o n p r e s e n t e d i s c o r r e c t . A one s t a g e f i l t e r i s employed, r e q u i r i n g t h a t t h e same e r r o r c o n d i t i o n be p o s t e d f o r two c y c l e s i n s u c c e s s i o n b e f o r e a v i s u a l message c o n c e r n i n g t h a t e r r o r i s d i s p l a y e d . T h i s e l i m i n a t e s t h e p o s s i b i l i t y of a p p a r e n t i n d e c i s i o n on t h e d e v i c e ' s b e h a l f , w h i c h m i g h t not o n l y be c o n f u s i n g , but m i g h t a l s o l e a d t o a l o s s of c o n f i d e n c e i n t h e d e v i c e ' s a b i l i t i e s . A l a r m s have been a s s i g n e d d i f f e r r i n g p r i o r i t i e s w h i c h r e f l e c t t h e i r r e l a t i v e i m p o r t a n c e t o t h e d e v i c e o p e r a t o r , and t o e a c h o t h e r . The o r d e r i n g , from most i m p o r t a n t t o l e a s t , i s as f o l l o w s : 1. a l a r m s r e l a t e d t o c y c l i n g f a i l u r e s 2 . a l a r m s r e l a t e d t o f r e q u e n c y d e v i a t i o n s 3. a l a r m s r e l a t e d t o peak p r e s s u r e d e v i a t i o n s 4 . a l a r m s r e l a t e d t o minimum p r e s s u r e d e v i a t i o n s 5 . a l a r m s r e l a t e d t o I/E d e v i a t i o n s 6. a l a r m s r e l a t e d t o a v e r a g e p r e s s u r e d e v i a t i o n s Of t h e non c y c l i n g c o n d i t i o n s , c h a n g e s i n f r e q u e n c y a r e deemed t o be of t h e h i g h e s t i m p o r t a n c e as t h e y i n e v i t a b l y a l t e r a l m o s t a l l of t h e o t h e r p a r a m e t e r s , i n c l u d i n g , s u p r i s i n g l y 44 enough, t h e maximum and minimum p r e s s u r e s . The m a j o r i t y of s e r i o u s f a u l t s i n v o l v e l e a k s and d i s c o n n e c t i o n s , and so e r r o r s i n v o l v i n g maximum and minimum p r e s s u r e v a r i a t i o n s a r e r a t e d t o be t h e n e x t most i m p o r t a n t . E r r o r s i n v o l v i n g d e v i a t i o n s of t h e I/E r a t i o a r e r a t e d as more i m p o r t a n t t h a n t h a n t h o s e i n v o l v i n g d e v i a t i o n s o f t h e a v e r a g e p r e s s u r e , t o e n s u r e t h a t d i r e c t a l t e r a t i o n s o f t h e I/E r a t i o p r o d u c e a l a r m s t o t h a t e f f e c t , r a t h e r t h a n a l a r m s c o n c e r n i n g t h e change i n a v e r a g e p r e s s u r e w h i c h i n e v i t a b l y r e s u l t s . 4.8 Summary An a l g o r i t h m i c method of i m p l e m e n t i n g t h e m e t h o d o l o g y o u t l i n e d i n C h a p t e r 3 has been p r e s e n t e d . S y n c h r o n i z a t i o n , d a t a c y c l i n g , l e a r n i n g , and m o n i t o r i n g have been examined, and s o f t w a r e s u p p o r t f o r a u d i o and v i s u a l ( a l p h a ) a l a r m s has been d e s c r i b e d . The s t a g e s of t h e a l g o r i t h m a r e summarized below. When e n t e r e d , t h e DPM a l g o r i t h m measures t h e peak p r e s s u r e and t h e PEEP v a l u e . I t t h e n s y n c h r o n i z e s t h e d a t a , g a i n s an e s t i m a t e o f t h e waveform p e r i o d , e s t a b l i s h e s d a t a c y c l i n g , and b u i l d s a b a s e l i n e . T h i s i s f o l l o w e d by a c o n t i n u a l p r o c e s s of f e a t u r e e x t r a c t i o n , b a s e l i n e c o m p a r i s o n , d e c i s i o n , and a l a r m i n g as n e c e s s a r y . When e s t a b l i s h e d , a l a r m s a r e p r i o r i t y o r d e r e d and non l a t c h i n g . 45 CHAPTER 5  DPM HARDWARE 5. 1 I n t r o d u c t i o n The p r o t o t y p e DPM d e v e l o p e d d u r i n g t h e c o u r s e of t h i s work has been c o n s t r u c t e d on an I n t e l S y s t e m Development K i t f o r t h e 8085 p r o c e s s o r (SDK85). T h i s k i t p r o v i d e s an 8085 CPU, a PROM-I/O c h i p , c o n t a i n i n g a 2K m o n i t o r program w h i c h a l l o w s l i m i t e d h e x a d e c i m a l programming, a RAM-I/O c h i p , and a k e y b o a r d c o n t r o l l e r , s e r v i c i n g a keypad and s i x 8 segment LED d i s p l a y s . The k i t f u r t h e r p r o v i d e s a l a r g e w i r e w r a p a r e a , w i t h a d d r e s s , d a t a , and c o n t r o l bus c o n n e c t o r s t o t h e main c i r c u i t b o a r d . (Complete i n f o r m a t i o n on t h e s e k i t s i s a v a i l a b l e i n [24] ). The p r o t o t y p e DPM ( t h e DPM/SDK) has been implemented on t h e .wirewrap a r e a of t h e SDK b o a r d by a u g m e n t i n g t h e b a s i c k i t w i t h EPROM, RAM, d a t a a c q u i s i t i o n components, m o n i t o r i n g c i r c u i t s , and a u d i o and v i s u a l a l a r m c i r c u i t s . These components and c i r c u i t s a r e d e s c r i b e d i n t h i s c h a p t e r . 5.2 The P r o c e s s i n g System The s y s t e m CPU may a c c e s s 4K o f EPROM (1 I n t e l 2732), w h i c h c o n t a i n t h e DPM s o f t w a r e , 1K of RAM (1 I n t e l 8 155), 2 I/O p o r t s (1 I n t e l 8 1 5 5 ) , and one k e y b o a r d c o n t r o l l e r ( I n t e l 8 2 7 9 ) . T h e s e i t e m s form t h e p r o c e s s i n g s y s t e m o f t h e DPM/SDK. O n l y t h e EPROM and RAM r e p r e s e n t a d d i t i o n s t o t h e b a s i c k i t , and a r e shown i n F i g u r e 5.1. O t h e r CPU a c c e s s i b l e components i n c l u d e a N a t i o n a l ADC0808 A/D, and two L i t r o n i x DL1414 A l p h a n u m e r i c LED d i s p l a y s . D A T A B U S " < < ^ U — u O O O O O 12732 < < < ^ < ^ < < O Q O O L_i I / I O Q O O O O Q Q < < < < < < 18165 < < o u u < > g > -!0/R -ALE -WR -RD A D D R E S S B U S All AI5 -Al* 1/6 7404 1/6 7 4 0 4 I /4 7432 A ? G2A G23 G1 Y7 C N D CO n tn •4-vcc Y0 Yl Y2 Y3 Y* Y5 Y6 -011414 t -011414 2 -AOC0808 1/6 7404 • Figure 5.1 DPM/SDK Peripheral Memory and Address Decoding Circuits 47 5.3 I n p u t Systems I n p u t t o t h e DPM/SDK i s a c c o m p l i s h e d t h r o u g h an a n a l o g / d i g i t a l d a t a a c q u i s i t i o n s y s t e m , and two f r o n t p a n e l mounted momentary c o n t a c t s w i t c h e s . These s w i t c h e s a r e c o n n e c t e d i n p a r a l l e l w i t h two of t h e SDK keypad k e y s , a l l o w i n g them t o be s e r v i c e d by t h e 8279 k e y b o a r d c o n t r o l l e r . I n t e r r u p t s from t h i s c o n t r o l l e r a r e h a n d l e d by an SDK m o n i t o r r o u t i n e w h i c h p l a c e s t h e i n p u t c h a r a c t e r s i n t o a one c h a r a c t e r i n t e r n a l b u f f e r . The d a t a a c q u i s i t i o n s y s t e m c o n s i s t s o f a M o t o r o l a MPX80MD d i f f e r e n t i a l p r e s s u r e t r a n s d u c e r , t r a d e named 'XDUCER', a two p o l e p a s s i v e f i l t e r , o f f s e t r e d u c t i o n and g a i n , and t h e p r e v i o u s l y m e n t i o n e d N a t i o n a l ADC0808 A/D; a l l b u f f e r e d as n e c e s s a r y . T h i s s y s t e m i s shown as F i g u r e 5.2 The XDUCER, a new s i l i c o n p r e s s u r e t r a n s d u c e r , f e a t u r e s low c o s t , s i n g l e +5 v o l t s u p p l y , r a t i o m a t i c o u t p u t , and e x c e l l e n t s t a b i l i t y and l i n e a r i t y . The model u s e d i n t h i s work f u r t h e r f e a t u r e s t e m p e r a t u r e c o m p e n s a t i o n and s i g n a l a m p l i f i c a t i o n , on c h i p , r e s u l t i n g i n a t e m p e r a t u r e s t a b a l i z e d 0-4.8v o u t p u t s i g n a l o v e r t h e t r a n s d u c e r ' s f u l l r a n g e o f 0-12 PSID. A l t h o u g h a 0-1 PSID t r a n s d u c e r would be s u f f i c i e n t f o r t h i s t a s k , t h e a d v a n t a g e s of t h e XDUCER, p a r t i c u l a r i l y i t s ' 5 v o l t s u p p l y and t e m p e r a t u r e c o m p e n s a t i o n , make i t emm i n e n t l y s u i t a b l e f o r t h i s a p p l i c a t i o n . ( M o t o r o l a has announced p l a n s f o r a 0-1 PSID v e r s i o n o f t h i s t r a n s d u c e r , and i t i s a n t i c i p a t e d t h a t f u t u r e m o d e l s o f t h i s DPM w i l l u t i l i z e t h e newer XDUCER.) The t r a n s d u c e r o u t p u t i s b u f f e r e d , and t i e d i n t o a s e c o n d o r d e r , p a s s i v e , low p a s s f i l t e r , h a v i n g c o r n e r f r e q u e n c i e s a t 1 buffer filter buffer off set and gain-IMLM32* X UA7805 cioTJ* 7 i LMSSS ~ SC _ ei5S T I M E R OUT W6 74LS0* IN3 IN2 IN4 I N I IN5 INO IN6 . A D D A IN7 CO A D 0 3 5 TART O CO ADDC EOC o A L E 2 -6 Ot ,DC 2"' , - 2 <. 2 ' CLK 2'3 VCC f « R E F f 2 8 G N D t l E F -2 7 2 5 DMA BUS Y 2 74LS138 81SS PAO Figure 5.2 DPM/SDK Data A c q u i s i t i o n System 49 and 2 Hz. T h i s y i e l d s g r e a t e r t h a n 60 db s u p p r e s s i o n of 60 Hz. n o i s e , w h i l e p r e s e r v i n g t h e major f r e q u e n c y components of t h e r e s p i r a t o r y d a t a . The f i l t e r o u t p u t i s a g a i n b u f f e r e d , and t i e d i n t o a d i f f e r e n t i a l a m p l i f i e r , w h i c h removes a l a r g e p o r t i o n of t h e XDUCER's a t m o s p h e r i c o f f s e t v o l t a g e , and p r o v i d e s g a i n . The a m p l i f i e d o u t p u t i s t h e n t i e d d i r e c t l y t o t h e ADC0808 A/D. The N a t i o n a l ADC0808 A/D was c h o s e n f o r t h i s a p p l i c a t i o n p r i m a r i l y b e c a u s e of i t s e x c e l l e n t c o m b i n a t i o n o f s i n g l e s u p p l y , low power c o n s u m p t i o n , a c c u r a c y , and f a v o u r a b l e c o n v e r s i o n t i m e . T h i s u n i t r e q u i r e s two t i m i n g s i g n a l s ; a 500 KHz. c l o c k , p r o v i d e d by a programmable t i m e r i n c o r p o r a t e d i n t o t h e 8155 RAM-I/O c h i p , and a p e r i o d i c S t a r t C o n v e r s i o n (SC) p u l s e . T h i s s i g n a l i s p r o v i d e d by a f r e e r u n n i n g a s t a b l e m u l t i v i b r a t o r , s e t t o a f r e q u e n c y of 25 Hz. T h i s s a m p l i n g r a t e i s a d e q u a t e f o r t h e d a t a b e i n g a c q u i r e d , and a l l o w s p r o p e r s i g n a l r e p r o d u c t i o n w e l l beyond t h e n o m i n a l p a s s band of t h e DPM f i l t e r . The a s t a b l e m u l t i v i b r a t o r , as w e l l as s e v e r a l o t h e r components w h i c h t o g e t h e r implement hardware m o n i t o r i n g ( t o be d i s c u s s e d i n S e c t i o n 5.4) may be seen i n F i g u r e 5.3 The c o m p l e t e i n p u t c i r c u i t , from t r a n s d u c e r t o A/D, has a s e n s i t i v i t y o f 0.33 c m H 2 0 / b i t , a l l o w i n g a t o t a l r a n g e o f a l m o s t 85 cmH 20. In p r a c t i s e , however, o n l y 59 cmH 20 i s p o s s i b l e , a s t h e low power, s i n g l e s u p p l y op amps us e d t o a m p l i f y t h e s i g n a l (LM324) s a t u r a t e a t 3.5 v o l t s . The a v a i l a b l e r a n g e has been s e t t o a l l o w a r e s p o n s e of up t o 52 cmH 20 of p o s i t i v e p r e s s u r e , and 7 cmH 20 o f n e g a t i v e p r e s s u r e . Symmetric p o s i t i v e / n e g a t i v e p r e s s u r e r e s p o n s e s a r e not n e c e s s a r y , as few, i f any, b r e a t h i n g c i r c u i t f a u l t s p r o d u c e more t h a n 5 cmH 20 of n e g a t i v e p r e s s u r e . Figure 5.3 DPM/SDK Timing/Monitoring Circuits 51 5.4 T i m i n g / M o n i t o r i n g C i r c u i t s A key f e a t u r e of any l i f e s u p p o r t m o n i t o r i n g d e v i c e i s t h e a b i l i t y o f t h e d e v i c e t o m o n i t o r i t s e l f . Component f a i l u r e s and o t h e r p o t e n t i a l l y h a z a r d o u s i n t e r n a l e v e n t s must be d e t e c t e d , and must c a u s e a l a r m s , i f t h e d e v i c e i s t o r e l i a b l y meet i t s r e q u i r e m e n t s . The DPM/SDK c o n s t a n t l y m o n i t o r s b o t h t h e p r o c e s s i n g s y s t e m and t h e d a t a a c q u i s i t i o n s y s t e m , e n s u r i n g t h a t n e i t h e r may f a i l u n d e t e c t e d . T h i s i n t e r n a l m o n i t o r i n g i s p e r f o r m e d by a mix of hardware and s o f t w a r e . F a i l u r e s i n d a t a a c q u i s i t i o n components ahead of t h e A/D w i l l r e s u l t i n a b n o r m a l d a t a s a m p l e s , and so, w i l l be d e t e c t e d by t h e s o f t w a r e . None of t h e s e components need, t h e r e f o r e , be m o n i t o r e d i n h a r d w a r e . N e i t h e r i s i t n e c e s s a r y t o m o n i t o r t h e SC g e n e r a t i o n c i r c u i t s , as f a i l u r e t o g e n e r a t e t h i s s i g n a l w i l l be d e t e c t e d by a s o f t w a r e t i m e r . A l l t h a t must be m o n i t o r e d , t h e n , i s t h e A/D i t s e l f . S i m i l a r i l y , f a i l u r e s i n any p a r t of t h e p r o c e s s i n g s y s t e m w i l l be r e f l e c t e d i n a l a c k o f c o r r e c t p r o c e s s o r r e s p o n s e t o t h e A/D " d a t a r e a d y " s i g n a l . Hence, t o e n s u r e t h a t n e i t h e r t h i s s y s t e m nor t h e d a t a a c q u i s i t i o n s y s t e m f a i l s i n a h a z a r d o u s mode, i t i s n e c e s s a r y o n l y t o m o n i t o r t h e A/D, and t h e p r o c e s s o r ' s r e s p o n s e t o t h e A/D. Hardware m o n i t o r i n g i s , t h e r e f o r e , b a s e d on t i m i n g of t h e p r o c e s s o r - A / D i n t e r a c t i o n as a d a t a sample i s a c q u i r e d . When t h e s t a r t c o n v e r s i o n p u l s e i s g e n e r a t e d , i t i s u s e d t o t r i g g e r n o t o n l y t h e A/D, but a l s o a m o n o s t a b l e m u l t i v i b r a t o r t i m e r (See F i g u r e 5 . 3 ) . The o u t p u t of t h i s t i m e r i s t i e d t o t h e n e g a t i v e edge t r i g g e r e d " c l o c k " i n p u t of a J-K f l i p f l o p , s e t i n t h e 52 t o g g l e mode. The o u t p u t of t h i s f l i p f l o p , c o n n e c t e d t o t h e s y s t e m ' s a u d i o a l a r m , w i l l t o g g l e , p r o v i d i n g d r i v e t o t h e a l a r m , i f t h e m o n o s t a b l e c o m p l e t e s i t s t i m i n g d u r a t i o n w i t h o u t i n t e r r u p t i o n . T i m i n g i n t e r r u p t i o n w i l l , however, n o r m a l l y o c c u r when t h e p r o c e s s o r r e s p o n d s t o t h e A/D's " d a t a r e a d y " s i g n a l , w i t h a t e m p o r a r y a s s e r t i o n t h e Data Ready Acknowledge (DRA) l i n e , an 8155 I/O l i n e t i e d t o b o t h t h e " R e s e t " o f t h e t i m e r , and t h e " C l e a r " of t h e J-K. T h i s r e s p o n s e c a n c e l s t h e t i m i n g p e r i o d and s i m u l t a n e o u s l y c l e a r s t h e J-K, p r e v e n t i n g t h e s t a t e t r a n s i t i o n w h i c h would o t h e r w i s e o c c u r from t i m e r c a n c e l l a t i o n . A c o n t i n u o u s f a i l u r e o f e i t h e r t h e A/D t o s i g n a l d a t a r e a d y , or of t h e p r o c e s o r t o r e s p o n d t o t h a t s i g n a l , r e s u l t s i n a t i m e r / J - K d r i v e n 12.5 Hz. a l a r m p a t t e r n , g e n e r a t i n g a d i s t i n c t i v e a u d i o o u t p u t . T i m i n g t h e SC t o DRA r e s p o n s e t i m e has t h e a d v a n t a g e of m o n i t o r i n g b o t h t h e p r o c e s s i n g s y s t e m and t h e A/D, as a f a i l u r e i n e i t h e r w i l l r e s u l t i n t h e e s t a b l i s h m e n t o f a t o g g l i n g a l a r m . I t d o e s , however, have t h e d i s a d v a n t a g e o f making i t i m p o s s i b l e t o a s s i g n r e s p o n s i b i l i t y f o r a hard w a r e a l a r m . A l l t h a t i s known i s t h a t e i t h e r one o r t h e o t h e r has. f a i l e d . As a f i n a l s a f e g u a r d , t h e DRA l i n e i t s e l f i s m o n i t o r e d by a s i m p l e RC one s t a g e c i r c u i t ; t h i s t o d e t e c t c o n t i n u e d a s s e r t i o n o f t h a t l i n e , w h i c h would d i s a b l e t h e above m o n i t o r i n g h a r d w a r e . The o u t p u t of t h i s RC network i s OR'd w i t h t h e t o g g l i n g o u t p u t o f t h e m o n i t o r i n g c i r c u i t , and t h e r e s u l t i s u s e d t o d r i v e n ot o n l y t h e a u d i o a l a r m , b u t a l s o a f r o n t p a n e l " m a l f u n c t i o n " LED ( s e e F i g u r e 5 . 4 ) . R 2 1 ens. P B S * Aft' A M « 3 > J/4 7 4 L S 3 2 I M 7 4 L S 3 2 S O N A L E R T J / 6 7 4 0 4 1/6 7 4 0 4 R22< Dl 2 'MALFUNCTION Figure 5.4 , DPM/SDK Sonalert and Malfunction LED Drive Circuits 54 5.5 O u t p u t C i r c u i t s The DPM/SDK o u t p u t s , i n f o r m a t i o n c o n c e r n i n g i t ' s s o f t w a r e / h a r d w a r e s t a t u s v i a 2 L i t r o n i x DL1414 f o u r c h a r a c t e r a l p h a n u m e r i c d i s p l a y s ( s e e F i g u r e 5.5), an a u d i o a l a r m , and t h e " m a l f u n c t i o n " LED. The DL1414 d i s p l a y s a r e t h e most power i n t e n s i v e o f a l l of t h e non S D K - s t a n d a r d components i n t h e s y s t e m , but were c h o s e n f o r t h e i r e x c e p t i o n a l i n t e l l i g e n c e ( t h e y a c c e p t s t a n d a r d 7 b i t A S C I I ) and e a s e of i n t e r f a c i n g ( t h e y a p p e a r t o be 8 b y t e s of W r i t e O n l y Memory, and c o n t a i n on b o a r d r e f r e s h d r i v e r s ) , w h i c h s u b s t a n t i a l l y r e d u c e s t h e number of c h i p s r e q u i r e d t o implement a v i s u a l d i s p l a y s y s t e m . These d i s p l a y s a r e LED b a s e d , a l l o w i n g them t o be seen i n d a r k e n e d o p e r a t i n g t h e a t r e s . LCD d i s p l a y s c o u l d have been u s e d , and w i t h f a r l e s s e n e r g y c o n s u m p t i o n , b u t t h e s a v i n g s would have been o f f s e t by t h e n e c e s s i t y of l i g h t i n g them so a s t o make them v i s i b l e i n low l i g h t c o n d i t i o n s . A u d i o o u t p u t i s p r o v i d e d by a low c o s t S o n a l e r t a l a r m , d r i v e n by an OR'd c o m b i n a t i o n o f t h e DPM s o f t w a r e ' s a l a r m i n d i c a t o r ( t h r o u g h an 8155 I/O l i n e ) , t h e SC t o DRA t i m i n g c i r c u i t , and t h e DRA a s s e r t i o n m o n i t o r i n g c i r c u i t . E a c h o f t h e s e s o u r c e s p r o d u c e s a u n i q u e p a t t e r n of sound p u l s e s , a l l o w i n g e a s y a u d i o d i f f e r e n t i a t i o n of a l a r m s o u r c e s . V 1 . 7 4 L S 1 3 8 Y 0 , 7 4 l S t 3 8 OATA BUS to n t*« O Q O — o a\ Q O Z -±r D L H H « •» 15 ; 5 y lO tn I M ~ O Q aoo ° o 2 o D L H H «> * K - o H o o IS < < £ FI ADDRESS BUS T A Figure 5.5 DPM/SDK Visual Output Circuit 56 5.6 C a l i b r a t i o n The a l g o r i t h m i m p l e m e n t e d f o r t h e DPM/SDK i s e s s e n t i a l l y s e l f r e l a t i v e , but a c c u r a c y r e m a i n s e x t r e m e l y i m p o r t a n t f o r t h e a b s o l u t e l i m i t t e s t i n g a t l e a r n t i m e , and f o r t h e s e t t i n g of m e a n i n g f u l • t h r e s h o l d s and t o l e r a n c e s w i t h i n t h e a l g o r i t h m . To t h i s end, a method must e x i s t by w h i c h t h e d e v i c e may be c a l i b r a t e d . I t i s p r e f e r r a b l e t h a t t h i s method be c o m p l e t e l y under CPU c o n t r o l , a s t h i s r e l i e v e s t h e o p e r a t o r o f t h e n e c e s s i t y o f p e r f o r m i n g a t o o e a s i l y f o r g o t t e n c a l i b r a t i o n c h e c k , t h e a b s e n c e of w h i c h might s e r i o u s l y a f f e c t t h e d e v i c e ' s a b i l i t y t o make i n t e l l i g e n t d e c i s i o n s . A l l o f t h e d e v i c e s c o m p r i s i n g t h e d a t a a c q u i s i t i o n s y s t e m have e x c e l l e n t l i n e a r i t y r a t i n g s . I f t h e s e s p e c i f i c a t i o n s a r e assumed t o be c o r r e c t , t h e o n l y s o u r c e of c a l i b r a t i o n e r r o r i n th e s y s t e m i s t h e XDUCER' s a t m o s p h e r i c o f f s e t v o l t a g e , , w h i c h has a l a r g e s t a t e d v a r i a b i l i t y . A knowledge o f t h i s o f f s e t , t h e n , c o u p l e d w i t h an a s s u m p t i o n of l i n e a r i t y i n t h e r e m a i n d e r of t h e a n a l o g d e v i c e s , a l l o w s c o m p l e t e c a l i b r a t i o n o f t h e DPM/SDK. To automate t h e t a s k of m e a s u r i n g t h i s o f f s e t , a two way e l e c t r o - p n e u m a t i c v a l v e has been p l a c e d between t h e XDUCER and t h e b r e a t h i n g c i r c u i t p r e s s u r e i n p u t , a l l o w i n g t h e CPU t o s w i t c h t h e XDUCER i n p u t s o u r c e from t h e b r e a t h i n g c i r c u i t t o a t m o s p h e r e . The s y s t e m s o f t w a r e u s e s t h i s c a p a b i l i t y t o measure t h e a t m o s p h e r i c o f f s e t a t t h e b e g i n n i n g of e a c h m o n i t o r i n g t a s k . T h i s e n s u r e s t h a t t h e DPM/SDK i s a l w a y s f u l l y c a l i b r a t e d b e f o r e u s e . The v a l v e a c t u a t i o n c i r c u i t may be seen i n F i g u r e 5.6 . 57 CLIPPARD R20 6155 — £ » W V PB6 Figure 5.6 DPM/SDK Clippard Valve Actuation C i r c u i t 58 5 . 7 S u m m a r y T h e f o u r m a j o r s y s t e m s o f t h e DPM/SDK, t h e p r o c e s s i n g s y s t e m , t h e d a t a a c q u i s i t i o n s y s t e m , t h e m o n i t o r i n g s y s t e m , a n d t h e o u t p u t s y s t e m , h a v e b e e n d e t a i l e d , a n d h a r d w a r e m o n i t o r i n g , a s i t p e r t a i n s t o t h e p r o c e s s i n g a n d d a t a a c q u i s i t i o n s y s t e m s , h a s b e e n d e s c r i b e d . T h e s e l f c a l i b r a t i o n m o d e o f t h e DPM/SDK s o f t w a r e h a s b e e n e x p l a i n e d i n c o n j u n c t i o n w i t h t h e c a l i b r a t i o n s p e c i f i c h a r d w a r e . 59 CHAPTER 6  THE DPM/SDK DEVICE 6.1 H a r d w a r e / S o f t w a r e B a s i c s The p r e s e n t DPM p r o t o t y p e i s c o m p r i s e d o f t h r e e s e p a r a t e components; t h e s e b e i n g (1) a power s u p p l y , (2) t h e SDK b o a r d , and (3) a Hammond box c a b i n e t , w h i c h i s a mock up o f an a c t u a l DPM. T h i s c a b i n e t c o n t a i n s a l l o f t h e s y s t e m p e r i p h e r a l s ( d i s p l a y s , a l a r m s , e t c . ) , and i s c o n n e c t e d t o t h e SDK b o a r d by two 14 p i n r i b b o n s . The c o m p l e t e d e v i c e i s shown i n F i g u r e 6.1 . Such a p h y s i c a l c o n f i g u r a t i o n i s not s u i t e d f o r c o n t i n u o u s u s e , but i s s u f f i c i e n t f o r t h e p u r p o s e of s o f t w a r e / h a r d w a r e e v a l u a t i o n . The DPM a l g o r i t h m has been implemented i n t h e h i g h l e v e l l a n g u a g e C [ 2 5 ] , which c an be c r o s s c o m p i l e d on a PDP 11/03, owned by t h e VGH Department o f B i o m e d i c a l E n g i n e e r i n g , and downloaded t o EPROM. The c u r r e n t p r o g ram o c c u p i e s j u s t under 4 K i l o b y t e s , and i s i n c l u d e d a s A p p e n d i x B. (The s o f t w a r e SC g e n e r a t i o n t i m e r , d e s c r i b e d i n C h a p t e r 5, had t o be o m i t t e d t o a c h i e v e t h i s s i z e . ) The p r o g r a m c o n s i s t s o f 13 f u n c t i o n s w h i c h t o g e t h e r m a n i p u l a t e t h r e e g l o b a l d a t a a r r a y s , FEATURES, CC, and BASELINE, i n a manner w h i c h implements t h e p r e v i o u s l y d e s c r i b e d a l g o r i t h m . D u r i n g p r o c e s s i n g o f e a c h c y c l e , f e a t u r e s a r e e x t r a c t e d from t h e d a t a and p a c k e d i n t o t h e a r r a y FEATURES. A t t h e end of e a c h c y c l e , t h e e l e m e n t s o f t h i s a r r a y a r e examined by t h e m o n i t o r i n g r o u t i n e , w h i c h d e t e r m i n e s whether t h e y a r e above, F i gure 6 , 1 The DPM/SDK D e v i c e 61 below, or w i t h i n a p r e s e t t o l e r a n c e of t h e c o r r e s p o n d i n g BASELINE v a l u e . I n f o r m a t i o n c o n t a i n i n g t h i s s t a t u s i s p a c k e d i n t o t h e CC ( C o n d i t i o n Codes) a r r a y , w h i c h i s t h e n i n t e r p r e t e d by t h e r o u t i n e r e s p o n s i b l e f o r a l a r m i n g . T h i s r e s u l t s i n a l a r m s e t up o r r e s e t as t h e e l e m e n t s of CC i n d i c a t e n e c e s s a r y . P r i o r i t y o r d e r i n g o f a l a r m s i s a c c o m p l i s h e d by p a c k i n g t h e e l e m e n t s o f CC i n t h e o r d e r of most i m p o r t a n c e t o l e a s t i m p o r t a n c e ; t h i s o r d e r h a v i n g been d e s c r i b e d i n C h a p t e r 4. The o r d e r i n g of CC c o r r e s p o n d s t o t h e o r d e r i n g - o f b o t h t h e FEATURES and BASELINE a r r a y s , s u c h t h a t C C [ 0 ] i n d i c a t e s t h e s t a t u s o f FEATURES[0] r e l a t i v e t o B A S E L I N E [ 0 ] . 6.3 A F u n c t i o n a l D e s c r i p t i o n From an o p e r a t o r ' s v i e w p o i n t , t h e DPM/SDK has o n l y two s t a t e s ; t h e WAIT s t a t e and t h e MONITOR s t a t e . When i n e i t h e r s t a t e , d e p r e s s i o n o f t h e f r o n t p a n e l WAIT/MONITOR key w i l l c a u s e a t r a n s i t i o n t o t h e o t h e r . T h i s i s t r u e e x c e p t when t h e d e v i c e i s a l a r m i n g , d u r i n g w h i c h t i m e a l l a t t e m p t s t o r e t u r n t o t h e WAIT s t a t e a r e d i s s a l l o w e d . I n t e r n a l l y , t h e d e v i c e i s a l w a y s i n one o f f i v e s t a t e s , w i t h s t a t e t r a n s i t i o n s o c c u r r i n g i n r e s p o n s e t o d i s c r e t e i n t e r n a l and e x t e r n a l ( keypad) e v e n t s . F i g u r e 6.2 p r e s e n t s a s t a t e d i a g r a m of t h e DPM program. The d e f a u l t s t a t e i s t h e WAIT s t a t e , w h e r e i n t h e d e v i c e sounds a u d i o a l a r m s , and d i s p l a y s "WAITING" on t h e a l p h a d i s p l a y s . D e p r e s s i o n of t h e WAIT/MONITOR key c a u s e s an e x i t t o t h e I N I T I A L I Z E s t a t e . T h i s s t a t e d i s p l a y s t h e message "M (LRN)", t o i n d i c a t e t h a t 62 63 t h e d e v i c e i s b e g i n n i n g t o l e a r n t h e d a t a , and t o c r e a t e t h e i m p r e s s i o n t h a t t h e u s e r v i s i b l e WAIT s t a t e has ch a n g e d t o t h e u s e r v i s i b l e MONITOR s t a t e ( i d e n t i f i e d by an "M" d i s p l a y ) . D u r i n g t h e I N I T I A L I Z E s t a t e , t h e PEEP l e v e l i s measured, and t h e pr o g r a m i s s y n c h r o n i z e d w i t h t h e d a t a . I f t h i s i s s u c c e s s f u l l y a c c o m p l i s h e d , an e x i t o c c u r s t o t h e LEARN s t a t e ; e l s e , t h e d e v i c e r e t u r n s t o t h e WAIT s t a t e . The LEARN s t a t e , w h i c h c o n t i n u e s t o o u t p u t t h e "M (LRN)" message, p r e v a i l s u n t i l c y c l i n g i s e s t a b l i s h e d , and t h e b a s e l i n e has been b u i l t . I f t h i s c a n n o t be s u c c e s s f u l l y a c c o m p l i s h e d , a r e t u r n i s made t o t h e WAIT s t a t e . I f t h e LEARN s t a t e c o n c l u d e s n o r m a l l y , however, an e x i t o c c u r s t o t h e MONITOR s t a t e , w h i c h i s i d e n t i f i e d by an " M " d i s p l a y . T h i s s t a t e i m p l ements t h e b a s i c m o n i t o r i n g f u n c t i o n o f t h e DPM, and as such i s t h e dominant s t a t e of t h e d e v i c e . T h i s s t a t e may be e x i t e d by an o p e r a t o r d e p r e s s i o n of t h e WAIT/MONITOR key, or by t h e d e t e c t i o n of a b a s e l i n e r e l a t i v e e r r o r . In t h e c a s e o f a WAIT/MONITOR key d e p r e s s i o n , an e x i t o c c u r s t o t h e WAIT s t a t e , w h i l e i n t h e c a s e of a b a s e l i n e r e l a t i v e e r r o r , an e x i t i s made t o t h e ALARM s t a t e . The ALARM s t a t e sounds a u d i o a l a r m s , and f l a s h e s an a p p r o p r i a t e message on t h e d i s p l a y s , w h i l e c o n t i n u i n g t h e n o r m a l m o n i t o r i n g f u n c t i o n of t h e d e v i c e . ALARM messages name a p a r t i c u l a r f e a t u r e , and i n d i c a t e whether t h i s f e a t u r e i s h i g h o r low, r e l a t i v e t o t h e b a s e l i n e . T h i s s t a t e may o n l y be e x i t e d by c o r r e c t i n g t h e u n d e r l y i n g a l a r m c o n d i t i o n , o r r e s e t t i n g t h e d e v i c e f r o m t h e SDK keypad. (See A p p e n d i x A, t h e DPM/SDK O p e r a t o r ' s M a n ual, f o r c o m p l e t e i n f o r m a t i o n on a l a r m s . ) The 64 WAIT/MONITOR key i s sampled, but t h e a c t i o n s n o r m a l l y r e s u l t i n g f r o m a d e p r e s s i o n of t h i s key a r e i n h i b i t e d , e n s u r i n g t h a t t h e o p e r a t o r c a n n o t , i n t e n t i o n a l l y o r o t h e r w i s e i g n o r e an a l a r m c o n d i t i o n . A u d i o a l a r m s c a n n o t be c a n c e l l e d , but may be s u p p r e s s e d f o r one mi n u t e i n t e r v a l s , by d e p r e s s i o n of t h e ALARM SUPPRESS key. 6.4 D e v i c e C a p a b i l i t i e s and L i m i t a t i o n s The DPM/SDK d e v i c e i m p l e m e n t s an " i n t e l l i g e n t " m o n i t o r i n g scheme, and t h u s r e p r e s e n t s a m a j o r improvement o v e r a v a i l a b l e DPMs. B e c a u s e i t o b s e r v e s t h e shape of t h e waveform r a t h e r t han j u s t t h e m a g n i t u d e , i t i s c a p a b l e of d e t e c t i n g a b n o r m a l i t i e s a s s o c i a t e d w i t h a wide range o f b r e a t h i n g c i r c u i t p r o b l e m s w h i c h a r e f r e q u e n t l y m i s s e d by c o n v e n t i o n a l DPMs. T e s t i n g has shown t h a t t h i s d e v i c e w i l l f u r t h e r d e t e c t most a d j u s t m e n t s of v e n t i l a t o r y p a r a m e t e r s , a t a s k p r e v i o u s DPMs were i n c a p a b l e of p e r f o r m i n g . E x c l u d i n g t h e i s s u e s of p a c k a g i n g and power c o n s u m p t i o n , t h e p r o t o t y p e d e v e l o p e d has t h r e e i n h e r e n t w e a k n e s s e s . The f i r s t o f t h e s e c o n c e r n s t h e p r e v i o u s l y m e n t i o n e d i n a b i l i t y t o d e t e c t some c a s e s of v e n t i l a t o r y p a r a m e t e r a d j u s t m e n t , p r i m a r i l y t h o s e r e s u l t i n g i n r a d i c a l l y h i g h e r b r e a t h i n g f r e q u e n c i e s . The s e c o n d weakness i n v o l v e s t h e a l s o p r e v i o u s l y m e n t i o n e d s a t u r a t i o n of t h e a m p l i f i e r s u s e d i n t h e d a t a a c q u i s i t i o n s y s t e m . When o p e r a t i n g n e a r t h e maximum p r e s s u r e i n p u t l e v e l o f 52 cmH 20, i n c r e a s e s i n p r e s s u r e may o c c u r u n d e t e c t e d , a s t h e i n c r e a s e d t r a n s d u c e r o u t p u t i s c l i p p e d by t h e a m p l i f i e r , r e s u l t i n g i n no 65 a p p a r e n t l e v e l i n c r e a s e . The t h i r d weakness i s f u n d a m e n t a l t o t h e n a t u r e of t h i s d e v i c e . B e c a u s e i t c a n o b s e r v e o n l y t h e p r e s s u r e c a u s e d by t h e r e s p i r a t o r y g a s s e s , and not t h e c o m p o s i t i o n of t h e s e g a s s e s , i t i s p o s s i b l e t h a t a h y p o x i c gas m i x t u r e may e x i s t w i t h i n t h e c i r c u i t w i t h o u t a c t i v a t i o n of DPM a l a r m s . T h i s p r o b l e m , w h i l e n o t s t r i c t l y w i t h i n t h e r e a l m of d i s c o n n e c t / p r e s s u r e m o n i t o r i n g , i s one w h i c h c an be e a s i l y s o l v e d w i t h i n t h e c o n t e x t of an i n t e l l i g e n t m o n i t o r , w i t h t h e a d d i t i o n of f u r t h e r ' s e n s o r s y s t e m s ( p e r h a p s f o r 0 2 c o n c e n t r a t i o n , or C 0 2 c o n c e n t r a t i o n ) and a d d i t i o n s t o t h e e x i s t i n g s o f t w a r e . The use of m u l t i p l e s e n s o r i n p u t s f o r t h e t a s k of d i s c o n n e c t m o n i t o r i n g i s d i s c u s s e d a t l e n g t h i n [ 2 6 ] . 6.5 Summary The p h y s i c a l c o n f i g u r a t i o n o f t h e DPM/SDK has been d e s c r i b e d , and f o u n d t o be s u f f i c i e n t f o r t h e t a s k o f p r e l i m i n a r y e v a l u a t i o n . An o v e r v i e w of t h e s y s t e m s o f t w a r e has been p r e s e n t e d , and i t s mode o f o p e r a t i o n b r i e f l y o u t l i n e d . A f u n c t i o n a l d e s c r i p t i o n o f t h e DPM/SDK has been p r e s e n t e d , and f i n a l l y , t h e d e v i c e ' s c a p a b i l i t i e s and l i m i t a t i o n s have been e x a m i n e d . I t has been c o n c l u d e d t h a t t h e DPM/SDK i s s i g n i f i c a n t l y more e f f e c t i v e t h a n p r e s e n t DPMs a t t h e t a s k of d i s c o n n e c t m o n i t o r i n g . 66 CHAPTER 7  DPM/SDK EVALUATION 7.1 I n t r o d u c t i o n The d e v i c e d e s c r i b e d i n t h e p r e c e e d i n g c h a p t e r has been s u b j e c t e d t o a r i g o r o u s s e t o f t e c h n i c a l t r i a l s , and a s h o r t , one day s e t of c l i n i c a l t r i a l s . The r e s u l t s o f t h e s e t r i a l s , and recommendations a r i s i n g as a r e s u l t t h e r e o f , a r e p r e s e n t e d i n t h i s c h a p t e r . U n f o r t u n a t e l y , t h e a u t h o r ' s e x t r e m e l y t i g h t t i m e t a b l e has made i t i m p o s s i b l e t o a c t upon t h e recommendations h e r e p r e s e n t e d . 7.2 T e c h n i c a l T r i a l s T e c h n i c a l t r i a l s o f t h e DPM/SDK were u n d e r t a k e n i n t h e A n e s t h e s i o l o g y l a b of t h e V a n c o u v e r G e n e r a l H o s p i t a l , u s i n g a D r a g e r a n e s t h e s i a v e n t i l a t o r , and a Bourns l u n g s i m u l a t o r . P r e s s u r e . samples were t a k e n d i r e c t l y f r o m t h e e n d o t r a c h e a l c o n n e c t o r . The e x p e r i m e n t a l s e t u p a p p e a r s a s F i g u r e 7.1 . The t r i a l p r o c e d u r e was d e v e l o p e d by t h e VGH B i o m e d i c a l E n g i n e e r i n g D e p a r t m e n t , and i n c l u d e d t e s t i n g o f t h e d e v i c e s ' s a b i l i t i e s t o d e t e c t a l m o s t a l l of t h e p r e v i o u s l y m e n t i o n e d d i s c o n n e c t s and f a u l t s , and t e s t i n g o f d e v i c e s t a r t u p under v a r i o u s p r e - e x i s t i n g f a u l t c o n d i t i o n s . The d e v i c e ' s a b i l i t y t o d e t e c t v e n t i l a t i o n p a r a m e t e r a d j u s t m e n t s was t e s t e d by moving between s e l e c t e d t r i a l p r o c e d u r e p a r a m e t e r s e t s w i t h o u t r e s e t t i n g t h e d e v i c e . The e x p e r i m e n t a l d a t a s h e e t , c o n t a i n i n g t h e t r i a l r e s u l t s i s i n c l u d e d a s T a b l e 7.1 . TABLE 7.1 D P M / S D K T E C H N I C A L T R I A L S R E S U L T S *9 £e L U N G S I M V E N T I L A T O R j i N D O T R A D I C A L K I N K K I N K Q X P L E A K V A P , D I S C D I S C J D , S C BLOCK SIAC B R F R [ L P M T R O J V O L ( 0 P M ) (ml) D I S C O N N E f T O C C L INSP X 111 < cc o u. NO E T DISC o LOW CM • INLET . OUTLET C O M G A S 0 2 A N A L BLOCK SIAC c R C K T 0% | ' J 6 % l O C C L j O C C L INSP NO E T DISC LOW INLET . OUTLET BLOCK SIAC 0 5 0 5 C 6 1 0 7 5 0 </ </ • y y % y y y y y 2 0 y y y y y y y X y y y y y y 3 0 y y y y y y y X y y y y y y 0 2 0 5 C 6 1 0 7 5 0 y y y y y y y X y y y y y y 2 0 y y y y y y y y y y y y y 3 0 y y y y y y y y y y y y 0 1 0 5 c 6 1 0 7 5 0 y y y y y y y K y y y y y 2 0 y y y y y y y y y y y y y 3 0 y y y y y y y y y y y y 0 2 0 S O c 6 1 0 7 5 0 y y y y y y y X y y y y y y 2 0 y y y y y y y X y y y y y y 3 0 y y y y y y y X y y ^ y y y 0 2 0 2 0 0 c 6 1 0 7 5 0 y y y y y y y X y y y \s-2 0 y y y y y y y\ X- y y y y y y 3 0 y y y y y y y r- y y y y y y 0 2 0 5 0 c 6 1 0 2 5 0 y y y y y y y X y y y y y \s-5 0 0 y y y y y y y X. y y y y y y 1 0 0 0 s s-y y y y y X y y y y y y 0 2 0 5 0 c 6 3 0 1000 — y y y y y y y y y y y y y 15 5 0 5 c 6 2 0 2 5 0 y y y y y X y X y y y y y y 5 0 0 y y y y y y y X. y y y y y y 7 5 0 y y y y y y y X y y y y y y 1 0 0 0 y y y y y y y y y y y y y y 0 5 0 5 c 6 2 0 7 5 0 X X y X X y X y y X X X X y 0 5 0 5 B 6 2 0 2 5 0 y y y y y y y X y y y y y y 5 0 0 y y y y y y y X y y y y y y 7 5 0 y y y y y y y X y y y y y y • 0 0 0 y y y y y y y X y y y y y y IS 5 0 5 3 6 2 0 0 0 0 ft Start u p under A b n o r m a l c o n d i t i o n check • DPM a l a r m e d , s t a r t e d X DPM d i d not alarm,start 69 Two of t h e t e s t s p e r f o r m e d r e q u i r e some e x p l a n a t i o n . These a r e d i s c o n n e c t i o n s a t t h e oxygen a n a l y z e r , and b l o c k a g e of t h e s c a v e n g i n g l i n e ; t h e l a s t two i t e m s on t h e t e s t s h e e t . An oxygen a n a l y z e r i s now i n c l u d e d i n most a n e s t h e t i c c i r c u i t s , and c o n s i s t s of a h o l l o w a d a p t e r / s e n s o r , w h i c h i s f r e q u e n t l y p l a c e d i n t o t h e i n s p i r a t o r y l i m b of t h e b r e a t h i n g c i r c u i t , and a c o n n e c t i n g w i r e back t o t h e a n a l y z e r i t s e l f . The i n s p i r a t o r y h o s i n g may e a s i l y become d i s c o n n e c t e d from t h e a d a p t e r / s e n s o r , and s o , t h e DPM/SDK's a b i l i t y t o d e t e c t t h i s f o r m o f d i s c o n n e c t was t e s t e d . The C i r c l e b r e a t h i n g s y s t e m adds a volume o f f r e s h gas t o t h e c i r c u i t on e a c h b r e a t h , r e q u i r i n g t h a t an e q u a l amount be v e n t e d from t h e c i r c u i t t o a v o i d d a n g e r o u s gas b u i l d u p . T h i s gas c a n n o t be v e n t e d d i r e c t l y t o a t m o s p h e r e , due t o t h e a n e s t h e t i c a g e n t i t c o n t a i n s , and so, i s c a r r i e d away by a s u c t i o n i n g l i n e and s a f e l y v e n t e d e l s e w h e r e . The l a s t e x p e r i m e n t p e r f o r m e d , l a b e l l e d BLOCK SIAC, i n v o l v e s t h e b l o c k a g e of t h i s l i n e . The a b i l i t y of t h e DPM/SDK t o d e t e c t b r e a t h i n g c i r c u i t f a u l t s was t e s t e d under a wide v a r i e t y of c i r c u i t c o n d i t i o n s , and w i t h two d i f f e r e n t b r e a t h i n g c i r c u i t s ; t h e p r e v i o u s l y d e t a i l e d C i r c l e s y s t e m , and t h e B a i n s y s t e m . The p r i n c i p l e s of t h e B a i n s y s t e m a r e s i m i l a r t o t h o s e of t h e C i r c l e s y s t e m , w i t h t h e major d i f f e r e n c e b e i n g t h e use of a b i - d i r e c t i o n a l i n s p i r e / e x p i r e l i n e . T h i s r e d u c e s t h e amount o f h o s i n g n e a r t h e p a t i e n t ' s head, and i s t h u s p r e f e r r e d d u r i n g s u r g i c a l p r o c e d u r e s i n v o l v i n g t h e head and neck. T r i a l r e s u l t s show t h a t t h e DPM/SDK p e r f o r m e d e x t r e m e l y 70 w e l l on f a u l t d e t e c t i o n and p a r a m e t e r a d j u s t m e n t d e t e c t i o n , f a i l i n g t o d e t e c t o n l y s m a l l c i r c u i t l e a k s , w h i c h p r o d u c e o n l y l i m i t e d e f f e c t s on t h e p r e s s u r e waveform. T e s t s p e r f o r m e d p r i o r t o t h e s e t r i a l s , u s i n g a D r a g e r DPM, showed t h a t t h i s d e v i c e was i n c a p a b l e o f d e t e c t i n g more t h a n h a l f of t h e c o n d i t i o n s t e s t e d d u r i n g t h e DPM/SDK t r i a l s . P r e d i c t a b l y , t h e DPM/SDK d i d a l l o w s t a r t u p u nder s e v e r a l p r e - e x i s t i n g f a u l t c o n d i t i o n s , due t o t h e g e n e r a l i t y o f t h e a b s o l u t e l i m i t s u s e d a t l e a r n t i m e . 7.3 C l i n i c a l T r i a l s C l i n i c a l t r i a l s o f t h e DPM/SDK were c o n d u c t e d a t t h e V a n c o u v e r G e n e r a l H o s p i t a l , C e n t e n n i a l P a v i l i o n OR. D u r i n g t h e one day o f t r i a l s , t h e DPM/SDK was r u n i n p a r a l l e l w i t h e x i s t i n g DPMs d u r i n g f o u r d i f f e r e n t s u r g i c a l p r o c e d u r e s . ( P r e s s u r e waveform c h a r t r e c o r d i n g s a r e p r e s e n t e d i n A p p e n d i x C.) The DPM/SDK, mounted on a w h e e l e d c a r t , was o p e r a t e d s o l e l y , by t h e a u t h o r , and one a n e s t h e s i o l o g y r e s i d e n t who had been a s s i g n e d t o t h e t r i a l s . The a n e s t h e t i s t s p e r f o r m i n g t h e s u r g i c a l a n e s t h e s i a were n o t a s k e d t o o p e r a t e t h e DPM/SDK, but were g i v e n an e x p l a n a t i o n o f t h e o p e r a t i n g p r i n c i p l e s o f t h e d e v i c e , and were s o l i c i t e d f o r t h e i r o p i n i o n s of t h e d e v i c e and i t s o p e r a t i o n . The DPM/SDK was w e l l r e c e i v e d i n a l l c a s e s , w i t h a l l of t h e i n v o l v e d a n e s t h e t i s t s g i v i n g p o s i t i v e a s s e s s m e n t s . The r e s u l t s of t h e s e t r i a l s were g e n e r a l l y s a t i s f a c t o r y , a l t h o u g h i n one c a s e , a neck o p e r a t i o n r e q u i r i n g r e p e a t e d m a n i p u l a t i o n o f t h e a i r w a y , s e v e r a l f a l s e p o s i t i v e a l a r m s were g e n e r a t e d . A number o f s u g g e s t e d improvements t o d e v i c e 7 1 performance emerged from the c l i n i c a l t e s t i n g . Of g r e a t e s t importance was the suggestion that the present d e v i c e t o l e r a n c e s on almost a l l of the monitored f e a t u r e s are o v e r l y t i g h t , and should be r e l a x e d . T h i s i s of some importance because, as time elapse s d u r i n g a s u r g i c a l procedure, the muscle r e l a x a n t given to the p a t i e n t may begin to wear o f f , l e a d i n g to i n c r e a s i n g chest compliance, which n e c e s s i t a t e s i n c r e a s i n g pressures to assure adequate v e n t i l a t i o n . These pressure i n c r e a s e s may amount to s e v e r a l cmH20 over the p e r i o d of a s e v e r a l hour procedure. T h i s b a s e l i n e d r i f t i n the pressure waveform gave r i s e to two f a l s e p o s i t i v e determinations over the course of the c l i n i c a l t r i a l s . An a l t e r n a t i v e to t o l e r a n c e r e l a x a t i o n i s to p e r i o d i c a l l y update the b a s e l i n e . I f t h i s was done at h a l f hour i n t e r v a l s , without d i s t u r b i n g the devic e ' s monitoring f u n c t i o n , the e f f e c t s of b a s e l i n e d r i f t c o u l d be compensated f o r . Four other suggestions of s i g n i f i c a n t i n t e r e s t d i d emerge from these t r i a l s . Linked to the b a s e l i n e d r i f t of the pressure waveform, and the r e s u l t i n g f a l s e p o s i t i v e alarms, i s the n e c e s s i t y of r e t r a i n i n g the DPM/SDK a f t e r the ALARM s t a t e has been entered. P r e s e n t l y t h i s may be done only by r e s e t t i n g the device manually from the SDK keypad. B a s e l i n e d r i f t makes i t q u i t e important to allow the DPM/SDK to be returned to the WAITING s t a t e during an alarm c o n d i t i o n . It may be argued that - t h i s a l l o w s an easy alarm r e s e t , but as the WAITING s t a t e a l s o sounds alarms, t h i s i s not the case. The second of the above suggestions was that audio alarms be f i l t e r e d in much the same way as are v i s u a l alarms. T h i s 72 w o u l d r e q u i r e a two c y c l e r e p e t i t i o n of an a l a r m c o n d i t i o n b e f o r e any a u d i o i n d i c a t i o n w ould be g i v e n , e l i m i n a t i n g a l a r m s f r o m t e m p o r a r y one c y c l e e v e n t s , c a u s e d p r i m a r i l y by s u r g i c a l m a n i p u l a t i o n s of t h e p a t i e n t . A u d i o f i l t e r i n g would i n c r e a s e t h e t i m e d e l a y f o r an a l a r m r e s p o n s e t o a minimum of one c y c l e , but woul d a l s o d e c r e a s e t h e number of t e c h n i c a l l y c o r r e c t , but p h y s i o l o g i c a l l y i n s i g n i f i c a n t p o s i t i v e a l a r m d e t e r m i n a t i o n s . The t h i r d s u g g e s t i o n was t h a t t h e DPM/SDK s h o u l d , a t power up t i m e , a s s e r t a s o f t w a r e i n i t i a t e d 5 t o 10 m i n u t e a l a r m s u p p r e s s i o n i n t e r v a l . Such an i n t e r v a l would a l l o w t h e a n e s t h e t i s t t h i s p e r i o d of t i m e t o s t a b i l i z e v e n t i l a t i o n p a r a m e t e r s w i t h o u t h a v i n g t o r e p e a t e d l y s i l e n c e t h e WAIT s t a t e a l a r m s . F i n a l l y , i t was s u g g e s t e d t h a t t h e t o l e r a n c e s u s e d f o r t h e b a s e l i n e m o n i t o r i n g be d y n a m i c a l l y g e n e r a t e d as a f i x e d p e r c e n t a g e of t h e b a s e l i n e v a l u e . T h i s s u g g e s t i o n would w i t h o u t d o u b t improve t h e o p e r a t i o n of t h e d e v i c e a t t h e low and h i g h ends of i t s o p e r a t i n g p r e s s u r e l i m i t s , a t t h e c o s t o f added s o f t w a r e . 7.4 The Next G e n e r a t i o n T e c h n i c a l and c l i n i c a l t r i a l s have p r o v e n t h e e f f e c t i v e n e s s of t h e DPM/SDK, and as a r e s u l t , a new g e n e r a t i o n o f t h i s d e v i c e may now be d e s i g n e d . Such a g e n e r a t i o n s h o u l d i n c l u d e a l l of t h e har d w a r e and s o f t w a r e enhancements w h i c h have been m e n t i o n e d a t v a r i o u s t i m e s t h r o u g h o u t t h i s t h e s i s . T h e r e a r e t h r e e s p e c i f i c hardware enhancements w h i c h must 73 be included i f the next generation of the DPM/SDK is to be an ideal DPM. A l l are involved with the s h i f t from l i n e power to battery power, and are as follows: (1 ) The new DPM should be battery powered, and should be equipped in both the hardware and software senses with complete power supply monitoring c a p a b i l i t i e s , to avoid undiagnosed battery f a i l u r e s leading to device malfunction, or f a i l u r e to function. Rather than the discrete BATTERY TEST buttons, found on many present day DPMs, which do not always perform r e l i a b l y [14], such monitoring is envisaged as an internal function under processor control, giving r i s e to audio and visua l alarms when impending battery f a i l u r e i s detected. (2) This battery power supply should be switched on and off by a pressure actuated e l e c t r i c a l switch, placed in the ventilator's high pressure gas hosing. This would result in automatic act i v a t i o n and deactivation of the DPM, as the ve n t i l a t o r was activated and deactivated. (3) F i n a l l y , to extend the l i f e of the battery, a l l possible components of the processing system should be replaced with their low power equivalent parts. Aside from repackaging of the parts into a single smaller cabinet, one other hardware enhancement i s possible. This i s the elimination of the Intel 8185 RAM chip used in the processing system. Tests with the SDK monitor have shown that the DPM/SDK uses only 105 bytes of RAM, and as such, may be run in the 256 bytes of RAM provided with the 8155 RAM-I/O chip. This allows elimination of the $39.99 8185, and the savings of i t s 100 ma. active current draw. 74 S p e c i f i c s o f t w a r e enhancements. have been m e n t i o n e d p r e v i o u s l y , and i n c l u d e t h e a l l o w a n c e of an ALARM -> WAITING s t a t e t r a n s i t i o n , f i l t r a t i o n o f a u d i o a l a r m s , a power up a l a r m s u p p r e s s , and l o o s e n i n g or dynamic g e n e r a t i o n o f f e a t u r e t o l e r a n c e s . These i t e m s s h o u l d be imp l e m e n t e d , a l o n g w i t h s u i t a b l e work t o e n s u r e t h a t t h e r e s u l t a n t code w i l l s t i l l f i t i n t o 4 k i l o b y t e s . One s p e c i f i c enhancement has been i n c l u d e d i n th e s y s t e m s o f t w a r e s i n c e t h e c o n c l u s i o n of t r i a l s . T h i s was t h e a d d i t i o n of t h r e e l i n e s of c y c l i n g f a i l s a f e c o d e t o e n s u r e t h a t s y n c h r o n i z a t i o n i s n e v e r l o s t d u r i n g a t o t a l l o s s o f s i g n a l . A new g e n e r a t i o n DPM w h i c h adds t h e s e improvements t o t h e DPM/SDK w i l l p r o v e t o be a most u s e f u l and e f f e c t i v e DPM. 7 . 5 Summary T e c h n i c a l and c l i n i c a l t r i a l s o f t h e DPM/SDK have been d e s c r i b e d , and t h e r e s u l t s of t h e s e t r i a l s have been p r e s e n t e d . The DPM/SDK has been f o u n d t o be a r e l i a b l e and memory e f f i c i e n t d i s c o n n e c t m o n i t o r , and f a r more e f f e c t i v e a t t h i s t a s k t h a n p r e s e n t DPMs. C l i n i c a l l y , t h e DPM/SDK has been f o u n d t o be g e n e r a l l y s a t i s f a c t o r y , a l t h o u g h s e v e r a l s u g g e s t i o n s f o r improvements of a n e x t g e n e r a t i o n d e v i c e have a r i s e n . T hese s u g g e s t i o n s have been p r e s e n t e d , a l o n g w i t h s u g g e s t i o n s f o r hardw a r e s p e c i f i c e nhancements. I t has been c o n c l u d e d t h a t a new g e n e r a t i o n DPM, b a s e d on t h e DPM/SDK, and i n c o r p o r a t i n g t h e enhancements h e r e s u g g e s t e d , w i l l be a c l i n i c a l l y u s e f u l DPM, r e a d y f o r e x t e n d e d t r i a l s . 75 CHAPTER 8  CONCLUSIONS A n e s t h e t i c m i s h a p s have been examined, and i t has been f o u n d t h a t t h e m a j o r i t y of s u c h i n c i d e n t s c o u l d be p r e v e n t e d by i m p r o v e d m o n i t o r i n g . The f a i l u r e of c u r r e n t DPMs t o p r o v i d e a d e q u a t e m o n i t o r i n g has been i n v e s t i g a t e d , and l i n k e d t o t h e f a u l t y a s s u m p t i o n , i n h e r e n t i n t h e i r d e s i g n , t h a t a p e r i o d i c i n c r e a s e i n b r e a t h i n g c i r c u i t p r e s s u r e i n d i c a t e s c o r r e c t v e n t i l a t i o n of t h e p a t i e n t . I t has been f o u n d t h a t w h i l e many m e c h a n i c a l f a u l t s w i t h i n t h e p a t i e n t - v e n t i l a t o r s y s t e m do p r o v i d e a p e r i o d i c p r e s s u r e r i s e , t h e y n o n e t h e l e s s c a u s e l a r g e a l t e r a t i o n s o f t h e s y s t e m ' s p r e s s u r e waveform. Based upon t h i s , p a t t e r n r e c o g n i t i o n as a b a s i s f o r a more e f f e c t i v e d i s c o n n e c t m o n i t o r has been p r o p o s e d . S e v e r a l p a t t e r n r e c o g n i t i o n a p p r o a c h e s have been examined, and i t has been c o n c l u d e d t h a t as no f a u l t s p e c i f i c p a t t e r n s may be i d e n t i f i e d , d i s c o n n e c t m o n i t o r i n g must be b a s e d upon r e c o g n i t i o n of t h e p r e s e n c e , o r l a c k o f t h e same, of an a d a p t i v e l y d e f i n e d non f a u l t b a s e l i n e p a t t e r n . P a r a m e t e r i z a t i o n o f t h e r e s p i r a t o r y p r e s s u r e d a t a , as a b a s i s f o r t h e r e c o g n i t i o n t a s k , has been p r o p o s e d , and a s u i t a b l e and c l i n i c a l l y u s e f u l s e t of p a r a m e t e r s has been i d e n t i f i e d . An a l g o r i t h m w h i c h r e c o g n i z e s f a u l t s as s i g n i f i c a n t d e v i a t i o n s f r o m an e s t a b l i s h e d b a s e l i n e o f non f a u l t p a r a m e t e r s has been d e t a i l e d , and i t s i m p l e m e n t a t i o n f o r t h e I n t e l 8085 p r o c e s s o r has been d e s c r i b e d . 76 A d e v i c e u t i l i z i n g t h i s a l g o r i t h m has been d e s c r i b e d , and p a r t i c u l a r emphasis has been p l a c e d on t h e d e v i c e ' s f a i l s a f e c a p a b i l i t i e s . T h i s d e v i c e has been p r o v e n t o be an e f f e c t i v e d i s c o n n e c t m o n i t o r d u r i n g a s e r i e s of t e c h n i c a l and c l i n i c a l t r i a l s , l e a d i n g t o t h e c o n c l u s i o n t h a t p a t t e r n r e c o g n i t i o n b a s e d DPMs a r e s i g n i f i c a n t l y more e f f e c t i v e a t t h e t a s k o f d i s c o n n e c t m o n i t o r i n g t h a n t h e i r p r e s e n t day c o u n t e r p a r t s . F i n a l l y , numerous har d w a r e and s o f t w a r e enhancements t o t h e d e v e l o p e d d e v i c e have been s u g g e s t e d , b ut not i m p l e m e n t e d due t o an a c u t e t i m e s h o r t a g e . 77 REFERENCES J.B. Cooper, R.S. Newbower, C D . Lon g , B. Mcpeek, " P r e v e n t a b l e A n e s t h e s i a M i s h a p s : A S t u d y of Human F a c t o r s " , A n e s t h e s i o l o g y , 49, 399 - 406, 1978 G.G. H a r r i s o n , "Death A t t r i b u t a b l e t o A n a e s t h e s i a , A 10 Y e a r S u r v e y (1967 - 1976)", B r . J . A n a e s t h . , 50, 1041 -1046, 1978 F.M.S. B o d l a n d e r , "Deaths A s s o c i a t e d W i t h A n a e s t h e s i a " , B r . J . A n a e s t h . , 47, 36 - 40, 1975 • P. Lauwers, " A n e s t h e t i c D e a t h " , A c t a A n a e s t h . B e l g . , No. 1, 19 -27, 1978 P.F. D o l a n , "A S i m p l e S a f e t y D e v i c e " , B r . J . A n a e s t h . , 48, 499, 1978 Emergency C a r e R e s e a r c h I n s t i t u t e , " V e n t i l a t o r A l a r m s " , H e a l t h D e v i c e s " , J_0, 204 - 219, 1981 N o r t h A m e r i c a n D r a g e r , D r a g e r AV A n e s t h e s i a V e n t i l a t o r ,  O p e r a t i o n and M a i n t e n a n c e Manual R.F. Seed, "Alarms F o r Lung V e n t i l a t o r s " , B r . J . C l i n . E q u i p . , 114 - 121, May 1979 J.B. . C o o p e r , R.S. Newbower, J.W. Moore, E.D. Trautman, "A New A n e s t h e s i a D e l i v e r y System", A n e s t h e s i o l o g y , 49, 310 318, 1978 TO] Emergency C a r e R e s e a r c h I n s t i t u t e , " A n e s t h e s i a V e n t i l a t o r s " , H e a l t h D e v i c e s , 8, 151 - 164, 1979 11] R. F o r e s t , Y. Lamarche, "An A n e s t h e s i a C i r c u i t M o n i t o r " , A n e s t h e s i o l o g y , 50, 356 - 359, 1979 12] I . F o d o r , D. B l o o m f i e l d , A. F i s h e r , J . K e r r , "A C o n t r o l F r e e V e n t i l a t o r A l a r m " , A n a e s t h e s i a , 32, 1026 - 1029, 1977 13] T.G. B a r n e t t , T.H. Koeze, " S o l a r Powered V e n t i l a t o r A l a r m " , A n a e s t h e s i a , 35, 205 - 207, 1980 14] N. Mazza, A. Wald, " F a i l u r e o f B a t t e r y O p e r a t e d A l a r m s " , A n e s t h e s i o l o g y , 53, 246 - 248, 1980 15] J.R. Senczuk, G.W. T a l l e v i , A.A. S c o t t , " M o d i f i c a t i o n of a Low P r e s s u r e A l a r m " , A n e s t h e s i o l o g y , 46, 217 - 220, 1977 1 2 3 4 5 6 7 8 9 78 [ 1 6 ] J.A. McEwan, L.C. J e n k i n s , C.F. Small, M.R. I t o , "Development and E v a l u a t i o n of a Smart Disconnect/Pressure Monitor For Anesthesia Machines", BCHCRF Grant A p p l i c a t i o n , January 1981 [17] M. S a r t o r i , "The Development of A Smart Disconnect/Pressure Monitor f o r A n e s t h e t i c V e n t i l a t o r s " , E l e c t r i c a l E n g i n e e r i n g 498 Report, U n i v e r s i t y of B r i t i s h Columbia, Unpublished, January 1981 [18] M. S a r t o r i , "Software Development f o r the Disconnect/Pressure Monitor", Systems Laboratory, Department of E l e c t r i c a l E n g i n e e r i n g , U n i v e r s i t y of B r i t i s h Columbia, Unpublished, October 1980 [19] M.A.F. E p s t e i n , R.A. E p s t e i n , "Airway Flow Patterns During Mechanical V e n t i l a t i o n of I n f a n t s : A Mathamatical Model", IEEE Trans. Biomed. Eng., 26, 299 - 306, 1979 [20] J.G. E y l e s , R.L. Pimmel, " E s t i m a t i n g R e s p i r a t o r y Mechanical Parameters in P a r a l l e l Compartment Models", IEEE Trans. Biomed. Eng., 28, 313 - 317, 1981 [21] N.I. Newton, A.P. Adams, "Excessive Airway Pressure During A n a e s t h e s i a " , Anaesthesia, 33, 689 - 699, 1978 [22] P.M. Waterman, S. P a u t l e r , R.B. Smith, " A c c i d e n t a l V e n t i l a t o r Induced H y p e r v e n t i l a t i o n " , A n e s t h e s i o l o g y , 48, 141, 1978 [23] J.L. Chang, E.L. Larson, R.C. Bedger, A.L. B l e y a e r t , "An Unusual M a l f u n c t i o n of An A n e s t h e s i a Machine", A n e s t h e s i o l o g y , 52, 446 - 447, 1980 [24] I n t e l Corp., SDK - 85 Users Manual, 1978 [25] B.W. Kernighan, D.M. R i t c h i e , The C Programming Language, P r e n t i c e H a l l , N.J., 1978 [26] M.A. Campbell, " D e t e c t i o n of Mechanical F a u l t s i n the P a t i e n t V e n t i l a t o r System", E l e c t r i c a l E n g i n e e r i n g 571 Report, U n i v e r s i t y of B r i t i s h Columbia, Unpublished, January 1981 [27] J.A. McEwan, C.F.Small, L.C J e n k i n s , "A Smart Disconnect Monitor For A n e s t h e s i a Equipment", D i g e s t of the 8th Canadian Medical and B i o l o g i c a l E n g i n e e r i n g Conference, Hamilton, 1980 [28] J.A. McEwan, C.F. Small, B.A. Saunders, L.C. J e n k i n s , "Hazards A s s o c i a t e d with the Use of Disconnect Monitors", A n e s t h e s i o l o g y , 53, S391, 1980 APPENDIX A  DPM/SDK OPERATOR'S MANUAL DPM/SDK O p e r a t o r ' s Manual by M i c h a e l A. C a m p b e l l Department o f E l e c t r i c a l E n g i n e e r i n g U n i v e r s i t y of B r i t i s h C o l u m b i a V a n c o u v e r , B.C. O c t o b e r , 1981 81 1 . INTRODUCTION The DPM/SDK i s a d i s c o n n e c t / p r e s s u r e m o n i t o r b a s e d on t h e SDK85 m i c r o c o m p u t e r . T h i s d e v i c e i m p r o v e s on p r e v i o u s DPMs by m e m o r i z i n g t h e shape of t h e b r e a t h i n g c i r c u i t p r e s s u r e waveform, and t h e n a l a r m i n g i f s u c c e e d i n g waveforms have a s i g n i f i c a n t l y d i f f e r e n t s h a p e . P r e v i o u s DPMs s i m p l y o b s e r v e d t h e peak p r e s s u r e of t h e b r e a t h i n g c i r c u i t waveform, and a l a r m e d i f t h i s f e l l b elow a p r e s e t t h r e s h o l d . When t h e DPM/SDK i s i n i t i a l l y powered up, i t w i l l w a i t u n t i l i t i s t o l d t o memorize t h e p r e s s u r e waveform. (See S e c t i o n 2.1) When t h i s o c c u r s , i t memorizes s e v e r a l waveforms, and t h e n compares a l l s u c c e e d i n g waveforms t o t h e memorized o n e s . I f t h e r e i s a d i f f e r e n c e i n shap e , t h e DPM/SDK sounds a p u l s a t i n g a u d i o a l a r m , and d i s p l a y s a message d e t a i l i n g t h e c a u s e of t h e p r o b l e m . ( F o r example, i f t h e b r e a t h i n g c i r c u i t d e v e l o p e d a sudden l e a k , t h e DPM/SDK would d i s p l a y "MAX LOW", i n d i c a t i n g t h a t t h e maximum p r e s s u r e had d r o p p e d below t h a t of t h e memorized waveform.) 82 2. USING THE DPM/SDK 2.1 S t a r t i n g t h e DPM/SDK A f t e r t h e v e n t i l a t o r has been t u r n e d ON, t h e DPM/SDK s h o u l d be a c t i v e , i n d i c a t e d by a p u l s a t i n g a u d i o a l a r m , and a f l a s h i n g "WAITING" message. I f t h i s i s not t h e c a s e , r e f e r t o APPENDIX A, w h i c h d e s c r i b e s t h e m i c r o c o m p u t e r s t a r t i n g p r o c e d u r e . I f t h i s has n ot a l r e a d y been done, c o n n e c t t h e DPM t o t h e b r e a t h i n g c i r c u i t , t h r o u g h t h e p r e s s u r e i n t a k e on t h e d e v i c e ' s f r o n t p a n e l , l a b e l l e d "To The B r e a t h i n g C i r c u i t " . When a l l v e n t i l a t i o n p a r a m e t e r s have been s e t and s t a b a l i z e d , p r e s s t h e f r o n t p a n e l b u t t o n WAIT/MONITOR. T h i s i s a d u a l f u n c t i o n b u t t o n w h i c h i n i t i a t e s m o n i t o r i n g i f t h e d e v i c e i s w a i t i n g , o r c a u s e s a r e t u r n t o w a i t i n g i f t h e d e v i c e i s m o n i t o r i n g . A t s t a r t up t i m e , t h e d e v i c e i s w a i t i n g , and so t h i s b u t t o n d e p r e s s i o n i n s t r u c t s t h e DPM/SDK t o b e g i n m o n i t o r i n g . The d i s p l a y w i l l change from "WAITING" t o "M (LRN)", t o i n d i c a t e t h a t t h e d e v i c e has begun t o m o n i t o r , and i s m e m o r i z i n g , o r l e a r n i n g , t h e p r e s s u r e waveform. A f t e r a s h o r t i n t e r v a l , t h e "(LR N ) " w i l l d i s a p p e a r f r o m t h e d i s p l a y , l e a v i n g j u s t "M". T h i s i n d i c a t e s t h a t t h e m e m o r i z a t i o n has c o n c l u d e d , and t h e d e v i c e i s now m o n i t o r i n g . 83 2.2 C h a n g i n g V e n t i l a t o r y P a r a m e t e r s I f , a t any t i m e d u r i n g m o n i t o r i n g , ( i n d i c a t e d by an "M" d i s p l a y , w i t h or w i t h o u t t h e " ( L R N ) " ) i t becomes n e c e s s a r y t o change any v e n t i l a t i o n p a r a m e t e r ( f o r example, i n c r e a s e t h e f r e s h g a s ) , t h e DPM/SDK must f i r s t be r e t u r n e d t o t h e WAITING c o n d i t i o n , by p r e s s i n g t h e WAIT/MONITOR b u t t o n . I f t h i s i s n o t done, t h e waveform change c a u s e d by t h e a d j u s t m e n t of t h e v e n t i l a t i o n p a r a m e t e r w i l l t r i g g e r a l a r m s . T h e r e f o r e , p r e s s WAIT/MONITOR ( t h e d i s p l a y w i l l change back t o "WAITING", and t h e p u l s a t i n g a l a r m w i l l r e t u r n , t o i n d i c a t e t h a t t h e d e v i c e i s no l o n g e r m o n i t o r i n g ) and make t h e a p p r o p r i a t e c h a n g e s . When t h i s has been done, p r e s s WAIT/MONITOR a g a i n , and t h e DPM/SDK w i l l r e l e a r n t h e new waveform, and b e g i n m o n i t o r i n g . 2.3 DPM/SDK A l a r m s The DPM/SDK u t i l i z e s a u d i o and v i s u a l a l a r m s . A l a r m s a r e used t o i n d i c a t e t h a t t h e d e v i c e i s w a i t i n g , o r t h a t an a l a r m c o n d i t i o n e x i s t s . An a l a r m c o n d i t i o n e x i s t s i f t h e shape of t h e p r e s s u r e waveform c h a n g e s r e l a t i v e t o t h e memorized waveforms. When t h i s h appens, a u d i o a l a r m s w i l l sound i m m e d i a t e l y . T y p i c a l l y , t h e p r e v i o u s "M" d i s p l a y w i l l b e g i n t o f l a s h , and a f t e r one c y c l e w i l l c h ange t o a message e x p l a i n i n g t h e c a u s e of t h e a l a r m . I f th e f l a s h i n g "M" doe s not change t o an e r r o r message, t h e DPM/SDK c a n n o t r e s o l v e t h e e x a c t c a u s e of t h e e r r o r . 84 E r r o r messages c o n c e r n shape d i f f e r e n c e s between t h e memorized waveform and t h e p r e s e n t waveform, and have t h e form: " f e a t u r e , c o n d i t i o n " where " f e a t u r e " i s some f e a t u r e o f t h e waveform, ( f o r example, t h e peak p r e s s u r e ) , and " c o n d i t i o n " i s an i n d i c a t o r of t h e c o n d i t i o n of t h a t f e a t u r e r e l a t i v e t o t h e memorized waveform. P o s s i b l e i t e m s i n t h e " f e a t u r e " f i e l d a r e : 1. MAX - t h e maximum p r e s s u r e 2 . MIN - t h e minimum p r e s s u r e 3 . AVG - t h e a v e r a g e p r e s s u r e 4. I/E - t h e I/E r a t i o 5 . FRQ - t h e b r e a t h i n g f r e q u e n c y P o s s i b l e i t e m s i n t h e " c o n d i t i o n " f i e l d a r e : 1. HIGH - t h e named f e a t u r e i s h i g h e r t h a n t h e same f e a t u r e o f the memorized waveform. 2 . LOW - t h e named f e a t u r e i s l o w e r t h a n t h e same f e a t u r e of th e memorized waveform. T h i s r e s u l t s i n 10 p o s s i b l e shape r e l a t e d e r r o r messages. One f u r t h e r message, "CYCLING", w i l l be d i s p l a y e d i f t h e DPM/SDK c a n n o t d e t e c t new c y c l e s i n t h e p r e s s u r e waveform. T h i s t y p i c a l l y o c c u r s d u r i n g c o m p l e t e e n d o t r a c h e a l d i s c o n n e c t i o n s , or v e n t i l a t o r f a i l u r e s . 85 2.4 S i l e n c i n g / C a n c e l l i n g A l a r m s Any a u d i o a l a r m , whether a w a i t i n g i n d i c a t o r or an a l a r m i n d i c a t o r , may be s u p p r e s s e d f o r one mi n u t e by use o f t h e f r o n t p a n e l ALARM SUPPRESS b u t t o n . I f t h e a l a r m i s a w a i t i n g i n d i c a t o r , and m o n i t o r i n g i s n o t s t a r t e d i n t h e f o l l o w i n g m i n u t e , t h e a l a r m w i l l r e a p p e a r a f t e r t h e m i n u t e has e l a p s e d . I f th e a l a r m " i s an i n d i c a t o r o f an a l a r m c o n d i t i o n , and t h i s c o n d i t i o n i s not c o r r e c t e d i n t h e f o l l o w i n g m i n u t e , t h e a l a r m w i l l a l s o r e a p p e a r a f t e r t h e m i n u t e has e l a p s e d . An a l a r m c o n d i t i o n may o n l y be c a n c e l l e d by c o r r e c t i n g t h e u n d e r l y i n g c a u s e . T h e r e i s no o t h e r d i r e c t method o f c a n c e l l i n g an a l a r m . ( F o r example, i f an a l a r m r e s u l t s f r o m a change i n a v e n t i l a t i o n p a r a m e t e r , t h i s a l a r m may o n l y be c a n c e l l e d by r e t u r n i n g t h e p a r a m e t e r s t o t h e i r p r e v i o u s s t a t e . The DPM/SDK may t h e n be p l a c e d i n t h e WAITING s t a t e , and a d j u s t m e n t s made, w i t h o u t a l a r m s . ) I f i t i s not p o s s i b l e t o c o r r e c t t h e c a u s e o f t h e a l a r m , p e r h a p s f o r r e a s o n s of p a t i e n t s a f e t y , c a n c e l l a t i o n may o n l y be a c h i e v e d by r e s t a r t i n g t h e DPM/SDK as p e r APPENDIX A. 86 3. SPECIAL FEATURES 3.1 L e a r n Time C h e c k i n g As t h e DPM/SDK memorizes t h e p r e s s u r e waveforms, i t s u b j e c t s them t o a s e r i e s of t e s t s , t o e n s u r e t h a t t h e waveforms b e i n g l e a r n e d a r e not a b n o r m a l . T h e s e t e s t s a r e q u i t e g e n e r a l ( f o r example, t h e peak p r e s s u r e i s t e s t e d t o e n s u r e t h a t i t l i e s i n t h e ran g e of 3 t o 52 cmH 20) and a l l n o r m a l waveforms w i l l p a s s w i t h o u t d i f f i c u l t y . However, i f f o r some r e a s o n , t h e waveform- b e i n g t e s t e d does not p a s s , t h e DPM/SDK w i l l r e t u r n t o t h e WAITING s t a t e . I f t h i s o c c u r s , c h e c k t h e b r e a t h i n g c i r c u i t f o r a b n o r m a l i t i e s . I f none a r e e v i d e n t , t h e DPM/SDK i s m a l f u n c t i o n i n g , and t h i s m a t t e r s h o u l d be r e p o r t e d . 3.2 S e l f M o n i t o r i n g The DPM/SDK c o n s t a n t l y m o n i t o r s i t s i n t e r n a l c i r c u i t r y f o r m a l f u n c t i o n s . I f s u c h m a l f u n c t i o n s a r e d e t e c t e d , t h e f r o n t p a n e l MALFUNCTION l i g h t w i l l be l i t , and d i s t i n c t i v e a u d i o a l a r m s w i l l be g e n e r a t e d . The p a t t e r n of t h e s e a u d i o a l a r m s w i l l a l l o w them t o be e a s i l y d i f f e r e n t i a t e d from non m a l f u n c t i o n a l a r m s . Non m a l f u n c t i o n a l a r m s p u l s a t e on and o f f a p p r o x i m a t e l y t w i c e p e r s e c o n d . M a l f u n c t i o n a l a r m s w i l l e i t h e r be c o n s i d e r a b l e f a s t e r ( p u l s a t i n g r o u g h l y 12 t i m e s p e r s e c o n d ) , o r w i l l be a c o n s t a n t , non p u l s e d t o n e . ( T h e s e two p a t t e r n s c o r r e s p o n d t o two d i f f e r e n t t y p e s of i n t e r n a l m a l f u n c t i o n . ) I f e i t h e r of t h e s e a l a r m s i s h e a r d , d i s c o n n e c t t h e DPM/SDK, and r e p o r t t h e m a t t e r i m m e d i a t e l y . 87 3.3 S e l f C a l i b r a t i o n The DPM/SDK c a l i b r a t e s i t s e l f e a c h t i m e t h e WAITING s t a t e i s e n t e r e d . As t h i s s t a t e i s t h e power up s t a t e , t h e d e v i c e i s a l w a y s f u l l y c a l i b r a t e d p r i o r t o u s e . I f an e r r o r i s d e t e c t e d d u r i n g c a l i b r a t i o n , t h e message "CAL F A I L " w i l l be d i s p l a y e d , a r a p i d p u l s a t i n g a l a r m w i l l sound, and t h e MALFUNCTION l i g h t w i l l b l i n k . S h o u l d t h i s o c c u r , t h e d e v i c e s h o u l d be s e n t t o t h e a p p r o p r i a t e p e r s o n n e l f o r a d j u s t m e n t . 88 APPENDIX A: STARTING THE DPM/SDK FROM THE KEYPAD The DPM/SDK must be s t a r t e d f r o m t h e keypad of t h e SDK85 m i c r o c o m p u t e r . B e f o r e t h i s i s done, e n s u r e t h a t t h e +12V, +5V, and GROUND l e a d s a r e a l l c o n n e c t e d t o t h e a p p r o p r i a t e power s u p p l i e s . A f t e r t h i s has been done, a p p l y power t o t h e d e v i c e . The SDK d i s p l a y - not t h e DPM d i s p l a y - s h o u l d show "- 80 85", and t h e a u d i o a l a r m s h o u l d sound w i t h a c o n s t a n t t o n e . P r e s s t h e f o l l o w i n g s e q u e n c e of keys on t h e ke y p a d : RESET, RESET, GO, D, 0, 0, 0, EXEC The DPM/SDK s h o u l d i m m e d i a t e l y sound a p u l s a t i n g a l a r m , and b e g i n t o f l a s h "WAITING" on i t s d i s p l a y s . The "- 80 85" on t h e SDK85 d i s p l a y s h o u l d be r e p l a c e d w i t h " E " . I f e i t h e r o f t h e s e e v e n t s does n o t o c c u r , p r e s s t h e RESET key t w i c e , and r e p e a t t h e above p r o c e d u r e . I f t h i s s t i l l f a i l s t o s t a r t t h e m o n i t o r , i t i s m a l f u n c t i o n i n g , and t h i s s h o u l d be r e p o r t e d . APPENDIX B: TECHNICAL SPECIFICATIONS 89 Low f r e q u e n c y c u t o f f H i g h f r e q u e n c y c u t o f f Maximum r e s p o n s e p r e s s u r e Minimum r e s p o n s e p r e s s u r e Maximum I/E Minimum I/E S e n s i t i v i t y A u x i l i a r y o u t p u t Power c o n s u m p t i o n Maximum e r r o r r e s p o n s e t i m e Minimum e r r o r r e s p o n s e t i m e 5 BPM 60 BPM 52 cmH 20 (37 mmHg) -7 cmH 20 (-5 mmHg) 1 : 3/4 1 : 4 0.33 c m H 2 0 / b i t (0.24 mmHg/bit) 0.38 v o l t DC o f f s e t 58 mv/cmH 20 (8.1 mv/mmHg) 4 W. ( a t 5 v o l t s ) 3 v e n t i l a t o r c y c l e s 0 s e c o n d s APPENDIX B DPM5 PROGRAM LISTING 91 /********************** Michael Campbell */ /* DPM.H * Sep/81 */ / ********************** This f i l e defines symbolic constants for the DPM5.C program. THIS ROUTINE C A L L S : none / GLOBALS: none S T A T I C L O C A L S : none AUTOMATIC L O C A L S : ' none CONSTANT D E F I N I T I O N S : ' see below */ fdefine begin { fdefine end } fdefine TRUE 1 fdefine F A L S E 0 fdefine NPF 75 fdefine G A I N 24 fdefine NO_ALARMS 6 fdefine MIN_PEAK 200 fdefine MAX_OFFSET 0x20 fdefine B A S E C Y C L E S 4 fdefine S U P P R E S S I O N _ T I M E 1300 fdefine WAIT_MON 0x10 fdefine ALARM_SUPPRESS 0x11 fdefine ALARMS_CLEAR OxcO fdefine ALARMS_SET OxdO fdefine LEARN_MSG 12 fdefine W A I T I N G 40 fdefine C A L _ F A I L 72 fdefine BLANK 60 fdefine A_NATURAL extern fdefine CSR_1 0x20 fdefine CSR_2 0x28 fdefine TLSB_2 0x2c fdefine TMSB_2 Qx2d fdefine PORTA_1 0x22 /* Noise protection factor (* 100) */ /* scaleO gain factor (mmHg/bit * 100)- */ /* value of aci for no alarm; see alarmO •'".•*/. •/* minimum pressure range for operation ".'•'*/ /•maximum allowable XDUCER offset */ '/* number of cycles to use in building base '*/ /* length of alarm suppress - sec * 0.04 */ /•wait/monitor key definition */ /* alarm suppress key definition */ /* hcb alarms clear value .*/ /* hcb alarms set value .*/ /* ac1_default value during learn time */' /* message index for W A I T I N G display */ /* message index for calibration error "*/ /* message index for blank display */ /* pseudo typedef */ /* 8155-1 CSR */ /* 8155-2 C S R */ /* 8155-2 timer least significant byte */ /* 8155-2 timer most significant byte */ /* Hardware status byte port number */ 92 •define P0RTB_1 0 x 2 1 /* Hardware control byte port number */ /••save some variable space i */ fdefine lsgn pk fdefine sgn delay 1 -/* set up features array such that features can be called by name */ fdefine prd features[0] /* waveform period */ fdefine mxp featuresM] /* maximum pressure */ fdefine mnp features[2] /* minimum pressure */ fdefine ie features[3] /* I/E ratio */ fdefine avg features[4] /* average pressure */ /* DPMHDR.8 * Michael Campbell Sep/81 / This A Natural header f i l e sets up the execution of the DPM main program / It places the stack, enables interrupts, and defines various tables of / constants used by the main program. / / / / / / / / / / / / / / / / / / / / /* THIS ROUTINE CALLS: main int array int array int array int array char array GLOBALS: tolerance lower_limit upper^limit timebase message STATIC LOCALS: none AUTOMATIC LOCALS: none CONSTANT DEFINITIONS: none **************************** allowable tolerances for baseline errors, absolute lower limits for baseline values, absolute upper limits for baseline values, timebase used by "cycle" for regression, set of DL1414 output messages. stack := 0xb3ff sim: restart: 0x3e,0x18,0x30 enable ints: tolerance: sp *> &stack ei c a l l main, jmp restart c a l l c e n t ei c a l l c.ret / set the stack pointer to DPM RAM. / sets interrupt mask to 0x18 /enables a l l interrupts /Program execution begins here / Restart DPM/SDK lower limit: upper_limit! 675 / PRD tolerance, sec * 100 6150 / MAX tolerance, mm Hg * 100 6150 / MIN • s • 615 / I / E , * 100 6100 / AVG 6100 / PRD lower limit, absolute, sec 6200 / MAX lower limi t , absolute, mm Hg 6-400 / MIN 625 / I/E ' , 6100 / AVG 61400 / PRD upper limi t , absolute, sec 64500 / MAX upper limi t , absolute, mm Hg 61500 / MIN 6200 / I/E , 63000 / AVG 100 100 100 100 100 100 9k &4 / regression timebase, used by CYCLE 68 &12 &16 message: "FRQ ", "MAX "MIN "I/E "AVG ",. "CYCL" "LOW "HIGH", "ABS "ING " / "WAIT", "ING ", "M (", "LRN)", "M ", " " "MALF", "CTN ", "CAL ", "FAIL" public enable_ints public tolerance public lower_limit "public upper_limit public timebase public message 95 ^***** P M 5' C * Michael Campbell */ Sep/81 */ This f i l e contains a l l of the C routines which make up the DPM5 program. THIS FILE CONTAINS: * -main() setup() wait () i n i t i a l i z e ( ) get_features() cycle() v a l i d _ c y c l e ( ) monitor() alarmO scaleO signO adc () audio_visual() d r i v e r for e n t i r e program, sets up hardware. waits for operator permission to proceed. sets up software, and synchronizes program and data. extracts features from the data. This i s the major processing routine for the DPM5 program. implements data c y c l e , based on l i n e a r regression d i f f e r e n t i a t i o n . determines v a l i d i t y of cyc l e j u s t concluded, and takes appropriate a c t i o n in the case of an i n v a l i d c y c l e , sets up the baseline during learn time, and monitors features r e l a t i v e to t h i s baseline during run time, sets/resets external alarms, based on r e s u l t s returned by "monitor". scales raw a/d data into C i n t s . determines the algabraic sign of a C i n t . i n t e r f a c e to DPM a/d, and to SDK keypad, i n t e r f a c e to DL1414's, Sonalert. /***************************** •include <std.h> fi n c l u d e <dpm.h> Global v a r i a b l e s int cc[6] = begin 0,0,0,0,0,0 end; int ssr[6] = begin 0,0,0,0,0,0 end; int baseline[6] = begin 0,0,0,0,0,0 end; int features[6] = begin 0,0,0,0,0,0 end; int prd1=0, peep=0, cycling=0, recoverable=0, cycles_learned=0, delay1=0, delay2=0, rtc1=0, rtc2=0, ftc1=0, ftc2=0, df=0, sw=0, Suppress_timer=0, count=0, ac1_default=0, ecf=0, rt=0, ft=0, p50=0, insp=0; ~ unsigned char hcb=0, offset=0; char *dptrl=0, *dptr2=0; /* hardware command byte /* d i s p l a y message po i n t e r s A NATURAL char message[80]; /* defined i n f i l e DPMHDR.8 A_NATURAL i n t lower_limit[5],timebase[4],tolerance[5],upper_limit[5]; COUNT i n O ; VOID ou t ( ) ; */ */ */ 96 / * FUNCTION : MAIN.C * y************************** Michael Campbell */ Sep/81 */ This routine acts as a d r i v e r for the DPM5 program. I t sets up the program hardware and software, and perpetually loops, c a l l i n g the,routines needed to implement the DPM algorithm. This loop i s exited by an operator reset, or by an unrecoverable f a i l u r e to cy c l e the data. THIS ROUTINE CALLS: setup, i n i t i a l i z e , get_features, v a l i d _ c y c l e , monitor, alarm, c a l i b r a t e . GLOBALS: c y c l i n g = int recoverable = int boolean v a r i a b l e which i n d i c a t e s by t r u t h that c o r r e c t c y c l i n g has been esta b l i s h e d , and by falsehood (=0) that i t has not. boolean v a r i a b l e which i n d i c a t e s by t r u t h ( •1 ) that that data c y c l i n g i s e i t h e r correct or p o t e n t i a l l y c o r r e c t a b l e , by falsehood (=0) that data c y c l i n g i s hopelessly unrecoverable. STATIC LOCALS: none AUTOMATIC LOCALS: none CONSTANT DEFINITIONS: none /******************************** main () begin setup(>; FOREVER begin wait (); i f (initialize()) begin while (recoverable) begin get featuresO; i f Tvalid_cycle()) begin cycling = TRUE; .monitorO; end; i f (cycling)alarm(); end; end; end; , /* set up hardware /* wait for go ahead /* intialize algorithm . /* extract features /* check validity of cycle /* monitor features •/* set/reset alarms ••/. */ .*/ V */ */ V end 97 /* FUNCTION: SETUP.C * Michael Campbell */ Oct/81 */ This routine sets up the DPM/SDK hardware. In particular, the 8155 I/O are i n i t i a l i z e d , and the 8155 timer is started, starting the a/d .THIS ROUTINE CALLS: ' out GLOBALS: none STATIC LOCALS: none AUTOMATIC LOCALS: * none CONSTANT DEFINITIONS: none /************************** setup() begin out (CSR 1 , 0x41); out (CSR~2 , 0x40); OUt (TLSB_2, 0x06); Out (TMSB_2, 0x40); out (CSR_2 , OxcO); /* set up 8155-1 ports /* set up 8155-2 timer /* load 8155-2 timer lsb /* load 8155-2 timer msb /* start timer (hence A/D) */• */ * / : V */ end 98 /************************* /* FUNCTION WAIT.C * ^************************* M i c h a e l Campbell */ Oct/81 - */ T h i s routine flashes a startup message, and sounds an audio alarm. T h i s continues until the operator presses the WAIT/MONITOR key, which causes an exit to mainO, or until the ALARM SUPPRESS key is pressed, w h i c h temporarily silences the audio alarm. THIS ROUTINE CALLS: adc, audio_visual, out. -• GLOBALS: sw a i n t m count a i n t m d f s i n t s ecf s i n t a ad_default 3 int a suppress_timer = int m cycles_learned = int m hcb m unsigned char = See s w i t c h to control display flashing, r o u t i n e audio_visual(). interval counter used also to control the flashing of the displays, display frequency. If greater than zero,, displays w i l l flash. error code f i l t e r . Implements f i l t e r i n g o f visual alarms. default primary alarm code. Indexes f i r s t f o u r chars of default output message, timer for alarm suppression, number of cycles presently in baseline. hardware control byte. This byte is sent o u t to port B of 8155-1, which controls t h e external hardware. The bit pattern i s : |DRA|C/A|HA |SA | X | X | X | X dptn .. d p t r 2 message STATIC LOCALS: none AUTOMATIC LOCALS: i n c h a r d a t a _ b y t e c h a r p o i n t e r c h a r p o i n t e r c h a r a r r a y u n s i g n e d c h a r u n s i g n e d c h a r where: DRA > C/A -HA SA Z Data Ready Acknowledge, used to acknowledge a/d data ready. Circuit/Atmosphere, used to control valve which opens XDUCER to either t h e breathing c i r c u i t or atmosphere Hardware Alarm, which sounds audio alarms when set. Software Alarm, which indicates a software request for an alarm, unused. pointer to four chars to display on l e f t DL1414 display. pointer to four chars to display on right DL1414 display. set of DL1414 output messages. key read from SDK keypad, data byte read from a/d. 99 CONSTANT DEFINITIONS: none /********************************** wait 0 begin / unsigned char data_byte, inchar; sw » count = 1; hcb - 0x90; / * set XDUCER source=atmosphere, set up i n i t i a l alarm suppress_timer = df = ecf =0; FOREVER begin while (!adc Uoffset, Sinchar)) /* display "WAITING" audiovisual (&message[WAITING], &message[WAITING+4], 12); i f (inchar == WAIT_MON) begin /* display "M (LRN)" audio_visual ((dptrl = &message[48]), (dptr2 = &message[52]), 0); ad_default = LEARN_MSG; break; / * e x i t to mainO end; i f (inchar == ALARM_SUPPRESS) suppress_timer = SDPPRESSION_TIME; end; cycles_learned =0; hcb • ALARMS_CLEAR; /*•set XDUCER source=circuit, silence alarms i f (Offset > MAX OFFSET) FOREVER audio_visual T&message[CAL_FAIL], 6message[CAL_FAIL+4], 0); end 100 / * * * * * U N C T I 0 N : I N I T I A L I Z E - C * Michael Campbell */ Sep/81 */ This routine i n i t i a l i z e s certian global variables for the DPM5 program, and synchronizes the program with the data. The PEEP level i s measured, followed by the synchronization code, which leaves the data positioned on a rising waveform edge. Finally, the data cycling variables and the baseline are i n i t i a l i z e d . THIS ROUTINE CALLS: adc., scale, sign 50 % of pk. measured PEEP value, in mmHg * 100. i n i t i a l estimate of waveform period, rising threshold.. - Derivatives over.this threshold indicate a new cycle in data, rising threshold counter, primary. Used with rtc2 to detect new cycles, rising threshold counter, secondary, f a l l i n g threshold. Derivatives under this threshold indicate onset of expiration, f a l l i n g threshold counter, primary. Used with ftc2 to detect expiration, f a l l i n g threshold counter, secondary, boolean variable which indicates by truth that correct cycling has been established, and by falsehood that i t has not. boolean variable which indicates by truth that data cycling is either correct, or i s potentially correctable, and by falsehood that i t is not. number of cycles presently in baseline. GLOBALS: p50 a int . . a peep m int -' „ prdl X int M rt m int . a r t c l m int . a rtc2 m int a f t m int -f t c l m int m ftc2 a int m cycling s int m recoverable = int m cycles_learned ss int m cc m int array = ssr m int array baseline St int array 33 . . condition codes. Indicates state of the features relative to the baseline, sample shift register. Implements moving window on data. Used for data cycling, baseline set of features. STATIC LOCALS: none AUTOMATIC LOCALS; Pk isc i sample data_byte inchar tpk • int • int » int « int = unsigned char • unsigned char « int array peak pressure. counter of p50 level crossovers, general purpose work variable, scaled a/d data, mmHg * 100. data input from a/d. character input from SDK keypad. times of p50 level crossovers. CONSTANT DEFINITIONS: none /ft******************************* */ 1 0 1 i n i t i a l i z e () begin unsigned char data_byte, inchar; int pk, tpk[6]; / PAST int i , sample, isc; pk « - 9 9 9 9 ; peep = 9999; for ( i *> 0; i <= 500; i++) begin /* measure 15s peak, peep */ i f (adc (&data_byte, Sdnchar) s>& inchar == WAIT_MON) return (0); i f ( i > 125) begin /* allow data acquisition system to stabilize */ sample = scale (data_byte); i f (sample > pk) pk = sample; i f (sample < peep) peep = sample; end; end; i f (peep < 0) peep =0; i f ((pk - peep) < MIN_PEAK) return (0); -../* detect DC */ p50 • (pk - peep) / 2; /* starting from an arbitrary position on the */ i • isc = tpk[0] =0; /* input data, move to a rising edge, by */ lsgn = -1; /* finding 5 crossings of p50 level */ while (isc < 5) begin i f (adc Udata_byte, Sdnchar) £.& inchar == WAITJMON) return (0); sample = scale (data_byte) - peep - p50; i +« 4; i f ( i > 3000) return (0); /* detect learn time disconnections */ i f ( i > (tpk[isc] + 50) && (sgn = sign(sample)) != lsgn) begin tpk[++isc] = i ; • /* record crossover time, inc counter '*/ lsgn = sgn; end; end; prdl ••• tpk[5] - tpk[3]; /* set i n i t i a l estimate of basic period */ rt c l • rtc2 = f t d = ftc2 = 0; cycles_learned = cycling = 0; for ( i - 0; i <= 5; i++) /* garbage removal */ ss r [ i ] * baseline[i] = cc[ i ] = 0; recoverable = TRUE; rt • f t • 3;• /* set rising, f a l l i n g threshold, mmHg/sec */ return (1); end 102 /* FUNCTION : GET_FEATURES.C * /************************************ Michael Campbell */ Sep/81 */ This function performs feature extraction on respiratory data. Upon entry, " i t i n i t i a l i z e s a l l features for a new cycle, sets up cycling delays for r.oise protection, and then enters a loop wherein data is .read, alarms and displays are updated, and features extracted. This loop is exited .when either cycle() indicates a new cycle by incrementing the primary rising threshold counter, or the elapsed time exceeds the value three periods. At cycles end, the I/E ratio, and the average pressure for the cycle are computed..' Note that a l l features are called by name in this routine, whereas they are referenced as the array "features" elsewhere. The f i l e DPM.H provides the necessary fdefine statements. THIS ROUTINE CALLS: adc, scale, audio_visual, cycle G L O B A L S : prd mxp mnp ie avg int int int int int features[0] featuresf1] features[2] features[3] features[4] waveform period maximum pressure minimum pressure I/E ratio average pressure df m int -prd1 m int m r t c l a int -rtc2 a int m f t c l s int M f t c 2 - int m peep m int m delay1 » int a delay2 a int m ecf s int m recoverable a ' int a suppress_timer a int a hcb s unsigned char = dptrl a char pointer dptr2 a char pointer display frequency. If greater than zero, displays w i l l flash, i n i t i a l estimate of waveform period, rising threshold counter,, primary. Used with rtc2 to detect new cycles, rising threshold counter, secondary, f a l l i n g threshold counter, primary. Used with ftc2 to detect expiration, f a l l i n g threshold counter, secondary. measured PEEP value, in mmHg * 100. delay, in sec * 100, to be observed before allowing detection of new cycle, delay, in sec * V00, to be observed before allowing detection of expiration, error code f i l t e r . Implements f i l t e r i n g of visual alarms. boolean variable which indicates by truth that data cycling is either correct, or is potentially correctable, and by falsehood that i t is not. timer for alarm suppression. hardware control byte. See setupO. pointer to four chars to display on l e f t O L 1 4 1 4 display. pointer to four chars to display on right OL1414 display. STATIC LOCALS: none 103 AUTOMATIC LOCALS: sample » int « scaled data sample, in mmHg * 100. data_byte inchar = unsigned char = data input from a/d. » unsigned char = character input from SDK keypad. CONSTANT DEFINITIONS: none V get_features() begin unsigned char data_byte, inchar; int sample; FAST int cycles_missed=0; prd = insp = delay2 = mxp = avg =0; mnp • 9999; delayl = NPF * (prdl•/ 100) ; /* MAJOR PROCESSING LOOP FOR PRESSURE MONITOR */ while (cycles_missed < 3 && r t c l == rtc2) begin i f (adc (&data_byte, &inchar)) begin /* sample a/d, keypad •*/ i f (inchar == ALARM_SUPPRESS) suppress_timer = SUPPRESSION_TIME; i f (inchar == WAIT_MON) begin recoverable = FALSE; return; end; end; sample = scale (data_byte) - peep; audio_visual (dptn, dptr2, df); /* update alarms, displays */ cycle (tsample); /* check for ri s i n g , f a l l i n g edges */ i f ( f t c l != ftc2 &S> delay2 == 0) begin /* expiration */ insp = prd; delay2 = 9999; end; i f (sample > mxp) mxp = sample; i f (sample < mnp) mnp = sample; avg += sample / 100; i f (prd > (prdl + prdl / 10)) begin /* reset cycling protection */ cycles_missed++; prd « prdl / 10; end; prd += 4; end; end of cycle computations */ 10k ie - ((25 * insp)/(prd - insp)) * 4 ; avg «= ((avg * 4) / (prd / 10)) * 10; prd => 1500 - prd; /* fudge to make "prd low" -> "frq high" */ return; end 105 /**************************** /* FUNCTION : CYCLE.C * /•A************************** Michael Campbell */ Sep/81 */ This routine detects rising and f a l l i n g thresholds, defined as derivatives whose magnitudes are greater than the preset globals ft and rt respectively. Derivatives are computed by specialized linear regression equations, operating on the contents of the moving data window ssr, which assume a fixed timebase, and a constant sampling interval of 0.04 sec. Detection is indicated by incrementing r t c l for rising thresholds, and f t d for f a l l i n g thresholds. Detection is disabled during the intervals "delayl" (for rising thresholds), and "delay2" (for f a l l i n g thresholds),which are relative to the get_features() variable "prd". Note that delay2 is zeroed at the start of each cycle, and set to a positive value after detection of expiration, while delayl is set to a positive value at the start of each cycle. THIS ROUTINE CALLS: none GLOBALS: prd rt rtcl ft f t d d e l a y l delay2 ssr int int int int int int int int array timebase STATIC LOCALS: none AUTOMATIC LOCALS: i sumd sumtd d p d t - int array *» int - int * int • int • features!0] = time elapsed in this period, rising threshold. rising threshold counter, primary. Used, with rtc2 to detect new cycles, f a l l i n g threshold. f a l l i n g threshold counter, primary. Used with ftc2 to detect expiration, delay, in sec * 100, to be observed before allowing detection of new cycle, delay, in sec * 100, to be observed before allowing detection of expiration. sample shift register. Implements a moving window on the data. During each c a l l , one new sample is shifted into this array, and one old sample is released to the program. This process replaces the sample value with which cycleO was called by the value which was shifted out. array of constants used during linear regression. Assumes a 0.04 sec interval - general purpose work variable. • sum of ssr data. - sum of (ssr * timebase). - derivative of window data computed via linear regression. •CONSTANT DEFINITIONS: none /•••A******************************** 106 c y c l e (sample) int *sample; begin ' EAST int sumd, sumtd, i , dpdt; / sumd * sumtd = 0; /* differentiate ssr via linear regression */ for ( i = 0; i <» 3; i++) begin / sumd += ssr [ i ]; sumtd += timebaseti] * ( (ssr[i] + 5) / 10); end; dpdt = (sumtd - sumd + 5) / 8; /* i s derivative of data over thresholds? If so, signal by incrementing */ /* appropriate counter. */ i f (prd >= delayl S.& dpdt > rt ssr[0] >= MIN_PEAK) rtc1++; i f (prd >= delay2 && dpdt < - f t && ssr[0] <= p50 ) ftc1++; ssr [ 4 ] = *sample; /* shift in new sample */ •sample = ssrtO]; /* shift out data for pgm */ for ( i = 0; i <= 3; i++) /* sh i f t samples */. ssr [ i ] = s s r [ i + 1]; end . 107 Michael Campbell */ Sep/81 */ This function acts as a r e s p i r a t o r y event detector. It returns TRUE i f the previous cycle was v a l i d , and FALSE i f i t was not. V a l i d i t y i s determined by examination of the primary and secondary threshold counters. If r t d = rtc2, a new c y c l e has not been detected, and i f f t d = f t c 2 , e x p i r a t i o n has not been detected. If either of these events occurs, a c y c l i n g alarm i s set up, and FALSE i s returned. This return value w i l l cause the monitoring routine to be skipped, ensuring that no attempt i s made to i n t e r p r e t p o t e n t i a l l y meaningless features. During learn time, before the onset of c o r r e c t c y c l i n g , the c o n d i t i o n r t c l = rtc2 w i l l cause r t to be decremented, while the condition f t d = ftc2 w i l l cause f t to be decremented. This allows an adjustment of thresholds u n t i l c y c l i n g rs e s t a b l i s h e d , or one of the thresholds i s reduced to zero. THIS ROUTINE CALLS: none • rising threshold. D e r i v a t i v e s over t h i s threshold i n d i c a t e a new c y c l e i n data. • f a l l i n g threshold. D e r i v a t i v e s under t h i s threshold i n d i c a t e onset of e x p i r a t i o n . • rising threshold counter, primary. Used with rtc2 to detect new c y c l e s . « rising threshold counter, secondary. = f a l l i n g threshold counter, primary. Used with f t c 2 to detect e x p i r a t i o n . • f a l l i n g threshold counter, secondary. • boolean v a r i a b l e which i n d i c a t e s by t r u t h that c o r r e c t c y c l i n g has been e s t a b l i s h e d , and by falsehood that i t has not. " boolean v a r i a b l e which i n d i c a t e s by t r u t h that data c y c l i n g i s e i t h e r c o r r e c t , or i s p o t e n t i a l l y c o r r e c t a b l e , and by falsehood that i t is not. cc * int array • condition codes. Indicates state of the features r e l a t i v e to the b a s e l i n e . STATIC LOCALS: none AUTOMATIC LOCALS: i • int •• general purpose work variable CONSTANT DEFINITIONS: none / a * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * y valid_cycle() begin /*^ FUNCTION : VALID_CYCLE.C * GLOBALS: rt • int f t « i n t r t c l - int rtc2 int f t d • int ftc2 - int cycling = int recoverable = int FAST int flag = FALSE; 106 i f (rtcl " rtc2 || f t c l == ftc2) begin /* valid cycle did not occur */ flag = TRUE; /* set bad cycling indicator */ i f (Icycling) begin i f ( r t d == rtc2) r t — ; /* decrement rising threshold */ i f ( f t c l == ftc2) f t - - ; /* decrement f a l l i n g threshold */ i f (!rt || !ft) recoverable = FALSE; end else cc[0] = 4; end; ftc2 = f t c l ; rtc2 = r t c l ; return (!flag); end 109 /* FUNCTION : MONITOR.C * /**************************** Michael Campbell */ Sep/81 */ This routine monitors the features returned by routine get__f e a t u r e s ( ) , and sets c c [ 0 ] -> cc [ 4 ] to r e f l e c t the status of f e a t u r e s f i ] r e l a t i v e to b a s e l i n e [ i ] . The c c [ i ] s e t t i n g s are: .. ' • / c c [ i ] = 0 -> No e r r o r ; c c [ i ] = 1 -> feature low r e l a t i v e to ba s e l i n e ; c c [ i ] - 2 -> feature high r e l a t i v e to bas e l i n e ; c c [ i ] = 3 -> feature exceeds absolute l i m i t s ; During learn time, t h i s function adds the features to the baseline, p r e v i o u s l y zeroed by routine i n i t i a l i z e ( ) , and checks the features against absolute upper and lower l i m i t s . When learn time ends (cycles_learned = BASECYCLES) t h i s function changes the default alarm code, which changes the d e f a u l t d i s p l a y from "M (LRN)" to "M". THIS ROUTINE CALLS: sign GLOBALS: ac1_default eycles_learned cc features lower_limit upper~limit baseline STATIC LOCALS: = i n t i n t i n t array i n t array i n t array i n t array i n t array index, for array message[], of d e f a u l t output message for l e f t d i s p l a y , number of cy c l e s presently i n b a s e l i n e . array of condi t i o n codes, set here and interpreted by a l a r m O . features extracted from previous c y c l e , absolute lower l i m i t s for featur e s , absolute upper l i m i t s for featur e s , array of baseline features. none AUTOMATIC LOCALS: i •« i n t d i f f « i n t s g n d i f f i n t • general purpose work v a r i a b l e . • d i f f e r e n c e between f e a t u r e s [ i ] and baselinef i ] . • sign of d i f f . CONSTANT DEFINITIONS: none /************************************** */ monitor () begin P A S T i n t i , d i f f , s g n d i f f ; • /* LEARN MODE _ */ i f (cycles_learned < BASECYCLES) begin fo r ( i = 0 ; i <= 4 ; i++) begin i f ( f e a t u r e s [ i ] < l o w e r _ l i m i t [ i ] || f e a t u r e s [ i ] > upper l i m i t [ i ] ) a 110 cc[i] » 3 ; else cc[i] = 0; baselinefi] += features!i] / BASECYCLBS; end; cycles_learned++; end; . /* RUN MOOE end i f (cycles_learned >= BASECYCLES) begin ac1_default =14; for ( i = 0; i <= 4; i++) begin d i f f = featuresfi] - baselinefi]; d i f f = d i f f * (sgndiff = sign(diff)); i f (diff > tolerance!i]) c c f i ] = (sgndiff > 0 ? 2 : 1 ) ; else cc[i] =0; end; end; /* test for baseline error /* set default msg to " M ' /* absolute value 2->high, 1->low */ */ */ */ 111 /* FUNCTION : ALARM.C * /************************** Michael Campbell */ Sep/81 */ This routine i n t e r p r e t s c c [ i ] , set by routine monitorO, and se t s / r e s e t s audio and v i s u a l alarm i n d i c a t o r s as necessary. V i s u a l message f i l t e r i n g is implemented by requiring that a given alarm c o n d i t i o n occur twice i n a row before a v i s u a l alarm concerned with the co n d i t i o n w i l l be issued. THIS ROUTINE CALLS: none GLOBALS: df ecf ac1_default suppress_timer - int • • int = i n t int hcb d p t n dptr2 cc message STATIC LOCALS: none « unsigned char • char pointer . • char pointer • int array = char array AUTOMATIC LOCALS: acl » int ac2 temp « int - int display f l a s h frequency. Displays w i l l f l a s h i f t h i s v a r i a b l e i s p o s i t i v e , one stage f i l t e r for e r r o r codes, default alarm code index for l e f t d i s p l a y , time remaining i n current alarm suppress. C a l i b r a t e d in number of adc() c a l l s l e f t . adc() decrements t h i s v a r i a b l e . hardware c o n t r o l byte. See setup( ) . pointer to four chars to d i s p l a y on l e f t DL1414. pointer to four chars to display on r i g h t DL1414. condition codes set by monitorO. -array of DL1414 output messages. index, for array message[], of l e f t display message. Messages are 4 chars long, and so t h i s index i s m u l t i p l i e d by 4 ( s h i f t e d l e f t 2) before use. same as a d , but f o r r i g h t d i s p l a y , temporary work v a r i a b l e . •.CONSTANT DEFINITIONS: none' /****************************** alarm () begin PAST int a c l , ac2, error_code; fo r (acl * 0,ac2 = 0; acl <= 5; ad++) begin i f (cctacl] > 0) begin ac2 • 5 + cc[ac1]; i f (cclacl ] == 4) acl =» 5; i f (ad_default == LEARN MSG) /* cc[] > 0 -> trouble! /* set up CYCLING alarm /* i f while learning, quit */ ' * / 112 recoverable = FALSE; i f (suppress_timer == 0) hcb df - 12; break; end; end; error_code = (ad + 100) * ac2; i f (aci == NO_ALARMS) begin hcb = ALARMS_CLEAR; df « suppress_timer =0; end; i f (aci == NO_ALARMS || error_code aci » ac1_default; ~ ac2 = a d + 1 ; end; dptrl. » &message[ac1 « 2]; /* dptr2 = 6message[ac2 « 2]; ecf B error_code; end |= 0x10; /* set SA bit of hcb */ /* enable display flashing */ /* unique f(ac1, ac2) */ /* reset audio/visual alarms */ /* disable display flashing */ != ecf) begin /* f i l t e r error msgs */ assign output message for next cycle */ 113 /************************ Michael Campbell */ /* FUNCTION SCALE.C * Sep/81 */ /*************** ********* This routine scales raw one byte data from the a/d into integers', calibrated • jn mmHg * 100. The raw data is corrected for atmospheric offset. THIS ROUTINE CALLS: none GLOBALS: / offset • unsigned char = raw a/d data. STATIC LOCALS: s none AUTOMATIC LOCALS: data_byte = unsigned char = raw a/d data. " CONSTANT DEFINITIONS: none /*************************** */ scale (data_byte) unsigned char data_byte; begin return (((int)data_byte - (int)offset) * GAIN ); end • 111+ /************************* Michael Campbell */ /* FUNCTION : SIGN.C * Sep/81 */ /*«*********************** This routine determines the sign of an int. It returns 1 for a zero or positive sample, and -1 for a negative sample. THIS ROUTINE CALLS: ' none GLOBALS: / none STATIC LOCALS: none AUTOMATIC LOCALS: sample = int * input i n t . /******************************* */ sign(sample) i n t sample; begin return (sample >= 0 ? 1 : -1); end 115 / * FUNCTION : A D C . C * / * * * * * * * * * * * * * * * * * * * * * * * * Michael Campbell */ Sep/81 */ This routine is the hardware interface to the ADC0808 a/d, and to-the SDK keypad. The a/d is started every 40 ms by external hardware, and responds by lowering i t s End Of Conversion (EOC) output while converting, and raising i t when done. Hence, when entered, this routine waits for the EOC line to go low indicating that a conversion has begun, and then waits for this line to return high indicating data ready. When data ready occurs, this routine responds by lowering and then raising the Data Ready Acknowledge. (DRA) line, and then reading the a/d. The SDK keypad generates RST5.5 interrupts, which are serviced by SDK monitor routines which store the six bit key codes in location 20fe(H), and clear the most sig bit of this byte as indication of buffer f u l l . This routine therefore checks this upper bit, and i f clear, transfers the contents of 20fe to the variable inchar. It then clears this location, and sets the ms b i t . This routine returns 1 i f a char was read, and 0 otherwise. Because the a/d is started every 40 ms, this routine is used as a 40 ms clock by some portions of the DPM5 program. In particular, alarm suppression intervals are calibrated in number of 40 ms.intervals necessary to complete the desired time. Hence, i f there is outstanding alarm suppression time, this routine w i l l decrement the suppression timer. THIS ROUTINE CALLS: in, out, enable_ints GLOBALS: suppress_timer hcb STATIC LOCALS: none AUTOMATIC LOCALS: i int time remaining in current suppression, unsigned char = hardware control byte. See setupO. int • general purpose work .variable. data_byte = unsigned char = raw a/d data. inchar • unsigned char • character input from SDK keypad. ibuf » char pointer = pointer to SDK char buffer. adc0808 = char pointer = address of DPM/SDK a/d. CONSTANT DEFINITIONS: none /*************************************** adc (data_byte, inchar) unsigned char *data_byte, *inchar; begin P A S T int i ; -unsigned char *ibuf=0x20fe, *adc0808=0xa000; while ( in(PORTA 1) & 0x01 •i ) ; /•wait for EOC low 116 while ( in(PORTA_l) & 0x01,»• 0 ); out (PORTB_1, hcb £> 0x7f); for (i = 16; i > 0; i — ) ; out (PORTB_1, hcb ); *data_byte = *adc0808; i f (*ibuf != 0x80) begin •inchar = * i b u f ; *ibuf = 0x80; i - i ; enable_ints(); end; _ i f (suppress_timer > 0) suppress_timer-—; return ( i ) ; end /* wait for EOC high */ /* lower DRA */ /* delay */ /* raise DRA */ /* read adc/ */ /* key received ? */ /* read i t */ /* clear buffer */ /* indicate char received. */ •/* re-enable interrupts */ 1 1 7 /* FUNCTION AUDIO_VISUAL.C * /******************************* Michael Campbell */ Sep/81 */ This routine is the interface to the DL1414 displays, and to the Sonalert audio alarm. This routine, called after every a/d c a l l , is .responsible for writing onto (and flashing) the displays the message pointed to by by p t r l and ptr2 (calling args), and for sounding the Sonalert alarm in a periodic fashion. This process is begun by clearing the hardware alarm bit of the hardware control byte, and then setting i t i f the software alarm bit i s set, and there i s no alarm suppression in effect. Flashing, as well as the alarm pattern, is implemented by a software switch ("sw") which reverses i t s state after every 12 calls (counted out by "count"), creating a frequency Of 2.25 Hz. THIS ROUTINE CALLS: none GLOBALS: SW int count suppress_timer hcb message STATIC LOCALS: none int • software switch, which reverses i t s state on each reset of "count". The state of sw determines whether or not the displays are blanked, and the alarms silenced, on this c a l l . The reversing state thus ,implements flashing and beeping. • counter of number of c a l l s made to this routine since the last count reset. This variable i s reset after every 12th c a l l . -time remaining in current alarm suppress. int unsigned char = hardware control byte. See setupO. char array • set of a l l DL1414 output messages. AOTOMATIC LOCALS: i - int df - int • general purpose work variable. » display frequency. Displays are flashed, and the Sonalert strobed i f df > 0. ptr? ptr2 d l l d l r • char pointer • char pointer = pointer to four chars to display on the l e f t display. = pointer to four chars to display on the right display. » char pointer = address of l e f t DL1414. • char pointer = address of right DL1414. CONSTANT DEFINITIONS: none /********************************^* audiovisual ( p t r l , ptr2, df) ehar * p t r l , *ptr2; 118 int df; begin unsigned char *dll=0x9003, *dlr=0x8003; FAST int i ; . /* set hardware alarms i f software alarm set and no suppression */ hcb S.= OxdO; i f ((hcb & 0x10) != 0x00 && suppress_timer == 0) hcb |= 0x20;,' i f (df > 0) begin /* i f df > 0, flash displays, alarm */ i f (++count >= 12) begin /* fixed freq, - 2.25 Hz. */ count =0; v ' sw = -sw; end; i f (sw > 0) begin ptrl = ptr2 = ^message[BLANK]; /* blank displays */ hcb &= OxdO; /* silence audio alarm */ end; end; for (i = 0; i <= 3; i++) begin /* write onto DL1414's */ * d l l — = *ptn++; * d l r — = *ptr2++; end; end • APPENDIX C CLINICAL TRIAL CHART RECORDINGS 1 2 0 t cmrr20/mm(v) 2 sec/cm (h) niij imiii i i j i inji — j m —:|— : n i i J i i i i J i i M i l n i i J i i i M iniilni-. IIHIIIU IIIHIIIH imlnijIiiijliinliiH i nil 111 tl 11 ul i ml n nitliimiiuliiitliiit i1 itln it In it 111 it Ii in intlmtlmtl icmr^O/mm (v) 2 sec / cm (h) 1 cmtyO/mm (v) 2sec / cm (h) Case 1 Arrows I n d i c a t e Alarms T r i g g e r e d t i l l W111W 111 w 111 w 111 y 11 .^ M I U I I I U H I W I I I W ' I «; 111 y 111,1111H 111V11 L l 111 H I 11M II I W 11 Ul 11 >il 111 H 111 M l 11 H 11 Kl 11 J r 1 cmHoO /mm (v) 2 sec/ cm(h) iliiiilmiluii I H I I I I I [ | ' I I I I I I I I I I I I I M H I I I I I I | I I I I I I I I I I I I I I I ' I I I ! I I ll I I I  I I I |  ' I I I ! l l H ll I I I I I I I I | l H I ! I I I I I H I I ll i " I ' " 1 I I I I I M I ' I I 1 cmH20/mm (v) 2 sec /mm (h) 1 cmH20 /mm (v) 2 sec/mm (h) Case 2 Arrows I n d i c a t e Alarms T r i g g e r e d 1 cmr^O/mm (v) 2 sec /cm(h) 2 sec /mm (h) Case 3 Arrows I n d i c a t e Alarms T r i g g e r e d 

Cite

Citation Scheme:

        

Citations by CSL (citeproc-js)

Usage Statistics

Share

Embed

Customize your widget with the following options, then copy and paste the code below into the HTML of your page to embed this item in your website.
                        
                            <div id="ubcOpenCollectionsWidgetDisplay">
                            <script id="ubcOpenCollectionsWidget"
                            src="{[{embed.src}]}"
                            data-item="{[{embed.item}]}"
                            data-collection="{[{embed.collection}]}"
                            data-metadata="{[{embed.showMetadata}]}"
                            data-width="{[{embed.width}]}"
                            async >
                            </script>
                            </div>
                        
                    
IIIF logo Our image viewer uses the IIIF 2.0 standard. To load this item in other compatible viewers, use this url:
http://iiif.library.ubc.ca/presentation/dsp.831.1-0065493/manifest

Comment

Related Items