optimal control of open-channel flow using adjoint...

14
Optimal Control of Open-Channel Flow Using Adjoint Sensitivity Analysis Yan Ding, M.ASCE 1 ; and Sam S.Y. Wang, F.ASCE 2 Abstract: An optimal flow control methodology based on adjoint sensitivity analysis for controlling nonlinear open channel flows with complex geometries is presented. The adjoint equations, derived from the nonlinear Saint-Venant equations, are generally capable of evaluating the time-dependent sensitivities with respect to a variety of control variables under complex flow conditions and cross-section shapes. The internal boundary conditions of the adjoint equations at a confluence junction derived by the variational approach make the flow control model applicable to solve optimal flow control problems in a channel network over a watershed. As a result, an optimal flow control software package has been developed, in which two basic modules, i.e., a hydrodynamic module and a bound constrained optimization module using the limited-memory quasi-Newton algorithm, are integrated. The effectiveness and applicability of this integrated optimal control tool are demonstrated thoroughly by implementing flood diversion controls in rivers, from one reach with a single or multiple floodgates with or without constraints, to a channel network with multiple floodgates. This new optimal flow control model can be generally applied to make optimal decisions in real-time flood control and water resource management in a watershed. DOI: 10.1061/ASCE0733-94292006132:111215 CE Database subject headings: Open channel flow; Sensitivity analysis; Floods; Geometry; Optimization. Introduction Controlling open channel flow is a key issue to mitigate hazard- ous flooding in a river basin, or to deliver water in an irrigation system according to a specified demand pattern. Typical flood controls consist of operating hydraulic structures in rivers, e.g., reservoirs in streams and/or floodgates on river banks, to regulate the peak flood discharge and eventually to prevent levees from overflowing and/or breaching. In case of emergency, flood diver- sion through floodgates, diversion channels, or deliberate levee breach can quickly lower the flood stage to mitigate flood haz- ards. For instance, the Bonnet Carré spillway in the lower Mis- sissippi River was opened to divert flood waters in 1997 U.S. Army Corps of Engineers USACE 1999. In addition to control- ling hazardous floods, flow control methodology can be used for evaluating reservoir management policies that minimize sediment scour and deposition in a river, e.g., a practice in the Yazoo River Basin, Mississippi, reported by Nicklow and Mays 2000, and a larger scale operation of flushing sediment out of the Xiaolangdi Reservoir in the lower Yellow River Yellow River Conservancy Commission YRCC2004. Flow control in an open channel also can enhance pollutant disposal management by controlling pollutant discharge in compliance with the environmental laws and eventually protecting water quality e.g., Piasecki and Kato- podes 1997a,b. Undoubtedly, optimal flow control techniques are vitally important to practice better water resources management and to achieve sustainable development of an economy and soci- ety that largely rely on limited water resources. The basic characteristics of open channel flow in the real world are nonlinearities and temporal/spatial nonuniformities. Therefore, optimal flow control requires a forecasting model ca- pable of predicting the nonuniform and unsteady water flow in space and time. In case of fast propagation of a flood wave from upstream, only a very short time may be available for predicting the flood flow downstream. Due to the limited time for making a flood mitigation decision, it is crucial for decision makers to have an efficient model, which can predict flows quickly and reliably for the selection of an optimal flow control decision. Generally speaking, an optimal flow control system is of real time, which can identify dynamic variations of a nonlinear unsteady flow. In the case of flood diversion, once a flood is diverted from a levee, depression waves would be generated from the diversion point traveling both upstream and downstream. Because the propaga- tions of the waves are also nonlinear, the effect of the flood di- version on the mitigation cannot be obtained straightforwardly. Due to the flow nonlinearities, it is difficult to establish the rela- tionship between the control action and the responses of the hydrodynamic variables stage and discharge. With the advent of modern control theories and numerical methodologies, adaptive control and nonlinear optimization have made the solution of nonlinear flow control possible. An effective approach to establish the relationship between control actions and system responses is to implement sensitivity analysis for the con- trol variables. Once a certain form of objective function for the control actions is defined, the sensitivity analysis is generally used to evaluate the gradient of the objective function. In general, 1 Research Assistant Professor, National Center for Computational Hydroscience and Engineering, Univ. of Mississippi, University, MS 38677. E-mail: [email protected] 2 FAP Barnard Distinguished Professor and Director, National Center for Computational Hydroscience and Engineering, Univ. of Mississippi, University, MS 38677. Note. Discussion open until April 1, 2007. Separate discussions must be submitted for individual papers. To extend the closing date by one month, a written request must be filed with the ASCE Managing Editor. The manuscript for this paper was submitted for review and possible publication on December 13, 2004; approved on February 7, 2006. This paper is part of the Journal of Hydraulic Engineering, Vol. 132, No. 11, November 1, 2006. ©ASCE, ISSN 0733-9429/2006/11-1215–1228/ $25.00. JOURNAL OF HYDRAULIC ENGINEERING © ASCE / NOVEMBER 2006 / 1215

Upload: others

Post on 15-Jun-2020

7 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Optimal Control of Open-Channel Flow Using Adjoint ...ding/research/optimization/ding_control_J… · Optimal Control of Open-Channel Flow Using Adjoint Sensitivity Analysis Yan Ding,

Optimal Control of Open-Channel Flow Using AdjointSensitivity Analysis

Yan Ding, M.ASCE1; and Sam S. Y. Wang, F.ASCE2

Abstract: An optimal flow control methodology based on adjoint sensitivity analysis for controlling nonlinear open channel flows withcomplex geometries is presented. The adjoint equations, derived from the nonlinear Saint-Venant equations, are generally capable ofevaluating the time-dependent sensitivities with respect to a variety of control variables under complex flow conditions and cross-sectionshapes. The internal boundary conditions of the adjoint equations at a confluence �junction� derived by the variational approach make theflow control model applicable to solve optimal flow control problems in a channel network over a watershed. As a result, an optimal flowcontrol software package has been developed, in which two basic modules, i.e., a hydrodynamic module and a bound constrainedoptimization module using the limited-memory quasi-Newton algorithm, are integrated. The effectiveness and applicability of thisintegrated optimal control tool are demonstrated thoroughly by implementing flood diversion controls in rivers, from one reach with asingle or multiple floodgates �with or without constraints�, to a channel network with multiple floodgates. This new optimal flow controlmodel can be generally applied to make optimal decisions in real-time flood control and water resource management in a watershed.

DOI: 10.1061/�ASCE�0733-9429�2006�132:11�1215�

CE Database subject headings: Open channel flow; Sensitivity analysis; Floods; Geometry; Optimization.

Introduction

Controlling open channel flow is a key issue to mitigate hazard-ous flooding in a river basin, or to deliver water in an irrigationsystem according to a specified demand pattern. Typical floodcontrols consist of operating hydraulic structures in rivers, e.g.,reservoirs in streams and/or floodgates on river banks, to regulatethe peak flood discharge and eventually to prevent levees fromoverflowing and/or breaching. In case of emergency, flood diver-sion through floodgates, diversion channels, or deliberate leveebreach can quickly lower the flood stage to mitigate flood haz-ards. For instance, the Bonnet Carré spillway in the lower Mis-sissippi River was opened to divert flood waters in 1997 �U.S.Army Corps of Engineers �USACE� 1999�. In addition to control-ling hazardous floods, flow control methodology can be used forevaluating reservoir management policies that minimize sedimentscour and deposition in a river, e.g., a practice in the Yazoo RiverBasin, Mississippi, reported by Nicklow and Mays �2000�, and alarger scale operation of flushing sediment out of the XiaolangdiReservoir in the lower Yellow River �Yellow River ConservancyCommission �YRCC� �2004��. Flow control in an open channel

1Research Assistant Professor, National Center for ComputationalHydroscience and Engineering, Univ. of Mississippi, University, MS38677. E-mail: [email protected]

2FAP Barnard Distinguished Professor and Director, National Centerfor Computational Hydroscience and Engineering, Univ. of Mississippi,University, MS 38677.

Note. Discussion open until April 1, 2007. Separate discussions mustbe submitted for individual papers. To extend the closing date by onemonth, a written request must be filed with the ASCE Managing Editor.The manuscript for this paper was submitted for review and possiblepublication on December 13, 2004; approved on February 7, 2006. Thispaper is part of the Journal of Hydraulic Engineering, Vol. 132, No. 11,November 1, 2006. ©ASCE, ISSN 0733-9429/2006/11-1215–1228/

$25.00.

JOURNAL

also can enhance pollutant disposal management by controllingpollutant discharge in compliance with the environmental lawsand eventually protecting water quality �e.g., Piasecki and Kato-podes 1997a,b�. Undoubtedly, optimal flow control techniques arevitally important to practice better water resources managementand to achieve sustainable development of an economy and soci-ety that largely rely on limited water resources.

