*2.4. Determination of Periodicityand Response Time of Water-Level Fluctuation* 2.4.1. Periodicity

The frequency analysis of the river stage and the riparian groundwater level was carried out using the fast Fourier transform algorithm (FFT) in MATLAB. FFT is applied to transform signals from time domain to frequency domain for quickly analyzing the frequency characteristics of stationary or nonstationary signals. FFT is an optimization algorithm of discrete Fourier transform (DFT). The DFT value *X*(*k*) can be defined as follows [39]:

$$X(k) = \sum\_{n=0}^{N-1} x(n) \mathcal{W}\_N^{nk}, \ (k = 0, \ 1, \ 2 \dots N - 1), \tag{1}$$

where *x*(*n*) is the value in the *n*-th place of a sampled timeseries, *N* is the length of the series, *WN* is the rotation factor equal to *exp*(−*j*2*π*/*N*), and *j* is the imaginary unit, *j* <sup>2</sup> = −1.

Through the DFT mentioned above, spectrum values can be calculated, and the spectrum sequence can be obtained. In order to optimize the calculation efficiency, a sampled timeseries with the length of *N* is usually divided into two subsequences with the length of *N*/2 according to the symmetry and periodicity of *WN*. As a result, a pair of DFT units can reduce the computation amount from *N*<sup>2</sup> to *Nlog*2*N*, which is the reason why FFT is performed quickly. After the FFT calculation, the spectrum diagram can be plotted with signal frequency as the horizontal axis and amplitude *X*(*k*) as the vertical axis. The dominant oscillation frequency of the river stage or the groundwater level corresponded to the maximum spectrum value in the diagram; accordingly, the dominant period could be determined.
