State Variables Updating Algorithm for Open-Channel and Reservoir Flow Simulation Model

Size: px
Start display at page:

Download "State Variables Updating Algorithm for Open-Channel and Reservoir Flow Simulation Model"

Transcription

1 Journal of the Serban Socety for Computatonal Mechancs / Vol. 3 / No. 1, 2009 / pp UDC: : State Varables Updatng Algorthm for Open-Channel and Reservor Flow Smulaton Model B. Stojanovć 1 *, D. Dvac 2, N. Mlvojevć 3, N. Grujovć 4, Z. Stojanovć 5 1 Faculty of Scence, Unversty of Kragujevac, 12 Radoja Domanovća St., Kragujevac, Serba; e-mal: bob@g.ac.rs Insttute for Development of Water Resources Jaroslav Čern, 80 Jaroslava Černog St., Bel Poto, Serba; 2 ddvac@eunet.rs, 3 nola.mlvojevc@gmal.com, 5 zdravo.stojanovc@jcern.co.rs 4 Faculty of Mechancal Engneerng, Unversty of Kragujevac, 6 Sestre Janjć St., Kragujevac, Serba; e-mal: gruja@g.ac.rs *Correspondng author Abstract The core of the state-of-the-art decson support systems for operatonal plannng and management of hydropower plants s a hydrodynamc smulaton model that uses nformaton about measured and forecasted values of model forcng for predcton of water levels and flows n streams and reservors. Havng n mnd the complexty of real world systems, these ssues cannot be solved analytcally, thus requrng applcaton of numercal methods. Ths paper dscusses the use of numercal procedures n solvng standard full moton equatons for onedmensonal unsteady flow n open channels and structures. The produced energy s estmated based on up-to-date model states. A methodology for updatng of model states usng measured values of physcal states n order to mprove operatonal use of the model s presented n ths paper. Accordng to presented methodology, a state updatng module s desgned for Iron Gate ( Đerdap n Serban; Portle de Fer n Romanan) hydropower plants smulaton model. Regardng mportance of accurate electrcty generaton estmates n operatonal use of the model, specal attenton s gven to the desgn of the module and methodology n order to reduce the devaton of estmated state values from measured values. The effcency of proposed methodology s shown on an example of operatonal use for several days. The example clearly shows the dsadvantages of smulaton model wthout state updatng procedure appled and the benefts of usng state updatng module n operatonal management of complex hydropower plants system. Keywords: Rver flow, smulaton model, state updatng, open channel, reservor, state varables 1. Introducton The analyss of recent practces n water resources management ndcates certan convergence of plannng methods, wth the goal of reachng flexble and nteractve plannng under

2 328 B. Stojanovć at al.: State Varables Updatng Algorthm for Open-Channel and Reservor Flow Smulaton condtons of uncertanty. The applcaton of these methods provdes for a thorough analyss of water resources and the ranges of demand related to ther utlzaton, dentfcaton of potental conflcts of nterests related to utlzaton, development and protecton of waters, defnng of prortes n conflctng stuatons and dentfcaton of solutons that are not unambguous and that can be adapted to the changes. At the same tme there s an evdent progress n the feld of nformaton-communcaton technologes, especally n the doman of software development, nformaton processng and treatment of random events. That allows transformaton of rgd tradtonal methods for plannng and management of water resources to dynamc processes. Specfc features related to the nature of hydropower potental, methods of ts utlzaton, as well as the role of hydropower subsystems n a broader electrcty generaton and transmsson system, exert an mpact on methods of plannng and management of hydropower objects. The complexty and dversty of approaches to organzaton of electrcty maret mae defnng general rules and procedures mpossble. Obtaned solutons can be consdered as optmal, only f specfc features of each system are treated. The objectve of solvng the problem of optmum hydropower plant management s to determne the system usage, as well as the engagement of each unt n the hydropower plant (whether t s n operaton and n whch operaton regme t operates) for the gven operatonal condtons. The optmum hydropower plant management mples as consstent as possble fulfllment of the demands of the electrcty generaton and transmsson system, wth the mnmum water consumpton per unt of electrcty generated and full adherence to the lmtatons mposed by the characterstcs of the plant tself, as well as to lmtatons related to explotaton. Ths type of plannng of hydropower plant operaton s the short-term or operatonal plannng,.e. short-term hydropower system management. The complexty of hydropower plant operaton s of such nature that so far there are no unque prncples of ts operatonal plannng that would be applcable n all stuatons. One of the reasons s the fact that the nflow to hydropower plant depends on several parameters dffcult to forecast; hence, they have to qucly adapt to the current stuaton. All the tme t s neccessary to eep n mnd that water s the resource whch s usually not used only for electrcty generaton. In addton, hydropower plant operaton s coupled wth many other lmtatons, such as the protecton of the envronment, mportant objects n the vcnty of storages and watercourses, and smlar. Complex problems of the optmum management of hydropower plants and assocated storages are n practce mostly reduced to defnng of a certan number of procedures and gudelnes, on whch bass the operatonal plans and ther executon are defned. These procedures and gudelnes are relatvely easy to use and they produce plans that are not always the optmum ones, but have a necessary level of safety regardng to possble volaton of the predefned lmtatons. The man problem n applcaton of these procedures and gudelnes s related to the fact that they were defned wth numerous smplfcatons, they do not cover all phenomena nvolved n the process of explotaton of hydropower potental, they are dffcult to modfy and are often based on nowledge of the state of the system at the begnnng of ts explotaton. Ther modfcaton n order to optmze operaton s a complex process that conssts of several phases, such as preparaton, measurement, data processng, assumptons, defnton of the solutons and, fnally, ts mplementaton n everyday operaton. Ths s the reason why the mplementaton of flexble systems for support to the operatonal plannng and management of hydropower plants that provde effcent decson-mang related to management and are based on hydraulc and hydropower calculatons, s objectve here. Such systems requre the exstence of the correspondng smulaton models, complex nformaton-

