A Textbook of Electronic Circuits - R. S. Sedha

Download as pdf or txt
Download as pdf or txt
You are on page 1of 186

Scilab Textbook Companion for

A Textbook of Electronic Circuits


by R. S. Sedha1

Created by
Neelam Ramchandra Jadhav
pursuing B.E (EXTC)
Others
Anjuman-I-Islam’s kalsekar Technical campus
College Teacher
Chaya
Cross-Checked by
Not Applicable

July 31, 2019

1 Funded by a grant from the National Mission on Education through ICT,


http://spoken-tutorial.org/NMEICT-Intro. This Textbook Companion and Scilab
codes written in it can be downloaded from the ”Textbook Companion Project”
section at the website http://scilab.in
Book Description

Title: A Textbook of Electronic Circuits

Author: R. S. Sedha

Publisher: S. Chand And Company

Edition: 2

Year: 2009

ISBN: 9788121928038

1
Scilab numbering policy used in this document and the relation to the
above book.

Exa Example (Solved example)

Eqn Equation (Particular equation of the above book)

AP Appendix to Example(Scilab Code that is an Appednix to a particular


Example of the above book)

For example, Exa 3.51 means solved example 3.51 of this book. Sec 2.3 means
a scilab code whose theory is explained in Section 2.3 of the book.

2
Contents

List of Scilab Codes 4

3 SEMICONDUCTORS 5

5 PN JUNCTION DIODE 16

7 SPECIAL PURPOSE DIODES AND OPTO ELECTRONIC


DEVICES 23

8 BIPOLAR JUNCTION TRANSISTORS 28

9 BJT CHARACTERISTICS 34

10 BJT LOW AND HIGH FREQUENCY MODELS 35

11 BJT LOW AND HIGH FREQUENCY MODELS 36

12 THYRISTORS 39

13 PASSIVE CIRCUITS DEVICES 42

16 PN JUNCTION DIODE APPLICATIONS RECTIFIERS


AND FILTERS 45

3
17 CONTROLLED RECTIFIERS 52

18 BJT BIASING AND STABILISATION 56

19 SINGLE STAGE BJT AMPLIFIERS 75

20 HYBRID PARAMETERS 86

21 MULTISTAGE BJT AMPLIFIERS 93

22 FET AMPLIFIERS 100

23 AMPLIFIERS WITH COMPOUND CONFIGURATION 110

24 FREQUENCY RESPONSE OF BJT AND JFET AMPLI-


FIERS 118

25 LARGE SIGNAL OR POWER AMPLIFIERS 123

26 TUNED AMPLIFIERS 130

27 FEEDBACK AMPLIFIERS 133

28 SINUSOIDAL OSCILLATORS 141

29 NON SINUSOIDAL OSCILLATORS 147

30 LINEAR WAVE SHAPING CIRCUIT 154

31 TIME BASE CIRCUIT 156

32 OPERATIONAL AMPLIFIERS 158

33 OP AMP APPLICATION 164

34 REUGULATED POWER SUPPLIES 166

4
List of Scilab Codes

Exa 3.1 length of wire and current density . . . . . . 5


Exa 3.2 charge density of free electrons current den-
sity current flowing in the wire and electron
drift velocity . . . . . . . . . . . . . . . . . 5
Exa 3.3 mobility and relaxation time of electrons . . 6
Exa 3.4 intrinsic conductivity . . . . . . . . . . . . . 6
Exa 3.5 intrinsic conductivity . . . . . . . . . . . . . 7
Exa 3.6 concentration of free electrons and drift ve-
locity . . . . . . . . . . . . . . . . . . . . . 7
Exa 3.7 intrinsic carrier concentration . . . . . . . . 8
Exa 3.8 conductivity . . . . . . . . . . . . . . . . . . 9
Exa 3.9 donor concentration . . . . . . . . . . . . . 9
Exa 3.10 concentration of electrons and holes . . . . . 9
Exa 3.11 minority electron and hole density . . . . . . 10
Exa 3.12 length . . . . . . . . . . . . . . . . . . . . . 10
Exa 3.13 concentration of holes and electrons . . . . . 11
Exa 3.14 resistivity of germanium sample . . . . . . . 11
Exa 3.15 resistivity of intrinsic silicon . . . . . . . . . 12
Exa 3.16 conductivity of silicon . . . . . . . . . . . . 13
Exa 3.17 diffusion coefficients of holes and electrons . 13
Exa 3.18 electron mobility . . . . . . . . . . . . . . . 14
Exa 3.19 conduction electrons . . . . . . . . . . . . . 14
Exa 3.20 number of electrons . . . . . . . . . . . . . . 14
Exa 3.21 mobility and density of charge carrier . . . . 15
Exa 3.22 resistivity . . . . . . . . . . . . . . . . . . . 15
Exa 5.1 Current . . . . . . . . . . . . . . . . . . . . 16
Exa 5.2 find current . . . . . . . . . . . . . . . . . . 16
Exa 5.3 value of n . . . . . . . . . . . . . . . . . . . 17

5
Exa 5.4 saturation current . . . . . . . . . . . . . . 17
Exa 5.5 value of VF for the device . . . . . . . . . . 17
Exa 5.8 dc current and PDmax . . . . . . . . . . . . 18
Exa 5.9 voltage drop and current . . . . . . . . . . . 18
Exa 5.10 VD VR I . . . . . . . . . . . . . . . . . . . 18
Exa 5.11 current . . . . . . . . . . . . . . . . . . . . . 19
Exa 5.12 voltage across resistor and current . . . . . . 19
Exa 5.13 total current . . . . . . . . . . . . . . . . . . 19
Exa 5.14 total current . . . . . . . . . . . . . . . . . . 20
Exa 5.15 output voltage . . . . . . . . . . . . . . . . 20
Exa 5.16 waveform of voltage . . . . . . . . . . . . . 21
Exa 7.1 value of Izm . . . . . . . . . . . . . . . . . . 23
Exa 7.2 maximum power dissipation . . . . . . . . . 23
Exa 7.3 resistance of device . . . . . . . . . . . . . . 24
Exa 7.4 terminal voltage . . . . . . . . . . . . . . . . 24
Exa 7.5 tuning range . . . . . . . . . . . . . . . . . . 24
Exa 7.6 frequency of 5th harmonic . . . . . . . . . . 25
Exa 7.7 resistor . . . . . . . . . . . . . . . . . . . . . 25
Exa 7.8 minimum and maximum value of current . . 26
Exa 7.9 Imin and Imax . . . . . . . . . . . . . . . . 26
Exa 7.10 resistance and current . . . . . . . . . . . . 27
Exa 8.1 base current . . . . . . . . . . . . . . . . . . 28
Exa 8.2 current gain . . . . . . . . . . . . . . . . . . 28
Exa 8.3 base current . . . . . . . . . . . . . . . . . . 29
Exa 8.4 IC and IB . . . . . . . . . . . . . . . . . . . 29
Exa 8.5 alpha and beta . . . . . . . . . . . . . . . . 29
Exa 8.6 emitter current . . . . . . . . . . . . . . . . 30
Exa 8.7 current . . . . . . . . . . . . . . . . . . . . . 30
Exa 8.8 IB and IE . . . . . . . . . . . . . . . . . . . 30
Exa 8.9 IC and IE . . . . . . . . . . . . . . . . . . . 31
Exa 8.10 IC and IB . . . . . . . . . . . . . . . . . . . 31
Exa 8.11 beta emitter current and new value of beta . 31
Exa 8.12 collector and emitter current . . . . . . . . . 32
Exa 8.13 collector current . . . . . . . . . . . . . . . 32
Exa 9.1 PDmax . . . . . . . . . . . . . . . . . . . . 34
Exa 10.1 hybrid pi parameters . . . . . . . . . . . . . 35
Exa 11.1 drain current . . . . . . . . . . . . . . . . . 36
Exa 11.2 transconductance curve . . . . . . . . . . . . 37

6
Exa 11.4 DRAIN CURRENT AND TRANSCONDUC-
TANCE . . . . . . . . . . . . . . . . . . . . 37
Exa 11.5 value og ID . . . . . . . . . . . . . . . . . . 38
Exa 12.1 destroy the device or not . . . . . . . . . . . 39
Exa 12.2 max allowable duration . . . . . . . . . . . . 39
Exa 12.3 voltage . . . . . . . . . . . . . . . . . . . . . 40
Exa 12.4 intrinsic stand off ratio and peak point voltage 40
Exa 12.5 rB1 and rB2 . . . . . . . . . . . . . . . . . . 40
Exa 13.4 tolerance . . . . . . . . . . . . . . . . . . . . 42
Exa 13.5 coil inductance . . . . . . . . . . . . . . . . 43
Exa 13.6 coefficient of Coupling . . . . . . . . . . . . 43
Exa 13.7 Q factor of coil . . . . . . . . . . . . . . . . 43
Exa 13.8 capacitance . . . . . . . . . . . . . . . . . . 44
Exa 13.9 thickness of dielectric . . . . . . . . . . . . . 44
Exa 16.1 dc output voltage and PIV . . . . . . . . . . 45
Exa 16.2 dc load current . . . . . . . . . . . . . . . . 45
Exa 16.3 maximum and average power . . . . . . . . 46
Exa 16.4 maximum ac voltage . . . . . . . . . . . . . 47
Exa 16.5 dc output voltage . . . . . . . . . . . . . . . 47
Exa 16.6 dc output voltage and PIV and output fre-
quency . . . . . . . . . . . . . . . . . . . . . 47
Exa 16.7 dc output voltage PIV and rectification effi-
ciency . . . . . . . . . . . . . . . . . . . . . 48
Exa 16.8 load resistor dc load voltage and PIV . . . . 48
Exa 16.9 inductance . . . . . . . . . . . . . . . . . . 49
Exa 16.10 capacitance . . . . . . . . . . . . . . . . . . 49
Exa 16.11 size of capacitor . . . . . . . . . . . . . . . . 50
Exa 16.12 ripple facctor . . . . . . . . . . . . . . . . . 50
Exa 16.13 Vdc peak and average current and average
power delivered . . . . . . . . . . . . . . . . 50
Exa 17.1 angular firing required . . . . . . . . . . . . 52
Exa 17.2 power . . . . . . . . . . . . . . . . . . . . . 53
Exa 17.3 voltage . . . . . . . . . . . . . . . . . . . . . 53
Exa 17.4 resistance . . . . . . . . . . . . . . . . . . . 54
Exa 17.5 chopper duty cycle and chopping frequency 54
Exa 17.6 dc output voltage . . . . . . . . . . . . . . . 54
Exa 18.1 sturation current and cutoff voltage . . . . . 56
Exa 18.2 upper and lower ends of load line . . . . . . 57

7
Exa 18.3 base and collector current and VCE . . . . . 58
Exa 18.4 RB and VCE . . . . . . . . . . . . . . . . . 59
Exa 18.5 voltage and current . . . . . . . . . . . . . . 60
Exa 18.6 find Ic and Vce . . . . . . . . . . . . . . . . 60
Exa 18.7 load line . . . . . . . . . . . . . . . . . . . . 61
Exa 18.9 current voltage and stability factor . . . . . 63
Exa 18.10 Q point . . . . . . . . . . . . . . . . . . . . 63
Exa 18.11 IB IC AND IE . . . . . . . . . . . . . . . . 64
Exa 18.12 possible causes . . . . . . . . . . . . . . . . 64
Exa 18.13 find R1 . . . . . . . . . . . . . . . . . . . . 65
Exa 18.14 base resistance . . . . . . . . . . . . . . . . 66
Exa 18.15 dc bias current and voltage . . . . . . . . . 66
Exa 18.16 current and voltage . . . . . . . . . . . . . . 67
Exa 18.17 OPERATING POINT . . . . . . . . . . . . 67
Exa 18.18 R1 and RC . . . . . . . . . . . . . . . . . . 68
Exa 18.19 IE and VCE . . . . . . . . . . . . . . . . . . 69
Exa 18.20 base current . . . . . . . . . . . . . . . . . . 69
Exa 18.21 change in collector current . . . . . . . . . . 70
Exa 18.24 value of resistors . . . . . . . . . . . . . . . 70
Exa 18.25 CURRENT AND VOLTAGE . . . . . . . . 71
Exa 18.26 change in Q point . . . . . . . . . . . . . . . 72
Exa 18.27 VOLTAGE AND CURRENT . . . . . . . . 73
Exa 18.28 Quiescent points . . . . . . . . . . . . . . . 73
Exa 19.1 resistance and voltage gain . . . . . . . . . . 75
Exa 19.2 current and gain . . . . . . . . . . . . . . . 76
Exa 19.3 resistance and gain . . . . . . . . . . . . . . 76
Exa 19.4 voltage gain and resistance . . . . . . . . . . 77
Exa 19.5 voltage and impedance . . . . . . . . . . . . 78
Exa 19.6 output voltage and output gain . . . . . . . 79
Exa 19.7 voltage and impedance . . . . . . . . . . . . 80
Exa 19.8 Av Ri Ro and Avs . . . . . . . . . . . . . . 80
Exa 19.9 GAIN VOLTAGE AND RESISTANCE . . . 81
Exa 19.10 resistance voltage gain current gain power gain 83
Exa 19.11 VOLTAGE GAIN . . . . . . . . . . . . . . 83
Exa 19.12 resistance and voltage gain . . . . . . . . . . 84
Exa 19.13 resistance and voltage . . . . . . . . . . . . 85
Exa 20.2 Impedance voltage and current gain . . . . . 86
Exa 20.3 impedance current and voltage gain . . . . 87

8
Exa 20.4 voltage gain and resistance . . . . . . . . . . 87
Exa 20.5 resistance voltage and current gain . . . . . 88
Exa 20.6 resistance voltage and current gain . . . . . 88
Exa 20.7 resistance voltage and current gain . . . . . 89
Exa 20.8 voltage and impedance . . . . . . . . . . . . 90
Exa 20.9 resistance voltage and current gain . . . . . 91
Exa 20.10 hfb and hfc . . . . . . . . . . . . . . . . . . 91
Exa 20.11 gain and input resistance . . . . . . . . . . . 92
Exa 21.1 total voltage gain . . . . . . . . . . . . . . . 93
Exa 21.2 voltage gain and input voltage of 2nd stage 93
Exa 21.3 input resistance output resitance current and
voltage gain . . . . . . . . . . . . . . . . . . 94
Exa 21.4 voltage gain . . . . . . . . . . . . . . . . . . 95
Exa 21.5 cutoff frequency and voltage gain . . . . . . 96
Exa 21.6 individual stage gains and voltage gain . . . 96
Exa 21.7 voltage gain . . . . . . . . . . . . . . . . . . 97
Exa 21.8 collector current VCE and ac voltage gain . 98
Exa 21.9 gain emitter diode resistance . . . . . . . . . 99
Exa 22.1 vdc vgs . . . . . . . . . . . . . . . . . . . . 100
Exa 22.2 R1 . . . . . . . . . . . . . . . . . . . . . . . 100
Exa 22.3 RS and RD . . . . . . . . . . . . . . . . . . 101
Exa 22.5 RD and RS . . . . . . . . . . . . . . . . . . 102
Exa 22.6 self bias operation point . . . . . . . . . . . 102
Exa 22.7 VGS and VDS . . . . . . . . . . . . . . . . 102
Exa 22.8 voltage gain . . . . . . . . . . . . . . . . . . 103
Exa 22.9 voltage gain . . . . . . . . . . . . . . . . . . 103
Exa 22.10 voltage gain . . . . . . . . . . . . . . . . . . 104
Exa 22.11 voltage gain . . . . . . . . . . . . . . . . . . 104
Exa 22.12 voltage gain . . . . . . . . . . . . . . . . . . 105
Exa 22.13 rms output voltage . . . . . . . . . . . . . . 105
Exa 22.14 voltage gain . . . . . . . . . . . . . . . . . . 105
Exa 22.15 voltage gain . . . . . . . . . . . . . . . . . . 106
Exa 22.16 voltage gain and input output resistance . . 106
Exa 22.17 voltage gain and resistance . . . . . . . . . . 107
Exa 22.18 voltage gain and input resistance . . . . . . 107
Exa 22.19 output resistance . . . . . . . . . . . . . . . 108
Exa 22.20 input resistance and ac voltage gain . . . . . 108
Exa 23.1 voltage gain and impedance . . . . . . . . . 110

9
Exa 23.3 voltage gain . . . . . . . . . . . . . . . . . . 111
Exa 23.4 current gain . . . . . . . . . . . . . . . . . . 112
Exa 23.5 CURRENT GAIN . . . . . . . . . . . . . . 112
Exa 23.6 VE2 IE2 voltage gain . . . . . . . . . . . . . 112
Exa 23.7 zmatrix . . . . . . . . . . . . . . . . . . . . 113
Exa 23.8 dc bias currents and voltages . . . . . . . . 113
Exa 23.9 load current and output voltage . . . . . . . 114
Exa 23.10 calculate the value of constant current . . . 114
Exa 23.11 current . . . . . . . . . . . . . . . . . . . . . 115
Exa 23.12 current . . . . . . . . . . . . . . . . . . . . . 115
Exa 23.13 value of current . . . . . . . . . . . . . . . . 115
Exa 23.14 dc voltage and current . . . . . . . . . . . . 116
Exa 23.15 IC AV VO1 . . . . . . . . . . . . . . . . . . 116
Exa 23.16 common mode voltage gain . . . . . . . . . 117
Exa 24.1 power gain . . . . . . . . . . . . . . . . . . . 118
Exa 24.2 power gain . . . . . . . . . . . . . . . . . . . 118
Exa 24.3 power gain . . . . . . . . . . . . . . . . . . . 119
Exa 24.4 power gain . . . . . . . . . . . . . . . . . . . 119
Exa 24.5 gain . . . . . . . . . . . . . . . . . . . . . . 119
Exa 24.8 frequency response . . . . . . . . . . . . . . 119
Exa 24.9 FREQUENCY AND PLOT . . . . . . . . . 120
Exa 25.1 collector current and Vce . . . . . . . . . . . 123
Exa 25.2 COMPLIANCE . . . . . . . . . . . . . . . . 124
Exa 25.3 voltage gain and power gain . . . . . . . . . 124
Exa 25.4 collector efficiency and power rating of tran-
sistor . . . . . . . . . . . . . . . . . . . . . . 125
Exa 25.5 ac power . . . . . . . . . . . . . . . . . . . . 125
Exa 25.6 power dissipated . . . . . . . . . . . . . . . 125
Exa 25.7 power and efficiency . . . . . . . . . . . . . 126
Exa 25.8 resistance . . . . . . . . . . . . . . . . . . . 127
Exa 25.9 turns ratio . . . . . . . . . . . . . . . . . . . 127
Exa 25.10 max power . . . . . . . . . . . . . . . . . . 127
Exa 25.11 ac output power ICQ turns ratio . . . . . . 127
Exa 25.12 power . . . . . . . . . . . . . . . . . . . . . 128
Exa 25.13 power . . . . . . . . . . . . . . . . . . . . . 128
Exa 25.14 PinDC PoAC . . . . . . . . . . . . . . . . . 129
Exa 26.1 frequency . . . . . . . . . . . . . . . . . . . 130
Exa 26.2 frequency and impedance . . . . . . . . . . 130

10
Exa 26.3 bandwidth . . . . . . . . . . . . . . . . . . . 131
Exa 26.4 Q factor . . . . . . . . . . . . . . . . . . . . 131
Exa 26.5 Q factor . . . . . . . . . . . . . . . . . . . . 131
Exa 26.6 impedance . . . . . . . . . . . . . . . . . . . 132
Exa 27.1 voltage gain . . . . . . . . . . . . . . . . . . 133
Exa 27.2 fraction of output . . . . . . . . . . . . . . . 133
Exa 27.3 feedback . . . . . . . . . . . . . . . . . . . . 134
Exa 27.4 voltage gain and beta . . . . . . . . . . . . . 134
Exa 27.5 beta . . . . . . . . . . . . . . . . . . . . . . 134
Exa 27.6 beta . . . . . . . . . . . . . . . . . . . . . . 135
Exa 27.7 change in closed loop gain . . . . . . . . . . 135
Exa 27.8 values of AV and beta . . . . . . . . . . . . 135
Exa 27.9 gain and beta . . . . . . . . . . . . . . . . . 136
Exa 27.10 bw . . . . . . . . . . . . . . . . . . . . . . . 136
Exa 27.11 frequency . . . . . . . . . . . . . . . . . . . 137
Exa 27.12 gain and distortion gain . . . . . . . . . . . 137
Exa 27.13 beta and gain . . . . . . . . . . . . . . . . . 138
Exa 27.14 voltage gain and resistance . . . . . . . . . . 138
Exa 27.15 voltage gain and resistance . . . . . . . . . . 138
Exa 27.16 gain and resistance . . . . . . . . . . . . . . 139
Exa 28.1 inductance . . . . . . . . . . . . . . . . . . . 141
Exa 28.2 frequency . . . . . . . . . . . . . . . . . . . 141
Exa 28.3 frequency . . . . . . . . . . . . . . . . . . . 142
Exa 28.4 frequency . . . . . . . . . . . . . . . . . . . 142
Exa 28.5 frequency . . . . . . . . . . . . . . . . . . . 142
Exa 28.6 capacitance . . . . . . . . . . . . . . . . . . 143
Exa 28.7 capacitance . . . . . . . . . . . . . . . . . . 143
Exa 28.8 c1 and c2 . . . . . . . . . . . . . . . . . . . 143
Exa 28.9 gain and frequency . . . . . . . . . . . . . . 144
Exa 28.10 frequency . . . . . . . . . . . . . . . . . . . 144
Exa 28.11 inductance and frequency . . . . . . . . . . 144
Exa 28.13 frequency . . . . . . . . . . . . . . . . . . . 145
Exa 28.14 frequency . . . . . . . . . . . . . . . . . . . 145
Exa 28.15 frequency fs and fp . . . . . . . . . . . . . . 146
Exa 29.1 FREQUENCY . . . . . . . . . . . . . . . . 147
Exa 29.2 value of capacitors . . . . . . . . . . . . . . 147
Exa 29.3 value of capacitors . . . . . . . . . . . . . . 148
Exa 29.4 value of circuit components . . . . . . . . . 148

11
Exa 29.5 duty cycle . . . . . . . . . . . . . . . . . . . 149
Exa 29.6 R3 and C1 . . . . . . . . . . . . . . . . . . . 149
Exa 29.7 width . . . . . . . . . . . . . . . . . . . . . 150
Exa 29.8 value of pulse width . . . . . . . . . . . . . 150
Exa 29.9 CIRCUIT . . . . . . . . . . . . . . . . . . . 150
Exa 29.10 duty cycle . . . . . . . . . . . . . . . . . . . 151
Exa 29.11 frequency and graph . . . . . . . . . . . . . 152
Exa 29.12 design . . . . . . . . . . . . . . . . . . . . . 153
Exa 30.2 VOLTAGE . . . . . . . . . . . . . . . . . . 154
Exa 30.3 VOLTAGE . . . . . . . . . . . . . . . . . . 154
Exa 30.4 peak value of input voltage . . . . . . . . . 155
Exa 31.1 frequency . . . . . . . . . . . . . . . . . . . 156
Exa 31.2 period and frequency of oscillation and R . . 156
Exa 32.1 CMRR . . . . . . . . . . . . . . . . . . . . . 158
Exa 32.2 common mode gain . . . . . . . . . . . . . . 158
Exa 32.3 maximum frequency . . . . . . . . . . . . . 159
Exa 32.4 suitable opamps . . . . . . . . . . . . . . . . 159
Exa 32.5 value of vin . . . . . . . . . . . . . . . . . . 159
Exa 32.7 voltage . . . . . . . . . . . . . . . . . . . . . 160
Exa 32.8 output voltage . . . . . . . . . . . . . . . . 160
Exa 32.9 gain input impedance cmrr and fmax . . . . 160
Exa 32.10 Acl CMRR and maximum operating frequency 161
Exa 32.11 Acl CMRR and maximum operating frequency 161
Exa 32.12 output voltage . . . . . . . . . . . . . . . . 162
Exa 32.14 output voltage . . . . . . . . . . . . . . . . 162
Exa 33.1 value of capacitance . . . . . . . . . . . . . 164
Exa 33.2 frequency . . . . . . . . . . . . . . . . . . . 164
Exa 33.3 cutoff frequency and max operating frequency 165
Exa 33.4 frequency . . . . . . . . . . . . . . . . . . . 165
Exa 34.1 value of line regulation . . . . . . . . . . . . 166
Exa 34.2 Change in output voltage . . . . . . . . . . 166
Exa 34.3 value of load regulation . . . . . . . . . . . . 167
Exa 34.4 voltage under full load . . . . . . . . . . . . 167
Exa 34.5 magnitude of variation in output voltage . . 167
Exa 34.6 load voltage voltage drop and current . . . . 168
Exa 34.7 min and max value of input voltage . . . . . 168
Exa 34.8 min and max value of load current . . . . . 169
Exa 34.9 min and max value of zener current . . . . . 169

12
Exa 34.10 max value of Rs and power . . . . . . . . . 170
Exa 34.11 regulated resistance . . . . . . . . . . . . . . 170
Exa 34.12 min and max value of zener current . . . . . 171
Exa 34.13 zener regulator . . . . . . . . . . . . . . . . 171
Exa 34.14 regulated voltage and circuit current . . . . 172
Exa 34.15 voltage current . . . . . . . . . . . . . . . . 172
Exa 34.16 max value of Resistance and power . . . . . 173
Exa 34.17 circuit and value of current . . . . . . . . . 174
Exa 34.18 vout IL IE PI . . . . . . . . . . . . . . . . . 175
Exa 34.19 min and max value of voltage . . . . . . . . 175
Exa 34.20 regulated voltage . . . . . . . . . . . . . . . 176
Exa 34.21 regulated dc output voltage . . . . . . . . . 176

13
Chapter 3

SEMICONDUCTORS

Scilab code Exa 3.1 length of wire and current density

1 clc ;
2 // Ex3 . 1
3 R =1000;
4 sigma =5.8*10**7;
5 d =0.001;
6 // l i s l e n g t h o f t h e cu w i r e
7 l = R * sigma * %pi *( d * d /4) ; //R= l / ( s i g m a ∗ %pi ∗ ( d∗d / 4 ) )
8 disp ( ’km ’ ,l *10** -3 , ” l=” ) ;
9 E =10*10** -3;
10 J = sigma * E ; // c u r r e n t d e n s i t y
11 disp ( ’A/mˆ2 ’ ,J *1 , ” J=” ) ;

Scilab code Exa 3.2 charge density of free electrons current density current flowi

