# Optimal Design and Control of MMC STATCOM for Improving Power Quality Indicators
## 6 Proposed Optimization Methods
### Atom Search Optimization (ASO)  
Atom search optimization is a novel physics-based method for global optimization problems [34; 35]. ASO is a population-based technique, which imitates the motion of atoms subjected to interactions and other constraint forces [33; 34]. The total forces of interaction that affect the \(i\)th atom in the \(d\)th dimension are described as follows:  
\[F_{i}^{d}(t)=\sum_{j\in\textit{Kbest}}rand_{j}F_{ij}^{d}(t) \tag{37}\]  
where \(rand_{j}\) is a number randomly distributed in the range [0, 1] and _Kbest_ is a group of \(K\) atoms having the best values fitness function. The value of K has to be decreased gradually as the iterations advance, to let ASO perform more exploitation in the latest iterations, as shown in the following expression:  
\[K(t)=N-(N-2)\times\sqrt{\frac{t}{T}} \tag{38}\]  
Figure 11: The stages of the HHO algorithm [33]. where \(N\) denotes the total number of atoms forming an atomic structure, \(t\) denotes the present iteration, and \(T\) is the total number of iterations. The interaction force \(\rm F_{ij}^{d}\) presents the gradient of the potential Lennard-Jones (L-J) and is described in the following formula [29]:  
\[F_{ij}^{d}=-\eta(t)\left[2\left(h_{ij}(t)\right)^{-13}-\left(h_{ij}(t)\right)^ {-2}\right]\frac{\overrightarrow{r_{ij}}}{r_{ij}} \tag{39}\]  
where \(\eta(t)\) presents the depth function, which controls the regions of attraction and repulsion; \(h_{ij}(t)\) is the ratio between the distance between two atoms \(r_{ij}\) and the scaled distance between them \(\sigma(t)\). \[h_{ij}(t)=\frac{r_{ij}}{\sigma(t)} \tag{40}\]  
\[\eta(t)=\alpha\left(1-\frac{t-1}{T}\right)^{3}e^{-\frac{\alpha\eta t}{T}} \tag{41}\]  
where \(\alpha\) denotes the depth weight. The function of the force of interaction under different values of \(\eta\) with respect to a variable scaled distance (\(h\) changed from 0.9 to 1) is presented in Figure 12.  
Equation (42) presents the expression of the scaled distance between any two atoms \(i\) and \(j\):  
\[h_{ij}(t)=\left\{ \begin{array}{ll}h_{\rm min}&\frac{r_{ij}(t)}{\sigma(t)}<h _{\rm min}\\ \frac{r_{ij}(t)}{\sigma(t)}&h_{\rm min}\leq\frac{r_{ij}(t)}{\sigma(t)}\leq h _{\rm max}\\ h_{\rm max}&\frac{r_{ij}(t)}{\sigma(t)}>h_{\rm max}\end{array} \right. \tag{42}\]  
where \(h_{min}\) and \(h_{max}\) describe the upper and lower limits of the distance (\(h\)), respectively, and are determined by the following formula:  
\[\left\{ \begin{array}{ll}h_{\rm min}=g_{0}+g(t)\\ h_{\rm max}=u\end{array} \right. \tag{43}\]  
\[g(t)=0.1\times\sin\left(\frac{\pi}{2}\times\frac{t}{T}\right) \tag{44}\]  
Figure 12: The behavior of the interaction force function with the scaled distance (\(h\)) under different depth values [34]. \[\sigma(t)=\|x_{ij}(t),\frac{\sum\limits_{j\in\mathcal{K}best}x_{ij}(t)}{K(t)}\|_{2} \tag{45}\]  
where \(g_{0}\) and \(u\) denote the lower and upper limits, respectively. \(g(t)\) denotes a drift factor to give the algorithm the ability to transform from the exploration to the exploitation stage. Presuming that there is a covalent bond between each atom in ASO and the best one, the constraint force resulting from this combination be expressed as follows:  
\[G_{i}^{d}(t)=\lambda(t)\Big{(}x_{best}^{d}(t)-x_{i}^{d}(t)\Big{)} \tag{46}\]  
where  
\[\lambda(t)=\beta\times e^{-\frac{2\alpha}{T}} \tag{47}\]  
where \(x_{best}^{d}(t)\) denotes the location of the best atom in the \(dth\) dimension, \(\lambda(t)\) indicates the Lagrangian multiplier, and \(\beta\) denotes a multiplier weight. After defining the forces of interaction and L-J potential resultant constraint force, the acceleration, to which the \(i\)th atom is projected in the dimension \(d\) and iteration \(t\), is determined as follows:  
\[