{ "metadata": { "name": "chapter 2.ipynb" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "heading", "level": 1, "metadata": {}, "source": [ "Chapter 2: Fundamental Parameters of Antennas" ] }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 2.1, Page 37" ] }, { "cell_type": "code", "collapsed": false, "input": [ "from scipy.integrate import quad,dblquad\n", "\n", "#formula for beam solid angle theta_a=double_integration of d_omega\n", "theta_a=quad(lambda x:1,0,2*pi)[0]*quad(lambda x:sin(x),0,pi/6)[0]\n", "print 'Exact Beam Solid Angle:',theta_a,'steradians'\n", "\n", "#formula for approx angle=delta1*delta2\n", "delta1=pi/3\n", "delta2=pi/3\n", "theta_a1=delta1*delta2\n", "theta_a1=delta1**2\n", "print 'Approximate Beam Solid Angle:',theta_a1,'steradians'" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Exact Beam Solid Angle: 0.841787214477 steradians\n", "Approximate Beam Solid Angle: 1.09662271123 steradians\n" ] } ], "prompt_number": 31 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 2.7, Page 52" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import scipy\n", "\n", "#The half power point of the pattern occurs at 60 degrees. Therefore theta_1r=2*pi/3\n", "theta_1r=(2*pi)/3\n", "theta_2r=(2*pi)/3\n", "\n", "#Given U=B0*cos(theta)\n", "exact_theta_a=dblquad(lambda x,y:cos(x)*sin(x), 0, (2*pi), lambda x:0, lambda x:(pi/2))\n", "print 'Exact Beam Solid Angle:',exact_theta_a[0],'steradians'\n", "\n", "#Formula for approx theta = theta_1r*theta_2r\n", "approx_theta_a=theta_1r*theta_2r\n", "print 'Approximate Beam Solid Angle:',approx_theta_a,'steradians'\n", "\n", "#formula for exact directivity=4*pi/exact_beam_angle\n", "exact_direct=((4*pi)/(exact_theta_a[0]))\n", "\n", "#formula for approx directivity=4*pi/approx_beam_angle\n", "approx_direct=((4*pi)/(approx_theta_a))\n", "\n", "#exact directivity in dB\n", "exact_direct_db=10*log10(exact_direct)\n", "\n", "#approx directivity in dB\n", "approx_direct_db=10*log10(approx_direct)\n", "\n", "print 'Exact directivity:',exact_direct_db,'dB'\n", "print 'Approx. directivity:',approx_direct_db,'dB'" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Exact Beam Solid Angle: 3.14159265359 steradians\n", "Approximate Beam Solid Angle: 4.38649084493 steradians\n", "Exact directivity: 6.02059991328 dB\n", "Approx. directivity: 4.57092636745 dB\n" ] } ], "prompt_number": 9 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 2.8, Page 58" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import scipy\n", "\n", "#Maximum intensity\n", "u_max=1\n", "\n", "#Calculation of radiated power\n", "p_rad=dblquad(lambda x,y:(sin(x)**2)*sin(x),0,2*pi,lambda x:0,lambda x:pi)\n", "print 'Radiated Power:',p_rad[0],'W'\n", "\n", "#Calulation of maximum directivity\n", "D0=(4*pi)/(p_rad[0])\n", "\n", "#Directivity in dB\n", "D0_db=10*log10(D0)\n", "print 'Directivity:',D0_db,'dB'\n", "\n", "deg=90\n", "\n", "#Calculation od directivity\n", "D0_1=101/(deg-0.0027*deg**2)\n", "D0_1_db=10*log10(D0_1)\n", "print 'Directivity:',D0_1_db,'dB'\n", "\n", "#Calculation of directivity\n", "D0_2=(-172.4)+(191*sqrt((0.818+(1/deg))))\n", "D0_2_db=10*log10(D0_2)\n", "print 'Directivity:',D0_2,'dB'" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Radiated Power: 8.37758040957 W\n", "Directivity: 1.76091259056 dB\n", "Directivity: 1.70982984843 dB\n", "Directivity: 0.346803154212 dB\n" ] } ], "prompt_number": 34 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 2.9(a), Page 61" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import scipy\n", "\n", "B0=1\n", "#Maximum intensity\n", "u_max=1\n", "\n", "#Array containing angles in radians\n", "a=sin(array([10,20,30,40,50,60,70,80,90,100,110,120,130,140,150,160,170,180])*pi/180)**2\n", "\n", "#Calculation of radiated power\n", "p_rad1=B0*((pi/18)**2)*sum(a)*sum(a)\n", "print 'Power Radiated:',p_rad1,'W'\n", "\n", "#Calculation of directivity\n", "D0=(4*pi)/(p_rad1)\n", "\n", "print 'Directivity using numerical techniques:',D0\n", "\n", "#Calu=culation of radiated power\n", "a=quad(lambda x:sin(x)**2,0,pi)\n", "b=quad(lambda x:sin(x)**2,0,pi)\n", "p_rad2=a[0]*b[0]\n", "\n", "#Directivity\n", "D01=(4*pi)/(p_rad2)\n", "\n", "print 'Directivity:',D01" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Power Radiated: 2.46740110027 W\n", "Directivity using numerical techniques: 5.09295817894\n", "Directivity: 5.09295817894\n" ] } ], "prompt_number": 33 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 2.9(b), Page 63" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import scipy\n", "\n", "\n", "B0=1\n", "\n", "#Maximum intensity\n", "u_max=1\n", "\n", "#Arrays containing angles in radians\n", "a=sin(array([5,15,25,35,45,55,65,75,85])*pi/180)**2\n", "b=sin(array([5,15,25,35,45,55,65,75,85])*pi/180)**2\n", "\n", "#Calculation of radiated power\n", "p_rad=B0*((pi/18)**2)*(2*sum(a))*(2*sum(b))\n", "\n", "#Calculation of directivity\n", "D0=(4*pi*u_max)/(p_rad)\n", "\n", "print 'Directivity using 18 divisions:',D0" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Directivity using 18 divisions: 5.09295817894\n" ] } ], "prompt_number": 16 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 2.10, Page 68" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import scipy\n", "\n", "#maximum intensuty\n", "u_max=1\n", "B0=1\n", "\n", "#Input impedance in Ohms\n", "inp_imp=73\n", "#Characteristic impedance in Ohms\n", "char_imp=50\n", "\n", "#Calculation of radiated power\n", "p_rad=B0*quad(lambda x:1,0,2*pi)[0]*quad(lambda x:sin(x)**4,0,pi)[0]\n", "\n", "#Calulation of directivity\n", "D0=(4*pi*u_max)/(p_rad)\n", "\n", "#conduction & dielectric efficiency ecd=1 since antenna is loseless\n", "ecd=1\n", "\n", "#Maximum Gain\n", "G0=ecd*D0\n", "G0_db=10*log10(G0)\n", "\n", "#Reflection Coefficient Tau\n", "tau=float(inp_imp-char_imp)/float(inp_imp+char_imp)\n", "\n", "#Reflection efficiency=1-tau**2\n", "er=1-tau**2\n", "er_db=10*log10(er)\n", "\n", "#Total efficiency\n", "e0=er*ecd\n", "e0_db=10*log10(e0)\n", "\n", "#Absolute Gain\n", "G0_abs=e0*D0\n", "G0abs_db=10*log10(G0_abs)\n", "\n", "print 'Maximum Gain:',G0_db\n", "\n", "print 'Reflection efficiency:',er_db\n", "\n", "print 'Total efficiency:',e0_db\n", "\n", "print 'Absolute Gain:',G0abs_db" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Maximum Gain: 2.29848855242\n", "Reflection efficiency: -0.154573670944\n", "Total efficiency: -0.154573670944\n", "Absolute Gain: 2.14391488148\n" ] } ], "prompt_number": 17 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 2.11, Page 77" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import scipy\n", "\n", "#unit vector of the wave\n", "rho_w=array([1,0])\n", "\n", "#unit vector of the electric field\n", "rho_a=array([1/sqrt(2),1/sqrt(2)])\n", "\n", "#Polarization factor\n", "PLF=abs(dot(rho_w,rho_a))**2\n", "print 'Polarization Factor:',PLF" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "0.5\n" ] } ], "prompt_number": 56 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 2.12, Page 78" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import scipy\n", "\n", "#unit vector of the wave\n", "rho_w=array([1/sqrt(2),1/sqrt(2)])\n", "\n", "#unit vector of the electric field\n", "rho_a=array([1/sqrt(2),-1/sqrt(2)])\n", "\n", "#Polarization Factor\n", "PLF=abs(dot(rho_w,rho_a))**2\n", "\n", "print 'Polarization Factor:',PLF" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "0.0\n" ] } ], "prompt_number": 57 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 2.13, Page 86" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import scipy\n", "\n", "#Radiation Resistance\n", "rad_res=73\n", "\n", "#Frequency of antenna\n", "f=10**8\n", "\n", "#Velocity\n", "v=3*10**8\n", "\n", "#Wavelength\n", "lamda=v/f\n", "\n", "#Length of antenna\n", "l=lamda/2\n", "\n", "#Perimeter of the antenna\n", "b=(3*10**-4)*lamda\n", "C=2*pi*b\n", "\n", "#value of omega\n", "w=2*pi*f\n", "\n", "#Constant\n", "mu0=4*pi*10**-7\n", "\n", "#Conductivity\n", "sigma=5.7*10**7\n", "\n", "#High frequency resistance\n", "Rhf=(l/C)*(sqrt((w*mu0)/(2*sigma)))\n", "\n", "#Load resistance\n", "Rl=Rhf/2\n", "\n", "#calculation of conduction & dielectric efficiency\n", "ecd=(rad_res)/(rad_res+Rl)\n", "ecd_db=10*log10(ecd)\n", "\n", "print 'Conduction-dielectric efficiency:',ecd_db" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Conduction-dielectric efficiency: -0.0138216614754\n" ] } ], "prompt_number": 18 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 2.16, Page 98 " ] }, { "cell_type": "code", "collapsed": false, "input": [ "import scipy\n", "\n", "lamda=1\n", "\n", "#Maximum directivity of transmitter\n", "D0_t_db=16\n", "D0_t=10**(float(D0_t_db)/10)\n", "\n", "#Maximum directivity of receiver\n", "D0_r_db=20\n", "D0_r=10**(D0_r_db/10)\n", "\n", "#Reflection coeficients of transmitter and receiver\n", "tau_r=0.1\n", "tau_t=0.2\n", "\n", "#Power at transmitter\n", "P_t=2\n", "\n", "#Calculation of Power to the receiver\n", "P_r=(1-tau_r**2)*(1-tau_t**2)*((lamda/(4*pi*100*lamda))**2)*D0_t*D0_r*P_t\n", "print 'Power delivered to the load of receiver:',P_r,'W'" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Power delivered to the load of receiver: 0.00479199874075 W\n" ] } ], "prompt_number": 30 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 2.18, Page 108" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import scipy\n", "\n", "#antenna temp at receiver terminals\n", "Ta=150\n", "\n", "#physical temp of transmission line\n", "T0=300\n", "\n", "#thermal efficiency of the antennna\n", "eA=0.99\n", "\n", "#antenna physical temperature\n", "Tp=300\n", "l=1\n", "\n", "#antenna temp at antenna terminals due to physical temperature\n", "T_ap=Tp*(1/eA-1)\n", "\n", "#Loss of waveguide in dB/m\n", "alpha_db=0.13\n", "\n", "#Loss of waveguide in Np/m\n", "alpha_np=alpha_db/0.868\n", "\n", "#Calulation of effective temperature\n", "T_A=Ta*exp(-l*alpha_np*2)+T_ap*exp(-l*alpha_np*2)+T0*(1-exp(-l*alpha_np*2))\n", "print 'Effective temperature:',T_A,'K'" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Effective temperature: 191.071984919 K\n" ] } ], "prompt_number": 23 }, { "cell_type": "code", "collapsed": false, "input": [], "language": "python", "metadata": {}, "outputs": [] } ], "metadata": {} } ] }