• No results found

Steel Truss Optimization Using Genetic Algorithms and FEA

N/A
N/A
Protected

Academic year: 2021

Share "Steel Truss Optimization Using Genetic Algorithms and FEA"

Copied!
8
0
0

Loading.... (view fulltext now)

Full text

(1)

Procedia Technology 12 ( 2014 ) 339 – 346

2212-0173 © 2013 The Authors. Published by Elsevier Ltd. Open access under CC BY-NC-ND license.

Selection and peer-review under responsibility of the Petru Maior University of Tirgu Mures. doi: 10.1016/j.protcy.2013.12.496

ScienceDirect

The 7

th

International Conference Interdisciplinarity in Engineering (INTER-ENG 2013)

Steel truss optimization using genetic algorithms and FEA

Razvan Cazacu*, Lucian Grama

Petru Maior University of Targu Mures, Nicolae Iorga Street, No. 1, Targu Mures 540088, Romania

Abstract

This research presents a procedure and a software application to optimize the topology, size and shape of plane trusses using a genetic algorithm and the finite element analysis to evaluate the fitness function. The paper describes the optimization technique, problem encoding and fitness evaluation. It then presents the results obtained by optimizing one benchmark and two original problems to show the procedure efficiency. The trusses are encoded in chromosomes using an original technique that allows the simultaneous optimization of topology, shape and size. The objective of the optimization is the total mass of the structure, subjected to stress and displacement constraints using an original penalty function. Stress and displacement analysis is performed using the finite element method. Both the FEA evaluation and the GA optimization itself are implemented in MATLAB. © 2013 The Authors. Published by Elsevier B.V.

Selection and peer-review under responsibility of Department of Industrial Engineering and Management, Faculty of Engineering, “Petru Maior” University of Tîrgu Mureș.

Keywords: constraint optimization; genetic algorithm; truss structure; penalty fitness; FEA; MATLAB

1. Introduction

Although proposed for the first time a while back [1], genetic algorithms (GA) represent modern optimization techniques. They are inspired by biological evolution, incorporating and adapting concepts like chromosomes, genes, natural selection, individual fitness, crossover combination or mutation. The most prominent of the evolutionary algorithms, genetic algorithms are population-based metaheuristics that use stochastic methods to define random solutions in the design space and then direct them towards the optimum.

* Corresponding author. Tel.: +40-749-071-521; fax: +40-265-262-275. E-mail address: razvan.cazacu@ing.upm.ro

© 2013 The Authors. Published by Elsevier Ltd. Open access under CC BY-NC-ND license.

(2)

As shown in the comprehensive review [2], GAs represent the most efficient evolutionary algorithm technique for truss optimization. Traditionally, the algorithm is carried out using one type of structural optimization: either size and shape [3] or topology [4]. More recent studies [5-7] try to optimize the structure considering all the three objectives at once. This integrated approach has the advantage of considering the interdependence between the three types of parameters and of performing the optimization in one single procedure.

The present research proposes a general parameterization and encoding technique that can be used to simultaneously optimize the topology, size and shape of any plane truss with one floor. It uses a general genetic algorithm (GA) and the finite elements (FE) method to evaluate the behaviour of the candidate solutions. Both the FE evaluation and the GA optimization itself are implemented in MATLAB, the first using original code (developed by the authors), the second using the GA optimization toolbox that comes with the software, adapted to the actual problem with original code.

2. The genetic algorithm

Among the freely available toolboxes for MATLAB, GPLAB stands out as one of the most flexible and powerful [8]. However, the implementation of the algorithms in this paper uses the integrated Global Optimization toolbox and customizes the functions where needed.

A general principle scheme of the algorithm we used is presented in Fig. 1. The algorithm starts by randomly generating a population of candidate solutions inside the design space (allowable parameters range). From this point the population is iterated in a loop (each loop giving birth to a new generation of individuals), evolving towards what is hopefully an optimal solution. Each individual in the population has a fitness value determined by the how well conformed and economic its correspondent solution (truss) is. The determination of the fitness value is done by calculating the total mass of the proposed solution and by determining with FEA how well it conforms to the maximum stress and maximum allowable displacement.

The individuals in each new generation are obtained from the old generation by using the GA operators of selection, crossover and mutation. These are described in more detail in section 2.3 below.

Fig. 1.General working scheme of the genetic algorithm. 2.1. Encoding technique

