Application of the Kaiman filter to real time operation and to uncertainty analyses in hydrological modelling

Size: px
Start display at page:

Download "Application of the Kaiman filter to real time operation and to uncertainty analyses in hydrological modelling"

Transcription

1 Scientific Procedures Applied to the Planning, Design and Management of Water Resources Svstems (Proccfdines of the Hamburg Symposium, August 1983). IAHSPubl. no Application of the Kaiman filter to real time operation and to uncertainty analyses in hydrological modelling JENS CHRISTIAN REFSGAARD*, DAN ROSBJERG & LARS M. MARKUSSEN Institute of Hydrodynamics and Hydraulic Engineering, Technical University of Denmark, DK-2800 Lyngby, Denmark ABSTRACT The NAM rainfall-runoff model (a lumped, conceptual model developed in Denmark) has been reformulated in a state space form, and the Kaiman filtering algorithm has been incorporated. Uncertainties on rainfall input and on the measured discharges are taken into account, as well as the uncertainties on the most important model parameters. When the Kaiman filtering algorithm is applied as an updating procedure, the model can be used for real time operation. Further, due to the inclusion of the most important sources of uncertainty, the state space model can be used for calculation of uncertainty bands on the simulated streamflows. For instance, the effects of parameter uncertainty and rainfall uncertainty, respectively, can be evaluated and compared. The general approach and the fundamental principles of the modelling are described. Furthermore, the functioning of the updating procedure and the uncertainty analyses are illustrated by simulation results. Application du filtre de Kaiman â 1'exploitation en temps réel et aux analyses d'incertitudes dans la mise au point de modèles hydrologiques RESUME Le modèle pluie-débits NAM (modèle global conceptuel mis au point au Danemark) a été formule dans une nouvelle structure pour opérer dans l'espace et l'algorithme du filtre de Kaiman y a été incorporé. On a tenu compte des incertitudes sur les entrées: précipitations et sur les débits mesurés aussi bien que des incertitudes sur les paramètres les plus importants du modèle. Lorsque l'algorithme du filtre de Kaiman est appliqué à une opération de mise à jour, le modèle peut être utilisé pour une exploitation en temps réel. En outre grâce à la prise en compte des plus importantes sources d'incertitudes, le modèle spatial peut être utilisé pour le calcul de bandes d'incertitudes sur les débits simulés. On décrit les principes généraux de l'approche et les principes fondamentaux de la mise en Also at: Danish Hydraulic Institute, Agern Allé 5, DK-2970 Hgfrsholm, Denmark 273

2 274 Jens Christian Refsgaard et al. INTRODUCTION modèle. Puis le fonctionnement du procédé de mise à jour et les analyses d'incertitudes sont illustrés par des résultats de simulation. For many years the sciences of deterministic hydrology and stochastic hydrology have developed more or less independently. However, within the last few years the two basically different methods have more and more often been combined into a hybrid deterministic-stochastic description of the hydrological phenomena - often resulting in improved hydrological understanding and improved hydrological tools. Within the last two decades modelling of the rainfall-runoff process has been performed predominantly with purely deterministic methods, first the lumped, conceptual models (e.g. the Stanford watershed models) and later the more complicated, distributed, physically based models. In the development and application of these models the various sources of uncertainties (errors) have been discussed but have not been quantified and taken computationally into account. The state space theory and the Kalman filtering technique are powerful mathematical tools for treating various uncertainties in mathematical modelling. They are a well-proven engineering tool for linear systems. During the last decade the application of the Kalman filter within hydrology has increased considerably, especially in connection with real time operation of hydro systems. Kalman filtering combined with a traditional deterministic rainfall-runoff model has so far only been applied by a few people to perform real time updating of flood and reservoir inflow forecasts. Kitanidis & Bras (1978) together with Goldstein & Larimore (1980) have combined the Kalman filter with the Sacramento Soil Moisture model. Fjeld & Aam (1980) have combined the Kalman filter with the Swedish HBV model. In the present paper results from combining Kalman filtering with the NAM rainfall-runoff model are shown. The combined model can be used both for updating and for uncertainty analyses. The present paper is based on the studies of Jçfrgensen et al. (1982) and Markussen (1982). SOURCES OF UNCERTAINTY IN RAINFALL-RUNOFF MODELLING In rainfall-runoff modelling the following fundamentally different sources of uncertainty exist (see e.g. Fleming (1975) for a discussion): (a) error in input data to the model; (b) error in measurement of output from nature; (c) error in model structure; (d) non-optimal values of model parameters. Of these four sources only the first two are usually accounted for in Kalman filtering. In connection with the input data, error (a), usually only the main variable, namely the mean areal precipitation, is treated as uncertain, while the other climatological input variables (such as temperature and potential évapotranspiration) are

