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
|
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Chapter 2 : Radio Frequency Circuits"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 1 : pg 50"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"a)The resonant frequency is 4.5 MHz\n",
"The bandwidth is 300.0 kHz\n"
]
}
],
"source": [
"#page no 50\n",
"#calculate the resonant frequency and bandwidth\n",
"#prob no 2.1\n",
"from math import pi,sqrt\n",
"#Given:\n",
"#Refer the fig 2.6 of page 50. L1=25uH;C1=50pF\n",
"L1=25.*10**-6;C1=50.*10**-12;Q=15;\n",
"#calculations\n",
"#A) The resonent freqency is given as\n",
"fo=(1/(2*pi*sqrt(L1*C1)));\n",
"#B) The bandwidth is given as \n",
"B=fo/Q;\n",
"#results\n",
"print 'a)The resonant frequency is ',round(fo/10**6,2),'MHz'\n",
"print 'The bandwidth is ',round(B/1000.),'kHz'"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 2 : pg 62"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"1)The operating frequency is 5.03 MHz\n",
"2)Operating gain -10.0\n",
"The -ve sign denotes a phase inversion\n",
"3)Operating gain 0.2\n"
]
}
],
"source": [
"#page no 62\n",
"# prob no. 2.2\n",
"#calculate the operating frequency, gain\n",
"from math import pi,sqrt\n",
"# Given : Hartley oscillators L=10uH; C=100pF\n",
"L=10.*10**-6; C=100.*10**-12;N1=10;N2=100.\n",
"#calculations and results\n",
"# A)The operating frequency is \n",
"fo=1/(2.*pi*sqrt(L*C));\n",
"print '1)The operating frequency is',round(fo/10**6,2),'MHz'\n",
"# The feedback fraction is given by\n",
"B=-N1/N2;\n",
"#Operating gain is given as \n",
"A=1/B;\n",
"print '2)Operating gain',A\n",
"print 'The -ve sign denotes a phase inversion'\n",
"#B) The operating frequency is same as in part A)\n",
"N1=20;N2=80.;\n",
"# The feedback fraction is given by\n",
"B=(N1+N2)/N1;\n",
"#Operating gain is given as \n",
"A=1./B;\n",
"print '3)Operating gain',A"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 3 : pg 66"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The effective capacitance (pF)= 9.09\n",
"1)The operating frequency is 52.8 Hz\n",
"The feedback fraction is -0.1\n",
"The feedback fraction is 0.0909\n"
]
}
],
"source": [
"# page no 66\n",
"#prob no 2.3\n",
"#calculate the operating frequency and feedback fraction\n",
"from math import pi,sqrt\n",
"#Given:\n",
"C1=10.*10**-12; C2=100.*10**-12; L=1*10**-6;\n",
"#calculations and results\n",
"# The effective capacitance is \n",
"CT=(C1*C2)/(C1+C2);\n",
"# The operating frequency is \n",
"f0=1/(2*pi*sqrt(L*CT));\n",
"print 'The effective capacitance (pF)=',round(CT*10**12,2);\n",
"print '1)The operating frequency is',round(f0/10**6,1),'Hz'\n",
"# The feedback fraction is given approximately by\n",
"B=-C1/C2; \n",
"print 'The feedback fraction is',B\n",
"# For the common-base ckt, the op-freq is same but the feedback fraction willbe different.\n",
"C1=100*10**-12; C2=10*10**-12;\n",
"# It is given by \n",
"B=C2/(C1+C2);\n",
"print 'The feedback fraction is',round(B,4)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 4 : pg 68"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The effective total capacitance is 9.01 pF\n",
"The operating freq is 53.03 MHz\n"
]
}
],
"source": [
"# page no 68\n",
"#prob no 2.4\n",
"#caclculate the effective total capacitance and operating frequency\n",
"#Refer fig 2.22\n",
"from math import pi,sqrt\n",
"#Given:\n",
"c1=1000.;c2=100.;c3=10.;#all values are in pf\n",
"#calculations and results\n",
"#The effective total capacitance\n",
"Ct=1/((1/c1)+(1/c2)+(1/c3));\n",
"print 'The effective total capacitance is',round(Ct,2),'pF'\n",
"CT=Ct*10**-12;L=10**-6;\n",
"#The operating freq is\n",
"f0=1/(2*pi*sqrt(L*CT));\n",
"print 'The operating freq is',round(f0/10**6,2),'MHz'"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 5 : pg 70"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The resonent freq is 1.78 MHz\n",
"The tuning voltage is 7.5 V\n"
]
}
],
"source": [
"# page no 70\n",
"#prob no 2.5\n",
"#calculate the resonant freq and tuning voltage\n",
"from math import sqrt,pi\n",
"#Given:\n",
"C=80*10**-12; L= 100*10**-6;\n",
"#calculations\n",
"#Part a) The resonent frequency is \n",
"f0=1/(2*pi*sqrt(L*C));\n",
"# Part b) In this part the circuit is resonate on doubling the frequency,therefore\n",
"f1=2*f0;\n",
"# from the equation of resonent frequency \n",
"C1=1/(4*(pi*f1)**2*L);\n",
"# Now for tuning voltage we have to use equation C1=Co/sqrt(1+2V)\n",
"Co=C;\n",
"# after solving the expression\n",
"v=((Co/C1)**2 -1)/2;\n",
"#results\n",
"print 'The resonent freq is',round(f0/10**6,2),'MHz'\n",
"print 'The tuning voltage is ',v,'V'"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 7 : pg 76"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The output frequencies at the output of square-law mixer are : 21.0 MHz 1.0 MHz\n"
]
}
],
"source": [
"\n",
"#page no 76\n",
"#calculate the output frequencies\n",
"#problem 2.7\n",
"#Given:\n",
"# all frequencies are in MHz\n",
"f1=11.;f2=10;\n",
"#calculations\n",
"# output frequencies at the output of square-law mixer\n",
"a=f1+f2;\n",
"b=f1-f2;\n",
"#results\n",
"print 'The output frequencies at the output of square-law mixer are : ',a,'MHz ',b,'MHz'"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 8 : pg 85"
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The capture range is 4.0 MHz\n",
"The lock range is 8.0 MHz\n",
"The freq at which the lock is acquired, moving downward in freq is 14.0 MHz\n",
"Lock will be lost on the way down at 8.0 MHz\n"
]
}
],
"source": [
"#page no 85\n",
"#calculate the capture range, lock range, frequency\n",
"#problem no. 2.8\n",
"# all the frequencies are in MHz\n",
"#Given:\n",
"freq_free_run =12.; \n",
"freq_lock1 =10.;\n",
"freq_lock2 =16.;\n",
"#calculations and results\n",
"# capture range is approximately twice the difference between the free-running freq and the freq at which lock is first achieved\n",
"capture_range =2*(freq_free_run - freq_lock1 );\n",
"print 'The capture range is ',capture_range,'MHz'\n",
"# lock range is approximately twice the the difference between the freq where lock is lost and free-running freq\n",
"lock_range = 2*(freq_lock2 - freq_free_run);\n",
"print 'The lock range is ',lock_range,'MHz'\n",
"# The PLL freq response id approximate symmetrical.\n",
"#This means the free-running freq is in the center of the lock range and capture range. Therefore\n",
"freq_lock_acquired = freq_free_run + (capture_range/2);\n",
"freq_lock_lost = freq_free_run - capture_range\n",
"print 'The freq at which the lock is acquired, moving downward in freq is ',freq_lock_acquired,'MHz'\n",
"print 'Lock will be lost on the way down at',freq_lock_lost,'MHz'"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 9 : pg 86"
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The values of N at high end is 170.0\n",
"The values of N at low end is 54.0\n"
]
}
],
"source": [
"#page no 86\n",
"#calculate the values of N at high and low ends\n",
"# prob no 2.9\n",
"# refer fig 2.38\n",
"#Given:\n",
"#Here we are using a 10MHz crystal, it will be necessar to devide it by a factor to get 10kHz\n",
"f_osc = 10.*10**6; f_ref=10.*10**3;f0_1=540.*10**3;f0_2=1700.*10**3;\n",
"#calculations\n",
"Q=f_osc/f_ref;\n",
"# we have to specify the range of values of N. Find N at each and of the tuning range\n",
"N1=f0_1/f_ref;\n",
"N2=f0_2/f_ref;\n",
"#results\n",
"print 'The values of N at high end is',N2\n",
"print 'The values of N at low end is',N1"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 10 : pg 89"
]
},
{
"cell_type": "code",
"execution_count": 12,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The step size that would have been obtained without prescaling 10000.0 Hz\n"
]
}
],
"source": [
"#page no 89\n",
"# prob no 2.10\n",
"# refer fig 2.40\n",
"#Given:\n",
"P=10.;f_ref=10.*10**3;M=10.;\n",
"#consider \n",
"N=1.;\n",
"#calculations\n",
"# With a fixed-modulus prescalar, the min freq step is \n",
"step_size=M*f_ref;\n",
"# With the two-modulus system, let the main divider modulus N remain constant & \n",
"#increase the modulus m to (m+1) to find how much the freq changes.\n",
"# for 1st case, o/p freq \n",
"fo=(M+N*P)*f_ref;\n",
"# for 2nd case where leave N alone but changes M to M+1, new o/p freq \n",
"fo_=(M+1+N*P)*f_ref;\n",
"# The difference is \n",
"f= fo_-fo;\n",
"#results\n",
"print 'The step size that would have been obtained without prescaling',f,'Hz'"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 11 : pg 91"
]
},
{
"cell_type": "code",
"execution_count": 13,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The output frequencies are 10.2 MHz 12.0 MHz\n",
"The step size is 20.0 kHz\n"
]
}
],
"source": [
"#page no 91\n",
"#prob no 2.11\n",
"#refer fig 2.42\n",
"#Given:\n",
"f_ref= 20.*10**3;\n",
"f_osc= 10.*10**6;\n",
"N1=10;N2=100.;\n",
"#calculations\n",
"f0=(N1*f_ref) + f_osc;\n",
"f1=(N2*f_ref) + f_osc;\n",
"step_size=(f1-f0)/(N2-N1);\n",
"#results\n",
"print 'The output frequencies are',f0/10**6,'MHz',f1/10**6,'MHz'\n",
"print 'The step size is',step_size/1000.,'kHz'"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 2",
"language": "python",
"name": "python2"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 2
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
"version": "2.7.11"
}
},
"nbformat": 4,
"nbformat_minor": 0
}
|