# Low-Cost _Ka_-Band Satellite Receiver Data Preprocessing for Tropospheric Propagation Studies
## 2 Materials and Methods
### Extraction of the Daily Template  
As mentioned in Section 1, given the characteristics of our measurement system, to estimate the excess attenuation, we subjected the time series of the acquired beacon level to a filtering process consisting of subtracting a template from the time series. The procedure implemented for extracting the template was based on the data processing methodology described in [33], which is similar to those found in [20; 22; 34].  
Figure 1: Example of KaSAT beacon power level and received noise level for a day with three rain events: 24 April 2021. The identified rain events are also illustrated. Note the increase in noise temperature when it rains together with a drop in the received beacon power.  
Roughly, the procedure to compute a daily template consisted of the following steps:  
1. Three days of data selection: time synchronized beacon and meteorological data of the previous, current, and next days;
2. Outlier detection based on the standard deviation of the mean value of the raw data: These mean values were computed using a 2 min moving average filter. When the difference between the beacon level and its moving average is larger than the standard deviation multiplied by a coverage factor, then the sample is recognized as an outlier and flagged as invalid data. In this work, a coverage factor of 5 was used;
3. Detection of abnormal amplitude changes (exceeding a defined threshold) from one sample to another: In this study, the samples exceeding a threshold of 1 were considered as spikes and flagged as invalid data;
4. Identification of rainy periods: Data corresponding to rain events are flagged as invalid data;
5. A repair operation: Missing and invalid data are replaced by linear interpolation from the valid data;
6. After having inspected and repaired the selected data, template extraction itself is performed. To identify the template, we performed a low-pass filter processing that should be able to follow the fairly slow changes in water vapor in the atmosphere, with time constants of hours, and the presence of clouds, with time constants faster, but still slower than rain. In addition, we had to follow both the combined effect of receive antenna mispointing plus satellite orbit perturbation and the LNB gain oscillations due to the thermal variations, which clearly have a full one-day duration. The template was computed with an FFT by considering only those components whose period was longer than 8 min. Several tests were carried out, and this seemed to be the optimum value in our case.  
To take an example, Figure 3 shows the raw received beacon level (our row data) during a rainy day (28 August 2018). In Figure 3, the daily pattern is visible in the second half of the plot. The difficulty arises during the rain episode in the early hours. During the rainy period, the extraction of the template from raw data was not possible, and rainy data were replaced (Steps 4 and 5 of the template extraction procedure).  
As in Figures 1 and 2, the signal levels in Figure 3 do not correspond to actual power values in dBm. It is only after the template has been identified and subtracted from the raw data that the obtained levels have any meaning: they are now relative levels with respect to the set reference level. The resulting time series is the excess attenuation. Finally,  
Figure 2: Example of the raw beacon level for the whole of August 2018. A mainly dry month is depicted except for a few rain events. Note the daily signal oscillations, mostly caused by changes in the outdoor unit’s gain (thermal effects) and, to a lesser degree, to satellite orbit variations.  
to separate \(A_{r}\) from \(A_{s}\) in the excess attenuation, we applied a squared-cosine window low-pass filter with a duration of 28.76 s. Figure 4 shows the excess attenuation and \(A_{r}\) for 28 August 2018.