## 3 Data-Driven Adaptive Sampling Algorithm
Hence, the trend of the DO parameter is given intuitively. In Figure 2b-d, the simulation results with different threshold values are presented. It is seen that as the predetermined threshold increases, fewer sample data are acquired based on the DDASA. Combined with the linear interpolation fitting, the trend of the DO content can still be maintained at a high level of similarity compared to the original DO signal when \(t=0.01\), \(t=0.015\) and \(t=0.02\), respectively. To provide a more intuitive understanding when adopting different sampling intervals, the difference among the sampled DO data is shown in Figure 3 correspondingly, which is the outcome of a combination of Figure 1(a)-d.

Figure 3: The difference among DO data for different sampling intervals. Figure 2: (a) Original dissolved oxygen (DO) Data; (b) Sampled DO data with \(t=0.01\); (c) Sampled DO data with \(t=0.015\); (d) Sampled DO data with \(t=0.02\). The frequency trend for each corresponding threshold is also shown in Figure 4. It is believed that when the threshold is set to a proper number, (i.e., \(t=0.01\)), the sampling frequency will eventually converge or remain at a stable level. However, it is also found out that when the threshold is set to a value smaller than 0.01, for instance, when \(t=0.009\), the frequency trend will not converge. This happens mainly because the value of \(D(i)\) in most iterations is greater than the threshold, which results in a constant increase in the sampling frequency. This also means the dynamically changed sampling frequency is not sensitive to the data change, which in fact is not a desired outcome. Additionally, when \(t=0.015\) and \(t=0.02\), compared to the case when \(t=0.01\), the sampling frequency is more sensitive to the data change, and as a consequence, more energy will be conserved since the sampling frequency in each iteration is lower than the initial sampling frequency. In Table 1, an investigation of the algorithm performance and the predetermined threshold values is given. It is noticed that although the value of the predetermined threshold increases evenly, the number of samples drops unevenly, however, the NME increases as the number of samples decreases. In Figure 5, it is obvious that some important peaks are missing due to a lack of sampled data where the threshold equals to 0.03 and 0.07, respectively. The corresponding NME are 9.99% and 11.70%, which is relatively high. Thus, in order to find a suitable value for the threshold, it would be necessary to preset a minimum required data quality in terms of NME and, meanwhile, the threshold value should not be too small, which ensures that the sampling frequency will eventually converge. More details regarding the choice of threshold value will be discussed later. \begin{table}
\begin{tabular}{c c c c c c} \hline \hline  & \(t=0.01\) & \(t=0.015\) & \(t=0.02\) & \(t=0.03\) & \(t=0.07\) \\ \hline Number of Samples & 1064 & 548 & 421 & 297 & 146 \\ Normalized Mean Error (NME) & 1.62\% & 5.52\% & 8.43\% & 9.99\% & 11.70\% \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Results with different threshold values for DO data sampling. Figure 4: Frequency trend with \(t=0.009\), \(t=0.01\), \(t=0.015\)and \(t=0.02\), respectively. A similar simulation is conducted based on turbidity data. The results are presented in Figure 6 with threshold values of 0.110, 0.112 and 0.115. A comprehensive comparison is found in Table 2. The same linear interpolation scheme is implemented between two neighboring measurements to fit the plot. Figure 5: (**a**) Sampled DO data with \(t=0.03\) and \(t=0.07\); (**b**) Frequency trend with \(t=0.03\) and \(t=0.07\). Figure 6: (**a**) Original Turbidity data; (**b**) Sampled Turbidity data with \(t=0.110\); (**c**) Sampled Turbidity data with \(t=0.112\); (**d**) Sampled Turbidity data with \(t=0.115\). It still can be shown that when the threshold value increases from 0.110 to 0.112, the number of samples drastically drops from 1591 to 422, while a 4.26% NME is still tolerable when t equals 0.112.