## 3 Data-Driven Adaptive Sampling Algorithm
Sample \(X_{i+1}\) based on \(f_{curr}\) (or \(f_{curr}\));
7.\(D\ =\ \frac{|X_{i+1}-X_{i}|}{\frac{N}{N}\sum_{i-N+1}X_{i}}\);
8.\(y(D)\ =\ \frac{1}{1+e^{-(D-i)}}\);
9.\(f_{new}\ =\ f_{curr}\times y(D)\);
10.\(f_{curr}\ ^{\prime}\ =\ f_{new}\);
11.\(\



overall environmental conditions throughout the time. More precisely, a faulty reading, whose value might be unusually higher or lower than the average, would not change the next sampling frequency drastically. Instead, if an abrupt change is detected, which constantly leads certain reading numerically increase or decrease, the future sampling frequency will therefore increase gradually based on a consecutive set of obtained data. In equivalent words, a much higher sampling frequency is the consequence of using \(f_{curr}\) to multiply \(y(D)\) (greater than 1 but lower than 2) in each iteration for multiple times after comparing the latest acquired data with a set of past-period data. As a result, this data-driven scheme allows the energy to be reasonably either consumed or conserved, as it is the trend of the sensed data rather than certain unusually high or low value data that decides future sampling frequency. ## 4 Illustrative Simulation

The performance of the proposed algorithm is assessed by using a set of real-time data provided by National Oceanic and Atmospheric Administration (NOAA) [25]. NOAA uses distributive platforms (buoys) to form a network for collecting real-time water-quality data. The data chosen for the simulation are collected from a platform called \"Jamestown,\" where the monitoring duration ranges from 15 December 2016 to 15 March 2017 with a sampling interval of 1 h for a sample. To validate the robustness of the DDASA, two distinct parameters, turbidity and DO, are selected since their value range differs enormously among various water-related parameters. In order to evaluate the performance for different values of the pre-determined parameters, the term Normalized Mean Error (NME) is introduced, which indicates the overall goodness of fit and is defined as:

\[NME\ =\ \frac{1}{n}\sum_{i\,=\,1}^{n}|\hat{x}_{i}-x_{i}|\times 100\% \tag{4}\]

Here, \(\hat{x}_{i}\) denotes the normalized \(i\)th data in the reconstructed signal, \(x_{i}\) represents the normalized \(i\)th data in the original signal, and \(n\) denotes the total number of data in the reconstructed data set. In general, different parameters correspond with different numeric ranges. For example, the measured pH values typically lie in the range from 0 to 14, while the sensed value of conductivity in water can reach as high as 500 \(\mu\)S/cm. Based on NME, the overall goodness of fit can be directly indicated regardless of the numeric scale of sensed data. ## 5 Simulation Results

The simulation results are divided into two parts. First, the proposed DDASA is tested using DO and turbidity data separately, followed by the selection of a list of parameters and the corresponding performance indicator (i.e., NME). Later, with regard to energy conservation, a comparison between the proposed algorithm of the present paper and a traditional adaptive sampling is presented. The simulation results demonstrate that the DDASA algorithm is not only capable of maintaining a high level for energy-efficient sampling, but also effectively reconstructing the original signal with much less number of data. First, a plot of the original DO data signal is shown in Figure 2a for later comparison, which consists of 2182 sensed samples in total. To interpret the original signal, it can be inferred that an abrupt change in the water might occur around the 600 th sample, leading to a significant increase of the DO content. In the simulation, the initial sampling frequency is set to the same value as the constant frequency used for sampling the 2182 data. The window size (i.e., \(N\)) is set to 50, while the threshold is a variable. Then a linear interpolation between two neighboring measurements is used to fit the reconstructed signal with respect to different threshold values.