3 Kalman filter in hydrological modelling 275 not. The error in measurement of output, error (b), is the uncertainty in the observed streamflow which, like error (a), is modelled as a white noise with a given variance. Furthermore, in this study the errors (c) and (d), due to model and parameter values, are accounted for in a heuristic manner, as described in the next section. Thus by accounting for both model and data uncertainties in a quantitative way the importance of the two can be compared, and the usual modeller postulate that the main uncertainty in rainfall-runoff modelling is due to the data (and not due to the model) can be evaluated. THE MODEL NAM is a deterministic rainfall-runoff model of the lumped, conceptual type. It has been developed at the Institute of Hydrodynamics and Hydraulic Engineering (ISVA) at the Technical University of Denmark by Nielsen & Hansen (1973). NAM simulates the rainfall-runoff process in rural catchments on a daily basis. It operates by accounting continuously for the content in four different and mutually interrelated storages representing physical elements in the catchment (see Fig.l). SNOW RAIN P OVERLAND FLOW J ^ L/L* - C L2 L2 P for L/L* > C N L2 for L/L* < C te SNOW I STORAGE SURFACE STORAGE L/L* IF 1 - C, U for L/L* > C for L/L* C IDL ) _ LOWER ZONE STORAGE a ' L INTER FLOW FLOW L/L* < G = < (P. - OF} (L/L* - C..) C. < L/L* < 1 GROUNDWATER STORAGE 8ASE- FLOW E a = 1 L/L* P = G Temperature S S U ï 0 0 = 0 FIG.l The NAM rainfall-runoff model. STATE SPACE FORMULATION OF NAM MODEL In order to introduce the Kalman filter algorithm the NAM model was first reformulated in the so-called state space form. The states defining the hydrological system were taken as the

