# Detection and Optimization of Photovoltaic Arrays' Tilt Angles Using Remote Sensing Data
## 2 Methodology
### Optimization of Tilt Angle Based on Irradiance Simulation  
In the third stage, the tilt angle optimization is executed for each array. In this work, the well-known SA algorithm [46; 47] is used due to its suitability for tackling nonlinear optimization of a single real-valued parameter. At first, the most optimal tilt angle is set to the existing configuration, i.e., \(PVA^{i}_{\beta_{i}}=PVA^{i}_{\beta}\), where \(b\) annotates the best solution. Then the algorithm iteratively adjusts the tilt angle as follows:  
\[PVA^{i}_{\beta_{i}}=\min\Bigl{(}\max\Bigl{(}0^{\circ},PVA^{i}_{\beta_{C}}+ rand(-25^{\circ},25^{\circ})\Bigr{)},60^{\circ}\Bigr{)}, \tag{14}\]  
where \(l\in[0,L]\) is the current iteration, \(L\) is the maximum number of iterations' input hyperparameter, \(q\) is the SA step size input hyperparameter, and \(PVA_{\beta_{C}}\) is the current accepted solution of the tilt angle, which is initially equal to \(PVA_{\beta_{b}}\). Afterwards, the following is calculated for the given iteration \(l\):  
\[\Delta = S(PVA^{i}_{\gamma},PVA^{i}_{\beta_{i}})-S(PVA^{i}_{\gamma},PVA^ {i}_{\beta_{C}}), \tag{15}\] \[m = e^{(-\Delta/(T/(l+1)))}, \tag{16}\]  
where \(S\) is a function for per-annum solar irradiance estimation for a given array configuration, which will be described in more detail in continuation. The input hyperparameter \(T\) defines the temperature of the SA algorithm, which is the likelihood that a worse solution is accepted than the current solution \(PVA_{\beta_{C}}\). \(m\) is the so-called Metropolis criterion [47], which allows the SA algorithm to escape local minima when \(T\) is sufficiently high. Within a given iteration \(l\), if \(\Delta>0\), then \(PVA^{i}_{\beta_{b}}=PVA^{i}_{\beta_{i}}\). Otherwise, there is a chance that the current solution changes to \(PVA^{i}_{\beta_{C}}=PVA^{i}_{\beta_{i}}\), if \(rand(0,1)<m\) holds. The core of the optimization criteria is the irradiance simulation for each \(PVM^{i}\in PVA^{i}\), where the goal is to maximize the amount of solar irradiance received. In this paper, the solar irradiance simulation approach is based on the previous work of the authors [8; 48], which was rigorously validated regarding the accuracy. This approach takes into account shadowing from the surroundings (represented in the 2.5D grid), self-shadowing between modules, and direct irradiance and anisotropic diffuse irradiance based on the well-known Perez model. The per-annum estimated solar irradiance with an hourly time-step (i.e., the solar potential) for a given \(PVA^{i}\) is estimated as follows:\[S(\gamma,\beta) = \sum_{j=1}^{N}\sum_{t=1}^{365\times 24}(D(J_{b}(t),\gamma,\beta,s(t))H(j,t) \tag{17}\] \[+P(J_{d}(t),\gamma,\beta,s(t))),\] \[D(J_{b}(t),\gamma,\beta,s(t)) = J_{b}(t)\frac{\theta}{\theta_{z}}\] (18) \[= J_{b}(t)\frac{\cos(\theta_{z}(t))\cos(\beta)+\sin(\theta_{z}(t) )\cos(s_{\gamma}(t)-\gamma)}{\cos(\theta_{z}(t))},\] \[\theta^{z}(t) = 0.5\pi-s_{a}(t), \tag{19}\]  
where \(D\) and \(P\) are discrete functions for estimating direct and diffuse irradiance for arbitrary surfaces at a given time instance \(t\)[49]. These functions depend on the input horizontal irradiance measurements of direct \(J_{b}(t)\) and diffuse \(J_{d}(t)\) irradiances, as well as the surface's tilt (inclination) \(\beta\) and aspect (orientation) \(\gamma\) angles. Both \(J_{b}(t)\) and \(J_{d}(t)\) are generally obtained from TMY with an hourly temporal resolution for a given location, constructed by the Sandia method [50] using long-term pyranometer-based measurements at the given location. \(J_{b}(t)\) is perturbed in \(D\) by estimating the angle of incidence \(\theta\) and the solar zenith angle \(\theta^{z}\) for the given surface, where an additional input is the Sun's spherical position defined as \(s(t)=\{\theta,\alpha\}\) (i.e., solar azimuth and altitude). The Sun's position for the given location can be estimated with the SolPos algorithm [51]. To estimate diffuse irradiance, the Perez model is considered (for details, see [52]).