diff options
Diffstat (limited to 'backup/Electronic_Communication_by_D._Roddy_version_backup/Chapter4.ipynb')
-rwxr-xr-x | backup/Electronic_Communication_by_D._Roddy_version_backup/Chapter4.ipynb | 549 |
1 files changed, 549 insertions, 0 deletions
diff --git a/backup/Electronic_Communication_by_D._Roddy_version_backup/Chapter4.ipynb b/backup/Electronic_Communication_by_D._Roddy_version_backup/Chapter4.ipynb new file mode 100755 index 00000000..748bcbf7 --- /dev/null +++ b/backup/Electronic_Communication_by_D._Roddy_version_backup/Chapter4.ipynb @@ -0,0 +1,549 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 4 Noise" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.2.1,Pg.no 120" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The value of thermal noise power is 4.002e-15 W\n", + "The value of RMS noise voltage is 0.89 uV\n" + ] + } + ], + "source": [ + "from math import sqrt\n", + "T=290.0\n", + "BW=1*10**6 #Noise bandwidth in hertz\n", + "k=1.38*10**-23 #Boltzman constant in J/K\n", + "R=50.0 #Determination of thermal noise power Pn\n", + "Pn=k*T*BW\n", + "#Pn=round(Pn,1)\n", + "print 'The value of thermal noise power is',Pn,'W'\n", + "#Determination of RMS noise voltage\n", + "En=sqrt(4*R*k*T*BW)\n", + "En=En*(10**6)\n", + "En=round(En,2)\n", + "print 'The value of RMS noise voltage is',En,'uV'" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.2.2,Pg.no.122" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "a) i )The value of RMS noise voltage is 5.66 uV\n", + " ii)The value of RMS noise voltage is 8949245.77828 uV\n", + "b)The value of RMS noise voltage is 10588890.4 uV\n", + "c)The value of RMS noise voltage is 4783573.08 uV\n" + ] + } + ], + "source": [ + "from math import sqrt\n", + "R1=20000.0\n", + "R2=50000.0\n", + "k=1.38*10**-23 #Boltzman constant in J/K\n", + "T=290.0\n", + "BW=100*10**3 #Determination of thermal noise voltage for 20Kohm resistor\n", + "En1=sqrt(4*R1*k*T*BW)\n", + "En1=En1*(10**6)\n", + "En1=round(En1,2)\n", + "print 'a) i )The value of RMS noise voltage is',En1,'uV'\n", + "#Determination of thermal noise voltage for 50 kohm resistor\n", + "En2=En1*sqrt(R2/R1)\n", + "En2=En2*10**6\n", + "print ' ii)The value of RMS noise voltage is',En2,'uV'\n", + "#Determination of thermal noise voltage for 20K & 50k resistor in series\n", + "Rser=R1+R2 #Series combination of R1 & R2\n", + "En3=En1*sqrt(Rser/R1)\n", + "En3=En3*10**6\n", + "En3=round(En3,2)\n", + "print 'b)The value of RMS noise voltage is',En3,'uV'\n", + "#Determination of thermal noise voltage for 20K & 50k resistor in parellel\n", + "Rpar=(R1*R2)/(R1+R2) #parallel combination of R1 & R2\n", + "En4=En1*sqrt(Rpar/R1)\n", + "En4=En4*10**6\n", + "En4=round(En4,2)\n", + "print 'c)The value of RMS noise voltage is',En4,'uV'" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.2.3,Pg.no.128" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The value of Rd is 1.59 kohm\n", + "The value of effective noise voltage is 0.02 uV\n" + ] + } + ], + "source": [ + "from math import sqrt,pi\n", + "f=120*10**6\n", + "c=25*10**-12 #capacitance of 12 pF\n", + "Q=30.0 #Q−factor of the ckt is 30\n", + "BW=10*10**3 #channel BW of the receiver is 10 KHz\n", + "k=1.38*10**-23 #Boltzman constant in J/K\n", + "T=290.0 #Room temp\n", + "#Determination of effective noise voltage Rd appearing at i /p at room temp\n", + "Rd=Q/(2*pi*f*c)\n", + "Rd=Rd/1000\n", + "Rd=round(Rd,2)\n", + "print 'The value of Rd is',Rd,'kohm'\n", + "Vn=sqrt(4*Rd*k*T*BW)\n", + "Vn=Vn*10**6\n", + "Vn=round(Vn,2)\n", + "print 'The value of effective noise voltage is',Vn,'uV'" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.3.1,Pg.no.131" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The value of noise current In is 17.89 nA\n" + ] + } + ], + "source": [ + "from math import sqrt\n", + "Idc=10**-3\n", + "Bn=10**6 #Effective noise BW=1 MHz\n", + "q=1.6*10**-19 #Charge on electron in coulombs\n", + "#Determination of noise component current In in DC current of Idc=1 mA\n", + "In=sqrt(2*Idc*q*Bn)\n", + "In=In*10**9\n", + "In=round(In,2)\n", + "print 'The value of noise current In is',In,'nA'" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.11.1,Pg.no.135" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The value of shot noise current Ina is 4.0 nA\n", + "The value of noise voltage across Rs is 600000000.0 uV\n", + "The value of noise voltage across Rn is 6.93 uV\n", + "The value of thermal noise voltage at Rs is 4.9 uV\n", + "The value of total noise voltage Vn is 1000000.0 uV\n", + "The value of signal to noise ratio is -220.0 dB\n" + ] + } + ], + "source": [ + "import math\n", + "from math import pi,sqrt\n", + "#An amplifier is given\n", + "Rn=300.0 #Equivalent noise resistance\n", + "Ieq=5*10**-6 #Equivalent noise current is 5 uA\n", + "Rs=150.0 #Amplifier fed from 150 ohm,10 uV rms sinusoidal source\n", + "Vs=10*10**-6\n", + "Bn=10*10**6 #Noise BW is 10 MHz\n", + "#Assume the following\n", + "kT=4*10**-21 #k is Boltzman constant in J/K & T is room temp\n", + "q=1.6*10**-19 #Charge on electron in coloumbs\n", + "#Determination of shot noise current\n", + "Ina=sqrt(2*q*Ieq*Bn)\n", + "Ina=Ina*(10**9)\n", + "print 'The value of shot noise current Ina is',Ina,'nA'\n", + "#Noise voltage developed by this across source resistance is\n", + "V=Ina*Rs\n", + "V=V*(10**6)\n", + "V=round(V,2)\n", + "print 'The value of noise voltage across Rs is',V,'uV'\n", + "#Noise voltage developed across Rn resistance is\n", + "Vna=sqrt(4*Rn*kT*Bn)*10**6\n", + "Vna=round(Vna,2)\n", + "print 'The value of noise voltage across Rn is',Vna,'uV'\n", + "#Determination of thermal noise voltage from source\n", + "Vns=sqrt(4*Rs*kT*Bn)*10**6\n", + "Vns=round(Vns,2)\n", + "print 'The value of thermal noise voltage at Rs is',Vns,'uV'\n", + "#Determination of total noise voltage at input\n", + "Vn=(((V)**2)+((Vna)**2)+((Vns)**2))**(1/2)\n", + "Vn=Vn*(10**6)\n", + "print 'The value of total noise voltage Vn is',Vn,'uV'\n", + "#Determination of signal to noise ratio in dB\n", + "SNR=20*(math.log10(Vs/Vn))\n", + "print 'The value of signal to noise ratio is',SNR,'dB'" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.12.1,Pg.no.136" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The value of output signal to noise ratio is 55.23 dB\n" + ] + } + ], + "source": [ + "import math\n", + "SNR1=60.0\n", + "l=3.0 #Determination of output signal to noise ratio\n", + "SNR=(SNR1) -10*math.log10(l)\n", + "SNR=round(SNR,2)\n", + "print 'The value of output signal to noise ratio is',SNR,'dB'" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.12.2,Pg.no.137" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The value of output signal to noise ratio is 40.0 dB\n" + ] + } + ], + "source": [ + "import math\n", + "SNRdB1=60.0 #SNR is 60 dB for Ist link\n", + "SNRdB2=60.0 #SNR is 60 dB for IInd link\n", + "SNRdB3=40.0 #SNR is 40 dB for IIIrd link\n", + "#Determination of power in watt\n", + "snr1=10**(-SNRdB1/10)\n", + "snr2=10**(-SNRdB2/10)\n", + "snr3=10**(-SNRdB3/10)\n", + "#Determination of overall SNR\n", + "SNR=snr3\n", + "#Determination of total SNR in dB\n", + "SNRdB=10*(-math.log10(SNR))\n", + "print 'The value of output signal to noise ratio is',SNRdB,'dB'" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.13.1,Pg.no.139" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The value of output signal to noise ratio is 28.0 dB\n" + ] + } + ], + "source": [ + "import math\n", + "SNRin=35.0 #SNR at i /p of amplifier\n", + "F=7.0 #Noise figure of an amplifier\n", + "#Determination of output SNR\n", + "SNRout=SNRin-F\n", + "print 'The value of output signal to noise ratio is',SNRout,'dB'" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.14.1,Pg.no.140" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The value of input noise is 0.08 pW\n" + ] + } + ], + "source": [ + "import math\n", + "f=13.0 #Noise figure of an amplifier\n", + "Bn=1*10**6\n", + "kT=4*10**-21 #k is Boltzman constant in J/K & T is room temp\n", + "F=10**(f/10)\n", + "#Determination of equivalent amplifier input noise\n", + "Pna=(F-1)*kT*Bn*10**12\n", + "Pna=round(Pna,2)\n", + "print 'The value of input noise is',Pna,'pW'" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.15.1,Pg.no.141" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The overall noise fig is 10.44 dB\n" + ] + } + ], + "source": [ + "import math\n", + "f1=9.0 #Noise fig for amplifier\n", + "f2=20.0 #Noise fig for mixer\n", + "g=15.0 #power gain\n", + "#Converting dB in power ratio\n", + "F1=10**(f1/10)\n", + "F2=10**(f2/10)\n", + "G=10**(g/10)\n", + "#Determination of overall noise fig . reffered at i / p\n", + "F=F1+(F2-1)/G #converting in dB\n", + "FdB=10*math.log10(F)\n", + "FdB=round(FdB,2)\n", + "print 'The overall noise fig is',FdB,'dB'" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.17.1,Pg.no.143" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The value of noise factor is 1\n" + ] + } + ], + "source": [ + "import math\n", + "F=6.0 #Noise fig .=6 dB\n", + "#Determination of noise factor\n", + "Fn=10**(6/10)\n", + "print 'The value of noise factor is',Fn" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.18.1,Pg.no.144" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The value of equivalent noise at room temp is 4306.19 k\n", + "The value of equivalent noise at noise temp=90 is 90.04 K\n" + ] + } + ], + "source": [ + "import math\n", + "f=12.0 \n", + "Tm=290.0 #Room temp value\n", + "T=90.0\n", + "g=50.0 #calculating power ratio\n", + "F=10**(f/10)\n", + "G=10**(g/10)\n", + "#Determination of equivalent noise at room temp\n", + "Tem=(F-1)*Tm\n", + "Tem=round(Tem,2)\n", + "print 'The value of equivalent noise at room temp is',Tem,'k'\n", + "#Determination of equivalent noise at 90 k temp\n", + "Te=T+(Tem/G)\n", + "Te=round(Te,2)\n", + "print 'The value of equivalent noise at noise temp=90 is',Te,'K'" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.19.1,Pg.no.146" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The value of hot temp Th is 7574.47 k\n", + "The value of equivalent noise temp Te is 759.14 K\n" + ] + } + ], + "source": [ + "import math\n", + "enr=14.0\n", + "To=290.0 #Room temp in K\n", + "y=9.0 #Y−factor is 9 dB\n", + "#converting dB in power ratio\n", + "ENR=10**(enr/10)\n", + "Y=10**(y/10) #From def of ENR the hot temp is\n", + "Th=To*(ENR+1)\n", + "Th=round(Th,2)\n", + "print 'The value of hot temp Th is',Th,'k'\n", + "#Determination of equivalent noise temp\n", + "Te=(Th-(Y*To))/(Y-1)\n", + "Te=round(Te,2)\n", + "print 'The value of equivalent noise temp Te is',Te,'K'" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.10" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} |