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
|
{
"metadata": {
"name": "",
"signature": "sha256:4900eeee12d5add487271b429c0cbafd110530ef7f850ea37e0c5905f6da1030"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
"cell_type": "heading",
"level": 1,
"metadata": {},
"source": [
"Ch-12 : Microwave Measurements"
]
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Page Number: 649 Example 12.1"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"from __future__ import division\n",
"#Given\n",
"Is=0.1*(10**-6) #A\n",
"Pi=0 #dBm\n",
"Cs=0.1*(10**-12) #F\n",
"Ls=2*(10**-9) \n",
"Cj=0.15*(10**-12) #F\n",
"Rs=10 #ohm\n",
"T=293 #K\n",
"nktbye=25*(10**-3) #V\n",
"\n",
"#Rj\n",
"Rj=(nktbye/Is) \n",
"print 'Rj:' ,Rj/1000,'Kohm'\n",
"\n",
"#Bi\n",
"Bi=nktbye/2 \n",
"Bii=Bi*1000 \n",
"print 'Bi:' ,Bii,'A/W'\n",
"\n",
"#Bv\n",
"Bv=Rj*Bii \n",
"print 'Bv:',Bv, 'V/W'"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Rj: 250.0 Kohm\n",
"Bi: 12.5 A/W\n",
"Bv: 3125000.0 V/W\n"
]
}
],
"prompt_number": 1
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Page Number: 650 Example 12.2"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"from math import log10 \n",
"#Given\n",
"vswr=4 \n",
"\n",
"modT=(vswr-1)/(vswr+1) \n",
"Lm=-10*log10(1-(modT*modT)) #dB\n",
"print 'Mismatch Loss:' ,Lm,'dB'\n",
"\n",
"#Sensitivity reduces by a factor\n",
"Bvd=(1-(modT*modT)) \n",
"Bvdp=Bvd*100 \n",
"print 'Voltge sensitivity reduces by:' ,Bvdp,'%'"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Mismatch Loss: -0.0 dB\n",
"Voltge sensitivity reduces by: 100 %\n"
]
}
],
"prompt_number": 3
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Page Number: 650 Example 12.3"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"from math import sqrt , pi\n",
"#Given\n",
"f=10e9 #Hz\n",
"c=3e10 #cm/s\n",
"a=4 #cm\n",
"s=0.1 #cm\n",
"lmb=c/f #cm\n",
"lmbg=lmb/(sqrt(1-((lmb/(2*a))**2))) \n",
"vswr=lmbg/(pi*s) \n",
"print 'VSWR: %0.3f'%vswr\n",
"\n",
"#Answer in book for lmbg is given as 3.49 but it should be 3.23 and hence the answer will be 10.3"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"VSWR: 10.301\n"
]
}
],
"prompt_number": 4
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Page Number: 651 Example 12.4"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
" \n",
"#Given\n",
"delx=3.5 #cm\n",
"s=0.25 #cm\n",
"\n",
"lmbg=2*delx \n",
"vswr=lmbg/(pi*s) \n",
"print 'VSWR: %0.3f'%vswr"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"VSWR: 8.913\n"
]
}
],
"prompt_number": 5
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Page Number: 651 Example 12.5"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
" \n",
"#Given\n",
"vswr=2 \n",
"Pin=4.5e-3 #W\n",
"\n",
"modT=(vswr-1)/(vswr+1) \n",
"#Power reflected,\n",
"Pr=(modT**2)*Pin \n",
"#As coupler samples only 1/1000th power\n",
"Prr=Pr*1000 \n",
"print 'Reflected Power:' ,Prr,'W'"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Reflected Power: 0.5 W\n"
]
}
],
"prompt_number": 5
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Page Number: 652 Example 12.6"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"from math import tan\n",
"#Given\n",
"Z0=50 #ohm\n",
"p=2.4 \n",
"L=0.313 \n",
"x=2*pi*L \n",
"y=tan(x) \n",
"\n",
"Zl=(Z0*(1+(p*p*1J)))/(p+(p*1J)) \n",
"T=(Zl-Z0)/(Zl+Z0) \n",
"p=sqrt(((T.real))**2+((T.imag))**2) \n",
"print 'Reflection coefficient: %0.3f'%p"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Reflection coefficient: 0.412\n"
]
}
],
"prompt_number": 6
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Page Number: 652 Example 12.7"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
" \n",
"#Given\n",
"Zl=25+25*1J #ohm\n",
"Z0=50 #ohm\n",
"\n",
"T=(Zl-Z0)/(Zl+Z0) \n",
"p=sqrt(((T.real))**2+((T.imag))**2) \n",
"print 'Reflection coefficient: %0.3f'%p\n",
"\n",
"vswrr=(1+p)/(1-p) \n",
"print 'VSWR: %0.3f'%vswrr\n",
"\n",
"#Fraction of power delivered\n",
"Pd=1-(p**2) \n",
"Pdp=Pd*100 \n",
"\n",
"print 'Fraction of power delivered:',Pdp, '%'"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Reflection coefficient: 0.447\n",
"VSWR: 2.618\n",
"Fraction of power delivered: 80.0 %\n"
]
}
],
"prompt_number": 8
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Page Number: 653 Example 12.8"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
" \n",
"#Given\n",
"d=2.4 #cm\n",
"lmbc=1.8 \n",
"c=3*10**10 #cm/s\n",
"\n",
"lmbg=2*d \n",
"lmb=(lmbg*lmbc)/(sqrt(lmbg**2+lmbc**2)) \n",
"#Operating frequency\n",
"f=c/lmb \n",
"print 'Operating frequency: %0.3f'%(f/10**9),'GHz'"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Operating frequency: 17.800 GHz\n"
]
}
],
"prompt_number": 9
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Page Number: 653 Example 12.9"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"from numpy import mat\n",
"#Given\n",
"p=1.5 \n",
"IsL=1 #dB\n",
"InL=30 #dB\n",
"\n",
"S21=10**(-IsL/20) \n",
"\n",
"#Assuming tgree ports to be identical\n",
"S32=S21 \n",
"S13=S21 \n",
"\n",
"#Isolations are also the same\n",
"S31=10**(-InL/20) \n",
"S23=S31 \n",
"S12=S31 \n",
"\n",
"#Refelction coefficients are also the same\n",
"T=(p-1)/(p+1) \n",
"S11=T \n",
"S22=T \n",
"S33=T \n",
"\n",
"S=mat([[S11, S12, S13], [S21, S22, S23], [S31, S32, S33] ])\n",
"print 'Matrix is:\\n' ,S"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Matrix is:\n",
"[[ 0.2 0.03162278 0.89125094]\n",
" [ 0.89125094 0.2 0.03162278]\n",
" [ 0.03162278 0.89125094 0.2 ]]\n"
]
}
],
"prompt_number": 10
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Page Number: 654 Example 12.10"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
" \n",
"#Given\n",
"R1=10.6 #GHz\n",
"R2=8.30 #GHz\n",
"Q0=8200 \n",
"Q0d=890 \n",
"\n",
"Er=(R1/R2)**2 \n",
"print 'Dielectric constant %0.3f'%Er\n",
"\n",
"Qd=(Q0-Q0d)/(Q0*Q0d) \n",
"print 'Loss tangent of dielectric' ,Qd"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Dielectric constant 1.631\n",
"Loss tangent of dielectric 0\n"
]
}
],
"prompt_number": 13
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Page Number: 654 Example 12.11"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
" \n",
"#Given\n",
"l0=0.15 #cm\n",
"lmbg=2*2.24 #cm\n",
"le=1.14 #cm\n",
"a=2.286 #cm\n",
"d=2 \n",
"\n",
"B0=(2*pi)/lmbg \n",
"x=tan(B0*l0)/(B0*l0) \n",
"#Also\n",
"x1=(l0*x)/le \n",
"#Correct value seems to be\n",
"Bele=2.786 \n",
"e1=((((a/pi)**2)*(Bele/le)**2)+1) \n",
"e2=(((2*a)/lmbg)**2)+1 \n",
"Er=e1/e2 \n",
"print 'Er: %0.3f'%Er\n",
"\n",
"\n",
"#Answer in book for Er is given as 2.062 but it should be 2.038"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Er: 2.039\n"
]
}
],
"prompt_number": 14
}
],
"metadata": {}
}
]
}
|