# Chapter 2 : Bipolar Junction Transistors¶

## Example 2.1, Page No. 50¶

In [3]:
# comman base dc current gain

import math
#Variable Declaration
Ic=2.10*10**-3             # collector current in ampere
Ie=2.18*10**-3             # emitter current in ampere

#Calculations
alfa=Ic/Ie

#Result
print("comman base dc current gain = %f"%alfa)
#Different values used for calculations in the book

comman base dc current gain = 0.963303


## Example 2.2, Page No. 50¶

In [4]:
# Base Current

import math
#Variable Declaration
alfa= 0.987               # Common base D.C. Current Gain
Ie= 10.0                  # in Milli Ampere

#Calcualtions
Ic= alfa*Ie               # Collector Current
Ib=Ie-Ic                  # Base Current in Mili Ampere

#Result
print("collector current (in mA) = %.2f"%Ic)
print("base current (in mA)      = %.2f"%Ib)

collector current (in mA) = 9.87
base current (in mA)      = 0.13


## Example 2.3, Page No. 51¶

In [5]:
# Calculate base current and collector current

import math
#Variable Declaration
alfa= 0.967               # Common base D.C. Current Gain
Ie= 10.0                  # in Milli Ampere

#Calculations
Ic= alfa*Ie               # Collector Current
Ib=Ie-Ic                  # Base Current in Mili Ampere

#Result
print("collector current (in mA) = %.2f"%Ic)
print("base current (in mA)      = %.2f"%Ib)

collector current (in mA) = 9.67
base current (in mA)      = 0.33


## Example 2.4, Page No. 52¶

In [4]:
# Calculate base current and collector current

import math
#Variable Declaration
Beta=100.0              # Common Emitter D.C. Current gain
Ie=10.0                 # Emitter current in mili ampere

#Calculations
alfa= (Beta/(Beta+1))   # Common Base D.C. Current gain
Ic= alfa*Ie             # Collector current in milli ampere
Ib=Ie-Ic                # Base Current in milli ampere

#Result
print("collector current (in mA) = %.2f"%Ic)
print("base current (in mA)      = %.2f"%Ib)
# Answer in the book is wrong

collector current (in mA) = 9.90
base current (in mA)      = 0.10


## Example 2.5.a, Page No. 53¶

In [8]:
# Calculate Common Emitter D.C. Current gain

import math
#Variable Declaration
alfa=0.950               # Common base D.C. Current gain

#Calculations
beta= (alfa/(1-alfa))

#Result
print("Common Emitter D.C. Current gain = %.f"%beta)

Common Emitter D.C. Current gain = 19


## Example 2.5.b, Page No. 53¶

In [10]:
# Calculate Common Base D.C. Current gain

import math
#Variable Declaration
Beta=100.0               #Common emitter D.C. Current gain

#Calculations
alfa= (Beta/(1+Beta))

#Result
print("Common Base D.C. Current gain = %.2f"%alfa)

Common Base D.C. Current gain = 0.99


## Example 2.6, Page No. 53¶

In [11]:
# Calculate base current and collector current

import math
#Variable Declaration
Beta=100              # Common Emitter D.C. Current gain
Ie=10.0               # Emitter current in mili ampere

#Calculation
Ib=(Ie/(1+Beta))      # Emitter current in mili amperen mA
Ic= Ie-Ib             # Collector current in mili amperen mA

#Result
print("Base current (in mA)      = %.3f"%Ib)
print("Collector current (in mA) = %.3f"%Ic)
#Answer in the book is incorrect

Base current (in mA)      = 0.099
Collector current (in mA) = 9.901


## Example 2.7, Page No. 64¶

In [15]:
# Calculate the collector to emitter voltage(Vce) and Collector current (Ic)

import math
#Variable Declaration
Vcc= 12.0          # as Ic=0 so Vce=Vcc (In volts)
Rc= 3.0            # Collector Resistance in killo oms

#Calcuations
Ic=Vcc/Rc          # Collector Current in Amperes
Vce=Vcc

#Result
print("Colletor to emitter voltage (in volts) = %.f"%Vce)
print(" Collector current (in mA)             = %.f"%Ic)

Colletor to emitter voltage (in volts) = 12
Collector current (in mA)             = 4


## Example 2.8.a, Page No. 73¶

In [12]:
# Calculate oerating point

import math
#Variable Declaration
Vcc= 6.0                # Colector voltage in volts
Rb= 530.0               # in kilo ohms
Beta=100.0              # Common emitter D.C. Current gain
Rc=2.0                  # Collector resistance in killo ohms
Vbe= 0.7                # Base to emitter voltage in volts

#Calculations
Ib= ((Vcc-Vbe)/Rb)      # in micro amperes
Ic=Beta*Ib              # in milli ampere
Vce= Vcc-(Ic*Rc)        # Colector to emitter voltage in volts

#Result
print("Operating point is (Vce,Ic):")
print("Vce = %.f V\t Ic = %.f micro-A"%(Vce,Ic))

Operating point is (Vce,Ic):
Vce = 4 V	 Ic = 1 micro-A


## Example 2.8.b, Page No. 73¶

In [20]:
# Calculate stability factor

import math
#Variable Declaration
Beta=100.0               # Common emitter D.C. Current gain

#Calculations
S=1+Beta

#Result
print("The Stability factor = %.f"%S)

The Stability factor = 101


## Example 2.9.a, Page No. 74¶

In [15]:
# Calculate base current

import math
#Variable Declaration
Vcc=20.0              # Colector voltage in volts
Rb= 200.0             # in kilo ohms
Beta=75.0             # Common emitter D.C. Current gain
Rc=0.8                # Collector resistance in killo ohms
Vbe= 0.0              # Base to emitter voltage in volts

#Calcualtions
Ib=Vcc/Rb

#Result
print("Base current in micro-A = %.1f"%(Ib*10**3))

Base current in micro-A = 100.0


## Example 2.9.b, Page No. 74¶

In [24]:
# Calculate collector current

import math
#Variable Declaration
Vcc=20.0                  # Colector voltage in volts
Rb= 200.0                 # in kilo ohms
Beta=75.0                 # Common emitter D.C. Current gain
Rc=0.8                    # Collector resistance in killo ohms
Vbe= 0.0                  # Base to emitter voltage in volts
Ib=0.1                    # Base current in mA

#Cacualtions
Ic=Beta*Ib                # Collector current in mA

#Result
print("Collector current in mA = %.1f"%Ic)

Collector current in mA = 7.5


## Example 2.9.c, Page No. 74¶

In [26]:
# Calculate collector TO emitter voltage

import math
#Variable Declaration
Vcc=20.0              # Colector voltage in volts
Rb= 200.0             # in kilo ohms
Beta=75.0             # Common emitter D.C. Current gain
Rc=0.8                # Collector resistance in killo ohms
Vbe= 0.0              #  Base to emitter voltage in volts
Ib=0.1                # Base current in mA
Ic=7.5                # Base current in mA

#Calculations
Vce=Vcc- (Ic*Rc)

#Result
print("Collector to emitter voltage in volts = %.f"%Vce)

Collector to emitter voltage in volts = 14


## Example 2.9.d, Page No. 74¶

In [28]:
# Calculate collector TO emitter voltage

import math
#Variable Declaration
Vcc=20.0                   # Colector voltage in volts
Rb= 200.0                  # in kilo ohms
Beta=75.0                  # common emitter D.C. Current gain
Rc=0.8                     # Collector resistance in killo ohms
Vbe= 0.0                   # Base to emitter voltage in volts

#Calculations
S=1+Beta

#Resut
print("The Stability factor = %.f"%S)

The Stability factor = 76


## Example 2.10, Page No. 74¶

In [32]:
# Calculate base resistance , Voltage between collector & ground and Stability factor

import math
#Variable Declaration
Vcc=12.0                # Colector voltage in volts
Ib= 0.3                 # in mili ampere
Beta=100.0              # Common emitter D.C. Current gain
Rc=0.3                  # Collector resistance in killo ohms

#Calaculations
Rb=Vcc/Ib
Ic= Beta*Ib
Vce=Vcc -(Ic*Rc)
S=1+Beta

#Result
print("Base resistance in killo ohms        = %.f"%Rb)
print("Collector to ground voltgae in volts = %.f"%Vce)
print("The Stability factor                 = %.f"%S)

Base resistance in killo ohms        = 40
Collector to ground voltgae in volts = 3
The Stability factor                 = 101


## Example 2.11, Page No. 76¶

In [34]:
# Calculate base current , Collector current and Collector to emitter voltage

import math
#Variable Declaration
Vcc=20.0                 # Colector voltage in volts
Rb= 400.0                # in KILLO OHMS
Beta=100.0               # Common emitter D.C. Current gain
Rc=2.0                   # Collector resistance in killo ohms
Re=1.0                   # Emitter resistance in killo ohms

#Calcualtions
Ib= Vcc / (Rb + (Beta*Re))
Ic= Beta*Ib
Vce=Vcc -(Ic*(Rc+Re))

#Result
print("Base current in mA                   = %.2f"%Ib)
print("Collector current in mA              = %.f"%Ic)
print("Collector to ground voltgae in volts = %.f"%Vce)

Base current in mA                   = 0.04
Collector current in mA              = 4
Collector to ground voltgae in volts = 8


## Example 2.12, Page No. 77¶

In [20]:
# Calculate  Collector current and Collector to emitter voltage

import math
#Variable Declaration
Vcc=25.0             # Colector voltage in volts
Vbe=0.7              # Base to emitter voltage  in volts
Rb= 180.0            # in KILLO OHMS
Beta=80.0            # Common emitter D.C. Current gain
Rc=0.82              # Collector resistance in killo ohms
Re=0.2               # Emitter resistance in killo ohms

#Calculations
Ic= (Vcc-Vbe)/(Re + (Rb/Beta))
Ic = math.floor(Ic*10)/10
Vce=Vcc -(Ic*(Rc+Re))

