Particle Swarm Optimization for Calibrating and Optimizing Xinanjiang Model Parameters

The Xinanjiang model, a conceptual hydrological model is well known and widely used in China since 1970s. Therefore, most of the parameters in Xinanjiang model have been calibrated and pre-set according to different climate, dryness, wetness, humidity, topography for various catchment areas in China. However, Xinanjiang model is not applied in Malaysia yet and the optimal parameters are not known. The calibration of Xinanjiang model parameters through trial and error method required much time and effort to obtain better results. Therefore, Particle Swarm Optimization (PSO) is adopted to calibrate Xinanjiang model parameters automatically. In this paper, PSO algorithm is used to find the best set of parameters for both daily and hourly models. The selected study area is Bedup Basin, located at Samarahan Division, Sarawak, Malaysia. For daily model, input data used for model calibration was daily rainfall data Year 2001, and validated with data Year 1990, 1992, 2000, 2002 and 2003. A single storm event dated 9th to 12thOctober 2003 was used to calibrate hourly model and validated with 12 different storm events. The accuracy of the simulation results are measured using Coefficient of Correlation (R) and Nash-Sutcliffe Coefficient (E2). Results show that PSO is able to optimize the 12 parameters of Xinanjiang model accurately. For daily model, the best R and E2 for model calibration are found to be 0.775 and 0.715 respectively, and average R=0.622 and E2=0.579 for validation set. Meanwhile, R=0.859 and E2=0.892 are yielded when calibrating hourly model, and the average R and E2 obtained are 0.705 and 0.647 respectively for validation set.


