Real time monitoring and forecasting of water quality ...

26 downloads 0 Views 653KB Size Report
water quality telemetry scheme on the Bedford Ouse river system and dynamic ..... Cooke, G. H. (1975) Water quality monitoring in the River Trent system.
Hydrological forecasting - Prévisions hydrologiques (Proceedings of the Oxford Symposium, April 1980; Actes du Colloque d'Oxford, avril 1980): IAHS-AISH Publ. no. 129.

Real time monitoring and forecasting of water quality in the Bedford Ouse river system P. G. WHITEHEAD

Institute of Hydrology, Wallingford, UK

Abstract. In recent years continuous water quality monitoring schemes have been developed in conjunction with telemetry systems to provide real time information for operational management. The rapid developments in microcomputers have enhanced such schemes by providing considerable analytical power for on-line data processing at relatively low cost. The application of real time forecasting and control of water quality along critical stretches of river systems is therefore an option available to operational management. Such an application is considered for the existing water quality telemetry scheme on the Bedford Ouse river system and dynamic models for forecasting ammonia and dissolved oxygen are developed using extended Kalman filter techniques. Contrôle en temps réel et prévision de la qualité de l'eau dans le système de la rivière Ouse en Bedfordshire, RU Résumé. Au cours des dernières années des schémas de contrôle continus de la qualité de l'eau ont été mis au point en liaison avec des dispositifs de télémesure pour fournir en temps réel les informations nécessaires à l'exploitation des aménagements. Le rapide développement des microordinateurs a favorisé la réalisation de tels schémas en apportant d'importantes possibilités d'analyse en vue de traitement direct des données à un prix relativement modeste. L'application de prévisions au temps réel et du contrôle de la qualité de l'eau dans les biefs les plus critiques des rivières devient donc une option valable pour l'exploitation des aménagements. Une telle application est étudiée pour le schéma existant de télémesure de la qualité de l'eau sur le système de la rivière Ouse (Bedfordshire, RU) et des modèles dynamiques pour la prévision de la concentration en ammoniaque et en oxygène dissout ont été mis au point en utilisant les techniques améliorées du filtre de Kalman.

INTRODUCTION In the management and operational control of water resource systems a major requirement is for information on the present condition of the river system and on future changes in water quality. Operational managers must be able to respond quickly to emergency situations in order to protect and conserve the river and maintain adequate water supplies for public use. Moreover, the costs of water treatment and bankside storage are particularly high and there are therefore considerable benefits to be gained from the efficient operational management of river systems from the viewpoint of water quality (Beck, 1979;Rinaldie?a/., 1979; Whitehead, 1978; Young and Beck, 1974). In recent years there has been some progress towards providing more efficient operational management by the installation of automatic continuous water quality monitors on river systems. These measure such water quality variables as dissolved oxygen, ammonia, and temperature and, if combined with a telemetry scheme relaying information to a central location, provide immediate information on the state of the river for pollution officers. Whilst the reliability of such schemes is still rather poor there is now an opportunity to use this information together with mathematical models for making real time forecasts of water quality. The practical problems associated with the continuous field measurement and telemetry of water quality have largely limited the application of on-line forecasting and control schemes. Continuous flow of water past sensors for measuring water quality gives rise to severe fouling of optical and membrane surfaces, thereby 333

334

P. G. Whitehead

drastically reducing the accuracy of the data produced. In recent years, however, there have been several studies and applications of continuous water quality monitors (Briggs, 1975 ; Kohonen et al., 1978). Most UK water authorities have established monitoring and telemetry schemes (Hinge and Stott, 1975 ; Cooke, 1975 ; Caddy and Akielan, 1978) and report reasonable reliability provided the monitors are regularly maintained. More recently, Wallwork (1979) describes an application on the River Wear in northeast England where a continuous monitor is used to protect an abstraction point. • AUTOMATIC MONITORS O FLOW GAUGING STATIONS

V2BS?8ACT.ON

RIVER OUZEL

FIGURE 1. Sketch map of Bedford Ouse river showing automatic water quality monitors and flow gauging stations.

The application of particular interest in this paper is an extensive monitoring and telemetry scheme which has been developed along the Bedford Ouse river system in southeastern England. As indicated in Fig. 1, automatic water quality monitors have been installed at several sites along the river and data on dissolved oxygen, pH, ammonia, and temperature are telemetered at 4-h intervals to the central control station located in Cambridge. It is proposed to extend this telemetry scheme to include information on flow and such variables as rainfall and solar radiation and to use a minicomputer located in Cambridge to analyse the data on-line. The system will provide rapid information on the present state of the river and wiË incorporate a dynamic water quality model for making real time forecasts of flow and quality at key locations along the river system. WATER QUALITY MODELS General The Bedford Ouse river system has already been the subject of a major water quality study established in 1972 by the Department of the Environment, the Anglian Water Authority and the Control Systems Management Group at the University of Cambridge {Bedford Ouse Study, 1975 ; Whitehead and Young, 1975). During the study, a dynamic multi-reach flow model of the river was enhanced using statistically derived rainfall—runoff models of lateral inflow to provide a general hydrological model of the basin. Water quality models were then superimposed on the basic hydrological

Real time water quality monitoring and forecasting 335 model and it was concluded that for the purposes of operational management the water quality models should possess the following properties: (1) They should be truly dynamic models, being capable of accepting time-varying input (upstream) functions of water quality and operating upon them to give time varying output (downstream) responses. (2) They should be as simple as possible and consistent with the ability to characterize the important dynamic and steady state aspects of the system behaviour adequately. (3) They should provide a reasonable mathematical approximation of the physicochemical changes occurring in the river system and should be calibrated against real data collected from the river over an extended period of time. (4) They should account for the inevitable errors associated with laboratory analysis and sampling, and the uncertainty associated with imprecise knowledge of the physical, chemical and biological mechanisms. The models considered in this paper which fulfil these requirements are termed internally descriptive models and provide a description of the dynamic behaviour of the system given a priori knowledge on the physical, chemical and biological phenomena controlling the system behaviour. Alternative 'black box' model descriptions of water quality (Young and Whitehead, 1977) require no such detailed a priori information on internal mechanisms and are based on empirical relationships between the observed input and output behaviour. In the proposed forecasting scheme on the Bedford Ouse, detailed information will be required at a number of intermediate locations where data are not available. The internaËy descriptive models are preferable in this situation since they provide a dynamic mass balance over a reach of river and give information at selected reach boundaries. Internally descriptive models The structure of the internaËy descriptive model is based on a transportation delay/ continuously stirred tank reactor (CSTR) idealization of a river reach. The mathematical formulation of this model is in terms of lumped parameter, ordinary differential equations and draws upon standard elements of chemical engineering reactor analysis. This idealization can be shown to approximate the analytical properties of the distributed-parameter, partial differential equation representations of advection-dispersion mass transport and this form of model has also been validated against water quality data in several studies (Beck and Young, 1976; Whitehead and Young, 1975). The principal advantages of this model over the equivalent partial differential equation descriptions are : (1) The simplified computation required to solve the equations in the case of lumped parameter ordinary differential equations. (An important consideration for application in real time forecasting schemes using mini or microcomputers.) (2) The availability of statistically efficient algorithms for model identification and parameter estimation which can be readily applied to the lumped parameter form. (3) The availability of extensive control system methods which may be used for management purposes and which are most suited to the ordinary differential equation model. The mathematical form of the model is derived from a component mass balance across the river reach idealization : Q Q =-u+-x V V

+S+ f

(la)

336 P. G. Whitehead

where u is the vector of input, upstream component concentration [mg 1 _1 ] ; x is the vector of output, downstream component concentration [mg T 1 ] ; S is the vector of component source and sink terms [mg l"1 ] ; f is the vector of chance, random disturbances affecting the system [mg l"1 ] Q is the stream discharge [m3 day""1 ] ; V is the reach volume [m3 ] ; t is the independent variable of time. The errors associated with the laboratory analysis and sampling are included in the observation equation y = x + T?

(lb)

where y is the vector of observed (measured) downstream component concentration [mg l - 1 ] , and JJ is the vector of the chance measurement error. Equations (la) and (lb) provide the basic description of the internally descriptive model and this model has been applied to water quality data obtained from monitoring stations on the Bedford Ouse. Identification and estimation of water quality models A water quality model, even a relatively simple one, will contain a number of parameters which have to be either estimated from the data, obtained from the literature or from physical measurement. It is often the case that decay coefficients obtained from the literature are based on poor data and therefore inaccurate or are unique to a particular location. Thus, parameters in the model should always be estimated using data collected during carefully planned field studies. Perhaps the most popular approach to estimating the model parameters is to use some form of deterministic 'fitting' procedure in which the model parameters are adjusted until the model output provides a best fit to the corresponding field observations. However, given a relatively limited data set and the inevitable errors associated with sampling and analysis of field data, this problem is essentially statistical in nature. The problem of parameter estimation is further complicated by the ill-defined nature of water quality systems in which internal mechanisms are poorly understood and there is rarely an opportunity to perform planned experiments that might identify these mechanisms. In such a situation, it is necessary to make efficient use of the data obtained during field studies together with any prior information available on the physical nature of the system. Even so, there may still be insufficient information to clearly define the structure of the model and this basic uncertainty must be taken into account in any subsequent use of the model. The extended Kalman filter (EKF) technique was used by Beck and Young (1976) to identify the structure of a DO-BOD (dissolved oxygen—biochemical oxygen demand) model for a reach of the River Cam. The EKF technique formalizes the conventional 'trial and error' method of model calibration. In the conventional approach a deterministic simulation model is run repeatedly through the time series of data with the model parameter adjusted between each run until the predicted behaviour is close to the observed system behaviour. The EKF offers a formal alternative to this trial-and-error procedure and accounts explicitly for the uncertainty in the system. River system models are acknowledged to be subject to random disturbances f, while the output measurements y are seen to be corrupted with measurement errors rj. The trial-and-error fitting procedure is replaced by a formal estimation algorithm, whose operation is determined by some quantification of the uncertainty related to f and 77. From this algorithm it is possible to obtain estimates

Real time water quality monitoring and forecasting

337

of the measured vector variables x, and the set of parameters such as decay coefficients which appear in the model. The EKF provides the statistically 'best' estimate of the parameters in the model and the system state variables and the algorithm are described in detail in Jazwinski (1970). An important feature of the EKF is the recursive nature of the algorithms in which the system states and model parameters are updated one step at a time through the data. This enables the algorithm to track or follow time varying parameters and provide an additional check on model stability during the initial model identification state. In addition, the recursive formulation has particular value in real time forecasting applications since it enables models and forecasts to be updated continuously. AMMONIA AND DISSOLVED OXYGEN MODEL IDENTIFICATION In order to investigate the application of the EKF to the Bedford Ouse forecasting system, water quality data have been obtained from the automatic monitors on the Bedford Ouse. The data from the automatic monitors are telemetered at 4-h intervals to the central control station in Cambridge and data have been obtained for the monitoring stations located at Sharnbrook and Tempsford (Fig. 1) for the period July—November 1978. The stretch of river between these two sites is of particular interest to the Anglian Water Authority because of the location of the Bedford Water Board abstraction plant at Clapham, the discharge of effluent from the Bedford Sewage Works and the abstraction of water at Offord just downstream of Tempsford. Data have been obtained for dissolved oxygen, ammonia, flow, temperature, and solar radiation together with data on the quality and quantity of effluent from the Bedford Sewage Works. A plot of dissolved oxygen at the upstream site is given in Fig. 2 and shows clearly the daily oscillations of dissolved oxygen, caused by oxygen production and consumption processes, and the longer term fluctuations which are due to other variables such as temperature and streamflow. Initially, mathematical analysis of this data has been restricted to the first 108 samples (18 days) since this period corresponds with a major storm event and high levels of ammonia in the river downstream of the sewage works. The model of ammonia and dissolved oxygen is based on the mass balance description of equation (1) but contains additional terms to describe source and sink processes such as the nitrification of ammonia and the production of oxygen by photosynthesis. The river between Sharnbrook and Tempsford has been divided into four reaches with reach boundaries corresponding to the abstraction plant at Bedford,

SAMPLE NUMBER

FIGURE 2. Dissolved oxygen levels on Bedford Ouse (Tempsford monitor) JulyNovember 1978, measured at 4-h intervals.

338

P. G. Whitehead

the Bedford Sewage Works and an intermediate point between the sewage works discharge and the Ternpsford monitor. The upstream ammonia concentrations are particularly low (< 0.05 mg 1_1 ) and therefore the ammonia model has been formulated for just the two reaches below the sewage works. The models identified using the EKF are as follows: Dissolved oxygen àx i Q Q — = — u\ ~ — x, + k]S - k2 àt F, Vi Q Q ^ , c , -—=~-Xi-~x2+k1S-k2 dt V2 V2 dx3 Q Q k4 — = ~ x2 - — x3 + kiS - k3 - 4.33 — xs at F3 F3 Q ir KA dx4 Q Q ~7T ~ '"77 *3 - IT x4 + ktS - k-3 4- . 3 3 — * 6 dt V4 V4 Q /i wi