#Result
print("Collector current in mA              = %.1f"%Ic)
print("Collector to ground voltgae in volts = %f"%Vce)
#Answer for Vce is incorrect in the book

Collector current in mA              = 9.9
Collector to ground voltgae in volts = 14.902000


## Example 2.13, Page No. 80¶

In [25]:
# Calculate  Collector current , Collector to emitter voltage and stability factor

import math
#Variable Declaration
Vcc=20.0                # Colector voltage in volts
Vbe=0.7                 # Base to emitter voltage  in volts
Rb= 200.0               # in KILLO OHMS
Beta=100.0              # Common emitter D.C. Current gain
Rc=20.0                 # Collector resistance in killo ohms

#Calculations
Ic= (Vcc-Vbe)/(Rc + (Rb/Beta));
Vce=Vcc -(Ic*Rc);
S=(1+Beta)/(1+Beta*(Rc/(Rc+Rb)));

#Result
print("Collector current in mA               = %.3f"%Ic)
print("Collector to ground voltgae in volts  = %.2f"%(math.ceil(Vce*100)/100))
print("The Stability factor                  = %.3f"%S)

Collector current in mA               = 0.877
Collector to ground voltgae in volts  = 2.46
The Stability factor                  = 10.009


## Example 2.14, Page No. 80¶

In [42]:
# Calculate  base current , Collector current  , Collector to emitter voltage and stability factor

import math
#Variable Declaration
Vcc=10.0              # Colector voltage in volts
Vbe=0.0               # Base to emitter voltage  in volts
Rb= 100.0             # in KILLO OHMS
Beta=100.0            # Common emitter D.C. Current gain
Rc=10.0               # Collector resistance in killo ohms

#Calcualtions
Ib= (Vcc-Vbe)/(Rb+ Beta*Rc)
Ic= Beta * Ib
Vce=Vcc -(Ic*Rc)
S=(1.0+Beta)/(1.0+Beta*(Rc/(Rc+Rb)))

#Result
print("base current                          = %.f micro-A"%(Ib*1000))
print("Collector current                     = %.1f mA"%Ic)
print("Collector to ground voltgae           = %.1f V"%(math.ceil(Vce)))
print("The Stability factor                  = %.3f"%S)
#Answer for stability is wrong in the book

base current                          = 9 micro-A
Collector current                     = 0.9 mA
Collector to ground voltgae           = 1.0 V
The Stability factor                  = 10.009


## Example 2.15, Page No. 84¶

In [40]:
# Calculate emitter current , Collector current  and Collector to emitter voltage

import math
#Variable Declaration
Vcc=10.0                # Colector voltage in volts
Vbe=0.7                 # Base to emitter voltage  in volts
Vee=10.0                # emitter voltage  in volts
Rb= 50.0                # in KILLO OHMS
Beta=100.0              # Common emitter D.C. Current gain
Rc=1.0                  # Collector resistance in killo ohms
Re=5.0                  # Emitter resistance in killo ohms

#Calculations
Ie= (Vee-Vbe)/Re
Ic= Ie
Vce1=Vcc -(Ic*Rc)
Ve=-Vbe
Vce=Vce1-Ve

#Result
print("Emitter Current in mA                 = %.2f"%Ie)
print("Collector current in mA               = %.2f"%Ic)
print("Collector to ground voltgae in volts  = %.2f"%Vce)

Emitter Current in mA                 = 1.86
Collector current in mA               = 1.86
Collector to ground voltgae in volts  = 8.84


## Example 2.16, Page No. 86¶

In [22]:
# Calculate the change in q point

import math
#Variable Declaration
Vcc=20.0          # Colector voltage in volts
Vbe1=0.7          # Base to emitter voltage  in volts
Vee=20.0          # emitter voltage  in volts
Rb= 10.0          # in KILLO OHMS
Beta1=50.0        # Common emitter D.C. Current gain
Rc=5.0            # Collector resistance in killo ohms
Re=10.0           # Emitter resistance in killo ohms
Vbe2=0.6          # Base to emitter voltage  in volts
Beta2=100.0        # Common emitter D.C. Current gain

#Calculation
Ie1= (Vee-Vbe1)/(Re+(Rb/Beta1))
Ic1=Ie1
Vce1a=Vcc -(Ic1*Rc)
Ve=-Vbe1
Vce1=Vce1a-Ve
Vce1 = math.ceil(Vce1*100)/100
Ie2= (Vee-Vbe2)*10**3/(Re*10**3+(Rb*10**3/Beta2))
Ie2 = math.ceil(Ie2*1000)/1000
Ic2=Ie2
Vce2a=Vcc -(Ic2*Rc)
Ve=-Vbe2
Vce2=Vce2a-Ve
detaIc= ((Ie2-Ie1)/Ie1)*100
detaVce=((Vce1-Vce2)/Vce1)*100

#Result
print("Emitter Current in first case,Ie                  = %.3f mA"%Ie1)
print("Collector-to-emitter voltgae in first case,Vce    = %.2f V"%Vce1)
print("Emitter Current in second case, Ie                = %.3f mA"%Ie2)
print("Collector-to-emitter voltgae in 2nd case, Vce     = %.3f V"%Vce2)
print("Change in collector current                       = %.2f%%"%(math.ceil(detaIc*100)/100))
print("Change in collector to emitter voltage            = %.2f%%"%detaVce)

Emitter Current in first case,Ie                  = 1.892 mA
Collector-to-emitter voltgae in first case,Vce    = 11.24 V
Emitter Current in second case, Ie                = 1.921 mA
Collector-to-emitter voltgae in 2nd case, Vce     = 10.995 V
Change in collector current                       = 1.53%
Change in collector to emitter voltage            = 2.18%


## Example 2.17, Page No. 90¶

In [47]:
# Calculate dynamic input resistance

import math
#Variable Declaration
deltaVbe=200.0            # in milli volts
deltaIe=5.0               # in milli ampere

#Calculations
Ri=deltaVbe/deltaIe

#Result
print("Dyanamic input resistance is (in ohms) = %.f"%Ri)

Dyanamic input resistance is (in ohms) = 40


## Example 2.18, Page No. 90¶

In [31]:
# Transistor parameters

import math
#Variable Declaration
Vcc=15.0                     # Colector voltage in volts
Rb= 180.0                    # in kilo ohms
Beta=100.0                   # Common emitter D.C. Current gain
Rc=1.5                       # Collector resistance in killo ohms
Vbe= 0.7                     # Base to emitter voltage in volts

#Calculations
Ib= ((Vcc-Vbe)/Rb)           # in milli amperes
Ic=Beta*Ib                   # in milli ampere
Vce= Vcc-(Ic*Rc)             # Colector to emitter voltage in volts
Vc=Vce
Vb=Vbe
Vcb=Vc-Vb

#Result
print("base current                    = %.2f micro-A "%(Ib*10**3))
print("Collector current               = %.2f mA"%Ic)
print("Collector to emitter voltage    = %.1f V"%Vce)
print("Collector voltage               = %.1f V"%Vc)
print("Base voltage                    = %.1f V"%Vb)
print("Collector to base voltage       = %.1f V"%Vcb)

base current                    = 79.44 micro-A
Collector current               = 7.94 mA
Collector to emitter voltage    = 3.1 V
Collector voltage               = 3.1 V
Base voltage                    = 0.7 V
Collector to base voltage       = 2.4 V


## Example 2.19, Page No. 91¶

In [32]:
# Operating point , stability factor

import math
#Variable Declaration
Vcc=10.0          # Colector voltage in volts
Rb= 930.0         # in kilo ohms
Beta=100.0        # Common emitter D.C. Current gain
Rc=4.0            # Collector resistance in killo ohms
Vbe= 0.7          # Base to emitter voltage in volts
Ib= ((Vcc-Vbe)/Rb)# in milli amperes
Ic=Beta*Ib        # in milli ampere
Vce= Vcc-(Ic*Rc)  # Colector to emitter voltage in volts
S=(1+Beta)

#Result
print("Collector to emitter voltage In Volts = %.f"%Vce)
print("Collector current in milli Ampere     = %.f"%Ic)
print("The Stability factor                  = %.f"%S)

Collector to emitter voltage In Volts = 6
Collector current in milli Ampere     = 1
The Stability factor                  = 101


## Example 2.20, Page No. 92¶

In [38]:
# Base Resistance , stability factor

import math
#Variable Declaration
Vcc=20.0             # Colector voltage in volts
Beta=100.0           # Common emitter D.C. Current gain
Rc=1.0               # Collector resistance in killo ohms
Vce=4.0              # Collector to emitter voltage in volts

#Calculations
Ic= ((Vcc-Vce)/Rc)   # in milli amperes
Ib=Ic/Beta           # in milli ampere
Rb=Vce/Ib            # in Killo ohms
x = math.floor((1+Beta*(Rc/(Rc+Rb)))*100)/100
S=math.floor((1+Beta)*100/x)/100

#Result
print("Base resistance      = %.f k-ohm"%Rb)
print("The Stability factor = %.2f"%S)

Base resistance      = 25 k-ohm
The Stability factor = 20.86


## Example 2.21, Page No. 92¶

In [41]:
# Quiescent , stability factor

import math
#Variable declaration
Vcc=10.0                      # Colector voltage in volts
Beta=50.0                     # Common emitter D.C. Current gain
Rc=2.0                        # Collector resistance in killo ohms
Rb= 100.0                     # in kilo ohms
Vbe=0.0                       # Base to emitter voltage in volts

#Calculations
Ic= (Vcc-Vbe)/(Rc+(Rb/Beta))  # in milli amperes
Ib=Ic/Beta                    # in milli ampere
Vce= Vcc-(Ic*Rc)              # Colector to emitter voltage in volts
S=(1+Beta)/(1+((Beta*Rc)/(Rc+Rb)))