The encoding-decoding of the problem as well as fitness evaluation are the main issues in applying the GA, which apart from that behaves like a black-box, not having any knowledge about the actual problem being solved. The trusses are encoded in chromosomes using an original technique that allows the simultaneous optimization of topology, shape and size. In order to allow a high level of flexibility and assure a large design space, the structure is parameterized as shown in Fig. 2a.

(3)

Fig. 2.Encoding scheme. a) Structure parameters - genes correspondence; b) Codes for the diagonal topology gene.

The structure is built using a variable number of spans n of adjustable size L x H. Each span contains 8

parameters, denoted as follows (we also consider the (n+1)th span that only contains 3 parameters for the last vertical

bar):

x VPi – vertical position of the bottom node in the ith span (0 default),

x VLi – length of vertical bar in the ith span (H default),

x AVi – sectional area of the vertical bar in the ith span (between Amin and Amax),

x ABi – sectional area of the bottom bar in the ith span (between Amin and Amax),

x ATi – sectional area of the top bar in the ith span (between Amin and Amax),

x Di – diagonal conformation in the ith span (see Fig. 2b for possible values),

x AD1i – sectional area of the diagonal bar going down in the ith span (between Amin and Amax),

x AD2i – sectional area of the diagonal bar going up in the ith span (between Amin and Amax),

The parameterized structure, called the phenotype, needs to be coded in the genotype. Thus, each individual (candidate solution) is represented in the GA by its chromosome, a vector of genes, each containing the value of one parameter. The chromosome in our implementation is of fixed length (n*8+3, where n is number of spans), containing in order the genes for all the parameters of the structure. Each gene is set to be bounded inside an interval

of feasible values for that gene. VP can have a value in the interval [0, H-Lmin] (where Lmin is the minimum length of

the vertical bar), VL in the interval [Lmin, H], D in the interval (0, 3] and the sectional areas in the interval [Amin,

Amax] (where Amin and Amax are set for each problem independently).

As shown in [9], the algorithm behaves better if related genes are kept close to each other in the chromosome. It is for this purpose that gene arrangement follows the general direction from left-to-right of the structure parameters, as shown in Fig. 3.

Fig. 3.Gene arrangement in the chromosome.

MATLAB is natively working with real variables. However, the diagonal conformation parameter (D) needs to be an integer value. The GA algorithm can work with a mixed integer-real chromosome, using the procedure in [10], but this leads to several limitations in applying the GA operators. It is for this reason that we chose to represent the D parameter as a real value in the interval (0-3] and round it up in the decoding phase, thus resulting the possible set of values {1, 2, 3}.

Not all problems require the optimization of all the parameters. For flexibility reasons, we designed a procedure that allows the user to fix any number of parameters to certain values and only optimize the rest of them. The identification of each parameter is achieved by supplying the number of the span, the number of the parameter inside the span and the desired value for the parameter. All this information is supplied in an array that is passed to the

(4)

optimizing function. The algorithm then uses this array in the coding and decoding of the problem, by forming the full set of parameters from the fixed and optimized parameters.

2.2. Fitness evaluation

The objective of the optimization is to minimize the total mass of the structure while keeping it below the maximum allowable stress and displacement. The stresses and displacements evaluation of candidate solutions is done using the finite element method for the case of plane truss structures, with code implemented by the authors. The general equations of the problem are described in any FEM book, the reference used in this study being [11].

For dealing with nonlinear constraints, MATLAB’s GA toolbox offers the augmented lagrangian barrier algorithm [12]. However, early tests of this method have been unsatisfactory so we chose a different approach in the form of a penalty function applied to the nonconforming individuals. Thus, the initial fitness of an individual is its mass (which needs to be minimized), but this value is then penalized with a certain amount, depending on how big the constraint violation is. The penalty function we designed for this study is presented in Eq. 1.