The basic characteristics of open channel flow in the realworld are nonlinearities and temporal/spatial nonuniformities.Therefore, optimal flow control requires a forecasting model ca-pable of predicting the nonuniform and unsteady water flow inspace and time. In case of fast propagation of a flood wave fromupstream, only a very short time may be available for predictingthe flood flow downstream. Due to the limited time for making aflood mitigation decision, it is crucial for decision makers to havean efficient model, which can predict flows quickly and reliablyfor the selection of an optimal flow control decision. Generallyspeaking, an optimal flow control system is of real time, whichcan identify dynamic variations of a nonlinear unsteady flow. Inthe case of flood diversion, once a flood is diverted from a levee,depression waves would be generated from the diversion pointtraveling both upstream and downstream. Because the propaga-tions of the waves are also nonlinear, the effect of the flood di-version on the mitigation cannot be obtained straightforwardly.Due to the flow nonlinearities, it is difficult to establish the rela-tionship between the control action and the responses of thehydrodynamic variables �stage and discharge�.

With the advent of modern control theories and numericalmethodologies, adaptive control and nonlinear optimization havemade the solution of nonlinear flow control possible. An effectiveapproach to establish the relationship between control actions andsystem responses is to implement sensitivity analysis for the con-trol variables. Once a certain form of objective function for thecontrol actions is defined, the sensitivity analysis is generally

used to evaluate the gradient of the objective function. In general,

OF HYDRAULIC ENGINEERING © ASCE / NOVEMBER 2006 / 1215

Page 2: Optimal Control of Open-Channel Flow Using Adjoint ...ding/research/optimization/ding_control_J… · Optimal Control of Open-Channel Flow Using Adjoint Sensitivity Analysis Yan Ding,

there are three methods applicable to calculations of sensitivitycoefficients of control variables: �1� the influence-coefficientmethod; �2� the sensitivity-equation method; and �3� the adjoint-equation method �Yeh 1986�. The influence-coefficient methodperturbs each of the variables one at a time. The sensitivity-equation method evaluates the partial derivatives of the physicalvariables with respect to each independent control variable in thegoverning equations. These two methods calculate sensitivity co-efficients directly. The adjoint-equation method, however, isbased on the variational principles, which connects the sensitivi-ties with the variations of physical variables and Lagrangian mul-tipliers through adjoint sensitivity analysis �ASA�. For modelsthat involve a large number of control variables and compara-tively few responses, e.g., the optimal time series of control vari-ables, the ASA can be performed very efficiently. For detaileddiscussions about the ASA, see Cacuci �1981�, Zou et al. �1993�,and Navon �1998�. In terms of the sensitivity-equation method,Ding et al. �2004� have evaluated several algorithms for identify-ing distributed Manning’s roughness coefficients in shallow waterflows, including the limited-memory quasi-Newton �LMQN�method. They have concluded that the LMQN algorithms canefficiently capture the objective parameters with high accuracy inthe strongly nonlinear open channel flows.

Through modern nonlinear optimization theory, many flowcontrol approaches have been established and tested over the pastyears, for obtaining optimal flow control with engineering appli-cations. In the early 1990s, Kawahara and Kawasaki �1990� pro-posed an optimal control of discharge release from a dam gate toreduce peak discharge in a flood and minimize water stage fluc-tuations, in which several control cases were achieved by usingthe ASA and the conjugate gradient algorithm. Hooper et al.�1991� applied a nonlinear stochastic optimization method �linearquadratic Gaussian control� to multiple-reservoir operation con-trol subject to constraints that represented system mass balanceand physical or operating limitations on reservoir releases.Sanders and Katopodes �1997� presented a control of dam gateoperation employing the simplified one-dimensional �1D� Saint-Venant equations, in which a rectangular cross section was con-sidered. Atanov et al. �1998� applied the ASA to control anupstream discharge in an irrigation canal; however, the applica-bility of the control model was strictly limited to the flow in asingle channel with a specific trapezoidal cross section. Sandersand Katopodes �1999a� further developed a control of gate open-ings at both the upstream and downstream directions in a waterdelivery canal with a rectangular channel cross section by meansof the adjoint sensitivity analysis and the BFGS algorithm �namedfor its discoverers, Broyden, Fletcher, Goldfarb, and Shanno�Nocedal and Wright 1999��. Recently, Dulhoste et al. �2004� ap-plied the nonlinear control theory to control water distributionwith a collocation method using the 1D fully nonlinear Saint-Venant equations. �Sanders and Katopodes 1999b,c� developedactive flood hazard mitigation through optimizing selective lateralflow withdrawal. They extended the control of the 1D flood flowto the two-dimensional �2D� flow, in which the 2D ASA can givemore complicated sensitivity patterns in the horizontal plane.Jaffe and Sanders �2001� further discussed the effects of breach-ing length and timing in a deliberate levee breaching for mitigat-ing a flood wave in a shallow water flow. Through the precedingbrief survey of the state-of-the-art open channel flow control, theresults confirm that optimal controls of open channel flows arepossible once the sensitivities about control variables are ob-tained; and the ASA can be applied to a large variety of flow

control problems. Nevertheless, the application of the advanced

1216 / JOURNAL OF HYDRAULIC ENGINEERING © ASCE / NOVEMBER 20

control theory is still limited to a simple geometric configuration,i.e., only a single channel with a prescribed cross section. Up tonow, there has not yet been a general model of flow control thatcan apply to the control of flow in a natural river or channelnetwork.

In this paper, an optimal flow control methodology based onthe ASA for controlling nonlinear open channel flows with com-plex geometries is presented. In order to make the flow controlmodel applicable to most realistic flows in a natural river andchannel network over a watershed, an advanced numerical modelcalled the CCHE1D model �Wu and Vieira 2002; National Centerfor Computational Hydroscience and Engineering �NCCHE�2004�, which is a systematically verified and validated tool toanalyze 1D open channel flows with natural flow conditions andcomplex cross-section geometries in a channel network, has beenselected as the forecasting model in the present optimal flow con-trol model. The adjoint equations of the CCHE1D hydrodynamicmodel are obtained by applying variational principles to the non-linear Saint-Venant equations. By means of the variational ap-proach, the internal boundary conditions of the adjoint equationsat a confluence in a channel network are derived. By imposing theinternal boundary conditions on every confluence, the nonlinearflow control problem in a channel network becomes well-established. Furthermore, the LMQN algorithm for bound-constrained optimization developed by Ding et al. �2004� isutilized for solving optimal flow control problems with high com-puting efficiency. The bound constrained optimization can takeinto account the limitations of control devices, e.g., the maximumdischarge of a floodgate. By integrating the aforementioned twobasic modules, i.e., the CCHE1D hydrodynamic module and theLMQN optimization solver, a flow control software package hasbeen developed to study real-time flood control under natural flowconditions in rivers or watersheds. The effectiveness and applica-bility of this optimal flow control model are demonstrated byapplying it to five basic cases of flood diversion controls in rivers,from one reach with a single or multiple floodgates �with or with-out constraints�, to a channel network with multiple floodgates.The results obtained are all physically reasonable. Therefore, thisoptimal flow control software can be applied to the design ofengineering measures for controlling the over-bank floods along areach of a natural river or a channel network in a watershed or ariver basin. This new flow control methodology can generally beapplied to optimal decision making in real-time flood control andwater resource management in a watershed.

Governing Equations

The 1D nonlinear Saint-Venant equations are used for simulatingopen channel flow in a single channel or a channel network,which consist of a continuity equation and a momentum equation,i.e.

L1 =�A

�t+

�Q

�x− q = 0 �1�

L2 =�

�t�Q

A� +

�x��Q2

2A2 � + g�Z

�x+ g

Q�Q�K2 = 0 �2�

where L1 and L2 represent the continuity equation and the mo-mentum equation, respectively; x=channel length coordinate;t=time; Q=Q�x , t�, discharge through a cross section; A=A�x , t�,

cross-sectional area; Z=Z�x , t�, water stage; �=momentum cor-

06

Page 3: Optimal Control of Open-Channel Flow Using Adjoint ...ding/research/optimization/ding_control_J… · Optimal Control of Open-Channel Flow Using Adjoint Sensitivity Analysis Yan Ding,

rection factor due to the nonuniformity of velocity distribution atthe cross section; g=gravitational acceleration; q=lateral outflowdischarge, which can be a control variable for flow diversion; andthe conveyance K=AR2/3 /n, where n=Manning’s roughness coef-ficient and R=hydraulic radius. The Saint-Venant equations, Eqs.�1� and �2�, can simulate open channel flows with complex cross-section shapes.