#Result
print("Operating point is (Vce,Ic): ")
print("Colector to emitter voltage = %.f V"%Vce)
print("Collector current           = %.1f mA"%Ic)
print("The Stability factor        = %.2f"%S)
#Answer for stability factor is wrong in the book

Operating point is (Vce,Ic):
Colector to emitter voltage = 5 V
Collector current           = 2.5 mA
The Stability factor        = 25.75


## Example 2.22, Page No. 93¶

In [42]:
# Collector to emitter bias voltage

import math
#Variable declaration
Vcc=20.0                  # Colector voltage in volts
Beta=100                  # Common emitter D.C. Current gain
Rc=2.0                    # Collector resistance in killo ohms
Rb= 100.0                 # in kilo ohms
Vbe=0.7                   # Base to emitter voltage in volts
Ic=10.0                   # in milli amperes

#Calculations
Ib=Ic/Beta                # in milli ampere
Vce= Vbe+(Ib*Rb)          # Colector to emitter voltage in volts

#Result
print("Colector to emitter bias voltage = %.1f V"%Vce)

Colector to emitter bias voltage = 10.7 V


## Example 2.23, Page No. 93¶

In [46]:
# Base Currecnt ,Collector current

import math
#Variable declaration
Icbo=0.0                 # collecttor to base leakage current
Vcc=9.0                  # Colector voltage in volts
Beta=100.0               # Common emitter D.C. Current gain
Vce=5.0                  # Collector to emitter voltage in volts
Ic=0.2                   # in milli amperes
Rc=(Vcc-Vce)/Ic          # Collector Reesistance in ohms
Ib=Ic/Beta               # in milli ampere
Rb=Vce/Ib                # Base resistance in  ohms

#Result
print("Collector Resistance = %.f ohm"%Rc)
print("Base Resistance       = %.1f k-ohm"%(Rb/1000))

Collector Resistance = 20 ohm
Base Resistance       = 2.5 k-ohm


## Example 2.24, Page No. 94¶

In [53]:
# Base Resistance , stability factor

import math
#Variable declaration
Vcc=24.0            # Colector voltage in volts
Beta=45.0           # Common emitter D.C. Current gain
Rl=10.0             # Collector resistance in killo ohms
Re=0.27             # Emitter resistance in killo ohms
Vce=5               # Collector to emitter voltage in volts
Vbe=0.6             # Base to emitter voltage in volts

#Calculations
Ib=(Vcc-Vce)/((1+Beta)*(Rl+Re))       # in milli ampere
Ic=Ib/Beta                            # in micro ampere
R=(Vce-Vbe)/Ib                        # Resistance in killo ohms
x = math.floor((1+Beta*(Re/(Re+R)))*100)/100
S=(1+Beta)/x

#Result
print("Base resistance      = %.f k-ohm"%(math.ceil(R)))
print("The Stability factor = %.2f"%S)

Base resistance      = 110 k-ohm
The Stability factor = 41.44


## Example 2.25, Page No.95¶

In [68]:
# Quiescent , stability factor

import math
#Variable declaration
Vcc=16.0                # Colector voltage in volts
alfa=0.985
Rc=3.0                  # Collector resistance in killo ohms
Re= 2.0                 # in kilo ohms
R1= 56.0                # in kilo ohms
R2= 20.0                # in kilo ohms
Vbe=0.3                 # Base to emitter voltage in volts

#Calculations
Beta= round(alfa/(1-alfa))
Vb=Vcc * (R2/(R1+R2))   # vOLTAGE AT BASE
Vb = math.floor(Vb*100)/100
Ic= (Vb-Vbe)/Re         # in milli amperes
Ib=Ic/Beta              # in milli ampere
Vce= Vcc-(Ic*(Rc+Re))   # Colector to emitter voltage in volts
Rth=math.floor((R1*R2)*100/(R1+R2))/100

S=((1+Beta)*(1+(Rth/Re)))/(1+Beta+(Rth/Re))

#Result
print("Operating point is (Vce,Ic): ")
print("Colector to emitter voltage = %.3f V"%Vce)
print("Collector current           = %.3f mA"%Ic)
print("The Stability factor        = %.2f"%S)
#Answer for Ic is wrong and hence the Vce. Also answer for stability factor is wrong.

Operating point is (Vce,Ic):
Colector to emitter voltage = 6.225 V
Collector current           = 1.955 mA
The Stability factor        = 7.54


## Example 2.26, Page No. 96¶

In [70]:
# Find R1,R2 & Re

import math
#Variable declaration
Vcc=10.0             # Colector voltage in volts
Beta=50.0            # Common emitter D.C. Current gain
Rc=2.0               # Collector resistance in killo ohms
Vce=4.0              # Collector to emitter voltage in volts
Vbe=0.3              # Base to emitter voltage in volts
Ic=2.0               # Collector current in milli Ampere

#Calculations
Ib=Ic/Beta           # Base current in milli ampere
I1=10*Ib
Ie=Ic                # Emitter current in mili ampere
Re=(Vcc-Ic*Rc-Vce)/Ic# Emiier Resistance
V2=Vbe+Ic*Re         # Voltage across R2
R2=V2/I1
R1=25-R2

#Result
print("Resistance, R1         = %.2f k-ohm"%R1)
print("Resistance, R2         = %.2f k-ohm"%R2)
print("Emitter Resistance, Re = %.1f k-ohm"%Re)
#Answer for R2 is wrong in the book

Resistance, R1         = 19.25 k-ohm
Resistance, R2         = 5.75 k-ohm
Emitter Resistance, Re = 1.0 k-ohm


## Example 2.27, Page No. 96¶

In [72]:
# Find R

import math
#Variable declaration
Vcc=24.0            # Colector voltage in volts
Beta=45.0
Rc=10.0             # Collector resistance in killo ohms
Re= 0.27            # in kilo ohms
Vce=5.0             # Collector to emitter voltage in volts
Vbe=0.6             # Base to emitter voltage in volts

#Calculations
Ib=(Vcc-Vce)/((1+Beta)*(Rc+Re))
Ic=Ib/Beta
R=(Vce-Vbe)/Ib

#Result
print("Base resistance = %.f k-ohm"%(math.ceil(R)))

Base resistance = 110 k-ohm


## Example 2.28, Page No.97¶

In [73]:
# Ic,Vce

import math
#Variable declaration
Vcc=22.0           # Colector voltage in volts
Beta=40.0
Rc=10.0            # Collector resistance in killo ohms
Re= 1.5            # in kilo ohms
R1= 40.0           # in kilo ohms
R2= 4.0            # in kilo ohms
Vbe=0.5            # Base to emitter voltage in volts

#Calculations
Vb=Vcc * (R2/(R1+R2))      # VOLTAGE AT BASE
Ic= (Vb-Vbe)/Re            # in milli amperes
Ib=Ic/Beta                 # in milli ampere
Vce= Vcc-(Ic*(Rc+Re))      # Colector to emitter voltage in volts

#Result
print("Colector to emitter voltage = %.1f V"%Vce)
print("Collector current           = %.f mA"%Ic)
#Answer for Vce is wrong in the book

Colector to emitter voltage = 10.5 V
Collector current           = 1 mA


## Example 2.29, Page No. 98¶

In [74]:
# Voltage across Re

import math
#Variable declaration
Vcc=20.0         # Colector voltage in volts
Beta=50.0
R1= 60.0         # in kilo ohms
R2= 30.0         # in kilo ohms
Vbe=0.6          # Base to emitter voltage in volts

#Calculations
Vb=Vcc * (R2/(R1+R2))
Ve=Vb-Vbe

#Result
print("voltage across Re = %.2f V"%Ve)

voltage across Re = 6.07 V


## Example 2.30, Page No. 99¶

In [20]:
# Voltage across Re

import math
#Variable declaration
Vcc=10.0            # in volts
Rb=200.0            # Base resistance in killo ohms
Vbe=0.8             # Base to emitter voltage in volts
Beta=100.0
Vce=0.2             # Collector to emitter voltage in volts

#Calculations
Ib=5/Rb             # Base current in milli ampere
Ic=Beta*Ib          # Collector current in milli ampere
Rc= (Vcc-Vce)/Ic    # Resistance

#Result
print("Collector resistance = %.2f k-ohm"%Rc)

Collector resistance = 3.92 k-ohm


## Example 2.31, Page No. 99¶

In [77]:
#Cut off,Vc & Re

import math
#Variable declaration
Vcc=10.0             # in volts
Rc=3.0               # Collector resistance in killo ohms
Rl=0.5               # in kilo ohms
Rb=7.0               # in kilo ohms
Beta=100.0           # Common emitter D.C. Current gain
Vbe=0.8              # Base to emitter voltage in volts
Ic=2.78              # in mA Applying KVL
Ib=0.1               # in mA Applying KVL

#Calcualtions
Ibmin=Ic/Beta
Vc=Vbe               # in saturation region
Vce=Vc-Rl*(Ic+Ib)
Re=((Vcc-Vce)/Ic)-Rc

#Result
print("Base current         = %.1f mA"%Ib)
print("Minimum Base current = %.4f mA"%Ibmin)
print("\nAs Base current is more than minimum base current so it is in saturation region")
print("\nEmitter resistance   = %.f ohm"%(Re*1000))

Base current         = 0.1 mA
Minimum Base current = 0.0278 mA

As Base current is more than minimum base current so it is in saturation region

Emitter resistance   = 827 ohm


## Example 2.32, Page No. 100¶

In [84]:
# Beta ,Vcc & Rb

import math
#Variable declaration
Rc=2.7                  # Collector resistance in killo ohms
Re=0.68                 # Collector resistance in killo ohms
Ib=0.02                 # Base Current in mA
Vce=7.3                 # Collector to emitter voltage in volts
Vbe=0.0                 # Base to emitter voltage in volts
Ve=2.1                  # Emitter Voltage

