home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
World of Ham Radio 1997
/
WOHR97_AmSoft_(1997-02-01).iso
/
antenna
/
ant_03
/
amsoft.iii
next >
Wrap
Text File
|
1997-02-01
|
23KB
|
496 lines
ACCUPLOT.EXE, SCALE.EXE, OPTYAGI.EXE
Yagi Antenna Evaluation Programs for the IBM PC
by N6BV, with appreciation to WB3BGU, N2FB, K1GQ and W2PV
Nov. 15, 1987
INTRODUCTION
There are nine files associated with this package: program files
ACCUHGC.EXE, ACCUCGA.EXE, OPTYAGI.EXE, SCALE.EXE, the documenta-
tion file YAGI.DOC (this file), two initialization programs,
INT10.COM and HGC.EXE, for use with Hercules graphics monitor
cards, and two sample data files, WIL520.46 and 204BA.26.
The minimum requirements to run the programs are an IBM PC or PC
AT (or very compatible clone), with at least 256k of RAM, a
printer connected to the LPT1 output port on the PC (not the
serial port), and an 8087 or 80287 coprocessor. For the plotting
routines a CGA or an EGA graphics card is needed, with approp-
riate monitor. (Note that in order to run on a Hercules graphic
card, you must initialize the system by first running "INT10",
and then running "HGC FULL".)
In this document file, I shall refer to either ACCUCGA (for the
CGA or EGA card) or ACCUHGC (for the Hercules Graphic Card) as
"ACCUPLOT." ACCUPLOT is slower in operation than is YAGIPLOT, a
program that had been distributed by me previously, although
ACCUPLOT compensates by being more accurate in calculating F/B
and sidelobe levels.
ACCUPLOT has an additional advantage however: it can evaluate
designs where elements of different frequencies are interlaced on
the same boom, something that the old YAGIPLOT cannot do. YAGI-
PLOT uses the same simplified assumptions for element self-
impedance and mutual impedance used by W2PV, while ACCUPLOT uses
a form of method of moments algorithm. I will sometimes use
YAGIPLOT for quick calculations while homing in on a design, and
then use the slower ACCUPLOT program for final evaluations. If
anyone would like a copy of the older YAGIPLOT program, or of the
KLMPLOT program written to evaluate KLM antennas, please contact
me.
ACCUPLOT allows one to enter data either from the keyboard, or
from a disk file that was originally created using the program.
ACCUPLOT allows the operator to evaluate the gain and the 360
degree azimuthal and 180 degree elevation response patterns of a
Yagi antenna over a frequency band, allowing one to graph at each
frequency the polar or rectangular response directly on-screen.
In addition, detailed data may be saved to a disk file for
importation into other graphing programs if desired.
The SCALE program takes data from a disk file created by ACCU-
PLOT, scales the design to a new frequency or a new tapering
schedule, and then saves the scaled parameters to a new disk
file. The operator may then run this newly created disk file
through ACCUPLOT to verify the pattern and the scaling.
OPTYAGI takes a ACCUPLOT disk file and allows the operator to
manipulate element lengths or element spacings interactively to
optimize either gain, front-to-back ratio, or a combination of
gain and F/B. The computations are shown on screen at three
frequencies: low-end, geometric mean, and high end of a band.
Any modifications done to the Yagi parameters may be saved to
disk for detailed use by the ACCUPLOT program.
The original core of the YAGIPLOT and OPTYAGI programs is a
modification of the FORTRAN program presented by Stanley Jaffin,
WB3BGU, in the October 1984 issue of Ham Radio magazine. The
program core, as modified by N6BV, incorporates frequency loops,
algorithms for tapered elements published by the late Jim Lawson,
W2PV (in the December 1980 issue of Ham Radio), and incorporates
graphics plotting routines whose main themes came from K2RDX.
The ACCUPLOT program is a modification of another FORTRAN program
coming circuitously through N2FB, from K1GQ and W1RR originally,
and it too incorporates frequency loops, the W2PV tapering
algorithms and the graphics plotting routines. All programs were
compiled using the MicroSoft FORTRAN compiler, Version 4.01, and
the MicroCompatibles GRAFMATIC graphic library for the IBM PC
computer.
ACCUPLOT
ACCUPLOT is designed for either interactive data entry from the
keyboard or for retrieval of yagi data from a disk file that has
been created in a previous run. Note that a disk file may easily
be edited with an ASCII word processor (I use WordStar in Non-
Document mode) to change parameters for another run. The data
entries are labelled in the resulting disk files, but you must be
very careful to ensure that floating point data is not moved
around -- i.e., don't change the placement of the decimal point
in the file. FORTRAN is very picky on how input data is
formatted, and if you move the decimal point's placment in the
file, screwy results are sure to come up. In Wordstar make sure
that you aren't in the Insert mode when editing in Non-Document
mode!
The MAIN MENU of ACCUPLOT will first require that you entire data
into memory before anything else can happen. If you try to do a
calculation without any data in memory, you will be greeted with
a rather surly burp from the PC's speaker. Select the first menu
choice. You will be prompted to specify whether you wish to
enter new data from the Keyboard, or whether you wish to use an
existing data file on Disk. You will enter either a "K" for
Keyboard, or a "D" for Disk file.
From within ACCUPLOT you may use different disk and pathnames if
you like when specifying a file. By the way, if you forget the
name of an existing disk file to use, your best bet is frankly to
abort the program with a "Control C" or "Control Break." When
you are back in DOS you can run a "DIR" to list the data files.
Then start ACCUPLOT up again. I haven't been able to smoothly
implement a DIR call from within FORTRAN, but will do so
someday when I have more time...
If you are entering data from the keyboard, ACCUPLOT will
automatically save that data to a disk file after it has been
entered. I suggest that you use a filename that is descriptive
enough so that you can figure out what data is supposed to be in
a particular disk file when you do a disk DIRectory at a later
time from DOS.
For HF yagi designs I use a convention that describes the
designer (usually by callsign, such as W6SAI or W2PV), followed
by the number of elements, the band of operation, followed by the
filename extension (i.e., after the period) of the boom length in
feet. For example a W2PV 6 element design for 20 meters, with a
52 foot boom would be in the file: W2PV620.52.
Then you will be asked for a label that it will use to identify
the design under test. I usually label my designs with the
filename under which it is saved to disk, together with other
parenthetic comments (such as, "N2FB620.54, SCALED FROM 10M
DESIGN.") You have space for up to 50 characters in the label.
Next, you will specify the number of elements in the array, and
the element number for the Driven Element (usually element number
2). The Reflector is number one element by convention. You will
next enter the lower and upper frequency limits of the band of
interest.
The program will then start asking you about Element number 1
(the reflector). You will enter first the number of tapered
segments in Element 1. There are a maximum of seven segments
that may be entered for each element.
Please remember that all measurements are in INCHES. Each line
requesting "real number" (i.e., that may use a decimal point) for
data entry has a suggested "template" with a decimal point in it
to demonstrate proper data entry. You may enter any number you
like, with or without a decimal point, but if you goof up and
enter an alphabetic character by mistake you will be rudely
alerted to that problem by a beep, and then you will be uncere-
moniously dumped back to the start of a procedure. Sorry about
that, but FORTRAN is notably unfriendly with keyboard entry of
data, unlike for example BASIC.
For example, entry of the spacing of the Element 1 (reflector)
from Element 2 (the driven element) would show:
Spacing, Ele. ( 1) to Ele. ( 2), XXX.XXX =
where the "XXX.XXX" shows that a decimal point may be needed,
and that a maximum of 6 digits with that embedded decimal point
would normally be entered. For example, if the reflector spacing
is 167 inches (about .2 wavelength at 14.15 MHz), you could enter
"167" or you could also enter "167.0", or "167.00", or even
"167.000".
If the yagi you are evaluating lists the element length and the
element length in fractions of the wavelength, then use the fol-
lowing formula to convert to inches:
Wavelength x fraction = (11803/Frequency) x fraction, where
Frequency is in MHz, and Wavelength is in inches.
If for example, the length of a particular segment is stated as
".15" lambda (the Greek letter depicting wavelength), and the
Frequency is 14.15 MHz, the equivalent length at the design freq-
uency is:
Length (inches) = (11803/14.15) x .15 = 125.120 inches
Another important point about data entry into ACCUPLOT: all
measurements are assuming that the yagi is constructed with
tapered telescoping tubing. The length to be entered for any
particular segment is ON ONE SIDE OF THE BOOM ONLY.
If you are evaluating a VHF antenna that has no telescoping taper
of the elements, then when the program prompts you for:
How many tapered segments in Element ( 1) -- max.7 =
you would enter "1", and after entering the o.d. of that segment,
you would answer:
Length of segment(1), XXX.XXX =
with some number such as "7.111" inches, if the overall length of
the reflector is 14.222 inches. The program will accept up to 7
different segments for an element (that is, seven different
telescoping sizes on one side of the boom), which should take
care of any design I have seen, even for a 40 meter beam.
[Speaking of 40 meter beams, the effect of taper on the resonant
frequency is very, very dramatic! The severe tapering scheme
used for the Wilson 40 meter beams never was properly compensated
for in the original designs, but many amateurs lengthened the
nominal element lengths to achieve good results. ACCUPLOT
verifies this well.]
Once you have entered the last piece of data for the first ele-
ment, you will be placed back at the MAIN MENU. You would now
probably want to calculate the response pattern of your yagi and
probably plot it on-screen. Select number 2 from the MAIN MENU.
Follow the menu prompts. By the way, if you wish to print out a
graphics plot screen to the printer, you must first load
GRAPHICS.COM from the DOS disk before you start up any of the
three main programs. Hit <Shift> <PrtSc> to print the plot
sideways on the printer.
Note that you have a choice of plotting either a Polar or a
Rectangular plot. The Polar plot can see down to -30 dB below
the peak response. For the Polar plots the H-Plane (Elevation
pattern) is shown on the left-hand side, and the E-Plane
(Azimuthal pattern) is shown on the right-hand side. The
responses are symmetrical about the Y-Axis for either plane.
The Rectangular plot is more flexible in that you may choose the
minimum level to be displayed. Most often you would probably use
a number like "-30" dB, but you may want to see directly the -3
dB response to gauge the half-power beamwidth. Only half the
response is shown for the Rectangular plot (as is true for the
Polar plot.)
If you choose not to display the full pattern readouts, but in-
stead want to print out the forward gain and F/B ratio only for a
range of frequencies, then choose MAIN MENU selection number 4.
Note that internally the program is calculating at each frequency
in the range you will specify the "effective" length of an ele-
ment, using as a "standard cylinder" the geometric mean of the
first and last segments of the first director. After printing
out a table of physical dimensions (in inches), ACCUPLOT will
print out the same information, this time expressed in units of
wavelength. The element lengths however are those for the
"standard cylinder" at the center design frequency (the geometric
mean frequency of the lower and upper frequencies in the band).
You will next be prompted for the starting, and ending frequency
over which you want to evaluate the antenna, and also the freq-
uency increment. For example, you might type in:
14.0,14.35,.025
to evaluate a 20 meter yagi over the range of 14.0 - 14.35 MHz,
in increments of .025 MHz = 25 KHz.
If you determine that you like the response characteristics of a
particular yagi at one frequency, you can then scale it to a
different band using this data and the formulae described by W2PV
in his articles, or you would probably use the SCALE program
described later, since it is much easier and faster than manual
means.
Also, please note that the gains given are referenced to "dBi" or
"isotropic," in free space. To translate this to "dBd" referenc-
ed to a dipole, subtract 2.15 dB. "Free space" means in practi-
cal terms that the antenna is no less than one wavelength above
ground, and preferably at least two wavelengths. The vertical
takeoff angle is at zero degrees, the free space value.
SCALE
The SCALE program uses a data disk file created by YAGIPLOT,
KLMPLOT or ACCUPLOT, and gives you the opportunity to scale the
design to a new center frequency and/or to a new taper schedule.
The keyboard input is very similar to that for ACCUPLOT.
You will first be given an opportunity to Label the new yagi
design. I usually use the original disk filename, with a comment
about the scaling that was done. For example, if I want to scale
the file W6SAI320.16 to 15 meters, I would enter as a Label:
W6SAI320.16, SCALED TO 15M.
After asking for a new design frequency, SCALE will run through
the taper schedule to be used at the new frequency, starting at
Element 1, just like in keyboard entry in ACCUPLOT. Once the
diameter for the last segment has been specified the program
automatically skips to the next element to be specified, since
the end-segment's length will be automatically calculated by
SCALE.
Note: if the overall length of the segments making up an element
adds up to a length that is longer than the program calculates,
SCALE will make the end segment a negative number. Obviously,
this indicates that the next-to-last segment should be made shor-
ter than originally specified, or that the operator had better
pay more attention to his taper schedule.
The program will make its calculations, and then show on-screen
the length of the resulting boom. It will then ask you to give a
filename for the new, scaled design. For example, if you have
scaled a file called N2FB620.52 from 20 meters to 15 meters, and
the resulting boom is 35 feet long, an appropriate filename might
be N2FB615.35, using my afore-mentioned file naming "convention."
After this is done, SCALE will go back to the DOS prompt. You
will probably wish to run the resulting data disk file through
ACCUPLOT again to verify that the automatic scaling is reason-
able, and that the frequency response is appropriate. You will
find that the taper schedule used for a Yagi has a subtle and not
always intuitive effect on the pattern as a function of freq-
uency, and you may have to run SCALE several times to compensate
for this effect. SCALE seems to shift the response in frequency
more for severe taper schedules.
Note: one very interesting use of SCALE is to create a non-
tapered yagi design from a design originally made with tapered-
elements. In other words you may wish to have no taper at all --
say, a design with simple 1" o.d. elements on 20m.). Then these
single-taper element lengths may be entered into another modeling
program, such as MININEC3, to do other calculations. Note that
in such a scaling exercise, the frequency to use when asked by
the program is the geometric mean of the low and high frequencies
stored in the orginal file; i.e., the square root of the product
of the low frequency times the high frequency. This geometric
mean is the frequency shown before SCALE asks you to enter a new
frequency.
After scaling a design to a new frequency you might want to use
the OPTYAGI program to optimize the pattern for the new band.
KLMPLOT
This section documents briefly the KLMPLOT program. KLMPLOT is
very similar in concept and operation to YAGIPLOT. The only
difference really is that instead of being asked which element is
the driven element in the other program, KLMPLOT asks you for the
impedance of the crossed transmission line between elements 2 and
3, the dual-driven elements. The impedance I usually use is 100
ohms, which is what I guess KLM is using in their designs.
Everything else operates the same as ACCUPLOT.
OPTYAGI
The OPTYAGI program stands obviously for "Optimizing a Yagi"
design. OPTYAGI uses the same algorithms as YAGIPLOT, and can
thus be viewed as a "first cut" at optimization, due to the
slightly lowered accuracy of pattern calculations of YAGIPLOT as
opposed to ACCUPLOT. OPTYAGI will first ask for an existing
filename (created by ACCUPLOT or YAGIPLOT) from which it will
garner data about the yagi to be optimized. (Note: OPTYAGI is
not designed to be used with KLM designs.) As usual, the oper-
ator may specify disk drive and path name as well as the data
filename.
The program will then ask for the desired frequency at the low
end of the band, and then the frequency at the high end of the
band. I usually choose frequencies 10 KHz below and above the
band edge for 15 and 20 meter HF designs; +/- 20 KHz for 10m.,
etc. For 40 meter designs with three or two elements, the per-
centage bandwidth between 7.0 and 7.3 MHz is more than 4%, and it
is very difficult to obtain a good F/B ratio over that large a
bandwidth. I usually end up choosing 6.99 MHz for the low end,
and 7.2 MHz for the high end, since it is more important for most
of my operating to have good F/B in the CW band than the phone
band. You choose your own frequency limits.
You will next be presented with the choice of automatically vary-
ing the Length of an element, or varying the Spacing of an ele-
ment. Spacing refers to the distance from an element to the
next one further on the boom. For example, varying the spacing
of element 2 in a three element design would vary the spacing
between the Driven Element to the next one forward; i.e., the
Director.
Once you have specified the element of interest and whether you
wish to vary its length or its spacing, OPTYAGI will go ahead and
grind out the numbers. It will display the Forward Gain and F/B
ratio for the low, geometric mean, and high end of the band you
specified. This will be done for each of 9 different iterations
of spacing or element length.
For long yagis, with more than 10 elements or so, you will have
to wait a long time. (By the way, these programs are considerab-
ly faster than MININEC, even MININEC compiled for speed.) ACCU-
PLOT is however not as ultimately versatile as MININEC, being
specially coded only for Yagi evaluation, and for free-space
conditions.
For the automatic spacing variation case, each iteration varies
the spacing for the chosen element by 5%. Iteration number 5 is
the original spacing of the design. Choose the iteration which
looks most promising for your own criteria of either maximum
gain, maximum F/B or the best combination of gain and F/B over
the frequency range of interest.
After choosing which of the nine iterations you want to keep, you
will be shown the overall length of the boom, the filename for
the design being tested (this is to help me remember what I'm
doing if I'm interrupted in the middle of a run!), and then you
will be asked whether you want to Continue, save data to Disk or
Quit ([C]/D/Q). The square brackets indicate that if you simply
hit the Carriage Return button the program will Continue on,
going back to ask you whether you want to vary the Length or the
Spacing. The length or spacing from the chosen iteration will
now be in the parameter matrix inside the computer's memory.
Otherwise, hitting D will prompt you for a new filename under
which to save the parameters. Note: I find when running a number
of different iterations in spacing or element length that I save
the parameters to disk often, because I find myself "beating" the
program to the punch and selecting an early iteration number
before all nine iterations have run. However, if I screw up and
get out of sequence, FORTRAN punishes me by aborting back to the
DOS prompt without saving my carefully optimized parameters. A
word to the Wise: SAVE to Disk often!
There are also included two sample data files for use in veri-
fying that the programs work. The two files are: "204BA.26" for
the Hy-Gain 204BA 4 element yagi, and "WIL520.46" for the 5
element Wilson design for 20 meters. These two designs are good
examples of well-designed yagis that have been quite popular in
actual use. They can be optimized for more gain, or for more F/B
but they represent reasonable compromises in both of these para-
meters to yield good performance over the band.
There are many designs which do not work as well, although in
general most yagis seem to have been designed for maximum gain,
with only passing attention paid to Front-to-Back ratio or good
sidelobe suppression. Personally, I like a good F/B, since in DX
contests I like to keep those loud W5's off my tail when I am
working into Japan from Northern California, even if I have to
sacrifice a half dB or so of forward gain!
Note: for the 204BA, the length of the first segment (i.e., the
segment abutting the boom) has already been lengthened in the
following table by 1.0 inch, since the boom is 2.0" o.d., and
each element in essence is clamped so that in effect it goes
through the center of the boom. The Wilson design uses angle
brackets and U-Bolts to space the elements over the boom. This
type of design, as Lawson points out, has a minimal effect on
effective element length for an HF yagi.
I have learned a lot about yagis with this program, and I hope
you will too. Any comments may be directed by mail or by Compu-
Serve on the HAMNET.
R. Dean Straw, N6BV
CompuServe 72466,273
5328 Fulton Street
San Francisco, CA 94121