In the simulation of an unsteady channel flow during a stormperiod T, the Saint-Venant Eqs. �1� and �2� are subject to initialand boundary conditions. The simulation can be started from aninitial wet channel, i.e.

Q�t=0 = Q�x,0� and A�t=0 = A�x,0�, x � �0,L� �3�

where L�downstream channel length coordinate; and Q�x ,0� andA�x ,0� indicate, respectively, the base flow discharge and the wetcross-section area of the channel. In a single channel, a hy-drograph Q�0, t� is imposed at the upstream inlet at x=0, i.e.

Q�x=0 = Q�0,t�, t � �0,T� �4�

In a channel network, there may be several different hydrographsimposed at inlets of the main stem and tributaries. At the down-stream outlet, a time series of stage Z�L , t� can be imposed by

Z�x=L = Z�L,t�, t � �0,T� �5�

or a stage-discharge rating curve ��Z� can be used for specifyingthe discharge downstream, i.e.

Q�x=L = ��Z� �6�

Adjoint Sensitivity Analysis of Open-Channel Flow

Objective Function

The optimization problem for finding the optimal solution of acontrol variable in open-channel flow is to minimize the objectivefunction J, which is generally defined as an integration of a gen-eral measuring function f , i.e.

J =�0

T �0

L

f�Z,Q,q,x,t�dxdt �7�

where q is a control variable, e.g., the lateral outflow in Eq. �1�, ofwhich values need to be identified to control the flow diversion.The measuring function f can be a rational function of discharge,stage, and a control variable or a set of control variables. In thisstudy on flood control problems, the measuring function is de-fined as the discrepancy between the predicted stage Z�x , t� andthe maximum allowable water stage Zobj�x� in river banks:

f = WZ

LT�Z�x,t� − Zobj�x��4��x − x0�, if Z�x0� � Zobj�x0�

0, if Z�x0� � Zobj�x0�

�8�

where Wz=weighting factor, which is to adjust the scale of theobjective function; �=Dirac delta function; and x0=target reacheswhere the water stages are to be controlled. Notice that the mea-suring function in Eq. �8� evaluates the stage discrepancies overthe target reaches only where the predicted water stages becomehigher than the allowable water stage Zobj�x�, and the value ofZobj�x� could either be constant or vary along target reaches. As

for a certain form of the measuring function, Atanov et al. �1998�

JOURNAL

suggested the use of the fourth power in the measuring functionof Eq. �8� because it is more sensitive to the stage discrepancythan the conventional least-square form. The writers further foundthat the identification iteration process to minimize the fourthpower function was more stable than that of the least-square.

Adjoint Equations

The ASA is used to establish the relationship between flow vari-ables and adjoint variables, and then to determine the sensitivitiesof the control variables under the constraints of the governingequations. In order to minimize the objective function Eq. �7� andensure that the flow variables satisfy the governing Eqs. �1� and�2�, an augmented objective function J* can be constructed interms of a Lagrangian multiplier approach, namely

J* =�0

T �0

L

f�Z,Q,q,x,t�dxdt +�0

T �0

L

��AL1 + �QL2�dxdt

�9�

where �A and �Q are two Lagrangian multipliers. The sensitivitiesand the adjoint equations are evaluated by taking the variation ofJ* in Eq. �9� with respect to all flow variables and control vari-ables. Then, by using Green’s formula and the variation operator� in a time-space domain as illustrated in Fig. 1, the first variationof the augmented objective function, �J*, can be obtained. Omit-ting the tedious derivation, the final form of �J* is given as

�J* =�0

T �0

L � � f

�Z

�Z

�A�A +

� f

�Q�Q +

� f

�q�q�dxdt

−�0

T �0

L � ��A

�t+

g

B*

��Q

�x−

Q

A2

��Q

�t−

�Q2

A3

��Q

�x

+2g�1 + ��Q�Q�

AK2 �Q��Adxdt −�0

T �0

L � 1

A

��Q

�t+

�Q

A2

��Q

�x

+��A

�x−

2g�Q�K2 �Q��Qdxdt +�

0

T �0

L 2gQ�Q��Q

nK2 �ndxdt

+�0

T �0

L

�− �A��qdxdt + ��− �A +Q

A2�Q��A

−�Q

A�Q�dx + �� g

B* −�Q2

A3 ��Q�A + ��A +�Q

A2 �Q��Q�dt

�10�

where �A, �Q, �q, and �n=variations of cross-sectional area, dis-

Fig. 1. Solution domain of contour integral

charge, lateral outflow, and Manning’s n, respectively;

OF HYDRAULIC ENGINEERING © ASCE / NOVEMBER 2006 / 1217

Page 4: Optimal Control of Open-Channel Flow Using Adjoint ...ding/research/optimization/ding_control_J… · Optimal Control of Open-Channel Flow Using Adjoint Sensitivity Analysis Yan Ding,

B*=channel width on the water surface, and therefore,�A /�Z=B*; and �=2/3−4R / �3B*�. Note that the contour integralin Eq. �10� is integrated along the closed boundary line ABCD inthe solution domain shown in Fig. 1. To find the minimum of thefunction J, all terms multiplied by the variations �A and �Q mustbe set to zero, respectively, in order to establish the optimizationconditions, i.e., the adjoint equations on the two Lagrangian mul-tipliers. Collecting these terms in regard to �A and �Q in Eq. �10�,and setting the sum of these terms to zero, the following twoadjoint equations containing the adjoint variables, �A and �Q, areobtained:

��A

�t+

g

B*

��Q

�x−

Q

A2

��Q

�t−

�Q2

A3

��Q

�x+

2g�1 + ��Q�Q�AK2 �Q =

1

B*

� f

�Z

�11�

1

A

��Q

�t+

�Q

A2

��Q

�x+

��A

�x−

2g�Q�K2 �Q =

� f

�Q�12�

Multiplying Eq. �12� by Q /A, adding to Eq. �11�, and expandingthe derivative �f /�Z by considering the measuring function f inEq. �8�, the first adjoint equation can be updated as follows:

��A

�t+

Q

A

��A

�x+

g

B*

��Q

�x+

�2gQ�Q��Q

AK2

= 4WZ

B*LT�Z�x,t� − Zobj�x��3��x − x0�, if Z�x0� � Zobj�x0�

0, if Z�x0� � Zobj�x0�

�13�

Multiplying Eq. �12� by A, and noting that the measuring functionis independent of the discharge, the second adjoint equation con-taining the Lagrangian multiplier �Q is finally written as

��Q

�t+

�Q

A

��Q

�x+ A

��A

�x−

2Ag�Q�K2 �Q = 0 �14�

As a result, the adjoint equations of the nonlinear Saint-VenantEqs. �1� and �2� are composed of Eqs. �13� and �14�. The adjointequations are general formulations for the inverse analysis of 1Dunsteady channel flows with arbitrary cross-section shapes. Usinga similar approach, Atanov et al. �1998� obtained two adjointequations similar to the present ones. Unfortunately, their ap-proach is limited to a prismatic channel with a trapezoidal crosssection.

Boundary Conditions of Adjoint Equations for SingleChannel

The boundary conditions and the transversality conditions �or thefinal conditions� of the adjoint equations can be also sought interms of the variation of the augmented objective function. Takinginto account the contour integral in Eq. �10�, which is integratedin a rectangular time-space solution domain as shown in Fig. 1,let �I represent this contour integral; then this term also needs tobe zero so as to satisfy the extreme condition of the objective

*

function J , namely

1218 / JOURNAL OF HYDRAULIC ENGINEERING © ASCE / NOVEMBER 20

�I = ��− �A +Q

A2�Q��A −�Q

A�Q�dx + �� g

B* −�Q2

A3 ��Q�A

+ ��A +�Q

A2 �Q��Q�dt =�AB

�•� +�BC

�•� +�CD

�•�

+�DA

�•� =�0

L ��− �A +Q

A2�Q��A −�Q

A�Q�

t=0dx

+�0

T �� g

B* −�Q2

A3 ��Q�A + ��A +�Q

A2 �Q��Q� x=L

dt

−�0

L ��− �A +Q

A2�Q��A −�Q

A�Q�

t=T

dx

−�0

T �� g

B* −�Q2

A3 ��Q�A + ��A +�Q

A2 �Q��Q� x=0

dt = 0

�15�

