import math
Rpy=40.0
N1=74.0
N2=14.0
R2=3.7*10**3
R1=4.7*10**3
Vbe=0.7
Re=1.0*10**3
Vcc=13.0
Rl=56.0
#Calculations
print("Q-point")
Vb=Vcc*(R2/(R1+R2))
Ic=(Vb-Vbe)/Re
Ie=Ic
Vce=Vcc-Ic*(Rpy+Re)
rl=(N1/N2)**2 *Rl
rl=rl+Rpy
Ic=5*10**-3
Vce=Ic*rl
#Results
print("The value of Vce is %.2f v " %Vce)
import math
#initialisation of variables
Vcc=13.0
Icq=5.0*10**-3
Vceq=8.0
Vp=Vceq
Ip=Icq
nt=0.8
#Calculations
Pi=Vcc*Icq
Po=.5*Vp*Ip
P0=nt*Po
n=(P0/Pi)*100.0
#Results
print(" maximum efficiency is %3.2f percentage " %n)
import math
#initialisation of variables
N1=60.0
N2=10.0
Rl=16.0
Rpy=0
R6=56.0
Vcc=27.0
Vce=0.5
n=0.79
#Calculations
print(" Referred laod")
rl=(N1/N2)**2 *Rl
print(" tatol ac load line in series with each of Q2 and Q3")
Rl=rl+R6+Rpy
print(" peak primary current")
Ip=(Vcc-Vce)/Rl
print("peak primary voltage")
Vp=Vcc-Vce-(Ip*R6)
print("power delivered to primary")
Po=.5*Vp*Ip
#Calculations
Po=Po*n#n is power efficiency
print("power delivered to the load %.2f W " %Po)
import math
#initialisation of variables
Po=4.0
nt=0.8
Vcc=30.0
Vp=Vcc
Rl=16.0
#Calculations
P0=Po/nt
rl=(Vp)**2 /(2*P0)
rl=4*rl
print("transformer specification Po=4 %Rl=16 rl=360")
Vce=2.0*Vcc
Ip=(2.0*P0)/Vp
Pi=Vcc*.636*Ip
Pt=0.5*(Pi-P0)
#Results
print(" transistor specification is Py=.68W Vce=60 Ip=333mA")
print("power delivered to the load Pi = %.2f W " %Pi)
print("power delivered to the load Pt = %.2f W " %Pt)
import math
#initialisation of variables
Rl=50.0
Po=1.0
hFE=50.0
Vbe=0.7
Vrc=4.0
Vre=1.0
Vd1=0.7
#Calculations
Vd2=Vd1
Vp=math.sqrt(2*Rl*Po)
Ip=Vp/Rl
Re3=.1*Rl
Re2=4.7#use stabdard value
Re2=Re3
Icq=.1*Ip
Vb=Vbe+Icq*(Re2+Re3)+Vbe
Vc1=Vrc
Ib2=Ip/hFE
Irc=Ib2+1*10**-3
Rc=Vrc/Irc
Rc=680.0 #use standard value
Vcc=2.0*(Vp+Vre+Vbe+Vrc)
Vcc=32#use standard value
Vrcdc=.5*(Vcc-Vb)
Ic1=Vrcdc/Rc
Rb=(Vb-Vd1-Vd2)/Ic1
#Results
print("The value of Rb is %.2f kOhm " %Rb)
import math
#initialisation of variables
Vcc=32.0
Vce=32.0
Ip=200.0*10**-3
Po=1.0
#Calculations
Ic=1.1*Ip
Pi=0.35*Vcc*Ip
Pt=0.5*(Pi-Po)
#Results
print("power delivered to the load Pi = %.2f " %Pi)
print("power delivered to the load Pt = %.2f " %Pt)
import math
#initialisation of variables
f=50.0
hib=2.0
Rl=50.0
#Calculations
Ce=1.0/(2*3.14*f*hib)
Co=1.0/(2*3.14*50*.1*Rl)
#Results
print("The value of Ce is %.2f pF " %(Ce*10**3))
print("The value of Co is %.2f pF " %(Co*10**3))
import math
#initialisation of variables
hFE=2000.0
Vbe=1.4
Vp=10.0
Ip=200.0*10**-3
Icq2=20.0*10**-3
Re3=4.7
Re2=4.7
Vd=0.7
Ve1=3.0
Vc1=15.2
#Calculations
Vrc=Vc1
Vb=Vbe+Icq*(Re2+Re3)+Vbe
Vcc=Vrc+Vc1+Vb
Ib2=Ip/hFE
Irc=1.0*10**-3
Vrcac=4.0
Rc=Vrcac/Irc
Ic1=Vrc/Rc
Rb=(Vb-(4*Vd))/Ic1
#Results
print("The value of Rb is %.2f kohm " %Rb)
import math
#initialisation of variables
Vb=3.2
Ic1=5*10**-3
Vce=3.2
Vbe=0.7
#Calculations
Vbmin=Vb-0.5
Vbmax=Vb+0.5
I10=.1*Ic1
R10=(Vce-Vbe)/I10
R10=4.7*10**3#use standard value
print(" for Vce=3.7")
Vce=3.7
I10max=(Vce-Vbe)/R10
print("Vce=2.7V")
Vce=2.7
I10min=(Vce-Vbe)/R10
R=Vbe/I10min
R11=Vbe/I10max
R12=R-R11
#Results
print("The value of R12 is %.2f kohm " %R12)
import math
#initialisation of variables
Rl=16.0
Po=6.0
Vbe=0.7
#Calculations
Vp=math.sqrt(2.0*Rl*Po)
Vr14=0.1*Vp
Vr15=Vr14
R14=0.1*Rl
R15=R14
Vce3=1.0
Vce4=Vce3
Vr9=3.0
Vr11=Vr9
Vcc=(Vp+Vr14+Vbe+Vce3+Vr9)
Vee=-Vcc
Ip=Vp/Rl
print(" DC power inpit from supply line")
Pi=(Vcc-Vee)*.35*Ip
Pt=.5*(Pi-Po)
Vce=2*Vcc
Ic=1.1*Ip
#Results
print(" output transistor specification %.2f mA" %Ic)
import math
#initialisation of variables
hFE7=20.0
Icbo=50.0*10**-6
hFE5=70.0
Vr9=3.0
Ip=869.0*10**-3
R15=1.5
R8=15.0*10**3
Vbe=0.7
Vr11=3.0
Vee=20.0
#Calculations
R12=0.01/Icbo
R12=220#use standard value
R13=R12
Ib5=Ip/(hFE7*hFE5)
Ic3=2.0*10**-3
R9=Vr9/Ic3
R11=R9
Iq78=0.1*Ip
Vr14=Iq78*R15
Vr15=Vr14
Vr10=(Vr14+Vr15)+(Vr14+Vr15)/2
R10=Vr10/Ic3
Ir8=(Vr11+Vbe)/R8
R7=(Vee-(Vr11+Vbe))/Ir8
#Results
print("The value of R7 is %.2f kohm " %(R7/1000))
import math
#initialisation of variables
Rl=20.0
Po=2.5
Rd=4.0
Vr6=1.0
Vr9=Vr6
Vth=1.0
gFS=250.0*10**-3
Vbe=0.7
#Calculations
Vp=math.sqrt(2*Rl*Po)
Ip=Vp/Rl
Vcc=(Vp+Ip*Rd)
vr6=Ip/gFS
Vr2=vr6+1
Vce=Vr2
Vce3=1.0
Vr2=Vcc-Vce
Vee=Vcc
Vr3=Vee-Vbe
Vr7=Vr2-Vr6
Vr8=Vcc-(-Vee)-Vr6-Vr7-Vr9
#Results
print("The value of Vr8 is %.2f V " %Vr8)
import math
#initialisation of variables
R6=100.0*10**3
R9=R6
Vth=1.0
Vr7=8.0
Vr8=14.0
Vr3=11.3
Vpout=10.0
Vpin=800.0*10**-3
#Calculations
I6=Vth/R6
R7=Vr7/I6
R8=Vr8/I6
Ic1=1*10**-4
Ic2=Ic1
Vr2=9
R2=Vr2/Ic1
R3=Vr3/(Ic1+Ic2)
R5=4.7*10**3
Acl=Vpout/Vpin
R4=R5/(Acl-1.0)
#Results
print("The value of R4 is %.2f kohm " %(R4/1000))
import math
#initialisation of variables
Vce=1.5
Vcc=17.0
Vd1=0.7
R8=1.5*10**3
R9=R8
Rl=100.0
R6=8.2
#Calculations
I4=(Vcc-Vd1)/(R8+R9)
Vc3=Vcc-(I4*R8)
print(" bootstrap capacitance terminal voltage is %3.1fV " %Vc3)
V=Vcc-Vce#V=Vp+Vr6
Ip=V/(Rl+R6)
Vp=Ip*Rl
print(" peak output voltage is %3.1fV " %Vp)
Po=(Vp)**2.0/(2.0*Rl)
#Results
print(" peak output power is %dW " %Po)
import math
#initialisation of variables
Rl=8.0
Po=6.0
vs=0.1
hFE=1000.0
Vce=2.0
f=50.0*10**3
Vd1=0.7
#Calculations
Vp=math.sqrt(2*Rl*Po)
Ip=Vp/Rl
R6=.1*Rl
R7=R6
Vcc=Vp+Ip*R6+Vce
Ib=Ip/hFE
I4=2*10**-3
R4=(Vcc-Vd1-Vd1)/I4
R8=.5*R4
Acl=Vp/vs
R3=100*10**3
R2=R3/(Acl-1)
SR=(2*3.14*f*Vp)*10**-6
#Results
print(" slew rate is %.2f V/us " %SR)
import math
#initialisation of variables
f=50.0
R1=100.0*10**3
R2=1.0*10**3
R8=2.7*10**3
#Calculations
R9=R8
C1=1/(2*3.14*f*.1*R1)
C2=1/(2*3.14*f*R2)
Xc3=.1*((R8*R9)/(R8+R9))
C3=1/(2*3.14*f*Xc3)
C4=C3
#Results
print("The value of C4 is %.2f pF " %(C4*10**6))
import math
#initialisation of variables
Ismin=1.8*10**-3
Ismax=3.4*10**-3
R7=820.0
R5=390.0
R6=18.0*10**3
Vi=100.0*10**-3
Rl=10.0
#Calculations
Vgsmin=Ismin*R7
Vgsmax=Ismax*R7
Acl=(R5+R6)/R5
Vp=Acl*Vi
Ip=Vp/Rl
print("peak output current is %3.3fA " %Ip)
Po=(Vp*Ip)/2.0
#Results
print("peak output power is %3.2fW " %Po)
import math
#initialisation of variables
Vbe=0.7
R2=560.0
R3min=0
R3max=1.0*10**3
Is=2.0*10**-3
#Calculations
Ic2max=Vbe/(R2+R3min)
Ic2min=Vbe/(R2+R3max)
Vgsmin=(Is+Ic2min)*820.0
Vgsmax=(Is+Ic2max)*820.0
#Results
print("The value of Vgsmax is %.2f v " %Vgsmax)
import math
#initialisation of variables
Vcc=12.0
Rl=10.0
Rd=0.5
gfs=2.5
R7=820.0
V9=1.0*10**3
#Calculations
R10=R9
Vp=(Vcc*Rl)/(Rd+Rl)
Ip=Vp/Rl
Vgs=Ip/gfs
Vr7=Is*R7
Vs=Vcc-Vr7-Vgs
Vr9=(Vp*R9)/(R9+R10)
#Results
print("op-amp peak output voltage is %.2f v " %Vr9)
import math
#initialisation of variables
Vbe=0.7
R2=470.0
R3=1.0*10**3
Is=0.5*10**-3
R7=1.5*10**3
Vcc=15
#Calculations
Ic2max=Vbe/R2
Ic2min=Vbe/(R2+R3)
Vgs=(Is+Ic2max)*R7
print(" MOSFET maximum gate source voltage is %.1fV " %Vgs)
Vs=Vcc-Vgs
#Results
print(" op-amp minimum suppy is %.2fV " %Vs)
import math
#initialisation of variables
Vcc=15.0
Rl=15.0
Rd=0.3
R5=2.2*10**3
R6=33.0*10**3
C2=3.9*10**-6
C4=100.0*10**-12
#Calculations
print(" power output")
Vp=(Vcc*Rl)/(Rd+Rl)
Ip=Vp/Rl
Po=(Vp*Ip)/2.0
print(" voltage gain")
Av=(R5+R6)/R5
print("cutoff frequency")
f1=1.0/(2*3.14*C2*R5)
f2=1.0/(2*3.14*C4*R6)
#Results
print(" cutoff frequency f1 %.2f " %f1)
print(" cutoff frequency f2 %.2f " %f2)
import math
#initialisation of variables
Vcc=23.0
Rl=8.0
Rf2=100.0*10**3
Rf1=5.6*10**3
Cf=1.0*10**-6
Vp=Vcc-5
#Calculations
Po=(Vp)**2/(2*Rl)
print("maximum output power is %3.2fW " %Po)
Acl=(Rf1+Rf2)/Rf1
print(" voltage gain %3.1f " %Acl)
f=1/(2*3.14*Cf*Rf1)
#Results
print("lower cutoff frequency is %dHz " %f)
import math
#initialisation of variables
Rf=15.0*10**3
R1=5.6*10**3
vs=0.5
Vp=2.7
#Calculations
Acl=(2.0*Rf)/R1
Vo=Acl*vs
Po=(Vp)**2.0/(2.0*Rl)
#Results
print("load power dissipation is %.2fW " %Po)
import math
#initialisation of variables
Vcc=10.0
Rl=1.0*10**3
f=3.0*10**6
Ip=25.0*10**-3
Vce=0.3
#Calculations
Vp=Vcc-Vce
Po=(Vp)**2 /(2*Rl)
T=1.0/f
t=(Po*T)/(Ip*Vp)
angle=(t/T)*360
print(" conduction angle is %3.1fdegree " %angle)
Idc=Po/Vp
Pi=Vcc*Idc
print( "dc input power is %3.4fW " %Pi)
n=(Po/Pi)*100#efficiency
#Results
print(" maximum efficiency is %3.2f percentage " %n)
import math
#initialisation of variables
f=1.0*10**6
Xc=120.0
Vce=0.5
Vcc=30.0
Rl=1.2*10**3
O=100.0
#Calculations
Cp=1.0/(2*3.14*f*Xc)
Cp=1300*10**-12#use standard value
Lp=1/(((2*3.14*f)**2)*Cp)
Vp=Vcc-Vce
Po=((Vp)**2) /(2*Rl)
Idc=Po/Vp
T=1.0/f
t=(O*T)/360.0
Ip=(Idc*T)/t
#Results
print("The value of Ip is %.2f mA " %(Ip*10**3))
import math
#initialisation of variables
Rw=0.1
f=1.0*10**6
Lp=19.5*10**-6
Rl=1.2*10**3
Vcc=30.0
#Calculations
Idc=12.3*10**-3
QL=(2*3.14*f*Lp)/Rw
Qp=Rl/(2*3.14*f*Lp)
B=f/Qp
Il=(.707*Vp)/(2*3.14*f*Lp)
Pl=(Il)**2 *Rw
Pi=(Vcc*Idc)+Pl
n=(Po/Pi)*100.0
#Results
print(" maximum efficiency is %3.2f percentage " %n)