File: article.tex

package info (click to toggle)
jiffy 19990706-3
  • links: PTS
  • area: main
  • in suites: potato
  • size: 1,196 kB
  • ctags: 12
  • sloc: tcl: 730; makefile: 59
file content (513 lines) | stat: -rw-r--r-- 21,340 bytes parent folder | download | duplicates (2)
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
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
\documentclass{article}
\usepackage{epsfig}

\begin{document}
\begin{centering}
  ``Jiffy''\\
  Visualization Software\\
  for\\
  NEC-based Antenna Design\\
  by\\
  Bill Walker W5GFE\\
  bw@cs.ecok.edu\\
\end{centering}

\section{Introduction}

It is never been easier to design antennas!  Most hams enjoy
``fiddling'' with antennas, but comparatively few of us are really
interested in doing one-handed chin-ups at fifty feet above the cold
frozen earth on a snowy and windy night in January.  (``Been there,
done that, and have the T-shirt!'')



\section{Modeling Software}

In recent years there has become available a large variety of software
intended for hobby class computers which is capable of modeling
antenna configurations.  Some of these programs are extremely capable
and sophisticated.  Their wide availability has wrought a
revolution in antenna design, and has turned serious design from a
``black art'' to a ``cottage industry''.  In particular, the programs 
from W7EL (see \cite{bib:w7el})  have
been used to great effect on machines with operating systems such as
MSDOS, Windows 3.1, or Windows 95.  Those programs will almost
certainly work well with the next class of operating systems for the
hobbyist market, such as Windows NT or the promised Windows 98.

For those amateurs who desire to work with other operating systems
there is a great deal of  software ``out there'' for modeling, but
comparatively  little software for visualizing the results of that
modeling.

Hams who are involved with such operating systems as Unix, or its many
derivatives, are unlikely to be satisfied with hobbyist operating
systems.  This statement is not meant to ``draw fire''.  People who
are satisfied, for whatever reason, with what they are using are
unlikely to be pleased if they have to  change to something they
do not want to use, no matter what the reason.  For those who have not
used Unix, FreeSCO Unix, or some form of Linux, my personal opinion is
that you are missing something.

The ``grand-daddy'' of modeling programs appears to be ``NEC'', a
program which resulted from government research, and which still seems
to be regarded today as an extremely capable program.  NEC is widely
available in source code form on the Internet (See \cite{bib:necsource}).
In its original form, NEC  consists of about 9000 or so lines of
FORTRAN.  There are equivalent conversions to the C language which are
no smaller.

NEC  compiles cleanly under the popular g77
  compilers (See \cite{bib:GNU}), which are widely available for most versions of
  Linux and Unix.  Implementations of g77 are available for SCO Unix
  3.2v5.0.X from several sources including \cite{bib:egcs}.
The net result is that unix-based professional modeling programs are available
  for free over the Internet, and those programs are suitable for use
  by the average amateur with a modest computer.


The output from
NEC, however, consists mostly of long columns of numbers, and using
that output for design may be tedious at best.  Thus, the purpose of
this article.


\section{Various Visualization Aids}

The huge number of Unix-like systems on the Internet has spawned an
enormous collection of software for those systems.  The interest in
Linux, especially, seems to have caused a lot of creativity to have
been expended.  Plotting is an activity that has received a lot of
attention, and there are a number of plotting systems available on the
net which an average amateur easily can manage to compile and install.

It is no wonder that several amateurs, notably KD6PAG \cite{bib:KD6PAG}
and I2KFX have
devoted considerable effort to making the output of NEC more
``friendly''.
For instance, KD6PAG has developed a plotting package 
that reads the output of NEC
and generates a GIF image which can be manipulated by any of a huge  number
of tools.  I2KFX has recently published on the Internet (\cite{bib:I5})
a program based on the ``yorick''(\cite{bib:yorick}) package
and which generates screens (including a Smith chart) under X-windows
which are extremely helpful in designing antennas.

The purpose of this article is to introduce yet another visualization
package (the ``GFE'' system -- ``Jiffy'' for short)
which may be useful to amateurs.  It is based on the popular
TCL/TK language which is available in the public domain, and which
compiles ``out of the
box'' on Linux and SCO Unix systems, and most other Unix systems.
Compiled versions are
available for the various flavors of Windows operating systems 
for PC's as well.