1 clc ;
2 // e x 3 . 2
3 d =2*10** -3;
4 sigma =5.8*10**7;

14
5 mu =0.0032;
6 E =20*10** -3;
7 q =1.6*10** -19;
8 n = sigma /( q * mu ) ; // s i g m a=q ∗n∗mu
9 disp ( ’ /mˆ3 ’ ,n *1 , ” n=” ) ;
10 J = sigma * E ; // c u r r e n t d e n s i t y
11 disp ( ’A/mˆ2 ’ ,J *1 , ” J=” ) ;
12 A = %pi * d * d /4; // a r e a o f c r o s s −s e c t i o n o f w i r e
13 disp ( ’mˆ2 ’ ,A *1 , ”A=” ) ;
14 I = J * A ; // c u r r e n t f l o w i n g i n t h e w i r e
15 disp ( ’A ’ ,I *1 , ” I=” ) ;
16 V = mu * E ; // e l e c t r o n d r i f t v e l o c i t y
17 disp ( ’m/ s ’ ,V *1 , ”V=” ) ; // a n s w e r p r i n t e d i n t h e book i s
wrong

Scilab code Exa 3.3 mobility and relaxation time of electrons

1 clc ;
2 // e x 3 . 3
3 p =1.54*10** -8;
4 n =5.8*10**28;
5 q =1.6*10** -19;
6 sigma =1/ p ; // p=1/ s i g m a . . c o n d u c t i v i t y
7 disp ( ’ S /m ’ , sigma *1 , ” s i g m a=” ) ;
8 mu = sigma /( q * n *10^ -2) ; // m o b i l i t y
9 disp ( ’mˆ2/ v s ’ , mu *1 , ”mu=” ) ;
10 m =9.1*10** -31;
11 t =( m * mu ) / q ; // r e l a x a t i o n t i m e
12 disp ( ’ p s ’ ,t *10^12 , ” t=” ) ;

Scilab code Exa 3.4 intrinsic conductivity

1 clc ;

15
2 // ex 3 . 4
3 mun =0.38;
4 mup =0.18;
5 n =2.5*10**19;
6 a =0.13;
7 b =0.05;
8 n2 =1.5*10**16;
9 q =1.6*10** -19;
10 sigma = q * n *( mun + mup ) ; // i n t r i n s i c c o d u c t i v i t y f o r
germanium
11 disp ( ’ ohm−muˆ−1 ’ , sigma *1 , ” s i g m a=” ) ;
12 sigma1 = q * n2 *( a + b ) ; // i n t r i n s i c c o d u c t i v i t y f o r
silicon
13 disp ( ’ ohm−mˆ−1 ’ , sigma1 *1 , ” s i g m a 1 ” ) ;

Scilab code Exa 3.5 intrinsic conductivity

1 clc ;
2 // e x 3 . 5
3 n =1.41*10**16;
4 mun =0.145;
5 mup =0.05;
6 q =1.6*10** -19;
7 // s i g m a=q ∗n ∗ ( mun+mup ) ;
8 e = q * n * mun ; // c o n t r i b u t i o n by e l e c t r o n s
9 h = q * n * mup ; // c o n t r i b u t i o n by h o l e s
10 disp ( ’ ohm−mˆ−1 ’ ,e *1 , ” e=” ) ;
11 disp ( ’ ohm−mˆ−1 ’ ,h *1 , ” h=” ) ;

Scilab code Exa 3.6 concentration of free electrons and drift velocity

1 clc ;
2 // e x 3 . 6

16
3 q =1.60*10** -19;
4 l =0.2*10** -3;
5 a =0.04*10** -6;
6 v =1;
7 i =8*10** -3;
8 mun =0.13;
9 // c o n c e n t r a t i o n o f f r e e e l e c t r o n s
10 R = v / i ; // r e s i s t a n c e
11 disp ( ’ ohm ’ ,R *1 , ”R=” ) ;
12 rho =( R * a ) / l ;
13 disp ( ’ ohm−m ’ , rho *1 , ” r h o=” ) ;
14 sigma =1/ rho ; // c o n d u c t i v i t y
15 n = sigma /( q * mun ) ; // c o n c e n t r a t i o n o f f r e e e l e c t r o n s
16 disp ( ’ /mˆ3 ’ ,n *1 , ” n=” )
17 // D r i f t v e l o c i t y
18 j=i/a;
19 disp ( ’ amp/mˆ2 ’ ,j *1 , ” j=” ) ;
20 v = j /( n * q ) ;
21 disp ( ’m/ s e c ’ ,v *1 , ” v=” ) ;

Scilab code Exa 3.7 intrinsic carrier concentration

1 clc ;
2 // e x 3 . 7
3 rho =0.47;
4 q =1.6*10** -19;
5 mun =0.39;
6 mup =0.19;
7 sigma =1/ rho ; // c o n d u c t i v i t y o f i n t r i n s i c
semiconductor
8 disp ( ’ ohm−mˆ−1 ’ , sigma *1 , ” s i g m a=” ) ;
9 n = sigma /( q *( mun + mup ) ) ; // i n t r i n s i c c a r r i e r
c o n c e n t r a t i o n o f germanium
10 disp ( ’ /mˆ3 ’ ,n *1 , ” n=” ) ;

17
Scilab code Exa 3.8 conductivity

1 clc ;
2 // e . g 3 . 8
3 ND =10**21;
4 NA =5*10**20;
5 q =1.6*10** -19;
6 mun =0.18;
7 ND1 = ND - NA ; // number o f f r e e e l e c t r o n s
8 disp ( ’ /mˆ3 ’ , ND1 *1 , ”ND1=” ) ;
9 SIGMA = ND1 * q * mun ; // c o n d u c t i v i t y o f s i l i c o n
10 disp ( ’ ohm−mˆ−1 ’ , SIGMA *1 , ”SIGMA=” ) ;

Scilab code Exa 3.9 donor concentration

1 clc ;
2 // e x 3 . 9
3 rho =100;
4 q =1.6*10** -19;
5 mun =0.36;
6 sigma =1/ rho ;
7 disp ( ’ ( ohm−m) ˆ−1 ’ , sigma *1 , ” s i g m a=” ) ;
8 ND = sigma /( q * mun ) ; // d o n a r c o n c e n t r a t i o n
9 disp ( ’ atoms /mˆ3 ’ , ND *1 , ”ND=” ) ;

Scilab code Exa 3.10 concentration of electrons and holes

1 clc ;
2 // e . g 3 . 1 0

18
3 ND =2*10**14;
4 NA =3*10**14;
5 ni =2.3*10**19;
6 n =( ni ^2) / NA ;
7 disp ( ’ e l e c t r o n s /cmˆ3 ’ ,n *1 , ” n=” ) ;
8 p =( ni ^2) / ND ;
9 disp ( ’ h o l e s /cmˆ3 ’ ,p *1 , ” p=” ) ;

Scilab code Exa 3.11 minority electron and hole density

1 clc ;
2 // e . g 3 . 1 1
3 ND =5*10**8;
4 NA =6*10**16;
5 ni =1.5*10**10;
6 n =( ni ^2) / NA ; // number o f e l e c t o n s
7 p =( ni ^2) / ND ; // number o f h o l e s
8 disp ( n *1 , ” n=” ) ;
9 disp ( p *1 , ” p=” ) ;

Scilab code Exa 3.12 length

1 clc ;
2 // e x 3 . 1 2
3 d =0.001;
4 q =1.6*10** -19;
5 ND =10**20;
6 R =1000;
7 mun =0.1;
8 n = ND ; // number o f f r e e e l e c t r o n s
9 sigma = q * n * mun ; // c o n d u c t i v i t y
10 disp ( ’ S /m ’ , sigma *1 , ” s i g m a=” ) ;
11 a =(1/ sigma ) *(1/( %pi *(0.001^2) /4) ) ;

19
12 l = R / a ;
13 disp ( ’mm’ ,l *10**3 , ” l=” ) ;

Scilab code Exa 3.13 concentration of holes and electrons

1 clc ;
2 // e x 3 . 1 3
3 sigma =100;
4 rho =0.1;
5 ni =1.5*10**10;
6 mun =1300;
7 mup =500;
8 ni1 =2.5*10**13;
9 mun1 =3800;
10 mup1 =1800;
11 q =1.602*10** -19;
12 // c o n c e n t r a t i o n o f p t y p e germanium
13 p = sigma /( q * mup1 ) ;
14 disp ( ’ /cmˆ3 ’ ,p *1 , ” p=” ) ;
15 n =( ni1 ^2) / p ;
16 disp ( ’ /cmˆ3 ’ ,n *1 , ” n=” ) ;
17 // c o n c e n t r a t i o n o f n t y p e s i l i c o n
18 n = rho /( mun * q ) ;
19 disp ( ’ /cmˆ3 ’ ,n *1 , ” n=” ) ;
20 p =( ni ^2) / n ;
21 disp ( ’ /cmˆ3 ’ ,p *1 , ” p=” ) ;

Scilab code Exa 3.14 resistivity of germanium sample

1 clc ;
2 mun =3800;
3 mup =1800;
4 ni =2.5*10**13;

20
5 Nge =4.41*10**22;
6 q =1.602*10** -19;
7 ND = Nge /10**8;
8 disp ( ’ /cmˆ3 ’ , ND *1 , ”ND=” ) ;
9 p =( ni ^2) / ND ;
10 disp ( ’ /cmˆ3 ’ ,p *1 , ” p=” ) ;
11 n = ND ;
12 sigma = q * n * mun ;
13 disp ( ’ ( ohm−cm ˆ ) −1 ’ , sigma *1 , ” s i g m a=” ) ;
14 rho =1/ sigma ;
15 disp ( ’ ohm−cm ’ , rho *1 , ” r h o=” ) ;

Scilab code Exa 3.15 resistivity of intrinsic silicon

1 clc ;
2 // e x 3 . 1 5
3 Nsi =4.96*10**22;
4 ni =1.52*10**10;
5 q =1.6*10** -19;
6 mun =1350;
7 mup =480;
8 // r e s i s t i v i t y o f i n t r i n s i c s i l i c o n
9 sigma = q * ni *( mun + mup )
10 disp ( ’ ( ohm−cm ) ˆ−1 ’ , sigma *1 , ” s i g m a=” ) ;
11 rho =1/ sigma ;
12 disp ( ’ ohm−cm ’ , rho *1 , ” r h o=” ) ;
13 // r e s i s t i v i t y o f doped s i l i c o n
14 ND = Nsi /(50*10^6) ;
15 disp ( ’ /cmˆ3 ’ , ND *1 , ”ND=” ) ;
16 n = ND ;
17 p =( ni **2) / n ;
18 disp ( ’ /cm∗∗3 ’ ,p *1 , ” p=” ) ;
19 sigma = q * n * mun ;
20 disp ( ’ ( ohm−cm ) ˆ−1 ’ , sigma *1 , ” s i g m a=” ) ;
21 rho =1/ sigma ;

21
22 disp ( ’ ohm−cm ’ , rho *1 , ” r h o=” ) ;

Scilab code Exa 3.16 conductivity of silicon

1 clc ;
2 mup =0.048;
3 mun =0.135;
4 q =1.602*10** -19;
5 Nsi =5*10**28;
6 ni =1.5*10**16;
7 sigma = q * ni *( mun + mup ) ;
8 disp ( ’ ohm−mˆ−1 ’ , sigma *1 , ” s i g m a=” ) ;
9 NA = Nsi /10**7;
10 P = NA ;
11 n = ni ^2/ P ;
12 sigma = q * P * mup ;
13 disp ( ’ ohm−mˆ−1 ’ , sigma *1 , ” s i g m a=” ) ;
14 alpha =0.05;
15 T =34 -20;
16 sigma20 =0.44*10** -3;
17 sigma34 = sigma20 *(1+ alpha * T ) ;
18 disp ( ’ ohm−mˆ−1 ’ , sigma34 *1 , ” s i g m a 3 4=” ) ;

Scilab code Exa 3.17 diffusion coefficients of holes and electrons

1 clc ;
2 // e . g 3 . 1 7
3 mun =3600;
4 mup =1700;
5 k =1.38*10**23;
6 T =300;
7 DP = mup *( T /11600) ; // a n s w e r g i v e n i n t h e book i s wrong
8 disp ( ’mˆ2/ s ’ , DP *1 , ”DP=” ) ;

22
9 Dn = mun *( T /11600) ; // a n s w e r g i v e n i n t h e book i s wrong
10 disp ( ’mˆ2/ s ’ , Dn *1 , ”Dn=” ) ;

Scilab code Exa 3.18 electron mobility

1 clc ;
2 // e . g 3 . 1 8
3 RH =160;
4 rho =0.16;
5 mun =(1/ rho ) * RH ;
6 disp ( ’ cmˆ2/ v o l t −s e c ’ , mun *1 , ”mu=” ) ;

Scilab code Exa 3.19 conduction electrons

1 clc ;
2 // e x 3 . 1 9
3 I =50;
4 B =1.2;
5 t =0.5*10** -3;
6 Vh =100;
7 q =1.6*10** -19;
8 n =( B * I ) /( Vh * q * t ) ;
9 disp ( ’ /mˆ3 ’ ,n *1 , ” n=” ) ;

Scilab code Exa 3.20 number of electrons

1 clc ;
2 rho =20*10** -2;
3 mu =100*10** -4;
4 q =1.6*10** -19;

23
5 n =1/( rho * q * mu ) ;
6 disp ( ’ /mˆ3 ’ ,n *1 , ” n=” ) ;

Scilab code Exa 3.21 mobility and density of charge carrier

1 clc ;
2 Rh =3.66*10** -4;
3 rho =8.93*10** -3;
4 mu = Rh / rho ;
5 disp ( ’mˆ2/V−s ’ , mu *1 , ”mu=” ) ;
6 q =1.6*10^ -19;
7 n =1/( q * Rh ) ;
8 disp ( ’ /mˆ3 ’ ,n *1 , ” n=” ) ;

Scilab code Exa 3.22 resistivity

1 clc ;
2 // e . g 3 . 2 2
3 rho =9*10** -3;
4 mup =0.003;
5 sigma =1/ rho ;
6 disp ( ’ S /m ’ , sigma *1 , ” s i g m a=” ) ;
7 RH = mup / sigma ;
8 disp ( ’mˆ3∗C ’ , RH *1 , ”RH=” ) ;

24
Chapter 5

PN JUNCTION DIODE

Scilab code Exa 5.1 Current

1 clc ;
2 // e . g 5 . 1
3 I0 =2*10** -7;
4 Vf =0.1;
5 I = I0 *( exp (40* Vf ) -1) ;
6 disp ( ’ uA ’ ,I *10**6 , ” I=” ) ;

Scilab code Exa 5.2 find current

1 clc ;
2 // e . g 5 . 2
3 I0 =1*10** -3;
4 Vf =0.22;
5 T =298;
6 n =1
7 VT = T /11600
8 disp ( ’mV ’ , VT *10**3 , ”VT=” ) ;
9 I = I0 *( exp ( Vf /( n * VT ) ) -1) ;
10 disp ( ’A ’ ,I *1 , ” I=” ) ;

25
Scilab code Exa 5.3 value of n

1 clc ;
2 I1 =0.5*10** -3;
3 V1 =340*10** -3;
4 I2 =15*10** -3;
5 V2 =440*10** -3;
6 kTbyq =25*10** -3;
7 a = V1 / kTbyq ;
8 b = V2 / kTbyq ;
9 // l o g ( I 1 / I 2 )==l o g ( exp ( ( b−a ) /n ) ) ;
10 n =( a - b ) /( log ( I1 / I2 ) ) ;
11 disp ( n ) ;

Scilab code Exa 5.4 saturation current

1 clc ;
2 I300 =10*10** -6;
3 T1 =300;
4 T2 =400;
5 I400 = I300 *(2^(( T2 - T1 ) /10) ) ;
6 disp ( ’mA ’ , I400 *10**3 , ” I 4 0 0=” ) ;

Scilab code Exa 5.5 value of VF for the device

1 clc ;
2 rB =2;
3 IF =12*10** -3;
4 VF =0.7+ IF * rB ;

26
5 disp ( ’V ’ , VF *1 , ”VF=” ) ;

Scilab code Exa 5.8 dc current and PDmax

1 clc ;
2 PD =0.5;
3 VF =1;
4 VBR =150;
5 IF =( PD / VF ) ;
6 disp ( ’A ’ , IF *1 , ” IF=” ) ;
7 IR =( PD / VBR ) ;
8 disp ( ’mA ’ , IR *10**3 , ” IR=” ) ;

Scilab code Exa 5.9 voltage drop and current

1 clc ;
2 R =330;
3 VS =5;
4 VD = VS ;
5 disp ( ’V ’ , VD *1 , ”VD=VS=” ) ;
6 VR =0;
7 disp ( VR , ”VR=” ) ;
8 I =0;
9 disp (I , ” I=” ) ;

Scilab code Exa 5.10 VD VR I

1 clc ;
2 VS =12;
3 R =470;

27
4 VD =0;
5 disp ( VD ) ;
6 VR = VS ;
7 disp ( ’V ’ , VR *1 , ”VR=” ) ;
8 I =( VS / R ) ;
9 disp ( ’mA ’ ,I *10**3 , ” I=” ) ;

Scilab code Exa 5.11 current

1 clc ;
2 VS =6;
3 R1 =330;
4 R2 =470;
5 VD =0.7;
6 RT = R1 + R2 ;
7 I =( VS -0.7) / RT ;
8 disp ( ’mA ’ ,I *10**3 , ” I=” ) ;

Scilab code Exa 5.12 voltage across resistor and current

1 clc ;
2 VS =5;
3 R =510;
4 VF =0.7;
5 VR = VS -0.7;
6 disp ( ’V ’ , VR *1 , ”VR=” ) ;
7 I = VR / R ;
8 disp ( ’mA ’ ,I *10**3 , ” I=” ) ;

Scilab code Exa 5.13 total current

28
1 clc ;
2 VS =6;
3 VD1 =0.7;
4 VD2 =0.7;
5 VR =1.5*10**3;
6 I =( VS - VD1 - VD2 ) / VR ;
7 disp ( ’mA ’ ,I *10**3 , ” I=” ) ;

Scilab code Exa 5.14 total current

1 clc ;
2 VS =12;
3 R1 =1.5*10**3;
4 R2 =1.8*10**3;
5 VD1 =0.7;
6 VD2 =0.7;
7 I =( VS - VD1 - VD2 ) /( R1 + R2 ) ;
8 disp ( ’mA ’ ,I *10**3 , ” I=” ) ;

Scilab code Exa 5.15 output voltage

1 clc ;
2 V1 =0;
3 V2 =0;
4 VO =0;
5 disp ( ’V ’ , VO *1 , ”VO=” ) ;
6 V1 =0;
7 V2 =5;
8 VO = V2 -0.7;
9 disp ( ’V ’ , VO *1 , ”VO=” ) ;
10 V1 =5;
11 V2 =0;
12 VO = V1 -0.7;

29
Figure 5.1: waveform of voltage

13 disp ( ’V ’ , VO *1 , ”VO=” ) ;
14 V1 =5;
15 V2 =5;
16 VO = V2 -0.7;
17 disp ( ’V ’ , VO *1 , ”VO=” ) ;

Scilab code Exa 5.16 waveform of voltage

1 clc ;
2 R =20*10**3;
3 I =( R -0.7) / R ;
4 disp ( ’mA ’ ,I *1 , ” I=” ) ;
5 rj =50;
6 rB =1;
7 re = rB + rj ;
8 R1 =( R * re ) /( re + R ) ;

30
9 disp ( R1 ) ;
10 V =10*( re /( re +1000) ) ;
11 disp ( ’mV ’ ,V *1 , ”V=” ) ;
12 i =0:0.01:6* %pi ;
13 plot ( sin ( i ) ) ;

31
Chapter 7

SPECIAL PURPOSE DIODES


AND OPTO ELECTRONIC
DEVICES

Scilab code Exa 7.1 value of Izm

1 clc ;
2 // e x 7 . 0 1
3 pzm =500*10** -3;
4 vz =6.8;
5 Izm = pzm / vz ;
6 disp ( ’mA ’ , Izm *10**3 , ” Izm=” ) ;

Scilab code Exa 7.2 maximum power dissipation

1 clc ;
2 // pg no . 117
3 pzm =500*10** -3;
4 d =3.33*10** -3;
5 a =75;

32
6 b =50;
7 Td = d *( a - b ) ;
8 disp ( ’mW’ , Td *10**3 , ”Td=” ) ;
9 pz = pzm - Td ;
10 disp ( ’mW’ , pz *10**3 , ” pz=” ) ;

Scilab code Exa 7.3 resistance of device

1 clc ;
2 // pg n0 120
3 IZ =10*10** -3;
4 vz =0.05;
5 rz = vz / IZ ;
6 disp ( ’ ohm ’ , rz *1 , ” r z=” ) ;

Scilab code Exa 7.4 terminal voltage

1 clc ;
2 Vz =4.7;
3 rz =15;
4 Iz =20*10** -3;
5 VZ1 = Vz +( rz * Iz ) ;
6 disp ( ’V ’ , VZ1 *1 , ”VZ1=” ) ;

Scilab code Exa 7.5 tuning range

1 clc ;
2 // e . g7 . 5
3 C1 =5*10** -12; // min
4 C2 =5*10** -12; // min

33
5 L =10*10** -3;
6 CT =( C1 * C2 ) /( C1 + C2 ) ; //CTmax
7 disp ( ’ F ’ , CT *1 , ”CT=” ) ;
8 fo =1/(2* %pi * sqrt ( L * CT ) ) ;
9 disp ( ’MHZ ’ , fo *10** -6 , ” f o=” ) ;
10 C1 =50*10** -12; //max
11 C2 =50*10** -12; //max
12 CT =( C1 * C2 ) /( C1 + C2 ) ; //CTmin
13 disp ( ’ F ’ , CT *1 , ”CT=” ) ;
14 fo =1/(2* %pi * sqrt ( L * CT ) ) ;
15 disp ( ’ kHZ ’ , fo *10** -3 , ” f o=” ) ;

Scilab code Exa 7.6 frequency of 5th harmonic

1 clc ;
2 // e . g 7 . 6
3 T =0.04*10** -6;
4 f =1/ T ;
5 disp ( ’MHz ’ ,f *10** -6 , ” f=” ) ;
6 disp ( ’MHz ’ ,f *5*10** -6 , ” f=” ) ; // f r e q u e n c y o f 5 t h
harmonic

Scilab code Exa 7.7 resistor

1 clc ;
2 // e . g 7 . 7
3 Vs =8;
4 VDmin =1.8;
5 VDmax =2;
6 Ifmax =16*10** -3;
7 Rs =( Vs - VDmin ) / Ifmax ;
8 disp ( ’ ohm ’ , Rs *1 , ” Rs=” ) ;
9 Rsmax =( Vs - VDmax ) / Ifmax ;

34
10 disp ( ’ ohm ’ , Rsmax *1 , ”Rsmax=” ) ;

Scilab code Exa 7.8 minimum and maximum value of current

1 clc ;
2 // e . g 7 . 8
3 VDmin =1.5;
4 VDmax =2.3;
5 Vs =10;
6 R1 =470;
7 Imax =( Vs - VDmin ) / R1 ;
8 disp ( ’mA ’ , Imax *10**3 , ” Imax=” ) ;
9 Imin =( Vs - VDmax ) / R1 ;
10 disp ( ’mA ’ , Imin *10**3 , ” Imin=” )

Scilab code Exa 7.9 Imin and Imax

1 clc ;
2
3 // e . g 7 . 9
4 VDmin =1.8;
5 VDmax =3;
6 Vs1 =24;
7 Rs1 =820;
8 Vs2 =5;
9 Rs2 =120;
10 Imin =( Vs2 - VDmax ) / Rs2 ;
11 disp ( ’mA ’ , Imin *10**3 , ” Imin=” ) ;
12 Imax =( Vs1 - VDmin ) / Rs1 ;
13 disp ( ’mA ’ , Imax *10**3 , ” Imax=” ) ;
14 Imin =( Vs2 - VDmax ) / Rs2 ;
15 disp ( ’mA ’ , Imin *10**3 , ” Imin=” ) ;
16 Imax =( Vs2 - VDmin ) / Rs2 ;

35
17 disp ( ’mA ’ , Imax *10**3 , ” Imax=” ) ;

Scilab code Exa 7.10 resistance and current

1 clc ;
2 r =1*10**3;
3 I =10*10** -3;
4 V =30;
5 // I =30/(R+r )
6 R =( V / I ) -r ; // when d a r k
7 disp ( ’Kohm ’ ,R *10** -3 , ”R=” ) ;
8 R =100*10**3; // when i l l u m i n a t e d
9 Id =( V /( r + R ) ) ;
10 disp ( ’mA ’ , Id *10**3 , ” I d=” ) ;

36
Chapter 8

BIPOLAR JUNCTION
TRANSISTORS

Scilab code Exa 8.1 base current

1 clc ;
2 // e . g 8 . 1
3 Ie =10*10** -3;
4 Ic =9.8*10** -3;
5 // I e=I b+I c
6 Ib = Ie - Ic ;
7 disp ( ’mA ’ , Ib *10**3 , ” I b=” ) ;

Scilab code Exa 8.2 current gain

1 clc ;
2 // e . g 8 . 2
3 Ie =6.28*10** -3;
4 Ic =6.20*10** -3;
5 a = Ic / Ie ;
6 disp ( a ) ;

37
Scilab code Exa 8.3 base current

1 clc ;
2 // e . g8 . 3
3 a =0.967;
4 Ie =10*10** -3;
5 Ic = Ie * a ; // a=I c / I e
6 disp ( ’mA ’ , Ic *10**3 , ” I c=” ) ;
7 Ib = Ie - Ic ;
8 disp ( ’mA ’ , Ib *10**3 , ” I b=” ) ;

Scilab code Exa 8.4 IC and IB

1 clc ;
2 // e . g 8 . 4
3 Ie =10*10** -3;
4 alpha =0.987;
5 Ic = Ie * alpha ; // a l p h a=I c / I e
6 disp ( ’mA ’ , Ic *10**3 , ” I c=” ) ;
7 Ib = Ie - Ic ;
8 disp ( ’mA ’ , Ib *10**3 , ” I b=” ) ;

Scilab code Exa 8.5 alpha and beta

1 clc ;
2 // e . g 8 . 5
3 alpha =0.975;
4 beta =200;
5 beta =( alpha /(1 - alpha ) ) ;

38
6 disp ( beta ) ;
7 alpha =( beta /(1+ beta ) ) ;
8 disp ( alpha ) ;

