{ "metadata": { "name": "", "signature": "" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "heading", "level": 1, "metadata": {}, "source": [ "chapter 04 : Antenna Arrays" ] }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Exa 4.3 : page 4.67" ] }, { "cell_type": "code", "collapsed": false, "input": [ "from math import acos, pi, cos, sqrt, degrees\n", "#given data :\n", "from sympy import symbols\n", "lamda, Ep = symbols('lamda Ep')\n", "d = 3.0/2*lamda\n", "beta = 2*pi/lamda\n", "delta = 0 # for broad side array\n", "theta = pi/2 # for maxima\n", "si = 3*pi/2*cos(theta)\n", "E0 = Ep/sqrt(2) # at half power beam width\n", "#Ep = 2*E0*cos(si/2)\n", "#it leads to cos(3*pi/2*cos(theta))=1/sqrt(2)\n", "theta=acos(acos(1/sqrt(2))/(3*pi/2)) # radian\n", "theta = degrees(theta) # degree\n", "HPBW=2*(90-theta) #in degree\n", "print \"(i) HPBW = %0.f degree \" %HPBW \n", "# 2nd part is wrong. Some mistake in question as cos(theta) = 13/12 which >1 not possible" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "(i) HPBW = 19 degree \n" ] } ], "prompt_number": 18 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Exa 4.4 : page 4.68" ] }, { "cell_type": "code", "collapsed": false, "input": [ "from math import log10\n", "from sympy import symbols\n", "lamda = symbols('lamda')\n", "#given data :\n", "n=10 #no. of elements\n", "d=lamda/4 #separation in meter\n", "D=2*n/(lamda/d)\n", "Ddb=10*log10(D) #in db\n", "print \"For broad side array D = %0.2f db \" %Ddb \n", "D=4*n/(lamda/d)\n", "Ddb=10*log10(D) #in db\n", "print \"For end fire array D = %0.2f db \" %Ddb " ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "For broad side array D = 6.99 db \n", "For end fire array D = 10.00 db \n" ] } ], "prompt_number": 22 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Exa 4.5 : page 4.68" ] }, { "cell_type": "code", "collapsed": false, "input": [ "from math import sqrt, pi\n", "#given data :\n", "from sympy import symbols, N\n", "lamda = symbols('lamda')\n", "delta=-90 #in degree\n", "#Formula : HPBW=57.3/(sqrt(L/(2*lambda))) in Degree\n", "n=20 #no. of point sources\n", "d=lamda/4 #in meter\n", "L=(n-1)*d\n", "HPBW=57.3/(sqrt(L/lamda/2)) # in Degree\n", "print \"HPBW = %0.2f Degree \" %HPBW \n", "D=4*L/lamda #Directivity\n", "print \"Directivity = %0.2f \" %D \n", "Ae = D*lamda**2/4/pi\n", "print \"Effective aperture : Ae =\",N(Ae,3)\n", "Omega=4*pi/D #in steradian\n", "print \"Beam Solid Angle : Omega =\",round(Omega,2),\"Steradian\" \n", "#Note : Answer in the book is not accurate." ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "HPBW = 37.18 Degree \n", "Directivity = 19.00 \n", "Effective aperture : Ae = 1.51*lamda**2\n", "Beam Solid Angle : Omega = 0.66 Steradian\n" ] } ], "prompt_number": 32 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Exa 4.6 : page 4.69" ] }, { "cell_type": "code", "collapsed": false, "input": [ "from math import degrees\n", "#given data :\n", "n=8 #no. of half wave dipoles\n", "lamda=100 #in cm\n", "lamda=lamda*10**-2 #in m\n", "d=50 #in cm\n", "d=d*10**-2 #in m\n", "I=0.5 #in A\n", "Rr=73 #in Ohm\n", "Pr=n*I**2*Rr #in Watts\n", "print \"Pr = %0.2f Watts \" %Pr \n", "BWFN=2*lamda/(n*d) #in radian\n", "HPBW=BWFN/2 #in radian\n", "print \"HPBW = %0.2f degree\" % degrees(HPBW)" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Pr = 146.00 Watts \n", "HPBW = 14.32 degree\n" ] } ], "prompt_number": 34 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Exa 4.7 : page 4.69" ] }, { "cell_type": "code", "collapsed": false, "input": [ "from math import log10\n", "from sympy import symbols, N\n", "lamda = symbols('lamda')\n", "#given data :\n", "n=10 #no. of elements\n", "d=lamda/4 #separation in meter\n", "Do=1.789*4*n*d/lamda\n", "Dodb=10*log10(Do) #in db\n", "print \"Do = %0.2f db\" %(Dodb) " ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Do = 12.53 db\n" ] } ], "prompt_number": 36 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Exa 4.13 : page 4.74" ] }, { "cell_type": "code", "collapsed": false, "input": [ "from math import sin, pi\n", "#given data :\n", "n=8 #no. of elements\n", "BWFN=45 #in degree\n", "theta=45 #in degree\n", "f=40 #in MHz\n", "f=f*10**6 #in Hz\n", "#Formula : theta=2*asin(2*pi/(n*dr))\n", "dr=(2*pi/n)/sin((theta/2)*(pi/180)) #\n", "c=3*10**8 #speed of light in m/s\n", "lamda=c/f #in m\n", "d=dr*lamda/(2*pi) #in m\n", "print \"Distance = %0.2f m \" %d " ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Distance = 2.34 m \n" ] } ], "prompt_number": 37 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Exa 4.14 : page 4.74" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#given data :\n", "n=10 #no. of elements\n", "from sympy import symbols, N\n", "lamda = symbols('lamda')\n", "#given : \n", "d=lamda/4 #in m\n", "Llambda=n*d/lamda\n", "D=2*Llambda #in unitless \n", "print \"Directivity of broadside uniform array = %0.2f \" %D" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Directivity of broadside uniform array = 5.00 \n" ] } ], "prompt_number": 40 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Exa 4.16 : page 4.75" ] }, { "cell_type": "code", "collapsed": false, "input": [ "from math import pi\n", "n=4 \n", "from sympy import symbols, N, cos, solve\n", "lamda, theta = symbols('lamda theta')\n", "d=lamda/2\n", "delta = pi/3\n", "dr = 2*pi*d/lamda\n", "# Peaks\n", "si = pi*cos(theta)+pi/3\n", "theta = solve(si, theta) # radian\n", "theta = degrees(theta[0]) # degree\n", "print \"Peaks : theta =\",round(theta,2),\"degree\"\n", "# Nulls\n", "print \"Nulls : \"\n", "for k in range(0,3):\n", " theta = degrees(acos(-1.0/3+k/2.0))\n", " print \"k =\",k,\", theta =\",round(theta,2),\"degree\"\n", "print \"Side lobes :\"\n", "for k in range(0,3):\n", " theta = degrees(acos(-1.0/3+(2*k+1)/4.0))\n", " print \"k =\",k,\", theta =\",round(theta,2),\"degree\"\n", "# Ans in the textbook is not accurate." ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Peaks : theta = 109.47 degree\n", "Nulls : \n", "k = 0 , theta = 109.47 degree\n", "k = 1 , theta = 80.41 degree\n", "k = 2 , theta = 48.19 degree\n", "Side lobes :\n", "k = 0 , theta = 94.78 degree\n", "k = 1 , theta = 65.38 degree\n", "k = 2 , theta = 23.56 degree\n" ] } ], "prompt_number": 74 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Exa 4.17 : page 4.76" ] }, { "cell_type": "code", "collapsed": false, "input": [ "from math import cos, sin, pi\n", "#given data :\n", "MainBeamwidth=45 #in degree\n", "thetaN=MainBeamwidth/2 #in degree\n", "thetaN=thetaN*pi/180 #in radian\n", "m=5 #no. of elements\n", "#given : d=lambda/2 in meter\n", "x=cos(pi/(2*(m-1))) \n", "xo=x/cos((pi/2)*sin(thetaN)) #unitless\n", "print \"E5=ao*z+a1*(2*z**2-1)+a2*(8*z**4-8*z**2+1)\" \n", "print \"We Know that : z=x/xo, E5=T4*xo\" \n", "print \"ao=a1*(2*(x/xo)**2-1)+a2*[8*(x/xo)**4-8*(x/xo)**2+1]=8*x**4-8*x**2+1\" \n", "print \"By comparing the term we have : \" \n", "print \"a2=xo**4 a1=4*a2-4*xo**2 ao=1+a1-a2 \"\n", "a2=xo**4 \n", "a1=4*a2-4*xo**2 \n", "ao=1+a1-a2 \n", "print \"And therefore the 5 elements array is given by : \" \n", "print (a2),\" \",(a1),\" \",(2*ao),\" \",(a1),\" \",a2" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "E5=ao*z+a1*(2*z**2-1)+a2*(8*z**4-8*z**2+1)\n", "We Know that : z=x/xo, E5=T4*xo\n", "ao=a1*(2*(x/xo)**2-1)+a2*[8*(x/xo)**4-8*(x/xo)**2+1]=8*x**4-8*x**2+1\n", "By comparing the term we have : \n", "a2=xo**4 a1=4*a2-4*xo**2 ao=1+a1-a2 \n", "And therefore the 5 elements array is given by : \n", "1.5218051188 1.15276185234 1.26191346708 1.15276185234 1.5218051188\n" ] } ], "prompt_number": 82 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Exa 4.18 : page 4.77" ] }, { "cell_type": "code", "collapsed": false, "input": [ "from __future__ import division\n", "#given data :\n", "#Side lobe level below main lobe\n", "print \"Side lobe level below main lobe : \"\n", "SideLobe=20 #in dB\n", "r=10**(SideLobe/20) #\n", "print \"r=\",r \n", "#No. of elements are 5, n=5\n", "print \"No. of elements are 5, n=5 :\" \n", "print \"Tchebyscheff polynomials of degree (n-1) is\" \n", "print \"5-1=4\" \n", "print \"T4(xo)=r\" \n", "print \"8*xo**4-8*xo**2+1=10\" \n", "print \"By using alternate formula, we get\" \n", "m=4 \n", "r=10 \n", "xo=(1/2)*((r+sqrt(r**2-1))**(1/m)+(r-sqrt(r**2-1))**(1/m))\n", "print \"xo=\" ,xo\n", "print \"E5=T4(xo)\"\n", "print \"E5=ao*z+a1*(2*z**2-1)+a2*(8*z**4-8*z**2+1)\" \n", "print \"We Know that : z=x/xo, E5=T4*xo\" \n", "print \"ao=a1*(2*(x/xo)**2-1)+a2*[8*(x/xo)**4-8*(x/xo)**2+1]=8*x**4-8*x**2+1\" \n", "print \"By comparing the term we have : \" \n", "print \"a2=xo**4 a1=4*a2-4*xo**2 ao=1+a1-a2 \"\n", "a2=xo**4 \n", "a1=4*a2-4*xo**2 \n", "ao=1+a1-a2 \n", "print \"And therefore the 5 elements array is given by : \" \n", "print round(a2,3),\" \",round(a1,3),\" \",round(2*ao,3),\" \",round(a1,3),\" \",round(a2,3)\n", "# Ans in the textbook are not accurate." ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Side lobe level below main lobe : \n", "r= 10.0\n", "No. of elements are 5, n=5 :\n", "Tchebyscheff polynomials of degree (n-1) is\n", "5-1=4\n", "T4(xo)=r\n", "8*xo**4-8*xo**2+1=10\n", "By using alternate formula, we get\n", "xo= 1.29329190052\n", "E5=T4(xo)\n", "E5=ao*z+a1*(2*z**2-1)+a2*(8*z**4-8*z**2+1)\n", "We Know that : z=x/xo, E5=T4*xo\n", "ao=a1*(2*(x/xo)**2-1)+a2*[8*(x/xo)**4-8*(x/xo)**2+1]=8*x**4-8*x**2+1\n", "By comparing the term we have : \n", "a2=xo**4 a1=4*a2-4*xo**2 ao=1+a1-a2 \n", "And therefore the 5 elements array is given by : \n", "2.798 4.5 5.405 4.5 2.798\n" ] } ], "prompt_number": 86 } ], "metadata": {} } ] }