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
|
{
"metadata": {
"name": "",
"signature": "sha256:ea4ffd68aac20fcc9a7413fc9ab8e0a2e574e16a66c6b5413621ddd0c8d4148d"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
"cell_type": "heading",
"level": 1,
"metadata": {},
"source": [
"chapter12:Sinusoidal Oscillators"
]
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example E1 - Pg 423"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#Calculate frequency of oscillations\n",
"#given\n",
"import math\n",
"L=55.*10.**-6.;#H\n",
"C=300.*10.**-12.;#F\n",
"fo=1./(2.*math.pi*math.sqrt(L*C));\n",
"print '%s %.f %s' %(\"The frequency of oscillations =\",fo/1000,\"kHz\\n\");\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The frequency of oscillations = 1239 kHz\n",
"\n"
]
}
],
"prompt_number": 1
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example E2 - Pg 425"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#Calculate frequency of oscillations and feedback factor and voltage gain\n",
"#given\n",
"def prll(r1,r2):\n",
"\tz=r1*r2/(r1+r2)#\n",
"\treturn z\n",
"import math\n",
"C1=0.001*10.**-6.;#F\n",
"C2=0.01*10.**-6.;#F\n",
"L=15.*10.**-6.;#H\n",
"C=prll(C1,C2);\n",
"fo=1./(2.*math.pi*math.sqrt(L*C));\n",
"print '%s %.2f %s' %(\"The frequency of oscillations =\",fo/10**6,\"MHz\\n\");\n",
"B=C1/C2;\n",
"Amin=1./B;\n",
"print '%s %.1f %s' %(\"The feedback factor of the circuit =\",B,\"\\n\");\n",
"print '%s %.f' %(\"The circuit needs a minimum voltage gain of\",Amin);\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The frequency of oscillations = 1.36 MHz\n",
"\n",
"The feedback factor of the circuit = 0.1 \n",
"\n",
"The circuit needs a minimum voltage gain of 10\n"
]
}
],
"prompt_number": 2
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example E3 - Pg 432"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#Calculate frequency of oscillations\n",
"#given\n",
"import math\n",
"R=10.*10.**3.;#ohm\n",
"C=0.01*10.**-6.;#F\n",
"fo=1./(2.*math.pi*R*C*math.sqrt(6.));\n",
"print '%s %.1f %s' %(\"The frequency of oscillations =\",fo,\"Hz\\n\");\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The frequency of oscillations = 649.7 Hz\n",
"\n"
]
}
],
"prompt_number": 3
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example E4 - Pg 432"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#Calculate frequency of oscillations\n",
"#given\n",
"import math\n",
"R=22.*10.**3.;#ohm\n",
"C=100.*10.**-12.;#F\n",
"fo=1./(2.*math.pi*R*C);\n",
"print '%s %.2f %s' %(\"The frequency of oscillations =\",fo/1000,\"KHz\\n\");\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The frequency of oscillations = 72.34 KHz\n",
"\n"
]
}
],
"prompt_number": 4
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example E5 - Pg 434"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#Determine the series and parallel resonant frequencies\n",
"#given\n",
"def prll(r1,r2):\n",
"\tz=r1*r2/(r1+r2)#\n",
"\treturn z\n",
"import math\n",
"L=3.;#H\n",
"Cm=10.*10.**-12.;#F\n",
"Cs=0.05*10.**-12.;#F\n",
"fs=1./(2.*math.pi*math.sqrt(L*Cs));\n",
"print '%s %.f %s' %(\"The series resonant frequency =\",fs/1000,\"kHz\\n\");\n",
"\n",
"Cp=prll(Cm,Cs);\n",
"fp=1./(2.*math.pi*math.sqrt(L*Cp));\n",
"print '%s %.f %s' %(\"The parallel resonant frequency =\",fp/1000,\"kHz\");\n",
"#Determine the series and parallel resonant frequencies\n",
"#given\n",
"def prll(r1,r2):\n",
"\tz=r1*r2/(r1+r2)#\n",
"\treturn z\n",
"import math\n",
"L=3.;#H\n",
"Cm=10.*10.**-12.;#F\n",
"Cs=0.05*10.**-12.;#F\n",
"fs=1./(2.*math.pi*math.sqrt(L*Cs));\n",
"print '%s %.f %s' %(\"The series resonant frequency =\",fs/1000,\"kHz\\n\");\n",
"\n",
"Cp=prll(Cm,Cs);\n",
"fp=1./(2.*math.pi*math.sqrt(L*Cp));\n",
"print '%s %.f %s' %(\"The parallel resonant frequency =\",fp/1000,\"kHz\");\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The series resonant frequency = 411 kHz\n",
"\n",
"The parallel resonant frequency = 412 kHz\n",
"The series resonant frequency = 411 kHz\n",
"\n",
"The parallel resonant frequency = 412 kHz\n"
]
}
],
"prompt_number": 5
}
],
"metadata": {}
}
]
}
|