#Calculations
Ie= Ve/Re               # Emiiter Current in mA
Ic=Ie
Beta=Ic/Ib              # Common emitter D.C. Current gain
Vcc= Vce+Ic*(Rc+Re)     # Supply Voltage
Vcc = math.floor(Vcc*10)/10
Rb=(Vcc-Ve)/Ib          # Base resistance in Killo ohms

#Result
print("Common emitter D.C. Current gain (unitless) = %.f"%Beta)
print("Supply Voltage                              = %.1f V"%Vcc)
print("base resistance                             = %.f k-ohm"%Rb)

Common emitter D.C. Current gain (unitless) = 154
Supply Voltage                              = 17.7 V
base resistance                             = 780 k-ohm


## Example 2.33, Page No. 101¶

In [91]:
# Ic & Vce

import math
#Variable declaration
Vcc=18              # Colector voltage in volts
Rc=2.2              # Collector resistance in killo ohms
Rb=510.0            # Base resistance in killo ohms
Re=1.8              # Emitter resistance in killo ohms
Beta=90.0           # Common emitter D.C. Current gain

#Calculations
Ib=Vcc/(Rb+Beta*(Rc+Re))  # Base Current in mA
Ib = math.floor(Ib*100)/100
Ic=Beta*Ib                # Collector current in mA
Beta=Ic/Ib                # Common emitter D.C. Current gain
Vce= Ib*Rb                # Collector to emitter voltage in volts

#Result
print("Colector to emitter voltage, Vce = %.1f V"%Vce)
print("Collector current, Ic            = %.1f mA"%(math.floor(Ic*10)/10))

Colector to emitter voltage, Vce = 10.2 V
Collector current, Ic            = 1.8 mA


## Example 2.34, Page No.101¶

In [28]:
# Base current

import math
#Variable declaration
Ie=10.0             # Emitter current in mA
Ic=9.95             # Collector current in mA

#Calcualtions
Ib=Ie-Ic            # Base Current in mA

#Result
print("Base Current = %.2f mA"%Ib)

Base Current = 0.05 mA


## Example 2.35, Page No. 101¶

In [105]:
# Ic,Vc,Ve & Vce

import math
#Variable declaration
Vcc=30.0              # Colector voltage in volts
Beta=100.0
Rc=6.2                # Collector resistance in killo ohms
Re=1.5                # Emitter resistance in killo ohms
Rb=690.0              # Base resistance in killo ohms
Vbe=0.7               # Base to emitter voltage in volts
Ib= (Vcc-Vbe)/(Rb+(1+Beta)*Rc+(1+Beta)*Re)
Ic=math.ceil(Ib*Beta)           # in milli ampere
Ie=Ib*(1+Beta)        # in milli ampere
Vce=Vcc-Ve-(Ic+Ib)*Rc
Vce = math.ceil(Vce*100)/100
Vc=Vce+Ve
print("Collector current, Ic            = %.f mA"%Ic)
print("emitter voltage, Ve              = %.2f V"%Ve)
print("Colector to emitter voltage, Vce = %.2f V"%Vce)
print("collector voltage                = %.2f V"%Vc)

Collector current, Ic            = 2 mA
emitter voltage, Ve              = 3.03 V
Colector to emitter voltage, Vce = 14.45 V
collector voltage                = 17.48 V


## Example 2.36, Page No. 103¶

In [110]:
# R1,Rc & S

import math
#Variable declaration
Vcc=16.0             # Colector voltage in volts
alfa=0.985
Ieq=2.0              # Emiier current in mA
R2=30.0              # resistance in killo ohms
Re=1.0               # Emitter resistance in killo ohms
Vbe=0.2              # Base to emitter voltage in volts
Vceq=6.0             # Collector to emitter voltage in volts

#Calculations
Beta= alfa/(1-alfa)
Icq=alfa*Ieq
Rc=(Vcc-Vceq-Ieq*Re)/Icq
Ir1=((Ieq*Re+Vbe)/R2)+Icq/Beta
R1=(Vcc-Vbe-(Ieq*Re))/Ir1
Rb= (R1*R2)/(R1+R2)
S=(1+Beta)/(1+Beta*(Re/(Re+Rb)))

#Result
print("Collector resistence, Rc = %.2f k-ohm"%Rc)
print("Resistance, R1           = %.2f k-ohm"%(math.floor(R1*100)/100))
print("The Stability factor     = %.2f"%(math.floor(S*100)/100))

Collector resistence, Rc = 4.06 k-ohm
Resistance, R1           = 133.54 k-ohm
The Stability factor     = 18.64


## Example 2.37.a, Page No. 104¶

In [115]:
# baising component

import math
#Variable declaration
Vcc=12.0              # Colector voltage in volts
Beta=180.0
Ieq=2.0               # Emiier current in mA
Rc=1.0                # Collector resistance in killo ohms
Vbe=0.6               # Base to emitter voltage in volts
Vceq=6.0              # Collector to emitter voltage in volts

#Calculations
Ic= (Vcc-Vceq)/Rc
Ib=Ic/Beta
Rb=(Vcc-Vbe)/Ib

#Result
print("Collector current in fixed bias case = %.f mA"%Ic)
print("Base      current in fixed bias case = %.2f mA"%(Ib*10**3))
print("Base resistance   in fixed bias case   = %.f k-ohm"%Rb)

Collector current in fixed bias case = 6 mA
Base      current in fixed bias case = 33.33 mA
Base resistance   in fixed bias case   = 342 k-ohm


## Example 2.37.b, Page No. 104¶

In [28]:
# baising component

import math
#Variable declaration
Vb=1.6             # Base voltage
Ve=1.0             # emitter voltage
Vcc=12.0           # Collector voltage in volts
Beta=180.0
Ieq=2.0            # Emiier current in mA
Rc=1.0             # Collector resistance in killo ohms
Vbe=0.6            # Base to emitter voltage in volts
Vceq=6.0           # Collector to emitter voltage in volts

#Calculations
Ic= (Vcc-Vceq-Ve)/Rc
Ib=math.ceil(Ic*10**5/Beta)*1000/10**5
Ie=Ic+Ib*10**-3    # emitter current in milli ampere
Re= (Ve/(Ie*10**-3))        # emitter resistance in killo ohms
Ir2= 10*Ib
R2= (Ve+Vbe)/(Ir2*10**-6)
Ir1=Ir2+Ib
R1=((Vcc-Vb)/(Ir1*10**-3))

#Result
print("Emitter Current, Ie  = %.3f mA"%(math.floor(Ie*1000)/1000))
print("Resistance, Re = %.1f ohm"%(Re))
print("Resistance, R1 = %.2f k-ohm"%(R1))
print("Resistance, R2 = %.1f ohm"%(R2))

Emitter Current, Ie  = 5.027 mA
Resistance, Re = 198.9 ohm
Resistance, R1 = 34.03 k-ohm
Resistance, R2 = 5759.5 ohm


## Example 2.38.a, Page No. 105¶

In [40]:
# Stability factor

import math
#Variable declaration
Beta=180.0            # Common emitter D.C. Current gain
Re=1.0                # Collector resistance in killo ohms
R1=5.76               # resistance in killo ohms
R2=34.67              # resistance in killo ohms

#Calculations
S=1+Beta

#Result
print("Stability factor in fixed bias case is %.f"%S)

Stability factor in fixed bias case is 181


## Example 2.38.b, Page No. 105¶

In [33]:
# Stability factor

import math
#Variable declaration
Beta=180.0                # Common emitter D.C. Current gain
Re=0.199                  # Collector resistance in killo ohms
R1=5.76                   # resistance in killo ohms
R2=34.67                  # resistance in killo ohms

#Calculations
Rb=math.floor((R1*R2)*100/(R1+R2))/100
S=(1+Beta)/(1+(Beta*(Re/(Re+Rb))))

#Result
print("Stability factor in self bias case is %.2f"%S)

Stability factor in self bias case is 22.67


## Example 2.39.a, Page No. 106¶

In [36]:
# Stability factor

import math
#Variable declaration
R1=500.0             # Resistance in killo ohms
Rc=500.0             # Collector resistance in killo ohms
R2=5000.0            # Resistance in killo ohms
Vcc=20.0             # Colector voltage in volts
Beta=75.0
Rc=6.2               # Collector resistance in killo ohms
Re=90.0              # Emitter resistance in ohms
Rb=690.0             # Base resistance in killo ohms
Vbe=0.7              # Base to emitter voltage in volts

#Calculations
Rb=((R1*R2)/(R1+R2))
Vb=Vcc * (R1/(R1+R2))# VOLTAGE AT BASE
Icbo=0.02            # Collector to base leakage current in mA
Sre= (Beta/(Rb+Re*Beta)**2)*(Icbo*10**-6*Rb-Beta*(Vb+Rb*Icbo*10**-6-Vbe))

#Result
print("Stability factor = %.3f * 10^-4 A/ohms"%(Sre*10**4))

Stability factor = -1.212 * 10^-4 A/ohms


## Example 2.39.b, Page No. 106¶

In [40]:
# Change in Icq

import math
#Variable declaration
R1=500.0                 # Resistance in killo ohms
Rc=500.                  # Collector resistance in killo ohms
R2=5000.0                # Resistance in killo ohms
Vcc=20.0                 # Colector voltage in volts
Beta=75.0
Rc=6.2                   # Collector resistance in killo ohms
Re=90.0                  # Emitter resistance in ohms
Vbe=0.7                  # Base to emitter voltage in volts

#Calculations
Rb=((R1*R2)/(R1+R2))
Vb=Vcc * (R1/(R1+R2))    # VOLTAGE AT BASE
Icbo=0.02                # Collector to base leakage current in mA
Sre= (Beta/(Rb+Re*Beta)**2)*(Icbo*10**-6*Rb-Beta*(Vb+Rb*Icbo*10**-6-Vbe))
DeltaRe= 110-90          # Change in  ohms
DeltaIcq= Sre*DeltaRe    # Change in Icq

