# An Improved Dingo Optimization Algorithm Applied to SHE-PWM Modulation Strategy
## 2 Materials and Methods
### Modified Dingo Optimization Algorithm (mDOA)  
In this paper, an improved algorithm is proposed for the features of the standard DOA algorithm. The main improvement is an incorporation of a local search procedure in the survival criteria. The local search is associated with an exploitation mechanism in the search space of solutions. It consists of enhancing the best solution obtained so far by looking for other alternatives around it. All bio-inspired algorithms must have a good balance between exploitation (local search) and exploration (global search). So, Equation (9), proposed in [27], is associated to global search whilst Equation (10) is associated to local search.  
\[\vec{x}_{i}(t)=\vec{x}_{*}(t)+walk\bigg{(}\frac{1}{2}-\varepsilon\bigg{)} \tag{10}\]  
where \(\overrightarrow{x}_{i}(t)\) is the search agent with low survival rates that will be updated, \(\overrightarrow{x}_{*}(t)\) is the best search agent found from the previous iteration, and \(walk\) is a pseudo-random number uniformly distributed in the interval \((-2,2)\). Whereas, \(\varepsilon\) is a normally distributed pseudo-random number in the interval of \((0,1)\).  
The proposed criterion consists of: If the content of the indexed vector has a survival rate less than 0.3 and if the index number is even, then a global search will be applied; otherwise, for odd index numbers, a local search will then be used. The survival criteria is summarized in Algorithm 1 and depicted in Figure 3. In all of the benchmark functions, the mDOA overtops the classic DOA in the majority of the tests.  
The proposed approach was benchmarked with four unimodal functions associated with exploitation (local search), shown in Equation (11), and compared with the standard DOA algorithm. All functions have a dimension of 30 (number of variables) and each variable in the interval \([-100,100]\) with the best known value \(F_{min}\) = 0:  
\[\begin{array}{c}F1=F1(\overrightarrow{x})=F1(x_{1},\ldots x_{30})=\sum \limits_{i=1}^{n}x_{i}^{2}\\ F2=F2(\overrightarrow{x})=F2(x_{1},\ldots x_{30})=\sum\limits_{i=1}^{n}{\sum \limits_{j=1}^{2}x_{j}^{2}}\\ F3=F3(\overrightarrow{x})=F3(x_{1},\ldots x_{30})=max_{i}\{|x_{i}|,1\leq i\leq n\} \\ F4=F4(\overrightarrow{x})=F4(x_{1},\ldots x_{30})=\sum\limits_{i=1}^{n}{([x_{ i}+0.5])^{2}}.\end{array} \tag{11}\]The importance of the survival criterion is that it replaces (repairs) vectors with low fitness by incorporating a local search strategy in addition to the global search it previously had to improve the standard DOA algorithm. The result of these tests are summarized in Figure 4.  
Pseudo Code for mDOA  
The pseudo code of the mDOA is described below (Algorithm 2).  
Figure 4: DOA and mDOA unimodal functions (\(F_{1}\) to \(F_{4}\)) convergence graph.  
Figure 3: Survival rate proposal.  
```
1:procedure DOA Taken from [27] and updated with our approach
2:Initialization of parameters
3:\(P=0.5\), probability of hunting or scavenger strategy
4:\(Q=0.7\), probability of Strategy 1 (group attack) or Strategy 2 (persecution attack)
5:Generate the initial population
6:while iteration \(<\) Max Number of Iterations do
7:if\(random<P\)then
8:if\(random<Q\)then
9: Strategy 1: Group Attack Procedure, Equation (5).
10:else
11: Strategy 2: Persecution, Equation (6).
12:endif
13:else
14: Strategy 3: Scavenger, Equation (7).
15:endif
16: Update search agents that have low survival value, Algorithm 1, Equation (9) or (10).
17: Calculate \(x_{new}\), the fitness value of the new search agents
18:if\(x_{new}<x_{*}\)then
19:\(x_{*}=x_{new}\)
20:endif
21:\(iteration=iteration+1\)
22:endwhile
23:Display \(x_{*}\), the best optimal solution
24:endprocedure
```  
**Algorithm 2** modified Dingo Optimizer Algorithm (mDOA)