Professional Documents
Culture Documents
1 Funded
Book Description
Title: A Textbook Of Electronic Devices And Circuits
Author: S. Prakash And S. Rawat
Publisher: Anand Publications, New Delhi
Edition: 3
Year: 2012
ISBN: 978-93-80225-48-7
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.
Contents
List of Scilab Codes
1 Special Diodes
18
3 Transistor Amplifiers
30
4 Frequency Response
40
5 Feed Back
42
52
7 Magnetic Materials
58
8 Oscillators
62
9 Unijunction Transistor
71
11 Multivibrators
73
1.1
1.2
1.3
1.4
1.5
1.6
1.7
1.8
1.9
1.10
1.11
1.12
1.13
1.14
1.15
2.1
2.2
2.3
2.4
2.5
2.6
2.7
2.9
2.10
2.11
2.12
2.13
2.14
7
8
8
9
10
10
11
12
12
13
14
15
15
16
16
18
18
19
19
20
20
21
21
22
23
23
24
25
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
2.15
2.16
2.17
2.18
2.19
3.1
3.2
3.3
3.4
3.5
3.6
3.7
3.8
3.9
3.10
3.11
3.12
3.13
3.14
4.1
4.2
5.1
5.2
5.3
5.4
5.5
5.6
5.7
5.8
5.9
5.10
5.11
5.12
5.13
6.1
6.2
Exa 6.5
Value of IC . . . . . . . . . . . . . . . . . . . . . . . .
Operating point and stability factor . . . . . . . . . .
IC and VCE . . . . . . . . . . . . . . . . . . . . . . .
Region of Q point . . . . . . . . . . . . . . . . . . . .
Voltage across RE . . . . . . . . . . . . . . . . . . . .
Gain Impedence and ac load . . . . . . . . . . . . . .
Gain input and output impedence . . . . . . . . . . .
Input Output impedence and output voltage . . . . .
Net voltage gain in dB . . . . . . . . . . . . . . . . . .
Bandwidth and cut off frequencies . . . . . . . . . . .
Overall voltage gain . . . . . . . . . . . . . . . . . . .
Couopling capacitor . . . . . . . . . . . . . . . . . . .
Voltage gain . . . . . . . . . . . . . . . . . . . . . . .
Inductance of primary and secondary . . . . . . . . . .
Turn ratio of transformer . . . . . . . . . . . . . . . .
Collector efficieny and power rating . . . . . . . . . .
Power and effiiency . . . . . . . . . . . . . . . . . . . .
Maximum ac power output . . . . . . . . . . . . . . .
Maximum permissible power dissipation . . . . . . . .
3dB Frequeny . . . . . . . . . . . . . . . . . . . . . . .
Upper 3dB Frequency . . . . . . . . . . . . . . . . . .
Percentage of output which is fed back . . . . . . . . .
Voltage gain and reduction in voltage . . . . . . . . .
Gain with feedback factor and feedback voltage . . . .
Bandwidth with negative feedback . . . . . . . . . . .
Fraction of output fed back . . . . . . . . . . . . . . .
Small Change in gain . . . . . . . . . . . . . . . . . .
New gain distortion and input voltage . . . . . . . . .
Feedback rction voltage and impedence . . . . . . . .
Voltage gain input and output resistance . . . . . . . .
Gain wih feedbck in dB . . . . . . . . . . . . . . . . .
Bandwidth after feedback . . . . . . . . . . . . . . . .
Gain and new bandwidth . . . . . . . . . . . . . . . .
Input resistance and voltage gain . . . . . . . . . . . .
Value of Transconductance . . . . . . . . . . . . . . .
AC drain resistance transconductance and amplification
factor . . . . . . . . . . . . . . . . . . . . . . . . . . .
Voltage Amplification . . . . . . . . . . . . . . . . . .
5
26
26
27
28
29
30
31
32
33
33
34
34
35
35
36
36
37
38
38
40
40
42
42
43
44
45
45
46
47
48
48
49
49
50
52
52
53
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
6.6
6.7
6.8
6.10
6.11
7.1
7.2
7.3
7.4
7.5
7.6
8.m.1
8.m.2
8.m.3
8.m.4
8.m.5
8.1
8.2
8.3
8.4
8.5
8.6
8.7
8.8
8.9
8.10
9.1
9.2
9.3
11.1
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
54
54
56
56
57
58
58
59
59
60
61
62
62
63
63
64
65
65
66
66
67
67
68
69
69
70
71
71
72
73
Chapter 1
Special Diodes
// Exa 1 . 1
clc ;
clear ;
close ;
// Given d a t a
I =40; // i n mA
V =0.25; // i n V o l t
T =20; // i n d e g r e e C
T = T +273; // i n K e l v i n
ETA =1; // For Ge
e =1.6*10^ -19; // i n Coulamb ( e l e c t r o n i c c h a r g e )
k =1.38*10^ -23; // i n J /K( Boltzman C o n s t a n t )
// Formula : I=I o ( exp ( %eV/ (ETA k T) ) 1)
y =( e * V /( ETA * k * T ) ) ; // Assumed
y = round ( y ) ;
Io = I *10^ -3/( exp ( y ) -1) ; // i n mA
disp ( Io *10^6 , R e v e r s e s a t u r a t i o n c u r r e n t i n m i c r o
Ampere : ) ;
// Exa 1 . 2
clc ;
clear ;
close ;
// Given d a t a
Io =10; // i n uA
I =1; // i n Ampere
ETA =2; // For S i
T =27; // i n d e g r e e C
T = T +273; // i n K e l v i n
e =1.6*10^ -19; // i n Coulamb ( e l e c t r o n i c c h a r g e )
k =1.38*10^ -23; // i n J /K( Boltzman C o n s t a n t )
// Formula : I=I o ( exp ( %eV/ (ETA k T) ) 1)
V =( ETA * k * T / e ) * log ( I /( Io *10^ -6) +1) ; // i n V o l t
disp (V , Forward V o l t a g e a c r o s s t h e d i o d e i n V o l t : )
;
// Exa 1 . 3
clc ;
clear ;
close ;
// Given d a t a
RL =1; // i n kOhm
// r f <<RL
Vrms =200; // i n V o l t
// P a r t ( i )
Vo = Vrms * sqrt (2) ; // i n V o l t
Idc = Vo /( RL *10^3* %pi ) ; // i n Ampere
disp ( round ( Idc *10^3) ,DC c u r r e n t i n l o a d i n mA : ) ;
// P a r t ( i i )
Vdc = RL *10^3* Idc ; // i n V o l t
8
15
16
17
18
19
20
21
22
Scilab code Exa 1.4 Average dc current rms current rectification efficieny
PIV
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// Exa 1 . 4
clc ;
clear ;
close ;
// Given d a t a
rf =20; // i n ohm
RL =980; // i n Ohm
Vrms =50; // i n V o l t
Vo = Vrms * sqrt (2) ; // i n V o l t
Io = Vo /( RL + rf ) ; // i n Ampere
// P a r t ( i )
Idc =2* Io / %pi ; // i n Ampere
disp ( round ( Idc *10^3) , A v e r a g e DC c u r r e n t i n mA : ) ;
// P a r t ( i i )
Irms = Io / sqrt (2) ; // i n Ampere
disp ( Irms *1000 , rms v a l u e o f l o a d c u r r e n t i n mA : )
// P a r t ( i i i )
Vdc = RL * Idc ; // i n V o l t
disp ( Vdc , DC o u t p u t v o l t a g e i n v o l t : ) ;
// P a r t ( i v )
ETA =( Idc ^2* RL /( Irms ^2*( RL + rf ) ) ) *100; // R e c t i f i c a t i o n
Efficiency in %
9
22
// Exa 1 . 5
clc ;
clear ;
close ;
// Given d a t a
Vin =40; // i n v o l t
VZ =10; // i n v o l t
Vo =10; // i n v o l t
IZmax =50; // i n mA
IL =0; // i n mA
// Formula : I=IZ+IL=IZmax+0
I = IZmax +0; // i n mA
// Formula : VZ=VinR I
Rmin =( Vin - VZ ) /( I *10^ -3) ; // i n Ohm
disp ( Rmin , Minimum v a l u e o f r e s i s t a n c e i n Ohm : ) ;
10
8 Vo = VZ ; // o u t p u t v o l t a g e i n v o l t
9 Vsr1 = Vmin - Vo ; // V o l t a g e a r o s s s e r i e s
10
11
12
13
14
15
16
17
18
19
20
21
22
r e s i s t a n c e in
volt
disp ( I f R i s t h e s e r i e s e s i s t a n c e , T o t a l c u r r e n t i n
s e r i e s r e s i s t a n c e i n Ampere : I=Vsr /R=8.2/R ) ;
ILmin =5; // i n mA
disp ( c u r r e n t i n z e n e r d i o d e i n Ampere : IZ=IIL
= ( 8 . 2 /RIL 10 3)
eqn ( 1 ) ) ;
Vmax =20; //mximum o u t p u t v o l t a g e
Vo = VZ ; // o u t p u t v o l t a g e i n v o l t
Vsr2 = Vmax - Vo ; // V o l t a g e a r o s s s e r i e s r e s i s t a n c e i n
volt
disp ( C u r r e n t i n s e r i e s r e s i s t a n c e c i r c u i t i n Ampere
: I=Vsr /R ) ;
ILmax =15; // i n mA
disp ( c u r r e n t i n z e n e r d i o d e i n Ampere : IZ=IIL =(Rs /
RIL 10 3)
eqn ( 2 ) )
disp ( For Z e n e r d i o d e t o work a s v o l t a g e r e g u l a t o r
, ( 1 ) and ( 2 ) must be same . ) ;
disp ( ( 8 . 2 / RIL 10 3) = ( 1 3 . 2 /RIL 10 3) )
R =( Vsr2 - Vsr1 ) /( ILmax *10^ -3 - ILmin *10^ -3) ; // i n Ohm
disp (R , R e q u i r e d v a l u e o f S e r i e s R e s i s t o r i n ohm :
);
Scilab code Exa 1.7 Current limiting resistance and dissipated power
1
2
3
4
5
6
7
8
9
// Exa 1 . 7
clc ;
clear ;
close ;
// Given d a t a
Vin =18; // i n v o l t
IZ =20; // i n mA
ILav =(5+35) /2; // i n mA
VZ =12; // i n v o l t
11
10
11
12
13
14
15
Vo =12; // i n v o l t
I = IZ + ILav ; // i n mA
R =( Vin - Vo ) /( I *10^ -3) ; // i n Ohm
disp (R , C u r r e n t l i m i t i n g r e s i s t a n c e i n Ohm : ) ;
P =( I *10^ -3) ^2* R ; // i n Watts
disp (P , Power d i s s p a t i o n i n r e s i s t a n c e i n Watt : ) ;
Scilab code Exa 1.8 Maximum and minimum input supply voltage
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// Exa 1 . 8
clc ;
clear ;
close ;
// Given d a t a
R =1; // i n kOhm
RL =5; // i n kOhm
VZ =10; // i n v o l t
Vo =10; // i n v o l t
P =250; // i n mW
IL = Vo / RL ; // i n mA
IZmin =0; // i n mA
IZmax = P / VZ ; // i n mA
Imin = IZmin + IL ; // i n mA
Imax = IZmax + IL ; // i n mA
Vin_min = VZ + Imin *10^ -3* R *10^3; // i n v o l t
Vin_max = VZ + Imax *10^ -3* R *10^3; // i n v o l t
disp ( The i n p u t v o l t a g e r a n g e s from + string ( Vin_min
) + V t o + string ( Vin_max ) + V ) ;
Scilab code Exa 1.9 Output voltage voltage drop and current in zener
diode
1
// Exa 1 . 9
12
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
clc ;
clear ;
close ;
// Given d a t a
R =5; // i n kOhm
R = R *1000; // i n Ohm
RL =10; // i n kOhm
RL = RL *1000; // i n Ohm
Vin =120; // i n V o l t
VZ =50; // i n V o l t
// P a r t ( i )
Vo = VZ ; // i n V o l t
disp ( Vo , Output v o l t a g e i n v o l t : ) ;
// P a r t ( i i )
VR = Vin - VZ ; // i n V o l t
disp ( VR , V o l t a g e d r o p a c r o s s s e r i e s r e s i s t a n c e i n
v o l t : );
// P a r t ( i i i )
IL = Vo / RL ; // i n Ampere
disp ( IL *1000 , Load C u r r e n t i n mA : ) ;
I = VR / R ; // i n Ampere
disp ( I *1000 , C u r r e n t t h r o u g h r e s i s t a n c e R i n mA : ) ;
IZ =I - IL ; // i n Ampere
disp ( IZ *1000 , Load C u r r e n t i n mA : ) ;
13
9 RS =270; // i n Ohm
10 Imin =( VS - VDmax ) / RS ; // i n Ampere
11 disp ( Imin *1000 , Minimum v a l u e o f LED c u r r e n t i n mA :
12
13
);
Imax =( VS - VDmin ) / RS ; // i n Ampere
disp ( round ( Imax *1000) ,Maximum v a l u e o f LED c u r r e n t
i n mA : ) ;
// Exa 1 . 1 1
clc ;
clear ;
close ;
// Given d a t a
format ( v ,6) ;
C1min =10; // i n pF
C2max =50; // i n pF
L =5; // i n mH
L = L *10^ -3; // i n H
// Formula : CT=C1C2 / ( C1+C2 )
// Minimum
C1 =10; // i n pF
C2 =10; // i n pF
CTmin = C1 * C2 /( C1 + C2 ) ; // i n pF
CTmin = CTmin *10^ -12; // i n F
//Maximum
C1 =50; // i n pF
C2 =50; // i n pF
CTmax = C1 * C2 /( C1 + C2 ) ; // i n pF
CTmax = CTmax *10^ -12; // i n F
// Formula : f =1/(2 %pi s q r t ( LC) )
//maximum :
fmax =1/(2* %pi * sqrt ( L * CTmin ) ) ;
// minimum :
14
26
27
// Exa 1 . 1 2
clc ;
clear ;
close ;
// Given d a t a
format ( v ,6) ;
C1 =21; // i n pF
V1 =4; // i n v o l t
V2 =9; // i n v o l t
disp ( C i s p r o p o r t i o n a l t o 1/ s q r t (V) ) ;
disp ( So , C2/C1=s q r t ( V1/V2 ) ) ;
C2 = sqrt ( V1 / V2 ) * C1 ; // i n pF
disp ( C2 , At r e v e r s e b i a s 9V, Diode c a p a c i t a n c e i n pF
: );
15
9 // P a r t ( i )
10 IP = R * Pop ; // i n mA
11 disp ( IP , Power o f
i n c i d e n t l i g h t 1mW, P h o t o c u r r e n t
i n mA i s : ) ;
// P a r t ( i i )
disp ( Here IP i s n o t p r o p o r t i o n a l t o Pop ( f o r Pop >1.5
mW) ) ;
14 disp ( Hence P h o t o u r r e n t can n o t be c a l c u l a t e d . ) ;
12
13
// Exa 1 . 1 4
clc ;
clear ;
close ;
// Given d a t a
format ( v ,7) ;
ETA =70; // i n %
Eg =0.75; // i n eV
Eg = Eg *1.6*10^ -19; // i n J o u l e
h =6.63*10^ -34; // P l a n k s c o n s t a n t i n Js
c =3*10^8; // s p e e d o f l i g h t i n m/ s
e =1.6*10^ -19; // i n coulamb
lambda = h * c / Eg ; // i n m e t e r
disp ( lambda *10^9 , Wavelength i n nm : ) ;
R =( ETA /100) * e * lambda /( h * c ) ; // i n A/W
disp (R , R e s p o n s i v i t y o f InGaAs p h o t o d i o d e i n A/W :
);
16
3 clear ;
4 close ;
5 // Given d a t a
6 W1 =2.5; // i n eV
7 W2 =1.9; // i n eV
8 ContactPotential = W1 - W2 ; // i n V o l t
9 disp ( ContactPotential , C o n t a c t p o t e n t i a l
);
17
in Volts :
Chapter 2
Bipolar Junction Transistors
Alfa ) + o r 2 0 / 2 1 ) ;
18
3 clear ;
4 close ;
5 // Given d a t a
6 IB =25; // i n uA
7 Beta =40; // u n i t l e s s
8 IC = Beta * IB ; // i n uA
9 IE = IB + IC ; // i n uA
10 disp ( The v a l u e o f IE : + string ( IE ) + m i c r o Ampere )
: + string ( deltaIC )
+ m i l l i Ampere . ) ;
19
8 deltaVCE =1; // i n v o l t
9 disp ( P a r t ( i ) : CE c o n i g u r a t i o n ) ;
10 IC = deltaVCE /( RL *1000) ; // i n Ampere
11 // Formula : Beta=d e l t a I C / d e l t a I B
12 IB = IC / Beta ; // i n Ampere
13 disp ( I n p u t Base C u r r e n t , IB i n mA : + string ( IB
*10^3) ) ;
14 disp ( P a r t ( i i ) : CB c o n i g u r a t i o n ) ;
15 IC = deltaVCE /( RL *1000) ; // i n Ampere
16 // Formula : Beta=d e l t a I C / d e l t a I B
17 IE = IB + IC ; // i n Ampere
18 disp ( I n p u t E m i t t e r C u r r e n t , IE i n mA : + string ( IE
*10^3) ) ;
// Exa 2 . 5
clc ;
clear ;
close ;
// Given d a t a
Ileakage =12.5; // i n uA
ICBO =12.5; // i n uA
IE =2; // i n mA
IC =1.97; // i n mA
// Formula : IC= a l f a IE+ICBO
alfa =( IC - ICBO /10^3) / IE ; // u n i t l e s s
disp ( alfa , C u r r e n t Gain : ) ;
IB = IE - IC ; // i n mA
disp ( IB , Base c u r r e n t i n mA : ) ;
1 // Exa 2 . 6
2 clc ;
3 clear ;
4 close ;
5 // Given d a t a
6 deltaVBE =200; // i n mVolt
7 deltaIB =100; // i n uA
8 ri = deltaVBE *10^ -3/( deltaIB *10^ -6) ; // i n Ohm
9 disp ( ri /1000 , I n p u t r e s i s t a n e o f t r a n s i s t o r
i n kohm
: );
Scilab code Exa 2.9 Current gain input resistance and voltage gain
1 // Exa 2 . 9
2 clc ;
3 clear ;
4 close ;
5 // Given d a t a
6 format ( v ,10) ;
7 Ri =500; // i n Ohm
8 RL =1; // i n kOhm
21
9
10
11
12
13
14
15
16
17
18
19
20
21
1
2
3
4
5
6
7
8
9
10
11
12
13
14
22
i n Ampere : ) ;
RelativeSize = ICS / IES ; // u n i t l e s s
disp ( C o l l e c t o r i s + string ( RelativeSize ) + t i m e s
l a r g e r i n s i z e than e m i t t e r . );
BetaR = alfaR /(1 - alfaR ) ; // u n i t l e s s
disp ( BetaR , V a l u e o f BetaR : ) ;
current
// Exa 2 . 1 2
clc ;
clear ;
close ;
// Given d a t a
Beta =100; // u n i t l e s s
VCC =6; // i n v o l t
RB =530; // i n kOhm
RC =2; // i n kOhm
23
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// Exa 2 . 1 3
clc ;
clear ;
close ;
// Given d a t a
Beta =100; // u n i t l e s s
IC =1; // i n mA
VCC =12; // i n v o l t
VBE =0.3; // i n v o l t ( For Ge )
// P r t ( i )
IB = IC / Beta ; // i n mA
// Formula : VCC=VBE+IB RB
RB =( VCC - VBE ) /( IB *10^ -3) ; // i n Ampere
disp ( RB /10^3 , R e s i s t a n c e RB i n kOhm : ) ;
24
15 // p a r t ( i i )
16 Beta =50; // u n i t l e s s
17 IB =( VCC - VBE ) / RB ; // i n Ampere
18 IC = Beta * IB ; // i n Ampere
19 disp ( IC *10^3 , Z e r o s i g n a l IC i n mA: ) ;
RB w i l l be f i n d o u t . )
IC =1; // i n mA
VCE =8; // i n v o l t
Beta =100; // u n i t l e s s
VCC =12; // i n v o l t
VBE =0.3; // i n v o l t ( For Ge )
// P r t ( i )
RC =( VCC - VCE ) /( IC *10^ -3) ; // i n ohm
IB = IC / Beta ; // i n mA
RB =( VCC - VBE - Beta *( IB *10^ -3) * RC ) /( IB *10^ -3) ; // i n Ohm
disp ( RB /1000 , V a l u e o f RB i n kOhm ) ;
// P a r t ( i i )
Beta =50; // u n i t l e s s
IB =( VCC - VBE ) /( RB + Beta * RC ) ; // i n mA
IC = Beta * IB ; // i n Ampere
VCE = VCC - IC * RC ; // i n v o l t
disp ( New o p e r a t i n g p o i n t i s ( + string ( VCE ) + V, +
string ( IC *10^3) + mA) ) ;
25
// Exa 2 . 1 5
clc ;
clear ;
close ;
// Given d a t a :
R1 =50; // i n kohm
R2 =10; // i n kohm
RE =1; // i n kohm
VCC =12; // i n v o l t
// P r t ( i )
VBE =0.1; // i n v o l t
VBBdash =( R2 /( R1 + R2 ) ) * VCC ; // i n v o l t
IC1 =( VBBdash - VBE ) /( RE *1000) ; // i n mA
disp ( IC1 *1000 , At VBE=0.1V, V a l u e o f IC i n mA : ) ;
// P a r t ( i i )
VBE =0.3; // i n v o l t
IC2 =( VBBdash - VBE ) /( RE *1000) ; // i n mA
disp ( IC2 *1000 , At VBE=0.3V, V a l u e o f IC i n mA : ) ;
// Exa 2 . 1 6
clc ;
clear ;
close ;
// Given d a t a :
R1 =10; // i n kohm
R2 =5; // i n kohm
RE =2; // i n kohm
RC =1; // i n kohm
26
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
VCC =12; // i n v o l t
Beta =100; // u n i t l e s s
VBE =0.7; // i n v o l t
// P a r t ( i )
// Formula : VBE=VBBdashIB RBdashIE RE
disp ( IB i s v e r s m a l l : VBE=VBBdashIE RE ) ;
VBBdash =( R2 /( R1 + R2 ) ) * VCC ; // i n v o l t
IE =( VBBdash - VBE ) /( RE *10^3) ; // i n Ampere
disp ( As b a s e c u r r e n t i s v e r y s m a l l IC=IE ) ;
IC = IE ; // i n mA
// Formul : VCC=IC RC+VCE+IE RE
VCE = VCC - IC * RC *10^3 - IE * RE *10^3; // i n V o l t
disp ( O p e r a t i n g p o i n t i s ( + string ( VCE ) + V, + string (
IC *10^3) + mA) ) ;
// P a r t ( i i )
RBdash =( R1 * R2 /( R1 + R2 ) ) ; // i n kOhm
S =( Beta +1) /(1+ Beta *( RE /( RBdash + RE ) ) ) ;
disp ( S t a i l i t y f a c t o r S i s : + string ( S ) ) ;
// Exa 2 . 1 7
clc ;
clear ;
close ;
// Given d a t a :
R1 =200; // i n kohm
R2 =100; // i n kohm
RE =1; // i n kohm
RC =1; // i n kohm
VCC =9; // i n v o l t
he =2; // i n kohm
hfe =100; // u n i t l e s s
hoe =0; // u n i t l e s s
hre =0; // u n i t l e s s
27
Ampere
21 IC = hfe * IB ; // i n Ampere
22 disp ( IC *10^3 , V a l u e o f IC i n mA : ) ;
23 // P a r t ( i i )
24 // A p p l y i n g K i r c h o f f Law
25 VCE = VCC - IC * RC *10^3 - RE *1063* IB *( hfe +1) ; // i n v o l t
26 disp ( VCE , VCE i n v o l t : ) ;
27 // Note : Ans o f VCE i s wrong i n t h e book a s VCC=10 V
// Exa 2 . 1 8
clc ;
clear ;
close ;
// Given d a t a :
RB =50; // i n kohm
RC =3; // i n kohm
VCC =10; // i n v o l t
VEE =5; // i n v o l t
hfe =100; // u n i t l e s s
VCEsat =0.2; // i n v o l t
VBEsat =0.8; // i n v o l t
VBEactive =0.7; // i n v o l t
VBE =0.7; // i n v o l t ( For S i )
// A p p l y i n g
IB =( VEE - VBE ) /( RB *10^3) ; // i n Ampere : K i r c h o f f 2 nd Law
: VEERB IBVBE=0
28
17 IC = hfe * IB ; // i n Ampere
18 VCB = VCC - IC * RC *10^3 - VBEactive ; // i n
19
20
21
22
23
24
v o l t : // A p p l y i n g
K i r c h o f f 2 nd Law t o c o l l e c t o r e m i t t e r l o o p : VCC
IC RCVCBVBEactive=0
disp ( VCB , C o l l e c t o r t o b a s e v o l t a g e , VCB( i n V) : ) ;
disp ( T h i s shows t h a t t h e b a s e c o l l e c t o r j u n c t i o n i s
forward b i a s e d . This i m p l i e s that the t r a n s i s t o r
i s i n s a t u r a t i o n r e g i o n . );
IB =( VEE - VBEsat ) /( RB *10^3) ; // i n Ampere
disp ( IB *10^3 , V a l u e o f IB i n mA : ) ;
IC =( VCC - VCEsat ) /( RC *10^3) ;
disp ( IC *10^3 , V a l u e o f IC i n mA : ) ;
// Exa 2 . 1 9
clc ;
clear ;
close ;
// Given d a t a :
VCC =20; // i n v o l t
VBE =0.7; // i n v o l t ( For S i )
Beta =50; // u n i t l e s s
RE =200; // i n ohm
R1 =60; // i n kohm
R2 =30; // i n kohm
V2 = VCC * R2 /( R1 + R2 ) ; // i n v o l t
VEO = V2 - VBE ; // i n v o l t
disp ( VEO , V o l t a g e a c r o s s RE i n v o l t : ) ;
29
Chapter 3
Transistor Amplifiers
// Exa 3 . 2
clc ;
clear ;
close ;
// Given d a t a
ib =10; // i n uA
ic =1; // i n mA
ic = ic *10^3; // i n uA
vi =0.02; // i n V o l t
RC =5; // i n kohm
RL =10; // i n kohm
// P a r t ( i )
Ai = - ic / ib ; // u n i t l e s s
Beta = Ai ; // u n i t l e s s
disp ( Ai , C u r r e n t g a i n : ) ;
// P a r t ( i i )
Rie = vi /( ib *10^ -6) ; // i n Ohm
disp ( Rie *10^ -3 , I n p u t i m p e d e n c e i n kohm : ) ;
// P a r t ( i i i )
Rac = RC * RL /( RC + RL ) ; // i n kohm
disp ( Rac , AC l o a d i n kohm : ) ;
30
22 // P a r t ( i v )
23 Av = - Rac *10^3* Beta / Rie ; // u n i t l e s s
24 disp ( Av , V o l t a g e g a i n : ) ;
25 // P a r t ( v )
26 PowerGain = Av * Ai ; // u n i t l e s s
27 disp ( PowerGain , Power Gain i s : ) ;
28 // Note : Ans o f Av and Power g a i n i s wrong i n t h e
book .
// Exa 3 . 2
clc ;
clear ;
close ;
// Given d a t a
RL =10; // i n kohm
RS =1; // i n kohm
hie =1.1; // i n kOhm
hre =2.5*10^ -4; // u n i t l e s s
hfe =50; // u n i t l e s s
hoe =25; // i n u mho
Aie = - hfe /(1+ hoe *10^ -6* RL *10^3) ; // u n i t l e s s
Zie = hie + hre * Aie * RL ; // i n kOhm
Zie = round ( Zie ) ;
Ave = Aie * RL / Zie ; // u n i t l e s s
Avs_e = Ave * Zie /( Zie + RS ) ; //
deltah = hoe *10^ -6* hie *10^3 - hfe * hre ;
Zoe =( hie *10^3+ RS *10^3) /( hoe *10^ -6* RS *10^3+ deltah ) ;
Ais_e = Aie * RS /( Zie + RS ) ;
Ape = Ave * Aie ;
Aps_e = Avs_e * Ais_e ;
disp ( Aie , C u r r e n t g a i n : ) ;
disp ( Ais_e , C u r r e n t g a i n w i t h s o u r c e r e s i s t a n c e : )
;
31
24
25
26
27
28
29
disp ( Ave , V o l t a g e g a i n : ) ;
disp ( Avs_e , V o l t a g e g a i n w i t h s o u r c e r e s i s t a n c e : )
;
disp ( Ape , Power g a i n : ) ;
disp ( Aps_e , Power g a i n w i t h s o u r c e r e s i s t a n c e : ) ;
disp ( Zie , I n p u t i m p e d e n c e i n kohm : ) ;
disp ( Zoe /10^3 , Output i m p e d e n c e i n kohm : ) ;
Scilab code Exa 3.3 Input Output impedence and output voltage
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// Exa 3 . 3
clc ;
clear ;
close ;
// Given d a t a :
InputVoltage =1; // i n mV
RL =5.6; // i n kohm
RS =600; // i n ohm
hre =6.5*10^ -4; // u n i t l e s s
hie =1.7; // i n kOhm
hfe =125; // u n i t l e s s
hoe =80; // i n uA/V
deltah = hoe *10^ -6* hie *10^3 - hfe * hre ;
Zie =( hie *10^3+ RL *10^3* deltah ) /(1+ hoe *10^ -6* RL *10^3) ;
// i n Ohm
Zoe =( hie *10^3+ RS ) /( hoe *10^ -6* RS + deltah ) ; // i n Ohm
Ave = -( hfe * RL *10^3) /( hie *10^3+ RL *10^3* deltah ) ; //
unitless
Avs_e = Ave * Zie /( Zie + RS ) ; //
OutputVoltage = Avs_e * InputVoltage ; // i n
disp ( Zie /1000 , I n p u t i m p e d e n c e i n kohm : ) ;
disp ( Zoe /10^3 , Output i m p e d e n c e i n kohm : ) ;
disp ( Ave , V o l t a g e g a i n : ) ;
disp ( Avs_e , V o l t a g e g a i n w i t h s o u r c e r e s i s t a n c e : )
;
32
23
24
1
2
3
4
5
6
7
8
9
10
11
12
13
33
// Exa 3 . 6
clc ;
clear ;
close ;
// Given d a t a :
RC =10; // i n kohm
hfe =330; // u n i t l e s s
hie =4.5; // i n kOhm
//RS<<h i e
AVM = hfe * RC *10^3/( hie *10^3+ RC *10^3) ; // u n i t l e s s
AVM1 = AVM ; // Gain o f 1 s t s t a g e
AVM2 = AVM ; // Gain o f 2 nd s t a g e
AVM3 = hfe * RC *10^3/( hie *10^3) ; // u n i t l e s s ( / / Gain o f 3 r d
stage )
OverallGain = AVM1 * AVM2 * AVM3 ; // u n i t l e s s
disp ( AVM , Gain i n mid f r e q u e n y r a n g e : ) ;
disp ( T h i s i s t h e g a i n o f 1 s t and 2 nd s t a g e . )
disp ( OverallGain , O v e r a l l V o l t a g e g a i n f o r mid
f r e q u e n c y range : );
34
5
6
7
8
9
10
11
12
// Given d a t a :
RC =5.5; // i n kohm
hfe =330; // u n i t l e s s
hie =4.5; // i n kohm
f1 =30; // i n Hz
// Formula : f 1 =1/(2 %pi C ( h i e+RC) )
C =1/(2* %pi * f1 *( hie *10^3+ RC *10^3) ) ; // i n F
disp ( C *10^6 , V a l u e o f c o u p l i n g c a p a c i t o r i n m i c r o
f a r a d : );
// Exa 3 . 8
clc ;
clear ;
close ;
// Given d a t a :
RC =10; // i n kohm
Rin =1; // i n kohm
Beta =100; // u n i t l e s s
RL =100; // i n ohm
RCdash = RC *10^3* RL /( RC *10^3+ RL ) ; // i n ohm
VoltageGain = Beta * RCdash /( Rin *10^3) ; // i n v o l t
disp ( VoltageGain , V o l t a g e Gain : ) ;
35
7
8
9
10
11
12
13
14
// Exa 3 . 1 0
clc ;
clear ;
close ;
// Given d a t a :
ZL =10; // i n ohm
ZP =1000; // i n ohm
// For max power : ZP=n 2 ZL
n = sqrt ( ZP / ZL ) ; // t u r n r a t i o
disp (n , Turn r a t i o : ) ;
36
9
10
// Exa 3 . 1 2
clc ;
clear ;
close ;
// Given d a t a :
VCC =20; // i n v o l t
RC =20; // i n ohm
VCEQ =10; // i n v o l t
ICQ =500; // i n mA
// p a r t ( i ) :
Pin_dc = VCC * ICQ *10^ -3; // i n w a t t
disp ( Pin_dc , T o t a l dc power t a k e n by t h e c i r c u i t i n
Watt : ) ;
// p a r t ( i i ) :
PRc_dc = ICQ ^2*10^ -6* RC ; // i n w a t t
disp ( PRc_dc , dc power d i s s i p a t e d by t h e c o l l e c t o r
l o a d i n Watt : ) ;
// p a r t ( i i i ) :
Io =250; // i n mA( maximum v a l u e o f o u t p u t a c c u r r e n t )
Irms = Io / sqrt (2) ; // i n mA
Po_ac = Irms ^2*10^ -6* RC ; // i n w a t t
disp ( Po_ac , Power d e v e l o p e d a c r o s s t h e l o a d i n Watt
: );
37
21
22
23
24
25
26
27
28
29
30
31
32
// p a r t ( i v ) :
Ptr_dc = Pin_dc - PRc_dc ; // i n w a t t
disp ( Ptr_dc , dc power d i s s i p a t e d by t h e c o l l e c t o r
l o a d i n Watt : ) ;
// p a r t ( v ) :
PC_dc = Pin_dc - PRc_dc - Po_ac ; // i n w a t t
disp ( PC_dc , dc power d i s s i p a t e d by t h e c o l l e c t o r
l o a d i n Watt : ) ;
// p a r t ( v i ) :
ETAoverall = Po_ac *100/ Pin_dc ; // O v e r a l l E f f i c i e n c y ( i n
%)
disp ( ETAoverall , O v e r a l l E f f i c i e n c y ( i n %) : ) ;
// p a r t ( v i i ) :
ETAcollector = Po_ac *100/ PRc_dc ; // C o l l e c t o r E f f i c i e n c y
( i n %)
disp ( ETAcollector , C o l l e c t o r E f f i c i e n c y ( i n %) : ) ;
// Exa 3 . 1 3
clc ;
clear ;
close ;
// Given d a t a :
n =10; // t u r n r a t i o
RL =100; // i n ohm
ICQ =100; // i n mA
RLdash = n ^2* RL ; // i n ohm
MaxPowerOut =( ICQ *10^ -3) ^2* RLdash /2; // i n w a t t
disp ( MaxPowerOut , Maximum Power o u t p u t i n w a t t : ) ;
1 // Exa 3 . 1 4
2 clc ;
3 clear ;
4 close ;
5 // Given d a t a :
6 // P a r t ( i ) : w i t h o u t h e a t s i n k
7 ThetaMax =90; // i n d e g r e e C
8 Theta_o =30; // i n d e g r e e C
9 R =300; // i n d e g r e e C/W
10 Pr =( ThetaMax - Theta_o ) / R ; // i n w a t t
11 disp ( Pr , Without h e a t s i n k , Maximum p e r m i s s i b l e
power d i s s i p a t i o i n w a t t : ) ;
12 // P a r t ( i i ) : w i t h h e a t s i n k
13 ThetaMax =90; // i n d e g r e e C
14 Theta_o =30; // i n d e g r e e C
15 R =60; // i n d e g r e e C/W
16 Pr =( ThetaMax - Theta_o ) / R ; // i n w a t t
17 disp ( Pr , With h e a t s i n k , Maximum p e r m i s s i b l e power
d i s s i p a t i o i n watt : );
39
Chapter 4
Frequency Response
Omega_Z2 ^2) ; // i n r a d i a n / s e c
11 disp ( WL , Approximate v a l u e o f l o w e r 3dB F r e q u e n c y i n
r a d i a n / s e c : );
40
3
4
5
6
7
8
9
clear ;
close ;
// Given d a t a
Omega_P1 =10^4; // i n Radian / s e c
Omega_P2 =2*10^4; // i n Radian / s e c
Omega_Z1 =10^5; // i n Radian / s e c
omegaH =1/ sqrt (1/ Omega_P1 ^2+1/ Omega_P2 ^2 -2/ Omega_Z1
^2) ; // i n r a d i a n / s e c
10 disp ( round ( omegaH ) , Approximate v a l u e o f l o w e r 3dB
Frequency i n r a d i a n / s e c : );
41
Chapter 5
Feed Back
42
5 // Given d a t a :
6 A =1000; // g a i n W i t h o u t F e e d b a c k ( u n i t l e s s )
7 // P a r t ( i ) :
8 disp ( At n o r m a l c o l l e c t o r s u p p l y : ) ;
9 disp ( w i t h f e e d b a c k g a i n r e d u c e s by a f a c t o r 0 . 4 0 ) ;
10 Af =A - A *0.40; // g a i n W i t h F e e d b a c k ( u n i t l e s s )
11 disp ( Af , At n o r m a l c o l l e c t o r s u p p l y , Gain w i t h
12
13
14
15
16
17
18
19
20
21
22
23
f e e d b a c k : );
// Formula : Af=A/(1+A Beta )
Beta =( A / Af -1) / A ; // f e e d b a c k f a c t o r ( u n i t l e s s )
disp ( At r e d u c e d power s u p p l y : ) ;
Adash =800; // g a i n W i t h o u t F e e d b a c k ( u n i t l e s s )
Af_dash = Adash /(1+ Adash * Beta )
disp ( round ( Af_dash ) , At Reduced c o l l e c t o r s u p p l y ,
Gain w i t h f e e d b a c k : ) ;
// P a r t ( i i )
Reduction =(( A - Adash ) / A ) *100; //% r e d u c t i o n w i t h o u t
feedback
disp ( Reduction , p e r c e n t a g e r e d u c t i o n i n g a i n w i t h o u t
f e e d b a c k (%) : ) ;
Reduction1 =(( Af - Af_dash ) / Af ) *100; //% r e d u c t i o n
without feedback
disp ( round ( Reduction1 ) , p e r c e n t a g e r e d u c t i o n i n g a i n
w i t h f e e d b a c k (%) : ) ;
// Note : a n s w e r o f Af i s wrong i n t h e book .
Scilab code Exa 5.3 Gain with feedback factor and feedback voltage
1 // Exa 5 . 3
2 clc ;
3 clear ;
4 close ;
5 // Given d a t a :
6 A =100; // g a i n w i t h o u t f e e d b a c k ( u n i t l e s s )
7 Beta =1/25; // f e e d b a c k r a t i o ( u n i t l e s s )
43
8 Vi =50; // i n mV
9 // P a r t ( i ) :
10 Af = A /(1+ A * Beta ) ; // g a i n w i t h f e e d b a c k ( u n i t l e s s )
11 disp ( Af , ( i ) Gain w i t h f e e d b a c k : ) ;
12 // P a r t ( i i ) :
13 FeedbackFactor = Beta * A ; // u n i t l e s s
14 disp ( FeedbackFactor , ( i i ) Feedb ack F a c t o r : ) ;
15 // P a r t ( i i i ) :
16 Vo_dash = Af * Vi *10^ -3; // i n v o l t
17 disp ( Vo_dash , ( i i i ) Output V o l t a g e i n v o l t s : ) ;
18 // P a r t ( i v ) :
19 FeedbackVoltage = Beta * Vo_dash ; // i n v o l t
20 disp ( FeedbackVoltage , ( i v ) Fee dback V o l t a g e i n v o l t s
21
22
23
: );
// P a r t ( v ) :
Vi_dash = Vi *(1+ Beta * A ) ; // i n mv
disp ( Vi_dash , ( v ) New I n c r e a s e d I n p u t V o l t a g e i n
m i l l i v o l t s : );
1
2
3
4
5
6
7
8
9
10
11
12
44
14
string ( Beta ) + o r 1 / 2 0 ) ;
;
disp ( dAf /dA=((1+ Beta A)Beta A) /(1+ Beta A) 2=1/(1+
Beta A) 2 ) ;
11 disp ( dAf=dA/(1+ Beta A) 2
eqn ( 2 ) ) ;
12 disp ( D i v i d i n g eqn ( 2 ) by eqn ( 1 ) , ) ;
10
45
13
14
15
16
17
Scilab code Exa 5.7 New gain distortion and input voltage
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// Exa 5 . 7
clc ;
clear ;
close ;
// Given d a t a :
A =200; // g a i n w i t h o u t f e e d b a c k ( u n i t l e s s )
Dn =10; // D i s t o r t i o n i n %
Vi =0.5; // I n i t i a l i n p u t v o l t a g e i n v o l t
Beta =0.05; // f e e d b a c k r a t i o ( u n i t l e s s )
// Formula : Af=A/(1+A Beta )
Af = A /(1+ A * Beta ) ; // g a i n w i t h f e e d b a c k ( u n i t l e s s )
disp ( Af , New g a i n : ) ;
Dn_dash = Dn /(1+ A * Beta ) ; // new d i s t o r t i o n i n %
disp ( Dn_dash , D i s t o r t i o n w i t h n e g a t i v e f e e d b a c k i n %
: );
InitialOutputVoltage = A * Vi ; // i n V o l t
disp ( InitialOutputVoltage , I n i t i a l Output V o l t a g e i n
v o l t : );
NewInputVoltage = InitialOutputVoltage / Af ; // i n v o l t
disp ( NewInputVoltage , New I n p u t V o l t a g e i n v o l t s : )
;
// Note : Ans o f Af and N e w I n p u t V o l t a g e i s n o t
a c u r a t e i n t h e book .
46
// Exa 5 . 8
clc ;
clear ;
close ;
// Given d a t a :
A =10000; // g a i n w i t h o u t f e e d b a c k ( u n i t l e s s )
Zi =10; // i n kOhm
Zo =100; // i n Ohm
R1 =2; // i n Ohm
R2 =18; // i n Ohm
// P a r t ( i ) :
Beta = R1 /( R1 + R2 ) ; // f e e d b a c k f r a c t i o n ( u n i t l e s s )
disp ( Beta , ( i ) F eedback F r a c t i o n : ) ;
// P a r t ( i i ) :
Af = A /(1+ A * Beta ) ; // Gain w i t h n e g a t i v e f e e d b a c k (
unitless )
disp ( round ( Af ) , ( i i ) Gain w i t h n e g a t i v e f e e d b a c k : )
;
// P a r t ( i i i ) :
inputVoltge =0.5; // i n mV
outputVoltge = Af * inputVoltge ; // i n mV
disp ( round ( outputVoltge ) , ( i i i ) Output V o l t a g e i n
m i l l i v o l t s : );
// P a r t ( i v ) :
Zif = Zi *(1+ Beta * A ) ; // i n kOhm
disp ( Zif *10^ -3 , ( i v ) I n p u t i m p e d a n c e o f f e e d b a c k
a m p l i f i e r i n Mohm : ) ;
// P a r t ( v ) :
Zof = Zo /(1+ Beta * A ) ; // i n kOhm
format ( v ,4) ;
disp ( Zof , ( v ) Output i m p e d a n c e w i t h f e e d b a c k i n Ohm
: );
47
Scilab code Exa 5.9 Voltage gain input and output resistance
// Exa 5 . 9
clc ;
clear ;
close ;
// Given d a t a :
A =200; // g a i n w i t h o u t f e e d b a c k ( u n i t l e s s )
Ri =2; // i n kOhm
Ro =12; // i n kOhm
Beta =0.02; // f e e d b a k r a t i o ( u n i t l e s s )
// P a r t ( i ) :
Af = A /(1+ A * Beta ) ; // g a i n w i t h f e e d b a c k ( u n i t l e s s )
disp ( Af , ( i ) Gain w i t h N e g a t i v e Feedb ack : ) ;
// P a r t ( i i ) :
Rif = Ri *(1+ A * Beta ) ; // i n kOhm
disp ( Rif , ( i i ) I n p u t r e s i s t a n c e w i t h f e e d b a c k i n
kOhm : ) ;
16 // P a r t ( i i ) :
17 Rof = Ro /(1+ A * Beta ) ; // i n kOhm
18 disp ( Rof , ( i i ) Output r e s i s t a n c e w i t h f e e d b a c k i n
kOhm : ) ;
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
48
8 Beta =1/20; // f e e d b a c k r a t i o ( u n i t l e s s )
9 // Formula : Af=A/(1+A Beta )
10 Af = A /(1+ A * Beta ) ; // g a i n w i t h f e e d b a c k ( u n i t l e s s )
11 Af =20* log10 ( Af ) ; // i n dB
12 disp ( Af , Gain w i t h f e e d b a c k i n dB : ) ;
// Exa 5 . 1 1
clc ;
clear ;
close ;
// Given d a t a :
A =800; // g a i n ( u n i t l e s s )
f1 =40; // i n Hz
f2 =16; // i n kHz
Beta =2/100; // f e e d b a c k f a t o r ( u n i t l e s s )
// Formula : Af=A/(1+A Beta )
Af = A /(1+ A * Beta ) ; // g a i n w i t h f e e d b a c k ( u n i t l e s s )
disp ( Af , V o l t a g e g i n w i t h f e e d b a c k : ) ;
BW = f2 *10^3 - f1 ; // Bandwidth o f a m p l i f i e r i n Hz
disp ( BW *10^ -3 , Bandwidth o f a m p l i f i e r i n kHz : ) ;
f1_f = f1 /(1+ A * Beta ) ; // i n Hz
f2_f = f2 *(1+ A * Beta ) ; // i n kHz
BW_f = f2_f *10^3 - f1_f ; // Bandwith a f t e r f e e d b a c k i n Hz
disp ( round ( BW_f *10^ -3) , Bandwith a f t e r f e e d b a c k i n
KHz : ) ;
49
4 close ;
5 // Given d a t a :
6 A =100; // g a i n ( u n i t l e s s )
7 BW =10; // i n Hz
8 Beta =5; // i n %
9 // P a r t ( i ) :
10 // Formula : Af=A/(1+A Beta )
11 Af = A /(1+ A * Beta /100) ; // g a i n w i t h f e e d b a c k ( u n i t l e s s )
12 disp ( Af , V o l t a g e g i n w i t h f e e d b a c k : ) ;
13 // P a r t ( i i )
14 BW_f = BW *(1+ A * Beta /100) ; // Bandwith a f t e r f e e d b a c k i n
15
Hz
disp ( BW_f , Bandwith w i t h n e g a t i v e f e e d b a c k i n KHz :
);
// Exa 5 . 1 3
clc ;
clear ;
close ;
// Given d a t a :
hfe =50; // u n i t l e s s
hie =1.1; // i n kOhm
hoe =0; // u n i t l e s s
hre =0; // u n i t l e s s
RL =4; // i n kOhm
Rs =10; // i n kOhm
RB =40; // i n kOhm
RLdash = RB * RL /( RB + RL ) ; // i n Kohm
AV = - hfe * RLdash / hie ; // u n i t l e s s
// P a r t ( i ) ;
Rif = hie *( RB /(1 - AV ) ) /( hie +( RB /(1 - AV ) ) ) ; // i n kOhm
disp ( round ( Rif *1000) , I n p u t r e s i s t a n c e w i t h f e e d b a c k
i n Ohm : ) ;
50
18 // P a r t ( i i ) :
19 AVf = AV *( Rif /( Rs + Rif ) ) ; // u n i t l e s s
20 disp ( AVf , V o l t a g e g i n w i t h f e e d b a c k
51
: );
Chapter 6
Field Effect Transistors and
MOSFETS
// Exa 6 . 1
clc ;
clear ;
close ;
// g i v e n d a t a
VGS1 = -3.1; // i n V o l t
VGS2 = -3; // i n V o l t
ID1 =1; // i n mA
ID2 =1.3; // i n mA
delVGS = VGS2 - VGS1 ; // i n V o l t s
delID = ID2 - ID1 ; // i n mA
gm = delID *10^ -3/ delVGS ; // i n mhos
disp ( gm , T r a n s c o n d u c t a n c e i n mhos : ) ;
Scilab code Exa 6.2 AC drain resistance transconductance and amplification factor
52
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// Exa 6 . 2
clc ;
clear ;
close ;
// g i v e n d a t a
VGS1 =0; // i n V o l t
VGS2 =0; // i n V o l t
VGS3 = -0.2; // i n V o l t
VDS1 =7; // i n V o l t
VDS2 =15; // i n V o l t
VDS3 =15; // i n V o l t
ID1 =10; // i n mA
ID2 =10.25; // i n mA
ID3 =9.65; // i n mA
delVDS = VDS2 - VDS1 ; // i n V o l t s
delID = ID2 - ID1 ; // i n mA
rd = delVDS / delID ; // i n Kohm
disp ( rd , AC d r a i n r e s i s t a n c e i n Kohm : ) ;
delVGS = VGS3 - VGS2 ; // i n V o l t s
delID = ID3 - ID2 ; // i n mA
gm = delID *10^ -3/ delVGS ; // i n mhos
disp ( gm , T r a n s c o n d u c t a n c e i n mhos : ) ;
mu = rd *10^3* gm ; // u n i t l e s s
disp ( mu , A m p l i f i c a t i o n f a c t o r : ) ;
53
: );
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
54
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
R1 =2.1; // i n Mohm
R2 =270; // i n Kohm
RD =4.7; // i n Kohm
RS =1.5; // i n Kohm
VDD =20; // i n V o l t
VP = -4; // i n V o l t
IDSS =8; // i n mA
// s t e p 1 : Find VGS :
VG = R2 *10^3* VDD /( R1 *10^6+ R2 *10^3) ; // i n V o l t
disp ( VS=ID RSVGS V o l t ) ;
disp ( VGS=VGVS=2.28 1.5 ID )
// s t e p 2 : Find ID :
disp ( ID=IDSS [1 VGS/VP] 2 mA ) ;
disp ( ID = 8 [ 1 ( 2 . 2 8 1 . 5 ID ) / 4 ] 2 mA ) ;
disp ( 2 ID = 3 9 . 4 4 1 8 . 8 4 ID +2. 25 ID 2 ) ;
disp ( 2 . 2 5 ID 2 20.84 ID39 .44=0 )
disp ( ID =6.6mA o r 2 . 6 5mA ) ;
disp ( For ID =6.6mA VDS=ve ) ;
disp ( So d i s c a r d t h e v a l u e s o IDQ = 2 . 6 5mA. ) ;
ID =2.65; // i n mA
// s t e p 3 : Find VGSQ :
IDQ = ID ; // i n mA
VGS =2.28; // i n V o l t
VGSQ = VGS -1.5* IDQ ; // / i n V o l t
// s t e p 4 : Find VDSQ :
VDSQ = VDD - IDQ *( RD + RS ) ; // i n V o l t
// s t e p 5 : Find VD, VS and VDG :
VDS = VDSQ ; // i n V o l t
VG = VGS ; // i n V o l t
VS = ID * RS ; // i n V o l t
VD = VS + VDS // i n V o l t
VDG = VD - VG ; // i n V o l t
disp ( IDQ , IDQ i n mA : ) ;
disp ( VGSQ , VGSQ i n V o l t : ) ;
disp ( VD , VD i n V o l t : ) ;
disp ( VS , VS i n V o l t : ) ;
disp ( VDS , VDS i n V o l t : ) ;
disp ( VDG , VDG i n V o l t : ) ;
55
// Exa 6 . 8
clc ;
clear ;
close ;
// g i v e n d a t a
a =5.6*10^ -6/2; // i n m e t e r
k =12; // u n i t l e s s
epsilon_o =8.86*10^ -12; // i n F/m
epsilon = k * epsilon_o ; // i n F/m
ND =10^15; // i n cm3
ND =10^15*10^6; // i n m3
e =1.6*10^ -19; // i n Coulamb
VP = e * ND * a ^2/(2* epsilon ) ; // i n V o l t
disp ( VP , P i n c h o f f v o l t a g e i n v o l t s : ) ;
56
12 IDSS =1:8; // i n mA
13 for i =1:8
14
gm ( i ) = -2* IDSS ( i ) / VP
15 end
16 title ( gm v e r s u s IDSS ) ;
17 xlabel ( gm( i n mS) ) ;
18 ylabel ( IDSS ( i n mA) ) ;
19 plot2d ( gm , IDSS ) ;
20 disp ( C l e a r l y t h e p l o t o f gm v s IDSS f o r VD=6V,
IDSS=8mA i s a s t r a i g h t l i n e o f s l o p e =2/VP
=(2/6)=1/3 ) ;
1
2
3
4
5
6
7
8
9
10
11
12
13
57
Chapter 7
Magnetic Materials
of f r e e space in
weber /ampm e t e r
8 H = Bo / meu_o ; // i n A/m
9 disp (H , H o r i z o n t a l component o f m a g n e t i c f i l e d
i n t e n s i t y i n A/m : ) ;
58
5
6
7
8
9
10
11
12
13
// Given d a t a
H =5*10^3; // i n Amperet u r n s /m
l =10; // i n cm
l = l *10^ -2; // i n m e t e r
N =50; // no . o f t u r n s
n = N / l ; // no . o f t u r n s p e r u n i t l e n g t h
// Formula : H=n i
i = H / n ; // i n Ampere
disp (i , C u r r e n t s h o u l d be s e n t t h r o u g h s o l e n o i d i n
Ampere : ) ;
// Exa 7 . 3
clc ;
clear ;
close ;
// Given d a t a
meu_r =1000; // r e l a t i v e p e r m e a b i l i t y
n =5; // t u r n s /cm
n = n *10^2; // t u r n s / m e t e r
i =0.5; // i n Ampere
Volume =10^ -4; // i n m3
I =( meu_r -1) * n * i ; // i n Ampere
MagneticMoment = I * Volume ; // i n Ameter 2
disp ( round ( MagneticMoment ) , M a g n e t i c moment o f t h e
r o d i n Amperem e t e r 2 : ) ;
Scilab code Exa 7.4 Flux density magnetic intensity and permeability
1 // Exa 7 . 4
2 clc ;
3 clear ;
59
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
close ;
// Given d a t a
l =30; // i n cm
l = l *10^ -2; // i n m e t e r
A =1; // i n cm2
A = A *10^ -4; // i n m e t e r 2
N =300; // t u r n s o f w i r e
i =0.032; // i n Ampere
FI_B =2*10^ -6; // i n weber
meu_o =4* %pi *10^ -7; // p e r m e a b i l i t y o f f r e e s p a c e i n
weber /ampm e t e r
B = FI_B / A ; // i n weber / m e t e r 2
disp (B , Flux D e n s i t y i n weber / m e t e r 2 : ) ;
H = N * i / l ; // i n ampt u r n / m e t e r
disp (H , m a g n e t i c I n t e n s i t y i n ampt u r n / m e t e r : ) ;
meu = B / H ; // i n weber /Ampm e t e r
disp ( meu , P e r m e a b i l i t y i n weber /ampm e t e r : ) ;
meu_r = meu / meu_o ; // R e l a t i v e P e r m e a b i l i t y
disp ( meu_r , R e l a t i v e P e r m e a b i l i t y : ) ;
// Answer o f r e l a t i v e p e r m e a b i l i t y i s wrong i n t h e
book .
than 1 . );
60
// Exa 7 . 6
clc ;
clear ;
close ;
// Given d a t a
n =10; // t u r n s /cm
n = n *10^2; // t u r n s / m e t e r
i =2; // i n Ampere
B =1; // i n weber / m e t e r 2
meu_o =4* %pi *10^ -7; // p e r m e a b i l i t y o f f r e e s p a c e i n
weber /ampm e t e r
H = n * i ; // i n ampt u r n / m e t e r
disp (H , M a g n e t i s i n g F o r c e i n ampt u r n / m e t e r : ) ;0
// Formula : B=meu o (H+I )
I = B / meu_o - H ; // i n ampt u r n / m e t e r
disp (I , M a g n e t i s a t i o n o f m a t e r i a l i n ampt u r n / m e t e r
: );
meu_r = B /( meu_o * H ) ; // r e l a t i v e p e r m e a b i l i t y ( u n i t l e s s )
disp ( meu_r , R e l a t i v e P e r m e a b i l i t y : ) ;
61
Chapter 8
Oscillators
// Exa Misc 8 . 1
clc ;
clear ;
close ;
// g i v e n d a t a
format ( v ,5) ;
L2 =0.4; // i n mH
C =0.004; // i n
F
f =120; // i n KHz
L1 =1/(4* %pi ^2*( f *10^3) ^2* C *10^ -6) - L2 *10^ -3; // i n H
disp ( L1 *10^3 , V a l u e o f L1 ( i n mH) : ) ;
62
5
6
7
8
9
10
11
12
13
14
15
16
// g i v e n d a t a
format ( v ,6) ;
fo =10; // i n KHz
R1 =25; // i n kohm
R2 =60; // i n kohm
Rc =40; // i n kohm
R =7.1; // i n kohm
hie =1.8; // i n kohm
C =1/(2* %pi * fo *10^3* R *10^3* sqrt (6+4* Rc / R ) ) ; // i n F
disp ( C *10^9 , V a l u e o f C a p a c i t o r ( i n nF ) : ) ;
hfe =23+29* R / Rc +4* Rc / R ; // u n i t l e s s
disp ( V a l u e o f h f e i s
+ string ( hfe ) ) ;
// Exa Misc 8 . 3
clc ;
clear ;
close ;
// g i v e n d a t a
format ( v ,5) ;
R =100; // i n kohm
fo =10; // i n KHz
C =1/(2* %pi * fo *10^3* R *10^3) ; // i n F
disp ( C *10^12 , V a l u e o f C a p a c i t o r ( i n pF ) : ) ;
63
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
format ( v ,5) ;
L =40; // i n mH
C1 =100; // i n pF
C2 =500; // i n pF
Vout =10; // i n v o l t
fo =1/(2* %pi * sqrt ( L *10^ -3* C1 *10^ -12* C2 *10^ -12/( C1
*10^ -12+ C2 *10^ -12) ) )
disp ( fo *10^ -3 , F r e q u e n c y o f o s c i l l a t i o n ( i n KHz) : )
;
Vf = Vout * C1 / C2 ; // i n v o l t
disp ( Vf , Feed back v o l t a g e i n v o l t : ) ;
Gain = C2 / C1 ; // u n i t l e s s
disp ( Gain , Minimum Gain i s ) ;
// i f Gain =10
Gain =10; // g i v e n
C1 = C2 / Gain ; // i n pF
disp ( C1 , For a g a i n o f 10 C1 i n pF i s : ) ;
fo =1/(2* %pi * sqrt ( L *10^ -3* C1 *10^ -12* C2 *10^ -12/( C1
*10^ -12+ C2 *10^ -12) ) )
disp ( fo *10^ -3 , New f r e q u e n c y o f o s c i l l a t i o n ( i n KHz)
: );
// Exa Misc 8 . 5
clc ;
clear ;
close ;
// g i v e n d a t a
format ( v ,6) ;
L =0.5; // i n H
Cs =0.06; // i n pF
Cp =1; // i n pF
R =5; // i n Kohm
fs =1/(2* %pi * sqrt ( L * Cs *10^ -12) ) ; // i n Hz
64
: Beta A=1
);
8 Beta =1/ A ; // u n i t l e s s
9 disp ( Beta , Feed back F a c t o r t o make o s c i l l a t o r
// Exa 8 . 2
clc ;
clear ;
close ;
// Given d a t a
format ( v ,5) ;
L =100; // i n uH
L = L *10^ -6; // i n H
f1 =500; // i n kHz
65
: );
10
11
12
13
14
15
16
f1 = f1 *10^3; // i n Hz
f2 =1500; // i n kHz
f2 = f2 *10^3; // i n Hz
// Formula : f =1/(2 %pi s q r t ( LC) )
C1 =1/(4* %pi ^2* f1 ^2* L ) ; // i n F
C2 =1/(4* %pi ^2* f2 ^2* L ) ; // i n F
disp ( Range o f c a p a c i t o r : + string ( C2 *10^12) + pF
t o + string ( C1 *10^12) + pF ) ;
// Exa 8 . 3
clc ;
clear ;
close ;
// Given d a t a
format ( v ,9) ;
L =100; // i n mH
L = L *10^ -3; // i n H
C1 =0.1; // i n uF
C1 = C1 *10^ -6; // i n F
f =100; // i n kHz
f = f *10^3; // i n Hz
// Formula : f =1/(2 %pi s q r t ( LC) )
C =1/(4* %pi ^2* f ^2* L ) ; // i n F
// Formula : C=C1C2 / ( C1+C2 )
C2 = C * C1 /( C1 - C ) ;
disp ( C2 , C2 i n m i c r o f a r a d : ) ;
// Note : Answer i n t h e book i s wrong .
// Exa 8 . 4
66
2
3
4
5
6
7
8
9
10
11
12
clc ;
clear ;
close ;
// Given d a t a
R =100; // i n kOhm
R = R *10^3; // i n Ohm
C =0.01; // i n uF
C = C *10^ -6; // i n F
fo = sqrt (6) /(2* %pi * R * C ) ; // i n Hz
disp ( fo , F r e q u e n c y o f o s c i l l a t i o n i n Hz : ) ;
// Note : Answer i n t h e book i s n o t a c c u r a t e .
Scilab code Exa 8.6 Frequency of oscillation and min current gain
1 // Exa 8 . 6
2 clc ;
3 clear ;
4 close ;
67
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// Given d a t a :
R1 =50; // i n kohm
R1 = R1 *10^3; // i n ohm
C1 =0.001; // i n uF
C1 = C1 *10^ -6; // i n F
R2 =1; // i n kohm
R2 = R2 *10^3; // i n ohm
C2 =0.01; // i n uF
C2 = C2 *10^ -6; // i n F
// P a r t ( i )
// Formula : f =1/(2 %pi s q r t ( C1C2R1R2 ) )
f =1/(2* %pi * sqrt ( C1 * C2 * R1 * R2 ) ) ; // i n Hz
disp ( f /1000 , F r e q u e n c y o f o s c i l l a t i o n s i n kHz : ) ;
// P a r t ( i i )
CurrentGain =1+ C2 / C1 + R1 / R2 ; // u n i t l e s s
disp ( CurrentGain , C u r r e n t Gain : ) ;
c a p a c i t a n c e . )
12 R =1/(2* %pi * fmin * Cmax *10^ -12)
13 disp ( R /10^6 , R e q u i r e d r e s i s t a n c e
68
i n Mohm : ) ;
1
2
3
4
5
6
7
8
9
10
11
69
1
2
3
4
5
6
7
8
9
10
11
12
70
Chapter 9
Unijunction Transistor
Scilab code Exa 9.1 Stand off voltage and peak point Voltage
// Exa 9 . 1
clc ;
clear ;
close ;
// Given d a t a :
VBB =20; // i n v o l t
VB =0.7; // i n v o l t ( For S i )
ETA =0.6; // i n t r i n s i c s t a n d o f f r a t i o
// P a r t ( i )
StandOffVoltage = ETA * VBB ; // i n v o l t
disp ( StandOffVoltage , Stand O f f V o l t a g e i n v o l t s : )
;
12 // P a r t ( i i )
13 VP = ETA * VBB + VB ; // i n v o l t s
14 disp ( VP , Peak p o i n t V o l t a g e i n v o l t s : ) ;
1
2
3
4
5
6
7
8
9
10
11
71
1
2
3
4
5
6
7
8
9
10
11
12
// Exa 9 . 2
clc ;
clear ;
close ;
// Given d a t a :
VP =10; // i n v o l t
R =100; // i n Kohm
C =1000; // i n pF
VBB =20; // i n V o l t s
ETA = VP / VBB ; // i n t r i n s i c s t a n d o f f r a t i o
T = R *10^3* C *10^ -12* log (1/(1 - ETA ) ) ; // i n s e c
disp ( T *10^6 , Time p e r i o d o f s a w t o o t h wave i n m i r o
seconds : )
// Exa 9 . 3
clc ;
clear ;
close ;
// Given d a t a :
RBB =10; // i n Kohm
ETA =0.6; // i n t r i n s i c s t a n d o f f r a t i o
RB1 = ETA * RBB ; // i n Kohm
RB2 = RBB - RB1 ; // i n Kohm
disp ( RB1 , R e s i s t a n c e RB1 i n Kohm : ) ;
disp ( RB2 , R e s i s t a n c e RB2 i n Kohm : ) ;
72
Chapter 11
Multivibrators
// Exa 1 1 . 1
clc ;
clear ;
close ;
// Given d a t a
R1 =15; // i n kohm
R2 =15; // i n kohm
C1 =0.005; // i n uF
C2 =0.005; // i n uF
R = R1 ; // i n Kohm
C = C1 ; // i n uF
T =0.69*( R *10^3* C *10^ -6+ R *10^3* C *10^ -6) ; // i n s e c o n d
f =1/ T ; // i n Hz
disp ( f *10^ -3 , F r e q u e n c y o f o s c i l l a t o r s i n KHz : ) ;
73