{
 "metadata": {
  "name": "raju chapter3"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": "Chapter 3:Advanced Radars"
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": "Example 1, Page no 104"
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": "import math\n# Variable Declaration\nPRF   = 1500;                                 # pulse repetitive frequency in Hz\nlamda = 3*10**-2;                             # wavelength in m;\n\n# Calculations\n# n = 1 gives lowest blind speed\nn=1;\n\nVb = n*(lamda/2)*PRF;                         # blind speed in m/s\n\n#Result\nprint 'Lowest Blind Speed is',Vb,'m/s';\n",
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": "Lowest Blind Speed is 22.5 m/s\n"
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": "Example 2, Page no 105"
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": "import math;\n# Variable Declaration\nPRF= 1000;                          # pulse repetitive frequency in Hz\nFd = 1000;                          # doppler frequency in Hz;\nF  = float(10*10**9);                      # operating frequency of radar in Hz;\nVo = float(3*10**8);                       # velocity in m/s\n\n# Calculations\nlamda = Vo/F;\nVa    = (Fd*lamda)/2;             # speed of automobile in m/s\nVa1   = Va*18/5;                  # speed of automobile in kmph\n\n# Result\nprint 'Speed of automobile is' ,Va,'m/s', 'or',Va1,'kmph';",
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": "Speed of automobile is 15.0 m/s or 54.0 kmph\n"
      }
     ],
     "prompt_number": 15
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": "Example 3, Page no 105"
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": "import math\n# Variable declaration\nPRF= 1000;                            # pulse repetitive frequency in Hz\nF  = 10*10**9;                        # operating frequency of radar in Hz;\nVo = 3*10**8;                         # velocity in m/s\n\n# Calculations\nlamda = Vo/F;\n                                      # Blind Frequency is given by Fn = n*PRF;\nn1 = 1;\nn2 = 2;\nn3 = 3;\nF1 =n1*PRF;                          # blind frequency for n=1 in Hz; \nF2 =n2*PRF;                          # blind frequency for n=2 in Hz; \nF3 =n3*PRF;                          # blind frequency for n=3 in Hz; \n\n# Result\nprint 'Lowest three Blind Frequencies are',F1/1000, 'KHz',F2/1000,'KHz' ,'and',F3/1000,'KHz';\n",
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": "Lowest three Blind Frequencies are 1 KHz 2 KHz and 3 KHz\n"
      }
     ],
     "prompt_number": 18
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": "Example 4, Page no 105"
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": "import math;\n# Variable declaration\nF  = float(10*10**9);                             # operating frequency in Hz\nPRF= float(800);                                  # pulse repetitive frequency in Hz\nVo = 3*10**8;                               # velocity in m/s; \nn1 = 1;\nn2 = 2;\nn3 = 3;\n\n# Calculations\n\nlamda = Vo/F;                               # Wavelength in m\n\n# blind speed Vb = n*(lamda/2)*PRF in m/s\n\nVb1 = n1*(lamda/2)*PRF;                     #first blind speed in m/s;\nVb2 = n2*(lamda/2)*PRF;                     #second blind speed in m/s;\nVb3 = n3*(lamda/2)*PRF;                     #third blind speed in m/s;\n\n#Result\nprint 'First Blind Speed is',Vb1,'m/s'\nprint 'Second Blind Speed is',Vb2,'m/s'\nprint 'Third Blind Speed is',Vb3,'m/s'\nprint 'NOTE: IN TEXT BOOK THIRD BLIND SPEED IS WRONGLY PRINTED AS 48 m/s';\n",
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": "First Blind Speed is 12.0 m/s\nSecond Blind Speed is 24.0 m/s\nThird Blind Speed is 36.0 m/s\nNOTE: IN TEXT BOOK THIRD BLIND SPEED IS WRONGLY PRINTED AS 48 m/s\n"
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": "Example 5,Page No:106"
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": "import math\n\n#variable declaration\nF          = 10*10**9;    #operating frequency in Hz\nVo         = 3*10**8;     #velocity in m/s; \nVb1        = 20;          #lowest(first) blind speed in m/s\nn          = 1 ;          #since first blindspeed\n\n#Calculations\n\nlamda      = Vo/float(F);        #Wavelength in m\n\n# blind speed Vb = n*(lamda/2)*PRF in m/s\n\nPRF       = (2*Vb1)/float((n*lamda));    #pulse repetitive frequency in Hz\n\n#result\n\nprint'Pulse Repetitive Frequency is %3.2f'%(PRF/1000),'KHz';\n",
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": "Pulse Repetitive Frequency is 1.33 KHz\n"
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": "Example 6,Page No:106"
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": "import math\n\n#variable expression\nlamda     = 3*10**-2;        #wavelength in m\nPRF       = 1000;            #pulse repetitive frequency in Hz\nVo        = 3*10**8;         # velocity in m/s\n\n#Calculations\n\nRuamb     = (Vo)/float(2*PRF);     #max unambiguous range in m\n\n#result\n\nprint'Maximum unambiguous range is %g'%(Ruamb/1000),'Kms';\n",
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": "Maximum unambiguous range is 150 Kms\n"
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": "Example 7,Page No:106"
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": "import math\n\n#variable declaration\nn1   = 1 ;                #since first blindspeed\nn3   = 3 ;                #since third blindspeed\n\n#Calculations\n\n\n# blind speed Vb1 = n1*(lamda_1/2)*PRF1 in m/s\n# blind speed Vb3 = n3*(lamda-2/2)*PRF2 in m/s\n#here PRF1 = PRF2 = PRF\n#if Vb1=Vb3 then\n#1*(lamda_1/2)*PRF  =  3*(lamda_2/2)*PRF\n#lamda_1/lamda_2    = 3/1;\n#lamda = C/F;\n#therefore F1/F2 = 1/3 ;\n\n\n#result\nprint'Ratio of Operating Frequencies of two Radars are (F1/F2) = 1/3';\n",
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": "Ratio of Operating Frequencies of two Radars are (F1/F2) = 1/3\n"
      }
     ],
     "prompt_number": 4
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": "Example 8,Page No:107"
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": "import math\n\n#variable declaration\nVb1     = 20;            #first blind speed in m/s\nVb2     = 30;            #second blind speed in m/s\nn1      =1 ;             #since first blindspeed\nn1      =2 ;             #since second blindspeed\nlamda   = 3*10**-2;      #wavelength in m\n\n#Calculations\n\nPRF1 = (2*Vb2)/float(n1*lamda);         #pulse repetitive frequency in Hz of  First Radar;\n\nPRF2 = (2*Vb2)/float(n1*lamda);          #pulse repetitive frequency in Hz of Second Radar;\n\n\n#result\nprint'Ratio of pulse repetitive frequencies of the Radars is PRF1/PRF2 = %g'%(PRF1/PRF2);\n",
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": "Ratio of pulse repetitive frequencies of the Radars is PRF1/PRF2 = 1\n"
      }
     ],
     "prompt_number": 5
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": "Example 9,Page No:107"
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": "import math\n\n#variable declaration\nF       = 6*10**9;        #operating frequency in Hz\nPRF     = 1000;           #pulse repetitive frequency in Hz\nVo      = 3*10**8;        #velocity in m/s; \nn2      = 2;              # n value for second blind speed\nn3      = 3;              # n value for third blind speed\n\n#Calculations\n\nlamda = Vo/float(F);             #Wavelength in m\n\n# blind speed Vb = n*(lamda/2)*PRF in m/s\n\nVb2      = n2*(lamda/float(2))*PRF;        #second blind speed in m/s;\nVb21     = Vb2*18/float(5);               #second blind speed in kmph; \nVb3      = n3*(lamda/float(2))*PRF;        #third blind speed in m/s;\nVb31     = Vb3*18/float(5);           #/third blind speed in kmph;\n\n#result\nprint'Second Blind Speed is %g'%Vb21,'kmph';\nprint'Third Blind Speed is %g'%Vb31,'kmph';",
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": "Second Blind Speed is 180 kmph\nThird Blind Speed is 270 kmph\n"
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": "Example 10,Page No:108"
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": "import math\n\n#variable declaration\nr             = 0.5;            #Antenna Radius in m\nf             = 8*10**9          #operating frequency in Hz\nVo            = 3*10**8;         #vel. of EM wave in m/s\nRCS           = 5;              # Radar cross section in m^2\nD             = 1;              # antenna diameter in m\nF             = 4.77;              # noise figure in dB\nRmax          = 12*10**3         # Radar range\nBW            = 500*10**3;       # bandwidth\n\n#Calculation\nF1            = 10**(F/float(10));       # antilog calculation\nlamda         = Vo/float(f);                     # wavelength\n\n#Rmax        = 48*((Pt*D^4*RCS)/(BW*lamda*lamda(F-1)))^0.25\n\nPt            = ((Rmax/48)**(4))*((BW*lamda*lamda*(F1-1))/float((D**(4)*RCS)))\n\n#result\n\nprint'Peak Transmitted Power is %e'%Pt;\nprint'Note: Calculation error in textbook at Pt 10^12 missing';",
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": "Peak Transmitted Power is 1.098173e+12\nNote: Calculation error in textbook at Pt 10^12 missing\n"
      }
     ],
     "prompt_number": 4
    }
   ],
   "metadata": {}
  }
 ]
}