The W5GFE software system is based on an extension of TCL/TK called
``BLT'' (See \cite{bib:BLT} ).  This extension is  easy to compile and install
cleanly on SCO Unix, and should prove to be no problem  under
Linux.  Binary versions are available from various FTP sites.

\section{The GFE ``Jiffy'' Software}

The software consists of a suite of five short programs, each of which
is intended to serve a specific purpose.  Two of these programs are
trivial in nature and serve 
merely as tools of convenience.  The effect of these two programs is
so miniscule that the programs are really unnecessary, but if you are
working with a large number of antennas you may find them handy.

\begin{description}
\item[wires.tcl] is intended to assist in visualizing the physical
  arrangement of the wires which make up an antenna.  While this tool
  is a simple one, it is especially helpful and I find that I use it a
  great deal.
  
\item[preelev.tcl] is intended to ``preprocess'' NEC input data to
  ensure that NEC will deliver output data that is useful for other
  programs in the suite if one wishes to view ``elevation graphs''.
  This is one of the ``tools of convenience''.  
  
\item[preazimuth.tcl] serves much the same function, but helps NEC
  produce output data for ``azimuth graphs''.  This is the other
  ``tool of convenience''.

  
\item[elevpattern.tcl] takes the output from a NEC run and provides an
  ``elevation graph'' which depicts the vertical plane pattern of the
  antenna.  The output consists of three graphs, one with Cartesian
  coordinates, and two with polar coordinate renditions.
  
\item[azpattern.tcl] takes the output from a NEC run and provides an
  ``azimuth graph'', or  horizontal plane pattern of the antenna.  Like
  ``elevpattern.tcl'' this program produces three graphs.
\end{description}



\section{An Example of Use}

So let's try it!  Rather than design an ideal antenna and assume we
have the real estate to accommodate it, let us instead try to design
an antenna that must fit in a real situation.


Our rural Oklahoma home sits on about 37 acres of
dense oak forest.  The house is situated on the highest portion of the
land, and the only open portion consists of a meadow running from the
house to our southern fence.  The meadow is long and comparatively
narrow, so it is natural for a ham to consider planting a rhombic in
that area.

There are physical constraints of course.  The meadow would accommodate a
rhombic that was no more than 120 feet wide at its widest point, and
perhaps 240 feet long.  By using four telephone poles at the corners
of the antenna I expect to be able to place the antenna about 50 feet
above the ground.  The ``folklore'' would suggest that this is too
low, but the real question is,  would such an antenna be worth
building for 20 meters ?


We start by drawing a diamond (rhombus) with a center at the origin,
a ``long diagonal'' of 240 feet, and a ``short diagonal'' of 120
feet.    This is actually quite a bit different from contriving a
theoretical antenna by first determining the length of each leg.  Here
I am trying to ``fit'' an antenna into a given space.
Since
I am just ``exploring'' I will assume that the wire I will use has a
radius of 0.01 feet, which should be close enough.  The resulting data
cards for NEC are:

\begin{verbatim}
CM NEC Input File for Rhombic
CE
GW  1 10   -120.0     0.0     50.0        0.0    60.0    50.0   0.01
GW  2 10   -120.0     0.0     50.0        0.0   -60.0    50.0   0.01
GW  3 10    0.0      60.0     50.0      120.0     0.0    50.0   0.01
GW  4 10    0.0     -60.0     50.0      120.0     0.0    50.0   0.01
GS  0  0    0.3048
GE  1
GN  1  0      0    0     0.0      0.0  0.0  0.0      0.0     0.0
FR  0  1      0    0    14.0      0.0  0.0  0.0      0.0     0.0
EX  0  1      1    0     1.0      0.0  0.0  0.0      0.0     0.0
EX  0  2      1    0    -1.0      0.0  0.0  0.0      0.0     0.0
RP  0  180    1 1001   -90.0      0.0  1.0  0.0  10000.0     0.0
EN

\end{verbatim}



