The Generation of Synthetic Sequences of Monthly Culumative Rainfalls using FFT and Least Squares Method


Ahmad Zakaria

Department of Civil Engineering, Lampung University, Indonesia



Commonly rainfall models are used by engineers and hydrologists for the civil engineering planning, infrastructure planning, determination of drainage coefficients for catchments area and determination of maximum discharge. The objective of this research is to generate the synthetic sequences of rainfall using Fourier transform and least squares method. The rainfall time series is assumed representing as an accumulation of trend, periodic and stochastic as its components. In this analysis, The Fast Fourier Transform (FFT) is used generate spectrum of rainfall time series. From the spectrum, frequency components of the periodicity of the rainfall involved trend, periodic and stochastic components are derived. The rainfall time series involved trend, periodic and stochastic is assumed as Fourier series. The least squares method is used to predict the components of the rainfall time series. The calculated results of synthetic sequences of the rainfall using Tukey-Coley and Matlab periodograms are compared with observed rainfall time series. The calculated rainfall time series results present the good agreement if compared with observed rainfall time series results.
keyword : Rainfall, Fast Fourier Transform, Least Squares.

Commonly rainfall models are used by engineers and hydrologists for the civil engineering planning, infrastructure planning, determination of drainage coefficients for catchments area and determination of maximum discharge. The model is required to give detailed information of the rainfall with respect to the time. To provide long sequence records of rainfall data was very difficult, so sometimes, it is necessary to extent the rainfall record by generating the available record. many methods have been used by engineers and scientists to provide this information. Most of them are either deterministic or probabilistic, Kotegoda, 1980 and Yevjevich, 1972. The former methods do not consider the random effects of various input parameters; the later methods employ the concept of probability to the extent. With the increasing demand for accuracy of analyzing rainfall data, these method are no longer sufficient. The rainfalls are periodic and stochastic in nature because they are affected by climatologically parameters, i.e., variations of periodic and stochastic climates are transferred become periodic and stochastic components of rainfalls should be computed considering both the determined part of the process. Considering all other factors known or assumed the rainfall is a function of the stochastic variation of the climate, Yevjevich, 1972. Stochastic analysis of rainfall time series should provide a mathematical model that will account for the deterministic and stochastic parts and will also reflects the variations of the rainfalls. Bakar et. al. (2006) using periodic and stochastic analysis to model monthly rainfall at Kota Region. Based on earlier work of Vanicek (1976), Lomb (1976) develop a technique to fitting a model by using normalized periodogram. Aim of the research is to comparing generation of the sequences of rainfalls from Air Itam rainfall station in Lampung Region using Fast Fourier Transform coded by Coley (1965) and Matlab codes, and Least Squares Methods.

General mathematical model used to describe the rainfall time series is as follows (Bhakar, 2006),

$X_t = T_t + P_t + S_t$

Where $T_t$ = the trend component at time $t$, $t$=1,2,3,...$N$, $P_t$ = periodic component, $S_t$ = the stochastic components which having dependent and independent parts, and N= the number of data points.

2.1. Trend Component
Trend components ($T_t$) of rainfalls usually are identified by using the seasonal rainfall values. For this study assumed the rainfalls data is free of trend.

2.2. Stochastic Component
The stochastic components of rainfalls was assumed that the value of $S_t$ at time was the combined effects of the weighted sum of the past values so that the dependent part $S_t$ of may be represented as,
$S_t = \left[ \sum_{k=1}^{k=\infty} \phi_{p,k} S_{t-k} a_k \right]$

Where, $\phi_{p,k}$ is the autoregressive parameter, $p$= the order of the model; $k$= the number of parameter, $k$=1,2,3,...$p$. The model represented above is known as autoregressive model of order p.

2.3. Periodic Component
The periodic components $\eta (P_t)$ can be expressed in the form of Fourier series as presented in Kreyszig (1993) as follows,
$\displaystyle{ \hat{\eta} (t_n) = A_o + \sum_{k=1}^{k=M} \Big[ A_k Cos \big(\omega_k t \big) + B_k Sin \big( \omega_k t \big) \Big] }$
Where, $k$ is the number of harmonics, 1< $k$ < $M$; $M$ is the maximum number of significant harmonics. For determining number of significant harmonic components, frequencies, amplitudes, and phases, Least squares method were applied (Zakaria, 1998).