(2)

(3) (4) (5)

m/iMi/i

firiLrrlUrUU

^l-Q

rr

Q

U* —

dt F3 dx6 _ Q —

àt

*

F3 Q Xc —

F4

k

Xz, —

Xc

Q k4 Xf. —

F4

Xc

(6) (7)

Q

where x i, x2, x3 and x4 represent DO at the downstream boundary of the four reaches [mgr1]; xs, x6 are the ammonia concentrations at the downstream boundary of the third and fourth reaches [mg l"1 ] ; ux is the upstream DO concentration entering the first reach at Sharnbrook [mgr1]; Ue is the ammonia in the effluent discharge calculated as the effective instream ammonia level [mg 1_1 ] ; Q is the flow rate measured at Bedford [m3 day -1 ] ; S is a sunlight term to account for addition of oxygen by photosynthesis; Vi, V2, V3 and F4 are the volumes [m3 ] ; ki is the rate constant associated with oxygen production by photosynthesis [days-1 ] ; k2 is the loss of dissolved oxygen caused by BOD upstream of Bedford [mg r 1 day"1 ] ; k3 is the loss of dissolved oxygen caused by BOD downstream of Bedford [mgl"1 day"1] ; k4 is the nitrification rate of ammonia [days-1 ] . The sunlight term S is a function of solar radiation Sr (Water Research Centre Annual Report, 1968) and is determined as S