#Result
print("Change in Icq  = %.3f mA"%(DeltaIcq*1000))

Change in Icq  = -2.424 mA


## Example 2.40, Page No. 107¶

In [45]:
# R1 & R2

import math
#Variable declaration
Vcc=5.0                # Colector voltage in volts
Beta=100.0
Vce=2.5               # Collector to emitter voltage in volts
Vbe=0.6               # Base to emitter voltage in volts
R4=0.3                # Resistance in killo ohms
R2=10.0               # Resistance in killo ohms
Ic=1.0                # Collector current in mA

#Calculations
Vr4=(1+(1/Beta))*Ic*R4
Vcn= Vce-Vr4
R3=(Vcc-Vcn)/Ic
Rb=8.03
R1=(Rb*R2)/(R2-Rb)

#Result
print("Resistance, R1  = %.f k-ohm"%(math.floor(R1)))
print("Base Resistance = %.2f k-ohm"%Rb)

Resistance, R1  = 40 k-ohm
Base Resistance = 8.03 k-ohm


## Example 2.41, Page No. 108¶

In [47]:
# Re , S

import math
#Variable declaration
Vcc=12.0              # Colector voltage in volts
Beta=50.0
Vce=2.5               # Collector to emitter voltage in volts
Vbe=0.7               #  Base to emitter voltage in volts
Re= 2.57              # Emitter resistance in killo ohms
Rc=4.2                # Collector resistance in killo ohms

#Calculation
Ic=14/(Rc+(1+(1/Beta)*Re))
Ib= (6-Vbe-Ic*Re)/Re
DeltaIb= -1           # Change in base Current
S= (1+Beta)/(1+Beta)

#Result
print("Resistance, Re   = %.2f k-ohm"%Re)
print("Stability Factor = %.f"%S)

Resistance, Re   = 2.57 k-ohm
Stability Factor = 1


## Example 2.42, Page No. 109¶

In [64]:
# Icq

import math
#Variable declaration
T2=20.0              # Temperature in degree celsius
T1=0.0               # Temperature in degree celsius
Vcc=15.0             # Colector voltage in volts
Beta=75.0
Vce=2.5              # Collector to emitter voltage in volts
Vbe1=0.7             # Base to emitter voltage in volts
Rb= 50.0             # Emitter resistance in killo ohms
Rc=3.0               # Collector resistance in killo ohms
Re=1.0               # Collector resistance in killo ohms

#Calculation
Ib= ((6-Vbe1)/(Rb+(1+Beta)*Re))*10**3   # Base Current in Micro Amperes
Ic= Beta*Ib*10**-3                      # Colectore Current in  Milli Ampere
Icbo1=0.5                               # Collector to base leakage current in Micrometer
Icbo2=Icbo1*2**((T2-T1)/10)             # Collector to base leakage current in Micrometer when temperature 20 degree celsius
Vbe2=Vbe1-2*T2*10**-3                   # base to emitter voltage when temperature is 20 degree celsius
Ib1=((6-Vbe2)/(Rb+(1+Beta)*Re))*10**3   # Base Current in Micro Amperes at  20 degree celsius
Ib1 = math.ceil(Ib1*10)/10
Ic1=(Beta*(Ib*10**-3))                  # Colectore Current in  Milli Ampere

#Result
print("Base Current                                               = %.f micro-A"%Ib)
print("Collector current                                          = %.2f mA"%Ic)
print("Collector to base leakage current when T=20 degree celsius = %.f micro-A"%Icbo2)
print("Base to emitter voltage when T=20 degree celsius           = %.2f V"%Vbe2)
print("Base Current when T=20 degree celsius                      = %.1f micro-A"%Ib1)
print("Collector current when T=20 degree celsius                 = %.2f mA"%Ic1)

Base Current                                               = 42 micro-A
Collector current                                          = 3.15 mA
Collector to base leakage current when T=20 degree celsius = 2 micro-A
Base to emitter voltage when T=20 degree celsius           = 0.66 V
Base Current when T=20 degree celsius                      = 42.4 micro-A
Collector current when T=20 degree celsius                 = 3.15 mA


## Example 2.43, Page No. 110¶

In [67]:
# (a)quiescent current (b) drift in quiescent current

import math
#Variable declaration
Beta1=50.0                # gain at 25 degree celsius temperture
Beta2=200.0               # gain at 75 degree celsius temperture
Rb=1.0                    # base resistance in killo ohms
Re=0.1                    # emitter resistance in  ohms
Ico1=0.01                 # leakage current at 25 degree celsius temperture in micro ampere
Ico2=0.045                # leakage current at 75 degree celsius temperture in micro ampere
Vbe1=0.7                  # base to emitter voltage  25 degree celsius temperture in micro ampere
Vbe2=0.575                # base to emitter voltage  75 degree celsius temperture in micro ampere

#Calculations
dBeta=Beta2-Beta1                        # Change in gain
dIco=Ico2-Ico1                           # change in leakage current
dVbe=Vbe2-Vbe1                           # change in base to emitter voltage
Ib= (1-Vbe1)/(Rb+(1+Beta1)*Re)           # Base current in micro ampere
Ic=Beta1*Ib                              # Collector current in milli ampere
S=((1+Beta1)*(1+(Rb/Re)))/(1+Beta1+(Rb/Re))
S1=-(Beta1/Re*10**-3)/(1+Beta1+(Rb/Re))  # stability factor
S2=(S*Ic*10**-3)/(Beta1*(1+Beta1))       # stability factor
dIc= ((S*dIco*10**-6)+(S1*dVbe)+(S2*dBeta))*10**3
Icn= Ic+dIc                              # new collector current in milli ampere

#Result
print("Quiescent current is %.2f mA"%Ic)
print("Quiescent current drift at temperature 75 degree celsius is %.3f mA"%dIc)
print("New quiescent current is %.1f mA"%Icn)

Quiescent current is 2.46 mA
Quiescent current drift at temperature 75 degree celsius is 2.355 mA
New quiescent current is 4.8 mA


## Example 2.44.a, Page No.111¶

In [95]:
# R1,R2  ,Re

import math
#Variable declaration
Vbe=0.2
Vcc=16.0             # collector voltage in volts
Rc=1.5               # clollector resistance in killo ohms
S=12.0               # stability factor
Vce=8.0              # Collector to emitter voltage
Ic=4.0               # in milli amperes
Beta=50.0            # gain
S1=3.0               # REDUCED STABILITY FACTOR

#Calcualtions
Ib=(Ic*10**-3)/Beta                              # Base current in micro ampere
Re=(Vcc-Vce-(Rc*10**3*Ic*10**-3))/(Ic*10**-3+Ib) # emitter resistance in ohms
Rb=round(((11*(1+Beta))/(Beta-11))*Re*10**-3)    # base resistance in killo ohms
Vb= (Ib*Rb*1000)+Vbe+((Ic*10**-3)+(Ib*10**-6))*Re# voltage is R2
R1=Vcc*Rb/2.76                        #Vb = 2.76 # resistance in killo ohms
R1= math.ceil(R1*10)/10
R2=R1*Rb/(R1-Rb)                                 # RESISTANCE IN KILLO OHMS

#Result
print("Emitter Resistance,Re = %.2f k-ohm"%(Re*10**-3))
print("Resistance, R1        = %.1f k-ohm"%R1)
print("Resistance, R2        = %.2f k-ohm"%(math.floor(R2*100)/100))

Emitter Resistance,Re = 0.49 k-ohm
Resistance, R1        = 40.6 k-ohm
Resistance, R2        = 8.45 k-ohm


## Example 2.44.b, Page No. 111¶

In [109]:
# R1,R2  ,Re

import math
#Variable declaration
Vbe=0.2
Vcc=16.0               # collector voltage in volts
Rc=1.5                 # clollector resistance in killo ohms
S=12.0                 # stability factor
Vce=8.0                # Collector to emitter voltage
Ic=4.0                 # in milli amperes
Beta=50.0              # gain
Ib=(Ic*10**-3)/Beta    # Base current in micro ampere
S1=3.0                 # REDUCED STABILITY FACTOR

#Calcualtions
Re=(Vcc-Vce-(Rc*10**3*Ic*10**-3))/(Ic*10**-3+Ib)   # emitter resistance in ohms
Rb=math.floor(((2*(1+Beta))/(Beta-2))*Re*10**-3)   # base resistance in killo ohms
Vr2= Vbe+(Ic+Ib*10**3)*Re*10**-3                   # voltage is R2
R1=math.floor((Rb)/x)                                          # resistance in killo ohms
R2=(Rb*R1)/(R1-Rb)                                    # RESISTANCE IN KILLO OHMS
Rb1=((3*(1+Beta))/(Beta-3))*Re*10**-3              # EFFECT OF REDUCING STABILITY FACTOR ON BASE RESISTANCE

#Result
print("Emitter Resistance  = %.2f k-ohm"%(Re*10**-3))
print("Resistance, R1      = %.f k-ohm"%R1)
print("Resistance, R2      = %.2f k-ohm"%(math.floor(R2*100)/100))

Emitter Resistance  = 0.49 k-ohm
Resistance, R1      = 7 k-ohm
Resistance, R2      = 1.16 k-ohm


## Example 2.45, Page No. 113¶

In [18]:
# R1,R2  ,Re

import math
#Variable declaration
Vbe=0.2
Vcc=20.0                   # collector voltage in volts
Rc=2.0                     # clollector resistance in killo ohms
S=10.0                     # stability factor
Vce=10.0                   # Collector to emitter voltage
Ic=4.0                     # in milli amperes
Beta=50.0                  # gain
S1=3.0                     # REDUCED STABILITY FACTOR

