## 4 Maximum Power Point Tracking (MPPT) Algorithm
### GWO Algorithm  
The grey wolf optimization algorithm is being employed to achieve a better MPPT [9]. [PERSON] first proposed the Grey wolf algorithm in 2014. It is a mathematical model which follows the social behaviour of the grey wolf pack when hunting prey. The wolves in the pack are divided into different categories based on their fitness and strength. The different categories are alpha (\(\alpha\)), beta (\(\beta\)), delta (\(\delta\)) and omega (\(\omega\)). The fittest wolf in the pack is alpha (\(\alpha\)), while the wolves with a fitness close to alpha are beta (\(\beta\)) and delta (\(\delta\)), and the rest of the wolves constitute omega (\(\omega\)). The same structure is then used by the pack to hunt the prey by tracking, encircling and attacking. Here, the alpha (\(\alpha\)), beta (\(\beta\)) and delta (\(\delta\)) wolves play the primary role.  
The same phenomenon is considered in the GWO optimization model. The model divides the available solutions for a given problem into different categories as per their closeness to the desired output and also moves the solutions towards the desired values, just like the wolf pack tracking the prey, encircling the solution and finally achieving the desired solution. The solution which falls into alpha (\(\alpha\)) is used by the mathematical model to reach the optimal solution. The equation used by the GWO to achieve this is given below:  
\[\overset{\rightarrow}{X}(t+1)=\overset{\rightarrow}{X_{p}}(t)-\overset{ \rightarrow}{A}\times\overset{\rightarrow}{D} \tag{17}\]  
\[\overset{\rightarrow}{D}=\left|\overset{\rightarrow}{C}\times\overset{ \rightarrow}{X_{p}}(t)-\overset{\rightarrow}{X}(t)\right| \tag{18}\]  
Here, it indicates the current iteration. \(\overset{\rightarrow}{X_{p}}(t)\) represents the position of the desired output, and \(\overset{\rightarrow}{X}(t+1)\) represents the position of the current solution. \(\overset{\rightarrow}{A}\),\(\overset{\rightarrow}{C}\) _and_\(\overset{\rightarrow}{D}\) represent the vector coefficients, and these vectors are calculated using the below formula:  
\[\overset{\rightarrow}{A}=2\overset{\rightarrow}{a}r_{1}-\overset{ \rightarrow}{a} \tag{19}\]  
\[\overset{\rightarrow}{C}=2\overset{\rightarrow}{r_{2}} \tag{20}\]  
where the values of the vector \(a\) are linearly decreased from 2 to 0 as the iterations proceed, and \(r_{1}\), \(r_{2}\) are randomly chosen vectors in [0, 1].  
In this paper, the GWO math model is used to achieve the maximum power point tracking with the help of a modified LUO converter whose switching pulse's duty cycle can be varied in an optimal way to achieve the maximum power from the PV array. The GWO performs the desired calculations to achieve MPP. The flow chart for the GWO-based MPPT is shown in Figure 3.  
The duty cycle (\(D\)) of the switching pulse of the modified Luo converter represents the Grey wolf. Therefore, we can rewrite Equation (17) as:  
\[D_{i}(k+1)=D_{i}(k)-A\times D \tag{21}\]  
Figure 3: Flow chart of the Grey Wolf Optimizer (GWO)-based Maximum Power Point Tracking (MPPT) algorithm.  
The objective function of the proposed GWO algorithm is given by:  
\[V_{act}(D_{i}(k))>V_{ref}(D_{i}(k-1)) \tag{22}\]  
where \(V\) indicates the output voltage, d is the duty cycle, 'i' is the number of current Grey wolves and k is the number of iterations. For the MPPT tracking presented in this paper, the duty cycle of the DC-DC converter is referred to like the positions of the wolves in each state, and during iteration, the best value is considered as the \(\text{K}_{\text{P}},\text{K}_{\text{i}}\) values of the PI controller.