diff options
Diffstat (limited to 'Analog_Communication_by_V_Chandrasekar/6-Noise.ipynb')
-rw-r--r-- | Analog_Communication_by_V_Chandrasekar/6-Noise.ipynb | 545 |
1 files changed, 545 insertions, 0 deletions
diff --git a/Analog_Communication_by_V_Chandrasekar/6-Noise.ipynb b/Analog_Communication_by_V_Chandrasekar/6-Noise.ipynb new file mode 100644 index 0000000..96ab766 --- /dev/null +++ b/Analog_Communication_by_V_Chandrasekar/6-Noise.ipynb @@ -0,0 +1,545 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 6: Noise" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.1: Thermal_Noise.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"T=290; // temperature in kelvin\n", +"k=1.38*10^(-23); // Boltzman constant\n", +"B=1;// bandwidth in MHz\n", +"\n", +"P=k*T*B*10^(6); // thermal noise power\n", +"disp('the thermal noise power (in watts) is ');\n", +"disp(P);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.2_A: SNR_and_Noise_Figure.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"clear;\n", +"\n", +"Inp_sig_pow=1.5*10^(-9); //Input Signal Power in Watts\n", +"Inp_noi_pow=1.5*10^(-18); //Input Noise Power in Watts\n", +"Pow_gain=10^(6);\n", +"int_noi=4*10^(-12); //internal noise in watts\n", +"\n", +"//a)\n", +"Inp_SNR=10*log10(Inp_sig_pow/Inp_noi_pow);// input SNR in dB\n", +"\n", +"//b)\n", +"Nout=Pow_gain*Inp_noi_pow+int_noi //output output noise power\n", +"\n", +"Pout=Pow_gain*Inp_sig_pow //output signal power\n", +"\n", +"SNR=Pout/Nout;// Signal to Noise ratio\n", +"SNRout=10*log10(SNR);// Output SNR in dB\n", +"\n", +"//c)\n", +"F=10^(9)/(273*10^(6)); //Noise factor\n", +"NF=10*log10(F);// Noise figure in dB\n", +"\n", +"disp('Input SNR (in dB) is');\n", +"disp(Inp_SNR);\n", +"disp('Output SNR ( in dB) is');\n", +"disp(SNRout);\n", +"disp('Noise factor');\n", +"disp(F);\n", +"disp('Noise Figure(in dB)');\n", +"disp(NF);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.2: Noise_voltage.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"clear;\n", +"T=290;// temperature in kelvin\n", +"R=60;//resistance in ohms\n", +"k=1.38*10^(-23);\n", +"\n", +"Esquare=4*R*T*k;\n", +"E=sqrt(Esquare); //noise voltage\n", +"\n", +"disp('the noise voltage( in volts) is')\n", +"disp(E);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.3_A: Noise_Voltage.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"clear;\n", +"q=1.6*10^(-19);// electron charge\n", +"Ieq=5;//equivalent shot noise current in uA\n", +"Bn=8;//bandwidth in MHz\n", +"Rn=200;\n", +"Rs=100;//resistance in ohms\n", +"k=1.38*10^(-23);// boltzman constant\n", +"T=290;//temperature in K\n", +"Vs=10// RMS signal source volatage in uV\n", +"\n", +"In=sqrt(2*Ieq*q*Bn);\n", +"\n", +"Vni=Rs*In;//shot noise voltage \n", +"\n", +"Vns=sqrt(4*Rs*k*T*Bn*10^(6));//thermal noise volatge from source\n", +"\n", +"//change in answer due to calculation error in book \n", +"Vne=sqrt(4*Rn*k*T*Bn*10^(6));//noise voltage by equivalent noise resistance\n", +"\n", +"Vn=sqrt(Vni^2+Vns^2+Vne^2);// total noise voltage\n", +"\n", +"SNR=20*log10(Vs*10^(-6)/Vn);\n", +"\n", +"disp('shot noise voltage(in V) is ');\n", +"disp(Vni);\n", +"disp('thermal noise voltage from source(in V) is');\n", +"disp(Vns);\n", +"disp('noise voltage by equivalent noise resistance(in V) is');\n", +"disp(Vne);\n", +"disp('total noise voltage at the input(in V) is');\n", +"disp(Vn);\n", +"disp('SNR (in dB) is');\n", +"disp(SNR);\n", +"\n", +"\n", +"\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.3: Thermal_Noise_Voltage.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"B=150;// bandwidth in KHz\n", +"R1=30;\n", +"R2=60;// both resistors R1 and R2 in K-ohms\n", +"k=1.38*10^(-23);// boltzman constant\n", +"T=290; //temperature in Kelvin\n", +"\n", +"Esquare=4*R1*10^(3)*k*B*10^(3)*T;\n", +"E=sqrt(Esquare);\n", +" \n", +"disp('series combination Rseries(in K-ohms)=');\n", +"disp(R1+R2);\n", +"Eseries=E*sqrt(3);\n", +"disp('the thermal noise voltage (in volts) is');\n", +"disp(Eseries);\n", +"\n", +"disp('series combination Rseries(in K-ohms)=');\n", +"disp(R1*R2/(R1+R2));\n", +"Eparallel=E*sqrt(2/3);\n", +"disp('the thermal noise voltage (in volts) is');\n", +"disp(Eparallel);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.4_A: Output_SNR.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"clear;\n", +"S=4;//number of stages\n", +"SNR_input=55;//input Signal to Noise ratio in dB\n", +"\n", +"SNR_output=SNR_input-10*log10(S);\n", +"\n", +"disp('Output SNR( in dB) is');\n", +"disp(SNR_output);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.4: Shot_Noise.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"clear;\n", +"\n", +"Idc=2; //direct current in mA \n", +"q=1.6*10^(-19); // electron charge\n", +"B=3; //bandwidth in MHz\n", +"\n", +"Isquare=2*Idc*10^(-3)*q*B*10^6;\n", +"I=sqrt(Isquare); //shot noise component\n", +"\n", +"disp('the shot noise component(in amperes) is');\n", +"disp(I);\n", +" " + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.5_A: Output_SNR.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"clear;\n", +"F=5; //noise figure in dB\n", +"SNR_input=55;//Input Signal to noise ratio in dB\n", +"SNR_output=SNR_input-F;\n", +"disp('Output SNR (in dB) is');\n", +"disp(SNR_output);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.5: Output_SNR.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"clear;\n", +"Np1=60; // Noise-Power ratio of first system in dB\n", +"Np2=40; // Noise-Power ratio of second system in dB\n", +"Np3=30; // Noise-Power ratio of third system in dB\n", +"Np4=50; // Noise-Power ratio of fourth system in dB\n", +" \n", +" P1=10^(-6); //power ratio of first system\n", +" P2=10^(-4); //power ratio of second system\n", +" P3=10^(-3); //power ratio of third system\n", +" P4=10^(-5);//power ratio of fourth system\n", +" \n", +" SNR=(P1+P2+P3+P4); // Overall Signal to Noise ratio\n", +" disp('SNR ratio is');\n", +" disp(SNR);\n", +" \n", +" N_final=30; //since SNR is 10^(-3)\n", +" \n", +" disp('overall SNR (in dB)is');\n", +" disp(N_final);\n", +" \n", +" disp('the overall SNR is equal to that of the worst system')\n", +" " + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.6_A: Noise_Figure.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"clear;\n", +"F=16;// Power ratio in dB\n", +"k=1.38*10^(-23) ;// boltzman constant\n", +"T=290; //temperature in K\n", +"B=5; //Bandwidth in MHz\n", +"\n", +"P=(F-1)*k*T*B*10^(6);\n", +"disp(' Amplifier Inout noise power (in watts) is');\n", +"disp(P);\n", +" " + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.6: Output_SNR.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"clear;\n", +"N_figure=8 ;//Noise figure in dB\n", +"SNR_in=45; //Signal to Noise ratio in dB\n", +"\n", +"SNR_out=SNR_in-N_figure //output Signal to Noise ratio\n", +"\n", +"disp('the Output SNR(in dB) is ');\n", +"disp(SNR_out);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.7_A: Overall_noise_figure.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"clear;\n", +"Nf1=7; //Noise figure of first stage in dB\n", +"F1=5.01; //first power ratio\n", +"Nf2=25; //Noise figure of second stage in dB\n", +"F2=316.22; //second power ratio\n", +"pG=15; //power gain in dB\n", +"G1=31.62; //power ratio\n", +"\n", +"F=F1+(F2-1)/G1;\n", +"\n", +"disp('overall noise factor');\n", +"disp(F);\n", +"disp('Overall noise factor in dB')\n", +"disp(10*log10(F)); " + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.8_A: Noise_Temperature.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"clear;\n", +"Nf=15; //noise figure in dB\n", +"F=31.62;//power ratio\n", +"T=290; //Temperature in K\n", +"T_em=(F-1)*T\n", +"\n", +"G1=10^(6); //power ratio\n", +"N_t=80; //Noise temperature in K\n", +"T_e=N_t+T_em/G1;\n", +"\n", +"disp('Noise temperature of receiver (in K)');\n", +"disp(T_em);\n", +"\n", +"// change in answer....the calculation in the book is wrong\n", +"\n", +"disp('Overall Noise temperature of receiving system(in K) is');\n", +"disp(T_e);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.9_A: Noise_Temperature.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"clear;\n", +"ENR=31.62; //10^(1.5);\n", +"Y=6.30; //10^(0.8)\n", +"T=290;//temperature in K\n", +"T_h=T*(ENR+1);\n", +"\n", +"T_e=(T_h-Y*(T))/(Y-1);\n", +"disp('Equivalent Noise Temperature (in K) is');\n", +"disp(T_e);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.A: Thermal_Noise_Power.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"clear;\n", +"T=290;//Temperature in K\n", +"B=15; //Bandwidth in KHz\n", +"k=1.38*10^(-23); //Boltzman constant\n", +"R=60; //resistance in ohms\n", +"\n", +"N=k*T*B*10^(3); //Therman Noise Power in watts\n", +"N_dBm=10*log10(N/0.001);//in dBm\n", +"\n", +"Vrms=sqrt(4*R*k*T*B*10^(3));\n", +"\n", +"disp('thermal noise power (in watts) is');\n", +"disp(N);\n", +"disp('thermal noise power (in dBm) is');\n", +"disp(N_dBm);\n", +"disp('RMS noise voltage (in Volts) is');\n", +"disp(Vrms);" + ] + } +], +"metadata": { + "kernelspec": { + "display_name": "Scilab", + "language": "scilab", + "name": "scilab" + }, + "language_info": { + "file_extension": ".sce", + "help_links": [ + { + "text": "MetaKernel Magics", + "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md" + } + ], + "mimetype": "text/x-octave", + "name": "scilab", + "version": "0.7.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} |