## 2 Methodology
### Sun Detection
#### 2.2.2. Dome Detection
As can be seen in Figure 26, the SZA given by the particle filter deviated about 0.86\({}^{\circ}\) away on average from the SZA given by the segmentation process; this indicates that the position of the particle filter remained practically in the center of the circumsolar area of the Sun. On the other hand, the SZA given by the Pysolar model was around 4.51\({}^{\circ}\) away on average from the SZA given by the segmentation process; thus, using only this information can result in significant errors in later processes, for instance the irradiance estimation. Figure 4.0 Sun position in the dome. Figure 4.1 Solar zenith angle (SZA). Besides of the SZA calculation, the solar azimuth angle (SAA) has also been calculated using the following expression:

Figure 4.2

Figure 27 shows the set of plots of the azimuth angles of the segmentation process, the particle filter, and the Pysolar model. Similar to the previous case, taking as a reference the SAA of the segmentation process, the error of both the SAA of the particle filter and the SAA of the Pysolar model have been computed; in Figure 28, these errors are shown. Figure 4.3 Solar zenith error. Figure 4.4 Solar azimuth angle (SAA). The behavior of the SAA errors was similar to the behavior of the SZA errors, the SAA of the particle filter having an average error of 2.47\({}^{\circ}\) while the SAA of the Pysolar model was around of 6.88\({}^{\circ}\) on average. From the results obtained, it can be observed that clouds occluding the Sun generated the perception of changing the size of the Sun depending on the water vapor concentration of the cloud. \"Thin\" clouds (low water vapor concentration) tended to generate a perception of growth in the Sun size. On the other hand, when \"heavy\" clouds were present (high water vapor concentration), the sunlight was obstructed completely, and the Sun position could not be determined. Nevertheless, having the position of the Sun, at any moment, was crucial, and this could only be accomplished by a combination of algorithms that was ready for all the sky scenarios. In addition, mapping sky coordinates to image coordinates allowed working in a new reference system that avoided hardware errors. ## 4 Conclusions

A novel methodology based on the implementation of several image processing techniques to achieve a robust and automatic detection of the position of the Sun from a set of images, acquired with a low-cost artificial vision system, was proposed. The methodology allowed not only detecting the position of the Sun in a clear-sky day, but also in a cloudy one, even if the Sun was completely occluded. The proposed methodology has been tested using a set of images of three different scenarios, clear-sky day, a partially sunny day, and a cloudy day. Experimental results demonstrated that regardless of the conditions of the day, the computed position of the Sun was within the circumsolar area. It is important to mention that knowing an accurate position of the Sun at any moment allows performing other processes, for instance knowing not only the position of a cloud with respect to the position of the Sun to identify if an occlusion will occur, but also the time it will take, which is fundamental in the implementation of better solar resource assessment systems. A supporting video is available at: [[https://youtu.be/HY2](https://youtu.be/HY2) plwtBR-4]([https://youtu.be/HY2](https://youtu.be/HY2) plwtBR-4). Conceptualization and methodology, L.V. and M.L.P.-C.; software, L.V. and C.M.P.-M.; formal analysis, L.V., M.L.P.-C., and [PERSON]; writing, original draft preparation, L.V., D.M., and M.L.P.-C.; writing, review and editing, C.A.P.-A. and A.D.-P. This research was partially funded by project CONACyT-Problemas Nacionales, grant number 2015-01-1651. The authors acknowledge CONACyT for the partial financial support to the project Problemas Nacionales 2015-01-1651. The authors declare no conflict of interest. Figure 4.5 Solar azimuth error. ## References

* [PERSON] et al.