Scilab code Exa 8.6 emitter current

1 clc ;
2 // e . g 8 . 6
3 BETA =100;
4 IC =40*10** -3;
5 IB = IC / BETA ;
6 IE = IC + IB ;
7 disp ( ’mA ’ , IE *10**3 , ” IE=” ) ;

Scilab code Exa 8.7 current

1 clc ;
2 // e . g 8 . 7
3 beta =150;
4 Ie =10*10** -3;
5 alpha = beta /(1+ beta )
6 Ic = alpha * Ie ; // a s a l p h a =( I c / I e )
7 disp ( ’mA ’ , Ic *10**3 , ” I c=” ) ;
8 Ib = Ie - Ic ; // a s I e=I b+I c
9 disp ( ’mA ’ , Ib *10**3 , ” I b=” ) ;

Scilab code Exa 8.8 IB and IE

1 clc ;
2 // e . g 8 . 8

39
3 beta =170;
4 Ic =80*10** -3;
5 Ib = Ic / beta ; // b e t a =( I c / I b )
6 disp ( ’mA ’ , Ib *10**3 , ” I b=” ) ;
7 Ie = Ic + Ib ;
8 disp ( ’mA ’ , Ie *10**3 , ” I e=” ) ;

Scilab code Exa 8.9 IC and IE

1 clc ;
2 // e . g 8 . 9
3 Ib =125*10** -6;
4 beta =200;
5 Ic = beta * Ib ;
6 disp ( ’mA ’ , Ic *10**3 , ” I c=” ) ;
7 Ie = Ib + Ic ;
8 disp ( ’mA ’ , Ie *10**3 , ” I e=” ) ;

Scilab code Exa 8.10 IC and IB

1 clc ;
2 // e . g 8 . 1 0
3 Ie =12*10** -3;
4 beta =140;
5 Ib = Ie /(1+ beta ) ;
6 disp ( ’mA ’ , Ib *10**3 , ” I b=” ) ;
7 Ic = Ie - Ib ;
8 disp ( ’mA ’ , Ic *10**3 , ” I c=” ) ;

Scilab code Exa 8.11 beta emitter current and new value of beta

40
1 clc ;
2 IB =105*10** -6;
3 IC =2.05*10** -3;
4 BETA = IC / IB ;
5 disp ( BETA ) ;
6 ALPHA = BETA /(1+ BETA ) ;
7 disp ( ALPHA ) ;
8 IE = IC + IB ;
9 disp ( ’mA ’ , IE *10**3 , ” IE=” ) ;
10 DELTA_IB =27*10** -6;
11 DELTA_IC =0.65*10** -3;
12 IBn = IB + DELTA_IB ;
13 ICn = IC + DELTA_IC ;
14 BETAn = ICn / IBn ;
15 disp ( BETAn ) ;

Scilab code Exa 8.12 collector and emitter current

1 clc ;
2 // e . g 8 . 1 2
3 alpha =0.98;
4 Ico =5*10** -6;
5 Ib =100*10** -6;
6 Ic =(( alpha * Ib ) /(1 - alpha ) ) +( Ico /(1 - alpha ) ) ;
7 disp ( ’mA ’ , Ic *10**3 , ” I c=” ) ;
8 Ie = Ib + Ic ;
9 disp ( ’mA ’ , Ie *10**3 , ” I e=” ) ;

Scilab code Exa 8.13 collector current

1 clc ;
2 // e . g 8 . 1 3
3 Icbo =10*10** -6;

41
4 beta =50;
5 // V a l u e o f c o l l e c t o r c u r r e n t when I b =0 .25 ∗ 10 ∗∗ − 3;
6 Ib =0.25*10** -3;
7 Ic =( beta * Ib ) +(1+ beta ) * Icbo ;
8 disp ( ’mA ’ , Ic *10**3 , ” I c=” ) ;
9 // V a l u e o f new c o l l e c t o r c u r r e n t i f t e m p e r a t u r e
r i s e s t o 50 d e g r e e
10 t1 =27;
11 t2 =50;
12 Icbo50 = Icbo *2^(( t2 - t1 ) /10) ;
13 disp ( ’ microA ’ , Icbo50 *10**6 , ” I c b o 5 0=” ) ;
14 // c o l l e c t o r c u r r e n t a t 50 d e g r e e
15 Ic = beta * Ib +(1+ beta ) * Icbo50 ;
16 disp ( ’mA ’ , Ic *10**3 , ” I c=” ) ;

42
Chapter 9

BJT CHARACTERISTICS

Scilab code Exa 9.1 PDmax

1 clc ;
2 // e . g 9 . 1
3 Pdmax =500*10** -3;
4 DF =2.28*10** -3;
5 T =70;
6 Pdmax70 = Pdmax - DF *( T -25) ;
7 disp ( ’w ’ , Pdmax70 *1 , ” Pdmax70=” ) ;

43
Chapter 10

BJT LOW AND HIGH


FREQUENCY MODELS

Scilab code Exa 10.1 hybrid pi parameters

1 clc ;
2 // e . g 1 0 . 1
3 Ic =10;
4 Vce =10;
5 hie =500;
6 hoe =10** -5;
7 hfe =100;
8 hre =10** -4;
9 gm = Ic /25;
10 disp ( ’ ohm ’ , gm *1 , ”gm=” ) ;
11 rbe = hfe / gm ;
12 disp ( ’ ohm ’ , rbe *1 , ” r b e=” ) ;
13 rbb = hie - rbe ;
14 disp ( rbb ) ;
15 gbc = hre / rbe ;
16 disp ( ’ ∗10ˆ −7 ’ , gbc *10**7 , ” gbc=” ) ;
17 rce = -1/(( hoe -(1+ hfe ) * gbc ) ) ;
18 disp ( ’ kohm ’ , rce *10** -3 , ” r c e=” ) ;

44
Chapter 11

BJT LOW AND HIGH


FREQUENCY MODELS

Scilab code Exa 11.1 drain current

1 clc
2 // e . g 1 1 . 1
3 Idss =15*10** -3;
4 Vgso = -5;
5 // I d=I d s s ∗(1 −( Vgs / Vgso ) ) ˆ2
6 Vgs =0;
7 Id = Idss *(1 -( Vgs / Vgso ) ) ^2;
8 disp ( ’mA ’ , Id *10**3 , ” I d=” ) ;
9 Vgs1 = -1;
10 Id = Idss *(1 -( Vgs1 / Vgso ) ) ^2;
11 disp ( ’mA ’ , Id *10**3 , ” I d=” ) ;
12 Vgs2 = -4;
13 Id = Idss *(1 -( Vgs2 / Vgso ) ) ^2;
14 disp ( ’mA ’ , Id *10**3 , ” I d=” ) ;

45
Figure 11.1: transconductance curve

Scilab code Exa 11.2 transconductance curve

1 clc ;
2 Vgs = -5: -5: -20; // I d=I d s s ∗(1 −( Vgs / Vgso ) ) ˆ2
3 Vgso = -20;
4 Idss =12*10** -3;
5 Id = Idss *(1 -( Vgs / Vgso ) ) ^2;
6 disp ( ’mA ’ , Id *10**3 , ” I d=” ) ;
7 y =0:1:12;
8 x =0: -5: -20;
9 a = gca () // g e t t h e c u r r e n t a x e s
10 a . box = ” o f f ” ;
11 a . y_location = ” r i g h t ” ;
12 plot2d ( Vgs , Id ) ;
13 xlabel ( ” Gate−to −s o u r c e v o l t a g e (VGS) ” ) ;
14 ylabel ( ” D r a i n c u r r e n t ID (mA) ” ) ;

Scilab code Exa 11.4 DRAIN CURRENT AND TRANSCONDUCTANCE

46
1 clc ;
2 // e . g 1 1 . 4
3 Idss =20*10** -3;
4 vp = -8;
5 gmo =5000*10** -6;
6 vgs = -4;
7 // I d=I d s s ∗(1 −( Vgs / Vgso ) ) ˆ2
8 Id = Idss *(1 -( vgs / vp ) ) ^2;
9 disp ( ’mA ’ , Id *10**3 , ” I d=” ) ;
10 gm = gmo *(1 -( vgs / vp ) ) ;
11 disp ( ’ m i c r o s e c ’ , gm *10**6 , ”gm=” ) ;

Scilab code Exa 11.5 value og ID

1 clc ;
2 // e . g 1 1 . 5
3 Idon =10*10** -3;
4 vgs = -12;
5 vgsth = -3;
6 // I d=K∗ ( vgs −v g s t h ) ˆ2
7 // I d o n=K∗ ( vgs −v g s t h ) ˆ2
8 k = Idon /(( vgs - vgsth ) ^2) ;
9 disp ( ’mA ’ ,k *10**3 , ” k=” ) ;
10 vgs1 = -6;
11 Idon = k *( vgs1 - vgsth ) ^2;
12 disp ( ’mA ’ , Idon *10**3 , ” I d o n=” ) ;

47
Chapter 12

THYRISTORS

Scilab code Exa 12.1 destroy the device or not

1 clc ;
2 // e . g 1 2 . 1
3 I =40;
4 t =15*10** -3;
5 SCR =( I ^2) * t ;
6 disp ( ’Aˆ2 s ’ , SCR *1 , ”SCR=” ) ;

Scilab code Exa 12.2 max allowable duration

1 clc ;
2 // e . g 1 2 . 2
3 a =75;
4 Is =100;
5 tmax = a / Is **2;
6 disp ( ’ ms ’ , tmax *10**3 , ” tmax=” ) ;

48
Scilab code Exa 12.3 voltage

1 clc ;
2 // e . g 1 2 . 3
3 VD =0.7;
4 n =0.75;
5 Vbb =12;
6 Vp = n * Vbb + VD ;
7 disp ( ’V ’ , Vp *1 , ”Vp=” ) ;

Scilab code Exa 12.4 intrinsic stand off ratio and peak point voltage

1
2 clc ;
3 // e . g 1 2 . 4
4 rb1 =4*10**3;
5 rb2 =2.5*10**3;
6 Vbb =15;
7 Vd =0.7;
8 n = rb1 /( rb1 + rb2 ) ;
9 disp (n , ” n=” ) ; // i n t r i n s i c s t a n d o f f r a t i o
10 Vp = n * Vbb + Vd ;
11 disp ( ’V ’ , Vp *1 , ”Vp=” ) ; // peak p o i n t v o l t a g e

Scilab code Exa 12.5 rB1 and rB2

1 clc ;
2 // e . g 1 2 . 5
3 n =0.60;
4 rbb =7*10**3;
5 rb1 = rbb * n ;
6 disp ( ’ kohm ’ , rb1 *10** -3 , ” r b 1=” ) ;
7 rb2 = rbb - rb1 ;

49
8 disp ( ’ kohm ’ , rb2 *10** -3 , ” r b 2=” ) ;

50
Chapter 13

PASSIVE CIRCUITS
DEVICES

Scilab code Exa 13.4 tolerance

1 clc ;
2 R1min =2.7;
3 R2min =5.1;
4 Rmin = R1min + R2min ;
5 R1max =3.3;
6 R2max =6.9;
7 Rmax = R1max + R2max ;
8 a =9 - Rmin ;
9 b = Rmax -9;
10 tolerance = b /9;
11 Reqmin =( R1min * R2min ) /( R1min + R2min ) ;
12 disp ( ’ ohm ’ , Reqmin *1 , ” Reqmin=” ) ;
13 Reqmax =( R1max * R2max ) /( R1max + R2max ) ;
14 disp ( ’ ohm ’ , Reqmax *1 , ”Reqmax=” ) ;
15 R1N =3;
16 R2N =6;
17 Req =( R1N * R2N ) /( R1N + R2N ) ;
18 disp ( ’ ohm ’ , Req *1 , ” Req=” ) ;
19 minval = Reqmin ;

51
20 maxval = Reqmax ;
21 maxchng =0.235;
22 t =( maxchng /2) *100;
23 disp ( ’% ’ ,t *1 , ” t=” ) ;

Scilab code Exa 13.5 coil inductance

1 clc ;
2 // e . g 1 3 . 5
3 N =150;
4 mur =3540;
5 mu0 =4* %pi *10** -7;
6 l =0.05;
7 A =5*10** -4;
8 L =( mur * mu0 * A * N * N ) / l ;
9 disp ( ’H ’ ,L *1 , ”L=” ) ;

Scilab code Exa 13.6 coefficient of Coupling

1 clc ;
2 // e . g 1 3 . 6
3 L1 =40*10** -6;
4 L2 =80*10** -6;
5 M =11.3*10** -6;
6 k = M / sqrt ( L1 * L2 ) ;
7 disp ( k ) ;

Scilab code Exa 13.7 Q factor of coil

1 clc ;

52
2 // e . g 1 3 . 7
3 Q =90;
4 L =15*10** -6;
5 f =10*10**6;
6 R0 =(2* %pi * f * L ) / Q ;
7 disp ( ’ ohm ’ , R0 *1 , ”R0=” ) ;

Scilab code Exa 13.8 capacitance

1 clc ;
2 // e . g 1 3 . 8
3 A =0.04;
4 d =0.02;
5 e0 =8.85*10** -12;
6 er =5.0;
7 C =( e0 * er * A ) / d ;
8 disp ( ’ pF ’ ,C *10**12 , ”C=” ) ; // a n s w e r p r i n t e d i n t h e
book i s wrong .

Scilab code Exa 13.9 thickness of dielectric

1 clc ;
2 // e . g 1 3 . 9
3 A =0.2;
4 C =0.428*10** -6;
5 e0 =8.85*10** -12;
6 er =1200;
7 d =( e0 * er * A ) / C ; // a n s p r i n t e d i n t h e book i s wrong
8 disp ( ’mm’ ,d *10**3 , ” d=” ) ;

53
Chapter 16

PN JUNCTION DIODE
APPLICATIONS
RECTIFIERS AND FILTERS

Scilab code Exa 16.1 dc output voltage and PIV

1 clc ;
2 // e . g 1 6 . 1
3 V1 =230;
4 // a=(N2/N1 )
5 b =(1/10) ;
6 V2 = V1 * b ;
7 disp ( ’V ’ , V2 *1 , ”V2=” ) ;
8 Vm = sqrt (2) * V2 ;
9 disp ( ’V ’ , Vm *1 , ”Vm=” ) ;
10 Vdc =0.318* Vm ;
11 disp ( ’V ’ , Vdc *1 , ”Vdc=” ) ;
12 PIV = Vm ;
13 disp ( ’V ’ , PIV *1 , ”PIV=” ) ;

54
Scilab code Exa 16.2 dc load current

1 clc ;
2 // e . g 1 6 . 2
3 RL =20*10**3;
4 V2 =24;
5 Vm = sqrt (2) * V2 ;
6 disp ( ’V ’ , Vm *1 , ”Vm=” ) ;
7 Im = Vm / RL ;
8 disp ( ’mA ’ , Im *10**3 , ”Im=” ) ;
9 Idc = 0.318* Im ;
10 disp ( ’mA ’ , Idc *10**3 , ” I d c=” ) ;

Scilab code Exa 16.3 maximum and average power

1 clc ;
2 // e . g 1 6 . 3
3 V1 =230;
4 // a=(N2/N1 )
5 b =(1/2) ;
6 RL =200;
7 V2 = V1 * b ;
8 disp ( ’V ’ , V2 *1 , ”V2=” ) ;
9 Vm = sqrt (2) * V2 ;
10 disp ( ’V ’ , Vm *1 , ”Vm=” ) ;
11 Im = Vm / RL ;
12 disp ( ’A ’ , Im *1 , ”Im=” ) ;
13 Pm =( Im **2) * RL ;
14 disp ( ’W’ , Pm *1 , ”Pm=” ) ;
15 Vdc =0.318* Vm ;
16 disp ( ’V ’ , Vdc *1 , ”Vdc=” ) ;
17 Idc =( Vdc / RL ) ;
18 disp ( ’A ’ , Idc *1 , ” I d c=” ) ;
19 Pdc =( Idc **2) * RL ;
20 disp ( ’W’ , Pdc *1 , ” Pdc=” ) ;

55
Scilab code Exa 16.4 maximum ac voltage

1 clc ;
2 // e . g 1 6 . 4
3 Vdc =30;
4 RL =600;
5 Rf =25;
6 Idc =( Vdc / RL ) ;
7 disp ( ’A ’ , Idc *1 , ” I d c=” ) ;
8 Im = %pi * Idc ;
9 disp ( ’A ’ , Im *1 , ”Im=” ) ;
10 Vin = Im *( Rf + RL ) ;
11 disp ( ’V ’ , Vin *1 , ” Vin=” ) ;

Scilab code Exa 16.5 dc output voltage

1
2 clc ;
3 V2 =30;
4 RL =5.1*10**3;
5 VS = V2 /2;
6 Vm = sqrt (2) * VS ;
7 Vdc =0.636* Vm ;
8 disp ( ’V ’ , Vdc *1 , ”Vdc=” ) ;
9 Vdc = Vdc / RL ;
10 disp ( ’mA ’ , Vdc *10**3 , ”Vdc=” ) ;

Scilab code Exa 16.6 dc output voltage and PIV and output frequency

56
1 clc ;
2 V1 =230;
3 fin =50;
4 // l e t a=N1/N2
5 a =1/4;
6 V2 = V1 * a ;
7 Vm = sqrt (2) * V2 ;
8 Vdc =0.636* Vm ;
9 disp ( ’V ’ , Vdc *1 , ”Vdc=” ) ;
10 PIV = Vm ;
11 disp ( ’V ’ , PIV *1 , ”PIV=” ) ;
12 fout =2* fin ;
13 disp ( ’HZ ’ , fout *1 , ” f o u t=” ) ;

Scilab code Exa 16.7 dc output voltage PIV and rectification efficiency

1 clc ;
2 V1 =230;
3 //LET a=N2/N1
4 a =1/5;
5 RL =100;
6 V2 = V1 * a ;
7 Vs = V2 /2;
8 Vm = sqrt (2) * Vs ;
9 Vdc =2* Vm / %pi ;
10 disp ( ’V ’ , Vdc *1 , ”Vdc=” ) ;
11 PIV =2* Vm ;
12 disp ( ’V ’ , PIV *1 , ”PIV=” ) ;
13 n =0.812 // r e c t i f i e r e f f i c i e n c y o f f u l l wave r e c t i f i e r

Scilab code Exa 16.8 load resistor dc load voltage and PIV

1 clc ;

57
2 Vs =200;
3 Imax =700*10** -3;
4 Iavg =250*10** -3;
5 Imax =0.8* Imax ;
6 disp ( ’mA ’ , Imax *10**3 , ” Imax=” ) ;
7 Vm = sqrt (2) * Vs ;
8 RL = Vm / Imax ;
9 disp ( ’ ohm ’ , RL *1 , ”RL=” ) ;
10 Vdc =2* Vm / %pi ;
11 disp ( ’V ’ , Vdc *1 , ”Vdc=” ) ;
12 Idc = Vdc / RL ;
13 disp ( ’A ’ , Idc *1 , ” I d c=” ) ;
14 PIV =2* Vm ;
15 disp ( PIV ) ;

Scilab code Exa 16.9 inductance

1 clc ;
2 f =50;
3 y =0.05;
4 RL =100;
5 L = RL /( y *3* sqrt (2) *2* %pi * f ) ;
6 disp ( ’H ’ ,L *1 , ”L=” ) ;
7 f =400;
8 y =0.05;
9 L = RL /( y *3* sqrt (2) *2* %pi * f ) ;
10 disp ( ’H ’ ,L *1 , ”L=” ) ;

Scilab code Exa 16.10 capacitance

1 clc ;
2 Vdc =30;
3 RL =1*10**3;

58
4 y =0.01;
5 C =2890/( y * RL ) ;
6 disp ( ’ microF ’ ,C *1 , ”C=” ) ;

Scilab code Exa 16.11 size of capacitor

1 clc ;
2 Vdc =12;
3 Idc =100*10** -3;
4 y =0.01;
5 L =1;
6 C =1.195/( L * y ) ;
7 disp ( ’ microF ’ ,C *1 , ”C=” ) ;

Scilab code Exa 16.12 ripple facctor

1 clc ;
2 Idc =0.2;
3 Vdc =30;
4 C1 =100;
5 C2 =100;
6 L =5;
7 f =50;
8 RL = Vdc / Idc ;
9 y =5700/( L * C1 * C2 * RL ) ;
10 disp ( ’% ’ ,y *100 , ” y=” ) ;

Scilab code Exa 16.13 Vdc peak and average current and average power delivered

1 clc ;

59
2 Vs =150;
3 Idc =2;
4 Vdc =2.34* Vs ;
5 disp ( ’V ’ , Vdc *1 , ”Vdc=” ) ;
6 I = Idc /0.955;
7 disp ( ’A ’ ,I *1 , ” I=” ) ;
8 Iavg =2/3;
9 disp ( ’A ’ , Iavg *1 , ” I a v g=” ) ;
10 Pdc = Vdc * Idc ;
11 disp ( ’W’ , Pdc *1 , ” Pdc=” ) ;

60
Chapter 17

CONTROLLED RECTIFIERS

Scilab code Exa 17.1 angular firing required

1 clc ;
2 // e . g 1 7 . 1
3 RL =100;
4 Vm =300;
5 // l o a d power P= Vdc∗ I d c
6 a =( Vm /(2* %pi ) ) ^2*(1/ RL ) ;
7 disp ( a ) ;
8 p =25;
9 //1+ c o s b=s g r t ( 2 5 / a )
10 b = a *1+ cos ( sqrt ( p / a ) ) ;
11 cosalpha =( sqrt ( p / a ) ) -1;
12 disp ( cosalpha ) ;
13 p =80;
14 cosalpha =( sqrt ( p / a ) ) -1;
15 disp ( cosalpha , ” c o s a l p h a=” ) ;
16 // o r ;
17 alpha = acosd ( cosalpha ) ;
18 disp ( ’ d e g r e e ’ , alpha , ” a l p h a=” ) ;

61
Scilab code Exa 17.2 power

1 clc ;
2 // e . g 1 7 . 2
3 vm =200;
4 Rl =1*10**3;
5 //ALPHA=0 d e g r e e
6 Vdc = vm *0.318;
7 Idc = Vdc / Rl ;
8 P = Vdc * Idc ;
9 disp ( ’mW’ ,P *10**3 , ”P=” ) ; ”OR” ; disp ( ’W’ ,P *1 , ”P=” ) ;
10 // a l p h a =45 d e g r e e
11 Vdc = vm *0.27;
12 Idc = Vdc / Rl ;
13 P = Vdc * Idc ;
14 disp ( ’mW’ ,P *10**3 , ”P=” ) ; ”OR” ; disp ( ’W’ ,P *1 , ”P=” ) ;
15 // a l p h a =90 d e g r e e
16 Vdc = vm *0.159;
17 Idc = Vdc / Rl ;
18 P = Vdc * Idc ;
19 disp ( ’mW’ ,P *10**3 , ”P=” ) ; ”OR” ; disp ( ’W’ ,P *1 , ”P=” ) ;
20 // a l p h a =135 d e g r e e
21 Vdc = vm *0.04660;
22 Idc = Vdc / Rl ;
23 P = Vdc * Idc ;
24 disp ( ’mW’ ,P *10**3 , ”P=” ) ; ”OR” ;

Scilab code Exa 17.3 voltage

1 clc ;
2 // e . g 1 7 . 3
3 Vrms =220;
4 a =60;
5 Vm = sqrt (2) * Vrms ;
6 disp ( ’V ’ , Vm *1 , ”Vm=” ) ;

62
7 Vdc =( Vm /(2* %pi ) ) *(1+ cosd (60) ) ;
8 disp ( ’V ’ , Vdc *1 , ”Vdc=” ) ;

Scilab code Exa 17.4 resistance

1 clc ;
2 // e . g 1 7 . 4
3 Vrms =100;
4 a =45;
5 Idc =0.5;
6 Vm = sqrt (2) * Vrms ;
7 disp ( ’V ’ , Vm *1 , ”Vm=” ) ;
8 // I d c =(Vm/ ( 2 ∗ %pi ∗RL) ) ∗(1+ c o s d ( a ) ) ;
9 RL =( Vm /(2* %pi * Idc ) ) *(1+ cosd ( a ) ) ;
10 disp ( ’ ohm ’ , RL *1 , ”RL=” ) ;

Scilab code Exa 17.5 chopper duty cycle and chopping frequency

1 clc ;
2 // e . g 1 7 . 5
3 Ton =30*10** -6;
4 Toff =10*10** -6;
5 // c o n s i d e r duty c y c l e=a
6 a = Ton /( Ton + Toff ) ;
7 disp ( a ) ;
8 f =(1/( Ton + Toff ) )
9 disp ( ’ kHZ ’ ,f *10** -3 , ” f=” ) ;

Scilab code Exa 17.6 dc output voltage

63
1 clc ;
2 // e . g 1 7 . 6
3 Ton =30*10** -3;
4 Toff =10*10** -3;
5 Vdc =200;
6 a = Ton /( Ton + Toff ) ;
7 disp ( a ) ;
8 Vl = Vdc * a ;
9 disp ( ’V ’ , Vl *1 , ” Vl=” ) ;

64
Chapter 18

BJT BIASING AND


STABILISATION

Scilab code Exa 18.1 sturation current and cutoff voltage

1
2 clc ;
3 // e . g 1 8 . 1
4 Vbb =10;
5 Rb =47*10**3;
6 Vcc =20;
7 Rc =10*10**3;
8 B =100;
9 Ic = Vcc / Rc ; // s a t u r a t i o n c u r r e n t
10 disp ( ’mA ’ , Ic *10**3 , ” I c=” ) ;
11 Vce = Vcc ; // cut − o f f v o l t a g e
12 disp ( ’V ’ , Vce *1 , ” Vce=” ) ;
13 i =2: -0.1:0;
14 plot2d ( i ) ;
15 a = gca () // g e t t h e c u r r e n t a x e s
16 a . box = ” o f f ” ;
17 xlabel ( ”VCE” ) ;

65
Figure 18.1: sturation current and cutoff voltage

18 ylabel ( ” IC ” ) ;

Scilab code Exa 18.2 upper and lower ends of load line

1
2 clc ;
3 // e . g 1 8 . 2
4 Vbb =10;
5 Rb =50*10**3;
6 Vcc =20;
7 Rc =300;
8 beta =200;
9 Ic = Vcc / Rc ; // s a t u r a t i o n c u r r e n t

66
Figure 18.2: upper and lower ends of load line

10 disp ( ’mA ’ , Ic *10**3 , ” I c=” ) ;


