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
949
950
951
952
953
954
955
956
957
958
959
|
{
"metadata": {
"name": ""
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<h1>Chapter 42: Filter networks</h1>"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<h3>Example 1, page no. 799</h3>"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#Determine the cut-off frequency and the nominal impedance of each of the low-pass filter sections\n",
"from __future__ import division\n",
"import math\n",
"#initializing the variables:\n",
"L1 = 2*100E-3;# in Henry\n",
"C1 = 0.2E-6;# in Fareads\n",
"L2 = 0.4;# in Henry\n",
"C2 = 2*200E-12;# in Fareads\n",
"\n",
"#calculation:\n",
" #cut-off frequency\n",
"fc1 = 1/(math.pi*(L1*C1)**0.5)\n",
" #nominal impedance\n",
"R01 = (L1/C1)**0.5\n",
" #cut-off frequency\n",
"fc2 = 1/(math.pi*(L2*C2)**0.5)\n",
" #nominal impedance\n",
"R02 = (L2/C2)**0.5\n",
"\n",
"\n",
"#Results\n",
"print \"\\n\\n Result \\n\\n\"\n",
"print \"\\n cut-off frequency \",round(fc1,2),\" Hz and the nominal impedance is \",round( R01,2),\" ohm \"\n",
"print \"\\n cut-off frequency \",round(fc2,2),\" Hz and the nominal impedance is \",round( R02,2),\" ohm \""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"\n",
"\n",
" Result \n",
"\n",
"\n",
"\n",
" cut-off frequency 1591.55 Hz and the nominal impedance is 1000.0 ohm \n",
"\n",
" cut-off frequency 25164.61 Hz and the nominal impedance is 31622.78 ohm "
]
}
],
"prompt_number": 1
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<h3>Example 2, page no. 801</h3>"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#Design (a) a low-pass T section filter, and (b) a low-pass \u0003 section filter to meet these requirements.\n",
"from __future__ import division\n",
"import math\n",
"import cmath\n",
"#initializing the variables:\n",
"R0 = 600;# in ohm\n",
"fc = 5E6;# in Hz\n",
"\n",
" #calculation:\n",
" #capacitance\n",
"C = 1/(math.pi*R0*fc)\n",
" #inductance\n",
"L = R0/(math.pi*fc)\n",
"\n",
"\n",
"#Results\n",
"print \"\\n\\n Result \\n\\n\"\n",
"print \"A low-pass T section filter capcitance is \",round(C*1E12,2),\"pfarad and inductance is\",round( L/2*1E6,2),\"uHenry\"\n",
"print \"A low-pass pi section filter capcitance is \",round(C/2*1E12,2),\"pfarad and inductance is\",round( L*1E6,2),\"uHenry\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"\n",
"\n",
" Result \n",
"\n",
"\n",
"A low-pass T section filter capcitance is 106.1 pfarad and inductance is 19.1 uHenry\n",
"A low-pass pi section filter capcitance is 53.05 pfarad and inductance is 38.2 uHenry\n"
]
}
],
"prompt_number": 1
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<h3>Example 3, page no. 805</h3>"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#Determine (a) the value of the characteristic impedance of the section at a frequency of 90 kHz, and \n",
"#(b) the value of the characteristic impedance of the equivalent low-pass T section filter.\n",
"from __future__ import division\n",
"import math\n",
"import cmath\n",
"#initializing the variables:\n",
"R0 = 500;# in ohm\n",
"fc = 100000;# in Hz\n",
"f = 90000;# in Hz\n",
"\n",
"#calculation:\n",
" #characteristic impedance of the pi section\n",
"Zpi = R0/(1 - (f/fc)**2)**0.5\n",
" #characteristic impedance of the T section\n",
"Zt = R0*(1 - (f/fc)**2)**0.5\n",
"\n",
"\n",
"#Results\n",
"print \"\\n\\n Result \\n\\n\"\n",
"print \"\\ncharacteristic impedance of the pi section is \",round(Zpi,2),\" ohm\"\n",
"print \"\\ncharacteristic impedance of the T section is \",round(Zt,2),\" ohm\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"\n",
"\n",
" Result \n",
"\n",
"\n",
"\n",
"characteristic impedance of the pi section is 1147.08 ohm\n",
"\n",
"characteristic impedance of the T section is 217.94 ohm"
]
}
],
"prompt_number": 3
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<h3>Example 4, page no. 806</h3>"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#Determine the frequency at which the characteristic impedance of the section is (a) 600ohm (b) 1 kohm(c) 10 kohm\n",
"from __future__ import division\n",
"import math\n",
"import cmath\n",
"#initializing the variables:\n",
"R0 = 600;# in ohm\n",
"fc = 2E6;# in Hz\n",
"Z1 = 600;# in ohm\n",
"Z2 = 1000;# in ohm\n",
"Z3 = 10000;# in ohm\n",
"\n",
"#calculation:\n",
" #frequency\n",
"f1 = fc*(1 - (R0/Z1)**2)**0.5\n",
"f2 = fc*(1 - (R0/Z2)**2)**0.5\n",
"f3 = fc*(1 - (R0/Z3)**2)**0.5\n",
"\n",
"\n",
"#Results\n",
"print \"\\n\\n Result \\n\\n\"\n",
"print \"frequency at which the characteristic impedance of the section is 600 ohm is \",f1,\" Hz \"\n",
"print \"and 1000 Ohm is \",f2*1E-3,\"kHz and 10000 ohm is \",round(f3*1E-3,2),\"kHz \""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"\n",
"\n",
" Result \n",
"\n",
"\n",
"frequency at which the characteristic impedance of the section is 600 ohm is 0.0 Hz \n",
"and 1000 Ohm is 1600.0 kHz and 10000 ohm is 1996.4 kHz "
]
}
],
"prompt_number": 4
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<h3>Example 5, page no. 809</h3>"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#Determine for each of the high-pass filter sections (i) the cut-off frequency, and (ii) the nominal impedance\n",
"from __future__ import division\n",
"import math\n",
"#initializing the variables:\n",
"L1 = 100*1E-3;# in Henry\n",
"C1 = 0.2*1E-6;# in Fareads\n",
"L2 = 200*1E-6;# in Henry\n",
"C2 = 4000*1E-12;# in Fareads\n",
"\n",
"#calculation:\n",
" #cut-off frequency\n",
"fc1 = 1/(4*math.pi*(L1*C1/2)**0.5)\n",
" #nominal impedance\n",
"R01 = (L1*2/C1)**0.5\n",
" #cut-off frequency\n",
"fc2 = 1/(4*math.pi*(L2*C2/2)**0.5)\n",
" #nominal impedance\n",
"R02 = (L2/(C2*2))**0.5\n",
"\n",
"\n",
"#Results\n",
"print \"\\n\\n Result \\n\\n\"\n",
"print \"\\n cut-off frequency \",round(fc1,0),\" Hz and the nominal impedance is \",round( R01,0),\" ohm\"\n",
"print \"\\n cut-off frequency \",round(fc2/1000,0),\"KHz and the nominal impedance is \",round( R02,0),\" ohm \""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"\n",
"\n",
" Result \n",
"\n",
"\n",
"\n",
" cut-off frequency 796.0 Hz and the nominal impedance is 1000.0 ohm\n",
"\n",
" cut-off frequency 126.0 KHz and the nominal impedance is 158.0 ohm "
]
}
],
"prompt_number": 1
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<h3>Example 6, page no. 811</h3>"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#Design (a) a high-pass T section filter and (b) a high-pass pi-section filter to meet these requirements\n",
"from __future__ import division\n",
"import math\n",
"import cmath\n",
"#initializing the variables:\n",
"R0 = 600;# in ohm\n",
"fc = 25000;# in Hz\n",
"\n",
"#calculation:\n",
" #capacitance\n",
"C1 = 2/(4*math.pi*R0*fc)\n",
" #inductance\n",
"L1 = R0/(4*math.pi*fc)\n",
" #capacitance\n",
"C2 = 1/(4*math.pi*R0*fc)\n",
" #inductance\n",
"L2 = 2*R0/(4*math.pi*fc)\n",
"\n",
"\n",
"#Results\n",
"print \"\\n\\n Result \\n\\n\"\n",
"print \"\\n A low-pass T section filter capcitance is \",round(C1*1E9,2),\"nfarad and inductance is\",round(L1*1E3,2),\"mHenry\"\n",
"print \"\\n A high-pass pi section filter capcitance is \",round(C2*1E9,3),\"nfarad and inductance is\",round(L2*1E3,2),\"mHenry\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"\n",
"\n",
" Result \n",
"\n",
"\n",
"\n",
" A low-pass T section filter capcitance is 10.61 nfarad and inductance is 1.91 mHenry\n",
"\n",
" A high-pass pi section filter capcitance is 5.305 nfarad and inductance is 3.82 mHenry"
]
}
],
"prompt_number": 2
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<h3>Example 8, page no. 814</h3>"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#Determine the frequency at which the characteristic impedance of the section is (a) zero, (b) 300 ohm, (c) 590 ohm\n",
"from __future__ import division\n",
"import math\n",
"import cmath\n",
"#initializing the variables:\n",
"R0 = 600;# in ohm\n",
"fc = 500;# in Hz\n",
"Z1 = 0;# in ohm\n",
"Z2 = 300;# in ohm\n",
"Z3 = 590;# in ohm\n",
"\n",
" #calculation:\n",
" #frequency\n",
"f1 = fc\n",
"f2 = fc/(1 - (Z2/R0)**2)**0.5\n",
"f3 = fc/(1 - (Z3/R0)**2)**0.5\n",
"\n",
"\n",
"#Results\n",
"print \"\\n\\n Result \\n\\n\"\n",
"print \"requency at which the characteristic impedance of the section is 0 ohm is \",f1,\" Hz \"\n",
"print \"and 300 Ohm is \",round(f2,2),\" Hz and 590 ohm is \",round(f3,2),\" Hz \""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"\n",
"\n",
" Result \n",
"\n",
"\n",
"requency at which the characteristic impedance of the section is 0 ohm is 500 Hz \n",
"and 300 Ohm is 577.35 Hz and 590 ohm is 2750.1 Hz "
]
}
],
"prompt_number": 5
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<h3>Example 9, page no. 817</h3>"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#Determine for each (i) the attenuation coefficient, and (ii) the phase shift coefficient.\n",
"from __future__ import division\n",
"import math\n",
"import cmath\n",
"#initializing the variables:\n",
"r1 = 1.25 + 0.52j;# propagation coefficients \n",
"rr = 1.794;# propagation coefficients \n",
"thetar = -39.4;# in ddegrees\n",
"\n",
"#calculation:\n",
" #r\n",
"r2 = rr*math.cos(thetar*math.pi/180) + 1j*rr*math.sin(thetar*math.pi/180)\n",
" #attenuation coefficient\n",
"a1 = r1.real\n",
"a2 = r2.real\n",
" #phase shift coefficient\n",
"b1 = r1.imag\n",
"b2 = r2.imag\n",
"\n",
"\n",
"#Results\n",
"print \"\\n\\n Result \\n\\n\"\n",
"print \"\\nattenuation coefficient are for (a) is \",a1,\" N and for (b) is \",round(a2,2),\" N \"\n",
"print \"\\nphase shift coefficient are for (a) is \",b1,\" rad and for (b) is \",round(b2,2),\" rad \""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"\n",
"\n",
" Result \n",
"\n",
"\n",
"\n",
"attenuation coefficient are for (a) is 1.25 N and for (b) is 1.39 N \n",
"\n",
"phase shift coefficient are for (a) is 0.52 rad and for (b) is -1.14 rad "
]
}
],
"prompt_number": 8
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<h3>Example 10, page no. 818</h3>"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#Determine for the section (a) the attenuation coefficient, \n",
"#(b) the phase shift coefficient, and (c) the propagation coefficient. \n",
"#(d) If five such sections are cascaded determine the output current of the fifth stage and \n",
"#the overall propagation constant of the network.\n",
"from __future__ import division\n",
"import math\n",
"import cmath\n",
"#initializing the variables:\n",
"ri1 = 0.024;# in amperes\n",
"ri2 = 0.008;# in amperes\n",
"thetai1 = 10;# in ddegrees\n",
"thetai2 = -45;# in ddegrees\n",
"\n",
"#calculation:\n",
" #currents\n",
"I1 = ri1*math.cos(thetai1*math.pi/180) + 1j*ri1*math.sin(thetai1*math.pi/180)\n",
"I2 = ri2*math.cos(thetai2*math.pi/180) + 1j*ri2*math.sin(thetai2*math.pi/180)\n",
" #ir\n",
"ir = I1/I2\n",
"irmag = ri1/ri2\n",
"thetai = thetai1-thetai2\n",
" #attenuation coefficient\n",
"a = math.log(irmag)\n",
" #phase shift coefficient\n",
"b = thetai*math.pi/180\n",
" #propagation coefficient \n",
"r = a + 1j*b\n",
" #output current of the fifth stage\n",
"I6 = I1/(ir**5)\n",
"x = ir**5\n",
"xmg = abs(x)\n",
" #overall attenuation coefficient\n",
"ad = math.log(xmg)\n",
" #overall phase shift coefficient\n",
"bd = cmath.phase(complex(x.real,x.imag))\n",
"\n",
"\n",
"#Results\n",
"print \"\\n\\n Result \\n\\n\"\n",
"print \"\\nattenuation coefficient is \",round(a,3),\" N \"\n",
"print \"\\nphase shift coefficient is \",round(b,3),\" rad \"\n",
"print \"\\npropagation coefficient is \",round(a,3),\" + (\",round(b,3),\")i \"\n",
"print \"\\nthe output current of the fifth stage is \",round(abs(I6*1E6),1),\"/_\",round(cmath.phase(complex(I6.real,I6.imag))*180/math.pi,2),\"deg mA \"\n",
"print \"and the overall propagation coefficient is \",round(ad,2),\" + (\",round(bd+(2*math.pi),2),\")i\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"\n",
"\n",
" Result \n",
"\n",
"\n",
"\n",
"attenuation coefficient is 1.099 N \n",
"\n",
"phase shift coefficient is 0.96 rad \n",
"\n",
"propagation coefficient is 1.099 + ( 0.96 )i \n",
"\n",
"the output current of the fifth stage is 98.8 /_ 95.0 deg mA \n",
"and the overall propagation coefficient is 5.49 + ( 4.8 )i\n"
]
}
],
"prompt_number": 2
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<h3>Example 11, page no. 819</h3>"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#determine (a) the attenuation coefficient, (b) the phase shift coefficient and (c) the propagation coefficient gamma\n",
"from __future__ import division\n",
"import math\n",
"import cmath\n",
"#initializing the variables:\n",
"XL = 5j;# in ohms\n",
"Xc = -1j*10;# in ohms\n",
"RL = 12;# in ohms\n",
"I1 = 1;# in amperes (lets say)\n",
"\n",
" #calculation:\n",
" #current I2\n",
"I2 = (Xc/(Xc + XL + RL))*I1\n",
" #current ratio\n",
"Ir = I1/I2\n",
"Irmg = abs(Ir)\n",
" #attenuation coefficient\n",
"a = math.log(Irmg)\n",
" #phase shift coefficient\n",
"b = cmath.phase(complex(Ir.real, Ir.imag))\n",
" #propagation coefficient \n",
"r = a + 1j*b\n",
"\n",
"\n",
"#Results\n",
"print \"\\n\\n Result \\n\\n\"\n",
"print \"\\nattenuation coefficient is \",round(a,2),\" N \"\n",
"print \"\\nphase shift coefficient is \",round(b,2),\" rad \"\n",
"print \"\\npropagation coefficient is \",round(a,2),\" + (\",round(b,2),\")i \""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"\n",
"\n",
" Result \n",
"\n",
"\n",
"\n",
"attenuation coefficient is 0.26 N \n",
"\n",
"phase shift coefficient is 1.18 rad \n",
"\n",
"propagation coefficient is 0.26 + ( 1.18 )i "
]
}
],
"prompt_number": 10
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<h3>Example 12, page no. 823</h3>"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#(a) the time delay for the signal to pass through the filter, assuming the phase shift is small, and \n",
"#(b) the time delay for a signal to pass through the section at the cut-off frequency.\n",
"from __future__ import division\n",
"import math\n",
"#initializing the variables:\n",
"L = 2*0.5;# in Henry\n",
"C = 2E-9;# in Farad\n",
"\n",
"#calculation:\n",
" #time delay\n",
"t = (L*C)**0.5\n",
" #time delay at the cut-off frequency\n",
"tfc = t*math.pi/2\n",
"\n",
"\n",
"#Results\n",
"print \"\\n\\n Result \\n\\n\"\n",
"print \"\\n time delay is \",round(t*1E6,2),\"usec \"\n",
"print \"\\ntime delay at the cut-off frequency is \",round(tfc*1E6,2),\"usec\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"\n",
"\n",
" Result \n",
"\n",
"\n",
"\n",
" time delay is 44.72 usec \n",
"\n",
"time delay at the cut-off frequency is 70.25 usec"
]
}
],
"prompt_number": 11
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<h3>Example 13, page no. 824</h3>"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#determine (a) the values of the elements in each section, and (b) the value of n.\n",
"from __future__ import division\n",
"import math\n",
"#initializing the variables:\n",
"fc = 500000;# in Hz\n",
"t1 = 9.55E-6;# in secs\n",
"R0 = 1000;# in ohm\n",
"\n",
"#calculation:\n",
" #for a low-pass filter section, capacitance\n",
"C = 1/(math.pi*R0*fc)\n",
" #inductance\n",
"L = R0/(math.pi*fc)\n",
" #time delay\n",
"t2 = (L*C)**0.5\n",
" #number of cascaded sections required\n",
"n = t1/t2\n",
"\n",
"\n",
"#Results\n",
"print \"\\n\\n Result \\n\\n\"\n",
"print \"\\n for low-pass T section inductance is \",round(L/2*1E6,2),\"uH and capacitance is \",round(C*1E12,2),\"pF\"\n",
"print \"\\n for low-pass pi section inductance is \",round(L*1E6,2),\"uH and capacitance is \",round(C/2*1E12,2),\"pF\"\n",
"print \"\\nnumber of cascaded sections required is \",round(n,2)"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"\n",
"\n",
" Result \n",
"\n",
"\n",
"\n",
" for low-pass T section inductance is 318.31 uH and capacitance is 636.62 pF\n",
"\n",
" for low-pass pi section inductance is 636.62 uH and capacitance is 318.31 pF\n",
"\n",
"number of cascaded sections required is 15.0"
]
}
],
"prompt_number": 12
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<h3>Example 14, page no. 824</h3>"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#determine the component values for each section if the filter is (a) a low-pass T network, and (b) a high-pass \u0003 network.\n",
"from __future__ import division\n",
"import math\n",
"import cmath\n",
"#initializing the variables:\n",
"n = 8;# sections in cascade\n",
"R0 = 1000;# in ohm\n",
"t1 = 4E-6;# in secs\n",
"\n",
"\n",
"#calculation:\n",
" #time delay\n",
"t2 = t1/n\n",
" #capacitance\n",
"C = t2/R0\n",
" #inductance\n",
"L = t2*R0\n",
"\n",
"\n",
"#Results\n",
"print \"\\n\\n Result \\n\\n\"\n",
"print \"\\n for low-pass T section inductance is \",L/2*1E6,\"uH and capacitance is \",C*1E12,\"pF\"\n",
"print \"\\n for high-pass pi section inductance is \",2*L*1E6,\"uH and capacitance is \",C*1E12,\"pF\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"\n",
"\n",
" Result \n",
"\n",
"\n",
"\n",
" for low-pass T section inductance is 250.0 uH and capacitance is 500.0 pF\n",
"\n",
" for high-pass pi section inductance is 1000.0 uH and capacitance is 500.0 pF"
]
}
],
"prompt_number": 13
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<h3>Example 15, page no. 829</h3>"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#Design (a) an appropriate \u2018mderived\u2019 T section, and (b) an appropriate \u2018m-derived\u2019 pi section.\n",
"from __future__ import division\n",
"import math\n",
"import cmath\n",
"#initializing the variables:\n",
"R0 = 600;# in ohm\n",
"fc = 5000; # in Hz\n",
"finf = 5500; #in Hz\n",
"\n",
"#calculation:\n",
"m = (1 - (fc/finf)**2)**0.5\n",
"C = 1/(math.pi*R0*fc)\n",
"L = R0/(math.pi*fc)\n",
"\n",
"LT = m*L/2\n",
"CT = m*C\n",
"Ls = (1- m**2)*L/(4*m)\n",
"\n",
"Cpi = m*C/2\n",
"Lpi = m*L\n",
"Cp = (1- (m**2))*C/(4*m)\n",
"\n",
"#Results\n",
"print \"\\n\\n Result \\n\\n\"\n",
"print \"\\n for mderived T section inductance is \",round(Ls*1000,2),\"mH and capacitance is \",round(CT*1E9,2),\"nF\"\n",
"print \"\\n for mderived pi section inductance is \",round(Lpi*1000,2),\"mH and capacitance is \",round(Cp*1E9,2),\"nF\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"\n",
"\n",
" Result \n",
"\n",
"\n",
"\n",
" for mderived T section inductance is 18.94 mH and capacitance is 44.2 nF\n",
"\n",
" for mderived pi section inductance is 15.91 mH and capacitance is 52.62 nF"
]
}
],
"prompt_number": 5
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<h3>Example 16, page no. 832</h3>"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#Design (a) a suitable \u2018m-derived\u2019 T section, and (b) a suitable \u2018m-derived\u2019 pi section having a cut-off frequency of 20 kHz,\n",
"from __future__ import division\n",
"import math\n",
"import cmath\n",
"#initializing the variables:\n",
"R0 = 500;# in ohm\n",
"fc = 20000; # in Hz\n",
"finf = 16000; #in Hz\n",
"\n",
"#calculation:\n",
"m = (1 - (finf/fc)**2)**0.5\n",
"C = 1/(4*math.pi*R0*fc)\n",
"L = R0/(4*math.pi*fc)\n",
"\n",
"LT = L/m\n",
"CT = 4*m*C/(1- m**2)\n",
"Csa = 2*C/m\n",
"\n",
"Cpi = C/m\n",
"Lpi = 4*m*L/(1- m**2)\n",
"Lsa = 2*L/m\n",
"\n",
"#Results\n",
"print \"\\n\\n Result \\n\\n\"\n",
"print \"\\n For an 'm-derived' high-pass T section: series arm contains a capacitance of \",round(Csa*1E9,2),\"nF\"\n",
"print \"the shunt arm contains an inductance of\",round(LT*1000,3),\" mH in series with a capacitance of\",round(CT*1E9,2),\"nF\"\n",
"print \"\\n For an 'm-derived' high pass pi section: shunt arms each contain inductance of \",round(Lsa*1000,2),\"mH\"\n",
"print \"series arm contains a capacitance of \",round(Cpi*1E9,2),\"nF in parallel with an inductance of\",round(Lpi*1E3,3),\"mH\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"\n",
"\n",
" Result \n",
"\n",
"\n",
"\n",
" For an 'm-derived' high-pass T section: series arm contains a capacitance of 26.53 nF\n",
"the shunt arm contains an inductance of 3.316 mH in series with a capacitance of 29.84 nF\n",
"\n",
" For an 'm-derived' high pass pi section: shunt arms each contain inductance of 6.63 mH\n",
"series arm contains a capacitance of 13.26 nF in parallel with an inductance of 7.46 mH\n"
]
}
],
"prompt_number": 3
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<h3>Example 17, page no. 835</h3>"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#Determine the component values needed if the filter is to comprise a prototype T section, \n",
"#an \u2018m-derived\u2019 T section and two terminating \u2018m-derived\u2019 halfsections.\n",
"from __future__ import division\n",
"import math\n",
"import cmath\n",
"#initializing the variables:\n",
"R0 = 600;# in ohm\n",
"fc = 10000; # in Hz\n",
"finf = 11800; #in Hz\n",
"\n",
"#calculation:\n",
"m = (1 - (fc/finf)**2)**0.5\n",
"C = 1/(math.pi*R0*fc)\n",
"L = R0/(math.pi*fc)\n",
"\n",
"LmT = (1- m**2)*L/(4*m)\n",
"\n",
"mH = 0.6\n",
"LmH = (1- mH**2)*L/(2*mH)\n",
"\n",
"#Results\n",
"print \"\\n\\n Result \\n\\n\"\n",
"print \"\\n For an Prototype T section: series arm contains a Inductance of \",round(L*1000/2,1),\"mH\"\n",
"print \"the shunt arm contains an Capacitance of\",round(C*1E6,4),\" uF\"\n",
"print \"\\n For an 'm-derived' T section: Series arms each contain inductance of \",round(m*L*1000/2,2),\"mH \"\n",
"print \"Shunt arm contains a capacitance of \",round(m*C*1E6,4),\"uF in Series with an inductance of\",round(LmT*1E3,2),\"mH\"\n",
"print \"\\n For an 'm-derived' Half section: Series arms each contain inductance of \",round(mH*L*1000/2,1),\"mH\"\n",
"print \"Shunt arm contains a capacitance of \",round(mH*C*1E6/2,4),\"uF in Series with an inductance of\",round(LmH*1E3,2),\"mH\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"\n",
"\n",
" Result \n",
"\n",
"\n",
"\n",
" For an Prototype T section: series arm contains a Inductance of 9.5 mH\n",
"the shunt arm contains an Capacitance of 0.0531 uF\n",
"\n",
" For an 'm-derived' T section: Series arms each contain inductance of 5.07 mH \n",
"Shunt arm contains a capacitance of 0.0282 uF in Series with an inductance of 6.46 mH\n",
"\n",
" For an 'm-derived' Half section: Series arms each contain inductance of 5.7 mH\n",
"Shunt arm contains a capacitance of 0.0159 uF in Series with an inductance of 10.19 mH\n"
]
}
],
"prompt_number": 5
}
],
"metadata": {}
}
]
}
|