where �·� stands for the integrand of the contour integral. First,considering the initial conditions, Eq. �3�, as specified conditions,the variations of cross-section area A and discharge Q at the ini-tial time must be zero. Therefore, the integral �AB�·� in Eq. �15�along the line AB �t=0� automatically vanishes. No initial condi-tions for the Lagrangian multipliers, �A and �Q, thus exist. Sec-ondly, because the values of Q and A at the final time T cannot bespecified, i.e., �A�x ,T��0 and �Q�x ,0��0, from the integral�CD�·� in Eq. �15� along the line CD �t=T�, the transversalityconditions �or the final conditions� of the Lagrangian multiplierscan be found:

�Q�x,T� = 0 and �A�x,T� = 0, x � �0,L� �16�

Due to these conditions, the adjoint Eqs. �13� and �14� must besolved backward in time. It is therefore inevitable to store thecomputed flow variables obtained in the forward computation of aflow over all time steps before implementation of the backwardcomputation of the adjoint variables. Thirdly, taking the firstvariation of the upstream boundary condition Eq. �4�, then�Q�0, t�=0 and �A�0, t��0. From the fourth integral �DA�·� inEq. �15�, the boundary condition of �Q upstream is obtained asfollows:

�Q�0,t� = 0, t � �0,T� �17�

This means that the Lagrangian multiplier �Q is always zero at theinlet. Finally, because of the downstream boundary condition Eq.�5�, �Z�L , t�=0 can be derived. Using the relation �A=B*�Z, andsetting the second integral �BC�·� in Eq. �15� to zero, the boundarycondition of the Lagrangian multipliers at a downstream outletcan be derived as

�A�L,t� = −��L,t�Q�L,t�

A�L,t�2 �Q�L,t�, t � �0,T� �18�

Internal Conditions for Confluence in Channel Network

In order to solve the adjoint equations for optimal control in achannel network, it is indispensable to impose the internal bound-ary conditions at every confluence in a channel network. Theseboundary conditions at a confluence can be found by a similarvariational approach as used earlier in this paper. For simplicity,the mathematical analyses regarding the conditions are briefly

described as follows: Taking into account a confluence in a chan-

06

Page 5: Optimal Control of Open-Channel Flow Using Adjoint ...ding/research/optimization/ding_control_J… · Optimal Control of Open-Channel Flow Using Adjoint Sensitivity Analysis Yan Ding,

nel network as shown in Fig. 2, which comprises three channels,i.e., Channel 1 and Channel 2 at the upstream, and Channel 3 atthe downstream, the internal boundary conditions of stages anddischarges are specified as follows:

Z1 = Z2 = Z3 and Q3 = Q1 + Q2 �19�

where Z1, Z2, and Z3 represent the stages in the cross sections 1,2, and 3, respectively; and Q1, Q2, and Q3 are the discharges atthe three cross sections. Taking the variations of the internalboundary conditions, Eq. �19�, at the confluence, and noting that�A /�Z=B*, one can readily derive the following relationshipsamong the variations of stages and discharges at the threesections:

�A1

B1* =

�A2

B2* =

�A3

B3* and �Q3 = �Q1 + �Q2 �20�

where B1*, B2

*, and B3*= channel widths on the water surfaces at the

three cross sections. By analog with the calculation of the firstvariation in Eq. �10�, the variation of J* in a channel network canbe obtained by integrating over the whole channel network in-cluding all confluences through the period of computation. As aresult, the formulation of �J* in a channel network is similar toEq. �10�. However, several additional terms in the contour inte-grals contributed from these confluences in a channel networkneed to be included. By choosing a confluence as an example,under the demand of the extreme condition, the additional termsof the variations resulting from the confluence should also vanishin the first variation of J*, namely

�0

T �� g

B* −�Q2

A3 ��Q�A + ��A +�Q

A2 �Q��Q� x=x1

dt

+�0

T �� g

B* −�Q2

A3 ��Q�A + ��A +�Q

A2 �Q��Q� x=x2

dt

−�0

T �� g

B* −�Q2

A3 ��Q�A + ��A +�Q

A2 �Q��Q� x=x3

dt = 0

�21�

where x1, x2, and x3= locations of the three cross sections at theconfluence illustrated in Fig. 2. Note that x1 and x2 are located,respectively, at the downstream end of Channels 1 and 2, and x3 isthe upstream inlet of Channel 3; the sign of the third term in Eq.�21� therefore is negative, in contrast to the other two terms. Bysubstituting Eq. �20� into Eq. �21�, the following equations withrespect to the Lagrangian multipliers are derived:

��A +�Q�Q

A2 �x=x1

= ��A +�Q�Q

A2 �x=x2

= ��A +�Q�Q

A2 �x=x3

Fig. 2. Configuration of confluence

�22�

JOURNAL

�g −B*�Q2

A3 ��Q x=x1

+ �g −B*�Q2

A3 ��Q x=x2

= �g −B*�Q2

A3 ��Q x=x3

�23�

Eqs. �22� and �23� are generally the internal boundary conditionsof the two Lagrangian multipliers at a confluence. By imposingall internal boundary conditions on every confluence in the chan-nel network, the adjoint equations and their boundary conditionson the channel network flows are well-defined and, therefore, areready for numerical solution.

Sensitivities of Flow Control Variables

Similarly, the sensitivities of control variables for open-channelflow control can be also obtained from the variation of the objec-tive function in Eq. �10�. In flood diversion control, the lateraloutflow q�xc , t� at a location of diversion xc is apparently an avail-able control variable. For simplicity, this study did not considerthe kind of facility installed at the place of diversion; there mightbe a pump station or an operational floodgate that is able to divertthe desired amount of the lateral outflow. Therefore, the optimalcontrol of the flood diversion is to minimize the objective func-tion Eq. �7� with the measuring function Eq. �8� so as to find anoptimal hydrograph of the lateral outflow at the location of diver-sion. To do so, the stages over target reaches can be secured fromoverflowing. From Eq. �10�, the variation of the objective func-tion J with respect to the control variable q at the location xc wasobtained as

�J�xc,t� =�0

T � � f

�q

x=xc

− �A�xc,t���q�xc,t�dt �24�

Because the measuring function f in Eq. �8� is independent of q,the sensitivity of the lateral outflow at the flood diversion struc-ture and a time tn is written readily as

�J

�q x=xc

t=tn

= − �A�xc,tn� �25�

As a result, the Lagrangian multiplier �A determines sufficientlythe sensitivity of the lateral outflow q. In addition, several othercontrol variables are also available for open-channel flow con-trols. These control actions could also be implemented by up-stream discharge, downstream water stage, and bed friction, eitherindividually or combined. As byproducts from the ASA, the cor-responding sensitivity formulations are provided as follows: First,in terms of the variational analysis about the contour integral inEq. �15�, it has been found that the sensitivity of upstream dis-charge Q�0, t� has a form similar to the sensitivity of the lateraloutflow in Eq. �24� because of its physical meaning being equiva-lent to q at the inlet. Next, the sensitivity of the downstreamcross-section area or water stage can be described as follows:

�J�A�L,t�� =�0

T �� � f

�A+ � g

B* −�Q2

A3 ��Q� x=L

�A�L,t�dt

�26�

Finally, the bed friction can also be a control action in open-

channel flow control, of which the sensitivity is written as

OF HYDRAULIC ENGINEERING © ASCE / NOVEMBER 2006 / 1219

Page 6: Optimal Control of Open-Channel Flow Using Adjoint ...ding/research/optimization/ding_control_J… · Optimal Control of Open-Channel Flow Using Adjoint Sensitivity Analysis Yan Ding,

�J�n� =�0

T �0

L � � f

�n+

2gQ�Q��Q

nK2 ��ndxdt �27�

The formulation of the sensitivity to Manning’s n can be imme-diately used for identification of the roughness coefficient �e.g.,Ding and Wang 2005�. By means of the relationships between thesensitivities of the control variables and the adjoint variables, thetemporal and spatial variations of the sensitivities can be readilydetermined after the two adjoint equations are solved. Therefore,theoretically, it is possible to integrate a variety of control sce-narios into a general model for multiple control actions in open-channel flows. However, in the following sections, only the flooddiversion control is used as an example of the control actions todemonstrate the effectiveness of the present optimal approach.

Numerical Approaches

The Saint-Venant equations, Eqs. �1� and �2�, were discretized bymeans of the implicit four-point finite-difference scheme pro-posed by Preissmann �1960�, which has been widely applied tosimulate 1D unsteady flows. Preissmann’s scheme provides a setof interpolation functions in time and space for evaluating valuesof a function and its derivations with respect to time and spacenear the ith spatial step and the nth time step, i.e.

�x,t� = ��i+1n+1 + �1 − ��i

n+1� + �1 + ���i+1n + �1 − ��i

n�

�28�

��x,t��t

= �i+1

n+1 − i+1n

�t+ �1 − ��

in+1 − i

