diff options
author | Trupti Kini | 2016-01-11 23:30:05 +0600 |
---|---|---|
committer | Trupti Kini | 2016-01-11 23:30:05 +0600 |
commit | 8fa3a985b0772b28f8e6e6f5aec18bca1c0f7332 (patch) | |
tree | 5a9269d094b4a98947094c7c23cee3dbb3ae6c68 /Microwave_Engineering_by_G._S._Raghuvanshi | |
parent | e1dbc4e45afcfcd26275010a9c0008b5d7f7e5ea (diff) | |
download | Python-Textbook-Companions-8fa3a985b0772b28f8e6e6f5aec18bca1c0f7332.tar.gz Python-Textbook-Companions-8fa3a985b0772b28f8e6e6f5aec18bca1c0f7332.tar.bz2 Python-Textbook-Companions-8fa3a985b0772b28f8e6e6f5aec18bca1c0f7332.zip |
Added(A)/Deleted(D) following books
A Engineering_Mechanics_of_Solids_by_Popov_E_P/Chapter1.ipynb
A Engineering_Mechanics_of_Solids_by_Popov_E_P/chapter10.ipynb
A Engineering_Mechanics_of_Solids_by_Popov_E_P/chapter11.ipynb
A Engineering_Mechanics_of_Solids_by_Popov_E_P/chapter12.ipynb
A Engineering_Mechanics_of_Solids_by_Popov_E_P/chapter2.ipynb
A Engineering_Mechanics_of_Solids_by_Popov_E_P/chapter4.ipynb
A Engineering_Mechanics_of_Solids_by_Popov_E_P/chapter5.ipynb
A Engineering_Mechanics_of_Solids_by_Popov_E_P/chapter6.ipynb
A Engineering_Mechanics_of_Solids_by_Popov_E_P/chapter7.ipynb
A Engineering_Mechanics_of_Solids_by_Popov_E_P/chapter8.ipynb
A Engineering_Mechanics_of_Solids_by_Popov_E_P/chapter9.ipynb
A Engineering_Mechanics_of_Solids_by_Popov_E_P/charpter_3.ipynb
A Engineering_Mechanics_of_Solids_by_Popov_E_P/charpter_3_1.ipynb
A Engineering_Mechanics_of_Solids_by_Popov_E_P/screenshots/Untitled.png
A Engineering_Mechanics_of_Solids_by_Popov_E_P/screenshots/cap2.png
A Engineering_Mechanics_of_Solids_by_Popov_E_P/screenshots/cap3.png
A Microwave_Engineering_by_G._S._Raghuvanshi/Ch1.ipynb
A Microwave_Engineering_by_G._S._Raghuvanshi/Ch10.ipynb
A Microwave_Engineering_by_G._S._Raghuvanshi/Ch11.ipynb
A Microwave_Engineering_by_G._S._Raghuvanshi/Ch12.ipynb
A Microwave_Engineering_by_G._S._Raghuvanshi/Ch2.ipynb
A Microwave_Engineering_by_G._S._Raghuvanshi/Ch3.ipynb
A Microwave_Engineering_by_G._S._Raghuvanshi/Ch4.ipynb
A Microwave_Engineering_by_G._S._Raghuvanshi/Ch5.ipynb
A Microwave_Engineering_by_G._S._Raghuvanshi/Ch6.ipynb
A Microwave_Engineering_by_G._S._Raghuvanshi/Ch7.ipynb
A Microwave_Engineering_by_G._S._Raghuvanshi/Ch8.ipynb
A Microwave_Engineering_by_G._S._Raghuvanshi/Ch9.ipynb
A Microwave_Engineering_by_G._S._Raghuvanshi/screenshots/12refCoeff.png
A Microwave_Engineering_by_G._S._Raghuvanshi/screenshots/1RefCoeff.png
A Microwave_Engineering_by_G._S._Raghuvanshi/screenshots/6axialPhasVel.png
Diffstat (limited to 'Microwave_Engineering_by_G._S._Raghuvanshi')
15 files changed, 8623 insertions, 0 deletions
diff --git a/Microwave_Engineering_by_G._S._Raghuvanshi/Ch1.ipynb b/Microwave_Engineering_by_G._S._Raghuvanshi/Ch1.ipynb new file mode 100644 index 00000000..14c6b463 --- /dev/null +++ b/Microwave_Engineering_by_G._S._Raghuvanshi/Ch1.ipynb @@ -0,0 +1,811 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:2baa3eb0c199078d6675540c13fc8ca69d0c0eaa0d2eef907c98727dce3b6cde" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Ch-1 : Microwaves" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 12 Example 1.2" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import cmath \n", + "from math import pi\n", + "#Given\n", + "z0=50 #ohm\n", + "zg=50 #ohm\n", + "l=0.25 #m\n", + "f=4e9 #hz\n", + "zl=100 #ohm\n", + "vg=10 #V\n", + "w=2*pi*f #rad/sec\n", + "c=3e8 #m/s\n", + "\n", + "#(i) Voltage and current at any point\n", + "tg=(zg-z0)/(zg+z0) \n", + "tl=(zl-z0)/(zl+z0) \n", + "vi=z0*vg/(z0+zg) #V\n", + "print 'Voltage at any point = %0.2f V' %(vi)\n", + "ii=vg/(2*z0) #A\n", + "print 'Current at any point = %0.2f A'%(ii) \n", + "\n", + "#(ii) Voltage at generator end\n", + "#Taking z=1\n", + "z=1 \n", + "bet=w/c \n", + "vz=(vg/2)*cmath.exp(-1J*bet*(z+l))*(1+(tl*cmath.exp(2*1J*bet*z))) #V\n", + "print 'Voltage at generator end ={:.3f}'.format(vz),'V'\n", + "iz=ii*cmath.exp(-1J*bet*(z+l))*(1-(tl*cmath.exp(2*1J*bet*z))) #A\n", + "vz1=(vg/2)*cmath.exp(-1J*bet*(z+l))*(1+(tl*cmath.exp(2*1J*bet*z))) #V\n", + "\n", + "#Voltage at load end, z=0\n", + "z11=0 \n", + "vl=(vg/2)*cmath.exp(-1J*bet*l)*(1+(tl*cmath.exp(2*1J*bet*z11))) #V\n", + "print 'Voltage at load end ={:.3f}'.format(vl),'V'\n", + "\n", + "#(iii) Reflection coefficient\n", + "zx=0.25 \n", + "tz=tl*cmath.exp(1J*2*bet*zx) \n", + "print 'Reflection coefficient:{:.3f}'.format(tz) \n", + "\n", + "#(iv) VSWR\n", + "p=(1+tl)/(1-tl) \n", + "print 'VSWR:' ,p\n", + "\n", + "#(v) Average power delivered to the load\n", + "vl=20/3 \n", + "pl0=vl**2/(2*zl) #W\n", + "print 'Average power delivered to the load = %0.2f W' %pl0" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Voltage at any point = 5.00 V\n", + "Current at any point = 0.10 A\n", + "Voltage at generator end =-0.833+4.330j V\n", + "Voltage at load end =-3.333-5.774j V\n", + "Reflection coefficient:-0.167-0.289j\n", + "VSWR: 2.0\n", + "Average power delivered to the load = 0.22 W\n" + ] + } + ], + "prompt_number": 41 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 14 Example 1.3" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import log \n", + "#Given\n", + "pm=3 \n", + "pl=4 \n", + "l=24 #cm\n", + "l1=l/100 #m\n", + "\n", + "#Attenuation\n", + "tin=(pm-1)/(pm+1) \n", + "tl=(pl-1)/(pl+1) \n", + "alp=(1/(2*l1))*log(tl/tin) #Np/m\n", + "print 'Attenuation in the line = %0.2f'%alp,'Mp/m' " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Attenuation in the line = 0.38 Mp/m\n" + ] + } + ], + "prompt_number": 42 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 14 Example 1.4" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt \n", + "#Given\n", + "c=3e8 #m/s\n", + "z0=200 #ohm\n", + "zl=800 #ohm\n", + "f=30e6 #hz\n", + "\n", + "#Characterstic impedance\n", + "z00=sqrt(z0*zl) #ohm\n", + "print 'Characterstic impedance = %0.2f ohm' %z00\n", + "\n", + "#Length of line\n", + "lam=c/f #m\n", + "l=lam/4 #m\n", + "print 'Length of line = %0.2f m' %l" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Characterstic impedance = 400.00 ohm\n", + "Length of line = 2.50 m\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 15 Example 1.5" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "#Given\n", + "l=1.2 #mH\n", + "r=8 #ohm\n", + "c=200e-12 #F\n", + "\n", + "#(i) Resonant frequency\n", + "f0=(1/(2*pi))*sqrt(1/(l*c)) #hz\n", + "print 'Resonant frequency:%0.2f'%f0,'Hz' \n", + "\n", + "#(ii) Impedance of circuit\n", + "print 'Impedance of circuit:',r,'ohm' \n", + "\n", + "#(iii)Q factor of the circuit\n", + "q=1/(2*pi*f0*c*r) \n", + "print 'Q factor of the circuit:%0.2f'%q\n", + "\n", + "#(iv) Bandwidth\n", + "df=f0/q #hz\n", + "\n", + "print 'Bandwidth:%0.2f' %df,'Hz'\n", + "\n", + "#The value of resonant frequency is calculated wrong in book\n", + "#Hence Q factor and bandwidth, all these answers dont match" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Resonant frequency:10273.41 Hz\n", + "Impedance of circuit: 8 ohm\n", + "Q factor of the circuit:9682.46\n", + "Bandwidth:1.06 Hz\n" + ] + } + ], + "prompt_number": 44 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: Example 1.6" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import cos, sin\n", + "#Given\n", + "c=3e8 #m/s\n", + "le=25 #m\n", + "zl=40+(1J*30) #ohm\n", + "f=10e6 #hz\n", + "cap=40e-12 #F\n", + "l=300e-9 #H/m\n", + "\n", + "#Input impedance\n", + "z0=sqrt(l/cap) #ohm\n", + "zl1=zl/z0 \n", + "lam=c/f #m\n", + "bet=(2*pi*le)/lam #rad\n", + "zin=((zl1*cos(bet))+(1J*sin(bet)))/(cos(bet)+(1J*zl1*sin(bet))) #ohm\n", + "print 'Input impedance: {:.3f}'.format(zin), 'ohm'\n", + "\n", + "#Reflection coefficient\n", + "t=(zl1-1)/(zl1+1) \n", + "print 'Reflection coefficient:{:.3f}'.format(t)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Input impedance: 0.577-0.577j ohm\n", + "Reflection coefficient:-0.295+0.307j\n" + ] + } + ], + "prompt_number": 46 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 16 Example 1.7" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import cmath \n", + "#Given\n", + "c=3e8 #m/s\n", + "R=2.25 #ohm\n", + "L=1e-9 #H/m\n", + "C=1e-12 #F/m\n", + "f=0.5e9 #hz\n", + "G=0 \n", + "w=2*pi*f #rad/sec\n", + "\n", + "#Characterstic impedance\n", + "z0=cmath.sqrt((R+(1J*w*L))/(G+(1J*w*C))) #ohm\n", + "print 'Characterstic impedance:{:.3f}'.format(z0),'ohm'\n", + "\n", + "#Propagation constant\n", + "gam=cmath.sqrt((R+(1J*w*L))*(G+(1J*w*C))) \n", + "print 'Propagation constant:{:.3f}'.format(gam)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Characterstic impedance:33.392-10.724j ohm\n", + "Propagation constant:0.034+0.105j\n" + ] + } + ], + "prompt_number": 48 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 20 Example 1.8" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "#Given\n", + "c=3e8 #m/s\n", + "f=3e9 #Hz\n", + "ZL=50-(1J*100) #ohms\n", + "Z0=50 #ohm\n", + "#Wavelength\n", + "lam=c/f \n", + "print 'Wavelength:',lam*100, 'cm'\n", + "\n", + "#Normalized load impedance\n", + "z=ZL/Z0 \n", + "print 'Normalized load impedance:' ,z\n", + "\n", + "#From chart\n", + "zin=0.45+(1J*1.2) \n", + "yin=0.27-(1J*0.73) \n", + "ZINN=Z0*zin \n", + "print 'Line impedance:' ,ZINN,'ohm'\n", + "YINN=yin/Z0 \n", + "print 'Line admittance:',YINN, 'mho'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Wavelength: 10.0 cm\n", + "Normalized load impedance: (1-2j)\n", + "Line impedance: (22.5+60j) ohm\n", + "Line admittance: (0.0054-0.0146j) mho\n" + ] + } + ], + "prompt_number": 49 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 22 Example 1.9" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "#Given\n", + "ZL=75+(1J*100) #ohms\n", + "Z0=50 #ohm\n", + "\n", + "#Normalized load impedance\n", + "z=ZL/Z0 \n", + "print 'Normalized load impedance:' ,z\n", + "\n", + "#(i) 0.051*lam\n", + "#From chart\n", + "r=4.6 \n", + "Zi1=r*Z0 \n", + "print 'Input impedance at 0.051 lam:' ,Zi1,'ohm'\n", + "\n", + "#(ii) 0.102*lam\n", + "r1=1.5-(1J*2) \n", + "Zi2=r1*Z0 \n", + "print 'Input impedance at 0.102 lam:' ,Zi2,'ohm'\n", + " \n", + "#(iii) 0.301*lam\n", + "r2=0.22 \n", + "Zi3=r2*Z0 \n", + "print 'Input impedance at 0.301 lam:' ,Zi3, 'ohm'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Normalized load impedance: (1.5+2j)\n", + "Input impedance at 0.051 lam: 230.0 ohm\n", + "Input impedance at 0.102 lam: (75-100j) ohm\n", + "Input impedance at 0.301 lam: 11.0 ohm\n" + ] + } + ], + "prompt_number": 50 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 23 Example 1.10" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "#Given\n", + "ZL=15+(1J*20) #ohms\n", + "Z0=50 #ohm\n", + "\n", + "#Normalized load impedance\n", + "z=ZL/Z0 \n", + "print 'Normalized load impedance:' ,z\n", + "\n", + "#From chart\n", + "T=0.6 \n", + "print 'Reflection coefficient:' ,T\n", + "\n", + "#VSWR\n", + "p=4 \n", + "print 'VSWR:' ,p" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Normalized load impedance: (0.3+0.4j)\n", + "Reflection coefficient: 0.6\n", + "VSWR: 4\n" + ] + } + ], + "prompt_number": 51 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 25 Example 1.11" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "#Given\n", + "Z0=50 #ohm\n", + "p=2.4 \n", + "\n", + "#From chart\n", + "zl=1.4+1J \n", + "L=Z0*zl \n", + "print 'Load:',L, 'ohm'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Load: (70+50j) ohm\n" + ] + } + ], + "prompt_number": 52 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 26 Example 1.12" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "#Given\n", + "Z0=50 #ohm\n", + "T=2.23 \n", + "\n", + "#From chart\n", + "zl=2+1J \n", + "ZLd=Z0*zl \n", + "print 'Normalized impedance:',ZLd, 'ohm'\n", + "\n", + "#Impedance of device is by negating the real part\n", + "imp=-(ZLd.real)+((ZLd.imag)*1J) \n", + "print 'Impedance of device:' ,imp,'ohm'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Normalized impedance: (100+50j) ohm\n", + "Impedance of device: (-100+50j) ohm\n" + ] + } + ], + "prompt_number": 53 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 27 Example 1.13" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "#Given\n", + "p=3 \n", + "m1=54 #cm\n", + "m2=204 #cm\n", + "\n", + "#Point A\n", + "print 'Point A' \n", + "lam=4*(m2-m1) \n", + "dA=0.083*lam \n", + "L=m1-dA \n", + "print 'Location of stub:',L, 'cm'\n", + "IA=0.114*lam \n", + "print 'Length:' ,IA, 'cm'\n", + "\n", + "#Point B\n", + "print 'Point B' \n", + "dB=0.083*lam \n", + "IB=0.386*lam \n", + "Lb=dB+m1 \n", + "print 'Location of stub:',Lb, 'cm'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Point A\n", + "Location of stub: 4.2 cm\n", + "Length: 68.4 cm\n", + "Point B\n", + "Location of stub: 103.8 cm\n" + ] + } + ], + "prompt_number": 54 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 30 Example 1.15" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "#Given\n", + "Z0=50 #ohm\n", + "ZL=100 #ohms\n", + "f=10e9 #Hz\n", + "c=0.159e-12 #F\n", + "\n", + "#Normalized load impedance\n", + "z=ZL/Z0 \n", + "print 'Normalized load impedance:' ,z\n", + "\n", + "#From chart\n", + "zin=0.4+(1J*0.55) \n", + "ZINN=Z0*zin \n", + "print 'Normalized impedance:',ZINN, 'ohm'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Normalized load impedance: 2.0\n", + "Normalized impedance: (20+27.5j) ohm\n" + ] + } + ], + "prompt_number": 55 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 42 Example 1.16" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "#From given wave equation we can see\n", + "w=1e9 #rad/sec\n", + "bet=30 #rad/m\n", + "c=3e8 #m/s\n", + "u0=1 #let\n", + "e0=1/(9e16) \n", + "\n", + "vp=w/bet #m/sec\n", + "print 'Phase velocity:%0.2f' %vp,'m/s'\n", + "\n", + "e=1/(vp**2*u0) \n", + "er=e/(e0*u0) \n", + "print 'Dielectric constant:' ,er" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Phase velocity:33333333.33 m/s\n", + "Dielectric constant: 81.0\n" + ] + } + ], + "prompt_number": 56 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 42 Example 1.17" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "c=3e8 #m/s\n", + "f=10e9 #hz\n", + "er=6 \n", + "tandel=2e-4 \n", + "\n", + "vp=c/er #m/sec\n", + "print 'Phase velocity: %0.f'%vp,'m/sec'\n", + "al=(pi*f*tandel)/vp #Np/m\n", + "print 'Attenuation constant: %0.3f'%al,'Np/m'\n", + "\n", + "#Answer for velocity is calculated wrong in book, hence answers dont match for both" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Phase velocity: 50000000 m/sec\n", + "Attenuation constant: 0.126 Np/m\n" + ] + } + ], + "prompt_number": 59 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 43 Example 1.18" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " #Given\n", + "er=2.2 \n", + "n0=377 #ohm\n", + "n2=n0/sqrt(er) #ohm\n", + "n1=377 #ohm\n", + "\n", + "#Reflection coefficient\n", + "t=(n2-n1)/(n2+n1) \n", + "print 'Reflection coefficient: %0.2f'%t\n", + "\n", + "#Vswr\n", + "#Taking mod of reflection coefficient\n", + "t1=-t \n", + "p=(1+t1)/(1-t1) \n", + "print 'VSWR: %0.3f'%p" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Reflection coefficient: -0.19\n", + "VSWR: 1.483\n" + ] + } + ], + "prompt_number": 62 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 43 Example 1.19" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " #Given\n", + "sig=5 #mohm/m\n", + "er=80*8.85e-12 \n", + "eaz=0.1 \n", + "u=1.26e-6 \n", + "\n", + "az=-log(0.1) \n", + "#(i) Range at 25Khz\n", + "f=25e3 #Khz\n", + "w=2*pi*f #rad/sec\n", + "a=w*(sqrt((u*er/2)*(sqrt(sig**2/(w**2*er**2)+1)-1))) \n", + "z=az/a #m\n", + "print 'Range at 25khz: %0.3f'%z, 'm'\n", + "\n", + "#(ii) Range at 25Mhz\n", + "f1=25e6 #Mhz\n", + "w1=2*pi*f1 #rad/sec\n", + "a1=w1*(sqrt((u*er/2)*(sqrt(sig**2/(w1**2*er**2)+1)-1))) \n", + "z1=az/a1 #m\n", + "print 'Range at 25Mhz: %0.3f'%z1, 'm'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Range at 25khz: 3.273 m\n", + "Range at 25Mhz: 0.105 m\n" + ] + } + ], + "prompt_number": 63 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Microwave_Engineering_by_G._S._Raghuvanshi/Ch10.ipynb b/Microwave_Engineering_by_G._S._Raghuvanshi/Ch10.ipynb new file mode 100644 index 00000000..3f22a491 --- /dev/null +++ b/Microwave_Engineering_by_G._S._Raghuvanshi/Ch10.ipynb @@ -0,0 +1,687 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:948be1cc9ed00129c705ab5eed5191c57dcf55220270f926d97c4b4918eda1ba" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Ch-10 : Striplines & Microstrip lines" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 554 Example 10.1" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from math import exp, log10, pi, sqrt, log\n", + "#Given,\n", + "\n", + "z0=50 #ohm\n", + "t=0.001 #mm\n", + "b=0.32 #cm\n", + "er=2.20 \n", + "tandel= 0.0005 \n", + "rs=0.026 #ohm\n", + "f=10e9 #Hz\n", + "c=3e8 #m/sec\n", + "\n", + "p=sqrt(er)*z0 \n", + "#As p<120\n", + "w=b*(((30*pi)/p)-0.441)\n", + "print 'Width %0.3f'%w,'cm'\n", + "\n", + "#Attenuation\n", + "k=((2*pi*f*sqrt(er))/c) \n", + "ad=(k*tandel)/2 \n", + "\n", + "#and\n", + "A=1+((2*w)/(b-t))+(((b+t)/((b-t)*pi))*log(((2*b)-t)/t)) \n", + "#Hence \n", + "ac=(2.7e-3*rs*er*z0*A)/(30*pi*(b-t)*1e-2)\n", + "#Total attenution\n", + "a=ad+ac \n", + "\n", + "#Total attenution in db\n", + "x=exp(a) \n", + "alp=20*log10(x) #db/m\n", + "\n", + "#Total attenution in db/lambda:\n", + "lam=c/(sqrt(er)*f) \n", + "lamm=lam*1e2 \n", + "alph=alp/lamm \n", + "print 'Total attenution in db/lambda: %0.3f'%alph, 'db/lambda'\n", + "\n", + "\n", + "#Answer in book for alph is given as 0.856 but it should be 0.0856 as value of f is taken as 10e10 but it should be 10e9" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Width 0.266 cm\n", + "Total attenution in db/lambda: 0.856 db/lambda\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 555 Example 10.2" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "#Given,\n", + "er=9.7 \n", + "h=0.25 #mm\n", + "w=0.25 #mm\n", + "f=5e9 #Hz\n", + "c=3e8 #m/s\n", + "\n", + "#(i) Dielectric constant\n", + "dc=((er+1)/2)+(((er-1)/2)*(1/sqrt(1+12*h/w))) \n", + "print 'Dielectric constant: %0.3f'%dc\n", + "\n", + "#(ii) Phase constant\n", + "lam0=c/f \n", + "pc=sqrt(dc)*(2*pi/lam0) \n", + "print 'Phase constant: %0.3f'%(pc/100),'rad/m'\n", + "\n", + "#(iii) Microstrip wavelength\n", + "lams=lam0/sqrt(dc) \n", + "print 'Microstrip wavelength: %0.3f'%(lams*100),'cm'\n", + "\n", + "#(iv) Capacitance per unit length\n", + "e0=8.854e-12 \n", + "cap=(2*pi*e0)/log((8*h/w)-(w/(4*h))) \n", + "print 'Capacitance per unit length: %0.3e'%cap, 'F/cm'\n", + "\n", + "#(v) Characterstic Impedance\n", + "ci=(60/sqrt(dc))*log((8*h/w)+(w/(4*h))) \n", + "print 'Characterstic impedance: %0.3f'%ci, 'ohm'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Dielectric constant: 6.556\n", + "Phase constant: 2.681 rad/m\n", + "Microstrip wavelength: 2.343 cm\n", + "Capacitance per unit length: 2.717e-11 F/cm\n", + "Characterstic impedance: 49.447 ohm\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 556 Example 10.3" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "#Given,\n", + "er=5.23 \n", + "w=10 #mils\n", + "t=2.8 #mils\n", + "h=7 #mils\n", + "\n", + "dc=((er+1)/2)+(((er-1)/2)*(1/sqrt(1+12*h/w))) \n", + "print 'Dielectric constant: %0.3f'%dc\n", + "\n", + "#As w/h>1\n", + "ci=(120*pi)/(sqrt(dc)*((w/h)+1.393+0.667*log((w/h)+1.444))) \n", + "print 'Characterstic impedance: %0.3f'%ci, 'ohm'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Dielectric constant: 3.805\n", + "Characterstic impedance: 54.822 ohm\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 556 Example 10.4" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "#Given,\n", + "\n", + "q=2.5 \n", + "dh=1.58 \n", + "er=9 \n", + "f=10 \n", + "c=3e8 \n", + "\n", + "erff=((er+1)/2)+(((er-1)/2)*((1+(12/q))**(-1/2))) \n", + "vp=(c/sqrt(erff))*erff \n", + "fe1=c/(sqrt(vp)*2*dh*q) \n", + "if f<fe1:\n", + " print 'Strip supports TEM mode only' \n", + "else:\n", + " print 'Strip does not support TEM mode only' \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Strip supports TEM mode only\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 557 Example 10.5" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "#Given,\n", + "\n", + "er=9.7 \n", + "h=0.5 #mm\n", + "w=0.5 #mm\n", + "lt=2e-4 \n", + "t=0.02 #mm\n", + "f=5e9 #Hz\n", + "fg=5 #HZ\n", + "c=3e8 \n", + "rs=8.22e-3*sqrt(fg) \n", + "\n", + "#(i) Dielectric constant\n", + "dc=((er+1)/2)+(((er-1)/2)*(1/sqrt(1+12*h/w))) \n", + "print 'Dielectric constant: %0.3f'%dc\n", + "\n", + "#(ii) Characterstic Impedance\n", + "ci=(60/sqrt(dc))*log((8*h/w)+(w/(4*h))) \n", + "print 'Characterstic impedance: %0.3f'%ci,'ohm'\n", + "\n", + "#(iii) Dielectric attenuation\n", + "lam0=c/f \n", + "alphd=(pi/lam0)*(er/sqrt(dc))*((dc-1)/(er-1))*lt \n", + "print 'Dielectric attenuation: %0.3f'%alphd,'Np/m'\n", + "\n", + "#Conductor attenuation\n", + "r1=(0.94+(0.132*(w/h))-(0.0062*((w/h)**2)))*((1/pi)+(1/(pi**2))*log((4*pi*w)/t))*(rs/(w*1e-3))\n", + "r1m=r1*1e-2 \n", + "r2=(w/h)/(((w/h)+5.8+(0.03*(h/w))))*(rs/(w*1e-3)) \n", + "r2m=r2*1e-2 \n", + "alphc=(r1+r2)/(2*ci) \n", + "print 'Conductor attenuation: %0.3f'%alphc,'Np/m'\n", + "\n", + "#(iv) Total attenuation\n", + "A=alphc+alphd \n", + "Adb=A*8.686*1e-2 \n", + "print 'Total attenuation: %0.3f'%Adb,'db/cm'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Dielectric constant: 6.556\n", + "Characterstic impedance: 49.447 ohm\n", + "Dielectric attenuation: 0.025 Np/m\n", + "Conductor attenuation: 0.411 Np/m\n", + "Total attenuation: 0.038 db/cm\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 558 Example 10.6" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "#Given\n", + "\n", + "sig=5.8e7 \n", + "f=10 #GHz\n", + "h=0.12e-2 #m\n", + "\n", + "q=62.8*h*sqrt(f*sig) \n", + "print 'conductor Q of the stripline:' ,round(q)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "conductor Q of the stripline: 1815.0\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 558 Example 10.7" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "#Given\n", + "Er=6 \n", + "h=4e-3 #m\n", + "\n", + "#(i) W for Z0=50W\n", + "Z0=50 #W\n", + "W=(120*pi*h)/(sqrt(Er)*Z0) \n", + "print 'Required Width: %0.3f'%(W*1000), 'mm'\n", + "\n", + "#(ii)Stripline capacitance\n", + "E0=8.854e-12 \n", + "C=(E0*Er*W)/h \n", + "print 'Stripline capacitance: %0.3f'%(C*10**12),'pF/m'\n", + "\n", + "#(iii)Stripline inductance\n", + "Mu0=4*pi*10e-7 \n", + "L=(Mu0*h)/W \n", + "print 'Stripline inductance: %0.3f'%(L*10**5),' muH/m'\n", + "\n", + "#(iv)Phase velocity\n", + "c=3e8 \n", + "vp=c/sqrt(Er) \n", + "print 'Phase velocity',vp, 'm/s'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Required Width: 12.312 mm\n", + "Stripline capacitance: 163.522 pF/m\n", + "Stripline inductance: 0.408 muH/m\n", + "Phase velocity 122474487.139 m/s\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 559 Example 10.8" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "#Given\n", + "cl=3e8 #m/s\n", + "f=5e9 #Hz\n", + "Er=9 \n", + "C=-10 #db\n", + "Z0=50 #ohm\n", + "#Length\n", + "L=(cl/f)/(4*sqrt(Er)) \n", + "print 'Length:' ,L*100,'cm'\n", + "\n", + "#Coupling coefficient\n", + "C0=10**(C/20) \n", + "print 'Coupling coefficient: %0.3f'%C0\n", + "\n", + "#Even and odd mode impedance\n", + "Z0e=(Z0*sqrt(1+C0))/sqrt(1-C0) \n", + "print 'Even mode impedance: %0.3f'%Z0e,'ohm'\n", + "\n", + "\n", + "Z0o=(Z0*sqrt(1-C0))/sqrt(1+C0) \n", + "print 'Odd mode impedance: %0.3f'%Z0o,'ohm'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Length: 0.5 cm\n", + "Coupling coefficient: 0.316\n", + "Even mode impedance: 69.371 ohm\n", + "Odd mode impedance: 36.038 ohm\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 560 Example 10.9" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "#Given\n", + "Z0=50 #ohm\n", + "C=3 #db\n", + "\n", + "#Line impedance\n", + "Z01sqr=(1-(10**(C/-10))) \n", + "Z01=sqrt(Z0*Z0*Z01sqr) \n", + "print 'Z01: %0.3f'%Z01, 'ohm'\n", + "\n", + "Z02=Z01/(sqrt(1-(1/sqrt(2))**2)) \n", + "print 'Z02:' ,round(Z02),'ohm'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Z01: 35.313 ohm\n", + "Z02: 50.0 ohm\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 560 Example 10.10" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "#Given\n", + "W=6 #m\n", + "s=2.2 #m\n", + "b=4.8 #m\n", + "Er=2.2 \n", + "\n", + "#Even and odd mode impedance\n", + "Z0e=((120*pi)*(b-s))/(2*sqrt(Er)*W) \n", + "print 'Even mode impedance: %0.3f'%Z0e,'ohm'\n", + "\n", + "\n", + "Z0o=(Z0e*s)/b \n", + "print 'Odd mode impedance: %0.3f'%Z0o,'ohm'\n", + "\n", + "#Mid band coupling\n", + "x=(Z0e-Z0o)/(Z0e+Z0o) \n", + "C=-20*log10(x) \n", + "print 'Mid band coupling: %0.3f'%C,'db'\n", + "\n", + "#Answer in book for C is given as 54.2 but it should be 8.60" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Even mode impedance: 55.070 ohm\n", + "Odd mode impedance: 25.240 ohm\n", + "Mid band coupling: 8.602 db\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 562 Example 10.11" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "#Given\n", + "Er=6 \n", + "d=3e-3 #m\n", + "Z0=50 #ohm\n", + "E0=8.854e-12 #F/m\n", + "Mu0=4*pi*10e-7 #H/m\n", + "\n", + "#(i) W \n", + "W=(377*d)/(sqrt(Er)*Z0) \n", + "print 'Required Width: %0.3f'%(W*1000),'mm'\n", + "\n", + "#(ii)Stripline capacitance\n", + "C=(E0*Er*W)/d \n", + "print 'Stripline capacitance: %0.3f'%(C*10**12),'pF/m'\n", + "\n", + "#(iii)Stripline inductance\n", + "L=(Mu0*d)/W \n", + "print 'Stripline inductance: %0.3f'%(L*10**6), 'muH/m'\n", + "\n", + "#(iv)Phase velocity\n", + "c=3e8 \n", + "vp=c/sqrt(Er) \n", + "print 'Phase velocity' ,vp,'m/s'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Required Width: 9.235 mm\n", + "Stripline capacitance: 163.526 pF/m\n", + "Stripline inductance: 4.082 muH/m\n", + "Phase velocity 122474487.139 m/s\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 562 Example 10.12" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "#Given\n", + "Er=2.56 \n", + "w=25 #mils\n", + "t=14 #mils\n", + "d=70 #mils\n", + "E0=8.854e-12 #F/m\n", + "\n", + "#(i) K factor\n", + "K=1/(1-(t/d)) \n", + "print 'K factor:' ,K\n", + "\n", + "#(ii) Fringe capacitance\n", + "C=((E0*Er)*(2*K*log(K+1)-(K-1)*log(K**2-1)))/pi \n", + "print 'Fringe capacitance: %0.3f'%(C*10**12), 'pF/m'\n", + "\n", + "#(iii) Charecteristic Impedance\n", + "X=1/(((w*K)/d)+(C/(E0*Er)))\n", + "Z0=(94.15*X)/sqrt(Er) \n", + "print 'Charecteristic Impedance: %0.3f'%Z0,'ohm'\n", + "\n", + "\n", + "#Answer in book for Z0 is given as 50.29 but it should be 51.7" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "K factor: 1.25\n", + "Fringe capacitance: 15.665 pF/m\n", + "Charecteristic Impedance: 51.729 ohm\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 563 Example 10.13" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "#Given\n", + "Z0=50 #ohm\n", + "#Sincr ratio of power is 2:3\n", + "x1=5/2 \n", + "y1=5/3 \n", + "#Output Impedance\n", + "Z1=x1*Z0 \n", + "Z2=y1*Z0 \n", + "print 'Output Impedance 1:',Z1,'ohm'\n", + "print 'Output Impedance 2: %0.3f'%Z2,'ohm'\n", + "\n", + "#Input Impedance\n", + "Zin=[((Z2*2*Z2)/3)/((Z2+(2*Z2)/3))] \n", + "\n", + "#Looking into Z1, Z2 is || to Z0\n", + "A1=(Z2*Z0)/(Z2+Z0) \n", + "\n", + "#Looking into Z, Z2 is || to Z0\n", + "A2=(Z1*Z0)/(Z1+Z0) \n", + "\n", + "#Reflection Coeffcients\n", + "R1=(A1-Z1)/(A1+Z1) \n", + "R2=(A2-Z2)/(A2+Z2) \n", + "\n", + "print 'Reflection Coeffcients:\\n', R1,'\\n',R2, " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Output Impedance 1: 125.0 ohm\n", + "Output Impedance 2: 83.333 ohm\n", + "Reflection Coeffcients:\n", + "-0.6 \n", + "-0.4\n" + ] + } + ], + "prompt_number": 21 + } + ], + "metadata": {} + } + ] +} diff --git a/Microwave_Engineering_by_G._S._Raghuvanshi/Ch11.ipynb b/Microwave_Engineering_by_G._S._Raghuvanshi/Ch11.ipynb new file mode 100644 index 00000000..b65b1969 --- /dev/null +++ b/Microwave_Engineering_by_G._S._Raghuvanshi/Ch11.ipynb @@ -0,0 +1,113 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:dcd1524aea83bc52fd041431920005679ad317fcac49d15da415d1adac59bbe9" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Ch-11 : Microwave Integrated Circuits" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 595 Example 11.1" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division \n", + "#Given\n", + "fabc=10000 #Rs/waffer\n", + "c=100 \n", + "y=40/100 \n", + "coc=fabc/(y*c) \n", + "#Cost of one chip\n", + "print 'Cost of one chip:' ,coc,'Rs'\n", + "\n", + "#Market Cost\n", + "mc=2*coc \n", + "print 'Market costof one chip:' ,mc,'Rs'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Cost of one chip: 250.0 Rs\n", + "Market costof one chip: 500.0 Rs\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 595 Example 11.2" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt, floor\n", + "#Given\n", + "c=5000 #Rs\n", + "S=0.6 #cm\n", + "#Sides\n", + "x=3 #cm\n", + "y=2.54 #cm \n", + "#break even cost\n", + "bec=250 \n", + "#hence, chips/waffers needed\n", + "cpw=c/bec \n", + "D=x*y \n", + "#For given Area, atleast 40 chips are required\n", + "n=2*cpw \n", + "\n", + "#Diameter\n", + "N=D/(sqrt(2)*S) \n", + "#Lower round off\n", + "NN=floor(N) \n", + "#Chips possible\n", + "cp=NN**2 \n", + "\n", + "#Yield\n", + "Y=(n/cp)*100 #Percent\n", + "print 'Yield:',Y, '%'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Yield: 62.5 %\n" + ] + } + ], + "prompt_number": 2 + } + ], + "metadata": {} + } + ] +} diff --git a/Microwave_Engineering_by_G._S._Raghuvanshi/Ch12.ipynb b/Microwave_Engineering_by_G._S._Raghuvanshi/Ch12.ipynb new file mode 100644 index 00000000..d45dd956 --- /dev/null +++ b/Microwave_Engineering_by_G._S._Raghuvanshi/Ch12.ipynb @@ -0,0 +1,482 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:4900eeee12d5add487271b429c0cbafd110530ef7f850ea37e0c5905f6da1030" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Ch-12 : Microwave Measurements" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 649 Example 12.1" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "#Given\n", + "Is=0.1*(10**-6) #A\n", + "Pi=0 #dBm\n", + "Cs=0.1*(10**-12) #F\n", + "Ls=2*(10**-9) \n", + "Cj=0.15*(10**-12) #F\n", + "Rs=10 #ohm\n", + "T=293 #K\n", + "nktbye=25*(10**-3) #V\n", + "\n", + "#Rj\n", + "Rj=(nktbye/Is) \n", + "print 'Rj:' ,Rj/1000,'Kohm'\n", + "\n", + "#Bi\n", + "Bi=nktbye/2 \n", + "Bii=Bi*1000 \n", + "print 'Bi:' ,Bii,'A/W'\n", + "\n", + "#Bv\n", + "Bv=Rj*Bii \n", + "print 'Bv:',Bv, 'V/W'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Rj: 250.0 Kohm\n", + "Bi: 12.5 A/W\n", + "Bv: 3125000.0 V/W\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 650 Example 12.2" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import log10 \n", + "#Given\n", + "vswr=4 \n", + "\n", + "modT=(vswr-1)/(vswr+1) \n", + "Lm=-10*log10(1-(modT*modT)) #dB\n", + "print 'Mismatch Loss:' ,Lm,'dB'\n", + "\n", + "#Sensitivity reduces by a factor\n", + "Bvd=(1-(modT*modT)) \n", + "Bvdp=Bvd*100 \n", + "print 'Voltge sensitivity reduces by:' ,Bvdp,'%'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Mismatch Loss: -0.0 dB\n", + "Voltge sensitivity reduces by: 100 %\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 650 Example 12.3" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt , pi\n", + "#Given\n", + "f=10e9 #Hz\n", + "c=3e10 #cm/s\n", + "a=4 #cm\n", + "s=0.1 #cm\n", + "lmb=c/f #cm\n", + "lmbg=lmb/(sqrt(1-((lmb/(2*a))**2))) \n", + "vswr=lmbg/(pi*s) \n", + "print 'VSWR: %0.3f'%vswr\n", + "\n", + "#Answer in book for lmbg is given as 3.49 but it should be 3.23 and hence the answer will be 10.3" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "VSWR: 10.301\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 651 Example 12.4" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "#Given\n", + "delx=3.5 #cm\n", + "s=0.25 #cm\n", + "\n", + "lmbg=2*delx \n", + "vswr=lmbg/(pi*s) \n", + "print 'VSWR: %0.3f'%vswr" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "VSWR: 8.913\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 651 Example 12.5" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "#Given\n", + "vswr=2 \n", + "Pin=4.5e-3 #W\n", + "\n", + "modT=(vswr-1)/(vswr+1) \n", + "#Power reflected,\n", + "Pr=(modT**2)*Pin \n", + "#As coupler samples only 1/1000th power\n", + "Prr=Pr*1000 \n", + "print 'Reflected Power:' ,Prr,'W'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Reflected Power: 0.5 W\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 652 Example 12.6" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import tan\n", + "#Given\n", + "Z0=50 #ohm\n", + "p=2.4 \n", + "L=0.313 \n", + "x=2*pi*L \n", + "y=tan(x) \n", + "\n", + "Zl=(Z0*(1+(p*p*1J)))/(p+(p*1J)) \n", + "T=(Zl-Z0)/(Zl+Z0) \n", + "p=sqrt(((T.real))**2+((T.imag))**2) \n", + "print 'Reflection coefficient: %0.3f'%p" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Reflection coefficient: 0.412\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 652 Example 12.7" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "#Given\n", + "Zl=25+25*1J #ohm\n", + "Z0=50 #ohm\n", + "\n", + "T=(Zl-Z0)/(Zl+Z0) \n", + "p=sqrt(((T.real))**2+((T.imag))**2) \n", + "print 'Reflection coefficient: %0.3f'%p\n", + "\n", + "vswrr=(1+p)/(1-p) \n", + "print 'VSWR: %0.3f'%vswrr\n", + "\n", + "#Fraction of power delivered\n", + "Pd=1-(p**2) \n", + "Pdp=Pd*100 \n", + "\n", + "print 'Fraction of power delivered:',Pdp, '%'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Reflection coefficient: 0.447\n", + "VSWR: 2.618\n", + "Fraction of power delivered: 80.0 %\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 653 Example 12.8" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "#Given\n", + "d=2.4 #cm\n", + "lmbc=1.8 \n", + "c=3*10**10 #cm/s\n", + "\n", + "lmbg=2*d \n", + "lmb=(lmbg*lmbc)/(sqrt(lmbg**2+lmbc**2)) \n", + "#Operating frequency\n", + "f=c/lmb \n", + "print 'Operating frequency: %0.3f'%(f/10**9),'GHz'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Operating frequency: 17.800 GHz\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 653 Example 12.9" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import mat\n", + "#Given\n", + "p=1.5 \n", + "IsL=1 #dB\n", + "InL=30 #dB\n", + "\n", + "S21=10**(-IsL/20) \n", + "\n", + "#Assuming tgree ports to be identical\n", + "S32=S21 \n", + "S13=S21 \n", + "\n", + "#Isolations are also the same\n", + "S31=10**(-InL/20) \n", + "S23=S31 \n", + "S12=S31 \n", + "\n", + "#Refelction coefficients are also the same\n", + "T=(p-1)/(p+1) \n", + "S11=T \n", + "S22=T \n", + "S33=T \n", + "\n", + "S=mat([[S11, S12, S13], [S21, S22, S23], [S31, S32, S33] ])\n", + "print 'Matrix is:\\n' ,S" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Matrix is:\n", + "[[ 0.2 0.03162278 0.89125094]\n", + " [ 0.89125094 0.2 0.03162278]\n", + " [ 0.03162278 0.89125094 0.2 ]]\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 654 Example 12.10" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "#Given\n", + "R1=10.6 #GHz\n", + "R2=8.30 #GHz\n", + "Q0=8200 \n", + "Q0d=890 \n", + "\n", + "Er=(R1/R2)**2 \n", + "print 'Dielectric constant %0.3f'%Er\n", + "\n", + "Qd=(Q0-Q0d)/(Q0*Q0d) \n", + "print 'Loss tangent of dielectric' ,Qd" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Dielectric constant 1.631\n", + "Loss tangent of dielectric 0\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 654 Example 12.11" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "#Given\n", + "l0=0.15 #cm\n", + "lmbg=2*2.24 #cm\n", + "le=1.14 #cm\n", + "a=2.286 #cm\n", + "d=2 \n", + "\n", + "B0=(2*pi)/lmbg \n", + "x=tan(B0*l0)/(B0*l0) \n", + "#Also\n", + "x1=(l0*x)/le \n", + "#Correct value seems to be\n", + "Bele=2.786 \n", + "e1=((((a/pi)**2)*(Bele/le)**2)+1) \n", + "e2=(((2*a)/lmbg)**2)+1 \n", + "Er=e1/e2 \n", + "print 'Er: %0.3f'%Er\n", + "\n", + "\n", + "#Answer in book for Er is given as 2.062 but it should be 2.038" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Er: 2.039\n" + ] + } + ], + "prompt_number": 14 + } + ], + "metadata": {} + } + ] +} diff --git a/Microwave_Engineering_by_G._S._Raghuvanshi/Ch2.ipynb b/Microwave_Engineering_by_G._S._Raghuvanshi/Ch2.ipynb new file mode 100644 index 00000000..81e488f7 --- /dev/null +++ b/Microwave_Engineering_by_G._S._Raghuvanshi/Ch2.ipynb @@ -0,0 +1,1319 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:e6553dcd70d4d8b28a08356b9f55414eb14b3817d8217dcdd5394858fb7e9bf3" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Ch-2 : Waveguides" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number:91 Example 2.1" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from math import sqrt\n", + "\n", + "#Given,\n", + "\n", + "a=6 #cm\n", + "b=4 #cm\n", + "d=4.47 #cm\n", + "c=3e8 #m/s\n", + "lamc=2*a \n", + "lamg=2*d \n", + "\n", + "#Signal wavelength\n", + "lam=lamg*lamc/(sqrt(lamg**2+lamc**2)) \n", + "lam=lam/100 #m\n", + "f=c/lam \n", + "print 'Signal frequency of dominant mode: %0.3f'%(f/1e9), 'Ghz'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Signal frequency of dominant mode: 4.185 Ghz\n" + ] + } + ], + "prompt_number": 58 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 92 Example 2.2" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import pi \n", + "#Given,\n", + "c=3e8 #m/s\n", + "a=2.5 #cm\n", + "b=5 #cm\n", + "lam=4.5 #cm\n", + "\n", + "lamc=2*b \n", + "\n", + "#Guide wavelength\n", + "lamg=lam/(sqrt(1-((lam/lamc)**2))) \n", + "print 'Guide wavelength: %0.3f'%lamg,'cm'\n", + "\n", + "#Phase constant\n", + "bet=(2*pi)/lamg \n", + "bet=bet*100 #rad/m\n", + "print 'Phase constant: %0.3f'%bet,'rad/m'\n", + "\n", + "#Phase velocity\n", + "w=(2*pi*c)/lam \n", + "vp=w/bet \n", + "print 'Phase velocity: %0.3f'%vp,'m/s'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Guide wavelength: 5.039 cm\n", + "Phase constant: 124.690 rad/m\n", + "Phase velocity: 3359355.066 m/s\n" + ] + } + ], + "prompt_number": 59 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 92 Example 2.3" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "#Given,\n", + "\n", + "c=3e8 #m/s\n", + "a=4 #cm\n", + "b=2 #cm\n", + "f=10e9 #Hz\n", + "m=1 \n", + "n=1 \n", + "\n", + "\n", + "#Cutoff wavelength\n", + "lamc=2/sqrt((m/a)**2+(n/b)**2) \n", + "print 'Cut-off wavelength: %0.3f'%lamc,'cm'\n", + "\n", + "#Wave impedance\n", + "lam=c/f #m\n", + "lam=lam*100 #cm\n", + "eeta=120*pi \n", + "z0=eeta*sqrt(1-(lam/lamc)**2) \n", + "print 'Wave impedance: %0.3f'%z0,'ohm'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Cut-off wavelength: 3.578 cm\n", + "Wave impedance: 205.408 ohm\n" + ] + } + ], + "prompt_number": 62 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 93 Example 2.4" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "#Given,\n", + "c=3e8 #m/s\n", + "f=10e9 #Hz\n", + "zte=410 #ohm\n", + "\n", + "#Wider dimension\n", + "lam=c/f #m\n", + "lam=lam*100 #cm\n", + "a=3/(2*(sqrt(1-(120*pi/zte)**2))) \n", + "print 'Wider dimension: %0.3f'%a, 'cm'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Wider dimension: 3.816 cm\n" + ] + } + ], + "prompt_number": 64 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 93 Example 2.5" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "#Given,\n", + "c=3e8 #m/s\n", + "a=3.0 #cm\n", + "b=1.5 #cm\n", + "mur=1 \n", + "er=2.25 \n", + "x=mur*er \n", + "\n", + "#(i) Cutoff wavelength and frequencuy\n", + "print 'TE10 mode' \n", + "m1=1 \n", + "n1=0 \n", + "lamc10=2/sqrt((m1/a)**2+(n1/b)**2) \n", + "print 'Cut-off wavelength:',lamc10, 'cm'\n", + "lamc10=lamc10/100 \n", + "f10=c/(lamc10*sqrt(x)) \n", + "print 'Cutoff frequency:%0.3f'%(f10/1e9),'Ghz'\n", + "\n", + "print 'TE20 mode' \n", + "m2=2 \n", + "n2=0 \n", + "lamc20=2/sqrt((m2/a)**2+(n2/b)**2) \n", + "print 'Cut-off wavelength:',lamc20, 'cm'\n", + "lamc20=lamc20/100 \n", + "f20=c/(lamc20*sqrt(x)) \n", + "print 'Cutoff frequency: %0.3f'%(f20/1e9),'Ghz'\n", + "\n", + "print 'TE11 mode' \n", + "m3=1 \n", + "n3=1 \n", + "lamc11=2/sqrt((m3/a)**2+(n3/b)**2) \n", + "print 'Cut-off wavelength: %0.3f'%lamc11,'cm'\n", + "lamc11=lamc11/100 \n", + "f11=c/(lamc11*sqrt(x)) \n", + "print 'Cutoff frequency: %0.3f'%(f11/1e9), 'Ghz'\n", + "\n", + "#(ii) lambg and Z0\n", + "f=4e9 #Hz\n", + "lam=c/f \n", + "lamg=lam/(sqrt(x-((lam/lamc10)**2))) \n", + "print 'Guide wavelength: %0.3f'%(lamg*100),'cm'\n", + "\n", + "fc=3.33e9 #Hz\n", + "Z0=(120*pi*(1/sqrt(x))*(b/a))/sqrt(1-((fc/f)**2)) \n", + "print 'Impedance: %0.3f'%round(Z0), 'ohm'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "TE10 mode\n", + "Cut-off wavelength: 6.0 cm\n", + "Cutoff frequency:3.333 Ghz\n", + "TE20 mode\n", + "Cut-off wavelength: 3.0 cm\n", + "Cutoff frequency: 6.667 Ghz\n", + "TE11 mode\n", + "Cut-off wavelength: 2.683 cm\n", + "Cutoff frequency: 7.454 Ghz\n", + "Guide wavelength: 9.045 cm\n", + "Impedance: 227.000 ohm\n" + ] + } + ], + "prompt_number": 65 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 95 Example 2.5" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given,\n", + "c=3e8 #m/s\n", + "a=4 #cm\n", + "b=2 #cm\n", + "\n", + "#(i) Mode\n", + "lamc=2*a #cm\n", + "lamcm=lamc/100 #m\n", + "fc=c/lamcm \n", + "#20% above fc\n", + "f=1.2*fc #Hz\n", + "\n", + "#Operating wavelength\n", + "lam1=c/f #cm\n", + "\n", + "#For TE10 mode\n", + "lamc10=2*b #cm\n", + "lamcm10=lamc10/100 #m\n", + "fc10=c/lamcm10 \n", + "print 'Hence mode of operation is TE10','Since guide is operating at' ,fc/1e6,'MHz'\n", + "\n", + "#(ii)Guide wavelength\n", + "lamm1=lam1*100 #cm\n", + "lamg=lamm1/(sqrt(1-(lamm1/lamc)**2)) \n", + "print 'Guide wavelength:%0.3f'%lamg,'cm'\n", + "\n", + "#(iii) Phase velocity\n", + "vp=f*lamg \n", + "print 'Phase velocity: %0.3f'%(vp/100),'m/s'\n", + "\n", + "#(iii) Group velocity\n", + "vg=c**2/vp \n", + "print 'Group velocity: %0.3f'%vg, 'm/s'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Hence mode of operation is TE10 Since guide is operating at 3750.0 MHz\n", + "Guide wavelength:12.060 cm\n", + "Phase velocity: 542720420.240 m/s\n", + "Group velocity: 1658312.395 m/s\n" + ] + } + ], + "prompt_number": 68 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 96 Example 2.8" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given,\n", + "c=3e8 #m/s\n", + "a=7 #cm\n", + "b=3.5 #cm\n", + "f=3e9 #Hz\n", + "h0=10 #amp/m\n", + "\n", + "#Wave impedance\n", + "lamc=2*a \n", + "lam=c/f #m\n", + "lam=lam*100 #cm\n", + "lamg=lam/sqrt(1-(lam/lamc)**2) #cm\n", + "z0=377*lamg/h0 #ohm\n", + "\n", + "a1=a/100 #m\n", + "b1=b/100 #m\n", + "#Average power transmitted\n", + "p=(z0*h0*h0*a1*b1)/4 \n", + "print 'Average power transmitted: %0.3f'%p, 'W'\n", + "\n", + "#Peak electric field\n", + "e0=z0*h0 \n", + "print 'Peak electric field: %0.3f'%(e0/1000),'kV/m'\n", + "\n", + "#Answer for p is given as 28.3 W but it should be 32.99W" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Average power transmitted: 32.994 W\n", + "Peak electric field: 5.387 kV/m\n" + ] + } + ], + "prompt_number": 70 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 96 Example 2.9" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " #Given,\n", + "c=3e8 #m/s\n", + "fc=3e9 #Hz\n", + "\n", + "#Cutoff wavelength\n", + "lamc=c/fc \n", + "a=lamc/2 #m\n", + "a=a*100 #cm\n", + "print 'Dimensions:' \n", + "print 'a:' ,a,'cm'\n", + "b=a/2 #cm\n", + "print 'b:' ,b,'cm'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Dimensions:\n", + "a: 5.0 cm\n", + "b: 2.5 cm\n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: Example 2.10" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "#Given,\n", + "\n", + "c=3e8 #m/s\n", + "a=3 #cm\n", + "a1=a/100 #m\n", + "b=2 #cm\n", + "b1=b/100 #m\n", + "f=7.5e9 #HZ\n", + "p=5e3 #W\n", + "\n", + "mu=pi*4e-7 \n", + "w=2*pi*f \n", + "bet=sqrt(((w/c)**2)-((pi/a1)**2)) \n", + "#Charecteristic impedance\n", + "z0=w*mu*2*b/(bet*a) \n", + "print 'Charecteristic impedance : %0.3f'%z0,'ohm'\n", + "\n", + "#Peak electric field\n", + "e0=4*w*mu*p/(bet*a*b) \n", + "print 'Peak electric field: %0.3f'%e0,'V/m'\n", + "\n", + "#Maximum voltage\n", + "v0=e0*b1 \n", + "print 'Maximum voltage: %0.3f'%(v0/1000),'kV'\n", + "\n", + "#Answer for v0 is given as 3.172 kV it should be 33.71 kV" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Charecteristic impedance : 674.382 ohm\n", + "Peak electric field: 1685955.535 V/m\n", + "Maximum voltage: 33.719 kV\n" + ] + } + ], + "prompt_number": 73 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 99 Example 2.14" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given,\n", + "c=3e8 #m/s\n", + "a=1.5 #cm\n", + "a1=a/100 #m\n", + "b=0.8 #cm\n", + "b1=b/100 #m\n", + "mu=1/c*c \n", + "e=4 \n", + "w=pi*1e11 \n", + "n=377 \n", + "\n", + "#(i) Frequency of operation\n", + "f=w/(2*pi) \n", + "f1=f/1e9 #ghz\n", + "print 'Frequency of operation:' ,f1,'Ghz'\n", + "\n", + "#(ii) Cutt off frequency\n", + "fc=(c*sqrt((1/a1)**2+(3/b1)**2))/(2*sqrt(e)) \n", + "fc1=fc/1e9 #ghz\n", + "print 'Cut off frequency: %0.3f'%fc1,'Ghz'\n", + "\n", + "#(iii) Phase constant\n", + "bet=(w*sqrt(e)*sqrt(1-(fc/f)**2))/(c) \n", + "print 'Phase constant: %0.3f'%bet,'rad/m'\n", + "\n", + "#(iv) Propogation constant\n", + "gam=1J*bet \n", + "print 'Propogation constant: {:.3}'.format(gam),'rad/s'\n", + "\n", + "#(v) Intrensic wave impedance\n", + "zte=(n/sqrt(e))/sqrt(1-(fc/f)**2) \n", + "ztm=(n/sqrt(e))*sqrt(1-(fc/f)**2) \n", + "print 'Intrinsic wave impedance:\\n' ,'ZTM13 :%0.3f'%ztm,'Ohm','ZTE13 : %0.3f'%zte,'Ohm'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Frequency of operation: 50.0 Ghz\n", + "Cut off frequency: 28.566 Ghz\n", + "Phase constant: 1718.928 rad/m\n", + "Propogation constant: 1.72e+03j rad/s\n", + "Intrinsic wave impedance:\n", + "ZTM13 :154.707 Ohm ZTE13 : 229.674 Ohm\n" + ] + } + ], + "prompt_number": 81 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 103 Example 2.17" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "a=2 #cm\n", + "a1=1/100 #m\n", + "b=1 #cm\n", + "b1=b/100 #m\n", + "p=10e-3 #W\n", + "c=3e8 #m/s\n", + "f0=10e9 #Hz\n", + "\n", + "#Peak value of electric field\n", + "fc=c/(2*a) \n", + "E02=(4*p*377)/(a1*b1*sqrt(1-(fc/f0)**2)) \n", + "E0=sqrt(E02) \n", + "print 'Peak value of electric field: %0.3f'%E0, 'V/m'\n", + "\n", + "#Maximum power transmitted\n", + "Ed=3e6 #V/m\n", + "Pt=2.6e13*(Ed/f0)**2 \n", + "print 'Maximum power transmitted: %0.3f'%(Pt/1000), 'kW'\n", + "\n", + "#Answer is given as 2300kW but it is 2340kW" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Peak value of electric field: 388.335 V/m\n", + "Maximum power transmitted: 2340.000 kW\n" + ] + } + ], + "prompt_number": 83 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 104 Example 2.18" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division \n", + "import cmath\n", + "#Given\n", + "f=5e9 #Hz\n", + "c=3e8 #m/s\n", + "a=7.5 #cm\n", + "a1=a/100 #m\n", + "b=3.5 #cm\n", + "b1=b/100 #m\n", + "lam=c/f \n", + "lamm=lam*100 #m\n", + "\n", + "print 'TE10 mode' \n", + "lamc10=2*a \n", + "bet10=(2*pi*sqrt(((lamc10/lamm)**2)-1))/lamc10 \n", + "print 'Propogation constant: %0.3f'%bet10,'rad/cm'\n", + "vp10=(2*pi*f)/bet10 \n", + "print 'Phase velocity: %0.3f'%(vp10/100),'m/s'\n", + "\n", + "print 'TE01 mode' \n", + "lamc01=2*b \n", + "bet01=(2*pi*sqrt(((lamc01/lamm)**2)-1))/lamc01 \n", + "print 'Propogation constant: %0.3f'%bet01, 'rad/cm'\n", + "vp01=(2*pi*f)/bet01 \n", + "print 'Phase velocity: %0.3f'%(vp01/100), 'm/s'\n", + "\n", + "print 'TE11 mode' \n", + "lamc11=(2*a*b)/sqrt((a*a)+(b*b)) \n", + "bet11=(2*pi*sqrt(((lamc11/lamm)**2)-1))/lamc11 \n", + "print 'Propogation constant: %0.3f'%bet11,'rad/cm'\n", + "vp11=(2*pi*f)/bet11 \n", + "print 'Phase velocity: %0.3f'%(vp11/100), 'm/s'\n", + "\n", + "print 'TE02 mode' \n", + "lamc02=b \n", + "bet02=(2*pi*cmath.sqrt(((lamc02/lamm)**2)-1))/lamc02 \n", + "print 'Propogation constant: {:.3f}'.format(bet02), 'rad/cm'\n", + "print 'As beta is imaginary, mode gets attenuated' \n", + "alp=(2*pi*sqrt(1-((lamc02/lamm)**2)))/lamc02 \n", + "print 'Propogation constant alpha: %0.3f'%alp, 'Np/m'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "TE10 mode\n", + "Propogation constant: 0.960 rad/cm\n", + "Phase velocity: 327326835.354 m/s\n", + "TE01 mode\n", + "Propogation constant: 0.539 rad/cm\n", + "Phase velocity: 582435206.036 m/s\n", + "TE11 mode\n", + "Propogation constant: 0.340 rad/cm\n", + "Phase velocity: 924473451.642 m/s\n", + "TE02 mode\n", + "Propogation constant: 0.000+1.458j rad/cm\n", + "As beta is imaginary, mode gets attenuated\n", + "Propogation constant alpha: 1.458 Np/m\n" + ] + } + ], + "prompt_number": 93 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 105 Example 2.19" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import log10 , exp\n", + "#Given\n", + "c=3e8 #m/s\n", + "a=2.29 #cm\n", + "b=1.02 #cm\n", + "a1=a/100 #m\n", + "b1=b/100 #m\n", + "f=6e9 #Hz\n", + "e=1 \n", + "mu=1/(c**2) \n", + "\n", + "#Cut off frequency\n", + "lamc=2*a1 \n", + "fc=c/lamc \n", + "w=2*pi*fc \n", + "\n", + "#Attenuation constant\n", + "a=(w*sqrt(1-((f/fc)**2)))/c \n", + "adb=-20*log10(exp(-a)) \n", + "print 'Attenuation constant: %0.3f'%adb,'dB/m'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Attenuation constant: 478.042 dB/m\n" + ] + } + ], + "prompt_number": 94 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 105 Example 2.20" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "#Given,\n", + "a1=1.84 \n", + "a2=pi \n", + "\n", + "r=2*pi*(a1/a2)**2 \n", + "print 'Cross section ratio: %0.3f'% r" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Cross section ratio: 2.155\n" + ] + } + ], + "prompt_number": 95 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 106 Example 2.21" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "#Given\n", + "c=3e8 #m/s\n", + "f=15e9 #hz\n", + "a=1.07 #cm\n", + "a1=a/100 #m\n", + "b=0.43 #cm\n", + "b1=b/100 #m\n", + "er=2.08 \n", + "tandel=0.0004 \n", + "lam=c/f \n", + "\n", + "\n", + "#(i) Cut off frequency\n", + "m1=1 \n", + "n1=0 \n", + "fc10=(c/(2*pi*sqrt(er))*sqrt((m1*pi/a1)**2+(n1*pi/b1)**2)) \n", + "print 'Cut off frequency for mode TE10: %0.3f'%(fc10/10**9), 'GHz'\n", + "\n", + "m2=2 \n", + "n2=0 \n", + "fc20=(c/(2*pi*sqrt(er))*sqrt((m2*pi/a1)**2+(n2*pi/b1)**2)) \n", + "print 'Cut off frequency at mode TE20: %0.3f'%(fc20/10**9), 'Ghz'\n", + "\n", + "m3=0 \n", + "n3=1 \n", + "fc01=(c/(2*pi*sqrt(er))*sqrt((m3*pi/a1)**2+(n3*pi/b1)**2)) \n", + "print 'Cut off frequency at mode TE01: %0.3f'%(fc01/10**9),'Ghz'\n", + "\n", + "#Dielectric attenuation constant\n", + "ad=(pi*tandel)/(lam*sqrt(1-(fc10/f)**2)) \n", + "adb=-20*log10(exp(-ad)) \n", + "print 'Attenuation constant: %0.3f'%adb,'dB/m'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Cut off frequency for mode TE10: 9.720 GHz\n", + "Cut off frequency at mode TE20: 19.440 Ghz\n", + "Cut off frequency at mode TE01: 24.188 Ghz\n", + "Attenuation constant: 0.717 dB/m\n" + ] + } + ], + "prompt_number": 98 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 106 Example 2.22" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "#Given\n", + "c=3e8 #m/s\n", + "a=2.286 #cm\n", + "a1=a/100 #m\n", + "b=1.016 #cm\n", + "b1=b/100 #m\n", + "sig=5.8e7 #s/m\n", + "f=9.6e9 #Hz\n", + "\n", + "w=2*pi*f \n", + "mu=pi*4e-7 \n", + "et=377 \n", + "\n", + "lam=c/f \n", + "lamc=2*a1 \n", + "r=lam/lamc \n", + "\n", + "Rs=sqrt((w*mu)/(2*sig)) \n", + "ac=(Rs*(1+(2*(b1/a1)*r*r)))/(et*b1*sqrt(1-(r**2))) \n", + "adb=-20*log10(exp(-ac)) \n", + "print 'Conductor attenuation constant: %0.3f'%adb, 'dB/m'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Conductor attenuation constant: 0.112 dB/m\n" + ] + } + ], + "prompt_number": 99 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 107 Example 2.23" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "#Given\n", + "c=3e8 #m/s\n", + "f=9e9 #hz\n", + "a=5 #cm\n", + "a1=a/100 #m\n", + "e=1 \n", + "mu=1/(c*c) \n", + "p11=1.841 \n", + "\n", + "fc=(p11*c)/(2*pi*a1) \n", + "#Maximum power transmitted\n", + "pmax=1790*(a1*a1)*sqrt(1-((fc/f)**2)) \n", + "print 'Maximum power transmitted:%0.3f'%pmax,'kW'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum power transmitted:4.389 kW\n" + ] + } + ], + "prompt_number": 100 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 108 Example 2.26" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "#Given\n", + "c=3e8 #m/s\n", + "a=5 #cm\n", + "a1=a/100 #m\n", + "f=3e9 #hz\n", + "p11=1.841 \n", + "e=1 \n", + "w=2*pi*f \n", + "\n", + "#(i) Cut off frequency\n", + "fc=(p11*c)/(2*pi*a1) \n", + "print 'Cut off frequency: %0.3f'%(fc/10**9),'Ghz'\n", + "\n", + "#(ii) Guide wavelength\n", + "bet=sqrt(((w*w)/(c*c))-((p11/a1)**2)) \n", + "lamg=(2*pi)/bet \n", + "lamg1=lamg*100 #cm\n", + "print 'Guide wavelength: %0.3f'%lamg1, 'cm'\n", + "\n", + "#(iii) Wave impedance\n", + "zte=(w*pi*4e-7)/bet \n", + "print 'Wave impedance:' ,round(zte),'ohm'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Cut off frequency: 1.758 Ghz\n", + "Guide wavelength: 12.341 cm\n", + "Wave impedance: 465.0 ohm\n" + ] + } + ], + "prompt_number": 101 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number:108 Example 2.25" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "#Given\n", + "c=3e8 #m/s\n", + "p01=2.405 \n", + "a=1/100 #cm\n", + "p11=1.841 \n", + "\n", + "fc01=((c*p01)/(2*pi*a)) \n", + "fc11=((c*p11)/(2*pi*a)) \n", + "bw=fc01-fc11 \n", + "print 'Bandwidth: %0.3f'%(bw/10**9), 'Ghz'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Bandwidth: 2.693 Ghz\n" + ] + } + ], + "prompt_number": 102 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 109 Example 2.26" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "#Given\n", + "c=3e8 #m/s\n", + "a=2.286 #cm\n", + "f=5e9 #Hz\n", + "er=2.25 \n", + "tandel=1e-3 \n", + "w=2*pi*f \n", + "mu=4e-7 \n", + "sig=5.8e7 #s/m\n", + "\n", + "lamc=2*a \n", + "lamm=c/f #m\n", + "lam=lamm*100 #cm\n", + "\n", + "ermax=(lam/a)**2 \n", + "print 'Maximum value of dielectric constant: %0.3f'%ermax\n", + "ermin=(lam/(2*a))**2 \n", + "print 'Minimum value of dielectric constant: %0.3f'%ermin\n", + "\n", + "#Guide wavelength\n", + "lam1=lam/sqrt(er) #cm\n", + "lamg=lam1/sqrt(1-(lam1/lamc)**2) \n", + "print 'Guide wavelength: %0.3f'%lamg, 'cm'\n", + "\n", + "lamm1=lam1/100 \n", + "ad=(pi/lamm1)*(tandel/sqrt(1-(lam1/lamc)**2)) \n", + "print 'ad: %0.3f'%ad,'Np/m'\n", + "bet=2*pi/lamg \n", + "print 'Beta: %0.3f'%bet, 'rad/cm'\n", + "vp=w/(bet*100) \n", + "print 'Phase velocity: %0.3f'%vp, 'm/s'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum value of dielectric constant: 6.889\n", + "Minimum value of dielectric constant: 1.722\n", + "Guide wavelength: 8.259 cm\n", + "ad: 0.162 Np/m\n", + "Beta: 0.761 rad/cm\n", + "Phase velocity: 412949668.492 m/s\n" + ] + } + ], + "prompt_number": 107 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 110 Example 2.27" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "#Given\n", + "c=3e8 #m/s\n", + "a=0.5 #cm\n", + "a1=a/100 #m\n", + "f=14e9 #Hz\n", + "er=2.08 \n", + "p11=1.841 \n", + "p01=2.405 \n", + "tandel=4e-4 \n", + "w=2*pi*f \n", + "u=pi*4e-7 \n", + "sig=4.1e7 \n", + "et=377 \n", + "\n", + "#(i) Cut off frequencies\n", + "fcte11=p11*c/(2*pi*a1*sqrt(er)) \n", + "fctm01=p01*c/(2*pi*a1*sqrt(er)) \n", + "print 'Cut off frequencies for TE11 mode: %0.3f'%(fcte11/10**9),'Ghz'\n", + "print 'Cut off frequencies for TM01 mode:%0.3f'%(fctm01/10**9), 'Ghz'\n", + "\n", + "#(ii) Overall noise\n", + "#Dielectric attenuation\n", + "ad=(pi*sqrt(er)*tandel*f)/(c*sqrt(1-((fcte11/f)**2))) \n", + "print 'Dielectric attenuation: %0.3f'%(ad*8.686), 'dB/m'\n", + "\n", + "#Conductor attenuation\n", + "k=(2*pi*f*sqrt(er))/c \n", + "bet=sqrt((k*k)-((p11/a1)**2)) \n", + "#Surface resistance\n", + "rs=sqrt((w*u)/(2*sig)) \n", + "kc2=(p11/a1)**2 \n", + "\n", + "ac=(rs*(kc2-((k**2)/((p11**2)-1))))/(a1*k*et*bet) \n", + "print 'Conductor attenuation: %0.3f'%(ac*8.686), 'dB/m'\n", + "\n", + "#Total attenuation\n", + "a=(ac+ad)*8.686 \n", + "print 'Total attenuation: %0.3f'%a,'dB/m'\n", + "ta=a*0.3 \n", + "print 'Total attenuation in 30 cm line: %0.3f'%ta,'dB'\n", + "\n", + "#Answer for condcutor attenuation is wrong in book, hence answer for total loss is different" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Cut off frequencies for TE11 mode: 12.190 Ghz\n", + "Cut off frequencies for TM01 mode:15.924 Ghz\n", + "Dielectric attenuation: 1.494 dB/m\n", + "Conductor attenuation: 0.117 dB/m\n", + "Total attenuation: 1.610 dB/m\n", + "Total attenuation in 30 cm line: 0.483 dB\n" + ] + } + ], + "prompt_number": 111 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 112 Example 2.28" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "#Given\n", + "c=3e8 #m/s\n", + "er=9 \n", + "a=7 #cm\n", + "a1=a/100 #m\n", + "b=3.5 #cm\n", + "b1=b/100 #m\n", + "ur=1 \n", + "f1=2e9 #Hz\n", + "\n", + "#(i) Cut off frequency\n", + "lamc=2*a1 \n", + "fc=c/(lamc*sqrt(ur*er)) \n", + "print 'Cut off frequency:%0.3f'%(fc/10**9), 'Ghz'\n", + "\n", + "#(ii) Phase velocity\n", + "lam=c/f1 #m\n", + "lam1=lam*100 #cm\n", + "lamc1=lamc*100 #cm\n", + "lamg=lam1/(sqrt((ur*er)-((lamc1/lam1)**2))) #cm\n", + "lamg1=lamg/100 #m\n", + "vp=f1*lamg1 \n", + "print 'Phase velocity:%0.3f'%vp, 'm/s'\n", + "\n", + "#/(iii)Guide wavelength\n", + "print 'Guide wavelength: %0.3f'%lamg, 'cm'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Cut off frequency:0.714 Ghz\n", + "Phase velocity:105221784.048 m/s\n", + "Guide wavelength: 5.261 cm\n" + ] + } + ], + "prompt_number": 114 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 112 Example 2.29" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "#Given\n", + "c=3e8 #m/s\n", + "fc=9e9 #Hz\n", + "er=1 \n", + "er1=4 \n", + "p11=1.841 \n", + "\n", + "#(i) air filled\n", + "a=(p11*c)/(2*pi*fc*sqrt(er)) \n", + "print 'Inside diameter if air filled: %0.3f'%(a*100),'cm'\n", + "#(ii) dielectric field\n", + "a1=(p11*c)/(2*pi*fc*sqrt(er1)) \n", + "print 'Inside diameter if dielectric filled: %0.3f'%(a1*100),'cm'\n", + "\n", + "#Answers are calculated wrong in book" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Inside diameter if air filled: 0.977 cm\n", + "Inside diameter if dielectric filled: 0.488 cm\n" + ] + } + ], + "prompt_number": 116 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 113 Example 2.30" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "#Given\n", + "c=3e8 #m/s\n", + "er=2.55 \n", + "d=1 #mm\n", + "d1=d/1000 #m\n", + "\n", + "#Cut off frequencies\n", + "fctm0=0 \n", + "print 'Cut off frequency for mode TM0:',fctm0, 'Ghz'\n", + "\n", + "fcte1=c/(4*d1*sqrt(er-1)) \n", + "print 'Cut off frequency at mode TE1: %0.3f'%(fcte1/10**9),'Ghz'\n", + "\n", + "fctm1=c/(2*d1*sqrt(er-1)) \n", + "print 'Cut off frequency at mode TM1: %0.3f'%(fctm1/10**9),'Ghz'\n", + "\n", + "\n", + "#Answers are calculated wrong in book" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Cut off frequency for mode TM0: 0 Ghz\n", + "Cut off frequency at mode TE1: 60.241 Ghz\n", + "Cut off frequency at mode TM1: 120.483 Ghz\n" + ] + } + ], + "prompt_number": 117 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 113 Example 2.31" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "#Given,\n", + "c=3e8 #m/s\n", + "f=15e9 #hz\n", + "d=5 #mm\n", + "d1=d/1000 #m\n", + "\n", + "#Cut off frequency\n", + "fc=0.8*f \n", + "#Dielctric constant\n", + "er=(c/(2*d1*fc))**2+1 \n", + "print 'Dielectric constant:' ,er" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Dielectric constant: 7.25\n" + ] + } + ], + "prompt_number": 118 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Microwave_Engineering_by_G._S._Raghuvanshi/Ch3.ipynb b/Microwave_Engineering_by_G._S._Raghuvanshi/Ch3.ipynb new file mode 100644 index 00000000..58613139 --- /dev/null +++ b/Microwave_Engineering_by_G._S._Raghuvanshi/Ch3.ipynb @@ -0,0 +1,258 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:cae0ff7581c3b5c12e11b4f1b44c3beb02347fef7d7d6837104f81f1c4303c1b" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Ch-3 : Microwave Network Analysis" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 142 Example 3.4" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from numpy import array, linalg, mat, set_printoptions\n", + "\n", + "#Given\n", + "\n", + "z=mat('[4 2 ;2 4]')\n", + "I=mat('[1 0;0 1]') \n", + "\n", + "\n", + "#Scattering matrix\n", + "s=(z-I)*linalg.inv(z+I)\n", + "set_printoptions(precision=3)\n", + "print 'Scattering Matrix:\\n' ,s" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Scattering Matrix:\n", + "[[ 0.524 0.19 ]\n", + " [ 0.19 0.524]]\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 142 Example 3.5" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt, pi \n", + "from cmath import exp\n", + "#Given\n", + "P=12.8e-3 #W\n", + "l=3 #cm\n", + "lamb=4.2 #cm\n", + "vswr=2.2 \n", + "jfi=1J*4.49 \n", + "\n", + "#ap\n", + "ap=sqrt(2*P) \n", + "\n", + "#Phase shift\n", + "bl=(2*pi*l)/lamb \n", + "#bp\n", + "bp=(ap*(vswr-1))/(vswr+1) \n", + "\n", + "a=ap*exp(jfi) \n", + "b=bp*exp(jfi) \n", + "print 'Required Waves:\\n{:.3}'.format(a),'\\n{:.3}'.format(b)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Required Waves:\n", + "(-0.0353-0.156j) \n", + "(-0.0132-0.0585j)\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 143 Example 3.6" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " from math import log10\n", + "#Given\n", + "S11=0.10 \n", + "S12=0.90 \n", + "A12=-45 \n", + "S21=0.90 \n", + "A21=45 \n", + "S22=0.3 \n", + "\n", + "#(i) Network is reciprocal\n", + "if(A12==A21):\n", + " print 'Network is reciprocal' \n", + "else:\n", + " \n", + " print 'Network is not reciprocal' \n", + "\n", + "\n", + "#(ii) Network is lossles\n", + "x=(S11**2)+(S12**2) \n", + "if(x==1):\n", + " print 'Network is lossless' \n", + "else:\n", + " \n", + " print 'Network is not lossless' \n", + "\n", + "\n", + "#(iii)Return loss\n", + "T=S11-((S12*S21)/(1+S22)) \n", + "Tm=-T #mod of T\n", + "L=-20*log10(Tm) \n", + "print 'Return Loss: %0.3f'%L,'dB'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Network is not reciprocal\n", + "Network is not lossless\n", + "Return Loss: 5.629 dB\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 163 Example 3.12" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "S11=0.6 \n", + "S12=0.045 \n", + "S21=2.5 \n", + "S22=0.50 \n", + "TS=0.5 \n", + "TL=0.4 \n", + "Z0=50 #ohm\n", + "Vrms=10 #V\n", + "\n", + "#(i) Gain Parameters\n", + "#(i)Reflection coefficients of input and output\n", + "Tin=S11+((S12*S21*TL)/(1-(S22*TL))) \n", + "Tout=S22+((S12*S21*TS)/(1-(S22*TS))) \n", + "\n", + "#Transducer Gain\n", + "x=(1-(TS)**2)/((1-(S11*TS))**2) \n", + "y=(S21*S21) \n", + "z=(1-(TL)**2)/((1-(Tout*TL))**2) \n", + "GT=x*y*z \n", + "print 'Transducer Gain: %0.3f'%GT\n", + "\n", + "#Available Power Gain\n", + "z1=1-(Tout)**2 \n", + "GA=(x*y)/z1 \n", + "print 'Available power Gain: %0.3f'%GA\n", + "\n", + "#Power Gain\n", + "z2=1-(Tin)**2 \n", + "GP=(x*y)/z2 \n", + "print 'Power Gain: %0.3f'%GP\n", + "\n", + "#(ii) Power levels\n", + "#Power available at source\n", + "Pavs=(sqrt(2)*Vrms)**2/(8*Z0) \n", + "print 'Power available at source: %0.3f'%Pavs,'W'\n", + "\n", + "Pl=9.4*Pavs \n", + "#Power available at input\n", + "Pin=Pl/13.5 \n", + "print 'Power available at input: %0.3f'%Pin,'W'\n", + "\n", + "#(iii) VSWRs\n", + "M1=Pin/Pavs \n", + "M2=Pl/(9.6*Pavs) \n", + "\n", + "Tin1=sqrt(1-M1) \n", + "Tout1=sqrt(1-M2) \n", + "\n", + "vswrin=(1+Tin1)/(1-Tin1) \n", + "print 'Input VSWR: %0.3f'%vswrin\n", + "vswrout=(1+Tout1)/(1-Tout1) \n", + "print 'Output VSWR: %0.3f'%vswrout\n", + "\n", + "#Calculations for gain are done wrong in book, hence answers dont match" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Transducer Gain: 13.553\n", + "Available power Gain: 14.291\n", + "Power Gain: 16.803\n", + "Power available at source: 0.500 W\n", + "Power available at input: 0.348 W\n", + "Input VSWR: 3.455\n", + "Output VSWR: 1.337\n" + ] + } + ], + "prompt_number": 20 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Microwave_Engineering_by_G._S._Raghuvanshi/Ch4.ipynb b/Microwave_Engineering_by_G._S._Raghuvanshi/Ch4.ipynb new file mode 100644 index 00000000..080d6f6c --- /dev/null +++ b/Microwave_Engineering_by_G._S._Raghuvanshi/Ch4.ipynb @@ -0,0 +1,1069 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:ffa36c37285243e82f8b7c3abbc469b9a273b2bd68fa586a9dc529ef122af349" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Ch-4: Microwave resonators & Waveguide components" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 193 Example 4.1" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from math import sqrt \n", + "#Given\n", + "a=5 #cm\n", + "a1=a/100 #m\n", + "b=2 #cm\n", + "b1=b/100 #m\n", + "c=15 #cm\n", + "c1=c/100 #m\n", + "\n", + "#(i) Air filled cavity\n", + "m=1 \n", + "n=0 \n", + "p=1 \n", + "c=3e8 #for air\n", + "fr=(1/2)*c*sqrt((m/a1)**2+(n/b1)**2+(p/c1)**2) #hz\n", + "print 'Resonant frequency for an air filled cavity: %0.3f'%(fr/10**9),'Ghz'\n", + "\n", + "#(ii) Dielctric filled cavity\n", + "er=2.56 \n", + "fr1=(1/2)*(c/sqrt(er))*sqrt((m/a1)**2+(n/b1)**2+(p/c1)**2) #hz\n", + "print 'Resonant frequency for dielectric cavity: %0.3f'%(fr1/10**9),'Ghz'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Resonant frequency for an air filled cavity: 3.162 Ghz\n", + "Resonant frequency for dielectric cavity: 1.976 Ghz\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 193 Example 4.2" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "#Given\n", + "a=0.38 #cm\n", + "a1=a/100 #m\n", + "b=0.76 #cm\n", + "b1=b/100 #m\n", + "f=50e9 \n", + "c=3e8 \n", + "\n", + "#Length for TE102\n", + "m=1 \n", + "n=0 \n", + "p=2 \n", + "l=1/sqrt((f/c)**2-(1/(4*b1**2))) #m\n", + "print 'Length c: %0.3f'%(l*100),'cm'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Length c: 0.653 cm\n" + ] + } + ], + "prompt_number": 31 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 194 Example 4.3" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import pi \n", + "#Given\n", + "c=3e8 #m/s\n", + "a=2.286 #cm\n", + "a1=a/100 #m\n", + "b=1.024 #cm\n", + "b1=b/100 #m\n", + "f=10e9 #hz\n", + "sig=6e7 \n", + "u=4e-7*pi \n", + "w=2*pi*f \n", + "eet=377 \n", + "\n", + "#Shortest cavity length\n", + "lamc=2*a1 #m\n", + "fc=c/lamc #hz\n", + "lam=c/f #m\n", + "lamg=lam/sqrt(1-(fc/f)**2) #m\n", + "sc=lamg/2 #m\n", + "print 'Shortest cavity length: %0.3f'%(sc*100), 'cm'\n", + "\n", + "#Qw of the resonator operating in TE101 mode\n", + "rs=sqrt((w*u)/(2*sig)) #ohm\n", + "lamr=c/f \n", + "x=(((a1*b1)/(sc**2))+((sc**2+a1**2)/(2*sc*a1))+(b1*sc/a1**2)) \n", + "qw=(2*pi*eet*a1*b1*sc)/(rs*(lamr**3)*x) \n", + "print 'Qw of the resonator operating in TE101 mode %0.3f'%qw" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Shortest cavity length: 1.988 cm\n", + "Qw of the resonator operating in TE101 mode 7990.324\n" + ] + } + ], + "prompt_number": 32 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 195 Example 4.4" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "#Given\n", + "c=3e8 #m/s\n", + "a=4.8 #cm\n", + "a1=a/100 #m\n", + "b=2.2 #cm\n", + "b1=b/100 #m\n", + "f=5e9 #hz\n", + "er=2.25 \n", + "tandel=4e-4 \n", + "sig=5.813e7 \n", + "oneby=3e8 \n", + "u=4e-7*pi \n", + "w=2*pi*f \n", + "eet=377 \n", + "\n", + "#Length at p=1\n", + "m=1 \n", + "n=0 \n", + "p=1 \n", + "z=(f*2*sqrt(er))/c \n", + "cp1=p/sqrt((z**2)-((m/a1)**2)-((n/b1)**2)) \n", + "print 'Length of resonator at p=1: %0.3f'%(cp1*100), 'cm'\n", + "\n", + "#At p=2\n", + "cp2=cp1*2 \n", + "print 'Length of resonator at p=2: %0.3f'%(cp2*100), 'cm'\n", + "\n", + "#Qw\n", + "rs=sqrt((w*u)/(2*sig)) #ohm\n", + "lamr=c/(f*sqrt(er)) \n", + "x=(((a1*b1)/(cp1**2))+((cp1**2+a1**2)/(2*cp1*a1))+(b1*cp1/a1**2)) \n", + "qw=(2*pi*(eet/sqrt(er))*a1*b1*cp1)/(rs*(lamr**3)*x) \n", + "qd=1/tandel \n", + "q=(qw*qd)/(qw+qd) \n", + "print 'Q for TE101 mode: %0.3f'%q" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Length of resonator at p=1: 2.200 cm\n", + "Length of resonator at p=2: 4.400 cm\n", + "Q for TE101 mode: 1925.612\n" + ] + } + ], + "prompt_number": 33 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 196 Example 4.5" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "#Given\n", + "c=3e8 #m/s\n", + "a=2 #cm\n", + "a1=a/100 #m\n", + "b=2.5 #cm\n", + "b1=b/100 #m\n", + "\n", + "print 'TE modes' \n", + "h01=3.832 \n", + "fr=(c/(2*pi))*sqrt((h01/a1)**2+(pi/b1)**2) #hz\n", + "print 'Resonant frequency for mode TE010: %0.3f'%(fr/10**9),'Ghz'\n", + "\n", + "h11=1.841 \n", + "fr1=(c/(2*pi))*sqrt((h11/a1)**2+(pi/b1)**2) #hz\n", + "print 'Resonant frequency for mode TE111: %0.3f'%(fr1/10**9),'Ghz'\n", + "\n", + "h21=3.054 \n", + "fr2=(c/(2*pi))*sqrt((h21/a1)**2+(pi/b1)**2) #hz\n", + "print 'Resonant frequency for mode TE211: %0.3f'%(fr2/10**9),'Ghz'\n", + "\n", + "print 'TM modes:' \n", + "l1=0 \n", + "h011=2.405 \n", + "fr3=(c/(2*pi))*sqrt((h011/a1)**2+(pi*l1/b1)**2) #hz\n", + "print 'Resonant frequency for mode TM010 %0.3f'%(fr3/10**9),'Ghz'\n", + "\n", + "l2=1 \n", + "fr4=(c/(2*pi))*sqrt((h011/a1)**2+(pi*l2/b1)**2) #hz\n", + "print 'resonant frequency for mode TM011: %0.3f'%(fr4/10**9),'Ghz'\n", + "\n", + "l3=1 \n", + "h111=3.832 \n", + "fr5=(c/(2*pi))*sqrt((h111/a1)**2+(pi*l3/b1)**2) #hz\n", + "print 'Resonant frequency for mode TM111: %0.3f'%(fr5/10**9),'Ghz'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "TE modes\n", + "Resonant frequency for mode TE010: 10.940 Ghz\n", + "Resonant frequency for mode TE111: 7.438 Ghz\n", + "Resonant frequency for mode TE211: 9.442 Ghz\n", + "TM modes:\n", + "Resonant frequency for mode TM010 5.742 Ghz\n", + "resonant frequency for mode TM011: 8.305 Ghz\n", + "Resonant frequency for mode TM111: 10.940 Ghz\n" + ] + } + ], + "prompt_number": 34 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 196 Example 4.6" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "#Given\n", + "QTM010=1.202 \n", + "QTE101=1.11 \n", + "\n", + "r=QTM010/QTE101 \n", + "print 'Ratio of Qs of cylindrical and rectangular resonators: %0.3f'%r" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Ratio of Qs of cylindrical and rectangular resonators: 1.083\n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 197 Example 4.7" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "f=7.07e9 #hz\n", + "a=3 #cm\n", + "a1=a/100 #m\n", + "sig=5.8e7 \n", + "er=2.25 \n", + "tandel=4e-4 \n", + "ur=1 \n", + "n=377 \n", + "w=2*pi*f \n", + "u=4e-7*pi \n", + "\n", + "#Q of resonantor\n", + "rs=sqrt(w*u/(2*sig)) #ohm\n", + "qw=(0.7419*n)/(rs*sqrt(2.25)) \n", + "qd=1/tandel \n", + "q=(qw*qd)/(qw+qd) \n", + "print 'Q of resonator: %0.3f'%q" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Q of resonator: 1931.819\n" + ] + } + ], + "prompt_number": 36 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 198 Example 4.8" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "#Given\n", + "a=5 #cm\n", + "a1=a/100 #m\n", + "b=4 #cm\n", + "b1=b/100 #m\n", + "c=10 #cm\n", + "c1=c/100 #m\n", + "sig=5.8e7 \n", + "u0=4e-7*pi \n", + "er=3 \n", + "eet=377 \n", + "\n", + "ur=1 \n", + "spl=3e8 \n", + "tandel=2.5e-4 \n", + "\n", + "#TE101 mode\n", + "m=1 \n", + "n=0 \n", + "p=1 \n", + "fr=(spl/(2*sqrt(er*ur)))*sqrt((m/a1)**2+(n/b1)**2+(p/c1)**2) #hz\n", + "print 'Resonant frequency: %0.3f'%(fr/10**9), 'Ghz'\n", + "\n", + "w=2*pi*fr \n", + "rs=sqrt((w*u0)/(2*sig)) #ohm\n", + "lamr=spl/(fr*sqrt(er)) \n", + "x=(((a1*b1)/(c1**2))+((c1**2+a1**2)/(2*c1*a1))+((b1*c1)/a1**2)) \n", + "qw=(2*pi*(eet/sqrt(er))*a1*b1*c1)/(rs*(lamr**3)*x) \n", + "print 'Q for TE101 mode: %0.3f'%qw\n", + "\n", + "qd=1/tandel \n", + "q=(qw*qd)/(qw+qd) \n", + "print 'Q for lossy dielectric: %0.3f'%q\n", + "\n", + "#Value of qw is calculated wrong in book as lamr comes to be 0.08 not 0.89 m" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Resonant frequency: 1.936 Ghz\n", + "Q for TE101 mode: 10916.466\n", + "Q for lossy dielectric: 2927.360\n" + ] + } + ], + "prompt_number": 40 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 198 Example 4.9" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "#Given\n", + "c=3e8 #m/s\n", + "a=2.286 #cm\n", + "a1=a/100 #m\n", + "b=1.106 #cm\n", + "b1=b/100 #m\n", + "\n", + "#For fr1=9.3e9 \n", + "fr1=9.3e9 #hz\n", + "lamr1=c/fr1 #m\n", + "c1=(2*a1)/sqrt((((2*a1)/lamr1)**2)-1) \n", + "\n", + "#For fr2=10.2e9 \n", + "fr2=10.2e9 #hz\n", + "lamr2=c/fr2 #m\n", + "c2=(2*a1)/sqrt((((2*a1)/lamr2)**2)-1) \n", + "\n", + "r=c1-c2 \n", + "print 'Range of piston movement: %0.3f'%(r*100), 'cm'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Range of piston movement: 0.710 cm\n" + ] + } + ], + "prompt_number": 41 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 199 Example 4.10" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "#Given\n", + "a=3 #cm\n", + "a1=a/100 #m\n", + "d=10 #cm\n", + "d1=d/100 #m\n", + "df=2.5e6 \n", + "er=2.25 \n", + "p11=1.841 \n", + "c=3e8 #m/s\n", + "\n", + "#Resonant frequency\n", + "fr=(c/2)*(sqrt((p11/a1)**2+(pi/d1)**2)) #hz\n", + "print 'Resonant frequency: %0.3f'%(fr/10**9),'Ghz'\n", + "\n", + "#Q without dielectric\n", + "q0=fr/df \n", + "print 'Q wirhout dielectric constant: %0.3f'%q0\n", + "\n", + "# Q with dielectric\n", + "fr1=fr/sqrt(er) \n", + "qd=1e3 \n", + "q=(q0*qd)/(q0+qd) \n", + "print 'Q with dielectric constant: %0.3f'%q" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Resonant frequency: 10.341 Ghz\n", + "Q wirhout dielectric constant: 4136.446\n", + "Q with dielectric constant: 805.313\n" + ] + } + ], + "prompt_number": 44 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 200 Example 4.11" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "#Given\n", + "f=9.375e9 #hz\n", + "sig=5.8e7 \n", + "eet=377 \n", + "c=3e8 #m/s\n", + "w=2*pi*f \n", + "r=1.5 \n", + "u=4e-7*pi \n", + "\n", + "#Radius\n", + "a=c/(f*2.62) #m\n", + "print 'Radius of resonantor %0.3f'%(a*100), 'cm'\n", + "\n", + "#O\n", + "rs=sqrt((w*u)/(2*sig)) #ohm\n", + "x=1.202*eet \n", + "y=rs*(1+(1/r)) \n", + "q=x/y \n", + "print 'Q of the resonator: %0.3f'%q\n", + "\n", + "#Answer for Q is calculated as 10875 in book but it is 10763.303" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Radius of resonantor 1.221 cm\n", + "Q of the resonator: 10763.303\n" + ] + } + ], + "prompt_number": 45 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 215 Example 4.12" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "#Given\n", + "f=5e9 #hz\n", + "sig=5.813e7 \n", + "er=2.25 \n", + "tandel=4e-4 \n", + "c=3e8 #m/s\n", + "h01=3.832 \n", + "u=4e-7*pi \n", + "\n", + "#Length of resonator\n", + "lamr=c/(f*sqrt(er)) \n", + "d=sqrt((((((2*3.832)**2)+(pi*pi))*(lamr*lamr))/(2*2*pi*pi)) )\n", + "print 'Length of resonator: %0.3f'%(d*100),'cm'\n", + "\n", + "#Q of resonator\n", + "n=(120*pi)/sqrt(er) \n", + "Rs=sqrt((f*u)/sig) \n", + "a=d/2 \n", + "Qw1=n*(((h01/a)**2+(pi/d)**2)**(3/2))\n", + "Qw2=2*Rs*(((h01*h01)/(a*a*a))+((2*pi*pi)/(d*d*d))) \n", + "Qw=Qw1/Qw2 \n", + "Qd=1/tandel \n", + "Q=(Qw*Qd)/(Qw+Qd) \n", + "print 'Q of resonator: %0.3f'%Q\n", + "\n", + "#Value of Qw is calculated wrong in the book, it should be 50057.91 instead of 53473.8\n", + "#Hence the value of Q also differs" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Length of resonator: 5.273 cm\n", + "Q of resonator: 2381.084\n" + ] + } + ], + "prompt_number": 46 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 215 Example 4.13" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "p=100 #mW\n", + "#As 2 and 3 are matched terminals\n", + "x=1/2 \n", + "y=1/sqrt(2) \n", + "s=[x,-x, y, -x, 0, y, y, y, 0] \n", + "\n", + "#Power delivered\n", + "#Port 1\n", + "p1=p*(1-s[1]**2) \n", + "print 'Power at port 1:',p1, 'mW'\n", + "\n", + "#Port2\n", + "p2=p*s[2]**2 \n", + "print 'Power at port 2:',p2, 'mW'\n", + "\n", + "#Port 3\n", + "p3=p*s[3]**2 \n", + "print 'Power at port 3:' ,p3,'mW'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Power at port 1: 75.0 mW\n", + "Power at port 2: 50.0 mW\n", + "Power at port 3: 25.0 mW\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 216 Example 4.14" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "#Given\n", + "p=40 #mW\n", + "#Since port 3 is matched\n", + "x=sqrt(2) \n", + "s=[1, 1, x, 1, 1, -x, x, -x, 0] \n", + "r1=40 #ohm\n", + "r2=60 #ohm\n", + "w=50 #ohm\n", + "\n", + "#Reflection coefficients\n", + "T1=(w-r1)/(w+r1) \n", + "T2=(r2-w)/(r2+w) \n", + "\n", + "#As power is fed into 1 and 2 equally\n", + "pd=p/2 \n", + "\n", + "#Power delivered\n", + "#Port 1\n", + "p1=pd*(1-T1**2) \n", + "print 'Power at port 1: %0.3f'%p1,'mW'\n", + "\n", + "#Port2\n", + "p2=pd*(1-T2**2) \n", + "print 'Power at port 2: %0.3f'%p2,'mW'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Power at port 1: 19.753 mW\n", + "Power at port 2: 19.835 mW\n" + ] + } + ], + "prompt_number": 48 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 216 Example 4.15" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division \n", + "#Given\n", + "T1=1/2 \n", + "T2=3/5 \n", + "T3=0 \n", + "T4=4/5 \n", + "p=500e-3 #W\n", + "#S matrix for magic Tee\n", + "x=1/sqrt(2) \n", + "s=[0, 0, x, x, 0, 0, x, -x, x ,x, 0, 0, x, -x, 0, 0] \n", + "#Using the input output relation\n", + "#[b]=[s]*[a]\n", + "b=[0.6565, 0.7576, 0.5536, 0.0892] \n", + "\n", + "#(i) Power transmitted through ports\n", + "#Port 1\n", + "p1=(1/2)*b[0]**2*(1-T1**2) \n", + "print 'Power at port 1: %0.3f'%p1,'W'\n", + "\n", + "#Port2\n", + "p2=(1/2)*(b[1]**2)*(1-(T2**2)) \n", + "print 'Power at port 2: %0.3f'%p2, 'W'\n", + "\n", + "#Port 4\n", + "p4=(1/2)*b[3]**2*(1-T4**2) \n", + "print 'Power at port 4: %0.3f'%p4,'W'\n", + "\n", + "#(ii) Power reflected at port 3\n", + "#Port 3\n", + "p3=p*b[2]**2 \n", + "print 'Power at port 3: %0.3f'%p3,'W'\n", + "\n", + "#(iii) Power absorbed\n", + "pabs=p-(p1+p2+p3+p4) \n", + "print 'Power absorbed: %0.3f'%pabs,'W'\n", + "\n", + "#Answer for power absorbed is calculated wrong in book" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Power at port 1: 0.162 W\n", + "Power at port 2: 0.184 W\n", + "Power at port 4: 0.001 W\n", + "Power at port 3: 0.153 W\n", + "Power absorbed: 0.000 W\n" + ] + } + ], + "prompt_number": 53 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 236 Example 4.18" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import mat, set_printoptions\n", + "#Given\n", + "C=10 #dB\n", + "D=30 #dB\n", + "\n", + "#Parameters\n", + "bet=10**(-C/20) \n", + "x=bet/(10**(D/20)) \n", + "a=sqrt(1-(bet*bet)) \n", + "#Scattering matrix\n", + "#Assuming symmetery\n", + "s=mat([[0, a ,x ,(bet*1J)],[ a, 0, (bet*1J), x],[ x ,(bet*1J), 0 ,a],[ (bet*1J) ,x ,a, 0] ])\n", + "set_printoptions(precision=3)\n", + "print 'Scattering matrix:\\n',s " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Scattering matrix:\n", + "[[ 0.000+0.j 0.949+0.j 0.010+0.j 0.000+0.316j]\n", + " [ 0.949+0.j 0.000+0.j 0.000+0.316j 0.010+0.j ]\n", + " [ 0.010+0.j 0.000+0.316j 0.000+0.j 0.949+0.j ]\n", + " [ 0.000+0.316j 0.010+0.j 0.949+0.j 0.000+0.j ]]\n" + ] + } + ], + "prompt_number": 57 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 238 Example 4.20" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "#Given\n", + "vswr=2 \n", + "D1=8 #mW\n", + "D2=2 #mW\n", + "\n", + "#Reflection coefficient at arm 4\n", + "T=(vswr-1)/(vswr+1) \n", + "#Powwe delivered to D1\n", + "P=(D1*100)/(1-T**2) \n", + "P1=0.99*P \n", + "#Power reflected at D1\n", + "W1=(P/100)*T*T \n", + "#Power reflected at load\n", + "W2=D2-W1 \n", + "Tt=sqrt((W2*100)/(P1)) \n", + "pt=(1+Tt)/(1-Tt) \n", + "print 'VSWR:%0.3f'%pt\n", + "Pl=P1*(1-(Tt*Tt)) \n", + "print 'Power delivered:' ,Pl,'mW'\n", + "\n", + "#Answer for P1 should be 792 but it is given as 800" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "VSWR:2.008\n", + "Power delivered: 791.0 mW\n" + ] + } + ], + "prompt_number": 59 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 239 Example 4.21" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import mat, set_printoptions\n", + "#Given\n", + "I=30 #dB\n", + "Il=0.4 #dB\n", + "\n", + "S12=10**(I/-20) \n", + "S21=10**(Il/-20) \n", + "s=mat([[0, S12],[ S21, 0] ])\n", + "set_printoptions(precision=3)\n", + "print 'Scattering matrix:\\n' ,s" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Scattering matrix:\n", + "[[ 0. 0.032]\n", + " [ 0.955 0. ]]\n" + ] + } + ], + "prompt_number": 60 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 240 Example 4.22" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import mat, set_printoptions\n", + "#Given\n", + "I=30 #dB\n", + "Il=2 #dB\n", + "p=1.3 \n", + "\n", + "#Elelments\n", + "T=(p-1)/(p+1) \n", + "S11=T \n", + "S22=T \n", + "S33=T \n", + "S12=10**(-Il/20) \n", + "S13=10**(-I/20) \n", + "S21=S13 \n", + "S32=S13 \n", + "S23=S12 \n", + "S31=S23 \n", + "s=mat([[S11, S21, S31] ,[S12, S22, S32], [S13, S23 ,S33] ])\n", + "set_printoptions(precision=3)\n", + "print 'Scattering matrix:\\n' ,s" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Scattering matrix:\n", + "[[ 0.13 0.032 0.794]\n", + " [ 0.794 0.13 0.032]\n", + " [ 0.032 0.794 0.13 ]]\n" + ] + } + ], + "prompt_number": 61 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 249 Example 4.23" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "#Given\n", + "f=10e9 #Hz\n", + "u=4e-7*pi \n", + "c=3e8 #m/s\n", + "a=2.29 #cm\n", + "a1=a/100 \n", + "b=1.02 #cm\n", + "b1=b/100 \n", + "\n", + "#E/H\n", + "w=2*pi*f \n", + "EbyH=(w*u)/sqrt(((w/c)**2)+((pi/a1)**2)) \n", + "lam=c/f \n", + "lamc=2*a1 \n", + "d=(1/4)*(lam/sqrt(1-((lam/lamc)**2))) \n", + "print 'Position: %0.3f'%(d*100), 'cm'\n", + "\n", + "#Answer for positon is calculated wrong in book" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Position: 0.993 cm\n" + ] + } + ], + "prompt_number": 62 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 250 Example 4.24" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import mat, set_printoptions\n", + "#Given\n", + "#As it is perfectly matched\n", + "S12=1/sqrt(2) \n", + "S21=S12 \n", + "s=mat([[0 ,S12] ,[S21, 0] ])\n", + "set_printoptions(precision=3)\n", + "print 'Scattering matrix:\\n' , s" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Scattering matrix:\n", + "[[ 0. 0.707]\n", + " [ 0.707 0. ]]\n" + ] + } + ], + "prompt_number": 65 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Microwave_Engineering_by_G._S._Raghuvanshi/Ch5.ipynb b/Microwave_Engineering_by_G._S._Raghuvanshi/Ch5.ipynb new file mode 100644 index 00000000..b1441f3d --- /dev/null +++ b/Microwave_Engineering_by_G._S._Raghuvanshi/Ch5.ipynb @@ -0,0 +1,1034 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:a5e82465bfb623eb9318715f7f52014da580babc1cb20ec72de42ac065345041" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Ch-5 : Microwave tubes Klystrons" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Pages Number: 288 Example 5.1" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division \n", + "from math import sqrt, pi\n", + "#Given\n", + "f=10e9 #Hz\n", + "v=9e3 #V\n", + "i=40e-3 #A\n", + "l=3 #cm\n", + "l1=l/100 #m\n", + "G=2e-6 #mho\n", + "bet=0.92 \n", + "j1x=0.582 \n", + "x=1.841 \n", + "ebym=1.7e11 #J\n", + "\n", + "#Maximum voltage\n", + "w=2*pi*f \n", + "v0x=sqrt(2*ebym) \n", + "thet=(w*l1)/(v0x*sqrt(v)) \n", + "\n", + "av=(bet**2*thet*i*j1x)/(x*v*G) \n", + "print 'Maximum voltage:%0.3f'%av,'V'\n", + "\n", + "#Power Gain\n", + "ic=2*i*j1x \n", + "v2=(bet*ic)/G \n", + "pout=bet*ic*v2 \n", + "pin=2*i*v \n", + "\n", + "#Efficiency\n", + "eet=pout/pin \n", + "print 'Power gain: %0.3f'%(eet*100), '%'\n", + "\n", + "#Answer for effciency comes out to be wrong, it is calculted wrongly in book" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum voltage:20.262 V\n", + "Power gain: 127.420 %\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 288 Example 5.2" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "#Given\n", + "l=2 #cm\n", + "l1=l/100 #m\n", + "f=5e9 #Hz\n", + "i=25e-3 #A\n", + "n=21/4 \n", + "e=1.6e-19 \n", + "m=9.1e-31 \n", + "thetag=0 \n", + "bet=1 \n", + "j1x=0.582 \n", + "x=1.841 \n", + "\n", + "#(i) Beam Voltage\n", + "v0=(m*l1*l1*f*f)/(2*e*n*n) \n", + "print 'Beam voltage: %0.3f'%v0, 'V'\n", + "\n", + "#(ii) Input voltage\n", + "v1=x*v0/(pi*bet*n) \n", + "print 'Input voltage: %0.3f'%v1,'V'\n", + "\n", + "#(iii) Output voltage\n", + "v2=0.25*v0 \n", + "print 'Output voltage %0.3f'%v2,'V'\n", + "\n", + "#(iv) Power output\n", + "pmax=i*v0*j1x \n", + "print 'Maximum power output: %0.3f'%pmax, 'W'\n", + "\n", + "#(v) Efficiency\n", + "eet=j1x*bet*v2/v0 \n", + "print 'Efficiency:' ,eet*100,'%'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Beam voltage: 1031.746 V\n", + "Input voltage: 115.164 V\n", + "Output voltage 257.937 V\n", + "Maximum power output: 15.012 W\n", + "Efficiency: 14.55 %\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 289 Example 5.3" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sin\n", + "#Given\n", + "r0=45e3 #W\n", + "j0=25e-3 #A\n", + "V=1500 #V\n", + "f=5e9 #hz\n", + "d=1 #mm\n", + "d1=d/1000 #m\n", + "l=3.5 #cm\n", + "l1=l/100 #m\n", + "rsh=32e3 #ohms\n", + "j1x=0.582 \n", + "x=1.841 \n", + "\n", + "#(i) Input gap voltage\n", + "w=2*pi*f \n", + "v0=(5.93e5*sqrt(V)) \n", + "thetag=(w*d1)/v0 \n", + "bet=sin(thetag/2)/(thetag/2) \n", + "theta0=(w*l1)/v0 \n", + "v1=(2*V*x)/(bet*theta0) \n", + "print 'Input gap voltage: %0.3f'%v1\n", + "\n", + "#(ii) Voltage gain\n", + "av=(bet**2*theta0*j1x*rsh)/(r0*x) \n", + "print 'Voltage gain %0.3f'% av" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Input gap voltage: 124.871\n", + "Voltage gain 9.186\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 290 Example 5.4" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import cos\n", + "#Given\n", + "V=1000 #V\n", + "r0=40e3 #ohm\n", + "i0=25e-3 #A\n", + "f=3e9 #Hz\n", + "d=1 #mm\n", + "d1=d/1000 #m\n", + "l=4 #cm \n", + "l1=4/100 #m\n", + "j1x=0.582 \n", + "x=1.841 \n", + "rsh=30e3 #ohm\n", + "\n", + "#(i) Input gap voltage\n", + "w=2*pi*f \n", + "v0=(5.93e5*sqrt(V)) \n", + "thetag=(w*d1)/v0 \n", + "bet=sin(thetag/2)/(thetag/2) \n", + "theta0=(w*l1)/v0 \n", + "vmax=(2*V*x)/(bet*theta0) \n", + "print 'Input gap voltage: %0.3f'%vmax, 'V'\n", + "\n", + "#(ii) Voltage gain\n", + "av=(bet*bet*theta0*j1x*rsh)/(r0*x) \n", + "print 'Voltage gain: %0.3f'%av\n", + "\n", + "#(iii) Efficiency\n", + "v2=bet*2*i0*j1x*rsh \n", + "eet=(bet*2*i0*j1x*v2)/(2*i0*V) \n", + "print 'Efficiency: %0.3f'%(eet*100),'%'\n", + "\n", + "#(iv) Beam loading conductance\n", + "gbl=(i0/(2*V))*((bet*bet)-(bet*cos(thetag/2))) \n", + "print 'Beam loading conductance:%0.3e'%gbl\n", + "\n", + "#Answer for beam loading conductance is calculated wrong in book" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Input gap voltage: 95.547 V\n", + "Voltage gain: 8.757\n", + "Efficiency: 46.672 %\n", + "Beam loading conductance:9.835e-07\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 291 Example 5.5" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "#Given\n", + "f=3e9 #hz\n", + "v=900 #V\n", + "i=30e-3 #A\n", + "d=4 #cm\n", + "d1=d/100 #m\n", + "gap=1 #mm\n", + "gap1=1/1000 #m\n", + "rsh=40e3 #ohm\n", + "x=1.841 \n", + "j1x=0.582 \n", + "r=40e3 #ohm\n", + "ebym=1.758e11 #J\n", + "\n", + "#(i) Electron velocity\n", + "v0=sqrt(2*ebym*v) \n", + "print 'Electron velocity: %0.3f'%v0,'m/s'\n", + "\n", + "#(ii) Electron transit time\n", + "t=d1/v0 \n", + "print 'Electron transit time: %0.3f'%t,'s'\n", + "\n", + "#(iii) Input voltage gap\n", + "w=2*pi*f \n", + "theta0=(w*d1)/v0 \n", + "thetag=(w*gap1)/v0 \n", + "bet=sin(thetag/2)/(thetag/2) \n", + "v2=(2*v*x)/(bet*theta0) \n", + "print 'Input voltage gap: %0.3f'%v2, 'V'\n", + "\n", + "#(iv) Voltage gain\n", + "av=(bet**2*theta0*j1x*rsh)/(x*r) \n", + "print 'Voltage gain: %0.3f'%av\n", + "\n", + "#Values of v and f are changed in question and answer, hence vaules used in answer are taken.\n", + "#Also second part has not been done in book" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Electron velocity: 17788760.496 m/s\n", + "Electron transit time: 0.000 s\n", + "Input voltage gap: 81.964 V\n", + "Voltage gain: 12.192\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 292 Example 5.6" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt, log10 \n", + "#Given\n", + "f=8e9 #hz\n", + "i=2.5 #A\n", + "v=20e3 #V\n", + "bet=1 \n", + "amp=10*sqrt(2) #V\n", + "rsh=10e3 #ohm\n", + "rsho=30e3 #ohm\n", + "dc=1e-6 #c/m**3\n", + "rf=0.5 \n", + "e=1.6e-19 \n", + "ee=8.854e-12 \n", + "m=9.1e-31 #kg\n", + "\n", + "#(i) Induced current\n", + "w=2*pi*f \n", + "wq=rf*sqrt((e*dc)/(m*ee)) \n", + "\n", + "#Amplitude of induced current\n", + "ic=(i*w*(bet**2)*amp)/(2*v*wq) \n", + "print 'Induced current: %0.3f'%ic,'A'\n", + "\n", + "#Induced voltage\n", + "icrms=ic/sqrt(2) \n", + "v2rms=icrms*rsho \n", + "print 'Induced voltage: %0.3f'%v2rms,'V'\n", + "\n", + "#(ii) Power gain\n", + "pg=(((i*w)**2)*(bet**4)*rsh*rsho)/(4*((v*wq)**2)) \n", + "pgdb=10*log10(pg) \n", + "print 'Power gain: %0.3f'%pgdb,'dB'\n", + "\n", + "#(iii) Electronic efficiency\n", + "eeta=((icrms**2)*rsho)/(i*v) \n", + "print 'Electronic efficiency: %0.3f'%(eeta*100),'%'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Induced current: 0.631 A\n", + "Induced voltage: 13376.164 V\n", + "Power gain: 57.755 dB\n", + "Electronic efficiency: 11.928 %\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 294 Example 5.7" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "#Given\n", + "f=3e9 #hz\n", + "l=4 #cm\n", + "l1=4/100 #m\n", + "d=0.1 #cm\n", + "d1=d/100 #m\n", + "V=900 #V\n", + "i0=30e-3 #A\n", + "rsh=25e3 #ohm\n", + "x=1.841 \n", + "j1x=0.582 \n", + "\n", + "#(i) Input voltage for maximum output\n", + "v0=0.593e6*sqrt(V) \n", + "w=2*pi*f \n", + "theta0=w*l1/v0 #rad\n", + "thetag=w*d1/v0 #rad\n", + "bet=sin(thetag/2)/(thetag/2) \n", + "v1max=2*V*x/(bet*theta0) #v\n", + "print 'Input voltage for maximum output: %0.3f'%v1max,'V'\n", + "\n", + "#(ii) Voltage gain\n", + "r0=V/i0 #ohm\n", + "av=((bet**2)*theta0*j1x*rsh)/(x*r0) #V\n", + "print 'Voltage gain: %0.3f'%av, 'V'\n", + "\n", + "#(iii) Efficiency\n", + "ic=2*i0*j1x #A\n", + "v2=bet*ic*rsh #V\n", + "eet=bet*ic*v2/(2*i0*V) \n", + "print 'Efficiency: %0.3f'%(eet*100), '%'\n", + "\n", + "#(iv) Beam loading conductance\n", + "gb=(i0/(V*2))*(bet**2-(bet*cos(thetag/2))) #ohm\n", + "print 'Beam loading conductance: %0.3e'%gb,'ohm'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Input voltage for maximum output: 81.969 V\n", + "Voltage gain: 10.159 V\n", + "Efficiency: 51.366 %\n", + "Beam loading conductance: 1.446e-06 ohm\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 295 Example 5.8" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "#Given\n", + "f=5e9 #hz\n", + "v0=10e3 #V\n", + "d=1 #mm\n", + "d1=d/1000 #m\n", + "v1=100 #V\n", + "\n", + "#(i) Gap transit time\n", + "vv0=0.593e6*sqrt(v0) #m/sec\n", + "tau=d1/vv0 #sec\n", + "print 'Gap transit time: %0.3e'%tau,'sec'\n", + "\n", + "#Gap transit angle\n", + "w=2*pi*f \n", + "thetag=w*tau #rad\n", + "print 'Gap transit angle: %0.3f'%thetag, 'rad'\n", + "\n", + "#(ii) Beam coupling coefficient\n", + "betin=sin(thetag/2)/(thetag/2) \n", + "print 'Beam coupling coefficient: %0.3f'%betin\n", + "\n", + "#(iii) Velocity of electron leaving buncher gap\n", + "vig=vv0*(1+((betin*v1)/(2*v0))) #m/sec\n", + "print 'Velocity of electron leaving buncher gap: %0.3f'%vig, 'm/sec'\n", + "\n", + "#(iv) Depth of modulation\n", + "m=betin*v1/v0 \n", + "print 'Depth of modulation: %0.3f'%m" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Gap transit time: 1.686e-11 sec\n", + "Gap transit angle: 0.530 rad\n", + "Beam coupling coefficient: 0.988\n", + "Velocity of electron leaving buncher gap: 59593044.746 m/sec\n", + "Depth of modulation: 0.010\n" + ] + } + ], + "prompt_number": 33 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 296 Example 5.9" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "#Given\n", + "f=10e9 #hz\n", + "v0=15e3 #V\n", + "i0=2.5e-3 #A\n", + "d=1 #cm\n", + "d1=d/100 #m\n", + "vrms=10 #V\n", + "bet=1 \n", + "p=1e-8 #C/m**3\n", + "rf=0.6 \n", + "e=1.6e-19 \n", + "m=9.1e-31 \n", + "ee=8.854e-12 \n", + "\n", + "#(i) DC electron beam phase cobstant\n", + "vv0=(0.593e6*sqrt(v0)) \n", + "w=2*pi*f \n", + "bete=w/vv0 #rad/m\n", + "print 'DC electron beam phase constant: %0.3f'%bete,'rad/m'\n", + "\n", + "#(ii) Reduced plasma frequency and reduced plasma phase constant\n", + "wq=rf*sqrt(e*p/(m*ee)) #rad/m\n", + "print 'Reduced plasma frequency: %0.3f'%wq,'rad/m'\n", + "betq=wq/vv0 #rad/sec\n", + "print 'Reduced plasma phase constant: %0.3f'%betq,'rad/sec'\n", + "\n", + "#(iii) Gap transit time\n", + "tau=d1/vv0 #sec\n", + "vtg=vv0*(1+(bet*vrms*sin(w*tau)/(2*v0))) #m/sec\n", + "print 'Gap transit time: %0.3f'%vtg, 'm/sec'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "DC electron beam phase constant: 865.126 rad/m\n", + "Reduced plasma frequency: 8455139.683 rad/m\n", + "Reduced plasma phase constant: 0.116 rad/sec\n", + "Gap transit time: 72644284.673 m/sec\n" + ] + } + ], + "prompt_number": 37 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 296 Example 5.10" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "#Given\n", + "f=4e9 #hz\n", + "v0=10e3 #V\n", + "i0=0.75 #A\n", + "v1=2 #V\n", + "bet=1 \n", + "rsh=10e3 #ohm\n", + "p=5e-5 #C/m**3\n", + "r=0.6 \n", + "rsht=4e3 #ohm\n", + "e=1.6e-19 \n", + "m=9.1e-31 \n", + "ee=8.854e-12 \n", + "\n", + "#(i) Induced current and voltage in output cavity\n", + "w1=sqrt(e*p/(m*ee)) #rad/sec\n", + "w=2*pi*f \n", + "wq=0.5*w1 #rad/sec\n", + "rr=w/wq \n", + "\n", + "i4=((i0**3)*(rr**3)*(bet**6)*v1*(rsh**2))/(8*(v0**3)) #A\n", + "print 'Induced current: %0.3f'%i4,'A'\n", + "v4=i4*rsht #V\n", + "print 'Induced voltage: %0.3f'%(v4/1000), 'kV'\n", + "\n", + "#(ii) Power output\n", + "pout=(i4**4)*rsht #W\n", + "print 'Power output: %0.3f'%pout, 'W'\n", + "\n", + "#Answer for Pout should be 13.43 kW but it is given as 10.89kW as value of I4 is calculated as 1.289 but it comes out to be 1.35" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Induced current: 1.354 A\n", + "Induced voltage: 5.415 kV\n", + "Power output: 13438.135 W\n" + ] + } + ], + "prompt_number": 40 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 297 Example 5.9" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "#Given\n", + "f=8e9 #hz\n", + "v0=500 #V\n", + "l=1.2 #mm\n", + "l1=l/1000 #m\n", + "rsh=18e3 #ohm\n", + "ebym=1.759e11 \n", + "ee=8.854e-12 \n", + "\n", + "#(i) Repeller voltage\n", + "n=1+(3/4) \n", + "v11=(ebym*n*n)/(8*(l1**2)*(f**2)) \n", + "vr=sqrt(v0/v11)-v0 \n", + "print 'Repeller voltage: %0.3f'%vr,'V'\n", + "\n", + "#(ii) Required dc current\n", + "v2=200 #V\n", + "j1x=0.582 \n", + "i=v2/(2*rsh*j1x) #A\n", + "print 'Required dc current: %0.3f'%(i*1000), 'mA'\n", + "\n", + "#Answer for repeller voltage is calculated wrong in book" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Repeller voltage: 327.238 V\n", + "Required dc current: 9.546 mA\n" + ] + } + ], + "prompt_number": 42 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 298 Example 5.12" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "#Given\n", + "f=9e9 #hz\n", + "v0=361 #V\n", + "i0=30e-3 #A\n", + "l=0.1 #cm\n", + "l1=l/100 #m\n", + "x=2.408 \n", + "j1x=0.582 \n", + "ebym=1.759e11 \n", + "\n", + "#Maximum power output\n", + "n=1 \n", + "pout=2*i0*v0*x*j1x/(2*pi*(n+(3/4))) #W\n", + "print 'Maximum power output: %0.3f'%pout,'W'\n", + "\n", + "#Operating repeller voltage\n", + "vr=((6.744e-6*sqrt(v0)*l1*f)/(n+(3/4)))-v0 #v\n", + "print 'Operating repeller voltage: %0.3f'%vr,'V'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum power output: 2.761 W\n", + "Operating repeller voltage: 297.985 V\n" + ] + } + ], + "prompt_number": 44 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 298 Example 5.13" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "#Given\n", + "f=9e9 #hz\n", + "v0=250 #V\n", + "l=0.5 #cm\n", + "l1=l/100 #m\n", + "\n", + "#Bandwidth\n", + "n=3 \n", + "df=(n+(3/4))/(6.774e-6*l1*sqrt(v0)) #hz\n", + "print 'Bandwidth: %0.3f'%(df/10**6),'Mhz'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Bandwidth: 7.002 Mhz\n" + ] + } + ], + "prompt_number": 45 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 299 Example 5.14" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "#Given\n", + "f=10e9 #hz\n", + "v0=600 #V\n", + "vr=250 #V\n", + "ebym=1.759e11 \n", + "\n", + "#Repeller space\n", + "n=1 \n", + "l=sqrt((ebym*(n+(3/4))**2*(vr+v0)**2)/(8*f**2*v0)) #m\n", + "print 'Repeller space: %0.3f'%(l*1000),'mm'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Repeller space: 0.900 mm\n" + ] + } + ], + "prompt_number": 46 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 299 Example 5.15" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "#Given\n", + "v0=300 #V\n", + "i0=20e-3 #A\n", + "v1=40 #V\n", + "n=2 \n", + "x=2.408 \n", + "j1x=0.52 \n", + "\n", + "#(i) Input power\n", + "pin=i0*v0 #W\n", + "print 'Input power:' ,pin,'W'\n", + "\n", + "#(ii) Output power\n", + "pout=(2*v0*i0*x*j1x)/((2*pi*n)-(pi/2)) #W\n", + "print 'Output power: %0.3f'%pout, 'W'\n", + "\n", + "#Efficiency\n", + "eet=pout/pin \n", + "print 'Efficiency: %0.3f'%(eet*100), '%'\n", + "\n", + "#Answer for output power in book is 0.7 which is wrong, it should be 1.3W\n", + "#Hence answer of efficiency also changes" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Input power: 6.0 W\n", + "Output power: 1.367 W\n", + "Efficiency: 22.776 %\n" + ] + } + ], + "prompt_number": 47 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 300 Example 5.16" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "#Given\n", + "f=10e9 #hz\n", + "v0=600 #V\n", + "l=0.1 #cm\n", + "l1=l/100 #m\n", + "bet=0.9 \n", + "ebym=1.759e11 \n", + "n=2 \n", + "j1x=0.575 #from standard table\n", + "\n", + "\n", + "#(i) Repeller voltage\n", + "vr=((6.744e-6*sqrt(v0)*l1*f)/(n-(1/4)))-v0 #V\n", + "print 'Repeller voltage:',round(vr), 'V'\n", + "\n", + "#(ii) Bunching parameter\n", + "v1=200 #V\n", + "x=bet*v1*2*pi*(n-(1/4))/(2*v0) \n", + "print 'Bunching parameter: %0.3f'%x\n", + "\n", + "#(iii) Required DC current\n", + "rsh=20e3 #ohm\n", + "i=v1/(2*rsh*j1x) #A\n", + "print 'Required DC current: %0.3f'%(i*1000),'mA'\n", + "\n", + "#(iv) Electronic efficiency\n", + "eet=2*x*j1x/(2*pi*(n-(1/4))) \n", + "print 'Electronic efficiency:',eet*100, '%'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Repeller voltage: 344.0 V\n", + "Bunching parameter: 1.649\n", + "Required DC current: 8.696 mA\n", + "Electronic efficiency: 17.25 %\n" + ] + } + ], + "prompt_number": 48 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 301 Example 5.17" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "#Given\n", + "f=10e9 #hz\n", + "v0=300 #V\n", + "j0=0.3 #A/cm\n", + "i0=45e-3 #A\n", + "\n", + "rb=sqrt(i0/(pi*j0)) #mm\n", + "print 'Electron beam radius: %0.3f'%(rb*10),'mm'\n", + "r=rb*(120/100) #mm\n", + "print 'Radius of cathode disc:%0.3f'%(r*10),'mm'\n", + "d=sqrt(2.335e-6*(300)**(3/2)/j0) #mm\n", + "print 'Cathode anode spacing: %0.3f'%(d*10),'mm'\n", + "#Anode hole has to be 15% larger than cathode disc\n", + "ra=r*1.15 #mm\n", + "print 'Anode hole: %0.3f'%(ra*10),'mm'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Electron beam radius: 2.185 mm\n", + "Radius of cathode disc:2.622 mm\n", + "Cathode anode spacing: 2.011 mm\n", + "Anode hole: 3.015 mm\n" + ] + } + ], + "prompt_number": 49 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: Example 5.18" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import tan, exp\n", + "#Given\n", + "f=9e9 #hz\n", + "v0=300 #V\n", + "vr=125 #V\n", + "bet=0.9 \n", + "c=3e8 #m/s\n", + "w=2*pi*f \n", + "br=2.18 #mm\n", + "e0=8.854e-12 \n", + "ebym=1.7e11 \n", + "\n", + "#From sin(theta)/theta table, thetag is found out to be\n", + "thetag=0.25*pi \n", + "d=(2*thetag*0.593e6*sqrt(v0))/w \n", + "print 'Distance: %0.3f'%(d*1000),'mm'\n", + "\n", + "#Axial cavity length\n", + "l=c/(10*f) #m\n", + "print 'Axial cavity length: %0.3f'%(l*1000),'mm'\n", + "\n", + "#Ratio of outer to inner conductor\n", + "a=1.5*br \n", + "a1=a/1000 \n", + "x=d/(w*e0*a1*a1*60*tan((w*l)/c)) \n", + "bbya=exp(x) \n", + "print 'Ratio of outer to inner conductor: %0.3f'%bbya\n", + "\n", + "#radii of outer and inner conductor\n", + "print 'Radius of outer conductor:',a, 'mm'\n", + "\n", + "b=1.52*a #mm\n", + "print 'Radius of inner conductor:' ,b,'mm'\n", + "\n", + "#Repeller spacing\n", + "lopt=sqrt(ebym*(19/4)**2*(v0+vr)**2/(8*f**2*v0)) #m\n", + "print 'Repeller spacing: %0.3f'%(lopt*1000),'mm'\n", + "\n", + "#Answer for radii of outer and inner conductor have wrong calculations in book\n", + "#Also ratio of outer to inner conductor is also calculated wrong" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Distance: 0.285 mm\n", + "Axial cavity length: 3.333 mm\n", + "Ratio of outer to inner conductor: 3.396\n", + "Radius of outer conductor: 3.27 mm\n", + "Radius of inner conductor: 4.9704 mm\n", + "Repeller spacing: 1.888 mm\n" + ] + } + ], + "prompt_number": 50 + } + ], + "metadata": {} + } + ] +} diff --git a/Microwave_Engineering_by_G._S._Raghuvanshi/Ch6.ipynb b/Microwave_Engineering_by_G._S._Raghuvanshi/Ch6.ipynb new file mode 100644 index 00000000..19acfdbd --- /dev/null +++ b/Microwave_Engineering_by_G._S._Raghuvanshi/Ch6.ipynb @@ -0,0 +1,600 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:9e826c15d23aa6f60ab9f31679ea83e194639cce3ac1ef9438682b8d5dace862" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Ch-6 : Microwave Travelling Wave Tubes O Type" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 330 Example 6.1" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division \n", + "from math import sqrt, pi\n", + "#Given\n", + " \n", + "#Given\n", + "I0=30e-3 #A\n", + "V0=3e3 #V\n", + "Z0=10 #ohm\n", + "l=0.1624 #m\n", + "f=10e9 #Hz\n", + "\n", + "#(i) Gain parameter\n", + "C=((I0*Z0)/(4*V0))**(1/3) \n", + "print 'Gain parameter: %0.3f'%C\n", + "\n", + "N=(l*f)/(0.593e6*sqrt(V0)) \n", + "\n", + "#(ii) Power Gain\n", + "Ap=-9.54+(47.3*C*N) \n", + "print 'Power gain: %0.3f'%Ap,'dB'\n", + "\n", + "ve=0.593e6*sqrt(V0) \n", + "be=(2*pi*f)/ve \n", + "\n", + "#Four propogation constants\n", + "gam1=((-sqrt(3)*be*C)/2)+(1J*be*(2+C))/2 \n", + "gam2=((sqrt(3)*be*C)/2)+(1J*be*(2+C))/2 \n", + "gam3=1J*be*(1-C) \n", + "gam4=-1J*be*(1-((C*C*C)/4)) \n", + "\n", + "print 'Four propogation constants:\\n {:.3f}\\n{:.3f}\\n{:.3f}\\n{:.3f}\\n'.format(gam1,gam2,gam3,gam4)\n", + "\n", + "#Calculations for propogation constants are wrong in book for gam 3 and 4, hence answers dont match" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Gain parameter: 0.029\n", + "Power gain: 59.613 dB\n", + "Four propogation constants:\n", + " -48.986+1962.764j\n", + "48.986+1962.764j\n", + "0.000+1877.917j\n", + "0.000-1934.469j\n", + "\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 332 Example 6.2" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "#Given\n", + "I0=20e-3 #A\n", + "V0=4e3 #V\n", + "Z0=100 #ohm\n", + "N=30 \n", + "\n", + "C=((I0*Z0)/(4*V0))**(1/3) \n", + "#Gain\n", + "Ap=-9.54+(47.3*C*N) \n", + "print 'Gain:' ,Ap,'dB'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Gain: 61.41 dB\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 332 Example 6.3" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "#Given\n", + "c=3e8 #m/s\n", + "d=2e-3 #m\n", + "p=50e2 #turns per m\n", + "e=1.6e-19 #J\n", + "m=9.1e-31 \n", + "\n", + "# Axial phase velocity\n", + "vp=c/(pi*p*d) \n", + "print 'Axial phase velocity: %0.3f'%vp,'m/s'\n", + "\n", + "#Anode voltage\n", + "V0=(m*vp*vp)/(2*e) \n", + "print 'Anode voltage: %0.3f'%V0, 'V'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Axial phase velocity: 9549296.586 m/s\n", + "Anode voltage: 259.319 V\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 332 Example 6.4" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sin \n", + "#Given\n", + "a=(4.4*pi)/180 #radians\n", + "c=3e8 #m/s\n", + "f=8e9 #Hz\n", + "al=2 #Np/m\n", + "\n", + "#Phase velocity\n", + "vp=c*sin(a) \n", + "\n", + "#Propogation constant\n", + "be=(2*pi*f)/vp \n", + "\n", + "gam=al+(1J*be) \n", + "print 'Propogation constant: {:.3f}'.format(gam)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Propogation constant: 2.000+2183.964j\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 333 Example 6.5" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "#Given\n", + "Vc=11e3 #V\n", + "Ir=0.85 #A\n", + "V0=31e3 #V\n", + "Pout=50e3 #W\n", + "I=7 #A\n", + "\n", + "#Electronic efficiency\n", + "ne=Pout/(V0*I) \n", + "print 'Electronic efficiency: %0.3f'%(ne*100), '%'\n", + "\n", + "#Overall efficiency\n", + "no=Pout/(Vc*(I-Ir)) \n", + "print 'Overall efficiency: %0.3f'%(no*100), '%'\n", + "\n", + "#Answer for elecytronic efficiency should be 23.04% but it is given as 36.4 in book" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Electronic efficiency: 23.041 %\n", + "Overall efficiency: 73.910 %\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 333 Example 6.6" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "#Given\n", + "I0=0.95 #A\n", + "V0=7e3 #V\n", + "Z0=20 #ohm\n", + "N=20 \n", + "\n", + "C=((I0*Z0)/(4*V0))**(1/3) \n", + "#Gain\n", + "Ap=-9.54+(47.3*C*N) \n", + "print 'Gain: %0.3f'%Ap,'dB'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Gain: 73.590 dB\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 334 Example 6.7" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "#Given\n", + "Vc=12e3 #V\n", + "V0=30e3 #V\n", + "Pout=60e3 #W\n", + "I=7.5 #A\n", + "\n", + "#Electronic efficiency\n", + "ne=Pout/(V0*I) \n", + "print 'Electronic efficiency: %0.3f'%(ne*100), '%'\n", + "\n", + "#Overall efficiency\n", + "no=Pout/(Vc*I) \n", + "print 'Overall efficiency: %0.3f'%(no*100),'%'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Electronic efficiency: 26.667 %\n", + "Overall efficiency: 66.667 %\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 334 Example 6.8" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "#Given\n", + "Vc=20e3 #V\n", + "V0=32e3 #V\n", + "Pout=75e3 #W\n", + "I=7 #A\n", + "\n", + "#Electronic efficiency\n", + "ne=Pout/(V0*I) \n", + "print 'Electronic efficiency: %0.3f'%(ne*100),'%'\n", + "\n", + "#Overall efficiency\n", + "no=Pout/(Vc*I) \n", + "print 'Overall efficiency: %0.3f'%(no*100), '%'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Electronic efficiency: 33.482 %\n", + "Overall efficiency: 53.571 %\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 335 Example 6.9" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "#Given\n", + "I0=500e-3 #A\n", + "V0=10e3 #V\n", + "Z0=25 #ohm\n", + "l=.20 #m\n", + "f=5.93e9 #Hz\n", + "\n", + "#Gain parameter\n", + "C=((I0*Z0)/(4*V0))**(1/3) \n", + "print 'Gain parameter: %0.3f'%C\n", + "\n", + "N=(l*f)/(0.593e6*sqrt(V0)) \n", + "#Gain\n", + "Ap=-9.54+(47.3*C*N) \n", + "print 'Gain of TWT: %0.3f'%Ap,'dB'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Gain parameter: 0.068\n", + "Gain of TWT: 54.656 dB\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 335 Example 6.10" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "#Given\n", + "Pout=250 #W\n", + "n=0.15 \n", + "V0=7.5e3 #V\n", + "f=6.15e9 #Hz\n", + "c=3e8 #m/s\n", + "\n", + "#(i) Input Power\n", + "Pi=Pout/n \n", + "print 'Input Power: %0.3f'%Pi,'W'\n", + "\n", + "#(ii) Beam current\n", + "I0=Pi/V0 \n", + "print 'Beam current: %0.3f'%I0,'A'\n", + "\n", + "#(iii) Beam velocity\n", + "vb=0.593e6*sqrt(V0) \n", + "print 'Beam velocity: %0.3f'%vb, 'm/s'\n", + "\n", + "#(iv) Radius of helix\n", + "a=(2*vb)/(2*pi*f) \n", + "print 'Radius of helix: %0.3f'%a,'m'\n", + "\n", + "#(v) Electron beam radius\n", + "r=(3*a)/4 \n", + "print 'Electron beam radius: %0.3f'%r, 'm'\n", + "\n", + "#(vi) Pitch of helix\n", + "p=(2*pi*a*vb)/c \n", + "print 'Pitch of helix: %0.3f'%p,'m'\n", + "\n", + "#(vii) Current density\n", + "J0=I0/(pi*r*r) \n", + "print 'Current density: %0.3f'%(J0/1000),'kA/msqr'\n", + "\n", + "#(viii) Magnetic field for beam confinement\n", + "B=(4*8.3e-4*sqrt(I0/(r*r*sqrt(V0)))) \n", + "print 'Magnetic field for beam confinement:' ,round(B*1000),'mT'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Input Power: 1666.667 W\n", + "Beam current: 0.222 A\n", + "Beam velocity: 51355306.444 m/s\n", + "Radius of helix: 0.003 m\n", + "Electron beam radius: 0.002 m\n", + "Pitch of helix: 0.003 m\n", + "Current density: 17.799 kA/msqr\n", + "Magnetic field for beam confinement: 84.0 mT\n" + ] + } + ], + "prompt_number": 31 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 336 Example 6.11" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "#Given\n", + "I0=30e-3 #A\n", + "V0=3e3 #V\n", + "Z0=10 #ohm\n", + "l=0.1624 #m\n", + "f=10e9 #Hz\n", + "C=((I0*Z0)/(4*V0))**(1/3) \n", + "N=(l*f)/(0.593e6*sqrt(V0)) \n", + "\n", + "#Gain\n", + "Ap=-9.54+(47.3*C*N) \n", + "print 'Gain: %0.3f'%Ap,'dB'\n", + "\n", + "ve=0.593e6*sqrt(V0) \n", + "be=(2*pi*f)/ve \n", + "\n", + "#Four propogation constants\n", + "gam1=((-sqrt(3)*be*C)/2)+(1J*be*(2+C))/2 \n", + "gam2=((sqrt(3)*be*C)/2)+(1J*be*(2+C))/2 \n", + "gam3=1J*be*(1-C) \n", + "gam4=-1J*be*(1-((C*C*C)/4)) \n", + "\n", + "print 'Four propogation constants:\\n {:.3f}\\n{:.3f}\\n{:.3f}\\n{:.3f}\\n'.format(gam1,gam2,gam3,gam4)\n", + "\n", + "#Calculations for propogation constants are wrong for gam 3 and 4 hence answers dont match" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Gain: 59.613 dB\n", + "Four propogation constants:\n", + " -48.986+1962.764j\n", + "48.986+1962.764j\n", + "0.000+1877.917j\n", + "0.000-1934.469j\n", + "\n" + ] + } + ], + "prompt_number": 33 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 337 Example 6.12" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "#Given\n", + "I0=35e-3 #A\n", + "V0=4e3 #V\n", + "Z0=20 #ohm\n", + "f=10e9 #Hz\n", + "\n", + "#(i) Gain parameter\n", + "C=((I0*Z0)/(4*V0))**(1/3) \n", + "print 'Gain parameter:' ,C\n", + "\n", + "ve=0.593e6*sqrt(V0) \n", + "be=(2*pi*f)/ve \n", + "\n", + "#Four propogation constants\n", + "gam1=((-sqrt(3)*be*C)/2)+(1J*be*(2+C))/2 \n", + "gam2=((sqrt(3)*be*C)/2)+(1J*be*(2+C))/2 \n", + "gam3=1J*be*(1-C) \n", + "gam4=-1J*be*(1-((C*C*C)/4)) \n", + "\n", + "print 'Four propogation constants:\\n {:.3f}\\n{:.3f}\\n{:.3f}\\n{:.3f}\\n'.format(gam1,gam2,gam3,gam4)\n", + "\n", + "#Calculations for propogation constants are wrong hence answers dont match" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Gain parameter: 0.0352364936603\n", + "Four propogation constants:\n", + " -51.123+1704.826j\n", + "51.123+1704.826j\n", + "0.000+1616.278j\n", + "0.000-1675.292j\n", + "\n" + ] + } + ], + "prompt_number": 34 + } + ], + "metadata": {} + } + ] +} diff --git a/Microwave_Engineering_by_G._S._Raghuvanshi/Ch7.ipynb b/Microwave_Engineering_by_G._S._Raghuvanshi/Ch7.ipynb new file mode 100644 index 00000000..0a7b3b64 --- /dev/null +++ b/Microwave_Engineering_by_G._S._Raghuvanshi/Ch7.ipynb @@ -0,0 +1,667 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:371baee58886405b4aa7513c033038892ef3ab34ea90022bb1b212fed658f276" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Ch-7 : Cross Field Microwave tube M Type" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 369 Example 7.1" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division \n", + "from math import pi\n", + "#Given\n", + "f=10e9 #Hz\n", + "C=2.5e-12 #F\n", + "Gr=2e-4 #mho\n", + "Ge=0.025e-3 #mho\n", + "Ploss=18.5e3 #W\n", + "V0=5.5e3 #V\n", + "I0=4.5 #A\n", + "\n", + "w=2*pi*f \n", + "\n", + "#(i) Unloaded Q\n", + "Qun=(w*C)/Gr \n", + "print 'Unloaded quality factor: %0.3f'%Qun\n", + "\n", + "#External Q\n", + "Qe=(w*C)/Ge \n", + "print 'External quality factor: %0.3f'%Qe\n", + "\n", + "#(ii) Circuit effciency\n", + "n=1/(1+(Qe/Qun)) \n", + "print 'Circuit effciency: %0.3f'%(n*100), '%'\n", + "\n", + "#Electronic effciency\n", + "ne=1-(Ploss/(V0*I0)) \n", + "print 'Electronic effciency: %0.3f'%(ne*100), '%'\n", + "\n", + "#Answer for Qe is given as 6285.6 but it should be 6283.1 " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Unloaded quality factor: 785.398\n", + "External quality factor: 6283.185\n", + "Circuit effciency: 11.111 %\n", + "Electronic effciency: 25.253 %\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 370 Example 7.2" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt \n", + "#Given\n", + "V0=25e3 #V\n", + "ebym=1.76e11 \n", + "B0=0.0336 #T\n", + "a=5e-2 #m\n", + "b=10e-2 #m\n", + "\n", + "#(i) Cut off voltage\n", + "x=(b/((b*b)-(a*a)))**2 \n", + "V=(ebym*B0*B0)/(8*x) \n", + "print 'Cut off voltage: %0.3f'%(V/1000),'KV'\n", + "\n", + "#(ii) Cut off magnetic field\n", + "y=((8*V0*x)/ebym) \n", + "B=sqrt(y) \n", + "print 'Cut off magnetic field: %0.3f'%(B*1000),'mT'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Cut off voltage: 139.709 KV\n", + "Cut off magnetic field: 14.213 mT\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 371 Example 7.3" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "#Given\n", + "Pout=250e3 #W\n", + "V0=25e3 #V\n", + "I0=25 #A\n", + "ebym=1.76e11 \n", + "B0=0.035 #T\n", + "a=4e-2 #m\n", + "b=8e-2 #m\n", + "\n", + "\n", + "#(i) Efficiency\n", + "n=Pout/(V0*I0) \n", + "print 'Efficiency:' ,n*100,'%'\n", + "\n", + "#(ii) Cyclotron frequency\n", + "f=(ebym*B0)/(2*pi) \n", + "print 'Cyclotron frequency: %0.3f'%(f/10**9),'Ghz'\n", + "\n", + "#(iii) Cut off magnetic field\n", + "x=(b/((b*b)-(a*a)))**2 \n", + "y=((8*V0*x)/ebym) \n", + "B=sqrt(y) \n", + "print 'Cut off magnetic field: %0.3f'%(B*1000),'mT'\n", + "\n", + "#(iv) Cut off voltage\n", + "V=(ebym*B0*B0)/(8*x) \n", + "print 'Cut off voltage:' ,round(V/1000),'KV'\n", + "\n", + "#Answer for Cyclotron frequency is is given as 9.8GHz but it should be 0.98 GHz as value of B0=0.035 not 0.35 as taken in part 2" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Efficiency: 40.0 %\n", + "Cyclotron frequency: 0.980 Ghz\n", + "Cut off magnetic field: 17.767 mT\n", + "Cut off voltage: 97.0 KV\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 372 Example 7.4" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "#Given\n", + "Gr=3e-4 #mho\n", + "Ge=3e-5 #mho\n", + "Ploss=200e3 #W\n", + "V0=22e3 #V\n", + "I0=28 #A\n", + "\n", + "#(i) Circuit effciency\n", + "n=1/(1+(Gr/Ge)) \n", + "print 'Circuit effciency: %0.3f'%(n*100), '%'\n", + "\n", + "#(ii) Electronic effciency\n", + "ne=1-(Ploss/(V0*I0)) \n", + "print 'Electronic effciency: %0.3f'%(ne*100),'%'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Circuit effciency: 9.091 %\n", + "Electronic effciency: 67.532 %\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 372 Example 7.5" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "#Given\n", + "f=9e9 #Hz\n", + "C=2.5e-12 #F\n", + "Gr=2e-4 #mho\n", + "Ge=2.5e-5 #mho\n", + "Ploss=18.5e3 #W\n", + "V0=5.5e3 #V\n", + "I0=4.5 #A\n", + "\n", + "#(i) Angular resonant frequency\n", + "w=2*pi*f \n", + "print 'Angular resonant frequency: %0.3f'%w, 'rad/s'\n", + "\n", + "#(ii) Unloaded Q\n", + "Qun=round((w*C)/Gr) \n", + "print 'Unloaded quality factor:' ,Qun\n", + "\n", + "#(iii) Loaded Q\n", + "Ql=round((w*C)/(Gr+Ge)) \n", + "print 'Loaded quality factor:' ,Ql\n", + "\n", + "#(iv) External Q\n", + "Qe=(w*C)/Ge \n", + "print 'External quality factor: %0.3f'%Qe\n", + "\n", + "#(v) Circuit effciency\n", + "n=1/(1+(Qe/Qun)) \n", + "print 'Circuit effciency: %0.3f'%(n*100),'%'\n", + "\n", + "#(vi) Electronic effciency\n", + "ne=1-(Ploss/(V0*I0)) \n", + "print 'Electronic effciency: %0.3f'%(ne*100), '%'\n", + "\n", + "#Answer for external Q is given as 56.57 but it should be 5654.8" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Angular resonant frequency: 56548667764.616 rad/s\n", + "Unloaded quality factor: 707.0\n", + "Loaded quality factor: 628.0\n", + "External quality factor: 5654.867\n", + "Circuit effciency: 11.113 %\n", + "Electronic effciency: 25.253 %\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 373 Example 7.6" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "#Given\n", + "f=4e9 #Hz\n", + "V0=25e3 #V\n", + "I0=3 #A\n", + "B0=0.3 #T\n", + "D=0.8 \n", + "Z0=50 #ohm\n", + "ebym=1.76e11 \n", + "\n", + "#(i) Electron beam phase constant\n", + "be=(2*pi*f)/sqrt(2*ebym*V0) \n", + "print 'Electron beam phase constant: %0.3f'%be,'rad/s'\n", + "\n", + "#(ii) Gain Parameter\n", + "C=((I0*Z0)/(4*V0))**(1/3) \n", + "print 'Gain Parameter: %0.3f'%C\n", + "\n", + "#(iii) Length for oscillation condition\n", + "N=1.25/D \n", + "l=(2*pi*N)/be \n", + "print 'Length for oscillation condition: %0.3f'%l,'m'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Electron beam phase constant: 267.916 rad/s\n", + "Gain Parameter: 0.114\n", + "Length for oscillation condition: 0.037 m\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 374 Example 7.7" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "#Given\n", + "N=20 \n", + "t=0.2e-6 #s\n", + "DC=0.001 #Duty cycle\n", + "\n", + "#(i) Agile excursion\n", + "A=N/t \n", + "print 'Agile excursion:' ,A/10**6,'MHz'\n", + "\n", + "#(ii) Signal frequency\n", + "f=DC/t \n", + "print 'Signal frequency:',f/1000, 'Khz'\n", + "\n", + "#(iii) Agile rate\n", + "R=f/(2*N) \n", + "print 'Agile Rate:',R, 'Hz'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Agile excursion: 100.0 MHz\n", + "Signal frequency: 5.0 Khz\n", + "Agile Rate: 125.0 Hz\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 375 Example 7.8" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import log10 \n", + "#Given\n", + "V0=1.8e3 #V\n", + "I0=1.3 #A\n", + "Pin=70 #W\n", + "n=0.22 \n", + "\n", + "#(i) Power generated\n", + "Pgen=n*I0*V0 \n", + "print 'Power generated:' ,Pgen,'W'\n", + "\n", + "#(ii) Total RF power generated\n", + "Pt=Pin+Pgen \n", + "print 'Total RF power generated:' ,Pt,'W'\n", + "\n", + "#(iii) Power gain\n", + "G=Pt/Pin \n", + "Gdb=10*log10(G) \n", + "print 'Power Gain: %0.3f'%Gdb,'dB'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Power generated: 514.8 W\n", + "Total RF power generated: 584.8 W\n", + "Power Gain: 9.219 dB\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 375 Example 7.9" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "#Given\n", + "V0=10e3 #V\n", + "I0=2 #A\n", + "b=4e-2 #m\n", + "a=3e-2 #m\n", + "B0=0.01 #Wb/m2\n", + "ebym=1.759e11 \n", + "\n", + "#Cut off voltage\n", + "x=1-((b*b)/(a*a)) \n", + "V=(ebym*(B0**2)*(a**2)*(x**2))/8 \n", + "KV=V/1000 #Kilovolts\n", + "print 'Cut off voltage: %0.3f'%KV, 'KV'\n", + "\n", + "#Magnetic flux density\n", + "y=-sqrt((8*V0)/ebym) \n", + "B=y/(a*x) \n", + "print 'Magnetic flux density: %0.3f'%B, 'T'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Cut off voltage: 1.197 KV\n", + "Magnetic flux density: 0.029 T\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 376 Example 7.10" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "#Given\n", + "V0=10e3 #V\n", + "I0=2 #A\n", + "b=4e-2 #m\n", + "a=3e-2 #m\n", + "B0=0.01 #Wb/m2\n", + "ebym=1.759e11 \n", + "\n", + "#Cut off voltage\n", + "x=1-((b*b)/(a*a)) \n", + "V=(ebym*(B0**2)*(a**2)*(x**2))/8 \n", + "print 'Cut off voltage: %0.3f'%(V/1000), 'KV'\n", + "\n", + "#Magnetic flux density\n", + "y=-sqrt((8*V0)/ebym) \n", + "B=y/(a*x) \n", + "print 'Magnetic flux density: %0.3f'%B, 'T'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Cut off voltage: 1.197 KV\n", + "Magnetic flux density: 0.029 T\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 376 Example 7.11" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "#Given\n", + "e=1.6e-19 #J\n", + "B0=0.01 #Wb/m2\n", + "d=6e-2 #m\n", + "V0=20e3 #V\n", + "ebym=1.759e11 \n", + "\n", + "#(i) Hull cut off voltage\n", + "Voc=(B0*B0*d*d*ebym)/2 \n", + "print 'Hull cut off voltage:' ,Voc/1000,'KV'\n", + "\n", + "#(ii) Hull magnetic field\n", + "Boc=sqrt((2*V0)/ebym)/d \n", + "print 'Hull magnetic field: %0.3f'%(Boc*1000),'mT'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Hull cut off voltage: 31.662 KV\n", + "Hull magnetic field: 7.948 mT\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 377 Example 7.12" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "#Given\n", + "V0=10e3 #V\n", + "V01=5e3 #V\n", + "I0=2 #A\n", + "b=3e-2 #m\n", + "a=2e-2 #m\n", + "B0=0.01 #Wb/m2\n", + "ebym=1.759e11 \n", + "\n", + "#Cut off voltage\n", + "x=1-((b*b)/(a*a)) \n", + "V=(ebym*(B0**2)*(a**2)*(x**2))/8 \n", + "KV=V/1000 #Kilovolts\n", + "print 'Cut off voltage: %0.3f'%KV,'KV'\n", + "\n", + "#Magnetic flux density\n", + "y=-sqrt((8*V01)/ebym) \n", + "B=y/(a*x) \n", + "print 'Magnetic flux density: %0.3f'%B, 'Wb/m2'\n", + "\n", + "#Answer in book is wrong for Magnetic flux density as a*a ,where a=2, is taken as 5, which should be 4" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Cut off voltage: 1.374 KV\n", + "Magnetic flux density: 0.019 Wb/m2\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 377 Example 7.13" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "N=15 \n", + "t=0.3e-6 #s\n", + "DC=0.0011 #Duty cycle\n", + "\n", + "#(i) Agile excursion\n", + "A=N/t \n", + "print 'Agile excursion:',A/10**6, 'MHz'\n", + "\n", + "#(ii) Pulse to pulse frequency seperation\n", + "fp=1/t \n", + "print 'Pulse to pulse frequency seperation: %0.3f'%(fp/10**6),'Mhz'\n", + "\n", + "#(iii) Signal frequency\n", + "f=DC/t \n", + "print 'Signal frequency: %0.3f'%(f/1000), 'Khz'\n", + "\n", + "#(iv) Agile rate\n", + "Tp=N/f \n", + "R=1/(2*Tp) \n", + "print 'Agile Rate: %0.3f'%R,'ps'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Agile excursion: 50.0 MHz\n", + "Pulse to pulse frequency seperation: 3.333 Mhz\n", + "Signal frequency: 3.667 Khz\n", + "Agile Rate: 122.222 ps\n" + ] + } + ], + "prompt_number": 26 + } + ], + "metadata": {} + } + ] +} diff --git a/Microwave_Engineering_by_G._S._Raghuvanshi/Ch8.ipynb b/Microwave_Engineering_by_G._S._Raghuvanshi/Ch8.ipynb new file mode 100644 index 00000000..e05f6096 --- /dev/null +++ b/Microwave_Engineering_by_G._S._Raghuvanshi/Ch8.ipynb @@ -0,0 +1,542 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:1c099612373c83d96585e30f362b0f5d48107f5099d65d556d32340ac8900c86" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Ch-8 : Microwave Solid State Control Device" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 389 Example 8.1" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division \n", + "from math import pi, sqrt, log10\n", + "#Given\n", + "Rf=0.5 #ohm\n", + "Rr=1 #ohm\n", + "Ls=0.3e-9 #H\n", + "Cj=0.1e-12 #F\n", + "f=3.18e9 #Hz\n", + "Z0=50 #ohm\n", + "\n", + "Zf=Rf+(1J*round(2*pi*f*Ls)) \n", + "Zr=Rr+(1J*(round(2*pi*f*Ls)-(1/(2*pi*f*Cj)))) \n", + "\n", + "#Series Configuration\n", + "print 'Series Configuration' \n", + "\n", + "#Insertion Loss\n", + "x=(2*Z0)/((2*Z0)+Zf) \n", + "x1=sqrt(((x.real))**2+((x.imag))**2) \n", + "IN=-20*log10(x1) \n", + "print 'Insertion Loss: %0.3f'%IN,'dB'\n", + "\n", + "#Isolation Loss\n", + "y=(2*Z0)/((2*Z0)+Zr) \n", + "y1=sqrt(((y.real))**2+((y.imag))**2) \n", + "IS=-20*log10(y1) \n", + "print 'Isolation Loss: %0.3f'%IS,'dB'\n", + "\n", + "#Shunt Configuration\n", + "print 'Shunt Configuration' \n", + "\n", + "#Insertion Loss\n", + "a=(2*Zr)/((2*Zr)+Z0) \n", + "a1=sqrt(((a.real))**2+((a.imag))**2) \n", + "INs=-20*log10(a1) \n", + "print 'Insertion Loss: %0.3f'%INs,'dB'\n", + "\n", + "#Isolation Loss\n", + "b=(2*Zf)/((2*Zf)+Z0) \n", + "b1=sqrt(((b.real))**2+((b.imag))**2) \n", + "ISs=-20*log10(b1) \n", + "print 'Isolation Loss: %0.3f'%ISs,'dB'\n", + "\n", + "#Answer for Series configuration insertion loss is 0.058 but is given as 0.58db" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Series Configuration\n", + "Insertion Loss: 0.059 dB\n", + "Isolation Loss: 14.061 dB\n", + "Shunt Configuration\n", + "Insertion Loss: 0.012 dB\n", + "Isolation Loss: 12.772 dB\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 390 Example 8.2" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "#Given\n", + "Rf=1 #ohm\n", + "Rr=4 #ohm\n", + "Ls=0.3e-9 #H\n", + "Cj=0.1e-12 #F\n", + "f=3.18e9 #Hz\n", + "Z0=50 #ohm\n", + "\n", + "Zf=Rf+(1J*round(2*pi*f*Ls)) \n", + "Zr=Rr+(1J*(round(2*pi*f*Ls)-(1/(2*pi*f*Cj)))) \n", + "\n", + "#Series Configuration\n", + "print 'Series Configuration' \n", + "\n", + "#Insertion Loss\n", + "x=(2*Z0)/((2*Z0)+Zf) \n", + "x1=sqrt(((x.real))**2+((x.imag))**2) \n", + "IN=-20*log10(x1) \n", + "print 'Insertion Loss: %0.3f'%IN,'dB'\n", + "\n", + "#Isolation Loss\n", + "y=(2*Z0)/((2*Z0)+Zr) \n", + "y1=sqrt(((y.real))**2+((y.imag))**2) \n", + "IS=-20*log10(y1) \n", + "print 'Isolation Loss: %0.3f'%IS,'dB'\n", + "\n", + "#Shunt Configuration\n", + "print 'Shunt Configuration' \n", + "\n", + "#Insertion Loss\n", + "a=(2*Zr)/((2*Zr)+Z0) \n", + "a1=sqrt(((a.real))**2+((a.imag))**2) \n", + "INs=-20*log10(a1) \n", + "print 'Insertion Loss: %0.3f'%INs,'dB'\n", + "\n", + "#Isolation Loss\n", + "b=(2*Zf)/((2*Zf)+Z0) \n", + "b1=sqrt(((b.real))**2+((b.imag))**2) \n", + "ISs=-20*log10(b1) \n", + "print 'Isolation Loss: %0.3f'%ISs,'dB'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Series Configuration\n", + "Insertion Loss: 0.102 dB\n", + "Isolation Loss: 14.071 dB\n", + "Shunt Configuration\n", + "Insertion Loss: 0.015 dB\n", + "Isolation Loss: 12.843 dB\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 392 Example 8.3" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "#Given\n", + "Vbd=1000 #V\n", + "f=30e9 #Hz\n", + "E=3e5 #V/cm\n", + "Cj=0.3e-12 #F\n", + "er=11.8 \n", + "e0=8.854e-12 \n", + "\n", + "W=Vbd/E \n", + "Wpi=W/100 #mu\n", + "\n", + "#Total series resistance\n", + "R=1/(2*pi*f*Cj) \n", + "print 'Total series resistance: %0.3f'%R, 'ohms'\n", + "\n", + "#Junction Area\n", + "A=(Cj*Wpi)/(e0*er) \n", + "print 'Junction Area: %0.3f'%(A*10000), 'cm2'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total series resistance: 17.684 ohms\n", + "Junction Area: 0.001 cm2\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 428 Example 8.6" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "#Given\n", + "MQ=10 \n", + "M=0.4 \n", + "r=20 \n", + "Td=300 #K\n", + "T=290 #K\n", + "\n", + "x=(MQ*MQ)/r \n", + "#Power Gain\n", + "Ap=(r*x)/((1+sqrt(1+x))**2) \n", + "Apdb=10*log10(Ap) \n", + "print 'Power gain: %0.3f'%Apdb,'dB'\n", + "\n", + "#Noise figure\n", + "z=(Td/T)/sqrt(1+((MQ*MQ)/r)) \n", + "F=1+z \n", + "Fdb=10*log10(F) \n", + "print 'Nosie figure: %0.3f'%F,'dB'\n", + "\n", + "#Bandwidth\n", + "BW=2*M*sqrt(r) \n", + "print 'Bandwidth: %0.3f'%BW" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Power gain: 9.245 dB\n", + "Nosie figure: 1.422 dB\n", + "Bandwidth: 3.578\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 428 Example 8.7" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "#Given\n", + "MQ=10 \n", + "r=10 \n", + "\n", + "x=(MQ*MQ)/r \n", + "\n", + "#Gain\n", + "Ap=(r*x)/((1+sqrt(1+x))**2) \n", + "Apdb=10*log10(Ap) \n", + "print 'Gain: %0.3f'%Apdb,'dB'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Gain: 7.297 dB\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 429 Example 8.8" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "#Given\n", + "Rs=1 #ohm\n", + "ws=5e9 #Hz\n", + "M=0.25 \n", + "C0=2e-12 #F\n", + "\n", + "#(i) Effective Q\n", + "Q=1/(Rs*ws*C0*(1-(M*M))) \n", + "print 'Effective Q: %0.3f'%Q" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Effective Q: 106.667\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 434 Example 8.9" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "#Given\n", + "e=0.0001 \n", + "s=330 \n", + "\n", + "#Charge transfer effciency\n", + "n=1-e \n", + "\n", + "#Final charge pulse\n", + "#x=P/P0\n", + "x=(1-(e*s)) \n", + "print 'Final charge pulse:' ,x" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Final charge pulse: 0.967\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 434 Example 8.10" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "#Given\n", + "Qmax=0.05e-12 #C\n", + "f=10e6 #Hz\n", + "V=10 #V\n", + "n=3 \n", + "\n", + "#Power disspated per bit\n", + "P=n*f*V*Qmax \n", + "print 'Power disspated per bit:',P*10**6, 'muW'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Power disspated per bit: 15.0 muW\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 434 Example 8.11" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "#Given\n", + "e0=8.854e-12 \n", + "er=3.9 \n", + "d=0.15e-6 #m\n", + "e=1.6e-19 #J\n", + "Nmax=2.2e16 #m-2\n", + "A=0.6e-8 #m\n", + "P=0.67e-3 #W\n", + "n=3 \n", + "\n", + "#(i) Junction capacitance\n", + "Ci=(e0*er)/d \n", + "\n", + "#Gate voltage\n", + "V=(Nmax*e)/Ci \n", + "print 'Gate voltage: %0.3f'%V,'V'\n", + "\n", + "#(ii) Charge stored\n", + "Qmax=Nmax*e*A \n", + "\n", + "#Clock frequency\n", + "f=P/(n*V*Qmax) \n", + "print 'Clock frequency: %0.3f'%(f/10**6),'MHz'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Gate voltage: 15.291 V\n", + "Clock frequency: 0.692 MHz\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 435 Example 8.12" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "#Given\n", + "Qmax=0.06e-12 #C\n", + "f=20e6 #Hz\n", + "V=10 #V\n", + "n=3 \n", + "\n", + "#Power disspated per bit\n", + "P=n*f*V*Qmax \n", + "print 'Power disspated per bit:',P*10**6, 'muW'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Power disspated per bit: 36.0 muW\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 435 Example 8.13" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "#Given\n", + "e0=8.854e-12 \n", + "er=4 \n", + "d=0.1e-6 #m\n", + "si=0.85 \n", + "e=1.6e-19 #J\n", + "Na=1e20 \n", + "\n", + "Ci=(e0*er)/d \n", + "print 'Junction capacitance: %0.5f'%Ci, 'F/m'\n", + "\n", + "W=sqrt((2*e0*er*si)/(e*Na)) \n", + "print 'Depletion layer width: %0.3e'%W,'m'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Junction capacitance: 0.00035 F/m\n", + "Depletion layer width: 1.940e-06 m\n" + ] + } + ], + "prompt_number": 12 + } + ], + "metadata": {} + } + ] +} diff --git a/Microwave_Engineering_by_G._S._Raghuvanshi/Ch9.ipynb b/Microwave_Engineering_by_G._S._Raghuvanshi/Ch9.ipynb new file mode 100644 index 00000000..841b5c3a --- /dev/null +++ b/Microwave_Engineering_by_G._S._Raghuvanshi/Ch9.ipynb @@ -0,0 +1,1041 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:9c9d61e8b5bf885fbdf1f7f9c70abb8dab2f7888d9bcb8fa95f4e55f61bf2198" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Ch-9 : Microwave Solid State Generators & Amplifiers" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 448 Example 9.2" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from math import pi\n", + "#Given\n", + "fc=5e9 #Hz\n", + "Em=2e7 #V/m\n", + "vs=4e3 #ms/s\n", + "Xc=1 #ohm\n", + "\n", + "#Maximum allowable power\n", + "Pm=((Em*vs)**2)/(((2*pi*fc)**2)*Xc) \n", + "print 'Maximum allowable power: %0.3f'%Pm, 'W'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum allowable power: 6.485 W\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 451 Example 9.3" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "#Given\n", + "XeGe=4.0 #eV\n", + "XeGaAs=4.1 #eV\n", + "delEgGe=0.78 #eV\n", + "delEgGaAs=1.42 #eV\n", + "\n", + "#Conduction band differential\n", + "delEc=XeGe-XeGaAs \n", + "print 'Conduction band differential:' ,delEc,'eV'\n", + "\n", + "#Valence band differential\n", + "delEv=delEgGaAs-delEgGe-delEc \n", + "print 'Valence band differential:' ,delEv,'eV'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Conduction band differential: -0.1 eV\n", + "Valence band differential: 0.74 eV\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 454 Example 9.4" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "#Given\n", + "S11=0.89 \n", + "S12=0.02 \n", + "S21=3.1 \n", + "S22=0.78 \n", + "\n", + "Del=(S11*S22)-(S12*S21) \n", + "K=(1-(S11)**2-(S22)**2+(Del)**2 )/(2*S12*S21) \n", + "if(K<1):\n", + " print 'Amplifier is potentially unstable' \n", + "else:\n", + " print 'Amplifier is potentially stable' \n", + " \n", + " " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Amplifier is potentially unstable\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 454 Example 9.5" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "#Given\n", + "S11=0.40 \n", + "S12=0.01 \n", + "S21=2.00 \n", + "S22=0.35 \n", + "\n", + "ZL=20 #ohm\n", + "ZS=30 #ohm\n", + "Z0=ZL+ZS #ohm\n", + "\n", + "#Reflection coefficients of source and load\n", + "TL=(ZL-Z0)/(ZL+Z0) \n", + "TLm=-TL \n", + "TS=(ZS-Z0)/(ZS+Z0) \n", + "TSm=-TS \n", + "\n", + "#Reflection coefficients of input and output\n", + "Tin=S11+((S12*S21*TL)/(1-(S22*TL))) \n", + "Tout=S22+((S12*S21*TS)/(1-(S22*TS))) \n", + "\n", + "#Transducer Gain\n", + "x=(1-(TSm)**2)/((1-(S11*TSm))**2) #Value of should be 1.145\n", + "y=(S21*S21) \n", + "z=(1-(TLm)**2)/((1-(Tout*TLm))**2) \n", + "GT=x*y*z \n", + "print 'Transducer Gain: %0.3f'%GT\n", + "\n", + "#Available Power Gain\n", + "z1=1-(Tout)**2 \n", + "GA=(x*y)/z1 \n", + "print 'Available power Gain: %0.3f'%GA\n", + "\n", + "#Power Gain\n", + "z2=1-(Tin)**2 \n", + "GP=(x*y)/z2 \n", + "print 'Power Gain: %0.3f'%GP\n", + "\n", + "#All the end calculations of finding gain are not accurate in the book, hence the answers dont match" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Transducer Gain: 5.207\n", + "Available power Gain: 5.257\n", + "Power Gain: 5.473\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 455 Example 9.6" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt\n", + "#Given\n", + "S11=0.60 \n", + "S12=0.045 \n", + "S21=2.50 \n", + "S22=0.50\n", + "TS=0.5 \n", + "TL=0.4 \n", + "Vrms=10 #V\n", + "Z0=50 #ohm\n", + "\n", + "#(i)Reflection coefficients of input and output\n", + "Tin=S11+((S12*S21*TL)/(1-(S22*TL))) \n", + "Tout=S22+((S12*S21*TS)/(1-(S22*TS))) \n", + "print 'Reflection coefficients of input: %0.3f'%Tin\n", + "print 'Reflection coefficients of output:' ,Tout\n", + "\n", + "#(ii) Gains\n", + "#Transducer Gain\n", + "x=(1-(TS)**2)/((1-(S11*TS))**2) \n", + "y=(S21*S21) \n", + "z=(1-(TL)**2)/((1-(Tout*TL))**2) \n", + "GT=x*y*z \n", + "print 'Transducer Gain: %0.3f'%GT\n", + "\n", + "#Available Power Gain\n", + "z1=1-(Tout)**2 \n", + "GA=(x*y)/z1 \n", + "print 'Available power Gain: %0.3f'%GA\n", + "\n", + "#Power Gain\n", + "z2=1-(Tin)**2 \n", + "GP=(x*y)/z2 \n", + "print 'Power Gain: %0.3f'%GP\n", + "\n", + "#Calculation for Tout and Gains are wrong in the book, hence the answers dont match\n", + "\n", + "#(iii) Power available\n", + "Gt=9.4 \n", + "Pas=(sqrt(2)*Vrms)**2/(8*Z0) \n", + "Pal=Gt*Pas \n", + "print 'Power available at source:' ,Pas,'W'\n", + "print 'Power available at load:',Pal, 'W'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Reflection coefficients of input: 0.656\n", + "Reflection coefficients of output: 0.575\n", + "Transducer Gain: 13.553\n", + "Available power Gain: 14.291\n", + "Power Gain: 16.803\n", + "Power available at source: 0.5 W\n", + "Power available at load: 4.7 W\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 457 Example 9.7" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import log10 \n", + "#Given\n", + "S11=0.90 \n", + "S12=0 \n", + "S21=2.40 \n", + "S22=0.80 \n", + "\n", + "Gmax=(S21*S21)/((1-(S11)**2)*(1-(S22)**2)) \n", + "Gdb=10*log10(Gmax) \n", + "print 'Maximum gain: %0.3f'%Gdb" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum gain: 19.254\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 468 Example 9.8" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "#Given\n", + "e=1.6e-19 \n", + "Nd=1.1e23 #m-3\n", + "a=0.2e-6 #m\n", + "er=11.8 \n", + "e0=8.854e-12 \n", + "mue=800e-4 #m2/Vs\n", + "Z=50e-6 \n", + "L=8.5e-6 #m\n", + "W0=1 #V\n", + "Vd=12 #V\n", + "Vg=1.5 #V\n", + "\n", + "#(i) Pinch off voltage and pinch off current\n", + "Vp=(e*Nd*a*a)/(2*er*e0) \n", + "print 'Pinch off voltage: %0.3f'%Vp,'V'\n", + "\n", + "Ip=(mue*e*e*Nd*Nd*Z*a*a)/(e0*er*L) \n", + "print 'Pinch off current: %0.3f'%Ip,'A'\n", + "#Answer for Ip is 55809 A but it is given as 0.00558 A\n", + "\n", + "#(ii) Drain and maximum drain current\n", + "#Taking Ip=5.58mA as given in book\n", + "Ip1=0.00558 #A\n", + "x=(2/3)*(((Vd+Vg+W0)/Vp)**(3/2)) \n", + "y=(2/3)*(((Vg+W0)/Vp)**(3/2)) \n", + "Id=Ip1*((Vd/Vp)-x+y)\n", + "print 'Drain current: %0.3f'%-Id,'A'\n", + "\n", + "#Saturation Current\n", + "Is=Ip1*((1/3)-((Vg+W0)/Vp)+((2/3)*(((Vg+W0)/Vp)**(3/2))))\n", + "print 'Drain saturation current: %0.3e'%Is, 'A'\n", + "\n", + "#(iii) Cut off frequency\n", + "f=(2*mue*e*Nd*a*a)/(pi*er*e0*L*L) \n", + "print 'Cutt off freqency: %0.3f'%(f/10**9),'GHz'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Pinch off voltage: 3.369 V\n", + "Pinch off current: 55809.081 A\n", + "Drain current: 0.011 A\n", + "Drain saturation current: 9.728e-05 A\n", + "Cutt off freqency: 4.750 GHz\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 469 Example 9.9" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "#Given\n", + "e=1.6e-19 \n", + "Nd=8e23 #m-3\n", + "a=0.12e-6 #m\n", + "er=13.2 \n", + "e0=8.854e-12 \n", + "\n", + "#Pinch off voltage\n", + "Vp=(e*Nd*a*a)/(2*er*e0) \n", + "print 'Pinch off voltage:' ,Vp,'V'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Pinch off voltage: 7.88549602645 V\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 486 Example 9.10" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "#Given\n", + "vd=2e5 #m/s\n", + "L=10e-6 #m\n", + "Ec=3.2e5 #V/m\n", + "\n", + "#Natural frequency\n", + "f=vd/L \n", + "print 'Natural frequency:' ,f/10**9,'GHz'\n", + "\n", + "#Critical voltage\n", + "Vc=Ec*L \n", + "print 'Critical voltage:',Vc, 'V'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Natural frequency: 20.0 GHz\n", + "Critical voltage: 3.2 V\n" + ] + } + ], + "prompt_number": 31 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 487 Example 9.11" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "#Given\n", + "n=0.08 \n", + "A=3e-8 #m2\n", + "n0=1e21 #m-3\n", + "e=1.6e-19 \n", + "vd=1.5e5 #m/s\n", + "M=3.2\n", + "E=350e3 #V\n", + "L=12e-6 #m\n", + "\n", + "#Power output\n", + "Pout=n*A*n0*e*vd*M*L*E \n", + "print 'Power output:' ,Pout*1000,'mW'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Power output: 774.144 mW\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 487 Example 9.12" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "#Given\n", + "G=15.85 \n", + "Rn=75 #ohm\n", + "\n", + "Rl=Rn-(Rn/G) \n", + "C=Rl+(10*1J) \n", + "print 'Cavity impedance: {:.3f}'.format(C), 'ohms'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Cavity impedance: 70.268+10.000j ohms\n" + ] + } + ], + "prompt_number": 32 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 487 Example 9.13" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "#Given\n", + "e=1.6e-19 \n", + "n1=1e16 #m-3\n", + "mu1=8000e-4 #m2/Vs\n", + "nu=1e14 #m-3\n", + "muu=180e-4 #m2/Vs\n", + "\n", + "#/Conductivity\n", + "C=e*((n1*mu1)+(nu*muu)) \n", + "print 'Conductivity: %0.3f'%(C*1000),'m mho'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Conductivity: 1.280 m mho\n" + ] + } + ], + "prompt_number": 33 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 488 Example 9.14" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "#Given\n", + "e0=8.854e-12 \n", + "er=13.1 \n", + "vd=2.5e5 #m/s\n", + "e=1.6e-19 \n", + "mu=0.015 #m2/Vs\n", + "\n", + "#Criteria\n", + "n0L=(e0*er*vd)/(e*mu) \n", + "print 'n0L should be greater than %0.3e'%n0L,'m**-3'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "n0L should be greater than 1.208e+16 m**-3\n" + ] + } + ], + "prompt_number": 34 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 488 Example 9.15" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "#Given\n", + "L=10e-6 #m\n", + "f=10e9 #Hz\n", + "e=1.6e-19 \n", + "n0=2e20 #m3\n", + "E=3200e2 #V/m\n", + "\n", + "#Current density\n", + "vd=L*f \n", + "J=n0*e*vd \n", + "print 'Current density:' ,J,'A/m sqr'\n", + "\n", + "#Negative electron mobility\n", + "mu=-vd/E \n", + "print 'Negative electron mobility:' ,mu*10000,'cm sqr/Vs'\n", + "\n", + "#Answer for Negative electron mobility is 3125 but it is given as 3100" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Current density: 3200000.0 A/m sqr\n", + "Negative electron mobility: -3125.0 cm sqr/Vs\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 497 Example 9.17" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "#Given\n", + "n=0.15 \n", + "Vdc=100 #V\n", + "Idc=200e-3 #A\n", + "vd=2e5 #m/s\n", + "L=6e-6 #m\n", + "\n", + "#(i) Maximum CW output power\n", + "Pdc=Vdc*Idc \n", + "Pout=n*Pdc \n", + "print 'Maximum CW power output:' ,Pout,'W'\n", + "\n", + "#(ii) Resonant frequency\n", + "f=vd/(2*L) \n", + "print 'Resonant frequency: %0.3f'%(f/10**9),'GHz'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum CW power output: 3.0 W\n", + "Resonant frequency: 16.667 GHz\n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 497 Example 9.18" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "#Given\n", + "n=0.1 \n", + "Vdc=100 #V\n", + "Idc=100e-3 #A\n", + "vd=2e5 #m/s\n", + "L=5e-6 #m\n", + "V0=90 #V\n", + "k=3 \n", + "\n", + "#(i) Maximum CW output power\n", + "Pdc=Vdc*Idc \n", + "Pout=n*Pdc \n", + "print 'Maximum CW power output:' ,Pout,'W'\n", + "\n", + "#(ii) Resonant frequency\n", + "f=vd/(2*L) \n", + "print 'Resonant frequency:' ,f,'Hz'\n", + "\n", + "#(iii)Transit time\n", + "T=L/vd \n", + "print 'Transit time:' ,T,'s'\n", + "\n", + "#(iv) Avalanche multiplication factor\n", + "M=1/(1-((Vdc/V0)**k)) \n", + "print 'Avalanche multiplication factor: %0.3f'%-M" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum CW power output: 1.0 W\n", + "Resonant frequency: 20000000000.0 Hz\n", + "Transit time: 2.5e-11 s\n", + "Avalanche multiplication factor: 2.690\n" + ] + } + ], + "prompt_number": 36 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 498 Example 9.19" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "#Given\n", + "n=0.1 \n", + "Vdc=100 #V\n", + "Idc=0.9 #A\n", + "t=0.01e-9 #s\n", + "f=16e9 #Hz\n", + "\n", + "#(i)Power output\n", + "Pdc=Vdc*Idc \n", + "Pout=n*Pdc \n", + "print 'Power output:' ,Pout,'W'\n", + "\n", + "#(ii)Duty cycle\n", + "D=(t/2)+(1/(2*f)) \n", + "print 'Duty cycle:',D, 's'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Power output: 9.0 W\n", + "Duty cycle: 3.625e-11 s\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 498 Example 9.20" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "#Given\n", + "Cj=0.5e-12 #F\n", + "Lp=0.5e-9 #H\n", + "Irf=0.65 #A\n", + "Rl=2 #ohms\n", + "Vbd=80 #V\n", + "Idc=0.08 #A\n", + "\n", + "#Resonant frequency\n", + "f=1/(2*pi*sqrt(Cj*Lp)) \n", + "print 'Resonant frequency: %0.3f'%f,'Hz'\n", + "\n", + "#Efficiency\n", + "Pout=(Irf*Irf*Rl)/2 \n", + "Pin=Vbd*Idc \n", + "n=(Pout*100)/Pin \n", + "print 'Efficiency: %0.3f'%n, '%'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Resonant frequency: 10065842420.897 Hz\n", + "Efficiency: 6.602 %\n" + ] + } + ], + "prompt_number": 38 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 501 Example 9.21" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "#Given\n", + "J=25e7 #A/m \n", + "Na=2.5e21 #m3\n", + "e=1.6e-19 \n", + "\n", + "#Avlance zone velocity\n", + "vz=J/(Na*e) \n", + "print 'Avlanche zone velocity:' ,vz,'m/s'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Avlanche zone velocity: 625000.0 m/s\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 503 Example 9.22" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "#Given\n", + "e=1.6e-19 \n", + "N=4e21 #m\n", + "L=10e-6 #m\n", + "e0=8.854e-12 \n", + "er=11 \n", + "\n", + "#Breakdown voltage\n", + "Vbd=(e*N*L*L)/(e0*er) \n", + "print 'Breakdown voltage:' ,round(Vbd),'V'\n", + "\n", + "#Breakdown electric field\n", + "E=Vbd/L \n", + "print 'Breakdown electric field: %0.3f'%E, 'V/m'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Breakdown voltage: 657.0 V\n", + "Breakdown electric field: 65712466.887 V/m\n" + ] + } + ], + "prompt_number": 39 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 515 Example 9.23" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "#Given\n", + "lam=8000e-10 #m\n", + "a=0.5e-2 #m\n", + "D=4e8 #m\n", + "\n", + "#Angular Spread\n", + "t=(1.22*lam)/a \n", + "print 'Angular spread:',t, 'rad'\n", + "\n", + "#Aerial spread\n", + "A=pi*((D*t)**2) \n", + "print 'Aerial spread:',A, 'm sqr'\n", + "\n", + "\n", + "#Answer for A is given as 193 m sqr but it is 1.915e10 m sqr" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Angular spread: 0.0001952 rad\n", + "Aerial spread: 19152676887.0 m sqr\n" + ] + } + ], + "prompt_number": 41 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 515 Example 9.24" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "#Given\n", + "E=10 #W\n", + "T=1e-9 #s\n", + "c=3e8 #m/s\n", + "lam=650e-9 #m\n", + "\n", + "#Pulse Power\n", + "P=E/T \n", + "print 'Pulse Power:' ,P,'W'\n", + "\n", + "#Q value\n", + "Q=(c*T)/lam \n", + "print 'Q value: %0.3f'%Q " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Pulse Power: 10000000000.0 W\n", + "Q value: 461538.462\n" + ] + } + ], + "prompt_number": 42 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Page Number: 515 Example 9.25" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "#Given\n", + "h=6.626e-34 \n", + "c=3e8 #m/s\n", + "e=1.6e-19 \n", + "Eg=1.85 #eV\n", + "\n", + "#Wavelenght emitted\n", + "lam=(h*c)/(Eg*e) \n", + "lamarm=lam*1e10 \n", + "print 'Wavelenght emitted:' ,round(lamarm),'A'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Wavelenght emitted: 6716.0 A\n" + ] + } + ], + "prompt_number": 43 + } + ], + "metadata": {} + } + ] +} diff --git a/Microwave_Engineering_by_G._S._Raghuvanshi/screenshots/12refCoeff.png b/Microwave_Engineering_by_G._S._Raghuvanshi/screenshots/12refCoeff.png Binary files differnew file mode 100644 index 00000000..db6c9944 --- /dev/null +++ b/Microwave_Engineering_by_G._S._Raghuvanshi/screenshots/12refCoeff.png diff --git a/Microwave_Engineering_by_G._S._Raghuvanshi/screenshots/1RefCoeff.png b/Microwave_Engineering_by_G._S._Raghuvanshi/screenshots/1RefCoeff.png Binary files differnew file mode 100644 index 00000000..307db5eb --- /dev/null +++ b/Microwave_Engineering_by_G._S._Raghuvanshi/screenshots/1RefCoeff.png diff --git a/Microwave_Engineering_by_G._S._Raghuvanshi/screenshots/6axialPhasVel.png b/Microwave_Engineering_by_G._S._Raghuvanshi/screenshots/6axialPhasVel.png Binary files differnew file mode 100644 index 00000000..b35ff8c9 --- /dev/null +++ b/Microwave_Engineering_by_G._S._Raghuvanshi/screenshots/6axialPhasVel.png |