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
|
{
"metadata": {
"name": ""
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<h1>Chapter 12: The Cylindrical Antenna and the Moment Method (MM)<h1>"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<h3>Example 12-12.1, Page number: 472<h3>"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"from math import pi\n",
"import numpy as np\n",
"\n",
"#Variable declaration\n",
"N = 3 #Piecewise sinusoidal dipole modes (unitless)\n",
"l = 1/10.0 #Dipole length (lambda)\n",
"z11_exact = 0.4935 - 3454j #Exact impedence vector(ohm)\n",
"z11_apprx = 0.4944 - 3426j #approximate impedence vector(ohm)\n",
"z12_exact = 0.4935 + 1753j #Exact impedence vector(ohm)\n",
"z12_apprx = 0.4945 + 1576j #approximate impedence vector(ohm)\n",
"z13_exact = 0.4935 + 129.9j #Exact impedence vector(ohm)\n",
"z13_apprx = 0.4885 + 132.2j #approximate impedence vector(ohm)\n",
"\n",
"#Calculations\n",
"N2 = N + 1 #Number of equal segments (unitless)\n",
"d = l/4 #Length of each segment (lambda)\n",
"Rmn = 20*(2*pi*d)**2 #Real part of elements of Z-matrix, Zmn (VA)\n",
"zmat_apprx = np.array([[(z11_apprx+z13_apprx), z12_apprx],\n",
" [2*z12_apprx, z11_apprx]])\n",
" #Z(impedence) matrix (unitless)\n",
"vmat = np.array([0,1]) #Voltage matrix (unitless)\n",
"i1,i2 = np.linalg.solve(zmat_apprx,vmat) #Current matrix (unitless)\n",
"i_ratio = i2/i1 #Current ratio (unitless)\n",
"zin = vmat[1]/i2 #Input impedence (ohm)\n",
"\n",
"\n",
"zmat_exact = np.array([[(z11_exact+z13_exact), z12_exact],\n",
" [2*z12_exact, z11_exact]])\n",
"i1_e,i2_e = np.linalg.solve(zmat_exact,vmat) #Current matrix (unitless)\n",
"i_ratio_exact = i2_e/i1_e #Current ratio (unitless)\n",
"zin_exact = vmat[1]/i2_e #Input impedence (ohm)\n",
"\n",
"\n",
"#Result\n",
"print \"The current ratio is \", np.around(i_ratio,4)\n",
"print \"This is nearly equal to 1.9,\" \\\n",
" \"indicating a nearly triangular current distribution\"\n",
"print \"The input impdence is \", np.around(zin,3), \"ohm using approximate values\"\n",
"print \"The input impedence is \", np.around(zin_exact,3), \"ohm using exact values\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The current ratio is (2.09+0.0013j)\n",
"This is nearly equal to 1.9,indicating a nearly triangular current distribution\n",
"The input impdence is (1.891-1917.848j) ohm using approximate values\n",
"The input impedence is (2.083-1605.074j) ohm using exact values\n"
]
}
],
"prompt_number": 2
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<h3>Example 12-12.2, Page number: 473<h3>"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"from math import tan, pi\n",
"import numpy as np\n",
"\n",
"#Variable declaration\n",
"z_load = 2.083 + 1605j #conjugate matched load (ohm)\n",
"e0 = 1.0 #Electric field magnitude (unitless)\n",
"l = 1/10.0 #length of dipole (lambda)\n",
"imag = 0+1j #Imaginary number \n",
"\n",
"z11_exact = 0.4935 - 3454j #Exact impedence vector(ohm)\n",
"z11_apprx = 0.4944 - 3426j #approximate impedence vector(ohm)\n",
"z12_exact = 0.4935 + 1753j #Exact impedence vector(ohm)\n",
"z12_apprx = 0.4945 + 1576j #approximate impedence vector(ohm)\n",
"z13_exact = 0.4935 + 129.9j #Exact impedence vector(ohm)\n",
"z13_apprx = 0.4885 + 132.2j #approximate impedence vector(ohm)\n",
"\n",
"#Calculation\n",
"d = l/4 #Length of each segment (lambda)\n",
"vm = (2*e0/(2*pi))*tan(2*pi*d/2) #Voltage vector (VA)\n",
"z22 = z11_exact + z_load #Impedence matrix for loaded dipole (VA)\n",
"zmat_exact = np.array([[(z11_exact+z13_exact), z12_exact],\n",
" [2*z12_exact, z22]])\n",
" #Z(impedence) matrix (unitless)\n",
"vmat = np.array([vm,vm]) #Voltage matrix (unitless)\n",
"i1,i2 = np.linalg.solve(zmat_exact,vmat) #Current matrix (unitless)\n",
"i3 = i1 #Current vector (unitless)\n",
"\n",
"e_zn = (60*tan(2*pi*d/2))*imag #Free space electric field (V/m)\n",
"\n",
"e_s = i1*e_zn + i2*e_zn + i3*e_zn #Scattered field (V/m)\n",
"\n",
"sigma = 4*pi*(abs(e_s)**2)/(abs(e0)**2) #Radar Cross section (lambda**2)\n",
"\n",
"#Result\n",
"print \"The radar cross section using exact values of Z matrix is\", round(sigma,4),\\\n",
" \"lambda^2\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The radar cross section using exact values of Z matrix is 0.1805 lambda^2\n"
]
}
],
"prompt_number": 3
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<h3>Example 12-12.3, Page number: 475<h3>"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import numpy as np\n",
"\n",
"#Variable declaration\n",
"z11_exact = 2-1921j #Exact impedence vector (ohm)\n",
"z12_exact = 1.9971-325.1j #Exact impedence vector (ohm)\n",
"\n",
"z11_apprx = 1.9739-1992j #Approximate impedence vector (ohm)\n",
"z12_apprx = 1.9739-232.8j #Approximate impedence vector (ohm)\n",
"\n",
"vmat = np.array([1,0])\n",
"\n",
"#Calculations\n",
"zmat_exact = np.array([[z11_apprx, z12_apprx],\n",
" [z12_apprx, z11_apprx]]) \n",
" #Impedence matrix (unitless)\n",
"i1,i2 = np.linalg.solve(zmat_exact,vmat)\n",
" #Current matrix (unitless)\n",
"zin = 1/i1\n",
"\n",
"#Result\n",
"print \"The input impedence for order N = 2 is\", np.around(zin,3), \"ohm\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The input impedence for order N = 2 is (1.539-1964.795j) ohm\n"
]
}
],
"prompt_number": 4
}
],
"metadata": {}
}
]
}
|