Constrained optimization using penalty function method combined with genetic algorithm

In the paper the way of adaptation of the penalty function method to the genetic algorithm is presented. In case of application of the external penalty function, the penalty term may exceed the value of the primary objective function. This means, that the value of the modified objective function is negative, while in genetic algorithm the adaptation must be of positive value, especially it in the selection procedure utilizes the roulette method. The sigmoidal transformation is applied to solve this problem. The computer software is developed in the Delphi environment. The proposed approach is applied to optimization of the electromagnetic linear actuator.


Introduction
Genetic algorithms (GA) fall within the group of nondeterministic methods of optimization [1,2,3].In genetic algorithms, the optimization is performed using the mechanism of species evolution and natural selection.The basic mechanism of this method is a permanent adaptation of the population to the changes in the external environment.Within of the population, consisting of individuals with different adaptation, there is continuous rivalry.Just like in a natural environment, the stronger individuals survive the reproduction operation and become parents in the crossover.In case of solving the optimization problems, the population of individuals is a set of solutions of the analyzed task.
Genetic algorithms and particle swarm optimization algorithm (PSO) are very often used to solve optimization task with constraints [4,5,6].The constraints are usually included by using the penalty function method.In case of including the constraints in the use of the external penalty function for the individuals situated far beyond the permissible area of the solved task, the value of the penalty can exceed the value of the primary objective function.In such case, the value of modified objective function is negative, while in genetic algorithm the adaptation must be positive.Therefore a sigmoidal transformation has been proposed to solve this problem.

Adaptation of the penalty function to genetic algorithm
The penalty function methods are used to solve optimization tasks with constraints using deterministic methods.In such strategy a modified objective function h k (x) is constructed.The h k (x) function is the sum of the primary objective function f k (x) and the penalty term p k (x) representing the penalty for overstepping boundary of permissible area.During the optimization process, the importance (weight) of the penalty is increased.
If in optimization process m constraints are imposed, the penalty term in the k-th penalty iteration has a form: where x is the vector of design parameters, k is the number of penalty iteration, j is the number of constraints,  j are the weighting coefficients, a k is the penalty coefficient.
In case of maximizing the objective function f k (x), the modified function is defined as: where: In a genetic algorithm with a roulette procedure in the reproduction operation, the adaptation must be of positive value.In the k-th main penalty iteration, the adaptation is represented by the modified h k (x) function.In case of including the constraints, with the penalty function used for the individuals located far beyond the permissible area, in the space of the solved task, the values of the penalty p k (x) can exceed the value of the primary objective function f k (x).A direct use of the penalty function in the genetic algorithm can lead to mistakes in the operation of the program.In order to adapt the external penalty function to genetic algorithm the sigmoidal transformation has been proposed [4].After the transformation the modified objective function has the form: The coefficient κ k (x)≤1 represents the penalty for exceeding of the constrains which reduces the maximized objective function f k (x).If the designed devices fulfil all imposed constraints, then penalty term tends to zero.The coefficient κ k (x) achieve value 1.

Optimization of electromagnetic linear actuator
The optimization of the magnetic circuit of the axisymmetrical electromagnetic linear actuator was carried out.The structure of the device is presented in Fig. 1.The mathematical model of the actuator contains equations of the magnetic field with nonlinearity of the magnetic core.The numerical implementation is based on finite element method.After determination of the magnetic field distribution, the value of the magnetic force was calculated using the Maxwell stress method.
The actuator structure is described by three design variables: x 1 =d, x 2 =D/d, x 3 =H 0 /g 0 -Fig.1. Variables x i constitute vector x=[x 1 , x 2 , x 3 ] T .The mass of the actuator has been assumed as the optimal criterion.Only the mass of winding cooper and mass of ferromagnetic material have been taken into account.The dimensionless objective function for i-th individual has a form: where m 0 is the average mass of the individuals after initiation procedure, m i (x) is the mass of the i-th individual (actuator).
Based on the preliminary analysis of literature and guidelines for the designing of this type of electromagnetic devices the ranges of variability of design variables were estimated [7]: The optimization task consists in minimization of the objective function (4), while the constraint regarding the required force F(x)  F z has been imposed.The constraint function has been normalized into the dimensionless form: The course of the optimization process in selected genetic generations (n g ) is presented in Table 1.The constant number of individual in each genetic generation was equal 150.The following parameters of optimization procedure have been adopted: the number of genetic generations was 50, the probability of mutation p m =0.005 and a=1.2.In a single penalty iteration related to the increasing penalty coefficient, the five genetic generations were executed.The permissible value of force F z 90 N has been imposed.Optimization calculations were repeated thirty times for random initial populations on two different computers.As a result of optimization process, similar variants of designed device were achieved.The obtained values of the objective function are similar, while the determined values of the design variables differ by a maximum of 1 to 3%.

Conclusions
The universal algorithm and computer software for the optimization of electromagnetic devices have been presented.The computational effectiveness of proposed approach has been verified by considering of the optimization task of electromagnetic linear actuator.In future research, it will be tested a new approach with reduction of the value of penalty coefficient during optimization process.

Table 1 .
The course of the optimization process.