¸ ¸ ¹ · ¨ ¨ © § ¸¸ ¹ · ¨¨ © §  ˜  ˜ 2 2 ) ( a a P IP OF PF V V V V (1)

where PF – penalized fitness, OF – original fitness, IP – initial penalty at the point of stress limit, P2 –penalty

scale factor at double the stress limit, V - actual maximum stress in the structure, Va - maximum allowable stress

for the chosen material. As can be observed, the function is parabolic, giving a minimum penalty of IP at Vaand

P2+IP penalty at double the stress limit. If the two parameters (IP and P2) are set correctly, this form of the function

favors the individuals with small constraint violation (which probably contain very good genes that need to stay in the gene pool) and greatly increases the penalty as the stress moves away from the allowable value. Setting the right parameters has not been done analytically in this study, but in an empirical way, by trial and error.

The above function is used for the stress constraint. For the displacement constraint we used a similar function and the two penalties add up in the case of both stress and displacement constraint violation.

2.3. Genetic algorithm operators

Each new generation of individuals in the algorithm is obtained by applying the specific GA operators. The choices for these are briefly explained in this section.

In order to obtain the new generation, individuals from the older generation are selected and then used in the reproduction (crossover) and mutation. The selection of these individuals is done randomly but based on their scaled fitness, where a fitter individual has bigger chances to be selected than a less fit one. The preferred method of selection is the Roulette Wheel Selection (represented graphically in Fig. 4), where a roulette spin is simulated by generating a random number inside a space where each individual occupies a portion proportional to its fitness.

Fig. 4.Roulette selection scheme.

Because the absolute fitness values can range huge spans (especially after applying the penalty) and in order to give less fit individual a chance for the sake of preserving gene diversity and avoiding local optima, we used fitness scaling based on rank. In this approach, the fitness used in selection is not the actual fitness but one based on each

(5)

individual’s fitness rank inside the population. The score of the individuals is considered 1/Sqr(rank), making the distance between the fitness values larger for top individuals and increasingly smaller for the less fit ones.

The algorithm uses elitism in order to preserve the best individuals. This means that a portion of them automatically survives unaltered to the next generation. We used an elite count of 2, meaning the 2 fittest individuals are guaranteed to be found in the next generation, where it’s possible to be replaced by even fitter children.

In order to exploit the good solutions found so far, a portion of the children for the new generation are generated using two-point crossover. The principle behind this operation is illustrated in Fig. 5a. For each two selected parents, two integer values between 1 and size of chromosome are randomly selected. Using these two values, the algorithm recombines the genes from the two parents to form two children, as shown in the picture.

The mutation operator is crucial for the algorithm to explore new portions of the design domain and not fall into the trap of local minima. Reference [13] gives an overview of the most popular mutation operators used for real-coded problems. In our study, we used the classic uniform mutation. For each individual of the current population chosen for mutation, each gene has a probability pm to be mutated. A new value is then randomly chosen for the gene

using a uniform distribution over that gene’s feasible range, as illustrated in Fig. 5b. The value of pm is very

important to the algorithm’s success. Reference [14] suggests an optimal value of 1/L (L being the length of the chromosome) but it uses bit-coded genes. However, tests over the case studies have shown a much greater probability is needed. We used pm =5% for most tests, but increased the value to 20% for the cases where the

algorithm stalled.

The proportion of crossover and mutated children is given by the setting of the crossover fraction value (percent of crossover generated children in new generation). This has been set between 0.6 and 0.8, depending on the problem. In general, a lower value means more mutation, enforcing the algorithm to explore new regions of the design space, while a bigger value means more crossover, allowing the algorithm to better exploit locally the solutions found so far.

Fig. 5. GA operators. a) 2-point crossover; b) Uniform mutation inside the feasible domain. 3. Results

In order to test the encoding technique and fitness function penalty operator, we designed and applied the developed optimization procedure to 3 different problems (1 benchmark and 2 original) trying to cover as much as possible of the representation flexibility. In all examples we used the genetic operators described in the previous section and a population of 100 individuals, optimized over a maximum of 100 generations.

3.1. 6-node, 11-bars benchmark problem

Fig. 6. 6-node, 11-bars benchmark problem formulation.

450 kN 450 kN

Children

Parents Parent Mutated Child

1.5 3.2 1.3 2.8 2.0 1.1 0.6 3.5 1.5 3.2 3.7 2.8 2.0 1.1 0.6 3.5 LB - UB

(6)

In order to test the encoding technique, we applied the algorithm to one of the most popular benchmark problems used for plane truss optimization. The static scheme of the problem is presented in Fig. 6 (the dimensions of the truss are 18m x 9m). Node positions and bars connections are fixed, only the sectional areas being the subject of the

optimization. The bars are assumed to be made of aluminum, with a stress limit of 130 N/mm2. The problem is also

subjected to a maximum displacement constraint of 2 inches (50.8 mm), which is actually the limiting factor in the optimization. The left vertical bar is not actually part of the benchmark problem but had to be kept due to the encoding scheme and is considered with a very small fixed area, thus not altering the end results.

