# Application of Genetic Algorithm in Worm Gear Mechanism

Masterarbeit 2010 58 Seiten

## Leseprobe

## CONTENTS

01 OVERVIEW

1.1 Preamble

1.2 Background of the work 1.2.2 Genetic Algorithm Techniques

1.2.3 Performance

1.2.4 Features of GA

1.2.5 Representation

1.26 Working Principles

1.2.7 Coding

1.2.8 Fitness Function

1.29 GA Operators

1.2.10 Selection : Roulette Wheel

1.3 Overview of present work

1.3.2 GA Operators

1.3.3 Tournament Selection

1.3.4 Specification of Problem

1.3.5 Mathematical model for Analysis

1.3.6 Objectiv Funktion

1.3.7 Design Variables

1.3.8 Constraints

1.3.9 The Basic GA

02 LITERATURE REVIEW

2.1 Flight Trajectory Optimization using GA 2.2 Optimal Pump Operation of water distribution systems using GA

2.3 Penalty function methods for constrained optimization with GAs

2.4 A Real Coded GA for optimization of cutting parameters in turning

2.5 Optimization of production planning in a Real world manufacturing environment

03 DEVELOPMENT OF NON-TRADITIONAL SEARCH

3.1 Introduction

3.2 Brief history of non-traditional optimization methods

3.2.1 Ant-Colony Optimization

3.2.2 Neural Network

3.2.3 Simulated Annealing

3.3 Proposed Non-Traditional Optimization Search Technique

3.3.1 Introduction

3.3.2 Benefits of GAs

3.3.3 Applications of Gas

04 FORMULATION OF WORK

4.1 Objective function

4.2 Design Variable

4.3 Binary Coding

4.5 Evaluation & Reproduction

4.6 Keys for solving problem

4.7 Crossover & Mutation

4.8 Flow chart of GA

05 RESULTS AND DISCUSSION

f(x) Vs Zg after evaluation & reproduction

f(x) Vs γn after evaluation & reproduction

f(x) Vs Zg after crossover & mutation

f(x) Vs γn after crossover & mutation

06 References

## LIST OF FIGURES AND GRAPHS

1.1 Schematic Of A Single-Enveloping Worm Gear-Set

1.2 Evolution in Biology

1.3 Mutations (Random changes)

1.4 Combinations of features inherited from each parent

1.5 Fittest survive

1.6 Roulette Wheel

1.7 Genetic Algorithm Operators

1.8 Tournament Selection

1.9 Single-enveloping worm 27

4.1 Flow chart of Genetic Algorithm

5.1 Graph f(x) VS Zg after Evaluation & Reproduction

5.2 Graph f(x) VS γn after Evaluation & Reproduction

5.3 Graph f(x) VS Zg after Crossover & Mutation

5.4 Graph f(x) VS γn after Crossover & Mutation

## LIST OF TABLES

1.1 Single Point Crossover 25

4.1 & 4.2 Binary Coding

4.3 Iteration-1 46

4.4 Iteration-2

4.5 Evaluation & Reproduction 47

4.6 Crossover & Mutation

## NOMENCLATURE

Abbildung in dieser Leseprobe nicht enthalten

## AUTHOR’S PROFILE

D.R.Verma is presently working as an Assistant Professor, Department of Mechanical Engineering, at Gurunanak Institute of Engineering and Management, Nagpur (G.N.I.E.M., Nagpur). He

completed his Masters in Technology (Mechanical Engineering Design) from the Priyadarshini College of Engineering, Rashtrasant Tukodoji Maharaj Nagpur University, Nagpur (R.T.M.N.U. Nagpur).

He acquired his Bachelor’s of Engineering Degree from Karamveer Dadasaheb Kannamwar College of Engineering Nagpur (K.D.K.C.O.E., R.T.M.N.U., Nagpur). He worked as a Lecturer in Department of Mechanical Engineering of Nagpur Institute of Technology, Nagpur. As also a Lecturer in Department of Mechanical Engineering of Nagpur Polytechnic Nagpur. Readers can contact him at durgeshverma1210@gmail.com.