11 Vce = Vcc ; // cut − o f f v o l t a g e
12 disp ( ’V ’ , Vce *1 , ” Vce=” ) ;
13 Ib =( Vbb -0.7) / Rb ;
14 disp ( ’ 10ˆ −3A ’ , Ib *10**3 , ” I b=” ) ;
15 Ic = beta * Ib ;
16 disp ( ’ 10ˆ −3A ’ , Ic *10**3 , ” I c=” ) ;
17 Vce = Vcc - Ic * Rc ;
18 disp ( ’V ’ , Vce *1 , ” Vce=” ) ;
19 i =21: -0.1:0;
20 plot2d ( i ) ;
21 a = gca () // g e t t h e c u r r e n t a x e s
22 a . box = ” o f f ” ;
23 xlabel ( ”VCE” ) ;
24 ylabel ( ” IC ” ) ;

Scilab code Exa 18.3 base and collector current and VCE

67
1
2 clc ;
3 // e . g 1 8 . 3
4 Rb =180*10**3;
5 Vcc =25;
6 Rc =820;
7 beta =80;
8 Ib = Vcc / Rb ; // s a t u r a t i o n c u r r e n t
9 disp ( ’mA ’ , Ib *10**3 , ” I b=” ) ;
10 Ic = beta * Ib ;
11 disp ( ’mA ’ , Ic *10**3 , ” I c=” ) ;
12 Vce = Vcc -( Ic * Rc ) ; // cut − o f f v o l t a g e
13 disp ( ’V ’ , Vce *1 , ” Vce=” ) ;

Scilab code Exa 18.4 RB and VCE

1
2 clc ;
3 // e . g 1 8 . 4 ;
4 Vcc =12;
5 Rc =330;
6 Ib =0.3*10** -3;
7 beta =100;
8 // I b=Vcc /Rb ; / / s a t u r a t i o n c u r r e n t
9 Rb = Vcc / Ib ;
10 disp ( ’Kohm ’ , Rb *10** -3 , ”Rb=” ) ;
11 S =1+ beta ;
12 disp ( S ) ;
13 Ic = beta * Ib ;
14 disp ( ’ 10ˆ −3A ’ , Ic *10**3 , ” I c=” ) ;
15 Vce = Vcc -( Ic * Rc ) ; // cut − o f f v o l t a g e
16 disp ( ’V ’ , Vce *1 , ” Vce=” ) ;

68
Scilab code Exa 18.5 voltage and current

1
2 clc ;
3 // e . g 1 8 . 5
4 Rb =400*10**3;
5 Vcc =20;
6 Rc =2*10**3;
7 Re =1*10**3;
8 beta =100;
9 Ib = Vcc /( Rb +( beta * Re ) ) ; // s a t u r a t i o n c u r r e n t
10 disp ( ’mA ’ , Ib *10**3 , ” I b=” ) ;
11 Ic = beta * Ib ;
12 disp ( ’mA ’ , Ic *10**3 , ” I c=” ) ;
13 Vce = Vcc -( Ic *( Rc + Re ) ) ; // cut − o f f v o l t a g e
14 disp ( ’V ’ , Vce *1 , ” Vce=” ) ;

Scilab code Exa 18.6 find Ic and Vce

1 clc ;
2 // e . g 1 8 . 1
3 Vcc =12;
4 Rc =2.2*10**3;
5 Rb =240;
6 B =50;
7 Vbe =0.7;
8 RE =0;
9 Ic =( Vcc - Vbe ) /( RE +( Rb / B ) ) ; // c o l l e c t o r c u r r e n t
10 disp ( ’mA ’ ,Ic , ” I c=” ) ;
11 Vce = Vcc -( Ic *10** -3) * Rc ; //CE v o l t a g e
12 disp ( ’V ’ , Vce *1 , ” Vce=” ) ;
13 Icsat = Vcc / Rc ;
14 disp ( ’mA ’ , Icsat *10**3 , ” I c s a t =” ) ;

69
Figure 18.3: find Ic and Vce

15 Vcec = Vcc ; // c u t o f f v o l t a g e
16 i =5.45: -0.5:0;
17 plot ( i ) ;
18 a = gca () // g e t t h e c u r r e n t a x e s
19 a . box = ” o f f ” ;
20 xlabel ( ”VCE” ) ;
21 ylabel ( ” IC ” ) ;

Scilab code Exa 18.7 load line

1 clc ;
2 // e . g 1 8 . 7
3 Vcc =30;

70
Figure 18.4: load line

4 Rb =1.5*10**6;
5 Rc =5*10**3;
6 beta =100;
7 Ic = Vcc / Rc ; // s a t u r a t i o n c u r r e n t
8 disp ( ’mA ’ , Ic *10**3 , ” I c=” ) ;
9 Vce = Vcc ; // cut − o f f v o l t a g e
10 disp ( ’V ’ , Vce *1 , ” Vce=” ) ;
11 Ib = Vcc / Rb ; // b a s e c u r r e n t
12 disp ( ’ microA ’ , Ib *10**6 , ” I b=” ) ;
13 Ic = beta * Ib ;
14 disp ( ’mA ’ , Ic *10**3 , ” I c=” ) ;
15 Vce = Vcc - Ic * Rc ;
16 disp ( ’V ’ , Vce *1 , ” Vce=” ) ;
17 i =6: -0.2:0;
18 plot2d ( i ) ;
19 a = gca () // g e t t h e c u r r e n t a x e s
20 a . box = ” o f f ” ;

71
21 xlabel ( ”VCE” ) ;
22 ylabel ( ” IC ” ) ;

Scilab code Exa 18.9 current voltage and stability factor

1
2
3 clc ;
4 // e . g 1 8 . 9
5 Rb =180*10**3;
6 Vcc =25;
7 Rc =820;
8 Re =200;
9 beta =80;
10 Vbe =0.7;
11 Ic =( Vcc - Vbe ) /( Re +( Rb / beta ) ) ; // c o l l e c t o r c u r r e n t
12 disp ( ’mA ’ , Ic *10**3 , ” I c=” ) ;
13 Vce = Vcc -( Ic * Rc ) ; // c o l l e c t o r t o e m i t t e r v o l t a g e
14 disp ( ’V ’ , Vce *1 , ” Vce=” ) ;
15 S =(1+ beta ) /(1+ beta *( Re /( Re + Rb ) ) ) ;
16 disp (S , ” S=” ) ; // s t a b i l i t y f a c t o r

Scilab code Exa 18.10 Q point

1
2 clc ;
3 // e . g 1 8 . 1 0
4 Vbe =0.7;
5 Rb =100*10**3;
6 Vcc =10;
7 Rc =10*10**3;
8 beta =100;
9 Ic =( Vcc - Vbe ) /( Rc +( Rb / beta ) ) ; // c o l l e c t o r c u r r e n t

72
10 disp ( ’mA ’ , Ic *10**3 , ” I c=” ) ;
11 Vce = Vcc -( Ic * Rc ) ; // c o l l e c t o r to emitter voltage
12 disp ( ’V ’ , Vce *1 , ” Vce=” ) ;
13 Ic = Vcc / Rc ;
14 disp ( ’mA ’ , Ic *10**3 , ” I c=” ) ;
15 Vce = Vcc ;
16 disp ( ’V ’ , Vce *1 , ” Vce=” ) ;

Scilab code Exa 18.11 IB IC AND IE

1
2
3 clc ;
4 // e . g 1 8 . 1 1
5 Rb =100*10**3;
6 Vcc =10;
7 Rc =2*10**3;
8 beta1 =50;
9 Vbe =0.7;
10 Ib =( Vcc - Vbe ) /( Rb +( beta1 * Rc ) ) ;
11 disp ( ’mA ’ , Ib *10**3 , ” I b=” ) ;
12 Ic = beta1 * Ib ;
13 disp ( ’mA ’ , Ic *10**3 , ” I c=” ) ;
14 Ie = Ic ;
15 disp ( ’mA ’ , Ie *10**3 , ” I e=” ) ;

Scilab code Exa 18.12 possible causes

1
2 clc ;
3 // e . g 1 8 . 1 2
4 VCC =9;
5 RB =220*10**3;

73
6 RC =3.3*10**3;
7 VBE =0.3;
8 B =100;
9 // i f vc=0
10 IB =( VCC - VBE ) /( RB +( B * RC ) ) ;
11 disp ( ’ microA ’ , IB *10**6 , ” IB=” ) ;
12 IC = B * IB ;
13 disp ( ’ microA ’ , IC *10**6 , ” IC=” ) ; //CORRECTION IN BOOK
14 // i f VC=9
15 VC =9;
16 IC = B * IB ;
17 disp ( ’mA ’ , IC *10**3 , ” IC=” ) ;
18 // IC ∗RC=0 , which means c o l l e c t o r r e s i s t a n c e i s s h o r t
circuited

Scilab code Exa 18.13 find R1

1
2 clc ;
3 // e . g 1 8 . 1 3
4 Vcc =12;
5 Rc =3.3*10**3;
6 Re =100;
7 Ie =2*10** -3;
8 Vbe =0.7;
9 alpha =0.98;
10 Ic = alpha * Ie ;
11 disp ( ’mA ’ , Ic *10**3 , ” I c=” ) ;
12 Vb = Vbe +( Ie * Re ) ;
13 disp ( ’V ’ , Vb *1 , ”Vb=” ) ;
14 Vc = Vcc -( Ic * Rc ) ; // c o l l e c t o r t o e m i t t e r v o l t a g e
15 disp ( ’V ’ , Vc *1 , ”Vc=” ) ;
16 R2 =20*10**3;
17 IR2 = Vc / R2 ;
18 disp ( ’mA ’ , IR2 *10**3 , ” IR2=” ) ;

74
19 Ib = Ie - Ic ;
20 disp ( ’mA ’ , Ib *10**3 , ” I b=” ) ;
21 IR1 = IR2 + Ib ;
22 disp ( ’mA ’ , IR1 *10**3 , ” IR1=” ) ;
23 R1 =( Vc - Vb ) / IR1 ;
24 disp ( ’ kohm ’ , R1 *10** -3 , ”R1=” ) ;

Scilab code Exa 18.14 base resistance

1 clc ;
2 VCC =24;
3 RC =10*10**3;
4 RE =270;
5 VBE =0.7;
6 B =45;
7 VCE =5;
8 IC =( VCC - VCE ) / RC ;
9 disp ( ’mA ’ , IC *10**3 , ” IC=” ) ;
10 RB =(2.6*10^3) * B ;
11 disp ( ’ kohm ’ , RB *10** -3 , ”RB=” )

Scilab code Exa 18.15 dc bias current and voltage

1
2 clc ;
3 // e . g 1 8 . 1 5
4 Rb =33*10**3;
5 Vcc =3;
6 Rc =1.8*10**3;
7 beta =90;
8 Vbe =0.7;
9 Ib =( Vcc - Vbe ) /( Rb +( Rc * beta ) ) ; // c o l l e c t o r c u r r e n t
10 disp ( ’mA ’ , Ib *10**3 , ” I b=” ) ;

75
11 Ic = beta * Ib ;
12 disp ( ’mA ’ , Ic *10**3 , ” I c=” ) ;
13 Vce = Vcc -( Ic * Rc ) ; // c o l l e c t o r t o e m i t t e r v o l t a g e
14 disp ( ’V ’ , Vce *1 , ” Vce=” ) ;
15 S =(1+ beta ) /(1+ beta *( Rc /( Rc + Rb ) ) ) // s t a b i l i t y f a c t o r

Scilab code Exa 18.16 current and voltage

1
2 clc ;
3 // e . g 1 8 . 1 6
4 Vbe =0.7;
5 Vcc =10;
6 Rc =1*10**3;
7 beta =100;
8 R1 =10*10**3;
9 R2 =5*10**3;
10 Re =500;
11 Vb = Vcc *( R2 /( R1 + R2 ) ) ;
12 disp ( ’V ’ , Vb *1 , ”Vb=” ) ;
13 Ve = Vb - Vbe ;
14 disp ( ’V ’ , Ve *1 , ”Ve=” ) ;
15 Ie = Ve / Re ;
16 disp ( ’mA ’ , Ie *10**3 , ” I e=” ) ;
17 Ic = Ie ;
18 disp ( ’mA ’ , Ic *10**3 , ” I c=” ) ;
19 Vce = Vcc -( Rc + Re ) ;
20 disp ( ’V ’ , Ve *1 , ”Ve=” ) ;

Scilab code Exa 18.17 OPERATING POINT

1
2 clc ;

76
3 // e . g 1 8 . 1 7
4 Vcc =9;
5 Rc =1*10**3;
6 Re =680;
7 beta =100;
8 R1 =33*10**3;
9 R2 =15*10**3;
10 Vb = Vcc *( R2 /( R1 + R2 ) ) ;
11 disp ( ’V ’ , Vb *1 , ”Vb=” ) ;
12 Vbe =0.7;
13 Ve = Vb - Vbe ;
14 disp ( ’V ’ , Ve *1 , ”Ve=” ) ;
15 Ie = Ve / Re ;
16 disp ( ’mA ’ , Ie *10**3 , ” I e=” ) ;
17 Ic = Ie ;
18 disp ( ’mA ’ , Ic *10**3 , ” I c=” ) ;
19 VRc = Ic * Rc ;
20 disp ( ’V ’ , VRc *1 , ”VRc=” ) ;
21 Vc = Vcc - VRc ;
22 disp ( ’V ’ , Vc *1 , ”Vc=” ) ;
23 Vce = Vc - Ve ;
24 disp ( ’V ’ , Vce *1 , ” Vce=” ) ;

Scilab code Exa 18.18 R1 and RC

1
2 clc ;
3 VCC =5;
4 RE =0.3*10**3;
5 IC =1*10** -3;
6 VCE =2.5;
7 B =100;
8 VBE =0.7;
9 ICO =0;
10 R2 =10*10**3;

77
11 IE = IC ;
12 RC =(( VCC - VCE ) / IC ) - RE ;
13 disp ( ’ ohm ’ , RC *1 , ”RC=” ) ;
14 VE = IE * RE ;
15 VB = VE + VBE ;
16 R1 = VCC * R2 - R2 ;
17 disp ( ’Kohm ’ , R1 *10** -3 , ”R1=” ) ;

Scilab code Exa 18.19 IE and VCE

1
2 clc ;
3 Vcc =20;
4 RC =1*10**3;
5 RE =5*10**3;
6 R1 =10*10**3;
7 R2 =10*10**3;
8 B =462;
9 VBE =0.7;
10 VB = Vcc * R2 /( R1 + R2 ) ;
11 disp ( ’V ’ , VB *1 , ”VB=” ) ;
12 VE = VB - VBE ;
13 IE = VE / RE ;
14 disp ( ’mA ’ , IE *10**3 , ” IE=” ) ;
15 IC = IE ;
16 VCE = Vcc - IC * RC ;
17 disp ( ’V ’ , VCE *1 , ”VCE=” ) ;

Scilab code Exa 18.20 base current

1
2 clc ;
3 VCC =8;

78
4 VRC =0.5;
5 RC =800;
6 a =0.96;
7 VCE = VCC - VRC ; //VRC=IC ∗RC
8 IC = VRC / RC ;
9 disp ( ’mA ’ , IC *10**3 , ” IC=” ) ;
10 IE = IC / a ;
11 disp ( ’mA ’ , IE *10**3 , ” IE=” ) ;
12 IB = IE - IC ;
13 disp ( ’ microA ’ , IB *10**6 , ” IB=” ) ;

Scilab code Exa 18.21 change in collector current

1
2 clc ;
3 VCC =12;
4 RC =1*10**3;
5 RE =100;
6 R1 =25*10**3;
7 R2 =5*10**3;
8 B =50;
9 VBE =0.6;
10 VTH = VCC * R2 /( R1 + R2 ) ;
11 RTH = R1 * R2 /( R1 + R2 ) ;
12 IE50 =( VTH - VBE ) /( RE + RTH / B ) ;
13 B =150;
14 IE150 =( VTH - VBE ) /( RE + RTH / B ) ;
15 ICdiff =( IE150 - IE50 ) / IE50 ;
16 disp ( ’% ’ , ICdiff *100 , ” I C d i f f =” )

Scilab code Exa 18.24 value of resistors

1 clc ;

79
2 B =50;
3 VBE =0.7;
4 VCC =22.5;
5 RC =5.6*10**3;
6 VCE =12;
7 IC =1.5*10** -3;
8 S =3;
9 RE =( VCC - IC * RC - VCE ) / IC ;
10 disp ( ’ kohm ’ , RE *10^ -3 , ”RE=” ) ;
11 RTH =(4375) - RE ;
12 disp ( ’ kohm ’ , RTH *10^ -3 , ”RTH=” ) ;
13 R2 =0.1* B * RE ;
14 disp ( ’ kohm ’ , R2 *10^ -3 , ”R2=” ) ;
15 R1 =( - RTH * R2 ) /( RTH - R2 ) ;
16 disp ( ’ kohm ’ , R1 *10^ -3 , ”R1=” ) ;

Scilab code Exa 18.25 CURRENT AND VOLTAGE

1
2 clc ;
3 VCC =10;
4 VEE =10;
5 RC =1*10**3;
6 RE =5*10**3;
7 RB =50*10**3;
8 VBE =0.7;
9 VE = - VBE ;
10 IE =( VEE - VBE ) / RE ;
11 disp ( ’mA ’ , IE *10**3 , ” IE=” ) ;
12 IC = IE ;
13 disp ( ’mA ’ , IC *10**3 , ” IC=” ) ;
14 VC = VCC - IC * RC ;
15 VCE = VC - VE ;
16 disp ( ’ v o l t s ’ , VCE *1 , ”VCE=” ) ;

80
Scilab code Exa 18.26 change in Q point

1 clc ;
2 VCC =20;
3 VEE =20;
4 RC =5*10**3;
5 RE =10*10**3;
6 RB =10*10**3;
7 B1 =50;
8 B2 =100;
9 VBE1 =0.7;
10 VBE2 =0.6;
11 IE1 =( VEE - VBE1 ) /( RE + RB / B1 ) ;
12 disp ( ’mA ’ , IE1 *10**3 , ” IE1=” ) ;
13 IC1 = IE1 ;
14 VC1 = VCC - IC1 * RC ;
15 disp ( ’V ’ ,VC1 , ”VC1=” ) ;
16 VE = - VBE1 ;
17 VCE1 = VC1 - VE ;
18 disp ( ’V ’ , VCE1 , ”VCE1=” ) ;
19 IE2 =( VEE - VBE2 ) /( RE + RB / B2 ) ;
20 disp ( ’mA ’ , IE2 *10**3 , ” IE2=” ) ;
21 IC2 = IE2 ;
22 VC2 = VCC - IC2 * RC ;
23 disp ( ’V ’ ,VC2 , ”VC2=” ) ;
24 VE = - VBE2 ;
25 VCE2 = VC2 - VE ;
26 disp ( ’V ’ , VCE2 , ”VCE2=” ) ;
27 delIc =( IC2 - IC1 ) / IC1 ;
28 disp ( ’% ’ , delIc *100 , ” d e l I c =” ) ;
29 delVCE =( VCE1 - VCE2 ) / VCE2 ;
30 disp ( ’% ’ , delVCE *100 , ” delVCE=” ) ;

81
Scilab code Exa 18.27 VOLTAGE AND CURRENT

1
2 clc ;
3 VCC =12;
4 RC =2*10**3;
5 RE =1*10**3;
6 R1 =100*10**3;
7 R2 =20*10**3;
8 B =100;
9 VBE = -0.2;
10 VB = - VCC * R2 /( R1 + R2 ) ;
11 disp ( ’V ’ , VB *1 , ”VB=” ) ;
12 VE = VB - VBE ;
13 disp ( ’V ’ , VE *1 , ”VE=” ) ;
14 IE = - VE / RE ;
15 IC = IE ;
16 disp ( ’mA ’ , IC *10**3 , ” IC=” ) ;
17 VC = -( VCC - IC * RC ) ;
18 disp ( ’V ’ , VC *1 , ”VC=” ) ;
19 VCE = VC -( VE ) ;
20 disp ( ’V ’ , VCE *1 , ”VCE=” ) ;

Scilab code Exa 18.28 Quiescent points

1 clc ;
2 VCC =4.5;
3 RC =1.5*10**3;
4 RE =0.27*10**3;
5 R2 =2.7*10**3;
6 R1 =27*10**3;
7 B =44;

82
8 VBE = -0.3;
9 VB = - VCC * R2 /( R1 + R2 ) ;
10 disp ( ’V ’ , VB *1 , ”VB=” ) ;
11 VE = VB - VBE ;
12 disp ( ’V ’ , VE *1 , ”VE=” ) ;
13 IE = - VE / RE ;
14 IC = IE ;
15 disp ( ’mA ’ , IC *10**3 , ” IC=” ) ;
16 VRC = IC * RC ;
17 disp ( ’V ’ , VRC *1 , ”VRC=” ) ;
18 VC = -[ VCC - VRC ]
19 disp ( ’V ’ , VC *1 , ”VC=” ) ;
20 VCE = VC -( VE ) ;
21 disp ( ’V ’ , VCE *1 , ”VCE=” ) ;

83
Chapter 19

SINGLE STAGE BJT


AMPLIFIERS

Scilab code Exa 19.1 resistance and voltage gain

1 clc ;
2 // e . g 1 9 . 1
3 Vcc =10;
4 Rc =10*10**3;
5 Rb =1*10**6;
6 beta =100;
7 Vbe =0.7;
8 Ib =( Vcc - Vbe ) / Rb ;
9 disp ( ’ microA ’ , Ib *10**6 , ” I b=” ) ;
10 Ic = beta * Ib ;
11 disp ( ’mA ’ , Ic *10**3 , ” I c=” ) ;
12 Ie = Ic ;
13 re =25/( Ie *10**3) ;
14 disp ( ’ ohm ’ , re *1 , ” r e=” ) ;
15 Ri = beta * re ;
16 disp ( ’ kohm ’ , Ri *10** -3 , ” Ri=” ) ;
17 Ris =( Rb * beta * re ) /( Rb + beta * re ) ;
18 disp ( ’ kohm ’ , Ris *10** -3 , ” R i s=” ) ;
19 R0 = Rc ;

84
20 disp ( ’kOhm ’ , R0 *10** -3 , ”R0=” ) ;
21 Av = Rc / re ;
22 disp ( Av ) ;

Scilab code Exa 19.2 current and gain

1 clc ;
2 // e . g 1 9 . 2
3 Ri =2.5*10**3;
4 Av =200;
5 Vs =5*10** -3;
6 beta =50;
7 ib =( Vs / Ri )
8 disp ( ’ microA ’ , ib *10**6 , ” i b=” ) ;
9 ic = beta * ib ;
10 disp ( ’ microA ’ , ic *10**6 , ” i c =” ) ;
11 Ai = beta ;
12 Ap = Ai * Av ;
13 disp ( Ap ) ;
14 Gp =10* log10 ( Ap ) ;
15 disp ( ’ dB ’ , Gp *1 , ”Gp=” ) ;

Scilab code Exa 19.3 resistance and gain

1 clc ;
2 // e . g 1 9 . 3
3 Vcc =20;
4 Rc =5*10**3;
5 Re =1*10**3;
6 Rb =100*10**3;
7 beta =150;
8 Vbe =0.7;
9 Ic = Vcc /( Re +( Rb / beta ) ) ;

85
10 disp ( ’mA ’ , Ic *10**3 , ” I c=” ) ;
11 Ie = Ic ;
12 re =25/( Ie *10**3) ;
13 disp ( ’ ohm ’ , re *1 , ” r e=” ) ;
14 Ri = beta *( re + Re ) ;
15 disp ( ’ kohm ’ , Ri *10** -3 , ” Ri=” ) ;
16 Ris =( Rb * Ri ) /( Rb + Ri ) ;
17 disp ( ’ kohm ’ , Ris *10** -3 , ” R i s=” ) ;
18 Av = Rc / Re ;
19 disp ( Av ) ;
20 Gp =10* log10 ( Av ) ;
21 disp ( ’ dB ’ , Gp *1 , ”Gp=” ) ;

Scilab code Exa 19.4 voltage gain and resistance

1 clc ;
2 // e . g 1 9 . 4
3 Vcc =12;
4 Rc =10*10**3;
5 Re =1*10**3;
6 Rb =500*10**3;
7 beta =50;
8 Ic = Vcc /( Re +( Rb / beta ) ) ;
9 disp ( ’mA ’ , Ic *10**3 , ” I c=” ) ;
10 Ie = Ic ;
11 re =25/( Ie *10**3) ;
12 disp ( ’ ohm ’ , re *1 , ” r e=” ) ;
13 Ri = beta * re ;
14 disp ( ’ ohm ’ , Ri *1 , ” Ri=” ) ;
15 Ris =( Rb * Ri ) /( Rb + Ri ) ;
16 disp ( ’ ohm ’ , Ris *1 , ” R i s=” ) ;
17 R0 = Rc ;
18 Av = R0 / re ;
19 disp ( Av ) ;
20 Av = Rc / Re ;

86
21 disp ( Av ) ;

Scilab code Exa 19.5 voltage and impedance

1 clc ;
2 // e . g 1 9 . 5
3 Vcc =30;
4 Rc =10*10**3;
5 RL =3.3*10**3;
6 R1 =47*10**3;
7 R2 =15*10**3;
8 Re =8.2*10**3;
9 beta =200;
10 Vs =5*10** -3;
11 Vbe =0.7;
12 Vth =( Vcc * R2 ) /( R1 + R2 ) ;
13 disp ( ’V ’ , Vth *1 , ” Vth=” ) ;
14 Rth =( R1 * R2 ) /( R1 + R2 ) ;
15 disp ( ’ 1 0 ˆ 3 ohm ’ , Rth *10** -3 , ” Rth=” ) ;
16 Ie =( Vth - Vbe ) /( Re +( Rth / beta ) ) ;
17 disp ( ’mA ’ , Ie *10**3 , ” I e=” ) ;
18 re =25/( Ie *10**3) ;
19 disp ( ’ ohm ’ , re *1 , ” r e=” ) ;
20 rl =( Rc * RL ) /( Rc + RL ) ;
21 disp ( ’Kohm ’ , rl *10** -3 , ” r l =” ) ;
22 Av = rl / re ;
23 disp ( Av ) ;
24 Vin =5;
25 V0 = Av * Vin
26 disp ( ’mV ’ , V0 *1 , ”V0=” ) ;
27 Ri = beta * re ;
28 disp ( ’Kohm ’ , Ri *10** -3 , ” Ri=” ) ;
29 Ris =( Rth * Ri ) /( Rth + Ri ) ;
30 disp ( ’Kohm ’ , Ris *10** -3 , ” R i s=” ) ;