n

�t�29�

��x,t��x

= i+1

n+1 − in+1

�x+ �1 − �

i+1n − i

n

�x�30�

where �t=time increment; �x=spatial length; x� �i�x ,�i+1��x� and t� �n�t , �n+1��t�; and � are two weighting pa-rameters less than or equal to one; and i

n= value of function atthe nth time step and the ith spatial step. The spatial length �x isnot limited to be constant; it can vary with reaches. For details ofthe numerical discretization for the Saint-Venant equations, onemay refer to Wu and Vieira �2002� or Liggett and Cunge �1975�.This implicit scheme has been also employed for solving thestrongly nonlinear adjoint Eqs. �13� and �14�, in which the valueof is about 0.50 in the following test cases for flood controls.Finally, a set of linear algebraic equations in regard to �A and �Q

with a tridiagonal matrix are solved by using a double sweepalgorithm.

Optimization Procedure

In order to find the optimal solution of a control variable, aniterative minimization procedure is generally required due to thenonlinearity of this optimization problem. Moreover, because thevalues of the time-dependent control variable at every time stephave to be identified, in case of only one control device, thelength of the array storing the control variable is identical to thetotal number of time steps in a control period T; this requires thata minimization procedure is able to handle a large-scale optimi-zation problem efficiently. Ding et al. �2004� have comprehen-

sively compared several minimization procedures and found that

1220 / JOURNAL OF HYDRAULIC ENGINEERING © ASCE / NOVEMBER 20

those procedures based on the LMQN method have the advan-tages of higher convergence rate, numerical stability, and compu-tational efficiency. Among those algorithms, the limited-memoryBroyden, Fletcher, Goldfarb, and Shanno �L-BFGS� algorithm iscapable of optimization in large-scale problems because of itsmodest storage requirements using a sparse approximation to theinverse Hessian matrix of an objective function �Nocedal andWright 1999�. Fig. 3 describes a flowchart for finding the optimalsolution of the control variable q used in the present study offlood diversion control. The CCHE1D hydrodynamic model �Wuand Vieira 2002� serves the purpose of computing discharge andstage. The ASA modules are to compute the Lagrangian multipli-ers through the adjoint Eqs. �13� and �14�. The sensitivity formu-lation, Eq. �25�, is to calculate the gradient of the objectivefunction. The linear search approach is to determine the searchingdirection d and the step size . The upstream hydrograph and thecross-section geometries will be the input data for the hydrody-namic model. The initially estimated lateral outflow rate can beset as a small negative value.

Due to the physical meanings of control variables and thelimitations of their values known from control devices and engi-neering experience, e.g., capacity of discharge at a spillway or apump station for flood diversion, the identification of the valueswith bound constraints about the capacities needs to be consid-ered. There are several kinds of nonlinear optimization methodsavailable for constrained optimization, e.g., penalty, barrier, aug-mented Lagrangian methods, sequential quadratic programming�SQP�, etc. �Nocedal and Wright 1999�. Although some optimi-zation methods �e.g., SQP� can solve more complicated con-strained problems with equality and/or inequality constraints,there are still limited algorithms capable of solving a large-scaleoptimization problem such as needed in the present study.L-BFGS-B is an extension of the limited memory algorithmL-BFGS. It is, at present, the only limited quasi-Newton algo-rithm capable of handling both large-scale optimization problemsand bounds on the control variables. For further descriptions of

Fig. 3. Flow chart for finding optimal control variable q by LMQNprocedure

the L-BFGS and the L-BFGS-B algorithms, one may refer to Liu

06

Page 7: Optimal Control of Open-Channel Flow Using Adjoint ...ding/research/optimization/ding_control_J… · Optimal Control of Open-Channel Flow Using Adjoint Sensitivity Analysis Yan Ding,

and Nocedal �1989� and Byrd et al. �1995�. In order to preservethe physical meaning of the control variable in every iterationstep, the L-BFGS-B procedure validated by Ding et al. �2004� isthus adopted in this study. The L-BFGS-B algorithm minimizesthe objective function J in Eq. �7� subject to the simple boundconstraints, i.e., qmin�q�qmax, where qmin and qmax mean, re-spectively, the maximum and minimum lateral outflow rates in aflood diversion structure.

Examples for Optimal Flood Diversion Control

The proposed optimal control methodology is validated by opti-mizing the lateral outflow rates in different types of flood diver-sions operated in both a hypothetical single channel and a channelnetwork. The real-time and adaptive flood controls described inthe paper are to control the water stages over the flooding areaunder the maximum allowable stages by opening one or severalfloodgates according to the obtained optimal flood diversion rates.

Optimal Controls of Flood Diversions in SingleChannel

Case 1: One Flood Diversion GateIn this case, a 10-km-long single channel with flat bed as shownin Fig. 4 conveyed a hypothetical flood represented by a triangu-lar hydrograph imposed at the upstream inlet over a flood dura-tion T. The triangular hydrograph at the inlet �x=0� is written asa time series of discharge, i.e.

Table 1. Parameters for Simulation of Channel Flow

Parameter Unit Value

L km 10.0

�x km 0.5

�t min 5.0

— 1.0a

� — 0.5

n s /m1/3 0.03

m — 7a

Fig. 4. Floodgate diversion control in single channel and cross-section shape �Case 1�

=0.55 was used for solving adjoint equations.

JOURNAL

Q�0,t� = Qb +Qp − Qb

Tpt , t � �0,TP�

Qb +Qp − Qb

T − Tp�T − t� , t � �TP,T�

�31�

in which Qp=peak discharge; Qb=base flow discharge; andTp=time to peak. The input numerical parameters in Table 1 andthe parametric values of the hydrograph in Table 2 were used torun the hydrodynamic model and then solve the adjoint equations.The same time step �t and spatial increment �x were used forsolving the Saint-Venant equations and the adjoint equations. Thenumber for the quasi-Newton update, m, in the L-BFGS-B proce-dure was set as 7. This channel was assumed to have a compoundcross section with a main channel and two flood plains as shownin Fig. 4. The maximum allowable stage in the entire channel washypothesized as a constant elevation of 3.5 m, i.e., 1.5 m higherthan the elevation of the flood plain. The weighting factor Wz wasset to a large number, 103, for all the following cases, because itwas found that the magnitude of the adjoint variables was verysmall, and scaled with Wz. This large number of Wz can stabilizethe computations of the adjoint equations and eliminate the trun-cation error of the computations.

The floodgate for operating the flood diversion was supposedto be located at 7 km downstream from the inlet as shown in Fig.4, where the optimal flood diversion rate q�t� was identified inorder to keep the water stage below the maximum allowable oneover a target reach. The target reach x0 for mitigating the hazard-ous flood in this case was assumed to cover the whole channel.The minimization of the objective function defined in Eq. �7� withthe measuring function Eq. �8� resulted in the optimal lateral out-flow rate. Through the L-BFGS-B algorithm, the optimal lateraloutflow was found iteratively, and the process for searching isshown in Fig. 5. Notice that the identified discharge q�t� was avector with the number of components equal to the number of

Table 2. Hydrograph Parameters, Maximum Stage Zobj, and WeightingFactor Wz

Parameter Unit Value

Qp m3/s 100.0

Qb m3/s 10.0

Tp h 16.0

T h 48.0

Zobj m 3.5

Wz — 103

Fig. 5. Iterations for searching optimal lateral outflow in Case 1

OF HYDRAULIC ENGINEERING © ASCE / NOVEMBER 2006 / 1221

Page 8: Optimal Control of Open-Channel Flow Using Adjoint ...ding/research/optimization/ding_control_J… · Optimal Control of Open-Channel Flow Using Adjoint Sensitivity Analysis Yan Ding,

total time steps in the simulations, i.e., 577 components �the floodduration =48 h, and the time step =5 min, as shown in Tables 1and 2�. That means that 577 values of the parameter q�t� have tobe identified. To explain the performance of the optimization pro-cedure, the optimal control model was run iteratively till the val-ues of the control parameters no longer changed. In the meantime,the double precision arithmetic for solving the adjoint variableswas implemented. Fig. 6 shows the iterative histories of the ob-jective function values and the norm of its gradient �i.e.,��J�q��2�. One sees that the control variable converged after 15iterations using the L-BFGS-B. The discharge obtained after 15iterations is considered as the optimal solution for which the ob-jective function and its gradient are minimized. Moreover, theflood control model took only about 1 s of CPU time for perform-ing one iteration of the optimization by using a personal computerwith a 330 MHz CPU. For this kind of optimization problem with21 nodal points along the channel and 577 control parameters�577 time steps for the hydrograph�, the control model found theoptimal solution with only 15 s of CPU time.

