summaryrefslogtreecommitdiff
path: root/Satellite_Communication/chapter_7.ipynb
blob: 45cec90e0f552ebb4c3dc0f9df6e0359cf0d07ca (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
{
 "metadata": {
  "name": "",
  "signature": "sha256:d8e48debe58189bda0ba7970010a7f3d133d055f445572e1b90b2e8739a1cc2b"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "chapter 7: Satellite Link Design Fundamentals"
     ]
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 7.1, page no-249"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Variable Declaration\n",
      "d=36000 *10**3 #distance of geostationary satellite from earth's surface\n",
      "Gt=100         # Antenna gain of 20dB\n",
      "Pt=10          # Power radiated by earth station\n",
      "\n",
      "#Calculation\n",
      "Prd=Pt*Gt/(4*math.pi*d**2)\n",
      "\n",
      "\n",
      "#Result\n",
      "print(\"Prd = %.4f * 10 ^-12 W/m^2\\nPower received by the receiving antenna is given by  Pr = %.3f pW\"%(Prd*10**12,Prd*10**13))\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Prd = 0.0614 * 10 ^-12 W/m^2\n",
        "Power received by the receiving antenna is given by  Pr = 0.614 pW\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 7.2, page no-262"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "#Variable Declaration\n",
      "c=3*10**8        #speed of light \n",
      "R=10000          #path length\n",
      "f=4.0            # operating frequencyin GHz\n",
      "EIRP=50          #in dB\n",
      "gr=20            #antenna gain in dB\n",
      "rp=-120          # received power in dB\n",
      "\n",
      "\n",
      "#Calculation\n",
      "\n",
      "#(a)\n",
      "lamda=c/(f*10**9)\n",
      "pl=20*math.log10(4*math.pi*R/lamda)\n",
      "\n",
      "#(b)\n",
      "Lp=EIRP+gr-rp\n",
      "\n",
      "\n",
      "#Result\n",
      "print(\"(a)\\n Operating wavelength = %.3f m\\n Path loss(in dB) = %.2f dB\"%(lamda,pl))\n",
      "print(\"\\n\\n (b)\\n Path loss = %.0fdB\"%Lp)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "(a)\n",
        " Operating wavelength = 0.075 m\n",
        " Path loss(in dB) = 124.48 dB\n",
        "\n",
        "\n",
        " (b)\n",
        " Path loss = 190dB\n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 7.3, page no-262"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Variable Declaration\n",
      "p=75                   # rotation of plane of polarization\n",
      "\n",
      "#Polarization rotation is inversaly propotional to square of the operating frequency\n",
      "\n",
      "f= 5.0                 #frequency increased by factor \n",
      "x=f**2                 #rotation angle will decrease by aa factor of 25\n",
      "\n",
      "\n",
      "#Calculation\n",
      "k=math.pi/180.0\n",
      "p_ex=p/x\n",
      "Apr=-20*math.log10(math.cos(p*k))\n",
      "Apr2=-20*math.log10(math.cos((p_ex)*k))\n",
      "\n",
      "\n",
      "#Result\n",
      "print(\"For polarization  mismatch angle = 75\u00b0\\n Attenuation = %.2f dB\"%Apr)\n",
      "print(\"\\n\\n For polarization  mismatch angle = 3\u00b0 \\n Attenuation = %.3f dB\"%Apr2)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "For polarization  mismatch angle = 75\u00b0\n",
        " Attenuation = 11.74 dB\n",
        "\n",
        "\n",
        " For polarization  mismatch angle = 3\u00b0 \n",
        " Attenuation = 0.012 dB\n"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 7.4, page no-270"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Variable Declaration\n",
      "g1=30         #gain of RF stage in dB\n",
      "t1=20         #Noise temperature in K\n",
      "g2=10         #down converter gain in dB\n",
      "t2=360        #noise temperature in K\n",
      "g3=15         #gain of IF stage in dB\n",
      "t3=1000       #noise temperature in K\n",
      "t=290         #reference temperature in K\n",
      "G1=1000.0     #30 dB equivalent gain\n",
      "\n",
      "\n",
      "#Calculation\n",
      "Te=t1+(t2/G1)+t3/(G1*g2)\n",
      "F=1+Te/t\n",
      "\n",
      "\n",
      "#Result\n",
      "print(\"Effective noise temperature, Te = %.2fK\"%Te)\n",
      "print(\"\\n\\nSystem Noise Figure, F = %.2f\"%F)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Effective noise temperature, Te = 20.46K\n",
        "\n",
        "\n",
        "System Noise Figure, F = 1.07\n"
       ]
      }
     ],
     "prompt_number": 7
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 7.5, page no-271"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Variable Declaration\n",
      "g1=30         #gain of RF stage in dB\n",
      "t1=20         #Noise temperature in K\n",
      "g2=10         #down converter gain in dB\n",
      "t2=360.0      #noise temperature in K\n",
      "g3=15         #gain of IF stage in dB\n",
      "t3=1000       #noise temperature in K\n",
      "t=290.0       #reference temperature in K\n",
      "G1=1000.0     #30 dB equivalent gain\n",
      "\n",
      "\n",
      "#Calculation\n",
      "F1=1+t1/t\n",
      "F2=1+t2/t\n",
      "F3=1+t3/t\n",
      "F=F1+((F2-1)/G1)+(F3-1)/(G1*g2)\n",
      "\n",
      "\n",
      "#Result\n",
      "print(\"Noise Figure specificatios of the three stages are as follow,\\n\\n F1 = %.3f\\n F2 = %.2f\\n F3 = %.2f\"%(F1,F2,F3))\n",
      "print(\"\\n\\n The overall noise figure is, F = %.2f\"%F)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Noise Figure specificatios of the three stages are as follow,\n",
        "\n",
        " F1 = 1.069\n",
        " F2 = 2.24\n",
        " F3 = 4.45\n",
        "\n",
        "\n",
        " The overall noise figure is, F = 1.07\n"
       ]
      }
     ],
     "prompt_number": 8
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 7.6, page no-272"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Variable Declaration\n",
      "L=1.778           #Loss factor of the feeder 2.5dB equivalent\n",
      "ts=30             #Noise temperature of sattelite receiver in K\n",
      "t=50              #Noise temperature in K\n",
      "ti=290.0          # reference temperature in K\n",
      "\n",
      "\n",
      "#Calculation\n",
      "x=t/L\n",
      "y=ti*(L-1)/L\n",
      "Te=x+y+ts\n",
      "F1=1+(ts/ti)\n",
      "F2=1+(Te/ti)\n",
      "\n",
      "\n",
      "#Result\n",
      "print(\"contribution of antenna noise temperature when\\n referred to the input of the receiver is %.1f K\"%x)\n",
      "print(\"\\n\\n Contribution of feeder noise when referred to the\\n input of the receiver is %.1f\"%y)\n",
      "print(\"\\n\\n1. Noise figure in first case = %.3f = %.3f dB\"%(F1,10*math.log10(F1)))#answer in book is different 0.426dB\n",
      "print(\"\\n\\n2. Noise figure in second case = %.3f = %.2f dB\"%(F2,10*math.log10(F2)))\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "contribution of antenna noise temperature when\n",
        " referred to the input of the receiver is 28.1 K\n",
        "\n",
        "\n",
        " Contribution of feeder noise when referred to the\n",
        " input of the receiver is 126.9\n",
        "\n",
        "\n",
        "1. Noise figure in first case = 1.103 = 0.428 dB\n",
        "\n",
        "\n",
        "2. Noise figure in second case = 1.638 = 2.14 dB\n"
       ]
      }
     ],
     "prompt_number": 9
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 7.7, page no-272"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Variable Declaration\n",
      "Ta=40          #Antenna Noise temperature\n",
      "Ti=290.0       #Reference temperature in K\n",
      "T=50.0         #Effecitve input noise temperatuire\n",
      "\n",
      "#Calculation\n",
      "Tf=Ti\n",
      "L=(Ta-Tf)/(T-Tf)\n",
      "L=math.ceil(L*10**4)/10**4\n",
      "\n",
      "#Result\n",
      "print(\"Loss factor = %.4f = %.3f dB\"%(L,10*math.log10(L)))\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Loss factor = 1.0417 = 0.177 dB\n"
       ]
      }
     ],
     "prompt_number": 10
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 7.8, page no-273"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "\n",
      "#Variable Declaration\n",
      "Ta=50          #Antenna Noise temperature\n",
      "Tf=300         #Thermodynamic temperature of the feeder\n",
      "Te=50          # Effecitve input noise temperatuire\n",
      "\n",
      "\n",
      "#Calculation for (a)\n",
      "Lf=1.0\n",
      "T=(Ta/Lf)+(Tf*(Lf-1)/Lf)+Te\n",
      "\n",
      "#Result for (a)\n",
      "print(\"(a)\\n System noise temperature = %.0fK\"%T)\n",
      "\n",
      "#Calculation for (b)\n",
      "Lf=1.413\n",
      "T=(Ta/Lf)+(Tf*(Lf-1)/Lf)+Te\n",
      "\n",
      "#Result for (b)\n",
      "print(\"\\n\\n (b)\\n System noise temperature = %.3fK\"%(math.ceil(T*10**3)/10**3))\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "(a)\n",
        " System noise temperature = 100K\n",
        "\n",
        "\n",
        " (b)\n",
        " System noise temperature = 173.072K\n"
       ]
      }
     ],
     "prompt_number": 11
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 7.9, page no-278"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "\n",
      "#Variable Declaration\n",
      "e=35     #EIRP radiated by satellite in dBW\n",
      "g=50     #receiver antenna gain in dB\n",
      "e1=30    #EIRP of interfacing satellite in dBW\n",
      "theeta=4 #line-of-sight between earth station and interfacing sattelite\n",
      "\n",
      "\n",
      "#Calculation\n",
      "x=(e-e1)+(g-32+25*math.log10(theeta))\n",
      "\n",
      "\n",
      "#Result\n",
      "print(\"carrier-to-interface (C/I) = %.2f dB\"%x)\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "carrier-to-interface (C/I) = 38.05 dB\n"
       ]
      }
     ],
     "prompt_number": 14
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 7.10, page no-279"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "\n",
      "#Variable Declaration\n",
      "ea=80      #EIRP value of earth station A in dBW\n",
      "eb=75      #EIRP value of earth station B in dBW\n",
      "g=50       #transmit antenna gain in dB\n",
      "gra=20     #receiver antenna gain for earth station A in dB\n",
      "grb=15     #receiver antenna gain for earth station B in dB\n",
      "theeta=4   #viewing angle of the sattelite from two earth station\n",
      "\n",
      "\n",
      "#Calculation\n",
      "eirp_d=eb-g+32-25*math.log10(theeta)\n",
      "c_by_i=ea-eirp_d+(gra-grb)\n",
      "\n",
      "\n",
      "#Result\n",
      "print(\"carrier-to-interference ratio at the satellite due to\\n inteference caused by Eart station B is, (C/I) = %.0f dB \"%c_by_i)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "carrier-to-interference ratio at the satellite due to\n",
        " inteference caused by Eart station B is, (C/I) = 43 dB \n"
       ]
      }
     ],
     "prompt_number": 15
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 7.11, page no-279"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "\n",
      "#Variable Declaration\n",
      "\n",
      "\n",
      "u=10000.0    # equivalent to 40dB\n",
      "\n",
      "#carrier sinal strength at eart station by downlink \n",
      "d=3162.28 #equivalent to 35dB\n",
      "\n",
      "\n",
      "#Calculation\n",
      "x=1/((1/u)+(1/d))\n",
      "\n",
      "\n",
      "#Result\n",
      "print(\"Total carrier-to-interference ratio is %.2f = %.1f dB\"%(x,10*math.log10(x)))\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Total carrier-to-interference ratio is 2402.53 = 33.8 dB\n"
       ]
      }
     ],
     "prompt_number": 16
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 7.12, Page no.280"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Variable Declaration\n",
      "theeta=5.0        #Angle form by slant ranges of two satellites\n",
      "dA=42100.0*10**3  #Slant range of satellite A\n",
      "dB=42000.0*10**3  #Slant range of satellite B\n",
      "r=42164.0*10**3   #radius of geostationary orbit\n",
      "\n",
      "\n",
      "#Calculation\n",
      "beeta=((dA**2+dB**2-math.cos(theeta*math.pi/180)*2*dA*dB)/(2*r**2))\n",
      "beeta=math.ceil(beeta*10**3)/10**3\n",
      "beeta=(180/math.pi)*math.acos(1-beeta)\n",
      "\n",
      "#Result\n",
      "print(\"Longitudinal separation between two satellites is %.3f\u00b0\"%beeta)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Longitudinal separation between two satellites is 5.126\u00b0\n"
       ]
      }
     ],
     "prompt_number": 17
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 7.13, Page no.281"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "\n",
      "#Variable Declaration\n",
      "Ga=60.0     #Antenna Gain in dB\n",
      "Ta= 60.0    #Noise teperature of Antenna\n",
      "L1=1.12     #Feeder Loss equivalent to dB\n",
      "T1=290.0    #Noise teperature of stage 1\n",
      "G2=10**6    #Gain of stage 2 in dB\n",
      "T2=140.0    #Noise teperature of stage 2\n",
      "T3=10000.0  #Noise teperature of stage 3\n",
      "G=Ga-0.5    #input of low noise amplifier\n",
      "\n",
      "\n",
      "#Calculation\n",
      "Ts=(Ta/L1)+(T1*(L1-1)/L1)+T2+(T3/G2)\n",
      "Ts=math.floor(Ts*100)/100\n",
      "x=G-10*math.log10(Ts)\n",
      "\n",
      "#Result\n",
      "print(\"Tsi = %.2fK\\n\\n G/T(in dB/K)= %.0f dB/K\"%(Ts,x))\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Tsi = 224.65K\n",
        "\n",
        " G/T(in dB/K)= 36 dB/K\n"
       ]
      }
     ],
     "prompt_number": 18
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 7.14, Page no.282"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Variable Declaration\n",
      "Ga=60.0     #Amplifier Gain in dB\n",
      "Ta= 60.0    #Noise teperature of Antenna\n",
      "L1=1.12     #Feeder Loss equivalent to dB\n",
      "T1=290.0    #Noise teperature of stage 1\n",
      "G2=10**6    #Gain of stage 2 in dB\n",
      "T2=140.0    #Noise teperature of stage 2\n",
      "T3=10000.0  #Noise teperature of stage 3\n",
      "G=Ga-0.5    #input of low noise amplifier\n",
      "\n",
      "\n",
      "#Calculation\n",
      "T=Ta+T1*(L1-1)+L1*(T2+(T3/G2))\n",
      "x=G-10*math.log10(T)\n",
      "\n",
      "\n",
      "#Result\n",
      "print(\"T = %.1fK\\n\\n G/T = %.0f dB/k\"%(T,math.ceil(x)))\n",
      "print(\"\\n\\n It is evident from the solutions of the problems 13 and 14\\n that G/T ratio is invarient regardless of the reference point in agreement \\n with a statement made earlier in the text.\")\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": []
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 7.15, Page no.286"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "#Variable Declaration\n",
      "f=6.0*10**9   # uplink frequency\n",
      "eirp=80.0     # Earth station EIRP in dBW\n",
      "r=35780.0     # Earth station satellite distance\n",
      "l=2.0         # attenuation due to atomospheric factors in dB\n",
      "e=0.8         # satellite antenna's aperture efficiency\n",
      "a=0.5         # satellite antenna's aperture area\n",
      "T=190.0       # Satellite receiver's effective noise temperature \n",
      "bw=20.0*10**6 # Satellite receiver's bandwidth\n",
      "cn=25.0       # received carrier-to-noise ratioin dB\n",
      "c=3.0*10**8   # speed of light\n",
      "\n",
      "#Calculation\n",
      "k=1.38*10**-23\n",
      "lamda=c/f\n",
      "G=e*4*math.pi*a/lamda**2\n",
      "G=math.ceil(G*100)/100\n",
      "Gd=10*math.log10(G)\n",
      "p=10*math.log10(k*T*bw)\n",
      "pl=20*math.log10(4*math.pi*r*10**3/lamda)\n",
      "rp=eirp-l-pl+Gd\n",
      "rp=math.floor(rp*100)/100\n",
      "rc=math.floor((rp-p)*100)/100\n",
      "lm=rc-cn\n",
      "\n",
      "#Result\n",
      "print(\"Satellite Antenna gain, G = %.2f = %.2f dB \\n Receivers Noise Power = %.1f dB\\n free-space path loss = %.2f dB \\n received power at satellite = %.2f dB \\n receiver carrier = %.2f is stronger than noise.\\n It is %.2f dB more than the required threshold value.\\n Hence,  link margin = %.2f dB\"%(G,Gd,p,pl,rp,rc,lm,lm))\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Satellite Antenna gain, G = 2010.62 = 33.03 dB \n",
        " Receivers Noise Power = -132.8 dB\n",
        " free-space path loss = 199.08 dB \n",
        " received power at satellite = -88.05 dB \n",
        " receiver carrier = 44.75 is stronger than noise.\n",
        " It is 19.75 dB more than the required threshold value.\n",
        " Hence,  link margin = 19.75 dB\n"
       ]
      }
     ],
     "prompt_number": 1
    }
   ],
   "metadata": {}
  }
 ]
}