## CHAPTER 01 OVERVIEW

### 1.1 PREAMBLE

In this study, a foundation and solution technique using Genetic Algorithm (GA) for design optimization of worm gear mechanism is presented for the minimization of power-loss of worm gear mechanism with respect to specified set of constraints.

Number of gear tooth and helix (thread) angle of worm are used as design variables and linear pressure, bending strength of tooth and deformation of worm are set as constraints.

The GA in Non-Traditional method is useful and applicable for optimization of mechanical component design. The GA is an efficient search method which is inspired from natural genetics selection process to explore a given search space.

In this work, GA is applied to minimize the power loss of worm gear which is subjected to constraints linear pressure, bending strength of tooth and deformation of worm.

Up to now, many numerical optimization algorithms such as GA, Simulated Annealing, Ant-Colony Optimization, Neural Network have been developed and used for design optimization of engineering problems to find optimum design. Solving engineering problems can be complex and a time consuming process when there are large numbers of design variables and constraints. Hence, there is a need for more efficient and reliable algorithms that solve such problems. The improvement of faster computer has given chance for more robust and efficient optimization methods. Genetic algorithm is one of these methods. The genetic algorithm is a search technique based on the idea of natural selection and genetics.

Genetic Algorithm (GA) maintains a population of encoded solutions, and guide the population towards the optimum solutions. Fitness function provides a measure of performance of an individual how fits. Rather than starting from a single point solution within the search space as in traditional optimization methods, the genetic algorithm starts running with an initial population which is coding of design variables. GA selects the fittest individuals and eliminates the unfit individuals in this way. An initial population is chosen randomly at the beginning, and fitness of initial population individuals are evaluated. Then an iterative process starts until the termination criteria have been run across. After the evaluation of individual fitness in the population, the genetic operators, selection, crossover and mutation are applied to breed a new generation. Other genetic operators are applied as needed. The newly created individuals replace the existing generation and re-evaluation is started for fitness of new individuals. The loop is repeated until acceptable solution is found.

Abbildung in dieser Leseprobe nicht enthalten

Figure 1.1 A Single-Enveloping Worm Gear Set

### 1.2 BACKGROUND OF THE WORK

#### 1.2.1 Evolution in Biology

Abbildung in dieser Leseprobe nicht enthalten

Figure 1.2

Evolution in Biology -I

Organisms produce a number of offspring similar to themselves but can have variations due to:

-Mutations(random changes)

Abbildung in dieser Leseprobe nicht enthalten

Figure 1.3

-Sexual reproduction (offspring have combinations of features inherited from each parent)

Abbildung in dieser Leseprobe nicht enthalten

Figure 1.4

Evolution in Biology -II

Some offspring survive, and produce next generations, and some don’t:

-The organisms adapted to the environment better have higher chance to survive

-Over time, the generations become more and more adapted because the fittest organisms survive

Abbildung in dieser Leseprobe nicht enthalten

Figure 1.5

Genetic Algorithms (GA) are computerized search and optimization algorithms based on the mechanics of natural genetics and natural selection. Professor John Holland of the University of Michigan, Ann Arbor envisaged the concept of these algorithms in the mid-sixties and published his seminal work (Holland, 1975). Thereafter, a number of his students and other researchers have contributed to developing this field. To date, most of the GA studies are available through a few books (Davis, 19001; Goldberg, 1989; Holland, 1975; Michalewicz, 1992) and through a number of international conference proceedings (Belew and Booker, 1991; Forrest, 1993; Grefenstette, 1985, 1987; Rawlins, 1991; Schaffer, 1989, Whitley, 1993). An extensive list of GA-related papers is referenced elsewhere (Goldber, et. al, 1992). GAs are fundamentally different than classical optimization algorithms.

#### 1.2.2 Genetic Algorithms Techniques

GAs are a particular class of evolutionary algorithms. The techniques common to all GAs are:

-Inheritance

-Mutation

-Selection

-Crossover (also called recombination)

GAs are best used when the objective function is:

-Discontinuous

-Highly nonlinear

-Stochastic