As for the sensitivity of the lateral outflow described in Eq.�25�, the variation of the sensitivity �J /�q in space and time at thefirst iteration of the minimization process is shown in Fig. 7. The

Fig. 6. Iterations of objective function and norm of objectivefunction gradient

Fig. 7. Distribution of sensitivity �J /�q in space �channel� and timeat first iteration of L-BFGS-B �Case 1�

1222 / JOURNAL OF HYDRAULIC ENGINEERING © ASCE / NOVEMBER 20

sensitivity to the lateral outflow characterizes consistently theflood process in the channel and reveals that the best location forthe floodgate would be located as far upstream as possible. Fig. 8shows the temporal variations of the sensitivity with respect to theq at the floodgate. Because the values of the sensitivity has van-ished �very close to zero after 15 iterations�, the minimum condi-tion �J /�q=0 has been satisfied numerically with sufficientlyhigh accuracy, thus mathematically proving that the obtained lat-eral outflow discharge after 15 iterations in Fig. 5 was optimal.Comparisons of the stages in space and time between the uncon-trolled flood �q=0� and the optimal control flood are shown inFigs. 9�a and b�, respectively. In the uncontrolled flood, the high-est water stage reached 4.4 m so that the whole channel wouldovertop the banks when the peak discharge was passing. Con-versely, in the case in which the flood water was under the opti-mal flood diversion control, as shown in Fig. 9�b�, the flood wasmitigated significantly. Except for the first 2 km reach down-stream from the inlet, the flood water stages in the channel werebelow 3.5 m. Furthermore, the spatial and temporal variation ofthe controlled discharge is shown in Fig. 10. The optimally con-trolled discharge altered the single peak discharge in the uncon-trolled flood into two small peaks in the flood duration.Apparently, this flood mitigation was well implemented due to thepeak flood stage reduction by the optimal flood diversion.

In order to ascertain the convergence of the present optimiza-tion approach, refinement of the spatial lengths was performed inidentifying the optimal lateral outflow rate. In addition to theaforementioned spatial length ��x=500 m� with 20 reaches, threeother spatial lengths, i.e., 250, 166.67, and 125 m, were tested, bywhich the whole channel was refined uniformly into 40, 60, and80 reaches, respectively. The four optimal lateral outflow ratesobtained for the four different spatial lengths are compared in Fig.11. It implies that the convergence of the proposed optimizationmethod is excellent; even the coarsest grid size �500 m� gave asufficiently accurate result. Therefore, this coarsest grid size wasfurther used in the following two cases, Cases 2 and 3.

Case 2: One Flood Diversion Gate with Constraint ofMaximum DischargeIn the previous case, without any consideration of limitations tothe diversion discharge, the optimal diversion hydrograph in thedesignated floodgate in Fig. 5 obtained a peak of about 100 m3/s.However, in realistic flood diversion structures, the maximum dis-

Fig. 8. Iterative history of sensitivity �J /�q at control point �Case 1�

charge of flood diversion may be limited. In this case, all model

06

Page 9: Optimal Control of Open-Channel Flow Using Adjoint ...ding/research/optimization/ding_control_J… · Optimal Control of Open-Channel Flow Using Adjoint Sensitivity Analysis Yan Ding,

JOURNAL

parameters including channel bathymetry, inlet hydrograph, andnumerical model parameters were preserved from Case 1 wherethe spatial length was 500 m. However, only a constraint of themaximum lateral outflow discharge was imposed on the optimi-zation, which was to take account of the limitation of maximumdischarge capacity in a real floodgate or a spillway. Without lossof generality, this constraint simply assumed that the maximumlateral outflow rate qmax was 50 m3/s. The result of the con-strained optimization problem using the L-BFGS-B is shown inFig. 12. The optimal solution of the hydrograph was found after40 L-BFGS-B iterations, a number larger than that in the previouscase. By comparing this with the unconstrained optimization re-sult ��x=500 m� in Case 1 �short dashed lines shown in Fig. 12�,the maximum discharge of 50 m3/s for the constrained diversionin Case 2 was forced to last about 15 h in the flood mitigation.

Case 3: Three Flood Diversion GatesA realistic flood diversion system in a river may have severalfloodgates in different river reaches. For simplicity, as shown inFig. 13, it was assumed that three floodgates were located at 2,4.5, and 7 km. All the model parameters were the same as thosein Case 1 as listed in Tables 1 and 2, while the spatial length was500 m. By using the L-BFGS-B, three vectors of lateral outflowrates consisting of a total of 1,731 components �577 time steps foreach outflow hydrograph� have been identified, and these areshown in Fig. 14. The three optimal diversion rates at three di-version gates are different. The first floodgate �furthest� isrequired to divert more flood water than the others at its down-

Fig. 11. Comparisons of optimal lateral outflow rates by variousspatial lengths

Fig. 12. Iterations for searching optimal lateral outflow rate underconstraint of q�50 m3/s in Case 2

Fig. 9. Comparison of stages in space and time between uncontrolledflood and optimal control flood in Case 1 �planes show maximumallowable stage, Zobj�x�=3.5 m�: �a� no flood diversion �withoutcontrol�; �b� optimal flood diversion

Fig. 10. Distribution of discharges in space and time with optimalflood control in Case 1

OF HYDRAULIC ENGINEERING © ASCE / NOVEMBER 2006 / 1223

Page 10: Optimal Control of Open-Channel Flow Using Adjoint ...ding/research/optimization/ding_control_J… · Optimal Control of Open-Channel Flow Using Adjoint Sensitivity Analysis Yan Ding,

stream. The differences in the three flood diversions are due to thesensitivity with respect to the lateral outflow in Fig. 7. The mag-nitude of the sensitivity upstream is much larger than that down-stream; this reveals that the upstream diversion of flood would bemore sensitive �or effective� than that at downstream. The spatialand temporal distributions of main-channel discharge are shownin Fig. 15. The peak discharge in the flood was reduced in threestages along the channel. As the three floodgates mitigated thehazardous flood according to the sensitivity of the discharge, theamount of the optimal diversion discharge at each gate was muchsmaller than that of the single gate in the previous cases. Thevolumes of diverted flood water during the 48 h flood event forq1, q2, q3 were found to be 1,494,790, 1,072,832, and 613,039 m3.By considering the total volume 9,576,000 m3 of the flood watercoming from the inlet during the hydrograph, the percentages ofdiverted flood water in the total flood water for the three cases arecompared in Table 3. As the least water was diverted in Case 3,the multiple flood diversion is seen to be more efficient than asingle floodgate. Moreover, by comparing the objective functionsin the three cases shown in Fig. 16, it is found that the convergentdiversion rates in the multiple flood diversions can be obtainedwithout too many more iterations. Therefore, engineers may usethe optimization to determine the number of gates needed as wellas the best locations of floodgates to achieve a cost-effective floodcontrol plan.

Case 4: Flood Diversion with Varying Allowable StagesThe maximum allowable stage Zobj�x� might vary along the chan-nel, either continuously or discontinuously, due to the variation ofthe heights of levees in a river. In order to demonstrate the capa-bility of the optimal methodology in handling complex problems,this case assumed that the maximum allowable stage varied alongthe channel as a linear function of the channel length, i.e.,Zobj�x�=5.5−0.0002x, by which the allowable stages werechanged from 5.5 m at the inlet to 3.5 m at the outlet. To compare

Fig. 13. Three floodgates control problem in single channel �Case 3�

Fig. 14. Optimal flood diversion rates at three floodgates in singlechannel �Case 3�

1224 / JOURNAL OF HYDRAULIC ENGINEERING © ASCE / NOVEMBER 20

the results with that in Case 1, no constraint of the allowable stagewas imposed, and only one floodgate in the channel was operatedhypothetically in this case. The other model parameters in thiscase were similar to those in Case 1. Through approximately 15iterations of the searching process by the L-BFGS-B, the optimallateral outflow rate shown in Fig. 17 was obtained. The spatialand temporal variation of stage and the allowable stage are shownin Fig. 18. By comparison with Case 1, it was found that thediversion rate in this case was reduced dramatically.

