import math
#given
Ro=50.0
ILdB=6.0 #T−type attenuator provide 6−dB insertion loss
#calculation
IL=10**-(ILdB/20) #Determination of R
R=Ro*(1-IL)/(1+IL)
R=round(R,2)
print 'The value of resistance R is',R,'ohm'
#Determination of R3
R3=(2*Ro*IL)/(1-(0.5)**2)
R3=round(R3,1)
print 'The value of resistance R3 is',R3,'ohm'
import math
#given
Ro=50.0
ILdB=6.0
IL=10**-(ILdB/20) #Determination of RA and RB
RA=Ro*(1+IL)/(1-IL)
RA=round(RA,1)
print 'The value of resistance RA and RB is',RA,'ohm'
#Determination of RC
RC=Ro*(1-(IL)**2)/(2*IL)
RC=round(RC,1)
print 'The value of resistance RC is',RC,'ohm'
import math
from math import log10,sqrt
#given
Rs=75.0 #resistance
Rl=50.0
#Determination of R1
R1=sqrt(Rs*(Rs-Rl))
R1=round(R1,2)
print 'The value of resistance R1 is',R1,'ohm'
#Determination of R3
R3=((Rs**2)-(R1**2))/R1
R3=round(R3,2)
print 'The value of resistance R3 is',R3,'ohm'
#Determination of insertion loss
IL=(R3*(Rs+R1))/((Rs+R1+R3)*(R3+R1)-(R3)**2)
ILdB=-20*log10(IL) #convertion of power in decibels
ILdB=round(ILdB,2)
print 'The value of insertion loss is',ILdB,'dB'
from math import log10,sqrt
Rs=10.0
Rl=50.0 #Determination of R2
R2=sqrt(Rl*(Rl-Rs))
R2=round(R2,3)
print 'The value of resistance R2 is',R2,'ohm'
#Determination of R3
R3=((Rl**2)-(R2**2))/R2
R3=round(R3,2)
print 'The value of resistance R3 is',R3,'ohm'
#Determination of insertion loss
IL=(R3*(Rs+Rl))/((Rs+R3)*(R3+R2+Rl)-(R3)**2)
ILdB=-20*log10(IL) #convertion of power in decibels
ILdB=round(ILdB,2)
print 'The value of insertion loss is',ILdB,'dB'
import math
from math import sqrt
C=7*10**-12
R=5.0
L=10**-6
f=25*10**6
#Determination of self resonant freq of coil denoted as Fsr
Fsr=1/(2*3.14*(L*C)**0.5)
Fsr=Fsr/(10**6)
Fsr=round(Fsr,1)
print 'The value of self resonant freq is',Fsr,'MHz'
#Determination of Q−factor of coil , excluding self − capacitive effects
Q=(2*3.14*f*L)/R
print 'The value of Q−factor is',Q
#Determination of effective inductance
Leff=(1-(25/60)**2)**-1
Leff=round(Leff,0)
print 'The value of effective inductance is',Leff,'uH'
#Determination of effective Q−factor
Qeff=(1-0.173)*Q
Qeff=round(Qeff,0)
print 'The value of effective Q−factor is',Qeff
import cmath
from math import sqrt
#given
Lp=150*10**-6 #inductance
Ls=150*10**-6
Cp=470*10**-12 #capacitance
Cs=470*10**-12 #Lp=Ls=150 uH,Cp=Cs=470 pF
Q=85.0 #Q−factor for each ckt is 85
c=0.01 #Coeff of coupling is 0.01
Rl=5000.0 #Load resistance Rl=5000 ohm
r=75000.0 #Constant current source with internal resistance r=75 kohm
#calculations
#Determination of common resonant frequency
wo=1/(sqrt(Lp*Cp))
wo=wo/(10**6)
wo=round(wo,2)
print 'The value of common resonant freq is',wo,'Mrad/sec'
p=3.77*10**6
Z2=complex(62.9004,558) #Formula=Rl/(1+(p*j*Cs*Rl))
Z1=complex(4.3,565) #Formula=r/(1+(p*j*Cp*r)) ;At resonance Zs=Zp=Z
z=complex(0,1)
Z=wo*Ls*(1/Q +z)
Zm=complex(0,p*c*Lp) #Determination of denominator
print 'Zm=',Zm
Dr=((Z+Z1)*(Z+Z2))-(Zm**2)
Dr=complex(791,80)
#Hence transfer impedance is given as
Zr=complex(43.8,2.25*10**3) #formula=(Z1*Z2*Zm)/Dr
print 'The transfer impedance is',Zr,'ohm'
import math
C1=70*10**-12
C2=150*10**-12
Rl=200.0
Q=150.0
f=27*10**6
r=40000.0
#Determination of common resonant freq
wo=2*3.14*f
wo=wo/(10**6)
print 'The value of common resonant freq is',wo,'Mrad/ sec'
#Determination of Gl
Gl=1/Rl
G1=Gl*(10**3)
print'The value of Gl is',G1,'mSec'
#Checking the approxiamtion in denominator
ap=((wo*(C1+C2))/(Gl))**2
alpha=(C1+C2)/C1
alpha=round(alpha,2)
print 'The value of alpha is',alpha
#Determination of effective load
Reff=((alpha)**2)*Rl
Reff=Reff/(10**3)
Reff=round(Reff,2)
print 'The value of effective load is',Reff,'kohm'
#If effective load is much less than internal resistance hence tuning capacitance then
Cs=C1*C2/(C1+C2)
Cs=Cs*(10**12)
Cs=round(Cs,2)
print 'The value of tuning capacitance is',Cs,'pF'
#Determination of Rd
Rd=Q/(wo*Cs)*(10**3)
Rd=round(Rd,3)
print 'The value of Rd is',Rd,'kohm'
#If Rd is much greater than Reff then −3dB bandwidth is given by
B=1/(2*3.14*C2*alpha*Rl)
B=B/(10**6)
B=round(B,2)
print 'The value of −3dB BW is',B,'MHz'