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
|
{
"metadata": {
"name": "",
"signature": "sha256:ea57204c71725b24fd5e19dcadce0d03f6181962151b0fccf8c6b17f9528b683"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
"cell_type": "heading",
"level": 1,
"metadata": {},
"source": [
"chapter07:Microwave Measurements"
]
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 7.1, Page number 278"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#calculate VSWR\n",
"#chapter-7 page 278 example 7.1\n",
"\n",
"import math\n",
"a=4.##Length of Waveguide in cm\n",
"b=2.5##breadth Waveguide in cm\n",
"f=10.**10.##Frequency in Hz\n",
"x=0.1##distance between twice minimum power points in cm\n",
"c=3.*10.**10.##Velocity of Light in cm/sec\n",
"\n",
"#CALCULATION\n",
"wc=2.*a##Cutoff wavelength in TE10 mode in cms\n",
"w0=(c/f)##Free space wavelength in cms\n",
"wg=(w0/math.sqrt(1-(w0/wc)**2.))##Guide wavelength in cms\n",
"S=(wg/(x*(math.pi)))##Voltage Standing Wave Ratio(VSWR) for double minimum method\n",
"\n",
"#OUTPUT\n",
"print '%s %.1f' %('\\nFor double minimum method, Voltage Standing Wave Ratio(VSWR) is S=',S)#\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"\n",
"For double minimum method, Voltage Standing Wave Ratio(VSWR) is S= 10.3\n"
]
}
],
"prompt_number": 1
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 7.2, Page number 279"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#calculate reflected power and VSWR\n",
"#chapter-7 page 279 example 7.2\n",
"import math\n",
"x=3##O/P incident power from first directional coupler in mW\n",
"y=0.1##O/P reflected power from second directional coupler in mW\n",
"\n",
"#CALCULATION\n",
"Pi=x*100.##Incident Power in mW\n",
"Pr=y*100.##Reflected Power in mW\n",
"p=math.sqrt(Pr/Pi)##Reflection Coefficient\n",
"S=((1+p)/(1-p))##Voltage Standing Wave Ratio(VSWR)\n",
"\n",
"#OUTPUT\n",
"print '%s %.f %s %s %.2f' %('\\nReflected Power is Pr=',Pr,'mW','\\nVoltage Standing Wave Ratio(VSWR)in the main waveguide is S=',S)#\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"\n",
"Reflected Power is Pr= 10 mW \n",
"Voltage Standing Wave Ratio(VSWR)in the main waveguide is S= 1.45\n"
]
}
],
"prompt_number": 2
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 7.3, Page number 279"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#calculate VSWR\n",
"import math\n",
"\n",
"#Variable declaration\n",
"Pr = 0.15*10**-3 #reflected power(W)\n",
"Pi = 2.5*10**-3 #incident power(W)\n",
"\n",
"#Calculations\n",
"rho = math.sqrt(Pr/Pi)\n",
"s = (1+rho)/(1-rho)\n",
"\n",
"#Results\n",
"print \"VSWR =\",round(s,2)"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"VSWR = 1.65\n"
]
}
],
"prompt_number": 3
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 7.4, Page number 279"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#calculate reflected power\n",
"import math\n",
"\n",
"#Variable declaration\n",
"s = 2. #VSWR\n",
"Pi = 4.5*10**-3*1000 #incident power(W)\n",
"c = 30 #couplers\n",
"\n",
"#Calculations\n",
"#s = (1+rho)/(1-rho)\n",
"rho = (s-1)/(s+1)\n",
"Pr = rho**2*Pi\n",
"\n",
"#Results\n",
"print \"Reflected power =\",Pr,\"W\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Reflected power = 0.5 W\n"
]
}
],
"prompt_number": 4
}
],
"metadata": {}
}
]
}
|