# Centralized MPPT Control Architecture for Photovoltaic Systems Using LoRa Technology
## 3 Experimental Setup
### Control System and Wireless Implementation
#### 3.3.3 SMC Controller  
The SMC controller required a reference to calculate the error. This error determined the behavior of the controller. For this work, a voltage reference was needed since Equation (9) defines the error as the difference between the measured voltage and the voltage reference. Therefore, taking advantage of the simulation model, a supervised machine learning Gaussian Regression Process (GPR) was trained. For the GPR, specific kernels were employed, including the exponential (EXP) kernel (19), the Matern 5/2 Function (MAT) (20), the Radial Basis Function (RBF) (21), and the Rational Quadratic (RQ) kernel (22).  
\[k_{\text{EXP}}(x_{i},\,x_{j})=\sigma^{2}\exp\biggl{[}-\frac{d(x_{i},\,x_{j})}{l} \biggr{]}, \tag{19}\]  
\[k_{\text{MAT}}(x_{i},\,x_{j})=\sigma^{2}\biggl{[}1+\frac{\sqrt{5}}{l}\,d(x_{i}, \,x_{j})+\frac{5}{3l^{2}}\,d(x_{i},\,x_{j})^{2}\biggr{]}\exp\left[-\frac{\sqrt {5}}{l}\,d(x_{i},\,x_{j})\right], \tag{20}\]  
\[k_{\text{RBF}}(x_{i},\,x_{j})=\sigma^{2}\exp\left[-\frac{d(x_{i},\,x_{j})^{2}} {2\,l^{2}}\right], \tag{21}\]  
\[k_{\text{RQ}}(x_{i},\,x_{j})=\sigma^{2}\biggl{[}1+\frac{d(x_{i},\,x_{j})^{2}} {2\,\alpha\,l^{2}}\biggr{]}^{-\alpha}, \tag{22}\]  
where \(l\) is the length scale parameter, \(\sigma^{2}\) is the variance, and \(\alpha\) is the non-negative parameter of covariance.  
These kernels contributed to the construction of the prior distribution, allowing the GPR to adapt to the nuances of the observed data and to optimize its understanding through the fitting process. The four kernels were tested with a reduced dataset to determine which of them would obtain the best results. Figure 14 shows the predictions made by GPR against the measured values. Inspection of this figure showed that all of the kernels behaved in a similar way with comparable results. Therefore, an RMSE error analysis was carried out to further investigate the results of the different kernels.  
Table 3 shows the root mean square errors (RMSEs) for each kernel. It can be observed that the EXP kernel performed worse than all of the other kernels. The RQ, MAT, and RBF kernels performed very similar, with a slight advantage for the RQ kernel. Therefore, the RQ kernel was selected for the GPR voltage reference estimator.  
The SMC controller pseudo-code is detailed in Algorithm 2. Implementing the SMC controller required defining some parameters. The tuning of the parameter \(\lambda\) ensured dynamic adjustments during the control process. Similarly, a carefully chosen step size,  
Figure 14: The measured values versus the predicted values of the GPR kernels.  
\begin{table}
\begin{tabular}{l c c c c} \hline \hline
**Kernel** & **EXP** & **MAT** & **RBF** & **RQ** \\ \hline RMSE & 0.092766 & 0.074642 & 0.074607 & 0.074578 \\ \hline \hline \end{tabular}
\end{table}
Table 3: RMSE values for the GPR kernels.  
which was denoted as \(K\), was used to regulate the algorithm's switching process with a specified value of 0.01. To maintain stability and to avoid the discontinuous conduction mode in the DC-DC converter, constraints were imposed on \(d_{\text{min}}\) and \(d_{\text{max}}\). The allowable range for the sliding variable was predetermined as 0.1 to 0.9, which contributed to the robustness and reliability of the SMC control strategy.  
```
Define \([d_{\text{min}},\,d_{\text{max}},\,K,\,\lambda,\,L]\)  Initialize \(u_{\text{sw}}\) \([V_{\text{pv}},\,V_{\text{o}},\,G,\,T]\leftarrow\) read PV panel information \(V_{\text{ref}}\leftarrow\) GPR prediction with \(G\) and \(T\) \(e\leftarrow\) Equation (9) \(S\leftarrow\) Equation (10) \(u_{\text{eq}}\leftarrow\) Equation (17)  Verify the operating equations: if\(S<0\)then \(\Delta d\gets K\) else \(\Delta d\leftarrow-K\) endif \(u_{\text{sw}}\gets u_{\text{sw}}+\Delta d\) \(d=u_{\text{eq}}+u_{\text{sw}}\)  Check if \(d\) is in the range of \(d_{\text{min}}\) and \(d_{\text{max}}\)
```  
**Algorithm 2** SMC controller