home *** CD-ROM | disk | FTP | other *** search
/ World of Ham Radio 1997 / WOHR97_AmSoft_(1997-02-01).iso / antenna / ant_03 / amsoft.iii next >
Text File  |  1997-02-01  |  23KB  |  496 lines

  1.  
  2.               ACCUPLOT.EXE, SCALE.EXE, OPTYAGI.EXE
  3.          Yagi Antenna Evaluation Programs for the IBM PC
  4.     by N6BV, with appreciation to WB3BGU, N2FB, K1GQ and W2PV
  5.                           Nov. 15, 1987
  6.  
  7. INTRODUCTION
  8.  
  9. There are nine files associated with this package: program files 
  10. ACCUHGC.EXE, ACCUCGA.EXE, OPTYAGI.EXE, SCALE.EXE, the documenta-
  11. tion file YAGI.DOC (this file), two initialization programs, 
  12. INT10.COM and HGC.EXE, for use with Hercules graphics monitor 
  13. cards, and two sample data files, WIL520.46 and 204BA.26.  
  14.  
  15. The minimum requirements to run the programs are an IBM PC or PC 
  16. AT (or very compatible clone), with at least 256k of RAM, a 
  17. printer connected to the LPT1 output port on the PC (not the 
  18. serial port), and an 8087 or 80287 coprocessor.  For the plotting 
  19. routines a CGA or an EGA graphics card is needed, with approp-
  20. riate monitor.  (Note that in order to run on a Hercules graphic 
  21. card, you must initialize the system by first running "INT10", 
  22. and then running "HGC FULL".) 
  23.  
  24. In this document file, I shall refer to either ACCUCGA (for the 
  25. CGA or EGA card) or ACCUHGC (for the Hercules Graphic Card) as 
  26. "ACCUPLOT."   ACCUPLOT is slower in operation than is YAGIPLOT, a 
  27. program that had been distributed by me previously, although 
  28. ACCUPLOT compensates by being more accurate in calculating F/B 
  29. and sidelobe levels.  
  30.  
  31. ACCUPLOT has an additional advantage however: it can evaluate 
  32. designs where elements of different frequencies are interlaced on 
  33. the same boom, something that the old YAGIPLOT cannot do.  YAGI-
  34. PLOT uses the same simplified assumptions for element self-
  35. impedance and mutual impedance used by W2PV, while ACCUPLOT uses 
  36. a form of method of moments algorithm.  I will sometimes use 
  37. YAGIPLOT for quick calculations while homing in on a design, and 
  38. then use the slower ACCUPLOT program for final evaluations.  If 
  39. anyone would like a copy of the older YAGIPLOT program, or of the 
  40. KLMPLOT program written to evaluate KLM antennas, please contact 
  41. me.
  42.  
  43. ACCUPLOT allows one to enter data either from the keyboard, or 
  44. from a disk file that was originally created using the program.  
  45.  
  46. ACCUPLOT allows the operator to evaluate the gain and the 360 
  47. degree azimuthal and 180 degree elevation response patterns of a 
  48. Yagi antenna over a frequency band, allowing one to graph at each 
  49. frequency the polar or rectangular response directly on-screen.  
  50. In addition, detailed data may be saved to a disk file for 
  51. importation into other graphing programs if desired.
  52.  
  53. The SCALE program takes data from a disk file created by ACCU-
  54. PLOT,  scales the design to a new frequency or a new tapering 
  55. schedule, and then saves the scaled parameters to a new disk 
  56. file.  The operator may then run this newly created disk file 
  57. through ACCUPLOT to verify the pattern and the scaling.
  58.  
  59. OPTYAGI takes a ACCUPLOT disk file and allows the operator to 
  60. manipulate element lengths or element spacings interactively to 
  61. optimize either gain, front-to-back ratio, or a combination of 
  62. gain and F/B.  The computations are shown on screen at three 
  63. frequencies: low-end, geometric mean, and high end of a band.  
  64. Any modifications done to the Yagi parameters may be saved to 
  65. disk for detailed use by the ACCUPLOT program.
  66.  
  67. The original core of the YAGIPLOT and OPTYAGI programs is a 
  68. modification of the FORTRAN program presented by Stanley Jaffin, 
  69. WB3BGU, in the October 1984 issue of Ham Radio magazine.  The 
  70. program core, as modified by N6BV, incorporates frequency loops, 
  71. algorithms for tapered elements published by the late Jim Lawson, 
  72. W2PV (in the December 1980 issue of Ham Radio), and incorporates 
  73. graphics plotting routines whose main themes came from K2RDX.  
  74.  
  75. The ACCUPLOT program is a modification of another FORTRAN program 
  76. coming circuitously through N2FB, from K1GQ and W1RR originally, 
  77. and it too incorporates frequency loops, the W2PV tapering 
  78. algorithms and the graphics plotting routines.  All programs were 
  79. compiled using the MicroSoft FORTRAN compiler, Version 4.01, and 
  80. the MicroCompatibles GRAFMATIC graphic library for the IBM PC 
  81. computer. 
  82.  
  83. ACCUPLOT
  84.  
  85. ACCUPLOT is designed for either interactive data entry from the 
  86. keyboard or for retrieval of yagi data from a disk file that has 
  87. been created in a previous run.  Note that a disk file may easily 
  88. be edited with an ASCII word processor (I use WordStar in Non-
  89. Document mode) to change parameters for another run.  The data 
  90. entries are labelled in the resulting disk files, but you must be 
  91. very careful to ensure that floating point data is not moved 
  92. around -- i.e., don't change the placement of the decimal point 
  93. in the file.  FORTRAN is very picky on how input data is 
  94. formatted, and if you move the decimal point's placment in the 
  95. file, screwy results are sure to come up.  In Wordstar make sure 
  96. that you aren't in the Insert mode when editing in Non-Document 
  97. mode!
  98.  
  99. The MAIN MENU of ACCUPLOT will first require that you entire data 
  100. into memory before anything else can happen.  If you try to do a 
  101. calculation without any data in memory, you will be greeted with 
  102. a rather surly burp from the PC's speaker.  Select the first menu 
  103. choice.  You will be prompted to specify whether you wish to 
  104. enter new data from the Keyboard, or whether you wish to use an 
  105. existing data file on Disk.  You will enter either a "K" for 
  106. Keyboard, or a "D" for Disk file.  
  107.  
  108. From within ACCUPLOT you may use different disk and pathnames if 
  109. you like when specifying a file.  By the way, if you forget the 
  110. name of an existing disk file to use, your best bet is frankly to 
  111. abort the program with a "Control C" or "Control Break."  When 
  112. you are back in DOS you can run a "DIR" to list the data files.  
  113. Then start ACCUPLOT up again.  I haven't been able to smoothly 
  114. implement a DIR call from within FORTRAN, but will do so 
  115. someday when I have more time...
  116.  
  117. If you are entering data from the keyboard, ACCUPLOT will 
  118. automatically save that data to a disk file after it has been 
  119. entered.  I suggest that you use a filename that is descriptive 
  120. enough so that you can figure out what data is supposed to be in 
  121. a particular disk file when you do a disk DIRectory at a later 
  122. time from DOS.  
  123.  
  124. For HF yagi designs I use a convention that describes the 
  125. designer (usually by callsign, such as W6SAI or W2PV), followed 
  126. by the number of elements, the band of operation, followed by the 
  127. filename extension (i.e., after the period) of the boom length in 
  128. feet.  For example a W2PV 6 element design for 20 meters, with a 
  129. 52 foot boom would be in the file:  W2PV620.52. 
  130.  
  131. Then you will be asked for a label that it will use to identify 
  132. the design under test.  I usually label my designs with the 
  133. filename under which it is saved to disk, together with other 
  134. parenthetic comments (such as, "N2FB620.54, SCALED FROM 10M 
  135. DESIGN.")  You have space for up to 50 characters in the label.  
  136.  
  137. Next, you will specify the number of elements in the array, and 
  138. the element number for the Driven Element (usually element number 
  139. 2).  The Reflector is number one element by convention.  You will 
  140. next enter the lower and upper frequency limits of the band of 
  141. interest.  
  142.  
  143. The program will then start asking you about Element number 1 
  144. (the reflector).  You will enter first the number of tapered 
  145. segments in Element 1.  There are a maximum of seven segments 
  146. that may be entered for each element.  
  147.  
  148. Please remember that all measurements are in INCHES.  Each line 
  149. requesting "real number" (i.e., that may use a decimal point) for 
  150. data entry has a suggested "template" with a decimal point in it 
  151. to demonstrate proper data entry.  You may enter any number you 
  152. like, with or without a decimal point, but if you goof up and 
  153. enter an alphabetic character by mistake you will be rudely 
  154. alerted to that problem by a beep, and then you will be uncere-
  155. moniously dumped back to the start of a procedure.  Sorry about 
  156. that, but FORTRAN is notably unfriendly with keyboard entry of 
  157. data, unlike for example BASIC.
  158.  
  159. For example, entry of the spacing of the Element 1 (reflector) 
  160. from Element 2 (the driven element) would show:
  161.  
  162.      Spacing, Ele. ( 1) to Ele. ( 2), XXX.XXX = 
  163.  
  164. where the "XXX.XXX" shows that a decimal point may be needed, 
  165. and that a maximum of 6 digits with that embedded decimal point 
  166. would normally be entered.  For example, if the reflector spacing 
  167. is 167 inches (about .2 wavelength at 14.15 MHz), you could enter 
  168. "167" or you could also enter "167.0", or "167.00", or even 
  169. "167.000".  
  170.  
  171. If the yagi you are evaluating lists the element length and the 
  172. element length in fractions of the wavelength, then use the fol-
  173. lowing formula to convert to inches:
  174.  
  175.   Wavelength x fraction = (11803/Frequency) x fraction, where 
  176.      Frequency is in MHz, and Wavelength is in inches.
  177.  
  178. If for example, the length of a particular segment is stated as 
  179. ".15" lambda (the Greek letter depicting wavelength), and the 
  180. Frequency is 14.15 MHz, the equivalent length at the design freq-
  181. uency is:
  182.  
  183.   Length (inches) = (11803/14.15) x .15 = 125.120 inches
  184.  
  185. Another important point about data entry into ACCUPLOT: all 
  186. measurements are assuming that the yagi is constructed with 
  187. tapered telescoping tubing.  The length to be entered for any 
  188. particular segment is ON ONE SIDE OF THE BOOM ONLY.
  189.  
  190. If you are evaluating a VHF antenna that has no telescoping taper 
  191. of the elements, then when the program prompts you for: 
  192.  
  193.      How many tapered segments in Element ( 1) -- max.7 =
  194.  
  195. you would enter "1", and after entering the o.d. of that segment, 
  196. you would answer:
  197.  
  198.      Length of segment(1), XXX.XXX =
  199.  
  200. with some number such as "7.111" inches, if the overall length of 
  201. the reflector is 14.222 inches.  The program will accept up to 7 
  202. different segments for an element (that is, seven different 
  203. telescoping sizes on one side of the boom), which should take 
  204. care of any design I have seen, even for a 40 meter beam.  
  205.  
  206. [Speaking of 40 meter beams, the effect of taper on the resonant 
  207. frequency is very, very dramatic!  The severe tapering scheme 
  208. used for the Wilson 40 meter beams never was properly compensated 
  209. for in the original designs, but many amateurs lengthened the 
  210. nominal element lengths to achieve good results.  ACCUPLOT 
  211. verifies this well.]
  212.  
  213. Once you have entered the last piece of data for the first ele-
  214. ment, you will be placed back at the MAIN MENU.  You would now 
  215. probably want to calculate the response pattern of your yagi and 
  216. probably plot it on-screen.  Select number 2 from the MAIN MENU.  
  217. Follow the menu prompts.  By the way, if you wish to print out a 
  218. graphics plot screen to the printer, you must first load 
  219. GRAPHICS.COM from the DOS disk before you start up any of the 
  220. three main programs.  Hit <Shift> <PrtSc> to print the plot 
  221. sideways on the printer.
  222.  
  223. Note that you have a choice of plotting either a Polar or a 
  224. Rectangular plot.  The Polar plot can see down to -30 dB below 
  225. the peak response.  For the Polar plots the H-Plane (Elevation 
  226. pattern) is shown on the left-hand side, and the E-Plane 
  227. (Azimuthal pattern) is shown on the right-hand side.  The 
  228. responses are symmetrical about the Y-Axis for either plane.
  229.  
  230. The Rectangular plot is more flexible in that you may choose the 
  231. minimum level to be displayed.  Most often you would probably use 
  232. a number like "-30" dB, but you may want to see directly the -3 
  233. dB response to gauge the half-power beamwidth.  Only half the 
  234. response is shown for the Rectangular plot (as is true for the 
  235. Polar plot.)  
  236.  
  237. If you choose not to display the full pattern readouts, but in-
  238. stead want to print out the forward gain and F/B ratio only for a 
  239. range of frequencies, then choose MAIN MENU selection number 4.  
  240.  
  241. Note that internally the program is calculating at each frequency 
  242. in the range you will specify the "effective" length of an ele-
  243. ment, using as a "standard cylinder" the geometric mean of the 
  244. first and last segments of the first director.  After printing 
  245. out a table of physical dimensions (in inches), ACCUPLOT will 
  246. print out the same information, this time expressed in units of 
  247. wavelength.  The element lengths however are those for the 
  248. "standard cylinder" at the center design frequency (the geometric 
  249. mean frequency of the lower and upper frequencies in the band).  
  250.  
  251. You will next be prompted for the starting, and ending frequency 
  252. over which you want to evaluate the antenna, and also the freq-
  253. uency increment.  For example, you might type in:
  254.  
  255.          14.0,14.35,.025
  256.  
  257. to evaluate a 20 meter yagi over the range of 14.0 - 14.35 MHz, 
  258. in increments of .025 MHz = 25 KHz.
  259.  
  260. If you determine that you like the response characteristics of a 
  261. particular yagi at one frequency, you can then scale it to a 
  262. different band using this data and the formulae described by W2PV 
  263. in his articles, or you would probably use the SCALE program 
  264. described later, since it is much easier and faster than manual 
  265. means.  
  266.  
  267. Also, please note that the gains given are referenced to "dBi" or 
  268. "isotropic," in free space.  To translate this to "dBd" referenc-
  269. ed to a dipole, subtract 2.15 dB.  "Free space" means in practi-
  270. cal terms that the antenna is no less than one wavelength above 
  271. ground, and preferably at least two wavelengths.  The vertical 
  272. takeoff angle is at zero degrees, the free space value.
  273.  
  274. SCALE
  275.  
  276. The SCALE program uses a data disk file created by YAGIPLOT, 
  277. KLMPLOT or ACCUPLOT, and gives you the opportunity to scale the 
  278. design to a new center frequency and/or to a new taper schedule.  
  279. The keyboard input is very similar to that for ACCUPLOT.
  280.  
  281. You will first be given an opportunity to Label the new yagi 
  282. design.  I usually use the original disk filename, with a comment 
  283. about the scaling that was done.  For example, if I want to scale 
  284. the file W6SAI320.16 to 15 meters, I would enter as a Label: 
  285. W6SAI320.16, SCALED TO 15M.  
  286.  
  287. After asking for a new design frequency, SCALE will run through 
  288. the taper schedule to be used at the new frequency, starting at 
  289. Element 1, just like in keyboard entry in ACCUPLOT.  Once the 
  290. diameter for the last segment has been specified the program 
  291. automatically skips to the next element to be specified, since 
  292. the end-segment's length will be automatically calculated by 
  293. SCALE.  
  294.  
  295. Note: if the overall length of the segments making up an element 
  296. adds up to a length that is longer than the program calculates, 
  297. SCALE will make the end segment a negative number.  Obviously, 
  298. this indicates that the next-to-last segment should be made shor-
  299. ter than originally specified, or that the operator had better 
  300. pay more attention to his taper schedule.
  301.  
  302. The program will make its calculations, and then show on-screen 
  303. the length of the resulting boom.  It will then ask you to give a 
  304. filename for the new, scaled design.  For example, if you have 
  305. scaled a file called N2FB620.52 from 20 meters to 15 meters, and 
  306. the resulting boom is 35 feet long, an appropriate filename might 
  307. be N2FB615.35, using my afore-mentioned file naming "convention."
  308.  
  309. After this is done, SCALE will go back to the DOS prompt.  You 
  310. will probably wish to run the resulting data disk file through 
  311. ACCUPLOT again to verify that the automatic scaling is reason-
  312. able, and that the frequency response is appropriate.  You will 
  313. find that the taper schedule used for a Yagi has a subtle and not 
  314. always intuitive effect on the pattern as a function of freq-
  315. uency, and you may have to run SCALE several times to compensate 
  316. for this effect.  SCALE seems to shift the response in frequency 
  317. more for severe taper schedules.
  318.  
  319. Note: one very interesting use of SCALE is to create a non-
  320. tapered yagi design from a design originally made with tapered-
  321. elements.  In other words you may wish to have no taper at all -- 
  322. say, a design with simple 1" o.d. elements on 20m.).  Then these 
  323. single-taper element lengths may be entered into another modeling 
  324. program, such as MININEC3, to do other calculations.  Note that 
  325. in such a scaling exercise, the frequency to use when asked by 
  326. the program is the geometric mean of the low and high frequencies 
  327. stored in the orginal file; i.e., the square root of the product 
  328. of the low frequency times the high frequency.  This geometric 
  329. mean is the frequency shown before SCALE asks you to enter a new 
  330. frequency.
  331.  
  332.  
  333. After scaling a design to a new frequency you might want to use 
  334. the OPTYAGI program to optimize the pattern for the new band.
  335.  
  336. KLMPLOT
  337.  
  338. This section documents briefly the KLMPLOT program.  KLMPLOT is 
  339. very similar in concept and operation to YAGIPLOT.  The only 
  340. difference really is that instead of being asked which element is 
  341. the driven element in the other program, KLMPLOT asks you for the 
  342. impedance of the crossed transmission line between elements 2 and 
  343. 3, the dual-driven elements.  The impedance I usually use is 100 
  344. ohms, which is what I guess KLM is using in their designs.  
  345. Everything else operates the same as ACCUPLOT.
  346.  
  347.  
  348. OPTYAGI
  349.  
  350. The OPTYAGI program stands obviously for "Optimizing a Yagi" 
  351. design.  OPTYAGI uses the same algorithms as YAGIPLOT, and can 
  352. thus be viewed as a "first cut" at optimization, due to the 
  353. slightly lowered accuracy of pattern calculations of YAGIPLOT as 
  354. opposed to ACCUPLOT.  OPTYAGI will first ask for an existing 
  355. filename (created by ACCUPLOT or YAGIPLOT) from which it will 
  356. garner data about the yagi to be optimized.  (Note: OPTYAGI is 
  357. not designed to be used with KLM designs.)  As usual, the oper-
  358. ator may specify disk drive and path name as well as the data 
  359. filename.
  360.  
  361. The program will then ask for the desired frequency at the low 
  362. end of the band, and then the frequency at the high end of the 
  363. band.  I usually choose frequencies 10 KHz below and above the 
  364. band edge for 15 and 20 meter HF designs; +/- 20 KHz for 10m.,  
  365. etc.  For 40 meter designs with three or two elements, the per-
  366. centage bandwidth between 7.0 and 7.3 MHz is more than 4%, and it 
  367. is very difficult to obtain a good F/B ratio over that large a 
  368. bandwidth.  I usually end up choosing 6.99 MHz for the low end, 
  369. and 7.2 MHz for the high end, since it is more important for most 
  370. of my operating to have good F/B in the CW band than the phone 
  371. band.  You choose your own frequency limits.
  372.  
  373. You will next be presented with the choice of automatically vary-
  374. ing the Length of an element, or varying the Spacing of an ele-
  375. ment.  Spacing refers to the distance from an element to the 
  376. next one further on the boom.  For example, varying the spacing 
  377. of element 2 in a three element design would vary the spacing 
  378. between the Driven Element to the next one forward; i.e., the 
  379. Director. 
  380.  
  381. Once you have specified the element of interest and whether you 
  382. wish to vary its length or its spacing, OPTYAGI will go ahead and 
  383. grind out the numbers.  It will display the Forward Gain and F/B 
  384. ratio for the low, geometric mean, and high end of the band you 
  385. specified.  This will be done for each of 9 different iterations 
  386. of spacing or element length.  
  387.  
  388. For long yagis, with more than 10 elements or so, you will have 
  389. to wait a long time.  (By the way, these programs are considerab-
  390. ly faster than MININEC, even MININEC compiled for speed.)  ACCU-
  391. PLOT is however not as ultimately versatile as MININEC, being 
  392. specially coded only for Yagi evaluation, and for free-space 
  393. conditions. 
  394.  
  395. For the automatic spacing variation case, each iteration varies 
  396. the spacing for the chosen element by 5%.  Iteration number 5 is 
  397. the original spacing of the design.  Choose the iteration which 
  398. looks most promising for your own criteria of either maximum 
  399. gain, maximum F/B or the best combination of gain and F/B over 
  400. the frequency range of interest.
  401.  
  402. After choosing which of the nine iterations you want to keep, you 
  403. will be shown the overall length of the boom, the filename for 
  404. the design being tested (this is to help me remember what I'm 
  405. doing if I'm interrupted in the middle of a run!), and then you 
  406. will be asked whether you want to Continue, save data to Disk or 
  407. Quit ([C]/D/Q).  The square brackets indicate that if you simply 
  408. hit the Carriage Return button the program will Continue on, 
  409. going back to ask you whether you want to vary the Length or the 
  410. Spacing.  The length or spacing from the chosen iteration will 
  411. now be in the parameter matrix inside the computer's memory.
  412.  
  413. Otherwise, hitting D will prompt you for a new filename under 
  414. which to save the parameters.  Note: I find when running a number 
  415. of different iterations in spacing or element length that I save 
  416. the parameters to disk often, because I find myself "beating" the 
  417. program to the punch and selecting an early iteration number 
  418. before all nine iterations have run.  However, if I screw up and 
  419. get out of sequence, FORTRAN punishes me by aborting back to the 
  420. DOS prompt without saving my carefully optimized parameters.  A 
  421. word to the Wise: SAVE to Disk often!
  422.  
  423. There are also included two sample data files for use in veri-
  424. fying that the programs work.  The two files are: "204BA.26" for 
  425. the Hy-Gain 204BA 4 element yagi, and "WIL520.46" for the 5 
  426. element Wilson design for 20 meters.  These two designs are good 
  427. examples of well-designed yagis that have been quite popular in 
  428. actual use.  They can be optimized for more gain, or for more F/B 
  429. but they represent reasonable compromises in both of these para-
  430. meters to yield good performance over the band.  
  431.  
  432. There are many designs which do not work as well, although in 
  433. general most yagis seem to have been designed for maximum gain, 
  434. with only passing attention paid to Front-to-Back ratio or good 
  435. sidelobe suppression.  Personally, I like a good F/B, since in DX 
  436. contests I like to keep those loud W5's off my tail when I am 
  437. working into Japan from Northern California, even if I have to 
  438. sacrifice a half dB or so of forward gain!
  439.  
  440. Note: for the 204BA, the length of the first segment (i.e., the 
  441. segment abutting the boom) has already been lengthened in the 
  442. following table by 1.0 inch, since the boom is 2.0" o.d., and         
  443. each element in essence is clamped so that in effect it goes         
  444. through the center of the boom.  The Wilson design uses angle         
  445. brackets and U-Bolts to space the elements over the boom.  This         
  446. type of design, as Lawson points out, has a minimal effect on         
  447. effective element length for an HF yagi.
  448.  
  449. I have learned a lot about yagis with this program, and I hope 
  450. you will too.  Any comments may be directed by mail or by Compu-
  451. Serve on the HAMNET.  
  452.  
  453.  
  454.                        R. Dean Straw, N6BV
  455.                        CompuServe 72466,273
  456.                        5328 Fulton Street
  457.                        San Francisco, CA  94121
  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.