Scilab Textbook Companion for Principles of Electronics by V. K. Mehta and R. Mehta 1 Created by Kavan Hiteshbhai Patel B.Tech. (pursuing) Instrumentation Engineering Dharmsinh Desai University CollegeNA Teacher Cross-Checked by Chaitanya Potti May 15, 2014
1 Funded by a grant from the National Mission on Education through ICT, http://spoken-tutorial.org/NMEICT-Intro. This Textbook Companion and Scilab codes written in it can be downloaded from the ”Textbook Companion Project” section at the website http://scilab.in
Book Description Title: Principles of Electronics Author: V. K. Mehta and R. Mehta Publisher: S. Chand & Company, Ramnagar, New Delhi Edition: 9 Year: 2005 ISBN: 81-219-2450-2
1
Scilab numbering policy used in this document and the relation to the above book. Exa Example (Solved example) Eqn Equation (Particular equation of the above book) AP Appendix to Example(Scilab Code that is an Appednix to a particular
Example of the above book) For example, Exa 3.51 means solved example 3.51 of this book. Sec 2.3 means a scilab code whose theory is explained in Section 2.3 of the book.
2
Contents List of Scilab Codes
5
1 Introduction
17
2 Electron emission
33
3 Vacuum tubes
36
4 Vacuum tube rectifiers
42
5 Vacuum tube amplifiers
47
9 Semiconductor diode
52
10 Special purpose diodes
82
11 Transistors
86
12 Transistor biasing
106
13 Single stage transistor amplifiers
135
14 Multistage transistor amplifiers
158
15 Transistor audio power amplifiers
173
16 Amplifiers with negative feedback
183
17 Sinusoidal oscillations
199
3
18 Transistor tuned amplifiers
204
19 Modulation and demodulation
210
20 Regulated dc power supply
221
21 Solid state switching circuits
232
22 Field Effect Transistors
246
23 Silicon controlled rectifiers
254
24 Power electronics
260
25 Electronic instruments
262
26 Integrated circuits
270
27 Hybrid parameters
271
28 Digital electronics
280
4
List of Scilab Codes Exa 1.1 Exa 1.2 Exa 1.3 Exa 1.4 Exa 1.5 Exa 1.6 Exa 1.7 Exa 1.8 Exa 1.9 Exa 1.10 Exa 1.11 Exa 1.12 Exa 2.1 Exa 2.2 Exa 3.1 Exa 3.2 Exa 3.3 Exa 3.4 Exa 3.5 Exa 4.1 Exa 4.2
To find voltage drop in internal resistance and terminal voltage for lead acid battery . . . . . . . . . . . . . . . 17 Load current for dc source . . . . . . . . . . . . . . . . 18 Convert constant voltage source to constant current source Convert constant current source to equivalent voltage source . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 Power delivered to load by generator . . . . . . . . . . 20 Resistance required for maximum power transfer and power output . . . . . . . . . . . . . . . . . . . . . . . 22 Load for maximum power transfer and value of max imum power . . . . . . . . . . . . . . . . . . . . . . . . 23 Thevenin theorem . . . . . . . . . . . . . . . . . . . . 25 Thevenin equivalent circuit . . . . . . . . . . . . . . . 26 Load resistance for maximum power transfer . . . . . 27 Norton theorem . . . . . . . . . . . . . . . . . . . . . 29 Thevenin circuit and Norton circuit . . . . . . . . . . 30 Emission current of tungsten filament . . . . . . . . . 33 Work function of pure and contaminated tungsten . . 34 Plate voltage for desired plate current in a diode . . . 36 Mutual conductance of triode . . . . . . . . . . . . . . 37 Static characteristic of vacuum triode . . . . . . . . . 37 Plate current characteristic of triode . . . . . . . . . . 38 Tetrode vacuum tube . . . . . . . . . . . . . . . . . . 40 dc and rms currents and rectification efficiency of half wave rectifier . . . . . . . . . . . . . . . . . . . . . . . 42 ac voltage required and rec tification efficiency of half wave rectifier . . . . . . . . . . . . . . . . . . . . . . . 43
5
18
Exa 4.3 Exa 4.4 Exa 4.5 Exa 5.1 Exa 5.2 Exa 5.3 Exa 5.4 Exa 5.5 Exa 9.1 Exa 9.2 Exa 9.3 Exa 9.4 Exa 9.5 Exa 9.6 Exa 9.7 Exa 9.8 Exa 9.9 Exa 9.10 Exa 9.11 Exa 9.12 Exa 9.13 Exa 9.14 Exa 9.15 Exa 9.16 Exa 9.17 Exa 9.18 Exa 9.19 Exa 9.20 Exa 9.21 Exa 9.22 Exa 9.23 Exa 9.24 Exa 9.25 Exa 9.26
Ammeter and wattmeter readings of vacuum tube half wave rectifier . . . . . . . . . . . . . . . . . . . . . . . 44 ac power input and dc po wer output and rectification efficiency of full wave single phase rectifier . . . . . . . 44 dc and ac ammeter readings of full wave rectifier . . . 45 Voltage gain of triode amplifier . . . . . . . . . . . . . 47 Voltage gain Load current and Output voltage of triode amplifier . . . . . . . . . . . . . . . . . . . . . . . . . 47 Parameters of triode . . . . . . . . . . . . . . . . . . . 48 AC power developed in load . . . . . . . . . . . . . . . 49 Transformation ratio and power output . . . . . . . . 50 Check whether diodes are forward or reverse baised . . 52 Peak current through diode and peak output voltage . 53 Current through ideal diode . . . . . . . . . . . . . . . 55 Current through given resistor . . . . . . . . . . . . . 55 Current in given circuit . . . . . . . . . . . . . . . . . 56 Simplified model of diode . . . . . . . . . . . . . . . . 58 Simplified model of diode . . . . . . . . . . . . . . . . 59 Simplified model of diode . . . . . . . . . . . . . . . . 61 Rectification efficiency . . . . . . . . . . . . . . . . . . 61 Output dc voltage and PIV . . . . . . . . . . . . . . . 63 Crystal diode in half wave Required ac voltage . . . . rectifier . . . . . . .. .. ... . ... . ... . .. . . 64 63 Mean and rms load currents . . . . . . . . . . . . . . . 65 DC output voltage PIV and efficiency . . . . . . . . . 66 DC output voltage PIV and output frequency . . . . . 66 DC output voltage and PIV for ce ntre tap and bridge circuit . . . . . . . . . . . . . . . . . . . . . . . . . . . 67 Mean load current and power dissipated . . . . . . . . 69 Which is better power supply . . . . . . . . . . . . . . 70 DC output voltage . . . . . . . . . . . . . . . . . . . . 71 Output voltage Voltage drop and Zener current . . . . 71 Maximum and minimum zener current . . . . . . . . . 73 Required series resistance . . . . . . . . . . . . . . . . 74 Required series resistance . . . . . . . . . . . . . . . . 76 Required series resistance . . . . . . . . . . . . . . . . 76 Regulated output voltage and required series resistance 77 Required series resistance . . . . . . . . . . . . . . . . 78 6
Exa 9.27 Exa 9.28 Exa 10.1 Exa 10.2 Exa 10.3 Exa 10.4
Range of input for Zener circuit . . . . . . . . . . . . . 79 Design regulator and maximum wattage of zener . . . 80 Series resistor to limit current through LED . . . . . . 82 Current through LED . . . . . . . . . . . . . . . . . . 82 Dark resistance . . . . . . . . . . . . . . . . . . . . . 83 Reverse current through photo diode . . . . . . . . . . 84
Exa 10.5 Exa 11.1 Exa 11.2 Exa 11.3 Exa 11.4 Exa 11.5 Exa 11.6 Exa 11.7 Exa 11.8 Exa 11.9 Exa 11.10 Exa 11.11 Exa 11.12 Exa 11.13 Exa 11.14
Resonant frequency of LC tank circuit . . . . . . . . . 84 Voltage amplification of common base transistor . . . 86 Base current . . . . . . . . . . . . . . . . . . . . . . . 87 Base current . . . . . . . . . . . . . . . . . . . . . . . 88 Find value of alpha . . . . . . . . . . . . . . . . . . . 88 Total collector current . . . . . . . . . . . . . . . . . . 89 Base current . . . . . . . . . . . . . . . . . . . . . . . 89 Collector current and collector base voltage . . . . . . 90 Beta for various values of alpha . . . . . . . . . . . . . 91 Emitter current of transistor . . . . . . . . . . . . . . 92 Find collector current using given alpha and beta . . . 92 Base current of transistor . . . . . . . . . . . . . . . . 93 Collector emitter voltage and base current . . . . . . . 93 Alpha base current and emitter current . . . . . . . . 95 DC load line . . . . . . . . . . . . . . . . . . . . . . . 95
Exa 11.16 11.15 Exa Exa 11.17 Exa 11.18 Exa 11.19 Exa 11.20 Exa 11.21 Exa 12.1
DC load line and Q Operating point . . point . . . . .... . .. . . .. . . .. . . .. . . .. . . .. . . . . 9998 Input resistance of transistor . . . . . . . . . . . . . . 101 Output resistance of transistor . . . . . . . . . . . . . 101 Voltage gain of amplifier . . . . . . . . . . . . . . . . . 102 Saturation and cutoff points . . . . . . . . . . . . . . . 102 Maximum allowable collector current . . . . . . . . . . 103 Maximum collector current and zero signal collector current . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106 Maximum input signal . . . . . . . . . . . . . . . . . . 108 Operating point and base resistance . . . . . . . . . . 108 DC load line and operating point . . . . . . . . . . . . 109 Base resistance and zero signal collector current . . . . 112 Three currents for given circuit . . . . . . . . . . . . . 113 Required load resistance . . . . . . . . . . . . . . . . . 113 Operating point . . . . . . . . . . . . . . . . . . . . . 114 Required feedback resistor and new operating point . . 115
Exa 12.2 Exa 12.3 Exa 12.4 Exa 12.5 Exa 12.6 Exa 12.7 Exa 12.8 Exa 12.9
7
Exa 12.10 Exa 12.11 Exa 12.12 Exa 12.13 Exa 12.14
Base resistance . . . . . . . . . . . . . . . . . . . . . . 117 DC load lin e and opera ting point . . . . . . . . . . . . 117 Operating point by thevenin theorem . . . . . . . . . . 118 Value of collector current . . . . . . . . . . . . . . . . 120 Emitter current Collector emitter voltage and Collector potential . . . . . . . . . . . . . . . . . . . . . . . . . 122
Exa 12.15 Exa 12.16 Exa 12.17 Exa 12.18 Exa 12.19 Exa 12.20 Exa 12.21 Exa 12.22 Exa 12.23
R1 R2 and emitter resistance . . . . . . . . . . . . . . 123 R1 and collector resistance . . . . . . . . . . . . . . . 124 Emitter current . . . . . . . . . . . . . . . . . . . . . . 125 R1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126 Potential divider method of biasing . . . . . . . . . . . 127 Check whether circuit is mid point bias ed . . . . . . . 128 Check whether circuit is mid point bias ed . . . . . . . 130 Base current . . . . . . . . . . . . . . . . . . . . . . . 131 Collector cutoff current and p ercent change in zero signal collector current . . . . . . . . . . . . . . . . . . . 131 Exa 12.24 Base current at given temperature . . . . . . . . . . . 133 Exa 12.25 Fault in given circuit . . . . . . . . . . . . . . . . . . . 133 Exa 12.26 Fault in given circuit . . . . . . . . . . . . . . . . . . . 134 Exa 13.1 Phenomenon of phase reversal . . . . . . . . . . . . . 135 Exa 13.2 dc and ac load and collector emitter voltage and collecExa 13.3 Exa 13.4 Exa 13.5 Exa 13.6 Exa 13.7 Exa 13.8 Exa 13.9 Exa 13.10 Exa 13.11 Exa 13.12 Exa 13.13 Exa 13.14 Exa 13.15 Exa 13.16 Exa 13.17 Exa 13.18
tor current . . . . . . . point . . . . and . . . .AC . . load . . . .line . . . 137 DC load line. operating . . . 138 DC and AC load lines . . . . . . . . . . . . . . . . . . 140 ac load line . . . . . . . . . . . . . . . . . . . . . . . . 142 Voltage gain . . . . . . . . . . . . . . . . . . . . . . . 145 Output voltage for given circuit . . . . . . . . . . . . . 145 Various parameters for given transistor amplifier . . . 147 Output voltage for given circuit . . . . . . . . . . . . . 148 Check operation of circuit . . . . . . . . . . . . . . . . 149 AC emitter resistance . . . . . . . . . . . . . . . . . . 149 Voltage gain . . . . . . . . . . . . . . . . . . . . . . . 150 Voltage gain . . . . . . . . . . . . . . . . . . . . . . . 151 Input impedence . . . . . . . . . . ...... ..... 151 Understanding of various parameters . . . . . . . . . . 152 Required input signal voltage . . . . . . . . . . . . . . 153 Output voltage and power gain . . . . . . . . . . . . . 153 Required input signal voltage and current and power gain 155 8
Exa 14.1 Exa 14.2 Exa 14.3 Exa 14.4 Exa 14.5 Exa 14.6 Exa 14.7 Exa 14.8 Exa 14.9 Exa 14.10 Exa 14.11 Exa 14.12 Exa 14.13
Gain in db . . . . . . . . . . . . . . . . . . . . . . . . 158 Gain as a number . . . . . . . . . . . . . . . . . . . . 158 Total voltage gain in db . . . . . . . . . . . . . . . . . 159 Total gain of amplifier and resultant gain with negative feedback . . . . . . . . . . . . . . . . . . . . . . . . . 160 Fall in gain . . . . . . . . . . . . . . . . . . . . . . . . 160
Exa 14.17 Exa 14.18
Output voltage of amplifier . . . . . . . . . . . . . . . 161 Find minimum value of load resistance . . . . . . . . . 161 Output voltage and load power . . . . . . . . . . . . . 162 Bandwidth and cutoff frequencies . . . . . . . . . . . . 163 Overall gain for cascade stages . . . . . . . . . . . . . 164 Voltage gain of indiv idual stages and overall voltage gain 165 Voltage gain of single stage . . . . . . . . . . . . . . . 166 Biasing potential and replacement of coupling capacitor by a wire . . . . . . . . . . . . . . . . . . . . . . . . . 166 Voltage gain of indiv idual stages and overall voltage gain 167 Turns ratio for maxim um power transfer . . . . . . . . 169 Turns ratio for maximum power transfer and voltage across load . . . . . . . . . . . . . . . . . . . . . . . . 170 Turns ratio for maxim um power transfer . . . . . . . . 170 Required primary and secondary inductance . . . . . . 171
Exa 14.19 Exa 15.1 Exa 15.2 Exa 15.3 Exa 15.4 Exa 15.5 Exa 15.6 Exa 15.7 Exa 15.8 Exa 15.9 Exa 15.10 Exa 15.11 Exa 15.12 Exa 16.1 Exa 16.2 Exa 16.3 Exa 16.4
Required primary secondary maximum collectorand current . . . .turns . . . . .. .. . . .. . . .. . . . . 173172 Maximum collector current . . . . . . . . . . . . . . . 174 AC output voltage and current . . . . . . . . . . . . . 174 Output power input power and efficiency . . . . . . . 175 Collector efficiency and power rating of transistor . . . 177 Maximum ac power output . . . . . . . . . . . . . . . 177 AC power output power rating and collector efficiency 178 Power transferred to loudspeaker and turns ratio . . . 178 Parameters for common emitter class A amplifier . . . 179 Maximum ambient temperature . . . . . . . . . . . . . 180 Maximum permissible power dissipation . . . . . . . . 181 Allowed collector current . . . . . . . . . . . . . . . . 182 voltage gain with feedback . . . . . . . . . . . . . . . 183 fraction of output fed back to input . . . . . . . . . . 184 find required gain and feedback fraction . . . . . . . . 184 gain without feedback and feedback fraction . . . . . . 185
Exa 14.14 Exa 14.15 Exa 14.16
9
Exa 16.5 Exa 16.6 Exa 16.7 Exa 16.8 Exa 16.9 Exa 16.10
reduction in gain with and witout feedback . . . . . . 185 percent change in gain . . . . . . . . . . . . . . . . . . 186 Voltage gain with negative feedback . . . . . . . . . . 187 overall gain and output voltage . . . . . . . . . . . . . 188 parameters for given circuit . . . . . . . . . . . . . . . 189 distortion of amplifier with feedback . . . . . . . . . . 190
Exa 16.11 Exa 16.12 Exa 16.13 Exa 16.14 Exa 16.15 Exa 16.16 Exa 16.17 Exa 16.18 Exa 16.19 Exa 16.20 Exa 17.1 Exa 17.2 Exa 17.3 Exa 17.4 Exa 17.5
cutoff frequencies . . . . . . . . . . . . . . . . . . . . . 190 effective current gain . . . . . . . . . . . . . . . . . . . 191 input impedence of amplifier . . . . . . . . . . . . . . 192 output impedence of amplifier . . . . . . . . . . . . . . 192 bandwidth of amplifier . . . . . . . . . . . . . . . . . . 193 dc load line . . . . . . . . . . . . . . . . . . . . . . . . 193 voltage gain of emitt er follower . . . . . . . . . . . . . 194 voltage gain of emitt er follower . . . . . . . . . . . . . 196 input impedence of emitter follower . . . . . . . . . . 196 output impedence of emitter follower . . . . . . . . . . 197 Frequency of oscillations for radio . . . . . . . . . . . 199 Colpitt oscillator . . . . . . . . . . . . . . . . . . . . . 199 Hartley oscillator . . . . . . . . . . . . . . . . . . . . . 200 Phase shift oscillator . . . . . . . . . . . . . . . . . . . 201 Wien bridge oscillator . . . . . . . . . . . . . . . . . . 201
Exa 17.7 17.6 Exa Exa 18.1 Exa 18.2 Exa 18.3 Exa 18.4
Frequency and thickness of crystal . . .... .... .... .... .. 202 Series and parallel resonant frequency 202 Parameters of parallel resonant circuit . . . . . . . . . 204 Parameters of parallel resonant circuit . . . . . . . . . 205 Bandwidth and cutoff frequency for tuned amplifier . . 205 Resonant frequency and Q and bandwidth of tuned amplifier . . . . . . . . . . . . . . . . . . . . . . . . . . . 206 coefficient of coupling for double tuned circuit . . . . . 207 Resonant frequency and ac and dc loads for given circuit 207 ac load and maximum load power for given circuit . . 208 Modulation factor . . . . . . . . . . . . . . . . . . . . 210 Modulation factor . . . . . . . . . . . . . . . . . . . . 210 modulation factor . . . . . . . . . . . . . . . . . . . . 211 Required bandwidth for RF amplifier . . . . . . . . . . 212 Frequency components and amplitudes in AM wave . . 212 Frequency and amplitude of sideband terms . . . . . . 213 Power of sidebands and modulated wave . . . . . . . . 214
Exa 18.5 Exa 18.6 Exa 18.7 Exa 19.1 Exa 19.2 Exa 19.3 Exa 19.4 Exa 19.5 Exa 19.6 Exa 19.7
10
Exa 19.8 Exa 19.9 Exa 19.10 Exa 19.11 Exa 19.12 Exa 19.13
Total sideband power . . . . . . . . . . . . . . . . . . Carrier power after modulation and audio power Sideband frequencies and bandwidth . . . . . . . . Antenna current . . . . . . . . . . . . . . . . . . . . . Percentage modulation . . . . . . . . . . . . . . . . . . Modulation index . . . . . . . . . . . . . . . . . . . .
Exa 19.14 Exa 20.1 Exa 20.2 Exa 20.3 Exa 20.4 Exa 20.5 Exa 20.6 Exa 20.7 Exa 20.8 Exa 20.9 Exa 20.10 Exa 20.11 Exa 20.12
Sideband components and total power . . . . . . . . . 219 Percentage voltage regulation . . . . . . . . . . . . . . 221 Full load voltage . . . . . . . . . . . . . . . . . . . . . 222 Better power supply . . . . . . . . . . . . . . . . . . . 222 Voltage regulation and minimum load resistance . . . 223 Various currents for Zener regulator . . . . . . . . . . 224 Required series resistance . . . . . . . . . . . . . . . . 225 Load voltage and load current . . . . . . . . . . . . . . 226 Design of series voltage regulator . . . . . . . . . . . . 226 Output voltage and Zener current . . . . . . . . . . . 227 Regulated output voltage . . . . . . . . . . . . . . . . 229 Closed loop voltage gain . . . . . . . . . . . . . . . . . 230 Regulated voltage and various currents for shunt regulator . . . . . . . . . . . . . . . . . . . . . . . . . . . . 231 Voltage required to saturate transistor . . . . . . . . . 232
Exa 21.1 Exa 21.2 Exa 21.3
215 . . . 215 . . 216 217 218 218
Time of square . . . . .of. dif. 233 Effectperiod of RC and timefrequency constant and outputwave waveform ferentiating circuit . . . . . . . . . . . . . . . . . . . . 233 Exa 21.4 Output voltage of differentiating circuit . . . . . . . . 234 Exa 21.5 Peak output voltage . . . . . . . . . . . . . . . . . . . 236 Exa 21.6 Peak output voltage . . . . . . . . . . . . . . . . . . . 236 Exa 21.7 Output voltage and voltage across resistor . . . . . . . 238 Exa 21.8 Output voltage for each input alterations . . . . . . . 239 Exa 21.9 Purpose of series resistance . . . . . . . . . . . . . . . 241 Exa 21.10 Sketch output waveform . . . . . . . . . . . . . . . . . 242 Exa 21.11 Sketch output waveform . . . . . . . . . . . . . . . . . 243 Exa 22.1 Equation of drain current . . . . . . . . . . . . . . . . 246 Exa 22.2 Value of drain current . . . . . . . . . . . . . . . . . . 246 Exa 22.3 Gate source voltage and pinchoff voltage . . . . . . . . 247 Exa 22.4 Resistance between gate and source . . . . . . . . . . 247 Exa 22.5 Transconductance . . . . . . . . . . . . . . . . . . . . 248
11
Exa 22.6
AC drain resistance transconductance and amplification factor . . . . . . . . . . . . . . . . . . . . . . . . . . . 248 Exa 22.7 Rs and Rd . . . . . . . . . . . . . . . . . . . . . . . . 249 Exa 22.8 Rs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 250 Exa 22.9 Voltage amplification . . . . . . . . . . . . . . . . . . 251 Exa 22.10 Drain source voltage and gate sourc e voltage . . . . . 252 Exa 22.11 Exa 23.1 Exa 23.2 Exa 23.3 Exa 23.4
Exa 23.6 Exa 23.7 Exa 24.1 Exa 24.2 Exa 25.1 Exa 25.2 Exa 25.3
DC voltage of drain and source for each stage . . . . . 252 SCR specifications . . . . . . . . . . . . . . . . . . . . 254 Fuse rating of SCR . . . . . . . . . . . . . . . . . . . . 255 Maximum allowable duration of surge . . . . . . . . . 256 Firing angle conduction angle and average current of half wave rectifier employing SCR . . . . . . . . . . . 256 Firing angle average output voltage average current and power output of half wave rectifier . . . . . . . . . . . 257 Off duration of SCR . . . . . . . . . . . . . . . . . . . 258 DC output voltage and load current for full wave rectifier 259 Values of RB1 and RB2 . . . . . . . . . . . . . . . . . 260 Standoff voltage and peak point voltage . . . . . . . . 260 Sensitivity of multimeter . . . . . . . . . . . . . . . . 262 Limitation of multimeter . . . . . . . . . . . . . . . . 262 Reading of multimeter in given circuit . . . . . . . . . 263
Exa 25.5 25.4 Exa Exa 25.6 Exa 25.7 Exa 25.8 Exa 25.9 Exa 26.1 Exa 27.1 Exa 27.2 Exa 27.3 Exa 27.4 Exa 27.5 Exa 27.6 Exa 27.7 Exa 28.1 Exa 28.2 Exa 28.3
Reading ofbefore multimeter . . .connecting . . . . . . . the . . . .meter . . . . . . 264 Readings and after . . 266 Spot shift . . . . . . . . . . . . . . . . . . . . . . . . . 267 Voltage applied to CRT . . . . . . . . . . . . . . . . . 268 Voltage for given deflection . . . . . . . . . . . . . . . 268 Find unknown frequencies . . . . . . . . . . . . . . . . 269 LM 317 voltage regulator . . . . . . . . . . . . . . . . 270 h parameters . . . . . . . . . . . ...... ...... 271 h parameters . . . . . . . . . . . ...... ...... 272 Input impedence and voltage gain of given circuit . . . 275 Input impedence current gain and voltage gain . . . . 276 Input impedence current gain and voltage gain . . . . 277 AC input impedence and voltage gain . . . . . . . . . 278 h parameters . . . . . . . . . . . ...... ...... 279 Convert decimal number to binary . . . . . . . . . . . 280 Convert decimal number to binary . . . . . . . . . . . 280 Convert binary number to decimal . . . . . . . . . . . 281
Exa 23.5
12
Exa 28.4 Exa 28.5 Exa 28.6 Exa 28.7 Exa 28.8 Exa 28.9
Obtain truth table for given circuit . . . . . . . . . . . Obtain truth table for given circuit . . . . . . . . . . . Simplify using Boolean techniques . . . . . . . . . . . Simplify using Boolean techniques . . . . . . . . . . . Simplify to minimum number of literals . . . . . . . . Determine output expression for given circuit . . . .
Exa 28.10 Exa 28.11 Exa 28.12 Exa 28.13
Find complement of given expressions Simplify given Boolean expressions . . Simplify given Boolean expression . . Simplify given Boolean expression . .
13
281 282 283 283 284 . 285
. . . . . . . . . 285 . . . . . . . . . 286 . . . . . . . . . 287 . . . . . . . . . 288
List of Figures 1.1 Convert constant voltage source to constant current source . 20 1.2 Convert constant current source to equivalent voltage source 21 1.3 Resistance required for maximum power transfer and power output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 1.4 Load for maximum power transfer and value of maximum power 24 1.5 Thevenin theorem . . . . . . . . . . . . . . . . . . . . . . . . 26 1.6 Thevenin equivalent circuit . . . . . . . . . . . . . . . . . . . 28 1.7 Load resistance for maximum power transfer . . . . . . . . . 29 1.8 Norton theorem . . . . . . . . . . . . . . . . . . . . . . . . . 31 1.9 Thevenin circuit and Norton circuit . . . . . . . . . . . . . . 32 5.1 Transformation ratio and power output . . . . . . . . . . . . 9.1 9.2 9.3 9.4 9.5 9.6 9.7 9.8 9.9 9.10 9.11
51
Peak current through diode and peak output voltage . . . . 54 Current through ideal diode . . . . . . . . . . . . . . . . . . 56 Current through given resistor . . . . . . . . . . . . . . . . . 57 Current in given circuit . . . . . . . . . . . . . . . . . . . . . 58 Simplified model of diode . . . . . . . . . . . . . . . . . . . . 59 Simplified model of diode . . . . . . . . . . . . . . . . . . . . 60 Simplified model of diode . . . . . . . . . . . . . . . . . . . . 62 DC output voltage . . . . . . . . . . . . . . . . . . . . . . . 72 Output voltage Voltage drop and Zener current . . . . . . . 73 Maximum and minimum zener current . . . . . . . . . . . . 75 Required series resistance . . . . . . . . . . . . . . . . . . . . 79
11.1 Voltage amplification of common base transist or . . . . . . . 11.2 Base current . . . . . . . . . . . . . . . . . . . . . . . . . . . 90 11.3 Base current of transistor . . . . . . . . . . . . . . . . . . . . 94 11.4 Alpha base current and emitter curr ent . . . . . . . . . . . . 14
87
96
11.5 11.6 11.7 11.8
DC load line . . . . . . . . . . . . . . . . DC load line . . . . . . . . . . . . . . . . DC load lin e and Q point . . . . . . Saturation and cutoff points . . . . .
.. .. .. .. .. . .. .. .. .. .. . ... ... ... ... ... ... ... ...
97 98 . .
100 104
12.1 Maximum collector current and zero signal collector current 12.2 12.3 12.4 12.5 12.6 12.7 12.8
107
Operating point resistan 110 DC load line andand operbase ating point ce. .... .. .. .. . . .... .. .. .. . . .... 111 Required load resistance . . . . . . . . . . . . . . . . . . . . 115 DC load line and oper ating point . . . . . . . . . . . . . . . 119 Operating point by theve nin theorem . . . . . . . . . . . . . 121 Emitter current . . . . . . . . . . . . . . . . . . . . . . . . . 126 Check whether circuit is mid point biased . . . . . . . . . . 129
13.1 Phenomenon of phase rev ersal . . . . . . . . . . . . . . . . . 137 13.2 dc and ac load and collector emitter voltage and colle ctor current . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138 13.3 DC load line operati ng point and AC load line . . . . . . . . 139 13.4 DC load line operati ng point and AC load line . . . . . . . . 141 13.5 DC and AC loa d lines . . . . . . . . . . . . . . . . . . . . . 143 13.6 ac load line . . . . . . . . . . . . . . . . . . . . . . . . . . . 146 13.7 Required input signal voltage . . . . . . . . . . . . . . . . . 154 13.8 Output voltage and p ower gain . . . . . . . . . . . . . . . . 155 13.9 Required input signal volt age and current and power gain . . 157 15.1 Output power input power and efficiency . . . . . . . . . . .
176
16.1 Voltage gain with negative feedback . . . . . . . . . . . . . . 187 16.2 Voltage gain with negative feedback . . . . . . . . . . . . . . 188 16.3 dc load line . . . . . . . . . . . . . . . . . . . . . . . . . . . 195 18.1 Resonant frequency and ac and dc loads for given circuit . .
209
19.1 Carrier power after modulation and audio power . . . . . . . 216 19.2 Sideband components and total power . . . . . . . . . . . . 220 20.1 Percentage voltage regulation . . . . . . . . . . . . . . . . . 221 20.2 Design of series volt age regulator . . . . . . . . . . . . . . . 226 20.3 Design of series volt age regulator . . . . . . . . . . . . . . . 228 20.4 Output voltage and Zener curre nt . . . . . . . . . . . . . . . 15
228
20.5 Regulated output voltage . . . . . . . . . . . . . . . . . . . . 229 20.6 Closed loop voltage gain . . . . . . . . . . . . . . . . . . . . 230 20.7 Regulated voltage and various currents for shunt regulator . 231 21.1 Effect of RC time constant and output waveform of differentiating circuit . . . . . . . . . . . . . . . . . . . . . . . . . . 235 21.2 21.3 21.4 21.5 21.6 21.7 21.8 21.9
Peak output output voltage voltage .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. 238 237 Peak Output voltage and voltage across resist or . . . . . . . . . . 239 Output voltage for each input alterati ons . . . . . . . . . . . 241 Sketch output waveform . . . . . . . . . . . . . . . . . . . . 242 Sketch output waveform . . . . . . . . . . . . . . . . . . . . 243 Sketch output waveform . . . . . . . . . . . . . . . . . . . . 244 Sketch output waveform . . . . . . . . . . . . . . . . . . . . 245
25.1 Limitation of multimeter . . . . . . . . . . . . . . . . . . . . 264 25.2 Reading of multimeter in given circuit . . . . . . . . . . . . 265 27.1 27.2 27.3 27.4
h h h h
parameters parameters parameters parameters
... ... ... ...
... ... ... ...
... ... ... ...
... ... ... ...
16
... ... ... ...
... ... ... ...
... ... ... ...
... ... ... ...
.. .. .. ..
271 273 273 275
Chapter 1 Introduction
Scilab code Exa 1.1 To find voltage drop in internal resistance and termi-
nal voltage for lead acid battery 1 2 3 4 5 6 7 8 9
// chapter 1 //ex am pl e 1.1 //page8 Eg=24 // V Ri=.01 // ohm P=100 // W
// we know tha t P=Eg ∗ I si nc e fo r ide al s o u r c e , V is eq uiv ale nt t o Eg
I=P/Eg
10 Vi=I*Ri 11 V=Eg-(I*Ri) 12 13 printf ( ” vol tag e d ro p in internal resistance \n ” ,Vi) 14 printf ( ” terminal voltage = %.3 f V” ,V )
17
= %.3 f V
Scilab code Exa 1.2 Load current for dc source
1 2 3 4 5 6 7 8 9 10 11 12 13 14
// cha pte r1 // example1 .2 //page10
15 16 17 18 19 20 21
I2=Eg/(Rl2+Ri) printf ( ”load current
Eg=500 // V Ri=1000 // ohm
// fo r Rl= 10 o hm Rl1=10 // ohm I1=Eg/(Rl1+Ri) printf ( ”load current
for
Rl= 10ohm is %.3 f A
\n ” ,I1)
for
Rl= 50ohm is %.3 f A
\n ” ,I2)
for
Rl= 100ohm is %.3 f A”
// fo r Rl= 10 o hm Rl2=50 // ohm
// fo r Rl= 10 o hm Rl3=100 // ohm I3=Eg/(Rl3+Ri) printf ( ”load current
,I3)
Scilab code Exa 1.3 Convert constant voltage source to constant current
source 1 // cha pte r1
18
2 3 4 5 6 7
// example1 .3 //page11 // V // ohm
V=10 R=10
8 I=V/R
AB
sh or t − circu it cu rr ent b y shor tin g
// calculate
9 printf ( ” equivalent curre nt sourc e ha s ma gn it ud e = % .3 f A” ,I ) 10 11 // no loa d is co nne ct ed across A B a nd 10V source ha s
negligi
ble
res ist ance
12 // so resistance acr oss A B i s 10 o hm 13 14 // th e con sta nt volt age sou rce when co nv er te d to
co ns ta nt cu rre nt so ur ce will t hu s ha ve a so ur ce of 1 A i n parallel w i t h resistor of 10 o hm
Scilab code Exa 1.4
Convert constant current source to equivalent voltage
source 1 2 3 4 5 6 7 8
// cha pte r1 // example1 .4 //page12 I =6 // mA R =2 // kil o ohm V=I*R
// by ohm law
9 printf ( ” voltage
of voltage
sourc e = %.3 f V” 19
,V )
Figure 1.1: Convert constant voltage source to constant current source 10 11 // this
vol tag e so ur ce w hen co nn ec te d in seri es w i t h
2 0 0 0 o hm gives equiv alent volt age gi ve n co nst ant cur ren t sou rce
sour ce for
Scilab code Exa 1.5 Power delivered to load by generator
1 // cha pte r1 2 // example1 .5 3 //page13 4 5 E=200
// V 20
th e
Figure 1.2: Convert constant current source to equivalent voltage source 6 Ri=100 7 8 9 10 11 12 13
14 15 16 17 18 19 20
// ohm
Rl=100 // fo r load =100ohm I=E/(Ri+Rl) Pl=I^2*Rl Pt=I^2*(Rl+Ri) efficiency=(Pl/Pt)*100 printf ( ” for load= 100 o hm, pow er deli vere d to load = % .3 f W a nd ef fi ci en cy= %.3 f percentage \n \n ” ,Pl, efficiency) Rl=300 // fo r loa d =300ohm I=E/(Ri+Rl) Pl=I^2*Rl Pt=I^2*(Rl+Ri) efficiency=(Pl/Pt)*100 printf ( ” for load= 300 o hm, pow er deli vere d to load = %
.3 f W a nd ef fi ci en cy= %.3 f percentage 21
\n \n ” ,Pl,
efficiency) 21 22 printf ( ”comment : \n ” ) 23 printf ( ” i f lo ad resist ance
is e qu al t o inte rnal re si st an ce ,m aximum po we r i s \n transferre d bu t efficiency is l ow \n ” )
24 printf ( ” i f lo ad resistance
resistance efficiency
is more t h a n internal , power transferred \n is le ss b ut is h i g h” )
Scilab code Exa 1.6 Resistance required for maximum power transfer and
power output 1 2 3 4 5
// cha pte r1 // example1 .6 //page14
// for maximum po wer trans fer , res is ta nc e of load ampl ifier sho uld match 6 //so we take load= 15 o hm 7 8 9 10 11 12 13 14 15 16
and
Rl=15 // ohm Ri=15 // ohm V=12 // V Rt=Rl+Ri I=V/Rt P=I^2*Rl printf ( ” for
maximum po we r tr an sf er load must equal ampl ifie r resist ance \ ns o required load = % d o hm \ n \n ” ,Rl)
17 printf ( ”po wer del iver ed
to load = %.3 f W” 22
,P )
Figure 1.3: Resistance required for maximum power transfer and power output
Scilab code Exa 1.7 Load for maximum power transfer and value of max-
imum power 1 2 3 4 5 6 7
// cha pte r1 // example1 .7 //page14 V=50 // V Rl=100 // ohm Zi=100+50*%i
23
Figure 1.4: Load for maximum p ower transfer and value of maximum powe r 8 // fo r maximum po we r tr an sf er
be co nj ug at e of inte rnal 9 10 11 12 13 14 15 16 17 18
load imp ed enc e should resist ance s o
Zl=100-50*%i Zt=Zi+Zl I=V/Zt P=I^2*Rl printf ( ” load disp (Zl)
fo r maximum pow er ( in ohms)= ” )
printf ( ”maximum pow er tr an s fe re d to loa d=%.3 f W” ,P )
24
Scilab code Exa 1.8 Thevenin theorem
1 2 3 4 5 6 7 8 9 10
// cha pte r1 // example1 .8 //page16 R =8 // ohm R1=10 // ohm R2=20 // ohm R3=12 // ohm Rl=100 // ohm
//re mo vi ng 10 0 ohm resistan ce , we form lin ear equati ons by as su mi ng currents I1 th ro ug h loo p1 and I2 th ro ug h loo p2
11 12 //100=10 ∗ I1 +20 ∗( I1 −I 2 ) 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
//0=(12+8)
∗ I 2 +20 ∗( I 2 −I 1 )
// th us w e ge t th e following
linea r equ ati ons
//30 ∗ I 1 −20∗ I2=100 // −20∗ I1+40 ∗ I2=0 // solving the se equ ati ons a=[30 -2 0;- 20 40 ] b=[100;0] x = inv (a)*b / / m at ri x of I1 and I2 I2=x(2,1)
/ / cur ren t th ro ug h 8 o hm res is tor
E0=I2*R
28 printf ( ” voltage
across
AB wi th 10 0 ohm res ist anc e 25
Figure 1.5: Thevenin theorem no t conn ect ed = %.3 f V
\n ” ,E0)
29 30 R_equi=(R1*R2/(R1+R2))+R3 31 R0=R_equi*R/(R_equi+R) 32 printf ( ” re si st an ce be tw ee n AB wit h 10 0 ohm re mo ve d and voltage sourc e short ed = %.3 f ohm \n ” ,R0) 33 34 I=E0/(R0+Rl) 35 printf ( ” current thr oug h 10 0 ohm re si st or = %.3 f A” )
Scilab code Exa 1.9 Thevenin equivalent circuit
26
,I
1 2 3 4 5 6
// cha pte r1 //exzmple1 .8 //page16 R1=1 R2=1
// kil o ohm // kil o ohm
7 R3=1 // kil o ohm 8 V=20 // V 9 10 E0=(R3/(R1+R2))*V
/ / the ve nin volt across R3 since A a nd B are open means no dr op acros s R2 11 R0=R2+(R1*R3/(R1+R3)) / / th ev en in resi sta nce be tw ee n A a nd B wi th volt age sour ce sho rt ed
age = voltage circui ted wh ich resistance = no loa d and
12 13 printf ( ”theve nin
voltage = %.2 f V \ nthevenin resi sta nce = %.2 f kil o ohm” ,E0,R0)
Scilab code Exa 1.10 Load resistance for maximum power transfer
1 2 3 4 5 6 7 8 9
// cha pte r1 //example1 .1 0 //page18 V=120 R1=40 R2=20 R3=60
// // // //
V ohm ohm ohm
10 //re mo vi ng lo ad , voltage
across 27
AB is
Figure 1.6: Thevenin equivalent circuit 11 E0=R2*V/(R1+R2) 12 13 // replacin
g voltage l o a d , resistance
source by short acr oss A B is
14 R0=R3+(R1*R2/(R1+R2)) 15 16 // fo r maximum po we r tra nsf er , load
resistance
and re mo vi ng
must be equal
to
acr oss A B so
17 Rl=R0 18 19 P=E0^2/(4*Rl) 20 printf ( ”load
res ist anc e for maximum po wer tra nsfe r = %.3 f ohm \n ” ,Rl) 21 printf ( ”maximum powe r to lo ad = %.3 f W” ,P )
28
Figure 1.7: Load resistance for maximum power transfer
Scilab code Exa 1.11 Norton theorem
1 2 3 4 5 6 7 8 9 10
// cha pte r1 //example1 .1 1 //page20 R1=4 R2=6 R3=5 R4=8 V=40
// // // // //
ohm ohm ohm ohm V
11 // loa d is
removed and A a nd B are 29
short ed
12 load_source=R1+(R2*R3/(R2+R3)) 13 source_current=V/load_source 14 15 norton_current=source_current*(R2/(R2+R3))
/ / shor t
circu it cu rr en t in AB 16 17 printf ( ” sho rtci rcui t curr ent in AB = %.3 f A norton_current) 18 19 / / lo ad is removed an d bat ter y is repl aced by a
\n ” ,
short 20 norton_resistance=R3+(R1*R2/(R1+R2)) 21 printf ( ”norto n res is ta nc e= %.3 f ohm \n” , norton_resistance) 22 23 / / eq ui va le nt circuit is n or t o n cu rr en t so ur ce in
paral lel
w i t h no rt on resistance
24 I=norton_current*(norton_resistance/( norton_resistance+R4)) // current
resistance 25 printf ( ” current
thr oug h 8 o hm
thr oug h 8ohm re si st or = %.3 f A”
,I )
Scilab code Exa 1.12 Thevenin circuit and Norton circuit
1 2 3 4 5
// ch ap te r 1 // ex am pl e 1.12 // pa ge 21 printf ( ”To find
find
No rto n equiv alent cir cui t we ne ed to \ nN orton curren t I N and No rt on res ist anc e
R N \n \n ” ) 30
Figure 1.8: Norton theorem
31
Figure 1.9: Thevenin circuit and Norton circuit 6 printf ( ” If
Th ev en in re si st nc e = Ro and Th ev en in voltage = Eo then \n \n ” )
7 printf ( ”To conv ert Th ev en in ci rc ui t to Nor ton circuit , \n” ) 8 printf ( ” I N=Eo/R o and R N=Ro \n \n ” ) 9 printf ( ”To conv ert Nor ton ci rc ui t to The ven in circuit , \n” ) 10 printf ( ”Eo=I N ∗R N and Ro=R N \n ” )
32
Chapter 2 Electron emission
Scilab code Exa 2.1 Emission current of tungsten filament
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
// chapter 2 //ex am pl e 2.1 //pag e 29 A=60.2d4 // ampere pe r squ are m pe r squ are T=2500 // kelvin phi=4.517 // eV d=0.01d-2 // m l=5d-2 // m
kelvin
b=11600*phi Js=A*T^2* exp (-b/T) a=%pi*d*l emission_current=Js*a printf ( ” emis sio n cur ren t=%f A” ,emission_current)
33
Scilab code Exa 2.2 Work function of pure and contaminated tungsten
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
// Ch ap te r 2 // ex am pl e 2.2 // pa ge 29 Js=0.1 // am pe re per squar e cm A=60.2 // ampere pe r squ are c m pe r squ are T=1900 // kelvin
kelvin
// Js=A ∗Tˆ 2∗ exp( −b/ T) so b= −T∗ lo g ( Js /(A ∗Tˆ2 ) ) b=-T* log (Js/(A*T^2))
// b=11 600 ∗ ph i so making ph i as subjec t phi=b/11600 printf ( ”wo rk fun cti on= %f eV \n ” ,phi) / / th e acc ura te an s w e r is 3. 521 466 / / bu t in th e book it is mi st ak en ly wr itt en a s 3. 56 if (2 .63
be tw ee n 2.63e V to 4.52e V. \nSo sa mp le is like ly t o be thor iate d tings ten ” ) 22 elseif (phi <=2.63 | ph i >4.52) 23 printf ( ”tungs ten is
co nt am in at ed” ) // for pu re tu ng st en , ph i must be 4.52 exactly
24 else printf ( ”tun gs te n is 25
pu r e” )
tu ng st en is pu r e 26 end
34
// phi =4 .5 2 impl ies
27 28 / / ple ase
n o t e th at th er e is err or in t h e a n s w e r of work funct ion ph i in th e book 29 // T he correct an sw e r is 3. 521 46 6 eV an d n ot 3.5 6 eV
35
Chapter 3 Vacuum tubes
Scilab code Exa 3.1 Plate voltage for desired plate current in a diode
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
// cha pte r3 // example3 .1 //page41 Ib1=10 // mA Eb1=100 // V Ib2=20 // mA
// Ib is pro port iona l t o E bˆ (3 /2 ) // so we can sa y Ib 1/ Ib2 = Eb1ˆ1.5/Eb // thus we ca n write
2ˆ1.5
log_Eb2=(2/3)* log (Eb1^1.5*Ib2/Ib1) Eb2= exp (log_Eb2) printf ( ” required plate voltage = %.3 f V”
36
,Eb2)
Scilab code Exa 3.2 Mutual conductance of triode
1 2 3 4 5 6 7 8 9 10
// cha pte r3 // example3 .2 //page49 mu=20 rp=8000
// ohm
gm=mu/rp // si nc e mu=rp ∗gm gm_micro=gm*10^6 // micro mho printf ( ”mu tu al con duc tan ce of f micro mho” ,gm,gm_micro)
trio de = % f m ho or % .3
Scilab code Exa 3.3 Static characteristic of vacuum triode
1 2 3 4 5 6 7 8 9 10 11 12
// cha pte r3 // example3 .3 //page49 // for
con sta nt Ec= −1.5
Eb1=100 // V Eb2=150 // V Ib1=7.5d-3 // A Ib2=12d-3 // A Eb_diff=Eb2-Eb1 Ib_diff=Ib2-Ib1
37
13 14 rp=Eb_diff/Ib_diff 15 rp_kilo_ohm=rp/10^3 // ki l o ohm 16 17 printf ( ” plate res ist anc e = %.3 f ohm or % .3 f kil o ohm \n ” ,rp,rp_kilo_ohm) 18 19 20 21 22 23 24 25 26 27 28 29 30
// for
constant
Eb=150
Ib1=5d-3 // A Ib2=12d-3 // A Ec1=-3 // V Ec2=-1.5 // v Ib_diff=Ib2-Ib1 Ec_diff=Ec2-Ec1 gm=Ib_diff/Ec_diff gm_micro_mho=gm*10^6 // micro mho printf ( ”mutual conduct ance= %.3 f mho or %.3 f micro mho \n” ,gm,gm_micro_mho)
31 32 mu=rp*gm 33 printf ( ” ampl ifica tion facto r = %.3 f ” 34 35 // in book th e a ns we r of amplification
51 .8 52 is ro u n d e d off
,mu)
factor
t o 52
Scilab code Exa 3.4 Plate current characteristic of triode
1 // cha pte r3 2 // example3 .4 3 //page50 4
38
i .e.
5 6 7 8 9 10
Eb=250 // V Ec=-3 // V
// given that Ib =0 .00 3 ∗ (Eb+30 ∗Ec) ˆ1 .5 mA // di ff er en ti at in g w. r . t Ec wi th Eb=co nst ant , we get gm=0.003*1.5*(Eb+30*Ec)^0.5*30*10^-3
11 mutual_inductance_micro=gm*10^6 12 13 printf ( ”mu tu al condu ctanc e = % f mho or %.3 f mic ro mho \n” ,gm,mutual_inductance_micro) 14 15 // di ffe ren tia tin g giv en eq uat ion w. r . t Ec w it h Ib =
con stan t , we get 16 // 0=0 .00 3 ∗ 1 0 ˆ − 3 ∗ 1 . 5 ∗ (Eb+Ec) ˆ1.5 ∗ (mu+3 0) where m u i s
eq ua l to ratio of ch an ge s in Eb and Ec i . e . amplific ation factor 17 // thus mu+30=0 hence we get 18 mu=-30 printf ( ”he re ne gat ive 19
sig n of amplific ation factor indicates th at E b a nd E c ar e in oppo site direction . \n \n ” )
20 // her e wevene be ed cano muvemnayinbep r ob l e m positi ust e wo thrry e eqasuattoioni f gi
statement 21 22 23 24 25 26 27 28 29 30 31
wi ll always
printf ( ” amplification
giv e mu+30=0 i . e . mu=
factor
= %.3 f
rp=mu/gm if rp<0 // r p c an n ot be negat rp=-rp end printf ( ” plate
\n” ,mu)
ive
res ist anc e = %.3 f ohm
\n” ,rp)
// in book , th e an sw er s are le ss accur ate . The accura te an sw er s are 32 // gm=1707.6 30 micro mho 33 // plate re si st an ce =1 75 68 .2 09 ohm 39
−30
Scilab code Exa 3.5 Tetrode vacuum tube
1 2 3 4 5
// cha pte r3 // example3 .5 //page58
// use of scre en su pp ly 6 // use of screen 7 8 9 10 11 12 13 14 15 16
Ebb=300 Ib=10d-3 Rl=4.7d3 Rk=68 // Isg=3d-3 Vsg=150
Rsg = t o ob ta in desi red potent ial on grid since it is co nn ec te d b e t we e n power and scre en grid Csg = t o pr ovi de ac gr ou nd in g for th e
// V // A // ohm ohm // A // V
cathode_voltage=Ebb-(Ib*Rl) grid_cathode_bias=-Rk*(Ib+Isg)
// since cu rr en t th ro ug h ca th od e resist ance is Ib +Isg 17 Rsg=(Ebb-Vsg)/Isg // since plat e su pp ly vol tag e = grid volt age + d r o p across Rsg 18 Rsg_kilo_ohm=Rsg/10^3 / / in kilo ohm 19 20 printf ( ” ze ro signal plate ca th od e volt age = %.3 f V \ n ” ,cathode_voltage) 21 printf ( ” grid ca th od e bias = %.3 f V \n ” , grid_cathode_bias) 22 printf ( ” Resis tor Rsg = %.3 f ohm or %.3 f ki lo ohm \n ”
,Rsg,Rsg_kilo_ohm)
40
41
Chapter 4 Vacuum tube rectifiers
Scilab code Exa 4.1 dc and rms currents and rectification efficiency of half
wave rectifier 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
// cha pte r4 // example4 .1 //page68 rp=300 // ohm Rl=1200 // ohm Vm=200*2^0.5 //V Im=Vm/(rp+Rl) Idc=Im/%pi // in am pe re Idc_mA=Idc*1000 // in m A Irms=Im/2 Irms_mA=Irms*1000 Pdc=Idc^2*Rl Pac=Irms^2*(rp+Rl) efficiency=(Pdc/Pac)*100
18 printf ( ”dc
current
= %.3 f A or %.3 f mA 42
\n ” ,Idc,
Idc_mA) 19 printf ( ”r ms curren t = %.3 f A or %.3 f mA \n ” ,Irms, Irms_mA) 20 printf ( ” r e c t i f i c a t i o n e f f i c i e n c y = %.2 f per cen tag e ” efficiency) 21 22 // acc urat e an sw e r of rms curr ent
in book it is gi v en a s 94 .5 mA
,
is 94. 281 m A b u t
Scilab code Exa 4.2 ac voltage required and rectification efficiency of half
wave rectifier 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
// cha pte r4 // example4 .2 //page68 rp=200 // ohm Rl=800 // ohm Edc=100 // V
// i f maximum ac vol tag e req ui red= Vm then // Ed c=Idc ∗ Rl i . e . Edc=Vm ∗ Rl/(%pi ∗ ( rp+ Rl ) ) // thu s Vm=Edc*%pi*(rp+Rl)/Rl efficiency=(0.406/(1+(rp/Rl)))*100 printf ( ” required ac voltage = %.3 f V printf ( ” r e c t i f i c a t i o n e f f i c i e n c y = %.3 f efficiency)
43
\n ” ,Vm) per cen tag e ”
,
Scilab code Exa 4.3 Ammeter and wattmeter readings of vacuum tube
half wave rectifier 1 2 3 4 5 6 7 8 9 10 11 12
// cha pte r4 // example4 .3 //page69 Vm=1000 // V rp=500 // ohm Rl=4500 // ohm Im=Vm/(rp+Rl) / / in A Idc=Im/%pi / / in A Idc_mA=Idc*1000 // in m A Irms=Im/2 / / sin ce a c cu rr en t is
e qu al t o rms
current 13 Irms_mA=Irms*1000 // in m A 14 W=Irms^2*(rp+Rl) // in wa tt s 15 16 printf ( ”dc amm eter reading = %.3 f A or %.3 f mA \n ” , Idc,Idc_mA) 17 printf ( ” reading of ac ammeter = %.3 f A or %.3 f mA \n ” ,Irms,Irms_mA) 18 printf ( ” read ing of wattm eter = %.3 f W” ,W )
Scilab code Exa 4.4 ac power input and dc power output and rectification
efficiency of full wave single phase rectifier
44
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
// cha pte r4 // example4 .4 //page74 Vs=300 rp=500
// V // ohm
Rl=2000 // ohm Vm=Vs*2^0.5 / / in V Im=Vm/(rp+Rl) // A Idc=2*Im/%pi // A Pdc=Idc^2*Rl // W Irms=Im/2^0.5 //A Pac=Irms^2*(rp+Rl) // W efficiency=(Pdc/Pac)*100 printf ( ”dc po we r out put = %.3 f W \n ” ,Pdc) printf ( ”ac pow er input = %.3 f W \n ” ,Pac) printf ( ” ef fi ci en cy = % .2 f perc entag e ” ,efficiency)
Scilab code Exa 4.5 dc and ac ammeter readings of full wave rectifier
1 2 3 4 5 6 7 8 9 10 11
// cha pte r4 // example4 .5 //page74 Vm=1000 // V rp=500 // ohm Rl=4500 // ohm Im=Vm/(rp+Rl) // in am pe re Idc=2*Im/%pi // in amp ere Idc_mA=Idc*1000 // in m A
12 Iac=Im/2^0.5
// in amp ere 45
13 Iac_mA=Iac*1000 // in m A 14 15 printf ( ”dc amm eter reading = %.3 f A or %.3 f mA Idc,Idc_mA) 16 printf ( ”ac am me te r read ing = %.3 f A or %.3 f mA” Iac_mA)
46
\n ” , ,Iac,
Chapter 5 Vacuum tube amplifiers
Scilab code Exa 5.1 Voltage gain of triode amplifier
1 2 3 4 5 6 7 8 9 10 11
// chs pter 5 // example5 .1 //page85 mu=20 rp=10 Rl=15
// kil o ohm // kil o ohm
Av=mu*Rl/(rp+Rl) printf ( ” volt age
gain = % .3 f ” ,Av)
Scilab code Exa 5.2 Voltage gain Load current and Output voltage of tri-
ode amplifier 47
1 2 3 4 5 6
// chs pter 5 // example5 .2 //page85 mu=20 rp=10
// kil o ohm
7 Rl=15 // kil o ohm 8 Eg=3 // V 9 10 // th e di a gr a m in book is
for un de rs ta nd in g on ly . Al so we do no t ha ve a blo ck of ” triode ” in scila b xc os . The figure is n o t req uir ed t o solv e th e proble m .
11 12 13 14 15 16 17 18
Av=mu*Rl/(rp+Rl) Ip=(mu*Eg/2^0.5)/(rp+Rl) V_out=Ip*Rl printf ( ” voltage gain = % .3 f \n ” ,Av) printf ( ”load current = %.3 f mA \n” ,Ip) printf ( ”outp ut voltage = %.3 f V” ,V_out)
19 20 // th e acc ura te an s w e r for
ou tp ut volt age bu t in bo ok it is gi v en a s 25 .3 5V
Scilab code Exa 5.3 Parameters of triode
1 2 3 4 5
// cha pte r5 // example5 .3 //page85 // fo r Rl= 50, A v=30
6 // f o r Rl=85,
Av=34 48
is 25. 456 V
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
// // // //
Av=mu ∗ Rl /( rp +Rl ) thu s Av ∗ rp−mu∗ Rl=−Av∗ r l subs titut ing for Rl= 50 an d Rl= 85 w e get th e follow ing linaer eq ua ti on s
// 30 ∗ rp −50∗mu=−1500 and // 34 ∗ rp −85∗mu=−2890 // solving by ma tr ix a=[ 30 34 ; -50 -85] b=[ -15 00 -2 89 0] solution=b/a mu=solution(1,2) rp=solution(1,1) / / in kilo
kilo
ohms since R L w as in
ohm in th e equ atio ns
22 23 gm_kilo_mho=mu/rp 24 gm=gm_kilo_mho/1000 25 printf ( ”mu = %.3 f
\n ” ,mu)
26 printf printf ( ( ”gm ”rp == %.3 lo ohm \n ” ,rp) 27 %.4 ff ki mho \n ” ,gm)
Scilab code Exa 5.4 AC power developed in load
1 2 3 4 5 6
// cha pte r5 // example5 .4 //page86 mu=6 Eg=9
// V
7 rp=2400
// ohm 49
8 9 10 11 12 13
Rl=3000
// ohm
Ip=mu*Eg/(rp+Rl) // A power =Ip^2*Rl // W printf ( ”ac
po we r in load = %.3 f W”
, power )
Scilab code Exa 5.5 Transformation ratio and power output
1 2 3 4 5 6 7 8 9 10
// cha pte r5 // example5 .5 //page95 rp=1000 // ohm Rl=10 // ohm Eg=8 // V mu=20
// th e di a gr a m in book is for un de rs ta nd in g on ly . Al so we do no t ha ve a blo ck of ” triode ” in scila b xc os . The figure is n o t req uir ed t o solv e th e proble m . 11 // ho wever , th e equiv alent cir cui t h as b ee n drawn in xc os for refere nce . 12 13 14 15 16 17 18 19
// sinc e rp =nˆ 2 ∗ Rl for maximum pow er tr an sf er so n=(rp/Rl)^0.5
// P max=Ip ˆ2 ∗RE where // thu s
Ip=mu ∗Eg /( rp+RE) and RE=rp
P_max=((mu*Eg)^2)/(4*rp)
20 printf ( ” transformation
ra tio 50
n= %.2 f
\n ” ,n )
Figure 5.1: Transformation ratio and power output 21 printf ( ”p ower supp lied to spe ake r when signal rm s i s = %.3 f W” ,P_max)
51
is 8V
Chapter 9 Semiconductor diode
Scilab code Exa 9.1 Check whether diodes are forward or reverse baised
1 2 3 4 5
// cha pte r9 // example9 .1 //page142 printf ( ”in
fig . ( i ) , th e conv enti onal cur rent comi ng o u t of ba tt er y fl ow s in t h e \ nb ra nc h ci rc ui ts . In di od e D1, th e conv enti onal curr ent flow s in th e \ndirection of ar ro w he ad an d he nc e this di od e is for war d biased . \ nHowever in diode D 2, the conv ent ional cur ren t flow s oppos ite \ nto ar r ow h ea d and he nc e this di od e is reverse bia sed . \ n \n” ) 6 printf ( ”in fig . ( i i ) , D u ri n g t he positive half cyc le of in pu t ac vo lt ag e , th e \ nconv entio nal current flow s in th e direction of ar ro w he ad a nd he nc e diode \nis for war d biased . However , durin g the ne gat ive half cyc le \ no f in pu t a c vo lt age , th e di od e is reve rse bi as ed . \ n \n ” ) 7 printf ( ”in
fig . ( i i i ) , D u r i n g th e positi 52
ve half
cyc le of in pu t a c vo lt ag e , t he \ nconventional cu rr en t flo ws in t he direction of a r r o w h e a d in D 1 bu t it fl ow s \ noppos ite to ar ro wh ea d in D2. So du ri ng positive half cy cl e , \ nd io de D 1 is fo rw ard bia sed and di od e D2 is reverse bia sed . \ nHowever in t h e ne ga ti ve half cy cl e of t h e in p ut ac voltage , diode D2 \nis fo rw ar d bia sed and di od e D1 is reve rse bi as ed . \ n \n” ) 8 printf ( ”in fig . ( iv ) , D u r i n g t h e positi ve half cyc le of in pu t a c vo lt ag e , \ nb ot h diode s are reverse bias ed . However in th e nega tiv e half cy cl e of t h e \ ni np ut a c vo lt age , b o th dio des ar e for war d biased . \ n \n ” )
Scilab code Exa 9.2 Peak current through diode and peak output voltage
1 2 3 4 5 6 7 8 9 10 11
// cha pte r9 // example9 .2 //page145 Vi_p=20 // V rf=10 // ohm Rl=500 // ohm Vo=0.7 // V Vin=20 // V
// pea k current so
thr oug h diode
12 Vf=Vin 13 // sin ce Vf=Vo+If pea k ( rf+ Rl)
wi ll occu r when Vi n=Vf
ma ki ng If pea k as
subjec t we ge t 14 If_peak1=(Vf-Vo)/(rf+Rl)
// in amp ere
15 Vout_peak1=If_peak1*Rl
53
Figure 9.1: Peak current through diode and peak output voltage 16 17 // for 18 19 20 21 22
idea l di od e , Vo=0 an d rf= 0 so
// Vf=If pe ak ∗ Rl so w e ge t If_peak2=Vf/Rl // in am pe re Vout_peak2=If_peak2*Rl printf ( ”pe ak current
thr oug h given diode = %.3 f m A and pe ak out pu t voltage = %.3 f V \n ” ,If_peak1
*1000,Vout_peak1) 23 printf ( ”pe ak curren t th ro ug h idea l dio de = %.3 f mA and pe ak out pu t voltage = %.3 f V \n ” ,If_peak2 *1000,Vout_peak2)
54
Scilab code Exa 9.3 Current through ideal diode
1 2 3 4 5 6 7 8 9 10 11 12 13
// cha pte r9 // example9 .3 //page146 R1=50 // ohm R2=5 // ohm V=10 // V Eo=V*R2/(R1+R2) / / the ve nin volta ge Ro=R1*R2/(R1+R2) / / th ev en in resistance I_D=Eo/Ro // curren t th ro ug h dio de in ampere printf ( ” curren t thro ugh *1000)
diode
= %.3 f mA
Scilab code Exa 9.4 Current through given resistor
1 2 3 4 5 6
// cha pte r9 // example9 .4 //page146 V=10 // V V_D1=0.7 // V
7 V_D2=0.7
// V 55
\n ” ,I_D
Figure 9.2: Current through ideal diode 8 R=48 // ohm 9 R_D1=1 // ohm 10 R_D2=1 // ohm 11 12 // D1 and D 3 are
reverse 13 14 15 16 17
fo rw ard biase d whil e D2 and D 4 are bias ed th us
V_net=V-V_D1-V_D2 R_t=R_D1+R+R_D2 I=V_net/R_t printf ( ” ci rc ui t current
= %.3 f mA
56
\n ” ,I*1000)
Figure 9.3: Current through given resistor Scilab code Exa 9.5 Current in given circuit
1 2 3 4 5 6 7 8 9 10
// cha pte r9 // example9 .5 //page147 E1=24 // V E2=4 // V Vo=0.7 // V R =2 // kil o ohm
// di od e D 1 is fo rw ar d bia sed and di od e D 2 is reve rse bi ase d s o
11 I=(E1-E2-Vo)/R 12 13 printf ( ” cur ren t in th e cir cui t = %.3 f mA
57
\n” ,I )
Figure 9.4: Current in given circuit
Scilab code Exa 9.6 Simplified model of diode
1 2 3 4 5 6 7 8
// cha pte r9 // example9 .6 //page147 V=20 // V V_D_Ge=0.3
// V
// when voltage and 0. 3 V is
is app lie d , Ge dio de tur ns on f i r s t m a i n t a i n e d ac ros s circuit 58
s o Si
Figure 9.5: Simplified model of diode dio de ne ve r tur ns on . So 9 V_A=V-V_D_Ge 10 11 printf ( ” voltage
V A at point
A = %.3 f V
Scilab code Exa 9.7 Simplified model of diode
1 2 3 4 5
// cha pte r9 // example9 .7 //page148 V=10
// V 59
\n ” ,V_A)
Figure 9.6: Simplified model of diode 6 V_D=0.7 // V 7 R_BC=2 // kil o ohm 8 R =2 // kil o ohm 9 10 // b y Kirchof f volt age l aw w e ge t 11 // −V D−I D ∗R BC−2∗ I D ∗R+V=0 thus
subjec t we ge t 12 13 14 15 16
I_D=(V-V_D)/(R_BC+2*R) V_Q=2*I_D*R printf ( ”I D = % .3 f mA \n ” ,I_D) printf ( ”V Q = % .3 f V \n” ,V_Q)
60
maki ng I D as
Scilab code Exa 9.8 Simplified model of diode
1 2 3 4 5 6 7 8 9 10 11 12 13 14
// cha pte r9 // example9 .8 //page148 V=15 // V R=0.5 // kil o ohm V_D=0.7 // V
// b o th dio des
ar e fo rw ar d bia sed
I1=(V-V_D)/R I_D1=I1/2 I_D2=I_D1
15 printf ( ” curren t thro ugh diode D1 = %.3 f mA an d diode D2 = %.3 f mA \n” ,I_D1,I_D2)
Scilab code Exa 9.9 Rectification efficiency
1 // cha pte r9 2 // example9 .9 3 //page151 4 5 P_dc=40
// W 61
Figure 9.7: Simplified model of diode 6 P_ac=100 7
// W
8 efficiency=100*P_dc/P_ac 9 10 printf ( ” r e c t i f i c a t i o n e f f i c i e n c y = %.3 f per cen t n ” ,efficiency) 11 printf ( ”re ma in in g 60 wa tt s ar e n ot lost . Cry sta l
\n \
diode co ns um es only a \ n l i t t l e po we r du e to i t s sm al l internal resistance . \ nAct ualy 100 W ac power is co nt ai ne d as 50 W in positive half \ ncy cle and 50 W in nega tiv e half cycle . \ nThe 50 W of ne ga ti ve hal f cy cle ar e n o t su pp li ed a t all . half cyc le ar e co nv er te d \ nThe 50 W of positive to 40 W \n ” )
62
Scilab code Exa 9.10 Output dc voltage and PIV
1 2 3 4 5 6 7 8 9 10 11 12 13 14
// cha pte r9 //example9 .1 0 //page152 n=10 Vp=230
// V
Vpm=2^0.5*Vp Vsm=Vpm/n // s i n c e n=Vpm/Vsm=N1/N2
// Id c=Im/%pi and Vdc=Idc ∗ Rl so // Vdc=(Im/%pi ) ∗ Rl . Also Im ∗ Rl=Vsm s o Vdc=Vsm/%pi
15 / / in ne ga ti ve hal f cy cle
d io de is rev er se bi as ed s o maximum seco ndar y voltage appe ars across diode .
16 17 18 19 20 21
PIV=Vsm printf ( ”out pu t dc voltage = %.2 f V \n ” ,Vdc) printf ( ”pe ak inverse voltage = %.2 f V \n ” ,PIV)
// ac cu rat e a n s w e r for no t 10. 36 V
ou t p u t dc vol tag e is 10 .3 5 V
Scilab code Exa 9.11 Crystal diode in half wave rectifier
63
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
// cha pte r9 //example9 .1 1 //page152 rf=20 // ohm Rl=800 // ohm Vm=50
// V
Im=Vm/(rf+Rl) // in am pe re Idc=Im/%pi // in am pe re Irms=Im/2 // in am pere Pac=Irms^2*(rf+Rl) Pdc=Idc^2*Rl Vout=Idc*Rl efficiency=100*Pdc/Pac printf printf printf printf printf
( ”I m = %.1 f mA \n” ,Im*1000) ( ” Idc = % .1 f mA \n ” ,Idc*1000) ( ”Irms = % .1 f mA \n \n” ,Irms*1000) ( ”ac pow er input = %.3 f W \n ” ,Pac) ( ”dc po we r out put = %.3 f W \n \n” ,Pdc)
22 printf printf ( (” ”deffc ici ou tp = %.3 23 encut y voltage = %.3 f per cenf tV
Scilab code Exa 9.12 Required ac voltage
1 2 3 4 5 6
// cha pte r9 //example9 .1 2 //page153 Vdc=50 // V rf=25 // ohm
7 Rl=800
// ohm 64
\n \n ” ,Vout) \n ” ,efficiency)
8 9 10 11 12 13
// // // // //
Vdc=Idc ∗ Rl an d Idc= Im/% pi so Vdc=Im ∗ Rl/%pi but Im=Vm/( r f+ Rl ) so Vdc=Vm ∗ Rl/(%pi ∗ ( r f+ Rl ) ) making Vm as subjec t we get
14 15 Vm=Vdc*%pi*(rf+Rl)/Rl 16 17 printf ( ”a c volt age requ ired
= %.1 f V
\n ” ,Vm)
Scilab code Exa 9.13 Mean and rms load currents
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
// cha pte r9 //example9 .1 3 //page157 rf=20 // ohm Rl=980 // ohm Vs=50 // V Vm=Vs*2^0.5 Im=Vm/(rf+Rl) Idc=2*Im/%pi Irms=Im/2^0.5
// in amp ere // in am pe re
printf ( ”m ean load current = %.3 f m A \n ” ,Idc*1000) printf ( ”r ms load curren t = %.3 f mA \n ” ,Irms*1000)
65
Scilab code Exa 9.14 DC output voltage PIV and efficiency
1 // cha pte r9 2 //example9 .1 4 3 //page157 4 5 6 7 8 9 10 11 12
rf=0 n =5 Vp=230 Rl=100
// V rms //ohm
Vs=Vp/n // V rms Vsm=Vs*2^0.5 // m aximum volt age acr oss secondary Vm=Vsm/2 // m aximum voltage acros s hal f seco ndary
winding 13 14 15 16 17 18
Idc=2*Vm/(%pi*Rl) Vdc=Idc*Rl PIV=Vsm efficiency=100*0.812/(1+rf/Rl)
19 printf ( ”P ”d IV c ou = %.3 f V 20 printf ( =tp % ut .3 f voltage V \n” ,PIV) 21 printf ( ” eff ici enc y = %.3 f per cen t
\n ” ,Vdc) \n ” ,efficiency)
Scilab code Exa 9.15 DC output voltage PIV and output frequency
1 2 3 4 5
// cha pte r9 //example9 .1 5 //page158 n =4
6 Rl=200
// ohm 66
// Hz // V rms
7 8 9 10 11 12
fin=50 Vp=230
13 14 15 16 17
Idc=2*Vsm/(%pi*Rl) Vdc=Idc*Rl PIV=Vsm
18 19 20 21 22 23 24
Vs=Vp/n // V rms Vsm=Vs*2^0.5 // m aximum volt age
acr oss
secondary
// in f u l l wave rec ti fie r , ou tp ut fr equ enc y is tw ic e in pu t fr equ enc y since the re ar e two o up ut pulses for e a c h cy cl e of i np ut fout=2*fin printf ( ”d c ou tp ut voltage = %.3 f V \n ” ,Vdc) printf ( ”pe ak inverse voltage = %.3 f V \n ” ,PIV) printf ( ”output frequency = %.3 f Hz” ,fout)
// th e acc ura te an s w e r for dc ou t pu t volt age 51 .7 68 V b ut in book it is gi v en a s 52 V
is
Scilab code Exa 9.16 DC output voltage and PIV for centre tap and bridge
circuit 1 2 3 4 5 6 7 8
// cha pte r9 //example9 .1 6 //page158 // for dc ou t pu t // for ce nt re
−t a p circuit
n =5 Vp=230
// V rms 67
9 10 11
Rl=100 //ohm Vs=Vp/n // V rms Vsm=Vs*2^0.5 // maximum volt age
12
secondary Vm=Vsm/2 // maximum voltage secondary wind ing
13
Vdc=2*Vm/%pi
14 15 16 17 18 19 20
// si nce Vm/(%pi ∗ Rl )
acr oss
acros s hal f
Vdc=Idc ∗ Rl and Idc= 2 ∗
// fo r br id ge circuit n_dash=5 Vp_dash=230 // V rms Rl_dash=100 //ohm Vs_dash=Vp_dash/n_dash // V rms Vsm_dash=Vs*2^0.5 // maximum volt age
acr oss
secondary Vm_dash=Vsm_dash Vdc_dash=2*Vm_dash/%pi
21 22
// si nce an d Idc= 2 ∗Vm/(%pi ∗ Rl )
Vdc=Idc ∗ Rl
23 24 25 // for same put for Vm ce m ust same and for n=10 bo th fo r cir cui ts dc i . e out . n=5 nt rebe −tap 26 27 28 29
bridge // for
ce nt re
−t a p circuit
n1=5 Vs1=Vp/n1 // V rms Vsm1=Vs1*2^0.5 // maximum volt age
acr oss
secondary 30 31 32 33 34 35 36
Vm1=Vsm1/2 PIV1=2*Vm1
// fo r br id ge circuit n2=5 Vs2=Vp/n2 // V rms Vsm2=Vs2*2^0.5 // maximum volt age
secondary 37
Vm2=Vsm2/2
68
acr oss
38 PIV2=Vm2 39 40 printf ( ”d c ou tp ut volta ge for .3 f V \n ” ,Vdc) 41 printf ( ”d c ou t p u t vol tag e for V \n \n ” ,Vdc_dash)
ce nt re −t a p circuit
br id ge circu it = %.3 f
42 43 printf ( ” for
same ou tp ut , PIV for cent re = %.3 f V an d bri dge cir cui t = %.3 f V
−t a p circuit \n ” ,PIV1,
PIV2) 44 45 / / t h e figure
of tr an sf or me r is for ref ere nce on ly . A l s o it c a n n o t be plot te d in scilab sin ce scilab do es no t ha ve cen tre −ta p transf ormer
Scilab code Exa 9.17 Mean load current and power dissipated
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
// cha pte r9 //example9 .1 7 //page160 Vin=240 // V rms Rl=480 // ohm rf=1 // ohm Vm=Vin*2^0.5
// fo r bri dge
r e c t i f i e r we know that
Im=Vm/(2*rf+Rl) Idc=2*Im/%pi Irms=Im/2 P=Irms^2*rf
16 printf ( ”m ean load
current
= %.3 f A 69
=%
\n ” ,Idc)
17 printf ( ”p ower diss ipate d in ea ch dio de = %.3 f W P) 18 19 // th e acc ura te an sw er s ar e mean lo ad cur rent =
0.4 48 A a nd power dissipated 0.124 W
in e ac h di od e =
Scilab code Exa 9.18 Which is better power supply
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
// cha pte r9 //example9 .1 8 //page162 Vrms_A=0.5 // V Vdc_A=10 // V Vrms_B=1 // V Vdc_B=25 // V ripple_A=Vrms_A/Vdc_A ripple_B=Vrms_B/Vdc_B if ripple_A >r ipple_B printf ( ”p ower su pp ly B is better elseif ripple_B >ri pple_A printf ( ”p ower su pp ly A is bette r else printf ( ”bo th are equ al \n ” ) end
70
\n ” ) \n” )
\n ” ,
Scilab code Exa 9.19 DC output voltage
1 // cha pte r9 2 //example9 .1 9 3 //page165 4 5 // th e waveform giv en in book is
for unde rst and ing on ly . It is n o t req uir ed t o solv e t he p r o b l em . A l s o it c a n no t be plo tte d in scilab unle ss V m and Vdc are given .
6 7 8 9 10 11 12 13 14
R=25 // ohm Rl=750 // ohm Vm=25.7 // V Vdc_dash=2*Vm/%pi Vdc=Vdc_dash*Rl/(R+Rl) printf ( ” vol tag e acr oss ripple \n ” ,Vdc)
lo ad is %.3 f V pl us a sm al l
15 16 / / thgie veacncua ra te .9a nVs w e r is s 15
15 .8 33 V bu t in book it
is
Scilab code Exa 9.20 Output voltage Voltage drop and Zener current
1 // cha pte r9 2 //example9 .2 0 3 //page170 4 5 R =5 // kil o ohm
71
Figure 9.8: DC output voltage 6 Rl=10 // kil o ohm 7 Ei=120 // V 8 Vz=50 // V 9 10 V=Ei*Rl/(R+Rl)
/ / vo lt ag e ac ros s open circuit zen er dio de is removed 11 Vo=Vz // ou tp ut voltage 12 V_R=Ei-Vz / / d ro p across R 13 Il=Vz/Rl // lo ad cur ren t 14 I=V_R/R // current th ro ug h R 15 16 17 18 19 20
// by Kircho ff
if
f i r s t la w I=Iz +Il
Iz=I-Il printf ( ”out pu t voltage = %.3 f V \n ” ,Vo) printf ( ” vol tag e d ro p acr oss seri es resistance V \n ” ,V_R)
21 printf ( ” curren t thro ugh
Zen er diode 72
= %.3 f mA
= %.3 f \n” , Iz
Figure 9.9: Output voltage Voltage drop and Zener current )
Scilab code Exa 9.21 Maximum and minimum zener current
1 2 3 4 5 6 7 8
// cha pte r9 //example9 .2 1 //page171 Vmax=120 // V Vmin=80 // V Vz=50 // V R_L=10 // kil o ohm
73
9 R1=5 // kil o ohm 10 11 // zene r dio de is
th ey are 12 13 // for 14 15 16 17
>
on for Vmax a nd V min bo th since
Vz
max Iz
V_R1=Vmax-Vz I=V_R1/R1 / / curren t th ro ug h R1 I_L=Vz/R_L // curren t th ro ug h loa d
// by Kirchoff we get
f i r s t law I=I L+Iz so appl ying
it
18 Iz_max=I-I_L 19 20 / / for min Iz V_R1_dash=Vmin-Vz 21 22 I_dash=V_R1_dash/R1 // current th ro ug h R1 I_L_dash=Vz/R_L 23 // curren t th ro ug h loa d 24 // by Kirchoff f i r s t law I=I L +Iz so we get Iz_min=I_dash-I_L_dash 25 26 27 printf ( ”maximum zen er cu rr en t = %.3 f mA \n ” ,Iz_max) 28 printf ( ”m inimum zener
cur ren t = %.3 f mA
Scilab code Exa 9.22 Required series resistance
1 2 3 4 5
// cha pte r9 //example9 .2 2 //page172 Ei=12
6 Vz=7.2
// V // V 74
\n ” ,Iz_min)
Figure 9.10: Maximum and minimum zener current 7 Eo=Vz 8 Iz_min=10d-3
// A
9 Il_max=100d-3 // A 10 11 // we see that R =(E i −Eo) /( Iz − I l ) an d minimum Iz
occurs
when I l is maximum so
12 R=(Ei-Eo)/(Iz_min+Il_max) 13 14 printf ( ” requ ired ser ies resis tance = %.3 f ohm \n” ,R ) 15 16 / / o n insert ing this series resist ance t h e o u t p u t
vol tag e will
r e m a i n co ns ta nt a t 7.2 V
17 18 // th e acc ura te an s w e r is
43. 636 o hm bu t in book it
is gi ve n as 43. 5 o hm
75
Scilab code Exa 9.23 Required series resistance
1 2 3 4 5 6 7 8 9 10 11
// cha pte r9 //example9 .2 3 //page172 Ei=22 // V Vz=18 // V Rl=18 // ohm Eo=Vz Iz_min=200d-3
// A
// Ze ne r curr ent mi n
will
be m in w hen in pu t volt age
is
12 13 / / l oa d cu rr en t is 14 Il_max=Vz/Rl 15 16 // we see that R =(E i −Eo) /( Iz − I l ) an d minimum Iz
occurs
when I l is maximum so
17 R=(Ei-Eo)/(Iz_min+Il_max) 18 19 printf ( ” requ ired ser ies resis tance = %.3 f ohm \n” ,R ) 20 21 / / o n insert ing this series resist ance t h e o u t p u t
vol tag e will
r e m a i n co ns ta nt a t 18 V
Scilab code Exa 9.24 Required series resistance
76
1 2 3 4 5 6 7 8 9 10 11
// cha pte r9 //example9 .2 4 //page172 Ei=13 Vz=10
// V // V
Eo=Vz Iz_min=15d-3 Il_max=85d-3
// A // A
// Ze ne r curr ent mi n
12 13 // we see
occurs
will
be m in w hen in pu t volt age
is
that R =(E i −Eo) /( Iz − I l ) an d minimum Iz when I l is maximum so
14 R=(Ei-Eo)/(Iz_min+Il_max) 15 16 printf ( ” requ ired ser ies
resis tance
= %.3 f ohm
\n” ,R )
Scilab code Exa 9.25 Regulated output voltage and required series resis-
tance 1 2 3 4 5 6 7 8 9 10
// cha pte r9 //example9 .2 5 //page173 Ei=45 // V Vz1=15 // V Vz2=15 // V Iz=200d-3 / / cu rr en t rati ng Eo=Vz1+Vz2
11
77
for
e a c h ze ne r in ampere
12 R=(Ei-Eo)/Iz 13 14 printf ( ” regulated 15 printf ( ” requ ired
ou tp ut voltage = %.3 f V \n ” ,Eo) ser ies resis tance = %.3 f ohm \n” ,R )
Scilab code Exa 9.26 Required series resistance
1 2 3 4 5 6 7 8 9
// cha pte r9 //example9 .2 6 //page173 Ei=45 // V Vz1=10 // V Vz2=10 // V Vz3=10 // V Iz=1000d-3 // cu rr en t rat ing
for
e a c h ze ne r in
ampere 10 11 12 13 14 15 16 17
Eo=Vz1+Vz2+Vz3 R=(Ei-Eo)/Iz printf ( ” requ ired
ser ies
resis tance
= %.3 f ohm
\n” ,R )
// sin ce ze ne r di od e is n o t avail able in x c o s , si mp le di od es ar e u s e d t o rep res ent ze ne r di od e in th e circu it made in xc os
78
Figure 9.11: Required series resistanc e
Scilab code Exa 9.27 Range of input for Zener circuit
1 2 3 4 5 6 7 8 9 10
// cha pte r9 //example9 .2 7 //page174 R=200 // ohm Rl=2000 // ohm Eo=30 // V
// for minimum input
voltage
i . e . Iz= 0
Il=Eo/Rl
11 I=Il
// since
Iz= 0 79
12 13 14 15 16 17 18 19 20 21 22
Vin_min=Eo+I*R
// for maximum input Iz=25d-3 // A
volt age
i . e . Iz= 25 mA
Il_dash=Eo/Rl I_dash=Il_dash+Iz Vin_max=Eo+I_dash*R printf ( ”m inimum input vol tag e = %.3 f V \n ” ,Vin_min) printf ( ”maximum input vol tag e = %.3 f V \n ” ,Vin_max) printf ( ”thu s ra ng e of inp ut = %.3 f to % .3 f V \n ” , Vin_min ,Vin_m ax)
Scilab code Exa 9.28 Design regulator and maximum wattage of zener
1 2 3 4 5 6 7 8 9 10 11
// cha pte r9 //example9 .2 8 //page174 Ei=16 // V Vz=12 // V si nc e w e want t o ra gu la te at 1 Eo=Vz Iz_min=0 // A Il_max=200d-3 // A
// Ze ne r curr ent mi n
12 13 // we see
occurs
will
2 V
be m in w hen in pu t volt age
is
that R =(E i −Eo) /( Iz − I l ) an d minimum Iz when I l is maximum so
14 R=(Ei-Eo)/(Iz_min+Il_max) 15 16 Izm=Il_max
80
17 18 19 20 21
Pzm=Vz*Izm printf ( ”Ze ne r voltage = %.3 f V \n” ,Vz) printf ( ” requ ired ser ies resis tance = %.3 f ohm \n” ,R ) printf ( ”maximum po we r rat ing of zener diode = %.3 f W \n ” ,Pzm)
81
Chapter 10 Special purpose diodes
Scilab code Exa 10.1 Series resistor to limit current through LED
1 2 3 4 5 6 7 8 9 10 11
// cha pter 10 //example10 .1 //page182 Vs=10 // V Vd=1.6 // V If=20d-3 // A Rs=(Vs-Vd)/If printf ( ” requ ired
ser ies
res ist or = %.3 f ohm”
Scilab code Exa 10.2 Current through LED
82
,Rs)
1 2 3 4 5 6
// cha pter 10 //example10 .2 //page183 Vs=15 // V Vd=2 // V
7 Rs=2.2d3 // ohm 8 9 If=(Vs-Vd)/Rs 10 11 printf ( ” cur ren t through If*1000)
LED = % .3 f A or %.3 f mA”
,If,
Scilab code Exa 10.3 Dark resistance
1 2 3 4 5
6 7 8 9 10 11 12
// cha pter 10 //example10 .3 //page187 //f rom graph , we see reverse curr ent ampere
th at for zer o illumi nation , th e i . e . d ar k cur ren t is 50 mi cr o
Ir=50d-6 // A Vr=10 // V Rr=Vr/Ir printf ( ”da rk res ist anc e = %.3 f ohm or % .3 f kil o ohm” ,Rr,Rr/1000)
83
Scilab code Exa 10.4 Reverse current through photo diode
1 2 3 4 5 6 7 8
// cha pter 10 //example10 .4 //page188 m=37.4 // mi cro A /mW/cmˆ2 E=2.5 // mW/cm ˆ2
// since reve rse we can write
9 Ir=m*E 10 11 printf ( ” rever se
cur re nt = sens itiv ity
current
∗ illumination
= %.3 f mi cr o am pe re”
,Ir)
Scilab code Exa 10.5 Resonant frequency of LC tank circuit
1 2 3 4 5 6 7 8 9 10
// cha pter 10 //example10 .5 //page192 L=1d-3 // H C=100d-12 // F fr=1/(2*%pi*(L*C)^0.5) printf ( ”resonant ,fr/1000)
frequency
= %.3 f Hz or %.3 f kHz”
84
,fr
85
Chapter 11 Transistors
Scilab code Exa 11.1 Voltage amplification of common base transistor
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
// cha pter 11 //example11 .1 //page202 Rin=20 //ohm Rout=100d3 //ohm Rc=1d3 //ohm signal=500d-3 //V Ie=signal/Rin Ic=Ie Vout=Ic*Rc Av=Vout/signal printf ( ” voltage
// A
ampl ifica tion
86
= %.2 f
\n ” ,Av)
Figure 11.1: Voltage amplification of common base transistor
Scilab code Exa 11.2 Base current
1 2 3 4 5 6 7 8 9 10
// cha pter 11 //example11 .2 //page205 Ie=1 //mA Ic=0.95 //mA
// since
Ie =Ib +Ic we get
Ib=Ie-Ic
11 printf ( ”base
curren t = %.3 f mA 87
\n” ,Ib)
Scilab code Exa 11.3 Base current
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
// cha pter 11 //example11 .3 //page205 alpha=0.9 Ie=1 //mA
// sinc e alp ha =Ic / Ie we get Ic=alpha*Ie
// since
Ie =Ic +Ib w e get
Ib=Ie-Ic printf ( ”base
curren t = %.3 f mA
Scilab code Exa 11.4 Find value of alpha
1 2 3 4 5
// cha pter 11 //example11 .4 //page205 Ic=0.95
6 Ib=0.05
88
\n” ,Ib)
7 8 Ie=Ib+Ic 9 alpha=Ic/Ie 10 11 printf ( ” amplification
factor
= %.3 f
\n” ,alpha)
Scilab code Exa 11.5 Total collector current
1 2 3 4 5 6 7 8 9
// cha pter 11 //example11 .5 //page205 Ie=1 //mA alpha=0.92 Icbo=50d-3
//mA
Ic=alpha*Ie+Icbo
10 11 printf ( ” co ll ect or
current
= %.3 f mA
Scilab code Exa 11.6 Base current
1 2 3 4 5 6 7
// cha pter 11 //example11 .6 //page205 alpha=0.95 V_Rc=2 // V Rc=2 // ki lo ohm
89
\n” ,Ic)
Figure 11.2: Base current 8 9 Ic=V_Rc/Rc 10 11 12 13 14 15 16 17
// mA
// sin ce alpha =Ic / Ie Ie=Ic/alpha
// sinc e Ie =Ib +Ic Ib=Ie-Ic printf ( ”base
curren t = %.3 f mA
\n” ,Ib)
Scilab code Exa 11.7 Collector current and collector base voltage
90
1 2 3 4 5 6 7 8 9 10 11
// cha pter 11 //example11 .7 //page206 Vbe=0.7 // V Vcc=18 // V Vee=8 // V Rc=1.2 // kil o ohm Re=1.5 // ki lo ohm
// by Kir cho ff ’ s volt age la w to emi tte r side we get Ve e=Ie ∗Re+Vbe s o
12 Ie=(Vee-Vbe)/Re 13 Ic=Ie / / near ly 14 15 // by Ki rc ho ff ’ s vol tag e la w t o collec
tor
side
lo op ,
loop ,
we get Vc c=Ic ∗Rc=Vcb so 16 Vcb=Vcc-Ic*Rc 17 18 printf ( ” col lec tor 19 printf ( ” col lec tor
cu re nt = %.3 f mA \n” ,Ic) ba se volta ge = % 3f V \n ” ,Vcb)
Scilab code Exa 11.8 Beta for various values of alpha
1 2 3 4 5 6 7 8
// cha pter 11 //example11 .8 //page209 alpha1=0.9 alpha2=0.98 alpha3=0.99
9 beta1=alpha1/(1-alpha1)
91
10 11 12 13 14 15
beta2=alpha2/(1-alpha2) beta3=alpha3/(1-alpha3) printf ( ” fo r alpha =0.9 , beta= %.1 f \n ” ,beta1) printf ( ” fo r alpha =0.98 , beta= %.1 f \n ” ,beta2) printf ( ” fo r alpha =0.99 , beta= %.1 f \n ” ,beta3)
Scilab code Exa 11.9 Emitter current of transistor
1 2 3 4 5 6 7 8
// cha pter 11 //example11 .9 //page210 gain_beta=50 Ib=20d-3 // mA
// since
gain be ta = Ic /Ib we ge t
9 Ic=gain_beta*Ib 10 Ie=Ic+Ib 11 12 printf ( ” emitt er
curren t = %.3 f mA
\n ” ,Ie)
Scilab code Exa 11.10 Find collector current using given alpha and beta
1 2 3 4 5
// cha pter 11 //example11 .1 0 //page210 gain_beta=49
92
6 7 8 9 10 11
Ib=240d-3 // mA Ie=12 // mA alpha=gain_beta/(1+gain_beta) Ic=alpha*Ie / / or Ic =gain be
12 printf ( ” co ll ect or
Scilab code Exa 11.11
1 2 3 4 5 6 7 8 9 10 11 12 13
current
ta ∗ I b
= %.3 f mA
\n” ,Ic)
Base current of transistor
// cha pter 11 //example11 .1 1 //page210 V_Rc=1 gain_beta=45 Rc=1 // kil o ohm Ic=V_Rc/Rc
// sin ce gain beta= Ic /Ib Ib=Ic/gain_beta printf ( ”base
curren t = %.3 f mA” ,Ib)
Scilab code Exa 11.12 Collector emitter voltage and base current
1 // cha pter 11
93
Figure 11.3: Base current of transistor 2 //example11 3 //page210 4 5 6 7 8 9 10 11 12 13 14 15 16
.1 2
Rc=800d-3 // kil o ohm V_Rc=0.5 // V Vcc=8 // V alpha=0.96 Vce=Vcc-V_Rc Ic=V_Rc/Rc // mA gain_beta=alpha/(1-alpha) Ib=Ic/gain_beta printf ( ” col lec tor emit ter volt age = %.3 f V printf ( ”base curren t = %.3 f mA \n” ,Ib)
94
\n ” ,Vce)
Scilab code Exa 11.13 Alpha base current and emitter current
1 2 3 4 5 6
// cha pter 11 //example11 .1 3 //page211
Ic=1000 // mic ro am pe re // w hen emit ter cir cui t is open , lea kag e curr ent = Ic bo so 7 Icbo=0.2 // mic ro am pe re 8 9 10 11 12 13 14 15 16 17 18 19 20 21
// when ba se is open , lea kage Iceo=20 // mic ro am pe re // si nce
cur ren t = Ice o so
Iceo= Icbo/( 1 − alpha ) we get
alpha=1-(Icbo/Iceo)
// since
Ic =al ph a ∗Ie+ Icbo
we get
Ie=(Ic-Icbo)/alpha Ib=Ie-Ic printf ( ”alpha = % .3 f \n” ,alpha) printf ( ” emitter current = %.3 f mi cr o am pe re \n ” ,Ie) printf ( ”base current = %.3 f mi cr o amp ere \n” ,Ib)
Scilab code Exa 11.14 DC load line
95
Figure 11.4: Alpha base current and emitter current 1 // cha pter 11 2 //example11 .1 4 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
//page218 Vcc=12.5 // V Rc=2.5 // kil o ohm
// we know tha t Vc e=Vcc −I c ∗Rc // when Ic =0, Vc e=Vc c i . e . 12 .5V // when Vc e=0, Ic= Vc c/Rc i . e .5m A / / so eq ua ti on of lo ad line
b ecom es Ic=
−0. 4∗ Vce+5
x = linspace (0,12.5,5) y=-0.4*x+5 clf() xtitle ( ”d c lo ad line ” , ”V ce( vo lt s )” , ” I c (mA) ” ) plot2d (x,y,style=3,rect=[0,0,13,6])
96
Figure 11.5: DC load line
97
Figure 11.6: DC load line
Scilab code Exa 11.15 DC load line and Q point
1 2 3 4 5 6
// cha pter 11 //example11 .1 5 //page219 Vcc=12 // V Rc=6 // kil o ohm
98
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
// we know tha t Vc e=Vcc −I c ∗Rc // when Ic =0, Vc e=Vc c i . e . 12 V // when Vc e=0, Ic= Vc c/Rc i . e .2m A // so eq uat ion
of lo ad line
b ecom es Ic =
// for Q po in t Ib=20d-3 // mA gain_beta=50 Ic=gain_beta*Ib Vce=Vcc-Ic*Rc printf ( ”Q poi nt = % .3 f V an d %.3 f mA i . e . (%.3 f ,% .3 f
) \n ” ,Vce,Ic,Vce,Ic)
Scilab code Exa 11.16
1 2 3 4 5
−(1/6) ∗ Vce+2
x = linspace (0,12,5) y=-(1/6)*x+2 clf() xtitle ( ”d c lo ad line ” , ”V ce( vo lt s )” , ” I c (mA) ” ) plot2d (x,y,style=3,rect=[0,0,13,6])
Operating point
// cha pter 11 //example11 .1 6 //page219 Vcc=10
6 Ic=1
// mA 99
Figure 11.7: DC load line and Q point
100
7 8 9 10 11 12
Rc1=4 Rc2=5
// kil o ohm // kil o ohm
Vce1=Vcc-Ic*Rc1 Vce2=Vcc-Ic*Rc2
13 printf ( ” for
collec tor is %.3 f V, %.3 14 printf ( ” for collec tor point is %.3 f V, %.3 point
Scilab code Exa 11.17
lo ad = 4 kilo ohm, ope rat ing f mA \n” ,Vce1,Ic) lo ad = 5 kilo ohm, ope rat ing f mA \n” ,Vce2,Ic)
Input resistance of transistor
1 // cha pter 11 2 //example11 .1 7 3 //page222 4 5 6 7 8 9 10
del_Vbe=200 del_Ib=100
//mV // mic ro am pe re
Ri=del_Vbe/del_Ib printf ( ”inp ut resist
Scilab code Exa 11.18
ance
= %.3 f kilo
ohm
Output resistance of transistor
1 // cha pter 11 2 //example11 .1 8 3 //page222
101
\n” ,Ri)
4 5 6 7 8 9 10 11 12 13 14 15
Vce2=10 // V Vce1=2 // V Ic1=2 // mA Ic2=3 // mA del_Vce=Vce2-Vce1 // V del_Ic=Ic2-Ic1 // mA Ro=del_Vce/del_Ic printf ( ”ou tp ut resist
ance
= %.3 f kilo
ohm
\n ” ,Ro)
Scilab code Exa 11.19 Voltage gain of amplifier
1 // cha pter 11 2 //example11 .1 9 3 4 5 6 7 8 9 10 11 12
//page223 Rc=2 // kil o ohm Ri=1 // kil o ohm gain_beta=50
// for
sin gle
sta ge , R AC=Rc so voltage
Av=gain_beta*Rc/Ri printf ( ” voltage
gain = % .3 f
\n ” ,Av)
Scilab code Exa 11.20 Saturation and cutoff points
102
gai n be come s
1 2 3 4 5 6
// cha pter 11 //example11 .2 0 //page224 Vcc=20 // V Rc=1 // kil o ohm
7 8 / / for
satu rati on collec be co me s 0V so we get
tor
cu rr en t , k n e e vol tag e
9 Ic_sat=Vcc/Rc 10 11 / / it ca n be se en fro m t h e circuit
vol tag e ( i . e . when Ib=0 ) equ als 12 13 14 15 16 17 18 19
th at cu t −o f f Vcc i t s e l f
Vce_cutoff=Vcc
// th e eq uat ion
of lo ad line
beco mes Ic =
−Vce+20
clf() x = linspace (0,20,5) y=-x+20 plot2d (x,y,style=3,rect=[0,0,21,21])
20 xtitle ( ”d c lo ad line ” , ”V ce( vo lt s )” , ” I c (mA) ” ) 21 22 printf ( ” saturation col lect or cur ren t = %.3 f mA \n ” , Ic_sat) 23 printf ( ”cut − off colle ctor emi tt er vol tag e = %.3 f V \ n ” ,Vce_cutoff)
Scilab code Exa 11.21 Maximum allowable collector current
1 // cha pter 11
103
Figure 11.8: Saturation and cutoff points
104
2 3 4 5 6 7
//example11 //page225 Vce=20 Pd=100
.2 1
// V // mW
8 // si nc e Pd=Vc e ∗Ic we ge t 9 Ic=Pd/Vce 10 11 printf ( ”maximum allowab le mA \n ” ,Ic)
co ll ec to r current
105
= %.3 f
Chapter 12 Transistor biasing
Scilab code Exa 12.1 Maximum collector current and zero signal collector
current 1 2 3 4 5 6 7 8
// cha pte r 12 // ex am pl e 12.1 // pa ge 23 5 V_CC=6 // V R_C=2.5 // kil o ohm
// for fai thfu l amplific ation V CE sho ul d n o t be less t h a n V CC for Si transistor so
9 V_max=V_CC-1 10 I_max=V_max/R_C 11 12 / / A s neg ati ve an d positive
e q ua l , c h a n g e in colle ctor and oppo site so
half cy ce s of in pu t ar e cu rr en t will be eq ua l
13 I_min=I_max/2 14 15 printf ( ”Maximum allowab
le co ll ec to r current 106
= %.3 f
Figure 12.1: Maximum collector current and zero signal collector current mA \n ” ,I_max) 16 printf ( ”Minimum zer o sign al co ll ect or current = %.3 f mA \n” ,I_min) 17 18 // the circu it d i a g r a m is con str uc te d on xc os an d it s scree nshot
h as b ee n ta ke n .
19 // th e waveform giv en can no t be obt ain ed in xc os
unless w e as sume nec essa ry valu es as da ta is i n s u f f i c i e n t for pl ot ti ng gra ph in sc il ab . 20 // so waveform is construc ted as be lo w 21 22 23 24 25 26
clf() x = linspace (1,5* %pi ,100) [t]= sin (x)+1 plot (x,[t]) xtitle ( ”max an d min allowable ” , ” i c (mA)” )
107
co ll ect or
currents
”
,” t
Scilab code Exa 12.2 Maximum input signal
1 // cha pter 12 2 //example12 .2 3 //page236 4 5 6 7 8 9 10 11 12 13 14 15
Vcc=13 // V V_knee=1 // V Rc=4 // kil o ohm gain_beta=100 V_Rc=Vcc-V_knee Ic=V_Rc/Rc Ib=Ic/gain_beta Vs=Ic/5 // si nce
Ic /V s = 5 mA/V given
printf ( ”maximum inpu t si gna l voltage f mV \n ” ,Vs,Vs*1000)
= %.3 f V or %.3
Scilab code Exa 12.3 Operating point and base resistance
1 2 3 4 5 6 7 8 9 10 11
// cha pter 12 //example12 .3 //page240 Vbb=2 // V Vcc=9 // V Rc=2 // kil o ohm Rb=100 // kil o ohm gain_beta=50
// by Kirc hof f vol tag e l aw on ba se si de , we ge t I b Rb+Vbe=Vbb s o 108
∗
12 Ib=Vbb/Rb / / V be is negligible 13 Ic=gain_beta*Ib 14 15 // b y Kirc hof f vol tag e l aw on collec
tor
si de , we ge t
I c ∗Rc+Vce=Vcc s o 16 Vce=Vcc-Ic*Rc 17 18 19 20 21 22 23 24 25 26
// now fo r Rb=50 ki lo ohm Rb2=50 // kil o ohm // sinc e Rb is h a l v e d , I b is d ou b le d s o Ib2=2*Ib Ic2=Ib2*gain_beta Vce2=Vcc-Ic2*Rc printf ( ” for
Rb = 1 0 0 kilo ohm, col lect or curr ent = % . 3 f mA \ nand col lec tor emit ter volta ge = %.3 f V \ n \n ” ,Ic,Vce) 27 printf ( ” for Rb = 5 0 kilo ohm, collec tor cu rr en t = % . 3 f mA \ nand col lec tor emit ter volta ge = %.3 f V \ n ” ,Ic2,Vce2)
Scilab code Exa 12.4 DC load line and operating point
1 2 3 4 5 6
// cha pter 12 //example12 .4 //page241 Vcc=6 // V Rb=530 // kil o ohm
7 Rc=2
// kil o ohm 109
Figure 12.2: Operating point and base resistance 8 gain_beta=100 9 Vbe=0.7 // V 10 11 // when Ic =0, Vc e=Vc c i . e . Vc e=6 an d when Vc e=0,
Vc c/R c i . e . Ic =6/ 2 12 / / so eq ua ti on of lo ad line 13 14 15 16 17 18 19 20 21 22 23
b ecom es Ic=
Ic=
−0. 5∗ Vce+3
x = linspace (0,6,5) y=-0.5*x+3 plot2d (x,y,style=3,rect=[0,0,7,4]) xtitle ( ”d c lo ad line ” , ”V ce( vo lt s )” , ” I c (mA) ” )
// sin ce Vcc=Ib ∗Rb+Vbe we g et Ib=(Vcc-Vbe)/Rb Ic=Ib*gain_beta Vce=Vcc-Ic*Rc
24 printf ( ”the
operatin
g poin t is %.3 f V an d % .3 f mA 110
\n
Figure 12.3: DC load line and operating point ” ,Vce,Ic) 25 26 stability_factor=gain_beta+1 27 28 printf ( ” st ab il it y facto r=%.1 f
111
\n ” ,stability_factor)
Scilab code Exa 12.5 Base resistance and zero signal collector current
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
// cha pter 12 //example12 .5 //page242 Vcc=12 // V gain_beta=100 Vbe=0.3 // V Ic=1 // mA
// since
gain beta
=Ic /Ib
Ib=Ic/gain_beta
// sin ce Vcc=Ib ∗Rb+Vbe we g et Rb=(Vcc-Vbe)/Ib gain_beta2=50
// sin ce Vcc=Ib ∗Rb+Vbe we g et Ib2=(Vcc-Vbe)/Rb Ic2=Ib2*gain_beta2
printf ( ” for be ta = 10 0 , ba s e resi sto r = %.3 f kilo ohm \n” ,Rb) 23 printf ( ” for be ta = 5 0 , ze ro signal collec tor cu rr en t for sam e Rb is = %.3 f mA \n ” ,Ic2)
112
Scilab code Exa 12.6 Three currents for given circuit
1 // cha pter 12 2 //example12 .6 3 //page242 4 5 6 7 8 9 10 11
Vcc=10 // V R_B=1d3 // kil o ohm R_E=1 // kil o ohm Vbe=0 // si nc e it is neg ligi ble gain_beta=100
// b y Kirchof f volt age l aw to ba se side we ge t Vcc= I B ∗R B+Vbe+I E ∗R E 12 // bu t I E =I B +I C and I C =gain beta ∗I B 13 // so we get Vcc=I B ∗R B+Vbe+R E ∗ I B ∗(1+ ga in bet a ) 14 // making I B as subjec t we ge t 15 16 I_B=(Vcc-Vbe)/(R_B+R_E*(1+gain_beta)) 17 I_C=gain_beta*I_B // in amp ere 18 I_E=I_C+I_B // in am pere
// in amp ere
19 20 printf ( ”base curren t = %.4 f mA \n” ,I_B) 21 printf ( ” co ll ect or current = %.4 f mA \n” ,I_C) 22 printf ( ” emitt er curren t = %.4 f mA \n ” ,I_E)
Scilab code Exa 12.7 Required load resistance
1 // cha pter 12 2 //example12 .7 3 //page243 4 5 V_CC=15
// V 113
6 7 8 9 10 11 12 13 14 15 16 17 18 19
gain_beta=100 V_BE=0.6 // V V_CE=8 // V I_C=2 // mA
// he re V CC=V CE+I C ∗R C so we ge t R_C=(V_CC-V_CE)/I_C I_B=I_C/gain_beta
∗R B+V BE so we get
// al so V CC=I B R_B=(V_CC-V_BE)/I_B
printf ( ” collec tor resistance = %.3 f kilo ) 20 printf ( ”ba se resist ance = %.3 f kilo ohm
ohm
\n ” ,R_C
\n ” ,R_B)
Scilab code Exa 12.8 Operating point
1 2 3 4 5 6 7 8 9 10 11
// cha pter 12 //example12 .8 //page245 V_CC=20 // V R_B=100 // kil o ohm R_C=1 // kil o ohm V_BE=0.7 // V gain_beta=100
// we know that
R B=(V CC −V BE−gain beta
I B s o we ge t 114
∗R C∗ I B )/
Figure 12.4: Required load resistance 12 13
I_B=(V_CC-V_BE)/(R_B+gain_beta*R_C)
14 I_C=gain_beta*I_B 15 16 V_CE=V_CC-I_C*R_C 17 18 printf ( ” operating point is %.3 f V, %.3 f mA \n ” ,V_CE, I_C) 19 20 // th e accura te an sw er is 10.35 V,9.65m A but in book
it
is gi ve n as 10. 4 V,9.6 mA
Scilab code Exa 12.9 Required feedback resistor and new operating point
115
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
// cha pter 12 //example12 .9 //page245 V_CC=12 // V gain_beta1=100 gain_beta2=50 V_BE=0.3 // V V_CE=8 // V I_C=1 // mA
// he re V CC=V CE+I C ∗R C so we ge t R_C=(V_CC-V_CE)/I_C I_B=I_C/gain_beta1
// we know that I B so
R B=(V CC −V BE−gain beta1
∗R C∗ I B )/
18 R_B=(V_CC-V_BE-gain_beta1*R_C*I_B)/I_B 19 20 21 // for gain beta= 50 i . e . gain beta2 22 23 // we know that R B=(V CC −V BE−gain beta2
∗R C∗ I B )/
I B s o we ge t 24 I_B2=(V_CC-V_BE)/(R_B+gain_beta2*R_C) 25 26 I_C2=gain_beta2*I_B2 27 28 V_CE2=V_CC-I_C2*R_C 29 30 printf ( ” for be ta= 100, required ba se resi sta nce = %.3 f ki lo ohm \n ” ,R_B) 31 printf ( ” for be ta= 50,n ew operatin g poin t is %.3 f V, % . 3 f mA \n ” ,V_CE2,I_C2)
116
Scilab code Exa 12.10
1 2 3 4 5 6 7 8 9 10 11 12 13 14
Base resistance
// cha pter 12 //example12 .1 0 //page246 V_BE=0.7 // V gain_beta=100 I_C=1 // mA V_CE=2 // V I_B=I_C/gain_beta
// s i n c e V CE=V BE+V CB we ge t V_CB=V_CE-V_BE
15 R_B=V_CB/I_B 16 17 printf ( ”base
res is ta nc e=%.3 f ki lo ohm
\n ” ,R_B)
Scilab code Exa 12.11 DC load line and operating point
1 2 3 4 5 6
// cha pter 12 //example12 .1 1 //page248 Vcc=15 // V Re=2 // kil o ohm
117
7 8 9 10 11 12
Rc=1 // kil o ohm gain_beta=100 Vbe=0.7 // V R1=10 // kil o ohm R2=5 // kil o ohm
13 // when Ic =0, Vc e=Vc c i . e . Vc e=6 an d when Vc e=0,
Vc c /( Rc+Re) i . e . Ic =15/(1+ 2) 14 // so eq uat ion of lo ad line b ecom es Ic = 15 16 17 18 19 20 21 22
Ic=
−(1/3) ∗ Vce+5
clf() x = linspace (0,15,5) y=-(1/3)*x+5 plot2d (x,y,style=3,rect=[0,0,16,6]) xtitle ( ”d c lo ad line ” , ”V ce( vo lt s )” , ” I c (mA) ” ) V2=Vcc*R2/(R1+R2)
// vol tag e acr oss R2 i . e . 5 kilo
ohm 23 Ie=(V2-Vbe)/Re 24 Ic=Ie 25 Vce=Vcc-Ic*(Rc+Re) 26 27 printf ( ”the ” ,Vce,Ic)
operatin
Scilab code Exa 12.12
g poin t is %.3 f V an d % .3 f mA
Operating point by thevenin theorem
1 // cha pter 12 2 //example12 .1 2 3 //page249 4
118
\n
Figure 12.5: DC load line and operating point
119
5 6 7 8 9 10
Vcc=15 // V Re=2 // kil o ohm Rc=1 // kil o ohm gain_beta=100 Vbe=0.7 // V R1=10 // kil o ohm
11 12 13 14 15 16 17 18 19 20
R2=5
24 25 26 27 28 29
we=(Eo get −Vbe ) /( Re+Ro/ g a i n b e t a ) // Ic // R o/ gain be ta is neg lig ibl e compared to Re so
// kil o ohm
Eo=Vcc*R2/(R1+R2) Ro=R1*R2/(R1+R2) printf ( ”theve nin printf ( ”the ve nin
voltage = %.3 f V \n ” ,Eo) resist ance = %.3 f kilo ohm
\n ” ,Ro)
// here Eo=Ib ∗Ro+Vbe+I e ∗Re // n ow considering Ie =gain beta ∗ Ib , and making Ib as subjec t we ge t 21 // Ib=( Eo −Vbe) /(Ro +ga in be ta ∗Re ) 22 // Ic =gain beta ∗ Ib=gain beta ∗ ( Eo−Vbe) /(Ro +ga in be ta ∗ Re ) 23 // dividing nu me ra to r and de no mi na to r by gain beta
Ic=(Eo-Vbe)/Re Vce=Vcc-Ic*(Rc+Re) printf ( ”the ” ,Vce,Ic)
operatin
g poin t is %.3 f V an d % .3 f mA
Scilab code Exa 12.13 Value of collector current
120
\n
Figure 12.6: Operating point by thevenin theorem 1 // cha pter 12 2 //example12 .1 3 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
//page250 R1=50 // kil o ohm R2=10 // kil o ohm Re=1 // kil o ohm Vcc=12 // V Vbe1=0.1 // V Vbe2=0.3 // V V2=Vcc*R2/(R1+R2)
// volt age
// for Vbe= 0. 1 V Ic1=(V2-Vbe1)/Re
// for Vbe= 0. 3 V
18 Ic2=(V2-Vbe2)/Re
121
across R
2
19 20 printf ( ” for V BE=0.1 V, \n ” ,Ic1) 21 printf ( ” for V BE=0.3 V, \n \n ” ,Ic2) 22
co ll ec to r curren t = %.3 f mA co ll ec to r curren t = %.3 f mA
23 Vbe_change=100*(Vbe2-Vbe1)/Vbe1 24 Ic_change=-100*(Ic2-Ic1)/Ic1
// ne gat ive sig n since Ic dec reas es 25 printf ( ”c omment : i f V BE chang es by %.5 f perce nt , \ ncoll ector cur rent ch an ge s by % .3 f per ce nt \n ” , Vbe_change ,Ic_change) 26 printf ( ”s o collector cu rr en t is
transistor
pa r am e t e r variations
i nd e pe nd e nt of \n ” )
27 28 // th e c h an ge in V BE is
2 00 per cen t no t 3 0 0 per ce nt . It is mi st ak e in te xt bo ok
Scilab code Exa 12.14 Emitter current Collector emitter voltage and Col-
lector potential 1 2 3 4 5 6 7 8 9 10 11
// cha pter 12 //example12 .1 4 //page251 Vcc=20 // V Re=5 // kil o ohm Rc=1 // kil o ohm Vbe=0 / / co ns id er in g it a s negligi R1=10 // kil o ohm R2=10 // kil o ohm
12 V2=Vcc*R2/(R1+R2)
122
ble
13 14 15 16 17 18 19 20 21 22 23
// si n ce V2=Vbe+Ie ∗Re so Ie=(V2-Vbe)/Re Ic=Ie Vce=Vcc-Ic*(Rc+Re) Vc=Vcc-Ic*Rc printf ( ” emitt er curren t = %.3 f mA \n ” ,Ie) printf ( ” col lec tor emit ter volt age = %.3 f V \n ” ,Vce) printf ( ” collec tor potenti al = %.3 f V \n ” ,Vc)
Scilab code Exa 12.15 R1 R2 and emitter resistance
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
// cha pter 12 //example12 .1 5 //page252 R_C=2.2 // kil o ohm V_CC=9 // V gain_beta=50 V_BE=0.3 // V I_C=2 // mA V_CE=3 // V I_B=I_C/gain_beta I1=10*I_B
// I1= V CC/(R1 +R2) so l e t Rt=R1+R2 thus
we get
Rt=V_CC/I1
// b y Kir ch of f vo lt ag e l aw t o collector
19 // V CC=I C ∗R C+V CE+I E ∗R E and also
123
sid e we ge t we ha ve I C =
I E so 20 // V CC=I C ∗R C+V CE+I C ∗R E so making R E as
subjec t we ge t 21 R_E=((V_CC-V_CE)/I_C)-R_C / / in kilo ohm 22 23 V2=V_BE+I_C*R_E // sin ce V E=I C ∗R E 24 25 26 27 28 29
R2=V2/I1 R1=Rt-R2 printf ( ” emitte r res ist anc e = %.3 f ohm printf ( ”R1 = % 3f ki lo ohm \n” ,R1) printf ( ”R2 = % 3f ki lo ohm \n” ,R2)
Scilab code Exa 12.16 R1 and collector resistance
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
// cha pter 12 //example12 .1 6 //page252 alpha=0.985 V_BE=0.3 // V V_CC=16 // V V_CE=6 // V I_C=2 // mA R_E=2 // kil o ohm R2=20 // kil o ohm gain_beta=alpha/(1-alpha) I_B=I_C/gain_beta V_E=I_C*R_E V2=V_BE+V_E
18 V1=V_CC-V2
124
\n ” ,R_E*1000)
19 20 21 22 23 24
I1=V2/R2 R1=V1/I1 V_RC=V_CC-V_CE-V_E R_C=V_RC/I_C
25 26 printf ( ”R1 = %.3 f ki lo ohm 27 printf ( ” collec tor resistance )
\n ” ,R1) = %.3 f kilo
ohm
\n ” ,R_C
Scilab code Exa 12.17 Emitter current
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
// cha pter 12 //example12 .1 7 //page253 Vcc=15 // V Re=2 // kil o ohm Rc=1 // kil o ohm gain_beta=100 Vbe=0.7 // V R1=10 // kil o ohm R2=5 // kil o ohm Eo=Vcc*R2/(R1+R2) Ro=R1*R2/(R1+R2) printf ( ”theve nin printf ( ”the ve nin
// here
voltage = %.3 f V \n ” ,Eo) resist ance = %.3 f kilo ohm
\n ” ,Ro)
Eo=Ib ∗Ro+Vbe+I e ∗Re
20 // n ow considering
Ie =gain beta 125
∗ Ib , we can replace
Figure 12.7: Emitter current Ib =Ie / ga in be ta 21 // Eo=(I e / ga in be ta ) ∗Ro+Vbe+I e ∗Re 22 // making Ie as subjec t we ge t 23 Ie=(Eo-Vbe)/(Re+Ro/gain_beta) 24 25 printf ( ” emitt er curren t = %.3 f mA
Scilab code Exa 12.18
R1
1 // cha pter 12 2 //example12 .1 8 3 //page254
126
\n ” ,Ie)
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
V_CC=10 // V V_BE=0.2 // V I_E=2 // mA I_B=50d-3 // mA R_E=1 // kil o ohm R2=10
// kil o ohm
V2=V_BE+I_E*R_E I2=V2/R2 I1=I2+I_B V1=V_CC-V2 R1=V1/I1 printf ( ”R1 = %.3 f ki lo ohm
\n ” ,R1)
Scilab code Exa 12.19 Potential divider method of biasing
1 2 3 4 5
// cha pter 12 //example12 .1 9 //page255 printf ( ” i ) i f R2 is
sh or te d , ba se will be gr ou n de d . It wi ll be \n left w i t h o u t f o r w a r d bi as and transistor \n wi ll b e c ut of f s o o u t p u t is z e r o . \ n \n” ) 6 printf ( ” i i ) i f R2 is open , fo rw ar d bias will be ve ry high . The \n co ll ec to r c u r r e n t wi ll be v e r y hi gh an d colle ctor \n e m i t t e r v o l t a g e w il l be very low . \n \n ” ) 7 printf ( ” i i i ) if R1 is s ho r t e d , transistor will be in satu rati on \n due t o e xc es si ve f o r w a r d b i as . The ba se will be a t Vcc and e m i t t e r wi ll \n be sli gh tly
be l o w Vcc . \ n \n ” ) 127
8 printf ( ” iv ) i f R1 is open , transistor
will be Hence tr an si st or wi ll be zer o . \n ” )
wit hou t for war d bias . \ n be cutoff i . e . ou tp ut will
Scilab code Exa 12.20 Check whether circuit is mid point biased
1 2 3 4 5 6 7 8 9
// cha pter 12 //example12 .2 0 //page256 Vcc=8 // V Rb=360 // kil o ohm Rc=2 // kil o ohm gain_beta=100 Vbe=0.7 // V
10 11 // when Ic =0, Vc e=Vc c i . e . Vc e=8 an d when Vc e=0,
Vc c/R c i . e . Ic =8/ 2 12 / / so eq ua ti on of lo ad line 13 14 15 16 17 18 19 20 21 22 23
b ecom es Ic=
−0. 5∗ Vce+4
clf() x = linspace (0,8,5) y=-0.5*x+4 plot2d (x,y,style=3,rect=[0,0,9,5]) xtitle ( ”d c lo ad line ” , ”V ce( vo lt s )” , ” I c (mA) ” )
// sin ce Vcc=Ib ∗Rb+Vbe we g et Ib=(Vcc-Vbe)/Rb Ic=Ib*gain_beta Vce=Vcc-Ic*Rc
24
128
Ic=
Figure 12.8: Check whether circuit is mid point biased 25 printf ( ”the operatin g poin t is %.3 f V an d % .3 f mA \n ” ,Vce,Ic) 26 if Vce
Vcc/2-0. 1 // ch ec k i f V CE is
ne arl y half
of V CC it is mid −poi nt bia sed
27 printf ( ” circu 28 else 29 printf ( ” circu 30 end
it
is n o t mid −point
129
\n ” )
biased .
\n ” )
Scilab code Exa 12.21 Check whether circuit is mid point biased
1 2 3 4 5 6 7 8 9 10 11 12 13 14
// cha pter 12 //example12 .2 1 //page257 V_CC=10 // V R1=12 // kil o ohm R2=2.7 // kil o ohm V_BE=0.7 // V R_E=180d-3 // kil o ohm R_C=620d-3 // kil o ohm V2=V_CC*R2/(R1+R2) I_E=(V2-V_BE)/R_E I_C=I_E
15 V_CE=V_CC-I_C*(R_C+R_E) 16 17 printf ( ”the operatin g poin t is %.3 f V an d % .3 f mA ” ,V_CE,I_C) 18 if V_CE< V_C C/2+0.1 | V_ CE>V_CC/2-0.1 // ch ec k i f
V CE is ne arl y half
of V CC
19 printf ( ” circu it is mid −poi nt bia sed \n ” ) 20 else 21 printf ( ” circu it is n o t mid −point biased . \n ” ) 22 end 23 24 // the accu ra te a n s w e r for collec tor cu rr en t is
6.3 15 m A b ut in book it
is giv en as 6.3 3 mA
130
\n
Scilab code Exa 12.22
1 2 3 4 5 6 7 8 9 10 11 12 13 14
// cha pter 12 //example12 .2 2 //page257
15 16 17 18 19 20 21 22
I_C=I_E
Base current
V_CC=10 // V R1=1.5 // kil o ohm R2=0.68 // kil o ohm R_E=0.24 // kil o ohm V_BE=0.7 // V beta_min=100 beta_max=400 V2=V_CC*R2/(R1+R2) I_E=(V2-V_BE)/R_E
beta_avg=(beta_min*beta_max)^0.5 I_B=I_E/(beta_avg+1) printf ( ”base
current
= % f mi cr o am pe re
\n ” ,I_B*1000)
/ / th e ac cu ra te a n s w e r for ba se cu rr en t is 50 .1 51 mi c ro am pere bu t in book it is gi ve n as 49. 75 micro amp er e
131
Scilab code Exa 12.23 Collector cutoff current and percent change in zero
signal collector current 1 // cha pter 12 2 //example12 .2 3 3 //page258 4 5 6 7 8 9 10 11 12 13 14
gain_beta=40 I_C1=2 // mA t1=25 // degree s t2=55 // degree s I_CBO1=5d-3 // mA
// for I CBO=5 mi cr o am pere at 25 degrees I_CEO1=(1+gain_beta)*I_CBO1 I_CBO2=I_CBO1*2^((t2-t1)/10)
ev er y 10 degr ees . So for −t1 ) /10) times .
t2
/ / sin ce it do ub le s −t1 , it be co me s 2ˆ(( t2
15 I_CEO2=(1+gain_beta)*I_CBO2 16 I_C2=I_CEO2+I_C1 17 18 19 20 21 22 23 24 25
I_C_change=100*(I_C2-I_C1)/I_C1
// for I CBO= 0. 1 mic ro am pere at 25 degrees t1_dash=25 // degree s t2_dash=55 // degree s I_CBO1_dash=0.1d-3 // mA I_C1_dash=2 // mA I_CBO2_dash=I_CBO1_dash*2^((t2-t1)/10)
dou bl es ev er y 10 degr ees . So for be com es 2ˆ( ( t2 −t1 ) /10) times . 26 27 28 29 30
t2
/ / si nc e it −t1 , it
I_CEO2_dash=(1+gain_beta)*I_CBO2_dash I_C2_dash=I_CEO2_dash+I_C1_dash I_C_change_dash=100*( I_C2_ dash -I_C1_dash)/ printf ( ” col lec tor I_CEO1)
cutoff
cur ren t = %.3 f mA
132
I_C1_dash
\n \n” ,
31 printf ( ” per ce nt ch an ge in ze ro signal
cur rent giv en that \nI CBO=5 mic ro am pe re at 25 degree is = %.3 f per cen t \n \n ” ,I_C_change) 32 printf ( ” per ce nt ch an ge in ze ro signal cur rent giv en that \nI CBO= 0. 01 mi cr o amp ere at 25 degree is = %.3 f percent \n ” ,I_C_change_dash)
Scilab code Exa 12.24
1 2 3 4 5 6 7 8
Base current at given temperature
// cha pter 12 //example12 .2 4 //page259 alpha=0.99 I_E=1 // mA t1=27 // degree s t2=57 // degree s
9 I_CBO1=0.02d-3 // mA 10 11 I_CBO2=I_CBO1*2^((t2-t1)/6)
ev er y 6 de gr ee s . So for t1 ) /6) times . 12 13 I_C=alpha*I_E+I_CBO2 14 I_B=I_E-I_C 15 16 printf ( ”base current
t2
/ / sin ce it do ub le s −t1 , it be co me s 2ˆ(( t2 −
= %.1 f mi cr o amp ere ”
Scilab code Exa 12.25 Fault in given circuit
133
,I_B*1000)
1 2 3 4 5
// cha pter 12 //example12 .2 5 //page261 printf ( ” since
ba se volt age is ze ro , it means th at th er e is no p a t h \nf or cu rr en t in t he ba se
circuit . So t h e tran sisto r will be off i . e . I C =0,I E =0. \ nSo V C=10V and V E=0. \ nSo obvious fault is R1 is o pen . \ n ” )
Scilab code Exa 12.26 Fault in given circuit
1 2 3 4 5 6 7 8 9 10 11 12 13
// cha pter 12 //example12 .2 6 //page261 R1=18 // kil o ohm R2=4.7 // kil o ohm Re=1 // kil o ohm Vcc=10 // V V_B=Vcc*R2/(R1+R2) printf ( ” voltage at ba se = %.3 f V \n ” ,V_B) printf ( ”T he fact that V C=10V a nd V E is nearly
eq ua l to V B reveals \ nth at I C= 0 and I E =0.S o I B dr op s t o ze ro . So ob vi ou s fault is R E is o pen . \n ” )
134
Chapter 13 Single stage transistor amplifiers
Scilab code Exa 13.1 Phenomenon of phase reversal
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
// cha pte r 13 // ex am pl e 13.1 // pa ge 27 2 Rc=4 // kil o ohm Vcc=10 // V Ib_zero=10d-3 // mA Ib_max=15d-3 // mA Ib_min=5d-3 // mA gain_beta=100 Ic_zero=Ib_zero*gain_beta Ic_max=Ib_max*gain_beta Ic_min=Ib_min*gain_beta Vc_zero=Vcc-Ic_zero*Rc
17 Vc_max=Vcc-Ic_max*Rc
135
18 Vc_min=Vcc-Ic_min*Rc 19 20 printf ( ” As col lect or
curr ent increases from % .3 f m A to %.3 f mA \ no ut pu t voltage decreases from % .3 f V to %.3 f V \n ” ,Ic_zero ,Ic_max ,Vc_zero ,Vc_max ) 21 printf ( ” As col lect or curr ent decrea ses from % .3 f m A to %.3 f mA to %.3 f V 22 printf ( ”T hus ph as e from
\ no ut pu t voltage incr ease s from %.3 f V \n ” ,Ic_max,Ic_min,Vc_max,Vc_min) ou tp ut volt age is 1 8 0 deg ree s ou t of inp ut voltage \n ” )
23 24 printf ( ”N ot e :
\ ni ) in pu t volt age and in pu t cur ren t ar e in ph as e \nii ) inp ut voltage and ou tp ut cur ren t ar e in ph as e \ n i i i ) ou tp ut voltage is 18 0 degr ees o ut of ph as e w it h in pu t volt age \n ” )
25 26 27 / / plottin
g ba se cu rr en t and colle ctor cu rr en t and ou tp ut volt age in same g r ap h usi ng following co de ins te ad of xc os
28 clf() 29 30 31 32 33 34
x = linspace (0,2* %pi ,100) ib=5* sin (x)+10 ic=0.5* sin (x)+1 vc=-4* sin (x)+6 plot2d (x,ib,style=1,rect=[0,0,20,20]) xtitle ( ”base curren t ( mic ro am pe re)
Blue
− Black co ll ec to r current (mA) − o u t p u t v o l t a g e(V) − Green ” ,” t ”)
35 plot2d (x,ic,style=2,rect=[0,0,20,20]) 36 plot2d (x,vc,style=3,rect=[0,0,20,20])
136
Figure 13.1: Phenomenon of phase reversal
Scilab code Exa 13.2 dc and ac load and collector emitter voltage and
collector current 1 2 3 4 5
// cha pte r 13 // ex am pl e 13.2 // pa ge 27 4 printf ( ” i ) Refer ing
to th e Th eve ni n circu it , we see th at volt age sou rce \nis sh or t and resistances exce pt Rc and Re are byp ass ed . \nThus dc load = R c + Re \n \n ” ) 6 printf ( ” Re fe ri ng t o a c eq ui va le nt circ uit , R c is par all el w it h Rl . \nThus ac load = R c ∗ Rl/(Rc+Rl) \ n \n \n ” ) 7 printf ( ” i i ) S in ce Vcc=Vce +Ic ∗ (Rc +Re) we ge t \n max Vc e = Vc c and max Ic = Vcc/( Rc+Re) 137
\n \n \n ” )
Figure 13.2: dc and ac load and collector emitter voltage and collector current
8 printf i i i )On tor app ly l , col ch lecantor curouren and( ”collec eming it tearc signa ge ab t Qt \ nvoltage
poin t . \ nMaximum co ll ec to r curren t = Ic . \ nMaximum positi ve s w i n g of a c collector em it te r vo lt ag e = I c ∗R AC \n So tota l maximum co ll ect or emitte r voltage = Vce+Ic ∗R AC \n\nMaximum po si ti ve swing of a c col lec tor cur ren t = V ce/ R AC so \ nTotal maximum c o l l ec t o r cur ren t = Ic+ Vce/ R AC \n ” )
Scilab code Exa 13.3 DC load line operating point and AC load line
138
Figure 13.3: DC load line operating point and AC load line 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
21 22 23
// cha pte r 13 // ex am pl e 13.3 // pa ge 27 8 Vcc=15 Re=2 // Rc=1 // Rl=1 // Vbe=0.7
/ / dc loa
// V kil o ohm kil o ohm kil o ohm // V d line
// when Ic =0, Vc e=Vc c i . e . Vc e= 15 an d when Vc e =0, Ic= Vc c /( Rc+Re) i . e . Ic =1 5/3 // so eq ua tio n of load l ine beco m es Ic = −(1/3) ∗ Vce+15 clf() x = linspace (0,15,5) y=-(1/3)*x+5 plot2d (x,y,style=3,rect=[0,0,16,6]) xtitle ( ”d c lo ad lin e −g r e e n ac l o a d l i n e blue” , ” col lec tor emit ter volt age ( volts )” , ” co ll ec to r current (mA)” ) V2=5 // V // s in ce volt age I e ∗Re we get
24
Ie=(V2-Vbe)/Re
25
Ic=Ie
acr oss R2 i s V 2=5 V and V2=Vbe+
139
−
Vce=Vcc-Ic*(Rc+Re)
26 27 28
printf ( ”the operating mA \n ” ,Vce,Ic)
point
is %.3 f V an d % .3 f
29 30 31 / / a c lo ad line 32 33 R_AC=Rc*Rl/(Rc+Rl) 34 V_ce=Vce+Ic*R_AC
// a c lo ad // maximum co ll ec to r emitter
voltage // m aximum co ll ec to r current // t h e equ at io n of a c lo ad line in t e r m s of V ce and I c be co me s I_c=Ic+Vce/R_AC
35 36
y=-(I_c/V_ce)*x+I_c plot2d (x,y,style=2,rect=[0,0,10,20])
37 38
Scilab code Exa 13.4 DC and AC load lines
1 2 3 4 5 6 7 8 9 10 11
// cha pte r 13 // ex am pl e 13.4 // pa ge 27 9 Vcc=20 // V Re=0 / / kilo o hm, sin ce gi v en a s negligible Rc=10 // kil o ohm Rl=30 // kil o ohm Vbe=0.7 // V Vce=10
12 Ic=1
// mV // mA 140
Figure 13.4: DC load line operating point and AC load line
141
13 14 / / dc loa d line 15 16 // when Ic =0, Vc e=Vc c i . e . Vc e= 15 an d when Vc e 17 18 19 20 21 22 23
=0, Ic= Vc c /( Rc+Re) i . e . Ic =20 /10 mA // so eq ua tio n of load l ine beco m es Ic =
−(1/10) ∗
Vce+2 clf() x = linspace (0,20,5) y=-(1/10)*x+2 plot2d (x,y,style=3,rect=[0,0,21,6]) xtitle ( ”d c lo ad lin e −g r e e n ac l o a d l i n e blue” , ” col lec tor emit ter volt age ( volts )” , ” co ll ec to r current (mA)” )
24 25 / / a c lo ad line 26 R_AC=Rc*Rl/(Rc+Rl) 27 28 V_ce=Vce+Ic*R_AC
// a c lo ad // maximum co ll ec to r emitter
voltage 29 30 31 32 33
I_c=Ic+Vce/R_AC aximum // t h e equ at io n of// a cm lo ad lineco llinect to e rrm scurrent of V ce and I c be co me s x = linspace (0, V_ce ,10) y=-(I_c/V_ce)*x+I_c plot2d (x,y,style=2,rect=[0,0,21,6])
Scilab code Exa 13.5 ac load line
1 // cha pte r 13
142
−
Figure 13.5: DC and AC load lines
143
2 // ex am pl e 13.5 3 // pa ge 28 0 4 5 printf ( ” operating
point is (8 V,1 mA) . Du rin g pos itiv e ha lf cy cl e of \ n ac signa l collector cu rr en t swin gs fr om 1 mA to 1.5 mA \ nand col lec tor
emi tte r volt age sw in gs fro m 8 V t o 7 V . \ nT hi s is at A . D ur i n g neg ativ e half cycle of \ n ac signal col lec tor cur ren t sw in gs fro m 1 mA t o 0.5 m A \ nand collec tor em it te r vol tag e sw in gs fro m 8 V t o 9 V. \n T h i s is at B. \n \n” ) 6 7 printf ( ”N ote : When ac
signal is ap pl ie d , ac signal collec tor cu rr en t and \ncollector emi tt er vol tag e variations ta ke plac e a bo ut Q poi nt . \ nAlso , oper atin g poi nt moves al on g lo ad line . \ n ” )
8 9 clf() 10 x = linspace (-3*%pi,-%pi,10) 11 plot (x,-0.5* sin (x)+1) 12 13 14 15 16 17 18 19
x = linspace (7,9,10) plot (x,5-0.5*x)
x = linspace (-3*%pi,-%pi,10) plot ( - sin (x)+8,x) plot (x , xgrid () ) xtitle ( ” collec tor cu rr ent and collec tor em itt er voltage swi ngs” , ” colle ctor em it te r vol tag e ( volts ) ” , ” co ll ect or current (mA)” ) 20 a = gca () ; // Han dle on ax es entity 21 a.x_loca tion = ” or ig in ” ; 22 a.y_loca tion = ” or ig in ” ; 23 24 // Some ope rat ions on enti ties cr eat ed by plo t . . . 25 a = gca () ; 26 a . isoview = ’ on ’ ; 27 a.children / / l i s t t he chil dren of th e ax e s : he re
144
it
is an C ompound child
28 pol y1= a.child ren.childr
ha nd le into
composed of 2 en tit ies // store polyline
en(2);
po ly 1 // anoth er way to ch an ge the
29 po ly 1.fore gro und = 4;
s ty le . . . // . . . and th e tickness
30 po ly 1.thic kne ss = 3;
cur ve .
31 poly1.clip_state= ’ of f ’ 32 a . isoview = ’ of f ’ ;
/ / clip ping
con tr ol
Scilab code Exa 13.6 Voltage gain
1 // cha pter 13 2 //example13 .6 3 //page282 4 5 6 7 8 9 10 11 12 13
Rc=2 // kil o ohm Rl=0.5 // kil o ohm Rin=1 // kil o ohm gain_beta=60 R_AC=Rc*Rl/(Rc+Rl) Av=gain_beta*R_AC/Rin printf ( ” volta ge ga in
= %.3 f
\n ” ,Av)
Scilab code Exa 13.7 Output voltage for given circuit
145
of a
Figure 13.6: ac load line
146
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
// cha pter 13 //example13 .7 //page282 Rc=10 Rl=10
// kil o ohm // kil o ohm
Rin=2.5 // kil o ohm gain_beta=100 Vin=1 // mV R_AC=Rc*Rl/(Rc+Rl) Av=gain_beta*R_AC/Rin
// si nc e Av=Vou t/Vi n we get Vout=Av*Vin printf ( ”output
volt age = %.3 f mV
\n ” ,Vout)
Scilab code Exa 13.8 Various parameters for given transistor amplifier
1 2 3 4 5 6 7 8 9 10 11 12
// cha pter 13 //example13 .8 //page282 del_Ib=10d-3 // mA del_Ic=1 // mA del_Vbe=0.02 // V Rc=5 // kil o ohm Rl=10 // kil o ohm Ai=del_Ic/del_Ib Rin=del_Vbe/del_Ib
13 R_AC=Rc*Rl/(Rc+Rl)
147
14 15 16 17 18 19
Av=Ai*R_AC/Rin Ap=Av*Ai printf ( ” current gain = % .3 f \n ” ,Ai) printf ( ”input im pe de nc e = %.3 f ki lo ohm \n ” ,Rin) printf ( ”ac loa d = %.3 f kil o ohm \n ” ,R_AC)
20 printf ( ” voltage gain = % .3 f \n ” ,Av) 21 printf ( ”po we r gain = %.3 f \n” ,Ap) 22 23 // the acc ura te an s w e r for volt age ga in = 16 6.6 67
and for power gai n = 1666 6.6 67 bu t in book th ey ar e giv en as 1 65 and 16 50 0 respec tively .
Scilab code Exa 13.9 Output voltage for given circuit
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
// cha pter 13 //example13 .9 //page283 Rc=3 // kil o ohm Rl=6 // kil o ohm Rin=0.5 // kil o ohm Vin=1 // mV gain_beta=50 R_AC=Rc*Rl/(Rc+Rl) Av=gain_beta*R_AC/Rin
// si nc e Av=Vou t/Vi n we get Vout=Av*Vin printf ( ”output
volt age = %.3 f mV
148
\n ” ,Vout)
Check operation of circuit
Scilab code Exa 13.10
1 2 3 4 5 6 7 8 9 10 11 12 13 14
// cha pter 13 //example13 .1 0 //page283 R1=1 R2=2 Vt=6
// kil o ohm // kil o ohm // V
Vb=Vt*R1/(R1+R2) if Vb==4 printf ( ” circu else printf ( ” circu
it
is ope rat ing
pro pe rly
\n ” )
it
is n o t ope ra tin g pr ope rly
be ca us e volt age at B sh ou ld be % .1 f V inste ad o f 4 V \n ” ,Vb) 15 end
Scilab code Exa 13.11 AC emitter resistance
1 2 3 4 5 6
// cha pter 13 //example13 .1 1 //page284 R1=40 R2=10
// kil o ohm // kil o ohm 149
7 8 9 10 11 12
Re=2 // kil o ohm Vcc=10 // V Vbe=0.7 // V V2=Vcc*R2/(R1+R2) // volt age across R Ve=V2-Vbe / / vol tag e acr oss Re
13 Ie=Ve/Re 14 re_dash=25/Ie 15 16 printf ( ”ac emitter )
2
res ist anc e = %.3 f ohm
Scilab code Exa 13.12 Voltage gain
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
// cha pter 13 //example13 .1 2 //page286 R1=150 // kil o ohm R2=20 // kil o ohm Re=2.2 // kil o ohm Rc=12 // kil o ohm Vcc=20 // V Vbe=0.7 // V V2=Vcc*R2/(R1+R2) // volt age across R Ve=V2-Vbe / / vol tag e acr oss Re Ie=Ve/Re re_dash=1d-3*25/Ie // in kilo ohm Av=Rc/re_dash printf ( ” voltage
gain = % .3 f
19
150
\n ” ,Av)
2
\n” ,re_dash
20 / / th e acc ura te an s w e r is
360 .64 2
Scilab code Exa 13.13 Voltage gain
1 2 3 4 5 6 7 8 9 10 11 12 13
// cha pter 13 //example13 .1 3 //page287 Rc=12 // kil o ohm Rl=6 // kil o ohm re_dash=33.3d-3 // kil o ohm R_AC=Rc*Rl/(Rc+Rl) Av=R_AC/re_dash printf ( ” voltage
gain = % .3 f
14 / / th e acc ura te an s w e r is
Scilab code Exa 13.14
1 2 3 4 5 6 7 8
\n ” ,Av)
120 .12 0
Input impedence
// cha pter 13 //example13 .1 4 //page288 R1=45 // kil o ohm R2=15 // kil o ohm Re=7.5 // kil o ohm Vcc=30 // V
151
9 10 11 12 13 14
Vbe=0.7 // V gain_beta=200 V2=Vcc*R2/(R1+R2) // volt age across R Ve=V2-Vbe / / vol tag e acr oss Re Ie=Ve/Re
2
15 re_dash=1d-3*25/Ie // in kilo ohm 16 Zin_base=gain_beta*re_dash 17 Zin=Zin_base*(R1*R2/(R1+R2))/(Zin_base+R1*R2/(R1+R2) ) 18 19 printf ( ”inp ut i mp e d e nc e of amplifier cir cui t = %.3 f ki lo ohm \n” ,Zin) 20 21 // the acc ura te an s w e r for in pu t im p e de n c e is 3.7 01
kilo
ohm b ut in book it
is gi ve n as 3. 45 kilo
ohm
Scilab code Exa 13.15 Understanding of various parameters
1 2 3 4 5
// cha pter 13 //example13 .1 5 //page289 printf ( ” i ) Cl as s A amplifier
means th at it raises vo lt ag e level of sig nal and its \nmode of op er at io n is s u c h th at collector cu rr en t fl ow s for w h ol e in pu t signal . \n \n ” ) 6 printf ( ” i i ) Audio volta ge amplifier means it rais es vo lt ag e level of a u d i o signa l \ nand it s mode of op er at io n is class A . \n \n ” ) 7 printf ( ” i i i ) Clas s B power ampl ifier means tha t it raises power level of signa l and its \nmode of op er at io n is s u c h th at collector 152
cu rr en t fl ow s
for
half
cyc le of in p ut signa l on l y . \n \n ” ) A transformer coup led po wer amplifier means th at power amplification \ nis bei ng done , couplin g is by tran form er and mode of op er at io n is class A . \n ” )
8 printf ( ” iv ) Class
Scilab code Exa 13.16
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
Required input signal voltage
// cha pter 13 //example13 .1 6 //page290 Ao=1000 Rout=1 // ohm Rl=4 // ohm Rin=2d3 // ohm I2=0.5 // A
// here
I2/ I1 =Ao ∗ Ri n /( Ro ut+Rl)
so
I1=I2*(Rout+Rl)/(Ao*Rin) V1=I1*Rin / / in V printf ( ” required V1*1d3)
inp ut sig nal
voltage
= %.3 f mV
Scilab code Exa 13.17 Output voltage and power gain
153
\n ” ,
Figure 13.7: Required input signal voltage 1 // cha pter 13 2 //example13 .1 7 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
//page291 Es=10d-3 // V Rs=3d3 // ohm Rin=7d3 // ohm Rout=15 // ohm Rl=35 // ohm Ao=1000 I1=Es/(Rs+Rin) V1=I1*Rin Av=Ao*Rl/(Rout+Rl)
// si nc e V2/ V1=Av, we get V2=V1*Av
18 P2=V2^2/Rl
154
Figure 13.8: Output voltage and power gain 19 20 21 22 23
P1=V1^2/Rin Ap=P2/P1 printf ( ”ma gn it ud e of out pu t voltage printf ( ”po we r gain = %.2 f \n” ,Ap)
Scilab code Exa 13.18
\n ” ,V2)
Required input signal voltage and current and power
gain 1 // cha pter 13 2 //example13
= %.2 f V
.1 8 155
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
//page292 Av=80 Ai=120 V2=1 // V Rout=1 // ohm Rl=2
// ohm
V1=V2/Av
/ / in V
// Av=Ao ∗ Rl /( Rou t+Rl ) and Ai=Ao ∗ Ri n /( Ro ut+Rl) // Av/Ai =Rl/Rin hence
so
Rin=Rl*Ai/Av I1=V1/Rin Ap=Av*Ai
// in m A
printf ( ” required
sign al voltage = %.2 f mV an d curren t = %.2 f mic ro am pe re \n ” ,V1*1d3,I1*1d3) 21 printf ( ”po we r gain = %.3 f \n” ,Ap)
156
Figure 13.9: Required input signal voltage and current and power gain
157
Chapter 14 Multistage transistor amplifiers
Scilab code Exa 14.1 Gain in db
1 2 3 4 5 6 7 8 9 10
// chapter 14 //ex am pl e 14.1 //pag e 30 1 Av=20* log10 (30) Pv=10* log10 (100) printf ( ” voltage gain = %.3 f db \n” ,Av) printf ( ”po we r gain = %.3 f db \n ” ,Pv)
Scilab code Exa 14.2 Gain as a number
1 // chapter 14 2 //ex am pl e 14.2
158
3 4 5 6 7 8 9 10 11 12 13 14 15
//pag e 30 1 Ap1=40 Ap2=43
// since
// db // db Ap = 1 0
∗ log1 0 ( power
gain ) , we get
power_gain1=10^(Ap1/10) power_gain2=10^(Ap2/10) printf ( ”po wer gain printf ( ”po wer gain
of 40 db = %.3 f of 43 db = %.3 f
\n ” ,power_gain1) \n ” ,power_gain2)
// th e ac cu ra te a n s w e r for power ga in of 43 d b is 1 9 9 5 2 bu t in book it is gi ve n as 2 0 0 0 0 db
Scilab code Exa 14.3 Total voltage gain in db
1 2 3 4 5 6 7 8 9 10 11
// chapter 14 //ex am pl e 14.3 //pag e 30 1 Av1=20* log10 (100) Av2=20* log10 (200) Av3=20* log10 (400)
// db // db // db
Av_total=Av1+Av2+Av3 printf ( ” total
volt age
ga in = %.3 f db
159
\n ” ,Av_total)
Scilab code Exa 14.4 Total gain of amplifier and resultant gain with neg-
ative feedback 1 // chapter 14 2 //ex am pl e 14.4 3 //pag e 30 2 4 5 6 7 8 9 10 11 12 13
gain_abs=30 n =5 Ap1=10* log10 (gain_abs) Ap_tot=Ap1*n Ap_f= Ap_tot -10 // db
// db
printf ( ” to tal po wer gain = %.3 f db \n ” ,Ap_tot) printf ( ”p ower gai n wi th negative fee dbac k = %.3 f db \n ” ,Ap_f)
Scilab code Exa 14.5 Fall in gain
1 2 3 4 5 6 7 8 9 10 11 12
// chapter 14 //ex am pl e 14.5 //pag e 30 2 P1=1.5 // W P2=0.3 // W Pi=10d-3 // W
// power gai n at 2 k Hz Ap1=10* log10 (P1/Pi)
// power gai n at 20 H z
13 Ap2=10* log10 (P2/Pi)
160
14 15 Ap_diff=Ap1-Ap2 16 printf ( ” f a l l in gain n ” ,Ap_diff)
fr om 2 kHz to 20 Hz = %.3 f db
Scilab code Exa 14.6 Output voltage of amplifier
1 2 3 4 5 6 7 8
// chapter 14 //ex am pl e 14.6 //pag e 30 2 Av=15 // db V1=0.8 // V
// since db voltage gai n Av=20 ∗ lo g1 0 (V 2/ V1) maki ng V2 as subjec t we ge t
9 10 V2=V1*10^(Av/20) 11 12 printf ( ”out pu t voltage
= %.2 f V
\n ” ,V2)
Scilab code Exa 14.7 Find minimum value of load resistance
1 2 3 4 5 6
// chapter 14 //ex am pl e 14.7 //pag e 30 2 Ao_db=70 Av_db=67
// db // db 161
\
7 8 9 10 11 12
Rout=1.5
// // // //
// kil o ohm
sin ce 2 0 ∗ l og (A o) −20∗ l o g (Av) =Ao db −Av db we get 20 ∗ lo g (A o/ Av) = Ao db −Av db so Ao/ Av = 10 ˆ(( Ao db −Av db ) /20 ) an d a ls o Ao/ Av=1+Ro ut/Rl s in ce Av/ Ao=Rl /( Rl+Ro ut)
13 14 // so making Rl as subjec t we ge t 15 Rl=Rout/(10^((Ao_db-Av_db)/20)-1) 16 17 printf ( ”minimum val ue of loa d resi sta nce ohm \n ” ,Rl) 18 19 // th e acc ura te an s w e r is 3.6 36 kilo ohm
= %.3 f kil o
Scilab code Exa 14.8 Output voltage and load power
1 2 3 4 5 6 7 8 9 10 11 12 13 14
// chapter 14 //ex am pl e 14.8 //pag e 30 3 gain_db=40 // db Vin=10d-3 // mV Rl=1 // kil o ohm
// we know that Vou t/Vi n=1 0ˆ ( gain db /20) Vout as subject we get
so ma ki ng
Vout=Vin*10^(gain_db/20) P_load=Vout^2/Rl printf ( ”out pu t voltage = %.3 f V \n ” ,Vout) printf ( ” load pow er = %.3 f mW \n ” ,P_load)
162
Scilab code Exa 14.9 Bandwidth and cutoff frequencies
1 2 3 4 5
// chapt er14 // exa mple 14 .9 // pa ge 30 3
/ / fig ure g i v e n i n book is fo r re fe re nce o n l y . It is n o t req uir ed t o solv e th e ex a m p l e since t he re qu ir ed detai ls a r e v e r y clea rly speci fied in the pr obl em stateme nt . 6 // mo re ov er mo re da ta is ne ed ed to plot th e gr ap h given in bo ok . 7 8 Av_max1=2000 / / for 2 k Hz 9 Av_sqrt_2=1414 // for 10 kHz and 50 Hz 10 11 percent_Av_max1=70.7*Av_max1/100 12 printf ( ” 70.7 percent of maximum gain 20 00 is = %.3 f \n ” ,percent_Av_max1) 13 14 if Av_sqrt_2==percent_Av_max1 15 printf ( ”we obs er ve th at 70. 7 per cen t of max ga in 2 00 0 is 14 1 4 \n ” ) 16 printf ( ” this ga in 1 4 1 4 is at 50 Hz an d 10 kHz \n” ) 17 printf ( ”so ba nd wi dt h = 50 Hz to 10 kHz \n \n ” ) 18 19 printf ( ” since fr equ enc y on lo we r side at wh i ch ga in
f a l l s to \ n70 .7 per ce nt is 50 Hz. So lo we r cutoff frequency = 50 Hz \n \n ” ) 20 printf ( ” since fr equ enc y on u p pe r side at wh ich ga in f a l l s to \ n70 .7 percent is 10 kHz . So up pe r cut off frequency = 10 kHz
\n \n ” ) 163
21 else prin tf ( ”d a t a is
insuficie ba nd widt h and cuto ff freque
nt fo r fi nd in g ncies \n ” )
22 end
Scilab code Exa 14.10 Overall gain for cascade stages
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
// chapt er14 // exa mple 14 .10 // pa ge 30 5 Rc=500 // ohm Rin=1d3 // ohm
/ / ga i n of s e c o n d st ag e is 60 sin ce it h a s n o lo ad in g effect of a ny st ag e s o Av2=60 load1=Rc*Rin/(Rc+Rin) Av1=Av2*load1/Rc Av=Av1*Av2 printf ( ” to tal gain = %.3 f \n” ,Av) printf ( ”c omment : gai n of on e stage =60.S o tota l gai n
sho uld be 60 ∗60=%d bu t here it is %.3 f . \ nT hi s is be ca us e of loa din g effec t of in pu t i m p e d e n c e of sec ond stage on f i r s t stage . \n” ,6 0*60, Av) 16 printf ( ”S o gai n of f i r s t stage decreases . \ nHowever , se c on d sta ge h a s no loa din g effec t of any n e x t sta ge . So its ga in do es no t decr ease . \n ” ) 17 18 / / th e ac cu ra te a n s w e r for
total book it is gi v en a s 2 3 9 7
164
ga in is 2 4 0 0 b ut in
Scilab code Exa 14.11 Voltage gain of individual stages and overall volt-
age gain 1 2 3 4 5 6 7 8 9
// chapt er14 // exa mple 14 .11 // pa ge 30 6 Rin=1 // kil o ohm Rc = 2 // kil o ohm gain_beta=100
// sinc e f i r s t st age h a s loa di ng effec t of in pu t im pe d e nc e of se co nd st ag e , we ge t eff ect ive lo ad of f i r s t stage as
10 R_AC=Rc*Rin/(Rc+Rin) 11 Av1=gain_beta*R_AC/Rin 12 13 14 15 16 17 18 19 20 21
/ / s e c o n d st ag e h a s n o lo ad in g effect
s o its
ga i n
Av2=gain_beta*Rc/Rin Av=Av1*Av2 printf ( ” voltage gain of f i r s t stage = %.3 f printf ( ” voltage gai n of se co nd stage = %.3 f printf ( ” tota l voltage gai n = %.3 f \n ” ,Av)
\n ” ,Av1) \n ” ,Av2)
// th e acc ura te an s w e r for ga in of f i r s t stag e is 66 .6 67 and total ga in is 13 33 3. 33 b ut in book t h e y ar e gi ve n a s 66 and 1 3 2 0 0 respectively
165
Scilab code Exa 14.12 Voltage gain of single stage
1 2 3 4 5 6 7 8 9 10 11 12 13 14
// chapt er14 // exa mple 14 .12 // pa ge 30 7 Rin=1d3 // ohm Rc= 10d 3 // ohm Rl=100 // ohm gain_beta=100
/ / effe ctive
col lec tor
l o a d is
R_AC=Rc*Rl/(Rc+Rl) Av=gain_beta*R_AC/Rin printf ( ” voltage
gain = % .3 f
\n ” ,Av)
15 printf ( ”c omment : lo ad
is on ly 1 0 0 o hm so efect ive lo ad of amplifier is to o much re du ce d . \ nThus vol tag e ga in is v e ry sm al l . \ n ” ) 16 printf ( ”In su ch cases we can us e a ste p down transf ormer to serve th e pu rp os e . \n” )
Scilab code Exa 14.13 Biasing potential and replacement of coupling ca-
pacitor by a wire 1 // chapt er14 2 // exa mple 14 .13 3 // pa ge 30 7
166
4 5 6 7 8 9 10 11 12 13 14 15 16
Vcc=20 // V R3=10 // kil o ohm R4=2.2 // kil o ohm Rc=3.6 // kil o ohm V_B=Vcc*R4/(R3+R4)
// replacing
Cc b y wi re
Req=R3*Rc/(R3+Rc) V_B2=Vcc*R4/(Req+R4)
printf ( ” biasing potential befor e replacing Cc = %.3 f V \n ” ,V_B) 17 printf ( ” biasing potential after replacing Cc = %.3 f V \n \n ” ,V_B2) 18 printf ( ”th u s biasi ng potentia l of se co nd st age
changes . \n T h i s co ul d ca us e t he transisto r to saturat e and it would n ot work as amplifier . \ n” ) 19 printf ( ”A ls o , we see th e us e of cou pli ng capacitor to mai nta in \ ni nd ep en de nt biasing potential for eatoch pastage nTxthi sstag allows ss to. \ne e . \ nac” ) ou tp ut from one stage
Scilab code Exa 14.14 Voltage gain of individual stages and overall volt-
age gain 1 2 3 4 5
// chapt er14 // exa mple 14 .14 // pa ge 30 8 Vcc=15
6 R1=22
// V // kil o ohm 167
7 8 9 10 11 12
R2=3.3 // kil o ohm R3=5 // kil o ohm R4=1 // kil o ohm R5=15 // kil o ohm R6=2.5 // kil o ohm R8=1 // kil o ohm
13 14 15 16 17 18 19 20 21 22 23 24 25
R3=5 // kil o ohm R7=5 // kil o ohm Rl=10 // kil o ohm gain_beta=200 Vbe=0.7 // V
/ / for
se c on d sta ge
V_R6=Vcc*R6/(R6+R5) V_R8=V_R6-Vbe I_E2=V_R8/R8 // emit ter cur ren t in R 8 re_dash2=25d-3/I_E2 Zin_base=gain_beta*re_dash2 Zin=R5*(R6*Zin_base/(R6+Zin_base))/(R5+(R6*Zin_base /(R6+Zin_base))) 26 R_AC2=R7*Rl/(R7+Rl) 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
Av2=R_AC2/re_dash2
// for
f i r s t stage
V_R2=Vcc*R2/(R2+R1) V_R4=V_R2-Vbe I_E1=V_R4/R4 // emit ter re_dash1=25d-3/I_E1 R_AC1=R3*Zin/(R3+Zin) Av1=R_AC1/re_dash1
cur ren t in R 4
Av=Av1*Av2 printf ( ” voltage printf ( ” voltage printf ( ” over all
gain of f i r s t stage = %.3 f gai n of se co nd stage = %.3 f voltage gai n= %.3 f \n ” ,Av)
\n ” ,Av1) \n ” ,Av2)
// th e acc ura te an sw er s ar e volta ge ga in of f i r s t 168
st age = 52.6 16 , vol tag e ga in of se co nd st age = 192 .38 1 , overal l volt age ga in = 10122.3 29. In book th e an sw er s are 53 ,191. 4 and 10 14 4 44 // respectively
Scilab code Exa 14.15 Turns ratio for maximum power transfer
1 2 3 4 5
// chapt er14 // exa mple 14 .15 // pa ge 31 1
// for maximum po we r tra nsf er , pri mar y imp ed enc e = tra ns ist or ou tp ut im pe de nc e and sec ond ary imp ed enc e = load imp ed enc e 6 Rp=1d3 // ohm 7 Rs=10 // ohm 8 9 // si n ce Rp=(Np/N s) ˆ2 ∗ Rs , mak in g Np/N s i . e . n as
subjec t we ge t
10 n=(Rp/Rs)^(0.5) 11 12 printf ( ” required tu rn rati o = %d \n ” ,n ) 13 14 if n >1 15 printf ( ” transf ormer required is step down tranformer \n ” ) 16 elseif n <1 17 printf ( ” tra nsf orm er requ ired is ste p up tranformer \n ” ) 18 else // n=1 printf ( ” tra nsf orm er is n ot requ ired 19 \n ” ) 20 end
169
Scilab code Exa 14.16 Turns ratio for maximum power transfer and volt-
age across load 1 2 3 4 5 6
// chapt er14 // exa mple 14 .16 // pa ge 31 2
Vp=10 // V // for maximum po we r tra nsf er , pri mar y imp ed enc e = ou tpu t im pe de nc e of aourc e 7 Rp=10d3 // ohm 8 Rs=16 // ohm 9 10 // si n ce Rp=(Np/N s) ˆ2 ∗ Rs , mak in g Np/N s i . e . n as
subjec t we ge t 11 n=(Rp/Rs)^(0.5) 12 13 14 15 16
// sin ce Vs/ Vp=Ns/ Np, ma ki ng Vs as sub ject
we get
Vs=(1/n)*Vp printf ( ” required tu rn rati o = %d \n ” ,n ) printf ( ” volta ge across externa l lo ad = %.3 f V )
\n” , Vs
Scilab code Exa 14.17 Turns ratio for maximum power transfer
1 // chapt er14 2 // exa mple 14 .17 3 // pa ge 31 2
170
4 5 6 7 8 9
Rp=300 //ohm Rs=3 // ohm Ro=3d3 // ohm
// since
ou tp ut res ist anc e of tra nsi sto r Ro=Rp+nˆ 2
∗
Rs for maximum po we r tra nsf er , ma kin g n as subjec t we ge t 10 n=((Ro-Rp)/Rs)^0.5 11 12 printf ( ”turn ra tio n ” ,n )
Scilab code Exa 14.18
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
for maximum pow er tr an sf er = %d
Required primary and secondary inductance
// chapt er14 // exa mple 14 .18 // pa ge 31 3 f=200 // Hz Ro=10d3 // o hm, tra nsi sto r ou tp ut im pe de nc e Zi2=2.5d3 // o hm, inp ut im pe de nc e of ne xt stage
// sinc e Ro=2 ∗%p i ∗ f ∗Lp , mak ing Lp as subject
we get
Lp=Ro/(2*%pi*f)
// since
Zi 2= 2 ∗%p i ∗ f ∗ Ls , making Ls as subject
Ls=Zi2/(2*%pi*f) printf ( ”pri ma ry inductan ce = %.1 f H \n” ,Lp) printf ( ”secondar y inductan ce = %.1 f H \n ” ,Ls)
171
we get
\
Scilab code Exa 14.19
1 2 3 4 5 6 7 8 9 10
Required primary and secondary turns
// chapt er14 // exa mple 14 .19 // pa ge 31 3 L=10d-6 // H N =1 // tur n Lp=8 // H Ls=2 // H
// since L is proporti onal K as subj ect we ge t
to N ˆ2 , L=K
11 K=L/N^2 12 13 // Lp=K ∗Npˆ 2 so 14 15 16 17 18 19 20
Np=(Lp/K)^0.5
// Ls=K ∗Nsˆ2 so Ns=(Ls/K)^0.5 printf ( ”prima ry turns = %d \n ” ,Np) printf ( ”secondar y turns = %d \n ” ,Ns)
172
∗Nˆ2 so ma ki ng
Chapter 15 Transistor audio power amplifiers
Scilab code Exa 15.1 maximum collector current
1 2 3 4 5 6 7 8 9 10 11
// cha pter 15 //example15 .1 //page321 V=12 // V P =2 // W
// si nc e P=V ∗Ic we ge t Ic_max=P/V // in am pe re printf ( ”maximum co l le ct o r curren t = %.3 f mA Ic_max*1000)
173
\n ” ,
Scilab code Exa 15.2 Maximum collector current
1 // cha pter 15 2 //example15 .2 3 //page321 4 5 V=12 // V 6 R =4 // kil o ohm 7 8 // since maximum co ll ect or
who le batte ry voltgage get
current wil l flow is dr op pe d across
when Rc , we
9 Ic_max=V/R 10 11 printf ( ”maximum co l le ct o r curren t = %.3 f mA Ic_max)
Scilab code Exa 15.3 AC output voltage and current
1 2 3 4 5 6 7 8 9 10 11 12 13
// cha pter 15 //example15 .3 //page321 P=50 // W R =8 // ohm
// si nc e p=Vˆ2/ R w e get V=(P*R)^0.5 I=V/R printf ( ”ac printf ( ”ac
ou tp ut voltage = %.3 f V ou tp ut curren t = %.3 f A
174
\n ” ,V ) \n ” ,I )
\n ” ,
Scilab code Exa 15.4 Output power input power and efficiency
1 2 3 4 5 6 7 8 9 10 11 12 13 14
// cha pter 15 //example15 .4 //page325
15 16 17 18 19 20 21
ib_peak=10d-3 ic_peak=gain*ib_peak Po_ac=ic_peak^2*Rc/2 P_dc=Vcc*Ic eta=(Po_ac/P_dc)*100
Vcc=20 // V Vbe=0.7 // V Rb=1d3 // ohm Rc=20 // ohm gain=25 Ib=(Vcc-Vbe)/Rb Ic=Ib*gain Vce=Vcc-Ic*Rc
printf ( ” opera ting point = %.3 f V and %.3 f mA \n ” ,Vce ,Ic*1000) 22 printf ( ”output po we r = %.3 f W \n ” ,Po_ac) 23 printf ( ”input po we r = %.3 f W \n ” ,P_dc) 24 printf ( ” collec tor effic ienc y = %.3 f pe rc en t \n ” ,eta) 25 26 // when Ic =0, Vc e=Vc c i . e . Vc e=8 an d when Vc e=0, Ic=
Vc c/Rc i . e . Ic =20 /20 27 / / so eq ua ti on of lo ad line
b ecom es Ic=
28
175
−50∗Vce+1000
Figure 15.1: Output power input power and efficiency 29 30 31 32 33 34
/ / pl ot t h e lo ad line clf() x = linspace (0,20,5) y=-50*x+1000 plot2d (x,y,style=3,rect=[0,0,25,1100]) xtitle ( ”d c lo ad line ” , ”V ce( vo lt s )” , ” I c (mA) ” )
176
Scilab code Exa 15.5 Collector efficiency and power rating of transistor
1 2 3 4 5 6 7 8 9 10
// cha pter 15 //example15 .5 //page328 Pdc=10 // W Po=4 // W eta=(Po/Pdc)*100
// m aximum po wer dissi patio n in a tran sist or occ urs u n d er ze ro signal cond itio ns so
11 P=Pdc 12 13 printf ( ” collec
tor
effic ienc y = %.3 f pe rc en t
14 printf ( ”p ower rating
of tran sist or = %.3 f W
Scilab code Exa 15.6 Maximum ac power output
1 2 3 4 5 6 7 8
// cha pter 15 //example15 .6 //page328 Rl=100 // ohm n=10 Ic=100d-3 // amp er e
177
\n ” ,eta) \n ” ,P )
9 Rl_1=n^2*Rl 10 Pmax=0.5*Ic^2*Rl_1 11 12 printf ( ”maximum ac pow er output
= %.3 f W
\n” ,Pmax)
Scilab code Exa 15.7 AC power output power rating and collector effi-
ciency 1 2 3 4 5 6 7 8 9
// cha pter 15 //example15 .7 //page329 Vcc=5 // V Ic=50d-3 // amp er e Pac_max=Vcc*Ic/2 Pdc=Vcc*Ic
10 Pdis=Pac_max*2 11 eta=(Pac_max/Pdc)*100 12 13 printf ( ”maximum power ou tp ut= %.3 f mW \n ” ,Pac_max *1000) 14 printf ( ”po wer di ss ip at io n = %.3 f mW \n” ,Pdis*1000) 15 printf ( ”maximum co ll ect or ef fi ci en cy = %.3 f perc ent \n ” ,eta)
Scilab code Exa 15.8 Power transferred to loudspeaker and turns ratio
1 // cha pter 15
178
2 3 4 5 6 7 8 9 10 11 12 13 14
//example15 //page329
del_Ic=100d-3 // amp er e del_Vce=12 // V Rl=5 // ohm
// cas e 1 : lous peak er direc tly
co nn ec te d
V=del_Ic*Rl P=V*del_Ic
// case 2 : loudsprea
ker
transf ormer cou ple d // fo r maximum powe r t he p r im a r y resistance sh ou ld be eq ua l
R_primary=del_Vce/del_Ic
transfer to R 15 16 17 18 19 20
.8
n=(R_primary/Rl)^0.5 V_secondary=del_Vce/n Il=V_secondary/Rl P_1=Il^2*Rl printf ( ”case 1 : lou dsp eak er co nn ec te d dire ctly
\n
po wer tra nsf err ed to loudspeaker = %.3 f mW n ” ,P*1000) 21 printf ( ”case 2 : lou dsp eak er is tra nsf orme r co up le d n
power transf \n ” ,P_1*1000)
err ed to lo
ud sp ea ke r = %.3 f mW
Scilab code Exa 15.9 Parameters for common emitter class A amplifier
1 // cha pter 15 2 //example15 .9 3 //page331 4
179
\ \
5 6 7 8 9 10
Vcc=17.5 // V ic_max=35d-3 // amp er e ic_min=1d-3 // amp er e IC=18 // amp ere gain=100 vce_max=30 // V
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
vce_min=5 // V Rl=81.6 // ohm IC=ic_min+((ic_max-ic_min)/2) IB=IC/gain VCE=vce_min+(( vce_ max -vce_min)
/2)
Pdc=Vcc*IC Vce=(vce_m ax -vce_min) /(2*2^0.5) Ic=(ic_max-ic_min)/(2*2^0.5) Pac=Vce*Ic eta=(Pac/Pdc)*100 slope=(ic_ma
x -ic_min)/(
vce_ min -vce_max)
26 Rl_dash=-1/slope 27 n=(Rl_dash/Rl)^0.5 28 29 printf ( ” ze ro signal col lec tor cur ren t = %.3 f m A \n ” , IC*1000) 30 printf ( ” zer o sig nal ba se curren t = %.3 f mA \n ” , IB *1000) 31 printf ( ”dc powe r = %.3 f mW an d ac powe r = % .3 f mW \n ” ,Pdc*1000,Pac*1000) 32 printf ( ” collec tor effic ienc y = %.3 f pe rc en t \n ” ,eta) 33 printf ( ” transf ormer tu rn rati o = %.1 f \n ” ,n )
180
Scilab code Exa 15.10 Maximum ambient temperature
1 // cha pter 15 2 //example15 .1 0 3 //page333 4 5 6 7 8 9
P_total=4 // W T_Jmax=90 // de gr ee celcius theta=10 // de gr ee celcius
pe r wa t t
// P to ta l =(T Jmax −Tamb)/ the ta so mak in g Tamb as subjec t we ge t
10 Tamb=T_Jmax-P_total*theta 11 12 printf ( ”maximum ambient
temper atur e at whic h tran sist or ca n be op er at ed = %.3 f de gre e C
\n ” ,
Tamb)
Scilab code Exa 15.11
1 2 3 4 5 6 7 8 9 10 11 12
Maximum permissible power dissipation
// cha pter 15 //example15 .1 1 //page333 T_Jmax=90 T_amb=30
// de gr ee celcius // de gr ee celcius
// cas e 1 : wi th ou t he at sink theta1=300 // de gr ee celcius
pe r wa t t
P_total1=(T_Jmax-T_amb)/theta1
// cas e 2 : w it h he at sink
13 theta2=60
// de gr ee celcius
p e r w a tt 181
14 P_total2=(T_Jmax-T_amb)/theta2 15 16 printf ( ” cas e 1 : wi th ou t he at sin k
\n maximum po wer di ss ip at io n = %.3 f mW \n ” ,P_total1*1000) 17 printf ( ”ca se 2 : w i t h he at si nk \n maximum po we r di ss ip at io n = %.3 f mW \n ” ,P_total2*1000)
Scilab code Exa 15.12 Allowed collector current
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
// cha pter 15 //example15 .1 2 //page334 T_Jmax=200 // de gr ee celcius T_amb1=25 // de gr ee celcius T_amb2=75 // de gr ee celcius theta=20 // de gr ee celcius pe r wa t t Vcc=4 // V P_total1=(T_Jmax-T_amb1)/theta Ic1=P_total1/Vcc P_total2=(T_Jmax-T_amb2)/theta Ic2=P_total2/Vcc printf ( ” for
am b i e n t = current = %.3 f A 18 printf ( ” for am b i e n t = current = %.3 f A
2 5 de gr ee C, \n ” ,Ic1) 7 5 de gr ee C, \n ” ,Ic2)
182
al low ed col lect or al low ed col lect or
Chapter 16 Amplifiers with negative feedback
Scilab code Exa 16.1 voltage gain with feedback
1 2 3 4 5 6 7 8 9
// cha pter 16 //example16 .1 //page345 Av=3000 mv=0.01 Avf=Av/(1+Av*mv) printf ( ” voltge gai n wi th negative ” ,Avf)
10 11 / / ac cu rat e a n s w e r is
fee dba ck = %.3 f
96 .7 74 but in bo ok it
as 97
183
is gi ve n
\n
Scilab code Exa 16.2 fraction of output fed back to input
1 2 3 4 5 6 7 8
// cha pter 16 //example16 .2 //page346 Av=140 Avf=17.5
// si n ce Av f=Av/ (1 +Av ∗mv) , ma ki ng m v as sub ject get
we
9 mv=(Av/Avf-1)/Av 10 printf ( ” fractio n of ou t pu t fe d b a ck to in pu t = %.3 f \n ” ,mv)
Scilab code Exa 16.3 find required gain and feedback fraction
1 2 3 4 5 6 7 8 9 10 11
// cha pter 16 //example16 .3 //page346 Av1=100 Avf1=50 Avf2=75
// si n ce Av f=Av/ (1 +Av ∗mv) , we get mv=( Av1/Avf1 -1)/ Av1 Av2=Avf2/(1-mv*Avf2)
184
12 13 printf ( ” fractio n of ou t pu t fe d b a ck to in pu t = %.3 f \n ” ,mv) 14 printf ( ” for overal l ga in = 7 5 and same fractio n , required gai n = %.3 f \n ” ,Av2)
Scilab code Exa 16.4 gain without feedback and feedback fraction
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
// cha pter 16 //example16 .4 //page346 Vo=10 Vi=0.25 Vif=0.5 Av=Vo/Vi Avf=Vo/Vif
// si n ce Av f=Av/ (1 +Av ∗mv) , we get mv=(Av/Avf-1)/Av printf ( ” fractio \n ” ,mv)
n of ou t pu t fe d b a ck to in pu t = %.3 f
Scilab code Exa 16.5 reduction in gain with and witout feedback
1 // cha pter 16 2 //example16 .5
185
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
//page347 Av=50 Avf=25
// si n ce Av f=Av/ (1 +Av ∗mv) , we get mv=(Av/Avf-1)/Av
// wit hou t fe edb ack , gain
f a l l s fr om 50 to 40
Av1=50 Av2=40 reduction1=100*(Av1-Av2)/Av1
// wit h feed back Av3=25 Av4=Av2/(1+mv*Av2) reduction2=100*(Av3-Av4)/Av3
in ga in : \n wi th feedb ack = %.3 f percent \n ” ,reduction1) 22 printf ( ”witho ut feedb ack = %.3 f perent” ,reduction2) printf ( ” per ce nta ge red uct ion
Scilab code Exa 16.6 percent change in gain
1 2 3 4 5 6 7 8
// cha pter 16 //example16 .6 //page347 Av=100 mv=0.1 Avf=Av/(1+Av*mv)
9 mv=(Av/Avf-1)/Av
186
Figure 16.1: Voltage gain with negative feedback 10 11 12 13 14 15 16 17
// f a l l in gain is 6dB so 20 log (A v/A v1)= 6 // making A v1 as subject we get Av1=Av/ exp (6* log (10)/20) Avf_new=Av1/(1+Av1*mv) change=100*(Avf-Avf_new)/Avf printf ( ” percentage ,change)
ch an ge in gain = %.3 f percent
18 19 // th e acc ura te an s w e r is
8.2 97 per ce nt bu t in book it is gi ve n a s 8. 36 pe rc en t
Scilab code Exa 16.7 Voltage gain with negative feedback
1 2 3 4 5 6 7 8 9 10 11
// cha pter 16 //example16 .7 //page348 A0=1000 Rout=100 Rl=900 mv=1/50
// ohm
Av=A0*Rl/(Rout+Rl) Avf=Av/(1+Av*mv)
187
\n ”
Figure 16.2: Voltage gain with negative feedback 12 printf ( ” voltage n ” ,Avf)
gai n wi th negative
13 14 / / th e ac cu ra te a n s w e r is
fee dbac k = %.3 f
47 .3 68 b ut in bo ok it
gi ve n as 47 .4
Scilab code Exa 16.8 overall gain and output voltage
1 // cha pter 16 2 //example16 .8 3 //page351 4
188
is
\
5 6 7 8 9 10
Av=10000 R1=2 // kil o ohm R2=18 // kil o ohm Vi=1 // mV
11 12 13 14 15 16
Avf=Av/(1+Av*mv) Vout=Avf*Vi
mv=R1/(R1+R2)
printf ( ”fe ed ba ck fraction printf ( ” voltage n ” ,Avf)
17 18 printf ( ”output
= %.1 f
gai n wi th negative
volt age = %.1 f mV
\n ” ,mv) fee dbac k = %.1 f
\n ” ,Vout)
Scilab code Exa 16.9 parameters for given circuit
1 2 3 4 5 6 7 8 9 10 11 12 13 14
// cha pter 16 //example16 .9 //page351 Av=10000 R1=10 // kil o ohm R2=90 // kil o ohm Zin=10 // kil o ohm Zout=100d-3 // kil o ohm mv=R1/(R1+R2) Avf=Av/(1+Av*mv) Zin_dash=(1+Av*mv)*Zin Zout_dash=Zout/(1+Av*mv)
15
189
\
16 printf ( ” feedbackfra ction = %.1 f \n ” ,mv) 17 18 printf ( ” voltage gai n wi th negative fee dbac k = %.1 f n ” ,Avf) 19 20 printf ( ”input im pe de nc e wi th feedb ack = %.3 f ki lo
ohm or %.3 f mega ohm \n ” ,Zin_dash ,Zin_dash/1000) 21 22 printf ( ”outp ut im pe de nc e wi th feed back = % f ki lo ohm or %.3 f ohm \n ” ,Zout_dash ,Zout_dash*1000)
Scilab code Exa 16.10
distortion of amplifier with feedback
1 // cha pter 16 2 //example16 .1 0 3 //page352 4 5 6 7 8 9 10 11
Av=150 D=5/100 mv=10/100 Dvf=100*D/(1+Av*mv)
// in per cen t
printf ( ” distortion
feedback
of amplifier w i t h ne gat ive = % .3 f percent ” ,Dvf)
Scilab code Exa 16.11 cutoff frequencies
1 // cha pter 16
190
\
2 3 4 5 6 7 8 9 10 11 12 13
//example16 //page352
.1 1
Av=1000 mv=0.01 f1=1.5 // kHz f2=501.5
// kHz
f_1f=f1/(1+Av*mv) f_2f=f2*(1+mv*Av) printf ( ” new lo we r cutoff
feedback
fre que ncy wi t h nega tive = %.3 f kHz or %.3 f Hz \n ” ,f_1f,f_1f
*1000) 14 printf ( ”n ew upp er cuto ff
freq uenc y wi th negative feedbac k = %.3 f kHz or %.3 f MHz \n ” ,f_2f,f_2f
/1000) 15 16 // th e accura te an sw er s are
136. 364 Hz an d 5.516 M Hz bu t in book th ey ar e giv en as 136 .4 Hz a nd 5.5 2 MHz r es pe cti ve ly
Scilab code Exa 16.12 effective current gain
1 2 3 4 5 6 7 8
// cha pter 16 //example16 .1 2 //page353 Ai=200 mi=0.012 Aif=Ai/(1+mi*Ai)
9
191
10 printf ( ” effec n ” ,Aif)
tive
cu rr en t ga in of amplifier =
%.3 f
Scilab code Exa 16.13 input impedence of amplifier
1 2 3 4 5 6 7 8 9 10 11
// cha pter 16 //example16 .1 3 //page354 Zin=15 // kil o ohm Ai=240 mi=0.015 Zin_dash=Zin/(1+mi*Ai) printf ( ”input
f kilo
ohm
im pe de nc e wi th negative \n ” ,Zin_dash)
feed back = %.3
Scilab code Exa 16.14 output impedence of amplifier
1 2 3 4 5 6 7 8 9
// cha pter 16 //example16 .1 4 //page355 Zout=3 // kil o ohm Ai=200 mi=0.01 Zout_dash=Zout*(1+mi*Ai)
192
\
10 11 printf ( ”outp ut im pe de nc e wi th negative .3 f kil o ohm \n ” ,Zout_dash)
Scilab code Exa 16.15
1 2 3 4 5 6 7 8 9 10 11
bandwidth of amplifier
// cha pter 16 //example16 .1 5 //page355 BW=400 // kHz Ai=250 mi=0.01 BW_dash=BW*(1+mi*Ai) printf ( ”Ba nd wid th wit h nega tive
\n ” ,BW_dash)
Scilab code Exa 16.16 dc load line
1 2 3 4 5 6 7 8
feedb ack = %
// cha pter 16 //example16 .1 6 //page356 Vcc=18 // V R1=16 // kil o ohm R2=22 // kil o ohm Vbe=0.7 // V
193
feedback
= %.3 f kHz
9 10 11 12 13 14 15 16 17 18 19 20 21 22
Re=910d-3
// kil o ohm
V2=Vcc*R2/(R1+R2) Ve=V2-Vbe Ie=Ve/Re printf ( ” voltage across Re = %.3 f V printf ( ” emitt er curren t = %.3 f mA
\n ” ,Ve) \n ” ,Ie)
clf() x = linspace (0,18,100) y=-(19.78/18)*x+19.78 xtitle ( ”d c lo ad line ” , ”V ce( vo lt s )” , ” I c (mA) ” ) plot2d (x,y,style=3,rect=[0,0,19,20])
Scilab code Exa 16.17 voltage gain of emitter follower
1 2 3 4 5 6 7 8 9 10 11 12 13
// cha pter 16 //example16 .1 7 //page357 Vcc=10 // V R1= 10 // kil o ohm R2=10 // kil o ohm Vbe=0.7 // V Re=5000 // ohm V2=Vcc*R2/(R1+R2) Ve=V2-Vbe Ie=Ve/(Re/1000)
// in m A
14 re_dash=25/Ie
194
Figure 16.3: dc load line
195
15 Av=Re/(re_dash+Re) 16 17 printf ( ” voltage gain
= % .3 f
\n ” ,Av)
Scilab code Exa 16.18 voltage gain of emitter follower
1 2 3 4 5 6 7 8 9 10 11
// cha pter 16 //example16 .1 8 //page358 Re=5d3 // ohm Rl=5d3 // ohm re_dash=29.1 // in ohm, fro m ex am pl e 16 17 Re_dash=Re*Rl/(Re+Rl) Av=Re_dash/(re_dash+Re_dash)
12 printf ( ” voltage
gain = % .3 f
\n ” ,Av)
Scilab code Exa 16.19 input impedence of emitter follower
1 2 3 4 5 6 7 8
// cha pter 16 //example16 .1 9 //page359 Vcc=10 // V R1= 10 // kil o ohm R2=10 // kil o ohm Vbe=0.7 // V
196
9 10 11 12 13 14
Re=4.3 // kil o ohm gain_beta=200 Rl=10 // kil o ohm V2=Vcc*R2/(R1+R2) Ve=V2-Vbe
15 Ie=Ve/Re 16 re_dash=25/Ie 17 Re_dash=Re*Rl/(Re+Rl) 18 Zin_base=gain_beta*(re_dash+Re_dash) 19 Zin=Zin_base*(R1*R2/(R1+R2))/(Zin_base+R1*R2/(R1+R2) ) 20 21 printf ( ”input im pe de nc e = %.3 f ki lo ohm \n ” ,Zin) 22 23 // the acc ura te an s w e r is 4.9 96 kilo ohm b ut in book
it is gi v en as
4. 96 kilo o hm
Scilab code Exa 16.20 output impedence of emitter follower
1 2 3 4 5 6 7 8 9 10 11 12
// cha pter 16 //example16 .2 0 //page361 R1=3d3 // ohm R2=4.7d3 // ohm Rs=600 // ohm re_dash=20 // ohm gain_beta=200 Rin_dash=R1*(R2*Rs/(R2+Rs))/(R1+(R2*Rs/(R2+Rs)))
13 Zout=re_dash+Rin_dash/gain_beta
197
14 15 printf ( ”output
impe denc e = %.1 f ohm
198
\n” ,Zout)
Chapter 17 Sinusoidal oscillations
Scilab code Exa 17.1 Frequency of oscillations for radio
1 2 3 4 5 6 7 8 9
// cha pter 17 //example17 .1 //page375 L1=58.6d-6 C1=300d-12
// H // F
f=1/(2*%pi*(L1*C1)^0.5) printf ( ” fre que ncy of kHz” ,f,f/1000)
o s c i l l a t i o n s = %.3 f
10 11 // in book th e an sw e r is
Hz or %.3 f
11 9 9 kHz but th e acc ura te an sw er is 1200 .35 8 kHz
Scilab code Exa 17.2 Colpitt oscillator
199
1 2 3 4 5 6 7 8 9 10 11 12 13 14
// cha pter 17 //example17 .2 //page377 C1=0.001d-6 C2=0.01d-6 L=15d-6
// F // F
// H
Ct=C1*C2/(C1+C2)
// sin ce b o t h ar e in series
f=1/(2*%pi*(L*Ct)^0.5) mv=C1/C2
printf ( ” operating frequency = %.3 f Hz or %.3 f kHz ” ,f,f/1000) 15 printf ( ”feedback functio n = %.3 f ” ,mv) 16 17 // in book th e an sw er giv en is 13 61 k Hz but accur ate
an sw er is 1362 .92 2 kHz
Scilab code Exa 17.3 Hartley oscillator
1 2 3 4 5 6 7 8 9 10
// cha pter 17 //example17 .3 //page379 L1=1000d-6 // H L2=100d-6 // H M=20d-6 // H C=20d-12 // F Lt=L1+L2+2*M
11
200
\n
12 f=1/(2*%pi*(Lt*C)^0.5) 13 mv=L2/L1 14 15 printf ( ” operating frequency = %.3 f Hz or %.3 f kHz ” ,f,f/1000) 16 printf ( ”feedback functio n = %.3 f ” ,mv) 17 18 // in book th e an sw er is
10 52 kHz bu t th e accura te an sw er is 1054 .02 9 kHz
Scilab code Exa 17.4 Phase shift oscillator
1 2 3 4 5 6 7 8 9 10 11
// cha pter 17 //example17 .4 //page381 R=1d6
// ohm
C=68d-12
// F
fo=1/(2*%pi*R*C*(6)^0.5) printf ( ” fr eq ue nc y of o s c i l l a t i o n s = %. 3 f Hz”
// in book th e an sw e r giv en is 9 5 4 H z bu t th e acc ura te an s w e r is 955 .51 1 Hz
Scilab code Exa 17.5 Wien bridge oscillator
1 // cha pter 17 2 //example17 .5
201
,fo)
\n
3 4 5 6 7 8
//page382 R=220d3 // ohm C=250d-12 // F f=1/(2*%pi*R*C)
9 printf ( ” fr eq ue nc y of o s c i l l a t i o n s = %. 3 f Hz” 10 11 // in book th e an sw er giv en is 28 92 H z bu t th e
,f )
accura te an sw er is 2893 .726 H z
Scilab code Exa 17.6 Frequency and thickness of crystal
1 // cha pter 17 2 //example17 .6 3 //page387 4 5 // fr eq ue nc y is inversely prop ort iona l t o thic knes s 6 // so i f thickne ss is re du ce d by 1 %, fre que ncy
increases
by 1%
7 8 printf ( ” If
thi ck ne ss of cryst al is r e d u c e d by 1 perce nt , the n \ nf re qu en cy is incr eas ed by 1 percent \ nb ec au se freq uen cy is inversely prop orti onal t o thic knes s \n ” )
Scilab code Exa 17.7 Series and parallel resonant frequency
1 // cha pter 17
202
2 3 4 5 6 7 8 9 10 11 12 13
//example17 //page387 L =1 // H C=0.01d-12 Cm=20d-12
.7
// F // F
fs=1/(2*%pi*(L*C)^0.5) Ct=C*Cm/(C+Cm) fp=1/(2*%pi*(L*Ct)^0.5)
printf ( ” ser ies re son ant fr equ enc y = %.3 f Hz or % .3 f kHz\n” ,fs,fs/1000) 14 printf ( ” pa ra ll el reso nant fre quen cy = %.3 f Hz or % .3 f kHz \n ” ,fp,fp/1000) 15 16 // in book t he a n s w e r gi ve n is 1 5 8 9 kHz for seri es
re son ant fr equ enc y b ut th e acc ura te an s w e r is 1591.549 kHz 17 // in book t he a n s w e r gi ve n is 1 5 9 0 kHz for paral lel re son ant fre que ncy bu t th e acc ura te a ns we r is 1591.947
kHz
203
Chapter 18 Transistor tuned amplifiers
Scilab code Exa 18.1 Parameters of parallel resonant circuit
1 2 3 4 5 6 7 8 9 10 11 12
// cha pter 18 //example18 .1 //page396 L=1.25d-3 // H C=250d-12 // F R=10 // ohm fr=(((1/(L*C))-(R^2/L^2))^0.5)/(2*%pi) Zr=L/(C*R) Q=2*%pi*fr*L/R
printf ( ”reso nan t fr equ enc y of cir cui t = %.3 f Hz or % .3 f kHz \n ” ,fr,fr/1000) 13 printf ( ”im pe de nc e of ci rc ui t at res onan ce = %.3 f ohm or % .3 f kil o ohm \n ” ,Zr,Zr/1000) 14 printf ( ” qual ity factor ,Q ) of t he circu it = %.3 f ”
204
Scilab code Exa 18.2 Parameters of parallel resonant circuit
1 2 3 4 5 6 7 8 9 10 11 12 13 14
// cha pter 18 //example18 .2 //page396 L=100d-6 // H C=100d-12 // F R=10 // ohm V=10 // V fr=(((1/(L*C))-(R^2/L^2))^0.5)/(2*%pi) Zr=L/(C*R) I=V/Zr printf ( ”reso nan t fr equ enc y of
cir cui t = %.3 f Hz or %
.3 f kHz \n ” ,fr,fr/1000) 15 printf ( ”im pe de nc e of ci rc ui t at res onan ce = %.3 f ohm or %.3 f ki lo ohm or %.3 f mega ohm \n” ,Zr,Zr/1000, Zr/1d6) 16 printf ( ” li ne current = %.4 f am pere or %.3 f mi cr o ampere” ,I,I*1d6) 17 18 // th e acc ura te an s w e r for re son ant fr equ enc y is 1591.470
kHz
Scilab code Exa 18.3 Bandwidth and cutoff frequency for tuned amplifier
205
1 2 3 4 5 6 7 8 9 10 11 12 13 14
// cha pter 18 //example17 .3 //page398 fr=1200 Q=60
// kHz
BW=fr/Q f1=fr-(BW/2) f2=fr+(BW/2) printf ( ”bandwid th = % .3 f kHz \n ” ,BW) printf ( ”lower cu t − of f frequency = %.3 f kHz printf ( ”uppe r cu t − of f frequency = %.3 f kHz
\n ” ,f1) \n ” ,f2)
Scilab code Exa 18.4 Resonant frequency and Q and bandwidth of tuned
amplifier 1 2 3 4 5 6 7 8 9 10 11 12 13 14
// cha pter 18 //example18 .4 //page401 L=33d-3 // H C=0.1d-6 // F R=25 // ohm fr=1/(2*%pi*(L*C)^0.5) Xl=2*%pi*fr*L Q=Xl/R BW=fr/Q printf ( ”resonant
frequency
= %.3 f Hz or %.3 f kHz
,fr,fr/1000)
206
\n ”
15 printf ( ” quality facto r = %.3 f \n ” ,Q ) 16 printf ( ”bandwid th = % .3 f Hz \n ” ,BW) 17 18 // th e accura te an sw er for ba ndw idt h is
but in book it is gi ve n a s 12 0 H z 19 // th e ac cu ra te a n s w e r for qual ity factor
120. 572 H z is 22 .9 78
but in b ook it is gi ve n a s 23
Scilab code Exa 18.5 coefficient of coupling for double tuned circuit
1 2 3 4 5 6 7
// cha pter 18 //example18 .5 //page402 BW=200 // kHz fr=10d3 // kHz
8 k=BW/fr 9 10 printf ( ” co− e f f i c i e n t of
co up li ng = %.3 f
\n ” ,k )
Scilab code Exa 18.6 Resonant frequency and ac and dc loads for given
circuit 1 2 3 4 5
// cha pter 18 //example18 .6 //page405 L=50.7d-6
// H 207
6 7 8 9 10 11
C=500d-12 // F R=10 // ohm Rl=1d6 // ohm
12 13 14 15 16 17
Xl=2*%pi*fr*L Q=Xl/R Rp=Q*Xl R_ac=Rp*Rl/(Rp+Rl)
fr=1/(2*%pi*(L*C)^0.5) R_dc=R
printf ( ”resonant frequency = %.3 f Hz or %.3 f kHz \n ” ,fr,fr/1000) // amswer in book is incorrect 18 printf ( ”dc load = %.3 f ohm \n ” ,R_dc) 19 printf ( ”ac load = %.3 f ohm or %.3 f ki lo ohm \n ” ,R_ac ,R_ac/1000) 20 21 // in book th e as w er for re son ant fr equ enc y is 10 6
Hz wh i ch is incorrect an sw e r is 999 .61 1 kHz
22 / / th e correct 23
24 // th e ac cu ra te a n s w e r for ohm
a c lo ad is 10 .0 38 kilo
Scilab code Exa 18.7 ac load and maximum load power for given circuit
1 // cha pter 18 2 //example18 .7 3 //page406 4 5 Vcc=50
// V 208
Figure 18.1: Resonant frequency and ac and dc loads for given circuit 6 Np=5 7 Ns=1 8 9 10 11 12 13
R=50 // ohm R_ac=(Np/Ns)^2*R Po=Vcc^2/R_ac printf ( ”ac load = %.3 f ohm \n ” ,R_ac) printf ( ”maximum lo ad powe r = % .3 f W \n” ,Po)
209
Chapter 19 Modulation and demodulation
Scilab code Exa 19.1 Modulation factor
1 2 3 4 5
6 7 8 9 10 11
// cha pter 19 //example19 .1 //page416 / / t h e fig ure in b ook is fo r re fe re nce o n l y a s equ ati ons for Ec a nd E s ar e alr ead y exp lai ned th e the ory in th e book . printf printf printf printf printf
in
( ” Ec=(Vmax+Vmin) /2 \n ” ) ( ”Es=(Vmax −Vmin) /2 \n ” ) ( ”But , Es=m∗ Ec \n” ) ( ”So (Vmax−Vmin)/2 = m ∗ (Vmax+Vmin ) /2 \n ” ) ( ” thus , m = (Vmax −Vmin) /(Vmax+Vmin) \n ” )
Scilab code Exa 19.2 Modulation factor
210
1 2 3 4 5
// cha pter 19 //example19 .2 //page416 / / figure is gi ve n in book for un de rs ta nd in g p ur po se on ly . It is n ot requ ired for solving th e ex a m pl e as maximum and minimum pe ak vol tag es are the pro ble m statement itself .
6 7 8 9 10 11 12 13 14 15
Vmax_pp=16 Vmin_pp=4
// mV // mV
Vmax=Vmax_pp/2 Vmin=Vmin_pp/2 m=(Vmax-Vmin)/(Vmax+Vmin) printf ( ”modu lat ion
Scilab code Exa 19.3
1 2 3 4 5 6 7 8 9 10
fac tor = %.3 f
\n ” ,m )
modulation factor
// cha pter 19 //example19 .3 //page417 Es=50 // V Ec=100 // V m=Es/Ec printf ( ”modu lat ion
fac tor = %.3 f
211
\n ” ,m )
given
in
Scilab code Exa 19.4 Required bandwidth for RF amplifier
1 2 3 4 5 6 7 8 9 10 11 12 13 14
// cha pter 19 //example19 .4 //page419 fc=2500 // kHz fs_min=0.05 // kHz fs_max=15 // kHz upper_sideband_min=fc+fs_min upper_sideband_max=fc+fs_max lower_sideband_min=fc-fs_min lower_sideband_max=fc-fs_max
15 BW=upper_sideband_max -lower_sideband_max 16 17 printf ( ”lowe r sid eba nd is from % .3 f to % .3 f kHz \n ” , lower_sideba nd_min ,lower_sideband_max ) 18 printf ( ”upp er side band is fr om % .3 f to % .3 f kHz \n ” , upper_sideba nd_min ,upper_sideband_max ) 19 printf ( ”Ba nd wid th for RF am pl if ie r = %.3 f kHz \n” , BW )
Scilab code Exa 19.5 Frequency components and amplitudes in AM wave
1 // cha pter 19
212
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
//example19 //page420
.5
// v=5 ∗(1+0.6 ∗ cos (6280 ∗ t ) ) ∗ sin (211d4 ∗ t ) V // com par e with v=Ec ∗(1+m∗ cos ( ws ∗ t ) ) ∗ si n (w c ∗ t ) we get Ec=5 // V m=0.6 fs=6280/(2*%pi) fc=211d4/(2*%pi)
// Hz // Hz
Vmin=Ec-m*Ec Vmax=Ec+m*Ec f1=(fc-fs)/1000 / / in kHz f2=fc/1000 / / in kHz f3=(fc+fs)/1000 / / in kHz V1=m*Ec/2 V2=Ec V3=m*Ec/2
22 23 printf ( ”mi nimum am pl it ud e = %.3 f V and maximum amplit ude = % .3 f V \n” ,Vmin,Vmax) 24 printf ( ” frequ ency com pon ent s = %.1 f kHz , %.1 f Hz , % . 1 fkHz \n ” ,f1,f2,f3) 25 printf ( ”amplitude s of co mp on en ts = % .3 f V, %.3 f V, % .3 f V \n ” ,V1,V2,V3) 26 27 / / in bo ok th er e is err or of 0. 2 kHz in e ve r y
frequency com pon ent . The accurate 334.8 ,335 .8 ,336 .8 kHz
213
ans we rs are
Scilab code Exa 19.6 Frequency and amplitude of sideband terms
1 // cha pter 19 2 //example19 .6 3 //page420 4 5 6 7 8 9 10 11 12 13 14
fc=1000 // kHz fs=5 // kHz m=0.5 Ec=100 // V lower_sideband=fc-fs upper_sideband=fc+fs amplitude=m*Ec/2
printf ( ”lowe r and up pe r sid eba nd freque ncies = %.3 f kHz an d %.3 f kHz \n ” ,lower_s ideband , upper_sideband) 15 printf ( ”ampli tud e of ea ch side band ter m = %.3 f V \n ” ,amplitude)
Scilab code Exa 19.7 Power of sidebands and modulated wave
1 2 3 4 5 6 7 8 9
// cha pter 19 //example19 .7 //page422 Pc=500 m =1
// W
Ps=0.5*m^2*Pc Pt=Pc+Ps
10
214
11 printf ( ”sideband po we r = % .3 f W \n ” ,Ps) 12 printf ( ”pow er of modu lat ed wav e = %.3 f W
\n” ,Pt)
Scilab code Exa 19.8 Total sideband power
1 2 3 4 5 6 7 8 9 10 11 12
// cha pter 19 //example19 .8 //page422 m1=0.8 m2=0.1 Pc=50 // kW Ps1=0.5*m1^2*Pc Ps2=0.5*m2^2*Pc printf ( ” fo r m=0.8 , sideband
po we r = % .3 f kW
\n ” ,Ps1)
13 printf ( ” fo r m=0.1 , sideband
po we r = % .3 f kW
\n ” ,Ps2)
Scilab code Exa 19.9 Carrier power after modulation and audio power
1 2 3 4 5
// cha pter 19 //example19 .9 //page422 // bl oc k di a gr am is for un de rs ta nd in g pu rp os e inly . It is n o t req uir ed t o solv e th e ex a m p l e
6 m =1 7 eta=0.72
215
Figure 19.1: Carrier power after modulation and audio power 8 / / carrier
is n o t affe cted by m o d u l a t i n g signa l s o it s power le vel re ma in s unc ha ng ed before and
9 10 11 12 13
aft er mo du la ti on
Pc=40 // kW Ps=0.5*m^2*Pc P_audio=Ps/eta
printf ( ” ca rr ie r pow er af te r mod ula tio n = %.3 f kW \n ” ,Pc) 14 printf ( ” requ ired audio po we r = %.3 f kW \n ” ,P_audio)
Scilab code Exa 19.10
Sideband frequencies and bandwidth 216
1 2 3 4 5 6 7 8 9 10 11 12
// cha pter 19 //example19 .1 0 //page423 fc=500 // kHz fs=1 // kHz lower_sideband=fc-fs upper_sideband=fc+fs BW=upper_sideban d -lower_sideband
printf ( ”sideban d freq uen cie s = %.3 f kHz and % .3 f kHz ) \n ” ,lower_sideb and,upper_sideband 13 printf ( ”ban dw id th requ ired = %.3 f kHz \n ” ,BW)
Scilab code Exa 19.11 Antenna current
1 2 3 4 5 6 7 8 9 10 11 12 13
// cha pter 19 //example19 .1 1 //page423 m=0.4 Ic=8 // A
// Pt=Pc+Ps and Ps=0.5 ∗mˆ2∗ Pc so Pt=Pc ∗(1+mˆ2/2) // so Pt/ Pc=1+mˆ2 /2 bu t P is propo rtio nal to I ˆ2 so // ( I t / Ic )ˆ 2=1+mˆ2/2 an d thus we get It=Ic*(1+m^2/2)^0.5 printf ( ”an te nn a current )
for m=0.4 is = %.3 f A
217
\n” , It
Scilab code Exa 19.12 Percentage modulation
1 2 3 4 5 6 7 8
// cha pter 19 //example19 .1 2 //page424 It=8.93 // A Ic=8 // A
// we know that ( It / Ic )ˆ 2=1+mˆ2/2 subjec t we ge t
9 m=(2*((It/Ic)^2-1))^0.5 10 11 printf ( ”mod ul at io n factor ,m,m*100)
Scilab code Exa 19.13
1 2 3 4 5 6 7 8
so ma ki ng m as
= %.3 f or % .3 f perc ent
Modulation index
// cha pter 19 //example19 .1 3 //page424 Vt=110 Vc=100
// V // V
// sin ce Pt/P c=1+mˆ2 /2 and P is we ge t (Vt/V c) ˆ2=1+mˆ2/2 9 // making m a s subject we get 218
pro por tio nal
to V ˆ2
\n ”
10 11 m=(2*((Vt/Vc)^2-1))^0.5 12 13 printf ( ”mod ul at io n factor ,m,m*100)
Scilab code Exa 19.14
1 2 3 4 5 6 7 8 9 10
= %.3 f or % .3 f perc ent
\n ”
Sideband components and total power
// cha pter 19 //example19 .1 4 //page424 Vc=5 // V V_lower=2.5 // V V_upper=2.5 // V R =2 // kil o ohm
// figure gi ve n in bo ok is just for un de rs ta nd in g pu rp os e . It is n o t a pa rt of solution . 11 // how ever , th e fig ure ha s be en made in xc os and scree nshot ha s b e en at ta ch ed for reference 12 13 14 15 16 17 18 19 20 21
// sin ce po we r= (r ms volt age ) ˆ2 /R w e get Pc=(0.707*Vc)^2/R P_lower=(0.707*V_lower)^2/R P_upper=(0.707*V_upper)^2/R Pt=Pc+P_lower+P_upper printf ( ”p ower deliver ed by ca rri er = %.3 f mW \n ” ,Pc) printf ( ”po wer del iver ed by lowe r side band = %.3 f mW \n ” ,P_lower)
22 printf ( ”po wer del iver ed by up pe r side band
219
= %.3 f mW
Figure 19.2: Sideband components and total power \n ” ,P_upper) 23 printf ( ” to ta l po we r de li ve re d by AM wa ve = %.3 f mW n ” ,Pt)
220
\
Chapter 20 Regulated dc power supply
Scilab code Exa 20.1 Percentage voltage regulation
1 2 3 4 5 6 7 8 9 10
// cha pter 20 //example20 .1 //page437 V_NL=400 V_FL=300
// V // V
regulation=((V_NL-V_FL)/V_FL)*100 printf ( ” perc ent ” ,regulation)
voltage
regulat
ion = %.3 f perc ent
Figure 20.1: Percentage voltage regulation 221
\n
Scilab code Exa 20.2 Full load voltage
1 2 3 4 5 6 7 8
// cha pter 20 //example20 .2 //page437 V_NL=30 // V regulation=1
// sinc e regu lat ion =((V NL −V F L) /V F L) ∗ 100 , we get V FL as
9 10 V_FL=100*V_NL/(100+regulation) 11 printf ( ” f u l l load voltage = % .3 f V
Scilab code Exa 20.3 Better power supply
1 2 3 4 5 6 7 8 9 10 11
// cha pter 20 //example20 .3 //page437 // for
power sup pl y A // V // V
V_NL1=30 V_FL1=25
regulation1=((V_NL1-V_FL1)/V_FL1)*100
// for
pow er sup ply B 222
\n ” ,V_FL)
12 13 14 15 16 17
V_NL2=30 V_FL2=29
// V // V
regulation2=((V_NL2-V_FL2)/V_FL2)*100 printf ( ” regu lat ion
for
po wer supp ly A =%.3 f percent
\n ” ,regulation1) 18 printf ( ” regu lat ion for po wer supp ly B =%.3 f percent \n ” ,regulation2) 19 20 if regulation1 >re gulation2 then 21 printf ( ”th us , power sup pl y B is better \n ” ) elseif regulation2 >r egulation1 then 22 23 printf ( ”th us , power sup pl y A is better \n ” ) else print f ( ”b ot h ar e equal ly g ood \n ” ) 24 25 end
Scilab code Exa 20.4 Voltage regulation and minimum load resistance
1 2 3 4 5 6 7 8 9 10 11 12 13
// cha pter 20 //example20 .4 //page438 V_NL=500 V_FL=300 I_FL=120
// V // V // mA
regulation=((V_NL-V_FL)/V_FL)*100 Rl_min=V_FL/I_FL printf ( ” voltage
regulat
ion = %.3 f perc ent
regulation)
223
\n ” ,
14 printf ( ”m inimum load Rl_min)
re si st an ce = %.3 f ki lo ohm
\n ” ,
Scilab code Exa 20.5 Various currents for Zener regulator
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
// cha pter 20 //example20 .5 //page441 Vin=24 // V Vout=12 // V Rs=160 // ohm Rl_min=200 // ohm Is=(Vin-Vout)/Rs
// in
amp ere
// m inimum loa d occur s when Rl te nds to in fi ni ty so Il_min=0
// maximum loa d occ urs when Rl= 200 o hm Il_max=Vout/Rl_min // in am pe re Iz_min=Is-Il_max Iz_max=Is-Il_min
// in // in
amp ere amp ere
printf ( ” curren t th ro ug h se ri es reis tanc e = %.3 f m A n \n ” ,Is*1000) 22 printf ( ”m inimum loa d cu rr en t = %.3 f mA \n ” ,Il_min *1000) 23 printf ( ”maximum loa d cu rre nt = %.3 f mA \n ” ,Il_max *1000) 24 printf ( ”m inimum zener cur ren t = %.3 f mA \n ” ,Iz_min *1000)
224
\
25 printf ( ”maximum zen er cu rr en t = %.3 f mA \n \n ” , Iz_max*1000) 26 27 printf ( ”c omment : curren t Is th ro ug h Rs is cons tant
. \ nAs lo ad cur ren t increases fro m 0 to 60 mA, zen er current decreases from 75 to 15 mA, \ nma int ain ing Is cons tant . \nT hi s is th e no rma l ope ra tio n of ze ne r regul ator \ ni . e . Is an d Vo ut r e m a i n co ns ta nt inspite of c ha n ge s in lo ad or source voltage . ” )
Scilab code Exa 20.6 Required series resistance
1 2 3 4 5 6 7 8 9
// cha pter 20 //example20 .6 //page441 Vin_min=22 // V Vout=15 // V Il_max=0.1 // A
// for maximum se ri es resistan ce , we consider th e case when input voltage is minimum an d load current is maximum beca use th en zener current dro ps to minimum . Thus ,
10 Rs_max=(Vin_mi n -Vout)/ Il_max 11 12 printf ( ” requ ired ser ies resis tance Rs_max)
225
= %.3 f ohm
\n” ,
Figure 20.2: Design of series voltage regulator
Scilab code Exa 20.7 Load voltage and load current
1 2 3 4 5 6 7 8 9 10 11 12 13
// cha pter 20 //example20 .7 //page442 Vz=10 // V Vbe=0.5 // V Rl=1000
// ohm
Vout=Vz-Vbe Il=Vout/Rl printf ( ”load printf ( ”load
voltage current
= %.3 f V \n ” ,Vout) = %.3 f mA \n” ,Il*1000)
Scilab code Exa 20.8 Design of series voltage regulator
1 // cha pter 20 2 //example20 .8
226
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
//page441 Ic=1 // A gain=50 Vout=6 // V Vbe=0.5 // V Vin=10 // V Iz=10d-3 // A Ib=Ic/gain Vz=Vbe+Vout
// Vout= Vz −Vbe
V_Rs=Vin-Vz Rs=V_Rs/(Ib+Iz) printf ( ” required
breakdown voltage for zen er dio de = %.3 f V \n ” ,Vz) 19 printf ( ” required value of Rs = %.3 f ohm \n ” ,Rs) 20 21 // in bo ok Rs= 117 o hm but
accurate
an sw er is 116.667
ohm 22 23 // n o t e : in x c o s , th er e is no Z e n e r di od e s o in t h e
result ( circu it ) f i l e a si mp le di od e is u s e d to repre sent a ze ne r di od e
Scilab code Exa 20.9 Output voltage and Zener current
1 // cha pter 20 2 //example20 .9 3 //page443
227
Figure 20.3: Design of series voltage regulator
Figure 20.4: Output voltage and Zener current
228
Figure 20.5: Regulated output voltage 4 5 6 7 8 9 10 11 12 13 14 15 16 17
Vz=12 // V Vbe=0.7 // V Vin=20 // V Rs=220 // ohm Rl=1d3 // ohm gain=50 Vout=Vz-Vbe V_Rs=Vin-Vz I_Rs=V_Rs/Rs Il=Vout/Rl Ic=Il Ib=Ic/gain
18 Iz=I_Rs-Ib 19 20 printf ( ”out pu t voltage = %.3 f V 21 printf ( ”zener current = %.3 f mA
Scilab code Exa 20.10
1 2 3 4 5
Regulated output voltage
// cha pter 20 //example20 .1 0 //page445 R2=1
\n ” ,Vout) \n ” ,Iz*1000)
// kil o ohm 229
Figure 20.6: Closed loop voltage gain 6 7 8 9 10 11 12 13 14
R1=2 // kil o ohm Vz=6 // V Vbe=0.7 // V m=R2/(R1+R2) A_CL=1/m Vout=A_CL*(Vz+Vbe) printf ( ” regulated
ou tp ut voltage
= %.3 f V
\n ” ,Vout)
Scilab code Exa 20.11 Closed loop voltage gain
1 2 3 4 5 6 7 8 9 10 11
// cha pter 20 //example20 .1 1 //page445 R2=10 R1=30
// kil o ohm // kil o ohm
m=R2/(R1+R2) A_CL=1/m printf ( ” closed
loo p voltage
gai n = %.3 f
230
\n ” ,A_CL)
Figure 20.7: Regulated voltage and various currents for shunt regulator
Scilab code Exa 20.12 Regulated voltage and various currents for shunt
regulator 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
// cha pter 20 //example20 .1 2 //page446 Vz=8.3 // V Vbe=0.7 // V Rl=100 Rs=130 Vin=22
// ohm // ohm // V
Vout=Vz+Vbe Il=Vout/Rl Is=(Vin-Vout)/Rs Ic=Is-Il printf printf printf printf
( ” regulated ou tp ut voltage ( ”load current = %.3 f mA ( ” cur ren t through Rs = %.3 ( ” co ll ect or current = %.3 f
231
= %.3 f V \n ” ,Vout) \n” ,Il*1000) f mA \n ” ,Is*1000) mA \n” ,Ic*1000)
Chapter 21 Solid state switching circuits
Scilab code Exa 21.1 Voltage required to saturate transistor
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
// cha pter 21 //example21 .1 //page456 Vcc=10 // V Vbe=0.7 // V Rb=47d3 // ohm Rc=1d3 // ohm gain=100 Ic_sat=Vcc/Rc Ib=Ic_sat/gain V_plus=Ib*Rb+Vbe printf ( ” volta ge requ ired .3 f V \n ” ,V_plus)
to saturat
232
e tran sist or = +%
Scilab code Exa 21.2 Time period and frequency of square wave
1 2 3 4 5 6 7 8 9 10 11
// cha pter 21 //example21 .2 //page463 R=10d3 // ohm C=0.01d-6 // F T=1.4*R*C f=1/T
printf ( ”tim e period of squar e wave = %.3 f ms *1000) 12 printf ( ” frequency of square wave = %.3 f kHz /1000) 13 14 // th e acc ura te an s w e r for
but in book it
fre que ncy is gi ve n 7 k Hz
\n ” ,T \n ” ,f
is 7.1 43 k Hz
Scilab code Exa 21.3 Effect of RC time constant and output waveform of
differentiating circuit 1 // cha pte r 21 2 // ex am pl e 21.3 3 // pa ge 46 8 4
233
5 printf ( ”I n RC diffe
renti atin g circuit , t he ou t p u t vo ta ge is t ak e n acr oss \nR an d wa ve fo rm of outp ut de pe nd s on ti me cons tant of \ ncircu it . For prop er functioning , pro duc t RC shoul d be m any \ nt im es smaller th an ti me period of inp ut wave . \n ”)
This code can be downloaded from the website wwww.scilab.in
Scilab code Exa 21.4 Output voltage of differentiating circuit
1 // cha pter 21 2 //example21 .4 3 //page468 4 5 6 7 8 9 10 11 12 13 14
R=10d3 // ohm C=2.2d-6 // F V1=0 // V V2=10 // V t1=0 / / sec t2=0.4 // sec Eo=R*C*(V2-V1)/(t2-t1) printf ( ”out pu t voltage
= %.3 f V
234
\n ” ,Eo)
Figure 21.1: Effect of RC time constant and output waveform of differentiating circuit
235
Scilab code Exa 21.5 Peak output voltage
1 // cha pter 21 2 //example21 .5 3 //page472 4 5 6 7 8 9 10 11 12 13
Vin_peak=12
// V
/ / for
ve half
positi
cyc le di o de c on du c t s s o // V
Vout_peak =Vin_peak -0.7
/ / for
ne gat ive half // V
cyc le di od e d oe s n o t c o nd u c t so
Vout_min=0
printf ( ”p eak ou tp ut volt age = %.3 f V in positi
ve half cyc le and \n %.V fi3n nega tiv e half cycle ” ,Vout_peak ,Vout_min)
14 15 // plott ing
inp ut and ou tp ut wa ve fo rm s in same gr ap h us in g follow ing c od e ins tea d of us in g xc os
16 clf() 17 18 19 20 21
t = linspace (0,2* Vin=12* sin ( t ) %pi ,100) Vout=Vout_peak* sin (t)+Vout_min plot2d (t,Vin,style=2,rect=[0,0,10,20]) xtitle ( ”input −b l u e output − green” ) 22 plot2d (t,Vout,style=3,rect=[0,0,10,20])
Scilab code Exa 21.6 Peak output voltage
236
, ” t ” , ” vo lt s ”
Figure 21.2: Peak output voltage 1 2 3 4 5 67 8 9 10 11 12 13 14 15 16 17 18 19
// cha pter 21 //example21 .6 //page472 Rl=4
// kil o ohm
R =1 // kil o ohm Vin_peak=10 // V Vout_peak=Vin_peak*Rl/(Rl+R) Vout_min=0 // be ca us e of di od e printf ( ”pe ak out pu t voltage = %.3 f V
\n ” ,Vout_peak)
// plott ing inp ut and ou tp ut wa ve fo rm s in same gr ap h us in g follow ing c od e ins tea d of us in g xc os clf() t = linspace (0,2* %pi ,100) Vin=Vin_peak* sin ( t ) Vout=Vout_peak* sin (t)+Vout_min plot2d (t,Vin,style=2,rect=[0,0,10,20]) xtitle ( ”input −b l u e output − green” )
237
, ” t ” , ” vo lt s ”
Figure 21.3: Peak output voltage 20 plot2d (t,Vout,style=3,rect=[0,0,10,20])
Scilab code Exa 21.7 Output voltage and voltage across resistor
1 2 3 4 5 6 7 8 9 10
// cha pter 21 //example21 .7 //page473 V=-10 // V Vout=-0.7 // V Vr=V-Vout printf ( ”out pu t voltage
11 printf ( ” voltage
across
= %.3 f V R = %.3 f V 238
\n ” ,Vout) \n ” ,Vr)
Figure 21.4: Output voltage and voltage across resistor 12 13 // plott ing
inp ut and ou tp ut wa ve fo rm s in same gr ap h us in g follow ing c od e ins tea d of us in g xc os
14 clf() 15 t = linspace (0, %pi ,100) 16 17 18 19 20 21 22 23 24
Vin=V* sin ( t ) Vout=Vr* sin ( t ) subplot (1,2,2) plot2d (t,Vout,style=3,rect=[0,-0.7,10,11]) xtitle ( ”Vout” , ” t ” , ” vo lt s ” ) subplot (1,2,1) plot2d (t,Vin,style=2,rect=[0,-11,10,1]) xtitle ( ”Vin” , ” t ” , ” vo lt s ” )
239
Scilab code Exa 21.8 Output voltage for each input alterations
1 // cha pter 21 2 //example21 .8 3 //page473 4 5 Rl=1d3 // ohm 6 R=200 // ohm 7 8 / / for positi ve
half cy cl e , di od e is f or w ar d bi as ed and sin ce lo ad is in parallel w i t h di o de w e ge t 9 V_out_p=0.7 // V 10 11 / / for
ne ga ti ve half cy cl e , di od e is rev ers e bi as ed so it is open . Hence 12 V_in=-10 // V 13 V_out_n=V_in*Rl/(Rl+R) 14 15 printf ( ”o ut p u t vol tag e for
nand for
negative
cycle
positive cyc le = %.3 f V \ = %.3 f V” ,V_out_p ,V_ out_n
) 16 17 // plott ing
inp ut and ou tp ut wa ve fo rm s in same gr ap h us in g follow ing c od e ins tea d of us in g xc os
18 19 20 21 22 23 24 25 26 27 28 29 30 31
clf() t = linspace (0, %pi ,100) Vin=V_in* sin ( t ) Vout=-V_out_n* sin ( t ) subplot (2,2,1) plot2d (t,-Vin,style=3,rect=[0,0,10,11]) xtitle ( ”Vin +ve” , ” t ” , ” vo lt s ” ) subplot (2,2,2) plot2d (t,Vout,style=2,rect=[0,-5,10,0.7]) xtitle ( ”Vout” , ” t ” , ” vo lt s ” ) t = linspace (%pi ,2*%pi ,100) Vin=V_in* sin ( t ) subplot (2,2,3) plot2d (t,-Vin,style=3,rect=[0,-11,10,0])
240
Figure 21.5: Output voltage for each input alterations 32 33 34 35
xtitle ( ”Vin −ve ” , ” t ” , ” vo lt s ” ) subplot (2,2,4) plot2d (t,-Vout,style=2,rect=[0,-11,10,0]) xtitle ( ”Vout” , ” t ” , ” vo lt s ” )
Scilab code Exa 21.9 Purpose of series resistance
1 2 3 4 5
// cha pter 21 //example21 .9 //page474 printf ( ” The p u r p o s e of us in g series
resist ance R is : \n 1 ) if R is n o t pr es e nt , d io de will sh or t vo lt ag e so ur ce in positi ve half cy cl e \n 2) s o large
current
wil l flow
whi ch m ay d amage voltage 241
Figure 21.6: Sketch output waveform sourc e or dio de . \n To pr ev en t this i . e . to protect dio de and voltage sou rc e , R is us ed . ”
Scilab code Exa 21.10 Sketch output waveform
1 2 3 4 5 6 7 8 9 10 11
// cha pte r 21 // ex am pl e 21.10 // pa ge 47 8 V =2 // V Vin=5 // V
/ / du r in g positi ve half cy cl e Vc_p=Vin-V // since Vin −Vc−V=0 // th u s capa cito r ch ar ge s t o Vc p
12 / / du ri ng ne gat ive
half
cyc le 242
)
Figure 21.7: Sketch output waveform 13 Vout=-Vin-Vc_p / / since Vin −Vc p−Vout=0 14 15 // w e plot inp ut and ou tp ut wav ef or ms usin g th e
follow 16 17 18 19 20 21
ing
c o d e ins tea d of us in g xc os
clf() t=0:0.1:5*%pi plot (t,5* squarewave (t,50)) plot2d (t,-Vc_p+(-Vout+V)* squarewave xtitle ( ”input b l u e− green” , ” t ” , ” vo lt s ” )
Scilab code Exa 21.11 Sketch output waveform
1 // cha pte r 21
243
(t,50)/2,style=3)
output
−
Figure 21.8: Sketch output waveform 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
// ex am pl e 21.11 // pa ge 47 9 V=-2 // V Vin=5 // V
/ / du r in g positi ve half cy cl e Vc_p=Vin-V // since Vin −Vc−V=0 // th u s capa cito r ch ar ge s t o Vc p / / du ri ng ne gat ive half Vout=-Vin-Vc_p / / since
cyc le Vin −Vc p−Vout=0
// w e plot inp ut and ou tp ut wav ef or ms usin g th e follow ing c o d e ins tea d of us in g xc os clf() t=0:0.1:5*%pi plot (t,5* squarewave (t,50)) plot2d (t,-Vc_p+(-Vout+V)* squarewave xtitle ( ”input b l u e−
green” , ” t ” , ” vo lt s ” ) 244
(t,50)/2,style=3)
output
−
Figure 21.9: Sketch output waveform
245
Chapter 22 Field Effect Transistors
Scilab code Exa 22.1 Equation of drain current
1 2 3 4 5 6 7 8
// chp ater 22 //example22 .1 //page491 I_DSS=12 // mA V_GS_off=-5 // V printf ( ” I D=%d∗(1+V GS/ %d) ˆ2 mA \n ” ,I_DSS,-V_GS_off)
Scilab code Exa 22.2 Value of drain current
1 // cha pter 22 2 //example22 .2 3 //page491 4
246
5 6 7 8 9 10
I_DSS=32 // mA V_GS=-4.5 // V V_GS_off=-8 // V I_D=I_DSS*(1-V_GS/V_GS_off)^2
11 printf ( ”drain
current
= %.3 f mA
\n ” ,I_D)
Scilab code Exa 22.3 Gate source voltage and pinchoff voltage
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
// cha pter 22 //example22 .3 //page491 I_D=5 // mA I_DSS=10 // mA V_GS_off=-6 // V
// we know that I D =I D SS ∗(1 −V GS/V GS off )ˆ2 so making V GS as subject we get V_GS=V_GS_off*(1-(I_D/I_DSS)^0.5) V_P=-V_GS_off printf ( ”gat e sou rce volt age = %.3 f V \n ” ,V_GS) printf ( ”pi nc h off volta ge = %.3 f V \n ” ,V_P)
Scilab code Exa 22.4 Resistance between gate and source
247
1 2 3 4 5 6
// cha pter 22 //example22 .4 //page493 V_GS=15 I_G=1d-9
// V // A
7 8 R_GS=V_GS/I_G 9 10 printf ( ”gate
sourc e resi sta nce = %.3 f ohm or % .3 f mega ohm \n” ,R_GS,R_GS/1d6)
Scilab code Exa 22.5
1 2 3 4 5 6 7 8 9 10 11 12
Transconductance
// cha pter 22 //example22 .5 //page493 Vgs1=-3.1 // V Vgs2=-3 // V Id1=1d-3 // A Id2=1.3d-3 // A g_fs=(Id2-Id1)/(Vgs2-Vgs1) printf ( ” transconductance mho \n” ,g_fs,g_fs*1d6)
= %.3 f mho or %.3 f mic ro
248
Scilab code Exa 22.6 AC drain resistance transconductance and amplifi-
cation factor 1 // cha pter 22 2 //example22 .6 3 //page493 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
// for V GS = 0 V constant V_DS1=7 // V V_DS2=15 // V I_D1=10 // mA I_D2=10.25 // mA rd=(V_DS2-V_DS1)/(I_D2-I_D1)
// for V DS = 1 5V constant V_GS1=0 V_GS2=0.2 I_D1=9.65 I_D2=10.25
19 g_fs=(I_D2-I_D1)/(V_GS2-V_GS1) 20 21 mu=rd*g_fs 22 23 printf ( ”a c dra in resist ance = %.3 f ohm or % .3 f kilo ohm \n” ,rd/1000,rd) 24 printf ( ” transconductance = %.3 f mho or %.3 f mic ro mho \n” ,g_fs,g_fs*1000) 25 printf ( ” amplification factor = %.3 f \n” ,mu)
Scilab code Exa 22.7 Rs and Rd
249
1 2 3 4 5 6 7 8 9 10 11 12
// cha pter 22 //example22 .7 //page496 I_DSS=5d-3 // A V_DD=20 // V V_DS=10 // V V_P=-2 // V V_G=0 // V I_D=1.5d-3 // A
// I D =I DS S ∗(1 −V GS/
V_GS=V_P*(1-((I_D/I_DSS)^0.5))
V P)ˆ2 13 V_S=V_G-V_GS 14 R_S=V_S/I_D 15 16 // by Kirchoff ’
s la w we get V DD=I D ∗R D+V DS+I D ∗ R S so making R D as subjec t we ge t
17 R_D=(V_DD-V_DS-I_D*R_S)/I_D 18 19 printf ( ”R s = %.3 f ki lo ohm an d Rd = %.3 f ki lo ohm
” ,R_S/1000,R_D/1000)
Scilab code Exa 22.8
1 2 3 4 5 6 7
Rs
// cha pter 22 //example22 .8 //page496 V_P=-5 // V V_DD=30 // V I_DSS=10 // mA
8 I_D=2.5
// mA 250
\n
9 R1=1000 // kil o ohm 10 R2=500 // kil o ohm 11 12 // sinc e I D=I DS S ∗(1 −(V GS/V P) ) ˆ2 , mak ing V GS as
subjec t we ge t 13 14 V_GS=V_P*(1-(I_D/I_DSS)^0.5) 15 16 V2=V_DD*R2/(R1+R2) 17 18 // since V2 = V GS + I D ∗Rs , ma king Rs as subject
we
get 19 20 Rs=(V2-V_GS)/I_D 21 22 printf ( ” required
valu e of Rs = %.3 f kil o ohm
\n ” ,Rs)
Scilab code Exa 22.9 Voltage amplification
1 2 3 4 5 6 7 8 9 10 11 12
// cha pter 22 //example22 .9 //page497 R_L=10d3 // ohm g_fs=3000d-6 // mho
/ / sin ce r d
>>
R L , we can write
Av=g_fs*R_L printf ( ” vol tag e amplific \n ” ,Av)
ation
251
of t he circu it = %.3 f
Scilab code Exa 22.10 Drain source voltage and gate source voltage
1 2 3 4 5 6 7 8 9 10 11 12 13 14
// cha pter 22 //example22 .1 0 //page498 V_DD=30 // I_D=2.5d-3 R_D=5d3 // R_S=200 //
V // A ohm ohm
V_DS=V_DD-I_D*(R_D+R_S) V_GS=-I_D*R_S printf ( ”V DS = % .3 f V printf ( ”V GS = %.3 f V
\n ” ,V_DS) \n ” ,V_GS)
Scilab code Exa 22.11 DC voltage of drain and source for each stage
1 2 3 4 5 6 7 8 9
// cha pter 22 //example22 .1 1 //page498 V_DD=30 // V I_D1=2.15d-3 // A I_D2=9.15d-3 // A R_D1=8.2d3 // ohm R_D2=2d3 // ohm
252
10 11 12 13 14 15 16 17 18 19 20 21
R_S1=680 R_S2=220
// ohm // ohm
V_RD1=I_D1*R_D1 V_D1=V_DD-V_RD1 V_S1=I_D1*R_S1 V_RD2=I_D2*R_D2 V_D2=V_DD-V_RD2 V_S2=I_D2*R_S2 printf ( ”F or st age
1 and source = %.3 f 22 printf ( ”F or st age 2 and source = %.3 f
: dc vol tag e of dr ai n = %.3 f V V \n ” ,V_D1,V_S1) : dc vol tag e of dr ai n = %.3 f V V \n ” ,V_D2,V_S2)
253
Chapter 23 Silicon controlled rectifiers
Scilab code Exa 23.1 SCR specifications
1 2 3 4 5
// cha pter 23 //example23 .1 //page509 printf ( ”1)
Br ea ko ve r volt age i f ga te is open and th e 6 printf ( ” su pp ly volt age is start co nd uc ti ng heavi ly . 7 printf ( ” However , as lo ng as 400 V, SCR sta ys op en . \n 8 9 printf ( ”2)
of 40 0V : It means th at \n ” ) 40 0V, t h e n SCR will \n ” ) th e su pp ly volt age < \n ” )
Tr igg er cur ren t of 10mA : It means th at i f th e su pp ly vol tag e is \n ” ) 10 printf ( ” les s th an bre ak ov er volt age a nd a minimum ga te cur ren t of 10 mA \n ” ) 11 printf ( ” is pa ss e d , SCR con du ct s . It wont c on du ct if g a t e cu rr en t is less \n” ) 12 printf ( ” th an 10mA. \n \n ” ) 13
254
14 printf ( ”3)
Hold ing curren t of 10mA : When SCR is co nd uc ti ng , it will no t open \n” ) 15 printf ( ” e v e n i f trigger ing cu rr en t is removed . However , i f supp ly voltage \n ” ) 16 printf ( ” is r e d u c e d , a no d e cu rr en t als o de cr eas es . When an od e curren t drops \n ” ) 17 printf ( ”
to 10 mA, th e hol din g cu rr en t , S CR tur ns of f . \n \n ” )
18 19 printf ( ”4)
If ga te cu rr en t is inc reas ed to 1 5mA, t he SCR wil l be tu rn ed on \n ” ) 20 printf ( ” l ow e r su p pl y vo lt ag e . \n ” )
Scilab code Exa 23.2 Fuse rating of SCR
1 2 3 4 5 6 7 8 9 10
// cha pter 23 //example23 .2 //page510 t=12d-3 / / se c I=50 // A fuse_rating=I^2*t if fus e_r ati ng < 90 printf ( ” rat ing = %.3 f am pe re square
secon d wh ic h is l es s th an m aximum \ nrat ing so de vi ce will n o t be de st ro ye d \n” ,fuse_rating
) 11 else prin tf ( ” rat ing = %.3 f am pe re square
whic h i s mo re than maximum \nrating get da ma ge d \n ” ,fuse_rating) 12 13 end
255
secon d so device
may
Scilab code Exa 23.3 Maximum allowable duration of surge
1 2 3 4 5 6 7 8 9 10
// cha pter 23 //example23 .3 //page510 rating=50 // am pe re square Is=100 // A
sec ond
t_max=rating/Is^2 printf ( ”maximum allowab le duration or %.3 f ms \n ” ,t_max,t_max*1000)
of surge =
%.3 f s
Scilab code Exa 23.4 Firing angle conduction angle and average current
of half wave rectifier employing SCR 1 2 3 4 5 6 7 8 9
// cha pter 23 //example23 .4 //page514 v=100 // V Vm=200 // V R_L=100 // ohm
// si nc e v=Vm ∗ si n ( theta ) , we get
10
256
11 theta= asin (v/Vm)*180/%pi / / in t e r m s of de gr ee s 12 13 phi=180-theta 14 15 V_avg=Vm*(1+ cos (theta*%pi/180))/(2*%pi) 16 17 18 19 20 21 22 23
I_avg=V_avg/R_L printf ( ” fi r i n g angle = % .2 f degree s \n” ,theta) printf ( ”condu cti on angl e = %.2 f degree s \n ” ,phi) printf ( ”aver age current = %.4 f A \n ” ,I_avg)
/ / th e ac cu ra te a n s w e r for av er ag e cu rr en t is 0. 59 4 A b ut in book it is gi ve n a s 0. 59 25 A
Scilab code Exa 23.5 Firing angle average output voltage average current
and power output of half wave rectifier 1 2 3 4 5 6 7 8 9 10 11 12 13 14
// cha pter 23 //example23 .5 //page515 Vm=400 // V v=150 // V R_L=200 // ohm
// si nc e v=Vm ∗ si n ( theta ) , we get theta= asin (v/Vm)*180/%pi
/ / in t e r m s of de gr ee s
V_av=Vm*(1+ cos (theta*%pi/180))/(2*%pi) I_av=V_av/R_L
15 P=V_av*I_av
257
16 17 printf ( ” fi r i n g angle = % .2 f degree s \n” ,theta) 18 printf ( ”aver age ou tp ut voltage = %.3 f V \n ” ,V_av) 19 printf ( ”ave ra ge cur rent for lo ad of 2 0 0 ohm = %.3 f A \n ” ,I_av) 20 printf ( ”pow er output = %.3 f W \n ” ,P ) 21 22 // th e acc ura te an s w e r for
power ou tp ut is 75. 250 W but in book it is gi ve n a s 75 .1 5 W
Scilab code Exa 23.6 Off duration of SCR
1 2 3 4 5 6 7 8
// cha pter 23 //example23 .6 //page515 Vm=240 // V v=180 // V
/ / figure gi ve n is for un de rs ta nd ing pu rp os e on ly . It is n o t req uir ed t o solv e th e ex a m p l e
9 10 // SCR re ma in s off
t i l l it reache s 18 0 V i . e . forwar d br ea kd ow n volt age
11 12 13 14 15 16 17 18
// si nc e v=Vm ∗ si n ( theta ) , we get theta= asin (v/Vm)
// since
// f ir i n g angl e in te rm s of degree s
the ta= 314 ∗ t , we get
t=theta/314
// secon ds
19
258
20 printf ( ” of f duration
of SCR = %.3 f ms \n ” ,t*1000) mu lt ip ly t by 1 0 0 0 t o disp lay t i m e in milliseconds
//
Scilab code Exa 23.7 DC output voltage and load current for full wave
rectifier 1 2 3 4 5 6 7 8 9 10 11 12 13 14
// cha pter 23 //example23 .7 //page517 alpha=60 // degree s Vm=200 // V R_L=100 // ohm V_av=Vm*(1+
cos (alpha*%pi/180))/%pi
I_av=V_av/R_L printf ( ”d c ou tp ut voltage printf ( ”loa d cur ren t for = % .3 f A \n” ,I_av)
= %.3 f V \n ” ,V_av) fi r i n g ang le of 60 deg ree s
259
Chapter 24 Power electronics
Scilab code Exa 24.1 Values of RB1 and RB2
1 2 3 4 5 6 7 8 9 10 11 12
// cha pter 24 //example24 .1 //page533 RBB=10 // kil o ohm eta=0.6
// e t a=RB1/ (RB1+RB2) = RB1/Rbb s o RB1=eta*RBB RB2=RBB-RB1 printf ( ”RB1 = % .3 f ki lo ohm \n ” ,RB1) printf ( ”RB2 = %.3 f k i l o ohm” ,RB2)
Scilab code Exa 24.2 Standoff voltage and peak point voltage
260
1 2 3 4 5 6 7 8 9 10 11 12
// cha pter 24 //example24 .2 //page533 VBB=10 // V eta=0.65 VD=0.7
// V
stand_off_voltage=eta*VBB peak_point_voltage=VD+eta*VBB
printf ( ”st an d off volta ge = %.3 f V stand_off_voltage) 13 printf ( ”pe ak point voltage = %.3 f V peak_point_voltage)
261
\n ” , \n” ,
Chapter 25 Electronic instruments
Scilab code Exa 25.1 Sensitivity of multimeter
1 2 3 4 5 6 7 8 9
// cha pter 25 //example25 .1 //page543 Ig=1d-3
// A
S=1/Ig printf ( ” sen si tiv it y = %.3 f ohm pe r volt
Scilab code Exa 25.2 Limitation of multimeter
1 // cha pter 25 2 //example25 .2 3 //page543
262
\n ” ,S )
4 5 6 7 8 9
S=1000 // ohm per V=50 // V R=50d3 // ohm
volt
R_meter=S*V
10 11 R_equi=R*R_meter/(R+R_meter)
of me t e r and giv en resist is con ne ct ed
// equiv alent resist ance ance across wh ich me t e r
12 13 printf ( ” ratio
of circuit resist ance be fo re and after connecting multimet er = %.3 f \n ” ,R/R_equi) 14 printf ( ”T hus equ iva len t resistance is r ed uc ed t o half . So curr ent drawn is do ub le \n ” ) 15 printf ( ”T hus mu lt im et er will give high ly incorrect reading \n \n ” ) 16 printf ( ” As a ru le , mu lt im et er resist ance sh ou ld be 10 0 ti me s t he resistance acr oss \ nw hi ch voltage is to be me as ur ed \n ” )
Scilab code Exa 25.3 Reading of multimeter in given circuit
1 2 3 4 5 6 7
// cha pter 25 //example25 .3 //page544 S =4 // kilo V_range=10 V=20 // V
8 R=10
ohm per // V
volt
// kil o ohm 263
Figure 25.1: Limitation of multimeter 9 10 R_meter=S*V_range 11 12 13 14 15
R_equi=R+R*R_meter/(R+R_meter) I=V/R_equi V_reading=I*R*R_meter/(R+R_meter) printf ( ” voltage V_reading)
rea d by mult imet er = %.3 f V
Scilab code Exa 25.4 Reading of multimeter
1 // cha pter 25
264
\n ” ,
Figure 25.2: Reading of multimeter in given circuit 2 //example25 3 //page544 4 5 6 7 8 9 10 11 12 13 14 15
.4
S=20 // kilo ohm per V_range=10 // V V=20 // V R=10 // kil o ohm
volt
R_meter=S*V_range R_equi=R+R*R_meter/(R+R_meter) I=V/R_equi V_reading=I*R*R_meter/(R+R_meter) printf ( ” voltage V_reading)
rea d by mult imet er = %.3 f V
16 17 // an sw e r in book is
\n ” ,
9.8 8V b u t acc ura te an sw e r is
9.756V 265
Scilab code Exa 25.5 Readings before and after connecting the meter
1 2 3 4 5 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
// cha pter 25 //example25 .5 //page545 R1=20d3 // R2=20d3 // R3=30d3 // R4=30d3 // V=100 // V Rm=60d3 //
ohm ohm ohm ohm ohm
/ / ca se 1 : m e t er is n o t co nn ec te d R=R1+R2+R3+R4 I=V/R V_A=V V_B=V-I*R2 V_C=V-I*(R1+R2) V_D=V-I*(R1+R2+R3)
// cas e2 : m e t e r is co nn ec te d // At A V_A1=V
// At B R_total_B=R1+(Rm*(R2+R3+R4)/(Rm+R2+R3+R4)) I1=V/R_total_B V_B1=I1*(Rm*(R2+R3+R4)/(Rm+R2+R3+R4))
// At C R_total_C=R1+R2+(Rm*(R3+R4)/(Rm+R3+R4))
266
31 32 33 34 35 36
I2=V/R_total_C V_C1=V*(Rm*(R3+R4)/(Rm+R3+R4))/R_total_C
// At D R_total_D=R1+R2+R3+(Rm*R4/(Rm+R4)) I2=V/R_total_D
37 V_D1=V*(Rm*R4/(Rm+R4))/R_total_D 38 39 printf ( ”CASE 1 : me te r is no t conn ect ed
\n Vol tage at A = %.3 f V \n V o l a t g e a t B = %. 3 f V \n V o l a t g e a t C = %. 3 f V \n Volatge at D = % .3 f V \n ” ,V_A,V_B,V_C,V_D) 40 printf ( ”CASE 2 : me te r is conn ect ed \n AtA th en voltage at A = %.3 f V” ,V_A1) , 41 printf ( ” \n At B t h e n v o l t a g e a t B = %. 3 f V” V_B1) 42 printf ( ” \n V_C1) 43 printf ( ” \n n ” ,V_D1) 44
At C t h e n v o l t a g e a t C = %. 3 f V”
,
At D t h e n v o l t a g e a t D = %. 3 f V
\n \
45 printf ” resist ance ance acofro ss vol tme ter shvol ou ld 10 0totibeme s t h e (resist \ nwhich tag be e is
me as ur ed . Sinc e this condition is no t he re , readings are wrong . \n ” )
Scilab code Exa 25.6 Spot shift
1 // cha pter 25 2 //example25 .6 3 //page552 4 5 S=0.01
//mm per
vo lt 267
\ nsatisfied
6 V=400 // V 7 8 spot_shift=S*V 9 10 printf ( ”spot sh if t = %.3 f mm
\n ” ,spot_shift)
Scilab code Exa 25.7 Voltage applied to CRT
1 2 3 4 5 6 7 8
// cha pter 25 //example25 .7 //page552 S=0.03 // m m per vol t spot_shift=3 // mm V=spot_shift/S
sensitivity 9 10 printf ( ” applied
/ / si nc e s p o t shift = deflec ∗ app lie d volt age voltage
= %.3 f V
\n ” ,V )
Scilab code Exa 25.8 Voltage for given deflection
1 2 3 4 5 6 7
// cha pter 25 //example25 .8 //page555 V1=200 // V d1=2 // cm d2=3 // cm
268
tion
8 9 10 11 12 13
/ / sin ce sensitivi
ty = vo lt ag e / deflcet
ion
we ge t
S=V1/d1 V2=S*d2 printf ( ”u nknown vol tag e = %.3 f V” ,V2)
Scilab code Exa 25.9 Find unknown frequencies
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
// cha pter 25 //example25 .9 //page556 fh=1000
// Hz − rat io o f f v t o f h = 1 : 1
// cas e ( i ) : fv1=1*fh
// case
( ii ) :
− ratio =
2: 1
fv2=2*fh
// case
( iii ) :
− ratio =
6: 1
fv3=6*fh
printf ( ” for ,fv1) 17 printf ( ” for ,fv2) 18 printf ( ” for ,fv3)
case 1 i . e . fv/fh
= 1/ 1 , fv = %.3 f Hz
\n ”
case 2 i . e . fv/fh
= 2/ 1 , fv = %.3 f Hz
\n ”
case 3 i . e . fv/fh
= 6/ 1 , fv = %.3 f Hz
\n ”
269
Chapter 26 Integrated circuits
Scilab code Exa 26.1 LM 317 voltage regulator
1 2 3 4 5 6 7 8 9 10
// cha pter 26 //example26 .1 //page570 R2=2.4d3 // ohm R1=240 // ohm V_out=1.25*(1+R2/R1) printf ( ” regulated V_out)
dc ou tp ut voltage
270
= %.3 f V
\n ” ,
Chapter 27 Hybrid parameters
Scilab code Exa 27.1 h parameters
1 2 3 4 5 6 7 8
// cha pter 27 //example27 .1 //page574 R1=10 // ohm R2=5 // ohm
// for h11 and h21 , im ag in e tha t ou tp ut terminals ar e sh or te d h e n c e it is clea r th at in p ut im pe de nc e is equ al to R 1.
Figure 27.1: h parameters 271
9 10 11 12
// t his is h
11 by d efini tion s o
h11=R1
// now cu rrent wil l flow of s ame m ag ni tu de but in oppos ite directi ons th ro ug h in pu t and ou tp ut terminals so output curren t/ input current =
−1
13 // b ut this rati o is h21 b y definition . T hus 14 h21=-1 15 16 // for h12 and h22 im ag in e a volt age sou rce on 17
18 19 20 21 22
23 24 25 26 27 28 29
ou tp ut terminals // thi s vol ta ge will b e avil able on in p ut term inals also since cur ren t th ro ug h 10 o hm resistor = 0. // he nc e input voltage / output voltage = 1 // b ut this rati o is h12 b y definition . T hus h12=1
// he re o ut pu t i mp ed en ce lo oking into out pu t term inals w it h in pu t term inals o pen is 5 o hm. // its recipr h22=1/5 printf printf printf printf
( ”h11 ( ”h21 ( ”h12 ( ”h22
ocal
= % .3 = % .3 = % .3 = % .3
is h2 2 by definition
f ohm \n ” ,h11) f \n ” ,h21) f \n ” ,h12) f ohm \n ” ,h22)
Scilab code Exa 27.2 h parameters
272
. T hus
Figure 27.2: h parameters
Figure 27.3: h parameters
273
1 2 3 4 5 6
// cha pter 27 //example27 .2 //page575 R1=4 R2=4
// ohm // ohm
7 R3=4 // ohm 8 9 // for h11 and h21 , im ag in e tha t ou tp ut terminals
10 11 12 13
ar e sh or te d h e n c e it is clea r th at in p ut imp ed enc e is equal to R1+R2 ∗R3/(R2+R3) // t his is h 11 by d efini tion s o h11=R1+R2*R3/(R2+R3)
// now cu rr ent will div ide equ all y at ju nct ion of 4 o hm resi sto rs so out put c urr en t / input current = −0.5 // b ut this rati o is h21 b y definition . T hus
14 h21=-0.5 15 16 17 // for h12 and h22 im ag in e a volt age 18 19 20 21 22 23 24 25 26 27 28 29 30
sou rce on
ou ut terminals //tpthis vo lt ag e will b e di vi de d b y a fac to r 2 // he nc e input voltage / output voltage = 0.5 // b ut this rati o is h12 b y definition . T hus h12=0.5
// he re o ut pu t i mp ed en ce lo oking into out pu t term inals w it h in pu t term inals o pen is 8 o hm. // its recipr ocal is h2 2 by definition . T hus h22=1/8 printf printf printf printf
( ”h11 ( ”h21 ( ”h12 ( ”h22
= % .3 = % .3 = % .3 = % .3
f ohm \n ” ,h11) f \n ” ,h21) f \n ” ,h12) f ohm \n ” ,h22)
274
Figure 27.4: h parameters
Scilab code Exa 27.3 Input impedence and voltage gain of given circuit
1 2 3 4 5 6 7 8 9 10
// cha pter 27 //example27 .3 //page578 h11=10 h12=1 h21=-1 h22=0.2 rL=5 // ohm
11 Zin=h11-(h12*h21/(h22+1/rL))
275
12 Av=-h21/(Zin*(h22+1/rL)) 13 14 printf ( ” input impe denc e = %.3 f ohm \n ” ,Zin) 15 printf ( ” vol tag e ga in of circu it = %.3 f \n ” ,Av)
Scilab code Exa 27.4 Input impedence current gain and voltage gain
1 2 3 4 5 6 7 8
// cha pter 27 //example27 .4 //page581 hie=2000 hoe=1d-4 hre=1d-3 hfe=50
// ohm // mho
9 rL=600 // ohm 10 11 Zin=hie-hre*hfe/(hoe+1/rL) 12 // her e se co nd term can be neglected
compared to hie
so 13 14 15 16 17 18 19 20
Zin_approx=hie Ai=hfe/(1+hoe*rL)
// i f h oe ∗ rL
<<
1 th en
Ai_approx=hfe Av=-hfe/(Zin*(hoe+1/rL))
/ / ne gat iv e sig n indicates an d output
p h as e shif t b et w ee n in pu t
21 22 printf ( ” input
impe denc e = %.3 f ohm 276
\n ” ,Zin)
23 printf ( ” current 24 printf ( ” voltage
gain = % .3 f \n ” ,Ai) gai n = %.3 f . Here negativ e sign indi cate s ph as e sh if t be tw een inp ut and ou tp ut . \n ” ,Av)
25 26 printf ( ”approximate
input
impe denc e = %.3 f ohm
Zin_approx) 27 printf ( ”appr oxi mat e current Ai_approx)
gain = %.3 f
\n ” ,
\n ” ,
Scilab code Exa 27.5 Input impedence current gain and voltage gain
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
// cha pter 27 //example27 .5 //page582 hie=1700 // ohm hre=1.3d-4 hoe=6d-6 // mho hfe=38 rL=2000 // ohm Zin=hie-hre*hfe/(hoe+1/rL) Ai=hfe/(1+hoe*rL) Av=-hfe/(Zin*(hoe+1/rL)) printf ( ” input impe denc e = %.3 f ohm \n ” ,Zin) printf ( ” current gain = % .3 f \n ” ,Ai) printf ( ” voltage gain = % .3 f \n ” ,-Av) // considering
m ag n i t u d e of A v,w e neglect so w e display
its
nega tiv e sign
−Av inste ad of Av 277
\n
and
Scilab code Exa 27.6 AC input impedence and voltage gain
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
// cha pter 27 //example27 .6 //page582 hie=1500 // ohm hre=4d-4 hoe=5d-5 // mho hfe=50 Rc=10d3 // ohm R_L=30d3 // ohm R1=80d3 // ohm R2=40d3 // ohm rL=Rc*R_L/(Rc+R_L) Zin=hie-hre*hfe/(hoe+1/rL) Zin_stage=Zin*(R1*R2/(R1+R2))/(Zin+(R1*R2/(R1+R2))) Av=-hfe/(Zin*(hoe+1/rL)) printf ( ” input impe denc e = %.3 f ohm \n ” ,Zin_stage) printf ( ” voltage gain = % .3 f \n ” ,Av)
// th e accura te an sw er s are inp ut im pe de nc e = 1321 .957 ohm and voltage gai n = −19 6. 07 8 bu t in boo k th ey are given as 13 20 o hm a nd −196 respectively
278
Scilab code Exa 27.7 h parameters
1 2 3 4 5 6 7 8 9 10 11 12 13 14
// cha pter 27 //example27 .7 //page584
15 16 17 18 19 20
hoe=Ic2/Vce
Vbe=10d-3 // V Vbe2=0.65d-3 // V Vce=1 // V Ib=10d-6 // A Ic=1d-3 // A Ic2=60d-6 // A hie=Vbe/Ib // in ohm hfe=Ic/Ib // in ohm hre=Vbe2/Vce
printf printf printf printf
( ” hi e ( ” hfe ( ”hre ( ”hoe
// in mho = % .3 f ohm \n ” ,hie) = %.3 f ohm \n ” ,hfe) = % .5 f \n ” ,hre) = %.3 f micro mho \n ” ,hoe*1d6)
279
Chapter 28 Digital electronics
Scilab code Exa 28.1 Convert decimal number to binary
1 2 3 4 5 6
// cha pter 28 //example28 .1 //page590 a= de c2b in (3 7) disp (a , ’ bin ary equivalent
of de cim al number 37 = ’
)
Scilab code Exa 28.2 Convert decimal number to binary
1 2 3 4 5 6
// cha pter 28 //example28 .2 //page590 a= de c2b in (2 3) disp (a , ’ bin ary equivalent
of de cim al number 23 = ’ 280
)
Scilab code Exa 28.3 Convert binary number to decimal
1 2 3 4 5 6
// cha pter 28 //example28 .3 //page591 a= bi n2 de c ( ’ 1 1 0 0 0 1 ’ ) printf ( ” equivalent de cim al of bin ary ” ,a )
11 00 01 is %d
\n
Scilab code Exa 28.4 Obtain truth table for given circuit
1 2 3 4 5
// cha pter 28 //example28 .4 //page598 disp ( ” ”) disp0( ” disp1( ” disp0( ” disp1( ”
A
B
Y da sh = A + B
6 0 0 0 7 0 1 1 8 1 1 0 9 1 1 1 10 11 printf ( ” \ nexplanati on : \n ” ) 12 printf ( ”A=0 an d B=0 giv e A‘= 1
” ” ” ”
Y = Y da sh. A ) ) ) )
an d B‘= 1 so Y da sh = A + B is 0 and Y = Y d as h .A is 0 \n ” )
13
281
14 printf ( ”A=1 an d B=0 giv e A‘= 0 an d B‘= 1 so Y da sh = A + B is 1 and Y = Y d as h .A is 1 \n ” ) 15 16 printf ( ”A=0 an d B=1 giv e A‘= 1 an d B‘= 0 so Y da sh = A + B is 1 and Y = Y d as h .A is 0 \n ” ) 17 18 printf ( ”A=1 an d B=1 giv e A‘= 0 an d B‘= 0 so Y da sh = A + B is 1 and Y = Y d as h .A is 1 \n ” )
Scilab code Exa 28.5 Obtain truth table for given circuit
1 2 3 4 5
// cha pter 28 //example28 .5 //page598 disp ( ” A
B A‘ Ydas h =A .‘ B Y = Y da sh + B ‘ ” ) 6 disp 0( ” 0 1 0 1 1 ”) 7 disp 1( ” 0 0 0 1 1 ”) 8 disp 0( ” 1 1 1 0 1 ”) 9 disp 1( ” 1 0 0 0 0 ”)
B‘
10 11 printf ( ” \ nexplanati on : \n ” ) 12 printf ( ”A=0 an d B=0 giv e A‘= 1 an d B‘= 1 so Y da sh = A ‘ .B is 0 and Y = Y d ash + B ‘ is 1 \n” ) 13 14 printf ( ”A=1 an d B=0 giv e A‘= 0 an d B‘= 1 so Y da sh = A ‘ .B is 0 and Y = Y d ash + B ‘ is 1 \n” ) 15
282
16 printf ( ”A=0 an d B=1 giv e A‘= 1 an d B‘= 0 so Y da sh = A ‘ .B is 1 and Y = Y d ash + B ‘ is 1 \n” ) 17 18 printf ( ”A=1 an d B=1 giv e A‘= 0 an d B‘= 0 so Y da sh = A ‘ .B is 0 and Y = Y d ash + B ‘ is 0 \n” )
Scilab code Exa 28.6 Simplify using Boolean techniques
1 2 3 4 5
// chapt er28 // exa mple 28 .6 //page606
printf ( ”Y = A . B . C ‘ . D‘ + A‘ . B . C ‘ . D‘ + A‘ . B . C . D‘ + A . B . C . D‘ \n ” ) 6 printf ( ” taking ou t the common fac to rs \n ” ) 7 printf ( ”Y = B . C ‘ . D‘ . ( A + A‘ ) + B . C . D‘ . ( A + A‘) \n ” ) 8 9 10 11 12 13 14 15
printf printf printf printf printf printf printf printf
( ”By the ore m 3 \n” ) ( ”Y = B . C ‘ . D‘ + B . C . D‘ ( ”ag ai n factorize \n ” ) ( ”Y = B . D‘ ( C + C ‘ ) \n ” ) ( ”By the ore m 3 \n” ) ( ”Y = B . D‘ . 1 \n ” ) ( ”thus \n ” ) ( ”Y = B . D‘ \n ” )
\n ” )
Scilab code Exa 28.7 Simplify using Boolean techniques
1 // chapt er28
283
2 // exa mple 28 .7 3 //page606 4 5 printf ( ”Y = A . B + A . ( B + C ) + B . ( B + C ) ”) 6 printf ( ”By thoe rem 14 \n ” ) 7 printf ) 8 printf 9 printf 10 printf 11 printf 12 printf 13 printf 14 printf 15 printf 16 printf 17 printf 18 printf 19 printf 20 printf
( ”Y = A . B + A . B + A . C + B . B + B . C
\n ”
( ”By the ore m 6 \n” ) ( ”Y= A . B + A . B + A . C + B + B .C \n ” ) ( ”By the ore m 5 \n” ) ( ”Y = A . B + A . C + B + B . C \n ” ) ( ”Fa c to r B ou t of last 2 t e r m s \n ” ) ( ”Y = A . B + A . C + B . ( 1 + C ) \n ” ) ( ”Ap pl y cumm ulat ive law an d the ore m 7 \n ” ) ( ”Y = A . B + A . C + B . 1 \n ” ) ( ”Ap pl y the ore m 2 \n ” ) ( ”Y = A . B + A . C + B \n ” ) ( ”Fac to r B ou t of f i r s t and third te rm s \n” ) ( ”Y = B . ( A + 1 ) + A . C \n ” ) ( ”Ap pl y the ore m 7 \n ” )
21 printf ( ”Ap ”Y =plBy . the 1 +oreA m. C 22 printf ( 2 \n \n” ”) ) 23 printf ( ”Y = B + A . C \n ” )
Scilab code Exa 28.8 Simplify to minimum number of literals
1 2 3 4 5
\n
// cha pter 28 //example28 .8 //page607 printf ( ” i ) Y = A + A ‘ . B
6 printf ( ”
By t h e o r e m 1 6
\n” ) \n ” ) 284
7 8 9 10 11 12
printf printf printf printf
(” (” (” (”
Y = A + A . B + A‘ . B = A + B ( A + A‘ ) By t h e o r e m 3 \n ” ) Y=A+B \n \n ” )
\n ” ) \n” )
printf ( ” i i ) Y = A . B + A‘ . C + B . C
13 printf ( ” ) 14 printf ( ”
\n ” )
= A . B + A‘ . C + B . C ( A + A‘ ) = A . B + A‘ . C + A . B . C + A‘ . B
. C \n” ) 15 printf ( ” ”) 16 printf ( ”
= A . B ( 1 + C ) + A‘ . C( 1 + B ) \n” )
= A . B + A‘ . C
Scilab code Exa 28.9 Determine output expression for given circuit
1 // cha pter 28 2 3 4 5 6 7 8
//example28 //page607 printf printf printf printf
\n ”
.9
( ”Y = ( ( A + B ) ‘ . C . D‘ ) ‘ \n ” ) ( ”Using De Mo rg an theore m \n ” ) ( ”Y = ( A + B ) + C ‘ + D \n” ) ( ”Y = A + B + C‘ +D \n ” )
Scilab code Exa 28.10 Find complement of given expressions
1 // cha pter 28 2 //example28 .1 0
285
\n
3 //page607 4 5 printf ( ”1 ) Y = A . B . C ‘ + A . ( B . C ) ‘ 6 printf ( ” Y‘ = ( A . B . C ‘ + A . ( B . C ) ‘ ) ‘ ) 7 printf ( ” By De Morgan th eo re m \n ” )
\n ” ) \n ”
8 printf ( ” Y‘ = ( A . B . C ‘) ‘ . ( A . ( B . C ) ‘ ) ‘ \n ” ) 9 printf ( ” By De Morgan th eo re m \n ” ) 10 printf ( ” Y‘ = ( A ‘ + B ‘ + C ) . ( A ‘ + B + C ) \n \n ” ) 11 printf ( ”2 ) Y = A‘ . ( B . C ‘ + B ‘ . C ) \n ” ) 12 printf ( ” Y‘ = ( A‘ . ( B . C ‘ + B ‘ . C ) ) ‘ \n” ) 13 printf ( ” By De Morgan th eo re m \n ” ) 14 printf ( ” Y‘ = A + ( B . C ‘ + B ‘ . C ) ‘ \n ” ) 15 printf ( ” By De Morgan th eo re m \n ” ) 16 printf ( ” Y‘ = A + ( B . C ‘) ‘ . ( B ‘ . C ) ‘ \n ” ) 17 printf ( ” By De Morgan th eo re m \n ” ) 18 printf ( ” Y‘ = A + ( B ‘ + C ) . ( B + C ‘) \n ” ) 19 printf ( ” Y‘ = A + ( B . C ) ‘ + ( B . C ) \n ” )
Scilab code Exa 28.11
1 2 3 4 5 6
Simplify given Boolean expressions
// cha pter 28 //example28 .1 1 //page608
printf ( ”1 ) Y = ( A + B + C ) . ( A + B ) \n” ) printf ( ” Y=A .A +A. B + B .A + B . B + C . A + C . B \n” ) 7 printf ( ” U s i n g A . A = A we g e t \n ” ) 8 printf ( ” Y=A+A . B+A . B+B+A . C+B . C
\n ” ) 286
(” (” (” (” (” (”
9 10 11 12 13 14
printf printf printf printf printf printf
15 16 17 18 19 20 21 22 23 24 25
printf ( ” printf ( ”
28 29 30 31 32 33 34 35 36
printf ( (” ” printf
printf printf printf printf printf
U s i n g A . B + A . B = A . B we g e t Y=A+A . B+B+A . C+B . C U s i n g A + A . B = A we g e t \n ” ) Y=A+ B +A. C + B . C \n ” ) =A . (1 +C ) +B . (1 +C ) Using 1 + C = 1 w e g et \n ” )
\n” ) \n ” )
\n ” )
Y=A.1 +B.1 \n ” ) Y=A+B \n \n ” )
( ”2 ) Y = A . B + A . B . C + A . B . C ‘ (” = A . B + A . B ( C + C‘ ) \n ” ) (” S i n c e C + C ‘ = 1 w e ge t \n ” ) (” Y=A.B +A.B \n ” ) (” =A . B \n \n ” )
\n” )
printf ( ”3 ) Y = 1 + A . ( B . C ‘ + B . C + B ‘ . C ‘) + A . B‘ . C + A . C \n ” ) 26 printf ( ” U s i n g 1 + A = 1 a nd 1 + A . ( B . C ‘ + B . C + ( B . C ) ‘ ) = 1 w e get \n ” ) 27 printf ( ” Y= 1 +A.B ‘ .C +A.C \n ” )
printf printf printf printf printf printf ”) 37 printf
Y= = 11 + A\n . C\n ” ) \n ” ) Y
( ”4) Y = ( ( A + B‘ + C ) + ( B + C ‘ ) ) ‘ \n ” ) (” By De Morgan th eo re m \n ” ) (” Y = ( A + B‘ + C ) ‘ . ( B + C‘ )‘ \n ” ) (” By De Morgan th eo re m \n ” ) (” Y = ( A‘ . B . C ‘ ) . ( B ‘ . C ) \n ” ) (” S i n c e B . B ‘ = 0 a nd C . C ‘ = 0 w e ge t \n (”
Y= 0
\n ” )
287
Scilab code Exa 28.12
Simplify given Boolean expression
1 // cha pter 28 2 //example28 .1 2 3 //page609 4 5 6 7 8 9 10 11
printf printf printf printf printf printf printf
( ” Y = A . B ‘ . D + A . B ‘ . D‘ \n ” ) ( ” Fa ct or ou t A . B‘ by t h eor em 14 \n” ) ( ” Y = A . B ‘ ( D + D‘ ) \n” ) ( ” But by th eo re m 3 D + D‘ = 1 \n ” ) (” Y = A . B‘ . 1 \n ” ) ( ” By th eo re m 2 \n ” ) (” Y = A . B‘ \n ” )
Scilab code Exa 28.13
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
Simplify given Boolean expression
// cha pter 28 //example28 .1 3 //page609 printf printf printf printf printf printf
(” Y = ( A ‘ + B ) . ( A + B ) \n” ) ( ” By th eo re m 15 \n ” ) ( ” Y = A‘ . A + A‘ . B + B . A + B . B ( ” By th eo re m 4 and 6 \n ” ) ( ” Y = 0 + A‘ . B + B . A + B \n” ) ( ” Y = A‘ . B + B . A + B \n ” )
printf printf printf printf printf
( ” By th eo re m 14 \n ” ) ( ” Y = B . ( A‘ + A + 1 ) \n ” ) ( ” By th eo re m 7 \n ” ) (” Y = B . ( A ‘ + 1 ) \n ” ) ( ” By th eo re m 7 \n ” )
17 printf ( ” Y = B . 1 )
\n” ) 288
\n ” )
18 printf ( ” By th eo re m 2 19 printf ( ” Y = B \n ” )
\n ” )
289