Case 5: Optimal Control of Flood Diversions in ChannelNetworkThe dendritic channel network with a main stem and twobranches as shown in Fig. 19 was taken into account in this case,in which the compound cross section shown in Fig. 4 was as-sumed in all three channels, and there were two confluences.Three triangular hydrographs as defined in Eq. �31� were imposedon the three inlets of the channels, of which the parameters arelisted in Table 4. The hydrograph at the inlet of Channel 2 wasassumed to be the same as that of Channel 1. The hydrograph atthe inlet of Channel 3 �main stem� had a higher peak dischargethan those of the other two. In the simulation of flood propaga-tion, the channels were divided into a total of 43 short reacheswith equal spatial increments ��x=500 m�. To test the capabilityof the optimal control model for the channel network under com-plex flood diversion conditions, three floodgates were assumed tobe located at three different sites of the main stem, as shown inFig. 19. The maximum allowable stage was set to be 3.5 m overthe entire channel network. The optimization of the flood diver-sion problem was to find the three optimal flood diversion rates,i.e., q1�t�, q2�t�, and q3�t�, by minimizing the overflow water stagein time and space over the channel network. After about 20 itera-tions of the L-BFGS-B, the three optimal diversion rates werefound, and these are plotted in Fig. 20. The temporal variations ofthe three diversion hydrographs are quite similar to those of Case

Table 3. Comparison of Volume of Flood Diversion and Its Percentage inTotal Flood Water

CaseDiversion volume

�m3�Percentage of diversion

�%�

1 3,952,231 41.3

2 3,743,379 39.1

3 3,180,661 33.2

Fig. 15. Optimal main-channel discharge in time and space withthree flood diversions in Case 3

06

Page 11: Optimal Control of Open-Channel Flow Using Adjoint ...ding/research/optimization/ding_control_J… · Optimal Control of Open-Channel Flow Using Adjoint Sensitivity Analysis Yan Ding,

3, as shown in Fig. 14. The upstream floodgate was found to berequired to divert more flood water than the downstream ones dueto the different importance in the floodgate locations. Finally, thetemporal variations of the well-controlled stages under the opti-mal flood diversions at the three monitoring sites, i.e., A, B, and Cas shown in Fig. 19, are depicted in Fig. 21 by comparison withthe stages without flood control. The results of the controlledstages in the channel network show that the proposed optimalmethodology is capable of solving flood control problems in com-plex watersheds.

Conclusions

An optimal flow control methodology based on the adjoint sensi-tivity analysis �ASA� for controlling nonlinear open-channelflows with complex geometries has been established and pre-sented. The adjoint equations, derived from the nonlinear Saint-Venant equations, are generally capable of evaluating thesensitivities with respect to a variety of control variables undercomplex flow conditions and cross-section shapes. The internalboundary conditions at a confluence in a channel network derivedby the variational approach make the flow control model appli-cable to solve optimal flow control problems in a channel networkover a watershed.

By means of the proposed optimization approach, an optimalflow control software package has been developed, in which twobasic modules, i.e., a hydrodynamic and an optimization module,were integrated. The CCHE1D hydrodynamic model developed at

Fig. 16. Comparison of objective functions in Cases 1, 2, and 3

Fig. 17. Optimal lateral outflow rate and inlet hydrograph in Case 4

JOURNAL

the National Center for Computational Hydroscience and Engi-neering at the University of Mississippi, a model that has beensystematically verified by analytic solutions and validated by bothlaboratory experiments and site-specific field data of the GoodwinCreek Experimental Watershed, which has been monitored con-tinuously for more than 20 years by the U.S. Department of Ag-riculture �USDA� National Sedimentation Laboratory in Oxford,Mississippi �Wu and Vieira 2002; NCCHE 2004�, was adopted asthe hydrodynamic module. The optimization module included anumerical solver for the adjoint equations and an optimizationprocedure based on the limited-memory quasi-Newton �LMQN�method developed by Ding et al. �2004�, which has been provenaccurate, stable, and efficient for studies of several nonlinear op-timization problems �Ding et al. 2004; Ding and Wang 2005�.

This integrated computational model, containing these twovalidated and proven powerful modules together with the specialschemes to treat the boundary and internal conditions as well as toenhance the stability and efficiency, was applied to study a series

Fig. 18. Stage in time and space under optimal diversion in Case 4�slope shows varying maximum allowable water stage�

Fig. 19. Configuration of channel network with three floodgates inCase 5

OF HYDRAULIC ENGINEERING © ASCE / NOVEMBER 2006 / 1225

Page 12: Optimal Control of Open-Channel Flow Using Adjoint ...ding/research/optimization/ding_control_J… · Optimal Control of Open-Channel Flow Using Adjoint Sensitivity Analysis Yan Ding,

of five basic cases of flood control in rivers, from one reach witha single or multiple floodgates �without or with constraints�, to achannel network with multiple floodgates. The results obtainedare all reasonable physically with high computing efficiency. Thismodel is robust and reliable and can obtain the optimal solution ofa flood control event for a channel network within minutes.Therefore, the model development phase of this project iscomplete.

This new optimal flow control model can be applied to thedesign of engineering measures for controlling over-bank floodsalong a reach of a natural river or a channel network in a water-shed. It can also be applied to schedule effective operation of asystem of flood control measures in real time during a floodpropagation event. Because it is based on optimal control theory,the system of flood control measures designed as well as theoperational control variable selection and processes can be ob-tained to achieve the objectives within the constraints prescribed.

In the near future, the research is to be extended to includeselection of the total number of flood control measures, the vari-ous types of measures, and the locations of each measure toachieve the highest cost-effectiveness in terms of construction andoperation while meeting all constraints. Also planned is develop-ment of a decision support system for real-time operational sched-ules of all flood control measures during each individual floodevent for reduction or elimination of damages caused by extremeevents, including terrorist actions.

Acknowledgments

This work was a result of research sponsored by the USDA Ag-riculture Research Service under Specific Research AgreementNo. 58-6408-2-0062 �monitored by the USDA-ARS NationalSedimentation Laboratory� and the University of Mississippi.Special appreciation is expressed to Dr. Mustafa Altinakar and Dr.

Table 4. Hydrograph Parameters, Maximum Stage Zobj, and Manning’s nin Channel Network

Channelnumber

QP

�m3/s�Qb

�m3/s�Tp

�h�T

�h�Zobj

�m�n

�s /m1/3�

1 50.0 2.0 16.0 48.0 3.5 0.01

2 50.0 2.0 16.0 48.0 3.5 0.02

3 60.0 6.0 16.0 48.0 3.5 0.03

Fig. 20. Optimal flood diversion rates at three floodgates in channelnetwork �Case 5�

1226 / JOURNAL OF HYDRAULIC ENGINEERING © ASCE / NOVEMBER 20

Dalmo Vieira for their comments and assistance in running theCCHE1D model. The writers are thankful to the anonymous re-viewers for their critical comments.

Appendix. Derivation of Eq. „10…

Because the augmented objective function J* is a multivariablefunction with changes in its variables Z, Q, n, and q, the first-order variation of the function, �J*, is given by a sum of threeterms:

�J* =�0

T �0

L

��f + �A�L1 + �Q�L2�dxdt �32�

where �L1= variation of the continuity Eq. �1� and �L2 that of Eq.

Fig. 21. Comparison of stages between control and uncontrolledstates at three monitoring sites in channel network �Case 5�: �a� stageat point A; �b� stage at point B; and �c� stage at point C

�2�; the variation of the measuring function f becomes

06

Page 13: Optimal Control of Open-Channel Flow Using Adjoint ...ding/research/optimization/ding_control_J… · Optimal Control of Open-Channel Flow Using Adjoint Sensitivity Analysis Yan Ding,

�f =� f

�Z

�Z

�A�A +

� f

�Q�Q +

� f

�q�q �33�

where �A= variation of cross-section area, which has a relationwith the variation of water stage, i.e., �A=B*�Z; �Q= variation ofdischarge; and �q= variation of the lateral outflow rate. The varia-tion of Eq. �1� can be readily written as follows:

�L1 =��A

�t+

��Q

�x− �q �34�

The variation of the momentum equation can be derived asfollows:

�L2 =�

�t�A�Q − Q�A

A2 � +�

�x��AQ�Q − �Q2�A

A3 +g

B*�A�+

2g�Q�K2 �Q −

2g�1 + ��Q�Q�AK2 �A +

2gQ�Q�nK2 �n �35�

Given two arbitrary functions M and N, Green’s formula reads

�0

T �0

L � �M

�t+

�N

�t�dxdt = − Mdx + Ndt �36�

The temporal/spatial domain of the contour integral in Eq. �36� isdefined as the closed boundary line ABCD shown in Fig. 1. Ap-plying Green’s formula to the second integral in Eq. �32�:

�0

T �0

L

�A�L1dxdt =�0

T �0

L � ���A�A��t

+���A�Q�

�x�dxdt

−�0

T �0

L � ��A

�t�A +

��A

�x�Q�dxdt

−�0

T �0

L

�A�qdxdt = �− �A�Adx

+ �A�Qdt� −�0

T �0

L � ��A

�t�A +

��A

�x�Q�dxdt

−�0

T �0

L

�A�qdxdt �37�

