# Detection and Optimization of Photovoltaic Arrays' Tilt Angles Using Remote Sensing Data
## 2 Methodology
### Three-Dimensional Reconstruction of Detected Modules Using LiDAR Data
Afterwards, these cells are decreased (i.e., flattened) by the modules' vertical height, which is estimated as follows:  
\[PVM_{vh}=\frac{PVM_{h}}{\cos(PVM_{\beta})}\tan(PVM_{\beta})\left[\text{m}\right]. \tag{7}\]  
Next, a 3D polygon is generated for each module using given \(PVM_{\beta}\), \(PVM_{\gamma}\), \(PVM_{w}\), and \(PVM_{h}\) (see Figure 4c), where the given polygon's relative vertices' 3D position is defined as follows:  
\[v_{1} = (0,0,0), \tag{8}\] \[v_{2} = \big{(}PVM_{w},0,PVM_{w}\cdot\tan(PVM_{\beta})\big{)},\] \[c_{i}=\bigg{(}\frac{\sum_{k=1}^{\mathcal{N}(c_{i})}|w_{k}\cdot h_{k}}{\sum_{k= 1}^{\mathcal{N}(c_{i})}|w_{k}},\text{ mode }\{\text{class}(c_{k})\mid c_{k}\in\mathcal{N}(c_{i})\}\bigg{)}\text{ if }c_{i}=\emptyset, \tag{2}\]0 \[c_{i}=\bigg{(}\frac{\sum_{k=1}^{\mathcal{N}(c_{i})}|w_{k}\cdot h_{k}}{\sum_{k= 1}^{\mathcal{N}(c_{i})}|w_{k}},\text{ mode }\{\text{class}(c_{k})\mid c_{k}\in\mathcal{N}(c_{i})\}\bigg{)}\text{ if }c_{i}=\emptyset, \tag{2}\]1  
Finally, the modules are grouped on the basis of their proximity, as well as aspect and tilt angles, since it is computationally less expensive to optimize modules that belong to the same array. Another reason is that, in real PV installation scenarios, the modules are typically bundled into arrays, sharing the same installation platform beneath, where the tilt angle is set by the platform. For this purpose, the well-known DBSCAN clustering algorithm [45] is used, where each module is represented by its feature vector \(PVM_{f}=\{PVM_{\beta},PVM_{\gamma}\}\). Two given modules belong to the same cluster (i.e., array) if the following conditions are satisfied:  
\[c_{i}=\bigg{(}\frac{\sum_{k=1}^{\mathcal{N}(c_{i})}|w_{k}\cdot h_{k}}{\sum_{k= 1}^{\mathcal{N}(c_{i})}|w_{k}},\text{ mode }\{\text{class}(c_{k})\mid c_{k}\in\mathcal{N}(c_{i})\}\bigg{)}\text{ if }c_{i}=\emptyset, \tag{2}\]2 \[c_{i}=\bigg{(}\frac{\sum_{k=1}^{\mathcal{N}(c_{i})}|w_{k}\cdot h_{k}}{\sum_{k= 1}^{\mathcal{N}(c_{i})}|w_{k}},\text{ mode }\{\text{class}(c_{k})\mid c_{k}\in\mathcal{N}(c_{i})\}\bigg{)}\text{ if }c_{i}=\emptyset, \tag{2}\]3where \(d\) is a Euclidean distance function, \(j\) and \(k\) (\(j\
eq k\)) define the indices of different modules, \(\epsilon_{1}\) is the positional threshold, and \(\epsilon_{2}\) is the feature vector threshold. The parameter _minPts_ in DBSCAN defines the minimum number of entities to form a cluster, which is set to 1. An example result of grouping of modules into arrays can be seen in Figure 4d. Each array _PVA\({}^{i}\)_ has the following properties:  
\[c_{i}=\bigg{(}\frac{\sum_{k=1}^{\mathcal{N}(c_{i})}|w_{k}\cdot h_{k}}{\sum_{k= 1}^{\mathcal{N}(c_{i})}|w_{k}},\text{ mode }\{\text{class}(c_{k})\mid c_{k}\in\mathcal{N}(c_{i})\}\bigg{)}\text{ if }c_{i}=\emptyset, \tag{2}\]4 \[c_{i}=\bigg{(}\frac{\sum_{k=1}^{\mathcal{N}(c_{i})}|w_{k}\cdot h_{k}}{\sum_{k= 1}^{\mathcal{N}(c_{i})}|w_{k}},\text{ mode }\{\text{class}(c_{k})\mid c_{k}\in\mathcal{N}(c_{i})\}\bigg{)}\text{ if }c_{i}=\emptyset, \tag{2}\]5 (12) \[c_{i}=\bigg{(}\frac{\sum_{k=1}^{\mathcal{N}(c_{i})}|w_{k}\cdot h_{k}}{\sum_{k= 1}^{\mathcal{N}(c_{i})}|w_{k}},\text{ mode }\{\text{class}(c_{k})\mid c_{k}\in\mathcal{N}(c_{i})\}\bigg{)}\text{ if }c_{i}=\emptyset, \tag{2}\]6  
where \(N\) denotes the number of modules belonging to given _PVA\({}^{i}\)_.