#Calcualtions
Ib=(Ic*10**-3)/Beta                                  # Base current in micro ampere
Re=(Vcc-Vce-(Rc*10**3*Ic*10**-3))/(Ic*10**-3+Ib)     # emitter resistance in ohms
Re = math.ceil(Re*10)/10
Rb=math.ceil(((9*(1+Beta))*1000/(Beta-9))*Re*10**-3)/1000# base resistance in killo ohms
Vr2= Vbe+(Ic+Ib*10**3)*Re*10**-3                     # voltage is R2
x=(Vr2/Vcc)                                          # Voltage
R1=(Rb)/x                                            # resistance in killo ohms
R2=(x*R1)/(1-x)                                      # RESISTANCE IN KILLO OHMS
Rb1=((3*(1+Beta))/(Beta-3))*Re*10**-3                # EFFECT OF REDUCING STABILITY FACTOR ON BASE RESISTANCE

#Result
print("Emitter resistance = %.1f ohm"%Re)
print("Resistance R1      = %.2f k-ohm"%R1)
print("Resistance R2      = %.2f k-ohm"%R2)
print("Base resistance effect of reducing stability factor reduces input impedence = %f k-ohm"%Rb1)
#Answer for R1 and base resistor do not match with the book

Emitter resistance = 490.2 ohm
Resistance R1      = 49.89 k-ohm
Resistance R2      = 6.17 k-ohm
Base resistance effect of reducing stability factor reduces input impedence = 1.595757 k-ohm


## Example 2.46, Page No.115¶

In [24]:
# R1,R2  ,Re

import math
#Variable declaration
S=2.0                   # stability factor
Vbe=0.8
Vcc=20.0                # collector voltage in volts
Rc=5.0                  # collector resistance in killo ohms
Vce=11.5                # Collector to emitter voltage
Ic=1.5                  # in milli amperes
Beta=50.0               # gain

#Calculations
Ib=(Ic*10**-3)/Beta                   # Base current in micro ampere
Re=(Vcc-Vce-(Rc*10**3*Ic*10**-3))/(Ic*10**-3+Ib)# emitter resistance in ohms
Rb=(((1+Beta))/(Beta-1))*Re           # base resistance in killo ohms
Vr2= Vbe+(Ic+Ib*10**3)*Re*10**-3      # voltage is R2
x=(Vr2/Vcc)                           # Voltage
R1=math.floor(((Rb)/x)*10**-3*100)/100    # resistance in killo ohms
R2=((x*R1)/(1-x))*10**3               # RESISTANCE IN KILLO OHMS

#Result
print("Emitter resistance = %.1f ohm"%(Re))
print("Resistance R1      = %.2f k-ohm"%R1)
print("Resistance R2      = %.1f k-ohm"%R2)

Emitter resistance = 653.6 ohm
Resistance R1      = 7.55 k-ohm
Resistance R2      = 746.7 k-ohm


## Example 2.47, Page No. 124¶

In [31]:
# Ai,Ri,Av

import math
#Variable declaration
Rs=800.0                     # Internal resistance in ohms
Rl=1000.0                    # Load resistance in ohms
# H-paramters are
Hie=1.0                      # in killo ohms
Hre=2*10**-4
Hfe=50
Hoe=25*10**-6                # in ampere per volt

#Calcualtions
Ai= -Hfe/(1+Hoe*Rl)                    # Current gain
Ri= Hie*10**3-((Hfe*Hre)/(Hoe+(1/Rl))) # Input resistance in ohms
Ri = math.floor(Ri*100)/100
Av= Ai*(Rl/Ri)                         # Voltage Gain

#Result
print("Current gain     = %.2f"%Ai)
print("Input resistance = %.2f ohm"%Ri)
print("Voltage gain     = %.2f"%Av)

Current gain     = -48.78
Input resistance = 990.24 ohm
Voltage gain     = -49.26


## Example 2.48, Page No. 126¶

In [37]:
# Ai,Ri,Av,Ro

import math
#Variable declaration
Rl=1.2*10**3               # Load resistance in ohms
# H-paramters are
Hib=28.0                   # in  ohms
Hrb=5*10**-4
Hfb=-0.98
Hob=0.34*10**-6            # in ampere per volt

#Calculations
Ai= -Hfb/(1+Hob*Rl)        # Current gain
Ai = math.ceil(Ai*100)/100
Ri= Hib+(Hrb*Ai*Rl)        # Input resistance in ohms
Av= round(Ai*(Rl/Ri))      # Voltage Gain
dh=(Hib*Hob)-(Hrb*Hfb)
Ro=(Hib/dh)*10**-3         # Output resistance in killo ohms

#Result
print("Current gain     = %.2f"%Ai )
print("Input resistance = %.1f ohm"%Ri)
print("Voltage gain     = %.f"%Av)
print("Ouput resistance = %.f k-ohm"%Ro)

Current gain     = 0.98
Input resistance = 28.6 ohm
Voltage gain     = 41
Ouput resistance = 56 k-ohm


## Example 2.49, Page No. 129¶

In [45]:
# Ai,Ri,Av,Avs,Ais

import math
#Variable declaration
Rl=1000.0                # Load resistance in ohms
Rs=1200.0                # Internal Resistance
# H-paramters are
Hib=22.0                 # in  ohms
Hrb=3*10**-4
Hfb=-0.98
Hob=0.5*10**-6           # in ampere per volt

#calculations
Ai= -Hfb/(1+Hob*Rl)      # Current gain
Ai = math.ceil(Ai*100)/100
Ri= Hib+(Hrb*Ai*Rl)      # Input resistance in ohms
Ri = math.ceil(Ri*10)/10
Av=(Ai*(Rl/Ri))          # Voltage Gain
dh=(Hib*Hob)-(Hrb*Hfb)
Avs=(Av*Ri)/(Ri+Rs)      # Overall Voltage gain
Ais=(Ai*Rs)/(Ri+Rs)      # Overall Current gain

#Result
print("Current gain         = %.2f"%Ai)
print("Input resistance     = %.1f ohm"%Ri)
print("Voltage gain         = %.3f"%Av)
print("Overall Voltage gain = %.3f"%Avs)
print("Overall Current gain = %.3f"%Ais)

Current gain         = 0.98
Input resistance     = 22.3 ohm
Voltage gain         = 43.946
Overall Voltage gain = 0.802
Overall Current gain = 0.962


## Example 2.50, Page No.130¶

In [61]:
# Ai,Ri,Av,Ro

import math
#Variable declaration
Rl=5000.0            # Load resistance in ohms
Rs=1000.0            # Source internal resistance
R1=10.0              # Resistance in killo ohms
R2=10.0              # Resistance in killo ohms
Re=5*10**3           # Emitter resistance in  ohms
# H-paramters are
Hic=2000.0              # in killo ohms
Hrc=1.0
Hfc=-51.0
Hoc=25*10**-6        # in ampere per volt

#Calculations
Ai= -Hfc/(1+Hoc*Rl)          # Current gain
Ai = math.floor(Ai*10)/10
Ri= (Hic+(Hrc*Ai*Rl)) # Input resistance in ohms
Ri = Ri/1000                 # in Killo ohm
Z1= (R1*R2)/(R1+R2)
Zi=(Ri*Z1)/(Ri+Z1)           # input resistance of amplifier stage in killo ohms
Av=round((Ai*(Rl/Ri))*10**-3)# Voltage Gain
Ro=-(Rs+Hic)/Hfc       # Output resistance in  ohms
Ro = math.floor(Ro*10)/10
Zo= (Ro*Re)/(Ro+Re)          # output resistance of amplifier stage in ohms

#Result
print("Current gain                        = %.1f"%Ai)
print("Input resistance                    = %.f k-ohm"%(Ri))
print("Voltage gain                        = %.f"%Av)
print("input resistance of amplifier stage = %.1f k-ohm"%Zi)
print("Output resistance                   = %.1f ohm"%Ro)
print("output resistance of amplifier stage= %.1f ohm"%Zo)
#Answer for Zo is wrong in the book

Current gain                        = 45.3
Input resistance                    = 228 k-ohm
Voltage gain                        = 1
input resistance of amplifier stage = 4.9 k-ohm
Output resistance                   = 58.8 ohm
output resistance of amplifier stage= 58.1 ohm


## Example 2.51, Page No. 131¶

In [78]:
# Ai,Ri,Av,Z0

import math
#Variable declaration
R1=20.0              # Resistance in killo ohms
R2=10.0              # Resistance in killo ohms
Rc=5.0               # collector resistance in killo ohms
R=10.0               # resistance in killo ohms
Rs=800.0             # Internal resistance in ohms
# H-paramters are
Hie=1.5              # in killo ohms
Hre=5*10**-3
Hfe=50.0
Hoe=2*10**-6         # in micro ampere per volt
Ai= -Hfe             # Current gain
Ri= Hie              # Input resistance in ohms

#Calculations
Rl=(Rc*R)/(Rc+R)     # Load resistance in killo ohms
Rl= math.floor(Rl*10)/10
Z1= (R1*R2)/(R1+R2)
Zi=(Ri*Z1)/(Ri+Z1)   # input resistance of amplifier stage in killo ohms
Av= (Ai*(Rl/Ri))# Voltage Gain
Ro=(1/Hoe)     # output resistane in killo ohms
Zo=(Ro*Rl)/(Ro+Rl)   # output resistance of amplifier stage in ohms

#Result
print("Current gain                   = %.f"%Ai)
print("input resistance of amplifier  = %.2f k-ohm"%Zi)
print("Voltage gain                   = %.f"%Av)
print("output resistance of amplifier = %.1f ohm"%Zo)

Current gain                   = -50
input resistance of amplifier  = 1.22 k-ohm
Voltage gain                   = -110
output resistance of amplifier = 3.3 ohm


## Example 2.52, Page No. 131¶

In [97]:
# Ai,Ri,Av