3 Journal of the Serban Socety for Computatonal Mechancs / Vol. 3 / No. 1, communcaton nfrastructure and mechansms for data collecton and processng, as well as the sophstcated optmzaton modules that have multple purposes n such system. The core of modern systems for support to operatonal plannng and management of hydropower plants s hydro-dynamc smulaton model, whch uses nformaton about realzed and forecasted values of model nput varables, n order to forecast water levels and dscharges n the rver system (Dvac et al. 2009). Due to the complexty of the real systems, certan numercal methods have to be appled nstead, what often requres space and tme dscretzaton of the system. Snce most of the developed models are related to the natural networs of open channels, the smulaton of hydropower systems requres defnng addtonal algorthms for solvng complex problems wth hydropower plant objects, whch are treated as nternal boundary condtons. Problem complexty comes from the fact that a hydropower plant s managed accordng to the demand related to electrcty generaton that depends upon the gross head (that s a consequence of the water level n the vcnty of the dam), as well as the dscharge. Snce all calculaton varables are coupled and are obtaned as the soluton to the system of nonlnear equatons, ths system needs to be solved by an teratve procedure. All hydropower calculatons are performed usng the computatonal states obtaned by the software used for the soluton of standard, full equatons of one-dmensonal unsteady flow n open channels and through the control structures. The accuracy of determnaton of dscharge and gross head s of crucal mportance for determnaton of electrcty generated by each unt and, consequently, t s a ey factor n the process of optmzaton of electrcty generaton. In process of model formaton and defnng methodology of ts operatve applcaton, specal attenton s pad to mnmzaton of the dfference between the calculated values of system varables and the values measured n real-tme. Some of the most mportant reasons for dfference between calculated and measured values are lac of relablty of nput data and devaton of ntal values from the real system state (dscharges and water levels at the ponts n the system at the ntal tme of smulaton). In order to mae the smulaton results as close as possble to the values measured n the real system, t s necessary to neutralze the mentoned causes of devaton. Snce n the operatonal applcaton of the model numerous smulatons are to be expected, ncludng hydraulc and hydropower calculatons, t s necessary to provde model state that corresponds to the state of the real system at the ntal tme of smulaton. Because of that the method for updatng of the system state, based on the measured data, must be appled, n order to mnmze smulaton errors and, thus, mae the model use more effcent. The applcaton of general state updatng methods on the specfc problems requres certan modfcatons. Ths s requred due to the fact that the confguratons of varous systems may dffer sgnfcantly that totally dfferent types of nput data may be used that system dynamcs may dffer and, fnally that the models may be used for completely dfferent purposes. Therefore, method applcaton must be analyzed n terms of model purpose, physcal system under consderaton and avalable measurements. An overvew of the most often used state updatng methods and ther modfcatons n order to answer the specfc requrements of the hydropower system Iron Gate are gven below. It should be emphaszed that the developed methodology s applcable to other hydropower systems smlar to ths system n terms of confguraton, flow dynamcs and other parameters.

4 330 B. Stojanovć at al.: State Varables Updatng Algorthm for Open-Channel and Reservor Flow Smulaton 2. Theoretcal bacground of determnaton of the up-to-date state of the mathematcal model Snce the determnaton of the up-to-date state of the mathematcal model ncludes the determnaton of the computatonal state whch s closest to state of the real physcal system, t s necessary to tae nto account the complete probablty dstrbuton of all states, measurements and nputs. Ths provdes free nterpretaton of the noton of the best estmaton (for example, t can mean the mnmum varance) of past, current and future states. One of the earlest methods of estmaton s the mplementaton of the Kalman flter (Gelb, 1974). On the other hand, one can use the approach that s prmarly focused on the analyss of nput data qualty and the possblty of ther correcton for the purpose of reachng as correct computatonal state as possble. That approach s called data assmlaton. Data assmlaton s acheved by applcaton of certan mathematcal models provdng usage of measured data and dfference between calculated and measured values n estmaton of the up-to-date model and forecast of the future states of physcal system. The early examples of ts applcaton can mostly be found n felds of oceanography, geophyscs and meteorology (Bennett 1992). Data assmlaton procedures, dependng on the varables modfed n the adaptaton process, may be dvded nto: procedures based on the correcton of nput values (external acton on the model), procedures wth updatng of model states, procedures wth the calbraton of model parameters, and updatng of output values (WMO, 1992). Updatng of output values, also nown as error correcton, s the most used procedure n operatonal hydrologc forecasts (WMO, 1992; Refsgaard, 1997). The forecast model wth error correcton s formed upon the bass of observed model errors, whch are then supermposed on the smulaton model. Error correcton procedures, as a part of the system for hydraulc computatons, are used for updatng of water level and dscharge on ndvdual locatons. Generally speang, error correcton technques do not requre a sgnfcant use of computer resources; hence, they are effcent n data adaptaton n the forecast systems Procedure for updatng by fltraton algorthm Procedure of updatng the state usng fltraton algorthm ncludes the perod before the start of the smulaton n whch a number of measurements are nown. Based on the exstng measurements and smulaton results for the gven perod, nterpolaton s used for updatng the state of the whole system. The obtaned mproved estmaton of the system state s then used as the ntal condton for the real smulaton (forecast) that does not nclude model correcton. The foundaton of the fltraton algorthm s the presentaton of the numercal modelng system n the state space:, 1 x x u (1) where s the model operator that represents the numerc scheme of the modeled system, x s the state vector that represents the state of the modeled system n tme and u s the external nfluence on the system whch ncludes boundary condtons. It s assumed that the measurements are avalable on one or more locatons n the modeled system. Ths can be presented by the measurement equaton: z Cx (2)