2.4. Least Squares methods
Least Squares method is a method commonly used to fitting a curve or a series of synthetic signals to the data. The coefficient of correlation R is used to see the goodness of fit.
$\mu = {\Bigg( \sum_{t_n = 1}^{t_n = n} \Big( \eta(t_n) - \hat{\eta}(t_n) \Big) \Bigg)}^2 = minimum$
$ \displaystyle{\frac{\partial \mu}{\partial A_o} ;\frac{\partial \mu}{\partial A_k}; \frac{\partial \mu}{\partial B_k}} $

2.5. Fast Fourier Transformation (FFT)
The analysis method is firstly developed by Coley (1965) to extract spectrum or frequencies from time series data. For the time series data $\eta(t_n)$ the frequencies can be calculated by using Fourier transformation method as follows,
$\displaystyle{\eta(\omega_m) = \frac{\Delta t}{2 \sqrt {\pi}} \sum_{n=-N/2}^{n=N/2} \eta(t_n) . e^{\frac{-2.\pi.i}{M}.m.n }}$
Commonly, using this equation need much more time, So Coley (1965) develop algorithm to calculate spectrum from time series data, consuming very least time.

For generating the synthetic monthly rainfall series, 350 months data from was taken. From the analysis is estimated that no trend in rainfall time series, so the analysis only to confirm the presence of periodic components. From Figure 1 is presented periodograms of monthly cumulative rainfalls using Coley-Tukey and Matlab Algorithms. This result shows that the differences of amplitudes aren’t too significant.

Figure 1: Periodograms of monthly cumulative rainfalls using the Coley-Tukey and Matlab codes

Figure 2: Monthly cumulative rainfalls of 125 frequency constituents ($R^2$=0.7844).

Figure 3: Monthly cumulative rainfalls using Coley code of 100 frequencies ($R^2$=0.7260).

Figure 4: Monthly cumulative rainfalls using Coley code of 50 frequencies ($R^2$=0.6460).

Figure 5: Monthly cumulative rainfalls using the matlab code of 50 frequencies ($R^2$=0.6796).

From the above Figures (Figure 2, 3, 4, and 5) presented that using 125 frequencies generate better coefficient of correlation if it is compared than using 100 frequencies. And using 100 frequencies generate better coefficient of correlation compared using than using 50 frequencies. In Figure 4 and 5 show that for the same number of frequencies, simulating use Coley and matlab codes are resulting coefficient of correlation, 0.6460 and 0.6796. Using matlab code ($R^2$= 0.6796) is better than Coley code ($R^2$= 0.6460).


The calculated rainfall time series results present the good agreement if compared with observed rainfall time series results. For simulating a series of synthetic rainfalls, using matlab code produced more accurate frequencies than using Coley code.


Yevjevich, V., 1972, Structural analysis of hydrologic time series, Colorado State University, Fort Collins.
Kottegoda N.T., 1980, Stochastic Water Resource Technology, Mac Milan, Hongkong.
Kreyszig, E., 1993, Advanced Engineering Mathematics, John Wiley & Sons, Inc. Singapore.
Zakaria, A., 1998, Preliminary of tidal prediction using Least Squares Method, Thesis (Master), Bandung Institute of Technology, Bandung, Indonesia.
Cooley, James W. Tukey, John W. 1965. An Algorithm for the machine calculation of Complex Fourier Series. Mathematics of Computation. pp. 199-215.
Bhakar, S.R., Singh, Raj Vir, Chhajed, Neeraj, and Bansal, Anil Kumar, 2006, Stochstic modeling of monthly rainfall at kota region, ARPN Journal of Engineering and Applied Sciences, Vol.1, No.3, pp. 36-44.
Pytharouli, Stella, Kontogianni, Villy, Psimoulis, Panos, and Stiros, Stathis, 2004, Spectral Analysis Technoques in Deformation Analysis Studies, INGEO 2004 and FIG Regional Central and Eastern European Conference on Engineering Survey.
Box, G.E. P and G. Jenkins, 1976, Time Series Analysis: Forecasting and Control, Prentice Hall.
Lomb N. R. (1976), Least Squares Analysis of Unequally Space Data, Astrophysics and Space Sciences, Vol 39, pp.447-419.
Vanicek P., (1969), Approximate Spectral Analysis by Least Squares Fit, Astrophysics and Space Science, Vol. 4, pp. 387-391.