{ "metadata": { "name": "chapter 9.ipynb" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "heading", "level": 1, "metadata": {}, "source": [ "Chapter 9: Broadband Dipoles and Matching Techniques" ] }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 9.1, Page no. 526" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#Given\n", "N=2\n", "RL=100\n", "Z0=50\n", "\n", "#Function to calculate factorial\n", "def fact(n):\n", " if n==0:\n", " return 1\n", " return n*fact(n-1)\n", "\n", "#Function to calculate the value of rho\n", "def rho(n,N,RL,Z0):\n", " temp=(2**(-N))*(float((RL-Z0))/(RL+Z0))*(fact(N)/(fact(N-n)*fact(n)))\n", " return temp\n", "\n", "\n", "def char_imp(rho,Z0):\n", " temp=Z0*(1+rho)/(1-rho)\n", " return temp\n", "\n", "\n", "rho_0=rho(0,N,RL,Z0)\n", "rho_1=rho(1,N,RL,Z0)\n", "\n", "Z1=char_imp(rho_0,Z0)\n", "Z2=char_imp(rho_1,Z0)\n", "\n", "frac_bw=0.375\n", "rho_m=(float(RL-Z0)/(RL+Z0))*(cos((-pi/4)*(frac_bw-2)))**2\n", "\n", "print \"Maximum tolerable co-efficient:\",rho_m\n", "\n", "VSWR=(1+rho_m)/(1-rho_m)\n", "\n", "print \"VSWR:\",VSWR" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Maximum tolerable co-efficient: 0.0280883979496\n", "VSWR: 1.05780031412\n" ] } ], "prompt_number": 6 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 9.2, Page no. 536" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#given\n", "f=15*10**6\n", "v=3*10**8\n", "lamda=v/float(f)\n", "\n", "a=0.95*10**-3*lamda\n", "a1=3.175*10**-4*lamda\n", "s=3.81*10**-3*lamda\n", "u=ceil((a/2)/(a1/2))\n", "v=ceil(s/(a1/2))\n", "print \"u: %f, v: %f\" %(u,v)\n", "\n", "alpha=log(v)/(log(v)-log(u))\n", "print \"Alpha: %f\" %alpha\n", "\n", "step_up=(1+alpha)**2\n", "print \"Step-up ratio: %f\" %step_up\n", "\n", "Za=30.44*(1-1j)\n", "Z2=step_up*Za/2\n", "print \"Z2:\",Z2,\"ohms\"\n", "\n", "Z0=276*log10((2*s)/sqrt(a*a1))\n", "print \"Z0:\",Z0,\"ohms\"\n", "\n", "z2=Z2/Z0\n", "print \"z2:\",z2,\"ohms\"\n", "\n", "y2=1/z2\n", "print \"y2:\",y2,\"ohms\"\n", "\n", "#zg is calculated using smith's chart\n", "zg=0+0.23j\n", "\n", "yg=1/zg\n", "print \"Generator admittance:\",yg,\"siemens\"\n", "\n", "yin=y2+yg\n", "print \"Input admittance:\",yin,\"siemens\"\n", "\n", "zin=1/yin\n", "print \"Input impedance:\",zin,\"ohms\"\n", "\n", "Zin=Z0*zin\n", "print \"Unnormalized impedance:\",Zin,\"ohms\"\n", "\n", "C=1/(2*pi*f*Zin.imag)\n", "print \"Capacitance: %f pF\" %(C*10**12)" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "u: 3.000000, v: 24.000000\n", "Alpha: 1.528321\n", "Step-up ratio: 6.392406\n", "Z2: (97.2924229345-97.2924229345j) ohms\n", "Z0: 315.253079871 ohms\n", "z2: (0.308616883217-0.308616883217j) ohms\n", "y2: (1.62013171408+1.62013171408j) ohms\n", "Generator admittance: -4.34782608696j siemens\n", "Input admittance: (1.62013171408-2.72769437288j) siemens\n", "Input impedance: (0.160964593914+0.27100402593j) ohms\n", "Unnormalized impedance: (50.7445839816+85.4348538319j) ohms\n", "Capacitance: 124.192049 pF\n" ] } ], "prompt_number": 16 } ], "metadata": {} } ] }