The evolution of the best individual over the generations is presented in Fig. 7a. The final best solution is depicted in Fig. 7b, showing a maximum displacement and stress very close to the limits and is obtained by applying the GA multiple times, with each iteration starting from the previous population and having an increased mutation probability. The best solution shows four bars are superfluous to the design, having negligible sectional areas. These are the middle and left vertical bars, the upper-right horizontal bar and the right diagonal going up. The results are in concordance with those obtained in [15].

Fig. 7. GA for 6-node, 11-bars benchmark example. (a) Evolution of the best individual; (b) Final best solution. The final total mass is close to the one obtained by other researchers using GAs, as shown in Table 1.

Table 1. Best solution found for the benchmark problem.

Paper Total mass

Deb and Gulati [15] 2106 kg

Kaveh and Shahrouzi [16] 2206 kg

Nanakorn et al. [17] 2208 kg

Present study 2257 kg

3.2. 5-span with fixed vertical bars test problem

Fig. 8. 5-span with fixed vertical bars problem formulation.

0 20 40 60 80 2.200 2.700 3.200 3.700 4.200 Generation F itness val u e ( kg) Total mass = 2257.09 kg Max stress = 129.81 MPa Max displ = 50.80 mm

(7)

In this example we fixed the node positions and left for optimization the diagonal topology and bars sectional

areas. The material is steel, with a stress limit of 200 N/mm2. The displacement condition is not important here. Fig.

8 shows the general scheme of the problem (truss dimensions are 20m x 4m), with the forces, supports and all possible bar connections.

Fig. 9a shows the evolutions of the best solution over 75 generations, with an observable very fast convergence towards the minimum. Fig 9b presents the final best solution. The stress constraint is a little bit violated, but within acceptable range.

Fig. 9. GA for 5-span with fixed vertical bars example. (a) Evolution of the best individual; (b) Final best solution. 3.3. 4-span with free vertical bars test problem

The material for this example is again steel, but this time we let the position of the top nodes free and used a 4-span structure. Fig. 10 represents graphically the formulation of the problem (truss dimensions are 24m x max 6m).

Besides the stress limitation (a stress limit of 200 N/mm2), we also imposed a displacement limit of 60 mm. In the

absence of this displacement limitation, the height of the truss results very small, resulting in vertical displacement way above the acceptable limit.

Fig. 10. 4-span with free vertical bars problem formulation.

The evolution of the best individual over the 82 needed generations is shown in Fig. 11a, indicating a somewhat less accentuated evolution towards the final solution than in previous examples. This fact could be caused by the introduction in the chromosome of the genes representing the vertical position of the nodes, which can lead to many unfeasible designs due to displacement violation.

Fig. 11. GA for 4-span with free vertical bars example. (a) Evolution of the best individual; (b) Final best solution.

0 20 40 60 80 150 250 350 450 550 650 750 Generation F it nes s val u e ( kg) Total mass = 155.50 kg Max stress = 202.14 MPa Max displ = 18.55 mm 50 kN 100 kN 100 kN 100 kN 50 kN 0 20 40 60 80 450 500 550 600 Generation F it n e ss va lu e (

kg) Total mass = 452.86 kgMax stress = 197.95 MPa

(8)

The final optimized solution is given in Fig. 11b, showing a symmetrical conformation of the truss (consistent with the supports and loading), with very small vertical bars at the two extremes and the others close to the imposed maximum height of 6m.

4. Conclusion

The encoding technique proposed in this paper showed good results even when used to the standard algorithm. The optimization of the benchmark problem gave a solution close to others found in the literature. In order to improve the solutions and to accelerate the convergence, more sophisticated GA operators might be helpful. This can be the target of a future research, as well as transforming the problem into a multi-objective optimization one.

The penalty function built for the research showed great capabilities to express the constraint violations of the solutions, leading to a much faster algorithm and much better solutions than MATLAB’s built-in augmented lagrangian barrier algorithm. However, the calibration of this function is not always an easy task. A too harsh penalty, even for small violations, might dismiss promising solutions, while a too loose constraint penalty favors unfeasible solutions too much. The authors used the classic trial and error calibration of the problem (a thing made possible by the very cheap computational effort involved) but a more in-depth study might give optimum values for the penalty function parameters or even propose a way to make them adaptive and incorporate them in the GA optimization.

The original code implemented in MATLAB was tested on several problems, showing the versatility of the approach to tackle different truss conformations and simultaneously optimize their topology, size and shape.

References

[1] Holland J H. Adaptation in Natural and Artificial Systems. University of Michigan Press; 1975. ISBN 0-262-08213-6