INTRODUCTION
Over the past half century, numerous hydrological models have been developed and applied extensively around the world.With the advent of digital computers in early 1960s, hydrologists began to develop sophisticated conceptual and physically hydrological models that are able to keep track of water movement using physical laws.One of the conceptual rainfall-runoff models developed is Xinanjiang model (Zhao et al., 1980).Xinanjiang model has been successfully used in humid, semi-humid and even in dry areas mainly in China for flood forecasting since its initial development in the 1970s.
The main advantage and merit of Xinanjiang model is it can account for the spatial distribution of soil moisture storage (Liu et al., 2009).Generally, these spatial variations of hydrological variables are difficult to be considered (Chen et al., 2007).In recent decades, the distributed hydrological models have been increasingly applied to account for spatial variability of hydrological processes, to support impact assessment studies, and to develop rainfall-runoff simulations owing to their capability of explicit spatial representation of hydrological components and variables (Liu et al., 2009).
In fact, no single model is perfect and best for solving all problems (Duet al., 2007;Das et al., 2008).The model performance can vary depending on model structure (distributed or lumped), physiographic characteristics of the basin, data available (resolution/accuracy/quantity), and also on how the relevant parameters are defined.Generally, Xinanjiang model consists of large number of parameters that cannot be directly obtained from measurable quantities of catchment characteristics, but only through model calibration.The aim of model calibration is to find the best set parameters values so that the model will be able to simulate the hydrological behavior of the catchment as closely as possible.
In fact, no single model is perfect and best for solving all problems (Duet al., 2007;Das et al., 2008).The model performance can vary depending on model structure (distributed or lumped), physiographic characteristics of the basin, data available (resolution/accuracy/quantity), and also on how the relevant parameters are defined.
Generally, Xinanjiang model consists of large number of parameters that cannot be directly obtained from measurable quantities of catchment characteristics, but only through model calibration.The aim of model calibration is to find the best set parameters values so that the model will be able to simulate the hydrological behavior of the catchment as closely as possible.
In early days, the model calibration was performed manually, which is tedious and time consuming due to the subjectivities involved.Besides, Xianjiang model is never applied in Malaysia, and the pioneer modeler is not confident to determine the best parameters values for using Xinanjiang model in Malaysia.Therefore, it is necessary and useful to develop the computer based automatic calibration procedure.Some of the automatic optimization methods that have calibrated Xinanjiang model are genetic algorithm (Cheng et al., 2006), shuffled complex evolution (SCE) algorithm (Duan et al., 1992(Duan et al., , 1994) and simulated annealing (Sumner et al., 1997).www.ijacsa.thesai.orgAmong the Global Optimization Methods, Kuok (2010) found that Particle Swarm Optimization method (PSO) is more reliable and promising to provide the best fit between the observed and simulated runoff.
Xinanjiang model in Malaysia.Therefore, it is necessary and useful to develop the computer based automatic calibration procedure.Some of the automatic optimization methods that have calibrated Xinanjiang model are genetic algorithm (Cheng et al., 2006), shuffled complex evolution (SCE) algorithm (Duan et al., 1992(Duan et al., , 1994) and simulated annealing (Sumner et al., 1997).Among the Global Optimization Methods, Kuok (2010) found that Particle Swarm Optimization method (PSO) is more reliable and promising to provide the best fit between the observed and simulated runoff.
Even though PSO is simple in concept and easy to implement, the convergence speed is high and it is able to compute efficiently.Besides, PSO is also flexible and built with well-balanced mechanism for enhancing and adapting global and local exploration abilities (Abido, 2007).Thus, PSO is proposed to auto-calibrate Xinanjiang model in this paper.
Till to date, the application of PSO method in hydrology is still rare.Alexandre and Darrel (2006) applied multi-objective particle swarm optimization (MOPSO) algorithm for finding non-dominated (Pareto) solutions when minimizing deviations from outflow water quality targets.Bong and Bryan (2006) used PSO to optimize the preliminary selection, sizing and placement of hydraulic devices in a pipeline system in order to control its transient response.Janga and Nagesh (2007) used multi-objective particle swarm optimization (MOPSO) approach to generate Pareto-optimal solutions for reservoir operation problems.Kuok (2010) also adapted PSO to autocalibrate the Tank model parameters.

II. STUDY AREA
The selected study area is Bedup basin, located approximately 80km from Kuching City, Sarawak, Malaysia.The catchment area of Bedup basin is approximately 47.5km 2 , which is mainly covered with shrubs, low plant and forest.The elevation are varies from 8m to 686m above mean sea level (JUPEM, 1975).The historical record shows that there is no significant land used change over the past 30 years.Bedup River is approximately 10km in length.Bedup basin is mostly covered with clayey soils.Thus, most of the precipitation fails to infiltrate, runs over the soil surface and produces surface runoff.Part of Bedup basin is covered with coarse loamy soil, thus producing moderately low runoff potential.
Bedup River is located at upper stream of Batang Sadong.It is not influence by tidal and the rating curve equation for Bedup basin is represented by Equation 1 (DID, 2007). 1.9  (1) Where Q is the discharge (m 3 /s) and H is the stage height (m).These observed runoff data were used to compare the model runoff.Daily and hourly areal rainfall data obtained through Thiessen Polygon Analysis are fed into Xinanjiang model for model calibration and validation.The area weighted precipitation for BM, SN, SB, SM, ST are found to be 0.17, 0.16, 0.17, 0.18 and 0.32 respectively.Thereafter, the calibrated Xinanjiang model will carry out computation to simulate the daily and hourly discharge at Bedup outlet.

III. XINANJIANG MODEL ALGORITHMS
Xinanjiang model was first developed in 1973 and published in English in 1980 (Zhao et al., 1980).It is a lumped hydrological model that required stream discharge and meteorological data.
The basic concept of Xinanjiang model is runoff only generated at a point when the infiltration reached the soil moisture capacity (Zhao, 1983(Zhao, , 1992)).A parabolic curve of FC (refer Fig. 2) is used to represent the spatial distribution of the soil moisture storage capacity over the basin (Zhao et al., 1980): where is the FC at a point that varies from zero to the maximum of the whole watershed WMM.Larger means larger soil moisture storage capacity in a local area and more difficult runoff generation.
Parameter b represents the spatial heterogeneity of FC (Zhao, 1983(Zhao, , 1992)).For uniform distribution, b always equal to zero.In contrast, large b represents significant spatial variation.The b parameter is usually determined by model calibration.

Fig.2 presents versus
curve.The watershed average FC (WM), is the integral of ( ) between =0 and =WMM, as represented by Equation 3.
(3) Meanwhile, the watershed average soil moisture storage at time t ( , is the integral of ( ) between zero and , which is a critical FC at time t as presented in Equation 4and Fig. 2: ) www.ijacsa.thesai.orgThe critical FC ( ) corresponding to watershed average soil moisture storage (W t ) is presented in Equation 5.
Fig. 2: FC curve of soil moisture and rainfall-runoff relationship.Note: WMM is maximum FC in a watershed; f/F is a fraction of the watershed area in excess of FC; is FC at a point in the watershed; Rt is runoff yield at time t; ∆Wt is soil moisture storage deficit at time t and is equal to WM-Wt ; Wt is watershed-average soil moisture storage at time t When rainfall (P t ) exceeds evapotranspiration (E t ), P t is infiltrated into soil reservoir.Runoff (R t ) will only be produced when the soil reservoir is saturated (soil moisture reaches FC).As shown in Fig. 2, if the net rainfall amount (rainfall minus actual evapotranspiration) in a time interval [t -1, t] is Pt-Et and initial watershed average soil moisture (tension water) is Wt, the runoff yield in the time interval Rt can be calculated as follows: The original Xinanjiang model is divided into two components named as runoff generating component and runoff routing component.Basin is divided into series of sub-areas, and runoff is calculated from water balance component.The runoff from each sub-area is routed to the main basin outlet using Muskingum method.However, runoff generating and runoff routing components are combined together in this study as shown in Fig. 3.There are 12 parameters to be calibrated include S, Dt, K, C, B, Im, Sm, Ex, Ki, Kg, Ci and Cg.The model parameters are listed in Table 1.During the calibration, the parameter must satisfy the constraints of the Muskingum method for each channel of sub-basin.

N Sadong Basin
Bedup Basin www.ijacsa.thesai.orgPSO algorithm was developed by Kennedy and Eberhart (1995).It is a simple group-based stochastic optimization technique, initialized with a group of random particles (solutions) that were assigned with random positions and velocities.The algorithm searches for optima through a series of iterations where the particles are flown through the hyperspace searching for potential solutions.These particles learn over time in response to their own experience and the experience of the other particles in their group (Ferguson, 2004).Each particle keeps track of its best fitness position in hyperspace that has achieved so far (Eberhart and Shi, 2001).For each iteration, every particle is accelerated towards its own personal best, in the direction of global best position and the fitness value for each particle's is evaluated.This is achieved by calculating a new velocity term for each particle based on the distance from its personal best, as well as its distance from the global best position.
Once the best value the particle has achieved, the particle stores the location of that value as "pbest" (particle best).The location of the best fitness value achieved by any particle during any iteration is stored as "gbest" (global best).The basic PSO procedure was shown in Fig. 4.
The particle velocity is calculated using Equation6.

V. MODEL CALIBRATION AND VALIDATION
The basic calibration procedure for Xinanjiang model using PSO algorithm for both daily and hourly runoff simulation is presented in Fig. 5.

A. Daily Model
The Xinanjiang model for Bedup basin is calibrated with daily rainfall-runoff data Year 2001.Since the model is firstly used in Malaysia, the best parameters values are not known.Therefore, all the 12 Xinanjiang model parameters (S, Dt, K, C, B, Im, Sm, Ex, Ki, Kg, Ci and Cg) either they are related to the average climate or surface conditions of the studied region, are calibrated automatically using PSO algorithm.
At the early stage of the calibration, the parameters of PSO that will affect the calibration results are pre-set.Various sets of daily rainfall-runoff data are calibrated to find the best model configuration for simulating daily runoff.The objective function used is Root Mean Square Error (RMSE).As the calibration process is going on, the initial parameters that set previously are changed to make the simulated runoff matching the observed one.The PSO parameters investigated are:  An average areal rainfall single storm event dated 9 th to 12 th October 2003 is used to calibrate and optimize Xinanjiang model parameters.Once obtained the optimal parameters, the model will be validated with 12 single storm events.The details of validation storm events are presented in Table 3.The accuracy of the simulation results are measured using Coefficient of Correlation (R) and Nash-sutcliffe coefficient (E 2 ).R and E 2 are measuring the overall differences between observed and simulated flow values.The closer R and E 2 to 1, the better the predictions are.The formulas of R and E 2 are presented in Equations8 and 9 respectively.
where obs = observed value, pred = predicted value, ̅̅̅̅̅̅ = mean observed values and ̅̅̅̅̅̅̅ = mean predicted values.

A. Daily ResulT
PSO algorithm achieved the optimal configuration at the RMSE of 2.3003 for daily model.The optimal configuration for PSO algorithm was found to be 200 number of particles, max iteration of 150 and c 1 =1.8 and c 2 =1.8.The best R and E 2 obtained for calibration set were found to be 0.775 and 0.715 respectively as presented in Fig. 6.The 12 parameters of Xinanjiang model optimized by PSO algorithm can be found in Table 4.
The results showed that runoff generated by Xinanjiang model optimized by PSO algorithm is controlled and dominant to 8 parameters named as S, B, Im, Sm, Ex, Ki, Kg and Ci.In contrast, Dt, K, C and Cg are less sensitive to storm hydrograph generation.Fig. 7 shows the validation results when the optimal configuration of Xinanjiang model optimized by PSO algorithm.As R is referred, the results obtained for Year 2000Year , 2003Year , 2002Year , 1992Year and 1990 are found to be 0.674, 0.649, 0.616, 0.616, 0.553 and 0.622 respectively.As E 2 is used as level mark, the E 2 obtained are ranging from 0.550 to 0.623.The average R and E 2 are yielding to 0.622 and 0.579 respectively.www.ijacsa.thesai.org

B. Hourly Results
For hourly runoff calibration, the optimal configuration of PSO was found to be c 1 = 0.6, c 2 = 0.6, 200 number of particles and max iteration of 150.The best R and E 2 obtained for calibration set were found to be 0.859 and 0.892 respectively (as presented in Fig. 8).RMSE obtained by optimal configuration of PSO algorithm was 2.6303.Optimal 12 parameters of Xinanjiang model obtained for hourly runoff simulation were tabulated in Table 5.The results indicated that hourly runoff produced by optimized Xinanjiang model is dominant to 9 parameters.These 9 dominant parameters are S, K, C,Im, Sm, Ex, Ki, Kg and Ci.Contrary, parameters Dt, B and Cg show less sensitive to storm hydrograph generation.As optimal configuration of Xinanjiang model validated with 12 different events, the R values obtained are ranging from 0.552 to 0.854, whilst 0.510 to 0.763 for E 2 .The average R and E 2 for validated storm events are 0.705 and 0.647 respectively.The validation results are presented in Fig. 9.

Fig. 1
Fig.1 presents the locality plan of Bedup basin.Sadong basin is located at southern region of Sarawak and Bedup
a) Different acceleration constant for gbest (c 1 ) ranging from 0.5 to 2.0 b) Different acceleration constant for pbest (c 2 ) ranging from 0.5 to 2.0 c) Max iteration of 100, 125, 150, 175 and 200 d) 100, 125, 150, 175, 200, 225, 250, 275 and 300 number of particles Input data series to the Xinanjiang model are daily average areal rainfall calculated using Thiesen Polygon method.Daily data from 1 st January 2001 to 31 st December 2001 are used for model calibration.The model is then validated with rainfallrunoff data Year 1990, 1992, 2000, 2002 and 2003.The details of data used for model validation are presented in Table2.Table 2: Daily Validation Data Validation Daily Data Set 1 1 st January 1990 to 31 st December 1990 2 1 st January 1992 to 31 st December 1992 3 1 st January 2000 to 31 st December 2000 4 1 st January 2002 to 31 st December 2002 5 1 st January 2003 to 31 st December 2003 B. Hourly Model Similarly, all 12 Xinanjiang model parameters including S, Dt, K, C, B, Im, Sm, Ex, Ki, Kg, Ci and Cg are calibrated automatically using PSO algorithm for hourly runoff simulation.The objective function used is Root Mean Square Error (RMSE).PSO algorithm parameters investigated are including: a) Different acceleration constant for gbest (c 1 ) ranging from 0.1 to 2.0 b) Different acceleration constant for pbest (c 2 ) ranging from 0.1 to 2.0 c) Max iteration of 100, 125, 150, 175 and 200 d) 100, 125, 150, 175, 200, 225, 250, 275 and 300 number of particles www.ijacsa.thesai.org

Fig. 6 :
Fig. 6: Comparison between observed and simulated runoff generated by daily Xinanjiang model optimized with PSO algorithm.

Figure 7 :
Figure 7: Daily model validation results

Fig. 8 :
Fig. 8: Comparison between observed and simulated hourly runoff generated by Xinanjiang model optimized with PSO algorithm.

Table 1 :
Parameters for Xinanjiang Model

Table 3 :
Hourly Validation Data

Table 4 :
Optimized parameters for daily model

Table 5 :
Optimized parameters for hourly model