The Design of a Yagi-Uda Antenna using Genetic Algorithms

The supporting 52 page document for this applet, describing genetic algorithms, can be found in the attached hyperlinked document Genetic Algorithms.pdf.

This applet is based on a description given by the amateur radio community’s “Yagi-GA.doc” in which a three element yagi is described. The purpose of this applet is to demonstrate the design of a reasonably simple GA so that it may become a platform for more advanced designs.

Unlike deterministic optimization schemes, a genetic algorithm is based on near random selection.  A binary-coded genetic algorithm starts by creating a population of chromosomes that are random bit sequences (zeros and ones).  Each chromosome contains a complete antenna design (in this example, a complete 3-element Yagi).  The chromosome is made up of genes which are strung together one after another.  Each gene corresponds to one of the antenna's design parameters.

 

The Yagi gene table appears in Table 1.  A design is fully specified by 8 genes: reflector (REF) length and radius, driven element (DE) length and radius, director (DIR) length and radius, and DE/DIR location along the boom. Gene length is its length in bits (for example, REF length is 5 bits).

 The minimum and maximum values of each design parameter also appear in the table, and all dimensions are in wavelengths (wv).  The DE length, for example, cannot be longer than 0.6 wavelengths or shorter than 0.4 wavelengths.

 

             Table 1.           Gene Table for 3-Element Yagi

Gene #

Name

Abbrev

Length   

Min

Max

1

REF Length

REFL

5

0.4

0.6

2

REF Radius

REFR

4

0.0005  

0.002

3

DE Length

DEL

5

0.4

0.6

4

DE Radius

DER

4

0.0005  

0.004

5

DE Separation(from REF)  

DES

5

0.05  

0.3

6

DIR Length

DIRL

5

0.4

0.6

7

DIR Radius

DIRR

4

0.0005  

0.002

8

DIR Separation(from DE) 

DIRS

5

0.05  

0.3

 

Figure 1 shows a screen shot of the main applet screen in which the various genes are shown tabulated with the maximum and minimum length and the length of each gene in brackets after the gene name, eg. REFL(5).

 

 

Figure 1            The eight genes and maximum and minimum value text fields.

 

Since each design parameter is a decimal number, not a bit sequence, the actual value of the parameter is computed by decoding its binary gene using the following transformation equation:

                    

                                                     

 where X is the decimal value of the parameter, D is the decimal value of the gene's binary sequence, and L is the gene's length. 

 

To illustrate how this decoding scheme works, consider the 37-bit chromosome that contains the design for the Yagi discussed below:

 

                   0010111000011011111001011100010111100

 

The DE length is coded in gene #3, which starts at bit #10 and ends with bit #14.  The binary sequence for the DE length gene is 00110, and its decimal value is

 

                      0*2^0+0*2^1+1*2^2+1*2^3+0*2^4=12.

 

Since gene #3 is 5 bits long, the denominator in the transformation equation is 25-1=31.  The DE length is therefore 0.4+(0.6-0.4)(12)/31 = 0.477419355 wavelengths.  Because the computer model used to calculate theYagi's performance inputs the DE half-length instead of its overall length, this value is divided by 2 and rounded to 3 places to give 0.239 wavelengths.  This decoding scheme is used to evaluate each of the Yagi's design parameters.

