Scilab Textbook Companion for
Solid State Electronic Devices
by B. G. Streetman And S. K. Banerjee1
Created by
Priyanka Jain
B.Tech + M.Tech Dual Degree
Electrical Engineering
IIT Bombay
College Teacher
Nil
Cross-Checked by
July 31, 2019
1 Funded by a grant from the National Mission on Education through ICT,
http://spoken-tutorial.org/NMEICT-Intro. This Textbook Companion and Scilab
codes written in it can be downloaded from the ”Textbook Companion Project”
section at the website http://scilab.in
Book Description
Title: Solid State Electronic Devices
Author: B. G. Streetman And S. K. Banerjee
Publisher: PHI Learning Pvt. Ltd., New Delhi
Edition: 6
Year: 2006
ISBN: 978-81-203-3020-7
1
Scilab numbering policy used in this document and the relation to the
above book.
Exa Example (Solved example)
Eqn Equation (Particular equation of the above book)
AP Appendix to Example(Scilab Code that is an Appednix to a particular
Example of the above book)
For example, Exa 3.51 means solved example 3.51 of this book. Sec 2.3 means
a scilab code whose theory is explained in Section 2.3 of the book.
2
Contents
List of Scilab Codes 4
1 Crystal Properties and Growth of Semiconductors 5
2 Atoms and Electrons 8
3 Energy Bands and Charge Carriers in Semiconductors 9
4 Excess Carriers in Semiconductors 15
5 Junctions 20
6 Field Effect Transistors 24
7 Bipolar Junction Transistor 27
8 Optoelectronic Devices 29
3
List of Scilab Codes
Exa 1.1 Maximum packing fraction . . . . . . . . . . 5
Exa 1.2 planes and directions . . . . . . . . . . . . . 5
Exa 1.3 Volume density of Silicon in lattice . . . . . 6
Exa 1.4 Czochralski method for Silicon crystal growth 6
Exa 2.1 expectation of momentum . . . . . . . . . . 8
Exa 3.1 free electron momentum . . . . . . . . . . . 9
Exa 3.2 E k Rleationship . . . . . . . . . . . . . . . 9
Exa 3.3 radius of electron orbit . . . . . . . . . . . . 11
Exa 3.4 density of states effective mass . . . . . . . . 11
Exa 3.5 equilibrium hole concentration . . . . . . . . 12
Exa 3.6 conductivity effective mass . . . . . . . . . . 12
Exa 3.7 current and resistance in a Si bar . . . . . . 13
Exa 3.8 concentration and mobility of majority carrier 13
Exa 4.1 Excitation and band to band recombination
leading to photoluminescence . . . . . . . . 15
Exa 4.2 decay of excess population for a carrier re-
combination . . . . . . . . . . . . . . . . . . 16
Exa 4.3 steady state carrier generation . . . . . . . . 17
Exa 4.4 electron quasi fermi level position and carrier
concentration . . . . . . . . . . . . . . . . . 17
Exa 4.5 diffusion length and hole current . . . . . . 18
Exa 4.6 Haynes Shockley experiment . . . . . . . . . 19
Exa 5.1 contact potential and fermi level position . . 20
Exa 5.2 electric field and charge density in junction . 20
Exa 5.4 Current in forward and reverse biased pn junc-
tion . . . . . . . . . . . . . . . . . . . . . . 21
Exa 5.6 depletion capacitance . . . . . . . . . . . . . 22
Exa 5.7 Heterojunctions . . . . . . . . . . . . . . . . 23
4
Exa 6.1 mos transistor . . . . . . . . . . . . . . . . . 24
Exa 6.2 drain current in mosfet . . . . . . . . . . . . 25
Exa 6.3 ion implantation . . . . . . . . . . . . . . . 26
Exa 7.1 steady state charge in transistor . . . . . . . 27
Exa 7.4 bjt saturation current . . . . . . . . . . . . 27
Exa 8.2 solar cells . . . . . . . . . . . . . . . . . . . 29
Exa 8.3 fibre optic communication . . . . . . . . . . 29
5
Chapter 1
Crystal Properties and Growth
of Semiconductors
Scilab code Exa 1.1 Maximum packing fraction
1 a = 5; // l a t t i c e c o n s t a n t
2 b = 0.5* sqrt ( a ^2 + a ^2 + a ^2) ; // s e p a r a t i o n b e t w e e n
n e a r e s t atoms
3 r = 0.5* b ; // r a d i u s o f e a c h atom
4 V = 4/3* %pi * r * r * r ; // Volume o f e a c h atom
5 n = 1+8*0.125; // number o f atoms p e r c u b e
6 pf = V * n /( a * a * a ) ; // p a c k i n g f r a c t i o n
7 disp ( ” 1 ) ” )
8 disp (a , ” l a t t i c e c o n s t a n t ( i n a r m s t r o n g )=” )
9 disp (r , ” r a d i u s o f atoms ( i n a r m s t r o n g ) =” )
10 disp ( pf , ”maximum p a c k i n g f r a c t i o n =” )
Scilab code Exa 1.2 planes and directions
1 disp ( ” The p l a n e i l l u s t r a t e d i n F i g . 1−5 h a s
i n t e r c e p t s a t 2 a , 4 b and l c a l o n g t h e t h r e e
6
c r y s t a l a x e s . Taking t h e r e c i p r o c a l s o f t h e s e
i n t e r c e p t s , we g e t 1 / 4 , 1 / 2 , and 1 . These t h r e e
f r a c t i o n s have t h e same r e l a t i o n s h i p t o e a c h
o t h e r a s t h e i n t e g e r s 2 , 1 , and 4 ( o b t a i n e d by
m u l t i p l y i n g e a c h f r a c t i o n by 4 ) . Thus t h e p l a n e
can be r e f e r r e d t o a s a ( 2 1 4 ) p l a n e . The o n l y
exception i s i f the i n t e r c e p t i s a f r a c t i o n of
t h e l a t t i c e c o n s t a n t a . I n t h a t c a s e , we do n o t
reduce i t to the lowest s e t of i n t e g e r s . ”)
2 x = 0:0.05:2;
3 y = 0:0.1:4;
4 a =2;
5 b =4;
6 c =1;
7 deff ( ’ [ z ]= f s ( x , y ) ’ , ’ z = ( 1 − ( 0 . 5 ∗ x ) − ( 0 . 2 5 ∗ y ) ) ’ ) ;
8 // z = ( 1 − ( 0 . 5 ∗ x ) − ( 0 . 2 5 ∗ y ) ) ;
9 fplot3d (x ,y , fs ) ;
Scilab code Exa 1.3 Volume density of Silicon in lattice
1 a = 5.43*10^ -8; // l a t t i c e c o n s t a n t
2 d = (1+4*0.25) /( a * a ) ; // a r e a l d e n s i t y on ( 1 0 0 ) p l a n e
3 n = 2*(6*0.5+8*0.125) ; // number o f atoms p e r c u b e
4 V = n /( a * a * a ) ; // volume d e n s i t y
5 disp ( ” 3 ) ” )
6 disp (a , ” l a t t i c e c o n s t a n t ( i n cm )=” )
7 disp (d , ” a r e a l d e n s i t y on ( 1 0 0 ) p l a n e ( i n p e r cm
s q u a r e ) =” )
8 disp (V , ” volume d e n s i t y ( i n p e r cm c u b e ) =” )
Scilab code Exa 1.4 Czochralski method for Silicon crystal growth
1 n = 10^16; // d e s i r e d d e n s i t y o f P atoms
7
2 k = 0.35;
3 l = 5000; // i n i t i a l l o a d o f S i i n grams
4 w =31; // a t o m i c w e i g h t o f P
5 d = 2.33; // d e n s i t y o f S i
6 i = n / k ; // i n i t i a l c o n c e n t r a t i o n o f P i n melt ,
a s s u m i n g C( S )=kC ( L )
7 V = l / d ; // volume o f S i
8 N = i * V ; // number o f P atoms
9 W = N * w /(6.02*10^23)
10 disp ( ” 4 . a ) ” )
11 disp (n , ” d e s i r e d d e n s i t y o f P atoms ( p e r c u b i c
c e n t i m e t e r )=” )
12 disp (i , ” i n i t i a l c o n c e n t r a t i o n o f P i n m e l t ( i n p e r
c u b i c cm )=” )
13 disp ( ” 4 . b ) ” )
14 disp (V , ” Volume o f S i ( i n c u b i c cm ) =” )
15 disp (N , ” number o f P atoms =” )
16 disp (W , ” w e i g h t o f p h o s p h o r u s t o be added ( i n grams ) =
”)
8
Chapter 2
Atoms and Electrons
Scilab code Exa 2.1 expectation of momentum
1 // j=c o m p l e x ( 0 , 1 ) ;
2 // p s i = A∗ exp ( j ∗ k ∗ x ) ;
3 disp ( ” px = h c r o s s ∗ k ( x ) ” ) ;
4 disp ( ” I f we t r y t o e v a l u a t e t h e s e i n t e g r a l s d i r e c t l y
, we run i n t o t h e p r o b l e m t h a t b o t h n u m e r a t o r and
d e n o m i n a t o r t e n d t o i n f i n i t y , b e c a u s e an i d e a l
p l a n e wave i s s t r i c t l y n o t a n o r m a l i z a b l e wave
f u n c t i o n . The t r i c k t o u s e i s t o c h o o s e t h e
l i m i t s o f i n t e g r a t i o n from , say , −L/2 t o +L/2 i n
a r e g i o n o f l e n g t h L . The f a c t o r L c a n c e l s o u t i n
t h e n u m e r a t o r and d e n o m i n a t o r . Then we can
c o n s i d e r L a p p r o a c h e s i n f i n i t y . For wave
f u n c t i o n s that are normalizable , such a
m a t h e m a t i c a l t r i c k d o e s n o t have t o be u s e d . ” )
9
Chapter 3
Energy Bands and Charge
Carriers in Semiconductors
Scilab code Exa 3.1 free electron momentum
1 // j=c o m p l e x ( 0 , 1 ) ;
2 // p s i = U∗ exp ( j ∗ k ∗ x ) ;
3 disp ( ” px = h c r o s s ∗ k ( x ) ” ) ;
4 disp ( ” With i n f i n i t e l i m i t s o f i n t e g r a t i o n , b o t h t h e
n u m e r a t o r and d e n o m i n a t o r a r e i n f i n i t e . For
p r o b l e m s o f t h i s type , one i n t e g r a t e s b e t w e e n t h e
f i n i t e l i m i t s −LI2 and +L/2 and , i n t h e f i n a l
r e s u l t , then assumes that L approaches i n f i n i t y .
T h i s r e s u l t i m p l i e s t h a t ( E , k ) d i a g r a m s can be
c o n s i d e r e d p l o t s o f e l e c t r o n e n e r g y v s . momentum ,
with a s c a l i n g f a c t o r h c r o s s . ”)
Scilab code Exa 3.2 E k Rleationship
10
Figure 3.1: E k Rleationship
11
1 // p= m∗ v
2 // p= h∗ k ; // e l e c t r o n momentum , where h i s c o n s t a n t
3 //E = 0 . 5 ∗ p∗p /m
4 //E = 0 . 5 ∗ h∗ k ∗ k /m; // e l e c t r o n e n e r g y
5 k = -10:0.01:10; // l i m i t s on wave v e c t o r k
6 E = k ^2; // E i s p r o p o r t i o n a l t o s q u a r e o f wave
vector
7 plot (k , E )
Scilab code Exa 3.3 radius of electron orbit
1 n = 1;
2 epsilonr = 11.8; // r e l a t i v e d i e l e c t r i c constant for
silicon
3 epsilon = 8.85*10^ -12; // d i e l e c t r i c c o n s t a n t
4 m = 9.11*10^ -31; // mass o f e l e c t r o n
5 mn = 0.26* m ; // f o r s i l i c o n
6 h = 6.63*10^ -34;
7 q = 1.6*10^ -19; // e l e c t r o n i c c h a r g e
8 r = 10^10*( epsilonr * epsilon * h * h ) /( mn * q * q * %pi ) ; //
ra di us in armstrong
9 disp (r , ” r a d i u s o f e l e c t r o n o r b i t a r o u n d d o n o r ( i n
a r m s t r o n g ) =” )
10 disp ( ” T h i s i s more t h a n 4 l a t t i c e s p a c i n g s a = 5 . 4 3
armstrong . ”)
Scilab code Exa 3.4 density of states effective mass
1 m = 9.11*10^ -31; // mass o f e l e c t r o n
2 ml = 0.98* m ;
3 ms = 0.19* m ;
4 mn = 6^(2/3) *( ml * ms * ms ) ^(1/3) ; // d e n s i t y o f s t a t e s
e f f e c t i v e mass c a l c u l a t i o n
12
5 mn0 = mn / m ;
6 disp ( mn , ” d e n s i t y o f s t a t e s e f f e c t i v e mass ( i n
k i l o g r a m )=” )
7 disp ( mn0 , ” d e n s i t y o f s t a t e s e f f e c t i v e mass i n
p r o p o r t i o n t o mass o f e l e c t r o n = ” )
Scilab code Exa 3.5 equilibrium hole concentration
1 n0 = 10^17; // c o n c e n t r a t i o n o f e l e c t r o n s
2 ni = 1.5*10^10; // i n t r i n s i c c o n c e n t r a t i o n
3 T = 300; // ( t e m p e r a t u r e i n K e l v i n )
4 p0 = ni * ni / n0 ; // c o n c e n t r a t i o n o f h o l e s
5 k = 0.0259; // Boltzmann ’ s c o n s t a n t m u l t i p l i e d w i t h T
= 300
6 E = k * log ( n0 / ni ) ;
7 disp ( p0 , ” c o n c e n t r a t i o n o f h o l e s ( i n p e r c u b i c
c e n t i m e t e r )=” )
8 disp (E , ” Fermi l e v e l e n e r g y w i t h r e s p e c t t o i n t r i n s i c
l e v e l e n e r g y ( i n e l e c t r o n v o l t )=” )
Scilab code Exa 3.6 conductivity effective mass
1 m = 9.11*10^ -31; // mass o f e l e c t r o n
2 ml = 0.98* m ;
3 mt = 0.19* m ;
4 mninverse = (1/3) * ((1/ ml ) +(2/ mt ) ) ;
5 mn = 1/ mninverse ;
6 mn0 = mn / m ;
7 disp ( mn0 , ” C o n d u c t i v i t y e f f e c t i v e mass i n p r o p o r t i o n
t o mass o f an e l e c t r o n =” )
13
Scilab code Exa 3.7 current and resistance in a Si bar
1 un = 700;
2 q = 1.6*10^ -19;
3 n0 = 10^17;
4 L = 0.1;
5 A = 10^ -6;
6 V = 10;
7 sigma = q * un * n0 ;
8 rho = 1/ sigma ;
9 R = rho * L / A ;
10 I = V/R;
11 disp ( sigma , ” C o n d u c t i v i t y ( i n p e r ohm−cm )=” )
12 disp ( rho , ” r e s i s t i v i t y ( i n ohm−cm )=” )
13 disp (R , ” r e s i s t a n c e ( i n ohm )=” )
14 disp (I , ” c u r r e n t ( i n ampere )=” )
Scilab code Exa 3.8 concentration and mobility of majority carrier
1 w = 0.01;
2 w1 = w *10^ -3
3 t = 10^ -3;
4 L = 0.5;
5 B = 10*10^ -5;
6 I = 10^ -3;
7 Vab = -2 *10^ -3;
8 Vcd = 0.1;
9 q = 1.6*10^ -19;
10 q1 = q *10^ -3
11 n0 = I * B /( q1 * - Vab ) ;
12 rho = ( Vcd / I ) /( L / w1 ) ;
13 u = 1/( rho * q * n0 ) ;
14 disp ( n0 , ” e l e c t r o n c o n c e n t r a t i o n ( i n p e r c u b i c
c e n t i m e t e r )=” )
15 disp ( rho , ” r e s i s i t i v i t y ( i n ohm−cm )=” )
14
16 disp (u , ” m o b i l i t y ( i n s q u a r e cm p e r v o l t −s e c )=” )
15
Chapter 4
Excess Carriers in
Semiconductors
Scilab code Exa 4.1 Excitation and band to band recombination leading to photolumi
1 t = 0.46 *10^ -4;
2 hv = 2;
3 alpha = 5*10^4;
4 I0 = 10^ -2;
5 It = I0 * exp ( - alpha * t ) ;
6 Pabs = I0 - It ;
7 f = (2 -1.43) /2;
8 P = f * Pabs ;
9 n = Pabs /(1.6*10^ -19* hv ) ;
10 disp ( Pabs , ” t o t a l e n e r g y a b s o r b e d p e r s e c o n d ( i n w a t t
)=” )
11 disp (P , ” amount o f e n e r g y c o n v e r t e d t o h e a t p e r
s e c o n d ( i n w a t t )=” )
12 disp (n , ” number o f p h o t o n s p e r s e c o n d g i v e n o f f form
r e c o m b i n a t i o n e v e n t s =” )
16
Figure 4.1: decay of excess population for a carrier recombination
Scilab code Exa 4.2 decay of excess population for a carrier recombination
1 p0 = 10^15;
2 ni = 10^6;
3 n0 = ni ^2/ p0 ;
4 disp ( n0 , ” M i n o r i t y e l e c t r o n concentration ( in per
c u b i c c e n t i m e t e r )=” )
5 dn = 10^14;
6 dp = 10^14;
7 tn = 10; // i n n a n o s e c o n d s
8 tp = tn ;
9 t = 0:10:50;
10 del_n = dn * exp ( - t / tn ) ;
11 del_p = dp * exp ( - t / tp ) ;
12 p = p0 + del_p ;
13 n = del_n ; // s i n c e n0 i s n e g l i g i b l e
14 subplot (121) ;
15 plot (t , log ( p ) ) ;
16 plot (t , log ( n ) ) ;
17 subplot (122) ;
17
Figure 4.2: decay of excess population for a carrier recombination
18 plot (t , p ) ;
19 plot (t , n ) ;
Scilab code Exa 4.3 steady state carrier generation
1 n0 = 10^14;
2 ni = 1.5*10^10;
3 Tn = 2 *10^ -6;
4 Tp = 2 *10^ -6;
5 p = 2*10^13;
6 p0 = ni ^2/ n0 ;
7 disp ( p0 , ” h o l e c o n c e n t r a t i o n ( p e r c u b i c c e n t i m e t e r )=”
)
Scilab code Exa 4.4 electron quasi fermi level position and carrier concentration
18
1 n0 = 10^14;
2 dn = 2*10^13;
3 n = n0 + dn ;
4 kT = 0.0259;
5 ni = 1.5*10^10;
6 Ei = kT * log ( n0 / ni ) ;
7 Fn = Ei + kT * log ( n / ni ) ;
8 E = Fn - Ei ;
9 disp (n , ” s t e a d y s t a t e e l e c t r o n c o n c e n t r a t i o n=” )
10 disp ( Ei , ” e q u i l i b r i u m Fermi l e v e l ( i n eV )=” )
11 disp (E , ” e l e c t r o n q u a s i Fermi l e v e l p o s i t i o n ( i n eV )=”
)
Scilab code Exa 4.5 diffusion length and hole current
1 A = 0.5;
2 Na = 10^17;
3 p0 = Na ;
4 ni = 1.5*10^10;
5 dp = 5*10^16;
6 x = 10^ -5;
7 up = 500;
8 Tp = 10^ -10;
9 kT = 0.0259;
10 q0 = 1;
11 q = 1.6*10^ -19;
12 Dp = kT * up / q0 ;
13 Lp = sqrt ( Dp * Tp ) ;
14 p = p0 + dp * exp ( - x / Lp ) ;
15 E = kT * log ( p / ni ) ;
16 E0 = 1.1/2 + E ;
17 Ip = q * A * Dp * dp * exp ( - x / Lp ) / Lp ;
18 Qp = q * A * dp * Lp ;
19 Qp0 = Qp *10^6;
20 disp ( E0 , ” s t e a d y s t a t e s e p a r a t i o n b e t w e e n Fp and Ec (
19
i n eV )=” )
21 disp ( Ip , ” h o l e c u r r e n t ( i n ampere )=” )
22 disp ( Qp , ” e x c e s s s t o r e d h o l e c h a r g e ( i n coulomb )=” )
23 disp ( Qp0 , ” e x c e s s s t o r e d h o l e c h a r g e ( i n micro −
coulomb )=” )
Scilab code Exa 4.6 Haynes Shockley experiment
1 l = 1;
2 d = 0.95;
3 E0 = 2;
4 t = 0.25*10^ -3;
5 dt = 117*10^ -6;
6 up = ( d / t ) /( E0 / l ) ;
7 Dp = dt ^2* d ^2/(16* t ^3) ;
8 C = Dp / up ;
9 kT = 0.0259;
10 disp ( up , ” h o l e m o b i l i t y ( i n s q u a r e cm p e r Volt −s e c o n d
)=” )
11 disp ( Dp , ” d i f f u s i o n c o e f f i c i e n t ( i n s q u a r e cm p e r
s e c o n d )=” )
12 disp (C , ” D i f f i s u i o n c o e f f i c i e n t / H o l e m o b i l i t y ( i n
v o l t s ) = ”)
13 disp ( ” V e r i f i e d a c c o r d i n g t o E i n s t e i n R e l a t i o n ” )
20
Chapter 5
Junctions
Scilab code Exa 5.1 contact potential and fermi level position
1 Na = 10^18;
2 Nd = 5*10^15;
3 ni = 1.5*10^10;
4 kT = 0.0259;
5 E1 = kT * log ( Na / ni ) ;
6 E2 = kT * log ( Nd / ni ) ;
7 qV1 = E1 + E2 ;
8 qV2 = kT * log ( Na * Nd / ni ^2) ;
9 disp ( E1 , ” Fermi l e v e l p o s i t i o n i n p r e g i o n ( i n eV )=” )
10 disp ( E2 , ” Fermi l e v e l p o s i t i o n i n n r e g i o n ( i n eV )=” )
11 disp ( qV1 , ” C o n t a c t p o t e n t i a l ( i n eV )=” )
12 disp ( qV2 , ” C o n t a c t p o t e n t i a l ( i n eV )=” )
13 disp ( ” C o n t a c t p o t e n t i a l v a l u e v e r i f i e d ” )
Scilab code Exa 5.2 electric field and charge density in junction
1 Na = 10^18;
2 Nd = 5*10^15;
21
3 ni = 1.5*10^10;
4 kT = 0.0259;
5 epsilon0 = 8.85*10^ -14;
6 epsilon = 11.8;
7 q = 1.6*10^ -19;
8 E1 = kT * log ( Na / ni ) ;
9 E2 = kT * log ( Nd / ni ) ;
10 qV1 = E1 + E2 ;
11 qV2 = kT * log ( Na * Nd / ni ^2) ;
12 d = 10*10^ -4; // i n c e n t i m e t r e
13 A = %pi * d ^2/4;
14 W = sqrt (2* epsilon * epsilon0 * qV1 / q *( Na ^ -1 + Nd ^ -1) ) ;
15 xn0 = W /(1+( Nd / Na ) ) ;
16 xp0 = W /(1+( Na / Nd ) ) ;
17 Q = q * A * xn0 * Nd ;
18 E0 = -q * xn0 * Nd /( epsilon * epsilon0 ) ;
19 disp ( W *10^4 , ” w i d t h o f t h e t r a n s i t i o n r e g i o n ( i n
m i c r o n )=” )
20 disp ( xn0 *10^4 , ” p e n e t r a t i o n o f t h e s p a c e c h a r g e
r e g i o n i n t o t h e n m a t e r i a l ( i n m i c r o n )=” )
21 disp ( xp0 *10^4 , ” p e n e t r a t i o n o f t h e s p a c e c h a r g e
r e g i o n i n t o t h e p m a t e r i a l ( i n m i c r o n )=” )
22 disp (Q , ” t o t a l u n c o m p e n s a t e d c h a r g e ( i n coulomb )=” )
23 disp ( E0 , ”maximum e l e c t r i c f i e l d ( i n V p e r cm )=” )
Scilab code Exa 5.4 Current in forward and reverse biased pn junction
1 A = 10^ -4;
2 kT = 0.0259;
3 ni = 1.5*10^10;
4 q = 1.6*10^ -19;
5 q0 = 1;
6 Na = 10^17;
7 Nd = 10^15;
8 Tn = 10^ -7;
22
9 Tp = 10^ -5;
10 upp = 200;
11 unn = 1300;
12 unp = 700;
13 upn = 450;
14 V1 = 0.5;
15 V2 = -0.5;
16 pn = ni ^2/ Nd ;
17 np = ni ^2/ Na ;
18 Dp = kT * upn / q0 ;
19 Dn = kT * unp / q0 ;
20 Lp = sqrt ( Dp * Tp ) ;
21 Ln = sqrt ( Dn * Tn ) ;
22 I1 = q * A *(( Dp * pn / Lp ) +( Dn * np / Ln ) ) *( exp ( q0 * V1 / kT ) -1) ;
23 I2 = -q * A *(( Dp * pn / Lp ) +( Dn * np / Ln ) ) ;
24 disp ( pn , ” h o l e c o n c e n t r a t i o n ( p e r c u b i c c e n t m e t e r )=” )
25 disp ( np , ” e l e c t r o n c o n c e n t r a t i o n ( p e r c u b i c c e n t m e t e r
)=” )
26 disp ( Dp , ” d i f f u s i o n c o e f f i c i e n t on n s i d e ( i n s q u a r e
c e n t i m t e r p e r s e c o n d )=” )
27 disp ( Dn , ” d i f f u s i o n c o e f f i c i e n t on p s i d e ( i n s q u a r e
c e n t i m t e r p e r s e c o n d )=” )
28 disp ( I1 *10^6 , ” c u r r e n t a t f o r w a r d b i a s ( i n
m i c r o a m p e r e )=” )
29 disp ( I2 *10^6 , ” c u r r e n t a t r e v e r s e b i a s ( i n
m i c r o a m p e r e )=” )
Scilab code Exa 5.6 depletion capacitance
1 A = 10^ -4;
2 kT = 0.0259;
3 ni = 1.5*10^10;
4 q = 1.6*10^ -19;
5 Na = 10^17;
6 Nd = 10^15;
23
7 epsilon0 = 8.85*10^ -14;
8 epsilon = 11.8;
9 E1 = kT * log ( Na / ni ) ;
10 E2 = kT * log ( Nd / ni ) ;
11 V0 = E1 + E2 ;
12 V = -4;
13 Cj = sqrt ( epsilon * epsilon0 ) * A * sqrt ( q * Nd * Na /(2*( V0 - V )
*( Na + Nd ) ) ) ;
14 disp ( V0 , ”V0 ( i n v o l t )=” )
15 disp ( Cj , ” t o t a l d e p l e t i o n c o n s t a n t ( i n f a r a d )=” )
Scilab code Exa 5.7 Heterojunctions
1 dEtg = 1.85;
2 band_gap = 1.43; // f o r GaAs−AlGaAs s y s t e m
3 dEg = dEtg - band_gap ;
4 dEc = dEg *2/3;
5 dEv = dEg /3;
6 disp ( dEc , ” C o n d u c t i o n band o f f s e t ( i n eV ) =” )
7 disp ( dEv , ” V a l e n c e band o f f s e t ( i n eV ) =” )
24
Chapter 6
Field Effect Transistors
Scilab code Exa 6.1 mos transistor
1 kT = 0.0259;
2 ni = 1.5*10^10;
3 q = 1.6*10^ -19;
4 q0 = 1;
5 epsilon0 = 8.85*10^ -14;
6 epsilon = 11.8;
7 epsiloni = 3.9;
8 Na = 5*10^15;
9 d = 10^ -6;
10 Qi = 4*10^10* q ;
11 Vf = kT * log ( Na / ni ) / q0 ;
12 Wm = 2* sqrt ( epsilon * epsilon0 * Vf /( q * Na ) ) ;
13 Vms = -0.95;
14 Ci = epsiloni * epsilon0 / d ;
15 Vfb = Vms -( Qi / Ci ) ;
16 Qd = -q * Na * Wm ;
17 Vt = Vfb - Qd / Ci +2* Vf ;
18 Cd = epsilon * epsilon0 / Wm ;
19 Cmin = Ci * Cd /( Ci + Cd ) ;
20 disp ( Vf , ” Phi ( F ) ( i n eV )=” )
21 disp ( Wm *10^4 , ”W(m) ( i n m i c r o n )=” )
25
22 disp ( Qi , ” e f f e c t i v e i n t e r f a c e c h a r g e ( i n coulomb p e r
s q u a r e cm )=” )
23 disp ( Ci *10^6 , ”C( i ) ( i n m i c r o f a r a d p e r s q u a r e cm )=” )
24 disp ( Vfb , ”V( f b ) ( i n V)=” )
25 disp ( Qd , ”Q( d ) ( i n coulomb p e r s q u a r e cm )=” )
26 disp ( Vt , ”V(T) ( i n V)=” )
27 disp ( Cd *10^6 , ”C( d ) ( i n m i c r o f a r a d p e r s q u a r e cm )=” )
28 disp ( Cmin , ”C( min ) ( i n f a r a d p e r s q u a r e cm )=” )
Scilab code Exa 6.2 drain current in mosfet
1 kT = 0.0259;
2 ni = 1.5*10^10;
3 q = 1.6*10^ -19;
4 q0 = 1;
5 epsilon0 = 8.85*10^ -14;
6 epsilon = 11.8;
7 epsiloni = 3.9;
8 Na = 5*10^15;
9 d = 10^ -6;
10 Vt = 0.6;
11 Z = 25*10^ -4;
12 L = 10^ -4;
13 Vg1 = 5;
14 Vd1 = 0.1;
15 Vg2 =3;
16 Vd2 =5;
17 Vdsat = Vg2 - Vt ;
18 Vd3 =7;
19 un = 200;
20 Ci = epsiloni * epsilon0 / d ;
21 Id1 = ( Z * un * Ci / L ) *(( Vg1 - Vt ) * Vd1 -0.5* Vd1 ^2) ; // l i n e a r
region
22 Id2 = ( Z * un * Ci / L ) *(( Vg2 - Vt ) * Vdsat -0.5* Vdsat ^2) ; //
saturation region
26
23 disp ( Ci *10^6 , ”C( i ) ( i n m i c r o f a r a d p e r s q u a r e cm )=” )
24 disp ( Id1 *10^3 , ” For V(G) =5V and V(D) =0.1V, we a r e i n
t h e l i n e a r r e g i o n and d r a i n c u r r e n t ( i n
m i l i a m p e r e )=” )
25 disp ( Id2 *10^3 , ” For V(G) =3V and V(D) =5V, we a r e i n
t h e s a t u r a t i o n r e g i o n and d r a i n c u r r e n t ( i n
m i l i a m p e r e )=” )
26 disp ( ” For VD = 7 V, ID w i l l n o t i n c r e a s e , b e c a u s e we
are in the s a t u r a t i o n r e g i o n . ”)
Scilab code Exa 6.3 ion implantation
1 q = 1.6*10^ -19;
2 q0 = 1;
3 epsilon0 = 8.85*10^ -14;
4 epsilon = 11.8;
5 epsiloni = 3.9;
6 d = 10^ -6;
7 Vt1 = -1.1;
8 Vt2 = -0.5;
9 I = 10^ -5;
10 A = 650;
11 Ci = epsiloni * epsilon0 / d ;
12 Fb = ( Vt2 - Vt1 ) * Ci / q ;
13 t = Fb * q * A / I ;
14 disp ( Ci *10^6 , ”C( i ) ( i n m i c r o f a r a d p e r s q u a r e cm )=” )
15 disp ( Fb , ” b o r o n i o n d o s e r e q u i r e d ( i n p e r s q u a r e cm )=
”)
16 disp (t , ” i m p l a n t t i m e ( i n s e c o n d )=” )
27
Chapter 7
Bipolar Junction Transistor
Scilab code Exa 7.1 steady state charge in transistor
1 tp = 10^ -5;
2 ts = 10^ -7;
3 ib = 10^ -4;
4 ic = 10^ -2;
5 Qn = ic * ts ;
6 Qp = ib * tp ;
7 disp ( Qp , ” s t e a d y s t a t e c h a r g e due t o e x c e s s h o l e s ( i n
coulomb )=” )
8 disp ( Qn , ” s t e a d y s t a t e c h a r g e due t o e x c e s s e l e c t r o n s
( i n coulomb )=” )
Scilab code Exa 7.4 bjt saturation current
1 A =10^ -4;
2 q = 1.6*10^ -19;
3 kT = 0.0259;
4 Wb = 10^ -4;
5 ni = 1.5*10^10;
28
6 Na = 10^17;
7 Tn = 10^ -7;
8 upe =200;
9 une =700;
10 Nd = 10^15;
11 Tp =10^ -5;
12 unb =1300;
13 upb =450;
14 Veb = 0.3;
15 Vcb = -40;
16 pn = ni ^2/ Nd ;
17 Dp = upb * kT ;
18 Lp = sqrt ( Dp * Tp ) ;
19 Ies = q * A * Dp * pn / Lp *( csch ( Wb / Lp ) + tanh ( Wb / Lp ) ) ;
20 dpe = pn * exp ( Veb / kT ) ;
21 Ib = q * A * Dp * dpe / Lp * tanh ( Wb /2* Lp ) ;
22 Ib1 = q * A * Wb * dpe /(2* Tp ) ;
23 Dn = kT * une ;
24 Ln = sqrt ( Dn * Tn ) ;
25 gamma1 = (1+(( Dn * Lp * Nd ) /( Dp * Ln * Na ) ) * tanh ( Wb / Lp ) ) ^ -1;
26 B = sech ( Wb / Lp ) ;
27 alpha = B * gamma1 ;
28 beta1 = alpha /(1 - alpha ) ;
29 disp ( pn , ” h o l e c o n c e n t r a t i o n ( i n p e r c u b i c c e n t i m e t e r
)=” )
30 disp ( Dp , ”Dp ( i n s q a u r e c e n t i m e t e r p e r s e c o n d )=” )
31 disp ( Lp *10 , ”Lp ( i n m i c r o m e t e r ) =” )
32 disp ( dpe , ” dp (E) ( i n p e r c u b i c c e n t i m e t e r ) =” )
33 disp ( Ies , ” I ( ES ) ( i n ampere )=” )
34 disp ( Ib1 , ” I (B) ( i n ampere )=” )
35 disp ( Dn , ”Dn ( i n s q a u r e c e n t i m e t e r p e r s e c o n d )=” )
36 disp ( Ln *10 , ”Ln ( i n m i c r o m e t e r )=” )
37 disp ( gamma1 , ”gamma =” )
38 disp (B , ”B =” )
39 disp ( alpha , ” a l p h a =” )
40 disp ( beta1 , ” b e t a =” )
29
Chapter 8
Optoelectronic Devices
Scilab code Exa 8.2 solar cells
1 Isc =100;
2 Voc =0.8;
3 ff = 0.7;
4 Pmax = ff * Isc * Voc ;
5 disp ( Pmax , ”maximum power d e l i v e r e d ( i n m i l i w a t t )=” )
Scilab code Exa 8.3 fibre optic communication
1 wavelength = 0.68;
2 Eg = 1.24/ wavelength ;
3 disp ( Eg , ” band gap ( i n eV )=” )
4 disp ( ”From Fig , 3 −6 , we g e t Al ( 0 . 3 2 ) Ga ( 0 . 6 8 ) As . From
F i g . 8 −11 , we g e t GaAs ( 0 . 6 8 ) P ( 0 . 3 2 ) ” )
30