5 Journal of the Serban Socety for Computatonal Mechancs / Vol. 3 / No. 1, where z s the measurement vector and C s the matrx that descrbes the ln between the measurements and the state varables. Ths matrx actually maps the system state space nto the measured data space. The process of estmaton of system state s performed n two steps. Frst, the model s used for forecast and, then, the measured data are compared to the forecasted data, n order to provde up-to-date state. The updated state varables, obtaned from dfference between forecasted and measured values, may be calculated as a lnear combnaton of data and model: where vector and a f f x x G z C x (3) f x s the forecasted state vector obtaned from the equaton (1), G s the matrx of weghtng coeffcents. The vector z a x s the updated state Cx f, also called the nnovaton vector, s the dfference between the measured and the related forecasted values. If the measurements are ndependent, than the sequental updatng procedure can be used, whch processes the measurements one by one (Chu and Chen, 1991):,,, f, 1, 2,..., a a a x j x j 1 g z x j 1, j j j a x j x j p where p s the number of measurements, z, j s the value of j th measurement, a z, jx, j j1s the change n j th measurement after the processng of j 1 observatons and g, j s the vector of weghtng coeffcents that corresponds to jt h measurement and a descrbes how the change z, jx, j j 1 s dstrbuted over the state vector. The form of the weghtng coeffcent vector represents the correlaton between the measurements and the nearby ponts wth accountng of unrelablty of the measurements and the model. If the weghtng coeffcent n the measurement pont equals 1, the measurements are assumed to be perfect. Smaller value of the weghtng coeffcent means that the assumed uncertanty of the measurement s larger than model uncertanty. Determnaton of the weghtng coeffcent vector n the Equaton (4) s the most mportant part of the fltraton scheme and varous schemes dffer manly by the method of calculaton of weghtng coeffcents. The most comprehensve lnear fltraton scheme s the KF scheme (KF stands for Kalman flter), where the weghtng coeffcent s determned by mnmzaton of the expected error of the updated state vector as a functon of model data and dynamcs (Madsen and Sotner, 2005; Drecourt, 2003; Km et al. 2004). The presented fltraton procedure can be appled to updatng of the system state untl the start of the smulaton,.e. whle there are avalable hstorcal measurements. Ths state can be further used as the ntal state for smulaton. The ncrease n tme dfference relatve to the start of the smulaton weaens the effect of ntal condtons and, consequently, fltraton effects are weaer. Ths s why the applcaton of ths method s lmted to the problems of shorter forecasted perods Correcton of output values by auto-regresson method The correcton of model output values s an error correcton method wthout an analyss of ts source. However, the correcton of output values can be very effcent n reducton of forecast (4)

6 332 B. Stojanovć at al.: State Varables Updatng Algorthm for Open-Channel and Reservor Flow Smulaton errors. The errors n output values of future smulatons are often dependent on the errors already dentfed n the comparson of smulaton results wth past measured data. These systematc errors can be easly elmnated by the smple auto-regresson method appled to model output values. Ths method s partcularly useful durng the frst hours of forecast because t can provde establshment of the ln between the measured and forecasted states. A very often used method for correcton of output values s the auto-regresson (AR) method. The expected smulaton error, accordng to ths method, s dependent on the last measured error and the class of relevant state varables. The form of AR model n the current tme step t s as follows: where R s the regresson coeffcent. t t R (5) 0 t t s the estmaton of the expected error, t 0 s the smulaton error at tme 0 t and In case of updatng of output values of the unsteady flow model R s dependent on the flow regme. There s a stronger auto-correlaton of error wth low and medum dscharges than n the case of hgh flows. The calculaton of the regresson coeffcent s usually performed for each class of flow separately. Dscharges are dvded nto several classes based on the statstc data from the measurement statons. The calbraton of the AR model usually results n coeffcent values rangng from 1, for low waters, to 0.9, for hgh-water perods, and the value of the regresson coeffcent decreases lnearly wth an ncrease n flow. If no observatons are avalable, the value of coeffcent R s assumed to be 0..e. the correcton of the output s actually not calculated Updatng of system state by correcton of nput data Good forecast system requres ntal calculaton system state at tme t 0 (tme of forecast start) that dffers from the real system state as lttle as possble. It s of crucal mportance for a forecast system to recalculate state n recent past, usng some of the methods for updatng of the system state. The correcton of nput values s the prmary objectve n mprovement of the system state, what should lead to a better agreement between the calculated and the measured values. The man goal of updatng s the reducton of the dfference between the smulated and the measured values n recent past. Ths s the reason why correcton factors are appled at the ponts of nput nflows, provdng change n value of that nput parameter. The correcton factor may vary from one pont to another and each system nput has ts own correcton factor. The ey factor that affects optmzaton result s the objectve functon. Due to the fact that the smulated values must be smultaneously harmonzed wth the related measured values n several places, the objectve functon should account for all these devatons. The devatons of smulated values from the measured ones must be mnmzed. Bearng n mnd the dfferent ntenstes of the varables n the system, as well as the fact that the same objectve functon mnmzes devatons of dfferent values, the values of the varables wthn the objectve functon must be standardzed (Kahl and Nachtnebel, 2008). The result of standardzaton s that all measurement ponts and all measured varables have the same weght n the objectve functon. The most general objectve functon may be wrtten n the followng form:

