{ "metadata": { "name": "", "signature": "sha256:d92601af9cb4594bb8f9c7cef4f510ff99b742d5192caa5a322094967f2cb623" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "heading", "level": 1, "metadata": {}, "source": [ "CHAPTER08:NOISE" ] }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example E01 : Pg 8.6" ] }, { "cell_type": "code", "collapsed": false, "input": [ "# Page Number: 8.6\n", "# Example 8.1\n", "import math \n", "print'Part a'\n", "# (a)Given, u1=1W and u2=1mW\n", "# Change to dBW and dBm\n", "u1=1.*10.**3.;\n", "u2=1.;\n", "# (i)470mW\n", "a=470.*10.**3.;\n", "y1=(10.*math.log(a/u1))/math.log(10);\n", "print'dBm',y1\n", "\n", "y2=(10*math.log(a/u2))/math.log(10);\n", "print'dBW',y2\n", "\n", "# (ii)1W\n", "b=1.;\n", "z1=(10.*math.log(b/u1))/math.log(10);\n", "print'dBm',z1\n", "\n", "z2=(10.*math.log(b/u2))/math.log(10);\n", "print'dBW',z2\n", "\n", "# (iii)100nW\n", "c=100.*10.**9;\n", "x1=(10*math.log(c/u1))/math.log(10);\n", "print'dBm',x1\n", "\n", "x2=(10.*math.log(c/u2))/math.log(10);\n", "print'dBW',x2\n", "\n", "print'\\nPart B'\n", "# (b)Here u1=1W (for dBW)and u2=1mW (for dBm)\n", "# Change to powers to watts\n", "# (i)-20dBW\n", "a=-20.;\n", "k1=u2*(10.**(a/10.));\n", "print'W',k1\n", "\n", "\n", "# (ii)47dBm\n", "b=47.;\n", "k2=u1*(10.**(b/10.));\n", "print'W',k2\n", "\n", "\n", "# (ii)0dBm\n", "c=0;\n", "k3=u1*(10.**(c/10.));\n", "print'W',k3\n", "\n", "\n", "print'\\nPart C'\n", "# (c)Given, channel loss=20dB and Pt=1W\n", "l=-20.;\n", "PT=1.;\n", "PR=10.**(l/10.);\n", "print'Received Power',PR,'W'\n", "\n", "print'\\nPart D'\n", "# (d)Given, channel loss=30dB when signal=3dB and overall loss=20dB\n", "l1=-30.;\n", "s=-3.;\n", "l2=-20.;\n", "q=-l1-s-s+l2;\n", "d1=10.**(q/10.);\n", "print'=',q,'dB'\n", "print d1\n", "\n", "print'\\nPart E'\n", "# (e)Given,\n", "Si=0; # dBm\n", "S1=1.*10.**3.*(10.**(Si/10.));\n", "Ni=1.*10.**7.; # W\n", "\n", "Osnr=S1/Ni;\n", "Odb=(10.*(math.log(Osnr)))/math.log(10)\n", "print Odb,'dB'" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Part a\n", "dBm 26.7209785794\n", "dBW 56.7209785794\n", "dBm -30.0\n", "dBW 0.0\n", "dBm 80.0\n", "dBW 110.0\n", "\n", "Part B\n", "W 0.01\n", "W 50118723.3627\n", "W 1000.0\n", "\n", "Part C\n", "Received Power 0.01 W\n", "\n", "Part D\n", "= 16.0 dB\n", "39.8107170553\n", "\n", "Part E\n", "-40.0 dB\n" ] } ], "prompt_number": 1 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example E02 : Pg 8.7" ] }, { "cell_type": "code", "collapsed": false, "input": [ "# Page Number: 8.7\n", "# Example 8.2\n", "# Given,\n", "import math \n", "R=1000.;\n", "T=27.; # degree celsius\n", "TK=T+273.; # kelvin\n", "# We know, rms noise voltage is 4RKTB\n", "K=1.38*10.**28.;\n", "B=10.;\n", "V=math.sqrt(4.*R*K*TK*B);\n", "print'Rms noise voltage:',V,'V'" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Rms noise voltage: 4.06939798988e+17 V\n" ] } ], "prompt_number": 2 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example E03 : Pg 8.8" ] }, { "cell_type": "code", "collapsed": false, "input": [ "# Page Number: 8.8\n", "# Example 8.3\n", "# Given,\n", "G=100.;\n", "G1=(10.**(G/10.));\n", "\n", "T=30.;\n", "Te=270.;\n", "\n", "# We know,output noise power=GKB(T+Te)\n", "K=1.38*10.**23.;\n", "B=1.5*10.**6.;\n", "\n", "No=G1*1.38*10.**23.*1.5*10.**6.*(T+Te);\n", "print'Output Noise Power',No,'W'" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Output Noise Power 6.21e+41 W\n" ] } ], "prompt_number": 3 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example E04 : Pg 8.8" ] }, { "cell_type": "code", "collapsed": false, "input": [ "# Page Number: 8.8\n", "# Example 8.4\n", "# Given,\n", "import math \n", "R=50.;\n", "osnr=0;\n", "SNRo=(10.**(osnr/10.));\n", "print'Output SNR',SNRo\n", "# As Pni=KTB\n", "K=1.38*10.**23.;\n", "T=290.;\n", "B=5.*10.**5.;\n", "Pni=K*T*B;\n", "print'Input noise power',Pni,'W'\n", "# Psi=V**2/R\n", "# Given V=5*10**-6V\n", "V=0.5*10.**6.;\n", "Psi=(V**2.)/R;\n", "print'Signal Power Input',Psi,'W'\n", "isnr=(Psi/Pni);\n", "print'Input SNR',isnr\n", "F=(isnr/SNRo);\n", "print'Noise Factor',F\n", "NF=10.*math.log(F)/math.log(10);\n", "print'Noise figure',NF,'dB'" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Output SNR 1.0\n", "Input noise power 2.001e+31 W\n", "Signal Power Input 5000000000.0 W\n", "Input SNR 2.49875062469e-22\n", "Noise Factor 2.49875062469e-22\n", "Noise figure -216.022770843 dB\n" ] } ], "prompt_number": 4 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example E06 : Pg 8.9" ] }, { "cell_type": "code", "collapsed": false, "input": [ "# Page Number: 8.9\n", "# Example 8.6\n", "# Given,Stage 1\n", "import math \n", "SNRo=120.;\n", "Pni=0.01*10.**6.; # W\n", "G1=20.;\n", "\n", "# Stage 2\n", "F2=12.; # dB\n", "FF2=(10.**(F2/10.));\n", "G2=30.;\n", "\n", "# Stage 3\n", "F3=9.3; # dB\n", "FF3=(10.**(F3/10.));\n", "G3=35.;\n", "\n", "# (a)Nosie factor and noise figure of Stage 1\n", "F=5.6; # dB\n", "FF=(10.**(F/10.));\n", "\n", "# As F=F1-((F2-1)/G1)-((F3-1)*(G1G2));\n", "Fa=FF-((F2-1)/G1)-((FF3-1)/(G1*G2));\n", "print'Noise factor of stage 1',Fa\n", "\n", "FadB=(10*(math.log(Fa)))/math.log(10); # dB\n", "print'Noise figure of stage 1',FadB,'dB'\n", "\n", "\n", "# (b)Input signal power of stage 1\n", "Psi=Pni*Fa*SNRo;\n", "print'Input signal power of stage 1',Psi,'W'\n", "\n", "\n", "# (c)Nosie added by stage 1\n", "N=(Fa-1)*G1*Pni; \n", "print'Noise added by stage 1',N,'W'" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Noise factor of stage 1 3.0682615804\n", "Noise figure of stage 1 4.86892382031 dB\n", "Input signal power of stage 1 3681913.89648 W\n", "Noise added by stage 1 413652.31608 W\n" ] } ], "prompt_number": 5 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example E07 : Pg 8.10" ] }, { "cell_type": "code", "collapsed": false, "input": [ "# Page Number: 8.10\n", "# Example 8.7\n", "# Given\n", "import math \n", "Te=127.;# Kelvin\n", "T=290.;# Kelvin\n", "\n", "G1=100.;\n", "\n", "F2dB=12.;# db\n", "F2=(10.**(F2dB/10.));\n", "\n", "F1=1.+(Te/T);\n", "\n", "F=F1+((F2-1.)/G1);\n", "FF=(10.*math.log(F))/math.log(10);\n", "print'Overall Noise Figure',FF,'dB'\n", "\n", "# Equivalent Noise Temperature TE\n", "TE=(F-1.)*T;\n", "print'Equivalent Noise Temperature',TE,'K'" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Overall Noise Figure 2.00418273219 dB\n", "Equivalent Noise Temperature 170.061902581 K\n" ] } ], "prompt_number": 6 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example E09 : Pg 8.11" ] }, { "cell_type": "code", "collapsed": false, "input": [ "# Page Number: 8.11;\n", "# Example 8.9\n", "# (a)Noise Figure\n", "# Given\n", "# Loss Fcator\n", "import math \n", "IL=1.5; # dB\n", "IL1=(10.**(IL/10.));\n", "\n", "# Noise figure\n", "F1=1.41;\n", "G1=1./F1;\n", "\n", "G2=10.; \n", "GG2=(10.*math.log(G2))/math.log(10); # dB\n", "\n", "G3=100.;\n", "GG3=(10.*math.log(G3))/math.log(10); # dB\n", "\n", "F2=2.; # dB\n", "F3=2.; # dB\n", "\n", "FF2=(10.**(F2/10.));\n", "FF3=(10.**(F3/10.));\n", "\n", "F=(F1+((FF2-1.)/G1)+((FF3-1.)/(G1*GG2)));\n", "FF=(10.*math.log(F))/math.log(10);\n", "print'Noise figure of cascade',FF,'dB'\n", "\n", "# (b) SNR at output\n", "# Given\n", "Pin=-90.; # dBm\n", "Pout=Pin-IL+GG2+GG3; # dBm\n", "\n", "# Pn=Gcas*K*Te*B (cascade)\n", "K=1.38*10.**23.;\n", "To=290.; # Kelvin\n", "B=1.*10.**8.;\n", "Gcas=GG2+GG3-IL;\n", "Gcas1=(10.**(Gcas/10.));\n", "Pn=K*To*(F-1.)*B*Gcas1; # W\n", "\n", "Pn1=(10.*(math.log(Pn/1.*10.**3.)))/math.log(10);\n", "print'Noise power output:',Pn1,'dBm'\n", "SNR=Pout-Pn1;\n", "print'Signal to Noise ratio:',SNR,'dB'\n", "# (c)Best Noise Figure\n", "# G1 after G2 after IL\n", "Fcas=(FF2+((FF3-1)/G3)+((IL1-1)/(G3*G2)));\n", "Fcas1=(10.*(math.log(Fcas)))/math.log(10);\n", "print'Noise figure will be:',Fcas1,'dB'" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Noise figure of cascade 3.6495777371 dB\n", "Noise power output: 395.719186978 dBm\n", "Signal to Noise ratio: -457.219186978 dB\n", "Noise figure will be: 2.01712395585 dB\n" ] } ], "prompt_number": 7 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example E10 : Pg 8.12" ] }, { "cell_type": "code", "collapsed": false, "input": [ "# Page Number: 8.12\n", "# Example 8.10\n", "import math \n", "# Given\n", "K=1.38*10.**23;\n", "B=40.*10.**6.;\n", "\n", "Tant=600.; # Kelvin\n", "Trec=3000.; # Kelvin\n", "\n", "G=80.; # dB\n", "GG=(10.**(G/10.));\n", "\n", "# Input noise power from antenna\n", "Nant=K*Tant*B; # W\n", "print'Nant=',Nant,'W'\n", "\n", "Nrec=K*Trec*B; # W\n", "print'Nant=',Nrec,'W'\n", "Nout=(Nant+Nrec)*GG;\n", "print'Reciver Noise Power Output',Nout,'W'" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Nant= 3.312e+33 W\n", "Nant= 1.656e+34 W\n", "Reciver Noise Power Output 1.9872e+42 W\n" ] } ], "prompt_number": 8 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example E11 : Pg 8.12" ] }, { "cell_type": "code", "collapsed": false, "input": [ "# Page Number: 8.12\n", "# Example 8.11\n", "import math \n", "# We use, F=(F1+(F2-1)/G1)\n", "# Given\n", "FA=1.5; \n", "\n", "GA=10.; # dB\n", "GAA=(10.**(GA/10.));\n", "\n", "FB=3.; # dB\n", "FBB=(10.**(FB/10.));\n", "\n", "GB=15.; # dB\n", "GBB=(10.**(GB/10.));\n", "\n", "# Case 1: Amp A followed by Amp B\n", "F11=FA;\n", "F12=FBB;\n", "G11=GAA;\n", "\n", "F1=(F11+(F12-1.)/G11);\n", "print'Gain when Amp A followed by Amp B',F1\n", "\n", "# Case 2: Amp B followed by Amp A\n", "F21=FBB;\n", "F22=FA;\n", "G21=GBB;\n", "\n", "F2=(F21+(F22-1)/G21);\n", "print'Gain when Amp B followed by Amp A',F2\n", "\n", "# As F1