=

S0.2S

The constant 4.33 in equations (4) and (5) represents the mass of oxygen removed from the water for each unit mass of ammonia nitrified.

Real time water quality monitoring and forecasting

339

5 o

SAMPLE NUMBER

K 2.0-

SAMPLE NUMBER

FIGURE 3. Measured flow at Tempsford on the Bedford Ouse and recursive estimate of ammonia decay coefficient.

One feature of particular interest in this model is the inclusion of the flow term Q in the ammonia nitrification expression in equations (4)—(7). The flow is included to account for the lower nitrification rate occurring under high flow conditions (Garland, 1978). During the initial EKF runs the flow term was not included and the parameter fc4, as shown in Fig. 3, is estimated recursively and appears to be inversely proportional to Q. Inclusion of the flow term and re-estimation of k4 produced an essentially constant or slowly varying parameter, as shown in Fig. 4. The higher flows tend to flush the reach of the nitrifying bacteria which are responsible for the conversion of ammonia to nitrite and nitrate and hence reduce the nitrification processes. The EKF is particularly useful in identifying this behaviour and reducing an essentially time varying parameter model to a model which is time invariant (Whitehead, 1979). The other parameters in the dissolved oxygen model do not vary significantly over the sampling period, as shown in Fig. 4 although the parameter kx increases slightly during the estimation. This is most probably due to the presence of large algal populations in the river which have not been explicitly included in the model. During the Bedford Ouse study (Whitehead and Young, 1975) the sunlight term was modified to account for the algal populations using chlorophyll-a concentrations as a measure of the oxygen producing matter in the river. In the present study, chlorophyll-a data are not available and the sunlight term is therefore dependent on solar radiation