import math
#Variable declaration
Rs=0.5                # Internal resistance in killo ohms
Rl=5000.0             # Load resistance in ohms
# H-paramters are
Hie=1000.0            # in ohms
Hfe=50.0
Hoe=25*10**-6         # in ampere per volt

#Calculations
Ai= (1+Hfe)/(1+Hoe*Rl)# Current gain
Ai = math.floor(Ai*100)/100
Ri= Hie+(Ai*Rl)             # Input resistance in ohms
Ri = math.floor(Ri/100)*100
Av= (Ai*Rl)/Ri              # Voltage Gain

#Result
print("Current gain     = %.2f"%Ai)
print("Input resistance = %.1f k-ohm"%(Ri/1000))
print("Voltage gain     = %.4f"%Av)

Current gain     = 45.33
Input resistance = 227.6 k-ohm
Voltage gain     = 0.9958


## Example 2.53, Page No. 131¶

In [15]:
# Ai,Ri,Av

import math
#Variable declaration
Rs=1.0                   # Internal resistance in  ohms
Rl=1600.0                # Load resistance in ohms
# H-paramters are
Hie=1100.0               # in  ohms
Hfe=2.5*10**-4
Hoe=25*10**-6            # in ampere per volt

#Calcualtions
Ai= -Hfe/(1+Hoe*Rl)      # Current gain
Ri= round(Hie+(Ai*Rl))   # Input resistance in ohms
Av= Ai*(Rl/Ri)           # Voltage Gain
Av = math.ceil(Av*10**6)/100
Ai = math.ceil(Ai*10**5)/10
Pg=Ai*Av

#Result
print("Current gain     = %.1f * 10^-4"%(Ai))
print("Input resistance = %.f k-ohm"%Ri)
print("Voltage gain     = %.2f * 10^-4"%Av)
print("Power gain       = %.2f *10^-8"%(math.floor(Pg*100)/100))

Current gain     = -2.4 * 10^-4
Input resistance = 1100 k-ohm
Voltage gain     = -3.49 * 10^-4
Power gain       = 8.37 *10^-8


## Example 2.54.a, Page No. 132¶

In [17]:
# Icq,Vcq

import math
#Variable declaration
Vbe=0.0
Vcc=18.0                  # collector voltage in volts
R1=510.0                  # resistance in killo ohms
R2=510.0                  # resistance in killo ohms
Rc=9.1                    # clollector resistance in killo ohms
Re=7.5                    # emitter resistance in killo ohms
Rs=1.0                    # Internal resistance in  ohms
Rl=1600.0                 # Load resistance in ohms
# H-paramters are
Hie=1100.0                # in  ohms
Hfe=2.5*10**-4
Hoe=25*10**-6             # in ampere per volt

#Calculations
Vb=Vcc * (R2/(R1+R2))     # vOLTAGE AT BASE
Ic= (Vb-Vbe)/Re           # in milli amperes
Vce= Vcc-(Ic*(Rc+Re))     # Colector to emitter voltage in volts
Ai= -Hfe/(1+Hoe*Rl)       # Current gain
Ri= round(Hie+(Ai*Rl))    # Input resistance in ohms
Av= Ai*(Rl/Ri)            # Voltage Gain

#Result
print("Colector to emitter voltage = %.1f V"%Vce)
print("Collector current           = %.1f mA"%Ic)

Colector to emitter voltage = -1.9 V
Collector current           = 1.2 mA


## Example 2.54.b, Page No. 132¶

In [21]:
# Av,Ri

import math
#Variable declaration
Vbe=0.0
Vcc=18.0                  # collector voltage in volts
R1=510.0                  # resistance in killo ohms
R2=510.0                  # resistance in killo ohms
Rc=9.1                    # clollector resistance in killo ohms
Re=7.5                    # emitter resistance in killo ohms
Rs=1.0                    # Internal resistance in  ohms
Rl=1600.0                 # Load resistance in ohms
# H-paramters are
Hie=1.0                   # in  killo ohms
Hfe=50.0
Hoe=0.0                   # in ampere per volt

#Calculations
Vb=Vcc * (R2/(R1+R2))     # VOLTAGE AT BASE
Ic= (Vb-Vbe)/Re           # in milli amperes
Vce= Vcc-(Ic*(Rc+Re))     # Colector to emitter voltage in volts
Ai=-Hfe                   # current gain
Ri=Hie                    # Input resistance in ohms
Z1= (R1*R2)/(R1+R2)
Zi=(Ri*Z1)/(Ri+Z1)        # input resistance of amplifier stage in killo ohms
Av= Ai*(Rc/Ri)            # Voltage Gain

#Result
print("input resistance of amplifier stage = %.2f k-ohm"%(math.floor(Zi*100)/100))
print("Voltage gain is %.f"%Av)

input resistance of amplifier stage = 0.99 k-ohm
Voltage gain is -455


## Example 2.55, Page No. 140¶

In [34]:
# resitive paramters

import math
#Variable declaration
Ic= 5.0                     # in milli amperes
Vt=26.0                     # voltage
# H-paramters are
hie=1.0                     # in killo ohms
hfe=100.0
hoe=4*10**-5                # in ampere per volt
hre=10**-4

#Calculations
gm=math.floor(Ic*1000/Vt)/1000# transconductance
rbe= hfe/gm                 # in ohms
rbb=hie*10**3-rbe           # in ohms
rbc=(rbe/(hre)*10**-6)      # in mega ohms
gce1=hoe-(1+hfe)*(1/(rbc*10**6))
rce=(1/gce1)*10**-3         #in killo ohms

#Result
print("transconductance = %.3f mho"%gm)
print("Rbe = %.f ohm"%rbe)
print("Rbb = %.f ohm"%rbb)
print("Rbc = %.2f Mega ohm"%rbc)
print("gce1= %.2f * 10^-5 mho"%(gce1*10**5))
print("Rce = %.1f killo ohm"%rce)
#Answer for Rbe is wrong in the book and hence for Rbb and Rbc

transconductance = 0.192 mho
Rbe = 521 ohm
Rbb = 479 ohm
Rbc = 5.21 Mega ohm
gce1= 2.06 * 10^-5 mho
Rce = 48.5 killo ohm


## Example 2.56, Page No. 140¶

In [40]:
# ressitive paramters

import math
#Variable declaration
Ic= 1.0        # in milli amperes
Vt=26.0        # volatge
ft=80.0        # frequency in mega hertz
# H-paramters are
hie=6.0        # in killo ohms
hfe=224.0

#Calculations
gm=Ic/Vt       # transconductance
rbe= hfe/gm    # in ohms
rbb=hie*10**3-rbe
Cbe= (((gm)/(2*math.pi*ft*10**6))-Cbc*10**-12)*10**12

#Result
print("transconductance = %.2f m-mho"%(gm*1000))
print("Rbe = %.3f k-ohm"%(rbe/1000))
print("Rbb = %.f ohm"%rbb)
print("Cbe = %.1f pF"%Cbe)

transconductance = 38.46 m-mho
Rbe = 5.824 k-ohm
Rbb = 176 ohm
Cbe = 64.5 pF


## Example 2.57, Page No. 145¶

In [44]:
# alpha ,beta and cut off frequencies

import math
#Variable declaration
# H-paramters are
hie=6.0             # in killo ohms
hfe=224.0
gm=38.0             # transconductance
rbe=5.9             # in killo ohms
rbb=100.0           # in ohms
Cbe= 63.0           # in pico farad

#Calculations
falpha= ((hfe)/(2*math.pi*rbe*10**3*Cbe*10**-12))*10**-6
fbeta= ((1)/(2*math.pi*rbe*10**3*(Cbe+Cbc)*10**-12))*10**-6
ft= ((gm*10**-3/(2*math.pi*(Cbe+Cbc)*10**-12)))*10**-6

#Result
print("F_alfa = %.1f MHz"%falpha)
print("F_beta = %.3f MHz"%(math.floor(fbeta*1000)/1000))
print("F_t    = %.2f MHz"%(math.floor(ft*100)/100))

F_alfa = 95.9 MHz
F_beta = 0.359 MHz
F_t    = 80.63 MHz


## Example 2.58, Page No. 147¶

In [46]:
# ressitive paramters

import math
#Variable declaration
Ic= 2.6                   # in milli amperes
Vt=26.0                   # volatge
ft=500.0                  # frequency in mega hertz
rbb=100.0                 # in ohms
rbe=1.0                   # IN KILLO OHMS

#calculations
gm=Ic/Vt                  # transconductance
Beta= gm*rbe*10**3
Cbe= (((gm)/(2*math.pi*ft*10**6))-Cbc*10**-12)*10**12

#Result
print("transconductance = %.1f mho"%gm)
print("Cbe = %.2f pF"%Cbe)
#Answer for Cbe is slightly different than book

transconductance = 0.1 mho
Cbe = 28.83 pF


## Example 2.59, Page No. 148¶

In [72]:
# h-parameters and hybrid parameters

import math
#Variable declaration
# H-paramters are
hie=1100.0               # in killo ohms
hre=2.5*10**-4
hfe=50.0
hoe=2.5*10**-5           # in ampere per volt
rbb=100.0

#Calculations
hic=hie
hrc=1-hre
hfc=-(1+hfe)
hoc=hoe
hib=(hie/(1+hfe))
hrb= ((hie*hoe)/(1+hfe))-hre
hob=(hoe/(1+hfe))
rbe=(hie-rbb)*10**-3      # in killo ohms
rbc= ((hie-rbb)/hre)*10**-6
gm= ((hfe/(hie-rbb)))
x=hoe-((hfe*hre)/(hie-rbb))
rce=1/(1.25*10**-2)

