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
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
|
{
"metadata": {
"name": "",
"signature": "sha256:a7e69d66c75dc0139f1d4e508c61265803ca8633ed9b66021344d2bb2ddea0cd"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
"cell_type": "heading",
"level": 1,
"metadata": {},
"source": [
"Chapter 2 - Amplitude Modulation"
]
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 1 - pg 51"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#calcualate the carrier frequency\n",
"#given\n",
"import math\n",
"L = 50*10**-6#in henry\n",
"C = 1*10**-9#in farads\n",
"#calculation\n",
"F_c = 1/(2.*math.pi*math.sqrt(L*C))/1000.;\n",
"#results\n",
"print '%s %d %s' %(\"Carrier frequency F_c =\",math.ceil(F_c),\" kHz\")\n",
"print(\"Now , it is given that the highest modulation frequency is 8KHz \");\n",
"print(\"Therefore, the frequency range occupied by the sidebands will range from 8KHz \\nabove to 8KHz below the carrier frequency, extending fom 712KHz to 720KHz.\");\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Carrier frequency F_c = 712 kHz\n",
"Now , it is given that the highest modulation frequency is 8KHz \n",
"Therefore, the frequency range occupied by the sidebands will range from 8KHz \n",
"above to 8KHz below the carrier frequency, extending fom 712KHz to 720KHz.\n"
]
}
],
"prompt_number": 3
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 2 - pg 51"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#calculate the modulation index, upper and lower sideband frequency, bandwidth of modulation signal\n",
"\n",
"\n",
"#given\n",
"#v_m = 10*sin(2*%pi*10^3*t)\n",
"#by comparing with v_m = V_m*sin(2*%pi*f_c*t) we get\n",
"V_m = 10.#in volts\n",
"f_m = 1*10**3#in hertz\n",
"V_c = 20.#in volts\n",
"f_c = 1*10**4#in hertz\n",
"\n",
"#calculations\n",
"m_a = V_m/V_c;#modulation index formula\n",
"m_a1 = m_a*100;#percentage modulation index\n",
"f_usb = f_c + f_m;#Upper sideband\n",
"f_lsb = f_c - f_m;#lower sideband\n",
"A = (m_a*V_c)/2#amplitude of upper as well as lower sideband\n",
"B = 2*f_m;#bandwidth of the modulation signal\n",
"\n",
"#results\n",
"print '%s %.2f' %(\"i.a.Modulation index= \",m_a);\n",
"print '%s %d %s' %(\" b.Percentage modulation index=\",m_a1,\" percent\");\n",
"print '%s %.f %s' %(\"ii.a.Upper sidebandfrequency=\",f_usb,\"Hz\");\n",
"print '%s %.f %s' %(\" b.Lower sideband frequency=\",f_lsb,\"Hz \"); \n",
"print '%s %.f %s' %(\"iii.Amplitude of Upper sideband and Lower sideband =\",A,\"V\");\n",
"print '%s %.f %s' %(\"\\iv.Bandwidth of the modulation signal=\",B,\"Hz\");\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"i.a.Modulation index= 0.50\n",
" b.Percentage modulation index= 50 percent\n",
"ii.a.Upper sidebandfrequency= 11000 Hz\n",
" b.Lower sideband frequency= 9000 Hz \n",
"iii.Amplitude of Upper sideband and Lower sideband = 5 V\n",
"\\iv.Bandwidth of the modulation signal= 2000 Hz\n"
]
}
],
"prompt_number": 5
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 3 - pg 54"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#calculate the total power in the amplitude modulated wave\n",
"\n",
"\n",
"#given\n",
"m_a = .75;#modulation index\n",
"P_c = 400.;#carrier power in watts\n",
"\n",
"#calculation\n",
"P_t = P_c*(1+(m_a**2/2));#total power \n",
"\n",
"#results\n",
"print \"Total power in the amplitude modulated wave (in W) = \",P_t;\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Total power in the amplitude modulated wave (in W) = 512.5\n"
]
}
],
"prompt_number": 7
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 4 - pg 54"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#calculate the carrier power\n",
"#given\n",
"P_t = 10*10**3;#total power in watts\n",
"m_a = .6;#modulation index\n",
"#calculation\n",
"P_c = (P_t/(1+(m_a**2/2)));# carrier power\n",
"#results\n",
"print \"Carrier power (in kW) = \",round(P_c/1000.,2)\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Carrier power (in kW) = 8.47\n"
]
}
],
"prompt_number": 8
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 5 - pg 55"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#calculate the modulation index and antenna current\n",
"\n",
"import math\n",
"#given\n",
"I_t = 8.93;#total modulated current in ampers\n",
"I_c= 8;#carrier or unmodulated current in ampers\n",
"#calculation\n",
"m_a = math.sqrt(2*((I_t/I_c)**2 -1));#formula for modulation index\n",
"M_a=m_a*100;#percentage modulation\n",
"#for \n",
"m_a1 = .8;#given modulation index\n",
"\n",
"#calculation\n",
"I_t1 = I_c*math.sqrt(1+(m_a1**2/2));#new antenna current \n",
"\n",
"#results\n",
"print \"i.a. Modulation index = \",round(m_a,3)\n",
"print \"b.Percentage modulation index (percent) = \",round(M_a,1)\n",
"print \"ii. Antenna current (in A) = \",round(I_t1,2)\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"i.a. Modulation index = 0.701\n",
"b.Percentage modulation index (percent) = 70.1\n",
"ii. Antenna current (in A) = 9.19\n"
]
}
],
"prompt_number": 10
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 6 - pg 56"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#calculate the carrier signal current, modulation indexes\n",
"import math\n",
"#given\n",
"I_t1 = 10#antenna current in amps\n",
"m1 = .3#modulation index\n",
"I_t2 = 11#increased antenna current\n",
"\n",
"#calculation\n",
"I_c = (I_t1/(1+(m1**2/2))**.5);#formula for carrier signal current\n",
"m_t = math.sqrt(2*((I_t2/I_c)**2 -1));#formula for modulation index\n",
"m2 = math.sqrt(m_t**2 - m1**2);\n",
"m3 = m2*100;#percentage modulation index\n",
"\n",
"#results\n",
"print \"i.Carrier signal current (in A) = \",round(I_c,2)\n",
"print \"ii.Modulation index of signal = \",round(m_t,2)\n",
"print \"iii.a.Modulation index of second signal = \",round(m2,2)\n",
"print \"b.Percentage modulation index of second signal (percent) = \",round(m3,0)\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"i.Carrier signal current (in A) = 9.78\n",
"ii.Modulation index of signal = 0.73\n",
"iii.a.Modulation index of second signal = 0.66\n",
"b.Percentage modulation index of second signal (percent) = 66.0\n"
]
}
],
"prompt_number": 11
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 7 - pg 56"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#calculate the modulating. maximum, minimum voltage\n",
"\n",
"#given v_c = 10*sinwt\n",
"\n",
"m = .5#modulation index\n",
"#by comparing with v_c = V_c*sinwt\n",
"V_c = 10#carrier voltage in volts\n",
"\n",
"#calculation\n",
"V_m = m*V_c;#amplitude of modulating index\n",
"V_max = V_c + V_m;#maximum voltage\n",
"V_min = V_c - V_m;#minimum voltage\n",
"\n",
"#results\n",
"print \" i.Modulating voltage =\",round(V_m,2),\"V\" \n",
"print \" ii. Maximum voltage =\",round(V_max,2),\"V\"\n",
"print \" iii.Minimum voltage =\",round(V_min,2),\"V\" \n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
" i.Modulating voltage = 5.0 V\n",
" ii. Maximum voltage = 15.0 V\n",
" iii.Minimum voltage = 5.0 V\n"
]
}
],
"prompt_number": 1
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 9 - pg 57"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#calculate the percentag4e modulation index\n",
"\n",
"#given\n",
"V_max = 4.#maximum voltage in volts\n",
"V_min = 1.#minimum voltage in volts\n",
"\n",
"#calculation\n",
"m = (V_max - V_min)/(V_max + V_min) ;#formula for modulation index\n",
"m1 = m*100.#percentage modultion index\n",
"\n",
"#result\n",
"print \"Percentage modulation index =\",round(m1,2),\"percent\"\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"EXAMPLE 2.9(PAGENO 57)\n",
"Percentage modulation index = 60.0 percent\n"
]
}
],
"prompt_number": 2
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 10 - pg 57"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#calculate the carrier current and total modulation index\n",
"import math\n",
"#given\n",
"m1 = .4#modulation index\n",
"I_t1 = 11.#initial antenna current in ampers\n",
"I_t2 = 12.#final antenna current in ampers\n",
"\n",
"#calculations\n",
"I_c = (I_t1/(1+(m1**2/2))**.5);# formula for carrier current in ampers\n",
"m_t = math.sqrt(2*((I_t2/I_c)**2 -1));#total modulation index\n",
"m2 = math.sqrt(m_t**2 - m1**2);#modulation index to the second wave\n",
"m3 = m2*100;#percentage modulation index to the second wave\n",
"\n",
"#results\n",
"print \" Carrier current =\",round(I_c,2),\"A\"\n",
"print\"Total modulation index =\",round(m_t,4)\n",
"print \"Percentage modulation index of second wave=\",round(m3,2),\" percent\"\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
" Carrier current = 10.58 A\n",
"Total modulation index = 0.7554\n",
"Percentage modulation index of second wave= 64.08 percent\n"
]
}
],
"prompt_number": 4
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 11 - pg 58"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#calculate the modulation index and new transmitted power\n",
"import math\n",
"from math import sqrt\n",
"#given\n",
"P_c = 10.*10**3#carrier power in watts\n",
"P_t = 12.*10**3#total power in watts\n",
"m_2 = .5#modulation index of second wave\n",
"\n",
"#calculations\n",
"m_1 = sqrt(2*((P_t/P_c)-1));#modulation index of first wave\n",
"m_t = sqrt(m_1**2 +m_2**2);#total modulation index\n",
"P_t1 = P_c*(1+(m_t**2/2))/1000.#total new transmitted power\n",
"\n",
"#results\n",
"print \"Modulation index of first wave =\", round(m_1,4)\n",
"print \"Total modulation index = \",round(m_t,1)\n",
"print \"total new transmitted power =\",round(P_t1,1),\"kW\"\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Modulation index of first wave = 0.6325\n",
"Total modulation index = 0.8\n",
"total new transmitted power = 13.3 kW\n"
]
}
],
"prompt_number": 6
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 12 - pg 60"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#calculate the modulation index and total radiated power\n",
"import math\n",
"from math import sqrt\n",
"#given\n",
"P_t = 10.125*10**3#modulated or total power in watts\n",
"P_c = 9*10**3#unmodulated of carrier power\n",
"m_2 = .4#modulation index of second wave\n",
"\n",
"#calculations\n",
"m_1 = sqrt(2*((P_t/P_c) - 1))#modulation index of first wave\n",
"m_a = m_1*100#percentage modulation index of first wave\n",
"m_t = sqrt(m_1**2 + m_2**2)#total modulation index\n",
"P_t1 = P_c*(1+(m_t**2/2))#total radiated power\n",
"\n",
"#results\n",
"print \"i.a.Modulation index of first wave = \",round(m_1,4)\n",
"print \" b.Percentage modulation index of first wave =\",round(m_a,2),\" percent\"\n",
"print \"ii.Total radiated power =\",round(P_t1,2)/1000.,\"kW\"\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"i.a.Modulation index of first wave = 0.5\n",
" b.Percentage modulation index of first wave = 50.0 percent\n",
"ii.Total radiated power = 10.845 kW\n"
]
}
],
"prompt_number": 8
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 13 - pg 90"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#calculate the percentage power saving for both signals\n",
"#given\n",
"m1 = 1.#modulation index of first signal\n",
"m2 = .5#modulation index of second signal\n",
"#let\n",
"P_c = 1.#carrier power in watts \n",
"\n",
"#calculations\n",
"P_1= P_c*(1+(m1**2/2b))#total power of first signal\n",
"P_2 = P_c*(1+(m2**2/2))#total power of second signal\n",
"P_a = (P_c*100)/(P_1)#percentage power saving for first signal\n",
"P_b = (P_c*100)/(P_2)#percentage power saving for second signal\n",
"\n",
"#results\n",
"print \"i.Percentage power saving for first signal=\",round(P_a,2),\" percent\"\n",
"print \"ii.Percentage power saving for second signal=\",round(P_b,2),\"percent\"\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"i.Percentage power saving for first signal= 66.67 percent\n",
"ii.Percentage power saving for second signal= 88.89 percent\n"
]
}
],
"prompt_number": 10
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 15 - pg 98"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#calculate the percentage power saving for both signals\n",
"#given\n",
"m1 = 1.#modulation index of first signal\n",
"m2 = .5#modulation index of second signal\n",
"#let\n",
"P_c = 1.#carrier power in watts \n",
"\n",
"#calculations\n",
"P_cssb1 = P_c*(1+(m1**2/4))#power in carrier plus power in one sideband for first signal\n",
"P_cssb2 = P_c*(1+(m2**2/4))#power in carrier plus power in one sideband for second signal\n",
"P_1= P_c*(1+(m1**2/2))#total power of first signal\n",
"P_2 = P_c*(1+(m2**2/2))#total power of second signal\n",
"P_a = (P_cssb1*100)/(P_1)#percentage power saving for first signal\n",
"P_b = (P_cssb2*100)/(P_2)#percentage power saving for second signal\n",
"\n",
"#results\n",
"print \"i.Percentage power saving for first signal=\",round(P_a,2),\" percent\"\n",
"print \"ii.Percentage power saving for second signal=\",round(P_b,2),\"percent\"\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"i.Percentage power saving for first signal= 83.33 percent\n",
"ii.Percentage power saving for second signal= 94.44 percent\n"
]
}
],
"prompt_number": 12
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 16 - pg 109"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#calculate the power content of the carrier in upper and lower sidebands\n",
"#given\n",
"P_ssb = 10*10**3#power in ssb transmission in watts\n",
"P_t = P_ssb# total power in watts\n",
"m_a = .8#modulation index\n",
"\n",
"#calculations\n",
"P_c = (P_t/(1+(m_a**2/4)+(m_a**2/4)))#carrier power in watts\n",
"P_SB = P_t - P_c#power in sidebands\n",
"P_usb = P_SB/2.#power in upper sideband\n",
"P_lsb =P_usb#power in upper sideband\n",
"\n",
"#results\n",
"print \"i.Power content of the carrier =\",round(P_c,2),\"W\"\n",
"print \"ii.a.Power content in upper sideband =\",round(P_usb),\"W\"\n",
"print \" b.Power content in lower sideband =\",round(P_lsb),\"W\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"i.Power content of the carrier = 7575.76 W\n",
"ii.a.Power content in upper sideband = 1212.0 W\n",
" b.Power content in lower sideband = 1212.0 W\n"
]
}
],
"prompt_number": 14
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 17 - pg 109"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#calculate the modulation index\n",
"#given from the figure\n",
"P_maxpp = 2*80.#maximum peak to peak power in watts\n",
"P_minpp = 2*20.#minimum peak to peak power in watts\n",
"\n",
"#calcualtions\n",
"m_a = (P_maxpp - P_minpp)/(P_maxpp + P_minpp)#modultaion index\n",
"M = m_a*100#percentage modulation index\n",
"\n",
"#results\n",
"print \"i.Modulation index = \",m_a\n",
"print \"ii.Percentage modulation index =\",round(M,2),\" percent\"\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"i.Modulation index = 0.6\n",
"ii.Percentage modulation index = 60.0 percent\n"
]
}
],
"prompt_number": 16
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 18 - pg 110"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#calculate the modulation index\n",
"#given from the figure\n",
"P_maxpp = 2*50.#maximum peak to peak power in watts\n",
"P_minpp = 2*15.#minimum peak to peak power in watts\n",
"\n",
"#calculations\n",
"m_a = (P_maxpp - P_minpp)/(P_maxpp + P_minpp)#modultaion index\n",
"M = m_a*100#percentage modulation index\n",
"\n",
"#results\n",
"print \"i.Modulation index = \",round(m_a,3)\n",
"print \"ii.Percentage modulation index =\",round(M,1),\"percent\"\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"i.Modulation index = 0.538\n",
"ii.Percentage modulation index = 53.8 percent\n"
]
}
],
"prompt_number": 18
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 21 - pg 111"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#calculate the carrier power,transmission efficiency and carrier amplitude\n",
"#given\n",
"import cmath\n",
"import math\n",
"p_t = 50*10**3#total power\n",
"m_a = .707#modulation index\n",
"z = 50+0*1j;#load\n",
"\n",
"#calculations\n",
"\n",
"#first case\n",
"p_x = .5*(m_a)**2;\n",
"p_c = p_t/(1+p_x)#carrier power\n",
"\n",
"#second case\n",
"n = ((p_c*p_x)/(p_c+(p_c*p_x)))*100;#transmission efficiency\n",
"\n",
"#third case\n",
"a_c = cmath.sqrt(2*z*p_c);#peak carrier amplitude \n",
"#results\n",
"print \"i. Carrier Power = \",round(p_c/1000.,0),\" kW\"\n",
"print \"ii. Percentage Transmission efficiency =\",round(n,2),\"percent\"\n",
"print \"iii. Carrier amplitude =\",round(abs(a_c),0),\" V\"\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"i. Carrier Power = 40.0 kW\n",
"ii. Percentage Transmission efficiency = 20.0 percent\n",
"iii. Carrier amplitude = 2000.0 V\n"
]
}
],
"prompt_number": 20
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 22 - pg 112"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#calculate the efficiency for ma=0.5 and for ma=1\n",
"#given\n",
"ma1=0.5\n",
"ma2=1.\n",
"\n",
"#calculations\n",
"eta1=ma1**2 /(ma1**2 +2) *100.\n",
"eta2= ma2**2 /(ma2**2 +2) *100.\n",
"\n",
"#results\n",
"print \"In case 1, efficiency = \",round(eta1,1),\"percent\"\n",
"print \"In case 2, efficiency = \",round(eta2,1),\"percent\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"In case 1, efficiency = 11.1 percent\n",
"In case 2, efficiency = 33.3 percent\n"
]
}
],
"prompt_number": 23
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 29 - pg 118"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#calculate the modulation depth\n",
"#given\n",
"k = 2*10**-3#constants in amperes/square volts\n",
"k_1 = 0.2*10**-3#constant in amperes/square volts\n",
"print \"we know that V_i(t) = cos(w_c*t) + .5*cos(w_m*t)\"\n",
"print \"given i_0 = 10 + k*V_i + k_1*V_i**2 \"\n",
"print \"therefore i_0 = 10 + 2*10**-3*[cos(w_c*t) + .5*cos(w_m*t)] + 2*10**-3*[cos(w_c*t) + .5*cos(w_m*t)]\"\n",
"print \"i_0 = 2*10**-3*cos(w_c*t) + ((.2*10**-3)/.5)*.5*cos(w_c*t)*cos(w_m*t)\"\n",
"#Now the modulation depth will be\n",
"m = (.2*10**-3)/.5;\n",
"\n",
"#result\n",
"print \"Modulation depth = \",m\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"we know that V_i(t) = cos(w_c*t) + .5*cos(w_m*t)\n",
"given i_0 = 10 + k*V_i + k_1*V_i**2 \n",
"therefore i_0 = 10 + 2*10**-3*[cos(w_c*t) + .5*cos(w_m*t)] + 2*10**-3*[cos(w_c*t) + .5*cos(w_m*t)]\n",
"i_0 = 2*10**-3*cos(w_c*t) + ((.2*10**-3)/.5)*.5*cos(w_c*t)*cos(w_m*t)\n",
"Modulation depth = 0.0004\n"
]
}
],
"prompt_number": 25
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 31 - pg 119"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#calculate the power saving in both cases\n",
"#given\n",
"#percentage modulation for first case\n",
"Pm_1 = 100.\n",
"#percentage modulation for second case\n",
"Pm_2 = 50.\n",
"m_1 = 1.#modulation index for first case\n",
"m_2 = .5#modulation index for second case\n",
"P_c = 1.#let carrier power be one\n",
"\n",
"#calcualations\n",
"\n",
"#first case\n",
"P_t1 = P_c*(1+(m_1**2/2.))#total power\n",
"P_sb1 = P_c*(m_1**2/4.)#power in one side band\n",
"P_s1 = ((P_t1-P_sb1)/P_t1)*100.#power saving\n",
"\n",
"#second case\n",
"P_t2 = P_c*(1+(m_2**2/2))#total power\n",
"P_sb2 = P_c*(m_2**2/4)#power in one side band\n",
"P_s2 = ((P_t2-P_sb2)/P_t2)*100.#power saving\n",
"\n",
"#results\n",
"print \"i. Power saving with percentage modulation 100 =\",round(P_s1,1),\" percent \"\n",
"print \"ii. Power saving with percentage modulation 50 =\",round(P_s2,1),\" percent\"\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"i. Power saving with percentage modulation 100 = 83.3 percent \n",
"ii. Power saving with percentage modulation 50 = 94.4 percent\n"
]
}
],
"prompt_number": 29
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 32 - pg 119"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#calculate the minimum value of fc\n",
"import math\n",
"#given\n",
"#the product signal is given by\n",
"#v(t) = s(t) * cos(2*%pi*t +phi) = x(t) *cos(2*%pi*f_c*t)*cos(2*%pi*f_c*t +phi)\n",
"#v(t) = x(t) *(cos(4*%pi*f_c*t +phi) +cos(phi))/2 = (x(t)/2)*cos(4*%pi*f_c*t +phi)+(x(t)/2)*cos(phi)\n",
"#the low pass filter will reject the first term. The maximum allowable value of phase angle(phi) can be found as under:\n",
"print \"cos(phi_max) = ((x(t)/2)*cos(phi))/max((x(t)/2)*cos(phi))\"\n",
"phi_max = math.acos(.95)*180/math.pi;\n",
"print \"phi_max = \",round(phi_max,2)\n",
"print \"In order to recover x(t) from v(t) using filter method, it is essential that the lowest frequency contained in the first term of v(t) must be greater than the highest frequency contained in the second term,i.e,\"\n",
"print \"2f_c -10KHz > 10KHz\"\n",
"print \"f_c >10KHz\"\n",
"print \"Hence, the minimum value of f_c will be\"\n",
"print \"f_c = 10KHz\"\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"cos(phi_max) = ((x(t)/2)*cos(phi))/max((x(t)/2)*cos(phi))\n",
"phi_max = 18.19\n",
"In order to recover x(t) from v(t) using filter method, it is essential that the lowest frequency contained in the first term of v(t) must be greater than the highest frequency contained in the second term,i.e,\n",
"2f_c -10KHz > 10KHz\n",
"f_c >10KHz\n",
"Hence, the minimum value of f_c will be\n",
"f_c = 10KHz\n"
]
}
],
"prompt_number": 28
}
],
"metadata": {}
}
]
}
|