-Has unreliable or undefined derivatives

#### 1.2.3 Performance

- GAs can provide solutions for highly complex search spaces

- GAs perform well approximating solutions to all types of problems because they do not make any assumption about the underlying fitness landscape(the shape of the fitness function, or objective function)

- However, GAs can be outperformed by more field-specific algorithms

#### 1.2.4 Features of Genetic Algorithms

- Not too fast but cover large search space

- Capable of quickly finding promising regions of the search space but may take a relatively long time to reach the optimal solution

- Good heuristics for combinatorial problems

- Usually emphasize combining information from good parents (crossover) Different GAs use different

-Representations

-Mutations

-Crossovers

-Selection mechanisms

#### 1.2.5 Representation

-Chromosomes can be:

-Bit strings (0110, 0011, 1101, …)

-Real numbers (33.2, -12.11, 5.32, …)

-Permutations of element (1234, 3241, 4312, …)

-Lists of rules (R1, R2, R3, …Rn…)

-Program elements (Genetic programming)

-Any other data structure

#### 1.2.6 Working Principles

To illustrate the working principles of GAs, we first consider an unconstrained optimization problem. Later we shall discuss how GAs can be used to solve a constrained optimization problem. Let us consider the following maximization problem:

Abbildung in dieser Leseprobe nicht enthalten

Although a maximization problem is considered here, a minimization problem can also be handled using Gas. The working of Gas is completed by performing the following tasks:

#### 1.2.7 Coding

In order to use Gas to solve the above problem, variables xi’s are first coded in some string structures. It is important to mention here that the coding of the variables is not absolutely necessary. There exist some studies where Gas are directly used on the variables themselves, but here we shall ignore the exceptions and discuss the working principle of a simple genetic algorithm. Binary-coded strings having 1’s and 0’s are mostly used. The length of the string is usually determined according to the desired solution accuracy. For example, if four bits are used to code each variable in a two-variable function optimization problem, the strings (0000 0000) and (1111 1111) would represent the points

Abbildung in dieser Leseprobe nicht enthalten

Respectively, because the substrings (0000) and (1111) have the minimum and the maximum decoded values. Any other eight-bit string can be found to represent a point in the search space according to a fixed mapping rule. Usually, the following linear mapping rule is used:

Abbildung in dieser Leseprobe nicht enthalten

In the above equation, the variable xi is coded in a substring si is calculated like for example for four-bit string (0111) has a decoded value equal to [(1)2[0] + (1) 2^{1} + (1)2^{2} + (0)2^{3} ] or 7. It is worthwhile to mention here that with four bits to code each variable, there are only 2^{4} or 16 distinct substrings possible, because each bit-position can take a value either 0 or 1. The accuracy that can be obtained with a four-bit coding is only approximately 1/16th of the search space. But as the string length is increased by one, the obtainable accuracy increases exponentially to 1/32th of the search length. The length of a substring representing a variable depends on the desired accuracy in that variable.

Generalizing this concept, we may say that variable is approximately (xi(U) - xi(L)) / 2ℓi. Once the coding of the variables has been done, the corresponding point x = (x1, x2, …., xN)T can be found using Equation (1). Thereafter, the function value at the point x can also be calculated by substituting x in the given objective function f(x).

#### 1.2.8 Fitness Function

GAs mimic the survival-of-the-fittest principle of nature to make a search process. Therefore, Gas are naturally suitable for solving maximization problems. Minimization problems are usually transformed into maximization problems by some suitable transformation. In general, a fitness function Ғ(x) is first derived from the objective function and used in successive genetic operations. Certain genetic operators require that the fitness function be non-negative, although certain operators do not have this requirement. For maximization problems, the fitness function can be considered to be the same as the objective function of Ғ(x) = f(x). For minimization problems, the fitness function is an equivalent maximization problem chosen such that the optimum point remains unchanged. A number of such transformations are possible. The following fitness function is often used:

Abbildung in dieser Leseprobe nicht enthalten

This transformation does not alter the location of the minimum, but converts a minimization problem to an equivalent maximization problem. The fitness function value of a string is known as the string’s fitness.

