# Differential Evolution Applied to a Multilevel Inverter--A Case Study
## 2 Materials and Methods  
### Differential Evolution Algorithm  
The differential evolution (DE) algorithm is a relatively new metaheuristic method. The DE algorithm is a population-based algorithm that uses genetic operators such as crossover, mutation, and selection.  
It has become one of the most widely used evolutionary algorithms. It is easily understood and easy to implement.  
[PERSON] and [PERSON] developed the differential evolution algorithm as a reliable, versatile, easy-to-implement function optimizer. The first publication on DE appeared in a technical report in 1995 [13].  
This metaheuristic method has three principal operations: mutation, crossover, and selection. In the mutation stage, the population vectors are randomly perturbed. Population diversity is controlled by the crossover process [14]. Meanwhile, the selection process chooses the vectors containing the fittest solution [15].  
Some advantages of the DE method are its ease of application, fast convergence, and tendency to reach the global optimal solution without remaining in local solutions [16; 17]. A diagram of the stages of DE is shown in Figure 1.  
The following is a brief description of each stage outlined in the diagram in Figure 1:  
1. Initialization (Initial population): A population of vectors is randomly generated (individuals) [18; 19; 20].  
Figure 1: Diagram of the stages of differential evolution.  
\[\text{Let}\ S^{G}=\left\{X_{j}^{G}:j=1,2,\ldots,NP\right\} \tag{1}\]  
be the population of any generation of \(G\), \(NP\) denotes the population size. \(D\) is the length of the search space.  
\[X_{j}^{G}=\left\{x_{1,j^{\prime}}^{G},\ x_{2,j^{\prime}}^{G},\ \ldots\,\ x_{D,j}^{G}\right\}.\ X_{j}^{G} \tag{2}\]  
is generated using a uniformly distributed random number, such as: \"rand (0,1)\". Hence, we obtain:  
\[X_{j}^{G}=X_{Low}+\left(X_{Upp}-X_{Low}\right)*rand\left(0,1\right) \tag{3}\]  
where:  
\(X_{Low}=\) Lower bound.  
\(X_{Upp}=\) Upper bound.  
\(S^{G}=\) search space.  
2. Mutation: In this process, three vectors are randomly selected, and the first two vectors are subtracted from each other (this is to define a search direction). The difference is multiplied by the scale factor or \"F\", which can vary between zero and one [12]. To the resulting vector, the third vector is added [21], as in the following equation: \[V_{j}^{G}=X_{r3}^{G}+F*\left(X_{r1}^{G}-X_{r2}^{G}\right)\] (4) where \(V_{j}^{G}\) is the mutant vector. For each vector in the population, a mutated vector is created.  
3. Crossover: A new vector called the test vector (child vector) is generated, using a crossover factor Cr with values between 0 and 1 and defining the degree of similarity of the test vector to the mutant or parent vector. If Cr is close to 1, the test vector will be quite similar to the mutant vector; if Cr is close to 0, it will be similar to the parent vector [19; 20]. The test vector \(U_{j}^{G}\), the target vector \(X_{j}^{G}\), and the mutant vector \(V_{j}^{G}\) are  
Several authors recommend using a crossover rate (Cr) with a value of 0.9 so that the test vector will be 90% similar to the mutant vector and thus include a wide variety of individuals [24].