diff options
author | tslee | 2014-11-27 17:17:59 +0530 |
---|---|---|
committer | tslee | 2014-11-27 17:17:59 +0530 |
commit | 6e3407ba85ae84e1cee1ae0c972fd32c5504d827 (patch) | |
tree | b89808101c39b1db1e3793eada2c8b702f856606 /Antennas_and_Wave_Propagation/chapter5.ipynb | |
parent | 36a03d6d76bac315dba73b2ba9555c7e3fe0234f (diff) | |
download | Python-Textbook-Companions-6e3407ba85ae84e1cee1ae0c972fd32c5504d827.tar.gz Python-Textbook-Companions-6e3407ba85ae84e1cee1ae0c972fd32c5504d827.tar.bz2 Python-Textbook-Companions-6e3407ba85ae84e1cee1ae0c972fd32c5504d827.zip |
added books
Diffstat (limited to 'Antennas_and_Wave_Propagation/chapter5.ipynb')
-rw-r--r-- | Antennas_and_Wave_Propagation/chapter5.ipynb | 312 |
1 files changed, 312 insertions, 0 deletions
diff --git a/Antennas_and_Wave_Propagation/chapter5.ipynb b/Antennas_and_Wave_Propagation/chapter5.ipynb new file mode 100644 index 00000000..a658e618 --- /dev/null +++ b/Antennas_and_Wave_Propagation/chapter5.ipynb @@ -0,0 +1,312 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "<h1>Chapter 5: Point Source and Their Arrays<h1>" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "<h3>Example 5-6.1, Page number: 90<h3>" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import scipy.integrate\n", + "\n", + "#Variable declaration\n", + "def integrand(theta, phi):\n", + " return (math.cos(theta)*math.sin(theta))\n", + " #Integrand (unitless)\n", + "Um = 1 #Maximum radiation intensity (unitless)\n", + "\n", + "#Calculation\n", + "P = scipy.integrate.dblquad(integrand, 0, 2*math.pi,\n", + " lambda x: 0, lambda x: math.pi/2)\n", + " #Total power radiated (relative to Um)\n", + "D = (4*math.pi)/P[0] #Directivity (unitless)\n", + "\n", + "#Result\n", + "print \"The directivity is \", round(D)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The directivity is 4.0\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "<h3>Example 5-6.2, Page number: 91<h3>" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import scipy.integrate\n", + "\n", + "#Variable declaration\n", + "def integrand(theta, phi):\n", + " return (math.cos(theta)*math.sin(theta))\n", + " #Integrand (unitless)\n", + "Um = 1 #Maximum radiation intensity (unitless)\n", + "\n", + "#Calculation\n", + "P = scipy.integrate.dblquad(integrand, 0, 2*math.pi,\n", + " lambda x: 0, lambda x: math.pi/2)\n", + " #Total power radiated (relative to Um)\n", + "D = (4*math.pi)/(2*P[0]) #Directivity (unitless)\n", + "\n", + "#Result\n", + "print \"The directivity is \", round(D)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The directivity is 2.0\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "<h3>Example 5-6.3, Page number: 91<h3>" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math, scipy.integrate\n", + "\n", + "#Variable declaration\n", + "def integrand(theta, phi):\n", + " return (math.sin(theta)**2)\n", + " #Integrand (unitless)\n", + "Um = 1 #Maximum radiation intensity (unitless)\n", + "\n", + "#Calculation\n", + "P = scipy.integrate.dblquad(integrand, 0, 2*math.pi,\n", + " lambda x: 0, lambda x: math.pi)\n", + " #Total radiated power (relative to Um)\n", + "D = 4*math.pi/P[0] #Directivity (unitless)\n", + "\n", + "#Result \n", + "print \"The directivity is\", round(D,2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The directivity is 1.27\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "<h3>Example 5-6.4, Page number: 91<h3>" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math, scipy.integrate\n", + "\n", + "#Variable declaration\n", + "def integrand(theta, phi):\n", + " return (math.sin(theta)**3)\n", + " #Integrand (unitless)\n", + "Um = 1 #Maximum radiation intensity (unitless)\n", + "\n", + "#Calculation\n", + "P = scipy.integrate.dblquad(integrand, 0, 2*math.pi,\n", + " lambda x: 0, lambda x: math.pi)\n", + " #Total radiated power (relative to Um)\n", + "D = 4*math.pi/P[0] #Directivity (unitless)\n", + "\n", + "#Result \n", + "print \"The directivity is\", round(D,2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The directivity is 1.5\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "<h3>Example 5-6.5, Page number: 92<h3>" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math, scipy.integrate\n", + "\n", + "#Variable declaration\n", + "def integrand(theta, phi):\n", + " return (math.sin(theta)*math.cos(theta)**2)\n", + " #Integrand (unitless)\n", + "Um = 1 #Maximum radiation intensity (unitless)\n", + "\n", + "#Calculation\n", + "P = scipy.integrate.dblquad(integrand, 0, 2*math.pi,\n", + " lambda x: 0, lambda x: math.pi/2)\n", + " #Total radiated power (relative to Um)\n", + "D = 4*math.pi/P[0] #Directivity (unitless)\n", + "\n", + "#Result \n", + "print \"The directivity is\", round(D,2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The directivity is 6.0\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "<h3>Example 5-6.6, Page number:93<h3>" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "lobes = [0.25,0.37,0.46,0.12,0.07] #Normalized power of lobes (unitless)\n", + "\n", + "#Calculation\n", + "ohm_a = 0 #Beam area (sr)\n", + "sum_lobes = 0 #Sum of all lobes (unitless)\n", + "for i in lobes:\n", + " ohm_a += 2*math.pi*(math.pi/36)*(i)\n", + " sum_lobes += i\n", + "\n", + "D = 4*math.pi/ohm_a #Directivity (unitless)\n", + "D_db = 10*math.log10(D) #Directivity (in dBi)\n", + "e_m = lobes[0]/sum_lobes #Beam efficiency (unitless)\n", + "\n", + "#Result\n", + "print \"The directivity is\", round(D), \"or\", round(D_db,1), \"dBi\"\n", + "print \"The beam efficiency is\", round(e_m, 2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The directivity is 18.0 or 12.6 dBi\n", + "The beam efficiency is 0.2\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "<h3>Example 5-21.1, Page number: 146<h3>" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "a = 25 #Height of vertical conducting wall (m)\n", + "r = 100 #Distance to the receiver (m)\n", + "wave_lt = 10e-2 #Transmitter dimension (m)\n", + "\n", + "#Calculation\n", + "k = math.sqrt(2/(r*wave_lt)) #contant (unitless)\n", + "S_av = (r*wave_lt)/(4*(math.pi**2)*(a**2)) #Relative signal level (unitless)\n", + "S_av_db = 10*math.log10(S_av) #Signal level (in db)\n", + "\n", + "#Result\n", + "print \"The signal level at the receiver is\", round(S_av,5), \"or\", round(S_av_db), \"dB\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The signal level at the receiver is 0.00041 or -34.0 dB\n" + ] + } + ], + "prompt_number": 1 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file |