OPTIMISE(1)

🌸 NAME 🌸

okay so bestie, meet optimise β€” the Yagi-Uda project antenna optimiser πŸ’– she lives in section 1 of the manual, aka the General Commands Manual, and she is entirely about making your Yagi antenna be her best self ✨


πŸ¦‹ SYNOPSIS πŸ¦‹

optimise [ -dhvwO ] [ -aangular_stepsize ] [ -bboom_extension ] [
-ccleanliness_of_pattern ] [ -eelements ] [ -fFBratio ] [
-gGA_optimisation_method ] -lpercent ] [ -mmin_offset_from_peak ] [
-ooptimisation_criteria ] [ -ppopulation ] [ -rresistance ] [ -sswr ] [
-tlength_tolerance ] [ -xreactance ] [ -AAuto_gain ] [
-CCurrents_similar ] [ -Fweight_FB ] [ -Gweight_gain ] [
-Kkeep_for_tries ] [ -Pweight_pattern_cleanliness ] [
-Rweight_resistance ] [ -Sweight_swr ] [ -Tposition_tolerance ] [
-WWeighted_algorithm ] [ -Xweight_reactance [ -ZZo ] filename iterations

πŸ’… DESCRIPTION πŸ’…

ok so optimise is one of a bunch of executable programs that are all part of one big set, collectively known as the Yagi-Uda project, and the whole squad was designed for analysis and optimisation of Yagi-Uda antennas. optimise specifically attempts to optimise the performance of a Yagi antenna for one or more parameters that we consider important, like gain, F/B ratio, VSWR etc. How does she do it? She randomly changes the lengths and positions of one or more elements, then compares the performance before and after the change. Any improvements get written to a new file called filename.bes, where filename is the name of the antenna description file created by input or first. πŸ‘‘

Now, real talk: when Yagi's are designed on paper, or using this program, it's possible they'll be almost impossible to build, if their performance depends too critically on the dimensions. To figure out if that's the situation with your design, we run optimise with just the options t and T. Those specify the tolerance with which you can build the antenna, expressed as a standard deviation in mm. In this case, instead of trying to optimise a poor design, optimise will calculate the minimum gain, maximum VSWR, and minimum FB ratio of a number of designs, all slightly different from the input file. 99.7% of the components lie within 3 SD of the mean, so if you think you can cut elements to within 1 mm 99.7% of the time, specify t0.33. If you can put them in the boom to within 3 mm 99.7% of the time, specify T1. πŸŽ€

And here's a cute little trick 🫢 β€” if, while optimise is running using the methods that require weights to be attached to the gain, FB, SWR etc, it becomes apparent the weights are not optimum, it's possible to pause the program and re-adjust the weights. If a file with the name of changes is created, the program will pause, then request new weights are entered at the keyboard. iconic behaviour honestly πŸ’…


🌈 AVAILABILITY 🌈

ngl bestie, this section is literally empty in the original β€” there is nothing under it before OPTIONS starts. not me staring at a blank heading 😭 anyway, moving on ✨


✨ OPTIONS ✨

  • -d β€” print the default values of all the configureable parameters to stdout. Typing this option with any option that changes a parameter (peep below πŸ‘€) will display the new value of the parameter, rather than the default. slay.
  • -h β€” print a help message. your little SOS button πŸ’–
  • -v β€” print verbose status information. she will tell you everything, main character energy.
  • -w β€” instead of optimising at one fixed frequency (the design frequency), this directs the program to optimise at 3 separate frequencies (lowest, design and highest) then to average data at all 3. This option is better for wideband antenna. πŸ¦‹
⚠️ note that the input impedance printed is at the design frequency, not averaged over 3 frequencies. Averaging an impedance is likely to give a very misleading impression. The impedance averaged over 3 frequencies can be 50+i0 Ohms, even if the VSWR is very poor over all 3 frequencies, as the following 3 pieces of data show.
Z=147 + j 300  SWR= 15.46:1
Z=2   + j 100  SWR= 125:1
Z=1   - j 400  SWR= 3250:1

note in the above three cases, the average impedance is 50 + j 0, but average SWR is 1130:1. πŸ’€ yeah. that's why.

  • -O β€” Over-optimisation allowed. By default, the program does not over-optimise a parameter. For example, an SWR of 1.01 is usually considered good enough and any change, as long as the SWR stayed good, typically below 1.1:1, would be allowed, even if the SWR rose. By default, FB's of 27 dB, VSWR's of 1.1 are acceptable. However, by using the -O option, you can insist the program always improves things, no matter how good they are. no chill mode, periodt πŸ”₯
  • -aAngular_stepsize β€” when optimising by trying to get a clean pattern, this specifies the step size to use when looking for features in the pattern. If it's set too small, the program runs slow 🐌. If it's set too large, the program may miss features in the pattern, such as a sidelobe β€” and then the resulting antenna will have poor sidelobe performance, even though you think it will be good. 😭 The program attempts to calculate a sensible value, based on 1/10th the approximate 3 dB beamwidth, if you don't set it.
  • -bboom_extension β€” generally speaking, the gain of a Yagi increases with boom length. Hence the optimiser would often give you a Yagi with a much longer boom than the input file. This may not be what you desire due to space restrictions πŸ₯². These long antennas often have high gain, but are very narrow in bandwidth. The default limits the antenna to 10x the original length, which means effectively there is no boom length limitation. You can adjust the percentage by setting boom_extension to whatever you wish. -b30 will limit the boom to no more than 30% more than the original length. pick your vibe πŸ’…
  • -ccleanliness_of_pattern β€” specify the number of dB down on the peak gain to aim to get the pattern. Any antenna pattern cleaner than this will not effect the fitness, nor will it be considered any better when comparing to antenna designs. 20 dB seems reasonable, so the default is 20, but this may of course change if it's deceided too. Check the source code to be certain (see REASONABLE_SIDELOBE in yagi.h). iykyk πŸ‘‘
  • -eelements β€” is an integer which specifies the type of elements that are changed in the optimisation cycle. Possible values are:
    • 1 β€” alter only the driven element(s) length (useful to bring to resonance)
    • 2 β€” alter only the driven element position. Don't change its length.
    • 4 β€” alter only the reflector length. The position is always at x=0.
    • 8 β€” alter only the director lengths. Don't change positions.
    • 16 β€” alter only the director positions. Don't change lengths.
    • 32 β€” randomly adjust one element length, then makes all other the same. Don't change the positions.
    • 64 β€” apply a linear taper to the lengths.
    • 128 β€” Set the driven element to a resonate length. It may/may-not be altered after the first run, depending on the whether or not 1 is invoked too. Eg -e128 will make it resonate and keep it there forever. However -e129 will bring to resonance, then alter to maximuse performance.

The elements altered is made from a logical AND of the above, so for example to alter everything, except the driven element length, use -e30, since 2+4+8+16=30. The default is equivalent to -e31, which changes everything possible. Note the reflector position is never changed. It's always at x=0. 🚫 never ever, no cap.

  • -fFBratio β€” when optimising an antenna, consider any FB ratio greater than FBratio dB to be equal to FBratio dB. This avoids optimising to a very high FB ratio, which is impracticable, as the bandwidth over which this FB ratio will be maintained is very small and mechanical considerations will prevent you from constructing it with such a high FB ratio anyway. If this was not prevented, you might just happen to get an antenna with 100 dB FB ratio, but poor gain and swr 😭. Since by default all parameters must improve, the optimisation routine will most likely never being able to improve on the 100 dB FB ratio, so no improvement will result. Most people would prefer to get a few extra dB of gain, even if the FB ratio dropped to 30 dB. reasonable tbh πŸ’–
  • -gGA_optimisation_method β€” Use a genetic algorithm. 🧬 With the genetic algorithm, the program does not take any account any of the initial lengths/positions of elements specified in the input file. Rather it works by initialising a number of different antenna, then computing a 'fitness' value for each. The fitness value can depend on the gain, FB, real part of the input impedance, reactive part of the input impedance, VSWR or the level of the sidelobes. The integer after the g tells the optimiser what to consider.
    • -g1 Use gain
    • -g2 Use FB
    • -g4 Use R
    • -g8 Use X
    • -g16 Use the SWR
    • -g32 Use the level of the sidelobes.

You can use a logical AND of these, so for example -g49 will use a genetic algorithm, optimising for gain, swr and sidelobe level, since 1(gain)+16(SWR)+32(sidelobe level)=49. math ate πŸ’…

  • -lpercent β€” is a parameter (floating point number) which specifies the maximum percentage change in the positions or lengths of an elements at each iteration. If the option is not used, it will be set internally at 10% for the first 25% of the iterations, 1% for the next 25%, 0.1% for the third 25% of the iterations and 0.01% for the last 25% of the iterations. If set to a positive number x (eg optimise -l 0.3 145e10) then the percentage will be set at x% for 25% of iterations, x/10 for the next 25%, x/100 for the next 25 and x/1000 for the last 25%. If set to a negative number y (eg optimise -l -0.5 145e10) then the parameters will stay fixed at y% (in this example 0.5%) all the time. πŸŽ€
  • -mmin_offset-from_peak β€” Sets the minimum angle in degrees offset from theta=90 degrees, where the side lobes start and the main lobe finishes. The higher the gain, the smaller it should be. It is set internally if not set on the command line. 🌸
  • -ooptimisation_criteria β€” okay bestie, this is the big one, the vibe check for what "better" even means. You pass it a number, and it's built from these lil flags, and you add them together to make a bitmask (the manpage calls it a logical AND, but the example adds them, so iykyk πŸ’…):
    • 1 β€” Assume better if the gain has increased. πŸ“ˆ
    • 2 β€” Assume better if the front to back ratio has improved. 🎯
    • 4 β€” Assume better if the real part of the input impedance is closer to the value that the program was compiled for, or set using the -Z option. This will usually be 50 Ohms, but you may wish to set this to 12.5 Ohms if you use a 4:1 balun. Generally you can get higher gain from a Yagi if you allow the input impedance to fall, but of course feeding it becomes more difficult. 🫠
    • 8 β€” Assume better if the magnitude of the reactive component of the input impedance is lower (ie. the antenna is nearer resonance). 🌊
    • 16 β€” Assume better if the VSWR is lower. ⬇️
    • 32 β€” Assume better if the level of all sidelobes is lower. 🀫

The optimisation_criteria may be formed from a logical AND of these numbers, so for example choosing -o19 will only consider a revised antenna better than the previous, if the SWR, gain and F/B ratio have all simultaneously improved. ✨

Clearly an antenna which originally had 12 dB gain and 1.01:1 VSWR but then changes to 20 dB gain @ 1.02:1 VSWR, would to most people be better, even though the VSWR has increased. By default, optimise only optimises to sensible maximums, so to not let the optimisation stall prematurely. By running optimise with no arguments, the program will list the limits of acceptability. These might be typically F/B ratio > 27 dB, VSWR < 1.1:1, magnitude of input reactance less than 5 Ohms and the real part of the input impedance within 5 Ohms of Zo. Choosing -o19 (1+2+16=19) will optimise for gain (since G=1), FB (since FB=2) and SWR (Since SWR=16), but would consider a higher gain and FB ratio antenna better than a previous one, even if the SWR rose, as long as it stayed below 1.1:1 (or as was set during compilation). The default behaviour (no options) is equivalent to -o37 which optimises for gain(1), the real part of the input impedance(4) and sidelobes(32) but this may be changed at any time, so type optimise -d to check the current settings. If you insist on the program optimising for the very best of all selected parameters, use the -O option too, but be warned the optimisation will probably stick once it gets one parameter really good. πŸ’€

  • -ppopulation β€” this determines the initial population used with the genetic algorithm. 🧬✨
  • -rresistance β€” when optimising an antenna, consider any input resistance closer to Zo (usually 50 Ohms) than resistance Ohms to be acceptable. This avoids optimising to an input resistance too close to Zo, which is impracticable, as the bandwidth over which the input resistance could be maintained is very small and mechanical considerations will prevent you from constructing the antenna with such an ideal input resistance. If this was not prevented, you might just happen to get an antenna with an input resistance of 50.000001 Ohms, but poor gain, FB and possibly even a poor swr, if the antenna is well away from resonance. Since by default all parameters must improve, the optimisation routine will get most likely never being able to improve on the antenna, whereas we might be happier with a few more dB gain, if the input resistance went to 50.1 Ohms. It should be noted that the default optimisation routine never uses the input resistance directly (only VSWR), so this option cant be used without the -o option to optimise for other than the default parameters (gain, VSWR and FB ratio). 😭
  • -sswr β€” when optimising an antenna, consider any SWR less than swr to be equal to swr. This avoids optimising to a very low swr, which is impracticable, as the bandwidth over which such a low swr could be maintained would be very small and mechanical considerations will prevent you from constructing such an antenna anyway. If this is was not prevented, you might just happen to get an antenna with an swr of 1.000000000001:1, but poor gain, FB ratio. Since by default all parameters must improve, the optimisation routine will most likely never being able to improve on the antenna, even though in practice you would like to get a few extra dB of gain if the SWR would rise to 1.02:1. The default was equivalent to -s1.1 but run optimise -d to display this and any other defaults. 🫢
  • -tlength_tolerance β€” length_tolerance is the standard deviation in mm of the accuracy with which you can cut elements. Since 99.7% of elements will be with 3 standard deviations of the mean length (stats theory says this), set -t0.2 if virtually all (well 99.7%) of elements are within 3x0.2=0.6 mm of the correct length. This option must be used with the -T option and can't be used with any other options apart from -Z, -v and -d. πŸŽ€
  • -xreactance β€” when optimising an antenna, consider any input reactance of less than reactance to be reactance. This avoids over optimising the reactance, at the expense of something else. 🌸
  • -Aauto_gain β€” when the auto_gain option is used, the program maximes the gain of the antenna (ignoring all other parameters such as SWR, FB ratio etc) by adjusting the length (not position) of one element only. -A-1 will maximuse the gain, by adjusting the length of the reflector, -A0 will maximise the gain by adjusting the length of the driven element. Its generally not a good idea to maximise the gain by adjusting the driven element, but the program lets you do it, but using the option -A0. Using -A1 will maximise gain by adjusting the length of the first director, -A2 the second director and so on, up to the last director. You must check carefully that the input impedance in particular does not fall to silly values if you use this option. On a yagi with many elements (> 10 or so), you can pretty safely maximise the 8th or more director, but doing it on the reflector, driven element or early directors often leads to silly input impedances - so beware! Note, no matter how many iterations you specify, this process is only done once. Its unlikely you will be able to do it again, without things going out of hand, but if you must do it, you must re-run optimise again. πŸ’…
  • -Ccurrents_similar β€” if this option is used, where currents_similar is an integer, the program looks to make the currents in the last currents_similar elements as similar as possible. It computes the sum of the squares of the deviations of the absolute values of the element currents from the mean. If this falls, and the criteria specified with the -W option is also satisfied, the antenna is considered better. If currents_similar is three less than the number of directors, it tries to make the currents in the the directors (but ignoringing the first 3) all similar. If currents_similar is equal to the number of directors, it tries to make all the directors have similar currents. If currents_similar is one more than the number of directors, it tries to make all the directors and the reflector have similar currents. If currents_similar is equal to the total number of elements, then it fails with an error message. πŸ›‘
  • -Fweight_FB β€” is the floating point number (default 1.0) specifying the weight to attach to the FB ratio of the antenna when using the -W option, which calculates a fitness for the antenna based on one or more parameters (FB, gain, input resistance, input reactance, SWR, cleanliness of antenna pattern). The -F option is similar to the options -G, -P, -R, -S, -X (which specify weights for gain, pattern cleanliness, input resistance, SWR and input reactance). When using the -W option the exact algorithm used to compute the fitness (and hence the effect of this parameter) is best checked by looking at the source code (see perform.c). This is one area of constant program improvement/changes/development, so its difficult to say exactly the effect the parameter has. However, increasing the weight of a parameter (using the -F, -G, -R, -S or -X options) will make the associated parameter have a greater effect on the fitness. However, unless you optimise for a high FB ratio with the -W option, then setting the -F option will have no effect. For example, setting the options -F2.5 -W1 is a complete waste of time. There you have used the -W1 option to optimise only for gain (see -W option section of man page) but have changed the weight of the FB ratio from its default 1.0 to 2.5. If you are not optimising for FB ratio, the weight you attach to it is irrelavent. πŸ’€
  • -Gweight_gain β€” is the floating point number (default 1.0) specifying the weight to attach to the gain of the antenna when using the -W option, which calculates a fitness for the antenna based on one or more parameters (FB, gain, input resistance, input reactance, SWR, cleanliness of antenna pattern). The -G option is similar to the options -F, -P, -R, -S, -X (which specify weights for FB ratio, pattern cleanliness, input resistance, SWR and input reactance). When using the -W option the exact algorithm used to compute the fitness (and hence the effect of this parameter) is best checked by looking at the source code (see perform.c). This is one area of constant program improvement/changes/development, so its difficult to say exactly the effect the parameter has. However, increasing the weight of a parameter (using the -F, -G, -R, -S or -X options) will make the associated parameter have a greater effect on the fitness. However, unless you optimise for gain with the -W option, then setting the -G option will have no effect. For example, setting the options -G2.5 -W2 is a complete waste of time. There you have used the -W2 option to optimise only for FB ratio (see -W option section of man page) but have changed the weight of the gain from its default 1.0 to 2.5. If you are not optimising for gain, the weight you attach to it is irrelavent. 🌈
  • -Kkeep_for_tries β€” okay so keep_for_tries is how many tries the optimiser stays put, still using the original data file as its starting point, before it's like "aight I'm moving". Default is 1, meaning the second it finds a better spot it immediately starts looking from a whole new position. theoretically that could land you on a quick-but-mid local maximum 🫠 but if keep_for_tries is 1000, it chills at a position for 1000 iterations after the last best result before it decides "this is the global optimum fr" and then moves on. Ngl, in practice the author found this option made things worse in most cases. It got added to dodge the local-minimum problem, but the optimisation surface is apparently pretty smooth, so it just slows the program down without really gaining anything. Anyway, it stays as an option β€” just check your results with and without it carefully before you go using it extensively. πŸ’…
  • -Ppattern_cleanlyiness β€” a floating point number (default 1.0) setting the weight attached to the cleanness of the antenna pattern when you're using the '-W' option, which calculates a fitness for the antenna based on one or more parameters (FB, gain, input resistance, input reactance, SWR, cleanliness of antenna pattern). The '-P' option is similar to the options -F, -G, -R, -S, -X (which specify weights for FB ratio, gain, input resistance, SWR and input reactance). When you use the -W option, the exact algorithm computing the fitness β€” and therefore this parameter's effect β€” is best checked by looking at the source code (see perform.c). This is one area of constant program improvement/changes/development, so it's hard to say exactly what effect the parameter has. That said, increasing the weight of a parameter (via the -F, -G, -R, -S or -X options) makes the associated parameter have a greater effect on the fitness. But β€” unless you optimise for a clean antenna pattern with the -W option, setting -P does literally nothing. For example, setting the options -P2.5 -W1 is a complete waste of time. There you've used -W1 to optimise only for gain (see the -W option section of the man page) but changed the weight of pattern cleanliness from its default 1.0 to 2.5. If you're not optimising for a clean radiation pattern, the weight you attach to it is irrelevant. With appropriate use of the -W option (eg -W49 for gain, SWR and a clean pattern), the program finds the level of the most significant sidelobe, wherever it may be outside the main beam. It then optimises to reduce this. The -P option tells it how much weight to put on reducing this sidelobe. πŸ¦‹
  • -Rweight_resistance β€” a floating point number (default 1.0) setting the weight attached to obtaining an input resistance close to Zo on the antenna when you're using the '-W' option, which calculates a fitness for the antenna based on one or more parameters (FB, gain, input resistance, input reactance, SWR, cleanliness of antenna pattern). The '-R' option is similar to the options -F, -G, -P, -S, -X (which specify weights for FB, gain, pattern cleanliness, SWR and input reactance). When you use the -W option, the exact algorithm computing the fitness β€” and therefore this parameter's effect β€” is best checked by looking at the source code (see perform.c). This is one area of constant program improvement/changes/development, so it's hard to say exactly what effect the parameter has. That said, increasing the weight of a parameter (via the -F, -G, -R, -S or -X options) makes the associated parameter have a greater effect on the fitness. But β€” unless you optimise for an input resistance close to Zo with the -W option, setting -R does nothing. For example, setting the options -R2.5 -W1 is a complete waste of time. There you've used -W1 to optimise only for gain (see the -W option section of the man page) but changed the weight of the resistance from its default 1.0 to 2.5. If you're not optimising for an input resistance close to Zo, the weight you attach to it is irrelevant. πŸ’œ
  • -Sweight_swr β€” a floating point number (default 1.0) setting the weight attached to the SWR of the antenna when you're using the '-W' option, which calculates a fitness for the antenna based on one or more parameters (FB, gain, input resistance, input reactance, SWR, cleanliness of antenna pattern). The '-S' option is similar to the options -F, -G, -P, -R, -X (which specify weights for FB, gain, pattern cleanliness, input resistance and input reactance). When you use the -W option, the exact algorithm computing the fitness β€” and therefore this parameter's effect β€” is best checked by looking at the source code (see perform.c). This is one area of constant program improvement/changes/development, so it's hard to say exactly what effect the parameter has. That said, increasing the weight of a parameter (via the -F, -G, -R, -S or -X options) makes the associated parameter have a greater effect on the fitness. But β€” unless you optimise for SWR with the -W option, setting -S does nothing. For example, setting the options -S2.5 -W1 is a complete waste of time. There you've used -W1 to optimise only for gain (see the -W option section of the man page) but changed the weight of the SWR from its default 1.0 to 2.5. If you're not optimising for SWR, the weight you attach to it is irrelevant. ✨
  • -Tposition_tolerance β€” position_tolerance is the standard deviation in mm of the accuracy with which you can cut elements. Since 99.7% of elements will be within 3 standard deviations of the correct position (stats theory says so, no cap), set -T2 if virtually all (well, 99.7%) of elements are within 3x2=6 mm of the correct position. > This option must be used with the '-t' option and can't be used with any other options apart from '-Z', '-v' and '-d'. πŸ‘‘
  • -WWeighted_algorithm β€” try to get an antenna which is better according to a weighted combination of parameters, rather than requiring them all to improve. The integer specifies what to consider in the weighted parameters.
    • W1 Gain.
    • W2 FB
    • W4 R
    • W8 X
    • W16 SWR
    • W32 SIDE_LOBE

You can logically AND these together, so for example -W3 will optimise using a weighted combination of gain and FB. -W49 will use a weighted combination of gain, swr and sidelobe level, since 32+16+1=49. πŸ”₯

  • -Xweight_reactance β€” a floating point number (default 1.0) setting the weight attached to achieving a low input reactance on the antenna when you're using the '-W' option, which calculates a fitness for the antenna based on one or more parameters (FB, gain, input resistance, input reactance, SWR, cleanliness of antenna pattern). The '-X' option is similar to the options -F, G, -P, -R and -S (which specify weights for FB ratio, gain, pattern cleanliness, input resistance, and SWR). When you use the -W option, the exact algorithm computing the fitness β€” and therefore this parameter's effect β€” is best checked by looking at the source code (see perform.c). This is one area of constant program improvement/changes/development, so it's hard to say exactly what effect the parameter has. That said, increasing the weight of a parameter (via the -F, -G, -R, -S or -X options) makes the associated parameter have a greater effect on the fitness. But β€” unless you optimise for a low input reactance with the -W option, setting -X does nothing. For example, setting the options -X2.5 -W1 is a complete waste of time. There you've used -W1 to optimise only for gain (see the -W option section of the man page) but changed the weight of the reactance from its default 1.0 to 2.5. If you're not optimising for a low input reactance, the weight you attach to it is irrelevant. 🌈
  • -ZZo β€” Zo is the characteristic impedance used when evaluating the VSWR, reflection coefficient and other similar calculations. The optimiser usually tries to bring the input impedance of the antenna to this value. It's set by default to 50 Ohms, so the default is equivalent to -Z50, but it may be set to any positive number. Set to 12.5 Ohms if you're going to feed the antenna with a 4:1 balun. Generally speaking, the gain of a Yagi can be higher for low input impedances, but of course such antennas are more difficult to feed. πŸŽ€

✨ the arguments, bestie ✨

  • filename β€” this is the name of the file containing the antenna description. It's expected to be in a format created by either input or first β€” two other programs in the Yagi-Uda project. This is an ASCII text file. πŸ“„
  • iterations β€” an integer specifying the number of iterations for the optimiser to perform to try to get the best antenna. Time will limit the number you choose. 1000 iterations of a 1ele yagi takes about 5 seconds, a 6ele approximately 60 seconds, an 11 element 350 seconds, a 20 element 1030 seconds, a 33ele 2440 seconds, a 50element 5400 seconds, 100ele 21320 seconds β€” all on an old 25MHz 486 PC with no external cache. πŸ’€ When using the -A option the iterations is automatically set internally so only one attempt is made. When using the '-t' and '-T' options, iterations specifies the number of iterations to attempt to get a poorer design, to check the sensitivity of the design to small manufacturing tolerances. 🌸

πŸ’– EXAMPLES πŸ’–

Okay bestie, here's a whole little gallery of ways you can run optimise. Come look, they're iconic.

  1. optimise 5ele 1000

So here the file 5ele gets optimised using the default system for 1000 iterations. That default might typically require gain, FB and SWR to all improve, but ngl that can be changed at literally any time. Either way, the program tells you what it's optimising for, so you're never guessing. And by default it only optimises until the selected parameters are good β€” it's not out here over-optimising any one of them at the detriment of the others. Balance, queen. βš–οΈ

  1. optimise -b30 -f50 -s2 5ele 1000

Same vibe as above, but now: the boom can't extend by more than 30% from its original length, FB ratios above 50 dB are considered acceptable, and so are SWRs less than 2:1. The optimised resultant antenna is likely to have a better FB ratio, but a poorer SWR than in example (1). Trade-offs, we love to see it. πŸ’…

  1. optimise -o1 5ele 1000

This one simply optimises 5ele for maximum forward gain. That's it. The resultant antenna may have a poor FB ratio and is likely to have an unacceptably low input impedance and hence high VSWR. So like... this is not a very sensible method of optimisation. 🚩 Do not recommend, bestie.

  1. optimise -W49 -l7 5ele 10000

This optimises the file 5ele for 10000 iterations. It'll require that the weighted performance of the antenna in three important parameters (gain, sidelobe level and SWR) improves from one design to the next. Wild part: one or two parameters can actually get worst from one design to the next, but the weighted performance is still better. And the positions of the elements or lengths of elements will not change by more than 7% in each iteration. Growth mindset fr fr. 🌱

  1. optimise -g -S30 -G50 -F20 -p1500 5ele 10000

Now we're doing a genetic algorithm, okay?? 1500 antennas will be randomly designed. The performance of each of these will be measured using a 'fitness' function, weighted 30% to SWR, 50% to gain and 20% to FB ratio. And the probability of breading from a pair of antennas is proportional to the fitness function. Darwin found shaking. 🧬✨

  1. optimise -w atv_antenna 10000

This optimises the file atv_antenna for a best average performance over a wide band. The progrram calculates the gain, FB and SWR at three frequencies, then computes an average (mean) performance of the antenna over the band. Heads up though: N iterations will take 3x as long to execute as N iterations on the same antenna without the '-w' option. Worth it, but it's giving long-haul. ⏳

  1. optimise -t0.1 -T1 good_design 100

Last one and it's the chaos simulator: this takes the file good_design and makes 100 different antennas from it, to simulate the effects of building tolerances. Each element is assumed to be cut so that the mean error of all elements is 0 mm, but a standard deviation of 0.1 mm, so 68.4% of element lengths are within 0.1 mm, 95.4% within 0.2 mm and 99.7% with in 0.3 mm. The accuracy of placing elements along the boom is much lower, so here we've specified a standard deviation of 1.0 mm, so 68.6% of elements are placed within 1 mm of the correct position, 95.4% within 2 mm of the correct position etc. The program will report the *worst* performances achieved. So if the performance dips too mush, then you either need to build them better, or get a design that's less critical! πŸ˜­πŸ”¨


πŸ›‘ STOPPING πŸ›‘

Optimise will stop after the number of iterations specified in the parameter iterations. It will also stop if a file stop exits in the current directory of the executable optimise. This file can of course only be created using a multi-tasking operating system such as Unix.

It is *not* advisable to stop the program by hitting the DEL key (Unix) or CONTROL-C (DOS), as one of the files may be open at the time, resulting in an empty file. 😱 Files are not open for any longer than necessary (they are closed immediately after writing to them), so this is not a likely occurrence, but can still occur.

🚧 LIMITATIONS 🚧

I'm not aware of any limitations, apart from that filenames, including full path, can't exceed 90 characters. Short and sweet, bestie. πŸŽ€


πŸ“ FILES πŸ“

  • filename β€” Antenna description, created by input or first.
  • filename.up β€” Update file, listing achievements of optimise.
  • filename.bes β€” Best file, containing the best design to date.
  • changes β€” File that causes the program to pause to re-adjust weights.
  • stop β€” File that stops optimisation process.

πŸ‘€ SEE ALSO πŸ‘€

first(1), input(1), output(1), yagi(1), first(5), input(5) output(5) and optimise(5).


πŸ–₯️ PLATFORMS πŸ–₯️

Both DOS and Unix versions have been built. The DOS version as distributed requires a 386 PC with a 387 maths coprocessor. Retro tech moment, we respect the elders. πŸ•ΉοΈ

Although I have altered the source to make it more compatible with DOS (reduced file name lengths etc), my wish is to build a decent program, rather than fit the program to an outdated operating system. If there is a *good* reason to use code that is incompatible with DOS, this will be done.

Since optimise takes a while to optimise an antenna (I've optimised one design for a week 😡), it is obviously more sensible to build this program under a multi-tasking operating system, as otherwise a PC can be tied up for days.


πŸ› BUGS πŸ›

Bugs should be reported to david.kirkby@onetel.net. Bugs tend actually to be fixed if they can be isolated, so it is in your interest to report them in such a way that they can be easily reproduced. Help a dev out, okay? 🫢

  • The program will dump core (crash) if asked to optimise a 1ele beam, without any arguments. This is because a 1ele beam has no parasitic elements and by default the program only changes parasitic elements. πŸ’€
  • Some of the options are not checked for sensible values, although most are now checked and report if they are out of range.
  • If the user specifies very large manufacturing errors using the '-t' and '-T' options, its possible for elements to overlap or for element lengths to become negative. This will cause numerical errors. Any reasonable values will not cause this.
  • On long Yagi's (50 elements) optimise can go a bit silly. It can optimise say a 1296MHz Yagi to get 20 dB at 1296 MHz, but less than 0 dB at only 1 MHz away. Needs some thought! πŸ€”
  • The level of the sidelobes is not computed with the GA or some other optimisation types. This will be corrected later.
  • All those I don't know about. πŸ™ˆ

πŸ‘‘ AUTHORS πŸ‘‘

Dr. David Kirkby G8WRB (david.kirkby@onetel.net). with help with converting to DOS from Dr. Joe Mack NA3T (mack@fcrfv2.ncifcrf.gov).


And that's the whole page, bestie!! πŸŽ‰βœ¨ This was version 1.16, dated 24 October 2000 β€” yeah she's vintage, an absolute icon of the Y2K era, and honestly? Still serving. Go optimise something gorgeous. πŸ’…πŸ’–πŸ¦‹