summaryrefslogtreecommitdiff
path: root/Electronic_Devices_and_Circuits_by_D._C._Kulshreshtha/Chapter11.ipynb
blob: 776f0b1a815e1c18d2debf191b8b7f69a6f0048b (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
{
 "metadata": {
  "name": "",
  "signature": "sha256:3303f44cdb2f2123a36f676f7675540bf34779306594f12942900e5506f78518"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter11:Tuned Volatge AMplifiers"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example E1 - Pg 401"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Calculate frequency and impedance and current and voltage across each element at resonance\n",
      "#given\n",
      "import math\n",
      "R=12.;#ohm\n",
      "L=200.*10.**-6.;#H\n",
      "C=300.*10.**-12.;#F\n",
      "Vs=9.;#V\n",
      "fo=1./(2.*math.pi*math.sqrt(L*C));\n",
      "Z=R;#impedance\n",
      "print '%s %.1f %s' %(\"The Resonant frequency =\",fo/1000,\"kHz\\n\");\n",
      "print '%s %.f %s' %(\"The impedance Z =\",Z,\"ohm\\n\");\n",
      "\n",
      "Io=Vs/R;\n",
      "print '%s %.2f %s' %(\"The Source current =\",Io,\"A\\n\");\n",
      "\n",
      "Vl=Io*(2.*math.pi*fo*L);\n",
      "Vc=Io/(2.*math.pi*fo*C);\n",
      "Vr=Io*R;\n",
      "print '%s %.1f %s' %(\"The voltage across the inductor =\",Vl,\"V\\n\");\n",
      "print '%s %.1f %s' %(\"The voltage across the capacitor =\",Vc,\"V\\n\");\n",
      "print '%s %.f %s' %(\"The voltage across the resistor =\",Vr,\"V\\n\");\n",
      "#There is a slight variation in voltage across capacitor due to the approaximation\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The Resonant frequency = 649.7 kHz\n",
        "\n",
        "The impedance Z = 12 ohm\n",
        "\n",
        "The Source current = 0.75 A\n",
        "\n",
        "The voltage across the inductor = 612.4 V\n",
        "\n",
        "The voltage across the capacitor = 612.4 V\n",
        "\n",
        "The voltage across the resistor = 9 V\n",
        "\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example E2 - Pg 401"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Calculate frequency and impedance and current at resonance and current in coil and capacitor\n",
      "#given\n",
      "import math\n",
      "R=10.;#ohm\n",
      "L=100.*10.**-6.;#H\n",
      "C=100.*10.**-12.;#F\n",
      "Vs=10.;#V\n",
      "fo=1./(2.*math.pi*math.sqrt(L*C));\n",
      "Zp=L/(C*R);     #impedance\n",
      "print '%s %.3f %s' %(\"The Resonant frequency =\",fo/10**6,\"MHz\\n\");\n",
      "print '%s %.f %s' %(\"The impedance Z =\",Zp/1000,\"kohm\\n\");\n",
      "\n",
      "Io=Vs/Zp;\n",
      "print '%s %.f %s' %(\"The Source current =\",Io*10**6,\"uA\\n\");\n",
      "\n",
      "Xl=(2.*math.pi*fo*L);\n",
      "Xc=1./(2.*math.pi*fo*C);\n",
      "Z1=math.sqrt(Xl**2.+R**2.);\n",
      "Z2=Xc;\n",
      "Ic=Vs/Z2;\n",
      "Il=Ic;\n",
      "print '%s %.f %s' %(\"The current in the coil =\",1000,\"ohm\\n\");\n",
      "print '%s %.f %s' %(\"The current in the capacitor =\",Ic*1000,\"mA\\n\");\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The Resonant frequency = 1.592 MHz\n",
        "\n",
        "The impedance Z = 100 kohm\n",
        "\n",
        "The Source current = 100 uA\n",
        "\n",
        "The current in the coil = 1000 ohm\n",
        "\n",
        "The current in the capacitor = 10 mA\n",
        "\n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example E3 - Pg 402"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Calculate impedance and quality factor and bandwidth\n",
      "#given\n",
      "import math\n",
      "R=10.;#ohm\n",
      "L=150.*10.**-6.;#H\n",
      "C=100.*10.**-12.;#F\n",
      "fo=1/(2.*math.pi*math.sqrt(L*C));\n",
      "Zp=L/(C*R);     #impedance\n",
      "print '%s %.f %s' %(\"The impedance Z =\",Zp/1000,\"kohm\\n\");\n",
      "\n",
      "Xl=(2.*math.pi*fo*L);\n",
      "Q=Xl/R;\n",
      "BW=fo/Q;\n",
      "print '%s %.1f %s' %(\"The Quality factor of the circuit =\",Q,\"\\n\");\n",
      "print '%s %.1f %s' %(\"The Band width of the circuit =\",BW/1000,\"kHz\\n\");\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The impedance Z = 150 kohm\n",
        "\n",
        "The Quality factor of the circuit = 122.5 \n",
        "\n",
        "The Band width of the circuit = 10.6 kHz\n",
        "\n"
       ]
      }
     ],
     "prompt_number": 3
    }
   ],
   "metadata": {}
  }
 ]
}