87
Scilab code Exa 19.6 output voltage and output gain

1 clc ;
2 // e . g 1 9 . 6
3 Vcc =10;
4 Rc =5*10**3;
5 Re =1*10**3;0
6 RL =50*10**3;
7 R1 =50*10**3;
8 R2 =10*10**3;
9 Rs =600;
10 beta =50;
11 Vs =10*10** -3;
12 Vbe =0.7;
13 Vth =( Vcc * R2 ) /( R1 + R2 ) ;
14 disp ( ’V ’ , Vth *1 , ” Vth=” ) ;
15 Rth =( R1 * R2 ) /( R1 + R2 ) ;
16 disp ( ’ 1 0 ˆ 3 ohm ’ , Rth *10** -3 , ” Rth=” ) ;
17 Ie =( Vth - Vbe ) /( Re +( Rth / beta ) ) ;
18 disp ( ’mA ’ , Ie *10**3 , ” I e=” ) ;
19 re =25/( Ie *10**3) ;
20 disp ( ’ ohm ’ , re *1 , ” r e=” ) ;
21 Ri = beta * re ;
22 Ris =( Rth * Ri ) /( Rth + Ri ) ;
23 disp ( ’ ohm ’ , Ris *1 , ” R i s=” ) ;
24 rl =( Rc * RL ) /( Rc + RL ) ;
25 disp ( ’Kohm ’ , rl *10** -3 , ” r l =” ) ;
26 Av = rl / re ;
27 disp ( Av ) ;
28 Vin =( Vs * Ris ) /( Ris + Rs ) ;
29 disp ( ’mV ’ , Vin *10**3 , ” Vin=” ) ;
30 V0 = Av * Vin ;
31 disp ( ’mV ’ , V0 *1 , ”V0=” ) ;
32 Avs =( Av * Vin ) / Vs ;

88
33 disp ( Avs ) ;

Scilab code Exa 19.7 voltage and impedance

1 clc ;
2 // e . g 1 9 . 7
3 Vcc = -18;
4 Rc =4.3*10**3;
5 Re =1*10**3;0
6 RL =3*10**3;
7 R1 =39*10**3;
8 R2 =8.2*10**3;
9 beta1 =200;
10 Vbe = -0.7;
11 Vth =( Vcc * R2 ) /( R1 + R2 ) ;
12 disp ( ’V ’ , Vth *1 , ” Vth=” ) ;
13 Rth =( R1 * R2 ) /( R1 + R2 ) ;
14 disp ( ’ kohm ’ , Rth *10** -3 , ” Rth=” ) ;
15 Ie =( Vth - Vbe ) /( Re +( Rth / beta1 ) ) ;
16 disp ( ’mA ’ , Ie *10**3 , ” I e=” ) ;
17 re1 =(30*10** -3) /( - Ie ) ;
18 disp ( ’ ohm ’ , re1 *1 , ” r e 1=” ) ;
19 re =( Rc * RL ) /( Rc + RL ) ;
20 Ri = beta1 * re ;
21 Ris =( Rth * Ri ) /( Rth + Ri ) ;
22 disp ( ’ kohm ’ , Ris *10** -3 , ” R i s=” ) ;
23 disp ( ’Kohm ’ , re *10** -3 , ” r e=” ) ;
24 Av = re / re1 ;
25 disp ( Av ) ;

Scilab code Exa 19.8 Av Ri Ro and Avs

1 clc ;

89
2 // e . g 1 9 . 8
3 Vs = 200
4 Vcc =20;
5 Rc =5.7*10**3;
6 Re =1*10**3;
7 R1 =100*10**3;
8 R2 =10*10**3;
9 Rs =100;
10 beta1 =100;
11 Vbe =0.7;
12 Vth =( Vcc * R2 ) /( R1 + R2 ) ;
13 disp ( ’V ’ , Vth *1 , ” Vth=” ) ;
14 Rth =( R1 * R2 ) /( R1 + R2 ) ;
15 disp ( ’Kohm ’ , Rth *10** -3 , ” Rth=” ) ;
16 Ie =( Vth - Vbe ) /( Re +( Rth / beta1 ) ) ;
17 disp ( ’mA ’ , Ie *10**3 , ” I e=” ) ;
18 re =25/( Ie *10**3) ;
19 disp ( ’ ohm ’ , re *1 , ” r e=” ) ;
20 Ri = beta1 * re ;
21 Ris =( Rth * Ri ) /( Rth + Ri ) ;
22 disp ( ’ ohm ’ , Ris *1 , ” R i s=” ) ;
23 rl = Rc ;
24 Av = rl / re ;
25 disp ( Av ) ;
26 Vin =( Vs * Ris ) /( Ris + Rs ) ;
27 disp ( ’mV ’ , Vin *1 , ” Vin=” ) ;
28 V0 = Av * Vin ;
29 disp ( ’V ’ , V0 *10** -3 , ”V0=” ) ;
30 Avs =( Av * Vin ) / Vs ;
31 disp ( Avs ) ;

Scilab code Exa 19.9 GAIN VOLTAGE AND RESISTANCE

1 clc ;
2 // e . g 1 9 . 9

90
3 Vcc =10;
4 Rc =5*10**3;
5 RE1 =500;
6 R1 =50*10**3;
7 R2 =10*10**3;
8 Rs =600;
9 rE =500;
10 beta1 =50;
11 Vbe =0.7;
12 vs =100*10** -3;
13 Rl =50*10**3;
14 Vth =( Vcc * R2 ) /( R1 + R2 ) ;
15 disp ( ’V ’ , Vth *1 , ” Vth=” ) ;
16 Rth =( R1 * R2 ) /( R1 + R2 ) ;
17 disp ( ’ 1 0 ˆ 3 ohm ’ , Rth *10** -3 , ” Rth=” ) ;
18 RE = RE1 + rE ;
19 disp ( ’ ohm ’ , RE *1 , ”RE=” ) ;
20 Ie =( Vth - Vbe ) /( RE +( Rth / beta1 ) ) ;
21 disp ( ’mA ’ , Ie *10**3 , ” I e=” ) ;
22 re =25/( Ie *10**3) ;
23 disp ( ’ ohm ’ , re *1 , ” r e=” ) ;
24 Ri = beta1 *( re + rE ) ;
25 disp ( ’Kohm ’ , Ri *10** -3 , ” Ri=” ) ;
26 Ris =( Rth * Ri ) /( Rth + Ri ) ;
27 disp ( ’ ohm ’ , Ris *1 , ” R i s=” ) ;
28 rl =( Rc * Rl ) /( Rc + Rl )
29 disp ( ’ kohm ’ , rl *10** -3 , ” r l =” ) ;
30 Av = rl /( re + rE ) ;
31 disp ( Av ) ;
32 VinBYVs =( Ris ) /( Ris + Rs ) ;
33 disp ( ’V ’ , VinBYVs *1 , ”VinBYVs=” ) ;
34 Avs = Av * VinBYVs ;
35 disp ( Avs ) ;
36 V0 = Avs * vs ;
37 disp ( ’mV ’ , V0 *10^3 , ”V0=” ) ; // a n s w e r p r i n t e d i n t h e
book i s wrong ( v a r i a t i o n i n d e c i m a l p o i n t )

91
Scilab code Exa 19.10 resistance voltage gain current gain power gain

1 clc ;
2 VS =10*10** -3;
3 a =0.98;
4 VBE =0.7;
5 VCC =10;
6 RC =10*10**3;
7 RL =5.1*10**3;
8 RE =20*10**3;
9 VEE =10;
10 IE =( VEE - VBE ) / RE ;
11 re =25/ IE *10** -3;
12 Ri = re ;
13 Ris =( RE * re ) /( RE + re ) ;
14 disp ( ’ ohm ’ ,Ris , ” R i s=” ) ;
15 Ai = a ;
16 disp ( Ai ) ;
17 rL =( RC * RL ) /( RC + RL ) ;
18 Av = rL / re ;
19 disp ( Av ) ;
20 Ap = Av * Ai ;
21 disp ( Ap ) ;
22 Gp =10* log10 ( Ap ) ;
23 disp ( ’ dB ’ ,Gp , ”Gp=” ) ;
24 Vin = VS ;
25 Vo = Av * Vin ;
26 disp ( ’mV ’ , Vo *10**3 , ”Vo=” ) ;

Scilab code Exa 19.11 VOLTAGE GAIN

1 clc ;

92
2 Rs =50;
3 IE =0.465*10** -3;
4 re1 =53.8;
5 Ri =53.8;
6 Ris =52.4;
7 rL =3.38*10**3;
8 Avs = rL /( Rs + re1 ) ;
9 disp ( Avs ) ;
10 Av = rL / re1 ;
11 disp ( Av ) ;
12 Vs =10;
13 vo = Avs * Vs ;
14 vin = vo / Av ;
15 disp ( ’mV ’ ,vin , ” v i n=” ) ;

Scilab code Exa 19.12 resistance and voltage gain

1 clc ;
2 VEE =10;
3 RE =10*10**3;
4 RB =100*10**3;
5 B =50;
6 VBE =0.7;
7 IE =( VEE - VBE ) /( RE +( RB / B ) ) ;
8 re =25/ IE *10** -3;
9 Ri = B *( RE + re ) ;
10 disp ( ’Kohm ’ , Ri *10** -3 , ” Ri=” ) ;
11 Ris =( RB * Ri ) /( RB + Ri ) ;
12 Rs =0;
13 Ro = re +(( RB * Rs ) /( RB + Rs ) ) / B ;
14 disp ( ’ ohm ’ ,Ro , ”Ro=” ) ;
15 Av = RE /( re + RE ) ;
16 disp ( Av ) ;

93
Scilab code Exa 19.13 resistance and voltage

1 clc ;
2 B =80;
3 VBE =0.7;
4 VCC =15;
5 R1 =20*10**3;
6 R2 =20*10**3;
7 RS =2*10**3;
8 VS =5*10** -3;
9 RE =8.2*10**3;
10 RL =1.5*10**3;
11 VTH = VCC * R2 /( R1 + R2 ) ;
12 RTH =( R1 * R2 ) /( R1 + R2 ) ;
13 IE =( VTH - VBE ) /( RE +( RTH / B ) ) ;
14 disp ( ’mA ’ , IE *10**3 , ” IE=” ) ;
15 re =25/ IE *10** -3;
16 rL =( RE * RL ) /( RE + RL ) ;
17 Ri = B *( rL + re ) ;
18 Ris =( RTH * Ri ) /( RTH + Ri ) ;
19 disp ( ’ kohm ’ , Ris *10** -3 , ” R i s=” ) ;
20 Ro = re +(( RS * RTH ) /( RS + RTH ) ) / B ;
21 disp ( ’ ohm ’ ,Ro , ”Ro=” ) ;
22 Vin = VS * Ris /( RS + Ris ) ;
23 disp ( ’mV ’ , Vin *10**3 , ” Vin=” ) ;

94
Chapter 20

HYBRID PARAMETERS

Scilab code Exa 20.2 Impedance voltage and current gain

1 clc ;
2 hie =1.0*10**3;
3 hre =1*10** -4;
4 hoe =100*10** -6;
5 RC =1000;
6 RS =1000;
7 rL = RC ;
8 hfe =50;
9 Ai = - hfe /(1+ hoe * rL ) ;
10 Ri = hie + hre * Ai * rL ;
11 Ris = Ri ;
12 disp ( ’Ohm ’ , Ris *1 , ” R i s=” ) ;
13 delh = hie * hoe - hre * hfe ;
14 his =1000;
15 Ro =( RS + his ) /( RS * hoe + delh ) ;
16 disp ( ’kOhm ’ , Ro *10** -3 , ”Ro=” ) ;
17 Ros =( Ro * rL ) /( Ro + rL ) ;
18 disp ( ’Ohm ’ , Ros *1 , ” Ros=” ) ;
19 Ais =( Ai * RS ) /( RS + Ris ) ;
20 disp ( Ais ) ;
21 Av =( Ai * rL ) / Ri ;

95
22 Avs =( Av * Ris ) /( RS + Ris ) ;
23 disp ( Avs ) ;

Scilab code Exa 20.3 impedance current and voltage gain

1 clc ;
2 hie =1.1*10**3;
3 hre =2.5*10** -4;
4 hfe =50;
5 hoe =25*10** -6;
6 rs =1*10**3;
7 rL =1*10**3;
8 Ai = hfe /(1+ hoe * rL ) ;
9 disp ( Ai ) ;
10 Ri = hie + hre * Ai * rL ;
11 disp ( ’Ohm ’ , Ri *1 , ” Ri=” ) ;
12 Av =( Ai * rL ) / Ri ;
13 disp ( Av ) ;

Scilab code Exa 20.4 voltage gain and resistance

1 clc ;
2 RC =4*10**3;
3 RB =40*10**3;
4 RS =10*10**3;
5 hie =1100;
6 hfe =50;
7 hre =0;
8 hoe =0;
9 RB2 =40*10**3;
10 rL =( RC * RB2 ) /( RC + RB2 ) ;
11 Ai = - hfe /(1+ hoe * rL ) ;
12 Ri = hie + hre * Ai * rL ;

96
13 Av =( Ai * rL ) / Ri ;
14 RB1 =40*10**3/(1 - Av ) ;
15 Ris =( Ri * RB1 ) /( Ri + RB1 ) ;
16 disp ( ’ ohm ’ , Ris *1 , ” R i s=” ) ;
17 Ros = rL ; //Ro= i n f i n i t y
18 disp ( ’Ohm ’ , Ros *1 , ” Ros=” ) ;
19 Avs =( Av * Ris ) /( RS + Ris ) ;
20 disp ( Avs ) ;

Scilab code Exa 20.5 resistance voltage and current gain

1 clc ;
2 hib =28;
3 hfb = -0.98;
4 hrb =5*10** -4;
5 hob =0.34*10** -6;
6 rL =1.2*10**3;
7 Rs =0;
8 Ai = - hfb /(1+ hob * rL ) ;
9 disp ( Ai ) ;
10 Ri = hib + hrb * Ai * rL ;
11 disp ( ’Ohm ’ , Ri *1 , ” Ri=” ) ;
12 delh = hib * hob - hrb * hfb ;
13 Ro =( Rs + hib ) /( Rs * hib + delh ) ;
14 disp ( ’kOhm ’ , Ro *10** -3 , ”Ro=” ) ;
15 Av =( Ai * rL ) / Ri ;
16 disp ( Av ) ;

Scilab code Exa 20.6 resistance voltage and current gain

1 clc ;
2 hic =2*10**3;
3 hfc = -51;

97
4 hrc =1;
5 hoc =25*10** -6;
6 rL =5*10**3;
7 RE =5*10**3;
8 Rs =1000;
9 R1 =10*10**3;
10 R2 =10*10**3;
11 Ai = - hfc /(1+ hoc * rL ) ;
12 disp ( Ai ) ;
13 Ri = hic + hrc * Ai * rL ;
14 disp ( ’kOhm ’ , Ri *10** -3 , ” Ri=” ) ;
15 a =( R1 * R2 ) /( R1 + R2 ) ;
16 Ris =( Ri * a ) /( Ri + a ) ;
17 disp ( ’Ohm ’ , Ris *1 , ” R i s=” ) ;
18 Ro = -( Rs + hic ) / hfc ;
19 Ros =( Ro * RE ) /( Ro + RE ) ;
20 disp ( ’Ohm ’ , Ros *1 , ” Ros=” ) ;
21 Ais =( Ai * Rs ) /( Rs + Ris ) ;
22 disp ( Ais ) ;
23 Av =( Ai * rL ) / Ri ;
24 disp ( Av ) ;
25 Avs =( Av * Ris ) /( Rs + Ris ) ;
26 disp ( Avs ) ;

Scilab code Exa 20.7 resistance voltage and current gain

1 clc ;
2 hie =1500;
3 hfe =50;
4 hre =50*10** -4;
5 hoe =20*10** -6;
6 RC =5*10**3;
7 RL =10*10**3;
8 R1 =20*10**3;
9 R2 =10*10**3;

98
10 rL =( RC * RL ) /( RC + RL ) ;
11 Ai = - hfe ;
12 Ri = hie ;
13 a =( R1 * R2 ) /( R1 + R2 ) ;
14 Ris =( Ri * a ) /( Ri + a ) ;
15 disp ( ’kOhm ’ , Ris *10** -3 , ” R i s=” ) ;
16 Ro =1/ hoe ;
17 Ros =( Ro * rL ) /( Ro + rL ) ; // c o r r e c t i o n
18 disp ( ’kOhm ’ , Ros *10** -3 , ” Ros=” ) ;
19 Avs =( Ai * rL ) / Ri ;
20 disp ( Avs ) ;
21 Ais = Ai ; // c o r r e c t i o n
22 disp ( Ais ) ;

Scilab code Exa 20.8 voltage and impedance

1
2 clc ;
3 RC =12*10**3;
4 RL =4.7*10**3;
5 R1 =33*10**3;
6 R2 =4.7*10**3;
7 IC =1*10** -3;
8 hiemin =1*10**3;
9 hiemax =5*10**3;
10 hfemin =70;
11 hfemax =350;
12 hie = sqrt ( hiemin * hiemax ) ;
13 disp ( ’kOhm ’ , hie *10** -3 , ” h i e=” ) ;
14 hfe = sqrt ( hfemin * hfemax ) ;
15 disp ( ’Ohm ’ , hfe *1 , ” h f e=” ) ; // a n s w e r p r i n t e d i n t h e
book i s wrong
16 Ri = hie ;
17 a =( R1 * R2 ) /( R1 + R2 ) ;
18 Ris =( Ri * a ) /( Ri + a ) ;

99
19 disp ( ’kOhm ’ , Ris *10** -3 , ” R i s=” ) ;
20 Ai = hfe ;
21 rc =( RC * RL ) /( RC + RL ) ;
22 Avs =( Ai * rc ) / Ri ;
23 disp ( Avs , ” Avs=” ) ;

Scilab code Exa 20.9 resistance voltage and current gain

1 clc ;
2 RB =330*10**3;
3 RC =2.7*10**3;
4 hfe =120;
5 hie =1.175*10**3;
6 hoe =20*10** -6;
7 Ri = hie ;
8 Ris =( hie * RB ) /( hie + RB ) ;
9 disp ( ’ kohm ’ , Ris *10** -3 , ” R i s=” ) ;
10 Ro =1/ hoe ;
11 Ros =( Ro * RC ) /( Ro + RC ) ;
12 disp ( ’ kohm ’ , Ros *10** -3 , ” Ros=” ) ;
13 Ai = hfe ;
14 disp ( Ai ) ;
15 Av =( hfe * RC ) / Ri ;
16 disp ( Av ) ;

Scilab code Exa 20.10 hfb and hfc

1 clc ;
2 hfe =50;
3 hfb = - hfe /(1+ hfe ) ;
4 disp ( hfb ) ;
5 hfc = -(1+ hfe ) ;
6 disp ( hfc ) ;

100
Scilab code Exa 20.11 gain and input resistance

1 clc ;
2 hie =1100;
3 hre =2.5*10** -4;
4 hfe =50;
5 hoe =24*10** -6;
6 rL =10*10**3;
7 RS =1*10**3;
8 hic = hie ;
9 hrc =1 - hre ;
10 hfc = -(1+ hfe ) ;
11 Ai = hfc /(1+ hoe * rL ) ;
12 disp ( Ai ) ;
13 Ri = hie + hrc * - Ai * rL ;
14 disp ( ’kOhm ’ , Ri *10** -3 , ” Ri=” ) ;
15 Av =( - Ai * rL ) / Ri ;
16 disp ( Av ) ;

101
Chapter 21

MULTISTAGE BJT
AMPLIFIERS

Scilab code Exa 21.1 total voltage gain

1 clc ;
2 Av1 =10;
3 Av2 =20;
4 Av3 =40;
5 Av = Av1 * Av2 * Av3 ;
6 disp ( Av ) ;
7 GV1 =20* log10 ( Av1 ) ;
8 GV2 =20* log10 ( Av2 ) ;
9 GV3 =20* log10 ( Av3 ) ;
10 GV = GV1 + GV2 + GV3 ; //CORRECTION
11 disp ( ’ dB ’ , GV *1 , ”GV=” ) ;

Scilab code Exa 21.2 voltage gain and input voltage of 2nd stage

1 clc ;
2 vin1 =0.05;

102
3 vout3 =150;
4 Av1 =20;
5 vin3 =15;
6 Av = vout3 / vin1 ;
7 disp ( Av ) ;
8 Av3 = vout3 / vin3 ;
9 disp ( Av3 ) ;
10 Av2 = Av /( Av3 * Av1 ) ;
11 disp ( Av2 ) ;
12 vin2 = Av2 / vin3 ;
13 disp ( ’ Vpk−pk ’ , vin2 *1 , ” v i n 2=” ) ;

Scilab code Exa 21.3 input resistance output resitance current and voltage gain

1 clc ;
2 VCC =10;
3 Rc =5*10**3;
4 RB =1*10**6;
5 RE =1*10**3;
6 RL =10*10**3;
7 B1 =100;
8 B2 =100;
9 B = B1 ;
10 IE = VCC /( RE +( RB / B1 ) ) ;
11 re =25/( IE *10**3) ;
12 Ri1 = B * re ;
13 disp ( ’ ohm ’ , Ri1 *1 , ” Ri1=” ) ;
14 Ri2 = B * re ;
15 disp ( ’ ohm ’ , Ri2 *1 , ” Ri2=” ) ;
16 Ro1 =( Rc * Ri2 ) /( Rc + Ri2 ) ;
17 disp ( ’ ohm ’ , Ro1 *1 , ” Ro1=” ) ;
18 Ro2 =( Rc * RL ) /( Rc + RL ) ;
19 disp ( ’ ohm ’ , Ro2 *1 , ” Ro2=” ) ;
20 Av1 = Ro1 / re ;
21 disp ( Av1 ) ;

103
22 Av2 = Ro2 / re ;
23 disp ( Av2 ) ;
24 Av = Av1 * Av2 ;
25 disp ( Av ) ;
26 Gv =20* log10 ( Av ) ;
27 disp ( ’ dB ’ , Gv *1 , ”Gv=” ) ;

Scilab code Exa 21.4 voltage gain

1 clc ;
2 VCC =15;
3 Rc =3.3*10**3;
4 RE =1000;
5 R1 =33*10**3;
6 R2 =8.2*10**3;
7 RL =10*10**3;
8 B =100;
9 VBE =0.7;
10 VTH = VCC *( R2 /( R1 + R2 ) ) ;
11 RTH =( R1 * R2 ) /( R1 + R2 ) ;
12 IE =( VTH - VBE ) /( RE +( RTH / B ) ) ;
13 re =25/( IE *10**3) ;
14 Ri2 = B * re ;
15 disp ( ’ ohm ’ , Ri2 *1 , ” Ri2=” ) ; // t h e a n s w e r o f Ri2 v a r i e s
from t h e a n s w e r p r i n t e d i n t h e book w i t h s l i g h t
d i f f e r e n c e ( 1 1 . 7 i n book & 1 1 . 6 5 h e r e ) , but t h i s
a f f e c t s some a n s w e r s f u r t h e r .
16 Ro1 =( Rc * Ri2 ) /( Rc + Ri2 ) ;
17 disp ( ’ ohm ’ , Ro1 *1 , ” Ro1=” ) ;
18 Ro2 =( Rc * RL ) /( Rc + RL ) ;
19 disp ( ’ ohm ’ , Ro2 *1 , ” Ro2=” ) ;
20 Av1 = Ro1 / re ;
21 disp ( Av1 ) ;
22 Av2 = Ro2 / re ;
23 disp ( Av2 ) ;

104
24 Av = Av1 * Av2 ;
25 disp ( Av ) ;
26 Gv =20* log10 ( Av ) ;
27 disp ( ’ dB ’ , Gv *1 , ”Gv=” ) ;

Scilab code Exa 21.5 cutoff frequency and voltage gain

1 clc ;
2 bw =500*10**3;
3 Avmax =120;
4 f1 =25;
5 f2 = bw + f1 ;
6 disp ( ’ kHZ ’ , f2 *10** -3 , ” f 2=” ) ;
7 Av = Avmax /( sqrt (2) )
8 disp ( Av ) ; // a n s p r i n t e d i n t h e book i s wrong

Scilab code Exa 21.6 individual stage gains and voltage gain

1 clc ;
2 VCC =10;
3 RB =470*10**3;
4 RE =1*10**3;
5 RL =1*10**3;
6 a =4;
7 B =50;
8 IE = VCC /( RE +( RB / B ) ) ;
9 re =25/( IE *10**3) ;
10 Ri1 =( RB *( B * re ) ) /( RB +( B * re ) ) ;
11 disp ( ’ ohm ’ , Ri1 *1 , ” Ri1=” ) ;
12 Ri2 =( RB *( B * re ) ) /( RB +( B * re ) ) ;
13 disp ( ’ ohm ’ , Ri2 *1 , ” Ri2=” ) ;
14 RI2 =( a ^2) * Ri2 ;
15 RO1 = RI2 ;

105
16 RI2 =( a ^2) * RL ;
17 Av1 = RO1 / re ;
18 disp ( Av1 ) ;
19 RO2 = RI2 ;
20 Av2 = RO2 / re ;
21 disp ( Av1 ) ;
22 Av = Av1 * Av2 ;
23 disp ( Av ) ;
24 Gv =20* log10 ( Av ) ;
25 disp ( ’ dB ’ , Gv *1 , ”Gv=” ) ;

Scilab code Exa 21.7 voltage gain

1 clc ;
2 VCC =12;
3 R1 =100*10**3;
4 R2 =20*10**3;
5 R3 =10*10**3;
6 R4 =2*10**3;
7 R5 =10*10**3;
8 R6 =2*10**3;
9 B =100;
10 B2 =100;
11 VTH = VCC *( R2 /( R1 + R2 ) ) ;
12 IE1 = VTH / R4 ;
13 re1 =25/ IE1 *10** -3;
14 VR6 = VCC - IE1 * R3 ;
15 IE2 = VR6 / R6 ;
16 re2 =25/ IE2 *10** -3;
17 Ri2 = B2 *( re2 + R6 ) ;
18 R01 =( R3 * Ri2 ) /( R3 + Ri2 ) ;
19 RO2 = R5 ;
20 Av1 = R01 /( re1 + R4 ) ;
21 disp ( Av1 ) ;
22 Av2 = RO2 /( re2 + R6 ) ;