340 P. G. Whitehead K1

a SAMPLE NUMBER

K4

S

K3 zfe

"sb

7b

:ob

SAMPLE NUMBER

FIGURE 4.

Recursive estimates of parameters.

only. As shown in Fig. 5, there are large diurnal variations in dissolved oxygen which are indicative of algal activity and further work incorporating the algal components is therefore required. The simulation of dissolved oxygen and ammonia, as shown in Fig. 5, are reasonable although the peak of the ammonia is considerably underestimated. This may be due to the inaccurate measurement of effluent flow from the sewage plant during the peak of the storm or the additional inputs along the reach from agriculture and urban runoff. CONCLUSIONS The automatic monitoring scheme on the Bedford Ouse will provide real time information on the quality of the river thus enabling pollution officers to detect pollution at an early stage. Given flow and quality models of the system it should be possible to predict the time of travel of a pollution load and the dilution factors along a particular stretch of the river. In addition, the models can provide forecasts of key variables such as dissolved oxygen and ammonia at critical points along the rivers. This information on the present and future state of the river system will lead

Real time water quality monitoring and forecasting

0

2

5

BD

T!

341

ioF

SAMPLE NUMBER

~ estimated ammonia ~*~ observed ammonia

9

^

,

-^

-j

-^

—j.

SAMPLE NUMBER