[2] Sanchez-Caballero S et al. Recent Advances in Structural Optimization. Annals of the Oradea University. Fascicle of Management and Technological Engineering. Volume XI (XXI); 2012. pp 2.118-2.127

[3] Lingyun W, Mei Z, Guangming W, Guang M. Truss optimization on shape and sizing with frequency constraints based on genetic algorithm. Computational Mechanics. Volume 35. Issue 5, 2005. pp 361–368

[4] Sesok D, Belevicius R. Use of genetic algorithms in topology optimization of truss structures. Mechanika. Volume 64, 2007. pp 34–39 [5] Noilublao N, Bureerat S. Simultaneous Topology, Shape, and Sizing Optimisation of Plane Trusses with Adaptive Ground Finite Elements

Using MOEAs. Mathematical Problems in Engineering. Volume 2013. Article ID 838102. 9 pages, 2013

[6] Noilublao N, Bureerat S. Simultaneous topology, shape and sizing optimisation of a three-dimensional slender truss tower using multiobjective evolutionary algorithms. Computers and Structures. Volume 89. Issue 23-24, 2011. pp 2531–2538

[7] Zhou M et al. An integrated approach to topology, sizing, and shape optimization. Structural and Multidisciplinary Optimization. Volume 26. Issue 5; 2004. pp 308-317

[8] Silva S, Almeida J. GPLAB - a Genetic Programming toolbox for MATLAB, Proceedings of the Nordic MATLAB Conference, 2003. pp 273-278

[9] Rodriguez J E, Medaglia A L, Casas J P. Approximation to the optimum design of a motorcycle frame using finite element analysis and evolutionary algorithms. Proc. of the 2005 Systems and Information Engineering Design Symposium, 2005. pp 277-285

[10] Deep K, Singh K P, Kansal M L, Mohan C. A real coded genetic algorithm for solving integer and mixed integer optimization problems. Applied Mathematics and Computation. Volume 212. Issue 2, 2009. pp 505–518

[11] Spyrakos C, Raftoyiannis J. Linear and Nonlinear Finite Element Analysis in Engineering Practice. Algor Inc. Publishing Division, 1997. pp 6-13

[12] Conn A R, Gould N I M, Toint Ph L. A Globally Convergent Augmented Lagrangian Barrier Algorithm for Optimization with General Inequality Constraints and Simple Bounds. Mathematics of Computation. Volume 66. Issue 217, 1996. pp 261–288

[13] Tanga P H, Tseng M H. Adaptive directed mutation for real-coded genetic algorithms. Applied Soft Computing. Volume 13. Issue 1, 2013. pp 600-614

[14] Ochoa G, Harvey I, Buxton H. On Recombination and Optimal Mutation Rates. Proceedings of Genetic and Evolutionary Computation Conference, 1999. pp 488-495

[15] Deb K, Gulati S. Design of truss-structures for minimum weight using genetic algorithms. Finite Elements in Analysis and Design. Volume 37, Issue 5, 2001, pp 447–465

[16] Kaveh A, Shahrouzi M. Optimal structural design family by genetic search and ant colony approach. Engineering Computations. Volume 25. Issue 3, 2008. pp 268-288

[17] Nanakorn P, Meesomklin K. An adaptive penalty function in genetic algorithms for structural design optimization. Computers and structures. 79(29-30), 2001. pp 2527-2539

References

Related documents

This algorithm proceeds as, master keys (Key-M) are generated carefully for each node and stored in the memory of the individual node in pre deployment phase of a network,

Since the amount of dye injected in the experimental procedures was at least half the standard amount used, the results may have clinical application in those infants where there is

We have a hard time recommending this business plan because that a much higher penetration rate than is needed by be successful in Martinsville and Collinsville (42%). There is a

This study sought to give small business owners and managers an understanding of the relationship between the degree of segregation of duties, the attitude toward internal

Razmjooei, Improving Linearity of CMOS Variable-gain Amplifier Using Third-order Intermodulation Cancellation Mechanism and Intermodulation Distortion Sinking Techniques,

The new requirement of mandatory audit firm rotation may increase the frequency of companies rotating audit firms, which would increase the value of a definition

We then assessed these 10 miRNAs in samples from a separate cohort of 21 NSCLC patients receiving RT and identified miR-29a- 3p and miR-150-5p as potential, reproducible

Simplified representation of glutamate fates in astrocytes and neurons ( a-ketoglutarate, aKG; alanine, Ala; alanine aminotransferase, ALT; aspartate, Asp; aspartate