TR_aut00-11

Embed Size (px)

Citation preview

  • 8/2/2019 TR_aut00-11

    1/6

    Hybrid Modeling and Control of a

    Hydroelectric Power Plant

    Giancarlo Ferrari-Trecate, Domenico Mignone, Dario Castagnoli, Manfred Morari

    Institut fur Automatik

    ETH - Eidgenossische Technische Hochschule Zurich

    CH-8092 Zurich

    Tel. + 41 1 632 7626 Fax + 41 1 632 1211

    http://control.ethz.ch{ferrari,mignone,castagnoli,morari}@aut.ee.ethz.ch

    Abstract

    In this work we present the model of a hydroelectricpower plant in the framework of Mixed Logic Dynam-ical (MLD) systems. Each outflow unit exhibits a hy-brid behaviour since flaps, gates and turbines are con-trolled with logical inputs and the outflow dynamicsdepend on the logical state of the unit. We show howto derive detailed models of each unit considering notonly standard operating conditions, but also emergen-cies and startup and shut-down procedures. The con-trol task can be formulated with a model predictivecontrol scheme.

    1 Introduction

    The outflow control for hydroelectric power plants isa multiobjective, multivariable control problem, thatcannot be handled with conventional control techniquesin its full generality. The final goal of maximal powergeneration can be achieved by properly distributing theoutflow through the available outflow units. In this

    Rake

    Reservoir

    Level sensor

    Flaps

    Gates

    reference levelWater

    Turbines

    Figure 1: Configuration of the river power plant

    paper we consider the hydro power plant described in[7, 8] that includes three types of water outflow units:Four gates, four flaps and two turbines. The weirs (i.e.gates and flaps) form a barrage across the river (seeFigure 1) and the total outflow of the dammed riveris determined both by the water level in the reservoir

    and by the opening of the units. The manipulated vari-ables are the openings of each outflow element and themeasured variables are the total outflow and the powergenerated.

    There are three main reasons why the outflow units aresuitably modeled as hybrid systems [13, 5]. First, theactuator action is given by a discrete input to the step-per motors of the components, namely the commandsto open, close, or leave unchanged the opening of theoutflow element. Second, the internal description ofevery element is a finite state machine that associatesdifferent opening dynamics to different logical states.

    Finally, the plant operation is strongly influenced byqualitative decision rules about the use of one type ofoutflow unit rather than another one. For instance ifthe desired outflow increases, the controller should firsttry to increase the flow through the turbines, ratherthan the openings of the weirs, in order to maximizethe produced power. A less trivial constraint is thatthe procedure of opening and closing an outflow ele-ment cannot be arbitrarily short. If an outflow elementhas started to move, it should be kept on moving for agiven minimal time.

    In this work we model the outflow units as hybrid sys-

    tems in the Mixed Logic Dynamical (MLD) form [4].For systems in MLD form the control synthesis prob-lem can be formulated and solved in a systematic wayusing a Model Predictive Control (MPC) scheme [4].Besides of being capable to handle the hybrid charac-teristics of the outflow elements, the MLD form allowsto prioritize the use of some outflow elements or outflowunits in certain operating regimes [11]. Other impor-tant reasons for using MLD models are the possibility

    p. 1

  • 8/2/2019 TR_aut00-11

    2/6

    relation logic mixed integerinequalities

    P1 AND S1 S2 1 = 1() 2 = 1

    P2 S3 1 + 3 0S1 S2 2 + 3 0

    1 + 2 3 1P3 OR () S1 S2 1 + 2 1P4 NOT () S1 1 = 0P5 IMPLY () S1 S2 1 2 0

    P6 [aTx 0] [ = 1] aTx + (m )

    P7 [ = 1] [aTx 0] aTx M MP8 IFF () S1 S2 1 2 = 0

    P9 [aTx 0] [ = 1] aTx M M

    a

    T

    x + (m )P10 Pro duct z = aTx z M

    z m

    z aTx m(1 )

    z aTx + M(1 )

    Table 1: Basic conversion of logic relations into mixed-integer inequalities.

    to solve fault detection and state estimation problemswithin a receding horizon estimation scheme [9].

    In Section 2 a concise introduction to MLD systems is

    given, showing the main steps for deriving MLD modelsof plants. The modeling procedure is then detailed inSection 3 with reference to the model of the flaps, thatare the simplest outflow units of the plant considered.A simulation of the flap unit is reported in Section 4and the main issues regarding the control of the overallplant are discussed in Section 5.

    2 Hybrid Systems in the MLD Form

    The derivation of the MLD form of an hybrid systems

    involves basically three steps [4]. The first one is to as-sociate with a statement S, that can be either true orfalse, a binary variable {0, 1} that is 1 if and onlyif the statement holds true. Then, the combinationof elementary statements S1, . . . , S q into a compoundstatement via the boolean operators and (), or (),not () can be represented as linear inequalities overthe corresponding binary variables i, i = 1, . . . , q. Theinequalities stemming from the basic compound state-ments are reported in Table 1. As an example considerP3, which says that the statement S1 S2 holds true ifand only if 1 and 2 sum up at least to one.

    A special statement is given by the condition aTx 0,where x X Rn is a continuous variable 1 and X is acompact set. If one defines m and M as lower and up-per bounds on aTx respectively, the inequalities in P9assign the value = 1 if and only if the value of x sat-isfies the threshold condition. Note that in P6 and P9, > 0 is a small tolerance (usually close to the machine

    1We call a variable continuous when it takes values in aninfinite set

    precision) introduced to replace strict inequalities bynon-strict ones.

    The second step is to represent the product betweenlinear functions and logic variables by introducing anauxiliary variable z = aTx. Equivalently, z is uniquelyspecified through the mixed-integer linear inequalitiesin P10.

    The third step is to include binary and auxiliary vari-

    ables in an LTI discrete-time dynamic system in orderto describe in a unified model the evolution of the con-tinuous and logic components of the system.

    The general MLD form of a hybrid system is [4]

    x(t + 1) = Ax(t) + B1u(t) + B2(t) + B3z(t) (1a)

    y(t) = Cx(t) + D1u(t) + D2(t) + D3z(t) (1b)

    E2(t) + E3z(t) E1u(t) + E4x(t) + E5 (1c)

    where x = [xTc xT ]

    T Rnc{0, 1}n are the continuousand binary states, u = [uTc u

    T ]

    T Rmc {0, 1}m arethe inputs, y = [yTc y

    T ]

    T Rpc {0, 1}p the outputs,and {0, 1}

    r

    , z Rrc

    represent auxiliary binaryand continuous variables respectively. All constraintson the state, the input, z and the variables are sum-marized in the inequality (1c). Note that, althoughthe description (1) seems to be linear, nonlinearity ishidden in the integrality constraints over the binaryvariables.

    MLD systems are a versatile framework to model var-ious classes of systems. For a detailed description ofsuch capabilities we defer to [4, 1]. In this paper wewill focus on the capability of MLD systems for describ-ing automata, systems driven by a discrete-input and

    Piece-Wise Affine (PWA) relations. From the guide-lines of this Section, it should be apparent that theprocedure for representing a hybrid system in the MLDform (1) can be automatized. A compiler (HYSDEL- HYbrid System DEscription Language) that gener-ates the matrices of the MLD system starting froma high-level description of the system is currently inBeta-testing at ETH Zurich [2].

    3 The Models of the Units

    The openings of the turbines and the weirs controlthe total outflow of the hydroelectric power plant. Anouter loop with a simple PI regulator usually controlsthe level of the water in the reservoir [14]. This level,denoted by uc in Figure 2, is a continuous input tothe system formed of flaps and gates. The opening [m] of a single weir is regulated by a stepper motorwhose behaviour in normal and emergency conditionsis described by the automaton in Figure 3. An emer-gency usually occurs when there are problems due to

    p. 2

  • 8/2/2019 TR_aut00-11

    3/6

    the connected electric network: In this case the tur-bines must be closed as fast as possible and the weirsmust be opened quickly to maintain the global outflowconstant. For sake of simplicity, in Figure 3 we omittedthe obvious transitions from one state to itself.

    Figure 2: Parameters characterizing the outflow of a flap.

    Figure 3: Automaton of the stepper motor.

    The stepper motor is driven by a discrete input u(t) {open, close, stop, emergency} that controls thetransitions between the five logical states Opening,Closing, Stop, Emergency and , Stand-by. Inorder to derive an MLD representation of the steppermotor, we have to code the logical states and the in-puts into vectors of binary variables. In principle, it ispossible to associate with each different state/input anew binary variable , but this procedure would increasethe computational burden for the simulation (and thecontrol) of the model [4]. Therefore, we use the min-imal number of logical variables, i.e. two logic inputvariables u,1, u,2 and three logic state variables x,1,x,2, x,3 that code the discrete inputs and states of theautomaton as in Tables 2 and 3.

    Note that, as depicted Figure 3, the admissible tran-

    st op o pen clo se e merg enc y

    u,1 0 1 0 1u,2 0 0 1 1

    Table 2: Coding of the logical inputs of the stepper motor

    S top Op eni ng C losi ng E mer gen cy S ta nd -by

    x,1 0 1 0 1 1

    x,2 0 0 1 1 1

    x,3 - - - 0 1

    Table 3: Coding of the logical states of the stepper motor.The symbol - denotes indifferently 0 or 1.

    sitions depend also on the value of that is con-strained between the minimum and maximum opening(min = 0 [m] and max = 2 [m]). For instance, thetransition from stop to opening is not allowed if theweir is completely opened (i.e. = max) even if thecommand open occurs. To take into account these con-ditions, we introduce two logical variables max(t) andmin(t) defined by

    [max(t) = 1] (t) max (2)[min(t) = 1]

    (t)

    min (3)

    To model the evolution of the logical state x(t), it isconvenient to introduce three logical variables ,1(t),,2(t), ,3(t) defined as ,i(t) = x,i(t + 1), i 1, 2, 3.With the notations introduced so far, every state tran-sition of the automaton depicted in Figure 3 can bedescribed as a logical implication. For instance, thetransition from the state Open at time t to Stop attime t + 1 is modeled as

    x (t) =

    10

    u (t) =

    11

    u (t) =

    00 u (t) =

    01 max = 1

    =

    00

    In order to find the linear inequalities representing (4)one has two possibilities. The first one is to re-write (4)in Conjunctive Normal Form (CNF) and then use therules of Table 1 to compute the system of inequalities.Alternatively, one can use the algorithm described in[15] that allows computing the inequalities in an auto-mated way directly from the truth-table of proposition(4).

    The dynamics of the opening depends on the logicalstate of the stepper motor

    =

    1

    if x = Opening

    1

    ifx

    =Closing

    0 if x = Stop or Stand-by1

    eif x = Emergency.

    (4)

    where for a flap = 120 [s] and c = 60 [s]. Since allthe dynamics are simple integrators, we can discretizethem with a sampling time TC = 10 [s] and write

    (t + 1) = (t) + o(t)TC

    c(t) TC

    + e(t)

    TC

    e(5)

    p. 3

  • 8/2/2019 TR_aut00-11

    4/6

    Figure 4: Approximation of the outflow profile.

    provided that the new logical variables o, c, e are setequal to one when the values of the logical states, thelogical inputs and the saturation indicators max andmin allow opening or closing the weir. For instance,the value of e is assigned by the proposition

    x (t) =

    1

    10

    u (t) = 11 max (t) = 1 e (t) = 1.

    (6)

    The last task is to compute the outflow that is theoutput of the system. For this purpose we describe theoutflow of a flap. The case of a gate is conceptuallyalmost identical. The outflow law is given by [12]:

    y(t) =

    23 bCD

    2gL(t)

    3

    2 L(t) > 00 L(t) 0 (7)

    where b = 14.5 [m] is the length of the flap, L =uc Lref + is the difference between the level of theriver and the opening of the flap (as depicted in Fig-ure 2), Lref = 7.5 [m] and CD = 0.6 is the dischargecoefficient. From (7) it is apparent that the outflow is anonlinear function of L. In order to embed (7) in theMLD form (1) we have to approximate it either in a lin-ear or piecewise affine way. By using a linear functionit was impossible to reduce the maximum error below10.63% in the range of interest for L. To reducethe error, we approximate (7) with the piecewise affinefunction depicted in Figure 4, thus obtaining a maxi-

    mum error of 3.31%. Then, the approximated outflowis described by the equations

    y(t) =

    0 L(t) 0m1L(t) 0 L(t) pm2L(t) + p(m1 m2) L(t) p

    ,

    (8)

    where p = 0.91, m1 = 21.81, and m2 = 48.54. ThePWA function (8) can be incorporated into the MLD

    equations in the following way. First, we introduce thelogical variables

    [lin1 = 1] [L 0] (9)[lin2 = 1] [L p] (10)[lin3 = 1] [L p] (11)

    and write the outflow as

    y(t) = 0(1lin1)lin2(1lin3) + m1y(t) lin1lin2(1lin3) +

    +(m2y(t) + p(m1 m2)) lin1(1 lin2)lin3 (12)

    Then, we introduce the binary variable lin(t) =lin1(t)lin2(t) (the corresponding inequalities can bederived from P2 in Table 1) and the auxiliary variables

    zlin1(t) = lin(t)uc(t), zlin2(t) = lin(t)(t),

    zlin3(t) = lin3(t)uc(t), zlin4(t) = lin3(t)(t). (13)

    Finally, we obtain the expression

    y(t) = m1zlin1(t) + m1zlin2(t) + m2zlin3(t) + m2zlin4(t)

    Lrefm1lin(t) + (p(m1 m2) m2Lref)lin3(t) (14)

    To summarize the results obtained so far, the over-all MLD model, for a single flap is described by thevariables

    x =

    x,1 x,2 x,3T

    , u =

    uc u,1 u,2T

    (15)

    z =

    zlin1 zlin2 zlin3 zlin4T

    (16)

    =

    ,1 ,2 ,3 max min o c e lin1 lin2 lin3 linT

    (17)

    and the matrices

    A =

    1 0 0 00 0 0 00 0 0 00 0 0 0

    , B1 = zeros(4,3) (18)

    B2 =

    0 0 0 0 0 TC

    TC

    TCe

    0 0 0 0

    1 0 0 0 0 0 0 0 0 0 0 00 1 0 0 0 0 0 0 0 0 0 00 0 1 0 0 0 0 0 0 0 0 0

    (19)B3 = zeros(4,4), C = zeros(1,4) D1 = zeros(1,3) (20)

    D2 =

    0 0 0 0 0 0 0 0 0 p(m1 m2) m2Lref Lrefm1

    (21)

    D3 =

    m1 m1 m2 m2

    (22)

    The 125 inequalities stemming from the representationof the and z variables are collected in the matricesEi, i = 1, . . . , 5 of (1c) and are not reported here dueto the lack of space.

    By using the methodology outlined in Section 3, one

    can also derive the MLD description of the gates andthe turbines. Details are available in [6]. We only sum-marize the main modeling issues. The model of thegates differs from the one of the flaps only in the ap-proximation of the outflow law that is

    y(t) =

    bGCG

    2g(t)

    2guc(t)2

    uc(t)+CG(t)(t) > 0

    0 (t) 0(23)

    p. 4

  • 8/2/2019 TR_aut00-11

    5/6

    Figure 5: Automaton of the turbine.

    and depends in a nonlinear way both on (t) and uc(t).Concerning the turbines, depicted in Figure 5, one hasto take into account also the start and stop proceduresthat involve the presence of clocks. In the MLD frame-work, clocks can be modeled by introducing additionalstates and they can be initialized by properly modelingthe resetting logic. For a turbine, one must also com-pute the produced power (that depends on the outflow,among other variables) as additional output. Usually,this nonlinear relation between the opening of the tur-bine, the head and the outflow is provided by the man-ufacturer of the turbine in the form of a lookup table.Then, one has to approximate the lookup table witha PWA function keeping in mind that the finer the

    approximation, the more complex (in terms of binaryvariables) the overall model.

    4 Simulation of the flap model

    The MLD system derived in the previous section iscompletely well-posed [4] meaning that at each timeinstant, the maps (x(t), u(t)) (t) and (x(t), u(t)) z(t) are single-valued. This property, that is usu-ally verified when representing real plants in the MLDform, plays an important role for the simulation. In-deed, for completely well-posed systems, given the pair(x(t), u(t)) it is possible to determine the values of(t) and z(t) by solving a Mixed-Integer FeasibilityTest w.r.t. the constraints (1c). This test can bedone very efficiently by using Branch and Bound al-gorithms [16, 10, 3]. For instance, the simulation pre-sented in Figure 6 was computed in 11.23s on a SunSparc Ultra60 Workstation running Matlab 5.3. Thesimulation in Figure 6 was obtained by keeping thewater level in the reservoir constant (uc(t) = 7 [m]),

    and setting the initial conditions as (0) = 1 [m] andx(0) = Stop. The corresponding outflow profile is de-picted in Figure 7. In Figure 6, for representing thesequence of logical inputs we associate the value 1 withopen , the value 0 with stop, the value -1 with closeand the value -2 with emergency. We excited the sys-tem in such a way to show its behavior in many op-erating conditions. For instance, when the emergencysignal occurs , the flap correctly opens up to max atthe fast speed Tc

    eignoring the input applied at the next

    time samples.

    Figure 6: Simulation of the flap opening. Squares: open-ing (t + 1), Crosses: logical input u(t).

    Figure 7: Outflow profile.

    5 Outflow control

    As described in the introduction, the controller chooseswhich outflow element has to be manipulated in or-der to control the total outflow. The decision shouldmaximize the total power generation while taking intoaccount several qualitative priorities. For instance, innominal operating conditions these are:

    open turbines rather than gates open turbines rather than flaps open flaps rather than gates

    p. 5

  • 8/2/2019 TR_aut00-11

    6/6

    The complete list of such priorities is given in [7]. Forsystems in MLD form these priorities can be expressedas mixed integer linear inequalities and they can bemodeled as additional constraints in the MPC scheme[4, 11].

    The control algorithm is applied to the overall plant,which is obtained by aggregating the single outflowunits. For nominal operation however, the complexityof the components modeled in Section 3 is unnecessar-

    ily high. For instance, there is no need to model theemergency signals since emergencies are very unlikelyto be handled by the MPC scheme in an automatedway.

    The control problem requires the solution of a mixedinteger quadratic program at each time step. The useof simplified models allows also to improve the speed ofthe numerical computations involved for the controllersynthesis. The complexity of such problems dependsmainly on the number of binary variables in the model.To improve the efficiency of the control algorithm, wehave built up models of lower complexity in terms of

    the total number of binary variables.

    Both the simplified models of the overall plant and sim-ulation results for the control scheme will be includedin the final version of the paper.

    6 Conclusions

    In this work we model the outflow units of a hydro-electric power plant in the framework of Mixed LogicDynamical (MLD) systems. This opens the way to the

    design of model predictive control algorithms that, be-side tracking the desired outflow, can take into accountprioritized specifications.

    Acknowledgments

    The authors thank Dr. J. Chapuis for the fruitful dis-cussions. This research is supported by the Swiss Na-tional Science Foundation.

    References[1] A. Bemporad, G. Ferrari-Trecate, and M. Morari.Observability and Controllability of Piecewise Affineand Hybrid Systems. IEEE Transactions on AutomaticControl, 2000.

    [2] A. Bemporad, P. Hertach, D. Mignone,M. Morari, and F.D. Torrisi. HYSDEL- HybridSystems Description Language. Technical report,ETH-Zurich, 2000.

    [3] A. Bemporad, D. Mignone, and M. Morari. AnEfficient Branch and Bound Algorithm for State Es-timation and Control of Hybrid Systems. EuropeanControl Conference, 1999.

    [4] A. Bemporad and M. Morari. Control of SystemsIntegrating Logic, Dynamics, and Constraints. Auto-matica, 35(3):407427, March 1999.

    [5] M.S. Branicky. Studies in Hybrid Systems: Mod-eling, Analysis, and Control. PhD thesis, Massachus-

    sets Institute of Technology, 1995.[6] D. Castagnoli. Modellizzazione di una centraleidroelettrica ad acqua fluente mediante sistemi ibridi.Universita degli Studi di Pavia, 2000. ForthcomingMasters thesis.

    [7] J. Chapuis. Modellierung und neues Konzept furdie Regelung von Laufwasserkraftwerken. Diss. ETHNr. 12765, ETH Zurich, 1998.

    [8] J. Chapuis and F. Kraus. Application of fuzzylogic for selection of turbines and weirs in hydro powerplants. In Proc. 14th IFAC World Congress, 1999.

    [9] G. Ferrari-Trecate, D. Mignone, and M. Morari.

    Moving Horizon Estimation for Piecewise Affine Sys-tems. Proceedings of the American Control Conference,2000.

    [10] C.A. Floudas. Nonlinear and Mixed-Integer Op-timization. Oxford University Press, 1995.

    [11] E.C. Kerrigan, A. Bemporad, D. Mignone,M. Morari, and J. M. Maciejowski. Multi-objective Pri-oritisation and Reconfiguration of Hybrid Systems us-ing Model Predictive Control. Proceedings of the Amer-ican Control Conference, 2000.

    [12] G. Krivchenko. Hydraulic Machines: Turbinesand Pumps - Second Edition. Lewis Publishers, 1994.

    [13] G. Labinaz, M.M. Bayoumi, and K. Rudie. ASurvey of Modeling and Control of Hybrid Systems.Annual Reviews of Control, 21:7992, 1997.

    [14] M. Lahlou. Modelisation des canaux hydrauliqueset application au reglage de niveau. Institut delectronique industrielle., EPF Lausanne, Switzerland,1994.

    [15] D. Mignone, A. Bemporad, and M. Morari. AFramework for Control, Fault Detection, State Estima-tion and Verification of Hybrid Systems. Proceedingsof the American Control Conference, 1999.

    [16] G.L. Nemhauser and L.A. Wolsey. Integer andCombinatorial Optimization. Wiley, 1988.

    p. 6