FIGURE 5. Tempsford.

Simulated and observed ammonia and dissolved oxygen levels at

to more efficient operational management and potential savings in capital expenditure. For example the introduction of real time control of effluent releases is an alternative to the continued expansion of the Bedford Sewage Works. Existing tanks located at the Bedford Sewage Works could be used to store effluent during critical periods, thereby reducing the large peaks of ammonia observed in the river. The operational control of the effluent discharge would be an effective means of improving water quality compared to simply extending the existing capacity of the sewage works. Acknowledgements. The results presented in this paper reflect the opinions of the author and are not necessarily the views of the Anglian Water Authority. The author is indebted to Dr D. Caddy of the Great Ouse Division of the Anglian Water Authority for the provision of water quality data, and to the Thames Water Authority for sponsoring the Real Time Forecasting Workshop at the Institute in 1979. REFERENCES Beck, M. B. (1979) The role of real time forecasting and control in water quality management. IIASA Report no. WP-79-1. Beck, M. B. and Young, P. C. (1976) Systematic identification of DO-BOD model structure. J. Environ, EngngDiv., Amer. Soc. Civ. Engrs 102, no. EE5, 909-927.

342 P. G. Whitehead Bedford Ouse Study (1975) Conference Proceedings and Final Report: Anglian Water A u t h o r i t y , Huntingdon, Cambridgeshire, UK. Briggs, R. (1975) Instrumentation for monitoring water quality. /. Soc. Wat. Treatment and Examination 2 4 , 2 3 - 4 5 . Caddy, D. E. and Akielan, A. W. (1978) Management of river water quality. Int. Environ. Safety 1,18-26. Cooke, G. H. (1975) Water quality monitoring in the River Trent system. Instruments and Control Systems Conference: Water Research Centre, Medmenham, Buckinghamshire, UK. Garland, J. H. N. (1978) Nitrification in the River Trent. Mathematical Models in Water Pollution Control (edited by A. James): Wiley, Chichester, UK. Hinge, D. C. and Stott, D. A. (1975) Experience in the continuous monitoring of river water quality. Instruments and Control Systems Conference: Water Research Centre, Medmenham, Buckinghamshire, UK. Jazwinski, A. H. ( 1970) Stochastic Processes and Filtering Theory : Academic Press, New Y o r k , USA. Kohonen, T., Hell, P., Muhonen, J. and Vuolas, E. (1978) Automatic water quality monitoring systems in Finland. Report of the National Board of Wa ters, Helsinki, Finland, no. 153. Rinaldi, S„ Soncini-Sessa, R., Stehfest, H. and Tanura, H. (1979) Modelling and Control of River Quality: McGraw-Hill, New York, USA. Wallwork, J. F. (1979) Protecting a water supply intake—river water data collection and pollution monitoring. River Pollution Control Conference: Water Research Centre, Medmenham, Buckinghamshire, UK. Water Research Centre Annual Report (1968) Water Research Centre, Medmenham, Buckinghamshire, UK. Whitehead, P. G. (1978) Modelling and operational control of water quality in river systems. Wat. Res. 12, 377-384. Whitehead, P. G. (1979) Applications of recursive estimation techniques to time variable h y d r o logical systems./. Hydrol. 40, 1-16. Whitehead, P. G. and Young, P. C. (1975) A dynamic-stochastic model of water quality in part of the Bedford Ouse River system. In Computer Simulation of Water Resource Systems (edited by G. C. Vansteenkiste): North-Holland, Amsterdam, The Netherlands. Young, P. C. and Beck, M. B. (1974) The modelling and control of water quality in a river system. Automatics 10, 5. Young, P. C. and Whitehead, P. G. (1977) A recursive approach to time series analysis for multivariable systems. Int. J. Control 25, 457—482.