#Given P1=0.001 #power x=10**0 #calculation import math dB=10*math.log(0.001/0.001) y=x*P1*600 V=math.sqrt(y) #Result print"V2 =",round(V,3),"V" print"dBm(600)=20log(V2/0.775)" #Given P=0.001 #power R=75 #resistance of audio system R1=50 x=(8/20.0) #Calculation import math y=(10**x) V2=(y*0.775) V=math.sqrt(P*R) V1=math.sqrt(P*R1) dBm= 20*math.log(V2/0.775) #Result print"the dBm voltage reference for 50 ohm system is: ",round(V1,4),"V" print"dBm(50)= 20log(V/0.2236)" #Given x=(10/10.0) #laser diode output #Calculation import math y=(10**x) P2=(y*0.001) a=(math.log10(0.01/1.0)) z=(10*a) #result print"(a) P2 = ",P2,"W" #convert +10dB to Watts print"(b) dBW =",z,"dBW" #Given kT=(1.6*10**-20) f=(1*10**6) #bandwidt, Hz R=(1*10**6) #resistance, ohm #calculation import math x=math.sqrt(kT*f*R) #4kT at room temperature (17 degree C) is 1.6*10**-20 Joules #Result print"en = ",round(x,6),"Vrms" #Given k=(1.38*10**-23) T=(27+273) #temperature f=(4*10**6) #bandwidth,Hz R=100 #source resistance, ohm #calculation import math x=math.sqrt(4*k*T*f*R) # to convert degres to kelvin, add 273 in it #result print"en= ",round(x,8),"Vrms" #Given x=10 #input S/N power y=5.0 #utput S/N power z=(x/y) #Calculation import math a=(10*math.log10(z)) b=(10*math.log10(x)) c=(10*math.log10(y)) d=(b-c) #Result print"(a)NR = ",z print"(b)NF = ",round(a,1),"dB" print"(c) 10log(Si/Ni) =",b,"dB" print" 10log(So/No) = ",round(c,0),"dB" print"their difference = ",round(d,0),"dB" #Given BW=200*10**3 #bandwidth k=(1.38*10**-23) T=(273+22) #converting degrees C into kelvin R=(10*10**3) R1=300 NF1=3 NF2=8 NR1=2 NR2=6.31 #calculation import math df=((math.pi/2.0)*BW) Pn=(k*T*df) en=math.sqrt(4*Pn*R) x=(14+20+20) #sum of the power gain of the three stages y=(x/10.0) Pg=(10**y) Po=(Pn*Pg) eno=math.sqrt(Po*R1) pg1=(10**(1.4)) pg2=(10**(20)) NR=(NR1+((NR2-1)/pg1)+((NR2-1)/(pg1*pg2))) NF=10*math.log10(NR) No=(NR*Pn*Pg) a=math.sqrt(No*R1) #Result print"(a) en(out)= ",round(eno,5),"V" print"(b) NF = ",round(NF,2),"dB" print"(c) No = ",round(a,6),"V" #outputnoise voltage #Given k=1.38*10**-23 T=(35+40+52) #total temperature df=(1*10**6) Teq=52 To=290.0 #calculation import math Pn=(k*T*df) x=(Teq/To) NR=(x+1) NF=(10*math.log10(NR)) #Result print"NR = ",round(NR,2) #noise ratio print"NF =",round(NF,3),"dB" #noise figure #Given x=7*10**-3 # o/p power measured 400-Hz audio signal modulates a carrier y=0.18*10**-3 # o/p power measured when a filter cancels 400-Hz portion of the o/p #Calculation import math z=10*math.log10(x/y) #Result print"SINAD = ",round(z,2),"dB" #Given i= 14*10**-3 #dc current R=50 #resistance, ohm #Calculation import math x=(20*i*R) y=10*math.log10(x) #Result print"NF=",round(y,2),"dB" #noise figure #Given f=(12*10**3) L=3*10**-3 C=(0.1*10**-6) R=30 #resistance,ohm #Calculation import math x=L*C y=math.sqrt(x) z=(2*math.pi*y) a=(1/z) Xl=(2*math.pi*f*L) Xc=(1/(2*math.pi*f*C)) b=(Xl-Xc)**2 c=R**2 d=math.sqrt(c+b) #Result print"fr = ",round(a,2),"Hz" #at 12kHz print"Z = ",round(d,2),"ohm" #Given R1=20 #resistance, ohm R2=1 L=1*10**-3 #inductor C=0.4*10**-6 #capacitor ein=50*10**-3 f=12*10**3 #frequency #Calculation import math x=math.sqrt(L*C) y=(1/(2*math.pi*x)) eo= ein*(R2/(R2+R1)) XL=(2*math.pi*f*L) XC=(1/(2*math.pi*f*C)) a=(R1+R2)**2 b=(XL-XC)**2 z=math.sqrt(a+b) zo=math.sqrt((R2**2)+b) m=(ein*(zo/z)) #Result print"resonant frequency is",round(y,2),"Hz" print"o/p voltage at 12kHz =",round(m,3),"V" #Given a=460*10**3 b=450*10**3 fr=455*10**3 #frequency #Calculation import math BW=a-b Q=(fr/BW) C=0.001*10**-6 x=(fr*2*math.pi) y=(1/x)**2 z=y/C R=(2*math.pi*z*BW) #Result print"(a)Bandwidth = ",BW,"Hz" #filter's peak o/p occurs at 455kHz print"(b)Quality factor = ",Q,"KHz" print"(c)inductance =",round(z,5),"H" print"(d)total circuit resistance= ",round(R,2),"ohm" #Given R=2 #resistance,ohm L=3*10**-3 #inductance C=0.47*10**-6 #capacitance #Calculation import math x=(2*math.pi*math.sqrt(L*C)) y=1/x XL=(2*math.pi*y*L) Q=(XL/R) Z=((Q**2)*R) BW=(R/(2*math.pi*L)) #Result print"(a) Resonant frequency= ",round(y,2),"Hz" print"(b)Quality factor = ",round(Q,2) print"(c)Maximam impedence= ",round(Z,1),"Ohm" print"(d)Bandwidth = ",round(BW,1),"Hz"