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
|
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Chapter 12: Microwave Measurements"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 12.10: Air_filled_cavity.sce"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"//Page Number: 654\n",
"//Example 12.10\n",
"clc;\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",
"disp(Er,'Dielectric constant');\n",
"\n",
"Qd=(Q0-Q0d)/(Q0*Q0d);\n",
"disp(Qd,'Loss tangent of dielectric');"
]
}
,
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 12.11: Rectangular_Waveguide.sce"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"//Page Number: 654\n",
"//Example 12.11\n",
"clc;\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",
"disp(Er,'Er:');\n",
"\n",
"\n",
"//Answer in book for Er is given as 2.062 but it should be 2.038"
]
}
,
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 12.1: Microwave_diode.sce"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"//Page Number: 649\n",
"//Example 12.1\n",
"clc;\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",
"disp('Kohm',Rj/1000,'Rj:');\n",
"\n",
"//Bi\n",
"Bi=nktbye/2;\n",
"Bii=Bi*1000;\n",
"disp('A/W',Bii,'Bi:');\n",
"\n",
"//Bv\n",
"Bv=Rj*Bii;\n",
"disp('V/W',Bv,'Bv:');"
]
}
,
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 12.2: Detector_mismatch.sce"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"//Page Number: 650\n",
"//Example 12.2\n",
"clc;\n",
"//Given\n",
"vswr=4;\n",
"\n",
"modT=(vswr-1)/(vswr+1);\n",
"Lm=-10*log10(1-(modT*modT)); //dB\n",
"disp('dB',Lm,'Mismatch Loss:');\n",
"\n",
"//Sensitivity reduces by a factor\n",
"Bvd=(1-(modT*modT));\n",
"Bvdp=Bvd*100;\n",
"disp('%',Bvdp,'Voltge sensitivity reduces by:');\n",
"\n",
"\n",
""
]
}
,
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 12.3: Transmission_waveguide.sce"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"//Page Number: 650\n",
"//Example 12.3\n",
"clc;\n",
"//Given\n",
"f=10D+9; //Hz\n",
"c=3D+10; //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",
"disp(vswr,'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"
]
}
,
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 12.4: VSWR_of_waveguide.sce"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"//Page Number: 651\n",
"//Example 12.4\n",
"clc;\n",
"//Given\n",
"delx=3.5; //cm\n",
"s=0.25; //cm\n",
"\n",
"lmbg=2*delx;\n",
"vswr=lmbg/(%pi*s);\n",
"disp(vswr,'VSWR:');\n",
"\n",
""
]
}
,
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 12.5: Directional_couplers.sce"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"//Page Number: 651\n",
"//Example 12.5\n",
"clc;\n",
"//Given\n",
"vswr=2;\n",
"Pin=4.5D-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",
"disp('W',Prr,'Reflected Power:');"
]
}
,
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 12.6: Microwave_line.sce"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"//Page Number: 652\n",
"//Example 12.6\n",
"clc;\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*%i)))/(p+(p*%i));\n",
"T=(Zl-Z0)/(Zl+Z0);\n",
"p=sqrt((real(T))^2+(imag(T))^2);\n",
"disp(p,'Reflection coefficient:');\n",
""
]
}
,
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 12.7: Microwave_line.sce"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"//Page Number: 652\n",
"//Example 12.7\n",
"clc;\n",
"//Given\n",
"Zl=25+25*%i; //ohm\n",
"Z0=50; //ohm\n",
"\n",
"T=(Zl-Z0)/(Zl+Z0);\n",
"p=sqrt((real(T))^2+(imag(T))^2);\n",
"disp(p,'Reflection coefficient:');\n",
"\n",
"vswrr=(1+p)/(1-p);\n",
"disp(vswrr,'VSWR:');\n",
"\n",
"//Fraction of power delivered\n",
"Pd=1-(p^2);\n",
"Pdp=Pd*100;\n",
"disp('%',Pdp,'Fraction of power delivered:');"
]
}
,
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 12.8: Rectangular_waveguide.sce"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"//Page Number: 653\n",
"//Example 12.8\n",
"clc;\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",
"disp('GHz',f/10^9,'Operating frequency:');"
]
}
,
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 12.9: Three_port_circulator.sce"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"//Page Number: 653\n",
"//Example 12.9\n",
"clc;\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=[S11 S12 S13;S21 S22 S23;S31 S32 S33];\n",
"disp(S,'Matrix is:');\n",
""
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Scilab",
"language": "scilab",
"name": "scilab"
},
"language_info": {
"file_extension": ".sce",
"help_links": [
{
"text": "MetaKernel Magics",
"url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md"
}
],
"mimetype": "text/x-octave",
"name": "scilab",
"version": "0.7.1"
}
},
"nbformat": 4,
"nbformat_minor": 0
}
|