7 Journal of the Serban Socety for Computatonal Mechancs / Vol. 3 / No. 1, f R 2, j R (6) j=1,n R R where N s the number of steps,, js dfference between the smulated and the measured value at th observaton pont n j th step, R s the average value at th observaton pont n the longer tme nterval and s the coeffcent of the nfluence of the devaton on the objectve functon R at th observaton pont. 3. Suggested methodology for determnaton of the up-to-date state n models of openchannel flow A relable system of operatonal hydropower calculatons requres the up-to-date system state at tme t0 that represents the start of the smulaton wth forecasted and planned nput seres. Ths s the reason why t s crucal for the system to perform a recalculaton by one of the methods for state updatng at the tme mmedately before the forecast start. The presented methods for state updatng may be n general case appled to the majorty of mathematcal models and, thus, to the models of the open-channel flow. However, ther applcaton to specfc problems or to a class of smlar problems requres an approprate selecton of the method and the assocated optmzaton algorthms. In selecton of the adequate methods for state updatng n models of open-channel flow, one should bear n mnd numerous crtera. Above all, one should bear n mnd the characterstcs of the mathematcal model and the fnal purpose of the model so that the selecton of the method would be such that t could ft to the specfc features of the gven model (the level of non-lnearty, the degree of dscretzaton, the requred accuracy etc.). Furthermore, t s necessary to systemze and determne all varables that appear as nputs, as well as those computatonal values that can be compared to the measurements, and ther role n the decson-mang process based on smulaton results. Ths data should also be systemzed accordng to ther relablty, because ths can ndcate whch nput values should be corrected,.e. whch weghtng coeffcents should be assgned to these varables n the objectve functon. Fg. 1. Updatng perod and perod of forecasted values

8 334 B. Stojanovć at al.: State Varables Updatng Algorthm for Open-Channel and Reservor Flow Smulaton Large hydropower systems often have a cascaded structure. Therefore, large oscllatons of levels n the storages are not allowed, what requres a very precse coordnaton of dscharges on the power plants. In order to provde suffcently precse plannng of system management for the subject followng perod, up-to-date system state values at the start of the smulaton are needed. For that purpose, t s necessary to develop methods for determnaton of the up-to-date system state that reflects as close as possble the state of the system determned by measurements. Snce one-dmensonal model of the flow n open-channels and storages (wth assocated power plants) whch reles on the numerc ntegraton scheme (fnte dfferences) s consdered, t s necessary to select a robust method for determnaton of the up-to-date model state. Ths s partcularly mportant because n each teraton of the numerc algorthm, due to the presence of actve hydropower objects (dams wth a power plant and a spllway), whch operaton depends on the current values of headwater and talwater water levels, the correcton of the outflow through these objects s performed. Usng these corrected values, entre procedure of solvng of the system of equatons s repeated untl the convergence crteron s satsfed. In addton to the convergence crteron, n the process of solvng system of non-lnear equatons t s also necessary to fulfll the demand related to electrcty generaton. Ths formulaton of the numerc algorthm requres the applcaton of method that s as general as possble and whch to the lowest possble extent depends on ntegraton technque. The flow n open channels and storages located n large scale rver systems s predomnantly dependent on the dscharge n the assocated rvers. In the hstorc perod n whch model s updated (.e. few last days), avalablty of the recorded nflows nto the system that can be used wthout any serous analyss and processng, can be expected. Hence, they can contan certan devaton from the real nflows. It s consdered that the most accurate measurements n the hydropower systems are measurements related to electrcty generaton, as well as other values that can be drectly related to electrcty generaton. Accordngly, the dscharges through the unts can be consdered suffcently relable n terms of ther use n hydraulc calculatons. However, certan dscharges that occur perodcally, such as spllng, are not measured drectly, but they are determned approxmately on the bass of other values or the water balance n the system (the dscharges determned n ths manner may often sgnfcantly dffer from the dscharges that occur durng actual system explotaton). Therefore, for the purpose of comparson of the mathematcal model wth the observed physcal system, water levels that can be very accurately measured n many ponts n the flow and n the storage are used. From the consderatons mentoned above t can be concluded that for the analyzed class of models n open channel and storage flows t s most sutable to apply the procedure of updatng of the system state by correcton of nput data. The man goal of applcaton of ths procedure s the reducton of the dfference between the smulated and the measured water levels and dscharges durng the perod mmedately before the smulaton perod. Ths s the reason why correcton factors are appled n the ponts where dscharge s assgned (nput nflows, spllng and smlar), what leads to the change n value of that nput parameter. Bearng n mnd that the assgned dscharges (nflows, spllng and smlar) are nown for a certan number of dscrete tme steps durng the updatng perod and that the number of steps can be rather large (dependng on perod length and the tme step sze) t s clear that t s not realstc to loo for the optmum dscharge correcton n each tme step t (see Equaton(6)). Ths s the reason why coeffcents t are vared n a lmted number of moments n tme