106
23 disp ( Av2 ) ;
24 Av = Av1 * Av2 ;
25 disp ( Av ) ;

Scilab code Exa 21.8 collector current VCE and ac voltage gain

1 clc ;
2 VCC =10;
3 R1 =800;
4 R2 =200;
5 R3 =600;
6 R4 =200;
7 R5 =100;
8 R6 =1*10**3;
9 B =100;
10 B2 = B ;
11 VBE =0.7;
12 RE =200;
13 VR2 = VCC *( R2 /( R1 + R2 ) ) ;
14 IE1 =( VR2 - VBE ) / RE ;
15 IC1 = IE1 ;
16 disp ( ’mA ’ , IC1 *10**3 , ” IC1=” ) ;
17 VC1 = VCC - IC1 * R3 ;
18 VE1 = IE1 * R4 ;
19 VCE1 = VC1 - VE1 ;
20 disp ( ’V ’ , VCE1 *1 , ”VCE1=” ) ;
21 VE2 = VC1 -( - VBE ) ;
22 IE2 =( VCC - VE2 ) / R6 ;
23 IC2 = IE2 ;
24 VC2 = IC2 * R5 ;
25 VCE2 = VC2 - VE2 ;
26 disp ( ’V ’ , VCE2 *1 , ”VCE2=” ) ;
27 re1 =25/ IE1 *10** -3;
28 re2 =25/ IE2 *10** -3;
29 Ri2 = B2 *( re2 + R6 ) ;

107
30 R01 =( R3 * Ri2 ) /( R3 + Ri2 ) ;
31 Av1 = R01 /( re1 + R4 ) ;
32 disp ( Av1 *1 , ”Av1=” ) ;
33 Av2 =1;
34 disp ( Av2 *1 , ”Av2=” ) ;
35 Av = Av1 * Av2 ;
36 disp ( Av *1 , ”Av=” ) ;

Scilab code Exa 21.9 gain emitter diode resistance

1 clc ;
2 VCC =10;
3 R1 =30*10**3;
4 R2 =20*10**3;
5 RE =1.5*10**3;
6 B1 =150;
7 B2 =100;
8 VBE =0.7;
9 Ai = B1 * B2 ;
10 disp ( Ai ) ;
11 VR2 = VCC *( R2 /( R1 + R2 ) ) ;
12 VB2 = VR2 - VBE ;
13 VE2 = VB2 - VBE ;
14 IE2 = VE2 / RE ;
15 re2 =25/( IE2 *10**3) ;
16 disp ( ’ ohm ’ , re2 *1 , ” r e 2=” ) ;
17 Ib2 = IE2 / B2 ;
18 IE1 = Ib2 ;
19 re1 =25/( IE1 *10**3) ;
20 disp ( ’ ohm ’ , re1 *1 , ” r e 1=” ) ;
21 Ri1 =( R1 * R2 ) /( R1 + R2 ) ;
22 disp ( ’Kohm ’ , Ri1 *10** -3 , ” Ri1=” ) ;
23 Av = RE /(( re1 / B2 ) +( re2 + RE ) ) ;
24 disp ( Av ) ;

108
Chapter 22

FET AMPLIFIERS

Scilab code Exa 22.1 vdc vgs

1 clc ;
2 // e . g 2 2 . 1
3 ID =5*10** -3;
4 VDD =10;
5 RD =1*10**3;
6 RS =500;
7 VS = ID * RS ;
8 disp ( ’V ’ , VS *1 , ”VS=” ) ;
9 VD = VDD - ID * RD ;
10 disp ( ’V ’ , VD *1 , ”VD=” ) ;
11 VDS = VD - VS ;
12 disp ( ’V ’ , VDS *1 , ”VDS=” ) ;
13 VGS = - VS ;
14 disp ( ’V ’ , VGS *1 , ”VGS=” ) ;

Scilab code Exa 22.2 R1

1 clc ;

109
2 // e . g 2 2 . 2
3 RD =56*10**3;
4 RG =1*10**6;
5 IDSS =1.5*10** -3;
6 VP = -1.5;
7 VD =10;
8 VDD =20;
9 ID = VD / RD ;
10 disp ( ’mA ’ , ID *10**3 , ” ID=” ) ;
11 // ID=IDSS ∗(1 −(VGS/VP) ) ∗∗2
12 VGS = VP *(1 - sqrt ( ID / IDSS ) ) ;
13 disp ( ’V ’ , VGS *1 , ”VGS=” ) ;
14 VS = VGS ;
15 R1 =( - VS / ID ) -4*10**3;
16 disp ( ’ kohm ’ , R1 *10** -3 , ”R1=” ) ;

Scilab code Exa 22.3 RS and RD

1 clc ;
2 // e . g 2 2 . 3
3 ID =1.5*10** -3;
4 VDS =10;
5 IDSS =5*10** -3;
6 VP = -2;
7 VDD =20;
8 // ID=IDSS ∗(1 −(VGS/VP) ) ∗∗2
9 VGS = VP *(1 -( ID / IDSS ) ) ;
10 VS = - VGS ;
11 RS =( VS / ID ) ;
12 disp ( ’ ohm ’ , RS *1 , ”RS=” ) ;
13 RD =(( VDD - VDS ) / ID ) - RS ;
14 disp ( ’Kohm ’ , RD *10** -3 , ”RD=” ) ;

110
Scilab code Exa 22.5 RD and RS

1 clc ;
2 // e . g22 . 5
3 VP =5;
4 IDSS =12*10** -3;
5 VDD =12;
6 ID =4*10** -3;
7 VDS =6;
8 VGS = VP *(1 - sqrt ( ID / IDSS ) ) ;
9 VS = VGS ;
10 RS = VS / ID ;
11 disp ( ’ ohm ’ , RS *1 , ”RS=” ) ;
12 RD = VDS / ID ;
13 disp ( ’Kohm ’ , RD *10** -3 , ”RD=” )

Scilab code Exa 22.6 self bias operation point

1 clc ;
2 // e . g 2 2 . 6
3 IDSS =10*10** -3;
4 VDD =20;
5 IDQ = IDSS /2;
6 disp ( ’mA ’ , IDQ *10**3 , ” ID=” ) ;
7 VDSQ = VDD /2;
8 disp ( ’V ’ , VDSQ *1 , ”VDS=” ) ;
9 VGS = -2.2;
10 RD =( VDD - VDSQ ) / IDQ ;
11 disp ( ’Kohm ’ , RD *10** -3 , ”RD=” ) ;
12 RS = - VGS / IDQ ;
13 disp ( ’ ohm ’ , RS *1 , ”RS=” ) ;

Scilab code Exa 22.7 VGS and VDS

111
1 clc ;
2 // e . g 2 2 . 7
3 VDD =20;
4 RD =2.5*10**3;
5 RS =1.5*10**3;
6 R1 =2*10**6;
7 R2 =250*10**3;
8 ID =4*10** -3;
9 VG =( R2 * VDD ) /( R1 + R2 ) ;
10 VS = ID * RS ;
11 VGS = VG - VS ;
12 disp ( ’V ’ , VGS *1 , ”VGS=” ) ;
13 VD = VDD - ID * RD ;
14 VDS = VD - VS ;
15 disp ( ’V ’ , VDS *1 , ”VDS=” ) ;

Scilab code Exa 22.8 voltage gain

1 clc ;
2 // e . g22 . 8
3 gm =4*10** -3;
4 RD =1.5*10**3;
5 AV = - gm * RD ;
6 disp ( AV ) ;

Scilab code Exa 22.9 voltage gain

1 clc ;
2 // e . g 2 2 . 9
3 gm =2.5*10** -3;
4 rd =500*10**3;
5 RD =10*10**3;
6 rL =( RD * rd ) /( rd + RD ) ;

112
7 disp ( ’ 1 0 ˆ 3 ohm ’ , rL *10** -3 , ” rL=” ) ;
8 AV = - gm * rL ;
9 disp ( AV ) ;

Scilab code Exa 22.10 voltage gain

1 clc ;
2 // e . g 2 2 . 1 0
3 gm =2*10** -3;
4 rd =40*10**3;
5 RD =20*10**3;
6 RG =100*10**6;
7 rL =( RD * rd ) /( RD + rd ) ;
8 Av = - gm * rL ;
9 disp ( Av ) ;
10 Ri = RG ;
11 disp ( ’Mohm ’ , Ri *10** -6 , ” Ri=” ) ;
12 Ro = rL ;
13 disp ( ’Kohm ’ , Ro *10** -3 , ”Ro=” ) ;

Scilab code Exa 22.11 voltage gain

1 clc ;
2 // e . g 2 2 . 1 1
3 gm =2*10** -3;
4 rd =10*10**3;
5 RD =50*10**3;
6 rl =( rd * RD ) /( rd + RD ) ;
7 Av = - gm * rl ;
8 disp ( Av ) ;

113
Scilab code Exa 22.12 voltage gain

1 clc ;
2 // e . g 2 2 . 1 2
3 RD =100*10**3;
4 gm =1.6*10** -3;
5 rd =44*10**3;
6 Cgs =3*10** -12;
7 Cds =1*10** -12;
8 Cgd =2.8*10** -12;
9 rl =( RD * rd ) /( RD + rd ) ;
10 Av = - gm * rl ;
11 disp ( Av ) ;

Scilab code Exa 22.13 rms output voltage

1 clc ;
2 // e . g 2 2 . 1 3
3 gm =4500*10** -6;
4 RD =3*10**3;
5 RL =5*10**3;
6 vin =100*10** -3;
7 ID =2*10** -3;
8 rl =( RD * RL ) /( RD + RL ) ;
9 VO = gm * rl * vin ;
10 disp ( ’V ’ , VO *1 , ”VO=” ) ;

Scilab code Exa 22.14 voltage gain

1 clc ;
2 // e . g 2 2 . 1 4 ;
3 gm =4*10** -3;
4 RD =1.5*10**3;

114
5 RG =10*10**6;
6 rs =500;
7 rl = RD ;
8 AV = -( gm * rl ) /(1+ gm * rs ) ;
9 disp ( AV ) ;
10 RL =100*10^3;
11 rL =( RD * RL ) /( RD + RL ) ;
12 AV = -( gm * rL ) /(1+ gm * rs ) ;
13 disp ( AV ) ;

Scilab code Exa 22.15 voltage gain

1 clc ;
2 // e . g 2 2 . 1 5
3 RD =1.5*10**3;
4 RS =750;
5 RG =1*10**6;
6 IDSS =10*10** -3;
7 VP = -3.5;
8 IDQ =2.3*10** -3;
9 VGSQ = -1.8;
10 gmo = -2* IDSS / VP ;
11 gm = gmo *(1 -( VGSQ / VP ) ) ;
12 rL = RD ;
13 AV = -( gm * rL ) /(1+ gm * RS ) ;
14 disp ( AV ) ;
15 AV = - gm * rL ;
16 disp ( AV ) ;

Scilab code Exa 22.16 voltage gain and input output resistance

1 clc ;
2 // e . g 2 2 . 1 6

115
3 gm =8000*10** -6;
4 RS =10*10**3;
5 RG =100*10**6;
6 (1/ gm ) ;
7 AV = RS /( RS +(1/ gm ) ) ;
8 disp ( AV ) ;
9 Ri = RG ;
10 Ro =1/ gm ;
11 disp ( ’ ohm ’ , Ro *1 , ”Ro=” ) ;

Scilab code Exa 22.17 voltage gain and resistance

1 clc ;
2 // e . g 2 2 . 1 7
3 vin =2*10** -3;
4 gm =5500*10** -6;
5 R1 =1*10**6;
6 R2 =1*10**6;
7 RS =5000;
8 RL =2000;
9 (1/ gm ) ;
10 AV = RS /( RS +(1/ gm ) ) ;
11 disp ( AV ) ;
12 Ri =( R1 * R2 ) /( R1 + R2 ) ;
13 disp ( ’Mohm ’ , Ri *10** -6 , ” Ri=” ) ;
14 Ro =( RS / gm ) /( RS +1/ gm ) ;
15 disp ( ’ ohm ’ , Ro *1 , ”Ro=” ) ;
16 Vo =( RL /( RL + Ro ) ) *( AV * vin ) ;
17 disp ( ’mV ’ , Vo *10**3 , ”Vo=” ) ;

Scilab code Exa 22.18 voltage gain and input resistance

1 clc ;

116
2 // e . g 2 2 . 1 8
3 gm =2500*10** -6;
4 Ri =2000;
5 RD =10000;
6 AV = gm * RD ;
7 disp ( AV ) ;
8 Ri1 =( Ri / gm ) /( Ri +1/ gm ) ;
9 disp ( ’ ohm ’ , Ri1 *1 , ” Ri1=” ) ;

Scilab code Exa 22.19 output resistance

1 clc ;
2 // e . g 2 2 . 1 9
3 gm =2*10** -3;
4 rd =50*10**3;
5 Rs =1*10**3;
6 Ro =( Rs / gm ) /( Rs +1/ gm ) ;
7 disp ( ’ ohm ’ , Ro *1 , ”Ro=” ) ;

Scilab code Exa 22.20 input resistance and ac voltage gain

1 clc ;
2 // e . g 2 2 . 2 0
3 gmo =5*10^ -3;
4 RD =1*10**3;
5 Rs =200;
6 ID =5*10** -3;
7 Ri1 =( Rs / gmo ) /( Rs +1/ gmo ) ;
8 disp ( ’ ohm ’ , Ri1 *1 , ” Ri1=” ) ;
9 Vs = ID * Rs ;
10 disp ( ’V ’ , Vs *1 , ” Vs=” ) ;
11 VGS = Vs ;
12 IDSS =2* ID ;

117
13 VGSo =( -2* IDSS ) / ID ;
14 gm = gmo *(1 - VGS / - VGSo ) ;
15 Av = gm * RD ;
16 disp ( Av ) ;

118
Chapter 23

AMPLIFIERS WITH
COMPOUND
CONFIGURATION

Scilab code Exa 23.1 voltage gain and impedance

1 clc ;
2 ID =4*10** -3;
3 IDSS =2* ID ;
4 RS =390;
5 VGSQ = - ID * RS ;
6 VP = -4.5;
7 RD =2.2*10**3;
8 gm0 =(2* IDSS ) /( - VP ) ;
9 gm = gm0 *(1 -( VGSQ / VP ) ) ;
10 Av1 = - gm * RD ;
11 Av2 = - gm * RD ;
12 Av = Av1 * Av2 ;
13 disp ( Av ) ;
14 vi =20*10** -3;
15 vo = Av * vi ;
16 disp ( ’mV ’ , vo *10**3 , ” vo=” ) ;
17 Zi =10*10**6;

119
18 RG =10*10**6;
19 disp ( ’Mohm ’ , Zi *10** -6 , ” Z i=RG=” ) ;
20 Z0 =2.2*10**3;
21 RD =2.2*10**3;
22 disp ( ’Kohm ’ , Z0 *10** -3 , ” Z0=RD=” ) ;
23 RL =10*10**3;
24 VL =( RL /( Z0 + RL ) ) * vo ;
25 disp ( ’V ’ , VL *10**3 , ”VL=” ) ;

Scilab code Exa 23.3 voltage gain

1 clc ;
2 VCC =18;
3 R1 =7.5*10**3;
4 R2 =6.2*10**3;
5 R3 =3.9*10**3;
6 RC =1.5*10**3;
7 B1 =200;
8 B2 =200;
9 RE =1*10**3;
10 CE =100*10** -6;
11 VB1 = VCC *( R2 + R3 ) /( R1 + R2 + R3 ) ;
12 disp ( ’V ’ , VB1 *1 , ”VB1=” ) ;
13 VB2 = VCC *( R3 ) /( R1 + R2 + R3 ) ;
14 disp ( ’V ’ , VB2 *1 , ”VB2=” ) ;
15 IE2 =( VB2 -0.7) / RE ;
16 IC2 = IE2 ;
17 IE1 = IC2 ;
18 IE = IE1 ;
19 re1 =26*10** -3/ IE ;
20 AV1 = - re1 / re1 ;
21 AV2 = - RC / re1 ;
22 AV = AV1 * AV2 ;
23 disp ( AV ) ; // a n s g i v e n i n book h a s −ve s i g n which i s
wrong

120
Scilab code Exa 23.4 current gain

1 clc ;
2 B1 =160;
3 B2 =160;
4 BD = B1 * B2 ;
5 disp ( BD ) ;

Scilab code Exa 23.5 CURRENT GAIN

1 clc ;
2 BD =6000;
3 B1 = BD ;
4 B2 = B1 ;
5 B = sqrt ( BD ) ;
6 disp ( B ) ;

Scilab code Exa 23.6 VE2 IE2 voltage gain

1 clc ;
2 Vcc =15;
3 RB =2.4*10**6;
4 BD =6000;
5 RE =510;
6 Vi =120*10** -3;
7 VBE =1.6;
8 IB =( Vcc - VBE ) /( RB + BD * RE ) ;
9 disp ( ’ microA ’ , IB *10**6 , ” IB=” ) ;
10 IE = BD * IB ;

121
11 disp ( ’mA ’ , IE *10**3 , ” IE=” ) ;
12 IE2 = IE
13 VE2 = IE2 * RE ;
14 disp ( ’V ’ , VE2 *1 , ”VE2=” ) ;

Scilab code Exa 23.7 zmatrix

1 clc ;
2 hfe =100;
3 B =100;
4 BD =100**2;
5 RE =1*10**3;
6 hie =1*10**3;
7 ri =10**3;
8 Ri = ri + BD * RE ;
9 disp ( ’Mohm ’ , Ri *10** -6 , ” Ri=” ) ;
10 Ro = ri / BD ;
11 disp ( ’ ohm ’ , Ro *1 , ”Ro=” ) ;

Scilab code Exa 23.8 dc bias currents and voltages

1 clc ;
2 VCC =16;
3 B1 =160;
4 B2 =200;
5 RB =1.5*10**6;
6 Vi =120*10** -3;
7 VEB1 =0.7;
8 RC =100;
9 IB1 =( VCC - VEB1 ) /( RB + B1 * B2 * RC ) ;
10 IB2 = B1 * IB1 ;
11 IC2 = B2 * IB2 ;
12 IE1 = IB2 ;

122
13 IC = IE1 + IC2 ;
14 Vodc = VCC - IC * RC ;
15 VBE =0.7;
16 Vidc = Vodc - VBE ;
17 disp ( ’V ’ , Vidc *1 , ” Vidc=” ) ;

Scilab code Exa 23.9 load current and output voltage

1 clc ;
2 VDD =18;
3 RD =2*10**3;
4 IDSS =6*10** -3;
5 VP = -3;
6 ID = IDSS ;
7 disp ( ’mA ’ , ID *10**3 , ” ID=” ) ;
8 Vo = VDD - ID * RD ;
9 disp ( ’V ’ , Vo *1 , ”Vo=” ) ;

Scilab code Exa 23.10 calculate the value of constant current

1 clc ;
2 VEE = -18;
3 R1 =4.3*10**3;
4 R2 =4.3*10**3;
5 RE =1.8*10**3;
6 B =100;
7 VB = -( - VEE * R2 ) /( R1 + R2 ) ;
8 VE = VB -0.7
9 IE =( VE -( VEE ) ) / RE ;
10 disp ( ’mA ’ , IE *10**3 , ” IE=” ) ;

123
Scilab code Exa 23.11 current

1 clc ;
2 VZ =5.1;
3 VBE =0.7;
4 RE =1.2*10**3;
5 B =200;
6 I =( VZ - VBE ) / RE ;
7 disp ( ’mA ’ ,I *10**3 , ” I=” ) ;

Scilab code Exa 23.12 current

1 clc ;
2 VCC =18;
3 Rx =2*10**3;
4 VBE =0.7;
5 Ix =( VCC - VBE ) / Rx ;
6 I = Ix ;
7 disp ( ’mA ’ ,I *10**3 , ” I=” ) ;

Scilab code Exa 23.13 value of current

1 clc ;
2 VC =5;
3 Re =2*10**3;
4 VCC =6;
5 R =2.2*10**3;
6 VBE =0.7;
7 B =100;
8 I = ” IO ” ;
9 I =( VCC -2* VBE ) / Re ;
10 disp ( ’mA ’ ,I *10**3 , ” I=” ) ;
11 Re =1*10**3;

124
12 I =( VCC -2* VBE ) / Re ;
13 disp ( ’mA ’ ,I *10**3 , ” I=” ) ;
14 Re =4*10**3;
15 I =( VCC -2* VBE ) / Re ;
16 disp ( ’mA ’ ,I *10**3 , ” I=” ) ;

Scilab code Exa 23.14 dc voltage and current

1 clc ;
2 VCC =15;
3 VEE =15;
4 RE =3.9*10**3;
5 RC =4.7*10**3;
6 IE =( VEE -0.7) / RE ;
7 disp ( ’mA ’ , IE *10**3 , ” IE=” ) ;
8 IC = IE /2;
9 disp ( ’mA ’ , IC *10**3 , ” IC=” ) ;
10 VC = VCC - IC * RC ;
11 disp ( ’V ’ , VC *1 , ”VC=” ) ;

Scilab code Exa 23.15 IC AV VO1

1 clc ;
2 VCC =12;
3 VEE =12;
4 RE =33*10**3;
5 RC1 =36*10**3;
6 RC2 =36*10**3;
7 B1 =150;
8 B2 =150;
9 vi1 =2*10** -3;
10 IE =( VEE -0.7) / RE ;
11 disp ( ’mA ’ , IE *10**3 , ” IE=” ) ;

125
12 IC = IE /2;
13 disp ( ’mA ’ , IC *10**3 , ” IC=” ) ;
14 RC =36*10**3;
15 VC = VCC - IC * RC ;
16 disp ( ’V ’ , VC *1 , ”VC=” ) ;
17 re1 =25*10** -3/ IE ;
18 Av = RC /(2* re1 ) ;
19 disp ( Av ) ;
20 vo1 = Av * vi1 ;
21 disp ( ’V ’ , vo1 *1 , ” vo1=” ) ;

Scilab code Exa 23.16 common mode voltage gain

1 clc ;
2 B =200;
3 ri =20*10**3;
4 RC =47*10**3;
5 RE =43*10**3;
6 Ac =( B * RE ) /( ri +2*( B +1) * RE ) ;
7 disp ( Ac ) ;

126
Chapter 24

FREQUENCY RESPONSE OF
BJT AND JFET AMPLIFIERS

Scilab code Exa 24.1 power gain

1
2 clc ;
3 Pi =5;
4 Po =100;
5 G =10* log10 ( Po / Pi ) ;
6 disp ( ’ dB ’ ,G *1 , ”G=” ) ;

Scilab code Exa 24.2 power gain

1
2 clc ;
3 Pi =5*10** -3;
4 Po =1;
5 G =10* log10 ( Po / Pi ) ;
6 disp ( ’ dB ’ ,G *1 , ”G=” ) ; // a n s g i v e n i n t h e book i s wrong

127
Scilab code Exa 24.3 power gain

1
2 clc ;
3 Pi =20*10** -6;
4 Po =100*10** -6;
5 G =10* log10 ( Po / Pi ) ;
6 disp ( ’ dB ’ ,G *1 , ”G=” ) ;

Scilab code Exa 24.4 power gain

1
2 clc ;
3 Po =25;
4 G =10* log10 ( Po /(1*10** -3) ) ;
5 disp ( ’ dB ’ ,G *1 , ”G=” ) ;

Scilab code Exa 24.5 gain

1
2 clc ;
3 V2 =100;
4 V1 =25;
5 G =10* log10 ( V2 / V1 ) ;
6 disp ( ’ dB ’ ,G *1 , ”G=” ) ;

Scilab code Exa 24.8 frequency response

128
Figure 24.1: frequency response

1
2 clc ;
3 R =5*10**3;
4 C =0.1*10** -6;
5 f1 =1/(2* %pi * R * C ) ;
6 disp ( ’HZ ’ , f1 *1 , ” f 1=” ) ;
7 i = -21:3:0;
8 plot2d ( i ) ;
9 a = gca () // g e t t h e c u r r e n t a x e s
10 a . box = ” o f f ” ;
11 a . x_location = ” t o p ” ;
12 xlabel ( ” f ( l o g s c a l e ) ” ) ;
13 ylabel ( ”Av ( dB ) ” ) ;

129
Figure 24.2: FREQUENCY AND PLOT

Scilab code Exa 24.9 FREQUENCY AND PLOT

1
2 clc ;
3 RC =4*10**3;
4 R1 =40*10**3;
5 R2 =10*10**3;
6 RE =2*10**3;
7 RS =1*10**3;
8 RL =2.2*10**3;
9 CS =10*10** -6;
10 CE =20*10** -6;
11 CC =1*10** -6;
12 B =100;
13 VCC =20;
14 VB =( R2 * VCC ) /( R2 + R1 ) ;
15 IE =( VB -0.7) / RE ;
16 re =(26*10** -3) / IE ;
17 B * re ;
18 vo = -( RC * RL ) /( RC + RL ) ;

130
19 Av = vo / re ;
20 a =( R1 * R2 ) /( R1 + R2 ) ;
21 Ri =( a *( B * re ) ) /( a +( B * re ) ) ;
22 Rs =1*10**3;
23 vibyvs = Ri /( Ri + Rs ) ;
24 Avs = Av * vibyvs ;
25 a =( R1 * R2 ) /( R1 + R2 ) ;
26 Ri =( a *( B * re ) ) /( a +( B * re ) ) ;
27 fLS =1/(2* %pi *( Rs + Ri ) * CS ) ;
28 disp ( ’HZ ’ , fLS *1 , ” fLS=” ) ;
29 fLC =1/(2* %pi *( RC + RL ) * CC ) ;
30 disp ( ’HZ ’ , fLC *1 , ” fLC=” ) ;
31 a =( R1 * R2 ) /( R1 + R2 ) ;
32 RS =( a * RS ) /( a + RS ) ;
33 b =( RS / B + re ) ;
34 Re =( RE * b ) /( RE + b ) ;
35 fLE =1/(2* %pi * Re * CE ) ;
36 disp ( ’HZ ’ , fLE *1 , ” fLE=” ) ;
37 i = -21:3:0;
38 plot2d ( i ) ;
39 a = gca () // g e t t h e c u r r e n t a x e s
40 a . box = ” o f f ” ;
41 a . x_location = ” t o p ” ;
42 xlabel ( ” f ( l o g s c a l e ) ” ) ;
43 ylabel ( ”Av ( dB ) ” ) ;

131
Chapter 25

LARGE SIGNAL OR POWER


AMPLIFIERS

Scilab code Exa 25.1 collector current and Vce

