## 3 The Proposed ROA Based MPPT
### Application of the ROA for MPPT  
The MPPT system is demonstrated in Figure 4. The PV power is computed with a multiplier based on voltage and current obtained values. The MPPT based on the ROA generates a duty cycle (d) and activates the converter. The d value is taken as the agent position, and the corresponding extracted power is taken as the agent optimization probability. Thus, the ROA determines the optimal d to maximize the PV system power and its efficiency.  
In MPPT solving via the ROA, power of the PV system is formulated as follows:  
\[\text{Maximize}\quad\text{P}_{\text{PV}}(\text{d}) \tag{14}\]  
The optimization variable (d) is constrained by:  
\[\text{d}_{\text{min}}<\text{d}<\text{d}_{\text{max}} \tag{15}\]  
where \(\text{d}_{\text{min}}\) and \(\text{d}_{\text{max}}\) are the low and high values of d, respectively.  
In this study, the ROA has been used as a direct control method to optimally adjust the d of the converter of the PV system and reduce the fluctuations of the system steady state.  
The steps to implement the ROA in solving the MPPT problem are as follows:  
Step (1) In this step, ROA information is entered (population number 5 and number of iterations 330). Additionally, the minimum and maximum intervals of the duty cycle are applied.  
Step (2) For each of the population, the duty cycle in its allowable range is randomly selected by the ROA and the voltage, while the current and consequently the PV power are calculated for it.  
Step (3) The agent corresponding to the best PV power in step 2 is selected as the best agent of the algorithm.  
Step (4) The ROA population set (d) is updated according to the exploration and exploitation phases of the ROA based on the following equations:  
\[\text{d}_{\text{i}}^{\text{t+1}}\ =\ \text{d}_{\text{i}}^{\text{t}}+(2\times(1- \frac{\text{t}}{\text{T}}))\times(2\times\text{rand}(0,1)-1)\times(\text{d}_{ \text{i}}^{\text{t}}\times(1-\text{C})) \tag{16}\]  
where \(\text{d}_{\text{i}}^{\text{t+1}}\) refers to the duty cycle in t + 1 iteration related to ith renorm and t is the ROA iteration number.  
In addition, the PV system power using the ROA-based MPPT problem is defined as follows:  
\[\text{P}(\text{d}_{\text{i},\text{j}}^{(\text{t+1})})>\text{P}(\text{d}_{ \text{i},\text{j}}^{(\text{t})}) \tag{17}\]  
Step (5) For the updated population (selection of new duty cycles), the objective function, i.e., PV power, is calculated.  
Step (6) The best agent with maximum power is selected as the population representative in step 5. If the solution is better compared to step 3, replace it.  
Step (7) If the convergence conditions are achieved, which are to achieve maximum power and perform maximum repetitions of the ROA, go to step 8; otherwise, go to step 4.  
Figure 4: Block diagram of an ROA —based MPPT.  
Moreover, at this stage, because of the variations in environmental conditions, the output power of the PV system changes. Hence, the ROA population must be re-quantified to achieve the GMPP according to the following logic:  
\[\frac{\mathrm{P_{PV}^{(C\_Iter+1)}}-\mathrm{P_{PV}^{(C\_Iter)}}}{\mathrm{P_{PV}^{(C \_Iter)}}}\geq\Delta\mathrm{P} \tag{18}\]  
Step (8) End (achieving maximum power and determining the optimal duty cycle). Flowchart of ROA implementation in problem solving is demonstrated in Figure 5.