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
|
{
"metadata": {
"name": "",
"signature": "sha256:ee8ead130cd20bf208c1745a750e51dbe8ebb757e8693bff3ccfb09c0b5cc29e"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
"cell_type": "heading",
"level": 1,
"metadata": {},
"source": [
"Chapter4:MICROWAVE WAVEGUIDES AND COMPONENTS"
]
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Eg4.1.1:pg-128"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#(a)program to find the cut-off frequency (fc) of an air-filled rectangular waveguide in TE10 mode.\n",
"a=0.07 #wave-guide dimension in meters\n",
"b=0.035 #wave-guide dimension in meters\n",
"f=3.5*(10**9) #operating frequency in Hz \n",
"c=3*(10**8) # c is the speed of the light (m/s)\n",
"m=1 #Given that guide operates in the dominant mode TE10\n",
"n=0\n",
"fc=c/(a*2) #since,fc=(c/2)*sqrt(((m/a)**2)+((n/b)**2)). For TE10 mode m=1,n=0,fc=c/2*a \n",
"print\"Cut-off frequency for TE10 mode (in GHz)is=\",round(fc/10**9,2),\"GHz\"#print fc ,fc is divided by 10**9 to obtain frequency in GHZ\n",
"\n",
"#(b) program to find the phase velocity of the wave in the guide at a frequency of 3.5GHZ\n",
" \n",
"vg=c/(sqrt(1-((fc/f)**2))) #since , phase velocity=c/(sqrt(1-((fc/f)**2))) \n",
"print\"Phase velocity for a wave at a frequency of 3.5GHZ (m/s)is=\",\"{:.2e}\".format(vg),\"m/s\" #print the phase velocity\n",
"\n",
"# (c) program to find the guideD wavelength(lg of the wavE at a frequency of 3.5GHZ)\n",
"lo=c/f # lo= wavelength in an unbounded dielectric and lo is in meters\n",
"lg_in_metres=lo/(sqrt(1-((fc/f)**2))) #since ,lg=lo/sqrt(1-((fc/f)**2)) guide wavelength(lg) is in meter\n",
"lg_in_cm=100*lg_in_metres #guided wavelength (lg) is in centimeters\n",
"print\"Guided wavelength for a wave at frequency of 3.5GHZ (cm)is=\",round(lg_in_cm,1),\"cm\" "
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Cut-off frequency for TE10 mode (in GHz)is= 2.14 GHz\n",
"Phase velocity for a wave at a frequency of 3.5GHZ (m/s)is= 3.79e+08 m/s\n",
"Guided wavelength for a wave at frequency of 3.5GHZ (cm)is= 10.8 cm\n"
]
}
],
"prompt_number": 32
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Eg4.1.2:pg-133"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"from scipy.integrate import dblquad\n",
"import math\n",
"#Program to find the peak value of the electric field occuring in the guide.\n",
"m=1 #given guide transports energy in the TE10 mode.\n",
"n=0\n",
"f=30*(10**9) #The impressed frequency in Hertz\n",
"uo=(4*(math.pi))*(10**-7) #scientific value of permeability of free space\n",
"eo=8.854*(10**(-12)) #permittivity of free space in F/m\n",
"a=0.02 # dimensions of wave-guide given in metres\n",
"b=0.01\n",
"energyrate=0.5*746 #given ,the rate of transport of energy =0.5 hp,1 horse power(1 hp)= 746 watts.\n",
"kc=math.pi/a #kc is cutoff wave number ,kc=sqrt((m*pi/a)**2+(n*pi/b)**2),For m=1,n=0 we get kc=pi/a\n",
"bg=sqrt((((2*math.pi*f)**2)*(uo*eo)) -(kc**2)) #bg is the phase constant in radian/metre, bg=sqrt(((w**2)*(uo*eo))-(kc**2)) where w=2*pi*f\n",
"Zg=((2*math.pi*30*(10**9))*uo)/bg #Zg is the characteristic wave impedence ,Zg=(w*uo)/bg where w=2*pi*f\n",
"\n",
"#Defining the variables\n",
"Ex=0 #For TE10 mode Ex=0\n",
"#Ey = Eoy*sin((pi*x)/a)*exp(-1j*bg*z) (for TE10 mode) \n",
"Ez=0 #For TE10 mode Ez=0 \n",
"#since, Hx=(Eoy/Zg)*sin(pi*x)/a)*exp(-1j*bg*z) (for TE10 mode)\n",
"Hy = 0 #For TE10 mode Hy=0\n",
"#Hz=Hoz*cos((pi*x)/a)*exp(-1j*bg*z) (for TE10 mode).\n",
"p=dblquad(lambda x, y :(sin((math.pi*x)/a))**2, 0, b, lambda x:0 ,lambda x:a )\n",
"p=p[0]\n",
"c=(bg*p)/(4*math.pi*f*uo)\n",
"p=c*(eoy)**2\n",
"p=373.\n",
"eoy=sqrt(p/c)\n",
"print\"The peak value of the electric intensity is=\",\"Eoy=\", round(eoy/1000,2),\"KV/m\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The peak value of the electric intensity is= Eoy= 53.87 KV/m\n"
]
}
],
"prompt_number": 35
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Eg4.2.1:pg-144"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math\n",
"# (a) program to find the cut off frequency (fc) of circular waveguide in TE11 mode\n",
"radius=0.05 #Given .Here radius is in meters. \n",
"f=3*(10**9) #operating frequency in Hertz\n",
"uo=(4*(math.pi))*(10**-7) #scientific value of permeability of free space \n",
"eo=8.85*(10**(-12)) #permittivity of free space in F/m\n",
"n=1 #Given that a TE11 mode is propagating.\n",
"p=1 \n",
"X=1.841 #For TE11 mode in circular waveguide X= (kc*radius) =1.841\n",
"kc=X/radius #cut-off wave number\n",
"fc=kc/((2*math.pi)*(sqrt(uo*eo))) #since fc=kc/((2*pi)*(sqrt(uo*eo))) \n",
"print\"Cut-off frequency for TE11 mode (in Hz)is=\",\"{:.3e}\".format(fc),\"Hz\" \n",
"\n",
"# (b) program to find the guide wavelength(lg) of the wave at operating frequency of 3GHZ\n",
"bg=sqrt((((2*math.pi*f)**2)*(uo*eo)) - (kc**2)) #bg is the phase constant in radian/metre, bg=sqrt(((w**2)*(uo*eo))-(kc**2)) where w=2*pi*f\n",
"lg_in_metres=(2*math.pi)/bg #Guide wavelength is in meters\n",
"lg_in_cm=100*lg_in_metres #Guide wavelength is in centimeters\n",
"print\"Guide wavelength for a wave at a frequency of 3GHz(in cm)is=\",round(lg_in_cm,1),\"cm\" # print Guide wavelength for TE11 mode\n",
"\n",
"# (c) program to find the wave impedance zg in the guide\n",
"zg=(2*math.pi*f*uo)/bg #Zg is the characteristic wave impedence ,Zg=(w*uo)/bg where w=2*pi*f\n",
"print\"Wave impedance zg in the wave guide(in ohm)=\",int(round(zg)),\"ohm\" #print wave impedance in the wave guide"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Cut-off frequency for TE11 mode (in Hz)is= 1.757e+09 Hz\n",
"Guide wavelength for a wave at a frequency of 3GHz(in cm)is= 12.3 cm\n",
"Wave impedance zg in the wave guide(in ohm)= 465 ohm\n"
]
}
],
"prompt_number": 4
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Eg4.2.2:pg-147"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math\n",
"#program to find all the TE(n,p) and TM(n,p)modes for which energy transmisssion is possible.\n",
"\n",
"radius=0.02 #Given. Here radius is in metres. \n",
"uo=(4*(math.pi))*(10**-7) #scientific values of permeability of free space\n",
"eo=8.85*(10**(-12)) #permittivity of free space in F/m\n",
"f=(10**10) #operating frequency in Hertz\n",
"wc=(2*math.pi*f) #since, wc=(2*pi*f) is the angular frequency in Hertz\n",
"kc=wc*sqrt(uo*eo) #kc is cut-off wave number \n",
"X=kc*radius #the product X=(kc*radius) for a given mode is constant\n",
"print\"The value of the product X=(kc*radius)is =\",round(X,2) #print the product X=(kc*a)\n",
"print\"Any mode having a product (kc*radius) less than or equal to 4.19 will propagate the wave with a frequency of 10 GHZ .This is \\n\",\"(kc*radius)< =4.19\"\n",
"print\"The possible modes are\" \n",
"print\"TE11(1.841) TM01(2.405) \\n\",\"TE21(3.054) TM11(3.832) \\n\",\"TE01(3.832)\" \n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The value of the product X=(kc*radius)is = 4.19\n",
"Any mode having a product (kc*radius) less than or equal to 4.19 will propagate the wave with a frequency of 10 GHZ .This is \n",
"(kc*radius)< =4.19\n",
"The possible modes are\n",
"TE11(1.841) TM01(2.405) \n",
"TE21(3.054) TM11(3.832) \n",
"TE01(3.832)\n"
]
}
],
"prompt_number": 16
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Eg4.5.1:pg-170"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#(a)program to find the amount of the power dissipated in the load Zl\n",
"PT4=8 #Given.Transmitted power to Bolometer 1 at port 4 in mW\n",
"s=2 #Given.VSWR of 2.0 is introduced on arm 4 by Bolometer 1 in mW \n",
"r4=(s-1)/(s+1) #reflection coefficient at port 4(r4)\n",
"PR4=8/8 #(r4**2)=PR4/PI4=PR4/(PR4+PT4)=PR4/PR4+8=1/9 so we get 8PR4=8 \n",
"PI4=PT4 + PR4 #PI4=power incident at port 4 PT4=power transmitted at port 4 PR4=power reflected at port 4 \n",
"#Since port 3 is matched and the Bolometer at port 3 reads 2mw ,then 1 mw must be radiated through the holes. \n",
"#Since 20 dB is equivalent to a power of 100:1,the power input at port 2 is given by PI2\n",
"PI2=100*PI4 \n",
"PR2=100.0*PR4 #power reflected from the load at port 2 is given by (mW)\n",
"PT2=PI2-PR2 #power dissipated in the load = incident power - reflected power\n",
"print\"power dissipated in the load at port 2 is given by (mW) =\",int(PT2),\"mW\" \n",
"\n",
"#(b)Program to find the VSWR on arm 2\n",
"r=sqrt(PR2/PI2) #reflection coefficient at port 2\n",
"s=(1+r)/(1-r) #VSWR ON ARM 2 \n",
"print\"value of VSWR ON ARM 2 is=\",s "
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"power dissipated in the load at port 2 is given by (mW) = 800 mW\n",
"value of VSWR ON ARM 2 is= 2.0\n"
]
}
],
"prompt_number": 37
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Eg4.5.2:pg-174"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math\n",
"#(a)Program to find out the input and output VSWRs.\n",
"s11=0 #for balanced amplifier s11=(1/2)*(s11a-s11b) where s11a=s11b is given in question\n",
"s=(1+s11)/(1-s11) #Input VSWR\n",
"print\"Input vswr=\",s \n",
"s22=0 #for balanced amplifier s22=(1/2)*(s22a-s22b) where s22a=s22b is given in question\n",
"s=(1+s22)/(1-s22) #output VSWR\n",
"print\"Output vswr=\",s \n",
"\n",
"#(b)Program to find out the output power in watts\n",
"Pg=10 #power gain of each GaAs chip(dB)\n",
"n=2 #number of GaAs chip\n",
"pin=200 #input signal power in mW\n",
"PO=pin*Pg*n #output power(PO)=[power input]*[power gain of each GaAs chip]*[n],here n=2\n",
"print\"Output POWER (in Watt)=\",PO/1000,\"W\" #print power in watts by dividing PO by 1000\n",
"\n",
"#(C)Program to find out the linear output power gain in db \n",
"GAIN=10*math.log10(2) #BECAUSE TWO CHIPS ARE IN PARALLEL. Gain=(power gain of each GaAs chip)*log(n),n=2.\n",
"print\"Linear output power gain (in db)=\",int(round(GAIN)),\"dB\" #print linear output power gain in db"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Input vswr= 1\n",
"Output vswr= 1\n",
"Output POWER (in Watt)= 4 W\n",
"Linear output power gain (in db)= 3 dB\n"
]
}
],
"prompt_number": 36
}
],
"metadata": {}
}
]
}
|