1 clc ;
2 VCC =10;
3 R1 =10*10**3;
4 R2 =5*10**3;
5 RC =1*10**3;
6 RE =500;
7 RL =1.5*10**3;
8 B =100;
9 VBE =0.7;
10 VR2 = VCC *( R2 /( R1 + R2 ) ) ;
11 IEQ =( VR2 - VBE ) / RE ;
12 ICQ = IEQ ;
13 VCEQ = VCC - ICQ *( RC + RE ) ;
14 rL =( RC * RL ) /( RC + RL ) ;
15 ICsat = ICQ +( VCEQ / rL ) ;
16 disp ( ’mA ’ , ICsat *10**3 , ” I C s a t=” ) ;
17 VCEsat =0;
18 disp ( VCEsat ) ;
19 ICcutoff =0;

132
20 disp ( ICcutoff ) ;
21 VCEcutoff = VCEQ + ICQ * rL ;
22 disp ( ’V ’ , VCEcutoff , ” VC Ecuto ff=” ) ;

Scilab code Exa 25.2 COMPLIANCE

1 clc ;
2 VCC =20;
3 R1 =10*10**3;
4 R2 =1.8*10**3;
5 RC =620;
6 RE =200;
7 RL =1.2*10**3;
8 hfe =180;
9 VB = VCC *( R2 /( R1 + R2 ) ) ;
10 VBE =0.7;
11 VE = VB - VBE ;
12 IE = VE / RE ;
13 IC = IE ;
14 VCE = VCC - IE *( RC + RE ) ;
15 ICQ = IC ;
16 VCEQ = VCE ;
17 rL =( RC * RL ) /( RC + RL ) ;
18 PP =2* ICQ * rL ;
19 disp ( ’V ’ ,PP , ”PP=” ) ;
20 PP =2* VCEQ ;
21 disp ( ’V ’ ,PP , ”PP=” ) ;

Scilab code Exa 25.3 voltage gain and power gain

1 clc ;
2 re =8;
3 RC =220;

133
4 RE =47;
5 R1 =4.7*10**3;
6 R2 =470;
7 B =50;
8 rL = RC ;
9 AV = rL / re ;
10 Ai = B ;
11 Ap = AV * Ai ;
12 disp ( Ap ) ;

Scilab code Exa 25.4 collector efficiency and power rating of transistor

1 clc ;
2 Ptrdc =20;
3 Poac =5;
4 ne =( Poac / Ptrdc ) ;
5 disp ( ’% ’ , ne *100 , ” ne=” ) ;
6 ” power r a t i n g o f t r a n s i s t o r =20W” ;

Scilab code Exa 25.5 ac power

1
2 clc ;
3 pcdc =10;
4 nc =0.32;
5 poac = pcdc * nc /(1 - nc ) ;
6 disp ( ’W’ , poac , ” p o a c=” ) ;

Scilab code Exa 25.6 power dissipated

134
1 clc ;
2 nc =0.5;
3 VCC =24;
4 Poac =3.5;
5 Ptrdc = Poac / nc ;
6 disp ( ’W’ , Ptrdc , ” P t r d c=” ) ;
7 Pcdc = Ptrdc - Poac ;
8 disp ( ’W’ , Pcdc , ” Pcdc=” ) ;

Scilab code Exa 25.7 power and efficiency

1 clc ;
2 VCC =20;
3 VCEQ =10;
4 ICQ =600*10** -3;
5 RL =16;
6 IP =300*10** -3;
7 Pindc = VCC * ICQ ;
8 disp ( ’W’ , Pindc , ” P i n d c=” ) ;
9 PRLdc = ICQ **2* RL ;
10 disp ( ’W’ , PRLdc , ”PRLdc=” ) ;
11 I = IP / sqrt (2) ;
12 Poac = I **2* RL ;
13 disp ( ’W’ , Poac , ” Poac=” ) ;
14 Ptrdc = Pindc - PRLdc ;
15 disp ( ’W’ , Ptrdc , ” P t r d c=” ) ;
16 Pcdc = Ptrdc - Poac ;
17 disp ( ’W’ , Pcdc , ” Pcdc=” ) ;
18 no = Poac / Pindc ;
19 disp ( ’% ’ , no *100 , ” no=” ) ;
20 no = Poac / Ptrdc ;
21 disp ( ’% ’ , no *100 , ” no=” ) ;

135
Scilab code Exa 25.8 resistance

1 clc ;
2 a =15;
3 RL =8;
4 RL1 = a **2* RL ;
5 disp ( ’Kohm ’ , RL1 *10** -3 , ”RL1=” ) ;

Scilab code Exa 25.9 turns ratio

1 clc ;
2 RL =16;
3 RL1 =10*10**3;
4 a = sqrt ( RL1 / RL ) ;
5 disp ( a ) ;

Scilab code Exa 25.10 max power

1 clc ;
2 RL =8;
3 a =10;
4 ICQ =500*10** -3;
5 RL = a **2* RL ;
6 Poac =(1/2) * ICQ **2* RL ;
7 disp ( ’W’ , Poac , ” Poac=” ) ;

Scilab code Exa 25.11 ac output power ICQ turns ratio

1 clc ;
2 Ptrdc =100*10** -3;

136
3 VCC =10;
4 RL =16;
5 no =0.5;
6 Poac = no * Ptrdc ;
7 disp ( ’mW’ , Poac *10**3 , ” Poac=” ) ;
8 ICQ =2* Poac / VCC ;
9 disp ( ’A ’ ,ICQ , ”ICQ=” ) ;
10 RL1 = VCC / ICQ ;
11 a = sqrt ( RL1 / RL ) ;
12 disp ( a ) ;

Scilab code Exa 25.12 power

1 clc ;
2 VCC =10;
3 IP =50*10** -3;
4 RL =4;
5 I = IP / sqrt (2) ;
6 Poac = I ^2* RL ;
7 disp ( ’mW’ , Poac *10**3 , ” Poac=” ) ;
8 ICQ = IP ;
9 RL1 = VCC / ICQ ;
10 a = sqrt ( RL1 / RL ) ;
11 disp ( a ) ;
12 V1 = VCC ;
13 V2 = V1 / a ;
14 I2p = V2 / RL ;
15 I2 = I2p / sqrt (2) ;
16 P =( I2 ^2) * RL ;
17 disp ( ’mW’ ,P *10**3 , ”P=” ) ;

Scilab code Exa 25.13 power

137
1 clc ;
2 RL =8;
3 VP =16;
4 P =( VP ^2) /(2* RL ) ;
5 disp ( ’W’ ,P , ”P=” ) ;

Scilab code Exa 25.14 PinDC PoAC

1 clc ;
2 no =0.6;
3 Pcdc =2.5;
4 // Poac=P i n d c ∗ no ;
5 // P i n d c =2∗ Pcdc+Poac ;
6 Pindc =(2* Pcdc ) /(1 - no ) ;
7 disp ( ’W’ , Pindc , ” P i n d c=” ) ;
8 Poac =0.6* Pindc ;
9 disp ( ’W’ , Poac , ” Poac=” ) ;

138
Chapter 26

TUNED AMPLIFIERS

Scilab code Exa 26.1 frequency

1 clc ;
2 // e . g 2 6 . 1
3 L =150*10** -6;
4 C =100*10** -12;
5 fo =0.159/ sqrt ( L * C ) ;
6 disp ( ’MHZ ’ , fo *10** -6 , ” f o ” ) ;

Scilab code Exa 26.2 frequency and impedance

1 clc ;
2 // e . g 2 6 . 2
3 L =100*10** -6;
4 C =100*10** -12;
5 R =5;
6 fo =0.159/ sqrt ( L * C ) ;
7 disp ( ’MHZ ’ , fo *10** -6 , ” f o=” ) ;
8 Zp = L /( C * R ) ;
9 disp ( ’Kohm ’ , Zp *10** -3 , ”Zp=” ) ;

139
Scilab code Exa 26.3 bandwidth

1 clc ;
2 // e . g 2 6 . 3
3 fo =1*10**6;
4 Qo =100;
5 BW = fo / Qo ;
6 disp ( ’ kHZ ’ , BW *10** -3 , ”BW=” ) ;

Scilab code Exa 26.4 Q factor

1 clc ;
2 // e . g 2 6 . 4
3 fo =1600*10**3;
4 BW =10*10**3;
5 Qo = fo / BW ;
6 disp ( Qo ) ;

Scilab code Exa 26.5 Q factor

1 clc ;
2 // e . g 2 6 . 5
3 fo =2*10**6;
4 BW =50*10**3;
5 Qo = fo / BW ;
6 disp ( Qo ) ;

140
Scilab code Exa 26.6 impedance

1 clc ;
2 // e . g 2 6 . 6
3 fo =455*10**3;
4 BW =10*10**3;
5 XL =1255;
6 Qo = fo / BW ;
7 R = XL / Qo ;
8 L = XL /(2* %pi * fo ) ;
9 C =1/( XL *2* %pi * fo ) ;
10 Zp = L /( C * R ) ;
11 disp ( ’Kohm ’ , Zp *10** -3 , ”Zp=” ) ;

141
Chapter 27

FEEDBACK AMPLIFIERS

Scilab code Exa 27.1 voltage gain

1 clc ;
2 // e . g 2 7 . 1
3 AV =400;
4 beta =0.1;
5 AV1 = AV /(1+ beta * AV ) ;
6 disp ( AV1 ) ;

Scilab code Exa 27.2 fraction of output

1 clc ;
2 // e . g 2 7 . 2
3 AV =1000;
4 AV1 =10;
5 beta =(( AV / AV1 ) -1) / AV ;
6 disp ( beta ) ;

142
Scilab code Exa 27.3 feedback

1 clc ;
2 // e . g 2 7 . 3
3 AV =100;
4 AV1 =20;
5 beta =(( AV / AV1 ) -1) / AV ;
6 disp ( beta ) ;

Scilab code Exa 27.4 voltage gain and beta

1 clc ;
2 // e . g 2 7 . 4
3 Vo =12.5;
4 Vin1 =1.5;
5 Vin =0.25;
6 AV = Vo / Vin ;
7 disp ( AV ) ;
8 AV1 = Vo / Vin1 ;
9 beta =(( AV / AV1 ) -1) / AV ;
10 disp ( beta ) ;

Scilab code Exa 27.5 beta

1 clc ;
2 // e . g 2 7 . 5
3 AV =60;
4 AV1 =80;
5 // 80=AV/(1 −BETA∗AV)
6 beta =(( AV1 / AV ) -1) / AV1 ;
7 disp ( beta , ” b e t a=” ) ;
8 beta =1/ AV ;
9 disp ( beta , ” b e t a=” ) ;

143
Scilab code Exa 27.6 beta

1 clc ;
2 // e . g 2 7 . 6
3 AV1 =100;
4 Vin =50*10** -3;
5 Vin1 =0.6;
6 Vo = AV1 * Vin1 ;
7 Av = Vo / Vin ;
8 disp ( Av ) ;
9 beta =(( Av / AV1 ) -1) / Av ;
10 disp ( ’ ∗10ˆ −3 ’ , beta *10**3 , ” b e t a=” ) ;

Scilab code Exa 27.7 change in closed loop gain

1
2 clc ;
3 Av =800;
4 B =0.05;
5 dAvbyAv =20;
6 a = dAvbyAv *(1/(1+ B * Av ) ) ;
7 disp ( ’% ’ ,a *1 , ” a=” ) ;

Scilab code Exa 27.8 values of AV and beta

1 clc ;
2 AV1 =100;
3 A =0.01;
4 B =0.2;

144
5 C=B/A;
6 AV = AV1 * C ;
7 beta = C / AV ;
8 disp ( beta , ” b e t a=” ) ;

Scilab code Exa 27.9 gain and beta

1 clc ;
2 // e . g 2 7 . 9
3 AV =100;
4 BW =200*10**3;
5 beta =0.05;
6 BW1 =(1+ beta * AV ) * BW ;
7 disp ( ’KHZ ’ , BW1 *10^ -3 , ”BW1=” ) ;
8 AV1 = AV /(1+ beta * AV ) ;
9 disp ( AV1 ) ;
10 // 1∗10∗∗6=(1+ b e t a 1 ∗AV) ∗BW;
11 beta1 =(((1*10**6) /(200*10**3) ) -1) /100;
12 disp ( beta1 ) ;

Scilab code Exa 27.10 bw

1 clc ;
2 // e . g 2 7 . 1 0
3 AV =1500;
4 BW =4*10**6;
5 AV1 =150;
6 beta =((1500/150) -1) /1500;
7 disp ( beta ) ;
8 BW1 =(1+ beta * AV ) * BW ;
9 disp ( ’MHZ ’ , BW1 *10** -6 , ”BW1=” ) ;

145
Scilab code Exa 27.11 frequency

1 clc ;
2 // e . g 2 7 . 1 1
3 Rin =4.2*10**3;
4 AV =220;
5 beta =0.01;
6 Ri =(1+ beta * AV ) * Rin ;
7 disp ( ’Kohm ’ , Ri *10** -3 , ” Ri=” ) ;
8 F1 =1.5*10**3;
9 FC1 = F1 /(1+ beta * AV ) ;
10 disp ( ’HZ ’ ,FC1 , ”FC1=” ) ;
11 F2 =501.5*10**3;
12 FC2 =(1+ beta * AV ) * F2 ;
13 disp ( ’KHZ ’ , FC2 *10** -3 , ”FC2=” ) ;

Scilab code Exa 27.12 gain and distortion gain

1 clc ;
2 // e . g 2 7 . 1 2
3 AV =1000;
4 f1 =50;
5 f2 =200*10**3;
6 D =0.05;
7 beta =0.01;
8 AV1 = AV /(1+ beta * AV ) ;
9 disp ( AV1 ) ;
10 fl1 = f1 /(1+ beta * AV ) ;
11 disp ( ’HZ ’ ,fl1 , ” f l 1 =” ) ;
12 fu2 =(1+ beta * AV ) * f2 ;
13 disp ( ’MHZ ’ , fu2 *10** -6 , ” f u 2=” ) ;
14 D1 = D /(1+ beta * AV ) ;

146
15 disp ( ’% ’ , D1 *100 , ”D1=” ) ;

Scilab code Exa 27.13 beta and gain

1 clc ;
2 // e . g 2 7 . 1 3
3 AV =100;
4 RDN =0.8;
5 // 0.8=1 −(1/(1+ b e t a ∗AV) ) ;
6 beta =((1/0.2) -1) /100;
7 disp ( beta ) ;
8 AV1 = AV /(1+ beta * AV ) ;
9 disp ( AV1 ) ;

Scilab code Exa 27.14 voltage gain and resistance

1 clc ;
2 // e . g 2 7 . 1 4
3 AV =300;
4 Ri =1.5*10**3;
5 R0 =50*10**3;
6 b =1/15;
7 AV1 = AV /(1+ b * AV ) ;
8 disp ( AV1 ) ;
9 Ri1 =(1+ b * AV ) * Ri ; // i n p u t r e s i s t a n c e
10 disp ( ’Kohm ’ , Ri1 *10** -3 , ” Ri1=” ) ;
11 Ri1 = R0 /(1+ b * AV ) ; // o u t p u t r e s i s t a n c e
12 disp ( ’ kohm ’ , Ri1 *10** -3 , ” Ri1=” ) ;

Scilab code Exa 27.15 voltage gain and resistance

147
1 clc ;
2 // e . g 2 7 . 1 5
3 hfe =100;
4 hie =2*10**3;
5 Rc =470;
6 Re1 =100;
7 Re2 =100;
8 R1 =15000;
9 R2 =5600;
10 AV =( hfe * Rc ) / hie ;
11 disp ( AV ) ;
12 a =(( R1 * R2 ) /( R1 + R2 ) ) ;
13 Ri =( a * hie ) /( a + hie ) ;
14 disp ( ’ ohm ’ , Ri *1 , ” Ri=” ) ;
15 b = Re1 / Rc ;
16 AV1 = AV /(1+ b * AV ) ;
17 disp ( AV1 ) ;
18 Ri1 = Ri *(1+ b * AV ) ;
19 disp ( ’OHM’ , Ri1 *1 , ” Ri1=” ) ;

Scilab code Exa 27.16 gain and resistance

1 clc ;
2 // e . g 2 7 . 1 6
3 hfe =99;
4 hie =2*10**3;
5 hie1 =2000;
6 hie2 =2000;
7 Rc =22*10**3;
8 R4 =100;
9 R1 =220*10**3;
10 R2 =22*10**3;
11 RC1 =4.7*10**3;
12 R3 =7.8*10**3;
13 Ri = hie ;

148
14 a =( R1 * R2 ) /( R1 + R2 ) ;
15 b =( a * Rc ) /( a + Rc ) ;
16 R01 =( b * hie1 ) /( b + hie1 )
17 disp ( ’Kohm ’ , R01 *10** -3 , ” R01=” ) ;
18 Ri2 = hie ;
19 C =( R3 + R4 ) ;
20 R02 =( RC1 * C ) /( RC1 + C )
21 disp ( ’Kohm ’ , R02 *10** -3 , ” R02=” ) ;
22 AV1 = hfe * R01 / hie ;
23 AV2 = hfe * R02 / hie ;
24 AV = AV1 * AV2 ;
25 bta = R4 /( R3 + R4 ) ;
26 Ri1 = Ri *(1+ bta * AV ) ;
27 disp ( ’Kohm ’ , Ri1 *10** -3 , ” Ri1=” ) ;
28 RO2 = R02 /(1+ bta * AV ) ;
29 disp ( ’ ohm ’ , RO2 *1 , ”RO2=” ) ;
30 AV1 = AV /(1+ bta * AV ) ;
31 disp ( AV1 ) ;

149
Chapter 28

SINUSOIDAL OSCILLATORS

Scilab code Exa 28.1 inductance

1 clc ;
2 // e . g 2 8 . 1
3 fo =22*10**3;;
4 C =2*10** -9;
5 L =((0.159/ fo ) ^2) / C ;
6 disp ( ’H ’ ,L *1 , ”L=” ) ;

Scilab code Exa 28.2 frequency

1 clc ;
2 // e . g 2 8 . 2
3 fo =2.2*10**6;
4 // f o 1 =( s q r t ( 2 ) ) / s q r t (C) ;
5 fo1 = sqrt (2) * fo ;
6 disp ( ’MHZ ’ , fo1 *10** -6 , ” f o 1=” ) ;

150
Scilab code Exa 28.3 frequency

1 clc ;
2 // e . g 2 8 . 3
3 C =100*10** -12;
4 L1 =30*10** -6;
5 L2 =1*10** -8;
6 fo =1/(2* %pi * sqrt (( L1 + L2 ) * C ) ) ;
7 disp ( ’MHZ ’ , fo *10** -6 , ” f o=” ) ;

Scilab code Exa 28.4 frequency

1 clc ;
2 // e . g 2 8 . 4
3 L1 =1000*10** -6;
4 L2 =100*10** -6;
5 M =20*10** -6;
6 C =20*10** -12;
7 fo =1/(2* %pi * sqrt (( L1 + L2 +2* M ) * C ) ) ;
8 disp ( ’MHZ ’ , fo *10** -6 , ” f o=” ) ;

Scilab code Exa 28.5 frequency

1 clc ;
2 // e . g 2 8 . 5
3 C =1*10** -9;
4 L1 =4.7*10** -3;
5 L2 =47*10** -6;
6 fo =1/(2* %pi * sqrt (( L1 + L2 ) * C ) ) ;
7 disp ( ’KHZ ’ , fo *10** -3 , ” f o=” ) ;

151
Scilab code Exa 28.6 capacitance

1 clc ;
2 // e . g 2 8 . 6
3 L1 =2*10** -3;
4 L2 =20*10** -6;
5 fo =950*10**3;
6 C =1/(4* %pi ^2*( L1 + L2 ) * fo ^2) ;
7 disp ( ’ pF ’ ,C *10**12 , ”C=” ) ;
8 fo =2050*10**3;
9 C =1/(4* %pi ^2*( L1 + L2 ) * fo ^2) ;
10 disp ( ’ pF ’ ,C *10**12 , ”C=” ) ;

Scilab code Exa 28.7 capacitance

1 clc ;
2 // e . g 2 8 . 7
3 L1 =0.1*10** -3;
4 L2 =10*10** -6;
5 fo =4110*10**3;
6 M =20*10** -6;
7 C =1/(4* %pi ^2*( L1 + L2 + M ) * fo ^2) ;
8 disp ( ’ pF ’ ,C *10**12 , ”C=” ) ;
9 AV =( L1 / L2 ) ;
10 disp ( AV ) ;

Scilab code Exa 28.8 c1 and c2

1 clc ;
2 // e . g 2 8 . 8
3 fo =100*10**3;
4 L =0.5*10** -3;
5 C =2/(4* %pi ^2* L * fo ^2) ;

152
6 disp ( ’ microF ’ ,C *10**6 , ”C=” ) ;

Scilab code Exa 28.9 gain and frequency

1 clc ;
2 // e . g 2 8 . 9
3 C1 =0.001*10** -6;
4 C2 =0.01*10** -6;
5 L =5*10** -6;
6 AV = C2 / C1 ;
7 disp ( AV ) ;
8 C =( C1 * C2 ) /( C1 + C2 )
9 fo =1/(2* %pi * sqrt ( L * C ) ) ;
10 disp ( ’MHZ ’ , fo *10** -6 , ” f o=” ) ;

Scilab code Exa 28.10 frequency

1 clc ;
2 // e . g 2 8 . 1 0
3 C1 =0.1*10** -6;
4 C2 =1*10** -6;
5 L =470*10** -6;
6 C =( C1 * C2 ) /( C1 + C2 )
7 fo =1/(2* %pi * sqrt ( L * C ) ) ;
8 disp ( ’ kHZ ’ , fo *10** -3 , ” f o=” ) ;

Scilab code Exa 28.11 inductance and frequency

1 clc ;
2 // e . g 2 8 . 1 1

153
3 C1 =100*10** -12;
4 C2 =7500*10** -12;
5 f01 =950*10**3;
6 f02 =2050*10**3;
7 C =( C1 * C2 ) /( C1 + C2 ) ;
8 // f 0 1 =1/(2∗ %pi ∗ s q r t ( L∗C) )
9 L1 =1/(4*( %pi ) ^2* C * f01 ^2) ;
10 disp ( ’ microH ’ , L1 *10**6 , ” L1=” ) ;
11 L2 =1/(4*( %pi ) ^2* C * f02 ^2) ;
12 disp ( ’ microH ’ , L2 *10**6 , ” L2=” ) ;

Scilab code Exa 28.13 frequency

1 clc ;
2 // e . g 2 8 . 1 3
3 C1 =0.1*10** -6;
4 C2 =1*10** -6;
5 C3 =100*10** -12;
6 L =470*10** -6;
7 C =1/((1/ C1 ) +(1/ C2 ) +(1/ C3 ) ) ;
8 fo =1/(2* %pi * sqrt ( L * C ) ) ;
9 disp ( ’ kHZ ’ , fo *10** -3 , ” f o=” ) ;

Scilab code Exa 28.14 frequency

1 clc ;
2 // e . g 2 8 . 1 4
3 L =0.33;
4 C1 =0.065*10** -12;
5 C2 =1*10** -12;
6 R =5.5*10**3;
7 fs =1/(2* %pi * sqrt ( L * C1 ) ) ;
8 disp ( ’MHZ ’ , fs *10** -6 , ” f s =” ) ;

154
9 Q =(2* %pi * fs * L ) / R ;
10 disp ( Q ) ;

Scilab code Exa 28.15 frequency fs and fp

1 clc ; // e . g 2 8 . 1 4
2 L =0.8;
3 C1 =0.08*10** -12;
4 C2 =1*10** -12;
5 R =5*10**3;
6 fs =1/(2* %pi * sqrt ( L * C1 ) ) ;
7 disp ( ’MHZ ’ , fs *10** -6 , ” f s =” ) ;
8 C =( C1 * C2 ) /( C1 + C2 ) ;
9 fp =1/(2* %pi * sqrt ( L * C ) ) ;
10 disp ( ’MHZ ’ , fp *10** -6 , ” f p=” ) ;

155
Chapter 29

NON SINUSOIDAL
OSCILLATORS

Scilab code Exa 29.1 FREQUENCY

1 clc ;
2 // e . g 2 9 . 1
3 R =20*10**3;
4 C =100*10** -12;
5 f =1/(1.38* R * C ) ;
6 disp ( ’ kHZ ’ ,f *10** -3 , ” f=” ) ;

Scilab code Exa 29.2 value of capacitors

1 clc ;
2 // e . g 2 9 . 2
3 R1 =2*10**3;
4 R2 =20*10**3;
5 C1 =0.01*10** -6;
6 C2 =0.05*10** -6;
7 T =0.69*( R1 * C1 + R2 * C2 )

156
8 disp ( ’ ms ’ ,T *10**3 , ”T=” ) ;
9 f =1/ T ;
10 disp ( ’ kHZ ’ ,f *10** -3 , ” f=” ) ;

Scilab code Exa 29.3 value of capacitors

1
2 clc ;
3 T1 =1*10** -6;
4 f =100*10**3;
5 R1 =10*10**3;
6 R2 =10*10**3;
7 T =1/ f ;
8 C1 = T1 /(0.69* R1 ) ;
9 disp ( ’ pF ’ , C1 *10**12 , ”C1=” ) ;
10 T2 =T - T1 ;
11 C2 = T2 /(0.69* R1 ) ;
12 disp ( ’ pF ’ , C2 *10**12 , ”C2=” ) ;

Scilab code Exa 29.4 value of circuit components

1
2 clc ;
3 T2A =310*10** -6;
4 T2B =250*10** -6;
5 VCC =15;
6 IC =5*10** -3;
7 hFC =20;
8 RC = VCC / IC ;
9 RC1 = RC ;
10 RC2 = RC ;
11 disp ( ’ ohm ’ , RC *1 , ”RC1=RC2=RC=” ) ;
12 hFE = hFC ;

157
13 IBsat = IC / hFE ;
14 IB =2* IBsat ;
15 R = VCC / IB ;
16 R1 = R ;
17 R2 = R ;
18 C1 = T2A /(0.69* R1 ) ;
19 disp ( ’ pF ’ , C1 *10**12 , ”C1=” ) ;
20 C2 = T2B /(0.69* R2 ) ;
21 disp ( ’ pF ’ , C2 *10**12 , ”C2=” ) ;
22 tao1 = R1 * C1 ;
23 disp ( ’ m i c r o s e c ’ , tao1 *10**6 , ” t a o 1=” ) ;
24 tao2 = R2 * C2 ;
25 disp ( ’ m i c r o s e c ’ , tao2 *10**6 , ” t a o 2=” ) ;
26 tao11 = RC1 * C1 /2;
27 disp ( ’ m i c r o s e c ’ , tao11 *10**6 , ” t a o 1 1=” ) ;
28 tao12 = RC2 * C2 /2;
29 disp ( ’ m i c r o s e c ’ , tao12 *10**6 , ” t a o 1 2=” ) ;