9 Journal of the Serban Socety for Computatonal Mechancs / Vol. 3 / No. 1, t1 t2 t,,..., M, and for other moments n tme ther values are determned by lnear nterpolaton, as shown n Fgure 2. Fg. 2. Interpolaton of correcton factors In ths manner the set of nput parameters to be corrected s reduced to N M dscharges t j j j Q Q, ( 1.. N, j 1.. M),.e., to N M correcton factors. Optmzaton algorthms are used for determnaton of the coeffcent set that provdes model state closest to the real system. In general case the nput dscharges, measured n tme t may be denoted wth t Q, ( 1.. N), where N represents the number of system nputs. Bearng n mnd that the dfference between the nput nflows n dfferent rvers and the dscharges over the spllways t may amount to several orders of magntude, t s clear that the dscharge correcton Q must be proportonal to the real dscharge t Q. To preserve the proportonalty of the real and corrected dscharges, an ncrease,.e. decrease, of observed dscharges n percents was selected as the parameter of correcton by optmzaton algorthm; hence, the corrected dscharge s as follows: where t may have values between Q Q (7) t t t mn and max. In order to mae the use of these algorthms possble t s necessary to mathematcally defne the relaton between the real system and the mathematcal model. In case of the recommend methodology, the measure of complance s the tme-weghted mean absolute error or water level on several typcal profles, where the measured values of water level are nown for the entre updatng perod. The mean error of the absolute water level on L profles at the tme t may be wrtten n the form: t E L t el (8) l 1 t j

10 336 B. Stojanovć at al.: State Varables Updatng Algorthm for Open-Channel and Reservor Flow Smulaton where t e l s the absolute value of devaton of the calculated from the measured water level. As acceptable soluton cannot be accepted the soluton that provdes mnmum error only at the end of the updatng perod, but t s necessary to loo for a soluton that provdes for the mnmum devaton durng the entre perod. On the other hand, bearng n mnd that the goal of updatng s the correct ntal system state to be used n future smulaton, the errors must be weghted, so that the ones at the start of smulaton have the lowest and the ones at ts end the bggest nfluence on the value of the objectve functon. Ths s the reason why the soluton of the optmzaton problem wth the followng form s proposed: t mn p t E (9) where p t / t t T has been selected as the weghtng functon, where T s the total updatng perod. Ths s the way to perform a lnear ncrease n mpact of certan devatons on the objectve functon from the start to the end of ths perod. Fnally, one can say that the proposed methodology of determnaton of the up-to-date state n the models of flow n open channels conssts of solvng of the problem of determnaton of the optmum set of dscharge correcton factors (nflow and spllng),.e. the maxmzaton of the objectve functon. The corrected dscharges represent nput seres that at the end of the updatng perod result n the computatonal state of the mathematcal model that s close to real system state. Dependng on the complexty of the optmzaton problem (the number of factors, non-lnearty of the model, the length of the updatng perod and smlar), t s necessary to select the correspondng optmzaton algorthms that would be effcent n the operatonal applcaton of the systems developed upon the proposed methodology. 4. Appled optmzaton algorthms Genetc algorthms have been proposed for solvng the problem of determnaton of the up-todate state n the models of open-channel flow. Genetc algorthms are heurstc methods of optmzaton that mtates the natural evoluton process. The analogy of evoluton, as a natural process, and genetc algorthm, as an optmzaton method, s reflected n the selecton process and genetc operators. The selecton mechansm appled to some speces of lvng creatures n the evoluton process s comprsed of the envronment and the natural condtons. In genetc algorthms the ey to the selecton s the objectve functon that approprately represents the problem to be solved. Namely, the rule of the nature s that the ndvdual that s best adapted to the envronment and condtons of lvng has the greatest probablty of survvng and breedng, and thus of transferrng of ts genetc materals to the offsprng. For the genetc algorthm one soluton s one ndvdual. The selecton s used to choose good speces and the combnaton of ther genetc materal creates a new generaton of speces. Such a cycle of selecton, reproducton and manpulaton of genetc materal of the speces s repeated untl the condton of termnaton of the evoluton process s acheved. Fgure 3 shows the scheme of genetc algorthm functonng.

11 Journal of the Serban Socety for Computatonal Mechancs / Vol. 3 / No. 1, Fg. 3. The structure of the evoluton algorthm wth one populaton (Mlvojevć, 2008). In order to mplement genetc algorthms wthn a certan problem t s necessary to defne several standard steps: the method of codng/decodng, the ftness functon and the algorthm termnaton crtera. Each of these steps wll be dscussed below Codng method The process of translaton of the real soluton to the problem nto the coded form s one of the most mportant procedures n the mplementaton of genetc algorthms, because the effcency of the algorthm depends to a great extent on the approprate selecton of codng. In present paper the procedure of bnary codng of the soluton was used, whch s probably the smplest one n terms of mplementaton. The elementary approach to such a soluton to the problem conssts n wrtng of the real number x n the form of seres of bts that form one chromosome,.e. n bnary codng. The real number x s n ths manner represented wth the accuracy that depends on the number of used bts n. Decodng, or translaton of the bnary codng nto a real number s performed accordng to the smple formula: n1 c 2 0 x a n ba 2 1 where a and b are the boundares of the search area and c represents the bt wth the weghts of 2 (Mlvojevć, 2008). j j Bnary codng of normalzed correcton factors mn max r R,, (10) s performed by translatng of the value of each coeffcent j r nto the bnary codng wth a certan number of bts, called the gene. It s worth mentonng that the number of bts defnes the accuracy of the converson nto the bnary form. The complete genetc code of one soluton, the chromosome, results from the jonng of the bnary codng of the coeffcents j r, as shown n Fgure 4.

