diff options
Diffstat (limited to 'Elements_of_Electromagnetics/chapter_14.ipynb')
-rw-r--r-- | Elements_of_Electromagnetics/chapter_14.ipynb | 330 |
1 files changed, 159 insertions, 171 deletions
diff --git a/Elements_of_Electromagnetics/chapter_14.ipynb b/Elements_of_Electromagnetics/chapter_14.ipynb index 1a5d389b..fcb4fac5 100644 --- a/Elements_of_Electromagnetics/chapter_14.ipynb +++ b/Elements_of_Electromagnetics/chapter_14.ipynb @@ -1,172 +1,160 @@ -{
- "metadata": {
- "name": "chapter_14.ipynb"
- },
- "nbformat": 3,
- "nbformat_minor": 0,
- "worksheets": [
- {
- "cells": [
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "<h1>Chapter 14: Modern Topics<h1>"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "<h3>Example 14.1, Page number: 643<h3>"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "'''\n",
- "The following S-parameters are obtained for a microwave transistor operating \n",
- "at 2.5 GHz: S11 = 0.85 / 30\u00b0 ,S12 = 0.07 /56\u00b0 , S21 = 1.68 /120\u00b0 , \n",
- "S22 = O.85 /-40 . Determine the input reflection coefficient when ZL=Zo=75 ohm. '''\n",
- "\n",
- "import scipy\n",
- "import cmath\n",
- "from numpy import *\n",
- "\n",
- "#Variable Declaration\n",
- "\n",
- "S11=0.85*scipy.e**(-30j*scipy.pi/180)\n",
- "S12=0.07*scipy.e**(56j*scipy.pi/180)\n",
- "S21=1.68*scipy.e**(120j*scipy.pi/180)\n",
- "S22=0.85*scipy.e**(-40j*scipy.pi/180)\n",
- "Zl=75 \n",
- "Zo=75\n",
- "\n",
- "#Calculations\n",
- "\n",
- "Tl=(Zl-Zo)/(Zl+Zo)\n",
- "Ti=S11+(S12*S21*Tl)/(1-S22*Tl) #reflection coefficient\n",
- "Timod=abs(Ti) #mod of Ti\n",
- "Tiang=scipy.arctan(Ti.imag/Ti.real)*180/scipy.pi #argument of Ti in degrees\n",
- "\n",
- "#Results\n",
- "\n",
- "print 'input reflection coefficient =',Timod,'/',Tiang,'degrees'"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "input reflection coefficient = 0.85 / -30.0 degrees\n"
- ]
- }
- ],
- "prompt_number": 1
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "<h3>Example 14.2, Page number: 654<h3>"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "'''\n",
- "A step-index fiber has a core diameter of 80 micro m, a core refractive index \n",
- "of 1.62, and a numerical aperture of 0.21. Calculate: \n",
- "(a) the acceptance angle, (b) the refractive index that the fiber can \n",
- "propagate at a wavelength of 0.8 micro m, (c) the number of modes that the\n",
- "fiber can propagate at a wavelength of 0.8 micro m.'''\n",
- "\n",
- "import scipy\n",
- "\n",
- "#Variable Declaration\n",
- "\n",
- "d=80*(10)**-6 #diameter in m\n",
- "n1=1.62 #core refractive index\n",
- "NA=0.21 #numerical aperture\n",
- "L=8*(10)**-7 #wavelength in m\n",
- "\n",
- "#Calculations\n",
- "\n",
- "P=scipy.arcsin(NA)*180/scipy.pi #acceptance angle\n",
- "n2=scipy.sqrt(n1**2-NA**2) #refractive index\n",
- "V=(scipy.pi*d/L)*scipy.sqrt(n1**2-n2**2)\n",
- "N=V**2/2 #number of modes\n",
- "\n",
- "#Results\n",
- "\n",
- "print 'Acceptance angle =',round(P,2),'degrees'\n",
- "print 'Refractive index =',round(n2,3)\n",
- "print 'No. of modes =',round(N,0)\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "Acceptance angle = 12.12 degrees\n",
- "Refractive index = 1.606\n",
- "No. of modes = 2176.0\n"
- ]
- }
- ],
- "prompt_number": 2
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "<h3>Example 14.3, Page number: 655<h3>"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "'''\n",
- "Light pulses propagate through a fiber cable with an attenuation of 0.25 dB/km.\n",
- "Determine the distance through which the power of pulses is reduced by 40%. '''\n",
- "\n",
- "import scipy\n",
- "\n",
- "#Variable Declaration\n",
- "\n",
- "a=0.25 #in dB/km\n",
- "P=1-0.4 #strength of pulse im %\n",
- "\n",
- "#Calculation\n",
- "\n",
- "l=(10/a)*scipy.log(1/P)/scipy.log(10) #distance in km\n",
- "\n",
- "#Result\n",
- "\n",
- "print 'distance through which the power is reduced by 40% =',round(l,3),'km'"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "distance through which the power is reduced by 40% = 8.874 km\n"
- ]
- }
- ],
- "prompt_number": 3
- }
- ],
- "metadata": {}
- }
- ]
+{ + "metadata": { + "name": "", + "signature": "sha256:8b3ccd88c7aadd311b6269c4809d3b632a222a912e8231c54428ad90a16f0d12" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "<h1>Chapter 14: Modern Topics<h1>" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "<h3>Example 14.1, Page number: 643<h3>" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "import scipy\n", + "import cmath\n", + "from numpy import *\n", + "\n", + "#Variable Declaration\n", + "\n", + "S11=0.85*scipy.e**(-30j*scipy.pi/180)\n", + "S12=0.07*scipy.e**(56j*scipy.pi/180)\n", + "S21=1.68*scipy.e**(120j*scipy.pi/180)\n", + "S22=0.85*scipy.e**(-40j*scipy.pi/180)\n", + "Zl=75 \n", + "Zo=75\n", + "\n", + "#Calculations\n", + "\n", + "Tl=(Zl-Zo)/(Zl+Zo)\n", + "Ti=S11+(S12*S21*Tl)/(1-S22*Tl) #reflection coefficient\n", + "Timod=abs(Ti) #mod of Ti\n", + "Tiang=scipy.arctan(Ti.imag/Ti.real)*180/scipy.pi #argument of Ti in degrees\n", + "\n", + "#Results\n", + "\n", + "print 'input reflection coefficient =',Timod,'/',Tiang,'degrees'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "input reflection coefficient = 0.85 / -30.0 degrees\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "<h3>Example 14.2, Page number: 654<h3>" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "import scipy\n", + "\n", + "#Variable Declaration\n", + "\n", + "d=80*(10)**-6 #diameter in m\n", + "n1=1.62 #core refractive index\n", + "NA=0.21 #numerical aperture\n", + "L=8*(10)**-7 #wavelength in m\n", + "\n", + "#Calculations\n", + "\n", + "P=scipy.arcsin(NA)*180/scipy.pi #acceptance angle\n", + "n2=scipy.sqrt(n1**2-NA**2) #refractive index\n", + "V=(scipy.pi*d/L)*scipy.sqrt(n1**2-n2**2)\n", + "N=V**2/2 #number of modes\n", + "\n", + "#Results\n", + "\n", + "print 'Acceptance angle =',round(P,2),'degrees'\n", + "print 'Refractive index =',round(n2,3)\n", + "print 'No. of modes =',round(N,0)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Acceptance angle = 12.12 degrees\n", + "Refractive index = 1.606\n", + "No. of modes = 2176.0\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "<h3>Example 14.3, Page number: 655<h3>" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "import scipy\n", + "\n", + "#Variable Declaration\n", + "\n", + "a=0.25 #in dB/km\n", + "P=1-0.4 #strength of pulse im %\n", + "\n", + "#Calculation\n", + "\n", + "l=(10/a)*scipy.log(1/P)/scipy.log(10) #distance in km\n", + "\n", + "#Result\n", + "\n", + "print 'distance through which the power is reduced by 40% =',round(l,3),'km'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "distance through which the power is reduced by 40% = 8.874 km\n" + ] + } + ], + "prompt_number": 3 + } + ], + "metadata": {} + } + ] }
\ No newline at end of file |