#Result
print("\nH-parameters for common collector configuration are:")
print("hic = %.f ohm\nhrc = %.f\nhfc = %.f\nhoc = %.1f*10^-5 mho"%(hie,hrc,hfc,hoc*10**5))
print("\nH-parameters for common collector configuration are:")
print("hib = %.2f ohm\nhrb = %.1f*10^4\nhob = %.1f*10^-6 mho"%(hib,hrb*10**4,hob*10**6))
print("\nhybrid pie paramtere are:")
print("rbe(in killo ohms)   = %.f\nrbc(mega ohms)\t     = %.f\ntransconductance(mho)= %.f\nrce(in killo ohms)   = %.f"%(rbe,rbc,gm,rce))

H-parameters for common collector configuration are:
hic = 1100 ohm
hrc = 1
hfc = -51
hoc = 2.5*10^-5 mho

H-parameters for common collector configuration are:
hib = 21.57 ohm
hrb = 2.9*10^4
hob = 0.5*10^-6 mho

hybrid pie paramtere are:
rbe(in killo ohms)   = 1
rbc(mega ohms)	     = 4
transconductance(mho)= 0
rce(in killo ohms)   = 80


## Example 2.60, Page No. 149¶

In [78]:
# hybrid parameters

import math
#Variable declaration
Ic= 10.0              # in milli amperes
Vt=26.0               # volatge
ft=500.0              # frequency in mega hertz
gm=Ic/Vt              # transconductance
# H-paramters are
hie=500.0             # in killo ohms
hfe=100.0
hre=0.1
hoe=4*10**-5          # in ampere per volt

#Calculations
rbe=hfe/gm            # in ohms
rbc= ((rbe)/hre)*10**-3
x=hoe-((hfe*10**-4)/(rbe))
rce=(1/(x*10**-2))*10**-5
Cbe=(((gm)/(2*math.pi*ft*10**6))*10**13-Cbc)

#Result
print("transconductance = %.3f mho"%gm)
print("(rbe) = %.f ohm"%rbe)
print("(rbc) = %.1f Mega-ohm"%rbc)
print("(rce) = %.f k-ohm"%rce)
print("(Cbe) = %.f pF"%Cbe)

transconductance = 0.385 mho
(rbe) = 260 ohm
(rbc) = 2.6 Mega-ohm
(rce) = 650 k-ohm
(Cbe) = 1221 pF


## Example 2.61, Page No. 149¶

In [81]:
# hybrid parameters

import math
#Variable declaration
Ai=10.0           # current gain
Vce=10.0
Ic= 10.0          # in milli amperes
Vt=26.0           # volatge
f=10.0            # frequency in mega hertz
gm=Ic/Vt          # transconductance
# H-paramters are
hie=500.0         # in ohms
hfe=100.0

#Calculations
rbe= hfe/gm
rbb= hie-rbe
Ft= Ai*f
fb= Ft/hfe
Ce=((gm/(2*math.pi*Ft*10**6))-Cbc*10**-12)*10**12

#Result
print("(gm)  = %.1f mS"%(gm*10**3))
print("(rbe) = %.f ohm"%rbe)
print("(rbb) = %.f ohm"%rbb)
print("(ft)  = %.f MHz"%Ft)
print("(fb)  = %.f MHz"%fb)
print("(Ce)  = %.f p-F"%Ce)

(gm)  = 384.6 mS
(rbe) = 260 ohm
(rbb) = 240 ohm
(ft)  = 100 MHz
(fb)  = 1 MHz
(Ce)  = 609 p-F


## Example 2.62, Page No. 150¶

In [58]:
# mid band voltage gain and cut off frequency

import math
#Variable declaration
Rs=1.0
ft=500.0                # frequency in mega hertz
# H-paramters are
hie=500.0
hfe=100.0
rbe= 900.0
rbb= 100.0
Rl=500.0                 # load resistance in ohms

#Calculations
gm=hfe/rbe               # in mho
Av=((-gm*Rl))            # voltage gain
Avs= ((Av*rbe)/(Rs*10**3+rbb+rbe))
fb= ft/hfe

#Result
print("mid band voltage gain is %.f"%Avs)
print("Fb = %.f MHz"%fb)

mid band voltage gain is -25
Fb = 5 MHz


## Example 2.63, Page No. 150¶

In [83]:
# mid band voltage gain and cut off frequency

import math
#Variable declaration
Rs=1.0
ft=500.0         # frequency in mega hertz
# H-paramters are
gm=100.0         # in mho
hfe=100.0
rbb= 100.0
Rl=500.0         # load resistance in ohms

#Calculations
rbe=hfe/(gm*10**-3)
Av=((-gm*10**-3*Rl))
Avs= ((Av*rbe)/(Rs*10**3+rbb+rbe))
fb= ft/hfe

#Result
print("mid band voltage gain is %.2f"%Avs)
print("Fb = %.f MHz"%fb)

mid band voltage gain is -23.81
Fb = 5 MHz


## Example 2.64, Page No. 156¶

In [89]:
# resonant frequency and voltage drop

import math
#Variable declaration
L=100.0                # in micro henry
R=15.7                 # in ohms
V=0.157

#Calculations
fr=((1/(2*math.pi*math.sqrt(L*10**-6*C*10**-12))))*10**-6 # resonant frequency in mega hertz
Ir=V/R
Vr=V
Vl=Ir*(2*math.pi*fr*10**6*L*10**-6)
Xc= (1/(2*math.pi*fr*10**6*C*10**-12))
Vc= Ir*Xc
Q=((2*math.pi*fr*10**6*L*10**-6)/R)

#Result
print("resonant frequency             = %.f MHz"%fr)
print("Voltage drop across resitor    = %.3f V"%Vr)
print("Voltage drop across inductor   = %.3f V"%Vl)
print("Voltage drop across capacitor  = %.3f V"%Vc)
print("Quality factor of coil         = %.f"%Q)

resonant frequency             = 1 MHz
Voltage drop across resitor    = 0.157 V
Voltage drop across inductor   = 6.283 V
Voltage drop across capacitor  = 6.283 V
Quality factor of coil         = 40


## Example 2.65, Page No. 160¶

In [99]:
# resonant frequency ,impedence,Q-factor,Bnadwidth,line current  and resonant frequency

import math
#Variable declaration
V=10.0
L=1.2                # in micro henry
R=8.0                # in ohms

#Calculations
fr=(1/(2*math.pi))*(math.sqrt((1/(L*10**-3*C*10**-12))-(R**2/(L*10**-3)**2))*10**-3)  # resonant frequency in killo hertz
Zr=(L*10**-3)/(C*10**-9*R)                                                            # IN KILLO OHMS
Q=((2*math.pi*fr*10**6*L*10**-6)/R)
BW=fr/Q
Ir=(V/Zr)*10**3
fr1=((1/(2*math.pi*math.sqrt(L*10**-3*C*10**-12))))*10**-3                            #resonant frequency in mega hertz

#Result
print("resonant frequency = %.3f kHz"%fr)
print("Impedence is %.f k-ohm"%Zr)
print("bandwidth is %.2f kHz"%BW)
print("line current is %.2f micro-A"%Ir)
print("Quality factor of coil is %.1f"%Q)
print("resonant frequency neglecting resistance = %.3f kHz"%(math.floor(fr1*1000)/1000))

resonant frequency = 324.872 kHz
Impedence is 750 k-ohm
bandwidth is 1.06 kHz
line current is 13.33 micro-A
Quality factor of coil is 306.2
resonant frequency neglecting resistance = 324.873 kHz


## Example 2.66, Page No. 161¶

In [104]:
# resonant frequency ,impedence,Q-factor,Bnadwidth

import math
#Variable declaration
V=10.0
L=150.0            # in micro henry
R=5                # in ohms

#Calculations
fr=((1/(2*math.pi*math.sqrt(L*10**-6*C*10**-12))))*10**-3  # resonant frequency in killo hertz
Zr=(L*10**-3)/(C*10**-9*R)                                 # IN KILLO OHMS
Q=((2*math.pi*fr*10**6*L*10**-6)/R)*10**-3
BW=(fr/Q)

#Result
print("resonant frequency = %.1f kHz"%fr)
print("Impedance is %.f k-ohm"%(Zr*10**-3))
print("Quality factor of coil is %.f"%Q)
print("bandwidth = %.1f kHz"%BW)

resonant frequency = 1299.5 kHz
Impedance is 300 k-ohm
Quality factor of coil is 245
bandwidth = 5.3 kHz


## Example 2.67, Page No. 162¶

In [8]:
# Q FACTOR

import math
#Variable declaration
fr=1600.0           # resonant frequency in killo hertz
BW=10.0             # In kill hertz

#Calculations
Qr=fr/BW

#Result
print("value of quality factor is %.f"%Qr)

value of quality factor is 160


## Example 2.68, Page No. 163¶

In [10]:
# Q FACTOR

import math
#Variable declaration
fr=2*10**6         # resonant frequency in hertz
BW=50*10**3         # hertz

#Calcualtions
Qr=fr/BW

#Result
print("value of quality factor is %.f"%Qr)

value of quality factor is 40


## Example 2.69, Page No. 163¶

In [115]:
# parallel impedence

import math
#Variable declaration
fr=455.0*10**3              # resonant frequency in hertz
BW=10.0*10**3               # hertz
Xl=1255.0                 # inductive reactance in ohm

#Calculations
Qr=fr/BW
R=Xl/Qr
L=Xl/(2*math.pi*fr)
C=1/(2*math.pi*fr*Xl)
Zp=(L/(C*R))*10**-3

#Result
print("value of quality factor is %.1f"%Qr)
print("resisitance =  %.1f ohm"%R)
print("inductance  = %.3f * 10^-3 H"%(L*1000))
print("capacitor   = %.1f * 10^-12 F"%(C*10**12))
print("parallel impedence = %.f k-ohm"%Zp)

value of quality factor is 45.5
resisitance =  27.6 ohm
inductance  = 0.439 * 10^-3 H
capacitor   = 278.7 * 10^-12 F
parallel impedence = 57 k-ohm