# Analysis: Moth Flame Optimization

PSO AND GA TECHNIQUE

4.1 Moth Flame Optimization

In the proposed MFO algorithm, I assumed that the candidate solutions are moths and the problem’s variables are the position of moths in the space. Therefore, the moths can fly in 1-D, 2-D, 3-D, or hyper dimensional space with changing their position vectors. Since the MFO algorithm is a population-based algorithm.

It should be noted here that moths and flames are both solutions. The difference between them is the way we treat and update them in each iteration. The moths are actual search agents that move around the search space, whereas flames are the best position of moths that obtains so far. In other words, flames can be considered as flags or pins that are dropped by moths

*…show more content…*

D is calculated as follows: With the above equations, the spiral flying path of moths is simulated. As may be seen in this equation, the next position of a moth is defined with respect to a flame. The t parameter in the spiral equation defines how much the next position of the moth should be close to the flame (t = -1 is the closest position to the flame, while t = 1shows the farthest). Therefore, a hyper ellipse can be assumed around the flame in all directions and the next position of the moth would be within this space. Spiral movement is the main component of the proposed method because it dictates how the moths update their positions around flames. The spiral equation allows a moth to fly “around” a flame and not necessarily in the space between them. Therefore, the exploration and exploitation of the search space can be guaranteed. The logarithmic spiral, space around the flame, and the position considering different t on the curve are illustrated as

*…show more content…*

Though GA is a tool can be used as random select, they have been theoretically and empirically established to deliver robust solution in complex search spaces. The GA can be applied as follows: i. Proper Selection of binary or floating string. ii. Estimate the number of definite variables to the optimization problem. And the specific variables can be related to the number of controlled switching angles. iii. Set the initial population size depend upon the rate of convergence. iv. The fitness of every chromosome is assessed by the cost function. Since, the objective of the cost function depend upon the minimization of harmonics order with relates the switching angles v. The cost function for a nine level inverter is, f(θ_1,θ_2 〖,θ〗_3 )=|v_7 |+v_9 |/|v_1 | (4.2)

Algorithm is started with random selection of a set of solutions (represented by chromosomes) called population. Solutions from one population are taken and used to form a new population. This is motivated by a hope, that the new population will be better than the old one. Solutions which are selected to form new solutions (offspring) are selected according to their fitness - the more suitable they are the more chances they have to reproduce this is repeated until some condition (for example number of populations or improvement of the best solution) is satisfied Basic