Scilab Textbook Companion for
Basic Electronics And Linear Circuits
by N. N. Bhargava, D. C. Kulshreshtha And S.
C. Gupta
1
Created by
Mohammad Faisal Siddiqi
B.Tech (pursuing)
Electronics Engineering
Jamia Millia Islamia, New Delhi
College Teacher
Dr. Sajad A. Loan
Cross-Checked by
TechPassion
August 10, 2013
1Funded 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: Basic Electronics And Linear Circuits
Author: N. N. Bhargava, D. C. Kulshreshtha And S. C. Gupta Publisher: Tata McGraw - Hill Education, New Delhi
Edition: 1 Year: 2008
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 4
1 INTRODUCTION TO ELECTRONICS 8
2 CURRENT AND VOLTAGE SOURCES 10
4 SEMICONDUCTOR DIODE 14
5 TRANSISTORS 20
6 VACUUM TUBES 27
7 TRANSISTOR BIASING AND STABILIZATION OF
OP-ERATING POINT 32
8 SMALL SIGNAL AMPLIFIERS 46
9 MULTI STAGE AMPLIFIERS 53
10 POWER AMPLIFIERS 61
11 TUNED VOLTAGE AMPLIFIERS 64
12 FEEDBACK IN AMPLIFIERS 69
13 OSCILLATORS 73
List of Scilab Codes
Exa 1.1 Resistor Range Calculation using Colour Band Sequence 8
Exa 1.2 Resistor Range Calculation using Colour Band Sequence 9
Exa 2.1 Equivalent Current Source Representation . . . 10
Exa 2.2 Equivalent Voltage Source Representation . . . 11
Exa 2.3 Current Determination using Voltage Source and Cur-rent Source Representations . . . 11
Exa 2.4 Output Voltage Determination . . . 12
Exa 4.1 DC Voltage and PIV Calculation . . . 14
Exa 4.2 DC Voltage and PIV Calculation . . . 15
Exa 4.3.a Peak Value of Current Calculation . . . 15
Exa 4.3.b DC or Average Value of Current Calculation . . . 16
Exa 4.3.c RMS Value of Current Calculation . . . 16
Exa 4.3.d Ripple Factor Determination . . . 17
Exa 4.3.e Rectification Efficiency Calculation . . . 17
Exa 4.4 Maximum Permissible Current Determination . . . 18
Exa 4.5 Capacitance Determination on changing Bias Voltage . 19 Exa 5.1 Collector and Base Currents Calculation . . . 20
Exa 5.2 Dynamic Input Resistance Determination . . . 20
Exa 5.3 Short Circuit Current Gain Determination . . . 21
Exa 5.4.a Common Base Short Circuit Current Gain Calculation 22 Exa 5.4.b Common Emitter Short Circuit Current Gain Calcula-tion . . . 22
Exa 5.5 DC Current Gain in Common Base Configuration. . . 23
Exa 5.6 Determination of Dynamic Output Resistance and AC and DC Current Gains. . . 23
Exa 5.7 Q Point Determination . . . 24
Exa 5.8 Calculation of Dynamic Drain Resistance of JFET . . 25
Exa 6.2 Plotting of Static Plate Characteristics . . . 29
Exa 7.1 Calculate Ic and Vce for given Circuit . . . 32
Exa 7.2 Calculate coordinates of Operating Point . . . 33
Exa 7.3 Quiescent Operating Point Determination . . . 34
Exa 7.4.a Calculate value of Resistance Rb . . . 35
Exa 7.4.b Calculation of Collector Current Ic . . . 36
Exa 7.5 Calculation of Ie and Vc in the Circuit . . . 36
Exa 7.6 Calculate Minimum and Maximum Collector Currents 37 Exa 7.7 Calculate Values of the three Currents . . . 38
Exa 7.8 Calculate Minimum and Maximum Ie and correspond-ing Vce . . . 38
Exa 7.9 Determine the new Q Points . . . 40
Exa 7.10 Calculate the value of Rb . . . 41
Exa 7.11 Calculate DC bias Voltages and Currents . . . 42
Exa 7.12 Calculate Re and Vce in the Circuit . . . 42
Exa 7.13 Calculate Ic and Vce for given Circuit . . . 43
Exa 7.14 Calculate Ic and Vce for given Circuit . . . 44
Exa 8.1 Determination of Hybrid Parameters . . . 46
Exa 8.2.a Calculation of Input Impedance of Amplifier. . . 47
Exa 8.2.b Calculation of Voltage Gain of Amplifier . . . 47
Exa 8.2.c Calculation of Current Gain of Amplifier . . . 48
Exa 8.3.a Calculation of Voltage Gain of Amplifier . . . 48
Exa 8.3.b Calculation of Input Impedance of Amplifier. . . 49
Exa 8.3.c Calculation of Q Point Parameters of Amplifier . . . . 49
Exa 8.4 Calculation of Voltage Gain of Amplifier . . . 50
Exa 8.5 Calculation of Gain of Single Stage Amplifier . . . 51
Exa 8.6 Calculation of Output Signal Voltage of FET Amplifier 51 Exa 9.1 Calculate overall Voltage Gain in dB . . . 53
Exa 9.2 Calculate Voltage at the Output Terminal . . . 53
Exa 9.3 To Plot the Frequency Response Curve . . . 54
Exa 9.4.a Calculate Input Impedance of Two Stage RC Coupled Amplifier . . . 57
Exa 9.4.b Calculate Ouput Impedance of Two Stage RC Coupled Amplifier . . . 57
Exa 9.4.c Calculate Voltage Gain of Two Stage RC Coupled Am-plifier . . . 58
Exa 9.5 Calculate Maximum Voltage Gain and Bandwidth of Triode Amplifier . . . 59
Exa 10.1 Calculation of Transformer Turns Ratio . . . 61
Exa 10.2 Calculation of Effective Resistance seen at Primary . . 61
Exa 10.3.a Calculation of 2nd 3rd and 4th Harmonic Distortions . 62
Exa 10.3.b Percentage Increase in Power because of Distortion . . 63
Exa 11.1.a Calculation of Resonant Frequency . . . 64
Exa 11.1.b Calculation of Impedance at Resonance . . . 64
Exa 11.1.c Calculation of Current at Resonance . . . 65
Exa 11.1.d Calculation of Voltage across each Component . . . . 66
Exa 11.2 Calculation of Parameters of the Resonant Circuit at Resonance . . . 66
Exa 11.3 Calculation of Impedance Q and Bandwidth of Reso-nant Circuit . . . 67
Exa 12.1 Calculation of Gain of Negative Feedback Amplifier . . 69
Exa 12.2 Calculation of Internal Gain and Feedback Gain . . . 69
Exa 12.3 Calculation of change in overall Gain of Feedback Am-plifier . . . 70
Exa 12.4 Calculation of Input Impedance of the Feedback Ampli-fier . . . 71
Exa 12.5 Calculation of Feedback Factor and Percent change in overall Gain. . . 71
Exa 13.1 Calculate Frequency of Oscillation of Tuned Collector Oscillator . . . 73
Exa 13.2 Calculate Frequency of Oscillation of Phase Shift Oscil-lator . . . 73
Exa 13.3 Calculate Frequency of Oscillation of Wein Bridge Os-cillator . . . 74
Exa 14.1 Caculation of Series Resistance for coversion to Voltmeter 75
Exa 14.2 Calculation of Shunt Resistance . . . 76
Exa 14.3 Designing of a Universal Shunt for making a Multi Range Milliammeter . . . 76
Exa 14.4 Determination of Peak and RMS AC Voltage . . . 78
Exa 14.5 Determination of Magnitude and Frequency of Voltage Fed to Y Input . . . 78
List of Figures
6.1 Dynamic Plate Resistance of the Diode Determination . . . 28
6.2 Plotting of Static Plate Characteristics . . . 29
9.1 To Plot the Frequency Response Curve . . . 55
14.1 Determination of Magnitude and Frequency of Voltage Fed to Y Input . . . 79
Chapter 1
INTRODUCTION TO
ELECTRONICS
Scilab code Exa 1.1 Resistor Range Calculation using Colour Band Se-quence
1 // Example 1 . 1
2 // Program t o f i n d Range o f a R e s i s t o r s o a s t o s a t i s f y m a n u f a c t u r e r ’ s T o l e r a n c e s
3 // C o l o u r Band S e q u e n c e : YELLOW, VIOLET , ORANGE, GOLD
4 c l e a r all;
5 clc ;
6 c l o s e ;
7 A =4;//NUMERICAL CODE FOR BAND YELLOW
8 B =7;//NUMERICAL CODE FOR BAND VIOLET
9 C =3;//NUMERICAL CODE FOR BAND ORANGE
10 D =5;//TOLERANCE VALUE FOR BAND GOLD i . e . 5%
11 // R e s i s t o r V a l u e C a l c u l a t i o n 12 R =( A *10+ B ) *10^ C ; 13 // T o l e r a n c e V a l u e C a l u l a t i o n 14 T = D * R / 1 0 0 ; 15 R1 = R - T ; 16 R2 = R + T ;
18 p r i n t f( ” \ n \ n \ t R e s i s t o r V a l u e i s %f kOhms +− %f p e r c e n t . ” ,R /1000 , D ) ;
19 p r i n t f( ” \ n \ n \ t R e s i s t o r V a l u e i s %f kOhms +− %f kOhms . ” ,R /1000 , T /1000) ;
20 p r i n t f( ” \ n \ n \ t Range o f V a l u e s o f t h e R e s i s t o r i s %f kOhms & %f kOhms . ” , R1 /1000 , R2 /1000) ;
Scilab code Exa 1.2 Resistor Range Calculation using Colour Band Se-quence
1 // Example 1 . 2
2 // Program t o f i n d Range o f a R e s i s t o r s o a s t o s a t i s f y m a n u f a c t u r e r ’ s T o l e r a n c e s
3 // C o l o u r Band S e q u e n c e : GRAY, BLUE , GOLD, GOLD
4 c l e a r all;
5 clc ;
6 c l o s e ;
7 A =8;//NUMERICAL CODE FOR BAND GRAY
8 B =6;//NUMERICAL CODE FOR BAND BLUE
9 C = -1;//NUMERICAL CODE FOR BAND GOLD
10 D =5;//TOLERANCE VALUE FOR BAND GOLD i . e . 5%
11 // R e s i s t o r V a l u e C a l c u l a t i o n 12 R =( A *10+ B ) *10^ C ; 13 // T o l e r a n c e V a l u e C a l u l a t i o n 14 T = D * R / 1 0 0 ; 15 R1 = R - T ; 16 R2 = R + T ;
17 // D i s p l a y i n g The R e s u l t s i n Command Window
18 p r i n t f( ” \ n \ n \ t R e s i s t o r V a l u e i s %f Ohms +− %f p e r c e n t . ” ,R , D ) ;
19 p r i n t f( ” \ n \ n \ t R e s i s t o r V a l u e i s %f Ohms +− %f Ohms . ” ,R , T ) ;
20 p r i n t f( ” \ n \ n \ t Range o f V a l u e s o f t h e R e s i s t o r i s %f Ohms & %f Ohms . ” ,R1 , R2 ) ;
Chapter 2
CURRENT AND VOLTAGE
SOURCES
Scilab code Exa 2.1 Equivalent Current Source Representation
1 // Example 2 . 1 2 // Program t o O b t a i n E q u i v a l e n t C u r r e n t S o u r c e R e p r e s e n t a i o n f r o m G i v e n V o l t a g e S o u r c e R e p r e s e n t a t i o n 3 c l e a r all; 4 clc ; 5 c l o s e ; 6 // V o l t a g e S o u r c e o r T h e v e n i n ’ s R e p r e s e n t a i o n ( S e r i e s V o l t a g e S o u r c e & R e s i s t o r ) 7 Vs =2; // V o l t s 8 Rs =1; //Ohm 9 // C u r r e n t S o u r c e o r Norton ’ s R e p r e s e n t a i o n ( P a r a l l e l C u r r e n t S o u r c e & R e s i s t o r ) 10 Is = Vs / Rs ; // Amperes
11 // D i s p l a y i n g The R e s u l t s i n Command Window
12 p r i n t f( ” \ n \ n \ t The S h o r t C i r c u i t C u r r e n t V a l u e i s %f Amperes . ” , Is ) ;
13 p r i n t f( ” \ n \ n \ t The S o u r c e I m p e d e n c e V a l u e i s %f Ohm . ” , Rs ) ;
14 p r i n t f( ” \ n \ n \ t The C u r r e n t S o u r c e & S o u r c e I m p e d a n c e a r e c o n n e c t e d i n P a r a l l e l . ” ) ;
Scilab code Exa 2.2 Equivalent Voltage Source Representation
1 // Example 2 . 2 2 // Program t o O b t a i n E q u i v a l e n t V o l t a g e S o u r c e R e p r e s e n t a i o n f r o m G i v e n C u r r e n t S o u r c e R e p r e s e n t a t i o n 3 c l e a r all; 4 clc ; 5 c l o s e ; 6 // C u r r e n t S o u r c e o r Norton ’ s R e p r e s e n t a i o n ( P a r a l l e l C u r r e n t S o u r c e & R e s i s t o r ) 7 Is = 0 . 2 ; // Amperes 8 Zs = 1 0 0 ; //Ohms 9 // V o l t a g e S o u r c e o r T h e v e n i n ’ s R e p r e s e n t a i o n ( S e r i e s V o l t a g e S o u r c e & R e s i s t o r ) 10 Vs = Is * Zs ; // V o l t s
11 // D i s p l a y i n g The R e s u l t s i n Command Window
12 p r i n t f( ” \ n \ n \ t The Open C i r c u i t V o l t a g e i s %f V o l t s . ” , Vs ) ; 13 p r i n t f( ” \ n \ n \ t The S o u r c e I m p e d e n c e V a l u e i s %f Ohms . ” , Zs ) ; 14 p r i n t f( ” \ n \ n \ t The V o l t a g e S o u r c e & S o u r c e I m p e d a n c e a r e c o n n e c t e d i n S e r i e s . ” ) ;
Scilab code Exa 2.3 Current Determination using Voltage Source and Cur-rent Source Representations
1 // Example 2 . 3
2 // Program t o C a l c u l a t e C u r r e n t i n a Br anch by U s i n g C u r r e n t S o u r c e R e p r e s e n t a t i o n
3 // V e r i f y t h e C i r c u i t ’ s R e s u l t f o r i t s e q u i v a l e n c e w i t h V o l t a g e S o u r c e R e p r e s e n t a t i o n 4 c l e a r all; 5 clc ; 6 c l o s e ; 7 // G i v e n C i r c u i t Data 8 Is = 1 . 5 * 1 0 ^ ( - 3 ) ;// Amperes 9 Zs = 2 * 1 0 ^ 3 ;//Ohms 10 Z1 = 1 0 * 1 0 ^ 3 ;//Ohms 11 Z2 = 4 0 * 1 0 ^ 3 ;//Ohms 12 // C a l c u l a t i o n f o r C u r r e n t S o u r c e R e p r e s e n t a t i o n 13 Zl = Z1 * Z2 /( Z1 + Z2 ) ; 14 I2 = Is * Zs /( Zs + Zl ) ; 15 I4I = I2 * Z1 /( Z1 + Z2 ) ;// U s i n g C u r r e n t D i v i d e r R u l e 16 // C a l c u l a t i o n f o r C u r r e n t S o u r c e R e p r e s e n t a t i o n 17 Vs = Is * Zs ;// Open C i r c u i t V o l a t g e 18 I = Vs /( Zs + Zl ) ; 19 I4V = I * Z1 /( Z1 + Z2 ) ;// U s i n g C u r r e n t D i v i d e r R u l e
20 // D i s p l a y i n g The R e s u l t s i n Command Window
21 p r i n t f( ” \ n \ n \ t The Load C u r r e n t u s i n g C u r r e n t S o u r c e R e p r e s e n t a i o n i s I 4 I = %f Amperes . ” , I4I ) ;
22 p r i n t f( ” \ n \ n \ t The Load C u r r e n t u s i n g V o l t a g e S o u r c e R e p r e s e n t a i o n i s I4V = %f Amperes . ” , I4V ) ;
23 if I4I == I4V then
24 p r i n t f( ” \ n \ n \ t Both R e s u l t s a r e E q u i v a l e n t . ” ) ;
25 else
26 p r i n t f( ” \ n \ n \ t Both R e s u l t s a r e Not E q u i v a l e n t . ” ) ;
27 end;
Scilab code Exa 2.4 Output Voltage Determination
1 // Example 2 . 4
2 // Program t o O b t a i n Output V o l t a g e Vo f r o m G i v e n A . C . E q u i v a l e n t o f an A m p l i f i e r u s i n g a T r a n s i s t o r
4 clc ; 5 c l o s e ; 6 // G i v e n C i r c u i t Data 7 // I n p u t S i d e 8 Vs = 1 0 * 1 0 ^ ( - 3 ) ;// i . e . 10 mV 9 Rs = 1 * 1 0 ^ 3 ;// i . e . 1 kOhms 10 // Output S i d e 11 Ro1 = 2 0 * 1 0 ^ 3 ;// i . e . 20 kOhms 12 Ro2 = 2 * 1 0 ^ 3 ;// i . e . 2 kOhms 13 // C a l c u l a t i o n 14 i = Vs / Rs ;// I n p u t C u r r e n t 15 Io = 1 0 0 * i ;// Output C u r r e n t
16 Il = Io * Ro1 /( Ro1 + Ro2 ) ;// U s i n g C u r r e n t D i v i d e r R u l e
17 Vo = Il * Ro2 ;// Output V o l a t g e
18 // D i s p l a y i n g The R e s u l t s i n Command Window
Chapter 4
SEMICONDUCTOR DIODE
Scilab code Exa 4.1 DC Voltage and PIV Calculation
1 // Example 4 . 1 2 // Program t o d e t e r m i n e DC V o l t a g e a c r o s s t h e l o a d and PIV o f t h e D i o d e 3 c l e a r all; 4 clc ; 5 c l o s e ; 6 // G i v e n C i r c u i t Data 7 Vrms = 2 2 0 ; // V o l t s 8 n2 =1; // A s s u m p t i o n 9 n1 =12* n2 ; // Turns R a t i o 10 // C a l c u l a t i o n 11 Vp =sqrt(2) * Vrms ;//Maximum ( Peak ) P r i m a r y V o l t a g e 12 Vm = n2 * Vp / n1 ;//Maximum S e c o n d a r y V o l t a g e 13 Vdc = Vm / %pi ;//DC l o a d V o l t a g e
14 // D i s p l a y i n g The R e s u l t s i n Command Window
15 p r i n t f( ” \ n \ t The DC l o a d V o l t a g e i s = %f V . ” , Vdc ) ;
16 p r i n t f( ” \ n \ t The Peak I n v e r s e V o l t a g e ( PIV ) i s = %f V . ” , Vm ) ;
Scilab code Exa 4.2 DC Voltage and PIV Calculation 1 // Example 4 . 2 2 // Program t o d e t e r m i n e DC V o l t a g e a c r o s s t h e l o a d and PIV o f t h e 3 // C e n t r e Tap R e c t i f i e r and B r i d g e R e c t i f i e r 4 c l e a r all; 5 clc ; 6 c l o s e ; 7 // G i v e n C i r c u i t Data 8 Vrms = 2 2 0 ; // V o l t s 9 n2 =1; // A s s u m p t i o n 10 n1 =12* n2 ; // Turns R a t i o 11 // C a l c u l a t i o n 12 Vp =sqrt(2) * Vrms ;//Maximum ( Peak ) P r i m a r y V o l t a g e 13 Vm = n2 * Vp / n1 ;//Maximum S e c o n d a r y V o l t a g e 14 Vdc =2* Vm / %pi ;//DC l o a d V o l t a g e
15 // D i s p l a y i n g The R e s u l t s i n Command Window
16 p r i n t f( ” \ n \ t The DC l o a d V o l t a g e i s = %f V . ” , Vdc ) ;
17 p r i n t f( ” \ n \ t The Peak I n v e r s e V o l t a g e ( PIV ) o f B r i d g e R e c t i f i e r i s = %f V . ” , Vm ) ;
18 p r i n t f( ” \ n \ t The Peak I n v e r s e V o l t a g e ( PIV ) o f C e n t r e −t a p R e c t i f i e r i s = %f V . ” ,2* Vm ) ;
Scilab code Exa 4.3.a Peak Value of Current Calculation
1 // Example 4 . 3 ( a ) 2 // Program t o d e t e r m i n e t h e Peak V a l u e o f C u r r e n t 3 c l e a r all; 4 clc ; 5 c l o s e ; 6 // G i v e n C i r c u i t Data 7 Rl = 1 * 1 0 ^ ( 3 ) ;//Ohms 8 rd =10;//Ohms 9 Vm = 2 2 0 ; // V o l t s ( Peak V a l u e o f V o l t a g e )
10 // C a l c u l a t i o n
11 Im = Vm /( rd + Rl ) ;// Peak V a l u e o f C u r r e n t
12 // D i s p l a y i n g The R e s u l t s i n Command Window
13 p r i n t f( ” \ n \ t The Peak V a l u e o f C u r r e n t i s = %f mA . ” , Im /10^( -3) ) ;
Scilab code Exa 4.3.b DC or Average Value of Current Calculation
1 // Example 4 . 3 ( b ) 2 // Program t o d e t e r m i n e t h e DC o r A v e r a g e V a l u e o f C u r r e n t 3 c l e a r all; 4 clc ; 5 c l o s e ; 6 // G i v e n C i r c u i t Data 7 Rl = 1 * 1 0 ^ ( 3 ) ;//Ohms 8 rd =10;//Ohms 9 Vm = 2 2 0 ; // V o l t s ( Peak V a l u e o f V o l t a g e ) 10 // C a l c u l a t i o n 11 Im = Vm /( rd + Rl ) ;// Peak V a l u e o f C u r r e n t 12 Idc =2* Im / %pi ;//DC V a l u e o f C u r r e n t
13 // D i s p l a y i n g The R e s u l t s i n Command Window
14 p r i n t f( ” \ n \ t The DC o r A v e r a g e V a l u e o f C u r r e n t i s = %f mA . ” , Idc /10^( -3) ) ;
Scilab code Exa 4.3.c RMS Value of Current Calculation
1 // Example 4 . 3 ( c ) 2 // Program t o d e t e r m i n e t h e RMS V a l u e o f C u r r e n t 3 c l e a r all; 4 clc ; 5 c l o s e ; 6 // G i v e n C i r c u i t Data
7 Rl = 1 * 1 0 ^ ( 3 ) ; //Ohms 8 rd =10; //Ohms 9 Vm = 2 2 0 ; // V o l t s ( Peak V a l u e o f V o l t a g e ) 10 // C a l c u l a t i o n 11 Im = Vm /( rd + Rl ) ;// Peak V a l u e o f C u r r e n t 12 Irms = Im /sqrt(2) ;//RMS V a l u e o f C u r r e n t
13 // D i s p l a y i n g The R e s u l t s i n Command Window
14 p r i n t f( ” \ n \ t The RMS V a l u e o f C u r r e n t i s = %f mA . ” , Irms /10^( -3) ) ;
Scilab code Exa 4.3.d Ripple Factor Determination
1 // Example 4 . 3 ( d ) 2 // Program t o d e t e r m i n e t h e R i p p l e F a c t o r o f C e n t r e − t a p F u l l Wave R e c t i f i e r 3 c l e a r all; 4 clc ; 5 c l o s e ; 6 // G i v e n C i r c u i t Data 7 Rl = 1 * 1 0 ^ ( 3 ) ; //Ohms 8 rd =10; //Ohms 9 Vm = 2 2 0 ; // V o l t s ( Peak V a l u e o f V o l t a g e ) 10 // C a l c u l a t i o n 11 Im = Vm /( rd + Rl ) ;// Peak V a l u e o f C u r r e n t 12 Idc =2* Im / %pi ;//DC V a l u e o f C u r r e n t 13 Irms = Im /sqrt(2) ;//RMS V a l u e o f C u r r e n t 14 r =sqrt(( Irms / Idc ) ^2 -1)// R i p p l e F a c t o r
15 // D i s p l a y i n g The R e s u l t s i n Command Window
16 p r i n t f( ” \ n \ t The R i p p l e F a c t o r r = %f . ” ,r ) ;
Scilab code Exa 4.3.e Rectification Efficiency Calculation
2 // Program t o d e t e r m i n e t h e R e c t i f i c a t i o n E f f i c i e n c y o f C e n t r e −t a p F u l l Wave R e c t i f i e r 3 c l e a r all; 4 clc ; 5 c l o s e ; 6 // G i v e n C i r c u i t Data 7 Rl = 1 * 1 0 ^ ( 3 ) ; //Ohms 8 rd =10; //Ohms 9 Vm = 2 2 0 ; // V o l t s ( Peak V a l u e o f V o l t a g e ) 10 // C a l c u l a t i o n 11 Im = Vm /( rd + Rl ) ;// Peak V a l u e o f C u r r e n t 12 Idc =2* Im / %pi ;//DC V a l u e o f C u r r e n t 13 Irms = Im /sqrt(2) ;//RMS V a l u e o f C u r r e n t 14 Pdc = Idc ^2* Rl ; 15 Pac = Irms ^2*( rd + Rl ) ; 16 n = Pdc / Pac ;// R e c t i f i c a t i o n E f f i c i e n c y
17 // D i s p l a y i n g The R e s u l t s i n Command Window
18 p r i n t f( ” \ n \ t The R e c t i f i c a t i o n E F f i c i e n c y n ( e e t a ) = %f p e r c e n t . ” ,n *100) ;
Scilab code Exa 4.4 Maximum Permissible Current Determination
1 // Example 4 . 4 2 // Program t o d e t e r m i n e Maximum C u r r e n t t h e G i v e n Z e n e r D i o d e c a n h a n d l e 3 c l e a r all; 4 clc ; 5 c l o s e ; 6 // G i v e n C i r c u i t Data 7 Vz = 9 . 1 ; // V o l t s 8 P = 3 6 4 * 1 0 ^ ( - 3 ) ; // Watts 9 // C a l c u l a t i o n 10 Iz = P / Vz ;
11 // D i s p l a y i n g The R e s u l t s i n Command Window
max ) = %f mA . ” , Iz /10^( -3) ) ;
Scilab code Exa 4.5 Capacitance Determination on changing Bias Voltage
1 // Example 4 . 5 2 // Program t o d e t e r m i n e C a p a c i t a n c e o f V a r a c t o r D i o d e i f t h e 3 // R e v e r s e −B i a s V o l t a g e i s i n c r e a s e d f r o m 4V t o 8V 4 c l e a r all; 5 clc ; 6 c l o s e ; 7 // G i v e n C i r c u i t Data 8 Ci = 1 8 * 1 0 ^ ( - 1 2 ) ;// i . e . 18 pF 9 Vi =4; // V o l t s 10 Vf =8; // V o l t s 11 // C a l c u l a t i o n 12 K = Ci *sqrt( Vi ) ; 13 Cf = K /sqrt( Vf ) ;
14 // D i s p l a y i n g The R e s u l t s i n Command Window
15 p r i n t f( ” \ n \ t The F i n a l V a l u e o f C a p a c i t a n c e i s C = %f pF . ” , Cf /10^( -12) ) ;
Chapter 5
TRANSISTORS
Scilab code Exa 5.1 Collector and Base Currents Calculation
1 // Example 5 . 1 2 // Program t o C a l c u l a t e C o l l e c t o r and B a s e C u r r e n t s 3 c l e a r all; 4 clc ; 5 c l o s e ; 6 // G i v e n C i r c u i t Data 7 a l p h a = 0 . 9 8 ; // a l p h a ( dc ) 8 Ico = 1 * 1 0 ^ ( - 6 ) ; // Ampere 9 Ie = 1 * 1 0 ^ ( - 3 ) ; // Ampere 10 // C a l c u l a t i o n 11 Ic = a l p h a * Ie + Ico ; // C o l l e c t o r C u r r e n t 12 Ib = Ie - Ic ; // B a s e C u r r e n t
13 // D i s p l a y i n g The R e s u l t s i n Command Window
14 p r i n t f( ” \ n \ t The C o l l e c t o r C u r r e n t i s I c= %f mA . ” , Ic /10^( -3) ) ;
15 p r i n t f( ” \ n \ t The B a s e C u r r e n t i s I b= %f uA . ” , Ib /10^( -6) ) ;
1 // Example 5 . 2 2 // Program t o D e t e r m i n e Dynamic I n p u t R e s i s t a n c e o f t h e T r a n s i s t o r a t // t h e p o i n t : I e = 0 . 5 mA and Vcb= −10 V . 3 c l e a r all; 4 clc ; 5 c l o s e ; 6 // From t h e I n p u t C h a r a c t e r i s t i c s 7 dIe = ( 0 . 7 - 0 . 3 ) *10^( -3) ; //A 8 dVeb = ( 0 . 7 - 0 . 6 2 ) ; //V 9 // C a l c u l a t i o n
10 ri = dVeb / dIe ; // Dynamic I n p u t R e s i s t a n c e a t Vcb= −10 V
11 // D i s p l a y i n g The R e s u l t s i n Command Window
12 p r i n t f( ” \ n \ t The Dynamic I n p u t R e s i s t a n c e i s r i = %f Ohms . ” , ri ) ;
Scilab code Exa 5.3 Short Circuit Current Gain Determination
1 // Example 5 . 3 2 // Program t o D e t e r m i n e S h o r t C i r c u i t C u r r e n t Gain o f t h e T r a n s i s t o r 3 c l e a r all; 4 clc ; 5 c l o s e ; 6 // G i v e n Data 7 dIe = 1 * 1 0 ^ ( - 3 ) ; //A 8 dIc = 0 . 9 9 * 1 0 ^ ( - 3 ) ; //A 9 // C a l c u l a t i o n
10 hfb = dIc / dIe ; // S h o r t C i r c u i t C u r r e n t Gain
11 // D i s p l a y i n g The R e s u l t s i n Command Window
12 p r i n t f( ” \ n \ t The S h o r t C i r c u i t C u r r e n t Gain i s a l p h a o r h f b= %f . ” , hfb ) ;
Scilab code Exa 5.4.a Common Base Short Circuit Current Gain Calcu-lation 1 // Example 5 . 4 ( a ) 2 // Program t o D e t e r m i n e Common B a s e S h o r t C i r c u i t C u r r e n t Gain ( a l p h a ) 3 // o f t h e T r a n s i s t o r 4 c l e a r all; 5 clc ; 6 c l o s e ; 7 // G i v e n Data 8 dIe = 1 * 1 0 ^ ( - 3 ) ; //A 9 dIc = 0 . 9 9 5 * 1 0 ^ ( - 3 ) ; //A 10 // C a l c u l a t i o n
11 a l p h a = dIc / dIe ; //Common B a s e S h o r t C i r c u i t C u r r e n t Gain
12 // D i s p l a y i n g The R e s u l t s i n Command Window
13 p r i n t f( ” \ n \ t The Common B a s e S h o r t C i r c u i t C u r r e n t Gain i s a l p h a= %f . ” , alpha ) ;
Scilab code Exa 5.4.b Common Emitter Short Circuit Current Gain Cal-culation 1 // Example 5 . 4 ( b ) 2 // Program t o D e t e r m i n e Common E m i t t e r S h o r t C i r c u i t C u r r e n t Gain ( b e e t a ) 3 // o f t h e T r a n s i s t o r 4 c l e a r all; 5 clc ; 6 c l o s e ; 7 // G i v e n Data 8 dIe = 1 * 1 0 ^ ( - 3 ) ; //A
9 dIc = 0 . 9 9 5 * 1 0 ^ ( - 3 ) ; //A
10 // C a l c u l a t i o n
11 a l p h a = dIc / dIe ; //Common B a s e S h o r t C i r c u i t C u r r e n t Gain
12 b e e t a = a l p h a /(1 - a l p h a ) ; //Common E m i t t e r S h o r t C i r c u i t C u r r e n t Gain
13 // D i s p l a y i n g The R e s u l t s i n Command Window
14 p r i n t f( ” \ n \ t The Common E m i t t e r S h o r t C i r c u i t C u r r e n t Gain i s b e e t a= %f . ” , beeta ) ;
Scilab code Exa 5.5 DC Current Gain in Common Base Configuration
1 // Example 5 . 5
2 // Program t o D e t e r m i n e DC C u r r e n t Gain i n Common B a s e C o n f i g u r a t i o n 3 c l e a r all; 4 clc ; 5 c l o s e ; 6 // G i v e n Data 7 B e e t a = 1 0 0 ; 8 // C a l c u l a t i o n 9 A l p h a = B e e t a /( B e e t a +1) ; //DC C u r r e n t Gain i n Common B a s e C o n f i g u r a t i o n
10 // D i s p l a y i n g The R e s u l t s i n Command Window
11 p r i n t f( ” \ n \ t The DC C u r r e n t Gain i n Common B a s e C o n f i g u r a t i o n i s Alpha= %f . ” , Alpha ) ;
Scilab code Exa 5.6 Determination of Dynamic Output Resistance and AC and DC Current Gains
1 // Example 5 . 6
3 // Program t o D e t e r m i n e t h e Dynamic Output R e s i s t a n c e ,
4 //DC C u r r e n t Gain & AC C u r r e n t Gain f r o m g i v e n o u t p u t c h a r a c t e r i s t i c s 5 c l e a r all; 6 clc ; 7 c l o s e ; 8 // G i v e n Data 9 Vce =10; //V 10 Ib = 3 0 * 1 0 ^ ( - 6 ) ; //A 11 // C a l c u l a t i o n f r o m G i v e n Output C h a r a c t e r i s t i c s a t I b = 30uA 12 dVce = ( 1 2 . 5 - 7 . 5 ) ; //V 13 dic = ( 3 . 7 - 3 . 5 ) *10^( -3) ; //A 14 Ic = 3 . 6 * 1 0 ^ ( - 3 ) ; //A
15 ro = dVce / dic ; // Dynamic Output R e s i s t a n c e
16 B e e t a _ d c = Ic / Ib ; // DC C u r r e n t Gain
17 B e e t a _ a c = ( ( 4 . 7 - 3 . 6 ) *10^( -3) ) / ( ( 4 0 - 3 0 ) *10^( -6) ) ;//AC C u r r e n t Gain , From Graph , Bac= d e l t a ( i c ) / d e l t a ( i b )
f o r g i v e n Vce
18 // D i s p l a y i n g The R e s u l t s i n Command Window
19 p r i n t f( ” \ n \ t Dynamic Output R e s i s t a n c e , r o = %f kOhms” , ro /10^(3) ) ;
20 p r i n t f( ” \ n \ t DC C u r r e n t Gain , Bdc = %f ” , Be et a_ dc ) ;
21 p r i n t f( ” \ n \ t AC C u r r e n t Gain , Bac = %f ” , Be et a_ ac ) ;
Scilab code Exa 5.7 Q Point Determination
1 // Example 5 . 7 2 // R e f e r F i g u r e 5 . 2 7 i n t h e T e x t b o o k 3 // Program t o D e t e r m i n e t h e Q p o i n t f r o m g i v e n c o l l e c t o r c h a r a c t e r i s t i c s 4 c l e a r all; 5 clc ; 6 c l o s e ;
7 // G i v e n Data 8 Vcc =12; //V 9 Rc = 1 * 1 0 ^ ( 3 ) ; //Ohms 10 Vbb = 1 0 . 7 ; //V 11 Rb = 2 0 0 * 1 0 ^ ( 3 ) ; //Ohms 12 Vbe = 0 . 7 ; //V 13 // C a l c u l a t i o n 14 Ib =( Vbb - Vbe ) / Rb ;
15 // V a l u e o f I b comes o u t t o be 50uA . A d o t t e d Curve i s drawn f o r
16 // I b =40uA and I b =60uA . At t h e P o i n t o f I n t e r s e c t i o n :
17 Vce =6; //V
18 Ic = 6 * 1 0 ^ ( - 3 ) ; //A
19 // D i s p l a y i n g The R e s u l t s i n Command Window
20 p r i n t f( ” \ n \ t Q p o i n t : \ n \ n \ t I b = %f uA” , Ib /10^( -6) ) ;
21 p r i n t f( ” \ n \ t Vce = %f V” , Vce ) ;
22 p r i n t f( ” \ n \ t I c = %f mA” , Ic /10^( -3) ) ;
Scilab code Exa 5.8 Calculation of Dynamic Drain Resistance of JFET
1 // Example 5 . 8 2 // Program t o C a l c u l a t e Dynamic D r a i n R e s i s t a n c e o f JFET 3 c l e a r all; 4 clc ; 5 c l o s e ; 6 // G i v e n Data 7 u =80; // A m p l i f i c a t i o n F a c t o r 8 gm = 2 0 0 * 1 0 ^ ( - 6 ) ; // S , T r a n s c o n d u c t a n c e 9 // C a l c u l a t i o n 10 rd = u / gm ; // Dynamic D r a i n R e s i s t a n c e
11 // D i s p l a y i n g The R e s u l t s i n Command Window
12 p r i n t f( ” \ n \ t The Dynamic D r a i n R e s i s t a n c e o f JFET i s r d= %f kOhms . ” , rd /10^(3) ) ;
Chapter 6
VACUUM TUBES
Scilab code Exa 6.1 Dynamic Plate Resistance of the Diode Determina-tion 1 // Example 6 . 1 2 // Program t o P l o t t h e C h a r a c t e r i s t i c s and 3 // D e t e r m i n e Dynamic P l a t e R e s i s t a n c e 4 c l e a r all; 5 clc ; 6 c l o s e ; 7 // G i v e n C i r c u i t Data 8 V =[0 0.5 1 1.5 2]; //V 9 I =[0 1.6 4 6.7 9 . 8 ] ; //mA 10 // P l o t t i n g 11 plot( V , I ) ; 12 a = gca () ; 13 x l a b e l ( ’ P l a t e V o l t a g e ( i n V) ’ ) ; 14 y l a b e l ( ’ P l a t e C u r r e n t ( i n mA) ’ ) ;
15 t i t l e ( ’ STATIC CHARACTERISTIC CURVE OF THE DIODE ’ ) ;
16 // C a l c u l a t i o n
17 // V a l u e s f r o m C h a r a c t e r i s t i c P l o t
Figure 6.2: Plotting of Static Plate Characteristics
19 dIp = 2 . 7 * 1 0 ^ ( - 3 ) ; //A
20 rp = dVp / dIp ; // Dynamic P l a t e R e s i s t a n c e
21 // D i s p l a y i n g The R e s u l t s i n Command Window
22 p r i n t f( ” \ n \ t The Dynamic P l a t e R e s i s t a n c e i s r p= %f Ohms . ” , rp ) ;
Scilab code Exa 6.2 Plotting of Static Plate Characteristics
1 // Example 6 . 2
2 // Program t o P l o t t h e S t a t i c P l a t e C h a r a c t e r i s t i c s and D e t e r m i n e // P l a t e AC R e s i s t a n c e , Mutual
C o n d u c t a n c e & A m p l i f i c a t i o n F a c t o r 3 c l e a r all; 4 clc ; 5 c l o s e ; 6 // G i v e n C i r c u i t Data 7 // A l l V a l u e s E x t r a p o l a t e d t o Touch x−a x i s 8 V0 =[20 50 100 1 5 0 ] ; //V 9 V1 =[70 100 150 2 0 0 ] ; //V 10 V2 = [ 1 1 2 150 2 0 0 ] ; //V 11 V3 = [ 1 7 7 200 2 5 0 ] ; //V 12 V4 = [ 2 3 5 250 3 0 0 ] ; //V 13 I0 =[0 3.5 11.2 20]; //mA 14 I1 =[0 4 12.4 2 1 . 5 ] ; //mA 15 I2 =[0 5.4 1 4 . 1 ] ; //mA 16 I3 =[0 3.4 1 2 . 4 ] ; //mA 17 I4 =[0 2.5 1 1 . 3 ] ; //mA 18 // P l o t t i n g 19 plot( V0 , I0 ) ; 20 plot( V1 , I1 ) ; 21 plot( V2 , I2 ) ; 22 plot( V3 , I3 ) ; 23 plot( V4 , I4 ) ; 24 a = gca () ; 25 x l a b e l ( ’ P l a t e V o l t a g e ( i n V) ’ ) ; 26 y l a b e l ( ’ P l a t e C u r r e n t ( i n mA) ’ ) ;
27 t i t l e ( ’ STATIC PLATE CHARACTERISTIC CURVE OF THE TRIODE ’ ) ; 28 // C a l c u l a t i o n 29 // V a l u e s f r o m C h a r a c t e r i s t i c P l o t 30 dip = ( 1 4 . 0 - 1 0 . 7 ) *10^( -3) ;//A 31 dvp =20;//V 32 rp = dvp / dip ; 33 diP = ( 1 2 . 4 - 5 . 3 ) *10^( -3) ;//A 34 dvG =1;//V 35 gm = diP / dvG ; 36 u = gm * rp ; 37 ut = ( 1 9 2 - 1 5 0 ) /1;
39 p r i n t f( ” \ n \ t The P l a t e AC R e s i s t a n c e i s r p= %f kOhms . ” , rp /10^(3) ) ; 40 p r i n t f( ” \ n \ t The Mutual C o n d u c t a n c e i s gm= %f mS . ” , gm /10^( -3) ) ; 41 p r i n t f( ” \ n \ t The G r a p h i c a l A m p l i f i c a t i o n F a c t o r i s u = %f . ” ,u ) ; 42 p r i n t f( ” \ n \ t The T h e o r e t i c a l A m p l i f i c a t i o n F a c t o r i s u t= %f . ” , ut ) ;
Chapter 7
TRANSISTOR BIASING AND
STABILIZATION OF
OPERATING POINT
Scilab code Exa 7.1 Calculate Ic and Vce for given Circuit
1 // Example 7 . 1 2 // Program t o C a l c u l a t e 3 // ( a ) C o l l e c t o r C u r r e n t 4 // ( b ) C o l l e c t o r −t o −E m i t t e r V o l t a g e 5 c l e a r all; 6 clc ; 7 c l o s e ; 8 // G i v e n C i r c u i t Data 9 Vcc =9; //V 10 Rb = 3 0 0 * 1 0 ^ 3 ; //Ohms 11 Rc = 2 * 1 0 ^ 3 ; //Ohms 12 B e e t a =50; 13 // C a l c u l a t i o n 14 Ib =( Vcc ) / Rb ; 15 Ic = B e e t a * Ib ; 16 I c s a t = Vcc / Rc ; 17 Vce = Vcc - Ic * Rc ;
18 // D i s p l a y i n g The R e s u l t s i n Command Window 19 p r i n t f( ” The d i f f e r e n t P a r a m e t e r s a r e \ n \ t I b = %f uA . ” , Ib /10^( -6) ) ; 20 if Ic < I c s a t then 21 disp( ” T r a n s i s t o r i s n o t i n S a t u r a t i o n ” ) ; 22 p r i n t f( ” \ n \ t I c = %f mA . ” , Ic /10^( -3) ) ; 23 p r i n t f( ” \ n \ t Vce = %f V . ” , Vce ) ; 24 else 25 disp( ” T r a n s i s t o r i s i n S a t u r a t i o n ” ) ; 26 p r i n t f( ” \ n \ t I c = %f mA . ” , Icsat /10^( -3) ) ; 27 p r i n t f( ” \ n \ t Vce = %f V . ” ,0) ; 28 end
Scilab code Exa 7.2 Calculate coordinates of Operating Point
1 // Example 7 . 2 2 // Program t o C a l c u l a t e O p e r a t i n g P o i n t C o o r d i n a t e s o f t h e C i r c u i t 3 c l e a r all; 4 clc ; 5 c l o s e ; 6 // G i v e n C i r c u i t Data 7 Vcc =10; //V 8 Rb = 1 0 0 * 1 0 ^ 3 ; //Ohms 9 Rc = 1 * 1 0 ^ 3 ; //Ohms 10 B e e t a =60; 11 // C a l c u l a t i o n 12 Ib =( Vcc ) / Rb ; 13 Ic = B e e t a * Ib ; 14 I c s a t = Vcc / Rc ; 15 Vce = Vcc - Ic * Rc ;
16 // D i s p l a y i n g The R e s u l t s i n Command Window
17 p r i n t f( ” The O p e r a t i n g P o i n t C o o r d i n a t e s o f t h e C i r c u i t a r e : \ n \ t I b = %f uA . ” , Ib /10^( -6) ) ;
19 disp( ” T r a n s i s t o r i s n o t i n S a t u r a t i o n ” ) ; 20 p r i n t f( ” \ n \ t I c = %f mA . ” , Ic /10^( -3) ) ; 21 p r i n t f( ” \ n \ t Vce = %f V . ” , Vce ) ; 22 else 23 disp( ” T r a n s i s t o r i s i n S a t u r a t i o n ” ) ; 24 p r i n t f( ” \ n \ t I c = %f mA . ” , Icsat /10^( -3) ) ; 25 p r i n t f( ” \ n \ t Vce = %f V . ” ,0) ; 26 end
Scilab code Exa 7.3 Quiescent Operating Point Determination
1 // Example 7 . 3 2 // Program t o C a l c u l a t e O p e r a t i n g P o i n t C o o r d i n a t e s o f t h e C i r c u i t 3 c l e a r all; 4 clc ; 5 c l o s e ; 6 // G i v e n C i r c u i t Data 7 Vcc =10; //V 8 Rb = 1 0 0 * 1 0 ^ 3 ; //Ohms 9 Rc = 1 * 1 0 ^ 3 ; //Ohms 10 B e e t a = 1 5 0 ; 11 // C a l c u l a t i o n 12 Ib =( Vcc ) / Rb ; 13 Ic = B e e t a * Ib ; 14 I c s a t = Vcc / Rc ; 15 Vce = Vcc - Ic * Rc ;
16 // D i s p l a y i n g The R e s u l t s i n Command Window
17 p r i n t f( ” The O p e r a t i n g P o i n t C o o r d i n a t e s o f t h e C i r c u i t a r e : \ n \ t I b = %f uA . ” , Ib /10^( -6) ) ; 18 if Ic < I c s a t then 19 disp( ” T r a n s i s t o r i s n o t i n S a t u r a t i o n ” ) ; 20 p r i n t f( ” \ n \ t I c = %f mA . ” , Ic /10^( -3) ) ; 21 p r i n t f( ” \ n \ t Vce = %f V . ” , Vce ) ; 22 else
23 disp( ” T r a n s i s t o r i s i n S a t u r a t i o n ” ) ;
24 p r i n t f( ” \ n \ t I c = %f mA . ” , Icsat /10^( -3) ) ;
25 p r i n t f( ” \ n \ t Vce = %f V . ” ,0) ;
26 end
Scilab code Exa 7.4.a Calculate value of Resistance Rb
1 // Example 7 . 4 ( a ) 2 // Program t o C a l c u l a t e V a l u e o f Rb i n t h e B i a s i n g C i r c u i t 3 c l e a r all; 4 clc ; 5 c l o s e ; 6 // G i v e n C i r c u i t Data 7 Vcc =6; //V 8 Vbe = 0 . 3 ; //V 9 Icbo = 2 * 1 0 ^ ( - 6 ) ; //A 10 Ic = 1 * 1 0 ^ ( - 3 ) ; //A 11 B e e t a =20; 12 // C a l c u l a t i o n 13 // C a s e 1 : C o n s i d e r i n g I c b o and Vbe i n t h e c a l c u l a t i o n s 14 Ib =( Ic -( B e e t a +1) * Icbo ) / B e e t a ; 15 Rb1 =( Vcc - Vbe ) / Ib ; 16 // C a s e 2 : N e g l e c t i n g I c b o and Vbe i n t h e c a l c u l a t i o n s 17 Ib = Ic / B e e t a ; 18 Rb2 = Vcc / Ib ; 19 // P e r c e n t a g e E r r o r 20 E =( Rb2 - Rb1 ) / Rb1 * 1 0 0 ;
21 // D i s p l a y i n g The R e s u l t s i n Command Window
22 p r i n t f( ” \ n \ t The B a s e R e s i s t a n c e i s , Rb = %f kOhms . ” , Rb1 /10^3) ;
23 p r i n t f( ” \ n \ t The B a s e R e s i s t a n c e ( N e g l e c t i n g I c b o and Vbe ) i s , Rb = %f kOhms . ” , Rb2 /10^3) ;
24 p r i n t f( ” \ n \ t P e r c e n t a g e E r r o r i s = %f p e r c e n t . ” ,E ) ;
Scilab code Exa 7.4.b Calculation of Collector Current Ic
1 // Example 7 . 4 ( b ) 2 // Program t o C a l c u l a t e Rb i n t h e B i a s i n g C i r c u i t 3 c l e a r all; 4 clc ; 5 c l o s e ; 6 // G i v e n C i r c u i t Data 7 Icbo = 1 0 * 1 0 ^ ( - 6 ) ; //A 8 Ib = 4 7 . 9 * 1 0 ^ ( - 6 ) ; //A 9 B e e t a =25; 10 // C a l c u l a t i o n 11 Ic = B e e t a * Ib +( B e e t a +1) * Icbo ;
12 // D i s p l a y i n g The R e s u l t s i n Command Window
13 p r i n t f( ” The C o l l e c t o r C u r r e n t i s : ” ) ;
14 p r i n t f( ” \ n \ t I c = %f mA . ” , Ic /10^( -3) ) ;
Scilab code Exa 7.5 Calculation of Ie and Vc in the Circuit
1 // Example 7 . 5 2 // Program t o C a l c u l a t e 3 // ( a ) I e 4 // ( b ) Vc 5 c l e a r all; 6 clc ; 7 c l o s e ; 8 // G i v e n C i r c u i t Data 9 Vcc =10; //V 10 Rc = 5 0 0 ; //Ohms 11 Rb = 5 0 0 * 1 0 ^ 3 ; //Ohms 12 B e e t a = 1 0 0 ;
13 // C a l c u l a t i o n 14 Ib = Vcc /( Rb + B e e t a * Rc ) ; 15 Ic = B e e t a * Ib ; 16 Ie = Ic ; 17 Vce = Vcc - Ic * Rc ; 18 Vc = Vce ;
19 // D i s p l a y i n g The R e s u l t s i n Command Window
20 p r i n t f( ” The D i f f e r e n t P a r a m e t e r s a r e : ” ) ;
21 p r i n t f( ” \ n \ t I e = %f mA . ” , Ie /10^( -3) ) ;
22 p r i n t f( ” \ n \ t Vc = %f V . ” , Vc ) ;
Scilab code Exa 7.6 Calculate Minimum and Maximum Collector Cur-rents 1 // Example 7 . 6 2 // Program t o C a l c u l a t e 3 // ( a ) Minimum C o l l e c t o r C u r r e n t 4 // ( b ) Maximum C o l l e c t o r C u r r e n t 5 c l e a r all; 6 clc ; 7 c l o s e ; 8 // G i v e n C i r c u i t Data 9 Vcc =20; //V 10 Rc = 2 * 1 0 ^ 3 ; //Ohms 11 Rb = 2 0 0 * 1 0 ^ 3 ; //Ohms 12 B e e t a 1 =50; 13 B e e t a 2 = 2 0 0 ; 14 // C a l c u l a t i o n CASE−1: Minimum C o l l e c t o r C u r r e n t 15 I b m i n = Vcc /( Rb + B e e t a 1 * Rc ) ; 16 I c m i n = B e e t a 1 * I b m i n ; 17 // C a l c u l a t i o n CASE−2: Maximum C o l l e c t o r C u r r e n t 18 I b m a x = Vcc /( Rb + B e e t a 2 * Rc ) ; 19 I c m a x = B e e t a 2 * I b m a x ;
20 // D i s p l a y i n g The R e s u l t s i n Command Window
%f mA . ” , Icmin /10^( -3) ) ;
22 p r i n t f( ” \ n \ t The Maximum C o l l e c t o r C u r r e n t I c ( max ) = %f mA . ” , Icmax /10^( -3) ) ;
Scilab code Exa 7.7 Calculate Values of the three Currents
1 // Example 7 . 7 2 // Program t o C a l c u l a t e 3 // ( a ) I b 4 // ( b ) I c 5 // ( c ) I e 6 c l e a r all; 7 clc ; 8 c l o s e ; 9 // G i v e n C i r c u i t Data 10 Vcc =10; //V 11 Rc = 2 * 1 0 ^ 3 ; //Ohms 12 Rb = 1 * 1 0 ^ 6 ; //Ohms 13 Re = 1 * 1 0 ^ 3 ; //Ohms 14 B e e t a = 1 0 0 ; 15 // C a l c u l a t i o n 16 Ib = Vcc /( Rb +( B e e t a +1) * Re ) ; 17 Ic = B e e t a * Ib ; 18 Ie = Ic + Ib ;
19 // D i s p l a y i n g The R e s u l t s i n Command Window
20 p r i n t f( ” \ n \ t The C o l l e c t o r C u r r e n t I c = %f mA . ” , Ic /10^( -3) ) ; 21 p r i n t f( ” \ n \ t The B a s e C u r r e n t I b = %f uA . ” , Ib /10^( -6) ) ; 22 p r i n t f( ” \ n \ t The E m i t t e r C u r r e n t I e = %f mA . ” , Ie /10^( -3) ) ;
Scilab code Exa 7.8 Calculate Minimum and Maximum Ie and correspond-ing Vce
1 // Example 7 . 8
2 // Program t o C a l c u l a t e
3 // ( a ) Minimum E m i t t e r C u r r e n t & c o r r e s p o n d i n g Vce
4 // ( b ) Maximum E m i t t e r C u r r e n t & c o r r e s p o n d i n g Vce
5 c l e a r all; 6 clc ; 7 c l o s e ; 8 // G i v e n C i r c u i t Data 9 Vcc =6; //V 10 Vbe = 0 . 3 ; //V 11 Rc =50; //Ohms 12 Rb = 1 0 * 1 0 ^ 3 ; //Ohms 13 Re = 1 0 0 ; //Ohms 14 B e e t a 1 =50; 15 B e e t a 2 = 2 0 0 ;
16 // C a l c u l a t i o n CASE−1: Minimum E m i t t e r C u r r e n t & c o r r e s p o n d i n g Vce
17 I e m i n =( Vcc - Vbe ) *( B e e t a 1 +1) /( Rb +( B e e t a 1 +1) * Re ) ;
18 V c e m i n = Vcc -( Rc + Re ) * I e m i n ;
19 // C a l c u l a t i o e n CASE−2: Maximum E m i t t e r C u r r e n t & c o r r e s p o n d i n g Vce
20 I e m a x =( Vcc - Vbe ) *( B e e t a 2 +1) /( Rb +( B e e t a 2 +1) * Re ) ;
21 V c e m a x = Vcc -( Rc + Re ) * I e m a x ;
22 // D i s p l a y i n g The R e s u l t s i n Command Window
23 p r i n t f( ” \ n \ t The Minimum E m i t t e r C u r r e n t I e ( min ) = %f mA . ” , Iemin /10^( -3) ) ;
24 p r i n t f( ” \ n \ t The C o r r e s p o n d i n g Vce = %f V . ” , V c e m i n ) ;
25 p r i n t f( ” \ n \ t The Maximum E m i t t e r C u r r e n t I e ( max ) = %f mA . ” , Iemax /10^( -3) ) ;
26 p r i n t f( ” \ n \ t The C o r r e s p o n d i n g Vce = %f V . ” , V c e m a x ) ;
Scilab code Exa 7.9 Determine the new Q Points
1 // Example 7 . 9
2 // Program t o C a l c u l a t e new Q p o i n t s f o r
3 // Minimum and Maximum v a l u e o f B e e t a
4 c l e a r all; 5 clc ; 6 c l o s e ; 7 // G i v e n C i r c u i t Data 8 Vcc =6; //V 9 Vbe = 0 . 3 ; //V 10 Rc = 1 * 1 0 ^ 3 ; //Ohms 11 Rb = 1 0 * 1 0 ^ 3 ; //Ohms 12 Re = 1 0 0 ; //Ohms 13 B e e t a 1 =50; 14 B e e t a 2 = 2 0 0 ;
15 // C a l c u l a t i o n CASE−1: Minimum E m i t t e r C u r r e n t & c o r r e s p o n d i n g Vce
16 I e m i n =( Vcc - Vbe ) *( B e e t a 1 +1) /( Rb +( B e e t a 1 +1) * Re ) ;
17 I c m i n = I e m i n ;
18 V c e m i n = Vcc -( Rc + Re ) * I e m i n ;
19 // C a l c u l a t i o e n CASE−2: Maximum E m i t t e r C u r r e n t & c o r r e s p o n d i n g Vce
20 I e m a x =( Vcc - Vbe ) *( B e e t a 2 +1) /( Rb +( B e e t a 2 +1) * Re ) ;
21 I c m a x = I e m a x ;
22 V c e m a x = Vcc -( Rc + Re ) * I e m a x ;
23 // D i s p l a y i n g The R e s u l t s i n Command Window
24 I c s a t = Vcc /( Rc + Re ) ;
25 // D i s p l a y i n g The R e s u l t s i n Command Window
26 p r i n t f( ” F o r B e e t a =50 : \ n \ t ” ) ;
27 if I c m i n < I c s a t then
28 disp( ” T r a n s i s t o r i s n o t i n S a t u r a t i o n ” ) ;
29 p r i n t f( ” \ n \ t I c = %f mA . ” , Icmin /10^( -3) ) ;
31 else 32 disp( ” T r a n s i s t o r i s i n S a t u r a t i o n ” ) ; 33 p r i n t f( ” \ n \ t I c ( s a t ) = %f mA . ” , Icsat /10^( -3) ) ; 34 p r i n t f( ” \ n \ t Vc ( s a t ) = %f V . ” ,0) ; 35 end 36 p r i n t f( ” \ nF or B e e t a =200 : \ n \ t ” ) ; 37 if I c m a x < I c s a t then 38 disp( ” T r a n s i s t o r i s n o t i n S a t u r a t i o n ” ) ; 39 p r i n t f( ” \ n \ t I c = %f mA . ” , Icmax /10^( -3) ) ; 40 p r i n t f( ” \ n \ t Vc = %f V . ” , Vce ) ; 41 else 42 disp( ” T r a n s i s t o r i s i n S a t u r a t i o n ” ) ; 43 p r i n t f( ” \ n \ t I c ( s a t ) = %f mA . ” , Icsat /10^( -3) ) ; 44 p r i n t f( ” \ n \ t Vc ( s a t ) = %f V . ” ,0) ; 45 end
Scilab code Exa 7.10 Calculate the value of Rb
1 // Example 7 . 1 0 2 // Program t o C a l c u l a t e Rb i n t h e B i a s i n g C i r c u i t 3 c l e a r all; 4 clc ; 5 c l o s e ; 6 // G i v e n C i r c u i t Data 7 Vcc =9; //V 8 Vce =3; //V 9 Re = 5 0 0 ; //Ohms 10 Ic = 8 * 1 0 ^ ( - 3 ) ; //A 11 B e e t a =80; 12 // C a l c u l a t i o n 13 Ib = Ic / B e e t a ; 14 Rb =( Vcc -( B e e t a +1) * Ib * Re ) / Ib ;
15 // D i s p l a y i n g The R e s u l t s i n Command Window
16 p r i n t f( ” The B a s e R e s i s t a n c e i s : ” ) ;
Scilab code Exa 7.11 Calculate DC bias Voltages and Currents 1 // Example 7 . 1 1 2 // Program t o C a l c u l a t e DC B i a s V o l t a g e s and C u r r e n t s 3 c l e a r all; 4 clc ; 5 c l o s e ; 6 // G i v e n C i r c u i t Data 7 Vcc =12; //V 8 Vbe = 0 . 3 ; //V 9 R1 = 4 0 * 1 0 ^ 3 ; //Ohms 10 R2 = 5 * 1 0 ^ 3 ; //Ohms 11 Re = 1 * 1 0 ^ 3 ; //Ohms 12 Rc = 5 * 1 0 ^ 3 ; //Ohms 13 B e e t a =60; 14 // C a l c u l a t i o n 15 Vb =( R2 /( R1 + R2 ) ) * Vcc ; 16 Ve = Vb - Vbe ; 17 Ie = Ve / Re ; 18 Ic = Ie ; 19 Vc = Vcc - Ic * Rc ; 20 Vce = Vc - Ve ;
21 // D i s p l a y i n g The R e s u l t s i n Command Window
22 p r i n t f( ” The D i f f e r e n t P a r a m e t e r s a r e : ” ) ; 23 p r i n t f( ” \ n \ t Vb = %f V . ” , Vb ) ; 24 p r i n t f( ” \ n \ t Ve = %f V . ” , Ve ) ; 25 p r i n t f( ” \ n \ t I e = %f mA . ” , Ie /10^( -3) ) ; 26 p r i n t f( ” \ n \ t I c = %f mA . ” , Ic /10^( -3) ) ; 27 p r i n t f( ” \ n \ t Vc = %f V . ” , Vc ) ; 28 p r i n t f( ” \ n \ t Vce = %f V . ” , Vce ) ;
1 // Example 7 . 1 2
2 // Program t o C a l c u l a t e Re and Vce o f t h e g i v e n C i r c u i t S p e c i f i c a t i o n s 3 c l e a r all; 4 clc ; 5 c l o s e ; 6 // G i v e n C i r c u i t Data 7 Vcc =15; //V 8 R1 = 2 0 0 ; //Ohms 9 R2 = 1 0 0 ; //Ohms 10 Rc =20; //Ohms 11 Ic = 1 0 0 * 1 0 ^ ( - 3 ) ; //A 12 // C a l c u l a t i o n 13 Ie = Ic ; 14 Vb =( R2 /( R1 + R2 ) ) * Vcc ; 15 Ve = Vb ;// N e g l e c t i n g Vbe 16 Re = Ve / Ie ; 17 Vce = Vcc -( Rc + Re ) * Ic ;
18 // D i s p l a y i n g The R e s u l t s i n Command Window
19 p r i n t f( ” \ n \ t The E m i t t e r R e s i s t a n c e i s Re = %f Ohms . ” , Re ) ;
20 p r i n t f( ” \ n \ t The C o l l e c t o r t o E m i t t e r V o l t a g e i s Vce = %f V . ” , Vce ) ;
Scilab code Exa 7.13 Calculate Ic and Vce for given Circuit
1 // Example 7 . 1 3
2 // / Program t o C a l c u l a t e I c and Vce o f t h e g i v e n C i r c u i t S p e c i f i c a t i o n s 3 c l e a r all; 4 clc ; 5 c l o s e ; 6 // G i v e n C i r c u i t Data 7 Vcc =12; //V 8 Vbe = 0 . 3 ; //V
9 R1 = 4 0 * 1 0 ^ 3 ; //Ohms 10 R2 = 5 * 1 0 ^ 3 ; //Ohms 11 Re = 1 * 1 0 ^ 3 ; //Ohms 12 Rc = 5 * 1 0 ^ 3 ; //Ohms 13 B e e t a =60; 14 // C a l c u l a t i o n 15 Vth =( R2 /( R1 + R2 ) ) * Vcc ; 16 Rth = R1 * R2 /( R1 + R2 ) ; 17 Ib =( Vth - Vbe ) /( Rth + B e e t a * Re ) ; 18 Ic = B e e t a * Ib ; 19 Vce = Vcc - Ic *( Rc + Re ) ;
20 // D i s p l a y i n g The R e s u l t s i n Command Window
21 p r i n t f( ” The D i f f e r e n t P a r a m e t e r s a r e : ” ) ;
22 p r i n t f( ” \ n \ t I c = %f mA . ” , Ic /10^( -3) ) ;
23 p r i n t f( ” \ n \ t Vce = %f V . ” , Vce ) ;
Scilab code Exa 7.14 Calculate Ic and Vce for given Circuit
1 // Example 7 . 1 4 2 // Program t o C a l c u l a t e 3 // ( a ) I c 4 // ( b ) Vce 5 c l e a r all; 6 clc ; 7 c l o s e ; 8 // G i v e n C i r c u i t Data 9 Vcc =12; //V 10 Vee =15; //V 11 Rc = 5 * 1 0 ^ 3 ; //Ohms 12 Re = 1 0 * 1 0 ^ 3 ; //Ohms 13 Rb = 1 0 * 1 0 ^ 3 ; //Ohms 14 B e e t a = 1 0 0 ; 15 // C a l c u l a t i o n 16 Ie = Vee / Re ; 17 Ic = Ie ;
18 Vce = Vcc - Ic * Rc ;
19 // D i s p l a y i n g The R e s u l t s i n Command Window
20 p r i n t f( ” The P a r a m e t e r s a r e : ” ) ;
21 p r i n t f( ” \ n \ t I c = %f mA . ” , Ic /10^( -3) ) ;
Chapter 8
SMALL SIGNAL
AMPLIFIERS
Scilab code Exa 8.1 Determination of Hybrid Parameters
1 // Example 8 . 1 2 // R e f e r F i g u r e 8 . 1 5 and 8 . 1 6 i n t h e T e x t b o o k 3 // Program t o f i n d t h e H y b r i d P a r a m e t e r s f r o m t h e g i v e n T r a n s i s t o r C h a r a c t e r i s t i c s 4 c l e a r all; 5 clc ; 6 c l o s e ; 7 // G i v e n C i r c u i t Data 8 Ic = 2 * 1 0 ^ ( - 3 ) ; //A 9 Vce = 8 . 5 ; //V 10 // C a l c u l a t i o n 11 // h f e= d e l t a ( i c ) / d e l t a ( i b ) , Vce=c o n s t a n t 12 hfe = ( 2 . 7 - 1 . 7 ) *10^( -3) / ( ( 2 0 - 1 0 ) *10^( -6) ) ; 13 // h o e= d e l t a ( i c ) / d e l t a ( Vce ) , i b=c o n s t a n t 14 hoe = ( 2 . 2 - 2 . 1 ) *10^( -3) /(10 -7) ; 15 // h i e= d e l t a ( Vbe ) / d e l t a ( i b ) , Vce=c o n s t a n t 16 hie = ( 0 . 7 3 - 0 . 7 1 5 ) / ( ( 2 0 - 1 0 ) *10^( -6) ) ; 17 // h r e= d e l t a ( Vbe ) / d e l t a ( Vce ) , i b=c o n s t a n t 18 hre = ( 0 . 7 3 - 0 . 7 2 ) /(20 -0) ;
19 // D i s p l a y i n g The R e s u l t s i n Command Window 20 p r i n t f( ” \ n \ t The H y b r i d P a r a m e t e r s a r e : ” ) ; 21 p r i n t f( ” \ n \ n \ t h f e = %f ” , hfe ) ; 22 p r i n t f( ” \ n \ t h o e = %f uS ” , hoe /10^( -6) ) ; 23 p r i n t f( ” \ n \ t h i e = %f kOhms” , hie /10^3) ; 24 p r i n t f( ” \ n \ t h r e = %f ” , hre ) ;
Scilab code Exa 8.2.a Calculation of Input Impedance of Amplifier
1 // Example 8 . 2 ( a ) 2 // Program t o f i n d t h e I n p u t I m p e d a n c e o f t h e A m p l i f i e r 3 c l e a r all; 4 clc ; 5 c l o s e ; 6 // G i v e n C i r c u i t Data 7 ri = 2 * 1 0 ^ 3 ; //Ohms 8 Rb = 1 5 0 * 1 0 ^ 3 ; //Ohms 9 // C a l c u l a t i o n 10 Zin = Rb * ri /( Rb + ri ) ;
11 // D i s p l a y i n g The R e s u l t s i n Command Window
12 p r i n t f( ” \ n \ t The I n p u t I m p e d a n c e o f t h e A m p l i f i e r i s Z i n = %f kOhms . ” , Zin /10^3) ;
Scilab code Exa 8.2.b Calculation of Voltage Gain of Amplifier
1 // Example 8 . 2 ( b ) 2 // Program t o f i n d t h e V o l t a g e Gain o f t h e A m p l i f i e r 3 c l e a r all; 4 clc ; 5 c l o s e ; 6 // G i v e n C i r c u i t Data 7 B e e t a = 1 0 0 ;
8 ri = 2 * 1 0 ^ 3 ; //Ohms
9 Rac = 5 * 1 0 ^ 3 ; //Ohms
10 // C a l c u l a t i o n
11 Av = B e e t a * Rac / ri ;
12 // D i s p l a y i n g The R e s u l t s i n Command Window
13 p r i n t f( ” \ n \ t The V o l t a g e Gain o f t h e A m p l i f i e r i s Av = %f w i t h p h a s e o f 1 8 0 d e g r e e s . ” , Av ) ;
Scilab code Exa 8.2.c Calculation of Current Gain of Amplifier
1 // Example 8 . 2 ( c ) 2 // Program t o f i n d t h e C u r r e n t Gain o f t h e A m p l i f i e r 3 c l e a r all; 4 clc ; 5 c l o s e ; 6 // G i v e n C i r c u i t Data 7 // L e t i n p u t C u r r e n t i b =2A 8 ib =2 ; //A , A s s u m p t i o n 9 io = 1 0 0 * ib ; 10 // C a l c u l a t i o n 11 Ai = io / ib ; // C u r r e n t Gain
12 // D i s p l a y i n g The R e s u l t s i n Command Window
13 p r i n t f( ” \ n \ t The C u r r e n t Gain o f t h e A m p l i f i e r i s Ai = %f . ” , Ai ) ;
Scilab code Exa 8.3.a Calculation of Voltage Gain of Amplifier
1 // Example 8 . 3 ( a ) 2 // Program t o f i n d t h e V o l t a g e Gain o f t h e A m p l i f i e r 3 c l e a r all; 4 clc ; 5 c l o s e ; 6 // G i v e n C i r c u i t Data
7 Bac = 1 5 0 ; 8 rin = 2 * 1 0 ^ 3 ; //Ohms 9 R1 = 4 . 7 * 1 0 ^ 3 ; //Ohms 10 R2 = 1 2 * 1 0 ^ 3 ; //Ohms 11 // C a l c u l a t i o n 12 Rac = R1 * R2 /( R1 + R2 ) ;
13 Av = Bac * Rac / rin ;
14 // D i s p l a y i n g The R e s u l t s i n Command Window
15 p r i n t f( ” \ n \ t The V o l t a g e Gain o f t h e A m p l i f i e r i s Av = %f w i t h p h a s e o f 1 8 0 d e g r e e s . ” , Av ) ;
Scilab code Exa 8.3.b Calculation of Input Impedance of Amplifier
1 // Example 8 . 3 ( b ) 2 // Program t o f i n d t h e I n p u t I m p e d a n c e o f t h e A m p l i f i e r 3 c l e a r all; 4 clc ; 5 c l o s e ; 6 // G i v e n C i r c u i t Data 7 rin = 2 * 1 0 ^ 3 ; //Ohms 8 R3 = 7 5 * 1 0 ^ 3 ; //Ohms 9 R4 = 7 . 5 * 1 0 ^ 3 ; //Ohms 10 // C a l c u l a t i o n
11 Zin = R3 * R4 * rin /( R3 * R4 + R4 * rin + rin * R3 ) ;
12 // D i s p l a y i n g The R e s u l t s i n Command Window
13 p r i n t f( ” \ n \ t The I n p u t I m p e d a n c e o f t h e A m p l i f i e r i s Z i n = %f kOhms . ” , Zin /10^3) ;
Scilab code Exa 8.3.c Calculation of Q Point Parameters of Amplifier
1 // Example 8 . 3 ( c )
3 c l e a r all; 4 clc ; 5 c l o s e ; 6 // G i v e n C i r c u i t Data 7 Vcc =15; //V 8 R1 = 7 5 * 1 0 ^ 3 ; //Ohms 9 R2 = 7 . 5 * 1 0 ^ 3 ; //Ohms 10 Rc = 4 . 7 * 1 0 ^ 3 ; //Ohms 11 Re = 1 . 2 * 1 0 ^ 3 ; //Ohms 12 // C a l c u l a t i o n 13 Vb = Vcc * R2 /( R1 + R2 ) ; 14 Ve = Vb ; 15 Ie = Ve / Re ; 16 Vce = Vcc -( Rc + Re ) * Ie ;
17 // D i s p l a y i n g The R e s u l t s i n Command Window
18 p r i n t f( ” \ n \ t The D i f f e r e n t P a r a m e t e r s o f t h e A m p l i f i e r a r e I e = %f mA and Vce = %f V . ” , Ie /10^( -3) , Vce ) ;
Scilab code Exa 8.4 Calculation of Voltage Gain of Amplifier
1 // Example 8 . 4 2 // Program t o f i n d t h e V o l t a g e Gain o f t h e A m p l i f i e r 3 c l e a r all; 4 clc ; 5 c l o s e ; 6 // G i v e n C i r c u i t Data 7 u =20; 8 Rl = 1 0 * 1 0 ^ 3 ; //Ohms 9 rp = 1 0 * 1 0 ^ 3 ; //Ohms 10 // C a l c u l a t i o n 11 A = u * Rl /( rp + Rl ) ;
12 // D i s p l a y i n g The R e s u l t s i n Command Window
13 p r i n t f( ” \ n \ t The V o l t a g e Gain o f t h e A m p l i f i e r i s A = %f w i t h p h a s e o f 1 8 0 d e g r e e s . ” ,A ) ;
Scilab code Exa 8.5 Calculation of Gain of Single Stage Amplifier 1 // Example 8 . 5 2 // Program t o f i n d t h e Gain o f t h e A m p l i f i e r 3 c l e a r all; 4 clc ; 5 c l o s e ; 6 // G i v e n C i r c u i t Data 7 gm = 3 0 0 0 * 1 0 ^ ( - 6 ) ; // S 8 Rl = 2 2 * 1 0 ^ 3 ; //Ohms 9 rp = 3 0 0 * 1 0 ^ 3 ; //Ohms 10 // C a l c u l a t i o n 11 //A=−(gm∗ Rl / ( 1 + ( Rl / r p ) ) ) , For rp>>Rl we g e t 12 A = gm * Rl ; // w i t h P h a s e o f 1 8 0 d e g r e e s
13 // D i s p l a y i n g The R e s u l t s i n Command Window
14 p r i n t f( ” \ n \ t The Gain o f t h e A m p l i f i e r i s A = %f w i t h p h a s e o f 1 8 0 d e g r e e s . ” ,A ) ;
Scilab code Exa 8.6 Calculation of Output Signal Voltage of FET Ampli-fier 1 // Example 8 . 6 2 // Program t o f i n d t h e Output S i g n a l V o l t a g e o f t h e A m p l i f i e r 3 c l e a r all; 4 clc ; 5 c l o s e ; 6 // G i v e n C i r c u i t Data 7 Rl = 1 2 * 1 0 ^ 3 ; //Ohms 8 Rg = 1 * 1 0 ^ 6 ; //Ohms 9 Rs = 1 * 1 0 ^ 3 ; //Ohms
10 Cs = 2 5 * 1 0 ^ ( - 6 ) ; //F 11 u =20; 12 rd = 1 0 0 * 1 0 ^ 3 ; //Ohms 13 vi = 0 . 1 ; //V 14 f = 1 * 1 0 ^ 3 ; // Hz 15 // C a l c u l a t i o n 16 Xcs = 1 / ( 2 * %pi * f * Cs ) ; 17 // As Xcs comes o u t t o be much s m a l l e r t h a n Rs , Rs i s c o m p l e t e l y b y p a s s e d 18 A = u * Rl /( Rl + rd ) ; 19 vo = A * vi ;
20 // D i s p l a y i n g The R e s u l t s i n Command Window
21 p r i n t f( ” \ n \ t The Output S i g n a l V o l t a g e o f t h e A m p l i f i e r i s vo = %f V . ” , vo ) ;
Chapter 9
MULTI STAGE AMPLIFIERS
Scilab code Exa 9.1 Calculate overall Voltage Gain in dB
1 // Example 9 . 1 2 // Program t o C a l c u l a t e o v e r a l l V o l t a g e Gain o f a M u l t i s t a g e 3 // A m p l i f i e r i n dB 4 c l e a r all; 5 clc ; 6 c l o s e ; 7 // G i v e n Data 8 A1 =30; 9 A2 =50; 10 A3 =80; 11 // C a l c u l a t i o n 12 A = A1 * A2 * A3 ; // V o l t a g e Gain 13 Adb =20*l o g 1 0( A ) ; // V o l t a g e Gain i n dB
14 // D i s p l a y i n g The R e s u l t s i n Command Window
15 p r i n t f( ” \ n \ t The o v e r a l l V o l t a g e Gain o f t h e M u l t i s t a g e A m p l i f i e r Adb = %f dB” , Adb ) ;
1 // Example 9 . 2 2 // Program t o C a l c u l a t e V o l t a g e a t t h e Output T e r m i n a l o f 3 //Two S t a g e D i r e c t C o u p l e d A m p l i f i e r 4 c l e a r all; 5 clc ; 6 c l o s e ; 7 // G i v e n Data 8 Vcc =30; //V 9 Vi = 1 . 4 ; //V 10 Vbe = 0 . 7 ; //V 11 B = 3 0 0 ; // B e e t a 12 R1 = 2 7 * 1 0 ^ 3 ; //Ohms 13 R2 = 6 8 0 ; //Ohms 14 R3 = 2 4 * 1 0 ^ 3 ; //Ohms 15 R4 = 2 . 4 * 1 0 ^ 3 ; //Ohms 16 // C a l c u l a t i o n 17 Ve = Vi - Vbe ; 18 Ie1 = Vbe / R2 ; 19 Ic1 = Ie1 ; 20 Vc1 = Vcc - Ic1 * R1 ; 21 Vb2 = Vc1 ; 22 Ve2 = Vb2 - Vbe ; 23 Ie2 = Ve2 / R4 ; 24 Ic2 = Ie2 ; 25 Vc2 = Vcc - Ic2 * R3 ; 26 Vo = Vc2 ;
27 // D i s p l a y i n g The R e s u l t s i n Command Window
28 p r i n t f( ” \ n \ t The V o l t a g e a t t h e Output T e r m i n a l o f Two S t a g e D i r e c t C o u p l e d A m p l i f i e r , Vo = %f V” , Vo ) ;
1 // Example 9 . 3 2 // Program t o C a l c u l a t e Gain i n dB a t C u t o f f F r e q u e n c i e s and 3 // P l o t F r e q u e n c y R e s p o n s e Curve 4 c l e a r all; 5 clc ; 6 c l o s e ; 7 // G i v e n Data 8 A = 1 0 0 ; 9 f1 = 4 0 0 ; 10 f2 = 2 5 * 1 0 ^ 3 ; 11 f3 =80; 12 f4 = 4 0 * 1 0 ^ 3 ; 13 // C a l c u l a t i o n 14 Adb =20*l o g 1 0( A ) ;
15 Adbc = Adb -3; // Lower by 3dB
16 // D i s p l a y i n g The R e s u l t s i n Command Window
17 p r i n t f( ” \ n \ t The Gain a t C u t o f f F r e q u e n c i e s i s , Adb ( a t C u t o f f F r e q u e n c i e s ) = %f dB” , Adbc ) ;
18 // P l o t t i n g t h e F r e q u e n c y R e s p o n s e Curve
19 x = [ f3 f1 f2 f4 ];
20 x1 = [1 1 1 1];
21 y = [ Adbc Adb Adb Adbc ];
22 g a i n p l o t( y , x1 ) ; 23 a = gca() ; 24 a . y _ l o c a t i o n = ’ l e f t ’ ; 25 a . x _ l o c a t i o n = ’ bottom ’ ; 26 a . x _ l a b e l . text = ’ f 3 f 1 F r e q u e n c y ( Hz ) f 2 f 4 ’ ; 27 a . y _ l a b e l . text = ’ AdB 37 ’ ;
28 a . t i t l e . text = ’FREQUENCY RESPONSE CURVE ’ ;
29 p l o t 2 d( x , y ) ;
30 r = [37 37];
32 p l o t 2 d 2( q , r ,6) ;
33 r2 = [37 40 40 37];
34 q2 = [ f3 f1 f2 f4 ];
35 p l o t 2 d 3( q2 , r2 ,6) ;
Scilab code Exa 9.4.a Calculate Input Impedance of Two Stage RC Cou-pled Amplifier 1 // Example 9 . 4 ( a ) 2 // Program t o C a l c u l a t e I n p u t I m p e d a n c e o f t h e g i v e n 3 //Two S t a g e RC C o u p l e d A m p l i f i e r 4 c l e a r all; 5 clc ; 6 c l o s e ; 7 // G i v e n Data 8 R1 = 5 . 6 * 1 0 ^ 3 ; //Ohms 9 R2 = 5 6 * 1 0 ^ 3 ; //Ohms 10 R3 = 1 . 1 * 1 0 ^ 3 ; //Ohms 11 // C a l c u l a t i o n 12 Zi = R1 * R2 * R3 /( R1 * R2 + R2 * R3 + R3 * R1 ) ;
13 // D i s p l a y i n g The R e s u l t s i n Command Window
14 p r i n t f( ” \ n \ t The I n p u t I m p e d a n c e , Z i = %f kOhms ” , Zi / 1 0 ^ 3 ) ;
Scilab code Exa 9.4.b Calculate Ouput Impedance of Two Stage RC Cou-pled Amplifier 1 // Example 9 . 4 ( b ) 2 // Program t o C a l c u l a t e Output I m p e d a n c e o f t h e g i v e n 3 //Two S t a g e RC C o u p l e d A m p l i f i e r 4 c l e a r all; 5 clc ; 6 c l o s e ;
7 // G i v e n Data
8 Ro1 = 3 . 3 * 1 0 ^ 3 ; //Ohms
9 Ro2 = 2 . 2 * 1 0 ^ 3 ; //Ohms
10 // C a l c u l a t i o n
11 Zo = Ro1 * Ro2 /( Ro1 + Ro2 ) ;
12 // D i s p l a y i n g The R e s u l t s i n Command Window
13 p r i n t f( ” \ n \ t The Output I m p e d a n c e , Zo = %f kOhms ” , Zo / 1 0 ^ 3 ) ;
Scilab code Exa 9.4.c Calculate Voltage Gain of Two Stage RC Coupled Amplifier
1 // Example 9 . 4 ( c )
2 // Program t o V o l t a g e Gain o f t h e g i v e n Two S t a g e RC C o u p l e d A m p l i f i e r 3 c l e a r all; 4 clc ; 5 c l o s e ; 6 // G i v e n Data 7 Ro1 = 3 . 3 * 1 0 ^ 3 ; //Ohms 8 Ro2 = 2 . 2 * 1 0 ^ 3 ; //Ohms 9 hfe = 1 2 0 ; 10 hie = 1 . 1 * 1 0 ^ 3 ; //Ohms 11 R1 = 6 . 8 * 1 0 ^ 3 ; //Ohms 12 R2 = 5 6 * 1 0 ^ 3 ; //Ohms 13 R3 = 5 . 6 * 1 0 ^ 3 ; //Ohms 14 R4 = 1 . 1 * 1 0 ^ 3 ; //Ohms 15 // C a l c u l a t i o n
16 Rac2 = Ro1 * Ro2 /( Ro1 + Ro2 ) ;
17 A2 = - hfe * Rac2 / hie ;
18 Rac1 = R1 * R2 * R3 * R4 /( R1 * R2 * R3 + R2 * R3 * R4 + R1 * R3 * R4 + R1 * R2 * R4 ) ;
19 A1 = - hfe * Rac1 / hie ;
20 A = A1 * A2 ; // O v e r a l l Gain
22 p r i n t f( ” \ n \ t The O v e r a l l Gain , A = %f . ” , A ) ;
Scilab code Exa 9.5 Calculate Maximum Voltage Gain and Bandwidth of Triode Amplifier
1 // Example 9 . 5
2 // Program t o C a l c u l a t e Maximum V o l t a g e Gain & Bandwidth 3 c l e a r all; 4 clc ; 5 c l o s e ; 6 // G i v e n Data 7 Rl = 1 0 * 1 0 ^ 3 ; //Ohms 8 Rg = 4 7 0 * 1 0 ^ 3 ; //Ohms 9 Cs = 1 0 0 * 1 0 ^ ( - 1 2 ) ; //F 10 u =25; 11 rp = 8 * 1 0 ^ 3 ; //Ohms 12 Cc = 0 . 0 1 * 1 0 ^ ( - 6 ) ; //F 13 // C a l c u l a t i o n 14 gm = u / rp ; 15 Req = rp * Rl * Rg /( rp * Rl + Rl * Rg + Rg * rp ) ; 16 Avm = gm * Req ;
17 Avmd = Avm ^2; // V o l t a g e Gain o f Two S t a g e s
18 Rd =( rp * Rl /( rp + Rl ) ) + Rg ;
19 f1 = 1 / ( 2 * %pi * Cc * Rd ) ; // Lower C u t o f f F r e q u e n c y
20 f1d = f1 /sqrt(sqrt(2) -1) ; // Lower C u t o f f F r e q u e n c y o f Two S t a g e s
21 f2 = 1 / ( 2 * %pi * Cs * Req ) ; // Upper C u t o f f F r e q u e n c y
22 f2d = f2 *sqrt(sqrt(2) -1) ; // Upper C u t o f f F r e q u e n c y o f Two S t a g e s
23 BW = f2d - f1d ; // Bandwidth
24 // D i s p l a y i n g The R e s u l t s i n Command Window
25 p r i n t f( ” \ n \ t The V o l t a g e Gain o f Two S t a g e s , Avmd = %f ” , Avmd ) ;
Chapter 10
POWER AMPLIFIERS
Scilab code Exa 10.1 Calculation of Transformer Turns Ratio
1 // Example 1 0 . 1 2 // Program t o D e t e r m i n e t h e T r a n s f o r m e r Turns R a t i o 3 c l e a r all; 4 clc ; 5 c l o s e ; 6 // G i v e n C i r c u i t Data 7 RL =16;// Ohms 8 RLd = 1 0 * 1 0 ^ 3 ;// Ohms 9 // C a l c u l a t i o n 10 N12 =sqrt( RLd / RL ) ;// N12=N1/N2
11 // D i s p l a y i n g The R e s u l t s i n Command Window
12 p r i n t f( ” \ n \ t The T r a n s f o r m e r T u r n s R a t i o i s N1/N2 = %d : %d . ” , N12 ,1) ;
Scilab code Exa 10.2 Calculation of Effective Resistance seen at Primary
1 // Example 1 0 . 2
2 // Program t o D e t e r m i n e t h e E f f e c t i v e R e s i s t a n c e s e e n l o o k i n g i n t o
3 // t h e P r i m a r y 4 c l e a r all; 5 clc ; 6 c l o s e ; 7 // G i v e n C i r c u i t Data 8 Rl =8; //Ohms 9 N12 =15; // N12=N1/N2 10 // C a l c u l a t i o n 11 Rld =( N12 ) ^2* Rl ;
12 // D i s p l a y i n g The R e s u l t s i n Command Window
13 p r i n t f( ” \ n \ t The E f f e c t i v e R e s i s t a n c e s e e n l o o k i n g i n t o t h e P r i m a r y , Rld = %f kOhms . ” , Rld /10^3) ;
Scilab code Exa 10.3.a Calculation of 2nd 3rd and 4th Harmonic Distor-tions 1 // Example 1 0 . 3 ( a ) 2 // Program t o D e t e r m i n e t h e S e c o n d , T h i r d & F o u r t h Harmonic D i s t o r t i o n s 3 c l e a r all; 4 clc ; 5 c l o s e ; 6 // G i v e n C i r c u i t Data 7 // i o =15∗ s i n ( 6 0 0 ∗ t ) + 1 . 5 ∗ s i n ( 1 2 0 0 ∗ t ) + 1 . 2 ∗ s i n ( 1 8 0 0 ∗ t ) + 0 . 5 ∗ s i n ( 2 4 0 0 ∗ t ) 8 I1 =15; 9 I2 = 1 . 5 ; 10 I3 = 1 . 2 ; 11 I4 = 0 . 5 ; 12 // C a l c u l a t i o n 13 D2 =( I2 / I1 ) * 1 0 0 ; 14 D3 =( I3 / I1 ) * 1 0 0 ; 15 D4 =( I4 / I1 ) * 1 0 0 ;
16 // D i s p l a y i n g The R e s u l t s i n Command Window
%f p e r c e n t . ” , D2 ) ;
18 p r i n t f( ” \ n \ t The T h i r d Harmonic D i s t o r t i o n i s , D3 = %f p e r c e n t . ” , D3 ) ;
19 p r i n t f( ” \ n \ t The F o u r t h H a r m o n i c D i s t o r t i o n i s , D4 = %f p e r c e n t . ” , D4 ) ;
Scilab code Exa 10.3.b Percentage Increase in Power because of Distor-tion 1 // Example 1 0 . 3 ( b ) 2 // Program t o D e t e r m i n e t h e P e r c e n t a g e I n c r e a s e i n Power b e c a u s e o f D i s t o r t i o n 3 c l e a r all; 4 clc ; 5 c l o s e ; 6 P1 =poly(0 , ” P1 ” ) ; 7 // G i v e n C i r c u i t Data 8 // i o =15∗ s i n ( 6 0 0 ∗ t ) + 1 . 5 ∗ s i n ( 1 2 0 0 ∗ t ) + 1 . 2 ∗ s i n ( 1 8 0 0 ∗ t ) + 0 . 5 ∗ s i n ( 2 4 0 0 ∗ t ) 9 I1 =15; 10 I2 = 1 . 5 ; 11 I3 = 1 . 2 ; 12 I4 = 0 . 5 ; 13 // C a l c u l a t i o n 14 D2 =( I2 / I1 ) * 1 0 0 ; 15 D3 =( I3 / I1 ) * 1 0 0 ; 16 D4 =( I4 / I1 ) * 1 0 0 ; 17 D =sqrt( D2 ^2+ D3 ^2+ D4 ^2) ;// D i s t o r t i o n F a c t o r 18 P = ( 1 + ( D / 1 0 0 ) ^2) * P1 ; 19 Pi =(( P - P1 ) / P1 ) * 1 0 0 ;
20 // D i s p l a y i n g The R e s u l t s i n Command Window
21 disp( Pi , ” The P e r c e n t a g e I n c r e a s e i n Power b e c a u s e o f D i s t o r t i o n i s , P i ( i n p e r c e n t )= ” ) ;
Chapter 11
TUNED VOLTAGE
AMPLIFIERS
Scilab code Exa 11.1.a Calculation of Resonant Frequency
1 // Example 1 1 . 1 ( a ) 2 // Program t o C a l c u l a t e R e s o n a n t F r e q u e n c y o f t h e g i v e n C i r c u i t 3 c l e a r all; 4 clc ; 5 c l o s e ; 6 // G i v e n C i r c u i t Data 7 C = 3 0 0 * 1 0 ^ ( - 1 2 ) ; //F 8 L = 2 2 0 * 1 0 ^ ( - 6 ) ; //H 9 R =20; //Ohms 10 // C a l c u l a t i o n 11 fr = 1 / ( 2 * %pi *sqrt( L * C ) ) ;
12 // D i s p l a y i n g The R e s u l t s i n Command Window
13 p r i n t f( ” \ n \ t The R e s o n a n t F r e q u e n c y , f r = %f kHz . ” , fr / 1 0 ^ 3 ) ;
Scilab code Exa 11.1.b Calculation of Impedance at Resonance 1 // Example 1 1 . 1 ( b ) 2 // Program t o C a l c u l a t e I m p e d a n c e a t R e s o n a n c e o f t h e g i v e n C i r c u i t 3 c l e a r all; 4 clc ; 5 c l o s e ; 6 // G i v e n C i r c u i t Data 7 C = 3 0 0 * 1 0 ^ ( - 1 2 ) ; //F 8 L = 2 2 0 * 1 0 ^ ( - 6 ) ; //H 9 R =20; //Ohms 10 // C a l c u l a t i o n 11 Rr = R ;
12 // D i s p l a y i n g The R e s u l t s i n Command Window
13 p r i n t f( ” \ n \ t The I m p e d a n c e a t R e s o n a n c e , Rr = %f Ohms . ” , Rr ) ;
Scilab code Exa 11.1.c Calculation of Current at Resonance
1 // Example 1 1 . 1 ( c ) 2 // Program t o C a l c u l a t e t h e C u r r e n t a t R e s o n a n c e o f t h e g i v e n C i r c u i t 3 c l e a r all; 4 clc ; 5 c l o s e ; 6 // G i v e n C i r c u i t Data 7 V =10; //V 8 C = 3 0 0 * 1 0 ^ ( - 1 2 ) ; //F 9 L = 2 2 0 * 1 0 ^ ( - 6 ) ; //H 10 R =20; //Ohms 11 // C a l c u l a t i o n 12 I = V / R ;
13 // D i s p l a y i n g The R e s u l t s i n Command Window
) ;
Scilab code Exa 11.1.d Calculation of Voltage across each Component
1 // Example 1 1 . 1 ( d ) 2 // Program t o C a l c u l a t e t h e V o l t a g e a c r o s s e a c h Component o f t h e g i v e n C i r c u i t 3 c l e a r all; 4 clc ; 5 c l o s e ; 6 // G i v e n C i r c u i t Data 7 V =10; //V 8 C = 3 0 0 * 1 0 ^ ( - 1 2 ) ; //F 9 L = 2 2 0 * 1 0 ^ ( - 6 ) ; //H 10 R =20; //Ohms 11 // C a l c u l a t i o n 12 fr = 1 / ( 2 * %pi *sqrt( L * C ) ) ; 13 I = V / R ; 14 Xl =2* %pi * fr * L ; 15 Vl = I * Xl ; 16 Xc = 1 / ( 2 * %pi * fr * C ) ; 17 Vc = I * Xc ; 18 Vr = I * R ;
19 // D i s p l a y i n g The R e s u l t s i n Command Window
20 p r i n t f( ” \ n \ t V o l t a g e a c r o s s t h e I n d u c t a n c e , Vl = %f V . ” , Vl ) ; 21 p r i n t f( ” \ n \ t V o l t a g e a c r o s s t h e C a p a c i t a n c e , Vc = %f V . ” , Vc ) ; 22 p r i n t f( ” \ n \ t V o l t a g e a c r o s s t h e R e s i s t a n c e , Vr = %f V . ” , Vr ) ;
Scilab code Exa 11.2 Calculation of Parameters of the Resonant Circuit at Resonance
1 // Example 1 1 . 2 2 // Program t o C a l c u l a t e f r , I l , I c , L i n e C u r r e n t & I m p e d a n c e o f 3 // t h e R e s o n a n t C i r c u i t a t R e s o n a n c e 4 c l e a r all; 5 clc ; 6 c l o s e ; 7 // G i v e n C i r c u i t Data 8 C = 1 0 0 * 1 0 ^ ( - 1 2 ) ; //F 9 L = 1 0 0 * 1 0 ^ ( - 6 ) ; //H 10 R =10; //Ohms 11 V = 1 0 0 ; //V 12 // C a l c u l a t i o n 13 fr = 1 / ( 2 * %pi *sqrt( L * C ) ) ; 14 Xl =2* %pi * fr * L ; 15 Il = V / Xl ; 16 Xc = 1 / ( 2 * %pi * fr * C ) ; 17 Ic = V / Xc ; 18 Zp = L /( R * C ) ; 19 I = V / Zp ;
20 // D i s p l a y i n g The R e s u l t s i n Command Window
21 p r i n t f( ” \ n \ t The C a l c u l a t e d V a l u e s a r e : ” ) ; 22 p r i n t f( ” \ n \ t f r = %f kHz . ” , fr /10^3) ; 23 p r i n t f( ” \ n \ t I l = %f A . ” , Il ) ; 24 p r i n t f( ” \ n \ t I c= %f A . ” , Ic ) ; 25 p r i n t f( ” \ n \ t Zp= %f Ohms . ” , Zp ) ; 26 p r i n t f( ” \ n \ t I= %f mA. ” ,I /10^( -3) ) ;
Scilab code Exa 11.3 Calculation of Impedance Q and Bandwidth of Res-onant Circuit
1 // Example 1 1 . 3
2 // Program t o C a l c u l a t e Impedance , Q and Bandwidth o f t h e
4 c l e a r all; 5 clc ; 6 c l o s e ; 7 // G i v e n C i r c u i t Data 8 C = 1 0 0 * 1 0 ^ ( - 1 2 ) ; //F 9 L = 1 5 0 * 1 0 ^ ( - 6 ) ; //H 10 R =15; //Ohms 11 // C a l c u l a t i o n 12 fr = 1 / ( 2 * %pi *sqrt( L * C ) ) ; 13 Zp = L /( R * C ) ; 14 Q =2* %pi * fr * L / R ; 15 df = fr / Q ; // Bandwidth
16 // D i s p l a y i n g The R e s u l t s i n Command Window
17 p r i n t f( ” \ n \ t The C a l c u l a t e d V a l u e s a r e : ” ) ;
18 p r i n t f( ” \ n \ t I m p e d a n c e , Zp= %f kOhms . ” , Zp / 1 0 ^ 3 ) ;
19 p r i n t f( ” \ n \ t Q u a l i t y F a c t o r , Q= %f . ” ,Q ) ;
Chapter 12
FEEDBACK IN AMPLIFIERS
Scilab code Exa 12.1 Calculation of Gain of Negative Feedback Amplifier
1 // Example 1 2 . 1 2 // Program t o C a l c u l a t e t h e Gain o f a N e g a t i v e F e e d b a c k A m p l i f i e r w i t h 3 // G i v e n S p e c i f i c a t i o n s 4 c l e a r all; 5 clc ; 6 c l o s e ; 7 // G i v e n C i r c u i t Data 8 A = 1 0 0 ; // I n t e r n a l Gain 9 B = 1 / 1 0 ; // F e e d b a c k F a c t o r 10 // C a l c u l a t i o n 11 Af = A /(1+ A * B ) ;
12 // D i s p l a y i n g The R e s u l t s i n Command Window
13 p r i n t f( ” \ n \ t The V a l u e o f t h e Gain o f F e e d b a c k A m p l i f i e r i s , Af = %f . ” , Af ) ;
1 // Example 1 2 . 2
2 // Program t o C a l c u l a t e t h e A( I n t e r n a l Gain ) and B e e t a ( F e e d b a c k Gain ) o f // a N e g a t i v e F e e d b a c k A m p l i f i e r w i t h g i v e n S p e c i f i c a t i o n s 3 c l e a r all; 4 clc ; 5 c l o s e ; 6 // G i v e n C i r c u i t Data 7 Af = 1 0 0 ; // V o l t a g e Gain 8 Vin = 5 0 * 1 0 ^ ( - 3 ) ; //V , I n p u t S i g n a l w i t h o u t F e e d a b a c k Gain 9 Vi = 0 . 6 ; //V , I n p u t S i g n a l w i t h F e e d a b a c k Gain 10 // C a l c u l a t i o n 11 Vo = Af * Vi ; 12 A = Vo / Vin ; 13 B =(( A / Af ) -1) / A ;
14 // D i s p l a y i n g The R e s u l t s i n Command Window
15 p r i n t f( ” \ n \ t The V a l u e o f t h e I n t e r n a l Gain A i s , A = %f . ” ,A ) ;
16 p r i n t f( ” \ n \ t The V a l u e o f t h e F e e d b a c k Gain B i s , B = %f p e r c e n t . ” ,B *100) ;
Scilab code Exa 12.3 Calculation of change in overall Gain of Feedback Amplifier 1 // Example 1 2 . 3 2 // Program t o C a l c u l a t e t h e c h a n g e i n o v e r a l l Gain o f t h e F e e d b a c k // A m p l i f i e r w i t h g i v e n Gain r e d u c t i o n 3 c l e a r all; 4 clc ; 5 c l o s e ; 6 // G i v e n C i r c u i t Data 7 A = 1 0 0 0 ; // 60dB , V o l t a g e Gain 8 B = 0 . 0 0 5 ; // N e g a t i v e F e e d b a c k