12 338 B. Stojanovć at al.: State Varables Updatng Algorthm for Open-Channel and Reservor Flow Smulaton Fg. 4. Bnary codng of the soluton As already mentoned, n case of correcton of nput varables n open-channel flows, the coeffcents t t are vared n a lmted number of moments n tme ( 1 t, 2 t,..., M ), and then, the coeffcent values for the other moments n tme are obtaned by lnear nterpolaton, as shown n Fgure 2. In order to avod soluton search outsde the range defned by the condton mn j max t s necessary to defne the functon mn max R,, that unambguously maps the set of values of the coeffcent nto the set of the normalzed coeffcents r, so that the condton 0r 1 holds true. Functon R must be of such nature that there exsts ts 1 nverse functon R r that maps the normalzed values of the correcton factors nto the set of ther real values Ftness functon In order to perform the selecton of speces, t s necessary to determne the ftness of each correspondng soluton. Therefore, t s necessary to defne mathematcally the noton of the congruence between the actual system and the mathematcal model, because the model wth a better congruence s of better qualty,.e. t has better ftness. In case of the proposed methodology, as the measure of congruence s used the recprocal tme-weghted mean absolute error of the water level on several typcal profles presented by the expresson (8), the proposed ftness functon wll have the form as follows: 1 F t p t E (11) t where the selected weghtng functon s pt / t T, and T s total updatng perod Descrpton of the procedure The ntal state durng updatng s the system state obtaned by the prevous calculaton based on hstorc data at the ntal tme of updatng. Intal populaton wll consst of several sets of randomly selected correcton factors j wthn the predefned lmtatons, based on whch the corrected system nflows j Q are to be calculated. The applcaton of these nflows provdes unsteady calculaton for the predefned updatng perod. After the calculaton, the devatons of water levels on control profles from the measured data are calculated and based on that, the values of the objectve functon F are also calculated. If the optmzaton crteron s acheved,

