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
|
{
"metadata": {
"name": "",
"signature": "sha256:f8c6689b27d28f641fc8e24d065a4f69d8ad2a49bb0688697280bb451473eab1"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
"cell_type": "heading",
"level": 1,
"metadata": {},
"source": [
"Chapter-7 Active Filters"
]
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 7.1 - Page 204"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"from numpy import pi\n",
"from __future__ import division\n",
"# Given data\n",
"f_H= 2*10**3 #cut-off frequency in Hz\n",
"C= 0.01*10**-6 # in F\n",
"passband_gain= 2.5 \n",
"R= 1/(2*pi*f_H*C) # in \u03a9\n",
"R= 8.2 # in k\u03a9 (standard value)\n",
"# 1+Rf/R1= passband_gain or Rf should be equal to 1.5*R1 since Rf||R1= R\n",
"R1= passband_gain/1.5*R # in k\u03a9\n",
"print \"The value of R1 = %0.2f k\u03a9 (Standard value 15 k\u03a9)\" %R1 \n",
"Rf= int(1.5*R1) # in k\u03a9\n",
"print \"The value of Rf = %0.f k\u03a9\" % Rf"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The value of R1 = 13.67 k\u03a9 (Standard value 15 k\u03a9)\n",
"The value of Rf = 20 k\u03a9\n"
]
}
],
"prompt_number": 15
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 7.2 - Page 207"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"# Given data\n",
"f_H= 2*10**3 #cut-off frequency in Hz\n",
"C= 0.033*10**-6 # in F\n",
"R= 1/(2*pi*f_H*C) # in \u03a9\n",
"# 2*R= Rf*R1/(Rf+R1)= 0.586*R1**2/(1.586*R1) since Rf= 0.586*R1\n",
"R1= 2*R*1.586/0.586 # in \u03a9\n",
"R1= round(R1*10**-3) # in k\u03a9\n",
"print \"The value of R1 = %0.f k\u03a9 (Standard value 15 kohm)\" %R1\n",
"R1= 15 # in k\u03a9\n",
"Rf= R1*0.586 # in k\u03a9\n",
"#Rf= floor(1.5*R1) # in k\u03a9\n",
"print \"The value of Rf = %0.2f k\u03a9\" %Rf\n",
"print \"(The value of Rf may be taken as a pot of 10 k\u03a9)\" "
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The value of R1 = 13 k\u03a9 (Standard value 15 kohm)\n",
"The value of Rf = 8.79 k\u03a9\n",
"(The value of Rf may be taken as a pot of 10 k\u03a9)\n"
]
}
],
"prompt_number": 3
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 7.3 - Page 207"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"# Given data\n",
"f_H= 1*10**3 #cut-off frequency in Hz\n",
"C= 0.0047*10**-6 # in F\n",
"R= 1/(2*pi*f_H*C) # in \u03a9\n",
"R= (R*10**-3) # in k\u03a9\n",
"R1= 30 # in k\u03a9 (assume)\n",
"Rf= 0.586*R1 # in k\u03a9\n",
"C= C*10**6 # in \u00b5F\n",
"print \"The value of R'= R = %0.2f k\u03a9 (standard value 33 k\u03a9)\" %R\n",
"print \"The value of C'= C = %0.4f \u00b5F \" %C\n",
"print \"The value of R1= %0.2f k\u03a9 \" %R1 \n",
"print \"The value of Rf= %0.2f k\u03a9 (standard value 20 k\u03a9 pot)\" %Rf "
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The value of R'= R = 33.86 k\u03a9 (standard value 33 k\u03a9)\n",
"The value of C'= C = 0.0047 \u00b5F \n",
"The value of R1= 30.00 k\u03a9 \n",
"The value of Rf= 17.58 k\u03a9 (standard value 20 k\u03a9 pot)\n"
]
}
],
"prompt_number": 6
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 7.4 - Page 212"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math\n",
"# Given data\n",
"fc= 1*10**3 # in Hz\n",
"alpha= 1.414 \n",
"C= 0.1*10**-6 # in F (assume)\n",
"C_desh= C*alpha**2/4 # in F\n",
"C_desh= C_desh*10**6 # in \u00b5F\n",
"print \"The value of C' = %0.2f \u00b5F\" %C_desh\n",
"C_desh= C_desh*10**-6 # in F\n",
"R_desh= 1/(2*pi*fc*math.sqrt(C*C_desh)) # in \u03a9\n",
"R_desh= R_desh*10**-3 # in k\u03a9\n",
"print \"The value of R' = %0.2f k\u03a9 (standard value 2.2 k\u03a9)\"%R_desh"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The value of C' = 0.05 \u00b5F\n",
"The value of R' = 2.25 k\u03a9 (standard value 2.2 k\u03a9)\n"
]
}
],
"prompt_number": 17
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 7.5 - Page 213"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"# Given data\n",
"alpha= 1.414 # passband\n",
"C= 0.01*10**-6 # in F (assume)\n",
"fc= 1*10**3 # in Hz\n",
"dc_gain= 6 \n",
"R= 1/(2*pi*C*fc) # in \u03a9\n",
"R= R*10**-3 # in k\u03a9\n",
"print \"The value of R = %0.1f k\u03a9 (standard value 15 k\u03a9)\" %R\n",
"R= 15 # in k\u03a9\n",
"Af= 3-alpha # and Af= 1+Rf/R1 or\n",
"# Rf= (Af-1)*R1 (i)\n",
"# 2*R= Rf || R1, hence from (i)\n",
"R1= 2*R*Af/(Af-1) # in k\u03a9\n",
"print \"The value of R1 = %0.1f k\u03a9 (standard value 82 k\u03a9)\" %R1\n",
"R1= 82 # in k\u03a9\n",
"Rf= (Af-1)*R1 # in k\u03a9\n",
"print \"The value of Rf = %0.f k\u03a9 (standard value 47 k\u03a9)\" %Rf\n",
"Aamp= dc_gain/Af \n",
"print \"The value of Aamp = %0.2f\" %Aamp"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The value of R = 15.9 k\u03a9 (standard value 15 k\u03a9)\n",
"The value of R1 = 81.2 k\u03a9 (standard value 82 k\u03a9)\n",
"The value of Rf = 48 k\u03a9 (standard value 47 k\u03a9)\n",
"The value of Aamp = 3.78\n"
]
}
],
"prompt_number": 8
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 7.7 - Page 221"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"# Given data\n",
"R= 2.1*10**3 # in k\u03a9\n",
"C= 0.05*10**-6 # in F\n",
"R1= 20*10**3 # in \u03a9\n",
"Rf= 60*10**3 # in \u03a9\n",
"# Low cut-off frequency,\n",
"f_L= 1/(2*pi*R*C) # in Hz\n",
"f_L= f_L*10**-3 # in kHz\n",
"print \"The cut-off frequency = %0.3f kHz\" %f_L"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The cut-off frequency = 1.516 kHz\n"
]
}
],
"prompt_number": 9
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 7.8 - Page 225"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math\n",
"from __future__ import division\n",
"# Given data\n",
"R1= 2*10**3 # in \u03a9\n",
"R2= 2/3*10**3 # in \u03a9\n",
"R3= 200*10**3 # in \u03a9\n",
"C= 0.1*10**-6 # in F\n",
"Af= R3/(2*R1) # gain\n",
"print \"The value of Af = %0.f\" %Af\n",
"# R1= Q/(2*pi*f_C*C*Af) (i)\n",
"# R2= Q/(2*pi*f_C*C*(2*Q**2-Af)) (ii)\n",
"# R3= Q/(pi*f_C*C) (iii)\n",
"Q= math.sqrt((R3/(2*R2)+Af)/2) # from (ii) and (iii)\n",
"print \"The value of Q = %0.f\" %Q\n",
"f_C= Q/(R3*pi*C) # in Hz (from (iii))\n",
"print \"The value of f_C = %0.f Hz\" %f_C\n",
"omega_0= 2*pi*f_C # in radians/second\n",
"print \"The value of omega_0 = %0.f radians/seconds\" %omega_0"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The value of Af = 50\n",
"The value of Q = 10\n",
"The value of f_C = 159 Hz\n",
"The value of omega_0 = 1000 radians/seconds\n"
]
}
],
"prompt_number": 14
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 7.10 - Page 227"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"# Given data\n",
"f_L= 2*10**3 # in Hz\n",
"f_H= 2.5*10**3 # in Hz\n",
"Af= -5 \n",
"f_C= math.sqrt(f_L*f_H) # centre frequency in Hz\n",
"del_f= f_H-f_L #bandwidth in Hz\n",
"Q= f_C/del_f # selectivity\n",
"# Assume C1= C2= C= 0.01\u00b5F\n",
"C= 0.01*10**-6 # in F\n",
"R3= 1/(pi*del_f*C) # in \u03a9\n",
"R3= R3*10**-3 # in k\u03a9\n",
"print \"The value of R3 = %0.2f k\u03a9 (standard value 64 k\u03a9)\" %R3\n",
"R3= 64 # in k\u03a9\n",
"R3= R3*10**3 # in \u03a9\n",
"R1= -R3/(2*Af) #in \u03a9\n",
"R2= R1/(4*pi**2*f_C**2*R1*R3*C**2-.1)\n",
"R1= R1*10**-3 # in k\u03a9\n",
"C=C*10**6 # in \u00b5F\n",
"print \"The value of R1 = %0.1f k\u03a9 \" %R1\n",
"print \"The value of R2 = %0.f k\u03a9 (standard value 800\u03a9)\" %R2\n",
"print \"The value of C = %0.2f \u00b5F \" %C"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The value of R3 = 63.66 k\u03a9 (standard value 64 k\u03a9)\n",
"The value of R1 = 6.4 k\u03a9 \n",
"The value of R2 = 801 k\u03a9 (standard value 800\u03a9)\n",
"The value of C = 0.01 \u00b5F \n"
]
}
],
"prompt_number": 22
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 7.11 - Page 228 "
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"# Given data\n",
"f_C= 1*10**3 #centre frequency in Hz\n",
"f_C_desh= 2*10**3 #new centre frequency in Hz\n",
"Q= 5 # selectivity\n",
"Af= -8 \n",
"C= 0.01*10**-6 # in F (assume)\n",
"R3= Q/(pi*f_C*C) #in \u03a9\n",
"R3= R3*10**-3 # in k\u03a9\n",
"print \"The value of R3 = %0.1f k\u03a9 (160 k\u03a9 (approx))\" %R3\n",
"R1= round(-R3/(2*Af)) # in k\u03a9\n",
"print \"The value of R1 = %0.f k\u03a9\" %R1\n",
"R2= R1*10**3/(4*pi**2*f_C**2*R1*10**3*R3*10**3*C**2-1) # in \u03a9\n",
"R2= R2*10**-3 # in k\u03a9\n",
"print \"The value of R2 = %0.2f k\u03a9 (2 k\u03a9 (approx))\" %R2\n",
"R2= 2 # in k\u03a9 (approx)\n",
"R2_desh= R2*(f_C/f_C_desh)**2 # in k\u03a9\n",
"R2_desh= R2_desh*10**3 # in \u03a9\n",
"print \"The value of R2' = %0.f \u03a9\" %R2_desh"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The value of R3 = 159.2 k\u03a9 (160 k\u03a9 (approx))\n",
"The value of R1 = 10 k\u03a9\n",
"The value of R2 = 1.89 k\u03a9 (2 k\u03a9 (approx))\n",
"The value of R2' = 500 \u03a9\n"
]
}
],
"prompt_number": 23
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 7.12 - Page 229"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"# Given data\n",
"R= 10*10**3 # in \u03a9\n",
"C1= 0.1*10**-6 # in F \n",
"C2= 0.0025*10**-6 # in F \n",
"f_H= 1/(2*pi*R*C2) #higher cut-off frequency in Hz\n",
"f_H= f_H*10**-3 # in kHz\n",
"f_L= 1/(2*pi*R*C1) #lower cut-off frequency in Hz\n",
"BW= f_H-f_L*10**-3 # bandwidth in kHz\n",
"print \"The higher cut-off frequency = %0.3f kHz\" %f_H\n",
"print \"The lower cut-off frequency = %0.2f Hz\" %f_L\n",
"print \"The bandwidth = %0.1f kHz\" %BW"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The higher cut-off frequency = 6.366 kHz\n",
"The lower cut-off frequency = 159.15 Hz\n",
"The bandwidth = 6.2 kHz\n"
]
}
],
"prompt_number": 24
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 7.13 - Page 230"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"# Given data\n",
"f_L= 200 # in Hz\n",
"f_H= 1*10**3 # in Hz\n",
"alpha=4 # passband gain\n",
"C_desh= 0.01*10**-6 # in F (assume)\n",
"R_desh= 1/(2*pi*f_H*C_desh) # in \u03a9\n",
"R_desh= R_desh*10**-3 # in k\u03a9\n",
"print \"The value of R' = %0.1f k\u03a9 (Standard value 20 k\u03a9)\" %R_desh\n",
"R_desh= 20 # in k\u03a9 (standard value)\n",
"# First Order High-Pass Filter\n",
"C= 0.05*10**-6 # in F (assume)\n",
"R= 1/(2*pi*f_L*C) # in \u03a9\n",
"R= R*10**-3 # in k\u03a9\n",
"R1= 10 # in k\u03a9\n",
"Rf= R1 # in k\u03a9\n",
"C_desh= C_desh*10**6 # in \u00b5F\n",
"C= C*10**6 # in \u00b5F\n",
"print \"The value of R = %0.1f k\u03a9 (Standard value 20 k\u03a9)\" %R\n",
"R= 20 # in k\u03a9 (standard value)\n",
"print \"The value of R1 and Rf = %0.f k\u03a9\" %R1\n",
"print \"The value of C' = %0.2f \u00b5F\" %C_desh\n",
"print \"The value of C = %0.2f \u00b5F\" %C"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The value of R' = 15.9 k\u03a9 (Standard value 20 k\u03a9)\n",
"The value of R = 15.9 k\u03a9 (Standard value 20 k\u03a9)\n",
"The value of R1 and Rf = 10 k\u03a9\n",
"The value of C' = 0.01 \u00b5F\n",
"The value of C = 0.05 \u00b5F\n"
]
}
],
"prompt_number": 25
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 7.14 - Page 231"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"# Given data\n",
"f_H= 200 # in Hz\n",
"f_L= 2*10**3 # in Hz\n",
"C= 0.05*10**-6 # in F\n",
"# For low-pass filter,\n",
"R_desh= 1/(2*pi*f_H*C) # in \u03a9\n",
"R_desh= R_desh*10**-3 # in k\u03a9\n",
"print \"The value of R' = %0.1f k\u03a9 (standard value 20 k\u03a9)\" %R_desh\n",
"# For high-pass filter,\n",
"R= 1/(2*pi*f_L*C) # in \u03a9\n",
"R= R*10**-3 # in k\u03a9\n",
"print \"The value of R = %0.2f k\u03a9 (standard value 2 k\u03a9)\" %R"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The value of R' = 15.9 k\u03a9 (standard value 20 k\u03a9)\n",
"The value of R = 1.59 k\u03a9 (standard value 2 k\u03a9)\n"
]
}
],
"prompt_number": 28
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 7.15 - Page 232"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"from numpy import pi\n",
"# Given data\n",
"C= 0.068*10**-6 # in F\n",
"f_N= 50 # in Hz\n",
"R= 1/(2*pi*f_N*C) # in \u03a9\n",
"R= R*10**-3 # in k\u03a9\n",
"print \"The value of R = %0.1f k\u03a9 (standard value 50 k\u03a9)\" %R"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The value of R = 46.8 k\u03a9 (standard value 50 k\u03a9)\n"
]
}
],
"prompt_number": 2
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 7.16 - Page 233"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math\n",
"# Given data\n",
"R= 15*10**3 # in \u03a9\n",
"C= 0.01*10**-6 # in F\n",
"f= 2*10**3 # in Hz\n",
"PhaseShift= -2*(math.atan(2*pi*f*R*C))*180/pi # in \u00b0\n",
"print \"The phase shift = %0.f\u00b0\" %PhaseShift\n",
"print \"i.e. %0.f\u00b0 (lagging)\" %abs(PhaseShift)"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The phase shift = -124\u00b0\n",
"i.e. 124\u00b0 (lagging)\n"
]
}
],
"prompt_number": 45
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 7.18 - Page 240"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"# Given data\n",
"R_A= 2.2*10**3 # in \u03a9\n",
"R_B= 1.2*10**3 # in \u03a9\n",
"Rf= 4.7*10**3 # in \u03a9\n",
"C= 0.01*10**-6 # in F\n",
"k_lp= 1.238 \n",
"k_hp= 1/k_lp \n",
"# Part (i)\n",
"alpha= 3*R_B/(R_A+R_B) \n",
"print \"Part (i) : The value of alpha = %0.3f\" %alpha \n",
"print \"Given filter is 1db peak Chebyshev\" \n",
"\n",
"# Part (ii)\n",
"f_0= 1/(2*pi*Rf*C) #critical frequency in Hz\n",
"f_0= f_0*10**-3 # in kHz\n",
"f_low_pass= f_0*k_lp # in kHz\n",
"print \"\\nPart (ii) : The low-pass frequency = %0.3f kHz\" %f_low_pass\n",
"f_high_pass= f_0*k_hp # in kHz\n",
"print \"The high-pass frequency = %0.3f kHz\" %f_high_pass\n",
"\n",
"# Part (iii)\n",
"fc= f_0 # bandpass centre frequency in kHz\n",
"print \"Part (iii) : The bandpass centre frequency = %0.3f kHz\" %fc\n",
"\n",
"# Part (iv)\n",
"# Formula used : delta_f= fc/Q= fc/(1/alpha)\n",
"delta_f= fc/(1/alpha) # in kHz\n",
"print \"Part (iv) : The bandpass width = %0.3f kHz\" %delta_f\n",
"\n",
"# Part (v)\n",
"A0= 1/alpha # bandpass gain at centre frequency\n",
"print \"Part (v) : The bandpass gain at centre frequency = %0.4f\" %A0"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Part (i) : The value of alpha = 1.059\n",
"Given filter is 1db peak Chebyshev\n",
"\n",
"Part (ii) : The low-pass frequency = 4.192 kHz\n",
"The high-pass frequency = 2.735 kHz\n",
"Part (iii) : The bandpass centre frequency = 3.386 kHz\n",
"Part (iv) : The bandpass width = 3.585 kHz\n",
"Part (v) : The bandpass gain at centre frequency = 0.9444\n"
]
}
],
"prompt_number": 47
}
],
"metadata": {}
}
]
}
|