home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Antennas
/
Antennas_CD-ROM_Walnut_Creek_September_1996.iso
/
public
/
accuyagi
/
yagi.doc
< prev
next >
Wrap
Text File
|
1996-06-30
|
28KB
|
595 lines
ACCUYAGI.EXE,YAGI.EXE, SCALE.EXE, OPTYAGI.EXE
Yagi Antenna Evaluation Programs for the IBM PC
by N6BV, with appreciation to WB3BGU, N2FB,K1GQ and W2PV
March 3, 1986
INTRODUCTION
There are five files associated with the YAGI1.ARC file: program
files YAGI.EXE, and CNVTYAGI.EXE; the documentation file YAGI.DOC
(this file), and data files 204BA.26, and WIL520.46.
There are three auxiliary program files in the YAGI2.ARC file:
ACCUYAGI.EXE, OPTYAGI.EXE, and SCALE.EXE.
The minimum requirements to run the programs are an IBM PC (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 most preferably, an 8087 coprocessor.
The programs will run on a PC without an 8087, but they will
calculate at a crippled snail's pace. I have measured more than
a 17 to 1 speedup using a PC with 8087 compared to one without a
coprocessor! The original version of YAGI was called HFYAGI,
and it had been uploaded in several updated versions to Compu-
Serve. The older versions bombed on a PC-AT without coprocessor.
This YAGI version works fine with AT's and PC's, and it works
quickly.
However, the ACCUYAGI program newly introduced in the YAGI2.ARC
is more accurate in calculating F/B and sidelobe levels, although
it suffers considerably in comparison to YAGI when it comes to
speed of execution. ACCUYAGI does have another advantage how-
ever: it can evaluate designs where elements of different freq-
uencies are interlaced on the same boom, something that YAGI
cannot do. YAGI uses the simplified assumptions for element
self-impedance and mutual impedance used by W2PV. I usually use
YAGI for quick calculations while homing in on a design, and then
use the slower ACCUYAGI program for final evaluations.
Both YAGI and ACCUYAGI allow one to enter data either from the
keyboard, or from a disk file that was originally created using
either program. However, the data files created by earlier vers-
ions of YAGI will not work with these later programs. A data
file conversion program CNVTYAGI is included to convert automati-
cally any old data files to the new format.
Either YAGI or ACCUYAGI allows the operator to evaluate the gain
and the 360 degree azimuthal response pattern of a Yagi antenna
over a frequency band, allowing direct readout either on the
computer screen or on a printer. In addition, detailed data may
be saved to a disk file for importation into other graphing prog-
rams.
1
SCALE takes data from a disk file created by YAGI or ACCUYAGI,
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 ACCU-
YAGI to verify the pattern and the scaling.
OPTYAGI takes an ACCUYAGI 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 ACCUYAGI program.
The original core of the YAGI and OPTYAGI programs is a modifica-
tion 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 and algori-
thms for tapered elements published by the late Jim Lawson, W2PV,
in the December 1980 issue of Ham Radio. The ACCUYAGI program is
a modification of another FORTRAN program coming circuitously
through N2FB, from K1GQ and W1RR originally, and it too incorpor-
ates a frequency loop and the W2PV tapering algorithms. All
programs were compiled using the MicroSoft FORTRAN compiler for
the IBM PC computer.
YAGI and ACCUYAGI
These programs were written primarily to evaluate yagi antenna
designs for HF use, although of course they can be used to scope
out VHF designs as well. I have used both to evaluate commercial
designs of HF monoband yagi antennas, calculating the forward
gain (dBi), Front-to-Back ratio, and the pattern in 2 or 5 degree
steps for yagis with or without tapered element construction.
Data entry from the keyboard for long boom, multielement VHF
yagis will probably try your patience considerably, because data
entry is laborious, especially if there is tapering of the ele-
ments. Note that an error early in data entry may be rectified
by starting over again (after hitting Control-C to halt the pro-
gram), or it may be rectified later by modifying the resulting
disk file using a word processor.
YAGI and ACCUYAGI are 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 be edited with an ASCII word processor (I use WordStar in
Non-Document mode) to change parameters for another run.
Either program will first prompt you 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. The FORTRAN compiler is notab-
ly "unfriendly" in its warning messages, so don't be shocked if
it tells you that the file name is missing and then aborts you
2
back to DOS if the filename is not on disk somewhere! You may
use different disk and pathnames if you like.
If you are entering data from the keyboard, ACCUYAGI or YAGI 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. For example, if you have stored data for an NBS VHF yagi
design with 12 elements in a disk file, you could name that file
"NBS12.DTA" to be able to differentiate it from another file
called "NBS5.DTA" for an NBS yagi design with 5 elements.
For HF yagi designs I use a convention that describes the design-
er (usually by callsign, such as W6SAI or W2PV), followed by the
number of elements, the band of operation, followed by the file-
name 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.
If you are entering data for a new design from the keyboard, you
will next be prompted to enter a filename under which to store
the data to disk. 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, to-
gether 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), followed by 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.
All measurements are in INCHES. A decimal point IS NECESSARY in
most cases, except for entering the number of elements, and for
entering the number of segments in an element. These latter two
entries are for "integer" numbers, and integers must NOT be fol-
lowed by a decimal point. Each line requesting "real number"
(i.e., requiring a decimal point) for data entry has a "template"
with a decimal point in it to demonstrate proper data entry. 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 is necessary, and
that a maximum of 6 digits with that embedded decimal point may
be entered. For example, if the reflector spacing is 167 inches
(about .2 wavelength at 14.15 MHz), you could enter "167." or
3
you could also enter "167.0", or "167.00", or even "167.000".
However, if you simply enter "167" without a decimal point, FOR-
TRAN will assume you want .167 inches!
If the program prompts you for an integral number (i.e., without
a decimal point), such as "3" elements for a 3 element yagi,
entering "3." with a period will cause the program to abort back
to DOS. You'll get the hang of things as you go along. I also
wish that the FORTRAN compiler were a bit more friendly, but it
was designed for batch entry of data rather than for interactive
keyboard entry. Just remember: enter the data carefully, use
inches, and put the decimal points into the proper places if the
XXX.XXX template requires a decimal point.
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 YAGI and ACCUYAGI:
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" (no decimal point and no quotation marks,
please!), 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 2 x 7.111 = 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
4
nominal element lengths to achieve good results. YAGI verifies
this well.]
Once you have entered the last piece of data for the first ele-
ment, the data for the second element will be asked for, line by
line, and then the program will ask you if you want to print out
the complete pattern in 2 degree increments (for YAGI -- 5 degree
increments for ACCUYAGI) or not. If you select "Y" for Yes, then
you will be asked whether you want the information put on disk or
not. You may wish to have the pattern put into a diskfile for
later use.
For example, I import the data into Lotus 1-2-3, using the / File
Import Numbers command sequence, and then manipulate the data
while in Lotus 1-2-3 for graphing the lower, Center Frequency,
and the upper frequency patterns. The data sent to disk consists
of the E-Field and the H-Field, but most graphing is done showing
the E-Field only.
If you choose not to display the full pattern readouts, but in-
stead want to see the forward gain and F/B ratio only for each
frequency, then answer "N" for No (or hit the Enter button to
select the default [N] value), and next select whether you want
the results shown on the screen or on the printer. Select either
S for screen, or P for printer. If you have selected printer
operation, but have forgotten to turn on the printer, the program
will give you an opportunity to turn it on and retry, or else it
will go back to DOS.
YAGI calculates gain and F/B ratio for nineteen frequencies from
the lower end to the upper end of the band you chose. This will
show the frequency variance of gain and F/B ratio of a yagi.
Because ACCUYAGI is much slower than YAGI, it only calculates for
nine different frequencies between the lower and upper frequency
limits you chose earlier.
Note that internally the program is calculating at each frequency
the "effective" length of an element, using as a "standard cylin-
der" the geometric mean of the first and last segments of the
first director. After printing out a table of physical dimen-
sions (in inches), YAGI or ACCUYAGI will print out the same in-
formation, this time expressed in units of wavelength. The ele-
ment 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). 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
may use the SCALE program described later, which 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
5
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 YAGI or ACCU-
YAGI, 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 YAGI (complete with the same
FORTRAN bad manners for handling errors in data entry, especially
about forcing you not to enter a decimal point when an integer is
called for...Don't blame me: FORTRAN is quite exacting.)
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 YAGI. Once the dia-
meter for the last segment has been specified the program automa-
tically 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
may wish to run the resulting data disk file through ACCUYAGI
again to verify that the automatic scaling is reasonable, 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 frequency.
After scaling a design to a new frequency you might want to use
the next program, OPTYAGI, to optimize the pattern for the new
band.
OPTYAGI
The OPTYAGI program stands obviously for "Optimizing a Yagi"
design. OPTYAGI uses the same algorithms as YAGI, and can thus
6
be viewed as a "first cut" at optimization, due to the slightly
lowered accuaracy of pattern calculations of YAGI as opposed to
ACCUYAGI. OPTYAGI will first ask for an existing filename
(created by ACCUYAGI or YAGI) from which it will garner data
about the yagi to be optimized. As usual, the operator may spec-
ify disk drive and path name as well as the data filename.
The disk file will be read and the resulting parameters in units
of wavelength will appear on-screen, as it does in YAGI or ACCU-
YAGI. This will give the operator a benchmark view of what the
original design was all about.
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 the Reflector to the
next one further on the boom; i.e., the Driven Element. For a
director, the spacing is from that particular element backwards
to the next element behind it on the boom. For example, for a
three element yagi, the director is element number 3, and the
spacing will be from that director back to the driven element.
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, and will display the Forward Gain abd 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. Again, if you don't have an 8087-
/80287 numeric coprocessor, the calculations will be glacially
slow. The first iteration especially takes a long time to set
everything up internally.
Even on a PC-AT (one without an 80287) it takes several minutes
before anything changes on-screen. Be patient, or else invest in
a coprocessor if you want to fool with Yagis a lot. (For long
yagis, with more than 10 elements or so, you will have to wait a
long time anyhow; longer still though without a coprocessor...)
By the way, these programs are considerably faster than MININEC,
even MININEC compiled for speed. YAGI and ACCUYAGI are however
not as ultimately versatile as MININEC, being specially coded
only for Yagi evaluation.)
For the automatic spacing variation case, each iteration varies
the spacing for the chosen element by 5%. Iteration number 5 is
7
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 in the YAGI1.ARC file two sample data files for use in
verifying that the program works. 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. Per-
sonally, 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.
8
R. Dean Straw, N6BV
CompuServe 72466,273
5328 Fulton Street
San Francisco, CA 94121
73,
Dean, N6BV
Hy-Gain 204BA, 4 ele. 20m. yagi, 26 foot boom, 14.1 MHz
Element Seg 1 Seg 2 Seg 3 Seg 4 Seg5
================================================================
Spacing R-DE: 122.875"
Refl. o.d. 1.250" 1.125" .875" .625" .438"
Refl. len. 45.500" 46.000" 50.500" 24.000" 50.000"
Spacing DE-D1: 88.750"
Dir 1 o.d. 1.250" 1.125" .875" .625" .438"
Dir 1 len. 22.000" 46.000" 50.500" 24.000" 51.000"
Spacing D1-D2: 95.625"
Dir 2 o.d. 1.250" 1.125" .875" .625" .438"
Dir 2 len. 17.750" 46.000" 50.500" 24.000" 49.000"
Wilson 5 element 20m. yagi, 46 foot boom, 14.1 MHz
Element Seg 1 Seg 2 Seg 3 Seg 4 Seg5
================================================================
Spacing R-DE: 132.000"
Refl. o.d. 1.250" 1.125" 1.000" .875 .750"
Refl. len. 36.000" 36.000" 66.000" 66.000" 11.000"
Spacing DE-D1: 108.000"
Dir 1 o.d. 1.250" 1.125" 1.000" .875"
Dir 1 len. 36.000" 36.000" 60.000" 59.000"
Spacing D1-D2: 120.000"
Dir 2 o.d. 1.250" 1.125" 1.000" .875"
Dir 2 len. 36.000" 36.000" 58.000" 58.000"
Spacing D2-D3: 186.000"
Dir 3 o.d. 1.250" 1.125" 1.000" .875"
9