from math import sqrt
T=290.0
BW=1*10**6 #Noise bandwidth in hertz
k=1.38*10**-23 #Boltzman constant in J/K
R=50.0 #Determination of thermal noise power Pn
Pn=k*T*BW
#Pn=round(Pn,1)
print 'The value of thermal noise power is',Pn,'W'
#Determination of RMS noise voltage
En=sqrt(4*R*k*T*BW)
En=En*(10**6)
En=round(En,2)
print 'The value of RMS noise voltage is',En,'uV'
from math import sqrt
R1=20000.0
R2=50000.0
k=1.38*10**-23 #Boltzman constant in J/K
T=290.0
BW=100*10**3 #Determination of thermal noise voltage for 20Kohm resistor
En1=sqrt(4*R1*k*T*BW)
En1=En1*(10**6)
En1=round(En1,2)
print 'a) i )The value of RMS noise voltage is',En1,'uV'
#Determination of thermal noise voltage for 50 kohm resistor
En2=En1*sqrt(R2/R1)
En2=En2*10**6
print ' ii)The value of RMS noise voltage is',En2,'uV'
#Determination of thermal noise voltage for 20K & 50k resistor in series
Rser=R1+R2 #Series combination of R1 & R2
En3=En1*sqrt(Rser/R1)
En3=En3*10**6
En3=round(En3,2)
print 'b)The value of RMS noise voltage is',En3,'uV'
#Determination of thermal noise voltage for 20K & 50k resistor in parellel
Rpar=(R1*R2)/(R1+R2) #parallel combination of R1 & R2
En4=En1*sqrt(Rpar/R1)
En4=En4*10**6
En4=round(En4,2)
print 'c)The value of RMS noise voltage is',En4,'uV'
from math import sqrt,pi
f=120*10**6
c=25*10**-12 #capacitance of 12 pF
Q=30.0 #Q−factor of the ckt is 30
BW=10*10**3 #channel BW of the receiver is 10 KHz
k=1.38*10**-23 #Boltzman constant in J/K
T=290.0 #Room temp
#Determination of effective noise voltage Rd appearing at i /p at room temp
Rd=Q/(2*pi*f*c)
Rd=Rd/1000
Rd=round(Rd,2)
print 'The value of Rd is',Rd,'kohm'
Vn=sqrt(4*Rd*k*T*BW)
Vn=Vn*10**6
Vn=round(Vn,2)
print 'The value of effective noise voltage is',Vn,'uV'
from math import sqrt
Idc=10**-3
Bn=10**6 #Effective noise BW=1 MHz
q=1.6*10**-19 #Charge on electron in coulombs
#Determination of noise component current In in DC current of Idc=1 mA
In=sqrt(2*Idc*q*Bn)
In=In*10**9
In=round(In,2)
print 'The value of noise current In is',In,'nA'
import math
from math import pi,sqrt
#An amplifier is given
Rn=300.0 #Equivalent noise resistance
Ieq=5*10**-6 #Equivalent noise current is 5 uA
Rs=150.0 #Amplifier fed from 150 ohm,10 uV rms sinusoidal source
Vs=10*10**-6
Bn=10*10**6 #Noise BW is 10 MHz
#Assume the following
kT=4*10**-21 #k is Boltzman constant in J/K & T is room temp
q=1.6*10**-19 #Charge on electron in coloumbs
#Determination of shot noise current
Ina=sqrt(2*q*Ieq*Bn)
Ina=Ina*(10**9)
print 'The value of shot noise current Ina is',Ina,'nA'
#Noise voltage developed by this across source resistance is
V=Ina*Rs
V=V*(10**6)
V=round(V,2)
print 'The value of noise voltage across Rs is',V,'uV'
#Noise voltage developed across Rn resistance is
Vna=sqrt(4*Rn*kT*Bn)*10**6
Vna=round(Vna,2)
print 'The value of noise voltage across Rn is',Vna,'uV'
#Determination of thermal noise voltage from source
Vns=sqrt(4*Rs*kT*Bn)*10**6
Vns=round(Vns,2)
print 'The value of thermal noise voltage at Rs is',Vns,'uV'
#Determination of total noise voltage at input
Vn=(((V)**2)+((Vna)**2)+((Vns)**2))**(1/2)
Vn=Vn*(10**6)
print 'The value of total noise voltage Vn is',Vn,'uV'
#Determination of signal to noise ratio in dB
SNR=20*(math.log10(Vs/Vn))
print 'The value of signal to noise ratio is',SNR,'dB'
import math
SNR1=60.0
l=3.0 #Determination of output signal to noise ratio
SNR=(SNR1) -10*math.log10(l)
SNR=round(SNR,2)
print 'The value of output signal to noise ratio is',SNR,'dB'
import math
SNRdB1=60.0 #SNR is 60 dB for Ist link
SNRdB2=60.0 #SNR is 60 dB for IInd link
SNRdB3=40.0 #SNR is 40 dB for IIIrd link
#Determination of power in watt
snr1=10**(-SNRdB1/10)
snr2=10**(-SNRdB2/10)
snr3=10**(-SNRdB3/10)
#Determination of overall SNR
SNR=snr3
#Determination of total SNR in dB
SNRdB=10*(-math.log10(SNR))
print 'The value of output signal to noise ratio is',SNRdB,'dB'
import math
SNRin=35.0 #SNR at i /p of amplifier
F=7.0 #Noise figure of an amplifier
#Determination of output SNR
SNRout=SNRin-F
print 'The value of output signal to noise ratio is',SNRout,'dB'
import math
f=13.0 #Noise figure of an amplifier
Bn=1*10**6
kT=4*10**-21 #k is Boltzman constant in J/K & T is room temp
F=10**(f/10)
#Determination of equivalent amplifier input noise
Pna=(F-1)*kT*Bn*10**12
Pna=round(Pna,2)
print 'The value of input noise is',Pna,'pW'
import math
f1=9.0 #Noise fig for amplifier
f2=20.0 #Noise fig for mixer
g=15.0 #power gain
#Converting dB in power ratio
F1=10**(f1/10)
F2=10**(f2/10)
G=10**(g/10)
#Determination of overall noise fig . reffered at i / p
F=F1+(F2-1)/G #converting in dB
FdB=10*math.log10(F)
FdB=round(FdB,2)
print 'The overall noise fig is',FdB,'dB'
import math
F=6.0 #Noise fig .=6 dB
#Determination of noise factor
Fn=10**(6/10)
print 'The value of noise factor is',Fn
import math
f=12.0
Tm=290.0 #Room temp value
T=90.0
g=50.0 #calculating power ratio
F=10**(f/10)
G=10**(g/10)
#Determination of equivalent noise at room temp
Tem=(F-1)*Tm
Tem=round(Tem,2)
print 'The value of equivalent noise at room temp is',Tem,'k'
#Determination of equivalent noise at 90 k temp
Te=T+(Tem/G)
Te=round(Te,2)
print 'The value of equivalent noise at noise temp=90 is',Te,'K'
import math
enr=14.0
To=290.0 #Room temp in K
y=9.0 #Y−factor is 9 dB
#converting dB in power ratio
ENR=10**(enr/10)
Y=10**(y/10) #From def of ENR the hot temp is
Th=To*(ENR+1)
Th=round(Th,2)
print 'The value of hot temp Th is',Th,'k'
#Determination of equivalent noise temp
Te=(Th-(Y*To))/(Y-1)
Te=round(Te,2)
print 'The value of equivalent noise temp Te is',Te,'K'