13 Journal of the Serban Socety for Computatonal Mechancs / Vol. 3 / No. 1, the obtaned soluton s declared to be the optmum one, what termnates the optmzaton procedure. However, f the optmzaton crteron s not acheved, the selecton among the obtaned solutons s performed accordng to one of the methods descrbed n (Mlvojevć, 2008). All selecton methods requre prevous qualty estmaton of all solutons based on the value of objectve functon. Based on that, only those solutons whose qualty meets the predefned rule are selected as the parents of the new populaton. After the end of the selecton process, the generaton of the new populaton s performed by combnng the genetc codes of the solutons whch passed the selecton procedure. In case of the present model, the obtaned correcton factors are normalzed by the functon R, then translated by bnary codng nto the genes and, fnally, nto soluton chromosomes. New speces that mae the new populaton, are created by the crossover of hgh-qualty soluton chromosomes. In order to avod the dentfcaton of local maxma of the objectve functon, the mutaton of the resultng genetc codes s ntroduced nto the process of creaton of a new populaton. Ths provdes for scatterng of a certan number of solutons beyond the local maxma that the majorty of populatons gravtate to. After the new populatons have been created, the entre procedure s repeated teratvely untl a satsfactory soluton s acheved, or untl a certan number of teratons have been performed. After that, the soluton can be declared acceptable due to the lac of solutons wth the requred accuracy. 5. Applcaton of the methodology for determnaton of the up-to-date state of the Iron Gate system 5.1. Descrpton of the system and the model of the Iron Gate system The Iron Gate system s the hydropower and navgaton system that conssts of the two hydropower plants ( Iron Gate 1 and Iron Gate 2") wth hydro-techncal structures, assocated storages and rparan areas (Fgure 5). The Iron Gate system exerts a large nfluence on the level of Danube Rver along the course of more than 300 m. The avalable hydropower potental s dvded nto parts that belong to the Serban and Romanan sdes, accordng to the mutually approved procedures. In Serba a smulaton model for hydropower calculatons and management of the explotaton of the of hydropower plants Iron Gate was developed for the purpose of the effcent use of the Danube Rver hydropower potental and meetng the demands of Serban and Romanan electrcty generaton and transmsson systems wth observance of the seres of lmtatons on the control profles on Danube Rver, defned n the state-level documents. The detaled descrpton of the Iron Gate system and smulaton model s gven n paper (Dvac et al. 2009). The setup of the model of the Iron Gate system ncludes, among the others, the dvson of the rver course nto the sub-courses along whch the flow process has been descrbed by a hydraulc model whch s based on Sant-Venant equatons. Wthn the standard hydraulc module, the advanced calculaton formulatons provde for the smulaton of the flow through varous objects (nternal boundary condtons), such as power plants, spllways, gates and smlar. For the soluton of the problem of the unsteady flow n open channels, the present equatons were used to defne the matrx forms of the problem. Solvng of these forms s based on the applcaton of the fnte dfferences method (Grujovć et al. 2009).

14 340 B. Stojanovć at al.: State Varables Updatng Algorthm for Open-Channel and Reservor Flow Smulaton Fg. 5. Hydrographc networ wth the objects of the Iron Gate system 5.2. Role of the up-to-date state of the Iron Gate system and ts nfluence on operatonal management Accordng to the Rule Boo of organzaton and operaton of Jont Energy Dspatchng Servce, the explotaton of the Iron Gate system requres the preparaton of the daly plan of explotaton for the current and the followng days. The daly plan of explotaton s then harmonzed by the Romanan and Serban sdes and afterwards appled. System utlzaton s performed accordng to the corrected and harmonzed daly plan of operaton for the gven day. The corrected and harmonzed daly plan of operaton determnes the method of explotaton of the system durng the current day. The current day s the perod between 6 AM of the calendar day and 6 AM of the next calendar day CET. The preparaton of the daly plan of explotaton under all condtons (when, accordng to the forecast, the nflows are expected that can be released through the hydropower unts and under the condtons when the forecasted nflows exceed the capacty of unts) s performed accordng to several ndcators. Some of the man ndcators are the water level n the storage at 6 AM on the current calendar day, forecasted mean daly nflow nto the storage of the Iron Gate 1 system for the current and next 4-6 days, global daly prortes defned both for Romanan and Serban sdes, observance of all lmtatons on all control profles foreseen by the Rule Boo and smlar. The daly plan harmonzes (between the system users both on Serban and Romanan sdes) the elements such as the mean daly level of Danube Rver at the Nera Rver confluence, mean daly outflow from the Iron Gate 1 and Iron Gate 2 systems, volume of splled water expressed n the form of equvalent energy and smlar. "Iron Gate smulaton model s very useful tool to the dspatchers. It can be used n desgn, testng and correcton of the daly plans of electrcty generaton. For the smulaton model to

15 Journal of the Serban Socety for Computatonal Mechancs / Vol. 3 / No. 1, gve useable results, t s also very mportant to have good-qualty nput data and to have up-todate state at the start of each day. Up-to-date system state means that ntal condtons of the smulaton model are harmonzed wth the latest avalable data measured n the system (realtme data). The everyday use of the Iron Gate smulaton model ncludes the two followng steps: Adjustng the smulaton model to the current up-to-date computatonal state usng the new updatng tools and the exstng prevous computatonal state (.e., 3 days old state) and Performng the smulaton. Determnaton of the current up-to-date computatonal state wthn the smulaton model s performed accordng to the same method, regardless of the smulaton regme,.e. of the purpose of applcaton of the smulaton model. Ths step s a necessary precondton for the applcaton of the smulaton model n terms of plan testng, accuracy of event reconstructon and smlar Analyss of avalable data In the course of verfcaton of the mathematcal model the data on values that change n tme (tme seres), obtaned upon measurements performed by the Investor or Republc Hydrometeorology Servce of Serba (RHMS), s used. It s necessary to collect data n dfferent tme dscretzatons,.e. n fve-mnute, ffteen-mnute, hourly and daly dscretzatons. Further, an overvew of the tme seres classfed accordng to the value beng measured and the locaton where ths value s measured s presented below Inflows nto system Mean daly dscharges are ssued by RHMS on the followng profles and they also represent the nflows nto the storage Iron Gate 1 : Bogojevo (Rver Danube), Senta (Rver Tsa), Sremsa Mtrovca (Rver Sava), Bel Brod (Rver Kolubara), Jaša Tomć (Rver Tamš), Ljubčevs brdge (Rver Vela Morava), Velo Selo (Rver Mlava), Kusć (Rver Nera) and Kusće (Rver Pe). These dscharges are determned accordng to the measured values of level and dscharge curves. For the dscharge values to be acceptable, t s necessary to regularly update the dscharge curves, because the rverbed flow capacty changes n tme due to sedment deposts or eroson. Another problem s caused by the ntermttent nterruptons n measurement of water levels of small rvers: Kolubara, Tamš, Vela Morava, Nera, Mlava, Pe and Poreča. For the needs of the Iron Gate model the mssng data was flled n; however, regardless of the correctness of the method for fllng-n of data, the errors n nput nflows are nevtable due to the lac of orgnal data Powers and dscharges through the HPP unts The realzed powers are recorded for all unts both on the Serban and Romanan sdes of the Iron Gate 1 HPP (6+6 unts) and the Iron Gate 2 HPP (10+10 unts). Data s recorded n ten-second, fve-mnute and hourly dscretzaton. The realzed powers n the system Iron Gate are the varables that are measured wth the greatest accuracy and that can be consdered the most relable. The drect measurement of the dscharge through the turbnes n the fvemnute dscretzaton exsts only on the Iron Gate 1 HPP unts, both on Serban and Romanan sdes, whle the dscharge through the Iron Gate 2 HPP unts s calculated by the means of the

16 342 B. Stojanovć at al.: State Varables Updatng Algorthm for Open-Channel and Reservor Flow Smulaton value of specfc consumpton, the electrcty generaton durng the current hour and mean gross head durng the current hour, what results n certan naccuracy (because the nsde-hour HPP operatonal regme s not accounted for,.e. the unt effcency, as well as the degree of obstructon of trash racs on water ntaes for the unts). These hourly values of dscharge as derved values (.e. the values that were not drectly measured) exst for all unts n the Iron Gate 1 HPP and the Iron Gate 2 HPP Degree of openng of spllway gates Spllng over the dams s not an everyday event. Spllng over the Iron Gate 1 HPP and Iron Gate 2 HPP dams taes place manly durng the sprng season. The degree of openng of the gates on each spllway feld s recorded wth a varable tme step. The measurements are not performed automatcally, but the data s recorded manually (the start and the end of the spllng and the degree of the gate openng are recorded). Illogcal values,.e. accdental errors occur n data due to the factor of human error and the lac of control. The balancng analyses have ndcated that there s an extreme lac of accordance between the volume of water that flows nto the Iron Gate 2 HPP lae and the volumes of water that flow out of t, partcularly durng the spllng perods; hence, one can say that there are serous ndcatons that the exstng spllng curves are not adequate Water levels on automatc water level recorder statons The data related to the current water levels s measured on the automatc water level recorder statons n storages, on dam profles and before and after unts. Automatc water level recorder statons are located n: Pančevo, Ram, Bazjaš, Golubac, Dobra, Donj Mlanovac, on Iron Gate 1 dam, n Kladovo, Brza Palana, on Gogoš dam, on Iron Gate 2 dam, on Tmo confluence, n Turn Severn (Dubova) and Prstol. The measured values are archved n tensecond, fve-mnute and the hourly dscretzaton. The control of the measured values can be performed at the locatons wth multple measurement sources (for example, n Ram,.e., on the Rver Nera confluence, the measurements are comparable wth RHMS hydrologcal staton Banatsa Palana). Accdental errors on measurement statons are easly elmnated, whle systematc errors are dffcult to dentfy. In addton to mentoned errors, the nterruptons n the operaton of measurement statons occur. Headwater levels of the Iron Gate 1 HPP are measured before the water ntae for each unt and n another the upstream ponts, what results n 14 measurement statons n total. The talwater levels are measured n the nches of all draft-tube gates and n two more ponts along the flow, whch also results n 14 measurement statons n total. There are occasonally major dfferences between the ndvdual measurements (the dfference can amount even up to several tens of cm), whch s the consequence of ether accdental or systemc errors of the level gauges. The Iron Gate 2 HPP headwater and talwater levels are separately measured both on the Serban and Romanan sdes. In addton to these levels, the Gogoš HPP headwater and talwater levels are also measured. As on the other automatc water level recorder statons the measured values are archved n the ten-second, fve-mnute and hourly dscretzaton. 6. Example of the applcaton of the proposed methodology The proposed methodology was used for the chec of the daly plans for the perod from June 25 th, 2006 tll June 28 th, 2006.

17 Journal of the Serban Socety for Computatonal Mechancs / Vol. 3 / No. 1, At the start of the gven perod,.e. on June 25 th, an up-to-date state of the model s avalable, as well as current daly producton plan and nflow forecasts. By nputtng daly producton plan and nflow forecasts nto the model, the dspatcher s provded wth predcted model states for the current day (shown n Fgure 6 as blue lne). Ths way the dspatcher s able to revew daly producton plan,.e. to chec results aganst constrants and whether the plan s achevable. Upon revewng the daly producton plan, the dspatcher can begn wth ts realzaton followng the gudelnes for optmal unt commtment provded by the smulaton model. Snce the daly plan cannot account for the varablty of the demand n the dstrbuton networ, and due to the lac of the nowledge regardng the exact nflow nto the storage, the realzed water level n the storage at the end of the wor day wll not be equal to the expected one (the actual values of water levels are shown n Fgure 6 as red lne). The dfference n predcted and realzed water levels at the end of current day s obvous, and ths dfference s emphaszed on Fgure 6. Should next daly plan chec nave been performed wth current computatonal state, the model would contnue to ncrease the attaned dfference and provde false energy producton predctons. The state updatng module performs state update of smulaton model usng measured values for June 25 th and realzed producton plan for same day. The module s based on optmzaton algorthm whch at the begnnng of next producton day performs nflow correcton usng realzed producton values and brngs model to up-to-date state. The result of ths process s new up-to-date state of the model at the begnnng of producton day June 26 th, and prevous reconstructed states are shown n Fgure 6 as green dashed lne. Ths procedure s performed daly and t represents the foundaton of the operatve applcaton of the smulaton model. The procedure of model state updatng s shown n Fgure 6. Fg. 6. Procedure for updatng of model state llustrated by the example of the "Iron Gate 1 HPP headwater water level For the updatng tme on June 26 th, 2006 at 6 AM (as mared n Fgure 6), the Fgures 7, 8, 9, and 10 show the comparson between the measured and the smulated values of longtudnal level slope and water levels on the control profles, wth and wthout updatng.

18 344 B. Stojanovć at al.: State Varables Updatng Algorthm for Open-Channel and Reservor Flow Smulaton Fg. 7. Comparson between the actual and the computatonal water levels on the profles wth automatc level gaugng Fg. 8. State updatng on Dobra Profle Fg. 9. State updatng on Donj Mlanovac profle

19 Journal of the Serban Socety for Computatonal Mechancs / Vol. 3 / No. 1, Fg. 10. State updatng on Iron Gate 1 HPP headwater profle The dagrams above show that the applcaton of the presented method provdes for a sgnfcant reducton of the devaton of the smulated state values from the measured ones. The up-to-date system state obtaned n ths manner sgnfcantly reduces the error durng the system forecast perod. It s worth notcng that the correcton of the nput nflows consderably nfluences the water level n the Iron Gate 1 storage. Bearng n mnd the model scale, the forecasted nflows nto the storage represent less relable nput data; hence, t s justfed to perform ther correcton n order to obtan the up-to-date model state. 7. Conclusons The module for updatng of the system state by the method of nput data correcton represents an rreplaceable component n the systems that rely on the operatonal use of smulaton models of unsteady open-channel flows wth hydropower objects. One of the shortcomngs of ths method may be the problem of determnaton of correcton factors n the case of numerous system nputs. Snce, due to ther complexty, these models usually cannot be descrbed by the mathematcal formulae n closed form, t s not possble to defne the procedures whch would drectly lead to the optmum soluton. In order to overcome ths problem, genetc algorthms were selected for the varaton of correcton factors, where the optmum soluton search s based on the fundamental evoluton laws. By selectng a sutable objectve functon, codng method, selecton and mutaton methods, genetc algorthms can also be qute successfully appled to the problems of determnaton of the optmum correcton factors for nput values. An example of the mathematcal model for the hydropower and system management of the Iron Gate system of hydropower plants shows that the correcton of nput values by genetc algorthms may result n a satsfactory convergence of the smulated values towards the real values n the model updatng perod. The up-to-date state at the start of smulaton obtaned n ths manner results n a sgnfcantly better forecast of system behavor as compared to the forecasts obtaned wthout the correcton of the nput values; ths confrms the effcency of the presented methodology. In tmes of extremely fast development of parallel and mult-core computers, t s apparent that the future applcaton of genetc algorthms n determnaton of the up-to-date state of hydrologc systems wll gan addtonal mportance n smulatons of flows n open channels and storages.