{ "metadata": { "name": "", "signature": "sha256:ea57204c71725b24fd5e19dcadce0d03f6181962151b0fccf8c6b17f9528b683" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "heading", "level": 1, "metadata": {}, "source": [ "chapter07:Microwave Measurements" ] }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 7.1, Page number 278" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#calculate VSWR\n", "#chapter-7 page 278 example 7.1\n", "\n", "import math\n", "a=4.##Length of Waveguide in cm\n", "b=2.5##breadth Waveguide in cm\n", "f=10.**10.##Frequency in Hz\n", "x=0.1##distance between twice minimum power points in cm\n", "c=3.*10.**10.##Velocity of Light in cm/sec\n", "\n", "#CALCULATION\n", "wc=2.*a##Cutoff wavelength in TE10 mode in cms\n", "w0=(c/f)##Free space wavelength in cms\n", "wg=(w0/math.sqrt(1-(w0/wc)**2.))##Guide wavelength in cms\n", "S=(wg/(x*(math.pi)))##Voltage Standing Wave Ratio(VSWR) for double minimum method\n", "\n", "#OUTPUT\n", "print '%s %.1f' %('\\nFor double minimum method, Voltage Standing Wave Ratio(VSWR) is S=',S)#\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "\n", "For double minimum method, Voltage Standing Wave Ratio(VSWR) is S= 10.3\n" ] } ], "prompt_number": 1 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 7.2, Page number 279" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#calculate reflected power and VSWR\n", "#chapter-7 page 279 example 7.2\n", "import math\n", "x=3##O/P incident power from first directional coupler in mW\n", "y=0.1##O/P reflected power from second directional coupler in mW\n", "\n", "#CALCULATION\n", "Pi=x*100.##Incident Power in mW\n", "Pr=y*100.##Reflected Power in mW\n", "p=math.sqrt(Pr/Pi)##Reflection Coefficient\n", "S=((1+p)/(1-p))##Voltage Standing Wave Ratio(VSWR)\n", "\n", "#OUTPUT\n", "print '%s %.f %s %s %.2f' %('\\nReflected Power is Pr=',Pr,'mW','\\nVoltage Standing Wave Ratio(VSWR)in the main waveguide is S=',S)#\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "\n", "Reflected Power is Pr= 10 mW \n", "Voltage Standing Wave Ratio(VSWR)in the main waveguide is S= 1.45\n" ] } ], "prompt_number": 2 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 7.3, Page number 279" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#calculate VSWR\n", "import math\n", "\n", "#Variable declaration\n", "Pr = 0.15*10**-3 #reflected power(W)\n", "Pi = 2.5*10**-3 #incident power(W)\n", "\n", "#Calculations\n", "rho = math.sqrt(Pr/Pi)\n", "s = (1+rho)/(1-rho)\n", "\n", "#Results\n", "print \"VSWR =\",round(s,2)" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "VSWR = 1.65\n" ] } ], "prompt_number": 3 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 7.4, Page number 279" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#calculate reflected power\n", "import math\n", "\n", "#Variable declaration\n", "s = 2. #VSWR\n", "Pi = 4.5*10**-3*1000 #incident power(W)\n", "c = 30 #couplers\n", "\n", "#Calculations\n", "#s = (1+rho)/(1-rho)\n", "rho = (s-1)/(s+1)\n", "Pr = rho**2*Pi\n", "\n", "#Results\n", "print \"Reflected power =\",Pr,\"W\"" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Reflected power = 0.5 W\n" ] } ], "prompt_number": 4 } ], "metadata": {} } ] }