A model involving meteorological factors for short-to-medium term water level prediction of small- and medium-sized urban rivers

With the increasing of extreme weathers, cities, especially the small- and medium-sized urban rivers with the protection areas less than 200 square hectares, are experiencing significantly more flood disasters worldwide. Heavy snowfalls and rainfalls can rapidly overflow these rivers and cause floods due to the their unique geographic locations and fast runoff and confluence. Therefore, it is particularly important to accurately predict the short-to-medium term water levels of such rivers for reducing and avoiding urban floods. In the present work, a particle swarm optimization (PSO)-support vector machine (SVM) water level predication model was constructed by combining PSO and SVM and trained with the meteorological data of Wuhan, China, and the water level data of Yangtze River. The PSO-SVM model is able to lower mean square error (MSE) 70.47% and increase coefficient of determination ( R 2 ) 7.02% of the prediction results, as compared with SVM model alone. The highly accurate PSO-SVM model can be used to predict river water level real-time using the hourly weather and water level data, which thereby provides quantitative data support for urban flood control, construction management of water projects, improving response efficiency and reducing safety risks. and a higher coefficient of determination close to 1. The R 2 of PSO-SVM prediction results of the training and test datasets are respectively 3.5% and 7.02% higher than those of SVM predictions. The high prediction accuracy of PSO-SVM model suggests that it is suitable for the short-to-medium term water level prediction. The constructed model is successfully applied to the short-to-medium term water level prediction of a typical small- and medium-sized urban river. The model prediction can provide a scientific and accurate basis for the construction management of waterborne municipal projects and urban regional flood prevention. Future forecasts can be combined with hourly meteorological and water level data to achieve real-time prediction, improve water level prediction efficiency, and avoid the occurrence of flood


Introduction 1
Small-and medium-sized rivers in urban span multiple administrative areas and possess unique 2 characteristics of shallow riverbed, small cross-section, limited and incomplete hydrological information, 3 and connections with large areas of impervious layers of cities (Zhang et al. 2016), which makes them 4 vulnerable to extreme weathers. Local heavy snowfalls and rainstorms can seriously impact the urban 5 areas around a river if its flood discharge capacity is poor (Rao et al. 2019). In 2019, extreme weathers 6 in the cities of India, China, the United States, Japan, and Europe caused the floods and other disasters 7 of over 25 billion U.S. dollars damages. The United Nations has called for preventing extreme weather 8 from threatening human life. Therefore, the short-to-medium term water level prediction of small and 9 medium-sized urban rivers based on meteorological data are significantly important.

11
Water level prediction has been extensively studied worldwide, especially for large rivers due to 12 availability of large amounts of hydrologic monitoring data. Efficient water level prediction models can 13 be constructed using various mathematical models based on the historical water level data of such rivers  The studies of tributaries are less systematic and there are fewer hydrological and weather data   44 for the tributary streams, as compared with mainstreams. Therefore, it is difficult to obtain accurate and 45 comprehensive information for the quantitative analysis. In view of this, we have constructed a PSO and 46 SVM algorithms based model for the short-to-medium term water level prediction of small-and medium-47 sized rivers in complex urban areas using meteorological data and water level of mainstream as the 48 variables, aiming to explore the water level predictions of small-and medium-sized urban rivers in 49 complex environments.

2 Influencing factors 51
Compared with large mainstream rivers, small-and medium-sized urban rivers are more sensitive to 52 short-and medium-term weather changes because of their small catchment area (Simon et al. 2018).

53
Their water changes are every random due to the complex surrounding environments, which makes their 54 water level prediction very challenging.  shown no obvious nonlinear effect on the tributary water level, and thus is excluded from the model.

69
The final selected influencing variables are listed in Table 1

3 Prediction model theory 79
The water level change with the influencing variables X1, X2, X3, and X4 is a highly uncertain nonlinear 80 dynamic process in complex environments . Therefore, a suitable mathematical model is extremely