There are a number of resources, particularly on the
Internet (\cite {bib:necdocs}) which will be of great help in learning to
describe a given antenna to NEC.  The art is somewhat arcane, but not
difficult to master, at least  for antennas 
built from ``straight wires''.

We describe each of these ``cards'' briefly.  The cards which begin
with ``CM'' are ``comment cards''.  These cards are collected at the
front of the card deck, and the entire collection of comment cards is
terminated with a ``CE''card.  Some versions of NEC will allow these
cards to be interspersed throughout the card deck, while others will
require the comment cards to occur only on the front of the data deck.


The next card, a ``GW'' card, provides coordinates for the endpoints
of a single wire.  There may be many such cards in a deck, with each
``GW'' card describing a wire,  and the
collection of ``GW'' cards describe the shape of an antenna.  Since
NEC expects its input to utilize measurements in meters, and I have
input the coordinates of the antenna in feet, the ``GS'' card is used
to scale the entire antenna to metric measure.  (Multiplying ``feet''
by 0.3048 yields ``meters''.)

The
``GE'' card marks the end of the description of the physical antenna
itself.

The ``GN'' card specifies the characteristics of the ground, and the
``FR'' card indicates a frequency (14.0 mhz in this case)  
for the applied excitation, which is
further described by the ``EX'' card.

For our purposes, the ``RP'' card, which requests calculation of a
``Radiation Pattern'' is the most important.  More in a moment about
that one.

The ``EN'' card signals the end of  the data deck.

I have not yet bothered with trying to ``terminate'' the rhombic at this
stage since I am still just ``exploring'' anyway.

Storing the data in a file and using ``wires.tcl filename'' I see
these three windows.  (There is no need to run NEC yet.  We are just
trying to see what the sky wire will look like.)

\epsfig{file=wiresxy.ps,width=4.5in}


\epsfig{file=wiresxz.ps, width=4.5in}


\epsfig{file=wiresyz.ps, width=4.5in}


The windows represent three ``views'' of the antenna.  One view has
the observer ``looking down'' on the antenna, a second view represents
what an observer would see if the observer was directly north of the
antenna, and the third window represents a view from the east.
These three ``views'' should help visualize the antenna.  The
``wires'' are colored the same way in each of the windows so that if
you are modeling a more complicated antenna you can tell which wire
you are looking at in each of the windows.

The antenna we are proposing ``looks'' like a rhombic, sure enough,
but we have to wonder if it will really offer any performance. 
To find out, we need to understand the ``RP'' card.

\section{The ``RP'' Card}

The ``RP'' card requests calculation of ``Radiation Patterns''.  It
can specify a wide variety of parameters including elevation and
azimuth angles.  An expert using NEC would probably use a much more
complicated arrangement than I am proposing, but bear with me a bit,
please.

Following the excellent advice of W4RNL and others (see
\cite{bib:compendium} or \cite{bib:ve2cv}) I
will first compute an ``elevation plot'' for the antenna.  In order to
prepare the data file with an appropriate card without disturbing
whatever ``RP'' card is actually in the file, we use the command
``preelev.tcl datafile $>$ hold'' to substitute our own ``RP'' card for
the one in the data file and place the modified data in a file called
``hold''.  (The original data file is not disturbed.)  
We use ``hold'' for input to NEC.  When NEC executes you
will have to select, via some mechanism the name of the output file.
My NEC provide a default name of ``fort.2'' for this output file.

\subsection{Determining an Elevation Pattern}

When NEC has run to completion, use ``elevpatterns.tcl fort.2'' to
examine the output.  This will again generate three
``windows'', this time with three equivalent graphs using different
scales.  Each of the three graphs represents a plot of the
``elevation'' radiation pattern for the antenna.

Here are the three plots.

\epsfig{file=elevrect.ps,width=4.5in}

\epsfig{file=elevpolar.ps,width=4.5in}

\epsfig{file=elevarrl.ps,width=4.5in}


The three plots all contain the same information.  The ``Cartesian''
plot is probably easier to use to determine front-to-back ratios and
``gain'', while the two plots in polar form are probably more useful
for visualization of the field generated by the antenna.  The ``ARRL''
plot is especially helpful for determining the ``-3 DB'' beam width.