The operation of Gas begins with a population of random strings representing design or decision variables. Thereafter, each string is evaluated to find the fitness value. The population is then operated by three main operators - reproduction, crossover, and mutation- to create a new population of points. The new population is further evaluated and tested for termination. If the termination criterion is not met, the population is iteratively operated by the above three operators and evaluated. This procedure is continued until the termination criterion is met. One cycle of these operations and the subsequent evaluation procedure is known as a generation in GA’s terminology.

#### 1.2.9 GA Operators

Reproduction - Reproduction is usually the first operator applied on a population.

Reproduction selects good strings in a population and forms a mating pool. That is why the reproduction operator is sometimes known as the selection operator. There exist a number of reproduction operators in GA literature, but the essential idea in all of them is that the above-average strings are picked from the current population and their multiple copies are inserted in the mating pool in a probabilistic manner. The commonly-used reproduction operator is the proportionate reproduction operator where a string is selected for the mating pool with a probability proportional to its fitness. Thus, the i-th string in the population is selected with a probability proportional to Ғi. Since the population size is usually kept fixed in a simple GA, the sum of the probability of each string being selected for the mating pool must be one. Therefore, the probability for selecting the i-th string is

Abbildung in dieser Leseprobe nicht enthalten

Where n is the population size. One way to implement this selection scheme is to imagine a roulettewheel with it’s circumference marked for each string proportionate to the string’s fitness. The roulettewheel is spun n times, each time selecting an instance of the string chosen by the roulette-wheel pointer. Since the circumference of the wheel is marked according to a string’s fitness, this roulettewheel mechanism is expected to make Ғi / Ғ’ copies of the i-th string in the mating pool. The average fitness of the population is calculated as

Abbildung in dieser Leseprobe nicht enthalten

#### 1.2.10 Selection: Roulette Wheel

Better solutions get higher chance to become parents for next generation solutions Roulette wheel technique:

- Assign each individual part of the wheel

- Spin wheel N times to select N individuals

Abbildung in dieser Leseprobe nicht enthalten

Figure 1.6

### 1.3 OVERVIEW OF PRESENT WORK

#### 1.3.1 GENETIC ALGORITHM

Genetic algorithm (GA) maintains a population of encoded solutions, and guide the population towards the optimum solutions. Fitness function provides a measure of performance of an individual how fits. Rather than starting from a single point solution within the search space as in traditional optimization methods, the genetic algorithm starts running with an initial population which is coding of design variables. GA selects the fittest individuals and eliminates the unfit individuals in this way. An initial population is chosen randomly at the beginning, and fitness of initial population individuals are evaluated. Then an iterative process starts until the termination criteria have been run across. After the evaluation of individual fitness in the population, the genetic operators, selection, crossover and mutation are applied to breed a new generation. Other genetic operators are applied as needed. The newly created individuals replace the existing generation and revaluation is started for fitness of new individuals. The loop is repeated until acceptable solution is found.

1.3.2 GENETIC ALGORITHM OPERATORS

Abbildung in dieser Leseprobe nicht enthalten

Figure : 1.7

Each of these operators is explained and demonstrated in following: the selection operator used in this study is a tournament selection. Tournament selection approach works as follows and shown in Figure a pair of individuals from mating pool is randomly picked and the best fit two individuals from this pair will be chosen as a parent. Each pair of the parent creates two Child as described in the method of single point crossover shown in Table . A single point crossover operator is used in this study. Crossover is very important in the success of the genetic algorithm. This operator is primary source of new candidate solutions and provides the search mechanism that efficiently guides the evolution through the solution space towards the optimum. In single point crossover, cuts two chromosomes in one point and splices the two halves to create new ones. In Table , the strings, Parent I and Parent II, are selected for crossover and the genetic algorithm decides to mate them. The crossover point has been chosen at position 17. The parent exchanges the sub-strings, which occurs around crossing point that is selected randomly. The newly created strings are Child I and Child II. The Cycle starts again with selection. This iterative process continues until specified criteria are met.

**[...]**