4 276 Jens Christian Refsgaard et al. seven listed in Table 1. The first three states define the soil moisture conditions, the next two states are related to the routing into streamflow, while the last two states are model parameters. The routing is described by two serially connected linear reservoirs with water contents X^ and Xg. The two model parameters K]_ and CQ-^ are the two most important parameters in determining the shape of the hydrograph. TABLE 1 The seven chosen states defining the hydrologie al system State State description Xi water content in surface storage, (U in Fig.l) Xy water content in lower zone storage, (L in Fig.l) X^ water content in groundwater storage, X» water content in routing reservoir no. 1, Xr water content in routing reservoir no. 2, l Xg time constant in routing, (K m Fig.l), Xj parameter in overland flow equation, (C QF in Fig.l). Thus by inclusion of these two parameters as states, uncertainties in model parameters, and thus in the model as a whole, can be taken into account. The NAM model has been reformulated from the form and the equations indicated in Fig.l to the state space equation X(t) =fjx.(t),pj + G(P) w(t) (1) where the elements in JF are made differentiable by a smoothing procedure. The term G(P) w(t) is the uncertainty in the model description assumed to originate both from uncertainty in the precipitation input, P, and from parameter uncertainty. w(t) is assumed to be N(0,1), i.e. white Gaussian noise with E{w(t)} = 0 and var{w(t)} = 1. As the precipitation is added to the surface storage, X-,, the uncertainty vector (} is given by G = (a p P,0,0,0,0! a Ki K 1, o^c^f (2) where a, ov,, Op are the coefficients of variation (uncertainties) p ^1 U 0F of the precipitation, of the parameter Kj and of the parameter CQF> respect ively. The river discharge y(t) is the product of the water content in routing reservoir no. 2, X 5, and the reciprocal time constant of that reservoir, IC 1. Therefore, in the measurement equation y(t) = B. X(t) + v(t) (3) B is given by II = (0,0,0,0^1,0,0) while v(t) is the measurement uncertainty v(t) ~ N(0,R). Using the methods introduced by Goldstein & Larimore (1980) the Kalman filter algorithm for forecasting and updating is found to be:

5 Forecast (at time t) Kalman filter in hydrological modelling 277 The forecast is obtained as the solution of (1) and denoted X(t + At j t) (4) The forecast of the covariance matrix P_ = E{(X - X) (X - X) } is given by i T _P(t + A) = ]ji_ P_(t j t) j; + Q_(t) (5) where ^ is a transition matrix depending on At and j[cx(t)) and Q is the covariance matrix of the state uncertainty added due to the - uncertainty of the rainfall input. This procedure is only a good approximation for small forecast lead times. However, the procedure can be repeated an arbitrary number of times until a desired lead time is attained. Update (at the measurement time, here supposed to be the time t + AtJ By utilizing the measurement y(t + At) the best estimate of the state X.(t + At 11 + At) is taken as a weighted average of the forecast and the measurement, giving more weight to the more accurate of the two _X(t + Atjt + At) = l_ - K(t + At)HJ _X(t + Atjt) + K(t + At) y(t) (6) where the weight vector K, the so called Kalman gain, is a function of P_, _H, and R. Finally, the state covariance matrix is updated _P(t + At jt + At) = P(t + At 11) - JC(t + At) _H (t + At t) (7) Now the algorithm can be repeated by denoting the estimates X.( t + At j t + At) and P(t + At 11 + At) obtained in (6) and (7) X.(t t) and _P(t t) and going to the forecast equations (4) and (5). It is seen that the above-mentioned uncertainty sources, (a) error in precipitation input, and (b ) error in streamflow measurements, have been accounted for in the traditional way. The uncertainty source, (c) non-optimal parameter values, has to some extent been included through introduction of uncertainty on CQ F and K-^. Further, because CQP and K-, are the two most important model parameters it is assumed that the errors associated with both model structure and parameter values, (c) and (d) respectively, can be lumped into one uncertainty source by somehow exaggerating the uncertainties on CQ F and K^. For more details about the theory reference is made to Jç(rgensen et al. (1982), Markussen (1982) and Goldstein & Larimore (1980). The Kalman filter is seen to work as a predictor-corrector algorithm. It should be noticed that uncertainties on the snow processes and on the temperature input are not taken into account in the present model.

6 278 Jens Christian Rersgaard et al. SIMULATION RESULTS For demonstration of the updating and forecasting techniques the model has been applied to data from the 195 km Ringsted A basin in Denmark. Further information about the basin and the corresponding model parameters is given in Miljo'styrelsen (1977). Updating and forecasting In the following examples of updating and forecasting, observed rainfall data have been used to forecast rainfall in order to focus only on the functioning of the updating procedure and the fundamental principles of the streamflow calculation. Discharge (mm day" { Recorded flow : / i :/ c 'fo i i je ;' -.: Forecasted/ updated flow Confidence limits 124 Day No. FIG.2 Streamflow simulation with daily updating. Forecasted flows and 90% confidence limits drawn together with observed values. Figure 2 shows the recorded streamflow together with the forecasted flows updated once per day in a 16 day period of Further 90% confidence limits of the forecasted flows found by use of the state covariance matrix P have been drawn on the figure. Consider for instance day 114, where A shows the just updated streamflow. In the 24-h period between A and B the uncertainty on the forecasted streamflow is seen to increase due to the adding of rainfall and parameter-uncertainty given by (1). On day 115 the new streamflow measurement is shown as C. Based on C and B the model is updated, thereafter D is the best estimate of the "true" streamflow. It is noticed how the streamflow uncertainty is significantly reduced when the updating is performed (from B to D). It is further seen how the updating changes the forecast, and that the updated discharge does not coincide with the measured one, but is a

7 Kalman filter in hydrological modelling 279 Discharge (mm day ' } 3-5 ~j - Recorded flow Simulated flow without updating Forecasted flow 90 /o confidence limits for forecasted flow t.8i 1 0 _ 0 _^ P_. j 1 1 v-^^-^ _r n Day No, FIG.3 Forecasted streamflows for a 10 day period both with and without updating. a - 60%, o K = 15%, C 0 F = 5% - weighting between the measured and the simulated discharge. In Fig.3 a streamflow forecast for a 10 day period in 1963 is shown, both without updating and with daily updating up to day no Further, 90% confidence limits for the updated forecasts are shown. It is noticed how the updating has improved the forecasts, and how the uncertainty (widths of confidence band) increases with forecast lead time. Uncertainty analyses In order to examine how the uncertainties on precipitation and model parameters influence the uncertainty of the computed streamflows, some simulations were carried out without any updating. Provided the approach described above can be taken as reasonable, although to some extent heuristic, the main problem in the uncertainty analyses turns out to be the estimation of the uncertainties a_ and Kii a CnF on d a ily mean areal precipitation and on model parameters, respectively. The uncertainties in estimating the areal precipitation in the Susa area, which includes Ringsted K, have been studied thoroughly by Allerup et al. (1981, 1982). They estimate the standard deviation errors to be 60% of the average daily precipitation. In a Canadian study of 13 storms, Damant et al. (1983) found average errors in mean areal rainfall calculation of 16 sub-catchments (from 16 to 1300 km z ) using the Thiessen method compared to weather radar data varying from 15 to 84%. Therefore the value a p = 60% has been used in the following simulations. The uncertainties of the model parameters, represented by a K and 0Q 0F, are somewhat difficult to quantify. In Milj^styrelsen (1977) the stability of the parameter values from one calibration period to another has been analysed by means of a numerical parameter optimization routine. The results from this study indicate that

8 280 Jens Christian Refsgaard et al. Discharge 3 s (mm day" ' ; Recorded flow Simulated flow 90% confidence limits on simulated values 225 \ Day No. FIG.4 Simulated streamflows with confidence limits assuming: (a) only uncertainty on precipitation input (o = 60%, o K = O, o c = O) ; (h) uncertainty on model parameters (a = O, a K = 15%, O CQF = 5%); (c) uncertainty on both precipitation input and model parameters (o = 60%, o Kl =15%, a C OF 5%).

9 Kalman filter in hydrological modelling 281 values of a K = 15% and o^ = 5% would be proper values, provided mutual independency between the parameters could have been assumed. Because the parameters are dependent, the method used in Miljo'styrelsen (1977) has resulted in an overestimation of a K and Oç. On the other hand, it is preferable to account for the uncertainty in the other parameters and the model uncertainty by using too large values of ag, and ^Crif Therefore, it was concluded that the values Og, = 15% and OQ QF = 5% would be adequate for a proper accounting of both model and parameter uncertainty in a lumped way. In Fig.4 streamflow simulations for a 165 day period in 1963 based on various uncertainty assumptions are shown. In Fig.4(a) the only uncertainty source is assumed to be the precipitation input, while in Fig.4(b) it is assumed to be the model parameters. In Fig.4(c) the simulation has been carried out assuming uncertainty input from both sources. It is noticed by comparison of Figs 4(a) and (b) that the main effect on the streamflow uncertainty comes from the uncertainty in the precipitation input. By comparison of Figs 4(a) and (c) it is further noticed that the total streamflow uncertainties are almost the same, indicating that the effect of model uncertainty is negligible when combined with the precipitation uncertainty. CONCLUSIONS It has been found that the NAM conceptual rainfall-runoff model can be satisfactorily reformulated in a state-space form and supplemented by a Kalman filter algorithm. This allows for updating runoff forecasts as well as calculating of confidence bands around simulated runoff values. Uncertainty of both input values (uncertainty in measured daily rainfall) and of selected model parameters is hereby taken into account. As a main result of the uncertainty analyses it is found that the input uncertainty is significantly predominant for the resulting uncertainty of simulated runoff values. REFERENCES Allerup, P., Madsen, H. & Riis, J. (1981) Precipitation (in Danish). Danish Committee for Hydrology, Report SUSA HI. Allerup, P., Madsen, H. & Riis, J. (1982) Methods for calculating areal precipitation applied to the Susa- catchment. Nordic Hydrol. 13 (5), Damant, C, Austin, G.L., Bellon, A. & Broughton, R.S. (1983) Errors in the Thiessen technique for estimating areal rain using weather radar data. J. Hydrol. 62, Fjeld, M. & Aam, S. (1980) An implementation of estimation techniques to a hydrological model for prediction of runoff to a hydroelectric power station. IEEE Transactions on Automatic Control AC-25, no. 2, Fleming, G. (1975) Computer Simulation Techniques in Hydrology. Elsevier, New York. Goldstein, J.D. & Larimore, W.E. (1980) Application of Kalman Filtering and Maximum Likelihood Parameter Identification to

10 282 Jens Christian Refsgaard et al. Hydrologie Forecasting. The Analytical Science Corporation, Reading, Massachusetts. Jo'rgensen, G.H., Refsgaard, J.C. & Rosbjerg, D. (1982) Updating of hydrological models using Kalman filter, (in Danish). ISVA, Technical University of Denmark. Kitanidis, P.K. & Bras, R.L. (1978) Real time forecasting of river flows. Tech. Report 235, _Ralph M. Parson's Laboratory for Water Resources and Hydrodynamics, MIT, Cambridge, Massachusetts. Markussen, L.M. (1982) Kalman filter on the NAM model (in Danish). MSc thesis, ISVA, Technical University of Denmark. Miljo'styrelsen (1977) Hydrological investigations in the Susâ catchment applying hydrological models (in Danish). Carried out by ISVA, Technical University of Denmark, for the Danish Agency of Environmental Protection. Nielsen, S.A. & Hansen, E. (1973) Numerical simulation of the rainfall-runoff process on a daily basis. Nordic Hydrol 4,