Open Collections

UBC Theses and Dissertations

UBC Theses Logo

UBC Theses and Dissertations

Studies toward the development of stable InP insulated gate field-effect transistors Backhouse, Christopher James 1992

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

Item Metadata

Download

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

Full Text

STUDIES TOWARD THE DEVELOPMENT OF STABLE InP INSULATED GATE FIELD-EFFECT TRANSISTORS by CHRISTOPHER JAMES BACKHOUSE B . S c , The U n i v e r s i t y of A l b e r t a , 1985 M.Sc, The U n i v e r s i t y of B r i t i s h Columbia, 1987 A THESIS SUBMITTED IN PARTIAL FULFILMENT OF THE REQUIREMENTS FOR THE DEGREE OF DOCTOR OF PHILOSOPHY i n ji^^ p/^cuLjy OF GRf^wora S T U D I E S THE DEPARTMENT OF ELECTRICAL ENGINEERING We accept t h i s t h e s i s as conforming t o the recfuired standard THE UNIVERSITY OF BRITISH COLUMBIA J u l y 1992 © C h r i s t o p h e r James Backhouse 1992 In presenting this thesis in partial fulfilment of the requirements for an advanced degree at the University of British Columbia, I agree that the Library shall make it freely available for reference and study. I further agree that permission for extensive copying of this thesis for scholarly purposes may be granted by the head of my department or by his or her representatives. It is understood that copying or publication of this thesis for financial gain shall not be allowed without my written permission. Department The University of British Columbia Vancouver, Canada DE-6 (2/88) A b s t r a c t S t u d i e s of the InP s u b s t r a t e , of d i e l e c t r i c s , and of t h e d i e l e c t r i c / s u b s t r a t e i n t e r f a c e s were undertaken i n order t o c o n t r i b u t e t o the development of s t a b l e i n s u l a t e d - g a t e f i e l d - e f f e c t t r a n s i s t o r s (IGFETs). O p t i c a l t r a n s i e n t c u r r e n t spectroscopy (OTCS) was a p p l i e d t o s e m i - i n s u l a t i n g InP s u b s t r a t e s t o o b t a i n i n f o r m a t i o n on deep l e v e l s . A new " i s o t h e r m a l " method of a n a l y s i s was developed which allowed, f o r the t r a n s i e n t a t each temperature, the d e t e r m i n a t i o n of the parameters d e s c r i b i n g the t r a n s i e n t without needing t o use data from t r a n s i e n t s a t other temperatures. T h i s avoided the need f o r making some assumptions which have been made i n p r e v i o u s work. Nine deep l e v e l s were found, e i g h t of which had not p r e v i o u s l y been d e t e c t e d i n s e m i - i n s u l a t i n g m a t e r i a l . Evidence was found t h a t g o l d i n e l e c t r o d e s r e a c t s with the s u b s t r a t e and i n t r o d u c e s deep l e v e l s which c o n t r i b u t e t o i n s t a b i l i t y i n the o p e r a t i o n of InP IGFETs. Negative t r a n s i e n t s , where the photocurrent t r a n s i e n t i n c r e a s e s w i t h time, were observed f o r the f i r s t time i n InP. A l e v e l a s s o c i a t e d w i t h Fe was found t o e x h i b i t f i e l d - e n h a n c e d t r a p p i n g behaviour. S e m i - i n s u l a t i n g InP was found t o be l i k e GaAs i n t h a t under h i g h e l e c t r i c f i e l d s i t e x h i b i t s low frequency o s c i l l a t i o n s due t o p r o p a g a t i n g h i g h - f i e l d domains. In p r e v i o u s work w i t h GaAs the temperature dependence of the frequency of these o s c i l l a t i o n s has been shown t o p r o v i d e i n f o r m a t i o n about deep l e v e l s . In the p r e s e n t work a m o d i f i e d v e r s i o n of t h i s technique was a p p l i e d t o InP, r e s u l t i n g i n the d e t e c t i o n of 14 s p e c t r a l peaks whose a c t i v a t i o n e n e r g i e s f e l l i n t o f i v e groups c e n t r e d a t 0.30, 0.39, 0.41, 0.44 and 0.49 eV. I t i s suggested t h a t these f i v e groups were the c o n t r i b u t i o n s of f i v e deep l e v e l s , where one l e v e l w i t h f i e l d -enhanced t r a p p i n g gave r i s e t o propagating h i g h - f i e l d domains, and the occupancies of the remaining f o u r l e v e l s were p e r t u r b e d by the passage of the domains. The s t r o n g e s t s p e c t r a l peak was found t o have an a c t i v a t i o n energy s i m i l a r t o t h a t found f o r the Fe l e v e l d e t e c t e d i n the OTCS a n a l y s i s , a l e v e l which e x h i b i t e d f i e l d -enhanced t r a p p i n g . Evidence was found t h a t the Fe l e v e l may p l a y a r o l e i n the i n s t a b i l i t y of IGFETs on s e m i - i n s u l a t i n g InP. D i e l e c t r i c l a y e r s of s i l i c o n n i t r i d e d e p o s i t e d on InP u s i n g a "remote plasma" method were c h a r a c t e r i s e d by c u r r e n t and c a p a c i t a n c e vs v o l t a g e measurements. Although d e p o s i t e d i n a manner de s i g n e d t o prevent s u b s t r a t e damage, e x c e s s i v e slow t r a p p i n g s t a t e s were observed. N a t i v e oxide l a y e r s on InP were i n v e s t i g a t e d u s i n g e l l i p s o m e t r y and c u r r e n t vs v o l t a g e measurements. The n a t i v e oxide f i l m s were produced by furnace o x i d a t i o n , o x i d a t i o n under h i g h p r e s s u r e s of oxygen and o x i d a t i o n under u l t r a v i o l e t i l l u m i n a t i o n . The u l t r a v i o l e t o x i d a t i o n s appear t o produce an oxide composed of indium phosphate, which has d i e l e c t r i c and i n t e r f a c i a l p r o p e r t i e s t h a t are p r o m i s i n g f o r use i n an IGFET. Some of the techniques used i n the p r e s e n t work were t e s t e d and improved by a p p l y i n g them f i r s t t o GaAs. F i n a l l y , a r e p o r t i s g i v e n of some p r e l i m i n a r y t r i a l s of methods u s i n g o p t i c a l r e f l e c t i v i t y and t r a n s m i s s i o n measurements t o c h a r a c t e r i z e the I I I -V s u r f a c e and bulk. T a b l e Of Contents A b s t r a c t i i T a b l e of c o n t e n t s v L i s t of t a b l e s v i i L i s t of f i g u r e s i x L i s t of symbols x i Acknowledgements x i v 1. I n t r o d u c t i o n 1 2. P r e v i o u s work 6 D r i f t due t o l e v e l s a t or near the d i e l e c t r i c 7 D r i f t due t o t r a p p i n g i n the s u b s t r a t e 12 3. A study of two d i e l e c t r i c s 15 S i l i c o n n i t r i d e d e p o s i t e d by "remote plasma" 15 Experimental procedures 17 A n a l y s i s and r e s u l t s 17 C o n c l u s i o n s 25 N a t i v e oxides 26 E l l i p s o m e t r y 26 A p p l i c a t i o n of e l l i p s o m e t r y 28 O p t i c a l c onstants of the InP/native oxide system 30 M u l t i p l e angle of i n c i d e n c e e l l i p s o m e t r y 31 Study of n a t i v e oxides 33 Growth mechanism of n a t i v e oxides 33 High p r e s s u r e o x i d a t i o n 37 Thermal o x i d a t i o n 38 O x i d a t i o n s under u l t r a v i o l e t i l l u m i n a t i o n 41 4. Deep l e v e l s i n s e m i - i n s u l a t i n g InP by OTCS 4 3 O p t i c a l t r a n s i e n t c u r r e n t spectroscopy 43 Experimental procedure 45 A n a l y s i s technique 48 R e s u l t s 51 D i s c u s s i o n 58 5. The n e g a t i v e t r a n s i e n t phenomenon i n GaAs and InP 65 The n e g a t i v e t r a n s i e n t i n InP 65 A model f o r the negative t r a n s i e n t 67 6. Comparison of the is o t h e r m a l and boxcar techniques of a n a l y s i s of photocurrent t r a n s i e n t s 76 Experimental procedures 77 R e s u l t s 78 D i s c u s s i o n 83 Co n c l u s i o n s 90 7. Deep l e v e l domain spectroscopy 91 Experimental procedures 94 Method of a n a l y s i s of power s p e c t r a 95 R e s u l t s and d i s c u s s i o n 101 I d e n t i f i c a t i o n of l e v e l s 103 D r a i n c u r r e n t d r i f t 105 8. Summary, c o n c l u s i o n s and suggestions f o r f u t u r e work 108 Fut u r e work 110 Refe r e n c e s 112 Appendix A: Measurements of r e f l e c t i v i t y s p e c t r a 123 Appendix B; A p p l i c a t i o n s of i n f r a r e d t r a n s m i s s i o n s p e c t r a 129 Appendix C: Program l i s t i n g s 137 L i s t of Ta b l e s Page Tabl e I. C o r r e l a t i o n t e s t f o r InP system a t 632.8nm 32 Tabl e I I . OTCS a c t i v a t i o n e n e r g i e s 54 Tabl e I I I . E f f e c t of a p p l i e d v o l t a g e on OTCS amplitudes 58 Tabl e IV. L e v e l s found by the i s o t h e r m a l method 84 Ta b l e V. Sample v a l u e s of the amplitude, T and product 85 Tabl e VI. A c t i v a t i o n e n e r g i e s from a n a l y s i s o f o s c i l l a t i o n s . . 1 0 4 L i s t of F i g u r e s Page F i g . 3.1. Diagram of the remote plasma d e p o s i t i o n system 15 F i g . 3.2. C(V) p l o t s of sample S390 18 F i g . 3.3. C(V) p l o t s of sample S384 18 F i g . 3.4. C(V) p l o t s of sample S325 19 F i g . 3.5. C(V) p l o t s of sample S390 (100s per p o i n t ) 21 F i g . 3.6. Terman p l o t , S390 a t 1 MHz, 0.1 s e c / p o i n t 22 F i g . 3.7. Terman p l o t , S390 at 1 MHz, 100 s e c / p o i n t 23 F i g . 3.8. S u c c e s s i v e I (V) measurements f o r S384 23 F i g . 3.9. Terman p l o t , S384 at 1 MHz, 0.1 s e c / p o i n t 24 F i g . 3.10. Terman p l o t , S325 at IMHz, O . l s e c / p o i n t 24 F i g . 3.11. Thickness vs temperature f o r thermal o x i d a t i o n s 39 F i g . 3.12. R e s i s t a n c e vs t h i c k n e s s f o r thermal o x i d a t i o n s 40 F i g . 3.13. UV o x i d a t i o n s i n f a s t and slow f l o w i n g oxygen 41 F i g . 3.14. T h i c k n e s s vs time f o r UV o x i d a t i o n s 42 F i g . 4.1. Diagram of OTCS experiment 47 F i g . 4.2. A r r h e n i u s p l o t of OTCS time c o n s t a n t s . (5V, 935nm)....55 F i g . 4.3. A r r h e n i u s p l o t of OTCS time c o n s t a n t s . (12V, 935nm)....56 F i g . 4.4. A r r h e n i u s p l o t of OTCS time c o n s t a n t s . (12V, 660nm)....57 F i g . 5.1. A n e g a t i v e t r a n s i e n t recorded a t 235K. (5V, 555nm) 66 F i g . 5.2A P r o g r e s s i v e changes i n c o n s e c u t i v e t r a n s i e n t s . (1,2) ... .68 F i g . 5.2B P r o g r e s s i v e changes i n c o n s e c u t i v e t r a n s i e n t s . (3,4) ... .69 F i g . 5.3. Current t r a n s i e n t f o l l o w i n g 10s of i l l u m i n a t i o n 73 F i g . 5.4A. R e s i d u a l s u s i n g e x p o n e n t i a l s 74 F i g . 5.43. R e s i d u a l s u s i n g m o d i f i e d e x p o n e n t i a l s 74 F i g . 5.5. P l o t s of best f i t e x p o n e n t i a l and m o d i f i e d e x p o n e n t i a l . 7 5 F i g . 6.1. Sample curves from the boxcar method 78 F i g . 6.2. Current vs time, showing two n e g a t i v e t r a n s i e n t s 79 F i g . 6.3. Isothermal and boxcar method A r r h e n i u s p l o t s , dot -ve..80 F i g . 6.4. Isothermal and boxcar method A r r h e n i u s p l o t s , dot +ve. .85 F i g . 6.5. R e s i d u a l s from i s o t h e r m a l f i t 86 F i g . 6.6. Isothermal method A r r h e n i u s p l o t s , dot +ve 88 F i g . 6.7. Logarithm of (amplitude-T) product vs temperature 89 F i g . 7.1. Current vs time a t 250K t o 295K 96 F i g . 7.2. Cu r r e n t vs time a t 255K 97 F i g . 7.3. Power s p e c t r a a t 252K t o 294K 99 F i g . 7.4. A r r h e n i u s p l o t s of s p e c t r a l peaks 100 F i g . 7.5. Power s p e c t r a with c a l c u l a t e d s p e c t r a l peaks 102 F i g . A . l . S p e c t r a l and i n t e n s i t y v a r i a t i o n of a b s o r p t i o n 132 F i g . A.2. T r a n s m i t t e d s i g n a l (time varying) 135 L i s t of Symbols PpQ the bulk h o l e c o n c e n t r a t i o n npo the bulk e l e c t r o n c o n c e n t r a t i o n 7g the s u r f a c e p o t e n t i a l (measured r e l a t i v e t o the bulk) 6 q/kT k Boltzmann's constant q the charge of a proton Eg the d i e l e c t r i c constant of the s u b s t r a t e T the a b s o l u t e temperature (K) CQ measured c a p a c i t a n c e c a p a c i t a n c e of d i e l e c t r i c Qgg the charge taken up by i n t e r f a c e s t a t e s Qg^ the charge i n the s u b s t r a t e Vg the e f f e c t i v e gate v o l t a g e Ngg the s u r f a c e s t a t e d e n s i t y Vjjj a vacancy on an indium s i t e Pjjj a phosphorus atom occupying an indium s i t e a phosphorus atom occupying an i n t e r s t i t i a l s i t e Inp an indium atom occupying a phosphorus s i t e Vp a vacancy on a phosphorus s i t e Fejjj an i r o n atom on an indium s i t e e~ an e l e c t r o n A an e l l i p s o m e t r y parameter r e l a t e d t o phase change i|i an e l l i p s o m e t r y parameter r e l a t e d t o a t t e n u a t i o n Aj^j m a t r i x of p a r t i a l d e r i v a t i v e of the f i t t e d model f u n c t i o n w i t h r e s p e c t t o the j t h parameter, e v a l u a t e d a t the time experimental data a t time es t i m a t e d standard d e v i a t i o n s of the data B v e c t o r of the observed d i f f e r e n c e s between and model f u n c t i o n X v e c t o r of the changes t o be made t o the f i t t i n g parameters. P the v e c t o r of the estimated parameters Pg the v e c t o r of d e s i r e d b e s t - f i t parameters the c h i - s q u a r e d of the f i t T time co n s t a n t of the decay of c u r r e n t i n OTCS emi s s i o n r a t e of e l e c t r o n s from a deep l e v e l c o n s t a n t of p r o p o r t i o n a l i t y a^^ apparent capture c r o s s s e c t i o n Ej^^ a c t i v a t i o n energy of emission Eg a c t i v a t i o n energy r e q u i r e d f o r c a r r i e r c a p t u r e Z o p t i c a l power a a b s o r p t i o n c o e f f i c i e n t f o r l i g h t V frequency kj. complex p o r t i o n of r e f r a c t i v e index c speed of l i g h t i n a vacuum n r e a l p o r t i o n of r e f r a c t i v e index or c o n c e n t r a t i o n o f e l e c t r o n s N,j, c o n c e n t r a t i o n of t r a p s f occupancy p r o b a b i l i t y of a t r a p or, frequency of c u r r e n t o s c i l l a t i o n s J c u r r e n t d e n s i t y /Lt m o b i l i t y E e l e c t r i c f i e l d V e l e c t r o n thermal v e l o c i t y or v ( E ) , e l e c t r o n v e l o c i t y o u t s i d e domain K-^, K2 c o n s t a n t s of p r o p o r t i o n a l i t y '^ MAX temperature of maximum c u r r e n t c o n t r i b u t i o n A(j amplitude of a decay t time A E energy d i f f e r e n c e from l e v e l t o v a l e n c e or con d u c t i o n band L sample l e n g t h VJJQJJ, domain v e l o c i t y f i e l d - d e p e n d e n t capture r a t e ACKNOWLEDGEMENT S I would l i k e t o thank my s u p e r v i s o r P r o f e s s o r L. Young f o r h i s support and guidance d u r i n g t h i s r e s e a r c h . Both i n and out o f t h e l a b o r a t o r y , the p a t i e n c e and a s s i s t a n c e of A. Leugner, H. Kato and D. Hui are g r e a t l y a p p r e c i a t e d . The support of the 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 Research C o u n c i l of Canada i s g r a t e f u l l y acknowledged. CHAPTER 1. INTRODUCTION InP has the same advantages over S i t h a t GaAs has, having a h i g h e l e c t r o n m o b i l i t y , a d i r e c t band-gap and s e m i - i n s u l a t i n g (SI) s u b s t r a t e s . From the e a r l i e s t r e s u l t s of L i l e , C o l l i n s , Meiners & Messick (1978) with i n s u l a t e d gate f i e l d - e f f e c t t r a n s i s t o r s (IGFETs), the d i e l e c t r i c / s u b s t r a t e i n t e r f a c e s of InP have been found t o o f f e r s u r f a c e - s t a t e d e n s i t i e s much lower than those of GaAs, making IGFETs more f e a s i b l e . S i n c e InP i s the a p p r o p r i a t e s u b s t r a t e f o r o p t o - e l e c t r o n i c d e v i c e s based on e p i t a x i a l l a y e r s of l a t t i c e - m a t c h e d In;^_^Ga^hSyP-^_^, a s u c c e s s f u l NMOS (n - channel metal oxide semiconductor) technology would a l l o w o p t i c a l components and t r a n s i s t o r s t o be b u i l t upon the same s u b s t r a t e (Kasahara, Susimoto & Nomura 1983, Antreasyan, G a r b i n s k i , Mattera, Temkin & Abeles 1987). As found by Gardner, Narayan, L i u , B e c h t l e , Bibby, Capewell & C o l v i n (1987), the low b a r r i e r h e i g h t o f S c h o t t k y c o n t a c t s on InP l i m i t s the use of metal-semiconductor f i e l d - e f f e c t t r a n s i s t o r s (MESFETs). I n s u l a t e d - g a t e f i e l d - e f f e c t t r a n s i s t o r s (IGFETs), otherwise known as m e t a l - i n s u l a t o r -semiconductor f i e l d - e f f e c t t r a n s i s t o r s (MISFETs) would be more e a s i l y i n c o r p o r a t e d i n very l a r g e s c a l e i n t e g r a t i o n (VLSI) implementations than MESFETs because they permit a wider range of gate v o l t a g e s , VLSI c i r c u i t s f a b r i c a t e d upon SI InP s u b s t r a t e s have been p r e d i c t e d t o be on the order of 100 times f a s t e r than those implemented on S i (Tseng, Bark, D i e t r i c h , C h r i s t o u , Henry, Schmidt & Saks 1981). L i l e (1986) s t a t e d t h a t the i n s t a b i l i t y o f the d r a i n c u r r e n t i n InP IGFETs was the "major o b s t a c l e " p r e v e n t i n g l a r g e s c a l e VLSI implementations. T h i s i n s t a b i l i t y , r e f e r r e d t o as d r i f t , i n v o l v e s the decrease of the d r a i n c u r r e n t over a time s c a l e of about 1000s. Wager, Owen & Prasad (1987) reviewed the models of d r i f t which a l l i n v o l v e deep l e v e l s i n the bulk m a t e r i a l , i n the near s u r f a c e r e g i o n or i n the d i e l e c t r i c m a t e r i a l , or i n a l l t h r e e . I t i s not known which of these r e g i o n s i s the most s i g n i f i c a n t source of deep l e v e l s . I t i s a l s o u n c l e a r whether these l e v e l s are u n a v o i d a b l y p r e s e n t i n the s e m i c o n d u c t o r / i n t e r f a c e / d i e l e c t r i c system or whether they are i n t r o d u c e d by the f a b r i c a t i o n p r o c e s s . P r e v i o u s work on the development of an IGFET i s reviewed i n Chapter 2 of t h i s t h e s i s with an emphasis on the v a r i o u s models f o r d r i f t . The f i r s t p a r t of t h i s t h e s i s concerns the study and development of d i e l e c t r i c s f o r IGFET use. The second and major p a r t of t h i s t h e s i s i s concerned with d e v e l o p i n g and a p p l y i n g two t e c h n i q u e s f o r o b t a i n i n g i n f o r m a t i o n on deep l e v e l s i n the semi-i n s u l a t i n g s u b s t r a t e , o p t i c a l t r a n s i e n t c u r r e n t s p e c t r o s c o p y (OTCS) and deep l e v e l domain spectroscopy (DLDS). A study of two d i e l e c t r i c s i s d e s c r i b e d i n Chapter 3: i ) a l a y e r of s i l i c o n n i t r i d e d e p o s i t e d by means of a plasma-enhanced r e a c t i o n where the plasma was l o c a t e d f a r from the s u b s t r a t e i n an e f f o r t t o minimise damage t o the s u b s t r a t e by the plasma, and i i ) n a t i v e oxide f i l m s . The i n t e r f a c e and d i e l e c t r i c p r o p e r t i e s were i n v e s t i g a t e d u s i n g c u r r e n t and c a p a c i t a n c e vs v o l t a g e measurements and e l l i p s o m e t r y . The s i l i c o n n i t r i d e was found t o be u n s u i t a b l e . The growth, s t r u c t u r e and e l e c t r i c a l p r o p e r t i e s of the n a t i v e o x i d e were i n v e s t i g a t e d by e l l i p s o m e t r y and c u r r e n t - v o l t a g e measurements. I t was concluded t h a t i t may be p o s s i b l e t o f a b r i c a t e a d i e l e c t r i c s u i t a b l e f o r IGFET use by producing a n a t i v e o x i d e under u l t r a v i o l e t i l l u m i n a t i o n . A p r e l i m i n a r y t e s t of a method of d e t e r m i n i n g the e l e c t r i c f i e l d a t the semiconductor s u r f a c e i s p r e s e n t e d i n Appendix A. An OTCS study of InP i s presented i n Chapter 4. In OTCS i n f o r m a t i o n about the deep l e v e l s p r e s e n t i n the s u b s t r a t e i s o b t a i n e d by s t u d y i n g c u r r e n t t r a n s i e n t s f o l l o w i n g i l l u m i n a t i o n . The o r i g i n a l technique f o r a p p l y i n g OTCS was the boxcar te c h n i q u e i n which the r a t e c o n s t a n t s of the c u r r e n t t r a n s i e n t are determined by u s i n g i n f o r m a t i o n obtained a t d i f f e r e n t temperatures and by assuming t h a t the amount of trapped charge does not vary w i t h temperature. In the p r e s e n t work, an " i s o t h e r m a l " technique was developed i n which the r a t e constants of the c u r r e n t t r a n s i e n t a t each temperature were determined u s i n g o n l y the i n f o r m a t i o n o b t a i n e d a t t h a t temperature, thereby a v o i d i n g the need f o r making some assumptions r e q u i r e d i n the boxcar method. Nine deep l e v e l s were d e t e c t e d , e i g h t of which had not p r e v i o u s l y been d e t e c t e d i n t h e s e m i - i n s u l a t i n g (SI) m a t e r i a l . A p r e l i m i n a r y t e s t of a method s i m i l a r t o OTCS but making use of t r a n s i e n t s i n t r a n s m i t t e d l i g h t r a t h e r than t r a n s i e n t s i n c u r r e n t as i n OTCS, i s p r e s e n t e d i n Appendix B. In Chapter 5 are presented the r e s u l t s of an i n v e s t i g a t i o n i n t o the " n e g a t i v e t r a n s i e n t " phenomenon i n GaAs and InP, where the c u r r e n t f o l l o w i n g i l l u m i n a t i o n i n c r e a s e s w i t h time r a t h e r than decaying. During the OTCS experiment w i t h InP, n e g a t i v e t r a n s i e n t s and o s c i l l a t i o n s i n the c u r r e n t were found. N e i t h e r phenomenon had p r e v i o u s l y been r e p o r t e d i n the l i t e r a t u r e f o r InP. A model was developed f o r the n e g a t i v e t r a n s i e n t by c o n s i d e r i n g the c o n t r i b u t i o n t o the c u r r e n t t r a n s i e n t from the undepleted r e g i o n of the sample l e a d i n g t o a " m o d i f i e d e x p o n e n t i a l " . Since negative t r a n s i e n t s i n GaAs have o f t e n been r e p o r t e d , the model was a p p l i e d t o n e g a t i v e t r a n s i e n t s from GaAs samples. The m o d i f i e d e x p o n e n t i a l was found d e s c r i b e the n e g a t i v e t r a n s i e n t w e l l . In Chapter 6, the " i s o t h e r m a l " and the boxcar t e c h n i q u e s were compared by a p p l y i n g both t o the same data, o b t a i n e d from GaAs samples. For experimental c o n d i t i o n s s i m i l a r t o those of p r e v i o u s l y r e p o r t e d a p p l i c a t i o n s of the OTCS technique t o GaAs, i t was found t h a t the amount of trapped charge does v a r y w i t h temperature and hence one of t h e assumptions i n the boxcar method does not h o l d f o r the samples used. Unless i t i s v e r i f i e d t h a t the assumptions u n d e r l y i n g the boxcar method are v a l i d , the boxcar method i s l i k e l y t o determine t r a p parameters with a s m a l l e r r o r i n the a c t i v a t i o n energy and a l a r g e e r r o r i n the capture c r o s s s e c t i o n . O s c i l l a t i o n s occur i n GaAs and InP under e l e c t r i c f i e l d s g r e a t e r than about 1 kV/cm or more. F o u r i e r t r a n s f o r m s of the c u r r e n t vs time have shown sharp peaks. These peaks have been a t t r i b u t e d t o the formation and p r o p a g a t i o n of h i g h - f i e l d domains due i n t u r n t o the p r e f e r e n t i a l t r a p p i n g of hot e l e c t r o n s . In DLDS the temperature dependence of the frequency of these peaks has been anal y s e d t o o b t a i n i n f o r m a t i o n on deep l e v e l s i n GaAs. As d e s c r i b e d i n Chapter 7, t h i s technique was improved and a p p l i e d f o r the f i r s t time t o InP. In Chapter 8 the summary and c o n c l u s i o n s of t h i s work ar e presented. CHAPTER 2. PREVIOUS WORK An IGFET upon InP t y p i c a l l y c o n s i s t s of a p-type o r SI s u b s t r a t e on which are two ohmic c o n t a c t s , the source and d r a i n . Under each of these c o n t a c t s the m a t e r i a l i s n-type by i m p l a n t a t i o n or d i f f u s i o n . The r e g i o n between the two c o n t a c t s i s covered by a d i e l e c t r i c which i n t u r n i s covered by the gate e l e c t r o d e . When a p o s i t i v e v o l t a g e i s p l a c e d upon the gate, a l a y e r of e l e c t r o n s i s induced t o form under the d i e l e c t r i c , forming a c o n d u c t i v e channel between the source and d r a i n . Because the a c t i v e r e g i o n of the d e v i c e i s j u s t beneath the d i e l e c t r i c , a c r i t i c a l s t e p i n the f a b r i c a t i o n of an IGFET i s the development of a good d i e l e c t r i c and i n t e r f a c e . S i n c e the f i r s t IGFET was demonstrated by L i l e e t a l . (1978) IGFETs have been b u i l t with many d i e l e c t r i c s i n an e f f o r t t o improve the m o b i l i t i e s and the s u r f a c e s t a t e d e n s i t i e s a t the i n t e r f a c e s and t o reduce the magnitude of the d r i f t e f f e c t . Most IGFETs have been f a b r i c a t e d w i t h d e p o s i t e d d i e l e c t r i c s s i n c e the n a t i v e o x i d e s tend t o be too conductive. There have been many attempts t o form an i n s u l a t i n g n a t i v e o x i d e by chemical or anodic means ( f o r i n s t a n c e : Yamamoto, Shibukawa, Yamaguchi & Uemura 1983; Sawada, Hasegawa & Ohno 1983; Robach, Joseph, Bergignat & H o l l i n g e r 1989) or plasma means ( f o r i n s t a n c e : Pande & N a i r 1984; Hirayama, Park, Koshiga & Sugano 1982) . These attempts met w i t h l i m i t e d success, r e s u l t i n g i n l a r g e d r i f t e f f e c t s and h i g h s u r f a c e s t a t e d e n s i t i e s . The e x c e p t i o n i s t h e work of Robach e t a l . which produced a n o n - s t o i c h i o m e t r i c "condensed phosphate" oxide l a y e r , t h a t from c a p a c i t a n c e - v o l t a g e measurements appeared t o c o n t a i n few s u r f a c e s t a t e s . However no measurements were made of the d r i f t e f f e c t i n IGFETs u s i n g t h i s d i e l e c t r i c . E a r l y work w i t h d i e l e c t r i c s d e p o s i t e d upon InP used p y r o l y t i c chemical vapour d e p o s i t i o n but i n order t o o b t a i n adequate e l e c t r i c a l p r o p e r t i e s i n the d i e l e c t r i c , h i g h d e p o s i t i o n temperatures were r e q u i r e d , h i g h enough t h a t s u b s t r a t e damage was a problem. For example, Kobayashi, Okamura, Yamaguchi, Shinoda and H i r o t a (1981) found t h a t u n l e s s the d e p o s i t i o n temperatures of p y r o l y t i c A I 2 O 3 were above 340°C, IGFETs u s i n g t h i s m a t e r i a l e x h i b i t e d d r i f t by as much as an order of magnitude over 100s. In an e f f o r t t o reduce the d e p o s i t i o n temperature the r e a c t i o n g i v i n g r i s e t o the d i e l e c t r i c t o be d e p o s i t e d was a s s i s t e d by a l l o w i n g i t t o proceed i n a plasma, hence the name plasma-enhanced chem i c a l vapour d e p o s i t i o n (PECVD). Saunier, Nguyen, Messick and Khatibzadeh (1990) used Si02 d e p o s i t e d i n t h i s manner t o produce IGFETs which e x h i b i t e d a d r i f t of 10% over 10 minutes. Although the temperatures were reduced t o 300°C or l e s s , the s u b s t r a t e s may be damaged by the e f f e c t s of p a r t i c l e s i n the plasma s t r i k i n g the s u r f a c e of the s u b s t r a t e . For whatever reason, t h e problem of d r i f t remains. D r i f t due t o l e v e l s a t or near the d i e l e c t r i c Goodnick, Hwang & Wilmsen (1984), and Pham, Esteve, F a r r e , E l Mahdy, Ronda & Simonne (1987) r e p o r t e d t h a t d r i f t was a s s o c i a t e d w i t h the presence of n a t i v e o x i d e s , i n t e n t i o n a l l y or u n i n t e n t i o n a l l y produced d u r i n g f a b r i c a t i o n . Goodnick e t a l . proposed t h a t the d r i f t was due t o the t u n n e l l i n g of e l e c t r o n s i n t o a n a t i v e oxide l a y e r . The n a t i v e oxide l a y e r was assumed t o c o n s i s t of a t h i n i n s u l a t i n g l a y e r of InP04 under a semiconducting l a y e r of In203. I t was assumed t h a t t h e r e i s t u n n e l l i n g of e l e c t r o n s from the s u b s t r a t e through the i n s u l a t o r t o the outer l a y e r where they are trapped. As the c a r r i e r s are trapped they are removed from the c o n d u c t i n g channel and the d r a i n c u r r e n t decreases. I f the i n s u l a t i n g l a y e r i s s u f f i c i e n t l y t h i c k (4nm or so) then th e t u n n e l l i n g c u r r e n t i s s m a l l enough t o e x p l a i n the v a r i a t i o n o f t h e d r a i n c u r r e n t over time s c a l e s of about 1000s. However, the o x i d e s t r u c t u r e i s expected t o be very process dependent and thus t h i s model cannot e x p l a i n d r i f t i n the g e n e r a l case. T h i s model does not p r e d i c t any temperature dependence i n the d r i f t , i n c o n t r a d i c t i o n w i t h e x p e r i m e n t al o b s e r v a t i o n . Okamura & Kobayashi (1980) proposed a model i n which t h e r m a l l y a c t i v a t e d c a r r i e r s were trapped at d i s c r e t e l e v e l s p r o v i d e d i n the n a t i v e o x i d e . V a r i o u s a p p l i c a t i o n s of t h i s and s i m i l a r models p l a c e the a c t i v a t i o n energy i n the range of 16 t o 38meV. Wager e t a l . (1987) r e f e r t o t h i s as "the most popular model". Hasegawa & Sawada (1982) proposed t h a t i n t e r f a c e s t a t e s due t o a d i s o r d e r e d l a y e r a t the I l l - V / d i e l e c t r i c i n t e r f a c e are r e s p o n s i b l e f o r d r i f t . Wager e t a l . (1987) determined t h a t the c a p t u r e c r o s s s e c t i o n s r e q u i r e d by t h i s model f o r the i n t e r f a c e s t a t e s are u n p h y s i c a l . F r i t z s h e (1980) and van Staa, Romlach & Kassing (1983) proposed t h a t c a r r i e r s t u n n e l t o t r a p s which are d i s t r i b u t e d throughout the n a t i v e o x i d e . Wager e t a l . (1987) p o i n t e d out t h a t t h i s model p r e d i c t s the wrong temperature dependence f o r d r i f t . Wilmsen, Wager, Geib, Hwang & F a t h i p o u r (1983) proposed t h a t d r i f t a rose from t r a p s i n d e p o s i t e d i n s u l a t o r s . High d e p o s i t i o n temperatures are r e q u i r e d t o o b t a i n an adequate d i e l e c t r i c . But these h i g h temperatures r e s u l t i n r a p i d l o s s of phosphorus from the semiconductor s u r f a c e , thereby c r e a t i n g t r a p s i n the s u b s t r a t e . Goodnick e t a l . suggested t h a t the way t o e l i m i n a t e d r i f t i s t o remove the n a t i v e oxides completely or t o ensure t h a t t h e y do not p r o v i d e the deep l e v e l s which produce d r i f t . However, Goodman, Wessels & Ang (1984) , and L i l e & T a y l o r (1983) found t h a t the removal of the n a t i v e oxides l e d t o a poor i n t e r f a c e . Pande & N a i r (1984) and Van Vechten & Wager (1985) claime d t h a t i t i s v i t a l t o e t c h away the n a t i v e oxides b e f o r e d e p o s i t i n g the d i e l e c t r i c , t y p i c a l l y Si02 or s i l i c o n n i t r i d e . Others c l a i m e d t h a t the presence of n a t i v e oxides a t the i n t e r f a c e g r e a t l y improves the d i e l e c t r i c performance (Yamamoto, Shibukawa, Yamaguchi & Uemura 1982; Sawada, I t a g a k i , Hasegawa & Ohno 1984; Sawada & Hasegawa 1982; Koren, Yu, Chen, Bar-Chaim, M a r g a l i t & Y a r i v 1982; H o i l i n g e r , Joseph, Robach, Bergignat, Commere, V i k t o r o v i c h & Froment 1987). Sawada e t a l . (1984) r e p o r t e d t h a t t h e r e appeared t o be major d i f f e r e n c e s between the behaviour of t h i c k (low r e s i s t i v i t y and h y g r o s c o p i c ) and t h i n ( r e l a t i v e l y t r a p f r e e ) n a t i v e o x i d e s . Wager, Geib, Wilmsen & Kazmerski (1983) and Goodnick e t a l . (1984) found t h a t the n a t i v e oxide of InP tends t o c o n s i s t of an i n n e r l a y e r of an i n s u l a t o r , InP04, 2 - 4nm t h i c k , and an o u t e r l a y e r of In203 which has a low r e s i s t i v i t y . Goodnick e t a l . (1984) pr e s e n t e d a model f o r the d r a i n c u r r e n t d r i f t i n which t h e e l e c t r o n s t u n n e l through the i n s u l a t i n g l a y e r and are t r a p p e d i n the In203, s u g g e s t i n g t h a t the successes and f a i l u r e s of v a r i o u s n a t i v e oxide removal, enhancement or m o d i f i c a t i o n based IGFETs can be e x p l a i n e d i n terms of the good i n t e r f a c i a l and e l e c t r i c a l q u a l i t i e s of the phosphate l a y e r and the poor q u a l i t i e s of the s e s q u i o x i d e l a y e r , In203. Some r e s e a r c h has been d i r e c t e d t o the development of what L i l e & T a y l o r (1983) c a l l e d an " o p t i m a l l y m o d i f i e d " n a t i v e o x i d e , one c o n s i s t i n g of InP04 alone. Koren e t a l . (1982), Yamamoto e t a l . (1982), Sawada e t a l . (1984) and Sawada & Hasegawa (1982), used a composite d i e l e c t r i c s t r u c t u r e where the n a t i v e oxide was used as a p a s s i v a t i n g l a y e r over which a second d i e l e c t r i c l a y e r was d e p o s i t e d or formed. These approaches met w i t h o n l y l i m i t e d s u c c e s s . Wager & Wilmsen (1983) suggested t h a t d r i f t i n composite d i e l e c t r i c IGFETs can a r i s e from f u r t h e r p r o d u c t i o n of non-optimal n a t i v e o x i d e s b e f o r e or d u r i n g the f o r m a t i o n of the second d i e l e c t r i c l a y e r . There appears t o be d e g r a d a t i o n of the t h i n n a t i v e o xide l a y e r by the d i e l e c t r i c d e p o s i t i o n and by the c o n t i n u e d growth of non-optimal oxides (Pande & G u t i e r r e z 1985). The s u b s t r a t e s u r f a c e can be prevented from forming a n a t i v e oxide o n l y by m a i n t a i n i n g an u l t r a - h i g h vacuum (UHV) from the time of the i n i t i a l n a t i v e oxide removal u n t i l a f t e r the d e p o s i t i o n of the d i e l e c t r i c . IGFET f a b r i c a t i o n s t o date have not used a UHV environment and have t h e r e f o r e exposed the s u b s t r a t e t o oxygen, a l l o w i n g the r a p i d formation of a t h i n n a t i v e oxide l a y e r . A study by Pham e t a l . (1987) of d r a i n c u r r e n t d r i f t i n composite d i e l e c t r i c systems found t h a t the optimum t h i c k n e s s of the n a t i v e oxide was 3nm, and suggested t h a t t h i s was because a t h i c k e r oxide would be r i c h i n In203 but a t h i n n e r oxide would more r e a d i l y a l l o w indium t o d i f f u s e t o the exposed s u r f a c e where i t would o x i d i s e t o form In203 d u r i n g l a t e r p r o c e s s i n g . Attempts have a l s o been made t o develop a d e p o s i t e d - d i e l e c t r i c IGFET wit h the n a t i v e oxide e l i m i n a t e d as much as p o s s i b l e . For i n s t a n c e , S a u t r e u i l , V i k t o r o v i t c h & B l a n c h e t (1984) found t h a t a c i d etches of the s u r f a c e l e d t o a " f r a g i l e " s u r f a c e which was degraded by d i e l e c t r i c d e p o s i t i o n , l e a d i n g t o a poor i n t e r f a c e . S i m i l a r l y , Okamura & Kobayashi (1980) removed th e n a t i v e oxide by i n - s i t u HCl e t c h i n g p r i o r t o the d e p o s i t i o n of A I 2 O 3 , r e s u l t i n g i n a damaged s u b s t r a t e w i t h poor i n t e r f a c i a l c h a r a c t e r i s t i c s . The r e s u l t i n g d e v i c e s gave r i s e t o d r a i n c u r r e n t d r i f t . D el Alamo & M i z u t a n i (1987) found t h a t In d r o p l e t s were v i s i b l e on the InP s u r f a c e a f t e r exposure t o temperatures as low as 350°C, which l e d t o the l o s s of P. Many p r o c e s s i n g s t e p s , f o r i n s t a n c e , d i e l e c t r i c d e p o s i t i o n and a n n e a l i n g of ohmic c o n t a c t s , i m p l a n t a t i o n s or d i e l e c t r i c s , i n v o l v e h i g h e r temperatures. The l o s s of P produces donor s t a t e s due t o phosphorus v a c a n c i e s (Ej,-0.1eV), and acceptor s t a t e s due t o the a n t i s i t e d e f e c t s (E^ -0.5eV) (Wieder 1983). I t i s common t o attempt t o m a i n t a i n the s t o i c h i o m e t r y by i n t r o d u c i n g phosphorus ambients, overabundances or o v e r p r e s s u r e s d u r i n g d e p o s i t i o n ( L i l e & T a y l o r 1983; Pande, F a t h i m u l l a , G u t i e r r e z & Messick 1986; Messick 1984; Cheng e t a l . 1985; Pande e t a l . 1984; Pande & G u t i e r r e z 1985, 1985b; S e r r e z e e t a l . 1987; H i r o t a e t a l . 1985; Hirayama e t a l . 1982; Gleason, D i e t r i c h , Henry, Cohen & Bark 1978). Blanchet, V i k t o r o v i t c h , Chave & S a n t i n e l l i (1985) claimed t h a t i f the gate d i e l e c t r i c i s d e p o s i t e d below 350°C, then although phosphorus l o s s i s not s i g n i f i c a n t the q u a l i t y of the d i e l e c t r i c s (such as s i l i c o n n i t r i d e s and s i l i c o n oxides) i s poor. Other approaches i n v o l v e d the use of a phosphorus d i e l e c t r i c (Serreze e t a l . 1987; Pande e t a l . 1986) or i n t e r f a c e s t a b i l i z a t i o n by s u b s t i t u t i n g As f o r phosphorus a t the s u r f a c e (Blanchet e t a l . 1985). These approaches a l s o met w i t h l i m i t e d success. D r i f t due t o t r a p p i n g i n the s u b s t r a t e The e a r l i e s t mechanism proposed f o r the IGFET d r a i n c u r r e n t d r i f t was t h a t the phosphorus v a c a n c i e s , Vp, t r a p p e d e l e c t r o n s which were i n the conduction channel. Although v a r i o u s t e c h n i q u e s were implemented i n order t o prevent the l o s s of phosphorus, d r a i n c u r r e n t d r i f t i s s t i l l a problem. Van Vechten & Wager (1985) suggested t h a t a p o s s i b l e source of d r a i n c u r r e n t d r i f t i s the r e a c t i o n i n which an indium atom moves t o occupy a vacant phosphorus s i t e , c o n v e r t i n g a l e v e l due t o the phosphorus vacancy, Vp"*", t o l e v e l s due t o the d e f e c t complex of a vacancy on an indium s i t e b e side an indium on a phosphorus s i t e , Vjjj"Inp"^. Hence, Vjj^'Inp"^ Vp"*" + 4e~, where Vjj^" r e p r e s e n t s a vacancy a t an indium s i t e and Inp"^ an indium occupying a phosphorus s i t e . T h i s r e a c t i o n can be d r i v e n i n e i t h e r d i r e c t i o n by the c a r r i e r c o n c e n t r a t i o n on a time s c a l e of seconds. Thus, the c o n c e n t r a t i o n of Vj^'IrXp'^ d i v i d e d by the c o n c e n t r a t i o n of Vp"*" i s p r o p o r t i o n a l t o the e l e c t r o n c o n c e n t r a t i o n . In an accumulation-mode IGFET on a s e m i - i n s u l a t i n g InP:Fe s u b s t r a t e the c a r r i e r c o n c e n t r a t i o n v a r i e s between the on and the o f f s t a t e by a f a c t o r more than about 10^. In accumulation the above mechanism w i l l l e a d t o the slow p r o d u c t i o n of e l e c t r o n t r a p s which w i l l c a pture the co n d u c t i o n e l e c t r o n s , l e a d i n g t o d r a i n c u r r e n t d r i f t . T i n , Barnes & Neely (1988b) found, u s i n g c a p a c i t i v e deep l e v e l t r a n s i e n t l e v e l spectroscopy (DLTS) on n-type InP, t h a t temperatures above 39OK under r e v e r s e b i a s produced l e v e l s which they suggested might g i v e r i s e t o d r a i n c u r r e n t d r i f t . They d i d not s p e c i f y whether i n t h e i r model the d r i f t a r i s e s from the slow p r o d u c t i o n of t r a p s under r e v e r s e b i a s or whether, once produced, the t r a p s g i v e r i s e t o the d r i f t e f f e c t . S i n c e d r i f t has been observed a t temperatures much lower than 39OK, t h i s model cannot e x p l a i n the d r i f t phenomenon i n terms of the slow p r o d u c t i o n of t r a p s under r e v e r s e b i a s . On the other hand, i f a l r e a d y p r e s e n t , the t r a p s would g i v e r i s e t o d r i f t on too r a p i d a time s c a l e . Meiners (1986) and Lee, Chang & Meiners (1988) suggested t h a t the d r i f t phenomenon i n IGFETs on SI InP:Fe may be due t o slow ca p t u r e of c a r r i e r s by a l e v e l due t o Fe. T h e i r model r e q u i r e s t h a t the F e - l e v e l have a b a r r i e r t o capture. The model e x p l a i n s the observed temperature dependence of the d r i f t phenomenon. CHAPTER 3. A STUDY OF TWO DIELECTRICS In t h i s chapter are presented the r e s u l t s o f s t u d i e s o f two d i e l e c t r i c s f o r p o s s i b l e IGFET use. In the f i r s t s e c t i o n , s i l i c o n n i t r i d e was s t u d i e d as a candidate f o r a d e p o s i t e d d i e l e c t r i c . In the second s e c t i o n the n a t i v e oxide was s t u d i e d . In Appendix A i s prese n t e d the p r e l i m i n a r y t e s t of a method i n v o l v i n g the use of r e f l e c t i v i t y s p e c t r a t o determine the e l e c t r i c f i e l d a t the s u b s t r a t e s u r f a c e . S i l i c o n n i t r i d e d e p o s i t e d by a "remote plasma" Some experiments are r e p o r t e d here on the use of a new method o f d e p o s i t i n g s i l i c o n n i t r i d e a t low temperature i n such a way as t o minimize damage t o the s u b s t r a t e . The equipment used was a remote plasma-enhanced chemical N2 SiH4/He vapour d e p o s i t i o n (RPECVD) system, developed a t Surface S c i e n c e Western, U n i v e r s i t y of Western O n t a r i o by Dr. Leo Lau. As shown i n F i g u r e 3.1, i n t h i s system the plasma i s l o c a t e d away from the s u b s t r a t e so t h a t damage due t o p a r t i c l e s i n the plasma i s minimal. A hydrogen plasma however, was used t o c l e a n the s u r f a c e of the InP F i g . 3.1: The RPECVD System CAVIÏÏ samples, the d e p o s i t i o n of the n i t r i d e f o l l o w i n g without b r e a k i n g vacuum. (Since the composition of the n i t r i d e l a y e r i s g e n e r a l l y not Si3N4, the m a t e r i a l i s o f t e n r e f e r r e d t o as "SiN".) The i d e a i s t h a t i f the s u b s t r a t e i s not damaged by the removal of the n a t i v e oxide or by the d e p o s i t i o n of the n i t r i d e then an IGFET b u i l t w i t h such a d i e l e c t r i c has more chance of being f r e e of d r a i n c u r r e n t d r i f t . U n f o r t u n a t e l y , low temperature PECVD "SiN" tends t o c o n t a i n t r a p s . In o r d e r t o s i m p l i f y the problems of c h a r a c t e r i s i n g t h e f i n i s h e d IGFET, p-doped m a t e r i a l was used r a t h e r than SI m a t e r i a l so t h a t c o n v e n t i o n a l C(V) measurements c o u l d be made. An IGFET made of p-type m a t e r i a l i n t h i s way would be operated as an i n v e r s i o n mode d e v i c e , s i m i l a r t o an IGFET on SI m a t e r i a l i n t h a t a p o s i t i v e gate v o l t a g e would induce a conduction l a y e r of e l e c t r o n s t o form, t h e r e b y t u r n i n g the IGFET on. Lau (1989) had a l r e a d y performed band-bending experiments w i t h X-ray p h o t o e l e c t r o n spectroscopy (XPS) and found t h a t the InP s u r f a c e p o t e n t i a l c o u l d be moved by as much as about 0.2V by a p p l y i n g a p o t e n t i a l t o the "SiN" s u r f a c e . T h i s i n d i c a t e d t h a t the Fermi l e v e l was not pinned by the d e p o s i t i o n . D e p o s i t i o n s were performed with Leo Lau d u r i n g a v i s i t t o S u r f a c e S c i e n c e Western i n August of 1989. Improved d e p o s i t i o n t e c h n i q u e s were used which i n v o l v e d lower temperatures and s u l p h i d e p a s s i v a t i o n , i n the hope of improving the d i e l e c t r i c and i t s i n t e r f a c e . Subsequent measurements and a n a l y s i s were performed a t t h e U n i v e r s i t y of B r i t i s h Columbia. Experimental procedures Three samples were made from a s u b s t r a t e of p-InP on p''"-InP grown by me t a l - o r g a n i c chemical vapour d e p o s i t i o n (MOCVD). They were degreased and then o x i d i s e d by exposure t o u l t r a v i o l e t i l l u m i n a t i o n . J u s t p r i o r t o l o a d i n g f o r the d e p o s i t i o n o f t h e n i t r i d e the samples were dipped i n HF a c i d and r i n s e d i n methanol. Samples S325 and S384 were a l s o exposed t o the vapour from a s o l u t i o n o f 20% ammonium s u l p h i d e f o r 35 and 5 minutes r e s p e c t i v e l y . The vapour was c a r r i e d t o the s u r f a c e by f l o w i n g n i t r o g e n and was thought t o c o n t a i n hydrogen s u l p h i d e , ammonia and water. The t h i r d sample, S390, was not exposed t o the vapour. The samples had Au-Ge c o n t a c t s on the back and A l dots evaporated on the n i t r i d e . A Hewlett-Packard 9836 computer c o n t r o l l e d a Hewlett-Packard semiconductor parameter a n a l y s e r and a Hewlett-Packard LCR meter, t o perform I (V) and C(V) measurements upon the samples. The maximum range o f v o l t a g e a p p l i e d t o the samples was ±10V i n order t o a v o i d s t r e s s i n g the d i e l e c t r i c . A n a l y s i s and r e s u l t s C(V) measurements were made a t f r e q u e n c i e s of 10 kHz, 100 kHz, 1 MHz and 10 MHz. For each s e l e c t e d frequency and sample, the gate v o l t a g e was stepped from +10V t o -lOV i n s m a l l decrements, a f t e r each s t e p pausing f o r a predetermined time and then r e c o r d i n g the c a p a c i t a n c e , and then r e p e a t i n g the procedure from -lOV back t o +10V. T h i s p r o c e s s i s r e f e r r e d t o here as a "sweep". In each sweep 100 c a p a c i t a n c e measurements were made. To t e s t f o r the presence of s t a t e s which d i d not have s u f f i c i e n t time t o respond as the gate v o l t a g e was stepped, r e f e r r e d t o here as "slow" s t a t e s , the C(V) measurements were performed with both p o s i t i v e and negative-going sweeps. T y p i c a l r e s u l t s are shown i n F i g u r e s 3.2, 3.3 and 3.4. The frequency dependence and the s t r o n g h y s t e r e s i s o b s e r v e d i n t h e C(V) measurements i n d i c a t e s t h a t t h e s e d i e l e c t r i c l a y e r s are not s u i t a b l e f o r IGFETs. I t was c o n s i d e r e d t o be of i n t e r e s t t o o b t a i n more i n f o r m a t i o n upon t h e s e deep l e v e l s , such as an i d e a of t h e i r time constants and t h e i r d e n s i t y . The C(V) curves a t d i f f e r e n t f r e q u e n c i e s appear t o be s h i f t e d up or down dependj A p a r t from these s h i f t s , the C 200 H i , 1 1 . 1 . 1 -10 -5 0 5 10 Applied Voltage (V) F i g u r e 3.2: C(V^ of S390 a t frequency of 10^ ( s o l i d ) , 10^ (long dash), 10^ (medium dash) and lO^Hz ( s h o r t dash). Pause time was 0.1s. 500 n 4-50-Applied Voltage (V) F i g u r e 3.3: C(V) of S384 as i n F i g . 3.2 upon the h i s t o r y of the sample, curves, a t l e a s t f o r S390 and S384, d i f f e r l i t t l e w i t h i n c r e a s e s i n frequency above 100 kHz T h i s suggests t h a t the s u r f a c e s t a t e s were not abl e t o respond t o such h i g h f r e q u e n c i e s and t h a t a Terinan a n a l y s i s ( d e s c r i b e d below) may p r o v i d e u s e f u l i n f o r m a t i o n . In o r d e r t o o b t a i n 1000-1 0 5 Appl ied Vo l tage (V) 10 i n f o r m a t i o n on the response time ^.^^^^ 3^^^ ^^^^ 33^5 of these slow s t a t e s , the ^'^ Terman method was a p p l i e d t o C(V) data taken w i t h a wide range of pause times. The sweeps were made with pause times of 0.01, 0.1, 1, 10, 100 and 500 seconds per p o i n t . The f o l l o w i n g v a l u e s were used f o r the a n a l y s i s ; the d i e l e c t r i c c o n s t a n t of "SiN" was assumed t o be 7.5, the A l dots had a diameter o f 1mm, the p- l a y e r (with p«5 x lO-'-^  cm"-^ ) was t h i c k enough t h a t the e f f e c t s of the s u b s t r a t e which had p«5 x 10 17 cm -3 need not have been co n s i d e r e d . The d i e l e c t r i c l a y e r s were i r r e g u l a r enough t h a t t h e i r t h i c k n e s s e s c o u l d not be determined by e l l i p s o m e t r y . Instead the t h i c k n e s s e s were es t i m a t e d by assuming t h a t the maximum ca p a c i t a n c e r e a d i n g corresponded t o the v a l u e due t o the d i e l e c t r i c i t s e l f . From t h i s maximum r e a d i n g and the d i e l e c t r i c c onstant, the t h i c k n e s s e s were e s t i m a t e d as 110, 130 and 77nm f o r S390, S384 and S325 r e s p e c t i v e l y . When swept from d e p l e t i o n t o accumulation, the C(V) curves were monotonie. The r e t u r n sweeps, co r r e s p o n d i n g t o the lower curves i n F i g u r e s 3.2, 3.3 and 3.4 were not. As the sweep time was i n c r e a s e d the v a r i a t i o n i n the c a p a c i t a n c e d u r i n g the sweep decreased. In the case of sample S390 wit h lOOs/point, F i g u r e 3.5, the C ( V ) curve was d r a m a t i c a l l y d i f f e r e n t from t h a t w i t h a sweep time of 0 . I s / p o i n t . T h i s i n d i c a t e d t h a t t h e r e were a l a r g e number of slow s t a t e s i n the n e a r - i n t e r f a c e r e g i o n . To perform a Terman a n a l y s i s (Meiners 1985 and Terman 1962), the c a p a c i t a n c e of the s u b s t r a t e , C^, was c a l c u l a t e d from the L C R c a p a c i t a n c e r e a d i n g s by t a k i n g i n t o account the c a p a c i t a n c e of the d i e l e c t r i c , C^. To s i m p l i f y the a n a l y s i s and s i n c e no evidence of s u r f a c e i n v e r s i o n was seen, m i n o r i t y c a r r i e r s were n e g l e c t e d i n t h e f o l l o w i n g . The c a p a c i t a n c e of the s u b s t r a t e CQ, can be c a l c u l a t e d from the s u r f a c e p o t e n t i a l Tg (measured r e l a t i v e t o the b u l k ) , by i n t e g r a t i n g the P o i s s o n equation t o f i n d the e l e c t r i c f i e l d a t the s u r f a c e and then u s i n g Gauss' law t o c a l c u l a t e the charge i n the s u b s t r a t e , d i f f e r e n t i a t i o n w i t h r e s p e c t t o the s u r f a c e p o t e n t i a l then g i v e s the s u b s t r a t e c a p a c i t a n c e , (see Sze 1981, page 369, e q u a t i o n 20) CD = q(esPpo/2kT)V2((i _ exp(-B^J) + (npo/Ppo) (exp(BT^) - 1)) / {(exp(-Mg) + 67g - 1) + (npo/Ppo)(exp(6T3) - BTg - 1)}^/^ by n e g l e c t i n g the m i n o r i t y c a r r i e r s , CD = q ( 8 3 P p o / 2 k T ) i / 2 ( i _ exp(-BTg) ) /{exp(-6Y3) + BTg - l}l/2 (1) where Ppg i s the bulk h o l e c o n c e n t r a t i o n , k i s Boltzmann's c o n s t a n t , q the charge of a proton, Cg the d i e l e c t r i c c o n s t a n t of the s u b s t r a t e , T i s the a b s o l u t e temperature and 6 i s q/kT. From t h i s r e l a t i o n the measured can be used t o c a l c u l a t e the s u r f a c e p o t e n t i a l 7 . The charge taken up by i n t e r f a c e s t a t e s , AQgg, i s t h e n g i v e n by, AQgg = (AVg " ^g)C^ " Qg^, (2) Where, Vg i s the " e f f e c t i v e " gate v o l t a g e , i . e . the gate v o l t a g e c o r r e c t e d f o r the e f f e c t s of e l e c t r o n a f f i n i t y of the s u b s t r a t e (4.3 eV), work f u n c t i o n of the aluminum (4.4 eV) and f i x e d charge i n the d i e l e c t r i c e t c , and where Qg^ i s the charge i n t h e s u b s t r a t e , Qg^ = ±(2egkT)l/2^Ppo(exp(-q'Pg/kT) + qTg/kT - l ) ] l / 2 . (3) and The s u r f a c e s t a t e d e n s i t y was d e f i n e d by. N ss = 1/q (ÔAQgg/aTg) . (4) The upper, monotonie C(V) curves were used f o r t h i s a n a l y s i s . The deep l e v e l s examined by t h i s method c o u l d be i n the d i e l e c t r i c i t s e l f or a t the i n t e r f a c e . The v a r i a t i o n s i n s u r f a c e p o t e n t i a l c o r r e s p o n d i n g t o the C(V) p l o t s were c a l c u l a t e d . As shown i n F i g u r e 3.6, a t 1 MHz 500 n 450-400-i 350-300-250-200 -10 -5 0 5 Applied Voltage (V) 10 F i g u r e 3.5: C(V) of sample S390 f o r S390 w i t h a sweep r a t e of a t a frequency of IMHz w i t h 100s per p o i n t . 0.1s per p o i n t , the v a r i a t i o n was about IV. However, as shown i n F i g u r e 3.7, f o r the same sample and frequency but with a sweep r a t e of 100s per p o i n t , the v a r i a t i o n decreased t o about 0.3V. Comparisons of the two Terman s u r f a c e s t a t e p l o t s i n d i c a t e t h a t the "slow" (T>10^S) s u r f a c e s t a t e d e n s i t y was more than t e n times g r e a t e r than the r e l a t i v e l y " f a s t " {T<10S) s u r f a c e s t a t e d e n s i t y . 1 5 i J 14^ o X 13-a i 1 2 -o 1 1 - 0 . 3 0.1 0.5 0.9 Sur face Potent ia l (V) F i g u r e 3.6: Terman p l o t d e r i v e d T h i s i s c o n s i s t e n t with the fj-om 1 MHz C(V) of sample S390 with 0.1s per p o i n t . f i n d i n g of Lau (1989), t h a t the s u r f a c e c o u l d o n l y be modulated by about 0.2V by v e r y slow XPS s u r f a c e c h a r g i n g experiments which r e l y upon low l e v e l s of e l e c t r o n d i s c h a r g e (from photoemission) or capture (from an e l e c t r o n f l o o d -gun) . I f these l a y e r s were prese n t i n an IGFET the a p p l i c a t i o n of a p o s i t i v e gate v o l t a g e of, f o r example 5V, would i n i t i a l l y move the s u r f a c e p o t e n t i a l a l a r g e amount (as shown by the f a s t sweep C(V) measurements) but then over time s c a l e s of lO'^s or so (as shown by the slow sweep C(V) measurements) the s u r f a c e p o t e n t i a l would r e t u r n i t s v a l u e a t the f l a t - b a n d s t a t e . In an IGFET t h i s would l e a d t o d r a i n c u r r e n t d r i f t . S i n c e the Terman p l o t s were very s i m i l a r f o r any of the h i g h frequency C(V) measurements, i t would appear t h a t the d e n s i t y of f a s t s t a t e s i s n e g l i g i b l e compared wit h the d e n s i t y of slow s t a t e s . I t was not p o s s i b l e t o continue the study of extremely slow s u r f a c e s t a t e s due t o a breakdown of the d i e l e c t r i c s w i t h v e r y slow sweep r a t e s . Sample S3 90 withstood a lOOs/point C(V) sweep but f a i l e d d u r i n g the f o l l o w i n g 500s/point sweep. The other samples f a i l e d d u r i n g lOOs/point sweeps. I t was observed t h a t when l e f t o v e r n i g h t without an a p p l i e d v o l t a g e , the samples appeared t o re c o v e r . F u r t h e r C(V) measurements were then p o s s i b l e and these l e d t o Terman p l o t s which showed t h a t no a d d i t i o n a l s t a t e s had been i n t r o d u c e d . I-V measurements were made upon these samples but i t was found t h a t these measurements a f f e c t e d the sample. Predominantly n e g a t i v e sweeps (e.g. -2 t o +0.5V) l e d t o i n c r e a s i n g c u r r e n t s i n s u c c e s s i v e measurements w h i l e p redominantly p o s i t i v e or bala n c e d sweeps l e d t o 1 5 i > 0) 14-X 13-0^12-o 11 - 0 . 3 -0 ,1 0,1 Su r face Potent ia l (V) F i g u r e 3.7: Terman p l o t f o r S390 at IMHz w i t h 100s per p o i n t , from C(V) of F i g u r e 3.5. 2 0 n 0 -< CL - 2 0 -!— o - 4 0 - 1 - 6 0 3 / / / 1 - 1 0 - 5 0 5 Gate Vol tage (V) 10 F i g u r e 3.8: S u c c e s s i v e I(V) measurements (1 t o 3) showing p r o g r e s s i v e l y d e c r e a s i n g c u r r e n t through S384. d e c r e a s i n g c u r r e n t s , as shown i n made as l a r g e as mA and as sm a l l be r e v e r s i b l e . As shown on F i g u r e 3.9, the 1 MHz Terman r e s u l t s from sample S384 i n d i c a t e d s u r f a c e s t a t e d e n s i t i e s s i g n i f i c a n t l y lower than those of S390. T h i s may i n d i c a t e t h a t the s h o r t exposure, 5 minutes, t o vapour from the ammonium s u l p h i d e l e d t o a b e t t e r i n t e r f a c e . However, as shown i n F i g u r e 3.10, the 1 MHz Terman 0^12-o I I i 1 1 -0.5 0,0 0.5 Sur face Potent ial (V) F i g u r e 3.10: A Terman p l o t f o r sample S325 a t IMHz, 0.1s per p o i n t . F i g u r e 3.8. The c u r r e n t c o u l d be as pA. These changes appeared t o 15n > O -0.5 0.0 0.5 1.0 1.5 Sur face Potent ia l (V) F i g u r e 3.9: A Terman p l o t from sample S384 a t IMHz, 0.1s per p o i n t . r e s u l t s f o r sample S325, w i t h a 35 minute exposure t o the v a p o u r , i n d i c a t e d a s i g n i f i c a n t l y worse i n t e r f a c e than the u n t r e a t e d (S390). Moreover, both s u l p h i d e - t r e a t e d samples were more s u s c e p t i b l e t o the d i e l e c t r i c breakdown than was the u n t r e a t e d sample. C o n c l u s i o n s Although the l a y e r s of RPECVD s i l i c o n n i t r i d e were not s u i t a b l e , the d e p o s i t i o n system d i d produce adherent l a y e r s and i t i s p o s s i b l e t h a t the process might be improved by u s i n g h e a t treatments or a l t e r e d d e p o s i t i o n c o n d i t i o n s . N ative oxides The g o a l i n the work d e s c r i b e d below was t o produce a n a t i v e oxide c o n s i s t i n g predominantly of the phosphate, which has been r e p o r t e d t o p r o v i d e a good i n t e r f a c e f o r IGFET use (Goodnick e t a l . 1984) . The oxide should be t h i c k enough t o prevent the l o s s of e l e c t r o n s through t u n n e l l i n g , about 9nm, o r a t l e a s t t h i c k enough t o p r o t e c t the i n t e r f a c e from damage due t o d e p o s i t i o n of another d i e l e c t r i c . N a t i v e oxides were examined u s i n g e l l i p s o m e t r y a f t e r growth under c o n d i t i o n s of h i g h temperatures, u l t r a v i o l e t i l l u m i n a t i o n and h i g h p r e s s u r e s of oxygen. E l l i p s o m e t r y The e l l i p s o m e t e r measures the changes i n p o l a r i s a t i o n of l i g h t upon r e f l e c t i o n from a s u r f a c e . For each measurement the amount of l i g h t t r a n s m i t t e d through the system was r e c o r d e d as the angles of r o t a t i o n of the a n a l y z e r and p o l a r i z e r prisms (both G l a n -Thomson prisms) i n a Rudolf Polariser-Compensator-Sample-Analyser e l l i p s o m e t e r were i n d i v i d u a l l y a d j u s t e d . In the neighbourhood of the minimum of the t r a n s m i t t e d i n t e n s i t y , each adjustment produced a p a r a b o l i c s i g n a l . A Chebyshev method of f i t t i n g a q u a d r a t i c t o the p a r a b o l i c s i g n a l allowed an a c c u r a t e d e t e r m i n a t i o n of the l o c a t i o n of the prism angles of the minimum, from which the e l l i p s o m e t r i c parameters i|r, r e l a t e d t o the a t t e n u a t i o n , and A , r e l a t e d t o the phase change upon r e f l e c t i o n were c a l c u l a t e d . These e l l i p s o m e t r i c parameters can be r e l a t e d , through the F r e s n e l c o e f f i c i e n t s , t o changes i n the p h y s i c a l s t r u c t u r e of the s u r f a c e . T h i s s p e c i f i c system was d e s c r i b e d i n d e t a i l by Smith (1980) . A g e n e r a l d e s c r i p t i o n of the method was p r o v i d e d by Azzam & Bashara (1977) and McCrackin, P a s s a g l i a , Stromberg & S t e i n b e r g (1963). One way of a n a l y z i n g e l l i p s o m e t r y data i s t o c a l c u l a t e the e l l i p s o m e t r i c parameters A , i|f and then, i n the case o f a t r a n s p a r e n t f i l m on a s u b s t r a t e of known r e f r a c t i v e index, l o o k i n g up the t h i c k n e s s and r e f r a c t i v e index of the f i l m by comparing w i t h a f a m i l y of curves of i|i vs A f o r v a r i o u s t h i c k n e s s e s and r e f r a c t i v e i n d i c e s . T h i s method i s s u i t a b l e f o r use w i t h a system of f i x e d angle of i n c i d e n c e where o n l y one measurement of ( A , i|») i s a v a i l a b l e . With the many data a v a i l a b l e i n m u l t i p l e angle of i n c i d e n c e work i t becomes p o s s i b l e t o f i n d more parameters or a l t e r n a t i v e l y , t o determine the same parameters w i t h h i g h e r p r e c i s i o n . A s e t of programs was w r i t t e n f o r the a n a l y s i s of e l l i p s o m e t r y d a t a based upon the Jones matrix approach as d e s c r i b e d by H a y f i e l d & White (1963). T h i s f o r m u l a t i o n a l l o w s the ambient/oxide/ s u b s t r a t e model t o be extended t o i n c o r p o r a t e m u l t i p l e l a y e r s . T h i s matrix-based model was f i t t e d t o the s e t of one or more p a i r s of ( A , i|;) by the same a l g o r i t h m used i n the OTCS a n a l y s i s . The program presented u n c e r t a i n t y e s t i m a t e s f o r each parameter determined. The programs were checked by comparing r e s u l t s from Azzam & Bashara (1977), and Smith (1980). These programs can be used t o determine the r e f r a c t i v e index of the s u b s t r a t e , the r e f r a c t i v e index of one or more l a y e r s on t h e s u r f a c e and the t h i c k n e s s e s of these l a y e r s . The number of determined q u a n t i t i e s must be equal t o or l e s s than the number of data. A p p l i c a t i o n of e l l i p s o m e t r y The m a t r i x approach used by H a y f i e l d & White (1963) i s based on the computation of the r e f l e c t i o n c o e f f i c i e n t of a system of l a y e r s on a s u b s t r a t e . Each l a y e r i s assumed t o be homogeneous, i s o t r o p i c , p l a n a r and completely d e s c r i b e d by a r e f r a c t i v e index and t h i c k n e s s . T h i s i d e a l i s e d model needs t o be extended i n o r d e r t o d e a l w i t h the e f f e c t s of s u r f a c e roughness and of s u r f a c e s t a t e s . Meyer & Bootsma (1969) measured the change i n the o p t i c a l p r o p e r t i e s of bare semiconductor s u r f a c e s as gases were adsorbed and found t h a t the observed change when the s u r f a c e s were covered by l e s s than about 1 monolayer c o u l d not be e x p l a i n e d i n terms of the i d e a l i s e d model. They found t h a t the changes i n A c o u l d be c a l c u l a t e d i n a s t r a i g h t f o r w a r d manner from the macroscopic t h e o r y by c o n s i d e r i n g the adsorbed atoms t o f i l l d a n g l i n g bonds a t the s u r f a c e . In the i d e a l i s e d model the changes i n the e l l i p s o m e t r y parameter which measures a t t e n u a t i o n , i|r, are zero f o r a non-a b s o r b i n g l a y e r . Hence the observed changes i n i|; are s o l e l y due t o b o n d - f i l l i n g . O b v i o u s l y the f i l m s cannot be smooth on an atomic s c a l e . S e v e r a l models have been developed t o extend the i d e a l i s e d t h e o r y t o d e a l w i t h s u r f a c e roughness. The s i m p l e s t d e s c r i b e s the roughened r e g i o n as a homogenous p l a n a r l a y e r w i t h an e f f e c t i v e r e f r a c t i v e index. A c c o r d i n g t o Azzam & Bashara (1977), f o r d i s c o n t i n u o u s o r submonolayer f i l m s , more a c c u r a t e approaches a r e those o f Strachan (1933) and Siv u k h i n (1956). Fenstermaker & McCrackin (1969) analyzed the e f f e c t s o f s u r f a c e roughness by breaking the rough r e g i o n i n t o a number of in t e r m e d i a t e l a y e r s each with i t s own e f f e c t i v e index. They c a l c u l a t e d the e f f e c t i v e s u r f a c e r e f r a c t i v e i n d i c e s f o r roughnesses, c o n s i s t i n g of pyramids, of s i z e s of 0 t o 50nm f o r s u b s t r a t e s o f s i l i c o n and g l a s s (Si02). For s i l i c o n t h e r e was l i t t l e change u n t i l the roughness was about 5nm whereupon the apparent n decreased l i n e a r l y by about 1 as the roughness was i n c r e a s e d t o 40nm. For g l a s s t h e r e was ve r y l i t t l e change, t h e apparent n decreased by l e s s than 0.1 as the roughness was i n c r e a s e d t o 50nm. For the r a t i o k/n t h e r e was a l i n e a r i n c r e a s e w i t h roughness. For s i l i c o n t h i s l e d t o an i n c r e a s e of 0.6 over 40nm, f o r g l a s s about 0.05 over 40nm. The e f f e c t s of roughness on the I l l - V / n a t i v e oxide s u r f a c e can be e s t i m a t e d from the r e s u l t s of Fenstermaker & McCrackin (1969) and Meyer & Bootsma (1969). I f the coverage i s g r e a t e r than one monolayer then the e f f e c t due t o d a n g l i n g bonds w i l l not be observed. I f the s u b s t r a t e i s p l a n a r , a n a t i v e oxide s u r f a c e (np»1.4) w i l l behave i n a s i m i l a r f a s h i o n t o an Si02 s u r f a c e (np,«1.4), s i n c e t h e i r i n d i c e s are s i m i l a r . The c o n t r i b u t i o n of s u r f a c e roughness t o the e l l i p s o m e t r y measurements of the InP-native oxide system i s now c o n s i d e r e d . The c o n t r i b u t i o n w i l l be most s i g n i f i c a n t f o r t h i n o x i d e s which are t y p i c a l l y of about 2nm i n t h i c k n e s s . S i n c e the r e f r a c t i v e index of InP i s v e r y c l o s e t o t h a t of s i l i c o n , and assuming complete s u r f a c e coverage, w i t h a n a t i v e oxide with a roughness of 2nm we expect no change i n n and a change i n k/n of 0.003. T h i s change i n k i s i n s i g n i f i c a n t . Hence s u r f a c e roughness i s not expected t o a f f e c t the measurements of t h i n n a t i v e oxide f i l m s . O p t i c a l c o n s t a n t s of the InP/native oxide system Wager & Wilmsen (1980), Wager e t a l . (1981), Nelson, Geib & Wilmsen (1983) , and Fathipour, Boyer, C o l l i n s & Wilmsen (1985) have used e l l i p s o m e t r y of InP/native oxide systems wi t h the f o l l o w i n g o p t i c a l parameters; f o r the s u b s t r a t e ng = 3.42 - 0.278J, and f o r the o x i d e s , n^ = 1.9. K a l n i t s k y , Tay, E l l u i , Chongsawangvirod, Andrews & Irene (1990) and others have found i t d i f f i c u l t t o determine the r e f r a c t i v e index f o r f i l m s w i t h t h i c k n e s s l e s s than about 50nm. Since they c o u l d not determine the r e f r a c t i v e index of n a t i v e o x ide f i l m s l e s s than 15nm i n t h i c k n e s s . Wager & Wilmsen (1980) assumed t h a t the r e f r a c t i v e index of t h i n f i l m s was the same as t h e r e f r a c t i v e index of the t h i c k e r f i l m s . B e r g i g n a t & H o l l i n g e r (1987) used s p e c t r o s c o p i c e l l i p s o m e t r y and XPS t o study thermal oxides on InP. From t h e i r measurements of the complex d i e l e c t r i c f u n c t i o n s of the ou t e r r e g i o n of t h i c k thermal o x i d e s , c o n s i s t i n g of a mixture of In203 and InPO^, the r e f r a c t i v e index of these f i l m s was about n^ = 1.9 f o r wavelengths of 632.8 nm. For InP04 l a y e r s they found n^ = 1.55. These r e s u l t s a r e c o n s i s t e n t with the f i n d i n g s of p r e v i o u s r e s e a r c h (as above) f o r the t h i c k e r oxides but not f o r the t h i n oxide l a y e r s which have been assumed t o have the same index as the t h i c k e r oxides, rif =1.9. M u l t i p l e angle of i n c i d e n c e e l l i p s o m e t r y Although m u l t i p l e angle of i n c i d e n c e data p r o v i d e s more i n f o r m a t i o n than s i n g l e angle of i n c i d e n c e data, under some c o n d i t i o n s of i n c i d e n c e angle and wavelength the p a r t i a l d e r i v a t i v e s of A and i|r with r e s p e c t t o the system parameters such as kg, Tïf and d, may be " c o r r e l a t e d " (Azzam and Bashara 1977) i n t h a t v a r i a t i o n i n one parameter has the same e f f e c t as v a r i a t i o n i n a second parameter. When t h i s occurs, o n l y one parameter can be determined, the other needs t o be known. To t e s t f o r t h i s Azzam & Bashara (1977, p326) used what they r e f e r r e d t o as a "parameter c o r r e l a t i o n t e s t " . As an example, f o r s i l i c o n d i o x i d e on s i l i c o n a t a wavelength of 546.1 nm, as shown i n t h e i r T a b l e 4.1, the p a r t i a l d e r i v a t i v e s of kg, n^ and d with r e s p e c t t o the e l l i p s o m e t r i c parameters o f A and t|i are " c o r r e l a t e d " t o 3 decimal p l a c e s i n a narrow range of i n c i d e n c e angles. In the p r e s e n t work a program was w r i t t e n t o apply the "parameter c o r r e l a t i o n t e s t " . The program was f i r s t t e s t e d by comparing i t s r e s u l t s with those of Azzam & Bashara as p r e s e n t e d i n t h e i r T a b l e 4.1. Since they d i d not s p e c i f y t h e i r parameters, the parameters used here are those used elsewhere i n Azzam and Bashara f o r the same m a t e r i a l s , ng = 3.890 - 0.025J, n^ = 1.4. The r e s u l t i n g t a b l e was s i m i l a r i n d i c a t i n g t h a t f o r t h i s system, from a g i v e n change i n A over a range of 0 , one cannot d i s t i n g u i s h whether the change arose from a change i n the s u b s t r a t e a b s o r p t i o n (kg) or from the f i l m r e f r a c t i v e index (n^). To t e s t whether the e l l i p s o m e t e r i s s u i t a b l e f o r t h e a n a l y s i s of InP m u l t i p l e angle of i n c i d e n c e data the program was a p p l i e d w i t h ng = 3.420 - 0.278J, n^ = 1.900, and a wavelength of 632. Snm. As shown i n Table I, the p a r t i a l d e r i v a t i v e s show no apparent " c o r r e l a t i o n " . I f "parameter c o r r e l a t i o n " i s pr e s e n t , t h e n i n the a n a l y s i s , the matrix j , as i n Chapter 4, w i l l c o n t a i n one or more columns which are n e a r l y m u l t i p l e s of other column(s), r e s u l t i n g i n near-zero determinants and h i g h parameter u n c e r t a i n t i e s . The "parameter c o r r e l a t i o n " t a b l e s o f f e r a simple means of dete r m i n i n g which p a r t i a l d e r i v a t i v e s a re a l i k e l y s ource of d i f f i c u l t y . The t a b l e s a l s o i n d i c a t e how t o a v o i d "parameter c o r r e l a t i o n " . For i n s t a n c e , i n Table I i t can be seen t h a t except f o r 0 near 75 degrees ^^/^<i^ i s roughly equal t o t w i c e ôA/ôkf. T h i s i n d i c a t e s t h a t measurements near 75 degrees w i l l be p a r t i c u l a r l y e f f e c t i v e i n d i s t i n g u i s h i n g between changes i n df and kf. aA/akg aA/ang aA/ak 55 4.610 -0.247 1.706 2.397 -1.272 0.112 0.915 60 6.513 -0.320 2.419 2.876 -1.395 0.184 1.308 65 10.045 -0.392 3.777 3.305 -1.268 0.376 2.085 70 18.843 -0.001 7.493 3.321 0. 035 1.383 4.450 75 -23.821 5.847 -6.009 -2.498 6.185 3.664 -1.200 80 -10.190 1.113 -3.386 -3.400 3.716 0.281 -1.559 T a b l e I. C o r r e l a t i o n t e s t f o r the InP/native oxide system study of n a t i v e oxides On the b a s i s of estimates of t h e Gibbs f r e e e n e r g i e s of compounds of In, P and 0, and on the b a s i s of b i n a r y mixture experiments, Schwartz, Sunder & G r i f f i t h s (1982) found t h a t InP should o x i d i s e t o form InP04. Schwartz e t a l . (1982) found t h a t u n l i k e In203 and P2O5/ InPO^ i s s t a b l e and w i l l not r e a c t w i t h t h e s u b s t r a t e . Lucovsky (1981) noted t h a t I I I - V oxides become l e s s homogeneous as they become t h i c k e r . Schwartz e t a l . (1982) noted, on the b a s i s of the XPS and the Auger measurements of Wilmsen (1975), Kazmerski, I r e l a n d , Sheldon, Chu, Chu & L i n (1980), and Wager & Wilmsen (1980) , t h a t the atomic r a t i o of In/P v a r i e s s t r o n g l y through the n a t i v e oxide l a y e r . Hoflund & C o r a l l o (1986) determined by XPS t h a t n a t i v e oxide l a y e r s c o n s i s t of an i n n e r l a y e r of InP04, and an outer l a y e r of a mixture of InP04 and In203. Hoflund & C o r a l l o (1986) and B e r g i g n a t & H o l l i n g e r (1987) found t h a t the p r o d u c t i o n of In203 i s accompanied by the l o s s of phosphorus a t the s u r f a c e and i t s accumulation a t the i n t e r f a c e . Goodnick e t a l . (1984) found t h a t the InP04 has a r e a s o n a b l y h i g h b a r r i e r (about l . l e V ) t o e l e c t r o n i n j e c t i o n but In203, w i t h i t s low b a r r i e r (O.leV), has been h e l d r e s p o n s i b l e f o r d r a i n c u r r e n t d r i f t i n InP IGFETs. Growth mechanism of n a t i v e oxides On the b a s i s of SIMS, XPS and X-ray d i f f r a c t i o n measurements. Nelson, Geib & Wilmsen (1983) proposed t h a t f o r temperatures l e s s than about 600°C the s u b s t r a t e atoms are the dominant d i f f u s i n g s p e c i e s . L i u , Denker & Irene (1992) r e c e n t l y confirmed t h i s u s i n g an O-'-^  marker experiment. Nelson e t a l . proposed t h a t a bare InP s u b s t r a t e f i r s t forms a l a y e r of InP04 which a c t s as a d i f f u s i o n b a r r i e r t o P but passes In more e a s i l y . The P t h a t i s passed t o t h e s u r f a c e may evaporate or may r e a c t t o form InPO^. The excess In forms In203, l e a d i n g t o an oxide which becomes i n c r e a s i n g l y r i c h i n In203 as the oxide becomes t h i c k e r and p r o v i d e s a g r e a t e r b a r r i e r t o the passage of P. H o l l i n g e r , Hughes, Himpsel, Jordan, Morar & Houzay (1986), used h i g h r e s o l u t i o n synchrotron r a d i a t i o n photoemission t o observe the chemisorption and oxide n u c l e a t i o n stage of the f o r m a t i o n of the n a t i v e oxide upon InP. They observed t h a t the oxygen coverage s a t u r a t e d a t about one monolayer. In order t o o b t a i n f u r t h e r growth they needed t o expose the s u b s t r a t e t o " e x c i t e d " oxygen produced by a nearby hot f i l a m e n t , r e s u l t i n g i n the f o r m a t i o n of a "uniform" oxide l a y e r . On the b a s i s of Auger and XPS measurements, Monch (1986) suggested t h a t the o x i d a t i o n of I I I - V semiconductors proceeded by a mechanism of a c t i v a t e d a b s o r p t i o n f o l l o w e d by the e l e c t r i c f i e l d -a i d e d growth of the oxide f i l m . The a c t i v a t e d a d s o r p t i o n was based on the mechanism t h a t p h y s i s o r b e d oxygen molecules r e q u i r e energy t o d i s s o c i a t e i n t o two atoms which can then form bonds, (chemisorption) w i t h the s u b s t r a t e atoms. B a r t e l s & Monch (1987) found a g r e a t i n c r e a s e i n the s t i c k i n g c o e f f i c i e n t of oxygen on a GaAs s u b s t r a t e when i l l u m i n a t e d with v i s i b l e l i g h t whose photon energy exceeded the bandgap. Monch (1986) suggested t h a t an e l e c t r o s t a t i c p o t e n t i a l was c r e a t e d by the presence of oxygen i o n s on the s u r f a c e and t h a t t h i s f i e l d then p u l l e d s u b s t r a t e or oxygen i o n s through the f i l m . Monch (1986) e x p l a i n e d the p h o t o s t i m u l a t i o n of the o x i d e growth i n terms of a lowering of the a c t i v a t i o n energy f o r c h e m i s o r p t i o n and an i n c r e a s e i n the p o t e n t i a l a c r o s s the f i l m brought about by adsorbed oxygen molecules t r a p p i n g a photogenerated e l e c t r o n . According t o Monch the d i s s o c i a t i o n energy of the oxygen molecular i o n O2" i s 3.8 eV, whereas t h a t o f the oxygen molecule i s 5.1 eV. From the model of Monch i t i s u n c l e a r whether the s u b s t r a t e i o n s move t o the s u r f a c e or whether the oxygen moves t o the s u b s t r a t e . Although the s u b s t r a t e i o n s are the moving s p e c i e s i n the "Nelson" model (Nelson e t a l . 1983) , Eberspacher, Fahrenbruch & Bube (1985), Yamaguchi & Ando (1980), Wilmsen, Geib & Gann (1985) found the e f f e c t s of oxygen d i f f u s i o n t o be s i g n i f i c a n t . Yamaguchi & Ando (1980) found t h a t the t h i c k n e s s s c a l e d as P^/^ f o r T>400°C and t h a t w i t h T « 450°C, and an oxygen p a r t i a l p r e s s u r e of about 1 atm, oxygen d i f f u s i o n was dominant. Moreover, they found t h a t f o r the lower temperatures, t h e oxide was predominantly InP04. Eberspacher e t a l . (1985) have suggested t h a t oxygen d i f f u s i o n may be s i g n i f i c a n t a t room temperature, thereby e x p l a i n i n g observed changes i n d e v i c e c h a r a c t e r i s t i c s . S p i c e r e t a l . (1979b) suggested t h a t oxygen d i f f u s e s t o t h e s u b s t r a t e and t h a t the d i f f i c u l t y i n o x i d i s i n g InP i s due t o t h e h i g h In-P bond s t r e n g t h . A c c o r d i n g t o S p i c e r e t a l . (1979b) t h e r e i s a c o r r e l a t i o n between the ease of o x i d a t i o n i n I I I - V m a t e r i a l s and the s u b s t r a t e bond s t r e n g t h . F a t h i p o u r e t a l . (1985) have suggested t h a t u l t r a v i o l e t i l l u m i n a t i o n serves t o break t h e In-P bond. B e r g i g n a t & H o l l i n g e r (1987) monitored the growth of the phosphorus i n t e r f a c i a l l a y e r by measuring the combined d i e l e c t r i c f u n c t i o n of the phosphorus/InP system. T h i s f a l l s from the v a l u e f o r a "bare" s u b s t r a t e , t o a minimum f o r o x i d a t i o n s a t about 450°C, and then r i s e s a g a i n f o r h i g h e r temperature o x i d a t i o n s . About 50% of the phosphorus i s l o s t i n the 450 and 550 °C o x i d a t i o n s . They suggested t h a t the i n c r e a s e d t h i c k n e s s e s a t temperatures above 550°C may be due t o the d i f f u s i o n o f oxygen t o the phosphorus i n t e r f a c i a l l a y e r . T h i s i s c o n s i s t e n t w i t h t h e f i n d i n g o f Wilmsen e t a l . (1985) t h a t the i n t e r f a c i a l phosphorus l a y e r d i s a p p e a r e d as the oxygen p a r t i a l p r e s s u r e was i n c r e a s e d . S t u d i e s of the e f f e c t s o f the simultaneous exposure t o u l t r a -v i o l e t l i g h t and oxygen of I I I - V s u b s t r a t e s have shown t h a t the n a t i v e o x i d e l a y e r was t h i c k e r than without i l l u m i n a t i o n and was more s t o i c h i o m e t r i c (Schmidt, Podlesnik, Evans, Yu, Yang & Osgood 1988; Yu, P o d l e s n i k , Schmidt, G i l g e n & Osgood 1986, Ingrey, Lau, M c l n t y r e & Sodhi 1987). Aizenberg, Dubonos & Kopezky (1986) c l a i m e d t h a t t h i s i s because the oxygen becomes the dominant d i f f u s i n g s p e c i e s f o r the t h i n oxides. Young & T i l l e r (1987) observed a g r e a t i n c r e a s e i n o x i d a t i o n r a t e of s i l i c o n when the photon energy exceeded the d i s s o c i a t i o n energy of oxygen. Yu, Schmidt, P o d l e s n i k & Osgood (1987) made a s i m i l a r o b s e r v a t i o n w i t h the o x i d a t i o n o f GaAs and suggested t h a t as the wavelength becomes s h o r t e r , t h e oxygen remains the dominant d i f f u s i n g s p e c i e s f o r p r o g r e s s i v e l y t h i c k e r o x i d e s . Yu e t a l . (1987) used ArF l a s e r s , where the wavelength i s s h o r t enough (193nm) t h a t O2 can be d i s s o c i a t e d d i r e c t l y whereas the d i s s o c i a t i o n of oxygen molecules by means of photons w i t h energy l e s s than 5.1 eV i s an i n d i r e c t , two s t e p p r o c e s s . V i g (1985) and Yu e t a l . (1987) found t h a t the o x i d a t i o n r a t e w i t h e i t h e r u l t r a v i o l e t i l l u m i n a t i o n or ozone alone i s f a r s m a l l e r than t h a t of the two together. Schmidt e t a l . (1988) , Fukuda & Takahei (1985), Yu e t a l . (1987) and A i z e n b e r g e t a l . (1986) b e l i e v e d t h i s e f f e c t t o be r e l a t e d t o the p r o d u c t i o n of e l e c t r o n -h o l e p a i r s i n the s u b s t r a t e . A c c o r d i n g t o Monch (1986) , photoemitted e l e c t r o n s form 02" or other adsorbed charged s p e c i e s which have an i n c r e a s e d s t i c k i n g c o e f f i c i e n t and which may c r e a t e an e l e c t r i c f i e l d a c r o s s the d i e l e c t r i c . The adsorbed s p e c i e s may be d i s s o c i a t e d by f u r t h e r a b s o r p t i o n of u l t r a v i o l e t l i g h t or may d i f f u s e d i r e c t l y . The e f f e c t of the u l t r a v i o l e t l i g h t i s t o t h i c k e n t h e phosphate l a y e r which would otherwise o n l y e x i s t t o a t h i c k n e s s of 2 t o 3 nanometers. High p r e s s u r e o x i d a t i o n As d e s c r i b e d above, evidence was presented by Eberspacher e t a l . (1985) and ot h e r s , t h a t oxygen d i f f u s i o n i s s i g n i f i c a n t i n the for m a t i o n o f the n a t i v e oxides on InP. I f the enhancement of the o x i d a t i o n r a t e i s l a r g e enough f o r oxygen p r e s s u r e s a t t a i n a b l e i n the l a b o r a t o r y then i t may be p o s s i b l e t o make oxides t h i c k enough f o r d e v i c e use. E l l i p s o m e t r y measurements were made upon the n a t i v e o x i d e s grown a t room temperature i n oxygen a t 1700 p s i , i n or d e r t o determine t o what extent the oxygen p a r t i a l p r e s s u r e a f f e c t s t h e growth r a t e . A sample of SI InP was cl e a v e d i n two, both p i e c e s were r i n s e d w i t h methanol and measured wi t h the e l l i p s o m e t e r . One sample was then p l a c e d i n a h i g h p r e s s u r e chamber a t room temperature w h i l e t h e o t h e r was l e f t i n dry l a b o r a t o r y a i r a t room temperature. A f t e r 17 hours, both samples were r i n s e d w i t h i s o p r o p y l a l c o h o l , blown d r y w i t h f i l t e r e d n i t r o g e n and e l l i p s o m e t r y measurements were made. The t h i c k n e s s of the oxide of the sample o x i d i s e d i n h i g h p r e s s u r e oxygen i n c r e a s e d from 1.4 ± 0.01 nm t o 1.57 ± 0.02 nm. That of the room-air n a t i v e oxide was 1.58 ± 0.01 nm. T h i s i n d i c a t e s t h a t the oxygen p a r t i a l p r e s s u r e has l i t t l e e f f e c t upon t h e oxide growth. Thermal o x i d a t i o n S i n c e the composition of the thermal oxide v a r i e s w i t h temperature of growth (see f o r i n s t a n c e B e r g i g n a t & H o l l i n g e r 1987), the aim of the present work was t o f i n d whether a thermal o x i d e c o u l d be produced a t a temperature which allowed a re a s o n a b l y t h i c k o x ide l a y e r t o be produced with adequate e l e c t r i c a l q u a l i t i e s . E l l i p s o m e t r i c measurements were made of the r e s i d u a l n a t i v e oxide p r e s e n t upon an a s - r e c e i v e d InP wafer a t i n c i d e n c e angles, <p, from 60 t o 75 degrees. The redundancy i n data was used t o c a l c u l a t e an estimate of the u n c e r t a i n t y i n the t h i c k n e s s . S i m i l a r l y , the use of v a r y i n g angles of i n c i d e n c e a l l o w s a check on the importance of s u r f a c e roughness. The u n c e r t a i n t y i s s m a l l because the measurements at d i f f e r e n t angles gave s i m i l a r t h i c k n e s s e s . I f s u r f a c e roughness were s i g n i f i c a n t then the apparent t h i c k n e s s would i n c r e a s e f o r g l a n c i n g angles of i n c i d e n c e . A n a l y s i s u s i n g n^ ^^  = 1.9 and ng = 3.42 - 0.278J i n d i c a t e d t h a t the n a t i v e oxide t h i c k n e s s was 2.29 ± 0.05 nm. T h i s v a l u e i s r o u g h l y i n agreement with such v a l u e s as 3 nm (Hoflund & 50n 4 0 -^ 3 0 ^ CO CO 0) -520H o 10-C o r a l l o 1986) and 2nm (Eberspacher e t a l , 1985, Wager & Wilmsen 1980) f o r s i m i l a r l y p r epared samples. S i m i l a r t h i c k n e s s e s were found f o r the l i m i t i n g t h i c k n e s s e s of n a t i v e o x i d e s grown ( f o r s e v e r a l days) a t room temperature. Samples of t h e r m a l l y o x i d i s e d i n a furnace. Some samples were o x i d i s e d i n a i r and, f o r comparison, some were o x i d i s e d i n f l o w i n g oxygen. In 00 400 500 Cels ius 600 F i g u r e 3.11: T h i c k n e s s vs temperature a f t e r 20min. of InP were thermal o x i d a t i o n . order t o a v o i d the combustion of the apparatus, f l o w i n g oxygen was used o n l y f o r temperatures lower than 350°C. No s i g n i f i c a n t d i f f e r e n c e was found between the samples produced i n a i r and those i n oxygen. The thermal growth at temperatures between 20°C and 550°C produced oxide t h i c k n e s s e s ranging from s e v e r a l nm t o about 65 nm. The t h i c k n e s s e s are shown i n F i g u r e 3.11. A mercury probe (MSI E l e c t r o n i c s Inc.) was used t o make e l e c t r i c a l c o n t a c t t o the o x i d i s e d samples. A Hewlett-Packard semiconductor parameter a n a l y z e r was used t o measure the r e s i s t a n c e between the c o n t a c t s . The steady decrease of the r e s i s t a n c e as the f i l m t h i c k n e s s i n c r e a s e d , as shown i n F i g u r e 3.12, suggests t h a t t h e o x i d e i t s e l f i s conductive, suggesting t h a t the f i l m s c o n s i s t e d of the c o n d u c t i v e n a t i v e oxide, In203. With m u l t i p l e angle of i n c i d e n c e measurements the r e f r a c t i v e index of the oxide f i l m s c o u l d be determined even when the f i l m s were o n l y a few nm t h i c k . T h i s i s an improvement over p r e v i o u s ^ ^  work such as, f o r i n s t a n c e , ^ Wager and Wilmsen (1980) who c o u l d determine the r e f r a c t i v e than i n d i c e s f o r the thermal oxides index o n l y f o r f i l m s t h i c k e r 15nm. The r e f r a c t i v e Ql 4-O c were near 2.0, c o n s i s t e n t with o them b e i n g of In^O 0 ' 40 ^ Th ickness (nm) 60 F i g u r e 3.12 : R e s i s t a n c e vs t h i c k n e s s of thermal oxides as measured by the Hg-probe and SPA. O x i d a t i o n s under u l t r a v i o l e t i l l u m i n a t i o n In the pr e s e n t work the growth of the n a t i v e oxide under f l o w i n g oxygen was monitored by i n - s i t u e l l i p s o m e t r y . The growth a p p e a r e d u n a f f e c t e d by v a r i a t i o n s i n the v i s i b l e l i g h t i n t e n s i t y . A t e s t was made of th e r e l a t i v e importance of the e f f e c t s o f the u l t r a v i o l e t l i g h t d i r e c t l y upon the s u b s t r a t e and 3.0 n §2.5 J w c •^2.0 ^ 1.5 J 0 10, 20 Time (hours) 30 F i g u r e 3.13; Comparison of the i n d i r e c t e f f e c t s through o x i d a t i o n s i n f a s t and slow oxygen flow. e x c i t e d oxygen (ozone, e x c i t e d oxygen molecules and atomic oxygen). An experiment was conducted under c o n d i t i o n s o f a 1) f a s t flow of oxygen and 2) slow flow of oxygen. As shown i n F i g u r e 3.13, the oxide growth was g r e a t e s t under c o n d i t i o n s of s l o w l y f l o w i n g oxygen, i n d i c a t i n g t h a t e x c i t e d oxygen p l a y s a l a r g e r o l e i n determining the l i m i t i n g t h i c k n e s s e s . The r e f r a c t i v e index of these f i l m s was 1.5 ± 0.1, c o n s i s t e n t w i t h them b e i n g of InP04. As shown i n F i g u r e 3.14, the maximum oxide t h i c k n e s s was found t o be about 5nm u s i n g u l t r a v i o l e t i l l u m i n a t i o n s u p p l i e d by a low p r e s s u r e Hg lamp. Since t h i s f i l m appears t o c o n s i s t of InP04, i t i s expected t o p r o v i d e a good i n t e r f a c e . I f the l a y e r c o u l d be made t h i c k e r i t c o u l d be used as a d i e l e c t r i c on i t s own. However, even the p r e s e n t t h i c k n e s s of the l a y e r may al l o w the d e p o s i t i o n of a second d i e l e c t r i c l a y e r w h i l e p r e v e n t i n g the formation of In203. I t was concluded t h a t the b e s t method of producing the n a t i v e o xide may E c 6-1 "4-cn o 2-0 - r 5 1 2 3 4 UV Exposure (days ) be the F i g u r e 3.14 : T h i c k n e s s vs time under UV i r r a d i a t i o n a t 40C. simultaneous exposure of the s u b s t r a t e t o short-wavelength u l t r a v i o l e t l i g h t and oxygen. In or d e r t o grow a s t a b l e , h i g h q u a l i t y oxide the phosphate l a y e r must be grown a t low temperature and t o a t h i c k n e s s s u f f i c i e n t t o pre v e n t f u r t h e r In-movement, a l l o w i n g an i n s u l a t o r t o be d e p o s i t e d atop the n a t i v e oxide without l e a d i n g t o the c r e a t i o n o f a tr a p p e d l a y e r of In203. CHAPTER 4. DEEP LEVELS IN SEMI-INSULATING InP BY OTCS O p t i c a l t r a n s i e n t c u r r e n t spectroscopy OTCS i s a method of DLTS which was i n t r o d u c e d by Hurtes, Boulou, Mittoneau & B o i s (1978) f o r the purpose of c h a r a c t e r i s i n g SI m a t e r i a l s . I t i n v o l v e s a p p l y i n g a v o l t a g e a c r o s s a p a i r of e l e c t r o d e s and a n a l y z i n g the c u r r e n t t r a n s i e n t f o l l o w i n g repeated p e r i o d s of i l l u m i n a t i o n . The o r i g i n a l method f o l l o w e d Lang's (1974) DLTS method i n t h a t a boxcar averager was used t o sample the t r a n s i e n t c u r r e n t a t a two times t ^ and t2 f o l l o w i n g the end of each p e r i o d of i l l u m i n a t i o n . The c u r r e n t a t t2 i s s u b t r a c t e d from t h a t a t t ^ and the r e s u l t i n g d i f f e r e n c e , a I , i s averaged over s u c c e s s i v e p e r i o d s of i l l u m i n a t i o n . Each t r a p g i v e s a c o n t r i b u t i o n t o A i which peaks at some temperature '^nj^, s i n c e a t low temperatures n o t h i n g happens and a t h i g h e r temperatures the t r a n s i e n t i s over by t ^ . A p p l i c a t i o n of t h i s a n a l y s i s g i v e s the time co n s t a n t f o r the r e l e a s e of c a r r i e r s , from the t r a p concerned a t Tj^^x' f^on and t2. The v a r i a t i o n of t h i s time co n s t a n t w i t h temperature g i v e s i n f o r m a t i o n on deep l e v e l s . The model Hurtes e t a l . used t o d e s c r i b e t h e i r OTCS t r a n s i e n t s , r e f e r r e d t o here as the d e p l e t i o n model, was t h a t the t r a n s i e n t c u r r e n t was caused by the r e l e a s e of e l e c t r o n s or h o l e s from l e v e l s i n t h e d e p l e t i o n r e g i o n of a p-n j u n c t i o n or Schottky diode and the t r a n s i t of the r e l e a s e d p a r t i c l e s through the d e p l e t i o n r e g i o n . Each l e v e l e m i t t e d c a r r i e r s w i t h i t s own c h a r a c t e r i s t i c time, t y p i c a l l y l e a d i n g t o an e x p o n e n t i a l l y decaying c o n t r i b u t i o n t o the c u r r e n t . The t r a n s i e n t c o n s i s t e d of a sum of these decays. Sampling a t j u s t two times may g i v e s p u r i o u s r e s u l t s i f the t r a n s i e n t i s not a s i n g l e - e x p o n e n t i a l (White, Day & Grant 1979) or i f o s c i l l a t i o n s occur. C l o s e l y spaced deep l e v e l s may not be r e s o l v e d or may l e a d t o erroneous r e s u l t s (Morimoto, K i d a , M i k i & Miyakawa 1986). The temperature must be swept over a wide range because, t o be r e s o l v e d , each deep l e v e l i n t u r n must become the dominant c o n t r i b u t o r t o the s i g n a l . As w e l l as making the process e x c e s s i v e l y time-consuming, the wide temperature sweeps may induce degradation of the sample or c o n t a c t s (Abele, Kremer & Blakemore 1987, T i n e t a l . 1988b). Abele e t a l . (1987) noted changes i n dark c u r r e n t as l a r g e as an order of magnitude from sweep t o sweep. The term " d i g i t a l OTCS" i s used t o r e f e r t o the s i t u a t i o n where the t r a n s i e n t i s d i g i t i z e d and s t o r e d , (Yoshie & Kamihara 1983ab, 1985, and Abele e t a l . 1987). The boxcar method of a n a l y s i s can then be used by s i m u l a t i n g i n software the e f f e c t of the boxcar averager w i t h the advantage over the c l a s s i c a l method t h a t t h e p a i r s of samples of the c u r r e n t are obtained from a s i n g l e sweep of temperature r a t h e r than from a separate sweep f o r each time window. Abele e t a l . (1987) found t h a t t h e i r d i g i t a l t echnique gave a h i g h e r s e n s i t i v i t y than the analogue approach. In the boxcar method i t i s assumed t h a t the decays are e x p o n e n t i a l and t h a t the i n i t i a l t r a p occupancies (at the s t a r t o f each t r a n s i e n t ) do not change w i t h temperature. I t would be p r e f e r a b l e t o use an " i s o t h e r m a l " technique i n which, f o r each temperature, the t r a n s i e n t i s decomposed i n t o a s e t of c o n t r i b u t i o n s from d i f f e r e n t l e v e l s without the need t o assume t h a t the c o n t r i b u t i o n s are e x p o n e n t i a l and t h a t the i n i t i a l t r a p occupancies do not change wi t h temperature. Abele e t a l . (1987) s u c c e s s i v e l y f i t t e d and s u b t r a c t e d the slowest e x p o n e n t i a l from t h e i r t r a n s i e n t s and found t h a t t h i s gave d i f f e r e n t r e s u l t s depending upon how the slowest e x p o n e n t i a l s were f i t t e d . Small e r r o r s i n the f i t t i n g of the slowest term l e d t o l a r g e e r r o r s i n subsequent terms. To a v o i d t h i s problem, they t r i e d a Newton-Raphson i t e r a t i v e technique (method of moments) t o f i t s i m u l t a n e o u s l y a decay c o n s i s t i n g of a number of e x p o n e n t i a l terms but they had d i f f i c u l t y i n determining the c o r r e c t number of terms and i n e s t i m a t i n g s t a r t i n g parameters t h a t gave subsequent convergence. Small changes i n t h e i r b a s e - l i n e l e d t o l a r g e changes i n t h e i r f i t t e d parameters. The r e s u l t s r e p o r t e d i n t h e i r paper were o b t a i n e d by means of the simulated boxcar t e c h n i q u e . In the p r e s e n t work an i s o t h e r m a l method was developed and a p p l i e d t o InP. OTCS has been a p p l i e d t o s e m i - i n s u l a t i n g InP, u s i n g t h e boxcar method, on l y by Rhee & Bhattacharya (1982) and by Kaminski & Thomas (1990). Experimental procedure Both p l a n a r and sandwich sample s t r u c t u r e s were made u s i n g 10mm by 10mm s e c t i o n s of l i q u i d e ncapsulated C z o c h r a l s k i (LEC) (100) InP:Fe from Crystacomm Inc. and Sumitomo Inc. The samples were c l e a n e d i n b o i l i n g acetone and methanol, r i n s e d i n i s o p r o p a n o l and blown dr y w i t h dry, f i l t e r e d The samples were then etched l i g h t l y i n a s o l u t i o n of NH40H:H202:H20 5:2:240, r i n s e d w i t h d e - i o n i s e d water, f o l l o w e d by i s o p r o p a n o l , blown d r y w i t h N2 and p l a c e d immediately i n a c o n v e n t i o n a l evaporator where semi-t r a n s p a r e n t Au e l e c t r o d e s or t h i c k e r Au-Ge e l e c t r o d e s were d e p o s i t e d . The p l a n a r samples c o n s i s t e d of Au-Ge c o n t a c t s d e p o s i t e d upon the s u r f a c e w i t h spacings of 1, 0.5 and 0.25 mm. The c o n t a c t s were r e c t a n g u l a r , 4mm long and 1mm wide. The sandwich s t r u c t u r e s c o n s i s t e d of Au-Ge back-contacts with s e m i - t r a n s p a r e n t Au f r o n t c o n t a c t s , both 6mm by 6mm. An a r r a y of l i g h t - e m i t t i n g diodes (LED) was used f o r i l l u m i n a t i o n i n s t e a d of a mechanical chopper or s h u t t e r . T h i s allowed the s w i t c h i n g of i l l u m i n a t i o n on a time s c a l e of usee w i t h no l i m i t a t i o n upon how long the l i g h t c o u l d remain e i t h e r on or o f f . T h i s i n t u r n allowed a wider range of time c o n s t a n t s t o be determined than i n p r e v i o u s OTCS work wit h GaAs by Abele e t a l . (1987) who used a mechanical s h u t t e r . L e v e l s which responded on a time s c a l e much slower than the p e r i o d of darkness, were brought t o e q u i l i b r i u m by r e p e a t i n g the c y c l e of i l l u m i n a t i o n u n t i l the t a i l o f the t r a n s i e n t no longer v a r i e d from one c y c l e t o the next. As i l l u s t r a t e d i n F i g u r e 4.1, the c o n t r o l l i n g IBM-PC was i n t e r f a c e d through a s e r i a l l i n k t o an MMR Inc. K20 c o n t r o l l e r which i n t u r n c o n t r o l l e d an MMR Inc. m i n i a t u r e Joule-Thompson r e f r i g e r a t o r . I l l u m i n a t i o n was p r o v i d e d through a s a p p h i r e window by any one of t h r e e a r r a y s of LEDs, these a r r a y s p r o v i d e d i l l u m i n a t i o n w i t h s p e c t r a c e n t r e d a t 660, 555 or 935nm. The v o l t a g e a c r o s s t h e sample, the type and i n t e n s i t y of i l l u m i n a t i o n and the IBM PC COMPUTER DATA TRANSLATION CARD (DT2801) DOAO D1A1A2 TRANSCONDUCTANCE AMPUFIER LED ON/OFF VOLTAGE SOURCE LED INTENSITY CURRENT , , TO —^VOLTAGE CONVERTER MMR LTMP-3 SIGNAL COND. CIRCUIT S / H CONTROL RAW (x2) TRANSIENT (xlO) \ LED K20 CONTROLLER F i g u r e 4.1: Experimental arrangement f o r OTCS u s i n g t h e " i s o t h e r m a l " method. temperature were a l s o c o n t r o l l e d through a Data T r a n s l a t i o n DT 2801-A ADC/DAC/Digital I/O board. The c u r r e n t was a m p l i f i e d by an EGG PARC p r e - a m p l i f i e r , the s i g n a l was then p r o c e s s e d by a c i r c u i t which p r o v i d e d f u r t h e r g a i n f o r the s i g n a l a f t e r s u b t r a c t i n g t h e dark c u r r e n t . The a m p l i f i e d s i g n a l was then d i g i t i z e d u s i n g a d i r e c t memory access (DMA) co n v e r s i o n mode. The samples were normally i l l u m i n a t e d f o r i n t e r v a l s of 1 sec a f t e r which d a t a - t a k i n g was i n i t i a t e d w i t h a sampling r a t e of 20 kHz, f o r 1.5 sec. The temperature was changed i n one degree s t e p s . To a l l o w the temperature of the sample and the p o p u l a t i o n s of i t s deep l e v e l s t o s t a b i l i s e , data a c q u i s i t i o n was de l a y e d u n t i l the c u r r e n t a t the end of the dark p e r i o d was no lo n g e r changing from one i l l u m i n a t i o n c y c l e t o the next. T h i s took about 20 p e r i o d s . A low-pass f i l t e r was used t o remove s i g n a l s above the Nyqu i s t frequency corresponding t o the ADC sampling r a t e of 2 0kHz. T h i s f i l t e r i n t r o d u c e d a spu r i o u s temperature-independent 95 jLisec e x p o n e n t i a l decay t o the t r a n s i e n t . T r a n s i e n t s were d i g i t i z e d f o r v a r i o u s a p p l i e d v o l t a g e s , and i l l u m i n a t i o n s . The maximum temperature range was 85K t o 345K. A n a l y s i s technique The t r a n s i e n t was normally d i g i t i z e d a t i n t e r v a l s of 50 /xsec f o r 1.5 sec, thus g i v i n g 30,000 p o i n t s . Since the l a t e r p o i n t s had l i t t l e r e l e v a n c e t o the f a s t e r decay times and were c l o s e r than needed t o e x t r a c t i n f o r m a t i o n about the slower decays, t h e t r a n s i e n t was compressed, t o save storage space, a f t e r examination f o r unusual behaviour by g r a p h i c a l d i s p l a y on an o s c i l l o s c o p e o r on a v i d e o t e r m i n a l . The compression a l g o r i t h m took the f i r s t 100 p o i n t s "as i s " . The next 1000 p o i n t s were grouped g i v i n g 100 averages of 10 p o i n t s each. The t r a i l i n g p o i n t s were grouped t o y i e l d averages o f 100 p o i n t s each. Compression allowed s t o r a g e i n about 1 kbyte, i n s t e a d of 64 kbytes. The s a v i n g s of d i s c space a l l o w e d many t r a n s i e n t s t o be s t o r e d i n d i v i d u a l l y , without a v e r a g i n g , under each s e t of c o n d i t i o n s . T h i s a llowed p r o g r e s s i v e changes i n s u c c e s s i v e t r a n s i e n t s t o be d e t e c t e d . The simultaneous l e a s t - s q u a r e s d e t e r m i n a t i o n of a l l the parameters i n the model f u n c t i o n , a sum of s e v e r a l e x p o n e n t i a l terms and a consta n t , was done wi t h a n o n - l i n e a r Newton's method a l g o r i t h m s i m i l a r t o one used e a r l i e r by the author (McKinnon, Backhouse & K a l a n t a r 1985). The parameters o f the e x p o n e n t i a l s (amplitude and time constant) were f i r s t e s t i m a t e d f o r a s i n g l e e x p o n e n t i a l f i t t e d i n t u r n t o each of the t h r e e data-compression r e g i o n s d e s c r i b e d above. An i t e r a t i v e procedure was used t o r e f i n e the i n i t i a l e s t i m a t e s o f the e x p o n e n t i a l parameters. In t h i s procedure a matrix, A, was c a l c u l a t e d where A^j was the p a r t i a l d e r i v a t i v e o f the f i t t e d m u l t i - e x p o n e n t i a l model f u n c t i o n w i t h r e s p e c t t o the j t h parameter, e v a l u a t e d a t the i t h time t ^ . From the v e c t o r B of the observed d i f f e r e n c e s between the experimental data I^ and the c a l c u l a t e d p o i n t s f (tj^) , a v e c t o r X c o n s i s t i n g o f the changes t o be made t o each of the parameters was c a l c u l a t e d . P i s the v e c t o r o f the e s t i m a t e d parameters, and PQ i s the v e c t o r o f d e s i r e d b e s t - f i t parameters. Had t h e r e been N parameters and N experimental data which were r e c o r d e d w i t h no u n c e r t a i n t y then a simple procedure c o u l d be a p p l i e d . In t h i s procedure the s t a r t i n g e s t i m a t e s of the parameters c o u l d be made s u f f i c i e n t l y a c c u r a t e l y , i . e . c l o s e t o Pg, t h a t p a r t i a l d e r i v a t i v e s c o u l d be used t o r e l a t e the model's f i t a t P t o t h a t a t PQ. Then with, X = P - Pg, (5) the observed d i f f e r e n c e s between the experimental data and the f i t t e d f u n c t i o n c o u l d be g i v e n by, B = AX (6) from which the r e q u i r e d changes t o the parameters c o u l d be determined from, X = A"^B. (7) S i n c e the number of experimental data exceeded the number of parameters, the matrix A was not i n v e r t i b l e . A l e a s t squares technique was used (Press, Flannery, Teukolsky & V e t t e r l i n g 1988) t o reduce the over-determined system of equations t o a s e t of equations of the form: X = (A^A)"^A'^B (8) where A*^  r e p r e s e n t s the transpose of the m a t r i x A. S i n c e the e s t i m a t e d standard d e v i a t i o n s of the data, a^, v a r i e d , the equations were weighted a c c o r d i n g l y by r e d e f i n i n g , A i j = ( d f ( t i ) / d P j ) (l/a^) (9) and B i = (I. - f ( t i ) ) / a i . (10) A f i g u r e of m e r i t i s , d e f i n e d as (1/N) ( (y^ata " Yf itted)/«^i) ^  where N i s the number of p o i n t s and y^ ^ i s the i t h data p o i n t . The d e t e r m i n a t i o n of the c o r r e c t number of e x p o n e n t i a l terms p r e s e n t i n the decaying t r a n s i e n t was done by i n c r e a s i n g t h e i r number u n t i l the no longer decreased. The n o n - l i n e a r l e a s t squares technique depended upon having the c o r r e c t number of e x p o n e n t i a l decays and upon having good s t a r t i n g e s t i m a t e s of the parameters of the f i t . Examination of the f i t of the s t a r t i n g e s t i m a t e s t o the data g e n e r a l l y i n d i c a t e d whether the s t a r t i n g e s t i m a t e c o n t a i n e d the c o r r e c t number of terms. Poor s t a r t i n g e s t i m a t e s g e n e r a l l y l e d t o divergence, however, i f the c o r r e c t number of decays was being f i t t e d , then a unique s o l u t i o n was found f o r those s t a r t i n g e s t i m a t e s t h a t produced convergence. P l o t s o f the r e s i d u a l s of the l e a s t - s q u a r e s f i t showed s y s t e m a t i c d e v i a t i o n s u n l e s s convergence was achieved w i t h a f i t t i n g model which c o n t a i n e d enough terms. The f i t t e d parameters as determined by the a l g o r i t h m sometimes o s c i l l a t e d i n the neighbourhood of the minimum o f the x^. When the c o r r e c t number of terms was used i n the f i t t i n g f u n c t i o n , the o s c i l l a t i o n s were s m a l l as compared t o the u n c e r t a i n t y e s t i m a t e s . When too many terms were used i n the f i t t i n g model, t h e o s c i l l a t i o n s were l a r g e and l e d t o di v e r g e n c e . The e f f e c t s o f the sm a l l o s c i l l a t i o n s were removed by a Simplex a l g o r i t h m (Press e t a l . 1988) which a l s o s e r v e d t o check convergence. R e s u l t s In t h e temperature range of 28OK t o 34OK, the t r a n s i e n t s were w e l l d e s c r i b e d by one, two or t h r e e e x p o n e n t i a l terms, produced l i n e a r A r r h e n i u s p l o t s ( d e s c r i b e d below) and had smoothly v a r y i n g v a l u e s t h a t were only d i s c o n t i n u o u s when a decay-term e i t h e r ceased t o be r e s o l v e d or began t o be r e s o l v e d . Above 3 4 OK d i f f i c u l t i e s were encountered with e x c e s s i v e d a r k - c u r r e n t . The dark c u r r e n t i n c r e a s e d by a f a c t o r of 15 as the temperature i n c r e a s e d from 27OK t o 34OK and above 33OK the t r a n s i e n t c o u l d no l o n g e r be r e s o l v e d a c c u r a t e l y without a v e r a g i n g a number of compressed t r a n s i e n t s which was e x c e s s i v e from the p o i n t of view of s t o r a g e . Below 280K the behaviour was complicated by o s c i l l a t i o n s (Chapters 5 and 7) and neg a t i v e t r a n s i e n t s (Chapter 5 ) . Deep l e v e l s were observed with time c o n s t a n t s i n a range spanning more than 4 orders of magnitude. R e s o l u t i o n of l e v e l s was l i m i t e d by the requirement t h a t the t r a n s i e n t they produced had t o be l a r g e r than the n o i s e and had t o have a time c o n s t a n t i n t h e range of 5 x 10"^ sec t o 1.5 sec. As i t happened, r e s o l u t i o n o f t h e s p u r i o u s 95 jitsec time constant decay due t o the f i l t e r t u r n e d out t o p r o v i d e a u s e f u l c o n s i s t e n c y check i n the a n a l y s i s . As d i s c u s s e d by M i l n e s (1983, p77), the e m i s s i o n r a t e o f an e l e c t r o n from a deep l e v e l i s g i v e n by: = e^ = Yn^naT^exp(-En^/kT) (11) where a^^ i s the capture c r o s s s e c t i o n of the t r a p f o r c a p t u r e of an e l e c t r o n , k i s Boltzmann's constant, Ej^^ i s the a c t i v a t i o n energy f o r emission, and y^ ^ i s a constant of p r o p o r t i o n a l i t y . Together, o^^ and Ej^^ are known as the " s i g n a t u r e " of the deep l e v e l . A l s o as d i s c u s s e d by M i l n e s , i n the case t h a t the c r o s s s e c t i o n must be a c t i v a t e d t h e r m a l l y with an a c t i v a t i o n energy. Eg, of i t s own, then a^^ and Ej^^ no longer have a d i r e c t p h y s i c a l meaning but s t i l l serve as a t r a p " s i g n a t u r e " . When p l a c e d on an A r r h e n i u s p l o t of log(TT^) versus 1/T the data from each t r a p g i v e a l i n e . I d e n t i f y i n g the s l o p e of the l i n e f o r a g i v e n t r a p as -Ena/k g i v e s E^a. Hence i f the decay i s dominated by e m i s s i o n from l e v e l s ( i . e . c a p t u r e p r o c e s s e s can be n e g l e c t e d ) , the decay w i l l c o n s i s t of a sum of e x p o n e n t i a l decays each of which o r i g i n a t e s w i t h a s i n g l e l e v e l . In c o n f i r m a t i o n of t h i s , A r r h e n i u s p l o t s produced good s t r a i g h t l i n e s of s l o p e E^^^/k, t y p i c a l p l o t s are shown i n F i g u r e s 4.2, 4.3 and 4.4. In the a c c e s s i b l e range, n i n e deep l e v e l s were r e s o l v e d . These a c t i v a t i o n e n e r g i e s are summarized i n Table I I . The r e l a t i v e amplitudes of the c o n t r i b u t i o n s t o t h e t r a n s i e n t from the d i f f e r e n t l e v e l s depended on the wavelength o f the l i g h t . C o n t r i b u t i o n s from the deeper l e v e l s a t 0.83 and 0.88 eV were seen onl y w i t h the two s h o r t e r wavelength LED a r r a y s . Most runs were done w i t h the 935nm LED, because i t gave the l a r g e s t t r a n s i e n t s . Number Present Work L i t e r a t u r e O r i g i n Reference 1 0.09 ± 0.04 0.09 - Lev i n s o n e t a l 1982 2 0.18 ± 0.01 0.17 Vp-Pi? Yamaguchi, Ando 1988 0.19 ± 0.01 - Luo e t a l 1987 3 0.22 ± 0.02 0.22 - Lev i n s o n e t a l 1982 0.22 - Yamaguchi, Ando 1988 0.23 ± 0.03 - Pudensi e t a l 1985 0.22 ± 0.01 PinVp? T i n , Bames 1989 0.23 Fe r e l a t e d Kaminski, Thomas 1990 4 0.28 ±0.003 0.29 ± 0.03 - Pudensi e t a l 1985 5 0.42 ± 0.02 0.38 ± 0.04 - Pudensi e t a l 1985 0.43 Fe-Vp I l l i a d i s e t a l 1989 6 0.45+0.01 0.44 P - r e l a t e d Yamamoto e t a l 1989 0.44 Vp r e l a t e d I n u i s h i , Wessels 1983 0.45 - N i c h o l a s e t a l 1984 0.45 ± 0.02 - T i n , Barnes 1989 7 0.47 ± 0.007 0.47 Fe r e l a t e d Takanohashi e t a l 1988 8 0.83 ± 0.08 0.8 Pj^? I n u i s h i , Wessels 1983 0.80 - Yamamoto e t a l 1989 9 0.88 ± 0.01 - -Ta b l e I I . Observed a c t i v a t i o n e n e r g i e s (eV) and i d e n t i f i c a t i o n s w i t h l e v e l s r e p o r t e d i n the l i t e r a t u r e . F i g u r e 4.2: A r r h e n i u s p l o t of OTCS time c o n s t a n t s . (5V, 935nm) From top t o bottom the l i n e s r e p r e s e n t l e v e l s a t 0.22, 0.42 and 0.45 eV. The lowest l i n e i s due t o the co n s t a n t 95 us decay i n t r o d u c e d by the low-pass f i l t e r . Csl CNJ o o 3.4 000/T ( 3.7 F i g u r e 4.3: A r r h e n i u s p l o t of OTCS time c o n s t a n t s . (12V, 935nm) From top t o bottom, on the r i g h t , the l i n e s r e p r e s e n t l e v e l s a t 0.28, 0.47 and 0.22 eV. 5n CO d -CM CN 3 -o o 2 -3. 3.4 000/T (1/K) 3.7 F i g u r e 4.4: A r r h e n i u s p l o t of OTCS time c o n s t a n t s . (12V, 660nm) From top t o bottom the l e v e l s are 0.83, 0.88 and 0.28 eV. V o l t a g e Observed R (V) (eV) 12 0.22, 0.28, 0.47 2.0 5 0.22, 0.47 0.2 3 0.09, 0.18 0.0 Tabl e I I I . E f f e c t of a p p l i e d v o l t a g e on the amplitude of 0.47 eV l e v e l . R i s the amplitude of the 0.47 eV l e v e l d i v i d e d by the sum of a l l other amplitudes, showing t h a t the magnitude of the 0.47 eV l e v e l r a p i d l y i n c r e a s e d as the b i a s v o l t a g e was i n c r e a s e d . D i s c u s s i o n Of the nine deep l e v e l s found (Table II) , e i g h t had not p r e v i o u s l y been d e t e c t e d i n s e m i - i n s u l a t i n g InP. Seven of these were i d e n t i f i e d w i t h l e v e l s p r e v i o u s l y found by c a p a c i t i v e DLTS methods i n doped ( i . e . conducting) m a t e r i a l . The l e v e l a t 0.88 eV had not been observed p r e v i o u s l y by DLTS i n any type of InP. With the e x c e p t i o n of Kaminski & Thomas (1990) who used OTCS, the p r e v i o u s work i n Table I I i n v o l v e d c a p a c i t i v e DLTS and doped InP. The p r e s e n t r e p o r t appears t o be the f i r s t o f the 0.88, 0.83, 0.47, 0.45, 0.42, 0.28, 0.18 eV and 0.09 eV deep l e v e l s i n s e m i - i n s u l a t i n g InP. Takanohashi, Nakai & Nakajima (1988) observed the 0.47 eV l e v e l i n pn s t r u c t u r e s on iron-compensated InP. The i n t e n s i t y o f t h i s l e v e l was c o r r e l a t e d with i r o n c o n c e n t r a t i o n . Yamamoto, Uwai & Takahei (1989) found a l e v e l a t E^ - 0.44 eV i n MOCVD and LEC InP. They a t t r i b u t e d i t t o an unknown d e f e c t r e l a t e d t o phosphorus d e f i c i e n c y on the b a s i s of the o b s e r v a t i o n of a) a h i g h d e f e c t d e n s i t y when the phosphorus p r e s s u r e was low d u r i n g MOCVD (metal-organic chemical vapour d e p o s i t i o n ) and b) i n c r e a s e s i n the c o n c e n t r a t i o n towards the s u r f a c e a f t e r a n n e a l i n g , c o n s i s t e n t w i t h i t s p r o d u c t i o n by the o u t - d i f f u s i o n of phosphorus. On the b a s i s of photoluminescence and secondary-ion mass spe c t r o s c o p y (SIMS), I l l i a d i s , L a i h & M a r t i n (1989) a t t r i b u t e d t h e i r l e v e l a t - 0.43 eV t o an iron-phosphorus vacancy complex, Fe-Vp, but I n u i s h i & Wessels (1983) a t t r i b u t e d t h e i r E^ - 0.44 eV l e v e l t o a phosphorus vacancy-impurity complex. The deep l e v e l a t 0.88 ± 0.01 eV may be a s s o c i a t e d w i t h phosphorus v a c a n c i e s Vp. S p i c e r , Chye, Skeath, Su & Lindau (1979) proposed t h a t d e f e c t s are produced d u r i n g o x i d a t i o n o f , or the d e p o s i t i o n of metal on, the InP s u r f a c e and t h a t the r e s u l t i n g deep l e v e l s a re r e s p o n s i b l e f o r the p i n n i n g o f the Fermi l e v e l a t the s u r f a c e . From t h e i r o b s e r v a t i o n s of the p i n n i n g of the Fermi l e v e l a t the s u r f a c e of n and p-type InP, they proposed t h a t Vp i s produced, g i v i n g r i s e t o a l e v e l a t E^ + 0.9 ± 0.1 eV. Temkin, Dutt, & Bonner (1981) used photoluminescence t o f i n d a l e v e l w i t h a f r e e energy of 0.99 eV which they a t t r i b u t e d t o Vp on the b a s i s of the i n v e r s e c o r r e l a t i o n of the photoluminescence s i g n a l i n t e n s i t y w i t h the vapour p r e s s u r e of phosphorus d u r i n g anneals of the InP. Si n c e t h i s f r e e energy i n c l u d e s a s m a l l p o s i t i v e c o n t r i b u t i o n from the entropy on the order of 0.1 eV, i t may correspond t o an a c t i v a t i o n energy of about 0.9 eV. Goodman, Wessels & Ang (1984) used photocapacitance s p e c t r o s c o p y t o d e t e c t a l e v e l a t - 0.9 eV i n p-InP although they d i d not suggest an o r i g i n f o r t h i s l e v e l . To the author's knowledge, the 0.88 ± 0.01 eV l e v e l of the p r e s e n t work has not p r e v i o u s l y been d e t e c t e d by any form of DLTS. I n u i s h i & Wessels (1983) found a deep l e v e l a t E^ , - 0.8 eV which they t e n t a t i v e l y a t t r i b u t e d t o the a n t i s i t e d e f e c t on t h e b a s i s of the c o r r e l a t i o n of i t s d e n s i t y w i t h the p h o s p h o r u s - r i c h c o n d i t i o n s of vapour phase e p i t a x i a l growth (VPE), and because i t s energy agreed w i t h the t h e o r e t i c a l c a l c u l a t i o n s of V o g l (1981). However, the above t h e o r e t i c a l p r e d i c t i o n (E^ - 0.9 eV) would a l s o support the assignment of the 0.88 eV l e v e l of the p r e s e n t work t o Pjjj. The deep l e v e l s which were expected i n our InP were those r e l a t e d t o Fe, or p h o s p h o r u s - d e f i c i e n c y . Phosphorus-loss has been d e t e c t e d u s i n g SIMS by K u l i s c h & K a s s i n g (1987) a f t e r exposure of the s u b s t r a t e t o temperatures as low as 200°C and a primary c o n s i d e r a t i o n i n many InP processes i s t o a v o i d phosphorus-loss. Loss of indium i s g e n e r a l l y not c o n s i d e r e d s i n c e the indium vapour p r e s s u r e i s low. However, some authors such as Wada (1985) and E l i a s , Mahajan, Bauer, M i l n e s & Bonner (1987) have shown t h a t Au r e a c t s s t r o n g l y w i t h the s u b s t r a t e . Wada observed p r e f e r e n t i a l removal of the indium or phosphorus, depending on whether the s u r f a c e was exposed t o temperatures below or above 450K, by r e a c t i o n w i t h the Au l a y e r . Although one might suppose t h a t by not exposing the s u r f a c e t o e l e v a t e d temperatures t h i s r e a c t i o n may not occur, the heat of condensation ( S p i c e r e t a l . 1979) and room temperature ( H i r a k i , Shuto, Kim, Kawamura & Iwami 1977, H i r a k i , Kim, Kawamura & Iwami 1979) appear t o p r o v i d e s u f f i c i e n t energy f o r Au/III-V semiconductor r e a c t i o n s . I t has been observed t h a t t h e r e a c t i o n proceeds a t room temperature f o r Au c o n t a c t s on GaAs (Weizer & Fatemi 1988) and InP ( H i r a k i e t a l . 1979). H i r a k i e t a l . (1979) observed t h a t the indium was p r e f e r e n t i a l l y removed even d u r i n g g o l d d e p o s i t i o n . Wager & Van Vechten (1985) proposed t h a t a d e f e c t r e a c t i o n ->• Pj^'^ + Vp"*" + 3e" can convert Vj^j t o Pj^, g i v i n g r i s e t o deep l e v e l s a t - 0.09, 0.14 and 0.78 eV. As d e s c r i b e d above. Van Vechten & Wager (1985) suggested t h a t a p o s s i b l e source of d r a i n c u r r e n t d r i f t i s the r e a c t i o n Vjjj'Inp"^ +* Vp"*" + 4e". In the p r e s e n t work i t i s suggested t h a t the l o s s of indium d u r i n g e l e c t r o d e d e p o s i t i o n produced Vjj^ near the Au e l e c t r o d e s and t h a t the r e a c t i o n Vj^' ->• P^^'*' + Vp"^  + 3e" then caused the f o r m a t i o n of Pj_^. Wager & Van Vechten (1985) r e p o r t e d t h a t t h i s d e f e c t produces l e v e l s a t 0.78 and 0.09 eV, v a l u e s w i t h i n one s t a n d a r d d e v i a t i o n of the l e v e l s 0.83 and 0.09 eV which were observed i n the p r e s e n t work. T h i s r e a c t i o n would a l s o produce Vp, g i v i n g r i s e t o the l e v e l observed a t 0.88 ± 0.01 eV. Above 450K the d e p o s i t i o n of Au would p r e f e r e n t i a l l y remove phosphorus, and hence, presumably, produce Vp. Below 450K the p r e f e r e n t i a l removal o f indium, f o l l o w e d by the r e a c t i o n Wj^' P^^'*' + Vp"*" + 3e" would a l s o produce Vp. The i n t r o d u c t i o n of Vp by e i t h e r mechanism i n c r e a s e s the magnitude of the r e a c t i o n Vj^'IUp'^ ** Vp"^  + 4e", t h e r e b y i n c r e a s i n g the magnitude of d r i f t e f f e c t s . T h i s suggests t h a t Au-bearing metals be used with care i n IGFETs. I t may be advantageous t o i n c l u d e i n the m a t e r i a l t o be evaporated f o r the s o u r c e - d r a i n m e t a l l i z a t i o n , a metal which p r o v i d e s a b a r r i e r t o d i f f u s i o n of Au, In and P, thereby l i m i t i n g the extent of t h e r e a c t i o n of the Au with the s u b s t r a t e . The o b s e r v a t i o n t h a t s h o r t e r wavelength i l l u m i n a t i o n l e d t o an enhanced appearance of the deeper l e v e l s a t 0.83 and 0.88 eV, can a l s o be e x p l a i n e d as due t o the e x i s t e n c e of a b a r r i e r t o t r a p p i n g . The l a r g e r the excess of hv over Eg, the h i g h e r t h e k i n e t i c energy of the photo-induced c a r r i e r s . The s h o r t e r the wavelength of i l l u m i n a t i o n the more e n e r g e t i c the c a r r i e r s and t h e more t r a p p i n g i n l e v e l s which have b a r r i e r s . However, the 0.47 eV l e v e l was not enhanced by s h o r t e r wavelength i l l u m i n a t i o n . Moreover, the 0.83 and 0.88 eV l e v e l s d i d not appear a f t e r l o n g wavelength (935 nm) i l l u m i n a t i o n w i t h h i g h e r a p p l i e d v o l t a g e s . T h i s suggests t h a t the wavelength dependence of the 0.83 and 0.88 eV l e v e l s i s not due t o a b a r r i e r t h a t would cause f i e l d - e n h a n c e d t r a p p i n g f o r these l e v e l s . An a l t e r n a t i v e e x p l a n a t i o n i s t h a t the observed wavelength dependence was due t o a c o n c e n t r a t i o n of the deep l e v e l near the s u r f a c e where the s h o r t e r wavelength r a d i a t i o n was more s t r o n g l y absorbed. The o p t i c a l power, Z, i s absorbed as (Pankove 1971), Z = Zgexp (-ax) (12) where, a = 47rvkj,/c, (13) and V i s the frequency, and c i s the speed of l i g h t i n a vacuum. The complex r e f r a c t i v e index i s n - jk^.. The v a l u e f o r kj. was taken from the n e a r e s t e n t r y i n Séraphin & Bennet (1967) f o r the t h r e e c e n t r e wavelengths. T h i s gave 1/a = 0.13, 0.37 and 12.6 jum f o r the wavelengths 555, 780 and 935 nm. The 935nm LED can be c o n s i d e r e d t o p o p u l a t e b u l k l e v e l s as very l i t t l e of i t s energy w i l l be d i s s i p a t e d w i t h i n 1 /im of the s u r f a c e . The 780nm LED w i l l p redominantly populate l e v e l s w i t h i n about 1 /xm of the s u r f a c e . K u l i s c h & K a s s i n g (1987) observed t h a t a f t e r exposure o f the InP s u r f a c e t o temperatures g r e a t e r than about 200°C, l o s s of phosphorus was d e t e c t a b l e by SIMS. Since our samples were not heated above 100°C d i r e c t thermal d e g r a d a t i o n of the s u r f a c e i s u n l i k e l y . However, i t may be s i g n i f i c a n t t h a t the 0.88, 0.83 eV l e v e l s were d e t e c t e d with a sandwich s t r u c t u r e where the Au-In d e p o s i t i o n r e a c t i o n , d e s c r i b e d above, may have i n t r o d u c e d l e v e l s near the e l e c t r o d e s . The f a c t t h a t the l e v e l s were d e t e c t a b l e suggests t h a t they were prese n t over a range comparable t o the 1 /xm p e n e t r a t i o n depth of the s h o r t e r wavelength, 780 nm, i l l u m i n a t i o n . The depth a t which these l e v e l s were d e t e c t e d may i n d i c a t e t h a t the d e f e c t s r e s p o n s i b l e are mobile. I f so, then i n an IGFET they c o u l d be i n t r o d u c e d by Au-bearing s o u r c e / d r a i n m e t a l l i z a t i o n , and c o u l d m i g r a t e t o the gate r e g i o n , where they c o u l d p a r t i c i p a t e i n the d r a i n c u r r e n t d r i f t mechanism proposed by Van Vechten & Wager (1985). Rhee & Bhattacharya (1982) d e t e c t e d a l e v e l a t 0.68 eV i n InP:Fe which was not found i n the p r e s e n t work. As d e s c r i b e d by Look (1980) t h i s l e v e l corresponds t o the t r a n s i t i o n from the ground s t a t e of the Fe^"^ s t a t e t o the c o n d u c t i o n band. By comparison w i t h Look (1980) i t appears t h a t i n the p r e s e n t work the t r a n s i t i o n takes p l a c e i n two s t e p s ; from the ground s t a t e t o the e x c i t e d s t a t e of Fe^"^, with an a c t i v a t i o n energy of about 0.44 t o 0.47 eV, and from the e x c i t e d s t a t e t o the c o n d u c t i o n band, w i t h an a c t i v a t i o n energy of about 0.29 eV. CHAPTER 5. THE NEGATIVE TRANSIENT PHENOMENON IN GaAs AND InP I t was noted i n the pre v i o u s chapter t h a t OTCS was not a p p l i e d over a c e r t a i n temperature range because of t r a n s i e n t s which c o u l d not be d e s c r i b e d a c c u r a t e l y enough by e x p o n e n t i a l s . In the f i r s t p o r t i o n o f t h i s chapter r e s u l t s are p r e s e n t e d c o n c e r n i n g the ne g a t i v e t r a n s i e n t i n InP. In the second p o r t i o n of t h i s c h apter a model f o r the n e g a t i v e t r a n s i e n t i s developed and a p p l i e d t o GaAs. The n e g a t i v e t r a n s i e n t i n InP As d i s c u s s e d i n the pre v i o u s chapter, n e g a t i v e t r a n s i e n t s were encountered d u r i n g the OTCS measurements on InP. The n e g a t i v e t r a n s i e n t was s t r o n g l y f i e l d - d e p e n d e n t both as reg a r d s amplitude and the temperature range over which i t was observed. For example, u s i n g the 935nm LED on a sandwich-structure sample w i t h a b i a s of 12V, the n e g a t i v e t r a n s i e n t was j u s t n o t i c e a b l e a t 245K, but was not p r e s e n t a t 205K or 285K. Upon i n c r e a s i n g the b i a s t o lOOV, i t became s t r o n g e r a t 245K and was apparent even a t 325K. A t y p i c a l n e g a t i v e t r a n s i e n t i s shown i n F i g u r e 5.1. The n e g a t i v e t r a n s i e n t was a l s o d i f f e r e n t a c c o r d i n g t o which LED was used f o r i l l u m i n a t i o n . The 660nm LED had a s i m i l a r i n t e n s i t y t o t h a t of the 935nm LED but gave a s t r o n g e r t r a n s i e n t : the n e g a t i v e t r a n s i e n t being observable even a t 205K, The green LED, d e s p i t e the f a c t t h a t i t s i n t e n s i t y was about 50 times l e s s , gave a n e g a t i v e t r a n s i e n t of s i m i l a r magnitude t o t h a t produced by the 660nm LED. In other words, the s h o r t e r the wavelength the 12 n < I s t r o n g e r the n e g a t i v e t r a n s i e n t . Low frequency c u r r e n t o s c i l l a t i o n s (1 Hz t o 1 kHz) were found over the same temperature range as the negative t r a n s i e n t . They were found between 2 00 and 2 8 OK and they were o c o 8 -4 -0.05 0.45 0.95 Time (s) 1.45 s t r o n g e s t a t 245K. pigure 5.1: A n e g a t i v e t r a n s i e n t r e c o r d e d a t . ^. ^ 235K (5V, 555nm). T h i s a s s o c i a t i o n of o s c i l l a t i o n s and ne g a t i v e t r a n s i e n t s was noted w i t h both p l a n a r and sandwich s t r u c t u r e s . The o s c i l l a t i o n s tended t o appear a t h i g h e r b i a s v o l t a g e s . With 12V a p p l i e d a c r o s s the sandwich s t r u c t u r e samples the o s c i l l a t i o n s were b a r e l y d i s t i n g u i s h a b l e from th e n o i s e but a t lOOV they were comparable i n s i z e t o the n e g a t i v e t r a n s i e n t . F i g u r e 5.2 shows o s c i l l a t i o n s changing p r o g r e s s i v e l y i n c o n s e c u t i v e t r a n s i e n t s ( l a b e l l e d 1 t o 4), t o an i n i t i a l n e g a t i v e t r a n s i e n t f o l l o w e d by a low amplitude o s c i l l a t i o n . S i n c e the two phenomena are a s s o c i a t e d and the magnitudes of both s t r o n g l y dependent upon the average e l e c t r i c f i e l d , i t i s suggested here t h a t f i e l d - e n h a n c e d t r a p p i n g i s i n v o l v e d . As w i l l be d i s c u s s e d i n Chapter 7, o s c i l l a t i o n s are o f t e n a s s o c i a t e d w i t h f i e l d - e n h a n c e d t r a p p i n g . A model f o r the negative t r a n s i e n t In t he pres e n t s e c t i o n a model i s developed f o r n e g a t i v e t r a n s i e n t s t h a t allows the e x t e n s i o n of OTCS t o c o n d i t i o n s g i v i n g r i s e t o n e g a t i v e t r a n s i e n t s . The f i r s t model f o r the n e g a t i v e t r a n s i e n t was proposed by Hurtes e t a l . (1978) who showed t h a t r e c o m b i n a t i o n - g e n e r a t i o n c e n t r e s ( i . e . l o c a l i s e d s t a t e s which communicate w i t h both bands) i n the d e p l e t i o n l a y e r model c o u l d produce n e g a t i v e t r a n s i e n t s . As i n a r e v e r s e - b i a s e d pn j u n c t i o n c o n t a i n i n g such c e n t r e s (see f o r i n s t a n c e Sze 1981 p90), a steady c u r r e n t i s produced by c e n t r e s by the c a p t u r e of an e l e c t r o n from the valence band (producing a hole) and the e m i s s i o n of the e l e c t r o n t o the cond u c t i o n band. The times taken f o r each of these two steps are i n g e n e r a l d i f f e r e n t . Under i l l u m i n a t i o n an e l e c t r o n - h o l e plasma i s p r e s e n t and the occupancies of the c e n t r e s are determined by t h e i r capture c r o s s s e c t i o n s f o r e l e c t r o n s and h o l e s . I f the c e n t r e s are loaded by the l i g h t w i t h whichever c a r r i e r , h o l e or e l e c t r o n , i s r e l e a s e d more s l o w l y , then the i n i t i a l c u r r e n t i s lower than the f i n a l steady c u r r e n t u n t i l t h e occupancies r e t u r n t o t h e i r steady s t a t e v a l u e s . As shown by Hui, Kato, Backhouse & Young (1992) , the c o n d i t i o n s necessary f o r t h i s model t o apply are r e s t r i c t i v e , and the model cannot e x p l a i n t h e behaviour of the n e g a t i v e t r a n s i e n t w i t h s u r f a c e treatments and w i t h p o l a r i t y . 20 H <^  00 10 H o 0 -- - 1 0 ^ - 2 0 0 30 60 90 Time (10 " ^ s) 120 150 < C 20 00 10 H 1 O 0 ---.OH - 2 0 0 30 60 _2 90 Time (10 s 120 150 F i g u r e 5.2A: P r o g r e s s i v e changes i n s u c c e s s i v e t r a n s i e n t s (1 and 2). -20-] 1 1 \ \ 0 30 60 90 120 150 T ime ( 10 ^ s) F i g u r e 5.2B: P r o g r e s s i v e changes i n s u c c e s s i v e t r a n s i e n t s (3 and 4). The d e p l e t i o n l a y e r width i n compensated, s e m i - i n s u l a t i n g GaAs or InP i s much s m a l l e r than would be c a l c u l a t e d assuming net shallow doping equal t o the net c a r r i e r c o n c e n t r a t i o n because the deep c e n t r e s (EL2 f o r GaAs, Fe f o r InP) are i o n i s e d i n a r e v e r s e b i a s e d d e p l e t i o n r e g i o n . Because of t h i s i t cannot be expected t h a t the d e p l e t i o n r e g i o n would s o l e l y c o n t r o l the I-V r e l a t i o n , hence the much l a r g e r r e g i o n of undepleted s e m i - i n s u l a t i n g m a t e r i a l may p l a y a p a r t . In t h i s case, (Young, Tang, Dindo & Lowe 1986) , n e g a t i v e t r a n s i e n t s can be obtained with a n e u t r a l semiconductor model. The b a s i c assumption i n the n e u t r a l semiconductor model i s t h a t the c o n d u c t i o n process i n the undepleted r e g i o n i s governed by the c o n d i t i o n of e l e c t r o n e u t r a l i t y . T h i s corresponds t o c o n s i d e r i n g t h e m a t e r i a l t o be a " l i f e t i m e semiconductor" as d i s c u s s e d f o r i n s t a n c e by Henisch (1989, p21). To c o n s i d e r otherwise would g r e a t l y i n c r e a s e the complexity of the problem. Hence, n e g l e c t i n g h o l e s , i f the c o n c e n t r a t i o n of trapped e l e c t r o n s i n an n-type m a t e r i a l i s i n c r e a s e d by i l l u m i n a t i o n , then the c o n c e n t r a t i o n of f r e e e l e c t r o n s must be reduced, l e a d i n g t o a reduced c u r r e n t . The c u r r e n t then i n c r e a s e s as the s i t u a t i o n r e t u r n s t o the steady s t a t e dark c o n d i t i o n . Young e t a l . (1986) n e g l e c t e d r e t r a p p i n g f o r s i m p l i c i t y . In f a c t , f o r t h i s model, r e t r a p p i n g i s l e s s l i k e l y t o be n e g l i g i b l e compared t o r e l e a s e from t r a p s . A c a l c u l a t i o n i s now g i v e n which t a k e s r e t r a p p i n g i n t o account. Undoped s e m i - i n s u l a t i n g l i q u i d e n c a p s u l a t e d C z o c h r a l s k i GaAs normally has a r e s i s t i v i t y of about 10^ ohm-cm w i t h the Fermi l e v e l pinned c l o s e t o midgap, as n o r m a l l y assumed, by the n a t i v e d e f e c t , the deep donor EL2 whose c o n c e n t r a t i o n exceeds the excess of shallow a c c e p t o r s over s h a l l o w donors (but see von Bardeleben, Bourgoin & S t i e v e n a r d 1988). I t i s s l i g h t l y n-type (on the b a s i s of H a l l data - see Blakemore, Sargent, Tang & Swiggard 1989 f o r a r e c e n t a n a l y s i s ) . Thus, n e g l e c t i n g h o l e s , the e l e c t r o n e u t r a l i t y c o n d i t i o n i s : n-n^ = -NT(f-fo) (14) where n i s the c o n c e n t r a t i o n of e l e c t r o n s , N,j, i s the c o n c e n t r a t i o n of t r a p s and f i s the p r o b a b i l i t y of t h e i r o c c u p a t i o n w i t h s u b s c r i p t zero r e f e r r i n g t o the dark steady s t a t e . The c u r r e n t d e n s i t y i s g i v e n by J= q/xnE, where h o l e s may be n e g l e c t e d because of t h e i r r e l a t i v e l y low m o b i l i t y compared t o e l e c t r o n s , q i s the charge on the proton, ^ i s the m o b i l i t y (assumed constant) and E i s the f i e l d . U sing the Hall-Read-Shockley t r a p model (see Grove 1967, e q u a t i o n 5.34 page 132), dn/dt= -Nçp df/dt= -N^n(l-f)a^v + N^fe^, (15) where i s the capture c r o s s s e c t i o n of an empty t r a p f o r an e l e c t r o n , v i s the e l e c t r o n thermal v e l o c i t y and ej^ i s the r a t e of e m i s s i o n from a f u l l t r a p . Combining (14) and (15), t h i s g i v e s an e q u a t i o n of the form, d ( f - f o ) / d t = a ( f - f o ) + b ( f - f o ) 2 , (16) where, a = -a„v( NT(1 - fo) - no) - e^ and, (17) b = a^vN^ (18) w i t h a s o l u t i o n of, w i t h i n an a d d i t i v e c o n s t a n t , t = ( l / a ) l o g ( ( f - f o ) / ( a + b ( f - f o ) ) ) (19) or, f - f o = a/(b + e x p ( t / T ) ) (20) where, T = -1/a. The t r a n s i e n t i n the c u r r e n t d e n s i t y i s then, AJ= qM(n - no)E = q/xNT(fo - f ) E , (21) l e a d i n g t o a "modified e x p o n e n t i a l " of the form, AJ= K i / ( K 2 + e x p ( t / T ) ) (22) where K^^ and K2 are f i t t i n g parameters. F i g u r e 5.3 shows a t r a n s i e n t t o be analyzed. T h i s was o b t a i n e d w i t h a r i n g - d o t chromium e l e c t r o d e c o n f i g u r a t i o n ( o u t s i d e diameter 226 um, i n n e r 160 um) on undoped s e m i - i n s u l a t i n g l i q u i d e n c a p s u l a t e d C z o c h r a l s k i GaAs etched i n a s u l p h u r i c a c i d - p e r o x i d e m i xture b e f o r e d e p o s i t i o n of the e l e c t r o d e s . The t r a n s i e n t i s of the type which would g i v e t r o u b l e w i t h the boxcar method. I t would c l e a r l y r e q u i r e a t l e a s t t h r e e e x p o n e n t i a l terms t o be f i t t e d . In f a c t , f o u r were found t o be necessary t o reduce the r e s i d u a l s w i t h i n s t a t i s t i c a l s i g n i f i c a n c e . The f i t was even then of l i m i t e d q u a l i t y , as shown by the r e s i d u a l s i n F i g u r e 5.4(a) . The s u b s t i t u t i o n of a m o d i f i e d e x p o n e n t i a l term f o r any one o f the e x p o n e n t i a l terms whose amplitudes were p o s i t i v e was found t o g i v e no s i g n i f i c a n t improvement. However, th e s u b s t i t u t i o n of t h e m o d i f i e d e x p o n e n t i a l term f o r the e x p o n e n t i a l term w i t h the n e g a t i v e amplitude l e d t o a b e t t e r f i t , p r o d u c i n g the reduced r e s i d u a l s shown i n F i g u r e 5.4(b). The b e s t f i t e x p o n e n t i a l and m o d i f i e d f u n c t i o n curves f o r t h i s n e g ative t r a n s i e n t component are shown i n F i g u r e 5.5. Slopes of A r r h e n i u s p l o t s of the decay time 0 J I 1 1 1 1 « 1 0.0 0.4 0.8 1.2 Time (s) F i g u r e 5.3: Current t r a n s i e n t f o l l o w i n g 10s of i l l u m i n a t i o n w i t h 670nm LED a t 27C. The c u r r e n t w i t h the l i g h t on was 160nA. F i t t e d l i n e i s sum of 3 ex p o n e n t i a l s w i t h time c o n s t a n t s of 1.0, 5.2 and 84.1 ms, p l u s one m o d i f i e d term w i t h time c o n s t a n t 9.2ms. co n s t a n t s gave a c t i v a t i o n e n e r g i e s of about 0.8, 0.9 and 0.4 eV f o r the p o s i t i v e t r a n s i e n t s and 0.7 eV f o r the n e g a t i v e . The OTCS method of i n v e s t i g a t i n g deep l e v e l s i s a p o t e n t i a l l y v a l u a b l e t o o l f o r m a t e r i a l e v a l u a t i o n . I t i s hoped t h a t t h e p r e s e n t refinement w i l l a l l o w i t s use when n e g a t i v e t r a n s i e n t s are p r e s e n t . 0.0 0. 0.2 me s F i g u r e 5.4B: R e s i d u a l s ( f i t t e d curve l e s s e x p e r i m e n t al values) from f i t t i n g u s i n g 3 e x p o n e n t i a l s and 1 m o d i f i e d e x p o n e n t i a l . CHAPTER 6. COMPARISON OF THE ISOTHERMAL AND BOXCAR TECHNIQUES OF ANALYSIS OF PHOTOCURRENT TRANSIENTS The boxcar and the i s o t h e r m a l method were compared by a p p l y i n g them t o the same s e t of d i g i t i s e d t r a n s i e n t s , the boxcar a m p l i f i e r being s i m u l a t e d by software. GaAs samples were used as i n most work with OTCS. In the boxcar method, the l i g h t i n t e n s i t y i s normally assumed t o be l a r g e enough t o s a t u r a t e the t r a p occupancy or, i n the case of recombination-generation c e n t r e s t o l o a d them a c c o r d i n g t o t h e r a t i o of the capture c r o s s s e c t i o n s f o r h o l e s and e l e c t r o n s . Except i n v ery t h i n specimens, s a t u r a t i o n of t r a p s by photogenerated c a r r i e r s i s d i f f i c u l t with band gap l i g h t because of i t s s t r o n g a b s o r p t i o n . Because i t i s absorbed weakly, lower frequency l i g h t would need t o be v e r y i n t e n s e . Recapture of c a r r i e r s was n e g l e c t e d i n the d e p l e t i o n l a y e r model, because of the low c o n c e n t r a t i o n s of e l e c t r o n s and h o l e s expected i n a r e v e r s e b i a s e d d e p l e t i o n l a y e r . The o r i g i n a l "boxcar" method i s thus based on a p h y s i c a l model which was a p p r o p r i a t e t o very t h i n (iJ.m) sandwich specimens which were indeed used i n some of the e a r l y work. In most work i t has been a p p l i e d t o specimens of much l a r g e r dimensions, f o r which the c u r r e n t - v o l t a g e r e l a t i o n may be c o n t r o l l e d a t l e a s t i n p a r t by n e u t r a l semiconductor as opposed t o d e p l e t i o n l a y e r s under e l e c t r o d e s . C e r t a i n l y v a r i o u s d i f f i c u l t i e s have been encountered, p a r t i c u l a r l y i n accounting f o r n e g a t i v e t r a n s i e n t s as i n Abele e t a l . (1987), Young e t a l . (1986) and B l i g h t & Thomas (1989), With the boxcar method, i n order t o r e s o l v e any p a r t i c u l a r t r a p , the d i f f e r e n c e i n the s i g n a l due t o t h i s t r a p a t t-^ and t2 at the temperature a t which i t reaches a maximum must dominate the t r a n s i e n t and t h i s must occur i n the range of temperatures covered i n the experiment. Only i f the maximum i s r e s o l v e d can the time co n s t a n t of the decay be determined and hence A r r h e n i u s p l o t s be made. Experimental procedures Samples of undoped SI l i q u i d e ncapsulated C z o c h r a l s k i GaAs, were prepared by l i g h t l y e t c h i n g the a s - r e c e i v e d wafer and then d e p o s i t i n g 300 nm of chromium by c o n v e n t i o n a l e v a p o r a t i o n and l i f t -o f f . A r i n g - d o t s t r u c t u r e was used which c o n s i s t e d o f a l a r g e e l e c t r o d e w i t h c i r c u l a r h o l e s . W i t h i n each h o l e was p l a c e d a dot. The r a t i o o f the areas was about 1000. The i n n e r and out e r r a d i i were 160 and 226 /xm. The temperature range was r e s t r i c t e d by the problem of e x c e s s i v e dark c u r r e n t a t hig h temperatures and a n t i c i p a t e d c o m p l e x i t y i n the p h y s i c a l model a t lower temperatures d i s c u s s e d below. The data a c q u i s i t i o n and numerical procedures as d e s c r i b e d i n Chapter 4. The implementation of the boxcar method by David Hui i s g r a t e f u l l y acknowledged. T h i s implementation was by s e l e c t i n g from t h e d i g i t i s e d data readings corresponding t o times w i t h t^^ = 0.1, 0.2, .., 0.9, 1.0, 2.0, 3.0 ..,9, 10, 20, 30, .., 90, 100, 200, 300, 400 and 500 ms and t2 as c l o s e as p o s s i b l e t o 5t-^. R e s u l t s F i g u r e 6.1 shows r e p r e s e n t a t i v e boxcar p l o t s of i(tj^) -i ( t 2 ) vs temperature f o r t-^=l ms and tj^=2 ms w i t h t2=5t-L. P l o t s are g i v e n f o r both p o l a r i t i e s of a p p l i e d v o l t a g e . They are q u i t e d i f f e r e n t . Thus with the dot p o s i t i v e , two p o s i t i v e and two n e g a t i v e peaks were found. With the dot n e g a t i v e o n l y one p o s i t i v e peak was found and i t was very broad. emperatu re (K) 340 F i g u r e 6.1: Boxcar method: sample curves of I(tj^) - I(t2) vs T dot n e g a t i v e : • t2=lms , B t]^=2ms. dot p o s i t i v e : * tj^=lms,n t;L=2ms F i g u r e 6.2 shows a p l o t of the c u r r e n t f o l l o w i n g a p e r i o d of i l l u m i n a t i o n f o r the dot p o s i t i v e . T h i s p l o t i l l u s t r a t e s the case i n which the c u r r e n t i n c r e a s e s d u r i n g two separate p e r i o d s of time, i . e . two negative t r a n s i e n t s are pres e n t . C l e a r l y , i n the boxcar method the c h o i c e of t ^ and t2 would be c r i t i c a l . 100n 0-^ 1 I I ' 1 0.0 0.1 ^ 0.2 0.3 " i m e (s) F i g u r e 6.2: Current vs time, showing two r e g i o n s where the c u r r e n t i n c r e a s e s w i t h time. The temperature was 320K w i t h +7V a p p l i e d t o the dot. F i g u r e 6.3 shows the A r r h e n i u s p l o t s from both methods f o r t r a n s i e n t s w i t h the dot n e g a t i v e . Log T^T i s p l o t t e d vs 1/T. 6 n 1 000/T (1/K) F i g u r e 6.3: A r r h e n i u s p l o t s (trap s i g n a t u r e s ) . S o l i d symbols, i s o t h e r m a l method. Open symbols, boxcar. Dot n e g a t i v e (no n e g a t i v e t r a n s i e n t s present) An a n a l y s i s w i t h the " n e u t r a l semiconductor" model of Young e t a l . (1986) i n d i c a t e s t h a t above a c e r t a i n temperature f o r each t r a p s i g n a t u r e the A r r h e n i u s p l o t f o r a g i v e n l e v e l s h o u l d be l i n e a r and, as i n the d e p l e t i o n l a y e r model, the time c o n s t a n t r may be i d e n t i f i e d w i t h the time constant of the Shockley-Read-Hall e x p r e s s i o n (as i n Chapter 4) f o r r e l e a s e of a c a r r i e r (say, an e l e c t r o n ) from a t r a p . To l a b e l the t r a p s i g n a t u r e s the symbols of I or B are used t o r e p r e s e n t the r e s u l t s of the i s o t h e r m a l or boxcar method f o l l o w e d by N or p t o r e p r e s e n t negative or p o s i t i v e v o l t a g e s on the dot. In the i s o t h e r m a l method a "modified e x p o n e n t i a l " (as i n Backhouse, Hui St Young 1991a and as d e s c r i b e d i n Chapter 5) was sometimes f i t t e d t o the ne g a t i v e t r a n s i e n t . A t h i r d symbol, an E or an M was used t o i n d i c a t e whether an e x p o n e n t i a l or a m o d i f i e d e x p o n e n t i a l was f i t t e d t o the c o n t r i b u t i o n from t h i s l e v e l . When n e g a t i v e t r a n s i e n t s were present, an a d d i t i o n a l symbol (E or M) was used t o i n d i c a t e what type of e x p o n e n t i a l was used f o r f i t t i n g the n e g a t i v e t r a n s i e n t , s i n c e t h i s may a f f e c t the f i t of the other, non-negative t r a n s i e n t s . With t h i s p o l a r i t y , dot negative, no n e g a t i v e t r a n s i e n t s were p r e s e n t . The s i n g l e t r a p r e s o l v e d by the boxcar method, BNl, had an a c t i v a t i o n energy of about 0.86 eV. The i s o t h e r m a l method r e s o l v e d f i v e l e v e l s (INEl through 5) whose a c t i v a t i o n e n e r g i e s and ca p t u r e c r o s s - s e c t i o n s are g i v e n i n Table IV. The d a t a a t any one temperature were w e l l d e s c r i b e d by a s m a l l number ( u s u a l l y three) of simple e x p o n e n t i a l decays. The s t r o n g v a r i a t i o n w i t h temperature i n the amplitudes of the e x p o n e n t i a l s , as determined by the i s o t h e r m a l method and g i v e n i n Tab l e V, r e s u l t s i n a corresponding v a r i a t i o n i n the s t a t i s t i c a l u n c e r t a i n t i e s i n the estimates of the parameters d e s c r i b i n g t h a t l e v e l , i n d i c a t e d by the e r r o r bars i n F i g u r e s 6.3 and 6.4. F i g u r e 6.4 shows A r r h e n i u s p l o t s , o b t a i n e d by both methods, f o r t r a n s i e n t s obtained w i t h the other p o l a r i t y (dot p o s i t i v e ) . Both methods d e t e c t e d two ne g a t i v e t r a n s i e n t s (BPl, BP3, I P E E l and IPEE3). The boxcar method r e s o l v e d f o u r l e v e l s , the two n e g a t i v e t r a n s i e n t s w i t h e x c e s s i v e l y h i g h a c t i v a t i o n e n e r g i e s of 1.33 ( B P l ) , 1.24 eV (BP3) , the others w i t h more reasonable v a l u e s of 0.88 (BP4) and 0.82 eV (BP2). The i s o t h e r m a l method w i t h e x p o n e n t i a l model f u n c t i o n s r e s o l v e d l e v e l s a t 0.65, 0.72 and 0.79 eV f o r I P E E l , IPEE2 and IPEE3 r e s p e c t i v e l y , and i n d i c a t e d a d d i t i o n a l l e v e l s a t lower temperatures (Figure 6.4, Table I V ) . However, the f a s t e r n e g a t i v e t r a n s i e n t was p o o r l y d e s c r i b e d by an e x p o n e n t i a l i n t h a t the d i f f e r e n c e s between the f i t t e d curve and the experimental d a t a (the r e s i d u a l s ) i n the time p e r i o d where t h i s t r a n s i e n t dominated v a r i e d i n non-random manner with time. Even so, f o r times much l e s s o r much l a r g e r than the time constant of the n e g a t i v e t r a n s i e n t , the f i t was good enough t o allow other l e v e l s , which gave e x p o n e n t i a l c o n t r i b u t i o n s , t o be r e s o l v e d . The use of the m o d i f i e d e x p o n e n t i a l t o f i t the f a s t e r n e g a t i v e t r a n s i e n t (while s t i l l u s i n g e x p o n e n t i a l s t o d e s c r i b e t h e o t h e r components) l e d t o random r e s i d u a l s and b e t t e r r e s o l u t i o n of o t h e r l e v e l s . F i g u r e 6.5 shows such random r e s i d u a l s when one m o d i f i e d e x p o n e n t i a l and t h r e e e x p o n e n t i a l s were used t o f i t the t r a n s i e n t a t one p a r t i c u l a r temperature. The A r r h e n i u s p l o t s are g i v e n i n F i g u r e 6.6, which shows f i v e l e v e l s w i t h some a d d i t i o n a l p o o r l y determined l e v e l s a t lower temperatures. The a c t i v a t i o n e n e r g i e s of the w e l l r e s o l v e d l e v e l s were 0.64, 0.66, 0.73, 0.70, and 0.76 eV as shown i n T a b l e IV. The d e s c r i p t i o n of the data i n terms of model f u n c t i o n s appeared t o be unique i n t h a t v a r i o u s s t a r t i n g e s t i m a t e s which l e d t o convergence t o a s o l u t i o n and which produced random r e s i d u a l s . produced, w i t h i n the l i m i t s of parameter u n c e r t a i n t i e s , the same t r a p s i g n a t u r e s . D i s c u s s i o n A c a l c u l a t i o n based on the estimated c o n c e n t r a t i o n of EL2 suggests t h a t the specimens had a d e p l e t i o n r e g i o n of width about 3 nm l e a v i n g a n e u t r a l semiconductor r e g i o n of width about 60 jum, which seems t o support the suggestion t h a t some degree of c o n t r o l by the " n e u t r a l " semiconductor i s t o be expected. Other authors 1 0 0 0 / T ( 1 / K ) F i g u r e 6.4: As i n F i g u r e 6.3, but dot i s p o s i t i v e . S o l i d symbols, i s o t h e r m a l . Open, boxcar. IPE E l and IPEE3 are n e g a t i v e t r a n s i e n t s f i t t e d w i t h simple e x p o n e n t i a l s . For c l a r i t y , the e r r o r bars have been omitted on IPEE3. L e v e l E^^ CTjj^ Comments and (eV) (cm^) t e n t a t i v e i d e n t i f i c a t i o n Dot n e g a t i v e , e x p o n e n t i a l s f i t t e d : EL12 i n d i s t i n c t , E L 3 ? i n d i s t i n c t I NEl 0. 70 ± 0, 1 3x10' -13 INE2 0. 73 + 0. 03 4x10" •12 INE3 0. 76 ± 0. 2 3x10" -10 INE4 0. 36 INE5 0. 45 Dot p o s i t i v e , e x p o n e n t i a l s f i t t e d : I P E E l 0.64 ± 0.1 7x10"^^ EL2 (negative) IPEE2 0.72 ± 0.06 2x10"^^ EL12 IPEE3 0.79 3x10"^^ f a s t e r n e g a t i v e t r a n s i e n t Dot p o s i t i v e , m o d i f i e d e x p o n e n t i a l f i t t e d t o n e g a t i v e t r a n s i e n t : EL2 EB4 f a s t e r n e g a t i v e t r a n s i e n t i n d i s t i n c t , EL3? IPEMl 0. 64 ± 0. 12 6x10" •16 IPEM2 0. 66 + 0. 06 3x10" •14 IPEM3 0. 73 + 0. 02 3x10" •12 IPMM4 0. 70 + 0. 03 2x10" •12 IPEM5 0. 76 ± 0. 09 9x10" •11 T a b l e IV. Data on l e v e l s found by the i s o t h e r m a l method. As noted i n M i l n e s (1983), s i n c e a^^ i s a v a l u e e x t r a p o l a t e d t o T=oo, i t i s ve r y s e n s i t i v e t o e r r o r s i n E^^^. Temperature T (K) (ms) (lO-^A) f o r dot p o s i t i v e : I P E E l 340 162 0.15 320 851 0.17 IPEE2: 345 4.5 0.89 320 38 0.34 300 193 0.09 IPEMl: 350 84 0.1 320 870 0.17 IPEM2: 320 36 0.38 290 819 0.03 IPEM3: 345 4 0.89 300 193 0.09 f o r dot n e g a t i v e : I N E l : 350 2.2 0.09 295 225 0.01 INE2: 325 2.0 0.40 285 100 0.21 T a b l e V. Sample v a l u e s of the amplitude, and (amplitude.time constant) product, A^T 0.04 n < c 0.00 H CD Z) o •0.04 -Jp 0 100 200 300 400 Somnle Number F i g u r e 6.5: R e s i d u a l s from f i t by the i s o t h e r m a l method u s i n g m o d i f i e d e x p o n e n t i a l f o r f a s t e r n e g a t i v e t r a n s i e n t (IPMM4 of F i g u r e 6.6) and simple e x p o n e n t i a l s f o r the r e s t . The boundaries of the data compression r e g i o n s are a t samples 100 and 150. have used much wider e l e c t r o d e s e p a r a t i o n s (up t o 10 mm) . The p r e v i o u s l y r e p o r t e d dependence on e l e c t r o d e c o n f i g u r a t i o n (Young e t a l . 1986 and Fang, Shan, S c h l e s i n g e r & M i l n e s 1989) and the asymmetry r e p o r t e d above of the response on r e v e r s i n g v o l t a g e p o l a r i t y w i t h the r i n g dot s t r u c t u r e s are both i n apparent c o n t r a d i c t i o n with the d e p l e t i o n l a y e r - c o n t r o l model. The e x p l a n a t i o n of t h e p o l a r i t y dependence must presumably be sought i n the asymmetry of the e l e c t r i c f i e l d . The apparent absence of n e g a t i v e peaks i n the work of T i n , Teh and Weichman (1988) may be due t o lower f i e l d s brought about by v e r y wide e l e c t r o d e s e p a r a t i o n s . The requirement t h a t a t T j ^ , i n order t o be r e s o l v e d , the c o n t r i b u t i o n of a t r a p t o the t r a n s i e n t must dominate the t r a n s i e n t may e x p l a i n why w i t h the dot negative o n l y one t r a p was r e s o l v e d by the boxcar method. The width of the s i n g l e peak o b t a i n e d suggests i n f a c t t h a t s e v e r a l peaks had merged. The boxcar method with the dot p o s i t i v e , when n e g a t i v e t r a n s i e n t s were present, gave u n r e a l i s t i c a c t i v a t i o n e n e r g i e s f o r the n e g a t i v e t r a n s i e n t s . The t r a p s i g n a t u r e s as o b t a i n e d u s i n g the boxcar method i n F i g u r e s 6.3 and 6.4 were curved a t h i g h e r temperatures and the a c t i v a t i o n e n e r g i e s were o b t a i n e d by u s i n g o n l y the s t r a i g h t p o r t i o n s . Some of the e s t i m a t e d a c t i v a t i o n e n e r g i e s were s i m i l a r t o those from the i s o t h e r m a l method. Although t h i s may be a c c i d e n t a l , a mechanism i s o u t l i n e d below which suggests t h a t the boxcar method may sometimes g i v e a s m a l l e r r o r i n E^ ^^  w i t h a l a r g e e r r o r i n capture c r o s s s e c t i o n . The v a l i d i t y of the assumption of the boxcar method, t h a t the number of c a r r i e r s trapped i n a given l e v e l i s independent of the temperature, may be t e s t e d as f o l l o w s . I f the l e v e l g i v e s up a l l i t s t r a p p e d c a r r i e r s d u r i n g the t r a n s i e n t , then the i n t e g r a t e d t r a n s i e n t s i g n a l from t h a t l e v e l , which i s p r o p o r t i o n a l t o the number of c a r r i e r s t o be detrapped, should be c o n s t a n t . For an 6 n 1 H 1 1 1 1 1 1 1 n 1 1 2 .6 3.1 3 .6 1 0 0 0 / T ( 1 / K ) F i g u r e 6.6: As i n F i g u r e 6.4 except a m o d i f i e d e x p o n e n t i a l was used t o f i t the f a s t e r n e g ative t r a n s i e n t . e x p o n e n t i a l decay the i n t e g r a t e d s i g n a l i s , of course, j u s t the prod u c t of the amplitude and time c o n s t a n t . F i g u r e 6.7 shows amplitude.time products (obtained u s i n g the i s o t h e r m a l method) as a f u n c t i o n of temperature. Both p o l a r i t i e s a re i n c l u d e d . The r e g i o n s where the estimated u n c e r t a i n t i e s were l a r g e (shown by e r r o r bars i n F i g u r e s 6.3 and 6.6) are omitted f o r c l a r i t y . The pr o d u c t s v a r i e d by f a c t o r s r a n g i n g from f o u r t o more than t e n over the temperature range p l o t t e d . The separate v a l u e s of amplitude and time are g i v e n i n Table V. (These a l l o w the s e p a r a t e c o n t r i b u t i o n of the v a r i o u s l e v e l s t o the observed t r a n s i e n t s t o be estimated.) h < 1 -0 . 1 NE1 ta. ••a T3, 2 8 0 320 e m p e r a t u r e (K) 360 F i g u r e 6.7: The l o g of the amplitude.time c o n s t a n t product from T a b l e I I , i n u n i t s of 10"-'-° A-s vs T. Dashed l i n e s , dot n e g a t i v e . S o l i d l i n e s , dot p o s i t i v e . The e f f e c t o f the v a r i a t i o n i n the amplitude.time p r o d u c t s on the boxcar method i s t o d i s t o r t ( i n e f f e c t , t i l t ) the p l o t s of AX VS temperature. A g r e a t enough t i l t c o u l d e l i m i n a t e a maximum or minimum. Sm a l l e r t i l t s w i l l merely s h i f t T j ^ ^ , t he p r i n c i p a l r e s u l t b e i n g an e r r o r i n the estimate of the c a p t u r e c r o s s s e c t i o n . N umerical s i m u l a t i o n by D. Hui, of the boxcar method f o r GaAs w i t h a s i n g l e t r a p p r e s e n t with Ej^^ = 0.121 eV and a^^^ = 3.85 x 10"^^ citi^ (the e s t i mated v a l u e s f o r INE2), and the observed temperature dependence of the amplitude.time product f o r INE2, i n d i c a t e d t h a t the boxcar method would have gi v e n a t r a p s i g n a t u r e c o r r e s p o n d i n g t o an a c t i v a t i o n energy of 0.85 eV and a ca p t u r e c r o s s s e c t i o n o f 2 X 10"^ cm^ (with some cu r v a t u r e appearing a t the h i g h e r temperature end) . A c o r r e c t i o n f o r e r r o r s o f t h i s s i g n and amplitude would p l a c e BNl i n rough agreement w i t h INE2. A t e n t a t i v e i d e n t i f i c a t i o n of the observed l e v e l s w i t h o t h e r p u b l i s h e d data i s made i n Table IV. The range of a c t i v a t i o n e n e r g i e s observed was q u i t e s m a l l . T h i s i s because of the l i m i t e d temperature range d e s p i t e the r a t h e r long time p e r i o d o f o b s e r v a t i o n which was used. In M i l n e s ' (1983) c o l l e c t i o n of t r a p s i g n a t u r e s most e n t r i e s i n t h i s time and temperature range have e n e r g i e s of about 0.7 to 0.9 eV. The l i s t e d t r a p s i g n a t u r e o f EL3 and EL16 which are exceptions ( a c t i v a t i o n energy 0.575 and 0.37 eV) , both l i e i n a r e g i o n where the u n c e r t a i n t y i n the p r e s e n t data was l a r g e but one of the p r e s e n t l y observed l i n e s was thought t o be EL3. C o n c l u s i o n s The boxcar method i n i t s o r i g i n a l form encounters d i f f i c u l t i e s p a r t i c u l a r l y when the t r a n s i e n t c o n t a i n s non-exponential decays such as w i t h the negative t r a n s i e n t . I t i s a d v i s a b l e t o monitor the t r a n s i e n t s d u r i n g the measurements. In some cases a t l e a s t the amount of tr a p p e d charge i s not constant w i t h temperature. CHAPTER 7 DEEP LEVEL DOMAIN SPECTROSCOPY Barraud (1963) and Northrop, Thornton & T r e z i s e (1964) r e p o r t e d low frequency c u r r e n t o s c i l l a t i o n s i n GaAs under c o n d i t i o n s where an average e l e c t r i c f i e l d g r e a t e r than about 1 kV/cm was produced between two c o n t a c t s d e p o s i t e d on a h i g h -r e s i s t i v i t y s u b s t r a t e . R i d l e y (1966) showed t h a t i f the c a p t u r e c r o s s s e c t i o n of a deep l e v e l i n c r e a s e s w i t h e l e c t r i c f i e l d , so t h a t t r a p p i n g i s f i e l d - e n h a n c e d , t h i s may l e a d t o the f o r m a t i o n and p r o p a g a t i o n of h i g h - f i e l d domains where the formation, t r a n s i t and a r r i v a l of each domain g i v e s r i s e t o a p e r i o d i n the o s c i l l a t i o n . Sacks & M i l n e s (1970) computed the domain shape and v e l o c i t y and t h e e l e c t r i c f i e l d d i s t r i b u t i o n f o r these h i g h - f i e l d domains, and found t h a t , i n c o n t r a s t with Gunn domains, these domains had s p a t i a l l y symmetric charge d e n s i t i e s . Maracas, Johnson, Puechner, Edwards, Myhajlenko, Goronkin & T s u i (1989) confirmed the formation and movement of h i g h f i e l d domains i n GaAs by d i r e c t o b s e r v a t i o n u s i n g scanning e l e c t r o n microscopy. Kaminska, Parsey, Lagowski & Gatos (1982), Maracas, Johnson & Goronkin (1985a) and Maracas, Porod, Johnson & F e r r y (1985b) made A r r h e n i u s p l o t s of frequency vs 1/T f o r GaAs and o b t a i n e d an a c t i v a t i o n energy which they noted corresponded t o t h a t of EL2. Maracas e t a l . (1989) found from experimental r e s u l t s w i t h d i f f e r e n t sample lengths on GaAs t h a t t h e i r domain v e l o c i t i e s were about 10"2 cm/s. From M i l n e s (1973), f i e l d enhanced t r a p p i n g l e a d s t o domain v e l o c i t i e s of 1 t o 100 cm/s w h i l e i n t e r v a l l e y t r a n s f e r and the a c o u s t o e l e c t r i c e f f e c t g i v e h i g h e r v e l o c i t i e s . Maracas e t a l . (1989) found t h a t f o r samples s m a l l e r than lOO/Lim, the t r a n s i t time was n e g l i g i b l e , g i v i n g an observed o s c i l l a t i o n p e r i o d o f , ^n,p"^ = en,p-^ = Yn,p^n,pT^e^P(AE/kT) (23) where p i s the observed p e r i o d , e^ p the e m i s s i o n r a t e from t h e l e v e l , AE i s the energy d i f f e r e n c e from the l e v e l t o t h e v a l e n c e or c o n d u c t i o n band, T i s the temperature, k i s Boltzmann's const a n t , CTjj p i s the capture c r o s s s e c t i o n f o r e l e c t r o n s or h o l e s , and Yn,p i s a c o n s t a n t of p r o p o r t i o n a l i t y . Goronkin & Maracas (1984) used a rough v a l u e f o r y such t h a t T = l / ( 2 f Q s c ) , hence, y was g i v e n by, Yn,p'^ n,p'^ ^ « CTJIJP ^c. T h i s value was used f o r t h e p r e s e n t work. For t h e i r work wit h e l e c t r o d e s p a c i n g much l o n g e r than ISO/xm, Maracas e t a l . (1989) found t h a t the observed p e r i o d was dominated by the t r a n s i t time, hence the p e r i o d was g i v e n by L / V ^ ^ Q J^, where L i s the sample l e n g t h and V^^QJ^ i s the domain v e l o c i t y g i v e n by, Vdom = K i V ( E ) n (24) where n, the e l e c t r o n c o n c e n t r a t i o n i s , n = K2E„/C„ (25) where K^, K2 are constants of p r o p o r t i o n a l i t y , v i s the e l e c t r o n v e l o c i t y o u t s i d e the domain and i s the f i e l d - d e p e n d e n t capture r a t e . Goronkin & Maracas (1984) and Goronkin, Nguyen, Maracas & Johnson (1985) showed t h a t a n a l y s i s of the v a r i a t i o n w i t h temperature of the peak f r e q u e n c i e s gave i n f o r m a t i o n on capture c r o s s s e c t i o n s as w e l l as on a c t i v a t i o n e n e r g i e s of t r a p s i n GaAs and named the procedure deep l e v e l domain sp e c t r o s c o p y ( D L D S ) . F i e l d enhanced t r a p p i n g can occur when c a r r i e r s r e q u i r e energy t o overcome some form of b a r r i e r around a deep l e v e l b e f o r e i t can become trapped. The b a r r i e r can be coulombic, where a charge a t the deep l e v e l r e p e l s the c a r r i e r , due to p r e f e r e n t i a l t r a p p i n g from a h i g h e r energy sub-band or due t o phonon e f f e c t s e.g. where the capture of a c a r r i e r i s phonon a s s i s t e d (Meiners 1986, Kaminska e t a l . 1982). Maracas e t a l . (1985) showed t h a t impact i o n i z a t i o n c o u l d a l s o g i v e r i s e t o o s c i l l a t o r y behaviour, but e a r l i e r (Goronkin e t a l . 1984 and 1986, Maracas e t a l . 1985) and l a t e r (Maracas e t a l . 1989) work by t h e i r group c o n s i d e r s o n l y f i e l d - e n h a n c e d t r a p p i n g e f f e c t s . A c c o r d i n g t o M i l n e s (1973), i m p u r i t i e s deep i n the band gap, from 0.1 t o 0.5 eV can be i m p a c t - i o n i z e d by hot c a r r i e r s a t f i e l d s t r e n g t h s of 10-^  t o 10^ V/cm. S i n c e the s t r o n g e s t o s c i l l a t i o n s were observed a t f i e l d s t r e n g t h s below, as w e l l as i n , t h i s range of e l e c t r i c f i e l d , a t l e a s t the s t r o n g e s t o s c i l l a t i o n i s not due t o an impact i o n i z a t i o n p r o c e s s . R e l a t e d r e s u l t s have been observed w i t h GaAs metal semiconductor f i e l d e f f e c t t r a n s i s t o r s (MESFET). Thus, M c A l i s t e r , L i & Day (1991) found t h a t t h e i r o s c i l l a t i o n s were superimposed on a background of n o i s e which v a r i e d as f^l"^. The n o i s e was deduced t o o r i g i n a t e i n a t r a p - m o d i f i e d d i f f u s i o n p r o c e s s . Day, Trudeau, M c A l i s t e r & Kurd (1989) observed low frequency o s c i l l a t i o n s i n s e m i - i n s u l a t i n g GaAs and found a c t i v a t i o n e n e r g i e s i n agreement w i t h those determined by deep l e v e l t r a n s i e n t s p e c t r o s c o p y (DLTS). Day, Trudeau, M c A l i s t e r & Hurd (1988) noted t h a t t h e i r o s c i l l a t i o n s i n GaAs produced a p e r i o d i c t r i a n g u l a r - w a v e c u r r e n t waveform ( t h e r e f o r e r i c h i n harmonics) but a l s o suggested t h a t o s c i l l a t i o n s i n the occupancy of many t r a p s can occur s i m u l t a n e o u s l y . Day e t a l . (1989) found t h a t sometimes more than one fundamental frequency was p r e s e n t . In the p r e s e n t work low-frequency o s c i l l a t i o n s i n semi-i n s u l a t i n g InP:Fe were observed (Backhouse & Young 1991b) and the method of Goronkin & Maracas was used t o o b t a i n the a c t i v a t i o n energy of the l e v e l a s s o c i a t e d w i t h the s t r o n g e s t o s c i l l a t i o n (Backhouse, Samuilov & Young 1992a). In l a t e r work the method was improved by removing an estimate of the background and by a v e r a g i n g many s p e c t r a (Backhouse & Young 1992b). With InP, the m o b i l i t y , the a c c e p t o r and e l e c t r o n d e n s i t i e s are s i m i l a r t o those of GaAs, l e a d i n g t o s i m i l a r domain v e l o c i t i e s . However, without more accurate knowledge of the parameters n e c e s s a r y t o c a l c u l a t e the t r a n s i t time i n InP, i t i s not known whether the t r a n s i t time i s dominant or n e g l i g i b l e . I f dominant the observed p e r i o d w i l l be i n v e r s e l y p r o p o r t i o n a l t o e^ through (24). I f n e g l i g i b l e , the observed p e r i o d w i l l c o n t a i n e^ ^ through (23). E i t h e r case l e a d s t o s t r a i g h t l i n e s on A r r h e n i u s p l o t s of log(T^T) vs 1/T each of which d e f i n e s a t r a p s i g n a t u r e of an a c t i v a t i o n energy from the s l o p e , and a capture c r o s s s e c t i o n from the i n t e r c e p t . E xperimental procedures A sandwich s t r u c t u r e was f a b r i c a t e d by the same procedure as used i n the OTCS work of Chapter 4. The experimental arrangement was a l s o as i n Chapter 4. A constant 150V was a p p l i e d a c r o s s the sample, p r o d u c i n g an average e l e c t r i c f i e l d of 4.3 kV/cm which i s w e l l below the t h r e s h o l d f i e l d f o r the Gunn e f f e c t i n InP, 10.5 kV/cm (Sze 1981). The c u r r e n t was measured u s i n g a K e i t h l e y 427 c u r r e n t - t o - v o l t a g e a m p l i f i e r , the output of which was passed through a low-pass f i l t e r (T = 10 ms) t o the ADC/DAC board. D i r e c t memory access was used wi t h a sampling r a t e of 200 Hz, f o r 32,768 samples. The temperature was reduced from 295 t o 250K i n s t e p s of one degree. Method of a n a l y s i s of power s p e c t r a The s i g n a l was sampled at a f i x e d r a t e of 200 Hz. F i g u r e 7.1 shows examples of two seconds of data a t i n t e r v a l s of 5K. To a v o i d a l i a s i n g e f f e c t s (see f o r i n s t a n c e Press e t a l . 1988), which c o u l d i n t r o d u c e f a l s e peaks, f r e q u e n c i e s above the N y q u i s t frequency were removed u s i n g a low-pass f i l t e r . Slower sampling r a t e s were o b t a i n e d by s i m u l a t i n g i n software the e f f e c t of another low-pass f i l t e r . The power s p e c t r a were ob t a i n e d f o r s e t s of measurements by f i r s t a p p l y i n g a Welch window (see f o r i n s t a n c e P r e s s e t a l . 1988) and then u s i n g e i t h e r a maximum entropy method or a F o u r i e r t r a n s f o r m method. Accor d i n g t o Press e t a l . (1988) the maximum entropy method i s b e t t e r a b l e t o f i t sharp s p e c t r a l f e a t u r e s than th e F o u r i e r t r a n s f o r m method. The F o u r i e r t r a n s f o r m s p e c t r a c o n t a i n e d sharp peaks which i n c r e a s e d i n amplitude from the F i g u r e 7.1: C u r r e n t ( a r b i t r a r y u n i t s ) vs time, 295 (bottom) t o 250K (top) background l e v e l t y p i c a l l y by a f a c t o r of about t e n over about 1 Hz. The maximum entropy method with 160 p o l e s produced the same sharp peaks as the F o u r i e r method but the smoother s p e c t r a produced by the maximum entropy method were more s u i t a b l e f o r the automated e x t r a c t i o n o f peaks so t h i s method was used f o r a l l the a n a l y s i s . The F o u r i e r t r a n s f o r m method was used o n l y f o r comparison. F i g u r e 7.2 shows the o s c i l l a t i o n s a ppearing t o switch mode: the dominant o s c i l l a t i o n a t 1.5s was about 6 Hz, but a t 5s had s h i f t e d t o 4 Hz. T h i s mode s w i t c h i n g d i d not p r e s e r v e the phase, i . e . when the dominant o s c i l l a t i o n was aga i n 6 Hz i t was not i n phase w i t h the o r i g i n a l 6 Hz wave t r a i n . The broadening and weakening of the s p e c t r a l peaks i n t r o d u c e d by the l a c k of coherence was reduced by computing s p e c t r a from s e t s of 400 measurements, each s e t b e i n g l e s s l i k e l y t o c o n t a i n p h a s e - s h i f t s i n s t e a d of u s i n g a l l 32,768 measurements at once. To reduce the s p e c t r a l v a r i a n c e per data p o i n t (see Press e t a l . 1988 page 445) , each s e t was overlapped w i t h i t s neighbours by h a l f i t s l e n g t h , g i v i n g 163 s e t s . The s p e c t r a c a l c u l a t e d were averaged t o reduce the amplitude of random f l u c t u a t i o n s . With the same t o t a l number of p o i n t s used, the s p e c t r a indeed showed sharper peaks when the s e t s i z e was lower. As the s e t s i z e was decreased the frequency r e s o l u t i o n decreased: a s i z e of 400 measurements per s e t was chosen, r e s u l t i n g i n a frequency r e s o l u t i o n of 0.25 Hz. For the h i g h e s t r e s o l v a b l e frequency of 100 Hz, each s e t contained 200 p e r i o d s , r a t h e r than 16,384 had a l l the measurements been used a t once. The averaged s p e c t r a are shown i n F i g u r e 7.3 and c o n s i s t of a number of peaks superimposed on a smoothly v a r y i n g l / f - ^ / ^ background as found by M c A l i s t e r e t a l . (1991) f o r MESFETs. In order t o i d e n t i f y weaker peaks an estimate of the background was removed by s u b t r a c t i n g from each p o i n t the median v a l u e determined w i t h i n 5Hz of t h a t p o i n t . The median was used s i n c e i t was l e s s a f f e c t e d by the presence of nearby peaks than an average. The a n a l y s i s program e x t r a c t e d the l o c a l maxima and s o r t e d them i n order of amplitude, d i s c a r d i n g those w i t h amplitudes l e s s than t w i c e the standard d e v i a t i o n i n the background w i t h i n 5 Hz of t h a t frequency. The l a r g e s t t e n of the remaining maxima were p l o t t e d on the A r r h e n i u s p l o t of ln(T2/2fQsc) vs 1/T i n F i g u r e 7.4. F l u c t u a t i o n s i n the background aggravate the problem of i d e n t i f y i n g which l o c a l maxima 0 100 0 Hz 100 F i g u r e 7.3: Power s p e c t r a , log(power) ( a r b i t r a r y u n i t s ) vs f (Hz), from 252K t o 273K (top) on l e f t and from 274K t o 294K (top) on r i g h t . H o r i z o n t a l axes correspond t o f , from 0 t o 100 Hz. — 0.8 -| 1 1 1 1 1 1 1 1 1 1 1 1 1 1 3.3 3.5 3.7 3.9 1 0 0 0 / T ( 1 / K ) F i g u r e 7.4: A r r h e n i u s p l o t f o r the main o s c i l l a t i o n s , l a b e l s as i n T a b l e VI. are meaningful peaks but c e r t a i n l y maxima due t o random f l u c t u a t i o n s may be expected t o g i v e a s c a t t e r o f p o i n t s i n the A r r h e n i u s p l o t . R e s u l t s and d i s c u s s i o n F i g u r e 7.3 shows t h a t below 280K the amplitudes of the o s c i l l a t i o n s were much l a r g e r than the background but t h e r a t i o decreased as the temperature was i n c r e a s e d . F i g u r e 7.3 shows the peaks s h i f t i n g s y s t e m a t i c a l l y with temperature, c o r r e s p o n d i n g t o the A r r h e n i u s p l o t of F i g u r e 7.4. As a check, the t r a p parameters from the A r r h e n i u s p l o t were used t o c a l c u l a t e the o s c i l l a t i o n f r e q u e n c i e s a t each temperature. The c a l c u l a t e d o s c i l l a t i o n f r e q u e n c i e s are p l o t t e d on the power s p e c t r a (with b a s e l i n e s removed) i n F i g u r e 7.5. The 14 s p e c t r a l peaks which were d e t e c t e d are l i s t e d i n T a b l e V I . I t i s not proposed t h a t these 14 peaks correspond t o 14 d i f f e r e n t l e v e l s . As shown i n Table VI, a p a r t from one lone peak w i t h an a c t i v a t i o n energy of 0.3 0 eV, they c o u l d be grouped around 0.39, 0.41, 0.44 and 0.49 eV where i n each group the d i f f e r e n c e s i n a c t i v a t i o n e n e r g i e s were not s t a t i s t i c a l l y s i g n i f i c a n t . For example, the s t r o n g e s t two o s c i l l a t i o n s had a c t i v a t i o n e n e r g i e s 0.494 ± 0.003 and 0.507 ± 0.007 eV, w i t h the l a t t e r h a v ing a frequency r o u g h l y 3 times t h a t of the former. Goronkin & Maracas (1984) observed two s p e c t r a l peaks i n GaAs w i t h v e r y c l o s e a c t i v a t i o n e n e r g i e s (0.69 and 0.70 eV) and w i t h a frequency r a t i o o f about 3 and they a t t r i b u t e d these t o d i s t i n c t t r a p s which they i d e n t i f i e d as ELO and EL2. One a l t e r n a t i v e i s t h a t domains can be t r i g g e r e d a t more than one p o s i t i o n i n the specimen, and t h e r e f o r e have d i f f e r e n t t r a n s i t times, thus one type of t r a p c o u l d launch domains w i t h d i f f e r e n t f r e q u e n c i e s . The q u e s t i o n a r i s e s as t o D F A F i g u r e 7.5: Power s p e c t r a , b a s e l i n e s removed and w i t h o v e r l a y o f c a l c u l a t e d peak p o s i t i o n s . Axes as i n F i g . 7.3. whether the peaks i n each group are produced by t h e same l e v e l , each g i v i n g a fundamental frequency and harmonics governed by the same a c t i v a t i o n energy. On t h i s theory the s i n g l e peak w i t h an a c t i v a t i o n energy of 0.299 eV would be due t o a l e v e l which produced harmonics too weak t o d e t e c t . The o s c i l l a t o r y component of the c u r r e n t was about 1% of the average c u r r e n t , which suggests t h a t the excess v o l t a g e on one domain may not s u f f i c e t o i n h i b i t the f o r m a t i o n of more. Indeed Johnson (1989), u s i n g scanning e l e c t r o n microscopy observed the l a u n c h i n g of a second domain i n GaAs w h i l e the f i r s t was s t i l l i n t r a n s i t . I t seems u n l i k e l y t h a t a l l f i v e l e v e l s have the s p e c i a l p r o p e r t i e s needed t o produce domains. The most l i k e l y model (Day e t a l . 1988) i s t h a t the passage of a h i g h f i e l d domain produced by a s i n g l e t r a p c o u l d modify the occupancies of other t r a p s . The r e l a x a t i o n of the occupancy t o the s t e a d y - s t a t e c o u l d i n v o l v e the t h e r m a l l y a c t i v a t e d e m i s s i o n of c a r r i e r s w i t h a time constant T, w i t h accompanying modulation of t h e c o n d u c t i v i t y . The F o u r i e r t r a n s f o r m of the e x p o n e n t i a l decay would produce a peak a t f = 1/T, which would be governed by the a c t i v a t i o n energy of the c a r r i e r e m ission. The q u e s t i o n s then a r i s e , f i r s t , as t o p r e c i s e l y what mechanism causes the domain t o modify t r a p occupancy, and, secondly, which l e v e l i s the source of the t r i g g e r i n g domain. The l e v e l w i t h a c t i v a t i o n energy near 0.49 eV seems the most l i k e l y as the source of the domains s i n c e evidence was g i v e n i n e a r l i e r work (Chapter 4 and Backhouse & Young 1991a) t h a t i t p r e s e n t s a b a r r i e r t o c a p t u r e . I d e n t i f i c a t i o n of l e v e l s The s e m i - i n s u l a t i n g p r o p e r t y of InP i s thought t o be due t o Fermi l e v e l p i n n i n g by Fej^^, w i t h a Fe-^ "*" (d^) n e u t r a l s t a t e (Look L A B E L (eV) + <^ NA (cm2) ± % F (Hz) Group 1 P 0.480 0.019 4.7 X 10-15 217 56 1.0 A 0.494 0.003 1.1 X 10-14 114 72 1.3 G 0.512 0.009 5.0 X 10-14 149 153 2.7 C 0.507 0.007 4.7 X 10-14 138 178 3.2 J 0.502 0.027 7.5 X 10-14 346 351 6.3 Group 2 D 0.438 0.006 2.4 X 10-16 128 17 1.0 H 0.444 0.021 3.5 X 10-16 236 19 1.1 K 0.450 0.004 7.5 X 10-16 119 32 1.9 N 0.434 0.008 4.1 X 10-is 143 35 2.0 Group 3 F 0.414 0.016 1.1 X 10-16 193 22 1.0 E 0.417 0.011 1.4 X 10-16 160 25 1.1 Group 4 L 0.384 0.007 5.3 X 10-17 135 37 1.0 B 0.389 0.007 7.7 X 10-17 137 44 1.2 Group 5 M 0.299 0.012 1.9 X 10-19 162 5 1.0 R a t i o T a b l e VI. A c t i v a t i o n e n e r g i e s , capture c r o s s s e c t i o n s and t h e i r u n c e r t a i n t i e s f o r the peaks shown i n F i g . 7.3, arranged i n 5 groups, each c o n t a i n i n g peaks with s i m i l a r a c t i v a t i o n e n e r g i e s . Sample f r e q u e n c i e s are g i v e n and the r a t i o , R, of these t o the f i r s t frequency i s g i v e n . 1980, Lee, Chang & Meiners 1988). The ground s t a t e o f the Fe^"^ l e v e l (^E) was found t o be 0.68 eV by OTCS (Rhee & Bhattacharya 1982), and 0.66 eV by photoconductive measurements (Fung, N i c h o l a s & S t r a d l i n g 1979). Rhee & Bhattacharya claimed t h a t t h e Cr and Fe l e v e l s which they obtained from t r a n s i e n t and H a l l measurements were i n good agreement wi t h the v a l u e s o b t a i n e d from o t h e r techniques by p r e v i o u s authors and t h a t t h i s i n d i c a t e d t h a t t h e Fe l e v e l (0.68 eV) d i d not have a b a r r i e r t o capture. The absence i n the p r e s e n t work of any o s c i l l a t i o n s w i t h an a c t i v a t i o n energy of 0.68 eV c o r r o b o r a t e s t h i s . Takanohashi, Nakai & Nakajima (1988), u s i n g deep l e v e l t r a n s i e n t spectroscopy on n-type InP:Fe grown by metal o r g a n i c chemical vapour d e p o s i t i o n , found an e l e c t r o n t r a p w i t h an a c t i v a t i o n energy of 0.47 eV and which o c c u r r e d o n l y w i t h h i g h Fe content. The dominant s p e c t r a l peak of the p r e s e n t work was a t t r i b u t e d t o the same deep l e v e l as the 0.47 eV l e v e l of Takanohashi e t a l . on the b a s i s of i t s c l o s e n e s s of a c t i v a t i o n energy. In the p r e s e n t work the estimate of the a c t i v a t i o n energy of t h i s l e v e l i s 0.494 ± 0.003 eV. The l e v e l a t 0.299 eV may be due t o the t r a n s i t i o n from the e x c i t e d Fe^ "*" s t a t e t o the conduction band. Look (1980) p r e s e n t e d a band diagram f o r InP:Fe i n which the energy d i f f e r e n c e from (^T2) was 0.29 eV. In the OTCS work of Chapter 4 a l e v e l was found a t 0.28 eV whose s t r e n g t h suggests t h a t i t may have been F e - r e l a t e d . D r a i n c u r r e n t d r i f t A c c o r d i n g t o V i k t o r o v i t c h (1989), low-frequency excess n o i s e appears t o be r e l a t e d t o d r a i n c u r r e n t d r i f t i n InP FETs. In the p r e s e n t work i t was found t h a t some o s c i l l a t i o n s r i s e f a r above the background a t f r e q u e n c i e s w e l l i n t o the audio range. T h i s may i n t r o d u c e problems i n c i r c u i t designs u s i n g InP. Meiners (1986) suggested a mechanism f o r d r a i n c u r r e n t d r i f t i n which the bulk 0.68 eV l e v e l i n InP:Fe s l o w l y t r a p s c a r r i e r s and showed t h a t t h i s e x p l a i n e d the observed temperature dependence. Wager, Owen & Prasad (1987) d i s a g r e e d on the b a s i s t h a t t h e c a p t u r e c r o s s s e c t i o n r e q u i r e d f o r the Fe l e v e l would have t o be abnormally s m a l l i n o r d e r t o e x p l a i n the observed time dependence o f the d r i f t phenomenon. Lee, Chang & Meiners (1988) found t h a t the magnitude of the d r i f t i n c r e a s e d with the Fe content. Meiners (1986) suggested t h a t the F e - l e v e l may have a b a r r i e r t o capture which would l e a d t o a s m a l l capture c r o s s s e c t i o n . The evidence t h a t the 0.49 eV l e v e l o f the p r e s e n t work has a b a r r i e r t o capture, and a d e n s i t y which i s c o r r e l a t e d w i t h the Fe d e n s i t y and t h e r e f o r e meets the requirements of the d r i f t model proposed by Meiners - t h a t the l e v e l i n c r e a s e i n d e n s i t y w i t h Fe c o n t e n t and t h a t i t have a b a r r i e r t o c a p t u r e . The OTCS work of Chapter 4 was r e s t r i c t e d t o temperatures above 280K s i n c e below t h a t temperature the p h o t o c u r r e n t t r a n s i e n t s were dominated by a n e g a t i v e t r a n s i e n t i n which t h e c u r r e n t i n c r e a s e d a f t e r i l l u m i n a t i o n . Since t h i s phenomenon was s t r o n g l y f i e l d - d e p e n d e n t and was a s s o c i a t e d w i t h low-frequency o s c i l l a t i o n s i t was suggested t h a t both were due t o f i e l d - e n h a n c e d t r a p p i n g . In th e p r e s e n t work, as noted above, as the temperature was i n c r e a s e d beyond about 28OK the power s p e c t r a ( F i g u r e 7.3) c o n s i s t e d of s c a t t e r e d weak peaks, r a t h e r than the s t r o n g , smoothly changing peaks observed a t lower temperatures. T h i s seems t o i n d i c a t e t h a t above about 2 8 OK f i e l d enhanced t r a p p i n g e f f e c t s became l e s s s i g n i f i c a n t . CHAPTER 8. SUMMARY. CONCLUSIONS AND SUGGESTIONS FOR FUTURE WORK Met a l - i n s u l a t o r - s e m i c o n d u c t o r s t r u c t u r e s were e x p l o r e d by examining s e p a r a t e l y the components of the s t r u c t u r e : the b u l k m a t e r i a l , the i n t e r f a c e and the d i e l e c t r i c . Two d i e l e c t r i c s were s t u d i e d . F i r s t , s i l i c o n n i t r i d e l a y e r s were d e p o s i t e d on p-type InP u s i n g a remote plasma so as t o damage the s u b s t r a t e as l i t t l e as p o s s i b l e but these were found t o be u n s u i t a b l e . Secondly, n a t i v e oxides were grown under c o n d i t i o n s o f h i g h p r e s s u r e s o f oxygen, with v a r i o u s temperatures and under u l t r a v i o l e t i l l u m i n a t i o n . The type of n a t i v e oxide was deduced from the r e f r a c t i v e index of the l a y e r as determined by e l l i p s o m e t r y . The r e f r a c t i v e i n d i c e s and e l e c t r i c a l q u a l i t i e s of thermal o x i d e s i n d i c a t e t h a t the oxides are r i c h i n In203 and are hence u n s u i t a b l e f o r use i n an IGFET. Native oxides formed by the simultaneous exposure of the s u b s t r a t e t o oxygen and u l t r a v i o l e t l i g h t , appear t o c o n s i s t o f InP04. I t has been suggested ( f o r i n s t a n c e by Goodnick e t a l . 1984) t h a t InP04 i s s u i t a b l e f o r use i n an IGFET. Two methods were a p p l i e d t o study deep l e v e l s i n the SI s u b s t r a t e , OTCS and DLDS. OTCS was a p p l i e d t o c h a r a c t e r i s e the bulk m a t e r i a l u s i n g an " i s o t h e r m a l " method of a n a l y s i s which d i d not r e q u i r e some assumptions which are made i n the c o n v e n t i o n a l boxcar method of a n a l y s i s . Negative t r a n s i e n t s and low-frequency o s c i l l a t i o n s were observed f o r the f i r s t time i n InP. A l e v e l , thought t o be due t o Fe, d i s p l a y e d evidence of f i e l d - e n h a n c e d t r a p p i n g s u g g e s t i n g the presence of a b a r r i e r t o capture. A model was developed f o r the n e g a t i v e t r a n s i e n t based on proc e s s e s i n the n e u t r a l semiconductor. T h i s n o n - e x p o n e n t i a l model was found t o f i t the observed negative t r a n s i e n t s , a l l o w i n g the OTCS tec h n i q u e t o be a p p l i e d t o data c o n t a i n i n g them. The r e s u l t s of the " i s o t h e r m a l " method of a n a l y s i s i n d i c a t e d t h a t the assumptions made i n the c o n v e n t i o n a l boxcar method of a n a l y s i s were not s a t i s f i e d . A technique of depth p r o f i l i n g was developed by the use of d i f f e r e n t wavelengths of i l l u m i n a t i o n . The depth p r o f i l e s of some of the l e v e l s d e t e c t e d i n t h i s work suggested t h a t the r e a c t i o n of Au w i t h t h e s u b s t r a t e c r e a t e d d e f e c t s which l e a d t o d r a i n c u r r e n t d r i f t i n IGFETs. The technique of u s i n g low-frequency o s c i l l a t i o n s i n semiconductors f o r deep l e v e l s pectroscopy was improved by o b t a i n i n g data over a wider range of time than i n p r e v i o u s work w h i l e p r e v e n t i n g a l i a s i n g problems, by removing an e s t i m a t e of the s p e c t r a l background and by u s i n g an improved a l g o r i t h m f o r c a l c u l a t i n g the s p e c t r a when the o s c i l l a t i o n s a re of l i m i t e d coherence l e n g t h . T h i s technique was a p p l i e d f o r the f i r s t time t o InP. Fourteen s p e c t r a l peaks were found whose a c t i v a t i o n e n e r g i e s l a y i n 5 groups c e n t r e d about 0.3, 0.39, 0.41, 0.44 and 0.49 eV. I t i s suggested t h a t these groups r e p r e s e n t the c o n t r i b u t i o n s o f 5 d i f f e r e n t l e v e l s . The s t r o n g e s t o s c i l l a t i o n appears t o be due t o a l e v e l t h a t i s due t o Fe, the same l e v e l which d i s p l a y e d f i e l d -enhanced t r a p p i n g behaviour i n the OTCS study. S i n c e the frequency of these o s c i l l a t i o n s extends i n t o the audio range, such o s c i l l a t i o n s are of importance t o c i r c u i t d e s i g n e r s . T h i s Fe-r e l a t e d l e v e l may be r e s p o n s i b l e f o r d r i f t f o l l o w i n g the model of Meiners (1986). Future work The r e s u l t s of t h i s work suggest t h a t i t may be p o s s i b l e t o b u i l d a s t a b l e InP IGFET by e l i m i n a t i n g the t h r e e p o s s i b l e sources of d r i f t which were encountered i n the p r e s e n t work. The exposure of the s u b s t r a t e t o oxygen and deep u l t r a v i o l e t r a d i a t i o n may a l l o w the formation of n a t i v e o x i d e s s u i t a b l e f o r use as d i e l e c t r i c s . The use of m e t a l l i z a t i o n s which do not c o n t a i n Au, or a l t e r n a t i v e l y the use of a d i f f u s i o n b a r r i e r , would prevent t h e r e a c t i o n of the Au w i t h the s u b s t r a t e . T h i s would i n t u r n prevent the f o r m a t i o n of d e f e c t s i n the bulk m a t e r i a l t h a t may produce d r i f t e f f e c t s . There are s e v e r a l approaches by which i t may be p o s s i b l e t o e l i m i n a t e the d r i f t due t o the F e - r e l a t e d l e v e l , i ) An improved knowledge of the field-dependence of the t r a p p i n g of t h i s l e v e l may a l l o w s t a b l e IGFETs t o be b u i l t w i t h geometries designed t o suppress o s c i l l a t i o n s and d r i f t , perhaps by a v o i d i n g having e l e c t r i c f i e l d s l a r g e r than the c r i t i c a l f i e l d f o r o s c i l l a t i o n s , i i ) New s e m i - i n s u l a t i n g s u b s t r a t e s are b e i n g produced wi t h t r a n s i t i o n metals other than Fe, f o r i n s t a n c e T i (Wolf, K r o s t , R e i e r , Harde, Kuhl, Hieronymi, U l l r i c h , Bimberg & Schumann 1990) . These may not c o n t a i n l e v e l s t h a t can produce d r i f t , i i i ) The F e - r e l a t e d l e v e l t h a t produces d r i f t may not be a necessary consequence of doping InP w i t h Fe. Takanohashi e t a l . (1988) found t h a t the l e v e l i n q u e s t i o n appeared when the Fe c o n c e n t r a t i o n exceeded the s o l u b i l i t y l i m i t . T h i s suggests t h a t s e m i - i n s u l a t i n g InP:Fe may be f r e e o f d r i f t e f f e c t s i f the Fe c o n c e n t r a t i o n i s kept low. REFERENCES Abele J , Kreiiier R and Blakemore J (1987) J . A p p l . Phys. 62 2432 - 2438 Ai z e n b e r g I, Dubonos S and Kopezky Ch. (1986) I n s u l a t i n g F i l m s on Semiconductors, page 245 Simonne and Buxo ( e d i t o r s ) , North-Holland d e l Alamo J A and M i z u t a n i T (1987) J . Appl. Phys. 62 3456 Antreasyan A, G a r b i n s k i P, Mattera, Temkin H and Abeles J , (1987), Appl. Phys. L e t t . 51 1097 Azzam R and Bashara N (1977) i n " E l l i p s o m e t r y and P o l a r i z e d L i g h t " N o r t h - H o l l a n d Backhouse C, Hui D and Young L (1991a) J . Electrochem. Soc. 138 L32 - L34 Backhouse C and Young L (1991b) J . Electrochem. Soc. 138 3759 - 3765 Backhouse C, Samuilov V and Young L t o appear i n Appl. Phys. L e t t . (June 1992a) Backhouse C and Young L (1992b) t o appear i n S o l i d - s t a t e E l e c . (1992) von Bardeleben H, Bourgoin J and S t i e v e n a r d D (1988) Ap p l . Phys. L e t t . 53 1089 Barraud A (1963) Compte Rendus de L'Académie des S c i e n c e s 17 3632 B a r t e l s and Monch (1984) S u r f . S c i . 143 315 B e r g i g n a t E and H o l l i n g e r G (1987) S u r f . S c i . 189/190 353 - 361 Bhattacharya R, Shen H, Parayanthal P, P o l l a k F, C o u t t s T and Aharoni H (1987) S o l a r C e l l s 21 371 Blakemore J , Sargent L, Tang R and Swiggard E, (1989) Ap p l . Phys. L e t t . 54 2106 Blanchet R, V i k t o r o v i t c h P, Chave J and S a n t i n e l l i C (1985) Ap p l . Phys. L e t t . 46 761 B l i g h t S and Thomas H (1989) J . Appl. Phys. 65 215 - 226 Bottka N, G a s k i l l D, S i l l m o n R, Henry R and G l o s s e r R (1988) J . E l e c t r o n . Mat. 17 161 Callaway J , Phys. Rev. 134 A998 (1964) Cheng J , F o r r e s t S, T e l l B, W i l t D, Schwartz B and Wright P (1985) J . A p p l . Phys 58 1780 Day D, Trudeau M, M c A l i s t e r S and Hurd C (1988) Ap p l . Phys. L e t t . 52 2034 Day D, Trudeau M, M c A l i s t e r S and Hurd C (1989) Can. J . Phys. 67 238 D i s c h l e r B and Kaufmann U (1988) Revue Phys. A p p l . 23. 779-791 Eberspacher C, Fahrenbruch A and Bube R (1985) J . A p p l . Phys. 58 1876 E l i a s K R, Mahajan S, Bauer C L, Mil n e s A G, Bonner W A (1987) J . A p p l . Phys. 62 1245 Engstrom O and Aim A (1978) S o l i d - s t a t e E l e c t r o n i c s 21 1571 - 1576 Fang Z, Shan L, S c h l e s i n g e r T and Mil n e s A (1989) S o l i d - s t a t e E l e c t r o n i c s 32. 405 - 411 F a t h i p o u r M, Boyer P, C o l l i n s G and Wilmsen C (1985) J . A p p l . Phys. 57 637 Fenstermaker C A and McCrackin F L (1969) S u r f . S c i . 16 85-96 F o r n a r i R and Kumar J (1990) Appl. Phys. L e t t . 56 638 - 640 F r i t z s c h e D (1980) I n s t . Phys. Conf. Ser. 50 258 Fukuda M and Takahei K (1985) J . Appl. Phys. 57 129 Fung S, N i c h o l a s R and S t r a d l i n g R (1979) J . Phys. C 12 5145 Gardner P, Narayan S, L i u S, B e c h t l e D, Bibby T, Capewell D and C o l v i n S (1987), IEEE E l e c t r . Dev. L e t t . 8 45 Gleason K R, D i e t r i c h H B, Bark M L and Henry R L (1978) E l e c t r o n i c s L e t t . 14 643 Gleason K R, D i e t r i c h H B, Henry R L, Cohen E D and Bark M L (1978b) Appl. Phys. L e t t . 32 578 Goodman C E, Wessels B W and Ang P, (1984) A p p l . Phys. L e t t . 45 442 Goodnick S, Hwang T and Wilmsen C (1984) A p p l . Phys. L e t t 44 453 Goronkin H and Maracas G (1984) lEDM Conference Proceedings, Dec. 1984, pl82 Goronkin H, Nguyen R, Maracas G and Johnson D (1985) I n s t . Phys. Conf. Ser. No. 79, 235 Grove A (1967) " P h y s i c s and Technology of Semiconductor D e v i c e s " John Wiley, New York Hasegawa H and Sawada T (1982) J . Vac. S c i . Tech. 21 457 H a y f i e l d P and White G (1963) i n " E l l i p s o m e t r y i n the Measurement of S u r f a c e s and T h i n F i l m s " Eds. P a s s a g l i a E, Stromberg R and Kruger J , (U.S.) N a t l . Bur. Std. Misc. Publ. 256 Henisch H K (1989) i n "Semiconductor Contacts" Oxford Science P u b l i c a t i o n s , Clarendon Press, Oxford H i r a k i A, Shuto K, Kim S, Kawamura W and Iwami M (1977) Ap p l . Phys. L e t t . 31 611 H i r a k i A, Kim S, Kawamura W and Iwami M (1979) S u r f . S c i . 86 706 Hirayama Y, Park H, Koshiga F and Sugano (1982) Ap p l . Phys. L e t t . 40 712 H i r o t a Y, H i s a k i T and Mikami 0 (1985) E l e c t r o n i c s L e t t . 21 690 Hoflund G and C o r a l l o C (1986) Su r f a c e and I n t e r f a c e A n a l y s i s 9 319 - 323 H o l l i n g e r G, Hughes G, Himpsel F, Jordan J , Morar J and Houzay F (1986) S u r f . S c i . 168 617 - 625 Hui D, Kato H, Backhouse C and Young L (1992) t o be p u b l i s h e d J . E l e c t r o n . Mat. (June) Hurtes C, Boulou M, Mittoneau A and Bo i s D (1978) A p p l . Phys. L e t t . 32 821 - 823 H o l l i n g e r G, Joseph J , Robach Y, B e r g i g n a t E, Commere B, V i k t o r o v i c h P and Froment M (1987) J . Vac. S c i . Technol. B5 1108 I l l i a d i s A A, L a i h S C and M a r t i n E A (1989) A p p l . Phys. L e t t . 54 1436 Ingrey S, Lau L, M c i n t y r e and Sodhi R (1987) J . Vac. S c i . Technol. A5 1621 I n u i s h i M and Wessels B W (1983) T h i n S o l i d F i l m s 103 141 Johnson D A, PhD T h e s i s , A r i z o n a S t a t e U n i v e r s i t y (1989) K a l i n u s h k i n V, Murin D, Murina T, Prokhorov A, Radautsan S, T i g i n y a n u I, Yuryev V (1988) page 153 5th Conference on S e m i - I n s u l a t i n g I I I - V M a t e r i a l s , Malmo K a l n i t s k y A, Tay S P, E l l u l J P, Chongsawangvirod S, Andrews J W, and Irene E A (1990) J . Electrochem. Soc. 137 234-238 Kaminska M, Parsey J , Lagowski J and Gatos H (1982) A p p l . Phys. L e t t . 41 989 Kaminski P and Thomas H (1990) A c t a P h y s i c a P o l o n i c a A77 87 Kasahara K, Susimoto M and Nomura N (1983) E l e c t r o n i c s L e t t . 19 905 Kazmerski L, I r e l a n d P, Sheldon P, Chu T, Chu S, and L i n C (1980) J . Vac. S c i . Tech. 217 1061 Ke l d y s h L V (1965) Sov. Phys. JETP 20 1307 Kobayashi T, Okamura M, Yamaguchi E, Shinoda Y and H i r o t a Y (1981) J . A p p l . Phys. 52 6434 - 6436 Koren U, Yu K L, Chen T, Bar-Chaim N, M a r g a l i t S and Y a r i v A (1982) A p p l . Phys. L e t t . 40 643 K u l i s c h W and K a s s i n g R (1987) J . Vac. S c i . Tech. B5 523 Lang D (1974) J . Appl. Phys. 45 3023 - 3032 Lau W M (1989) Appl. Phys. L e t t . 54 338 Lee P Z, Chang H L and Meiners L G (1988) J . A p p l . Phys. 63 5694 L i l e D L, C o l l i n s D A, Meiners L G, and Messick L (1978) E l e c t r o n . L e t t . 14 657-659 L i l e D and T a y l o r M (1983) J . Appl. Phys. 54 260 L i l e D (1986) i n " I n s u l a t i n g F i l m s on Semiconductors", p57 Simonne J , Buxo J . eds, E l s e v i o u r Science P u b l i s h e r s (North Holland) L e v i n s o n M, Benton J L, Temkin H and K i m e r l i n g L C (1982) Ap p l . Phys. L e t t . 40 990 L i u X, Denker M S and Irene E A (1992) J . Electrochem. Soc. 139 799-802 Look D C, S o l . S t a t e Comm. 33 237 (1980) Lucovsky G (1981) J . Vac. S c i . Technol. 19 456 Luo J , Kimura T, Yugo S and Adachi Y (1987) Japan. J . Appl. Phys. 26 582 Maracas G, Johnson D and Goronkin H (1985a) Ap p l . Phys. L e t t . 46 3 05 Maracas G, Porod W, Johnson D and F e r r y D (1985b) P h y s i c a 134B 276 - 280 Maracas G, Johnson D, Puechner R, Edwards J , Myhajlenko S, Goronkin H and T s u i R, (1989) S o l i d - s t a t e E l e c t r o n . 32 1887 M a r t i n G and B o i s D (1978) "Semiconductor C h a r a c t e r i z a t i o n Techniques" Barnes P and Rozgonyi G, E d t r s , 32 - 43 The Electrochem. Soc. Softbound Proceedings S e r i e s , P r i n c e t o n , New J e r s e y M c A l i s t e r S, L i Z and Day D (1991) Can. J . Phys. 69 207 McCrackin F, P a s s a g l i a E, Stromberg R and S t e i n b e r g H (1963) J . o f Research of N a t i o n a l Bureau of Standards A. Phys. and Chem. 67A 363 - 377 McKinnon G, Backhouse C and K a l a n t a r A (1985) I n t . J . Chem. K i n e t i c s 17 655 Meiners L G (1985) page 213 i n "P h y s i c s and Chemistry of II I - V Compound Semiconductors" Ed. Wilmsen C W, Plenum Press, New York Meiners L G (1986) J . Electrochem. Soc. 133 372 Messick L J (1984) IEEE Trans. E l e c t r o n . Dev. ED-31 763 Meyer F and Bootsma (1969) Surf. S c i . 16 221 M i l n e s A (1973) i n "Deep I m p u r i t i e s i n Semiconductors" W i l e y - I n t e r s c i e n c e , New York M i l n e s A (1983) Advances i n E l e c t r o n i c s and E l e c t r o n P h y s i c s 61 63 - 160 Monch W (1986) Su r f . S c i . 168 577 - 593 Morimoto J , Ki d a T, M i k i Y and Miyakawa T (1986) Ap p l . Phys. A 39 197 Nelson A, Geib K and Wilmsen C (1983) J . A p p l . Phys. 54 4134 N i c h o l a s D, A l l s o p p D, Hamilton B and Peaker A (1984) J , C r y S t . Growth 68 326 Northrop D C, Thornton P R and T r e z i s e K, (1964) S o l . S t a t e E l e c t r . 7 17 Okamura M and Kobayashi T (1980) Japan. J . Appl. Phys. 19 2151 Pande K P and N a i r V K R (1984) J . Appl. Phys. 55 3109 Pande K P, N a i r V K R and Aina 0 (1984) Appl. Phys. L e t t . 45 532 Pande K and G u i t i e r r e z D (1985) Appl. Phys. L e t t . 46 416 Pande K P and G u t i e r r e z D (1985b) S o l i d - s t a t e E l e c t r o n i c s 28 1045 - 1048 Pande K, F a t h i m u l l a M, G u t i e r r e z D and Messick L (1986) E l e c t r o n . Dev. L e t t . 7 407 Pankove J (1971) i n " O p t i c a l Processes i n Semiconductors", Dover p72, p87 Pham V, Esteve D, F a r r e J , E l Mahdy A, Ronda M and Simonne J (1987) A p p l . S u r f . S c i . 30 83 - 88 P r e s s W H, F l a n n e r y B F, Teukolsky S A and V e t t e r l i n g W T (1988) Numerical Recipes p23, p509, Cambridge U n i v e r s i t y Press, Cambridge Pudensi M, Mohammed K, Merz J , Kasemset D, Hess K (1985) J . A p p l . Phys. 57 2788 Rhee J K, and Bhattacharya P K (1982) J . App. Phys. 53 4247 R i d l e y B K (1966) B r i t . J . App. Phys. 17 595 Robach, Joseph, Bergignat and H o l l i n g e r (1989) J . Electrochem. Soc. 136 2957 Sacks H K, and M i l n e s A G (1970) I n s t . J . E l e c t r o n . 30 49 Saunier P, Nguyen R, Messick L and Khatibzadeh M (1990) IEEE E l e c t r o n . Dev. L e t t . EDL-11 48-49 S a u t r e u i l B, V i k t o r o v i t c h P and Blanchet R (1984) I n s t . Phys. Conf. Ser. 74 575 Sawada T and Hasegawa H (1982) E l e c t r o n i c s L e t t . 18. 742 Sawada T, Hasegawa H, Ohno H (1983) T h i n S o l i d F i l m s 103 107 Sawada T, I t a g a k i S, Hasegawa H and Ohno H (1984) IEEE Trans. E l e c t r o n . Dev. ED-31 1038 Schwartz G, Sunder W and G r i f f i t h s J (1982) J . Electrochem. Soc. 129 1361 Schmidt M, P o d l e s n i k D, Evans H, Yu C, Yang E and Osgood R (1988) J . Vac. S c i . Technol. A6 1446 Séraphin B O and Bennet H E (1967) Semiconductors and Semimetals, V o l . 3 Academic Press, eds W i l l a r d s o n and Beer p499 S e r r e z e H, Schachter R, Olego D and V i s c o g l i o s i M (1987) IEEE Trans. E l e c t r o n . Dev. ED-34 931 S i v u k h i n D V (1956) Sov. Phys. JETP 3 269 Smith D, PhD T h e s i s , The U n i v e r s i t y of B r i t i s h Columbia (1980) S p i c e r W E, Chye P W, Skeath P R , Su C Y and Lindau I (1979) J . Vac. S c i . Technol. 16 1422 S p i c e r W E, Lindau I, P i a n e t t a P, Chye P and Garner C (1979b) T h i n S o l i d F i l m s 56 1 van Staa P, Romlach H and Ka s s i n g R (1983) J . A p p l . Phys. 54 4014 Strachan C S, (1933) Proc. Camb. P h i l . Soc. 29 116 Sze S M (1981) i n " P h y s i c s of Semiconductor Devices", page 649 Second e d i t i o n , W i l e y - I n t e r s c i e n c e , New York Takanohashi T, Nakai K and Nakajima K (1988) Jap. J . App. Phys. 22 L113 Temkin H, Dutt B V and Bonner W A (1981) A p p l . Phys. L e t t . 38 431 Terman L (1962) S o l i d - S t a t e E l e c t r o n . 5 285 T i n C, Teh C, and Weichman F (1988) J . Appl. Phys. 63 355 - 359 T i n C, Barnes P A, Neely W (1988b) Appl. Phys. L e t t . 53 1940 T i n C and Barnes P A (1989) J . Appl. Phys, 66 223 Tseng W F, Bark M L, D i e t r i c h H B, C h r i s t o u A, Henry R L, Schmidt W A and Saks N S (1981) lEDM 81 111 Van Vechten J A and Wager J F (1985) J . App. Phys. 57 1956 V i g (1985) J . Vac. S c i . Technol. A3 1027 V i k t o r o v i c h P (1989) J . Electrochem. Soc. 136 1431 Vo g l P (1981) Festkorperprobleme XXI, Treusch (ed.) 191 Wada O (1985) J . Appl. Phys. 57 1901 Wager J and Wilmsen C (1980) J . Appl. Phys. 51 812 Wager J , E l l s w o r t h D, Goodnick S and Wilmsen C (1981) J . Vac. Sc. Technol. 19 513 Wager J , Geib K, Wilmsen C and Kazmerski L (1983) J . Vac. S c i . Technol. B l 778 Wager J F and Van Vechten J A (1985) Phys. Rev. B 32 5251 Wager J , Owen S and Prasad S (1987) J . Electrochem. Soc. 134 160 Weizer V G and Fatemi N S (1988) J . App. Phys. 64 4618 White A M, Day B and Grant A J (1979) J . Phys. C 12 4833 Wieder H H (1983) IEEE E l e c t r o n . Dev. L e t t . EDL-4 108 Wilmsen C (1975) CRC C r i t . Rev. S o l i d S t a t e 5 313 wilmsen C, Wager J , Geib K, Hwang T and F a t h i p o u r M (198 3) T h i n S o l i d F i l m s 103 47 - 52 Wilmsen C, Geib K and Gann R (1985) J . Vac. S c i . Technol. B3 1103 Wolf T, K r o s t A, R e i e r F, Harde P, Kuhl D, Hieronymi F, U l l r i c h H, Bimberg D and Schumann H (1990) Proceedings. 6th Conf. on S e m i - I n s u l a t i n g I I I - V M a t e r i a l s , Toronto, Eds. M i l n e s A and Miner C, pages 131-136 Adam H i l g e r , B r i s t o l Yamaguchi M, and Ando K (1980) J . Appl. Phys. 51 5007 Yamaguchi M, and Ando K (1988) J . Appl, Phys. 63 5555 Yamamoto A, Shibukawa A, Yamaguchi M and Uemura C (1982) E l e c t r o n i c s L e t t . 18 710 Yamamoto A, Shibukawa A, Yamaguchi M and Uemura C (1983) T h i n S o l i d F i l m s 103 95 Yamamoto N, Uwai K and Takahei K (1989) J . A p p l . Phys. 65 3072 Yoshie O and Kamihara M (1983a) Japan. J . A p p l . Phys. 22. 621 Yoshie O and Kamihara M (1983b) Japan. J . A p p l . Phys. 22 629 Yoshie O and Kamihara M (1985) Japan. J . A p p l . Phys. 24. 431 Young E and T i l l e r W (1987) Appl. Phys. L e t t . 50 80 Young L, Tang W, Dindo S and Lowe K (1986) J . Electrochem. Soc. 133 609 - 619 Yu C F, P o d l e s n i k D, Schmidt M, G i l g e n H and Osgood R (1986) Chem. Phys. L e t t . 130 301 Yu C F, Schmidt M, P o d l e s n i k D and Osgood R (1987) J . Vac. S c i . Technol. B5 1087 Zach F X and Winnaker A (1989) J . Jap. Appl, Phys, 28 957-960 APPENDIX A; MEASUREMENTS OF REFLECTIVITY SPECTRA In t h i s appendix a new photoref l e c t a n c e technique was e x p l o r e d f o r measuring the e l e c t r i c f i e l d a t the InP s u r f a c e as the growth of the n a t i v e oxide proceeded. Modulation spectroscopy i s an o p t i c a l c h a r a c t e r i s a t i o n technique which makes use of the weak e f f e c t upon the d i e l e c t r i c f u n c t i o n of some e x t e r n a l l y modulated parameter such as the e l e c t r i c f i e l d . The technique allows the d e t e r m i n a t i o n of m a t e r i a l p r o p e r t i e s of a sample from changes i n the d i e l e c t r i c f u n c t i o n as c a l c u l a t e d from observed changes i n the r e f l e c t a n c e or t r a n s m i s s i o n of l i g h t . Bottka, G a s k i l l , S i l l m o n , Henry & G l o s s e r (1988) pr e s e n t e d a review of t h e i r a p p l i c a t i o n s of modulation s p e c t r o s c o p y t o determine e l e c t r i c f i e l d s , c a r r i e r c o n c e n t r a t i o n s and a l l o y c o mposition. The two forms of modulation spectroscopy which are of i n t e r e s t here a r e : e l e c t r o r e f l e c t a n c e , where the d i e l e c t r i c f u n c t i o n i s modulated through v a r i a t i o n of an e l e c t r i c f i e l d a p p l i e d through an e l e c t r i c a l c o n t a c t , and p h o t o r e f l e c t a n c e , where the b u i l t - i n e l e c t r i c f i e l d a t the semiconductor s u r f a c e i s modulated by a s u p p l y of e l e c t r o n - h o l e p a i r s produced by an o p t i c a l "pump" beam. As an example, Bhattacharya, Shen, Pa r a y a n t h a l , P o l l a c k , Coutts & A h a r o n i (1987) a p p l i e d the p h o t o r e f l e c t a n c e method t o p-InP, f i n d i n g the b u i l t - i n p o t e n t i a l and net c a r r i e r c o n c e n t r a t i o n . An e l e c t r i c f i e l d , through the Franz-Keldysh e f f e c t , r e s u l t s i n a s h i f t of the a b s o r p t i o n edge t o lower energy. In t h i s e f f e c t . the p r o b a b i l i t y of t u n n e l l i n g - a s s i s t e d a b s o r p t i o n i s i n c r e a s e d by an e l e c t r i c f i e l d (Keldysh 1965). For l a r g e e l e c t r i c f i e l d s , f o r i n s t a n c e 40 kV/cm, the t u n n e l l i n g p r o b a b i l i t y develops an o s c i l l a t o r y ( A i r y - f u n c t i o n ) dependence upon the photon energy (Callaway 1964). Pankove (1971) r e f e r s t o the e f f e c t as a " S t a r k s p l i t t i n g " of the band l e v e l s . T h i s produces damped o s c i l l a t i o n s i n the a b s o r p t i o n or r e f l e c t i o n s p e c t r a which are r e f e r r e d t o as Franz-Keldysh o s c i l l a t i o n s . The p o s i t i o n of the extrema of t h e s e o s c i l l a t i o n s were used by Bhattacharya e t a l . (1987) t o determine the e l e c t r i c f i e l d a t the InP s u r f a c e . Modulation spectroscopy r e s u l t s i n s m a l l v a r i a t i o n s i n o p t i c a l behaviour. For i n s t a n c e , when seen i n s p e c t r a o f the r e f l e c t i v i t y , R, the amplitude of Franz-Keldysh o s c i l l a t i o n s i s extremely s m a l l , t y p i c a l l y AR/R i s l e s s than lO'^. Because of thes e low amplitudes, l o c k - i n techniques are used; these r e q u i r e p e r i o d i c modulation of the a p p l i e d v o l t a g e ( i n e l e c t r o r e f l e c t a n c e ) o r pump i l l u m i n a t i o n i n t e n s i t y ( i n p h o t o r e f l e c t a n c e ) . T h i s means t h a t the e x i s t i n g t e c h n i q u e s can onl y measure parameters which they can modulate. T h i s i n t u r n means t h a t the e x i s t i n g techniques cannot measure the i n t r i n s i c p r o p e r t i e s of a m a t e r i a l . The b a s i s of the presen t approach was t o use computer-c o n t r o l l e d a c q u i s i t i o n of s p e c t r a l data w i t h ongoing c a l i b r a t i o n by the computer, i n order t o o b t a i n s e n s i t i v i t i e s o f one p a r t i n 10^. Experimental procedure Samples of InP were l i g h t l y etched whereupon some were p l a c e d i n a c o n v e n t i o n a l evaporator and AuGe c o n t a c t s were d e p o s i t e d . The sample b e i n g examined was i l l u m i n a t e d by an LED whose spectrum was ce n t r e d a t 935nm. The r e f l e c t e d l i g h t was c h a n n e l l e d through a l i g h t f i b r e t o the d i f f r a c t i o n g r a t i n g of a P r i n c e t o n A p p l i e d Research O p t i c a l M u l t i c h a n n e l A n a l y s e r (OMA). The d i f f r a c t e d l i g h t was d e t e c t e d by the a r r a y of photodiodes of the OMA d e t e c t o r u n i t (model 1453), p r o v i d i n g a s p e c t r a l r e s o l u t i o n o f about 0.06 nm. A c o n t r o l l i n g computer was connected, through an IEEE bus and an RS-232 l i n k , t o the OMA. The c o n t r o l l i n g computer was used t o a c q u i r e the s p e c t r a from the OMA. A n a l y s i s of these s p e c t r a was used t o c h a r a c t e r i s e the behaviour of the LED, and determine the s e n s i t i v i t y , g a i n , l i n e a r i t y and dark c u r r e n t f o r each photodiode i n t h e d e t e c t o r a r r a y . Once t h i s was done the computer a c q u i r e d and averaged s p e c t r a u n t i l the s i g n a l t o n o i s e r a t i o a llowed d e t e c t i o n of s i g n a l s on the order of 10"^R. The computer checked each spectrum f o r c o r r u p t i n g n o i s e by t e s t i n g whether the d e v i a t i o n s of the c u r r e n t spectrum were s i g n i f i c a n t l y d i f f e r e n t from p a s t s p e c t r a . Each spectrum t h a t was d i f f e r e n t was saved s e p a r a t e l y , the remaining s p e c t r a were averaged t o g e t h e r . S i n c e the n o i s e behaved as P o i s s o n n o i s e , i . e . an average of 4 r e a d i n g s has h a l f the u n c e r t a i n t y o f 1, t h i s technique allows l a r g e numbers of s p e c t r a t o be averaged without being c o r r u p t e d by an o c c a s i o n a l n o i s e s p i k e . From P o i s s o n s t a t i s t i c s , the u n c e r t a i n t y of N, the number of photons counted, i s g i v e n by VN. To determine a AR/R of lO"*, t h e r a t i o of (VN)/N must be 10"^, g i v i n g N = 10®. From t h e s p e c i f i c a t i o n s of the OMA u n i t , the s e n s i t i v i t y of the d e t e c t o r a r r a y i s about 5400 photons/count. I f t h i s means t h a t 1 count i s composed of 5400 photons, about 2 x 10** counts would be r e q u i r e d . Since a t y p i c a l spectrum c o n t a i n s about 2 000 counts, about 10 s p e c t r a would be r e q u i r e d . The f l u c t u a t i o n i n count from s u c c e s s i v e s p e c t r a was about 20 counts over a t o t a l count of about 2000. With M photons and t h e r a t e d s e n s i t i v i t y of the d e t e c t o r a r r a y , a f l u c t u a t i o n of VM = V(2000 X 5400) photons = (1/5400)V(2000 x 5400) counts » 1 count was expected. T h i s d i s c r e p a n c y suggests t h a t the s e n s i t i v i t y o f 5400 photons/count was not a t r u e g a i n ( i . e . t h a t i t took 5400 photons t o make one count) but an e f f e c t i v e g a i n , i . e . t h a t not a l l (only about 5%) of the photons c o n t r i b u t e t o the count. T h i s means t h a t the r e q u i r e d number of s p e c t r a needed t o be i n c r e a s e d by a f a c t o r of about 20^, hence a minimum of about 4000 s p e c t r a were r e q u i r e d . The above c a l c u l a t i o n s assume t h a t a l l s y s t e m a t i c e r r o r s were removed. Throughout the photodiode a r r a y t h e r e were v a r i a t i o n s i n g a i n , dark c u r r e n t , and s w i t c h i n g n o i s e . These were c a l i b r a t e d f o r by the c o n t r o l l i n g computer. A l l s p e c t r a were obtained i n p a i r s , the f i r s t spectrum without the probe i l l u m i n a t i o n , and the second spectrum w i t h . T h i s allowed f o r the removal of a t i m e - v a r y i n g dark c u r r e n t from the s i g n a l . Each spectrum was compared t o see whether i t was c o n s i s t e n t , i . e . a If wi t h the o t h e r s . An average was made of a l l the c o n s i s t e n t s p e c t r a . In t h i s way the e f f e c t s of an o c c a s i o n a l n o i s e s p i k e were e l i m i n a t e d . Measurements of the LED s p e c t r a a t d i f f e r e n t d r i v e c u r r e n t s and w i t h d i f f e r e n t d i s t a n c e s t o the l i g h t - f i b r e pickup, were compared t o show t h a t the spectrum of the LED d i d not a l t e r w i t h d r i v e c u r r e n t . For i n s t a n c e , p l a c i n g the l i g h t f i b r e t w i c e as f a r away gave a spectrum and i n t e n s i t y i n d i s t i n g u i s h a b l e from t h a t o b t a i n e d w i t h the o r i g i n a l d i s t a n c e and w i t h one q u a r t e r the d r i v e c u r r e n t . T h i s known, the gains of the photodiodes were computed by the c o n t r o l l i n g computer a t the s t a r t of the experiment by a l t e r i n g the LED i n t e n s i t y . Another source of u n c e r t a i n t y was the s w i t c h i n g n o i s e a s s o c i a t e d w i t h the e l e c t r o n i c s w i t c h i n g c i r c u i t r y of the OMA. T h i s depended upon the photodiode i t s e l f and upon the s i g n a l a t the photodiode. The r e f l e c t e d s p e c t r a were found t o be i n d i s t i n g u i s h a b l e from the d i r e c t s p e c t r a , s p e c t r a o b t a i n e d by d i r e c t i l l u m i n a t i o n of the l i g h t - f i b r e by the LED. In order t o remove the s w i t c h i n g n o i s e , e s s e n t i a l l y the same s i g n a l was o b t a i n e d i n two ways; by averaging 4000 r e f l e c t i o n s p e c t r a and by a v e r a g i n g 4000 d i r e c t s p e c t r a (no sample p r e s e n t ) . S i n c e the former c o n t a i n s the s m a l l o s c i l l a t o r y component due t o Franz-Keldysh o s c i l l a t i o n s , the s u b t r a c t i o n of the two should r e s u l t i n o n l y the o s c i l l a t i o n s remaining. R e s u l t s Although i t was found t h a t t h e r e were o s c i l l a t i o n s i n the apparent r e f l e c t i v i t y which had a p e r i o d of about 0.5 nm, t h i s r e s u l t may have been an i n s t r u m e n t a l e f f e c t s i n c e i t was found t h a t t h e r e was a s m a l l but steady d r i f t i n the s p e c t r a from one t o t h e next. T h i s d r i f t was a t t r i b u t e d t o a slow v a r i a t i o n i n t h e photodiode g a i n s . Hence any data a c q u i s i t i o n program must i n c l u d e an on-going c a l i b r a t i o n procedure which, f o r each a c q u i s i t i o n (every few seconds), determines the dark c u r r e n t and g a i n of the OMA photo-diode a r r a y . Unless t h i s i s done the OMA cannot a c h i e v e the necessary s e n s i t i v i t y t o r e l i a b l y r e s o l v e the s m a l l r e f l e c t i v i t y v a r i a t i o n s a s s o c i a t e d w i t h Franz-Keldysh o s c i l l a t i o n s and e x c i t o n s . T h i s a p r o m i s i n g technique i n t h a t i t a l l o w s measurements of s u r f a c e p r o p e r t i e s without the need f o r c o n t a c t s or modulation. I f the apparent r e f l e c t i v i t y v a r i a t i o n s were not i n s t r u m e n t a l e f f e c t s , t h e n they would correspond t o a s u r f a c e e l e c t r i c f i e l d of about 3 X 10^ v/m. An improved procedure would a l l o w the removal of the remaining i n s t r u m e n t a l e f f e c t s noted above. APPENDIX B; TRANSIENTS IN INFRARED TRANSMISSION Some p r e l i m i n a r y experiments were undertaken t o develop a technique i n which a t r a n s i e n t i n the t r a n s m i s s i o n of below-bandgap r a d i a t i o n would be monitored i n s t e a d of the c u r r e n t t r a n s i e n t as i n OTCS. A b s o r p t i o n of below band gap l i g h t i n GaAs i s a f f e c t e d by the f r e e c a r r i e r c o n c e n t r a t i o n s , the i m p u r i t y c o n c e n t r a t i o n s and the EL2 p o p u l a t i o n s and i s l i t t l e a f f e c t e d by the s u r f a c e . I f the c a r r i e r or EL2 p o p u l a t i o n s were perturbed by i l l u m i n a t i o n w i t h a s t r o n g source of sub-bandgap l i g h t , a "pump" beam, then a f t e r i l l u m i n a t i o n the t r a n s m i t t e d i n t e n s i t y may d i s p l a y a t r a n s i e n t behaviour from which i n f o r m a t i o n on deep l e v e l s c o u l d be e x t r a c t e d . The m a t e r i a l chosen f o r t h i s work was SI GaAs because a source of below-bandgap i l l u m i n a t i o n was a v a i l a b l e f o r GaAs but not f o r InP. However, once developed the technique might be a p p l i c a b l e t o SI InP:Fe as w e l l s i n c e F e - r e l a t e d l e v e l s i n InP g i v e r i s e t o a t a i l i n the a b s o r p t i o n of i n f r a r e d r a d i a t i o n below th e band edge ( F o r n a r i & Kumar 1990) j u s t as EL2 does i n GaAs. In OTCS i t i s d i f f i c u l t t o determine whether a l e v e l c o n t r i b u t i n g t o the photocurrent t r a n s i e n t i s p r e s e n t i n the d e p l e t i o n r e g i o n a s s o c i a t e d w i t h one of the c o n t a c t s or whether i t i s p r e s e n t i n the bulk. Moreover, OTCS samples r e q u i r e some p r o c e s s i n g f o r the d e p o s i t i o n of e l e c t r i c a l c o n t a c t s and t h i s may i n t r o d u c e deep l e v e l s . Although p h o t o r e f l e c t a n c e a v o i d s the use of c o n t a c t s , i t probes o n l y the n e a r - s u r f a c e r e g i o n . Two experiments are presented i n t h i s c h a p t e r . The f i r s t experiment was t o determine the s p e c t r a l v a r i a t i o n of the t r a n s m i s s i o n c o e f f i c i e n t near a wavelength of 935nm and i t s dependence upon the i l l u m i n a t i o n i n t e n s i t y . In the second experiment the i n t e n s i t y of the i l l u m i n a t i o n was modulated and the time dependence of the t r a n s m i t t e d s i g n a l was examined. Far below the gap, K a l i n u s h k i n , Murin, Murina, Prokhorov, Radautsan, T i g i n y a n u , Yuryev (1988) used f r e e c a r r i e r s c a t t e r i n g e f f e c t s , a t a wavelength of 10.2Min, t o perform an measurement s i m i l a r t o a t h e r m a l l y - s t i m u l a t e d c u r r e n t (TSC) measurement, of the e f f e c t s of deep l e v e l s i n s e m i - i n s u l a t i n g GaAs:Cr. Zach & Winnacker (1989), D i s c h l e r & Kaufmann (1988) and o t h e r s , have s t u d i e d t h e o p t i c a l p r o p e r t i e s of the n e u t r a l and charged s p e c i e s of EL2. N e u t r a l EL2 can be p h o t o i o n i z e d , producing a f r e e e l e c t r o n and l e a v i n g a p o s i t i v e l y charged donor EL2''" which can a l s o be p h o t o i o n i z e d , producing a h o l e and n e u t r a l EL2°. Although t h e r e i s a v a r i a t i o n w i t h wavelength, X, a t the range of i n t e r e s t i n wavelength, the o p t i c a l c r o s s s e c t i o n f o r the former, a^^, i s about 1.3 X 10"16 cm^, and f o r the l a t t e r , ap°, i s about 0.2 x lO'^^ cm^. The a b s o r p t i o n c o e f f i c i e n t i s g i v e n by, a(A) = anO(A)[EL20] + (k)[EL2^] (26) where [EL2°] and [EL2'^] r e p r e s e n t the c o n c e n t r a t i o n s of EL2° and EL2'''. S i n c e both c r o s s s e c t i o n s vary w i t h A, the observed s p e c t r a l v a r i a t i o n i n a c o u l d be f i t t e d by a model f u n c t i o n i n which the EL2° and EL2''' c o n c e n t r a t i o n v a r i e d , thereby g i v i n g the t o t a l c o n c e n t r a t i o n of EL2 as w e l l as i t s occupancy. A s i m i l a r approach was taken by Zach & Winnacker (1989). I n t e n s i t y dependent t r a n s m i s s i o n s p e c t r a A simple t e s t of whether t r a n s i e n t e f f e c t s might be p r e s e n t i s t o measure the s p e c t r a of the i l l u m i n a t i o n from a 935nm c e n t r e wavelength LED as a f u n c t i o n of i n t e n s i t y a f t e r i t s t r a n s m i s s i o n through a GaAs wafer. T h i s i s of i n t e r e s t s i n c e the LED produces a spectrum which i s f a i r l y broad, extending from near the band gap t o w e l l below. T h i s means t h a t much of the l i g h t w i l l p e n e t r a t e deeply i n t o the GaAs be f o r e being absorbed, w h i l e the l o n g e r wavelengths w i l l tend t o pass through the GaAs wafer c o m p l e t e l y . These longer wavelengths are long enough t h a t they can be expected t o be a f f e c t e d by the EL2 and f r e e c a r r i e r c o n c e n t r a t i o n s . I f t h e a b s o r p t i o n depends upon the i n t e n s i t y then t h i s suggests t h a t t h e occupancies of l e v e l s i n the s u b s t r a t e respond t o the i l l u m i n a t i o n . I f the occupancies do respond then i t may be p o s s i b l e t o measure the speed of t h e i r response by m o n i t o r i n g t r a n s i e n t s i n t h e a b s o r p t i o n of t r a n s m i t t e d l i g h t . A TRW OP291 LED, which has a c e n t r e wavelength of 935nm and a f u l l width a t h a l f maximum of about 60nm, was p l a c e d 1mm from a GaAs wafer i n a dark box and a l i g h t f i b r e t o c o l l e c t the l i g h t was p l a c e d 4mm away from the wafer on the other s i d e . The l i g h t f i b r e was connected t o a spectrometer which i n t u r n was connected t o a P r i n c e t o n A p p l i e d Research OMA, c o n s i s t i n g of an a r r a y of photodiodes w i t h computer c o n t r o l l e d data a c q u i s i t i o n . A PC was connected, through an IEEE and s e r i a l l i n k , t o the OMA. T r a n s m i s s i o n s p e c t r a , c o r r e c t e d f o r the photodiode dark c u r r e n t , were a c q u i r e d with LED c u r r e n t s of 0.1, 0.2, 0.4, 1.0, 2.0, 4.0, 6.0 and lOiiiA. In each case 100 s p e c t r a were averaged. The s p e c t r a were then normalised by the corres p o n d i n g v a l u e s measured f o r t r a n s m i s s i o n without the GaAs wafer p r e s e n t . S i n c e the lower i n t e n s i t i e s produced much weaker s i g n a l s (lower s i g n a l t o n o i s e r a t i o s ) , the data were averaged i n groups of 50 diode v a l u e s , g i v i n g the t r a n s m i s s i o n c o e f f i c i e n t , T, as a f u n c t i o n o f wavelength. The a b s o r p t i o n c o e f f i c i e n t was then c a l c u l a t e d (Zach & Winnacker 1989), by removing the e f f e c t s of m u l t i p l e i n c o h e r e n t r e f l e c t i o n s u s i n g , exp(ad) = ((1-R)2/(2TR2)){1 + (1 + 4R2T2/(1 - R)^)^/^} (27) where d i s the wafer t h i c k n e s s , and R i s the r e f l e c t i o n c o e f f i c i e n t , g i v e n by. R = [(n - 1)2 + k2]/[(n + 1)2 + k ^ ] . (28) Although n and k vary with wavelengths near the band-edge, k i s l e s s than 10"-^. The e x p r e s s i o n f o r R i s t h e r e f o r e dominated by the v a l u e o f n which v a r i e s l i t t l e , from n = 3.595 a t 900nm t o n = 3.534 a t 960nm (Séraphin & Bennett 1967). T h i s l e a d s t o v a r i a t i o n i n R of 0.007 as the wavelength v a r i e s from 900 t o 960 nm. S i n c e t h e purpose of t h i s experiment was t o study the i n t e n s i t y dependence of the t r a n s m i s s i o n a t v a r i o u s wavelengths, t h i s s m a l l v a r i a t i o n i n R wit h wavelength was n e g l e c t e d and R was taken as 0.35. The a b s o r p t i o n c o e f f i c i e n t s are p l o t t e d i n F i g u r e A l . For wavelengths near 900nm with the lower i n t e n s i t i e s , the t r a n s m i t t e d s i g n a l s were v e r y weak, l e a d i n g t o h i g h u n c e r t a i n t i e s i n the c a l c u l a t e d a b s o r p t i o n c o e f f i c i e n t s . As shown i n F i g u r e A l , a t long wavelengths, the lower i n t e n s i t i e s of i l l u m i n a t i o n , the lowest curves, were b e t t e r t r a n s m i t t e d . In f a c t i t would appear t h a t f o r these wavelengths the GaAs i s behaving as an o p t i c a l s w i t c h s i n c e the a b s o r p t i o n c o e f f i c i e n t v a r i e s from about 4 t o 8 cm~^ as the LED c u r r e n t i s i n c r e a s e d . From other measurements i t would appear t h a t most o f the s w i t c h i n g e f f e c t i s a t the lower i n t e n s i t i e s , g i v i n g v a r i a t i o n s i n the a b s o r p t i o n c o e f f i c i e n t p r o p o r t i o n a l t o the LED c u r r e n t . I f they were due t o i n t r a b a n d a b s o r p t i o n the behaviour o f the a b s o r p t i o n c o e f f i c i e n t s shown i n F i g u r e A l would correspond t o c a r r i e r c o n c e n t r a t i o n s of about lO^^ cm"-^ . In o r d e r f o r t h e r e t o be such a h i g h c a r r i e r c o n c e n t r a t i o n , the f r e e c a r r i e r l i f e t i m e would have t o have been about 1 second, r a t h e r than the g e n e r a l l y accepted 1 ns. T h i s confirms t h a t the v a r i a t i o n i n the a b s o r p t i o n c o e f f i c i e n t was not due t o v a r i a t i o n s i n the c a r r i e r p o p u l a t i o n s but i n s t e a d were due t o v a r i a t i o n s i n the EL2 occupancy. The c o n c e n t r a t i o n s [EL2°], [EL2"''] are presumably determined by the steady s t a t e between p h o t o i o n i z a t i o n of e l e c t r o n s and h o l e s from EL2 p l u s emission and capture of e l e c t r o n s and h o l e s by EL2 and o t h e r d e f e c t s i n the GaAs. Since the p h o t o i o n i z a t i o n c r o s s s e c t i o n s are known f o r EL2, and t r a n s m i s s i o n s p e c t r a a l l o w the d e t e r m i n a t i o n of the EL2 p o p u l a t i o n s , the i n t e n s i t y dependence may a l l o w the d e t e r m i n a t i o n of emission and c a p t u r e p r o p e r t i e s of l e v e l s i n the wafer. Time dependent t r a n s m i s s i o n s p e c t r a To examine the time dependence of the t r a n s m i s s i o n c o e f f i c i e n t , a probe beam was sent through the wafer and i n t o a p h o t o d e t e c t o r . The probe beam was p r o v i d e d by a TRW OP291 LED. By modulating the probe LED c u r r e n t from 10mA t o 0.2 mA, the s i g n a l was i n s p e c t e d f o r any OTCS-like t r a n s i e n t s . In order t o a v o i d d i s t o r t i o n , the g a i n was a d j u s t e d so t h a t when the pump beam was on. 0.4 0.8 Time (s) the F i g u r e A2: T r a n s m i t t e d s i g n a l as de t e c t e d by S i - p h o t o d e t e c t o r . p h o t o d e t e c t o r was s t i l l w e l l below the r a i l v o l t a g e . T h i s p l a c e d a l i m i t on the amount of g a i n t h a t c o u l d be a p p l i e d . Even with the maximum g a i n no t r a n s i e n t s were found. As shown i n F i g u r e A2, the ph o t o d e t e c t o r s i g n a l was a simple square wave, showing no s i g n s of e x p o n e n t i a l decays. The s l i g h t d e v i a t i o n s seen i n F i g u r e A2 were a l s o e v i d e n t i n a s i m i l a r measurement of the d i r e c t s i g n a l (no wafer i n pl a c e ) and hence are a r t i f a c t s . To i n v e s t i g a t e with h i g h e r s e n s i t i v i t y , a "probe" beam of low i n t e n s i t y was i n c i d e n t upon a sample p e r i o d i c a l l y i l l u m i n a t e d by a more i n t e n s e "pump" beam. Both beams were p r o v i d e d by TRW OP291 LEDs. The probe beam was d i r e c t e d d i a g o n a l l y through the wafer p e r p e n d i c u l a r t o the path of the pump beam. In t h i s manner the pump beam d i d not i l l u m i n a t e the phot o d e t e c t o r , hence the o n l y s i g n a l seen by the photodetector was the e f f e c t o f the v a r y i n g t r a n s m i s s i o n of the probe beam. The pump beam was turne d on and o f f whi l e an o s c i l l o s c o p e monitored the ph o t o d e t e c t o r s i g n a l w i t h much hi g h e r r e s o l u t i o n than before, again a square-wave behaviour was found. The pump beam modulation frequency was a l t e r e d t o check f o r t r a n s i e n t s over the range of 0.1s t o s e v e r a l /is, without s u c c e s s . A computer program was w r i t t e n t o check f o r t r a n s i e n t s on a time s c a l e o f 0.1 seconds t o s e v e r a l hours, again without success. I t would appear then t h a t w i t h a change i n i n t e n s i t y the EL2 p o p u l a t i o n s reach t h e i r new e q u i l i b r i u m on a time s c a l e much s m a l l e r than MS. Though t h i s p r e c l u d e s u s i n g the e f f e c t i n an OTCS-l i k e experiment, i t does mean t h a t a GaAs wafer might be used as an o p t i c a l - o p t i c a l switch on such a time s c a l e . For the range of a b s o r p t i o n c o e f f i c i e n t s seen here, an o p t i c a l - o p t i c a l switch c o u l d be b u i l t of about 5mm of semi-i n s u l a t i n g GaAs, wi t h an on/off r a t i o of about 20. I t i s l i k e l y t h a t w i t h lower i l l u m i n a t i o n i n t e n s i t i e s the a b s o r p t i o n c o e f f i c i e n t would v a r y f u r t h e r , a l l o w i n g an improvement i n o n / o f f r a t i o s and o n - s t a t e a t t e n u a t i o n . The o p e r a t i o n o f the s w i t c h i s through the a l t e r i n g o f the occupancy of EL2 through i l l u m i n a t i o n , the same e f f e c t c o u l d be brought about e l e c t r i c a l l y . APPENDIX C; PROGRAMS T h i s appendix c o n t a i n s the primary programs used i n t h i s t h e s i s . The programs i n v o l v e data a c q u i s i t i o n f o r OTCS, n o n - l i n e a r l e a s t - s q u a r e s f i t t i n g programs, e l l i p s o m e t r y a n a l y s i s programs and s p e c t r a l a n a l y s i s programs. OTCS Data a c q u i s i t i o n program "L0KI21.C" page 140 C o n t r o l s MMR through the RS-232 p o r t , the a p p l i e d v o l t a g e through a DAC output, s e l e c t s an LED a r r a y f o r i l l u m i n a t i o n and s e t s the LED c u r r e n t . Sets the sample-hold c i r c u i t t o sample the dark c u r r e n t so t h a t a maximum of a m p l i f i c a t i o n can be achieved. A l t e r s the (programmable) g a i n of the ADC c a r d t o maximise the s i g n a l . Informs operator when the c u r r e n t - t o - v o l t a g e a m p l i f i e r (e.g. K e i t h l e y 427) r e q u i r e s readjustment f o r h i g h e r o r lower g a i n . Records the data on d i s k and steps t o the next temperature u n t i l t h e run i s f i n i s h e d . A n a l y s i s program "DREMANlS.c" page 156 A p p l i e s the n o n - l i n e a r l e a s t - s q u a r e s f i t t i n g a l g o r i t h m d e s c r i b e d i n McKinnon e t a l . (1985). Program reads from a data f i l e , a template which d e s c r i b e s the number of f u n c t i o n s t o f i t , the type of f u n c t i o n s and t h e i r i n i t i a l parameters. The program can estimate the i n i t i a l parameters i f d e s i r e d . A f t e r a t t empting a s o l u t i o n the program w r i t e s t o a data l o g f i l e "metapars" the parameters, the c h i squared and whether or not convergence was achieved. During t h i s i t e r a t i v e process the program d i s p l a y s the f i t and the r e s i d u a l s from the f i t i n order t h a t the o p e r a t o r can see whether t h e r e were syst e m a t i c r e s i d u a l s . A n a l y s i s program "LM14.c" page 159 A p p l i e s the Levenberg-Marquardt n o n - l i n e a r l e a s t squares f i t t i n g a l g o r i t h m d e s c r i b e d i n Press e t a l . (1988). O p e r a t i o n i s as above although the convergence i s f a s t e r . On the o t h e r hand the convergence i s l e s s e a s i l y achieved. Low Frequency O s c i l l a t i o n s A n a l y s i s program "P0W18.C" page 168 T h i s program a p p l i e s the maximum entropy ( a l l - p o l e s method) d e s c r i b e d by Press e t a l . (1988). (The data a c q u i s i t i o n was c a r r i e d out by the OTCS a c q u i s i t i o n program.) The 32k data p o i n t s are broken up i n t o M s e t s of N p o i n t s whereupon the average v a l u e of each s e t i s s u b t r a c t e d , a Welch window i s a p p l i e d and the power spectrum computed. These M s p e c t r a are w r i t t e n t o data f i l e s f o r l a t e r a n a l y s i s by "PRl2.c" A n a l y s i s program "PR12.c" page 174 The programs averages the s p e c t r a , a l l o w i n g f o r the o c c a s i o n a l n o i s e s p i k e , removes an estimate of the background, e x t r a c t s s p e c t r a l peaks and w r i t e s the r e s u l t s i n a format s u i t a b l e f o r A r r h e n i u s p l o t s . E l l i p s o m e t r y The data a c q u i s i t i o n i s done by the program "RUDOLF" r u n n i n g on the PDP-8 which c o n t r o l s the e l l i p s o m e t e r . A t one or more a n g l e s o f i n c i d e n c e the p o l a r i s e r and a n a l y s e r angles which r e s u l t i n a minimum of t r a n s m i t t e d l i g h t are entered i n t o a data f i l e "PAFILE" on the PC running the a n a l y s i s program. A n a l y s i s program "FR0NT9.C" page 180 In t h i s program "PAFILE" i s searched f o r the d e s i r e d e n t r y , t h e e l l i p s o m e t r i c parameters P s i and D e l t a a re c a l c u l a t e d and c o r r e c t e d f o r o p t i c a l i m p e r f e c t i o n s i n the system and then w r i t t e n t o the f i l e "PDFILE". A n a l y s i s program "ELMlS.c" page 182 In t h i s program the P s i and D e l t a i n "PDFILE" are read, a model f o r the sample i s chosen along w i t h i n i t i a l parameters, and the parameters t o be v a r i e d are s e l e c t e d . A n o n - l i n e a r l e a s t squares a l g o r i t h m ( t h a t of "DREMAN18") i s then a p p l i e d . The model f o r t he sample c o n s i s t s of 1 or more l a y e r s whose t h i c k n e s s e s and r e f r a c t i v e i n d i c e s are s p e c i f i e d . /* LOKIn - control the HHR and perform d i g i t a l OTCS/ DLDS mode */ /* Allows generation of test data */ #define EGGA 0 #define Home 0 #define sqr(x) {{x)*(x)) #define FstBlk 100 #define SecBlk 150 #define Version 20 /* _ _ V /* Configuration: MMR_R -> Keithley 427 Current Amp -> SP Rawsig Output (x2) -> ADCO TransL Output -> ADC1 | TransH Output -> ADC2 |_ Check (1 MOhm) -> ADC3 DACO -> DACO on Voltage Source DAC1 -> DAC1 on Current Source B i t s 0-2 -> Diode Select board Bi t 3 -> Voltage Supply (Relay Control) Bi t 4 -> Voltage Supply (Relay Control) Bi t 5 -> Sample/Hold Control Line (unused) (unused) (unused) /* /* Connect DGnd -> SGnd -> GND and to MMR case, cable mounts */ #define ndbg 1 #define NumPad 10 #define DACRange 20.0 #define DACEnd 10.0 #define CritCur 0.3 #define RawSig 0 #define TransL 1 #define TransH 2 #define Checks 3 #define Vsense 4 #define Controls 5 #define SampPeriod ((lon9)20) #define SzSmiMx 6000 /* #define NConv 0x7fff #include <stdio.h> #include <stdlib.h> #include <math.h> #include <alloc.h> ^include <dos.h> #include <bios.h> #)nclude <conio.h> *include <graphics.h> #include <time.h> /* ADC Channel /* ADC Channel /* ADC Channel /* ADC Channel ADC Channel ADC Channel */ */ */ */ */ */ /* 20 seconds for a sample */ Est. max size of semicomp record */ unsigned int outbyte=0, Ddiode, Run, DMAgain = 0, IPhoto, IDark, XA, XB, YA, YB, ddb = 0, Gaini, TestBit = 3, Work = IHome, iloc=9999, f l o e , i h t . fht, NumAcc, PCUor, RunFlg=0, PssOff = 0, DelDur; long Ton, CurDat[SzSmiMx], AccDat[SzSmiMx]; int Dreq, Toggled, NoChang, NoGnCh, Tranin = TransL, Gainin = 0, SizeSemi, GainVal[4] = <:1,2,4,8>, Trigger, Set = 5, FXClk = 0, FXTrig = 0, FlagCon = 0, Inverting = -1; char far *seg, *segor; FILE *rp, *fopen(); char stllOO], Reply[200], IPfnam[40], GlobNam[80]=""; f l o a t AccStd, CurStd, T = 293.0, TTemp, LastVolt = 0.0, Vreq, Ireq, ARaw = 0.0, ARawL, Astd, ATran = 0.0, ATranL, CritRH = 8.0, BRaw = 0.0, BRawL, Bstd, BTran = 0.0, BTranL, QID, QI. CritRL = 0.6, Tmin=28Û.O, Tmax=380.0, Tstep=1.0, TSet, RunRat = 1.0, Igues = 0.01, /* SPGain i s calculated from OP-amp gains */ SPGain[5] = < 1.0 /* Rawsig gain, Ri/Rf V , -6.329 /* TransL gain, -(2Rclamp + Ri)/Rf V , 0.633 /* TransH gain, (-0.1 TransL Gain */, 0.0, 0.0 >, /* Fine Coeffs take into account the vagarities of the SH, OP-amp gains and EGG gain. Shd realty be done for each range of EGG since gain varies non-nominally. The coefs are calculated by Linear Regression from the output of the SP test routine */ FineCorSCS] = <: 0.8411, 0.89421, 1.0, 1.0, 1.0>, /* sips */ FineCorlCS] = <: 0.85436, -2.5271, 0.0. 0.0, 0.0>; /* intcp */ typedef struct { flo a t Ireq, Vreq, Vsensed, Freq, Temp; int Dreq, ADGain; long Time; fl o a t K427Gn; > LongRec; LongRec D; void m l i n e ( i , j , k , l ) int i , j , k , l ; i i f (ddb == 0) l i n e ( i , j , k , I ) ; else p r i n t f C ' l i n e %d %d %d % d \ n " , i , j , k , l ) ; > void mouttextCxx) char xx[]; { i f (ddb == 0) outtext(xx); else printf("%s\n",xx); > void mnnoveto(i,j) i i f (ddb == 0) moveto(i,j); else printfC'moveto %d % d \ n " , i , j ) ; > void SetVaUi,j.NoisVal) long int i,j,NoisVal; { i f ( i < NConv) t j += randO % NoisVal; i f ( j <0) j=0; i f ( j > 0x2000) j = 0x2000; seg[2*i] = (unsigned char) ( j & Oxff); seg[(2*i)+1] = (unsigned char) ( ( j » 8) & Oxff); > > int GetVaUj) int j ; { long i ; i = j ; return( ((unsigned) (seg[2*i]&0xff)) I ((unsigned) ((seg[(2*i)+1]&0xff)«8)) );} #if (Home) long Decay(i,T,A) long i ; f l o a t T,A;<; s t a t i c long k; float x; int j ; j = randO % 100; i f (( j==0) 11 ( i==0)) { x = i/T; i f ( X < 20) k = (long int) (A * exp(-x)); else k = 0; > return(k); > void GenFakeO { /* Called instead of Grab when Home != 0 */ flo a t Tau, Amp; long i , j . Per, Off, Nois, OnVal, OffVal; OnVal = 1000 + (randO % 500); OffVal = randO % 0x100; i f (OnVal < OffVal) OnVal = OffVal + 1000; Per = 10000; Off = randO % Per; Nois = randO % 20; Tau = 1000.0; Amp = 0.5 * (OnVal - OffVal); p r i n t f C <GenF: Amp % f Tau % f OffVal % l d OnVal %ld>\n", Amp.Tau,OffVal,OnVal); for (i=0;i<0ff;i++) SetVaUi,OnVal,Nois); j=i; while ( i < NConv) < for ( i = j ; i< j+Per; i++) SetVaUi,OffVal + Decay(i-j,Tau,Amp),Nois); j = i ; for ( i = j ; i< j+Per; i++) SetVaUi,OnVal,Nois); j = i ; > > #else void GenFakeO { /* Null V > #endif int GlobGn; f l o a t SVADStd = 9e9; /* Std dev. of last rdng by SVAD_Inm*/ /* Some Flag Values */ #define TurnOnAndRecord 0 #define TurnOffAndRecord 1 #define BitOnAndRecord 2 #define BitOffAndRecord 3 #if Home #define GLOC "c:\\tcpp\\bgi\\" ^define TimeConst 20 #else #define GLOC "c:\\tc\\bgi\\" #define TimeConst 20000 iSfendif #define FreqDf 200 #define Res2 517.0 /* R2 of Howland I srce I=-V/R2 */ #define Base 0x2ec #def1ne DP Ox2ec #define CP 0x2ed #define SP 0x2ed #define OFF (char) 0x00 #define Ext Tr (char) 0x80 #define Ext_Ck (char) 0x40 #define Contin (char) 0x20 #define DMA (char) 0x10 #define Dat_In_FuU (char) 0x02 /* AKA Write.wait used i n 'PseO' */ #define Dat Out Rdy (char) 0x01 /* " PseDR */ #define Rd_Wait~ (char) 0x05 /* •' PseRD */ #define Set AD (char) OxOd #define Set~DA (char) 0x09 #define RDY~ (char) 0x04 /* AKA Command.wait used in 'Pse' */ #define C l r Err (char) 0x01 #define Ch_Sta (char) 0x0 #define Ch_End (char) 0x0 #define SClk (char) 0x03 #define SDI (char) 0x04 #define SDO (char) 0x05 #define RDigl (char) 0x06 #define WDigO (char) 0x07 #define WD I (char) 0x08 #define WDA (char) OxOa #define TEST (char) OxOb #define RDI (char) OxOc #define RAD (char) OxOe #deftne STOP (char) OxOf #define Per_Min 30 #define Com 0 /* use C0M1 */ #define ComNom "Comi:" #define DATA_READY 0x100 #define Cnt Mx 12000 #define Pse" while ((inportb(SP)&RDY)==0) #define PseD while ((inportb(SP)&Dat_In_Full)!=0) #define PseDR while ((inportb(SP)&Dat_Out Rdy)==0) #define PseRD while ((inportb(SP)&Rd Wait)==0) #define PseDRR while ((inportb(SP)&(Dat_Out_Rdy|RDY))==0) void MyOump(ii) int i i ; < int i,j,k,prv; fprintf(stdprn,"%c%c%c",(char)27/A',(char)8); for (j=0;j<ii;j++) t f p r i n t f ( s t d p r n , " %c%c%cL%c%c",(char)10,(char)13,(char)27, (char) (700 % 256), (char) (700/ 256)); for (i=0; i<700;i++) i prv = 0; for (k=0;k<8;k++) { i f (getpixel(i,k+(j*8))!=0) prv += 1«(7-k);> fprintf(stdprn,"%c",(char)prv); > > > void RSInitO t bioscom(0,0x63,Com); /* set to 600bd, 8n1 on Com port */ > long TimeO i return((long)ctock()); > void ClearKbO { while(kbhit()) getcheO; > void MyPseO { while (((char) getcharO) != ' ' ) ; > void DA_Inm(Chan,val) int chan, v a l ; i i f (Work) i outportb(CP,STOP); inportb(DP); Pse; outportb(CP,Clr_Err); PseD; Pse; outportb(CP,WDI); PseD; outportb(DP,chan); PseO; outportb(DP,val & OxFF); PseD; outportb(DP,(val»8)&0xF);> > int AD_Imm(chan,9ain) int chan, gain; < int v a l ; i f (Work) { outportb(CP,STOP); inportb(DP); PseD; Pse; outportb(CP,Clr_Err); Pse; PseD; outportb(CP,RDI); PseD; outportb(DP,(char) gain); PseD; outportb(DP,(char) chan); PseDRR; val = (unsigned) inportb(DP); PseORR; val += (unsigned) inportb(DP) « 8; i f ((inportb(SP)&0x80)!=0) {printf("Error in AD read\007\n");> > else val = 0; return(val); > f l o a t VAD Imni(chan,gain) int chan,gain; t float scr; i f (Work) < f l o a t unip; unip = AD_Iitro(chan,gain) * (10.0 / (4096.0 * GainVal [gain] ) ) ; scr = (unTp * 2.0) - (10.0/GainVal[gain]);> else scr = 0.0; return(scr); > f l o a t CVolt(gain,ival) int i v a l , gain; i float scr; float unip; unip = i v a l * (10.0 / (4096.0 * GainVaUgain] ) ) ; scr = (unip * 2.0) - (10.0/GainVal[gain]); return(scr); > f l o a t SVAD Imm(chan) int chan; t int i , j ; f loat x, y[10]; i f (Work) { X = VAD lnm(chan,0); i f (fabs(x)>0.01) { i = fabs(x/1.25); > else i=0; SVADStd = x = 0.0; for (j=0;j<10;j++) C switch ( i ) { case 0: GlobGn = 3; x += y[j] = VA0_Iniii(chan,3); break; /* in +/- 1.25V */ case 1: GlobGn = 2; x += y[j] = VAD_lmm(chan,2); break; /* in +/- 1.25 -> 2.5V */ case 2: case 3: GlobGn = 1; X += y[j] = VAD_Iniii(chan,1); break; /* +/- 2.5 to 5V */ default-.GlobGn = 0; X += y[j] = VAD_Imni(chan,0); break; /* +/- 5 to 10V */ > > X /= 10.0; for ( j = 0 ; j<10; j + + ) SVADStd += sqr(x - y [ j ] ) ; SVADStd = sqrt(SVADStd)/10.0; > else < X = 1.0; SVADStd = 0.001; > return(x); > f l o a t nAV(src,x)int s r c ; f l o a t x;<: float y; y = (1.0e9 * x/(D.K427Gn*SPGain[src])); y = (y - FineCorl[src])/FineCorS[src]; return(y); > f l o a t rV(src,x)int s r c ; f l o a t x;{ /* return "Truer" voltage */ return(x/FineCorStsrc]); > void Set_Clk(freq) int freq; { unsigned long period; /* checked*/ i f (Work) { period = 1.0/(freq*1.25e-6); i f (period < Per Min) t printf("Too Fast...freq: % f per: % l d min: %d\n", freq, period, Per_Min); exit(99); > outportb(CP,STOP); inportb(DP); PseD; Pse; outportb(CP,Clr_Err); PseD; Pse; outportb(CP,SClk); PseD; outportb(DP, (char) (period & OxFF)); PseD; outportb(DP,(char) (period » 8)); PseD; Pse;> > void DAC(i,x) int i ; f l o a t x; <! int j ; j = ( X + DACEnd) * 4096.0 / DACRange; i f (j>4095) j = 4095; DA_Inin(i, j ) ; > void BitOut(BitNum, BitVal) int BitNum, BitVal; { i f (BitVal == 0) outbyte &= ("(1«BitNum)); else outbyte |= 1 «BitNum; WriteOig(outbyte); > void ChkV(i) int i ; C f l o a t x; x = fabs(SVAD_Imm(Vsense)); switch ( i ) { case 0: /* LowV relay about to close., check High V not */ i f ( X > 15.0) { printf("Dangerous si t u a t i o n - abort\007\n");exit(8);> break; case 1: /* HiV relay about to close., check Low V not on */ i f ( ( X > 2.0)&&(x < 15.0)) < printf("Dangerous s i t u a t i o n - abort\007\n");exit(8);> break; default: printf("Warning - in v a l i d switch\007\n"); } ) void OpenHighRelayO < Bit0ut(3,0); /* Turn off 13 */ delay(TimeConst); > void CloseHighRelayO C ChkV(l); BitOut{3,1); /* on 13 */ delay(TimeConst); > void FOpenHighO t BitOut(3,0); /* Turn off 13 */ > void FCloseHighO { BitOut(3,1); /* Turn on 13 */ > void OpenLowRelayO { BitOut(4,0); /* Turn off 14 */ delay(TinieConst); > void CloseLowRelayO { ChkV(O); BitOut(4,1); /* on 14 */ delay(TinieConst); > void SanipleHold(i) int i;<: BitOut(5,1); d e l a y ( i ) ; BitOut(5,0); > float SetPower(x) f l o a t x; i p r i n t f ( " S e t t i n g Voltage: " ) ; i f ((fabs(x) > 20.0)&&(LastVolt < 20.0)) { /* Select High V */ OpenLowRelayO; CloseHighRelayO; > i f (fabs(x) < 20.0) < DAC(0,x/ -1.8); i f (LastVott > 20.0) { OpenHighRelayO; CloseLowRelay();> i f (LastVolt == 0.0) t CloseLowRelay();> > D.Vsensed = 1100.0 * SVAD_Itiiii(Vsense); printf("Requested V= %7.4f, actual (though approx) V= %7.4f\n", x,D.Vsensed/100.0); LastVolt = fabs(x); Vreq = x; return(D.Vsensed/100.0); > void FSetPower(x) f l o a t x; C int gn; printf("FSetPower: Setting V = % f \r",LastVolt=x); DAC(0,x/ -1.8); > void SetCurrent(x) f l o a t x; { float y; p r i n t f ( "SetCurrent: Requested 1= %7.4f, hence setting DAC1 to %7.4f\n", X , y = -x*Res2); DACd.y); Ireq = x; > void SetSHO { f l o a t x; x = Ireq; SetCurrent(O.O); delay(IOOO); SatnpleHold(500); SetCurrent(x); delay(IOOOO); > void Mydelay(j) int j ; { int i ; for (i=0; i<j;i++) delay(IOOO); > void SelectDiode(i) int i ; i int j ; for (j=0; j<3; j++) BitOut(j,0); Ddiode = i ; > long DiodeOn(j) int j;<BitOut(Ddiode, 1 ) ; i f {j>0) Mydelay(j); return(Tinie());> long DiodeOff(j)int j;<:BitOut(Ddiode,0);if (j>0) Mydelay(j); return(TinieO);> void RSGet(st) char s t [ ] ; { int i=0,j, out, cnt = 0; i f (Work) { while ((cnt++ < Cnt_Hx)&&(i < 80)) { j = bioscoin(3, (char) 0,0); i f ( j & DATA_READY) i f ((out = (char) biosconi(2,(char)0,0) & Ox7f) != 0) { st[i++] = out; cnt = 0;>» else s p r i n t f ( s t , " % f K\n",T); > void RSSend(x) char x [ ] ; i int i ; i f (Work) C i=0; while ((i<80)&&(x[i] != •\n')&&(x[i] != '\000')) < bioscom(1,x[i],0); i++; > i f ( ( x [ i ] == '\000')!|(x[i] == '\n')) bioscomd,'Xr-,0);> RSGet(Reply); /* printf("Response: %s\n",Reply); */ > void SetTemp(x) f l o a t x; tsprintf(st,"SK %6.2f\n",x);RSSend(st); TSet = x;> flo a t ReadPowO < f l o a t x; RSSend("PO\n"); sscanf(Reply,"%f",&x); printf("MMR Power: %7.3f ",x); return(x);> f l o a t TenipO { fl o a t x; ReadPowO; RSSend("TE\n"); sscanf(Reply,"%f",&x); p r i n t f ( " Temp: %7.3f ",x); D.Temp = 100 * x; return(x);> f l o a t Vacuo { f l o a t x; RSSend("VA\n"); sscanf(Reply,"%f",&x); return(x);> void Dacl(i) int i ; { f l o a t x; printf("What value to output to CH%d ? (V)\n",i); scanf("%f",&x); DAC(i,x); > void BlinkerO C int i ; p r i n t f ( " B l i n k e r \ n " ) ; printf("Delay? (ms): " ) ; scanf("%d".&i); printf("On for %d ms, off for %d ms\n",2*i,i); while(kbhit() == 0) { DiodeOn(O); detay(2*i); DiodeOff(O); d e l a y ( i ) ; /* SampleHold(O);*/ » void VBlinkerO <. int i ; printf("VBlinker\n"); printf("Delay? (ms): " ) ; scanf("%d",&i); printf("On for %d ms, off for %d ms\n",2*i.i); while(kbhit() == 0) C BitOut(TestBit,1); delay(2*i); BitOut(TestBit,0); d e l a y ( i ) ; » #define DMA Mode_Reg OxB #define DMA^Mode (char) 0x45 #define DMA_Byte_Reg Oxc #define DHA_Base_Reg 0x2 #define DMA_Count Reg 0x3 #define DMA Page_Reg 0x83 #define DMA2chan_Reg OxA #define DMA_Chan (char) 0x1 void Grab(chan,gain,typ) int chan, gain, typ; C int dum, period; char a,b; /* DMA of NConv Samples */ DMAgain = gain; i f (Home) GenFakeO; else { /* stop board */ outportb(CP,STOP); /* clear data port */ dum = inportb(DP); /* c l r errors */ PseD; Pse; outportb(CP,Clr Err); period = 1.0/(D.Freq*1.25e-6); i f (period < Per_Min) {printf("Too Fast...\n"); exit(99); > PseD; Pse; outportb(CP,SClk); PseD; outportb(DP, (char) (period & OxFF)); PseD; outportb(DP,(char) (period » 8)); PseD; Pse; outportb(DMA_Mode_Reg,DMA_Mode); outportb(DMA_Byte_Reg,(char)O); outportb(DMA_Base_Reg, a = (char) (((long) seg) & Oxff)); outportb(DMA Base_Reg, b = (char) (((unsigned long) ((((long) seg) » 8)& OxFF)))); outportb(DMA_Count Reg, a = (char) (((NConv*2)-1) & OxFF)); outportb(DHA_Count~Reg. b = (char) ((((NConv*2)-1 )»8) & OxFF)); a = (char) (^unsigned long) seg ) » 28); a &= OxOf; outportb(DMA_Page_Reg, a); outportb(DMA_Chan_Reg, DMA_Chan); /* setup */ outportb(CP,Set_AD); PseD; outportb(DP,(char)gain); PseD; /* set Chans */ outportb(DP,chan); PseO; outportb(DP,chan); PseD; /* set Nconv */ outportb(DP,(char) 5); PseO; /* not used */ outportb(DP,(char) 5); PseD; Pse; p r i n t f ( " F i r i n g the DMA\r"); switch (typ) { case BitOnAndRecord: BitOut(TestBit,1); break; case BitOffAndRecord: BitOut(TestBit,0); break; case TurnOnAndRecord: i f (RunFlg != 1) DiodeOn(O); break; case TurnOffAndRecord: i f (RunFlg != 1) DiodeOff(O); break; default: printf("Incorrect parameter in Grab\007\007\n"); > outportb(CP,(char) (Oxe | 0x10)); PseO; Pse; /* outportb(CP,(char) (RAD | DMA | FXClk | FXTrig));*/ /* FIRE */ i f (((dum = inportb(SP))&0x80)!=0) { pri n t f ( " E r r o r on DMA\n"); exit(88);> D.Time = TimeO; » #define CSIN (char) 0x4 #define CSOUT (char) 0x5 ^define CDIOOUT (char) 0x7 #define CDIOIN (char) 0x6 void DioSel(com,unit) int com, unit; { int dum; /* checked */ i f (Work) C /* stop board */ outportb(CP,STOP); /* clear data port */ dum = inportb(DP); /* c l r errors */ PseO; Pse; /* 2,4 */ outportb(CP,Clr_Err); /* setup */ PseO; Pse; outportb(CP,(char)com); PseD; outportb(DP,(char) u n i t ) ; PseO; Pse; dum = inportb(SP); i f (dum & 0x80) { pri n t f ( " E r r o r in Selection of port\n"); exit(99);>» int ReadDigO { int dum, dum2; i f (Work) i /* stop board */ outportb(CP,STOP); /* clear data port */ dum = inportb(DP); /* c l r errors */ PseD; Pse; /* 2,4 */ outportb(CP,Clr_Err); /* setup */ PseD; Pse; outportb(CP,CDIOIN); PseD; outportb(DP,(char) 0); PseRD; dum2 = inportb(DP); PseD; Pse i f ((dum = inportb(SP)) & 0x80) { print f ( " E r r o r in Selection of input port\n"); ) else dum2 = 0; return(dum2); > int WriteDig(x) int x; < int dum; i f (Work) { /* stop board */ outportb(CP,STOP); /* clear data port */ dum = inportb(DP); /* c l r errors */ PseO; Pse; /* 2,4 */ outportb(CP,Clr_Err); /* setup */ PseD; Pse; outportb(CP,CDICX)UT); PseO; outportb(DP,(char)1); PseD; outportb(DP,(char)x); PseD; Pse i f ((dum = inportb(SP)) & 0x80) { printf("Error in Selection of output port\n"); > else dum = 0; return(dum); } void DIOInitO t /* see DT2801 12-3 */ DioSel(CSIN,0); DioSeUCSOUT, 1 ); > void I n i t A l l O < DAC(0,0.0); DAC(1,0.0); RSInitO; DIOInitO; WriteDig(O); d e l a y ( l ) ; > fl o a t MTempO i f l o a t x; x = TempO; p r i n t f ( " \ n " ) ; return(x);> void Headers(ttl) char t t l [ ] ; < char st[200]; int x, y; i f ((XB - XA)>200) fx = YA; y = XA + 15; i f ((XA==0)&&(XB==700)) <:mmoveto(y,x +=5); mouttext(ttl);> mmoveto(y,x +=20) s p r i n t f ( s t , " Time: %11lu Temp: %5.2f Run: %d ADGn: %d", D.Time,D.Temp/100.0,Run,GlobGn); mouttext(st); > > void DisplayBlockO { float lengthy,sex; int ya, yb, xa, xb. Ran, detect, gmode, minim; long i i ; ya = yb = GetVal(O); for (ii=1;ii<NConv;ii+=100) < xb = Ge t V a l ( i i ) ; i f (xb > yb) yb = xb; i f (xb < ya) ya = xb; > lengthy = 347.0 / (1.5 * (yb - ya)); minim = ya; Ran = ( i n t ) (100.0 * (yb - ya) / 4096.0); yb = 347 - ((GetVal(0)-minim)*tengthy); sex = 700.0/NConv; xb = 0; detect = 0; initgraph(&detect,&gmode,GLOC); mline (0,174,600,174); mline (0,347,0,0); for (ii=0;ii<NConv;ii+=100) { ya = yb; xa = xb; xb = i i * s c x ; yb = 347 - ((GetVal((int)ii)-minim)*lengthy); mline(xa,ya,xb,yb);> XA = YA = 0; XB = 700; YB = 374; Headers(" DisplayBlock of Transient DMA " ) ; MyPseO; elosegraphO; printf("DisplayBlock: Range used was %d per cent\n",Ran); > void DisplayRec(md, IXA, IXB, lYA, l Y B , i i , i j ) int md,IXA,IXB,lYA,lYB,ii,ij; { f l o a t lengthy.scx; char t i t U l O O ] ; long int ya, yb, xa, xb, i , j , m, n, midi, minim, VS, *Tmp; i f (RunFlg != 1) Tmp = AccDat; else Tmp = CurDat; ya = yb = Tmp CO]; i f (SizeSemi < 0) SizeSemi = -SizeSemi; i f (ddb == 1) printf("Sz %d\n",SizeSemi); for (i=1;i<SizeSemi;i+=2) < xb = TmpCi]; i f (xb > yb) yb = xb; i f (xb < ya) ya = xb; i f ((ddb == 1)&&((i%100)==0)) p r i n t f ( " % d %ld\n",i,xb); > i f (ddb == 1) pr i n t f ("ya: % l d yb: % l d Sz %d\n",ya,yb,SizeSenii ); lengthy = (lYB - lYA) / (1.5 * (yb - ya)); minim = ya; XA = IXA; XB = IXB; YA = lYA; YB = lYB; midt = (YA + YB)/2; i f (ddb == 0) { mline (XA,(int)midl,XB,(int)midl); mline (XB,YB,XB,YA); > yb = YB - ((Tmp[0]-minim)*lengthy); i f (md == 2) C sex = (XB - XA)/1100.0; VS = 200;> else <: sex = (XB-XA)/((float)SizeSeiiii); VS = SizeSemi; > xb = XA; i = XA + (FstBlk * sex); mline({int)i,YB,(int)i,YA); i = XA + (SeeBlk * sex); mline((int)i,YB,(int)i,YA); i = XA + ( i j * sex); mline((int)i,YB,(int)i,YA); i = XA + ( i i * sex); mline((int)i,YB,(int)i,YA); i f ( i l o e != 9999) { i = XA + ( i l o e * sex); j = XA + (floe * sex); m = YB - ((iht-minim)*lengthy); n = YB - ((fht-minim)*lengthy); m l i n e ( ( i n t ) i , ( i n t ) m , ( i n t ) j , ( i n t ) n ) ; i l o e = 9999; > for (i=1;i<VS;i++) { ya = yb; xa = xb; xb = XA + ( i * s c x ) ; yb = YB - ((TmpCi]-minim)*lengthy); mline((int)xa,(int)ya,(int)xb,(int)yb); > switeh (md) { ease 0: HeadersC CheekSig DisplayRee of Transient DHA ");break; case 1 : HeadersC DisplayRee of Transient DMA " ) ; break; case 2: s p r i n t f ( t i t l , " DisplayRee of Instrumental P r o f i l e (%s)",IPfnam); Headers(titl); break; > > flo a t CalcStd(Dat,Num) long Dat[]; int Num; { /* pin t a i l , empt std */ long m; float x, Std, Avg; Avg = 0.0; for (m=SizeSemi-1000;m<SizeSemi;m++) Avg += DatCm]; Avg /= 1000.0; Std = 0.0; for (m=SizeSemi-1000;m<SizeSemi;m<-+) { x = Dat [m] - Avg; Std += sqr(x); > Std = sqrt(Std)/1000.0; for (ttFO;m<SizeSemi;m++) DatCm] -= Avg; /* could optimise t h i s */ return((Std+1.0)/Num); >/*!*/ void MakeRecO { /* Semi-compress */ long m; printfC'In MakeRec " ) ; for (m=0;m<100;m<-+) { CurDatlm] = GetVal((int)m); > SizeSemi=100; for (m=101;m<NConv;m<-=4) { i f (SizeSemi < SzSmiMx) { CurDat[SizeSemi] = (GetVal((int) m) + GetVal((int) (m - 1)) + GetVal((int) (nn-1)) + GetVal((int) (m +2)))/4; SizeSemi++; » CurStd = CaleStd(CurDat,1); /* mod'd */>/*! */ void DispDat(md) int md; t int x, y; int detect, gmode, mmd; mmd = md; i f (md > 2) md = 0; i f (ddb == 0) C detect = 0; initgraph(&detect,&gmode,GLOC); > DisplayRec(md,0,600,0,300,0,0); y = x = 0; mmoveto(y+50,x +=10); mouttextC'--- DMA Transients - - - " ) ; nmoveto(y,x +=40); s p r i n t f ( s t , " Freq: %6.0fhz Diode: %1d K427Gn: %9.3e V/A", D.Freq,D.Dreq,D.K427Gn); mouttext(st); mmoveto(y, x+=10); s p r i n t f ( S t , " PC = %7.3f nA Dark = %7.3f nA Net = %7.3f nA", nAV(Raws i g,ARaw),nAV(RawS i g,BRaw), nAV(RawSig,ARaw) - nAV(RawSig,BRaw)); mouttext(st); mnioveto(y, x+=10); spr i n t f ( S t , " ADGn %1d Diode I: %6.2f itiA Voltage: %6.3fV", D.ADGain, D.Ireq*1000.0, D.Vreq); mouttext(st); mmoveto(400,10); mouttext(GlobNam); i f (mmd > 2) { i f (md < 4) MyDump(45); else MyDump(30); > else { i f (FlagCon == 0) C f l u s h a l U ) ; getcharO; getchar();> else delay(5000);> i f (ddb == 0) closegraphO; > void WritAsc(temp,m,fIg) floa t temp; int m,flg; /* 100 pts at 50 us, 50 at 400us */ /* (sizesemi - 201)/20 pts at 20x4x50 us = 4 ms */ { FILE *fp, *fopen(); char fnamCSO]; int i , j , k ; long int imx,imn, j j , *Tmp, acc; D.Ireq = Ireq; i f (m==-1) < i f ( f i g != 1) sprintf(fnam,"R%dF%1d",Run,(int)temp); else sprintfCfnam,"R%dM%1d",Run,(int)temp),•> else sprintf(fnam,"R%dA%1d %d",Run,(int)temp,m); i f ((fp = fopen(fnam,"w"))==NULL) { printf(»\007Error in open of f i l e %s\n",fnam); exit(99); > printf("Writing to f i l e '%s' ",fnam); f p r i n t f ( f p , " % d %d %d % f % f \ n " . /* MPar*/ 27, SizeSemi, Run, AccStd,QI); f p r i n t f ( f p , " % f % f % f % f %f\n",D.Ireq,D.Vreq,D.Vsensed, D.Freq,D.Temp); f p r i n t f ( f p , " % f % f % f \ t % f %f\n",nAV(RawSig,ARawL), nAV{RawSig,ARaw), nAV(RawSig,Astd), nAV(TransL,ATranL), nAV(TransL,ATran)); f p r i n t f ( f p , " % f % f % f \ t % f %f\n",nAV(RawSig,BRawL), nAV(RawSig,BRaw), nAV(RawSig,Bstd), nAV(TransL,BTranL), nAV(TransL,BTran)); i f ( f i g != 1) { /* OTCS Write_Ascii */ i f (m<1) < Tmp = AccDat; p r i n t f ( " (Writing Accumulator)\n");> else { Tmp = CurDat; printf("(Writing Current Data)\n"); > imx = imn = Tmp[0]; for (i=1;i<SizeSemi;i++) i j j = Tmp[i]; i f (jj> imx) imx = j j ; i f (jj< imn) imn = j j ; > f p r i n t f ( f p , " % d %d % l d %e %d %d % l d %ld\n", D.Dreq,D.ADGain,D.Time,D.K427Gn,NumAcc,NoGnCh,imx,imn); for (i=0;i<100;i++) { f p r i n t f ( f p , " % l d ",Tmp[i]); i f (((i+1) % NumPad)==0) f p r i n t f ( f p , " \ n " ) ; > fprintf(fp,"\n\n"); for (i=100;i<200; i+=2) i acc = 0; for (j=0;j<2;j++) t acc += Tmp[i+j]; > f p r i n t f ( f p , " % l d ",acc); i f (((i+2) % NumPad)==0) f p r i n t f ( f p , " \ n " ) ; > fprintf(fp,"\n\n"); for (i=201;i<SizeSenii; i+=20) { acc = 0; for (j=0;j<20;j++) { acc += Tmp[i+j}; > f p r i n t f ( f p , " % l d ",acc); i f (((i-221) % 200)==0) f p r i n t f ( f p , " \ n " ) ; } > else { p r i n t f ( " (Writing DMA data) % l d entries\n",(long)NConv); imx = imn = GetVal(O); for (i=1;i<NConv;i++) i j j = GetVal(i); i f (jj> imx) imx = j j ; i f (jj< imn) imn = j j ; > f p r i n t f ( f p , " % d %d % l d %e %d %d % l d %ld\n", D.Dreq,O.ADGain,D.Time,D.K427Gn,NumAcc,NoGnCh,imx, imn); for (jj=0;iJ<NConv;jj++) { fp r i n t f ( f p , " % x " , G e t V a l ( ( i n t ) j j ) ) ; i f (((jj+1) % NuniPad)==0) f p r i n t f ( f p , " \ n " ) ; > fpr i n t f ( f p , " \ n \ n " ) ; > f c l o s e ( f p ) ; > void WritAsc2(temp,iii) f l o a t temp; int i i i ; /* 100 pts at 50 us, 50 at 400us */ /* (sizesemi - 201)/20 pts at 20x4x50 us = 4 ms */ < FILE *fp, *fopen(); char fnam[80]; int i , j , k ; long int imx,imn, j j , *Tmp, acc; D.Ireq = Ireq; /* F i r s t the LOG f i l e */ spr i ntf(fnam,"Log%1d",Run); i f ( ( f p = fopen(fnam,"a"))==NULL) < printf("\007Error i n open of f i l e %s\n",fnam); exit(99); } printf("Writing to f i l e '%s' ",fnam); f p r i n t f ( f p , " % f % f % f % f -%f\n",D.Ireq,D.Vreq,D.Vsensed, D.Freq,D.Temp); i f ( f e r r o r ( f p ) ) { printf("\007\007Warning - F i l e error\n"); e x i t ( 9 ) ; > fcl o s e ( f p ) ; p r i n t f ( " (Writing DMA data) % l d entries\n",(long)NConv); /* And now the data */ i f ( i i i == 0) sprintf(fnam,"V%dF%1d",Run,(int)temp); else sprintf(fnam,"W%dF%1d",Run,(int)temp); i f ( ( f p = fopen(fnam,"wb"))==NULL) C printf("\007Error in open of f i l e %s\n",fnam); exit(99); ) print f ( " W r i t i n g to f i l e '%s' ",fnam); fwrite(seg, ( s i z e _ t ) 2, (si z e _ t ) NConv, fp); fc l o s e ( f p ) ; > void WritAsc3() { F I L E *fp, *fopen(); char fnam[80]; int i , j , k ; long int imx,imn, j j , *Tmp, acc; D.Ireq = Ireq; /* F i r s t the LOG f i l e */ spri ntf(fnam,"Log%1d".Run); i f ( ( f p = fopen(fnam,"a"))==NULL) t printf("\007Error in open of f i l e %s\n",fnam); exit(99); > printf("Writing to f i l e '%s' ",fnam); f p r i n t f ( f p , " - 9 % f % f % f -%f\n",D.Ireq,D.Vreq,D.Vsensed, D.Freq,D.Tennp); i f ( f e r r o r ( f p ) ) t printf("\007\007Warning - F i l e error\n"); e x i t ( 9 ) ; } fclo s e ( f p ) ; p r i n t f ( " (Writing DMA data) % l d entries\n",(long)NConv); /* And now the data */ spr i ntf(fnam,"E%dF%1d",Run,(i nt)(D.Vreq)); i f ((fp = fopen(fnam,"wb"))==NULL) { printf("\007Error in open of f i l e %s\n",fnam); exit(99); > printf("Writing to f i l e '%s' ",fnam); fwrite(seg, ( s i z e _ t ) 2, (size t) NConv, fp); fc l o s e ( f p ) ; > void ReadAsc(temp,run) floa t temp; int run; /* 100 pts 50 us, 50 at 400us */ /* (sizesemi - 201)/20 pts at 20x4x50 us = 4 ms */ { FILE *fp, *fop€n(); char fnamCSO]; int i , j , k ; long int imx, imn, *Tmp, acc; D.Ireq = Ireq; i f (RunFlg != 1) sprintf(fnam,"R%dF%1d",run,(int)temp); eIse sprintf(fnam,"R%dM%1d",run,(int)temp); i f ( ( f p = fopen(fnam,"r"))==NULL) { printf("\007Error i n open of f i l e %s\n",fnam); exit(99); > printf("Reading from f i l e '%s'\tNote scale change (by 20)\n",fnam); fscanf(fp,"%*d %d %d % f % f " , /* NPar 26,*/ &SizeSemi,&Run,&AccStd,&QI); fscanf(fp,"%f % f % f % f %f",&D.Ireq,&D.Vreq,&D.Vsensed,&D.Freq,&D.Temp); fscanf(fp,"%f % f % f % f %f",&ARawL, &ARaw, &Astd, &ATranL, SATran); fscanf(fp,"%f % f % f % f %f",&BRawL, &BRaw, &Bstd, &BTranL. &BTran); fscanf(fp,"%d %d % l d %e %d %d % l d % l d " , &D.Dreq,&D.ADGain,&D.Time,&D.K427Gn,&NumAcc,&NoGnCh,&)mx,&imn); for (i=0;i<100;i++) { fscanf(fp,"%ld ",&AccDat[i]); AccDatCi] *= 20; > for (i=0;i<50; i++) { fscanf(fp,"%ld ",&AccDat[i + 100]); AccDatli + 100] *= 10;> j=150; i f (SizeSemi > SzSmiMx) SizeSemi = SzSmiMx; /* just in case has changed */ for (i=201;i<SizeSemi; i+=20) { fscanf(fp,"%ld ", &AccDat[j++]); > printf("Number of points read: %d\n",SizeSemi = - j ) ; f close(fp); } void AskMeO { f l o a t x; printf("\nAdjust the signal\nK427 Gain i s %11.3e V/A\n",D.K427Gn); printf("Enter K427_Gain, (0 for no change, -ve for setpoint alteration\n"); scanf("%f",&x); i f ( X < 0.0) < X = -x; printf("Ignore future desires to increase gain? (0 or 1) " ) ; scanf("%d",&PssOff); printf("Voltage at which a EGG gain increase i s requested i s : %f\n",CritRL) printf("Default i s 0.6, new value? " ) ; scanf("%f",&CritRL); printf("Voltage at which a EGG gain decrease i s requested i s : %f\n",CritRL) printf("Default i s 8.0, new value? " ) ; scanf("%f",&CritRH); > i f ( X != 0.0) { D.K427Gn = x; > > void GetMM(Gn,Mx,Mn) fl o a t *Mn, *Mx; int Gn;<: /* ! */ long i ; int iMx, iMn, ttm; floa t tm; iMx = iMn = GetVal(O); for (i=100; i<NConv; i+=100) { ttm = G e t V a l ( ( i n t ) i ) ; i f (ttm > iMx) iMx = ttm; i f (ttm < iMn) iMn = ttm; *Mn = CVolt(Gn,iHn); *Mx = CVolt(Gn,iMx); i f (Tranin == TransH) t *Mn /= 20.0; *Mx /= 20.0; > > #define Okin 3 #define OkSt 4 #define TooH 5 /* see philosophy note in InP #5 */ int ScalR(Gain1,Tran1,cnt) int *Gain1,*Tran1,cnt; < f l o a t Vmx, Vmn; int r, g, t , SE; pri n t f ( " S c a l e r - Scanning ARaw %fV BRaw %fV\n",ARaw,BRaw); g = *Gain1; t = *Tran1; *Tran1 = TransL; GetMM(*Gain1,&Vmx,&Vmn); printf("Vmn i s : %7.3f Vmx is : %7.3f Span i s %4.0f%\n", Vmn, Vmx, fabs((Vmx - Vmn)*100.0*GainVal[*Gain1]/20.0)); i f (fabs(Vmn) > fabs(Vmx)) Vmx = Vmn; Vmx = fabs(Vmx); /* Check for Ovid of Transient signal proccessor */ i f (Vmx >= fabsCVClip * SPGain[*Tranl])) { printf("Warning: clipping present in transient\007\n"); > SE = TooH; i f ((rV(RawSig,fabs(ARaw)) < CritRL)&&(D.K427Gn < 1e9)) SE = Okin; /* largest signal would allow xlO */ else i f (rV(RawSig,fabs(ARaw)) < CritRH) SE = OkSt; /* better stay put */ /* Check for best ADC and EGG gain ranges */ i f (OkIn && PssOff) SE = OkSt; /* PssOff w i l l not stop a decrease in Gn */ switch (SE) C case OkIn : printf("Pre-Amp Gain i s too low\n"); r = 3; *Gain1 = 0; break; case TooH : printf("Pre-Amp Gain is too high\n"); r = 2; *Gain1 = 3; break; case OkSt : p r i n t f ("Pre-Amp gain i s OI<\n"); r = 0; i f (cnt == 0) C printf("Picky mode scaler\n"); *Gain1 = 3; /* +/-1.25 */ i f (Vmx > 1.0) *Gain1 = 2; /* +/- 2.5 */ i f (Vmx > 2.0) *Gain1 = 1; /* +/- 5.0 */ i f (Vmx > 4.0) *Gain1 = 0; /* +/- 10.0 */ i f (!((g == *Gain1)&&(t == *Tran1))) r = 1; > else { printf("Relaxed mode scaler\n"); r = 0; i f (Vmx > 9.88) { printf("Transient signal too large - sorry Hiroshi\n"); p r i n t f ( " C l i p p i n g w i l l occur\n\007\n"); » break; default : printf("Case error\n"); exit(88); > return(r);> /* ! */ void StartSampO C p r i n t f ( " I n StartSamp " ) ; SampleHold(500); BRawL = BRaw; BTranL = BTran; BRaw = rV(RawSig,SVAD Inin(RawSig)); Bstd = rV(RawSig,SVADStd); BTran = rV(TransL,SVAD Imm(TransL)); i f (RunFlg != 1) Ton = DiodeOn(O); >/*!*/ void PadOutO { int i = 0; whi le(((Time() - Ton)/CLK_TCK) < San^jPeriod) i=1; i f (i==0) p r i n t f ( " E r r o r - overrun on sampling time\n"); >/*!*/ void ProcRec(j) int j ; i int i ; long mm; flo a t Chi, x; p r i n t f ( " \ n l n ProcRec(%d) " , j ) ; i f (j==1) { /* then load accumulator */ NumAcc = 1; printf("LoadingXn"); AccStd = CurStd; for (i=0;i<SizeSemi;i++) AccDatCi] = CurDat[i]; > else C long Avg; /* Compare, accumulate i f a l l right, otherwise write */ printf("Comparing - NumAcc %d SizeSemi %d ",NumAcc,SizeSemi); Chi = X = 0.0; for (i=0;i<SizeSemi;i++) C x = ( f l o a t ) AccDatCi]; x /= NumAcc; X = ( ( f l o a t ) CurDatCi]) - x; Chi += sqr(x); > printf("Chi %f\n\t",Chi = sqrt(Chi/(sqr(AccStd) + sqr(CurStd)))/SizeSemi); i f ((Chi > 3.0)1l(Toggled)) { printf("Anomaly\007\t"); WritAsc(T,j,RunFlg); printf("Resetting..."); AccStd = CurStd; NumAcc = 0; for (i=0;i<SizeSemi;i++) AccDatCi] = 0; > printf("AccumulatingU"); mm = 0; for (i=0;i<SizeSemi;i++) < AccDatCi] += CurDatCi]; i f (labs(AccDat[i]) > mm) mm = labs(AccDat Ci] ); > NumAcc++; AccStd = CalcStd(AccDat,NumAcc); QI=mm/(AccStd + 0.5); Avg = 0; for (i=SizeSemi-1000;i<SizeSemi;i++) Avg += AccDatCi];Avg /=1000; printf("Tail(AccDat) centred on: % l d with extremum %ld\n",Avg,mm); i f (Avg > (2 * AccStd)) printf("Seems large\007\n"); > >/*!*/ void RecordSigs(T,cnt,fIg) floa t T; int c n t , f i g ; { int NOk, OldAD; f l o a t OldPre.PC; i f ( f i g != 1) p r i n t f ( " I n RecordSigs (OTCS Mode)\n"); else p r i n t f ( " I n RecordSigs (LFO Mode)\n"); i f (fabs((TTeiiip = MTemp())-T) > 0.2) printf("\nError i n Temperature - drifting\007\n»); NOk = 0; PC = rV(RawSig,SVAD_Imm(RawSig)); i f (rV(RawSig,fabs(PC)) > CritRH) t p r i n t f ( " I t may be a good idea to decrease the gain on the K427\007\n"); AskMeO; > i f (cnt == 0) { ARawL = ARaw; ATranL = ATran; ARaw = rV( Raws i g , SVAD Iinii(RawSig)); ATran = rV(TransL,SVAD_Iinii(TransL)); > else { while (NOk == 0) { NOk = 1; ARawL = ARaw; ATranL = ATran; ARaw = rV(RawSig,SVAD IimKRawSig)); Astd = rV(RawSig,SVADStd); pri ntf("StDev(ARaw)= %f\n",Astd); i f ((fabs(ARaw - ARawL)/(SVAOStd + 0.025)) > 2.0) { printf("Appears to be drift/wobbles in PC - " ) ; i f (PCWor) { p r i n t f ( " I w i l l hold for 30s\007\n"); delay(30000); NOk = 0;> else { printf("No worries\n");> > ATran = rV(TransL,SVAD_Imm(TransL)); » Toggled = 0; /* fl a g ' i l l i c i t ' gain changes as indicating anomalies */ do { D.Temp = MTempO; D.Dreq = Dreq; OldAD = Gainin; OldPre = D.K427Gn; Grab(TranIn, Gainin, TurnOffAndRecord); NOk = ScalR(&GainIn, STranln, cnt); D.ADGain = Gainin; switch(NOk) < case 0: printf("Parameters sufficed (Tran%d and ADC %d)\n", Tranin,Gainin); break; case 1: printf("\tNeed new channel or ADC gain - repeating\n"); PadOutO; StartSampO; Toggled = 1; break; case 2: i f (NoChang) { printf("Would have liked to decrease the PreAmp gain\n"); NOk = 0; Gainin = 0; > else { printf("\tDecrease PreAmp Gain - Enter when ready\007\n"); AskMeO; PadOutO; StartSampO; PadOutO; ARaw = rV(RawSig,SVAD_Ifflm(RawSig)); Toggled = 1;> break; case 3: i f (NoChang) { printf("Would have liked to increase the PreAmp gain\n"); NOk = 0; Gainin = 3; > else { printf("\tlncrease PreAmp Gain - Enter when ready\007\n"); AskMeO; PadOutO; StartSampO; PadOutO; ARaw = rV(RawSig,SVAD_Innm(RawSig)); Toggled = 1;> break; > > while (NOk); /* not even timing? */ i f <(flg != 1)&&((0ldAD != Gainin) || (D.K427Gn != OldPre))) C flo a t xx; int i i ; X X = (GainVal[Gainin] * D.K427Gn)/(GainVal[OldAD] * OldPre); printf("RescaIing acquired data, multiplying by factor of: %f\n",xx); for (ii=0;ii<SizeSemi;ii++) AccDat[ii] *= xx; printf("Done\n"); AccStd *= xx; NoGnCh = 1; > MakeRecO; >/*!*/ void TestsO { fl o a t x,y,z; char fnam[80]; int i , j , i n , o u t ; unsigned a,b,c; int detect, gmode; RSInitO; i=0; while (i> -1) { prin t f ( " S e l e c t : \ n " ) ; printf("1 - Read an ADC 2 - BitOut 3 - Set Voltage\n"); pr i n t f ( " 4 - Set Current 5 - DAC Channel 0 6 - DAC Channel 1\n"); p r i n t f ( " 7 - C0M1 Send/Rec 8 - Connect with MMR 9 - Read Temperature\n"); printfC'IO- Read Vacuum 11- BIi nker 12- VBlinker\n"); printf("13- MakeRec 14- DMA Test 15- General I n i t \ n " ) ; printf("16- DIO I n i t 17- Set Clock 18- Select DiodeW); printf("19- Diode On 20- Diode Off 21- Write DMA Block (E)\n"); printf("22- 23- 24- Display DMA Block\n"); printf("25- Display Vector 26- Recordsigs 27- Test SystemXn"); printf("28- Set Frequency 29- Read Vector 30- Display Vector \n"); printf("31- Recap 32- 33- \n"); printf("34- Toggle Invert 35- 36- \n"); printf("37- Set Temperatur 38- Read Power 39- Smart Read ADC\n"); printf("40- Test Sig.Pr. 41- P r o f i l e Instr -1- Halt TestsXn"); printf("Outbyte i s %x\n",outbyte); scanf("%d",&i); switch ( i ) { case 1 : printf("Which ADC (0-7)? : " ) ; scanf("%d",&j); printfC'With what gain code (0,1,2,3)? : " ) ; scanf("%d",&a); X = VAD_Imni(j,a); printfC'ADC Value is % f V\n",x); break; case 2 : printf("BitOut:\nEnter BitNum, BitVal: " ) ; scanf("%d %d",&j,&a); BitOut(j,a); printf("Done\n"); break; case 3 : printfC'Set Voltage:\nEnter V : " ) ; scanf("%f",&x); SetPower(x); break; case 4 : printf("SetCurrent:\nEnter # of mA : " ) ; scanf("%f",8.x); SetCurrent(x/1000.0); break; case 5 : DacI(O); break; case 6 : Dacl(1); break; case 7 : printf("Enter Command: " ) ; scanf("%s",Reply); RSSend(Reply); break; case 8 : printf("Dumb Terminal - escape with '~'\n"); in = 0; while ( in != '"') { j = bioscom(3, (char) 0,0); i f ( j & DATA_READY) i f ((out = bioscom(2,(char)0,0) & 0x7f) != 0) putch(out); i f (kbhitO) { in = getchO; bioscom(1,(char) in,0); » case 9 : pr i n t f ("Temperature i s % f \ n " , TempO); break; case 10: pr i n t f ("Vacuum i s % f mT\n",VacuO); break; case 11: B l i n k e r O ; break; case 12: VBlinkerO; break; case 13: printf("MakeRec\n"); MakeRecO; break; case 14: p r i n t f ( " I n i t i a t i n g DMA\nEnter channel, gain code:"); scanf("%d %d",&j,&a); SampleHold(500); Grab(j,a,TurnOffAndRecord); printf("Done\nDo you wish the data printed? (0/1): " ) ; scanf("%d",&j); i f (j==1) for (j=0;j<NConv;j++) { c = ((a=seg[2*j])&0xff) + ((((b=(seg[(2*j)+1] ))«8)&OxffOO)); X = c * (10.0 / (4096.0 * GainVaUa])); printf("%4d %5x %5x %5x\t %f\n", j , a, b, c, x); > case 15: pr i n t f ("General I n i t \ n " ) ; I n i t A l l O ; break; case 16: printf("DIO I n i t \ n " ) ; DIOInitO; break; case 17: printf("Set Clock\nCurrent frequency is %d hz\n",D.Freq); printf("Enter frequency (hz): " ) ; scanf("%d",&j); i f (j<1) D.Freq=FreqDf; else D.Freq=j; Set_Clk(D.Freq); break; case 18: printf("SelectDiode:(Valid I f f Connected)\nEnter Diode (0-2): " ) ; scanf("%d",&a); SelectDiode(a); break; case 19: DiodeOn(O); printf("Selected Diode is now on\n"); break; case 20: DiodeOff(0);printf("Selected Diode i s now off\n"); break; case 21: printf("Enter Voltage: " ) ; scanf("%f",&D.Vreq); WritAsc3(); break; case 22: printf("Enter Run #: " ) ; scanf("%d",&Run); break; case 24: pr i n t f ("Display DMA Block\n"); DisplayBlockO; pri n t f ("Done\n"); break; case 25: printf("Display Vector\n"); detect = 0; initgraph(&detect,&gfflode,GLOC); DisplayRec(0,0,700,0,374,0,0); getcharO; getcharO; elosegraphO; printf(»Done\n"); break; case 26: printf("RecordSigs\n"); RecordSigs(T); printf("Done\n"); break; case 28: printf("Set Frequency as? : " ) ; scanf("%f",&D.Freq); break; case 29: printf("What Temp, Run? " ) ; scanf("%f %d",&T,&Run); ReadAsc(T,Run); case 30: DispDat(O); break; case 31: printf("RecapXnWhat Run, Tmin, Tmax, Tst? " ) ; scanf("%d %d %d %d",&Run,a,b,c); for ( i n = a;in<=b;in+=c) { ReadAsc((float)in,Run); DispOat(0);> break; case 34: Inverting = (Inverting; printf("Assuming a"); i f (Inverting) p r i n t f ( " n Inverting Amplifier\n"); else p r i n t f ( " Non-Inverting Amplifier\n"); break; case 37: printf("Set Tenp as ? " ) ; scanf("%f",&T); SetTemp(T); break; case 38: p r i n t f ("Read Power as %fW\n", ReadPowO); break; case 39: printf("Smart read\nEnter Channel " ) ; scanf("%d",&j); printf("ADC(%d) = %7.4f\n",j,x = SVAD_Imm(j)); printf("ADC(%d) = %7.4f (Corrected)\n",j,rV(j,x)); break; case 40: { fl o a t I C l i p , Resist, Rawold, Rawnew, Trannew, ARawold, ARawnew, ATrannew; pri n t f ( " S i g n a l Processor Test\n"); printf("Connect:\n DAC0->R ("'1Mohm)->Vin_EGG\n"); p r i n t f ( " \ t p l u s the standard connnections:\n\n"); p r i n t f ( " Raw_0ut->ADCO, TransL->ADC1, OutPut K427->Raw_In\n"); printfC'Enter K427Gn, R: \n"); scanf("%f %f",&D.K427Gn,&Resist); while (Resist > 0.0) { z = 0.0; printf("RS_exp RS_act RSn_exp RSn act TR_exp TR_act\n"); for (i=0;i<10;i++) { IC l i p = 1e9 * VClip / D.K427Gn; DAC(0, Rawold = (randO & Oxff) * .03); /* Set a voltage */ SanipleHold(500); ARauold = nAV(RawSig,SVAD Imm(RawSig)); DAC(0, Rawnew = Rawold + ((rand() & Oxff)*0.004)); /* set another V */ Rawold *= 1e9 / Resist; Rawnew *= 1e9 / Resist; /* convert to nA */ ARawnew = nAV(RawSig,SVAD_Inm(RawSig)); Trannew = ARawnew - ARawold; ATranneu = nAV(TransL,SVAD_Iiiiii(TransL)); i f (Trannew > IClip) Trannew = IClip ; i f (Trannew < -IClip) Trannew = - I C l i p ; printf("%7.2f %7.2f %7.2f %7.2f %7.2f %7.2f\n", Rawold,ARawold,Rawnew,ARawnew,Trannew, ATrannew); z += sqr(Trannew - ATrannew); > printfC'Stdev on TransL was %f\n",sqrt(z/10.0)); printfC'Enter K427Gn, R: \n"); scanf("%f %f",&D.K427Gn,&Resist); > > break; case 41: printf("Record Instrunent P r o f i l e \ n " ) ; printf("Connect BitO through Resistor ("1H) to K427(~1e5)\n"); printf("Enter 'Code' temperature when ready: " ) ; scanf("%f",&x); p r i n t f ( " S e l e c t i n g , setting SH, GrabbingXn"); SelectDiode(O); DiodeOff(O); SampleHold(500); Grab(TransL, 0, TurnOffAndRecord); OisplayBlockO; MakeRecO; /* WriteOut(x);*/ break; case -1: printf("End of Tests\n"); break; default: printf("Entry not found\n"); ) > > #if 0 void AdjCur(rat) flo a t rat; C float Vpc, Vd, x, IDelta; s t a t i c f l o a t ox; int cnt = 0;/* Adjust current to make (Vpc - Vd)/Vd = RunRat */ Igues = IDelta = 2e-6; do < /* Binary search our way in */ cnt ++; SetCurrent(Igues); DiodeOn(5); Vpc = SVAD Imm(RawSig); i f (rV(RawSig,fabs(Vpc)) > CritRH) { printf("Warning\007: Ovid possible, decrease gain\n"); AskMeO; Vpc = SVAD Iniii(RawSig); > i f ((rV(RawSig,fabs(Vpc)) < CritRL)&&(D.K427Gn < 1e9)) { printf("Warning\007: increase i n gain possible, please do\n"); AskMeO; Vpc = SVAD_Inm(RawSig); > DiodeOff(5); Vd = SVAD_Inni(RawSig); x = ((Vpc - Vd)/Vd) - rat; i f ( ( X > 0.0) && (cnt == D ) { printf("Cannot do much better than this...\n"); break; > i f ( ( X * ox) >= 0.0) IDelta *= 1.4; i f ( ( X * ox) < 0.0) IDelta *= -0.5; printfC'AdjCur: Igues: %eA (%eA) Vpc: %7.3f Vd: %7.3f x: %7.4f\n", Igues, IDelta, Vpc, Vd, x); ox = x; Igues += IDelta; i f (Igues > 18.0e-3) Igues = 18.0e-3; i f (Igues < 0.0 ) Igues = 1e-5; > while ((fabs(x) > (0.1*rat))&&(cnt < 20)&&(fabs(IDelta) > 5e-7)); > #endif void AdjCur(rat) flo a t rat; { float Vpc, Vd, x, IDelta; int cnt = 0;/* Adjust current to make (Vpc - Vd)/Vd = RunRat */ Igues = IDelta = 0.01; Vd = SVAD_Iim)(RawSig); do { /* Ramp up */ cnt ++; SetCurrentdgues/IOOO.O); DiodeOn(O); Vpc = SVAD_Imm(RawSig); i f (rV(RawSig,fabs(Vpc)) > CritRH) { printf("Warning\007: Ovid possible, decrease gain\n"); AskMeO; Vpc = SVAD_Imm(RawSig); > i f ((rV(RawSig,fabs(Vpc)) < CritRL)&&(D.K427Gn < 1e9)) C printf("Warning\007: increase in gain possible, please do\n"); AskMeO; Vpc = SVAD Iinn(RawSig); > X = ((Vpc - Vd)/Vd) - rat; i f ( ( X > 0.0) && (cnt == D ) <: printf("Cannot do much better than this...\n"); break; > printf("AdjCur: Igues: %7.5f mA (%7.5fmA) \nVpc: %7.3f Vd: %7.3f x: %7.4f\n", Igues, IDelta, Vpc, Vd, x); Igues += IDelta; i f (Igues > 18.0) Igues = 18.0; > while ( ( X < (0.1*rat))&&(cnt < 1000)); J void mainO { int i , j ; f l o a t Iset; D.Freq = FreqDf; printf("LOKI%d\nNow attempting the great 128K memory snatch\n",Version); printf("Coreleft i s % l u \ n " , f a r c o r e l e f t O ) ; #if Home printf("Warning: Set for Home Use!! Do not use at work (PSE)\n"); getcheO; getcheO; #endif I n i t A l l O ; #if ndbg i f ((segor = (char far *) farmalloc((long)0x20000)) == NULL) {printf("No Go\007 - Don't use DMA\n"); seg = segor = NULL; } else { seg = (char far *) ((( unsigned long) segor) » 28); seg = (char far *) ((((unsigned long) seg) + 1) « 28); p r i n t f ( " A l l o c a t i o n successful I \tseg: % l x segor: %lx\nOT2801 status: ", seg, segor); > i = inportb(SP); i f ( ( i & Ox70)!=0) { p r i n t f ( " I l l e g a l status - DT2801A Board missing or tnalfunctioning\n");> else printf("Status of card i s OK\n"); #else printf("\007Debug enabled... do not use DMA \n"); #endif /* SetPower(O.O); */ DiodeOff(O); TranIn = TransL; Gainin = 0; printf("Do you wish to Test? :\n"); p r i n t f ( " 0 - No\n1 - Yes (w !nit)\n2 - Yes (no I n i t ) \ n " ) ; scanf("%d",&j); i f (j==1) { SetCurrent(0.014);> i f ((j==1)||(j==2)) TestsO; printf("\nWhat run i s this to be? " ) ; scanf("%d",&Run); printf("Enter the i n i t i a l gain ("1e8)? " ) ; scanf("%f",&D.K427Gn); printf("What type of run (0 = OTCS, 1 = LFO, 2 = VIOTCS)? " ) ; scanf("%d",&RunFlg); i f (RunFlg != 1) { printf("Worry about PC wobbles (0/1)? " ) ; scanf("%d",&PCWor); QID = 1000.0; Dreq = 0; printf("Do you wish to f i x the pre-amp gain? : (0/1) " ) ; scanf("%d",&NoChang); i f (NoChang) AskMeO; > printf("Do you wish to al t e r the T range? : (0/1) " ) ; scanf("%d",&j); i f (j==1) { printf("Enter Tmin, Tmax, Tstep: " ) ; scanf("%f % f %f",&Tmin,&Tmax,&Tstep); > printf("Enter voltage desired: " ) ; scanf("%f",&Vreq); D.Vreq = Vreq; i f ((RunFlg == 0)|[(RunFlg == 2)) { /* OTCS Run */ printf("Enter q u a l i t y index desired: " ) ; scanf("%f",&QID); i f (QID <= 0.0) QID = 1000.0; printf("Enter diode desired (0=NIR, 1=FIR, 2=Yellow) : ");scanf("%d",&Dreq); i f (RunFlg == 0) { printf("Enter diode current (mA) desired: " ) ; scanf("%f",&lset); Iset /=1000.0;> else { Iset = Igues; printf("Enter Run Ratio (~0.1): " ) ; scanf("%f",&RunRat); > i = 1; printf("\nCommencing run. D%d %5.2fV %6.4fmA\n",Dreq,Vreq,Iset*1e3); SelectDiode(Dreq); for (T = Tmin; T <= Tmax; T += Tstep) { SetTemp(T); printf("Waiting for stable T\n"); while (fabs(MTemp()-T) > 0.05); i f (T == Tmin) { /* SetPower(Vreq); */ i f (RunFlg == 0) SetCurrent(Iset); printf("Pausing to allow equilibration\n"); delay(30000); > printf("\nProceeding with T= %7.3f\n",TempO); QI = j = 0; i f (RunFlg == 2) AdjCur(RunRat); BRawL = BTranL = BRaw = BTran = 0.0; NoGnCh = 0; FlagCon = 1; while ((j<10)&&(Ql < QID)) { printf("Current QI i s %6.3f with an AccStd of %6.3f\n",QI.AccStd); StartSampO; /* set S/H, measure Idark, turn on diode */ i f ( j > 0) ProcRec(j); /* i f not f i r s t transient then compare present */ /* transient to previous (chi-square), i f in */ /* agreement then accumulate, else write the */ /* accumulated data and start again */ PadOut(Ton); /* make samplings regular */ RecordSigs{T,j,RunFlg);/* record PC, wait u n t i l i t i s stable in time */ /* d i g i t i s e transient and check gains, repeat */ /* i f wrong gains used. Make a record when done*/ > ProcRec(j); /* add in last CurDat */ printfC'Writing Final f i l e for %dK, QI = %6.3f\n",(int)T,QI); printf("AccStd was % f \ n " , AccStd); WritAscd,-1,RunFlg); DispDat(O); > > else C f l o a t S; int GlobGnCh; /* LFO (MARACAS) Run */ printf("Sampling frequency i s %d\n",FreqOf); printf("What e q u i l i b r a t i o n delay (sec, try 5): " ) ; scanf("%d",&DelDur); DelDur *= 1000; /* printf("Enter diode: (0=NIR, 1=FIR, 2=Yellow) : " ) ; scanf("%d",&Dreq); printf("Enter diode current (mA) desired: " ) ; scanf("%f",&Iset); Iset /=1000.0; */ Iset = 0.0; Dreq = 0; i = 1; printf("\n\nCommencing run. D%d %5.2fV %6.4fmA\n", Dreq,Vreq,Iset*1000.0); Se IectD i ode(Dreq); D i odeOn(0); for (T = Tmax; T >= Tmin; T -= Tstep) { SetTemp(T); printf("Waiting for stable T\n"); D.Freq = FreqDf; while (fabs(MTemp()-T) > 0.05); i f (T == Tmax) { /* SetPower(Vreq); */ SetCurrent(Iset); > printf("Pausing to allow equilibration\n"); delay(DelDur); printf("\n\nProceeding with T= %7.3f\n",Temp()); j = GlobGnCh = 0; do { printf("Ready - Press spacebar to continue - \n"); MyPseO; S = SVAD_Imm(RawSig); printf("Signal i s %6.3f with std dev %6.3f\n",S,SVADStd); i f (GlobGn > 0) GlobGn--; GlobGn += GlobGnCh; i f (GlobGn > 3) GlobGn = 3; i f (GlobGn < 0) GlobGn = 0; p r i n t f ( " S t a r t i n g Grab with gain of %d\n",GlobGn); Grab(RawSig,GlobGn,0); printf("Back from Grab\n"); DisplayBlockO; p r i n t f ( " S e l e c t : (gain was %d)\nO- accept\n1- decrease ADC Gain\n",GlobGn); p r i n t f ( " 2 - increase ADC Gain\n3- repeat grab\n: " ) ; scanf("%d", & i ); i f ( ( i == 1)&&(GlobGn > 0)) GlobGnCh -= 1; i f ( ( i == 2)&&(GlobGn < 3)) GlobGnCh += 1; > while ( i > 0); printf("Writing Final f i l e for %dK\n",(int)T); WritAsc2(T,1); > > printf("Done\n"); > /* DREMANn - performs remote or local analysis of passive OTCS data */ /* Based upon REManIO, uses hex-ascii f i l e s from L0KI6 or later */ /* Uses these a s c i i f i l e s when run on remote system. */ /* (subroutines in include f i l e s can be found in l i s t i n g of "ELH15 .C") */ #define Version 18 ^include <stdio.h> #include <math.h> #define PC 1 /* select which system to run on */ #define SunS 0 #define Triumf 0 #define ScaleX 1000.0 /* lessen roundoff by normalising - factor */ /* applied on inputs and outputs */ #if PC #define Home 1 extern unsigned _stklen = 10000; #include <dos.h> #include <bios.h> #include <conio.h> #include <alloc.h> ^define NumRep 1 #define VSMx 500 #endif #if SunS /* #include <stdlib.h> */ #include <malloc.h> #define NumRep 5 #define VSMx 500 #endif #if Triumf #define NumRep 20 #define VSMx 500 #endif #define CleanHi 9e9 #define CleanLo -9e9 unsigned int UpGrade, TErr; /* Commence de f i n i t i o n s */ double StDev; f l o a t Tmin=285.0, Tmax=286.0, Tstep=1.0; int GainVal [4] = <:l,2,4,8>, DbgFl = 0, EnAm, Amit, F i x F l ; int VectorStze = VSMx, Run, NumAcc, NoGnCh, Direct; /* A s c i i f i l e parameters */ fl o a t D_Ireq, D_Vreq, D_Vsensed, D_Freq, D_Temp, D_K427Gn ; int D_Dreq, D ADGain; long D_Time; long int D Vector(VSMx]; fl o a t TimVecCVSMx]; /* End of f i l e parameters */ void GenDisO; double yfunO, wtfunO; #include "mcgsublO.c" #if (PC==1) #include "grafsub4.c" #endif double wtfun(i,npar) int i,npar; t return(eydat[i]); > double yfun(i,npar) int i , npar; { double x; int j ; x = parsCO]; i f (Direct) for (j=0; j<nexp; j++) x += pars[(2*j)+1]*exp(-xdat[i]/pars[2+(2*j)]); else { for (j=0; j<(nexp-1); j++) x += pars[(2*j)+1]*exp(-xdat[i]/pars[2+(2*j)]); j = (2*(nexp-1)) + 1; X + = p a r s [ j ] * ( 1.0 + t a n h ( p a r s [ j + 2 ] - ( x d a t [ i ] / ( 2 . 0 * p a r s [ j + 1 ] ) ) ) ) ; > r e t u r n ( x ) ; > double dyfun(i,n) int i , n; i double Amp, Tau, rv; int Even; i f (n == 0) rv = 1.0; else <: i f ((n % 2) == 1) { Even = 0; Amp = parsCn]; Tau = pars[n+1]; > else <: Even = 1; Amp = pars[n-1]; Tau = pars[n]; > rv = exp(-xdat[i]/Tau); i f (Even) rv *= Amp/sqr(Tau); > return(rv); > floa t AccStd, QI, ARaw, ARawL, Astd, ATran, ATranL, BRaw, BRawL, Bstd, BTran, BTranL; void ReadAsc(temp,run) floa t temp; int run; /* 100 pts 50 us, 50 at 400us */ /* (sizesemi - 201)/20 pts at 20x4x50 us = 4 ms */ < FILE *fp, *fopen(); char fnam[80]; int i,j,SizeSemi; long int imx, imn; spr i ntf(fnam,"r%df%1d",run,(i nt)temp); i f ((fp = fopen(fnam,"r"))==NULL) { printf("\007Error in open of f i l e %s\n",fnam); exit(99); > printf("Reading from f i l e '%s'\n",fnam); fscanf(fp,"%*d %d %*d % f % f " , /* NPar 26,*/ &SizeSemi,&AccStd,&QI); fscanf(fp,"%f % f % f % f %f",&D_Ireq,&D_Vreq,&D_Vsensed,&D Freq,&D_Temp); fscanf(fp,"%f % f % f % f %f",&ARawL, &ARaw, SAstd, SATranL, &ATran); fscanf(fp,"%f % f % f % f %f",&BRawL, &BRaw, SBstd, SBTranL, &BTran); fscanf(fp,"%d %d % l d %e %d %d % l d % l d " , &D_Dreq,&D ADGain,&D_Time,&D K427Gn,&NumAcc,&NoGnCh,&imx,&imn); for (i=0;i<1Ô0;i++) C fscanf(fp,"%ld ",&D_Vector[i]); D_Vector[i] *= 20;> for (i=0;i<50; i++) { fscanf(fp,"%ld ",&D_Vector[i + 100]); D_Vector[i + 100] *= 10; > j = 150; for (i=200;i<SizeSemi; i+=20) t fscanf(fp,"%ld ", &D_Vector[j++]); > VectorSize = j ; i f (VectorSize > VSMx) VectorSize = VSMx; printf("Frequency was %f\n",D_Freq); printf("VectorSize determined~to be %d\n",VectorSize); fclose(fp); sprintf(fnam,"timvec%1d",run); i f ((fp = fopen(fnam,"r"))==NULL) { printf("\007Error i n open of f i l e %s\n",fnam); exit(99); > printf("Reading from f i l e '%s'\n",fnam); for (i=0;i<VectorSize; i++) { fscanf(fp,"%f",&(TimVec[i] ) ) ; TimVecCi] *= ScaleX; i f ( ( i % 100) == 0) pri n t f ("xdat %d %f\n'',i,TimVec[i] );> fclose(fp); printf("NoGnCh %d and NumAcc %d\n",NoGnCh,NumAcc); > f l o a t VAD_C(Lnval,nav,gain) long Lnval;int nav,gain; i f l o a t unip; unip = Lnval * (10.0 / (4096.0 * GainVal[gain] * nav)); return((unip * 2.0) - (10.0/GainVal[gain])); > #include "estim5.c" f l o a t TrueX(nav,i) int i,nav; /* return number proportional to time */ i return(TimVec[i]); > void Compose(nav) int nav; { int j,kk; long nn; double Weight; for (j=0; j<VectorSize; j++) { i f (j>length) < printf("Length exceeded\007\n"); break; > ydatl j ] = VAD_C(D_Vector[j], 20 * NumAcc, D_ADGain) * (1e7 / D_K427Gn); xdat[j] = TrueX(nav, j ) ; i f ( ( j % 100) == 0) { p r i n t f ( " % d x: % l f y: % l f Tx: % f \ n " , j , x d a t l j ] , y d a t l j ] , TrueX(nav,j)); > > StDev = CalcBaseErO; kk = 0; Weight = 1.0 / (80.0 * sqr(StDev)); for (j=0; j<VectorSize; j++) < nn=D_Vector[j]; i f ((nn == CleanHi)!|(nn == CleanLo)) for (kk=0; kk<=j; kk++) eydatlkk] = 0.0; else { i f ( j < 100) eydatlj] = Weight; i f ( ( j >= 100)&&(j < 150)) eydat[j] = Weight * 8.0; i f ( j >= 150) eydat[j] = Weight * 80.0; > /* wts are 1/sqr(stdev) */ > printf("Ignored the f i r s t %d points\n",kk); > int mainO { int j,npar; FILE *fopen(), *rp; unsigned i ; i = (1 + (npar_mx * npts_tnx)) * sizeof(double); a = (double *) i n a l l o c ( i ) ; b = (double *) mallocd"); i = (1+length) * sizeof (double); y = (double *) nia l l o c ( i ) ; w = (double *) malloc(i); dy = (double *) malloc(i); xdat = (double *) malloc(i); ydat = (double *) malloc(i); eydat = (double *) n i a l l o c ( i ) ; pr i ntf("\n\n\t\t\tDREMAN%d\n",Vers i on) ; i f (eydat == NULL) C p r i n t f ( " A l l o c a t i o n errors\007\n"); exit(89);> printf("Uhat run? " ) ; scanf("%d",&Run); printf("\nDo you wish to a l t e r the T range? : (0/1) " ) ; scanf("%d".&j); i f (j==1) { printf("Enter Tstart, Tend, Tstep: " ) ; scanf("%f % f %f",&Tmin,&Tmax,&Tstep); > printf("How many exponentials? : (1/2/3/4) " ) ; scanf("%d",&nexp); printf("Direct? : (0/1)"); scanf("%d",&Direct); printf("Select Mode:\nO - Direct Estimate\n1 - UpGrade (from nexp - 1)\n"); p r i n t f ( " 2 - Incremental (from last solution)\n"); p r i n t f ( " 3 - Retrieval Mode (from nexp,T)\n4 - Direct Entry\n5 - Recap ? " ) ; scanf("%d",&UpGrade); i f (UpGrade == 5) { maxit = 2; UpGrade = 3; > else { printf("\nSet Maxit (currently %d) (0 for no change)?",maxit); scanf("%d",&i); i f ( i != 0) maxit = i ; > i f (UpGrade == 0) { printf("Try 2-10, 250 - 500, 500 - 700\n"); for (i=0;i<nexp;i++) { printf("Enter Start, Stop points for exp#%d: ",i+1); scanf("%d %d",&Star[i],&Stop[i]); » i f (PC) { printf("\nDo you wish Screen Dumps? (0/1) " ) ; scanf("%d",&DFlg); > /* p r i n t f ( " I n i t i a l number of points to skip ("2) :");scanf("%d",&DefSkip);*/ printf("Engage AMOEBA (0/1): ? " ) ; scanf("%d",&EnAm); FixFl = 0; i f (nexp > 1) { p r i n t f ( " F i x last parameter? (0/1) " ) ; scanf("%d",&FixFl); > npar = (2*abs(nexp)) + 1; i f (Direct == 0) npar ++; printf("Enter %d F i x L i s t elements (1=free, 0=fixed): ",npar); for (i=0;i<npar;i++) scanf("%d",&(FixList[i] ) ) ; i = 1; printf("\n\nCommencing run.\n"); for (T = Tmin; T != (Tmax + Tstep); T += Tstep) C printf("Proceeding with T= %7.3f\n",T); ReadAsc(T, Run); i f (fabs(D_Temp - T) > 5.0) { printf{"\007\007 Temp (%f) overflow - guessing\n",D_Temp); D Temp = T; TErr = 1; > else TErr = 0; printf("Power supply voltage is %7.4f (%6.3f) V\n",D_Vreq,D_Vsensed); Compose(Run); Estim(nexp,T); npar = 1 + (2*nexp); i f (Direct == 0) npar++; for (j=0;j<npar; j++) printf("Estimated part%d] = % l f \ n " , j , p a r s C j ] ) ; p r i n t f ( " % d Parameters\n",npar); chi = SetMA(VectorSize,npar); i f (maxit >= 0) C rp = fopen("parlogs","a"); /* Update MCG Log F i l e */ i f (rp == NULL) { printf("Fopen error\n"); exit(99); > i f (TErr) numit = -numit; i f (Direct == 0) j = -nexp; else j = nexp; fprintf(rp,"%6.3f %d %d % l f % l f % l f \n",D_Temp, j , numi t , c h i , pars [0], une[0]); for (j=0; j<nexp; j++) f p r i n t f ( r p , " \ t % l f % l f % l f % l f \ n " , pars[(2*j)+1],une[(2*j)+1],pars[(2*j)+2]/ScaleX,une[(2*j)+2]/ScaleX); i f (Direct == 0) f p r i n t f ( r p , " \ t % l f % l f \ n " , pars[(2*nexp)+1],unc[(2*nexp)+1] ); fpr i ntf(rp,"\n"); fcIose(rp); rp = fopen("amologs","a"); /* Update AMOEBA Log f i l e */ i f (rp == NULL) { printf("Fopen errorXn"); exit(99); > fprintf(rp,"%6.3f %d %d 1.0 % l f % l f ",D_Temp, nexp, AmIt, roparsCO], rroparsCO]); for (j=0; j<nexp; j++) f p r i n t f ( r p , " % l f % l f % l f % l f ", ropars[(2*j)+1],rropars [(2*j)+1],ropars[(2*j)+2],rropars[(2*j)+2]); fpr i nt f(rp,"\n"); feIose(rp); > #if (PC) GenOis(VectorSize,y,ydat,1+DFlg,npar,-numit); #endif > printf("Done\n"); return(O); > /* LMn : Levenberg-Marquardt method based on NRecipes driver P196 /* Ydat in units of lOOnA, with Interactive f i t t i n g #define Version 14 #include <math.h> #include <stdio.h> #include <signal.h> #include <float.h> #define PC 1 #define OkSD 0 /* don't dump the screen a l l the time... */ #define SunS 0 #define ScaleX 1000.0 /* lessen roundoff by normalising - factor */ /* applied on inputs and outputs #define npar_mx 21 #define npar_mxp 22 #define MxMAx 22 #define HxNPTmx 450 #define NTermMx 10 #if PC #define Home 1 /* set for Home use */ #define Hiro 0 /* set i f using on HK's 386 */ #define DC '\\' extern unsigned _stklen = 20000; #include <dos.h> #include <bios.h> #include <conio.h> #include <alloc.h> #define VSMx 439 int ddb = 0; char TitleC120]; #if Home #define GLOC "c:\\tcpp\\bgi\\" #elif Hiro #define GLOC "c:\\katoh\\tc\\" #else #define GLOC "c:\\tc\\bgi\\" #endif #include <graphics.h> ^include <time.h> #if (Home || Hiro) #include "d:\numrec\nr.h" #include "d:\numrec\nrutil.h" #include "d:\numrec\nrutil.c" #include "d:\numrec\recipes\ran1.c" #i ncIude "d:\numrec\rec i pesXgaussj.c" #incIude "d:\numrec\recipes\gasdev.c" #incIude "d:\numrec\recipes\covsrt.c" #incIude "d:\numrec\recipes\mrqcof.c" #incIude "d:\numrec\recipes\mrqmin.c" #i ncIude "d:\numrec\rec i pes\amoeba.c" #define pathtodat "c:\\work\\otcs\\dhui\\run" void PseO { printf("Pausing\n"); while (getchO != ( i n t ) ' ' ) ; > int MyEFlg; void Catcher(int s i g , int type, int * r e g l i s t ) { printf("Caught an FLPT exception - sorry\n"); i f (MyEFlg == 2) e x i t ( 2 ) ; MyEFlg = 1; > #endif #endif #if SunS /* #include <stdlib.h> */ #define DC '/' #include <malloc.h> #define VSMx 439 /* f i l e s below are from Num. Rec. (Press et a l . 1988) */ ^include "nr/recipes/nr.h" ^include "nr/recipes/nrutiI.h" #include "nr/recipes/nrutiI.c" #include "nr/recipes/ran1.c" #i ne Iude "nr/rec i pes/gaussj.e" #i ne Iude "nr/rec i pes/gasdev.e" #inelude "nr/recipes/covsrt.c" #include "nr/recipes/mrqeof.c" #include "nr/reeipes/mrqmin.c" #include "nr/recipes/amoeba.c" #define pathtodat " r " void delay(i) int i ; { printf("Delay (dummy %d)\n " , i ) ; > void PseO { while (getehO != (i n t ) • • ) ; > #endif #define CleanHi 9e9 #define CleanLo -9e9 unsigned int UpGrade, TErr; /* Commence de f i n i t i o n s */ void EngAmO, DisplayO, CalcYO, GetXsO; double StDevT, StDevC, StDevS; float Tmin=400.0, Tmax=429.0, Tstep=1.0; fl o a t *x, *y, *yf, **eovar, * s i g , AmplNTermMx], TauENTermMx], RetrapCNTermMx], AmpB, Ftol = 1e-5, Fac = 1.0; int GainVal [4] = <:1,2,4,8>, Demand; int Run, NumAcc, NoGnCh, UltraF, EstAm = 0, Global_np, itmax, Rptf, TQuit; /* A s c i i f i l e parameters */ fl o a t D_Ireq, D_Vreq, D_Vsensed, D_Freq, D_Temp, D_K427Gn ; int D_Dreq, D_ADGain; long D_Time; long int D_Vector[VSMx]; fl o a t TimVec[VSMx]; /* End of f i l e parameters */ #define Tst 300 /* Label location */ float T; double pars[npar_mx], unc[npar_mx] ; int FType[NTermMx], NParFn[4] = { 2 /* exponential in succ subtr mode */, 2 /* standard exponential */, 3 /* hyperbolic tangent */, 3 /* Dr Y's hyp-1 ike exps */ >; int DFlg, NTerm; char fnam[40]; /* .. and ends */ int NPT = VSMx, NPTmx = VSMx /* max number of points (default) */, MA = npar_mx /* max # of parameters */; #define SPREAD 0.001 #define SQR(a) ((a)*(a)) void myfuncs(x,a,y,dyda,na) floa t x,a[] ,*y,dyda[] ; int na; { int i=0, count=2; double z,zz,zzz,z2zz; *y=al^i; dydall] = 1.0; i f (na > MA) {printf("Oversight - MA i s too small\007\n"); exit(99); > while {count<=na) { switch (FTypeli] ) { ease 0: case 1: *y += ( zz= (a[count]*( z = exp(-x/aCeount+1])))); dyda[count] = z; dyda[eount+1] = zz * (x / SQR(a[count+1])); count += 2; break; /* standard exponential */ case 3: z = x/a[count+1]; i f (z < 25.0) { *y += zzzz = (a[count] * (zz = (1.0/(a[eount+2] + (zzz = exp(z)))))); dyda[count] = zz; dyda[count+1] = z * zz * zzz * zzzz / a[count+1]; dyda[eount+2] = -zzzz * zz; > else { /* retrapping effect not seen far out in t a i l */ *y += ( zz= (a[count]*( z = exp(-z)))); dyda[count] = z; dyda[count+1] = zz * (x / SQR(a[count+1])); dyda[count+2] = 0.0; > count += 3; break; /* Dr Y's functional form */ default: printf("Switch flaw - abort\n"); exit(99); break; > i++; > /* return f(x) and dyda(x) */ > f l o a t myamfun(a) f l o a t a [ ] ; { int i = 0, j , na, eount=2; double z, ye; float c h i ; chi = 0; na = Global_np; for (j=1; j<= NPT; j++) { yc = a[1]; i f (na > HA) {printf("Oversight - MA i s too small\007\n"); exit(99); > while (count<=na) { switch (FTypeli]) { case 0: case 1: yc += a[count]*exp(-x[j]/a[count+1] ); count += 2; break; /* standard exponential */ case 3: z = x[j]/a[count+1]; yc += account] /(aCcount+2] + exp(z)); count += 3; break; /* Dr Y's functional form */ default: printf("Switch flaw - abort\n"); exit(99); break; > i++; > z = (yc - y [ j ] ) / s i g [ j ] ; chi += SQR(z); > return(chi); ) #if PC void GenDis(np,y,yd,tog,npr,it,flg,chi,iI oca,ilocb,ilocc) int np,tog,npr,it,*iloca,*ilocb,*ilocc; char fig; f l o a t y [ ] , y dn,chi; C int i,j,k,m,n,detect,gmode; double mxy, mny; float sex, scy, maxx,maxy; mxy = mny = ydtO]; for (i=1;i<np;i++) { i f (yd[i] > mxy) mxy = y d [ i ] ; i f (yd[i] < mny) mny = y d [ i ] ; i f ( y [ i ] > mxy) mxy = yC i ] ; i f (y[i] < mny) mny = y [ i ] ; > detect = 0; initgraph(&detect, &gmode,GLOC); i = graphresult(); maxx = getmaxxO; maxy = getmaxyO; /* printf("RC for initgraph was %d, maxx: %d maxy: %d\n",i,maxx,maxy); */ sex = maxx / np; sey = maxy/ (mxy - mny); for (i=0; i<np;i++) { j = i*sex; k = (yd[i] - mny)*scy; putpixeKj,k,LIGHTRED); > j = (yCO] - mny)*scy; m = 0; setcolor(LIGHTBLUE); for (i=1;i<np;i++) { k = (y[ i ] - mny)*scy; n = i * sex; line(m,j,n,k); j=k; m=n; > setcolor(WHITE); sprintf(Title,"LM%1d - Data Analysis: i t e r %d '%s'",Version,it,fnam); moveto(Tst,10); o u t t e x t ( T i t l e ) ; i f ((fig == ' f M l K f l g == ' z ' ) | | ( f l g == - y ) ) { sprintf(Title,"Run: %d F i t with Data",Run);> else { sprintf(Title,"Run: %d Residuals( %9.5f, %9.5f)",Run,mxy,mny);> moveto(Tst,20); o u t t e x t ( T i t l e ) ; sprintfdi t i e ,"Temperature %6.3fK Chi: %9.4f",(float) T, ( f l o a t ) c h i ) ; moveto(Tst,40); o u t t e x t ( T i t l e ) ; sprintf(Title,"ADC gain of %1d Points: %d GHode: %d", D_ADGain,np,gmode); moveto(Tst,50); out t e x t ( T i t l e ) ; for (i=0;i<npr;i++) { moveto(Tst,60 + (10 * i ) ) ; s printf(Title,"Par[%d] %9.4lf +/- %7.4lf" , i , p a r s [ i ] , u n c [ i ] ); o u t t e x t ( T i t l e ) ; > moveto(Tst,60 + (10*i)); i f ((fig == ' z ' ) | | ( f l g == -y')) { Ge t X s ( f l g , i l o c a , i l o c b , i l o c c ) ; /* get screen positions */ * i l o e a /= sex; * i l o c b /= sex; /* get data index */ i f (fig == 'y') * i l o c e /= sex; > switch (tog) { case 0: case 1: wh i l e ( ( f l g = getchO) != ( i n t ) '0') i f (fig = = ' X ' ) { closegraphO; printf("User aborted run\n"); exit(O); > break; case 2: /* i f (OkSD) MyDump(45);*/ break; > closegraphO; > #endif void Compress(xdat,ydat,sig) floa t *xdat,*ydat,*sig; { int i , j ; j = 1; for ( i = 1; i<101;i+=10) < ydatCj] = y d a t l i ] ; TimVecCj] = TimVecCi]; xdatCj] = xdatCi]; sigCj] = s i g C i ] ; j++; > for (i=101; i<151;i+=5) { ydatCj] = ydatCi]; TimVecCj] = TimVecCi]; xdatCj] = xdatCi]; sigCj] = si g Ci]; j++; > for (i=151; i<VSMx;i+=10) i f (j<=NPT) { ydatCj] = ydatCi]; TimVecCj] = TimVecCi]; xdatCj] = xdatCi]; sigCj] = s i g C i ] ; j++; > i f (NPT != j ) printf("Compression minor-mismatch: %d %d\n",NPT,j); > void ReadAsc(temp,run,NP) floa t temp; int run, *NP; { FILE *fp, *fopen(); char fnamCSO]; int i,j,SizeSemi,NPT; long int imx, imn; fl o a t AccStd, ARawL,ARaw, Astd, ATranL, ATran, BRawL, BRaw, Bstd, BTranL, BTran, QI; sprintf(fnam,"%s%d%cr%df%1d",pathtodat,run,DC,run,(int)temp); i f ((fp = fopen(fnam,"r"))==NULL) { printf("\007Error in open of f i l e %s\n",fnam); exit(99); > printfC'Reading from f i l e '%s'\n",fnam); fscanf(fp,"%*d %d %*d % f % f " , /* NPar 26,*/ &SizeSemi,&AccStd,&QI); fscanf(fp,"%f % f % f % f %f",&D_Ireq,&D_Vreq,&D_Vsensed,&D_Freq,&D_Temp); fscanf(fp,"%f % f % f % f %f",&ARawL, &ARaw, &Astd, &ATranL, SATran); fscanf(fp,"%f % f % f % f %f",&BRawL, SBRaw, SBstd, SBTranL, SBTran); fscanf(fp,"%d %d % l d %e %d %d % l d % l d " , &D Dreq,&D_ADGain,&D Time,&D_K427Gn,&NumAcc,&NoGnCh,&imx,&imn); for (i=0;i<100;i++) {"fscanf(fp,"%ld ",&D_Vector[i] ); D_Vector[i] *= 20;> for (i=0;i<50; i++) { fscanf(fp,"%ld ",&D_Vector[i + 100]); D_Vector[i + 100] *= 10; > j = 150; for (i=200;i<SizeSemi; i+=20) { fscanf(fp,"%ld ", &D_Vector[j++]); > NPT = j ; i f (NPT > VSHx) NPT = VSMx; printf("Frequency was %f\n",D_Freq); printf("NPT determined to be %d\nTimVec:\n",NPT); fclose(fp); /* Calculate TIMVEC (Reading from f i l e too risky!) */ for (i=0;i<100;i++) TimVecli] = i * 0.05; /* 100 at 50u */ /* then groups of 8 */ for (i=100;i<150;i++) TimVecCi] = TimVec[99] /* last time */ + 0.05 /* add 1 unit of old time step */ + (0.05 * 3.5) /* add change to 1/2 pt of new time step */ + ((i-100)*0.05*8) /* and increment by 400us */; for (i=150;i<NPT;i++) TimVecCi] = TimVecC149] /* last time */ + (0.05 * 8) /* add 1 unit of old time step */ + (0.05 * 8 * 4.5) /* add change to 1/2 pt of new time step */ + ((i-150)*0.05*80) /* and increment by 4ms */; for (i=0;i<10;i++) p r i n t f ( " % f \ t %f\n",TimVecC95+i],TimVecC145+i]); printf("NoGnCh %d and NumAcc %d\n",NoGnCh,NumAcc); *NP = NPT; > f l o a t VAD Cdnval,nav,gain) long Lnval; int nav,gain; { float unip; unip = Lnval * (10.0 / (4096.0 * GainValCgain] * nav)); return((unip * 2.0) - (10.0/GainValCgain] ) ) ; > int Star [10], Stop CIO]; double CalcBaseR(ydat,Sto,Run) floa t *ydat; int Sto, Run; { double y, x; int i , j , k , c n t ; cnt = 0; y = 0.0; j = Sto - Run; k = Sto; for (i=j;i<k;i++) { x = (2.0*ydatCi] ) - ydatCi-1] - ydatCi+1]; y += SQR(x); cnt++;> y = sqrt(y/(6.0 * cnt)); i f (y==0.0) printf("Stdev 0, resetting to 1.0\007\007\n",y=1.0); printf("Stdev over %d pnts ending at %d estimated as %lf\n",Run,Sto,y); return(y); > f l o a t GetRem(nx,T,npr) .int nx, *npr;float T;{FILE *fp,*fopen(); char tsCSO]; f l o a t DT, c h i , chimn; int count, nter, numit, i , j , k, i s c r ; double scr; printf("Now entering GetRem: Searching for T=%5.2f Nx=%1d\n",T,nx); sprintf(ts,"%s%1d%cmetapars",pathtodat,Run,DC); p r i n t f ( " F i l e : %s\n",ts); i f ( ( f p = fopen(ts,"r"))==NULL) {printf(»FO Error\n"); exit(9);> chimn = 9.9e9; while ((feof(fp)==NULL)&&(fgetc(fp) != ( i n t ) '"')) ; p r i n t f ( " S t a r t i n g at location of f i r s t ~ in metapars f i l e \ n " ) ; while (feof(fp)==NULL) { while ((feof(fp)==NULL)&&(fgetc(fp) != ( i n t ) '{')) ; i f (feof(fp)==NULL) { fscanf(fp,"%f %d %d %d %*d % f ", &DT, &Run, &nter, Snumit, /* &compr */ &chi); i f ((nx == nter)&&(chi < chimn)&&(fabs(T-DT)< 0.4)) { f s c a n f ( f p , " % l f %*f",&parsCO]); count = 1; pr i n t f ( " T : %5.2f Nx: %1d ***\n",DT,nter); chimn = c h i ; for (j=0; j<nter; j++) { fscanf(fp,"%d",&(FTypeCj])); for (k=0;k<NParFnCFTypeCj]];k++) fscanf ( f p , " % l f %*f",&parsCcount++] ); *npr = count; > /* end of read-in for */ > else while ( fgetc(fp) != •>') ; > > f c l o s e ( f p ) ; printf("Min chsq found was %f\n",chimn); for (i=0; i< *npr; i++) { printf("ParsC%d] = %lf\n'',i,parsCi]); > return(chimn); > void WriRem(NTerm,chi,itstt) int NTerm,itstt; floa t c h i ; { char tsC80]; FILE *rp, *fopen(); int count, j , k; sprintf(ts,"%s%1d%cmetapars",pathtodat,Run,DC); p r i n t f ( " F i l e : %s\n",ts); i f ((rp = fopen(ts,"a"))==NULL) <:printf("FO Error\n"); exit(9);> fprintf(rp,"LM%d entry { %6.3f %d %d %d %d % l f % l f % l f \n",Version, D Temp,Run,NTerm, i t s t t , UltraF, c h i , parsCO], uncCO]); count = 1; for (j=0; j<NTerm; j++) { fp r i n t f ( r p , " % d ",FType[j]); for (k=0;k<NParFn[FType[j]];k++) C f p r i n t f ( r p , " \ t % l f % l f " , pars[count],une[count]); count++; > i f ( j < (NTerm-D) f p r i n t f ( r p , " \ n " ) ; else fprintf(rp,">\n"); > fclose(rp); > int PackPars(ix) int i x ; { int i , j ; j = 0; pars[j++] = AmpB; i f ( i x > 0) for (i=0;i<ix;i++) i pars[j++] = Amp[i]; pars[j++] = Tau[i]; i f (FType[i] != 1) pars[j++] = Retrap[i]; i f ( j > npar_mx) t printf("OvfIw\007\n"); exit(99); > > return(j); > #define ToHead 0 #define ToTail 1 void Fi t R e s ( f l g , curr) int f i g , curr; i int i , istart,istop,npar; double s t a r t , end; floa t a[npar_mx]; npar = PackPars(curr); for (i=0;i<npar;i++) a[i] = p a r s [ i ] ; CalcY(a-1,yf,npar,NPT); for (i=1;i<=NPT;i++) y f [ i ] = y [ i ] - y f [ i ] ; i f ( f i g == ToHead) { istart=1; istop = 50; } else { i s t a r t = 300; istop = NPT-1; > start = y f [ i s t a r t ] ; end = y f [ i s t o p ] ; i = i s t a r t ; while ( ( y f [ i ] != end)&&(((start - end)/(yf[i] - end)) < 2.7) &&(i < (NPT-1))) i++; Tau[curr] = x [ i ] - x C i s t a r t ] ; Amp[curr] = 1.3*(start - end); Retrap[curr] = 0.01; FType[curr] = 1; > int C r s ( i i , o i i ) int * i i , o i i ; { int maxx, maxy; maxx = getmaxxO; maxy = getmaxyO; i f ( * i i < 0) * i i = 0; i f ( * i i > maxx) * i i = maxx; setcolor(BLACK); line (oii,maxy-20,oii,maxy-1); setcolor(MAGENTA); l i n e (*ii,maxy-20,*ii,maxy-1); r e t u r n ( * i i ) ; > void GetX(ii) int * i i ; < int o l d i i ; char chr; o l d i i = * i i = 300; o l d i i = C r s ( i i , o l d i i ) ; moveto(100,100); outtext("Enter [,{ to go l e f t , ],> to go right, a to accept point"); while ((chr = getchO) != 'a') { i f (chr == '[') * i i -= 1; i f (chr == •]') * i i += 1; i f (chr == 'C) * i i -= 20; i f (chr == •>') * i i += 20; o l d i i = C r s ( i i , o l d i i ) ; > > void GetXs(chr, i i , j j , k k ) char chr; int * i i , *kk; < int maxy; maxy = getmaxyO; Ge t X ( i i ) ; l i n e ( * i i , 0 , * i i , m a x y ) ; G e t X(j j ) ; I i ne(* j j,0,* j j,maxy); i f (chr == 'y') { GetX(kk); line(*kk,0,*kk,maxy); > > void InteracO C int TFit, Resid, npar, TotT, Curr, i , j ; flo a t a[npar_mx]; char SChar; TFit = Resid = 0; npar = Curr = 0; TotT = NTerm; i f ((pars[0] != 0.0)&&(NTerm > 0)) { printf("Pars seem OK, Loading %d variables\n",NTerm); j=0; AmpB = pars[j++]; for (i=0;i<NTerm;i++) { Amp[i] = pars[j++]; Tau[i] = pars[j++]; i f (FType[i] != 1) Retrap[i] = pars[j++]; else Retrap[i] = 0.0; > > else { TotT = NTerm = 0; AmpB = y[NPT-1]; > printf("Estimate AmpB as 5!f\n",AmpB); do { printf("LM Iters to be done: %d NTerm %d TotT %d Rptf %d", itmax,NTerm, TotT, Rptf); printf("\n\nv Variables (Interac)\tV Variables (GetRem)"); printf("\nL Load variables\tE/Y Interactive f i t of exp/dyff\n"); p r i n t f ( " t F i t an exp to t a i l \ t h F i t an exp to head\nC Convergence F t o l \ t " ) ; printf("# Select #th term\n+ Increase amplitude\tQ quit for this T only\n"); p r i n t f ( " - Decrease amplitude\tR toggle Repeat flag\n"); printf("T Toggle sign of amplitude\tu Input new delta factor\n"); p r i n t f C ' i Increase tau\t\td Decrease tau\nr Plot residuals\tU set UpGrade=0\n"); printfC'F F l i p term (toggle) between dyff-exp\nZ f i t baseline\t\t"); p^intf("A Amoeba run ( a l l terms)\nS Save parameters\tD Delete term\n"); printf("n/N de/increase B s l n \ t l set number of iterations of LM\n"); printfC'b Decrease B\t\tB Increase B\ng go try LM\t\tx Halt\n"); printfC'M Set fixed num of runs\n"); printf("\nSelect (%d terms f i t t e d , %d th i s current):\n",TotT,Curr); SChar = getchO; MyEFlg = 0; signaKSIGFPE, Catcher); switch (SChar) { case 'M': printfC'Enter number of iterations demanded: " ) ; scanf("%d",&Demand); break; case 'h': FitRes(ToHead,TotT++); Curr = TotT-1; RetraplCurr] = 0.0; break; case ' t ' : FitRes(ToTail,TotT++); Curr = TotT-1; Retrap[Curr] = 0.0; break; case 'E': C int i a , ib; npar = PackPars(TotT); for (i=0;i<npar;i++) a[i] = parsCil; Display(a-1,y,yf,npar,1,NPT,1.0,'z',&ia,&ib,NULL); printf("Using data point indices: %d %d\n",ia,ib); TauLTotT] = fabs((x[iW - x t i a ] ) / log(fabs((y[ia] - yf [ia] )/(y[ib] - y f l i b ] ) ) ) ) ; AmplTotT] = (yCia] - yfCia]) * exp(xCia]/Tau[TotT] ); i f (MyEFlg == 0) { RetrapCCurr = TotT++] = 0.0; FType[Curr] = 1; prin t f C ' F i t t e d Amp: %7.3f Tau: %7.3f\n",Aiiç)[Curr] ,Tau[Curr] );> else pr i n t f ("Fit failed\n");> PseO; break; case 'Y': { int i a , i b , i c , i ; f loat C12, C32, tau, taumin, s o l , solmin; npar = PackPars(TotT); for (i=0;i<npar;i++) aCi] = parsCi]; Display(a-1,y,yf,npar,1,NPT,1.0,'y',&ia,&ib,&ic); printf("Using data point indices: %d %d %d \ n " , i a , i b , i c ) ; C12 = (y[ia] - yf [ia] )/(y[ib] - y f l i b ] ) ; C32 = (y[ic] - yf [i c ] ) / ( y [ i b ] - yfCib]); tau = taumin = 0.01 * fabs(x[ia] - xCic]); solmin = 9e9; i = 0; while (tau < 10,0*fabs(x[ia]-x[ic] )) C double z = x[ic]/tau; i f (z < 40.0) { sol = (exp(x[ib]/tau) - (C12*exp(x[ia]/tau)))/(Cl2 - 1); sol -= (exp(xi:ib]/tau) - (C32*exp( z)))/(C32 - 1); > else sol = 9.9e9; i f (fabs(sol) < solmin) { taumin = tau; solmin = fabs(sol); > tau *= 1.01; i f ((i++ % 50)== 0) pr i n t f ( " % d tau: %7.3f s o l : %7.3f taumin: %7.3f solmin %7.3f\n", i,tau,sol,taumin,solmin); > tau = TaulTotT] = taumin; RetraptTotT] = {exp(x[ib]/tau) - (C12*exp(x[ia]/tau)))/(C12 - 1); AmptTotT] = (y[ia] - yfCia]) * (RetrapCTotT] + exp(x[ia]/tau)); i f (MyEFlg == 0) { FTypelCurr = TotT++] = 3; p r i n t f ( " F i t t e d Amp: %7.3f Tau: %7.3f Retrap: %7.3f\n", Amp[Curr],Tau[Curr],Retrap[Curr]); > else p r i n t f ( " F i t failed\n");> PseO; break; case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': Curr = SChar - '0'; i f (Curr >= TotT) Curr = TotT - 1; pri n t f ("Current set to %d\n",Curr); break; case 'u': printfC'Enter new delta factor: ( was % f ) ",Fac); scanf("%f",&Fac); break; case '+': AmplCurr] += (0.01 * Fac) + (0.1 * Fac * AmpCCurr]); break; case '-': AmpCCurr] -= (0.01 * Fac) + (0.1 * Fac * AmpCCurr]); break; case 'N': AmpB += (0.01 * Fac) + (0.1 * Fac * AmpB); break; case 'n': AmpB -= (0.01 * Fac) + (0.1 * Fac * AmpB); break; case 'Z': AmpB = y[NPT-1]; printf("Estimate AmpB as %f\n",AmpB); break; case 'R': i f (Rptf == 0) Rptf = 1; else Rptf = 0; i f (Rptf) p r i n t f C ' U i l l return after LM\n"); else pr i n t f C ' W i l l not return after LM\n"); PseO; break; case 'T': AmpCCurr] *= -1.0; break; case 'U': Rptf = 1; UpGrade = 0; break; case ' I ' : printf("Maximum number of iterations i s %d\n New value? ",itmax); scanf("%d",&itmax); break; case 'C: p r i n t f ( " F t o l was %11.3e, enter new value: " , F t o l ) ; scanf("%f",&Ftol); break; case 'i': TauCCurr] += (0.1 * Fac) + (0.1 * Fac * TauCCurD); break; case 'd': TauCCurr] -= (0.1 * Fac) + (0.1 * Fac * TauCCurr]); break; case 'F': printf("Toggling type of %d term\n",Curr); i f (FType[Curr] == 1) { printfC'Was an exponential\n"); FType[Curr] = 3; RetraptCurr] = 0.1; > else i f (FType[Curr] == 3) { printfC'Uas a DYFF\n"); FType[Curr] = 1; > else CprintfC'Illegal type\007\n"); exit(99); > PseO; break; case 'b': i f (FTypelCurr] == 3) { Retrap[Curr] -= 0.01 + (0.1 * Retrap[Curr] ); > else p r i n t f ( " 7 " ) ; break; case 'B': i f (FType[Curr] == 3) { Retrap[Curr] += 0.01 + (0.1 * Retrap[Curr] ); > else p r i n t f ( " 7 " ) ; break; case 'S': MA = PackPars(TotT); WriRem(MA,9999.9,9); break; case ' r ' : npar = PackPars(TotT); printf("Packed %d pars\n",npar); for (i=0;i<npar;i++) a[i] = p a r s [ i ] ; Display(a-1,y,yf,npar,1,NPT,1.0,'r',NULL,NULL,NULL); break; case 'D': printf("Deleting current term (%d)\n",Curr); j=0; for (i=Curr;i<TotT;i++) { Amp[i]=Amp[i+1] ; Tau[i] = Tau[i+1]; Retrap[i] = Retrap[i+1]; FType[i] = FType[i+1]; > i f (Curr > 0) Curr--; i f (TotT > 0) TotT--; break; case 'V: printf("Pars:\n"); for (i=0;i<MA;i++) p r i n t f ( " % d % f \ n " , i , p a r s [ i ] ) ; PseO; break; case 'A': MA = PackPars(TotT); for (i=0;i<MA;i++) a[i] = p a r s [ i ] ; EngAm(-1, MA, MA+1, a-1); for (i=0;i<MA;i++) t printf("Old: %6.3f New: %6.3f\n",(float) p a r s l i ] , a [ i ] ) ; pars[i] = a [ i ] ; > NTerm = TotT; PseO; case 'L': printf("Loading variablesVn"); j=0; AmpB = pars[j++]; for (i=0;i<NTerm;i++) { Amp[i] = pars[j++]; Tau[i] = pars[j++]; i f (FType[i] != 1) Retrap[i] = pars[j++]; else Retrap[i] = 0.0; > TotT = NTerm; case 'v': printf("Term\t\tType \ t \ t Amp\t\t Tau\t\t Retr\n"); for (i=0; i<TotT; i++) printf("%d\t\t%d\t\t%7.3f\t\t%7.3f\t\t%7.3f\n", i,FType[i],Amp[i],Tau[i],Retrap[i]); printf("Base: %7.3f\n",AmpB); PseO; break; case 'Q': p r i n t f ("For th i s T only - " ) ; TQuit = 0; SChar = 'gr-ease 'g': printf("Quiting Interac\n"); HA = PackPars(NTerm=TotT); break; case ' X ' : printf("Aborting\n"); exit(O); break; default: printf("Command not known\n");> i f (strchr("QMDSgC0123456789FSvVLrxqR",SChar) == NULL) { npar = PackPars(NTerm = TotT); for (i=0;i<npar;i++) a[i] = p a r s [ i ] ; Display(a-1,y,yf,npar,1,NPT,1.0,'f',NULL,NULL,NULL); > > while (SChar != 'g'); > f l o a t TrueX(i) int i ; /* return number proportional to time */ { return(TimVec[i]); > void Compose(x,y,sig,a,npars) int npars; float *x,*y,*sig,*a; { FILE *fp; int j,kk; long nn; for (j=0; j<NPTmx; j++) < i f (i>VSMx) < printf("Length exceeded\007\n"); break; > y[j+1] = VAD C(D_Vector[j], 20 * NumAcc, D_ADGain) * (1e7 / D_K427Gn); x[j+1] = TruëX(j); i f ( ( j % 100) == 0) i p r i n t f ( " % d x: % l f y: % l f Tx: % f \ n " , j , xCj+1], y[j+1], TrueX(j)); > > StDevT = CalcBaseR(y,NPTmx,100); StDevC = CalcBaseR(y,151,50); StDevS = CalcBaseR(y,101,80); printf("Ratios % l f %lf\n",StDevS / (StDevC * sqrt(8.0 ) ) , StDevC/(StDevT * sqrt(IO.O))); i f ( (fabs((StDevS / (StDevC * sqrt(8.0 ))) - 1.0) < 0.4) && (fabs((StDevC / (StDevT * sqrt(IO.O))) - 1.0) < 0.4)) printf("StDevs are consistent with 'normal' noise\n"); kk = 0; for (j=1; j<= NPTmx; j++) { nn=D Vector[j-1]; i f ((nn == CleanHi)!j(nn == CleanLo)) for (kk=0; kk<=j; kk++) siglkk] = 0.0; else { i f ( j <= 100) sigCj] = StDevS; i f ( ( j >= 101)&&(j < 151)) s i g [ j ] = StDevC; i f ( j >= 151) sigCj] = StDevT; > } /* for {j=0; j<npars; j++) a[j+1] = pars[j]; */ /* fp = fopen("scr",»w"); fprintf(fp,"%lf\n",StDevT); for (j=1;j<NPT;j++) fprintf(fp,"%3d % f % f \ n " , j . s i g t j ] , y [ j ] ) ; fctose(fp);*/ printf("Ignored the f i r s t %d points\n",kk); > void EngAm(en,np,iiip,a) int en.np.mp; float a[]; { int i j . n f u n c ; f l o a t *x,*y,**p,fact; X = vectord,np); y = vector(1,mp); p = niatrix(1,nip,1,np); printf("AMOEBA data areas allocated\n"); Global_np = np; for (i=1;i<=nip;i++) { for (j=1;j<=np;j++) { i f ( i != j ) < i f (en > 0) p[i] [j] = 0.9 * a [ j ] ; else pCi] Cj] = aCj]; > else < i f (en > 0) p [ i ] [ j ] = 1.1 * a [ j ] ; else p[i] [j] = 1.01 * aCj]; > x[j] = p[i] t j ] ; > y [ i ] = myamfun(x); > fact = Ftol * 100; i f (en < 0) fact = F t o l ; printf("Entering AMOEBAXn"); amoeba(p,y,np,fact,myanifun,&nfunc); prin t f ("AMOEBA done in %d its\n",nfunc); for (i=1;i<=np;i++) { a[i] = 0; for (j=1;j<=nip;j++) a[i] += p[j][i]/mp; > /* for (i=1;i<=np;i++) printf("a[%d] %10.6f\n",i,a[i]); */ free matrix(p,1,mp,1,np); free_vector(y,1,np); free vector(x,1,mp); printf("AMOEBA data areas freed\n"); > #if PC double inyexp(z) double z; t double x; i f (z < -20.0) x = 0.0; else x = exp(z); return(x); > void CalcY(a,yf,np,npts) f l o a t a [ ] , y f [ ] ; int np, npts; C int i , j , na, count; double z, yc; float c h i ; chi = 0; for (j=1; j<= npts; j++) < i=0; count = 2; yc = 0.0; i f (np > 0) < yc = a[1]; while (count<=np) i switch (FTypeCi]) { case 0: case 1: yc += a[count]*iiiyexp(-x[j]/a[count+1] ); count += 2; break; /* standard exponential */ case 3: z = x[j]/a[count+1] ; i f (z < 40.0) yc += account] /(aCcount+2] + exp(z)); count += 3; break; /* Dr Y's functional form */ default: printf("Switch flaw - abort\n"); exit(99); break; > i++; » y f [ j ] = yc; > > void Display(a,y,yf,npar,numit,npts,chi,chr,iloca,ilocb,ilocc) f l o a t c h i , a [ ] , y [ ] , y f [ ] ; int * i l o c a , * i l o c b , * i t o c c , npar, numit, npts; char chr; < int i ; printf("Entering DISPLAY\n"); i f (chr == ' X ' ) < printf("Aborting\n"); exit(O); > i f (chr == 'X') { printf("Enabling UpGrade\n"); UpGrade = 1; > for (i=1;i<=npar;i++) { pars[i-1] = a [ i ] ; unc[i-1] = 0.0; /* sqrt(fabs(covarti] [i] ) ) ; */ /* i f ( c o v a r [ i ] [ i ] < 0.0) unc[i-1] *= -1.0; */ } i f ((chr == 'f')||(chr == 'z')||(chr == 'y')) { CalcY(a,yf,npar,npts); GenDis(npts,&(yf[1]),&(y[1]),0,npar,numit,chr,chi,iloca,ilocb,ilocc); > i f ((chr == 'r')||(chr == 'R')) { CalcY(a,yf,npar,npts); for (i=1;i<=npts;i++) y f [ i ] -= y [ i ) ; GenDis(npts,&(yf [1] ),&(yf [1] ),0,npar,numit,chr,chi, i loca, i locb, i locc);» #endif void mainO { char tscr[80] ,ts[80] ; int i , sz, idum=(-911), i t s t , i t s t t , j , k, mfit, * l i s t a , TLook; fl o a t Tste, Tsta, Tsto, alambda, chisq, ochisq,*a,**alpha; /* kluge through any errors, we'll straighten out later */ control87(MCW_EM, MCW EM); printf("LM%d\n",Version); printfC'What run? : " ) ; scanf("%d",&Run); printf("How many terms? : " ) ; scanf("%d",&NTerm); i f (Run == 0) t #if Home Run = 8; Tsta=335.0; Tsto=340.0; Tste = 1.0; #else Run = 33; Tsta=300.0; Tsto=340.0; Tste = 1.0; #endif TLook = 0; EstAm = 0; UltraF = 0; Rptf = 1; UpGrade = 5; > else i printfC'What temp ( s t a r t , stop, delta) ? : " ) ; scanf("%f % f %f",&Tsta,&Tsto,&Tste); printf("Estimate source (0 same T, 1 increm, other is sp e c i f i c T) ? " ) ; scanf("%d",&TLook); EstAm = UltraF = 0; /* printf("Estimate with Amoeba? : " ) ; scanf("%d",&EstAm); printf("Compress? : " ) ; scanf("%d",&UltraF); */ printf("UpGrade switch? : " ) ; scanf("%d",&UpGrade); Rptf = 1; > itmax = 9999; TQuit = 1; X = vector(1,MxNPTmx); y = vectord,MxNPTmx); yf = vectord,MxNPTmx); s i g = vectord ,HxNPTmx); l i s t a = i vectord,MxMAx); a = vectord,MxMAx); covar = matrixd,MxMAx,1,HxMAx); alpha = matrixd,MxMAx, 1,HxHAx); for (T=Tsta; fabs(T-Tste-Tsto) > 0.3; T+= Tste) { ReadAsc(T,Run,&NPTmx); NPT = NPTmx; i f (NPTmx > MxNPTmx) { printf("Too many data points\n"); exit(7);> i f (TLook == 0) GetRem(NTerm,T,&MA); else i f (TLook == 1) GetRem(NTerm,T - Tste,&MA); else GetRem(NTerm,(float) TLook,&MA); i f (MA > MxMAx) { printf("Too many parameters\n"); exit(7);> i f (UltraF) NPT = 49; Compose(x,y,sig,a,MA); i f (UltraF) Compress(x,y,sig); i f (EstAm) EngAm(EstAm,MA,MA+1,a); TQuit = 1; while ((Rptf > 0)&&TQuit) { TQuit = 1; Demand = 0; i f (UpGrade != 0) InteracO; for (j=0; j<MA; j++) a[j+1] = p a r s l j ] ; mfit=MA; alambda = -1; for (i=1;i<=mfit;i++) l i s t a C i ] = i ; HyEFlg = 2; signaUSIGFPE, Catcher); printf("Making i n i t i a l c a l l to MRQHIN\n"); mrqmin(x,y,sig,NPT,a,MA,lista, mf it,covar,alpha,&chisq,myfunes,&alambda); k=1; i t s t = i t s t t = 0; while ( { ( ( i t s t < /* was 2 */ 8) || ( i t s t t < 5))&&(itstt < itmax))|] (Demand-- > 0)) < pr i n t f ( " \ n f e %2d (%d) %s %10.4f %s %9.2e T: %5.2f \n","Iteration #",k, itst,"chi-squared:",chisq/NPT,"alambda:",alambda,T); for (i=1;i<=MA;i++) { s p r i n t f ( t s c r , " a [ % d ] " , i ) ; sz = (80/MA)-2; s p r i n t f ( t s , " %%%ds ", s z ) ; p r i n t f ( t s , t s e r ) ; > p r i n t f ( " \ n " ) ; s printf(tscr,"%%%d.%df ",sz+1,sz/2); for (i=1; i<=MA; i++) p r i n t f ( t s c r , a [ i ] ); p r i n t f ( " \ n " ) ; k++; oehisq=chisq; mrqmin(x,y,sig,NPT,a,MA,lista,mfit,covar,alpha,&chisq,myfunes,&alambda); #if PC i f (bioskeyd) != 0) Display(a,y,yf,MA, itstt,NPT,chisq/NPT,getchO,NULL,NULL); #endif i f (((ochisq-chisq)/NPT) > 0.1) i t s t = 0; i f (chisq > ochisq) i t s t = 0; else i f ((fabs(ochisq-chisq)/NPT) < 0.1) itst++; itstt++; > alambda = 0.0; mrc|min(x,y,sig,NPT,a,MA, lista,mf i t , covar, alpha, &chisq,myf unes,&a lambda); printf("Uncertainties (- signs denote covarianee problems):\n"); for (i=1;i<=MA;i++) < unc[i-1] = sqrt(fabs(eovar[i][i] ) ) ; pars[i-1] = a [ i ] ; i f (covarli] [i] < 0.0) unc[i-1] *= -1.0; p r i n t f ( t s c r , ( f l o a t ) unc[i-1]); } p r i n t f ( " \ n " ) ; i f (UpGrade == 0) TQuit = 0; /* loop through once on auto */ > WriRem(NTerm,chisq/((float)NPT),itstt); > f ree_mat r i x(a Ipha,1,MxMAx,1,MxMAx); f ree_ma t r i x(covar,1,MxMAx,1,MxMAx); free_veetor(a,1,MxMAx); free_ivectordista,1,MxMAx); free_vector(sig,1,MxNPTmx); free_vector(yf,1,MxNPTmx); free_vector(y,1,MxNPTmx); free~veetor(x,1,MxNPTmx); printf("Done\n"); > /* POUn : MEM power spectrum analysis (Aug/91) last updated ~ Feb 2 1992 */ #define Version 18 #define Home 1 #define VWrite 0 #define SWrite 1 #define GWrite 0 #define RPse 0 #define Mover 2 #define SetMode 1 #define CritSt 2.0 #define Window 1 #define Ndef 2000 #define Mdef 80 #define GrpOf 15 #define Rang 10 #define DC 'W #define CritRun 3 /* Run#3 and after have binary format */ #define Pi 3.1415926 #include <math.h> #include <stdio.h> #include <signal.h> #include <float.h> extern unsigned _stklen = 20000; #include <dos.h> #include <bios.h> #include <conio.h> #include <alloc.h> #define sqr(x) ((x)*(x)) #if Home #define GLOC "c:\\tcpp\\bgi\V' #define NConv Ox7fff #else #define GLOC "c:\\tc\\bgi\\" #define NConv 0x7fff #endif ^include <graphics.h> #include <time.h> /* Commence d e f i n i t i o n s */ f l o a t T, KeepV [200] [2], PowVlNdef]; int Run = 0, NumAcc, NoGnCh, gdb = 0, ddb = 0, A l f x , A l f y , Rx, Ry, Nsw, Sx, Sy, NFDT, NN, MM, Grp, LMode, *ivec; #if GWrite int GCount = 0; #define GOffset 10.0 #endif char fnam[40], T i t l e [ 8 0 ] ; /* A s c i i f i l e parameters */ fl o a t D_Ireq, D_Vreq, D_Vsensed, D_Freq, D_Temp, D_K427Gn ; int D_Dreq, D_ADGain; long D_Time; /* End of f i l e parameters */ #if (Home) ^include "d:\numrec\nr.h" #include "d:\numrec\nrutil.h" #include "d:\numrec\nrutil.c" #incIude "d:\numrec\recipes\memcof.c" #i ncIude "d:\numrec\rec i pes\evImem.c" #define pathtodat "c:\\chris\\volo\\data\\" void PseO i printf("Pausing\n"); i f ((RPse) && (ddb == 0)) while (getchO != ( i n t ) • ' ) ; else delay(5000); > int MyEFlg; void Catcher(int s i g , int type, int * r e g l i s t ) { printf("Caught an FLPT exception - sorry\n"); i f (MyEFlg == 2) e x i t ( 2 ) ; MyEFlg = 1; > #else /* at Work */ ^include "c:\numrec\nr.h" #include "c:\numrec\nrutil.h" /* whether to write v*.dat f i l e s for MATLAB scripts */ /* whether to write s*.dat f i l e s of power spectra */ /* whether to append (shifted) spectra to gspec.dat */ /* whether to pause */ /* overlap by halves */ /* 0=avgs, 1=2nd pass avg */ /* throw out points more than # stds */ /* Apply Welch window? */ /* Percentage of range over which to determine min */ #include "c:\nunirec\nrutil.c" #i ne I ude "e : \nunirec\ree 1 pesXmemeof. c" #inelude "e:\numree\reeipesXevlmem.e" #define pathtodat "c:\\ehris\\volo\\data\\" void PseO { printf("Pausing\n"); i f (ddb == 0) while (getehO != ( i n t ) ' ' ) ; > int MyEFlg; void Cateher(int s i g , int type, int * r e g l i s t ) { printf("Caught an FLPT exception - sorryXn"); i f (MyEFlg == 2) e x i t ( 2 ) ; MyEFlg = 1; > #endif int GlobCol; void mouttext(k) char k [ ] ; { i f (gdb == 0) outtext(k); > void n i l i n e ( i , j , k , l ) int i , j , k , l ; < i f (gdb == 0) line(i,getmaxy()-j,k,getniaxy()-l); > void mputpixeUi,j,k) int i , j , k ; { i f (gdb == 0) putpixeI(i,getmaxyO - j , k ) ; else printf("ppx,y %d % d \ n " , i , j ) ; > void minitgraph(i,j,k) int * i , * j ; char k[]; i i f (gdb == 0) i n i t g r a p h ( i , j , k ) ; > void mclosegraphO < i f (gdb == 0) elosegraphO; > void mmoveto(i,j) int i , j ; < i f (gdb == 0) moveto(i,getmaxyO-j); > void msetcolor(i) int i ; { i f (gdb == 0) s e t c o l o r ( i ) ; > int mgetmaxxO C int i ; i = 740; i f (gdb == 0) i=getmaxx(); r e t u r n ( i ) ; > int mgetmaxyO t int i ; i = 340; i f (gdb == 0) i=getmaxy(); r e t u r n ( i ) ; > float mevlmem(fdt,cof,cofO,Rm,imi,pm) float fdt, c o f [ ] , cofO[], pm; int mm, *Rm; { f l o a t x; X = evlmem(fdt,cof,mm,pm); i f (LMode) { X = log(fabs(x)); i f ((*Rm) == 2) x -= log(fabs(evlmem(fdt,cofO,mm,pm))); > return(x); > void GenDis(np,mm,pm,cof,eofO,Rm,Nbl) int np,mni,*Rm,Nbl; fl o a t pm, **cof, cofOC]; <; int ii,i,j,k,m,n,le,Tst = 0; double mxy, mny; floa t sex, scy, yt; for (ii=0; i i < Nbl; ii++) C le = ( i i % 6) + 8; mxy = mny = mevlmem(0.0,eof[ii],cofO,Rm,mm,pm); for (i=1;i<=np;i++) { yt = mevlmem(i*0.5/np,cof[ii],cofO,Rm,mm,pm); i f (yt > mxy) mxy = yt; i f (yt < mny) mny = yt; > sex = Rx/(float)np; scy = Ry; scy /= 1.3 * (mxy - mny); seteolor(LIGHTBLUE); mline(Sx,Sy,Sx+Rx,Sy); mline(Sx,Sy,Sx,Sy+Ry); i f (gdb) < printf("GD sex % f scy % f Rx %d Ry %d mny % l f mxy % l f " , s c x , scy, Rx, Ry, mny, mxy); getehO; > for (i=0; i<=np;i++) { j = i*scx; yt = mevlmem(i*0.5/np,cof[ii],cofO,Rm,mm,pm); k = (yt - mny)*scy; mputpixel(Sx+j,Sy+k,MAGENTA); > yt = mevlmem(0.0,cof [ii],eofO,Rm,mm,pm); j = (yt - mny)*sey; m = 0; msetcolor(le); for (i=1;i<np;i++) < yt = mevlmem(i*0.5/np,cof[ii],cofO,Rm,mm,pm); k = (yt - mny)*scy; n = i * sex; mline(Sx+m,Sy+j,Sx+n,Sy+k); j=k; m=n; > > i f (*Rm == 1) C *Rm = 2; for (i=1; i<HM; i++) { cofO[i] = c o f [ i i ] [ i ] ; > pr i n t f ( " r e s i d u a l md\n"); getehO;} /*ninoveto( 100,5); mouttext(txt);*/ spri n t f ( T i t l e , " % 3 . O f K " , ( f l o a t ) T); mmoveto((int)(Tst+Sx+(Rx*0.4)),25+Sy); mouttext(Title); /* mmoveto((int)(Tst+Sx+(Rx*0.4)),30+Sy); mouttext(Title);*/ > void GenDisP(Pw,nn) floa t Pw[]; int nn; { int i,j,k,m,n; double mxy, mny; floa t sex, scy, yt; mxy = mny = Pw[0]; for (i=1;i<nn;i++) { yt = Pw[i]; i f (yt > mxy) mxy = yt ; i f (yt < mny) mny = yt; > sex = Rx/(float)nn; scy = Ry; scy /= 1.1 * (mxy - mny); setCOIor(LIGHT BLUE); mli ne(Sx,Sy,Sx+Rx,Sy); mli ne(Sx,Sy,Sx,Sy+Ry); setcoI or(WHI TE); for (i=0; i<nn;i++) { j = i*scx; yt = Pw[i]; k = (yt - mny)*scy; mputpixel(Sx+j,Sy+k,MAGENTA); > yt = PwCO]; j = (yt - mny)*scy; m = 0; for (i=1;i<nn;i++) { yt = Pwti"]; k = (yt - niny)*scy; n = i * sex; n)line(Sx+m,Sy+j,Sx+n,Sy+k); j=k; in=n; > s p r i n t f ( T i t l e , " % 3 . 0 f K " , ( f l o a t ) T); tntnoveto((int)(Sx+(Rx*0.4)),25+Sy); mouttext(Title); > void GenDisR(np,data) int np; flo a t datai]; { int i,j,k,m,n,Tst = 0; double mxy, mny; float sex, sey, yt; mxy = mny = dataCI]; for (i=2;i<=np;i++) < yt = dataCi]; i f (yt > mxy) mxy = yt; i f (yt < mny) mny = yt; > sex = Rx/(float)np; scy = Ry; scy /= 1.3 * (mxy - mny); setcotor(LIGHTBLUE); mline(Sx,Sy,Sx+Rx,Sy); mline(Sx,Sy,Sx,Sy+Ry); i f (gdb) { printfC'GD sex % f scy % f Rx %d Ry %d mny % l f mxy % l f " , s c x , scy, Rx, Ry, mny, mxy); getchO; } for (i=1; i<=np;i++) < j = i*scx; yt = dataCi]; k = (yt - mny)*scy; mputpixel(Sx+j,Sy+k,MAGENTA); > yt = dataCI]; /* ?? */ j = (yt - mny)*scy; m = 0; mseteolor(GlobCol); for (i=1;i<np;i++) C yt = d a t a l i ] ; k = (yt - mny)*sey; n = i * sex; mline(Sx+m,Sy+j,Sx+n,Sy+k); j=k; m=n; > /*mmoveto(100,5); mouttext(txt);*/ sprintf(Title,"%3.OfK",(float) T); ninoveto((int)(Tst+Sx+(Rx*0.4)),25+Sy); mouttext(Title); /* niiioveto((int)(Tst+Sx+(Rx*0.4)),30+Sy); mouttext(Title);*/ ) void MkDum(data) f l o a t d a t a i ] ; { int i , j ; float x,y; /* Test Rtn */ printfC'Enter number of periods: " ) ; scanf("%f",&y); for (i=1; i<=NN;i++) t data l i ] = (0.1*sin(i*y*2*Pi/NN)) + sin(60.0*i*Pi/NN); > > int ReaclAsc(temp,Typ,run,data) char Typ; flo a t temp, datai]; int run; < FILE *fp, *gp, *fopen(); char fnam[80]; int i,j,k,SizeSemi,NPT, RetV = 0; long int imx, imn,ii; f l o a t AccStd, ARawL,ARaw, Astd, ATranL, ATran, BRawL, BRaw, Bstd, BTranL, BTran, QI; double AVg, NOr; i f (Typ == 'X') { MkDum(data); > else { spr i ntf(fnam,"v%d.dat",(i nt)temp) ; i f ((gp = fopen(fnam,"w"))==NULL) C printf("Could not open %s\007\n",fnam); exit(99); > sprintf(fnam,"%s%c%dF%1d",pathtodat,Typ,run,(int)temp); i f ( ( f p = fopen(fnam,"r"))==NULL) { printf("\007Error in open of f i l e %s\n",fnam); RetV = 1; PseO; > else { i f (ddb) printf("Reading from f i l e '%s'\n",fnam); fscanf(fp,"%f % f % f % f %f",&D_Ireq,&D_Vreq,&D_Vsensed,&D_Freq,&D_Temp); i f (ddb) printf("Now reading In values\n"); AVg = 0.0; i f ((NN * 1.0 * Grp) > NConv) { printf("Overrun in number of points required\n"); e x i t ( 7 ) ; > for (ii=1;ii<=NN;ii++) { dataCii] = 0.0; for (k=0; k<Grp; k++) { i f (D_Temp < 0.0) fscanf(fp,"%x",&j); else fscanf(fp,"%d",&j); dataCii] += j ; > AVg += d a t a C i i ) ; fprintf(gp,"%5.4f\n",data[ii]); i f ((ddb)&&((ii % 100)==0)) p r i n t f ( " % l d % d \ n " , i i , j ) ; > AVg /= NN; felose(fp); fclose(gp); for (ii=1;ii<=NN;ii++) dataCii] = (dataCii] - AVg)/Grp; > > GlobCol = LIGHTRED; GenOisR(NN,data); delay(3000); return(RetV); > int HyGetVal(j,iv) long int j ; int * i v ; i int i ; i = i v C j ] ; /* return(((unsigned) (ivC2*i]&0xff)) | ((unsigned) {(ivC(2*i)+1]&0xff)«8)) ); */ r e t u r n ( i ) ; > int ReadBin(temp,Typ,run,data,n) char Typ; float temp, dataC); int run, n; {FILE *fp, *gp, *hp, *fopen(); char fnam[80]; int i,j,k,SizeSemi,NPT, RetV = 0; long int imx, imn, i i , j j ; f l o a t AccStd, ARawL,ARaw, Astd, ATranL, ATran, BRawL, BRaw, Bstd, BTranL, BTran, QI; double AVg, NOr; i f (Typ == -X') <: MkOum(data); > else { sprintf(fnam,"v%d.dat",(int)tenip); i f (VWrite) { i f ((gp = fopen(fnam,"w"))==NULL) C printf("Could not open %s\007\n",fnam); exit(99); » sprintf(fnam,"%srun%1d\\%c%dF%1d",pathtodat,run,Typ,run,(int)temp); i f ( ( f p = fopen(fnam,"rb"))==NULL) { printf("\007Error i n open of f i l e %s\n",fnam); RetV = 1; PseO; > else { i f (ddb) printf("Reading from f i l e '%s>\n",fnam); sprintf(fnam,"%srun%1d\\L0G%1d",pathtodat,run,run); i f ((hp = fopen(fnam,"r"))==NULL) t printf("Could not open %s\007\n",fnam); exit(99); > do { fscanf(hp,"%f % f % f % f %f",&D_Ireq,&D Vreq,&D_Vsensed,&D_Freq,&D_Temp); i f (D Ireq > -1.0) i = (fabs(D Temp) 7 100.0) + 0.5; else i = -9; /* above handles the E f i l e s */" i f (ddb) printf("Reading LOG%d entry for %dK\n",run,i); > while ((!feof(hp)) && ( i != ((int)(temp + 0.5)))); i f (feof(hp)) < printf("Warning: correct temperature not found...\007\n"); exit(99); > fclose(hp); i f (ddb) printf("Now reading in values\n"); AVg = 0.0; i f ((NN * 1.0 * Grp) > NConv) { printf("Overrun in number of points requiredXn"); e x i t ( 7 ) ; > i f (NConv != ( i = fread(ivec, ( s i z e _ t ) 2, (s i z e _ t ) NConv, fp))) { printf("Probable read error with %d items read\007\n",i); > j j = (n * NN * Grp)/Nover; for (ii=1;ii<=NN;ii++) C dataCii] = 0.0; for (k=0; k<Grp; k++) C j = MyGetVaUjj++,ivec); d a t a l i i ] += j ; > AVg += d a t a l i i ] ; i f (VWrite) fprintf(gp,"%5.4f\n",data[ii]); i f ((ddb)&&((ii % 100)==0)) p r i n t f ( " % l d % d \ n " . i i , j ) ; > AVg /= NN; f c l o s e ( f p ) ; i f (VWrite) fclose(gp); for (ii=1;ii<=NN;ii++) dataCii] = (dataCii] - AVg)/Grp; > > GlobCol = LIGHTRED; i f (Nsw != 0) GenOisR(NN,data); return(RetV); > int Read(temp,Typ,run,data,n) char Typ; float temp, d a t a i ] ; int run, n; { int i , j = 0; f l o a t w = 0; i f (run < CritRun) i = ReaclAsc(temp,Typ,run,data); else i = ReadBin(temp,Typ,run,data,n); #if Window /* Apply WELCH windowing, see NRec p442 */ for (j=0;j<NN;j++) { w = ( j - (0.5 * (NN - 1)))/(0.5 * (NN + 1)); w = 1.0 - sqr(w); data[j] *= w; > #endif r e t u r n ( i ) ; > int MyCmp(float at2], f l o a t b[2]) { int i ; f l o a t xx; X X = a[1] - b[1]; i = 0; /* should reverse sort! */ i f ( X X > 0) i = -1; i f (xx < 0) i = 1; return(i); > f l o a t Srch(x,i,nnn) f l o a t x [ ] ; int i , nnn; { floa t xmin; int j , i l , i h . Ran; Ran = Rang * nnn / 100.0; i l = i - (Ran/2); ih = i + (Ran/2); i f ( i l < 0) i l = 0; i f (ih >= nnn) ih = nnn - 1; xmin = x[0] ; for (j=il+1; j<ih; j++) i f (xmin > x t j ] ) xmin = x [ j ] ; return(xmin); > f l o a t hevlmem(fdt,cof,MM,pm,Nbl) float fdt, **cof, pm; int MM, Nbl; < int i ; double xx, xt; f l o a t *xv; xx = 0.0; xv = vector(0,Nbl); i f (SetMode == 0) for (i=0; i<Nbt; i++) xx += evlmein(fdt,cof [i] ,MM,pm); else { double avg, avg2, std; int cnt; avg = avg2 = std = 0.0; cnt = 0; for (i=0;i<Nbl; i++) avg += (xv[i] = evlniem(fdt,cof [i] ,HM,pm)); avg /= Nbl; for (i=0;i<Nbl; i++) std += sqr(xv[i] - avg); std = sqrt(std/Nbl); for (i=0;i<Nbl; i++) t xt = fabs(xv[i] - avg); i f (xt < (CritSt * std)) C avg2 += xt; cnt++; > > i f (cnt < 1) < p r i n t f ( " e r r o r : no points found!\007\n"); exit(99); > X X = (avg2 /= cnt); > free_vector(xv,0,Nbl); return((float)xx); > void main(argc,argv) int argc; char *argv[]; { int i , mj, icnt, jcnt, detect, gmode, Rm, NTs, Nsk, Nst; char txt[30]; f l o a t four, f s t , mid, 1st, max; int i i , nnn, Nbl, NumBt; flo a t f d t , pm, Fmax, **cof, *data, *cof0; FILE *fp, *gp; char Typ; NN = Ndef; MM = Mdef; LMode = 0; Nsk = 1; Nsw = 1; printf("Power spectrum analysis: Version %d\n",Version); Run = 3; Grp = GrpOf; Typ = 'W; Nst = 0; ivec = ( i n t *) malloc(NConv«1); i f (ivec == NULL) { pr i n t f ("At location e r r o r W ) ; exit(99); > i f (argc > 1) sscanf(argvll],"%d",&NN); printf("NN is %d\n",NN); /* Ndat*/ i f (argc > 2) sscanf(argv[2],"%d",&MM); printf("MM i s %d\n",MM); /* Npol*/ i f (argc > 3) sscanf(argv[3],"%d",&Grp); printf("Grp is %d\n",Grp); i f (argc > 4) sscanf(argv[4],"%d",&Run); printf("Run is %d\n",Run); i f (argc > 5) sscanf(argv[5],"%c",&Typ); printf("Typ is %c\n",Typ);/* W */ i f (argc > 6) sscanf(argvC6],"%d",&LMode); printf("LMode i s %d\n",LMode); i f (argc > 7) sscanf(argv[7],»%d",&Nsk); printf("Nsk i s %d\n»,Nsk);/*skip*/ i f (argc > 8) sscanf(argv[8],"%d",&Nst); printf("Nst i s %d\n",Nst);/*strt*/ i f (argc > 9) sscanf(argv[9],"%d",&Nsw); printf("Nsw i s %d\n",Nsw);/*set#*/ i f (argc >10) sscanf(argv[10],"%d",&ddb); printf("ddb is %d\n",ddb); i f (Typ == 'v') Typ = -V; i f (Typ == -W) Typ = 'W; i f (gdb < 0) { printf("Residual mode\n"); gdb = 0; Rm = 1; getchO; > else Rm =0; i f ((gp = fopen("pow5.dat","w"))==NULL) C printf("PRFl err on P0W5\n"); exit(9);> else < fprintf(gp,"%d %d %d %d %d\n",NN,MM,Grp,Run,Typ - 'V'); fclose(gp); > sprintf(txt,"tIist%1d",Run); i f ((gp = fop€n(txt,"r"))==NULL) C printf("Cannot open %s\n",txt); exit(9);> fscanf(gp,"%d",&NTs); i f (Nst > 0) NTs = 8; printf("NTs wilt be %d\n",NTs); i f (Typ == 'X') { NN = 1000; Grp = 1; NTs = 1; > i f (Nsw == 0) { Nbl = NConv/(Grp * (fl o a t ) NN); Nbl = (Nover*Nbl) - 1; i f (Nover == 1) Nbl++; > else Nbl = 1; cof = matrix(0,Nbl,1,MM); data = vectord,NN); cofO = vectord,MM); NFDT = (3 * MM) / 2; Alf x = 1; A l f y = NTs/Nsk; Rx = 700/Alfx; Ry = 320/Alfy; icnt = jcnt = 0; p r i n t f ( " A l f s are %d %d, giving Rx= %d and Ry = %d\n",Alfx,Alfy,Rx,Ry); detect = 0; minitgraph(&detect, &gmode,GLOC); Rx = mgetmaxxO*((float) Rx)/700.0; Ry = 0.9 * mgetmaxy()*((float) Ry)/320.0; i f ((Typ == •V)||(Typ == 'V)) { printf("WARNING: using W files\007\n"); Fmax = 0.5 * 200.0; Typ = 'W';} else Fmax = 0.5 * 200.0; Fmax /= Grp; printf("Pow%d NN:%d MM:%d Grp:%d Run:%d Fmx:%3.1f •%c' LM:%1d Nbl:%1d W:%1d S:%4.2f- ", Version,NN,MM,Grp.Run,Fmax,Typ,LMode,Nbl,Window,(float)CritSt); i=0; i f (Nst > 0) do C fscanf(gp,"%f",&T); /* skip to start */ > while(((int) (T + 0.5)) != Nst); while(i<NTs) C i f ( ( i > 0)||(Nst == 0)) for (mj=0;mj<Nsk;mj++) fscanf(gp,"%f",&T); /* allw skipping */ Sx = icnt * Rx; Sy = 20 + (jcnt * Ry); for (NumBl=0; NumBl < Nbl; NumBl++) < i f (Read(T,Typ,Run,data,NumBl) != 0) { pr i n t f ( " E r r o r i n Read\n"); exi t ( 8 ) ; > memcof(data,NN,MM,&pm,cof[NumBl]); > max = 0.0; nnn = 0; for (fdt=0;fdt<=0.5;fdt+= 0.5/NFDT) PowVCnnn++] = hevlmem(fdt,cof,MM,pm,Nbl); i f (LMode != 0) for (ii=0;ii<nnn;ii++) PowV[ii] = log(fabs(PowV[ii] ) ) ; #if SWrite s p r i n t f ( t x t , " s f i l e s \ \ s % d . d a t " , ( i n t ) (T + 0.5)); fp = fopen(txt,"w"); i f (fp == NULL) < printfC'Help FOE on %s\007\n",txt); exit(99);> fpr i ntf(fp,"%d\n\n",nnn) ; for (ii=0;ii<nnn;ii++) fpr i ntf(fp,"%f\n",PowV[i i ] ) ; fclos e ( f p ) ; #endif #if GWrite fp = fopen("gspec.dat","a"); i f (fp == NULL) { printfC'Help FOE on gspec.dat\007\n"); exit(99);> for (ii=0;ii<nnn;ii++) f p r i n t f ( f p , " % d %5.3f\n",ii,PowV[ii] + (GCount * GOffset)); fcl o s e ( f p ) ; GCount++; #endif fp = fopen("raw.dat","a"); i f (fp == NULL) { printfC'Help FOE\007\n"); exit(99);> f s t = PowVtO] - Srch(PowV,0,nnn); mid = PowVCI] - Srch(PowV,1,nnn); ii=0; mj = 0; for (fdt=2*(0.5/NFDT);fdt<=0.5;fdt+= 0.5/NFDT) { ii++; 1st = PowV[ii+2] - Srch(PowV,ii+2,nnn); i f ((fst<mid)&&(mid>lst)&&(mid > (0.00*max)) && (mj < 200)) { /* max turned o f f * / four = i i * Fmax / ( f l o a t ) NFDT; KeepV[mj][0] = four; KeepV[mj++] [1] = mid; > f s t = mid; mid = 1st; > i f (mj == 200) printf("\007Warning maxima overflow!\n"); qsort(KeepV,mj,2*sizeof(KeepV[0][0]),MyCmp); for (ii=0;ii<mj;ii++) f p r i n t f ( f p , " % f %020.4lf % f % f %f\n",T,(double)KeepV[ii] [1], 1000.0/T,log(sqr(T)/(2.0 * KeepVli i] [0] )),KeepV[i i] [0] ); f c l o s e ( f p ) ; GlobCol = LIGHTGREEN; /* GenDis(NFDT,MM,pm,cof,cofO,&Rm.Nbl); */ GenD i sP(PowV,nnn); icnt++; i f (icnt == Alfx) { icnt = 0; jcnt++; > i+= Nsk; > PseO; i f (ddb==0) mclosegraphO; printf("Done\n"); printf("Note: Sampling frequency was %5.3f\n",Fmax*2); free_vector(cof0,1,MM); free_vector(data,1,NN); free_matrix(cof,0,Nbl,1,MM); > /* PRn - Power Spectra Reader Tuesday 11 February 1992 */ /* attempt to remove 'noise' peaks require that peak be greater than noirat * local std which i s evaluated over nearest noinei neighbours */ /* and ' s i s t e r ' peaks require that neither nearest local minima be more distant than s i s r a t * distance of other - avoid humps should also require (future) that the two peaks be associated */ /* add t h i r d mode of baselining? med f> 30Hz, min f <30Hz */ #define Version 12 #define Home 1 #define Fmax 100.0 #define Nmax 500 #define nimax 50 «define gdb 0 #define ddb 0 #define deldur 1000 #define sqr(x) ((x)*(x)) ^include <stdio.h> #include <stdlib.h> #include <math.h> #include <graphics.h> FILE *fp, *fopen(); int dmd, md. Temp, smth = 3, f i l t = 1, nmax = 10, imaxCnImax], noinei = 20; int nnn,sel,nbas,il,ih,scnt, Tsta = 252, Tsto = 295, grcnt = 0, cgrf = 0, Tste = 1, cdatf = 1, flash = 1; fl o a t isoperc = 5.0, basperc = 5.0, si s r a t = 0.1, noirat = 2.0, cr i t p e r = 0.05; fl o a t PowVCNmax], ProcPCNmax], ScrVtNmax], SortA [Nmax] [2] ; char *BasTyp[2] = { "median", "minimum" >; char *DisTyp[2] = < "text", "graphics" >; char *FilTyp[2] = { "di r e c t " , " f l a t t e n " >; void PseO i printf("Pausing\n"); while (getchO != ( i n t ) ' ' ) ; > #if Home #define GLOC "c:\\tcpp\\bgi\\" #else #define GLOC "c:\\tc\\bgi\\" #endif void mouttext(k) char k [ ] ; { i f (gdb == 0) outtext(k); > void m l i n e ( i , j , k , l ) int i , j , k , l ; { i f (gdb == 0) line(i,getmaxy()-j,k,getmaxy()-l); > void mputpixeUi,j,k) int i , j , k ; t i f (gdb == 0) putpixe I ( i , getmaxyO - j , k ) ; else printf("ppx,y %d % d \ n " , i , j ) ; > void minitgraph(i,j,k) int * i , * j ; char k [ ] ; { i f (gdb == 0) i n i t g r a p h ( i , j , k ) ; > void mclosegraphO t i f (gdb == 0) elosegraphO; > void mmoveto(i,j) int i , j ; { i f (gdb == 0) moveto(i,getmaxyO-j); > void msetcolor(i) int i ; { i f (gdb == 0) s e t c o l o r ( i ) ; > in t mgetmaxxO { int i ; i = 740; i f (gdb == 0) i=getmaxxO; r e t u r n ( i ) ; > i n t mgetmaxyO { int i ; i = 340; i f (gdb == 0) i=getmaxyO; r e t u r n ( i ) ; > void mcrs(i,j,k) int i , j , k ; t setcolor(k); mline(i-1,j,i+1,j); mline(i,j-1,i,j+1); > void Disp(P,Q,np,dmd,psf) int np, dmd, psf; floa t P[], Q[]; C int i i , i , j , k , m , n , Sx, Sy, Rx, Ry, det, gmo; double mxy, mny; fl o a t sex, scy, yt; char txt[80]; i f (dmd == 0) for (i=0;i<np;i++) { p r i n t f ( " % d PowV %6.3f ProcP %6.3f\n",i,P[i] ,Q[i] ); i f (((i+1) % 24)==0) PseO; > else { mxy = mny = P[0]; for (i=1;i<np;i++) { yt = P [ i ] ; i f (yt > mxy) mxy = yt; i f (yt < mny) mny = yt; > det = 0; minitgraph(&det, &gmo, GLOC); sex = getmaxx()/(f loat)np; scy = getmaxyO/ (2.0 * 1.3 * (mxy - mny)); Sx = 0; Sy = 0; Rx = getmaxxO; Ry = getmaxyO/2; setcolor(WHITE); mline(Sx,Sy,Sx+Rx,Sy); ml ine(Sx,Sy,Sx,Sy+Ry); i f (gdb) < printfC'GD scx % f scy % f Rx %d Ry %d mny % l f mxy % l f " , s c x , scy, Rx, Ry, mny, mxy); getchO; > for (i=0;i<np;i++) { j = i*scx; yt = P l i ] ; k = (yt - mny)*scy; mputpixel(Sx+j,Sy+k,MAGENTA); ) yt = P[0]; j = (yt - mny)*scy; m = 0; setcolor(LIGHTGREEN); for (i=1;i<np;i++) < yt = P l i ] ; k = (yt - mny)*scy; n = i * scx; mline(Sx+m,Sy+j,Sx+n,Sy+k); j=k; m=n; > innoveto((int)(Sx+(Rx*0.4)),(int) (Sy+(0.6 * Ry))); setcolor(WHITE); mouttextC'Power Spectrum"); mxy = mny = Q[0]; for (i=1;i<np;i++) t yt = Q [ i ] ; i f (yt > mxy) mxy = yt; i f (yt < mny) mny = yt; > scx = getmaxxO/(f loat)np; scy = getmaxyO/ (2.0 * 1.3 * (mxy - mny)); Sx = 0; Sy = getmaxyO/2; Rx = getmaxxO; Ry = getmaxy()/2; setcolor(WHlTE); mline(Sx,Sy,Sx+Rx,Sy); mline(Sx,Sy,Sx,Sy+Ry); for (i=0;i<np;i++) t j = i*scx; yt = Q[i] ; k = (yt - mny)*scy; mputpixel(Sx+j,Sy+k,MAGENTA); > yt = Q[0]; j = (yt - mny)*scy; m = 0; setcolor(LIGHTRED); for (i=1;i<np;i++) { yt = Q [ i ] ; k = (yt - mny)*scy; n = i * scx; mline(Sx+m,Sy+j,Sx+n,Sy+k); j=k; m=n; > mmoveto((int)(Sx+(Rx*0.4)),(int)(Sy + (0.6 * Ry))); setcolor(WHITE); mouttext("Filtered Power"); sprintf(txt,"PR%2d - %3dK iso%%%1.0f bas%%%1.0f baseline:%s sis:%5.3f noi:%5.3f". Version,Temp,isoperc,basperc,BasTyp[md],sisrat,noirat); mmoveto((int)(Rx*0.2),(int)(Sy + (0.9 * Ry))); mouttext(txt); s p r i n t f ( t x t , " smth:%1d f i l t : % s nmax:%1d noinei:%d", smth,FiITyplfiIt],nmax,noinei); mmoveto({int)(Rx*0.2),(int)(Sy + (0.85 * Ry))); mouttext(txt); for (i=0;i<nmax;i++) { n = imaxti] * scx; i f (n>=0) setcolor(MAGENTA); else { setcolor(LIGHTRED); n *= -1; > mli ne(Sx+n,0,Sx+n,getmaxy()-45); > i f (psf) PseO; else delay(deldur); mclosegraph();> > int MyCmp(const void *x, const void *y) t int i ; f l o a t xx; X X = * ( f l o a t *)x - * ( f l o a t *)y; i = 0; i f ( X X > 0.0) i = -1; i f (xx < 0.0) i = 1; re t u r n ( i ) ; > fl o a t BaseL(md,i,nnn,nra) int md, i , nnn, nra; { int j , i l , i h , i c , o f f ; floa t rv; i l = i - nra; i f ( i l < 0) i l = 0; ih = i + nra; i f ( i h > nnn) ih = nnn; ic = ih - i l ; switch (md) { case 0: /* median */ i f ( i l == 0) { /* idea i s to shorten range near o r i g i n (when i I < 0) */ off = nra - i ; ih -= off; ic = ih - il; /* make i t symnetric */ i f ( ( i h <i)| [(off<0)) {:printf("Error conditionXn"); e x i t ( 9 ) ; > > for ( j = i l ; j<ih; j++) S c r V [ j - i l ] = PowVtj]; qsort(ScrV, i c , sizeof(ScrVlO]), MyCmp); rv = ScrV[ic/2]; break; case 1: /* minimum */ rv = PowVlil]; for ( j = i l ; j<ih; j++) i f (PowVCj] < rv) rv = PowVtj]; break; default: printf("Baselining mode i s invalid\n"); exit(99); break; > return(rv); > void GetDat(T,nnn) int T, *nnn; { char txt[80]; int i ; spr i n t f ( t x t , " s f iIes\\s%d.dat",T); i f ( ( f p = fopen(txt,"r")) == NULL) { printf("DFOErr\007\n"); exit(9);> fscanf(fp,"%d",nnn); i f (*nnn > Nmax) < printf("Array i s too small\007\n"); exit(99); > for (i=0;i< *nnn;i++) { fscanf(fp,"%f",&(PowV[i] ) ) ; ProcP[i] = PowV[i]; > p r i n t f ( " F i l e read in\n"); fclose(fp); > void Prep(psf) int psf; { int i , j , k, isoran; flo a t x, Imin, rmin; i f (sel > 0) t /* f i r s t remove Baseline */ nbas = basperc * nnn / 100.0; i f (nbas == 0) nbas = 1; for (i=0;i<nnn;i++) ProcPli] = PowVCi] - BaseL(md,i,nnn,nbas); /* apply Smoothing */ i f (smth > 0) { for (i=0;i<nnn;i++) < ScrV[i] = 0.0; i l = ( i - smth/2); ih = i l + smth; /* smth should be even! */ for (j=il;j<ih;j++) ScrVIi] += ProcPCj]; > for (i=0;i<nnn;i++) ProcPCi] = ScrVCi]; > /* remove peak at f=0 i f filt==1 */ i f ( f i l t > 0) { i = nbas - 2; i f ( i < 0) i = 0; while (ProcP[i+1] < ProcPli]) i++; for {j=0;j<i;j++) ProcPlj] = ProcPCi]; > /* i f maxima wanted then c o l l e c t local maxima and sort for strongest */ i f (nmax > 0) < scnt=0; for (i=1;i<(nnn-1);i++) < i f ((ProcP[i-1] < ProcPCi] )&&(ProcPCi] > ProcPCi+1])) { SortA [sent] CO] = ProcPCi]; SortA Cscnt++] CI] = i;> > qsort(SortA, sent, 2*sizeof(SortACO] CO]), MyCmp); /* isolate any secondary peaks that are too close and then remove them i f they are ' s i s t e r s ' */ i f (isoperc > 0.01) { floa t y, z, cr; isoran = isoperc * nnn / 100.0; cr = c r i t p e r * (SortACO] CO] - SortACscnt-1] CO] ); printf("Isoran i s %d C r i t i c a l value i s %f\n",isoran,cr); for (i=0;i<(scnt-1);i++) i f (SortACi]CO] > 0.0) for (j=i+1;j<scnt;j++) i f (abs(SortACj] CI] - SortACi]C1]) < isoran) C /* now see i f a ' s i s t e r ' */ k = SortACj]C1]; do { k--; > while ((k>0)&&( !( (ProcPCk-1] > ProcPCk] )&&(ProcPCk] < ProcPCk+1]) ) ) ); Imin = ProcP Ck]; k = SortA Cj] CI]; do { k++; > while ((k<(nnn-1))&&( !( (ProcPCk-1] > ProcP[k])&&(ProcPCk] < ProcPCk+1]) ) ) ); rmin = ProcP[k]; X = y = SortACj][0] - Imin; i f ( X != 0.0) X = fabs((( z = (SortACj]CO] - rmin)))/x); i f ( ( X == 0.0) II ( ( ( X < 1.0) && ( X < s i s r a t ) ) II ( ( X > 1.0)&&((1/x) < s i s r a t ) ) ) II (y < cr) II (z < cr) ) < printf("Max at %d f a i l e d s i s t e r test Im = % f rm = % f x: % f \ n " , (int)SortACj] CI], Imin,rmin,x); SortACj]C0] = -999.0; /* fla g f a i l u r e */ > else printfC'Max at %d passed s i s t e r test Im = % f rm = % f x: % f \ n " , (int)SortACj] CI], Imin, rmin,x); > i f (psf) PseO; qsort(SortA, sent, 2*sizeof(SortAC0] CO]), MyCmp); > /* of survivors, select nmax largest */ for (i=0;i<nmax;i++) { printf("Max#%2d %3d % f \ n " , i , ( i n t ) SortACi]C1], SortACi] CO] ); imaxCi] = ( i n t ) SortACi] CI]; > /* now apply local noise test and s i s t e r test */ i f (noirat > 0.001) { int stc, cen; floa t std; std = 0.0; stc = 0; for (i=0;i<nmax;i++) { cen = imaxCi]; Imin = rmin = ProcPCcen]; for (j=cen-noinei;j<cen;j++) C i f ((j>=0)&&(j<(nnn-1))) { i f (Imin > ProcPCj]) Imin = ProcPCj]; std += sqr(ProcPCj] - ProcPCj+1]); stc++; » for (j=cen+1;j<cen+noinei;j++) C i f ((j>=0)&&(j<(nnn-1))) C i f (rmin > ProcPCj]) rmin = ProcPCj]; std += sqr(ProcP[j] - ProcP[j+1]); stc++; » i f (stc==0) <:printf("????\007\n"); ex i t ( 9 ) ; > std = sq r t ( s t d / s t c ) ; i f ((fabs(ProcP[cen] - Imin) < (noirat * std)) && (fabsCProcPCcen] - rmin) < (noirat * std))) { printf("Max%d f a i l e d noise t e s t \ n " , i ) ; i f (imaxCi] > 0) imaxli] *= -1; /* flag f a i l u r e */ > > > /* i f cdatf then c o l l e c t Arrhenius data to f i l e ' p l t f */ i f ((fp = fopen("pltf","a")) == NULL) { printf("FOErr\007\n"); exit(99); > for (i=0;i<nmax;i++) i f (imaxCi] > 0) f p r i n t f ( f p , " % d % f % f \ n " . Temp, i max [ i ] * Fmax/nnn, Sor t A [ i HO] ) ; fcl o s e ( f p ) ; /* i f cgrf then c o l l e c t spectra into one targe grapher f i l e */ i f (cgrf > 0) { fl o a t maxx, minx, scx, *xx, xoff, yoff; i f ((fp = fopen("grfr.dat","a")) == NULL) { printf("FOErr\007\n"); exit(99); > yoff = (grcnt % 22); xoff = 1.1 * nnn * ((int)(grcnt++ / 22)); i f (cgrf==1) t yoff *= 6.5; xx = PowV;> else <:xx=ProcP; yoff *= 12.5;> minx = maxx = xx[0]; for (i=0;i<nnn;i++) { i f ( x x l i ] > maxx) maxx = x x t i ] ; i f (xx[i] < minx) minx = x x [ i ] ; > scx = 10.0 / (maxx - minx); f p r i n t f ( f p , " % f %f\n",xoff,0.0); /* positioning */ f p r i n t f ( f p , " % f %f\n",xoff,(scx*(xx[0]-minx))+yoff); for (i=0;i<nnn;i++) f p r i n t f ( f p , " % f %f\n",i+xoff,(scx*(xx[i]-minx))+yoff); f p r i n t f ( f p , " % f %f\n",nnn+xoff-1,0.0); /* positioning */ fclo s e ( f p ) ; > i f (psf) PseO; > i f (!((psf == 0)&&(flash == 1))) Disp(PowV, ProcP, nnn, dmd, psf); » void RunT(psf) int psf; C i f (cdatf) t i f ( ( fp = fopen("pltf","w")) == NULL) { printf("FOErr\007\n"); exit(99); > fcl o s e ( f p ) ; > i f (cgrf) { grcnt = 0; i f ( ( f p = fopen("grfr.dat","w")) == NULL) { printf("FOErr\007\n"); exit(99); > fcl o s e ( f p ) ; > i f (Tsto < Tsta) { Temp=Tsto; Tsto = Tsta; Tsta = Temp; > Temp = Tsta; white (Temp <= Tsto) < GetDat(Temp,&nnn); Prep(psf); Temp += Tste; > Temp -= Tste; > mainO { fl o a t tmn, fmn, tmx, fmx, set, scf, f, t ; int i , j , gmo, det; char txt[80]; printf("PR%d - Spectra Reader\n",Version); md = 0; dmd = 1; GetDat(Temp = 252, &nnn); do < printf("Select:\nO - end\n"); p r i n t f C ' i - Set Baseline par. ( i s now %3.0f%%)\n",basperc); p r i n t f ( " 2 - Set Isolate par. ( i s now %3.0f%%)\n",isoperc); p r i n t f ( " 3 - Set Baseline mode ( i s now %s)\n",BasTyp[md]); p r i n t f ( " 4 - Set Display mode ( i s now %s)\n",DisTyp[dmd] ); p r i n t f ( " 5 - New temperature ( i s now %dK)\n",Temp); p r i n t f ( " 6 - Set smoothing ( i s now %d)\n",smth); p r i n t f ( " 7 - Set flatt e n i n g ( i s now % s ) \ n " , F i I T y p l f i I t ] ) ; p r i n t f ( " 8 - Set number maxima ( i s now %d)\n",nmax); p r i n t f ( " 9 - Simple display\n"); printfC'IO- Set Animation range\n"); p r i n t f C ' l l - Animated displayXn"); printf("12- Step-through displayXn"); printf{"13- Set Collect f l a g ( i s now %1d)\n",cdatf); printf("14- Display Arrhenius Data\n"); printf("15- Set s i s r a t ( i s now %5.3f)\n",sisrat); printf("16- Set noirat ( i s now %5.3f)\n",noirat); printf("17- Set noinei ( i s now %d)\n",noinei); printf("18- Set flashthrough ( i s now %d)\n",flash); printf("19- Set c r i t p e r ( i s now %3f)\n",critper); printf("20- Set cgrf ( i s now %d)\n",cgrf); scanf("%d",&sel); switch (sel) { case 0: break; case 1: printf("Over what percentage of range? " ) ; scanf("%f",&basperc); break; case 2: p r i n t f ( " I s o l a t i n g maxima\n Over what percentage of range: " ) ; scanf("%f",&isoperc); break; case 3: printf("Set Baselining Mode:\nO - median\n1 - minimum\n"); scanf("%d",&md); break; case 4: printf("Set Display Mode:\nO - textXnl - graphics\n"); scanf("%d",&dmd); break; case 5: printf("Enter new temperature: " ) ; scanf("%d",&Temp); GetDat(Temp, &nnn); break; case 6: printf("Set smoothing as: " ) ; scanf("%d",&smth); break; case 7: printf("Set fla t t e n i n g mode:\nO - none\n1 - flatten\n"); scanf("%d",&fiIt); break; case 8: printf("Number of maxima\n"); scanf("%d",&nmax); break; case 9: break; case 10: printf("Enter s t a r t , stop and step temperatures: " ) ; scanf("%d %d %d",&Tsta,&Tsto,&Tste); break; case 11: RunT(O); break; case 12: RunT(1); break; case 13: printf("Enter collect-data fl a g (0/1): " ) ; scanf("%d",&cdatf); break; case 14: i f ((fp = fopen("pltf","r")) == NULL) { printf("FOErr\007\n"); exit(99); > tmn = fmn = 99999.0; tmx = fmx = 0.0; while ((!feof(fp))&&(2 == fscanf(fp,"%f % f %*f",&t,&f))) { prin t f ( " T : % f f: % f \ n " , t , f ) ; f = lo9(sqr(t)/(2.0 * f ) ) ; t = 1/t; i f (tmn > t) tmn = t ; i f (tmx < t) tmx = t ; i f (fmn > f) fmn = f; i f (fmx < f) fmx = f; } fc l o s e ( f p ) ; set = getmaxx()/(tmx - tmn); scf = getmaxyO/(fmx - fmn); i f ((fp = fopen("pltf","r»)) == NULL) { printf("FOErr\007\n"); exit(99); > det = 0; minitgraph(&det,&gmo, GLOC); setcolor(LIGHTBLUE); mline(0,0,getmaxxO,0); mline(0,0,0,getmaxyO); while ((!feof(fp))&&(2 == fscanf(fp,"%f % f %*f",&t,&f))) t f = log(sqr(t)/(2.0 * f ) ) ; t = 1/t; mcrs((int) ( s c t * ( t - tmn)), ( i n t ) ( s c f * ( f - fmn)), WHITE); } setcolor(WHITE); sprintf(txt,"PR%1d - %dK iso%%%1.0f bas%%%1.0f baseline:%s sis:%5.3f noi:%5.3f", Version,Tsta,isoperc,basperc,BasTypImd],sisrat,noirat); mmoveto(70,det = getmaxyO-5); mouttext(txt); s p r i n t f ( t x t , " %dK smth:%1d %s nmax:%1d noinei:%d", Tsto,smth,FiITypCfiIt],nmax,noinei); mmoveto(70,det-10); mouttext(txt); PseO; mclosegraphO; fcl o s e ( f p ) ; break; case 15: printf("Enter value: " ) ; scanf("%f",&sisrat); break; case 16: printf("Enter value: " ) ; scanf("%f",&noirat); break; case 17: printf("Enter value: " ) ; scanf("%d",&noinei); break; case 18: printf("Enter value: " ) ; scanf("%d",&flash); break; defauU:printf("> Not known <\n"); break; > i f ( sel < 10) P repd); > while (sel > 0); printf("Done\n"); return(O); > /* FRONTn: Convert RUDOLF output ( i n PAFILE) to Psi,Deltas ( i n PDFILE) */ /* Refer to Azzam+Bashara p288 QC 443 A96 1977 */ /* Handles an archive format for p a f i l e */ #define Version 9 #define AlOffset 0.035 /* Straight Through Position i s 89.96 or 7 */ #define RudP -0.71 /* Rudolf 'True' Corrections */ #define RudA 0.0 #define RudDefP -.04 /* Default Rudolf Offsets */ #define RudDefA -.02 ^include <math.h> #include <stdio.h> #define sqr(x) ((x)*(x)) #define Pi 3.141592654 FILE *fp, *gp, *hp, * i p , *fopen(); typedef struct cnode { double Re, Im; > complex; long _ s t k s i z e = (long) 40000; complex Cdiv(One, Two) complex One, Two; t complex RetV; double Den; Den = sqr(Two.Re) + sqr(Two.Im); RetV.Re = ((One.Re*Two.Re) + (One.Im*Two.Im))/Den; RetV.Im = ((Two.Re*One.Im) - (One.Re*Two.Im))/Den; return(RetV); > complex PsDlEx(Tc, Dele, A, P, Q) double Tc, Dele, A, P, Q; { complex rho, RetV, Num, Den; Num.Re = tan(A)*(tan(Q) + (Te*eos(Delc)*tan(P-Q))); Num.Im = tan(A)*(-Tc*sin(Dele)*tan(P-Q)); Den.Re = (Tc * eos(Delc) * tan(Q) * tan(P-Q)) - 1.0; Den.Im = -Tc * sin(Delc) * tan(Q) * tan(P-Q); rho = Cdiv(Num,Den); /* Psi */ RetV.Re = atan(sqrt(sqr(rho.Im) + sqr(rho.Re))); /* Delta */ RetV.Im = atan2(-rho.Im, rho.Re); return(RetV); > void SkiPA(n) int n; { int i , j ; char chr; i = n+1; printfC'Searehing for data set #%d\n",n); while ( i != n) i j = fscanf(fp,"%d",&i); i f (j!=1) {printfC'DS not found!\n"); exit(8);> i f ( i != n) C printfC'DS %d\t " , i ) ; do fseanf(fp,"%c",&chr); while (chr != ' ) ' ) ; » p r i n t f ( " \ n " ) ; > void SkipLnO fprintf("Skipping line\n"); while (gete(fp) != '\n');> main(argc,argv) int argc; char *argvC]; { double A l , SA1, PI, SP1, A3, SA3, P3, SP3, Angle, SF, Phi, Del, Tc, Dele, B, Q, SPhi, SDel, Slop, ResA; char fnamt30],FmtCd; int i , numpts, dsnum; complex rhol, rho2; printf("Front%d:\nThis version corrects for AI offset\n",Version); printf("Corrects for different RUDOLF parameters.\n"); i f (argc>2) strepy(fnam,argv[2]); else strcpy(fnam,"pafile"); printf("Now opening PA data f i l e '%s'\n",fnam); Q = -Pi/4.0; SF = Pi/180.0; i f ( ( f p = fopen(fnam,"r"))==NULL) <printf("PA FILE ErrorXn"); exit(99);> i f ((gp = fopen("PDFILE","w"))==NULL) tprintf("PDFILE Error\n"); exit(99);> i f ((hp = fopen("OUTFILE","w"))==NULL) tprintf("OUTFILE Error\n"); exit(99);> i f ( ( i p = fopen("PD.ser","w"))==NULL) {printf("PD.Scr Error\n"); exit(99);> i f ( a r g o l ) sscanf (argvll] ,"%d",&dsnum); else < printf("Enter data set number:"); scanf("%d",&dsnum);> SkiPA(dsnum); SkipLnO; SkipLnO; fscanf(fp,"%e",&FmtCd); SkipLnO; printf("Format Code i s %c.\n",FmtCd); fscanf(fp,"%d",finumpts); fprintf(gp,"%d\n",numpts); while ( ( f s c a n f ( f p , " % l f % l f % l f % l f % l f % l f % l f % l f %lf",&Angle, &A1,&SA1,&P1,&SP1,&A3,&SA3,&P3,&SP3) == 9)&&((numpts--)>0)) { switch (FmtCd) { /* correct for different Calib setups */ /* Note that RUDOLF adds i t s offset parameters to the outputted values */ ease 'B': PI += RudP - RudDefP; P3 += RudP - RudDefP; Al += RudA - RudDefA; A3 += RudA - RudDefA; break; case 'A': break; case 'C: break; default : p r i n t f ( " E r r o r - Unrecognised format code '%c'\007\n",FmtCd); > Al *= SF; A3 *= SF; PI *= SF; P3 *= SF; Tc = -tan(P1-Q)*tan(P3-Q); i f (Te < 0.0) CprintfC'Problem Te\007:\n Val % f PI %f P3 %f\n",(float)Tc, ( f l o a t ) P l , {float)P3); Te = -Te; > Te = 1.0 / sqrt(Tc); /* See P24 of NBS paper */ B = tan(A1)*((tan(P3 - Q)*tan(Q)) - (tan(P1-Q)/tan(Q))); B -= tan(A3)*((tan(P1 - Q)*tan(Q)) - (tan(P3-Q)/tan(Q))); B /= 2.0 * (tan(AI) - tan(A3)); Dele = (-sqr(B)) - (tan(P1-Q)*tan(P3-Q)); i f (Dele < 0.0) CprintfC'P rob lent Dele\007:\n Val %f P1 % f P3 % f \n",{f loat)Dele, ( f l o a t ) P l , (float)P3); Dele *= -1.0; > Dele = sqrt(Delc)/B; Dele = atan(Dele); i f (Dele<0.0) Dele += P i ; printfC'Te %7.3f DelC %7.3f ",Tc,Dele/SF); rhol = PsDlEx(Tc, Dele, A l , PI, Q); rho2 = PsDlEx(Tc, Dele, A3, P3, Q); Phi = 0.5 * (rhol.Re + rho2.Re); SPhi = 0.5 * sqrt(sqr(SA1)+sqr(SA3)); Del = 0.5 * (rhol.Im + rho2.Im); SDel = sqrt(sqr(SP1)+sqr(SP3)); i f (DeUO.O) Del += P i ; Slop = 2.0 * sin(2.0*Phi) * eos(Del); ResA = Al + A3; printfC'Phi %7.3f Del %7.3f Slop %7.5f ResA %7.5f\n", Phi/SF,Del/SF,Slop, ResA); fp r i n t f ( i p , " % 9 . 5 f %9.5f\n",Phi/SF,Del/SF); fprintf(hp,"%9.5f %9.5f\n",Slop,ResA); fpri n t f ( g p , " % f % f % f % f % f % f %f\n".Angle-AIOffset. Te,Dele,Phi/SF,SPhi,Del/SF,SDel); > f c l o s e ( f p ) ; felose(gp); felose(hp); f c l o s e ( i p ) ; /* ELMn : General Non-Li near Least Squares F i t */ /* Modified for use with Reflective Ellipsometry July 10/88 */ /* Refer to Azzam+Bashara p288 QC 443 A96 1977 */ #define Version 15 /* de - linted version 7, modified for EH386 */ /* V e r i f i e d against results from Atari and Sun, now appears portable */ long _ s t k s i z e = (long) 31000; extern unsigned _stklen = (long) 31000; #include <math.h> #include <stdio.h> #define sqr(x) ((x)*(x)) #define Pi 3.141592654 #define MaxC_D 10.0 #define npts_mx 10 #define npar_mx 5 «défine setpôint 0.00005 /*stop at delta*/ #define maxit 10 typedef double longmatrix[npar_mx][npts_mx]; typedef double matrix[npar_mx][npar_mx]; typedef double vectorCnpts_mx]; typedef double svec[npar_mx]; typedef struct cnode i double Re, Im; > complex; typedef struct { complex tbt[2]t2]; > compmat; typedef struct { complex N[5], cs[5]; int nlay, markCIS], Constraint [15] ; double d[5], lambda; > parvec; double MaxC, ydat[npts_mx], xdat[npts_mx], eydat[npts_mx], Angle[npts_mx]; parvec pars; FILE *fp, *fopen{); void PardisO C int i ; for (i=0;i<=pars.nlay;i++) printf("N%1d.Re %9.3f (%1d) N%1d.Im %9.3f (%1d) d%1d %9.3f (%1d)\n", i ,pars.N[i] .Re,pars.mark[i*2], i ,pars.N[i] .Im,pars.mark[(i*2)+1], i,pars.d[i] ,pars.mark[i+10] ); printfC'MaxC i s %6.3f\n",(float)MaxC); > void ParSeUnpar) int *npar; < int i , j ; *npar = 0; printf("\nDo you wish to change the parameters to vary? (0/1) " ) ; scanf("%d",&i); i f {i>0) € for (i=0; i<15; i++) pars.markli] = 0; for (i=1; i<=pars.nlay; i++) p r i n t f c m i d . R e (%2d) N%1d.Im (%2d) d%1d (%2d)\n",i,i*2,i,(i*2)+1,i,i+10); printf("Enter numbers of entries that are allowed to vary. (-1 to end)\n"); while (i>=0) {scanf("%d",&i); i f (i>0) <:(*npar)++; pars.mark[i]=1; » PardisO; > j=0; for (i=0; i<15; i++) { i f (pars.markCi] != 0) { pars.Constraint[j] = 0; /* imag components are negative */ i f ((i>=10)|!((i%2)==0)) pars.Constraint[j] = 1; /* distances, real components are positive */ j++; » *npar = j ; i f (j>1) MaxC = 0.1; > void ParSetO { int i , j ; printf("\nDo you wish to change the starting values? (0/1) " ) ; scanf("%d",Si); i f (i>0) { for (j=1; j<=pars.nlay; j++) { printf("N%1d.Re %9.3f N%1d.Im %9.3f d%1d %9.3f\n", j,pars.N[j].Re,j,pars.N[j] .lm,j,pars.d[j]); scanf ( " % l f % l f % l f ",Spars.N[j].Re,Spars.N [ j ] . Im,Spars.d[j] );> printf("Enter new MaxChange:"); scanf("%lf",SMaxC); > > double *Find(i) int i ; C double *Ret; int j,k,m; i++; j=k=0; while ((j<i)SS(k<15)) { i f (pars.mark[k]!=0) j++; k++; } k--; i f (k>14) {printf("range errors\n\007"); exit(99); > i f (k<10) C m = k/2; i f ((k % 2) == 0) Ret = &pars.N[tn] .Re; else Ret = Spars.NCm] .Im; > i f <(k>=10)&&(k<15)) Ret = (double *) &(pars.d[k-10] ); return(Ret); > complex CaddCOne, Two) complex One, Two; < complex RetV; RetV.Re = One.Re + Two.Re; RetV.Im = One.Im + Two.Im; return(RetV); > complex Csub(One, Two) complex One, Two; { complex RetV; RetV.Re = One.Re - Two.Re; RetV.Im = One.Im - Two.Im; return(RetV); > complex CmuUOne, Two) complex One, Two; i complex RetV; RetV.Re = (One.Re * Two.Re) - (One.Im * Two.Im); RetV.Im = (One.Re * Two.Im) + (Two.Re * One.Im); return(RetV); > complex Cdiv(One, Two) complex One, Two; { complex RetV; double Den; Den = sqr(Two.Re) + sqr(Two.Im); RetV.Re = ((One.Re*Two.Re) + (One.Im*Two.Im))/Den; RetV.Im = ((Two.Re*One.Im) - (One.Re*Two.Im))/Den; return(RetV); > compmat CMMUL (mb,mc) compmat mb, mc; { /* no transpose */ int rw, rc, c l ; complex scr; compmat ma; for (rw=0; rw<2; rw++) { for (ct=0;cl<2; cl++) { scr.Re = scr.Im = 0.0; for (rc=0;rc<2; rc ++) { scr = Cadd(scr,Cmul(mb.tbt[rw] [rc],mc.tbt[rc] [ c l ] ) ) ; > ma.tbtlrw] [cl] .Re = scr.Re; ma.tbt[rw] [cl].Im = scr.Im; > > return(ma); > complex Csqrt(X) complex X; { complex RetV; double theta, magn; magn = sqrt(sqrt(sqr(X.Re)+sqr(X.Im))); theta = 0.5 * atan2(X.Im, X.Re); RetV.Re = magn * cos(theta); RetV.Im = magn * sin(theta); return(RetV); > complex Cexp(X) complex X; { complex RetV; RetV.Re = exp(X.Re) * cos(X.Im); RetV.Im = exp(X.Re) * sin(X.Im); return(RetV); > complex Ref(lay,typ) int lay; char typ; { complex RetV, scrn, scrd, Na, Nb; i f (typ == 's') C Na = pars.N[lay-1]; Nb = pars.N[lay]; > else < Nb = pars.N[lay-1]; Na = pars.Nllay]; > scrn = Csub(Cmul(Na,pars.cs[lay-1]),Cmul(Nb,pars.cs[lay])); scrd = Cadd(Cmul(Na,pars.cs[lay-1]),Cmul(Nb,pars.csllay])); RetV = Cdiv(scrn,scrd); return(RetV); > complex CalcCos(N0, N1, cphia) complex NO, N1; double cphia; i complex cphib, f r a c i ; double frac2; f r a c i = Cdiv(N0,N1); f r a c i = CmuKf r a c i , f r a c i ); frac2 = sqr(cphia) - 1.0; fraci.Re = (fraci.Re * frac2) + 1.0; fracl.Im *= frac2; cphib = C s q r t ( f r a c i ) ; return(cphib); > compmat CalcA(lay,typ) int lay; char typ; C compmat Ret; double tmp; complex scrn, beta, exppbeta, expmbeta, rk; tmp = 2.0 * Pi * pars.dllay] / pars.lambda; scrn = CmuKpars.Nllay), pars.csllay] ); beta.Re = tmp * scrn.Re; beta.Im = tmp * scrn.Im; scrn.Re = 0.0; scrn.Im = 1.0; exppbeta = Cexp(Cmul(beta,scrn)); scrn.Re = 0.0; scrn.Im = -1.0; expmbeta = Cexp(Cmul(beta,scrn)); Ret.tbtlO] [0] = exppbeta; R e t . t b t l l ] [1] = expmbeta; rk = Ref(lay,typ); Ret.tbtCI] CO] = CmuKexppbeta.rk); Ret.tbtCO] CI] = CmuKexpmbeta.rkj.-returnCRet); > compmat CalcZ(typ) char typ; <: compmat Ret; Ret.tbtCO] CO] .Re = Ret.tbtCI] CI] .Re = 1.0; Ret.tbtCO] C0].lm = Ret.tbtCI] C1].Im = 0.0; Ret.tbtCI] CO] = Ret.tbtCO] CI] = Ref(pars.nlay,typ); return(Ret); > complex RhoC( rcphia ) double rcphia; { complex rho, Rp, Rs; compmat PiA, Z; int i ; pars.csCO] .Re = rcphia; pars.csCO] .Im = 0.0; for (i=1; i<=pars.nlay; i++) { pars.cs Ci] = CalcCos(pars.N[0], pars.N Ci], rcphia); > PiA = CalcA{1,'s'); Z = CalcZ('s'); for (i=2;i<pars.nlay; i++) PiA=CMMUL(PiA,CatcA(i,'s')); Z=CMMUL(PiA,Z); Rs = Cdiv(Z.tbtCI]CO],Z.tbtCO] CO] ); PiA = CalcAd.'p'); Z = CalcZ('p'); for (i=2;i<pars.nlay; i++) PiA=CMHUL(PiA,CalcA(i,'p')); Z=CMMUL(PiA,Z); Rp = CdivCZ.tbtCI]CO],Z.tbt[0] CO]); returnCrho = Cdiv(Rp,Rs));> complex PsiOeUrcphia) double rcphia; { complex rho,RetV; rho = RhoC(rcphia); /* printfC'PsiOel: % f %f\n",(float)rho.Re,(float)rho.Im); */ /* Psi */ RetV.Re = atan(sqrt(sqr(rho.Im) + sqr(rho.Re))); /* Delta */ RetV.Im = atan2(rho.Im, rho.Re); i f (RetV.Im < 0.0) RetV.Im += 2.0 * P i ; i f (RetV.Re < 0.0) RetV.Re += 2.0 * P i ; return(RetV); > void l E r O { pr i n t f ("Input Error\n"); ex i t ( 9 ) ; > Mpr(x,npar) matrix x; int npar; { int i , j ; for(i=0;i<npar;i++) <:for(j=0;j<npar;j++) pr i n t f ("%11.5f " , ( f loat)xCi] Cj] );printf ("\n");» MprL(x,npar,npts,title) longmatrix x; int npar, npts; char t i t l e C ] ; < int i , j ; p r i n t f ( " \ n % s \ n " , t i t l e ) ; for(i=0;i<npts;i++) {for(j=0;j<npar;j++) p r i n t f ("%9.4f " , ( f loat)xCj] Ci] );printf ("\n");» MMUL (rows,cols,ma,mb,mc) int rows,cols; matrix ma; longmatrix mb, mc; { int rw, rc, c l ; double scr; for (rw=0; rw<rows; rw++) { for (cl=0;cl<rows; cl++) < scr=0.0; for (rc=0;rc<cols; rc ++) < i f (scr>1E35) printf("\007warning on MMUL"); scr += mbCrw] Crc]*mcCcl] Crc] ; > maCrw] [cl]=scr; > > > MVEC (rows,cols,v1,mat,v2) int rows, cols; svec v1, v2; matrix mat; /* m u l t i p l i e s a matrix of rows X cols, by a vector of length cols producing a vector of length rows*/ { int rw,rc; double scr; for (rw=0; rw<rows; rw++) { scr=0; for (rc=0; rc<cols; rc ++) scr += v2Crc]*matCrw] Crc]; v1[rw]=scr; > > MINV (npar, ma, a) int npar; matrix ma, a; { matrix bb; int i , j , k , l , c l ; double bg,pv,tm,tt ; for (j=0; j<npar; j++) for (k=0; k<npar; k++) bbCj] Ck] = aCj]Ck]; /* set up an identity matrix */ for (i=0; i<npar; i++) for (j=0; j<npar; j++) i f (i==j) maCi] Cj]=1.0; else maCi] Cj]=Û.O; for (i=1; i< npar; i++) { bg=0; 1=0; for (k=i; k<=npar; k++) C tm=fabs(aCk-1] Ci-1] ); i f (tm>bg) { bg=tm; l=k; » i f (bg<=1.0e-9) printf("Poor matrix, pivot was % l f (small)\007\n",bg); i f ( i != I) < for (j=1; j<= npar; j++) i tt=maCi-1] [ j - 1 ] ; maCi-1] [j-1]=maCl-1] Cj-I]; maCl-1] Cj-1]=tt; tt=aCi-1] [ j - 1 ] ; aCi-1]Cj-1]=aCl-1]Cj-1]; aCl-1] Ci-1]=tt; } > pv=aCi-1] Ci-1]; for (j=i+1; j<=npar; j++) { tm=aCj-1] [i-1]/pv; for (k=i;k <= (2*npar); k++) C cl=k-npar; i f (k<=npar) a[j-1] [k-1]=a[j-1] [k-1]-(tm*a[i-1] [k-1] ); else ma[j-1] [cl-1]=malj-1] [cl-1]-(t[n*ma[i-1] [ c l - 1 ] ) ; > > > /*>of I loop */ for (i=npar-1; i>=1; i--) C for (l=1+i; l<=npar; 1++) { ttn=a[i-1] [l-1]/a[l-11 [1-1]; tt=a[i-1] [i-1] ; a[i-1] [i-1] = 1 ; a[i-1] [l-1]=0; for (k=l+1; k<=(2*npar); k++) { cl=k-npar; i f (k<=npar) a[i-1][k-1]=(a[i-1][k-1]-(tm*a[l-1] [k-1] ) ) / t t ; else iiia[i-1] [cl-1]=(nia[i-1] [cl-1]-(tm*ma[l-1] [ c t - 1 ] ) ) / t t ; > > > tm=a[npar-1] [npar-1]; for (i=1; i<= npar; i++) ma[npar-1] [i-1]=ma[npar-1] [i-1]/tm; for (j=0; j<npar; j++) for (k=0; k<npar; k++) a[j][k] = bbCj][k]; > double wtfun(i,npar) int i.npar; <; return(1.0/sqr(eydat[i])); > MAC(flags,npts,npar,ydat,Nfun,Yfun,Dys) int f l a g s l S ] , npts, npar, Nfun; double ydat[], (*Yfun)(), (*Dys[])(); { double conv, tm, wt, s, Eps, *ParPnt, scale; int i , j ; matrix d,dd; vector w,dy,y; svec unc,p,c; longmatrix a,b; conv = lO.OeZO; Eps = 0.01; scale = 1.0/32767.0; printf("ITERATIVE LOOP\n"); while (conv>setpoint) C wt = 0.0; for (i=0; i<npts; i++) wt += (wli] = wtfun(i,npar)); for (i=0; i<npts; i++) w[i] /= wt; s = 0.0; for (j=0;j<npar;j++) c[j] = 0.0; for (i=0;i<npts; i++) { /* calculate exact y */ y[ i ] = (*Yfun)(i, npar); /* calculated delta y */ dy[i] = y[i] - y d a t [ i ] ; /* calculate p a r t i a l s */ printf("point %d y: %7.3lf ydat: %7.3lf dy: %7 . 3 l f \ n " , i , y [ i ] , y d a t [ i ] ,dy[i] ); for (j=0; j<npar; j++) { i f (j<Nfun) a[j] [i]=(*Dys[j])(i); else { ParPnt = Find(j); *ParPnt += Eps; tm = (*Yfun)(i, npar); *ParPnt -= Eps; a[j][i]=(tm - y[i])/Eps; > b[j] [i]=a[j] [ i ] * w [ i ] ; > for (j=0; j<npar; j++) c[j] += a[j] [ i ] * d y [ i ] * w [ i ] ; /* calculate sum of squares */ s += w[i]*sqr(dyCi] ); > i f (npts>npar) s /= (npts-npar); else s = 0.0; MHUL (npar,npts,d,a,b); i f (flags[3]) C Hpr(d,npar); MprL(a,npar,npts,"Matrix a:\n");> MINV (npar,dd,d); MVEC (npar,npar,p,dd,c); printf("\ndeltas: " ) ; for (i=0;i<npar; i++) printf("%9.5f " , ( f l o a t ) p [ i ] ) ; p r i n t f ( " \ n o l d par:"); for (i=0;i<npar; i++) printf("%9.5f ", * ( F i n d ( i ) ) ) ; printf("\npars: " ) ; for (i=0;i<npar; i++) C ParPnt = Fi n d ( i ) ; tm = p[i] /* /flags[2] */; i f (tm< -MaxC) tm = -MaxC /*scale*rand()*/; i f (tm > MaxC) tm = MaxC /*scale*rand()*/; •ParPnt -= tm; i f ((pars.Constraint[i] == 0)&&(*ParPnt > 0.0)) *ParPnt = 0.0; i f ((pars.Constraint[i] == 1)&&(*ParPnt < 0.0)) *ParPnt = 0.0; printf("%9.5f " , ( f l o a t ) *ParPnt); > conv=0.0; p r i n t f ( " \ n e r r s : " ) ; for (i=0; i<npar; i++) C unc[i]=sqrt(fabs(s*dd[i] [ i ] ) ) ; printf("%9.5f ", (fl o a t ) unc[i]); c [ i ] = 0; i f (fabs(p[i])>conv) conv=fabs(p[i]); > printf("\nChi squared: %9le\n\n",wt*s); > > double yfun(i,npar) int i , npar; C complex Hold; double RetV; Hold = PsiDel(cos(Pi * Angleli] / 180.0)); i f ( ( i % 2) == 0) RetV = Hold.Re; else RetV = Hold.Im; return(RetV); > void Init2() { pars.N[0].Re = 1.0; pars.N[0].Im = 0.0; pars.N[1].Re = 1.9; pars.N[1].Im = 0.0; pars.N[2].Re = 3.82; pars.N[2].Im = -0.303; pars.dtO] = pars.d[2] = 0.0; pars.dtl] = 2.0; pars.mark[2] = 0; pars.mark[11] = 1; pars.nlay = 2; > void Init3() { pars.N[0].Re = 1.0; pars.N [0]. Im = 0.0; pars.N[1].Re = 1.9; pars.N[1].Im = 0.0; pars.N[2].Re = 2.14; pars.N[2].Im = 0.0; pars.N[3].Re = 3.53; pars.M[3].Im = -0.278; pars.dCO] = pars.d[3] = 0.0; pars.d[2] = 2.0; pars.dCI] = 26.0; pars.mark[12] = pars.markCll] = 1; pars.nlay = 3; > void Init4() { pars.N[0].Re = 1.0; pars.N[0].Im = 0.0; pars.NCn.Re = 1.9; pars.N[1].Im = 0.0; pars.N[2].Re = 1.5; pars.N[2].Im = 0.0; pars.N [3].Re = 2.14; pars.N [3]. Im = 0.0; pars.N[4].Re = 3.53; pars.N[4].Im = -0.278; pars.dCO] = pars.d[4] = 0.0; pars.dtl] = pars.d[2] = 1.0; pars.dC3] = 0.5; pars.mark[12] = pars.marktll] = 1; pars.nlay = 4; > void I n i t S O <: pars.N CO] .Re = 1.0; pars.N[0].Im = 0.0; pars.N[1].Re = 1.83; pars.N[1].Im = 0.0; pars.NC2].Re = 1.51; pars.N[2].Im = 0.0; pars.N[3].Re = 2.14; pars.N[3].Im = 0.0; pars.N[4].Re = 3.43; pars.N14].Im = -0.278; pars.dCO] = pars.dC4] = 0.0; pars.dCI] = pars.dC3] = 0.05; pars.d[2] = 3.0; pars.markC12] = pars.markCll] = pars.markC13] = 1; pars.nlay = 4; > main(argc,argv) int argc; char *argvC]; { int flagsCS], numit, i , i s c r , npar, npts, nskip; double SF,(*FarC2])(); printf("ELM Version %d\nHow many layers? (2, Substrate + Film) ", (int)Version); for (i=0; i<15; i++) pars.markCi] = 0; i f (argc > 1) i=2; else scanf("%d",&i); i f (i==2) I n i t 2 ( ) ; i f (i==3) I n i t 3 ( ) ; i f (i==4) I n i t 4 ( ) ; i f (i==5) I n i t S O ; MaxC = MaxC_D; numit=1; / * i n i t convergence f l a g * / SF = Pi / 180.0; i f ( ( f p = fopen("PDFILE","r")) == NULL) {printf("PDFILE Error\n"); exit(99); > fscanf(fp,"%d",&npts); npts *= 2; i f (npts>npts_mx) {printf("Arrays too small.\n"); e x i t ( 9 ) ; > printf("READING IN DATA\n"); pars.lambda = 632.8; /* i n i t i a l i s e flags */ flagsCO] = 10; /* maxit i s 10 */ flagsCI] = 0; /* converge fla g */ flagsC2] = 1; /* slowing factor */ flagsC3] = 0; /* verbose fla g */ flagsC4] = 0; /* iterations */ i f (argc >1) sscanf(argvCI],"%d",&nskip); else nskip = 0; printf("General system--\nSkipping i n i t i a l %d entries\n",nskip); printf("Slowing factor %d\n",flagsC2] ); while (nskip > 0) { fscanf(fp,"%*f % * f % * f % * f % * f % * f % * f " ) ; nskip--; > for (i=0; i<npts; i+=2) { is c r = f s c a n f ( f p , " % l f % * f % * f % l f % l f % l f % l f " , &AngleCi],&ydatCi],&eydatCi],&ydatCi+1],&eydatCi+1]); /* Evens are Psis,Odds are Deltas */ pr i n t f ( " ( % d ) Angle: %9.5f\nPsi: %9.5f +/- %9.5f\nDel: %9.5f +/- %9.5f\n", i s c r , AngleCi],ydat Ci],eydat Ci],ydat Ci+1],eydatCi+1] ); ydatCi] *= SF; ydatCi+1] *= SF; AngleCi+1] = AngleCi]; > Par d i s O ; ParSeK&npar); printf("Npar i s %d\n",npar); ParSetO; PardisO; i f (npar>npar_mx) {printf("Arrays too small.\n"); e x i t ( 9 ) ; > i f (npar > npts) { p r i n t f ( " I n s u f f i c i e n t data npar:%2d npts:%2d\n",npar,npts); exit(9);> MAC(flags, npts, npar, ydat, 0, yfun. Far); P a r d i s O ; > 

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-0065185/manifest

Comment

Related Items