Scilab code Exa 29.5 duty cycle

1
2 clc ;
3 f =20*10**3;
4 T =1/ f ;
5 disp ( ’ m i c r o s e c ’ ,T *10**6 , ”T=” ) ;
6 t =(0:0.1:5* %pi ) ’;
7 plot2d1 ( ’ onn ’ ,t ,[ squarewave (t ,75) ]) ;

Scilab code Exa 29.6 R3 and C1

1
2 clc ;
3 close ;

158
4 f =100*10^( -3) ;
5 T =(1/ f ) ;
6 disp ( ’ u s ’ ,T *1 , ’T= ’ ) ;
7 tp =(1/ T ) ;
8 disp ( ’ u s ’ , tp *1 , ’ t p= ’ ) ;
9 C1 =0.001*10^( -6) ;
10 R3 =((5*10^( -6) ) /(0.69* C1 ) ) ;
11 disp ( ’ kohm ’ , R3 *10^( -3) , ’ R3= ’ ) ;

Scilab code Exa 29.7 width

1
2 clc ;
3 RC =2*10**3;
4 R3 =20*10**3;
5 rbb =200;
6 C1 =1000*10** -12;
7 T =0.69* C1 * R3 ;
8 disp ( ’ m i c r o s e c ’ ,T *10**6 , ”T=” ) ;

Scilab code Exa 29.8 value of pulse width

1 clc ;
2 // e . g 2 9 . 8
3 R1 =2.2*10**3;
4 C1 =0.01*10** -6;
5 tp =1.1* R1 * C1 ;
6 disp ( ’ m i c r o S ’ , tp *10**6 , ” t p=” ) ;

Scilab code Exa 29.9 CIRCUIT

159
Figure 29.1: CIRCUIT

1
2 clc ;
3 tp =10*10** -6;
4 c =1000*10** -12;
5 R1 = tp /(1.1* c ) ;
6 disp ( ’Kohm ’ , R1 *10** -3 , ”R1=” ) ;
7 t =(0:0.1:5* %pi ) ’;
8 plot2d1 ( ’ onn ’ ,t ,[ squarewave (t ,60) ]) ;

Scilab code Exa 29.10 duty cycle

1 clc ;
2 // e . g 2 9 . 1 0
3 R1 =6.8*10**3;
4 R2 =4.7*10**3;
5 C1 =1000*10** -12;

160
Figure 29.2: frequency and graph

6 t2 =0.7* R2 * C1 ;
7 disp ( ’ m i c r o S ’ , t2 *10**6 , ” t 2=” ) ;
8 t1 =0.7*( R1 + R2 ) * C1 ;
9 disp ( ’ m i c r o S ’ , t1 *10**6 , ” t 1=” ) ;
10 dc =( t1 /( t1 + t2 ) ) *100;
11 disp ( ’% ’ , dc *1 , ” dc=” ) ;

Scilab code Exa 29.11 frequency and graph

1
2 clc ;
3 R1 =27*10**3;
4 R2 =56*10**3;
5 C1 =0.01*10** -6;
6 t2 =0.7* R2 * C1 ;
7 t1 =0.7*( R1 + R2 ) * C1 ;

161
8 T = t1 + t2 ;
9 f =1/ T ;
10 disp ( ’ kHZ ’ ,f *10** -3 , ” f=” ) ;
11 t =(0:0.1:6* %pi ) ’;
12 plot2d1 ( ’ onn ’ ,t ,[ squarewave (t ,60) ]) ;

Scilab code Exa 29.12 design

1
2 clc ;
3 f =50*10**3;
4 dutyc =0.60;
5 C =0.0022*10** -6;
6 T =1/ f ;
7 t1 = dutyc * T ;
8 t2 =T - t1 ;
9 R2 =( t2 ) /(0.7* C ) ;
10 disp ( ’Kohm ’ , R2 *10** -3 , ”R2=” ) ;
11 R1 =( t1 ) /(0.7* C ) - R2 ;
12 disp ( ’Kohm ’ , R1 *10** -3 , ”R1=” ) ;

162
Chapter 30

LINEAR WAVE SHAPING


CIRCUIT

Scilab code Exa 30.2 VOLTAGE

1
2 clc ;
3 C =1*10** -6;
4 Vi =6;
5 R =10*10**3;
6 Vo = -3;
7 t =8*10** -3;
8 tao = R * C ;
9 disp ( ’ msec ’ , tao *10**3 , ” t a o=” ) ;
10 vf =6*(1 - exp ( -8/10) ) ;
11 disp ( ’V ’ , vf *1 , ” v f=” ) ;
12 output = vf -3.0;
13 disp ( ’V ’ , output *1 , ” o u t p u t=” ) ;

Scilab code Exa 30.3 VOLTAGE

163
1
2 clc ;
3 t =0.1;
4 tao =0.2;
5 vc =0.5* exp ( - t / tao ) ;
6 disp ( ’V ’ , vc *1 , ” vc=” ) ;

Scilab code Exa 30.4 peak value of input voltage

1
2 clc ;
3 tao =250*10** -12;
4 v =50;
5 a = v / tao ;
6 t =0.05*10** -6;
7 vp = a * t ;
8 disp ( ’ kV ’ , vp *10** -3 , ” vp=” ) ;

164
Chapter 31

TIME BASE CIRCUIT

Scilab code Exa 31.1 frequency

1 clc ;
2 // e . g 3 1 . 1
3 R =100*10**3;
4 C =0.4*10** -6;
5 n =0.57;
6 f =1/(2.3* R * C * log10 (1/(1 - n ) ) ) ;
7 disp ( ’HZ ’ ,f *1 , ” f=” ) ;

Scilab code Exa 31.2 period and frequency of oscillation and R

1 clc ;
2 // e . g 3 1 . 2
3 n =0.62;
4 R =5*10**3;
5 C =0.05*10** -6;
6 T =2.3* R * C * log10 (1/(1 - n ) )
7 disp ( ’ msec ’ ,T *10**3 , ”T=” ) ;
8 f =1/ T ;

165
9 disp ( ’HZ ’ ,f *1 , ” f=” ) ;
10 f1 =50;
11 T1 =1/ f1 ;
12 R = T1 /(2.3* C * log10 (1/(1 - n ) ) ) ;
13 disp ( ’ kohm ’ ,R *10** -3 , ”R=” ) ;
14 C =0.5*10** -6;
15 R = T1 /(2.3* C * log10 (1/(1 - n ) ) ) ;
16 disp ( ’ kohm ’ ,R *10** -3 , ”R=” ) ;

166
Chapter 32

OPERATIONAL
AMPLIFIERS

Scilab code Exa 32.1 CMRR

1 clc ;
2 Adm =200000;
3 Acm =6.33;
4 CMRR =20* log10 ( Adm / Acm ) ;
5 disp ( ’ dB ’ , CMRR *1 , ”CMRR=” ) ;

Scilab code Exa 32.2 common mode gain

1 clc ;
2 Adm =30000;
3 //CMRR=20∗ l o g 1 0 (Adm/Acm) ;
4 a =90/20;
5 Acm =( Adm /10^ a ) ;
6 disp ( Acm ) ;

167
Scilab code Exa 32.3 maximum frequency

1 clc ;
2 // e . g 3 2 . 3
3 SR =0.5*10**6;
4 Vpk =0.1;
5 fmax = SR /(2* %pi * Vpk ) ;
6 disp ( ’ kHZ ’ , fmax *10** -3 , ” fmax=” ) ;

Scilab code Exa 32.4 suitable opamps

1 clc ;
2 Vpk =10;
3 slewrate =0.5*10**6;
4 fmax = slewrate /(2* %pi * Vpk ) ;
5 disp ( ’HZ ’ , fmax *1 , ” fmax=” ) ; // v a l u e o f microamp 741
6 slewrate =13*10**6;
7 fmax = slewrate /(2* %pi * Vpk ) ;
8 disp ( ’ kHZ ’ , fmax *10** -3 , ” fmax=” ) ; //TLO 81
9 // v a l u e o f microamp 741 i s much l o w e r t h a n t h a t o f
t h e i n p u t s i g n a l . And v a l u e o f TLO81 i s much
h i g h e r t h a n i n p u t s i g n a l , t h e r e f o r e TLO81 can be
used

Scilab code Exa 32.5 value of vin

1 clc ;
2 // e . g 3 2 . 5
3 ACL =200;
4 Vout =8;
5 Vin = Vout / ACL ;
6 disp ( ’mV ’ , Vin *10**3 , ” Vin=” ) ;

168
Scilab code Exa 32.7 voltage

1 clc ;
2 // e . g 3 2 . 7
3 R1 =1*10**3;
4 R2 =10*10**3;
5 ACL = R2 / R1
6 disp ( ” V o l t a g e a t node A i n c r e a s e s from 1V t o 4 v ” ) ;

Scilab code Exa 32.8 output voltage

1 clc ;
2 R1 =1*10**3;
3 R2 =2*10**3;
4 Vi =1;
5 Acl = R2 / R1 ;
6 V0 = Acl * Vi ;
7 disp ( ’V ’ , V0 *1 , ”V0=” ) ;

Scilab code Exa 32.9 gain input impedance cmrr and fmax

1 clc ;
2 Acm =0.001;
3 Aol =180000;
4 Zin =1*10**6;
5 Zout =80;
6 SR =0.5;
7 R2 =100*10**3;
8 R1 =10*10**3;

169
9 Acl = R2 / R1 ;
10 disp ( Acl ) ;
11 Zin = R1 ;
12 disp ( ’kOhm ’ , Zin *10** -3 , ” Z i n=” ) ;
13 disp ( ’Ohm ’ , Zout *1 , ” Zout=” ) ;
14 CMRR = Acl / Acm ;
15 disp ( CMRR ) ;
16 Vpk =5;
17 fmax = SR /(2* %pi * Vpk ) ;
18 disp ( ’ kHZ ’ , fmax *10**3 , ” fmax=” ) ;

Scilab code Exa 32.10 Acl CMRR and maximum operating frequency

1 clc ;
2 R2 =100*10**3;
3 R1 =10*10**3;
4 Acl =1+( R2 / R1 ) ;
5 Acm =0.001;
6 disp ( Acl ) ;
7 CMRR = Acl / Acm ;
8 disp ( CMRR ) ;
9 SR =0.5;
10 Vpk =5.5;
11 fmax = SR /(2* %pi * Vpk ) ;
12 disp ( ’ kHZ ’ , fmax *10**3 , ” fmax=” ) ;

Scilab code Exa 32.11 Acl CMRR and maximum operating frequency

1 clc ;
2 Acm =0.001;
3 AOL =180000;
4 Zin =1*10**6;
5 Zout =80;

170
6 SR =0.5;
7 Acl =1;
8 CMRR = Acl / Acm ;
9 disp ( CMRR ) ;
10 Vpk =3;
11 fmax = SR /(2* %pi * Vpk )
12 disp ( ’ kHZ ’ , fmax *10**3 , ” fmax=” ) ;

Scilab code Exa 32.12 output voltage

1 clc ;
2 // e . g 3 2 . 1 2
3 V1 = 0.1;
4 V2 =1;
5 V3 =0.5;
6 R1 =10*10**3;
7 R2 =10*10**3;
8 R3 =10*10**3;
9 R4 =22*10**3;
10 Vout =(( - R4 * V1 ) / R1 ) +(( - R4 * V2 ) / R2 ) +(( - R4 * V3 ) / R3 ) ;
11 disp ( ’V ’ , Vout * -1 , ” Vout=” ) ;

Scilab code Exa 32.14 output voltage

1 clc ;
2 V1 = -2;
3 V2 =2;
4 V3 = -1;
5 R1 =200*10**3;
6 R2 =250*10**3;
7 R3 =500*10**3;
8 Rf =1*10**6;
9 Vout =( - Rf / R1 ) * V1 +( - Rf / R2 ) * V2 +( - Rf / R3 ) * V3 ;

171
10 disp ( ’V ’ , Vout *1 , ” Vout=” ) ;

172
Chapter 33

OP AMP APPLICATION

Scilab code Exa 33.1 value of capacitance

1 clc ;
2 R1 =1*10**3;
3 R2 =100*10**3;
4 Rf = R2 ;
5 f1 =159;
6 C =1/(2* %pi * R2 * f1 ) ;
7 disp ( ’ microF ’ ,C *1 , ”C=” ) ;

Scilab code Exa 33.2 frequency

1 clc ;
2 R1 =1*10**3;
3 Rf =51*10**3;
4 Cf =0.1*10** -6;
5 f =1/(2* %pi * Rf * Cf ) ;
6 disp ( ’HZ ’ ,f *1 , ” f=” ) ; // a n s g i v e n i n book i s wrong
7 fmin =10* f ;
8 disp ( ’HZ ’ , fmin *1 , ” f m i n=” ) ;

173
Scilab code Exa 33.3 cutoff frequency and max operating frequency

1 clc ;
2 R1 =10*10**3;
3 Cf =0.01*10** -6;
4 f =1/(2* %pi * R1 * Cf ) ;
5 disp ( ’HZ ’ ,f *1 , ” f=” ) ; // a n s g i v e n i n book i s wrong
6 fmin = f /10;
7 disp ( ’HZ ’ , fmin *1 , ” f m i n=” ) ;

Scilab code Exa 33.4 frequency

1 clc ;
2 R =51*10**3;
3 C =0.001*10** -6;
4 f0 =1/(2* %pi * R * C ) ;
5 disp ( ’HZ ’ , f0 *1 , ” f 0=” ) ;

174
Chapter 34

REUGULATED POWER
SUPPLIES

Scilab code Exa 34.1 value of line regulation

1 clc ;
2 // e . g 3 4 . 1
3 VL =100*10** -6;
4 VS =5;
5 LR = VL / VS ;
6 disp ( ’ microV /V ’ , LR *10**6 , ”LR=” ) ;

Scilab code Exa 34.2 Change in output voltage

1 clc ;
2 // e . g 3 4 . 2
3 LR =1.4*10** -6;
4 VS =10;
5 //LR=VL/VS ;
6 VL = LR * VS
7 disp ( ’ microV ’ , VL *10**6 , ”VL=” ) ;

175
Scilab code Exa 34.3 value of load regulation

1 clc ;
2 // e . g 3 4 . 3
3 IL =40*10** -3;
4 VNL =8;
5 VFL =7.995;
6 LR =( VNL - VFL ) / IL ;
7 disp ( ’ microV /mA ’ , LR *10**3 , ”LR=” ) ;

Scilab code Exa 34.4 voltage under full load

1 clc ;
2 // e . g 3 4 . 4
3 VNL =5;
4 IL =20*10** -3;
5 LR =10*10** -6;
6 //LR=(VNL−VFL) / IL ;
7 VFL = VNL - IL * LR ;
8 disp ( ’V ’ , VFL *1 , ”VFL=” ) ;

Scilab code Exa 34.5 magnitude of variation in output voltage

1 clc ;
2 // e . g 3 4 . 5
3 V0 =10;
4 R =0.00002
5 VAR = V0 * R ;
6 disp ( ’mV ’ , VAR *10**3 , ”VAR=” ) ;

176
Scilab code Exa 34.6 load voltage voltage drop and current

1 clc ;
2 // e . g 3 4 . 6
3 vs =30;
4 rs =240;
5 vz =12;
6 rl =500;
7 vl = vz ;
8 disp ( ’V ’ ,vl , ” v l=” ) ;
9 Is =( vs - vz ) / rs
10 Vd = Is * rs ;
11 disp ( ’V ’ , Vd *1 , ”Vd=” ) ;
12 Iz = Is -( vl / rl )
13 disp ( ’A ’ , Iz *1 , ” I z=” ) ;

Scilab code Exa 34.7 min and max value of input voltage

1 clc ;
2 // e . g 3 4 . 7
3 Vz =5.1;
4 rz =10;
5 Izmin =1*10** -3;
6 Izmax =15*10** -3;
7 Rs =600;
8 Vomin = Vz + Izmin * rz ;
9 disp ( ’V ’ , Vomin *1 , ” Vomin=” ) ;
10 Vsmin = Izmin * Rs + Vomin ;
11 disp ( ’V ’ , Vsmin *1 , ” Vsmin=” ) ;
12 Vomax = Vz + Izmax * rz ;
13 disp ( ’V ’ , Vomax *1 , ”Vomax=” ) ;

177
14 Vsmax = Izmax * Rs + Vomax ;
15 disp ( ’V ’ , Vsmax *1 , ”Vsmax=” ) ;

Scilab code Exa 34.8 min and max value of load current

1 clc ;
2 // e . g 3 4 . 8
3 Vs =24;
4 Rs =500;
5 Vz =12;
6 Izmin =3*10** -3;
7 Izmax =90*10** -3;
8 rz =0;
9 Is =( Vs - Vz ) / Rs ;
10 disp ( ’mA ’ , Is *10**3 , ” I s=” ) ;
11 ILmax = Is - Izmin ;
12 disp ( ’mA ’ , ILmax *10**3 , ” ILmax=” ) ;
13 RLmin = Vz / ILmax ;
14 disp ( ’ ohm ’ , RLmin *1 , ”RLmin=” ) ;

Scilab code Exa 34.9 min and max value of zener current

1 clc ;
2 // e . g 3 4 . 9
3 Vsmin =22;
4 Rs =1*10**3;
5 Vz =10;
6 RL =2*10**3;
7 Vsmax =40;
8 IL = Vz / RL ;
9 disp ( ’mA ’ , IL *10**3 , ” IL=” ) ;
10 Izmax =(( Vsmax - Vz ) / Rs ) - IL ;
11 disp ( ’mA ’ , Izmax *10**3 , ” Izmax=” ) ;

178
12 Izmin =(( Vsmin - Vz ) / Rs ) - IL ;
13 disp ( ’mA ’ , Izmin *10**3 , ” I z m i n=” ) ;

Scilab code Exa 34.10 max value of Rs and power

1 clc ;
2 Vz =10;
3 Vsmin =13;
4 Vsmax =16;
5 ILmin =10*10** -3;
6 ILmax =85*10** -3;
7 Izmin =15*10** -3;
8 Rsmax =( Vsmin - Vz ) /( Izmin + ILmax ) ;
9 disp ( ’ ohm ’ , Rsmax *1 , ”Rsmax=” ) ;
10 Izmax =(( Vsmax - Vz ) / Rsmax ) - ILmin ;
11 Pzmax = Izmax * Vz ;
12 disp ( ’W’ , Pzmax *1 , ”Pzmax=” ) ;

Scilab code Exa 34.11 regulated resistance

1 clc ;
2 Vsmin =19.5;
3 Vsmax =22.5;
4 RL =6*10**3;
5 Vz =18;
6 Izmin =2*10** -6;
7 Pzmax =60*10** -3;
8 rz =20;
9 Izmax = sqrt ( Pzmax / rz ) ;
10 IL = Vz / RL ;
11 ILmax = IL ;
12 ILmin = IL ;
13 Rsmax =( Vsmin - Vz ) /( Izmin + ILmax ) ;

179
14 disp ( ’ ohm ’ , Rsmax *1 , ”Rsmax=” ) ;
15 Rsmin =( Vsmax - Vz ) /( Izmax + ILmin ) ;
16 disp ( ’ ohm ’ , Rsmin *1 , ” Rsmin=” ) ;

Scilab code Exa 34.12 min and max value of zener current

1 clc ;
2 Vsmin =8;
3 Vsmax =12;
4 Rs =2.2*10**3;
5 Vz =5;
6 RL =10*10**3;
7 Ismin =( Vsmin - Vz ) / Rs ;
8 Ismax =( Vsmax - Vz ) / Rs ;
9 IL = Vz / RL ;
10 Izmin = Ismin - IL ;
11 disp ( ’mA ’ , Izmin *10**3 , ” I z m i n=” ) ;
12 Izmax = Ismax - IL ;
13 disp ( ’mA ’ , Izmax *10**3 , ” Izmax=” ) ;

Scilab code Exa 34.13 zener regulator

1 clc ;
2 VL =5;
3 Vz =5;
4 IL =20*10** -3;
5 Pzmax =500*10** -3;
6 Vsmax =15;
7 Vsmin =9;
8 Izmax = Pzmax / Vz ;
9 Ismax = IL + Izmax ;
10 Vz = VL ;
11 Rsmin =( Vsmax - Vz ) /( Izmax + IL ) ;

180
12 disp ( ’ ohm ’ , Rsmin *1 , ” Rsmin=” ) ;
13 ILmax = IL ;
14 Iz =(( Vsmin - Vz ) / Rsmin ) - ILmax ;
15 disp ( ’mA ’ , Iz *10**3 , ” I z=” ) ;

Scilab code Exa 34.14 regulated voltage and circuit current

1 clc ;
2 Vz =10;
3 Vbe =0.7;
4 RL =100;
5 Vs =15;
6 B =100;
7 Rs =33;
8 VL = Vz + Vbe ;
9 IL = VL / RL ;
10 Is =( Vs - VL ) / Rs ;
11 Ic = Is - IL ;
12 Ib = Ic / B ;
13 disp ( ’ microA ’ , Ib *10**6 , ” I b=” ) ;

Scilab code Exa 34.15 voltage current

1 clc ;
2 Vs =15;
3 Vz =8.3;
4 B =100;
5 R =1.8*10**3;
6 RL =2*10**3;
7 Vbe =0.7;
8 VL = Vz - Vbe ;
9 Vce = Vs - VL ;
10 IR =( Vs - Vz ) / R ;

181
11 IL = VL / RL ;
12 IB = IL / B ;
13 disp ( ’ microA ’ , IB *10**6 , ” IB=” ) ; // I n q u e s t i o n b e t a
is
100 but w h i l e s o l v i n g i t i s t a k e n a s 50 which i s
wrong
14 Iz = IR - IB ;
15 disp ( ’mA ’ , Iz *10**3 , ” I z=” ) ;

Scilab code Exa 34.16 max value of Resistance and power

1 clc ;
2 ILmin =0;
3 ILmax =2;
4 VL =12;
5 Vsmin =15;
6 Vsmax =20;
7 B =100;
8 VBE =0.5;
9 Vz =12.5;
10 Izmin =1*10** -3;
11 IBmax = ILmax / B ;
12 IR = IBmax + Izmin
13 Rmax =( Vsmin - Vz ) / IR ;
14 disp ( ’ ohm ’ , Rmax *1 , ”Rmax=” ) ;
15 Izmax =( Vsmax - Vz ) / Rmax ;
16 disp ( ’mA ’ , Izmax *10**3 , ” Izmax=” ) ;
17 Pzmax = Vz * Izmax ;
18 disp ( ’W’ , Pzmax *1 , ”Pzmax=” ) ;
19 PRmax =( Vsmax - Vz ) * Izmax ;
20 disp ( ’W’ , PRmax *1 , ”PRmax=” ) ;
21 VCEmax = Vsmax - VL ;
22 disp ( ’V ’ , VCEmax *1 , ”VCEmax=” ) ;
23 PDmax = VCEmax * ILmax ;
24 disp ( ’W’ , PDmax *1 , ”PDmax=” ) ;

182
Scilab code Exa 34.17 circuit and value of current

1 clc ;
2 VL =12;
3 IL =200*10** -3;
4 Vs =30;
5 Rs =10;
6 B1 =150;
7 Ic1 =10*10** -3;
8 VBE1 =0.7;
9 B2 =100;
10 VBE2 =0.7;
11 Vz =6;
12 Rz =10;
13 Iz =20*10** -3;
14 ID =10*10** -3;
15 I1 =10*10** -3;
16 RD =( VL - Vz ) / ID ;
17 disp ( ’ ohm ’ , RD *1 , ”RD=” ) ;
18 // a=R1/R2 ;
19 a =( VL /( Vz + VBE2 ) ) -1;
20 Ic2 = Ic1 ;
21 IB2 = Ic2 / B2 ;
22 V2 = Vz + VBE2 ;
23 Vz =12;
24 R1 =( Vz - V2 ) / I1 ;
25 disp ( ’ ohm ’ , R1 *1 , ”R1=” ) ;
26 R2 = R1 / a ;
27 disp ( ’ ohm ’ , R2 *1 , ”R2=” ) ;
28 hfe1 = B1 ;
29 IB1 =( IL + I1 + ID ) / hfe1 ;
30 I = IB1 + Ic2 ;
31 R3 =( Vs -( VBE1 + VL ) ) / I ;
32 disp ( ’Kohm ’ , R3 *10** -3 , ”R3=” ) ;

183
Scilab code Exa 34.18 vout IL IE PI

1 clc ;
2 Vs =25;
3 Vz =15;
4 RL =1*10**3;
5 VBE2 =0.7;
6 Vout =( Vz /2) + VBE2 ;
7 disp ( ’V ’ , Vout *1 , ” Vout=” ) ;
8 IL = Vout / RL ;
9 IE1 = IL ;
10 disp ( ’mA ’ , IE1 *10**3 , ” IE1=” ) ;
11 Vce1 = Vs - Vout ;
12 P1 = Vce1 * IE1 ;
13 disp ( ’mW’ , P1 *10**3 , ”P1=” ) ;

Scilab code Exa 34.19 min and max value of voltage

1 clc ;
2 IADJ =100*10** -6;
3 Vin =35;
4 VREF =1.25;
5 R2 =0;
6 R1 =220;
7 Voutmin = VREF *(1+( R2 / R1 ) ) + IADJ * R2 ;
8 disp ( ’V ’ , Voutmin *1 , ” Voutmin=” ) ;
9 R2 =5000;
10 Voutmax = VREF *(1+( R2 / R1 ) ) + IADJ * R2 ;
11 disp ( ’V ’ , Voutmax *1 , ” Voutmax=” ) ;

184
Scilab code Exa 34.20 regulated voltage

1 clc ;
2 R1 =220;
3 R2 =1500;
4 Vo =1.25*(1+( R2 / R1 ) ) ;
5 disp ( ’V ’ , Vo *1 , ”Vo=” ) ; // a n s w e r g i v e n i n book i s wrong

Scilab code Exa 34.21 regulated dc output voltage

1 clc ;
2 R1 =240;
3 R2 =2.4*10**3;
4 Vo =1.25*(1+( R2 / R1 ) ) ;
5 disp ( ’V ’ , Vo *1 , ”Vo=” ) ;

185

You might also like