summaryrefslogtreecommitdiff
path: root/Oscillations_and_Waves_by_S._Prakash/chapter13.ipynb
blob: 6c8b227d38ac74cf5b7b9733632242487ad6c2b8 (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
{
 "metadata": {
  "name": "",
  "signature": ""
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 13, Elementary theory of filters"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 1, page 491"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "from __future__ import division\n",
      "from math import pi\n",
      "#  design loss pass constant K-filter\n",
      "k=600 #ohms\n",
      "fc=2500 #Hz\n",
      "l=(k/(pi*fc)) #H\n",
      "c=((1/(pi*fc*k))) #farad\n",
      "print \"Inductance = %0.1f mH\" %(l*10**3)\n",
      "print \"Capacitance = %0.3f micro-F \" %(c*10**6)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Inductance = 76.4 mH\n",
        "Capacitance = 0.212 micro-F \n"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2, page 492"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "from math import pi\n",
      "#T-type band pass filter\n",
      "#given data :\n",
      "K=500 # in ohm\n",
      "f1=4 # in kHz\n",
      "f2=1 # in kHz\n",
      "L1=K/(pi*(f1-f2)) \n",
      "Ls=L1/2 \n",
      "print \"Inductance in each series arm, Ls = %0.2f mH \" %Ls\n",
      "C1=(f1-f2)*10**3/(4*pi*K*f1*f2) \n",
      "Cs=2*C1 \n",
      "print \"Capacity in each series arm, Cs = %0.2f micro-F\" %Cs\n",
      "L2=((f1-f2)*K*1e3)/(4*pi*f1*f2*1e6)*1e3 # mH\n",
      "print \"Shunt arm inductance, L2 = %0.1f mH\" %L2\n",
      "Csh=1*10**6/(pi*(f1-f2)*10**3*K) \n",
      "print \"Capacity in shunt arm, Csh = %0.2f micro-F\" % Csh"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Inductance in each series arm, Ls = 26.53 mH \n",
        "Capacity in each series arm, Cs = 0.24 micro-F\n",
        "Shunt arm inductance, L2 = 29.8 mH\n",
        "Capacity in shunt arm, Csh = 0.21 micro-F\n"
       ]
      }
     ],
     "prompt_number": 13
    }
   ],
   "metadata": {}
  }
 ]
}