*3.2. Acquisition Strategy*

Due to the extremely high frequency of variations caused by cloud transients on PV power systems, the acquisition frequency must be high enough to provide information on such variations [7,8,35]. An acquisition frequency of 1 Hz was chosen since it has been shown to provide important information on very short-term solar variability [35]. This approach is important to provide information surrounding fast ramp events; however, it generates so much data not pertaining to such events that it may hinder their study, especially when such a high volume of images must be analyzed.

To focus on the ramp events, the approach used is called acquisition by exception [71]. It consists of monitoring one or more variables of interest and only saving data when an event of interest is detected. In this case, whenever the power measurement would vary beyond a certain threshold, the system would save data pertaining to this event. In practice, the acquisition software continuously acquired data during the daytime at 1 Hz and temporarily stored this information using a queue structure (first in, first out). This queue had a maximum of 10 elements at a given time, and for every iteration where no variation event was detected, the oldest entry was deleted, making room for a new set of measurements. Each element was measured 1 s apart and was comprised of one sky image, one voltage and one current measurement as well as the calculated power from the PV panel.

In order to detect a variation event a moving average of the previous 3 power values at *t*−3s, *t*−2s and *t*−1s—are calculated and compared with the most recent value, *t*0. If there is a variation greater than a certain threshold, either up or down, the program enters the data-saving routine. It keeps acquiring data for 4 more seconds—*t*+1s ... *t*+4s—and then it saves these 15 s worth of data, as well as one temperature measurement representative of this period. This structure of 15 s of measurements is henceforth referred to as an "event". After recording an event, the system goes back into listening mode to detect other variation events.

The reason behind using only one temperature measurement is that, if the system were to include temperature measurements every time step, each iteration would take longer than 1 s, making it impossible to reach the desired 1 Hz acquisition frequency. Upon testing, this did not impact the quality of the data generated, due to the thermal inertia from the panel. Significant changes in panel temperature came at much lower frequencies than 1 Hz. The variation threshold was determined through experimentation and manual analysis of the quantities of interest. Using this strategy, it was possible to acquire data surrounding such ramp events, with images and power measurements taken 10 s before and 4 s after, totaling 15 s of data points per event. In the case of temperature, only one measurement was taken per detected event due to the sampling time from the sensor. Figure 4 presents a flowchart of the decision process and data flow from the data-acquisition system (DAS) software.