Looking at the ``ARRL'' plot we see that the antenna is showing  some ``gain'',
but that the directional
characteristics of this antenna are not really spectacular, and the
lobes are occurring at rather high angles.  

Since this antenna was not ``terminated'' we have to wonder if 
providing a termination resistor 
might help.  We add a pure resistance to the antenna at the ``far
end''.   I chose 600 ohms because that is what the ``folklore'' says I
should use.  (The ``right'' answer is embedded in the output of NEC.
There is really no need to guess, but I can't resist. )
The datafile now becomes:

\begin{verbatim}
CM NEC Input File for Rhombic
CE
GW  1 10   -120.0     0.0     50.0        0.0    60.0    50.0   0.01
GW  2 10   -120.0     0.0     50.0        0.0   -60.0    50.0   0.01
GW  3 10    0.0      60.0     50.0      120.0     0.0    50.0   0.01
GW  4 10    0.0     -60.0     50.0      120.0     0.0    50.0   0.01
GS  0  0    0.3048
GE  1
GN  1  0      0    0     0.0      0.0  0.0  0.0      0.0     0.0
FR  0  1      0    0    14.0      0.0  0.0  0.0      0.0     0.0
EX  0  1      1    0     1.0      0.0  0.0  0.0      0.0     0.0
EX  0  2      1    0    -1.0      0.0  0.0  0.0      0.0     0.0
LD  0  3     10   10   600.0      0.0  0.0  0.0      0.0     0.0
LD  0  4     10   10   600.0      0.0  0.0  0.0      0.0     0.0
RP  0  180    1 1001   -90.0      0.0  1.0  0.0  10000.0     0.0
EN
\end{verbatim}

Running NEC against this data file  and then using ``elevpatterns.tcl
fort.2'' as before we now see these patterns:


\epsfig{file=elev1rect.ps,width=4.5in}

\epsfig{file=elev1polar.ps,width=4.5in}

\epsfig{file=elev1arrl.ps,width=4.5in}

Much better!  We now see that there is a major lobe at an angle of
about 67.0 degrees.  (NEC measures its elevation angles with 0 degrees being
``straight up'' and 90 degrees being parallel to the ground.)



\subsection{Generating an Azimuth Plot}

We now process the data file with the command ``preazimuth.tcl
datafile 67.0 $>$ hold'' to place an appropriate ``RP'' card in the data
file.  This ``RP'' card will compute azimuth patterns at an elevation
of 67.0 degrees.

Running NEC on this new data file we attain these plots:


\epsfig{file=azrect.ps,width=4.5in}

\epsfig{file=azpolar.ps,width=4.5in}

\epsfig{file=azarrl.ps,width=4.5in}

\section{So What Have We Got?}

Looking at the various plots we see a quite respectable gain and
front-to-back ratio.  There are a couple of side lobes that may be of
consequence, and the elevation angle is a little too high for comfort,
but probably acceptable since the -3 DB beam width (easy to see on the
ARRL elevation plot) indicates some useful gain at angles down to
about 75 degrees or so.

The ``folklore guess'' at 600 ohms impedance evidently was not far
off, given the effect on the patterns, and
shucks, I have a 30 year old Viking Matchbox that only requires a
heavy dew to match a barbed wire fence.  Build it!

This decision is reinforced if we change the frequency of excitation
to 28 mhz, just to see what will happen.  The 600 ohm terminating
resistor is off quite a bit, and the matchbox may warm up a little, but
the elevation lobe has pulled down and antenna looks 
like a performer.

In practice, since I can see that I have a chance at building a pretty
good antenna, I would expand the model a bit by changing the ground
characteristics and varying other inputs (especially the value of the  terminating
resistor)
in order for NEC to describe
more closely the exact physical situation that I am dealing with.
If I was satisfied with the potential of the antenna after that
experimentation then  I would build it.



\section{Conclusions}

The whole design process for this antenna took less time 
than reading this article probably did.  It involved no cost, other
than about 20 minutes of my time, and offered a clear indication of
whether or not the result might be worth it.  The process was assisted
considerably by the visualization software.  
(Author's note:  My one previous article in QST \cite{bib:article} was concerned
with antennas also.  How I wish I had NEC available at that time!)

Incidentally, this was all done on my Free SCO Unix system.  While I was
preparing this article (with \LaTeX\ ) in one window, 
I was running NEC and the
visualization software in another window.  A third window was occupied
running K5JB (SK) TCP/IP on the local packet frequency, while my wife
Anita (a full professor of Mathematics) was using \LaTeX\ on a second
terminal connected to the same machine via ethernet.  This is actually
a modest machine, although my professional needs (I am a professor of
Computer Science) are probably more stringent than the average user's
needs.  If your family is like ours you need either multiple computers
or a multiuser system.

If you haven't given some flavor of Unix or Linux a trial run, may I
respectfully suggest you are missing something?  At all events, have
fun!  Antenna visualization software helps, no matter where you run
it.
It only takes a ``Jiffy''!

73 de Bill W5GFE

\section{Acknowledgements}
The author is grateful to Ray, WB6TPU who read this article in
manuscript
form and offered many suggestions.  He also offered many helpful
improvements for the software itself, and pointed out some obvious
flaws.  

Pinoz, I2KFX, graciously offered permission to reference his excellent
work based on yorick.  A great many ideas for the ``Jiffy'' software
are ``borrowed'' from his work.  

I am grateful to both of these individuals.

\section{Why Not In ARRL Publications?}

I originally offered this article to QST.  It was not deemed to be
appropriate for that magazine.  The editor informed me that about 85
percent
of the readership of QST is heavily involved with some form of
MicroSoft
Windows.  The Unix/Linux segment of the readership is apparently only
a very small segment.   The editor of QST suggested that the article
might be appropriate for the Antenna Compendium.

I contacted the editor of the Compendium, who was willing to accept
the article, but insisted that the software not be released to the
public
domain.  Evidently, the idea was that the software should be included
on the diskette which accompanies the Compendium.  

At that point, we parted company.  I'm a full professor, with tenure,
and absolutely no need to publish yet another article anywhere.

I have withdrawn the article from ARRL
hands, and now present it, for better or worse, on the Internet.  I
hope
someone can use it.  If so, kindly don't make a profit on it, and
kindly remember where you got it.

73 de Bill W5GFE March 3, 1998

\section{Where to Get It}

The W5GFE (``Jiffy'') visualization packages is available from ``ftp://ftp.ecok.edu/hamradio/W5GFE.tar.gz''.

\begin{thebibliography} {99}
\bibitem{bib:w7el} W7EL  software is available from Roy Lewallen,
  W7EL, PO Box 6658, Beaverton, Oregon 97007.
\bibitem{bib:necsource} A really useful and rich 
  reference for NEC  documentation, code, and utilities
  is found at http://www.qsl.net/wb6tpu/
\bibitem{bib:GNU} The GNU archives are located at ftp://prep.ai.mit.edu/
\bibitem{bib:egcs} The egcs project is located at ftp://egcs.cygnus.com/
\bibitem{bib:KD6PAG} KD6PAG, in private communication.  This package
  depends on having the Perl language available.
\bibitem{bib:I5}  See
  http:/www.intercoop/ham/Antenne/nec2pp\_1.2.tar, or http://www.qsl.net/wb6tpu/
\bibitem{bib:yorick} ``yorick'' is available from ftp://wuarchive.wustl.edu/languages/yorick/
\bibitem{bib:BLT} TCL/TK and BLT are available from http://www.smli.com/
\bibitem{bib:necdocs}  NEC documentation is downloadable from http://www/dec.tis.net/~richesop/nec/index.html
\bibitem{bib:compendium} Cebik, L. W4RNL, \textit{A Beginner's Guide
  to Using Computer Antenna Modeling Programs}, ARRL Antenna
  Compendium, Volume \#3.
\bibitem{bib:article} Walker, Bill \textit{Predicting Radio Horizons
    at VHF}, QST, June 1978.

\bibitem{bib:ve2cv} Belrose, J. VE2CV, \textit{Modeling HF Antennas
  with MININEC --- Guidelines and Tips from a Code User's Notebook},
  ARRL Antenna Compendium, Volume \#3.

\end{thebibliography}


\end{document}