94
The particle swarm algorithm used for parameter optimization treats each individual as an particle in an 95 n-dimensional search space, and each particle flies in this space at a certain speed (Selakov et al. 2014; 96 Shrivastava et al. 2015). The position of each particle is a potential solution. The fitness is obtained from 97 the objective function. The SVM model based on particle swarm algorithm updates its position and 98 velocity according to the best position of the particle swarm and the best position of each particle, and 99 gradually approaching the best position. The speed update and position update can be described as Eq. 1. Meteorological supply (X4) where v is the particle velocity,  is the inertia weight, 1 c and 2 c are the acceleration factors, best g is the 102 optimal position of each particle, K is the number of iterations, i is the population size, X is the particle 103 position, and 1 r and 2 r are the random numbers from [0,1]. The iteration is stopped as the preset maximum 104 number of iterations is reached or the position obtained by PSO is higher than the preset minimum 105 adaptive threshold.

114
where  is the generalized parameter of the function.

116
The regression function is optimized with the ε-insensitive loss function, and the best function is 117 determined with the minimum value of the function as shown in Eq. 3 and 4.

120
where i  and * i  are the relaxation factors used to smooth the trend curve of the function and solve the 121 calculation error of the regression, C is a constant introducted to compromise the balance, and ε is a 122 constant for the error analysis.

123
The nonlinear regression function can be obtained by quadratic programming as Eq. 5.

4 PSO-SVM modeling for water level prediction 127
SVM can perform regression analysis alone, but its accuracy is significantly affected by the selection of 128 its kernel function parameters for water level prediction. The cross-validation of kernel function itself 129 usually falls into a local optimal solution, and thus cannot provide the global the optimal solution, causing 130 low prediction accuracy of SVM. Herein, the parameters of SVM are iteratively optimized using particle 131 swarm algorithm to build a desired model for the short-to-medium term water level prediction of small-132 and medium-sized urban rivers. Fig. 2 shows the flowchart of the PSO-SVM modeling process.

133
Initialize the ethnic group Compare the fitness value of each particle with Pbes, if it is excellent, it is the individual extreme value Calculate fitness value for each particle Compare the individual extreme value of each particle with Gbest, if it is optimal, it is the group extreme value

135
The modeling process comprises the following steps:

136
Step1 Data acquisition and processing

137
The data of the factors that affect the water level can be classified as structured data and unstructured 138 data. The mainstream water level (X1), the upstream water level difference (X2), and the historical water

148
The accuracy and performance of SVM model are mainly affected by its penalty factor c and kernel 149 parameter g , and thus those two parametersare optimized using partice swarm algorithm. 150 Step3 Model training

151
According to the fitting principle of parameter optimization by PSO, the SVM model is trained with the 152 parameter optimization results obtained by PSO in step 2 and the normalized data of step 1. The optimal 153 fitting function is obtained as Eq. 8.

154
where i a and Water Resources Bureau of Hubei Province that records data once every hour. The data of 8 am each day 181 that accurately match the meteorological data are selected and listed in Table 3. Step2 Meteorological data processing

184
The meteorological data are preprocessed by the method mentioned above. Based on the historical 185 rainfall distribution of Wuhan city, the data of July and August when the precipitation is relatively The PSO-SVM fitness curve suggests that the prediction value becomes almost stable in ~70 iterations.

267
The relative error between the PSO-SVM prediction value and true value of the training dataset is much 268 lower than that of SVM, indicating that the accuracy of PSO-SVM model is higher. The conclusion is 269 further supported by the MSE and coefficient of determination of the predictions result as listed Table 4.

270
It is clear that PSO-SVM model can predict the water level of small and medium-sized tributaries more 271 accurately and reliably than SVM model, and thus is more suitable for the water level prediction of this 272 type of rivers.

282
Meteorological data, water level of adjacent water system, the difference between the water levels of two

287
The comparison of the PSO-SVM and SVM prediction suggests that the former can give smaller MSE

292
The constructed model is successfully applied to the short-to-medium term water level prediction of a 293 typical small-and medium-sized urban river. The model prediction can provide a scientific and accurate 294 basis for the construction management of waterborne municipal projects and urban regional flood 295 prevention. Future forecasts can be combined with hourly meteorological and water level data to achieve 296 real-time prediction, improve water level prediction efficiency, and avoid the occurrence of flood 297 disasters.

299
Declarations 300 301 adaptive filter and improved whale optimization algorithm Engineering Applications of 365 Artificial Intelligence 87:103323