The third integral in Eq. �32� can be derived by applying the sameapproach to Eq. �35�, i.e.

�0

T �0

L

�Q�L2dxdt = �− �A�Q − Q�A

A2 ��Qdx

+ ��AQ�Q − �Q2�A

A3 +g�A

B* ��Qdt�−�

0

T �0

L ��A�Q − Q�A

A2 � ��Q

�t

+ ��AQ�Q − �Q2�A

A3 +g�A

B* � ��Q

�x�dxdt

+�0

T �0

L �2g�Q�K2 �Q�Q

−2g�1 + ��Q�Q�

AK2 �Q�A +2gQ�Q�

nK2 �Q�n�dxdt

�38�

JOURNAL

Substituting Eqs. �33�, �37�, and �38� into Eq. �32�, grouping theterms according to its variations �A, �Q, �n, and �q, the first-order variation of the augmented function �J* shown in Eq. �10�can be obtained.

Notation

The following symbols are used in this paper:A � cross section area;

B* � channel width on water surface;f � measuring function;g � gravitational acceleration;

J, J* � objective functions;K � conveyance;L � channel length;

L1, L2 � operators of continuity and momentumequations;

m � number of quasi-Newton update in L-BFGS;n � Manning’s roughness coefficient;Q � discharge;

Qp, Qb � peak and base flow discharges, respectively;Q1, Q2, Q3 � discharges at three cross sections of

confluence;q, q1, q2, q3

� control variables or lateral outflow rates;qmin, qmax � lower and upper bounds on values of outflow

rate;R � hydraulic radius;T � duration of storm or period of control action;

Tp � time to peak discharge in hydrograph;t, tn � time;Wz � weighting factor;

x � channel length coordinate;xc � location of flood diversion;x0 � target river reach;

x1, x2, x3 � three cross sections at confluence;Z � stage;

Zobj � allowable water stage;Z1, Z2, Z3 � stage at three cross sections of confluence;

� � momentum correction factor;��Z� � stage-discharge rating curve;

�t � time increment;�x � spatial length;

� � variation operator or Dirac delta function;�I � variation of boundary conditions; � weighting parameter in time;� � 2/3−4R / �3B*�;

�A, �Q � Lagrangian multipliers; � arbitrary physical variable; and� � weighting parameter in space.

References

Atanov, G. A., Evseeva, E. G., and Work, P. A. �1998�. “Variationalproblem of water-level stabilization in open channels.” J. Hydraul.Eng., 124�1�, 50–54.

Byrd, R. H., Lu, P., and Nocedal, J. �1995�. “A limited memory algorithmfor bound constrained optimization.” SIAM (Soc. Ind. Appl. Math.) J.Sci. Stat. Comput., 16�5�, 1190–1208.

Cacuci, D. G. �1981�. “Sensitivity theory for nonlinear system. I: Non-

linear functional analysis approach; II: Extensions to additional

OF HYDRAULIC ENGINEERING © ASCE / NOVEMBER 2006 / 1227

Page 14: Optimal Control of Open-Channel Flow Using Adjoint ...ding/research/optimization/ding_control_J… · Optimal Control of Open-Channel Flow Using Adjoint Sensitivity Analysis Yan Ding,

classes of responses.” J. Math. Phys., 22�12�, 2794–2812.Ding, Y., Jia, Y., and Wang, S. S. Y. �2004�. “Identification of Manning’s

roughness coefficients in shallow water flows.” J. Hydraul. Eng.,130�6�, 501–510.

Ding, Y., and Wang, S. S. Y. �2005�. “Identification of the Manning’sroughness coefficients in channel network using adjoint analysis.” Int.J. Comput. Fluid Dyn., 19�1�, 3–13.

Dulhoste, J.-F., Georges, D., and Besancon, G. �2004�. “Nonlinear controlof open-channel water flow based on collocation control model.” J.Hydraul. Eng., 130�3�, 254–266.

Hooper, E. R., Georgakakos, A. P., and Lettenmaier, D. P. �1991�. “Op-timal stochastic operation of Salt River project, Arizona.” J. Hydraul.Eng., 117�5�, 566–587.

Jaffe, D. A., and Sanders, B. F. �2001�. “Engineered levee breaches forflood mitigation.” J. Hydraul. Eng., 127�6�, 471–479.

Kawahara, M., and Kawasaki, T. �1990�. “A flood control of dam reser-voir by conjugate gradient and finite element method.” Proc., 5th Int.Conf. on Numerical Ship Hydrodynamics, K. Mori, ed., ShipbuildingResearch Association of Japan, Hiroshima, Japan, 45–56.

Liggett, J. A., and Cunge, J. A. �1975�. “Numerical methods of solutionof the unsteady flow equations.” Unsteady flow in open channels, K.Mahmood and V. Yevjevich, eds., Water Resources, Littleton, Colo.,142–163.

Liu, D. C., and Nocedal, J. �1989�. “On the limited memory method forlarge scale optimization.” Math. Program. Series B, 45�3�, 503–528.

National Center for Computational Hydroscience and Engineering�NCCHE�. �2004�. “CCHE1D-applications: Application to GoodwinCreek experimental watershed.” �http://www.ncche.olemiss.edu/index.php?page�ccheld_applications� �Dec. 5, 2004�.

Navon, I. M. �1998�. “Practical and theoretical aspect of adjoint param-eter estimation and identifiability in meteorology and oceanography.”Dyn. Atmos. Oceans, 27�1–4�, 55–79.

Nicklow, J. W., and Mays, L. W. �2000�. “Optimization of multiple res-ervoir networks for sedimentation control.” J. Hydraul. Eng., 126�4�,232–242.

Nocedal, J., and Wright, S. J. �1999�. Numerical optimization, P. Glynnand S. M. Robinson, eds., Springer-Verlag, New York.

Piasecki, M., and Katopodes, N. D. �1997a�. “Control of contaminantreleases in rivers. I: Adjoint sensitivity analysis.” J. Hydraul. Eng.,

1228 / JOURNAL OF HYDRAULIC ENGINEERING © ASCE / NOVEMBER 20

123�6�, 486–492.Piasecki, M., and Katopodes, N. D. �1997b�. “Control of contaminant

release in rivers and estuaries. II: Optimal design.” J. Hydraul. Eng.,123�6�, 493–503.

Preissmann, A. �1960�. “Propagation des intumescences dans les canauxet rivières.” Proc., 1st Congrès, Assoc. Francaise de Calcul,Grenoble, France, 433–442 �in French�.

Sanders, B. F., and Katopodes, N. D. �1997�. “Optimal control of suddenwater release from a reservoir.” Proc., Managing Water: Coping withScarcity and Abundance, M. English and A. Szollosi-Nagy, eds., In-ternational Association of Hydraulic Research, Delft, The Nether-lands, 314–319.

Sanders, B. F., and Katopodes, N. D. �1999a�. “Control of canal flow byadjoint sensitivity method.” J. Hydraul. Eng., 125�5�, 287–297.

Sanders, B. F., and Katopodes, N. D. �1999b�. “Active flood hazard miti-gation. I: Bidirectional wave control.” J. Hydraul. Eng., 125�10�,1057–1070.

Sanders, B. F., and Katopodes, N. D. �1999c�. “Active flood hazard miti-gation. II: Omnidirectional wave control.” J. Hydraul. Eng., 125�10�,1071–1083.

U.S. Army Corps of Engineers �USACE�. �1999�. “Bonnet Carréspillway—Operation of the spillway.” �http://www.mvn.usace.army.mil/pao/bcarre/operation.htm� �Oct. 29, 2004�.

Wu, W., and Vieira, D. A. �2002�. “One-dimensional channel networkmodel CCHE1D 3.0—Technical manual.” Technical Rep. No.NCCHE-TR-2002-1, �http://www.ncche.olemiss.edu/content/software/ccheld/techmanual.pdf� �Nov. 15, 2004�.

Yeh, W. W.-G. �1986�. “Review of parameter identification procedures ingroundwater hydrology: The inverse problem.” Water Resour. Res.,22�2�, 95–108.

Yellow River Conservancy Commission �YRCC�. �2004�. “Artificial den-sity flow—The new achievements of the sediment transportation ex-periment on the Yellow River.” News of Yellow River ConservancyCommission, �http://www.yellowriver.gov.cn/lib/yrccnews3/2004-07-14/jj_0936259767l.html� �Oct. 23, 2004�.

Zou, X., Barcilon, A., Navon, I. M., Whitaker, J., and Cacuci, D. G.�1993�. “An adjoint sensitivity study of blocking in a two-layer isen-tropic model.” Mon. Weather Rev., 121�10�, 2833–2857.

06