#Variable declaration
R1=10.0; #1st resistor, Ω
R2=5.0; #2nd resistor, Ω
#Calculation
print("To find h11 and h21, output terminals are shorted.");
h11=R1; #Input impedance with output shorted, Ω
print("h11=%dΩ."%h11);
print("Output current flowing into the box= input current flowing out of the box.");
print("i2=-i1"); #Output current flowing into the box= input current flowing out of the box.
print("h21=i2/i1 = -i1/i1= -1."); #Current gain with output shorted.
print("For finding h22 and h12, voltage source is connected at the output");
#As, there will be no current through 10kΩ resistor due to open circuited input,
print("v1=v2"); #Output voltage is equal to input voltage(equal to voltage drop across 5kΩ resistor)
print("h12=v1/v2 = v2/v2 = 1"); #Voltage feedback ratio with input terminals open
h22=1/R2; #Output admittance, mho
print("h22=%.1f mho"%h22);
#Variable declaration
R1=4.0; #1st resistor(at the input side), Ω
R2=4.0; #2nd resistor(at the middle), Ω
R3=4.0; #3rd resistor(at the output side), Ω
#Calculation
print("To find h11 and h21, output terminals are shorted.");
h11=R1 + (R2*R3/(R2+R3)); #Input impedance with output shorted, Ω
print("h11=%dΩ."%h11);
#As the input current gets divided in half due to R2=R3.
print("Output current flowing into the box=negative of half of input current flowing out of the box.");
print("i2=-i1/2 = -0.5i1");
print("h21=i2/i1 = -0.5i1/i1= -0.5."); #Current gain with output shorted.
print("For finding h22 and h12, voltage source is connected at the output");
#As, there will be no current through the 1st 4kΩ resistor due to open circuited input,
#Voltage gets equally divided across R2 and R3 resistor
print("v1=v2/2 = 0.5v2"); #Input voltage is equal to half of input voltage
print("h12=v1/v2 = 0.5v2/v2 = 0.5"); #Voltage feedback ratio with input terminals open
h22=1/(R2+R3); #Output admittance, mho
print("h22=%.3f mho"%h22);
#Variable declaration
R1=10.0; #Resistor at the input side, Ω
R2=5.0; #Resistor at the middle, Ω
rL=5.0; #Load resistor, Ω
#h-parameter values from 24.1
h11=10.0; #Input impedance with output shorted, Ω
h21=-1.0; #Current gain with output shorted
h12=1.0; #Voltage feedback ratio with input terminal open
h22=0.2; #Output admittance, mho
#Calculation
#(i)
Zin=h11-(h12*h21/(h22+(1/rL))); #Input impedance, Ω
#(ii)
Av=-h21/(Zin*(h22+(1/rL))); #voltage gain,
#Result
print("(i) The input impedance=%.1fΩ."%Zin );
print("(ii) The voltage gain=1/%d."%(1/Av));
#Variable declaration
VCE=10.0; #Collector-emitter voltage, V
IC=1.0; #Collector current, mA
rL=600.0; #a.c load seen by the transistor,Ω
#h-parameters
hie=2000.0; #Input impedance with output shorted, Ω
hoe=10**-4; #Output impedance, mho
hre=10**-3; #Voltage feedback ratio with input terminal open
hfe=50.0; #Current gain with output shorted
#Calculation
#(i)
Zin=hie - (hre*hfe/(hoe+(1/rL))); #Input impedance, Ω
print("Input impedance=%.0f Ω. \n As second term in the expression of Zin is small compared to first, Zin~hie=%dΩ."%(Zin,hie));
#(ii)
Ai=hfe/(1+hoe*rL); #Current gain
print("Current gain=%d"%Ai);
print("if hoe*rL<<1, then Ai~hfe=%d."%hfe);
#(iii)
Av=-hfe/(Zin*(hoe+(1/rL))); #Voltage gain
print("Voltage gain=%.1f"%Av);
from math import ceil
#Variable declaration
VCE=5.0; #Collector-emitter voltage, V
IC=1.0; #Collector current, mA
rL=2.0; #a.c load seen by the transistor,Ω
#h-parameters
hie=1700.0; #Input impedance with output shorted, Ω
hoe=6*10**-6; #Output impedance, mho
hre=1.3*10**-4; #Voltage feedback ratio with input terminal open
hfe=38.0; #Current gain with output shorted
#Calculation
#(i)
Zin=hie - (hre*hfe/(hoe+(1/(rL*1000)))); #Input impedance, Ω
print("Input impedance=%.0f Ω."%Zin);
#(ii)
Ai=ceil((hfe/round((1+hoe*rL*1000),3))*10)/10; #Current gain
print("Current gain=%.1f"%Ai);
#(iii)
Av=-hfe/(Zin*(hoe+(1/(rL*1000)))); #Voltage gain
print("Voltage gain=%.1f"%abs(Av));
#Function for calculating parallel resistance
def pr(r1,r2):
return r1*r2/(r1+r2);
#Variable declaration
RC=10.0; #Collector resistance, kΩ
RL=30.0; #Load resistance, kΩ
R1=80.0; #Resistor R1, kΩ
R2=40.0; #Resistor R2, kΩ
#h-parameters
hie=1500.0; #Input impedance with output shorted, Ω
hoe=5*10**-5; #Output impedance, mho
hre=4*10**-4; #Voltage feedback ratio with input terminal open
hfe=50.0; #Current gain with output shorted
#Calculation
rL=((RC*RL)/(RC+RL))*1000; #a.c load as seen by resistance, Ω
#(i)
Zin=round(hie - (hre*hfe/(hoe+(1/rL))),-1); #Input impedance, Ω
print("Input impedance=%.0f Ω."%Zin);
#Input impedance of stage=input impedance || bias resistors
Zin_stage=round(pr(pr(R1,R2)*1000,Zin),-1); #Ω
print("Input impedance of the stage=%.0f Ω."%Zin_stage);
#(ii)
Av=-hfe/(Zin*(hoe+(1/rL))); #Voltage gain
print("Voltage gain=%d"%Av);
print("The negative sign represents phase reversal.");
#(iii)
Zout=(1/(hoe-(hfe*hre/hie)))/1000; #Output impedance of transistor, kΩ
Zout_stage=pr(Zout,pr(RL,RC)); #Output impedance of the stage, kΩ
print("Output impedance=%.2f kΩ."%Zout);
print("Output impedance of the stage=%.2f kΩ."%Zout_stage);
#Function for calculating parallel resistance
def pr(r1,r2):
return r1*r2/(r1+r2);
#Variable declaration
RC=4.7; #Collector resistance, kΩ
RL=10.0; #Load resistance, kΩ
R1=33.0; #Resistor R1, kΩ
R2=10.0; #Resistor R2, kΩ
#h-parameters
hie=1; #Input impedance with output shorted, kΩ
hoe=25; #Output impedance, μS
hre=2.5*10**-4; #Voltage feedback ratio with input terminal open
hfe=50; #Current gain with output shorted
#Calculation
rL=(RC*RL)/(RC+RL); #a.c load as seen by resistance, kΩ
Ai=hfe/(1+hoe*10**-6*rL*1000); #Current gain
print("Current gain=%.1f"%Ai);
#Variable declaration
R_S=100.0; #Series resistance, Ω
#h-parameters
hie=1.0; #Input impedance with output shorted, kΩ
hoe=25.0; #Output impedance, μS
hre=2.5*10**-4; #Voltage feedback ratio with input terminal open
hfe=50.0; #Current gain with output shorted
#Calculation
Zout=(1/(hoe*10**-6-(hfe*hre/(hie*1000+R_S))))/1000; #Output impedance of transistor, kΩ
print("Output impedance=%.1f kΩ."%Zout);
from math import floor
#Function for calculating parallel resistance
def pr(r1,r2):
return r1*r2/(r1+r2);
#Variable declaration
RC=12.0; #Collector resistance, kΩ
RL=15.0; #Load resistance, kΩ
R1=50.0; #Resistor R1, kΩ
R2=5.0; #Resistor R2, kΩ
hie=1.94; #Input impedance with output shorted, kΩ
hfe=71.0; #Current gain with output shorted
#Calculation
rL=(RC*RL)/(RC+RL); #a.c load as seen by resistance, Ω
#(i)
Zin_base=hie; #Transistor input impedance, kΩ
Zin_circuit=floor(pr(Zin_base,pr(R1,R2))*100)/100; #Circuit input impedance, kΩ
print("Circuit input impedance=%.2fkΩ"%Zin_circuit);
#(ii)
Av=hfe*rL/hie; #Voltage gain
print("Voltage gain=%.0f"%Av);
from math import sqrt
#Variable declaration
hie_min=600; #Minimum input impedance with output shorted, Ω
hfe_min=110; #Minimum current gain with output shorted
hie_max=800; #Maximum input impedance with output shorted, Ω
hfe_max=140; #Maximum current gain with output shorted
rL=460; #a.c collector load, Ω
#Calculation
hie=round(sqrt(hie_min*hie_max)); #Input impedance with output shorted, Ω
hfe=round(sqrt(hfe_min*hfe_max)); #Current gain with output shorted
Av=hfe*rL/hie; #Voltage gain
#Result
print("Voltage gain=%.1f"%Av);
#(a)Variable declaration
Ib=10; #Base current, μA
Ic=1; #Collector current, mA
Vbe=10; #Base-emitter voltage, mV
#Calculation
hie=Vbe*10**-3/(Ib*10**-6); #Input impedance with output shorted, Ω
hfe=Ic*10**-3/(Ib*10**-6); #Current gain with output shorted
#(b) Variable declaration
Vbe=0.65; #Base-emitter voltage, mV
Ic=60; #Collector current, μA
Vce=1; #Collector-emitter voltage, V
#Calculation
hre=Vbe*10**-3/Vce; #Voltage feedback ratio with input terminal open
hoe=Ic/Vce; #Output impedance, μmho
#Result
print("hie=%dΩ"%hie);
print("hfe=%d"%hfe);
print("hre=%.2fe–03"%(hre*1000));
print("hoe=%dμmho"%hoe);