## 5 MPPT Algorithms
### Artificial Neural Network (ANN)
#### 5.1.1 Dataset  
To train the Artificial Neural Network (ANN), a comprehensive dataset was generated under realistic photovoltaic (PV) operating conditions, including dynamic variations in irradiance and temperature over a period of 1000 s. The simulation was carried out using a discrete step size of \(T_{s}=0.001\) s, resulting in a total of one million samples per variable:  
\[N=\frac{t_{\text{total}}}{T_{s}}=\frac{1000}{0.001}=1,\!000,\!000 \tag{8}\]  
The time vector was defined as  
\[t=(0:N-1)\cdot T_{s} \tag{9}\]  
\begin{table}
\begin{tabular}{c c c} \hline
**Class** & **Subclass** & **Acronym** \\ \cline{2-3} Conventional Algorithms & Perturb and Observe & P\&O \\ \cline{2-3}  & Incremental Conductance & InC \\ \cline{2-3} Control Logic-Based Algorithm & Fuzzy Logic Controller & FLC \\ \hline Artificial Intelligence Algorithms & Artificial Neural Network & ANN \\ \cline{2-3}  & Deep Reinforcement Learning & DQN \\ \hline Hybrid Algorithms & InC combined with P\&O & InC + P\&O \\ \cline{2-3}  & GA combined with InC & GA + InC \\ \cline{2-3}  & GA combined with P\&O & GA + P\&O \\ \hline \hline \end{tabular}
\end{table}
Table 6: Classification of MPPT algorithms implemented in this study.  
\begin{table}
\begin{tabular}{l l l} \hline
**Component** & **Details** & **Remarks** \\ \hline
**Input Layer** & 2 neurons & Irradiance and temperature \\
**Hidden Layers** & 1 st: 20 neurons (tansig) & Hyperbolic tangent \\  & 2 nd: 10 neurons (tansig) & sigmoid activation function \\
**Output Layer** & 2 neurons (purelin) & \(V_{mp}\) and \(P_{mp}\) with linear \\
**Training Algorithm** & Levenberg-Marquardt & Implemented using fitnet \\  & (trainlm) & in MATLAB \\  & 75\% training & \\
**Data Division** & 15\% validation & Ensures generalization and \\  & 10\% testing & performance evaluation \\ \hline \end{tabular}
\end{table}
Table 7: Architecture and training parameters of the implemented ANN.  
To ensure representative behavior under Standard Test Conditions (STCs), three time windows (at 200 s, 600 s, and 850 s) were defined with fixed irradiance of 1000 W/m\({}^{2}\) and temperature of 25 \({}^{\circ}\)C. Outside these intervals, both irradiance and temperature followed sinusoidal functions with added Gaussian noise to emulate natural environmental fluctuations:  
\[G(t)=G_{\text{mean}}+A_{G}\cdot\sin\left(\frac{2\pi t}{T_{G}}\right)+\mathcal{ N}(0,\sigma_{\text{G}}^{2}) \tag{10}\]  
\[T(t)=T_{\text{mean}}+A_{T}\cdot\sin\left(\frac{2\pi t}{T_{T}}\right)+\mathcal{ N}(0,\sigma_{T}^{2}) \tag{11}\]  
where  
* \(G_{\text{mean}}=500\) W/m\({}^{2}\), \(A_{G}=350\) W/m\({}^{2}\), \(T_{G}=300\) s, \(\sigma_{G}=50\) W/m\({}^{2}\);
* \(T_{\text{mean}}=30\) \({}^{\circ}\)C, \(A_{T}=15\) \({}^{\circ}\)C, \(T_{T}=600\) s, \(\sigma_{T}=1.5\) \({}^{\circ}\)C.  
These profiles simulate realistic irradiance oscillations every 5 min and slower temperature drifts every 10 min.  
The PV system was simulated (Figure 7) using a resistive load calculated to match the maximum power point (MPP) at STC using the manufacturer specifications:  
\[R=\frac{V_{mp}}{I_{mp}}=\frac{36}{0.83}\approx 43.37\ \Omega \tag{12}\]  
The temporal evolution of the temperature and irradiance profiles is illustrated in Figure 8.  
Table 8 summarizes the main statistics of the temperature and irradiance profiles.  
This large and diverse dataset enabled the ANN to learn the non-linear relationship between environmental inputs and the optimal MPP voltage, ensuring good generalization across varying PV conditions.  
\begin{table}
\begin{tabular}{l c c} \hline \hline
**Parameter** & **Temperature (\({}^{\circ}\)C)** & **Irradiance (W/m\({}^{2}\))** \\ \hline Number of Samples & 1,000,000 & 1,000,000 \\ Mean & 31.09 & 583.44 \\ Standard Deviation & 10.11 & 272.92 \\ Minimum & 15.00 & 1.00 \\ Maximum & 45.00 & 1000.00 \\ \hline \hline \end{tabular}
\end{table}
Table 8: Statistical summary of environmental variables.  
Figure 7: Simulink model for dataset generation under dynamic environmental conditions.