The DIR radius (gene #7), for example, evaluates to 0.0015 wave, and so on.

The genetic algorithm begins by creating an initial population of random 37-bit chromosomes.  It then applies the operators of selection, crossover, and mutation to filter out "unfit" designs while retaining the better ones.  Successive applications of these operators create generations of antenna designs, with each subsequent generation hopefully containing better designs than the previous one.  Because of the algorithm's inherently random nature, there is no guaranty of obtaining better designs.  They may actually become somewhat worse from one generation to another.  A well designed GA, however, usually produces progressively better designs, at least on the average, and every new run holds the intriguing possibility of producing a previously unseen "best" design.

The selection operator determines which chromosomes are fit enough to survive to the next generation.  Some may be automatically discarded (for example, the worst 10%), while others are typically "killed" at random, as they would be in Nature.  Others may be automatically retained (the best 5%, for example).  The algorithm designer is free to implement whatever selection process seems best.

The crossover operator "mates" two chromosomes ("parents") to produce two new chromosomes ("children"), which become members of the next generation.  Child chromosomes usually maintain a constant population from one generation to the next, although the population could grow if desired.

 Each parent's chromosome is split at a gene boundary, usually randomly selected, and the pieces are swapped (concatenated together) to form two different chromosomes.  This is the primary process by which GA propagate "good" genes from one generation to the next.

Finally, the mutation operator randomly flips a bit here and there with some small probability.  This simulates the genetic mutation that occurs randomly in Nature.

In each generation, all of the designs (chromosomes) are ranked from best to worst using a figure-of-merit (FoM). The higher the FoM, the better is the design. The FoM combines various antenna performance measures computed by a "modeling engine", which is another computer program separate from the genetic algorithm.  Individual antenna performance parameters, for example, can be calculated with any suitable antenna modeling program(s).

The FoM used for the Yagi described below is

This particular FoM gives slightly more weight to the main lobe gain (G) than to the front-to-back ratio (FB), and relatively less weight to the input impedance.  The algorithm designer is free to define any FoM that reflects the relative importance of different performance measures, including even non-electrical parameters (such as cost or time to build, or amount of material required, and so on).

This feature is a major distinction between GA and deterministic optimizations, which frequently cannot optimize arbitrary FoMs.  Other significant differences are that a GA produces groups of designs with similar FoMs, instead of the single "best" design, and the GA usually requires

 much less computer time than a deterministic algorithm.

In this applet, the FoM can be set to an upper limit and the applet left to run until that upper limit is reached. Once this limit is reached the applet will automatically stop and the genes displayed in the information region together with the gain of the antenna (GdBi), the front-to-back ratio (FBdB) and the real and imaginary part of the input impedance(Zin).

 

 

Figure 2                        Results of the GA for a fitness (FoM) of 237.6

 

Figure 2 shows the results for a FoM of 201. The 3 element Yagi has the following dimensions (in wavelengths at the design frequency fo). 

 

            Reflector Length:             0.5097

            Reflector Radius:             0.0018

            Driven Element Length:        0.4774

            Driven Element Radius:        0.0013

            DE Distance from REF:         0.0984

            Director Length:              0.4323

            Director Radius:              0.0013

            DIR Distance from DE:         0.1468

 

The boom length (sum of DE/DIR separations) is only 0.2452, which is quite short as it is less than a quarter of a wavelength long.

Key performance measures at the design frequency are:

                        Gain                                         FB                               Zin

                        7.388 dBi                                 31.81 dB                      28.11-j2.66 ohms      

                       

A band-center gain of 7dBi is typical of well-designed 3-element Yagi, and the optimized antenna's FB of 32 dB is a little lower than expected of a good quarter-wave yagi antenna design. The input impedance is close to being resistive which is good, although the value of 28 ohms is a little low. Possibly, a better design than this can be forthcoming with a little patience.

 

 

Operation of the applet

To initialize the applet, enter the number of chromosomes in the population, as shown in Figure 3. A good figure for this applet is 12.

Figure 3            Initializing the applet by first entering the population size.

 

Next enter the Fitness Limit size as shown in Figure 4. A good figure to start with is 150. This should be increased eventually to 200 or more to try and get a very good design. This limit will cause the applet to stop running once it is reached.

 

 

Figure 4            Initializing the applet by next entering the fitness limit or figure of merit (FoM).

 

Enter the maximum and minimum values of the Element separation, Reflector Length and element radii. The mutation probability should be around 3%. Higher values may be chosen, but nothing really is to be gained. The Cross-Over probability (XOver Prob) should be around 70%. Making the elitism active will permit the best of the chromosomes to populate the next generation. This may cause a little in-breeding or localization of the search that will limit a wider field being searched. You may try it if you wish to see what effect it has on the generation of the FoM. Remember, the higher the FoM, the better the design. The “Wavelength” text field allows the wavelength to be entered in cm. The “No. of Directors” field is there for the next version of the applet and serves no function at this time.

With all input values set, pressing “Enter” on one of them will cause the applet to be initiated and the number of chromosomes that comprise the population will be printed out. Once this occurs, the start button should be pressed as shown in Figure 5.

 

 

Figure 5            Starting the algorithm

 

The applet will run until the Fitness Limit or FoM has been reached. This may take from minutes to hours. The “Stop” button can be used at any time to stop the running of the algorithm.

 

 


For your comments and suggestions, mail the author: A.A.R.Townsend

Return to Applets page.