• No results found

Alternative Methods for Operational Optimization of Hydro Power Plants

N/A
N/A
Protected

Academic year: 2021

Share "Alternative Methods for Operational Optimization of Hydro Power Plants"

Copied!
72
0
0

Loading.... (view fulltext now)

Full text

(1)

IN

DEGREE PROJECT MATHEMATICS, SECOND CYCLE, 30 CREDITS

,

STOCKHOLM SWEDEN 2019

Alternative Methods for

Operational Optimization of Hydro

Power Plants

(2)
(3)

Alternative Methods for

Operational Optimization of Hydro

Power Plants

JONAS ALMGRUND

Degree Projects in Optimization and Systems Theory (30 ECTS credits) Master’s Programme in Applied and Computational Mathematics (120 credits) KTH Royal Institute of Technology year 2019

Supervisor at Vattenfall AB: Vincent Gliniewicz Supervisor at KTH: Anders Forsgren

(4)

TRITA-SCI-GRU 2019:106 MAT-E 2019:61

Royal Institute of Technology

School of Engineering Sciences

KTH SCI

SE-100 44 Stockholm, Sweden URL: www.kth.se/sci

(5)

Alternative Methods for Operational

Optimization of Hydro Power Plants

Abstract

The aim of this thesis is to optimize hydro power plants with data generated from observations and field tests at the plants. The output is optimal produc-tion tables and curves in order to operate and plan hydro power plants in an optimized way concerning power output, efficiency and distribution of water. The thesis is performed in collaboration with Vattenfall AB, which currently use an internal optimization program called SEVAP.

Two alternative methods have been selected, employed and compared with the current optimization program, these are Interior-Point Method and Se-quential Quadratic Programming. Three start-point strategies are created to increase the probability of finding a global optima. A heuristic rule is used for selection of strategy in order to prevent rapid changes in load distribution for small variations in dispatched water. The optimization is performed at three plants in Sweden with different size and setup.

The results of this evaluation showed marginally better results for the em-ployed methods in comparison to the currently used optimization. Further, the developed program is more flexible and compatible to integrate with fu-ture digitalization projects.

Keywords: Nonlinear Optimization, Interior-Point Method, Sequential Quadratic

(6)
(7)

Alternativa Metoder f¨

or Driftoptimering av

Vattenkraftverk

Sammanfattning

Syftet med detta examensarbete ¨ar att optimera vattenkraftverk med data som genererats fr˚an indextester vid kraftverken. Resultatet ¨ar optimala produk-tionstabeller och kurvor f¨or drift och planering av vattenkraftverk. Dessa ¨ar baserade p˚a att optimalt f¨ordela vattnet mellan aggregaten f¨or att maximera uteffekt och verkningsgrad. Detta arbete har utf¨orts i samarbete med Vat-tenfall AB, som f¨or n¨arvarande anv¨ander ett internt optimeringsprogram som heter SEVAP.

Tv˚a optimeringsmetoder har valts, implementerats och j¨amf¨orts med det nu-varande optimeringsprogrammet. Dessa metoder ¨ar inrepunktsmetoden (IPM) och sekventiell kvadratiskt programmering (SQP). Tre startpunktsstrategier har anv¨ands f¨or att ¨oka sannolikheten att hitta ett globalt optima. F¨or att f¨orhindra hastiga f¨or¨andringar i lastf¨ordelning f¨or sm˚a variationer av avs¨ant vatten har en heuristisk regel anv¨ands. Optimeringen har utf¨orts p˚a tre sta-tioner med olika upps¨attning och storlek.

Resultatet av detta examensarbete visar marginellt b¨attre resultat f¨or de anv¨anda metoderna i j¨amf¨orelse med den nuvarande optimeringen. Det utveck-lade programmet ¨ar flexibelt och kompatibelt att integrera med framtida dig-italiseringsprojekt.

(8)
(9)

Acknowledgements

First and foremost, I would like to thank Vattenfall R&D for the opportu-nity to be part of the project team and write my master thesis with them. Special thanks to my supervisor at Vattenfall AB, Vincent Gliniewicz, for all his support and guidance throughout the thesis work. Along with the project team, Oskar Tengberg, Jonas Funkquist, Joakim N¨asstr¨om, Magnus L¨ovgren and Stefan Sandgren.

I would also like to thank my supervisor at KTH Royal Institute of Technol-ogy, Anders Forsgren, for providing valuable insights, guidance and feedback regarding the mathematical modelling.

Finally, I would like to thank my family and friends for the support dur-ing the five years at KTH. I could not have done this without you.

Stockholm, May 2019 Jonas Almgrund

(10)
(11)

Contents

List of Figures i

List of Tables iii

Nomenclature iv Abbreviations vi 1 Introduction 1 1.1 Background . . . 2 1.2 Objective . . . 3 1.3 Research Question . . . 3 1.4 Limitations . . . 3 1.5 Outline . . . 4 2 Previous Research 5 2.1 Hydro Power Theory . . . 5

2.2 Optimization of Hydro Power Plants . . . 7

2.3 Optimization of Hydro Power Systems . . . 8

2.4 Conclusions and Insights . . . 8

3 Mathematical Theory 10 3.1 Optimization . . . 10

3.1.1 Global and Local Optima . . . 11

3.1.2 Convexity . . . 11 3.1.3 Optimality Conditions . . . 12 3.1.4 Convergence . . . 12 3.1.5 Penalization Method . . . 14 3.2 Optimization Methods . . . 15 3.2.1 Interior-Point Method . . . 15

(12)

4 Mathematical Model 20 4.1 Problem Formulation . . . 20 4.2 Output Optimization . . . 23 4.3 Objective Function . . . 24 4.4 Constraints . . . 26 4.5 Model Setup . . . 27 5 Method 29 5.1 Data . . . 29 5.2 Start-Point Strategies . . . 30

5.3 Heuristic Rule for Strategy Selection . . . 31

5.4 Performance Metrics . . . 32

5.5 Optimization Algorithm . . . 32

6 Results 34 6.1 Optimal Production Curves . . . 34

6.2 Visualization of Start-Point Strategies . . . 38

6.3 Comparison SEVAP . . . 40

6.4 Run-Time and Iterations . . . 42

7 Discussion 44 7.1 Optimization Performance . . . 44

7.2 Performance of SQP and IPM . . . 45

7.3 Start-Point Strategies and Heuristic Rule . . . 46

7.4 Validation of Optimization . . . 47

8 Conclusion 48 8.1 Further Work . . . 48

Bibliography 49

(13)

List of Figures

1.1 Overview of the optimization and SEVAP’s role in Vattenfall’s sys-tem for operation and planning. . . 2 2.1 Visualization of a hydro power plant. Figure modified from [5]. . . 6 4.1 Schematic overview of a hydro power plant with n operating units. 21 4.2 Overview of the optimization process. The optimization is applied

for every combination, effective head and amount of dispatched water. . . 22 4.3 Procedure of the optimization. Plant data are conducted from

efficiency tests, perform polynomial fit for efficiency, head losses and vane opening for every unit. OPT and SOPT optimization are applied. . . 23 4.4 Visualization of a turbine hill diagram. Figure modified from [19]. 26 6.1 Optimal production curves presented as relative efficiency of Plant

1. Left: Every combination of units. Right: Optimal combination of units. . . 35 6.2 Optimal production curves based on the optimal combination of

units for Plant 1. Left: Dispatched water to each unit. Right: Power output and theoretical power. . . 35 6.3 Optimal production curves presented as relative efficiency of Plant

2. Left: Every combination of units. Right: Optimal combination of units. . . 36 6.4 Optimal production curves based on the optimal combination of

units for Plant 2. Left: Dispatched water to each unit. Right: Power output and theoretical power. . . 36 6.5 Optimal production curves presented as relative efficiency of Plant

3. Left: Every combination of units. Right: Optimal combination of units. . . 37

(14)

6.6 Optimal production curves based on the optimal combination of units for Plant 3. Left: Dispatched water to each unit. Right: Power output and theoretical power. . . 37 6.7 Start-points and optimal points for Plant 1. (a) Strategy 1. (b)

Strategy 2. (c) Strategy 3. . . 38 6.8 Start-points for every strategy, selected strategy and optimal point

for Plant 1. . . 39 6.9 Visualization of the solution space (power loss) and strategies for

three different water flows. Left: Start-points. Right: Optimal points. . . 39 6.10 Difference between SQP and SEVAP for every effective head for

Plant 1. (a) Difference in kilowatt. (b) Difference in percent. . . . 40 6.11 Difference between SQP and SEVAP for every effective head for

Plant 3. (a) Difference in kilowatt. (b) Difference in percent. . . . 41 6.12 Difference between SQP and SEVAP for every effective head for

(15)

List of Tables

4.1 Combination, binary composition and operating units for a plant with three units. . . 21 5.1 Plant information of the tested plants. . . 30 6.1 Number of optimizations, run-time and iterations for SQP and IPM. 42 6.2 Number of optimizations and iterations divided into number of

operating units for Plant 3. . . 43 A.1 Data for Plant 1. Nominal minimum and maximum allowed water

flow, along with water leakage for each unit. . . 51 A.2 Data for Plant 2. Nominal minimum and maximum allowed water

flow, along with water leakage for each unit. . . 51 A.3 Data for Plant 3. Nominal minimum and maximum allowed water

(16)

Nomenclature

Constants ρ Density of water. 997 [mkg3] g Gravitational acceleration. 9.81 [ms2] Parameters ηT Efficiency of turbine. [−]

ηP lant Efficiency of plant. [−]

a0,i Coefficient for generator loss of unit i. [kW ]

a1,i Coefficient for generator loss of unit i. [M WkW ]

a2,i Coefficient for generator loss of unit i. [M WkW2]

Hbr Effective head of water, i.e. head difference between the

upper and lower level of water. [m]

Hf Head loss of water, i.e. head loss between the upper and

lower level of water. [m]

Hnet Net head of water, i.e. effective head minus head losses. [m]

Hnom Nominal head, head where the efficiency test was

con-ducted. [m]

n Number of units. [−]

nc Number of combinations. [−]

nh Number of head losses. [−]

P0 Total power output. [MW ]

P Peps-factor, minimum required power profit for

(17)

PF Total power loss. [MW ]

PG,i Output power for generator i. [MW ]

PN Theoretical kinetic power. [MW ]

PT,i Output power for turbine i. [MW ]

PT r,i Output power for transformer i. [MW ]

Qleak,i Water leakage from unit i when not operating. [m

3 s ]

Qmax,i Maximum allowed water flow for unit i. [m

3 s ]

Qmin,i Minimum allowed water flow for unit i. [m

3 s ]

Qnom,i Nominal water flow for unit i. [m

3 s ]

Qstep Step size of dispatched water for the optimization. [m

3 s ]

Qtot Total amount of dispatched water for the plant. [m

3 s ]

zc,i Binary parameter, defines if unit i is operating or not

for a combination c. [−]

Sets

Cp Set containing each operating combination of plant p, c ∈

Cp = {1, 2, ..., nc}.

Hp Set containing each effective head index for plant p, Hbr

Hp = {Hbr,1, ..., Hbr,5}.

Ip Set containing each unit index i for plant p, i ∈ Ip =

{1, 2, ..., n}.

Ji Set containing each headloss index for unit i, j ∈ J =

{1, 2, ..., nh}.

Qc Set containing each operating water flow for combination c,

q ∈ Q= {Qmin, Qmin+ Qstep, ..., Qmax− Qstep, Qmax}.

Zc Set containing each units operating status for combinations c,

zc,i ∈ Zc= {0, 1}. Variables

Qi Dispatched amount of water for unit i. [m

3 s ]

(18)

Abbreviations

Acronyms

AON Asset Optimization Nordic.

IPM Interior-Point Method.

KKT Karush–Kuhn–Tucker.

LP Linear Programming.

NLP Non-Linear Programming.

OC Operation Center.

OLD Optimal Load Distribution.

SEVAP System of Effective Water Planning.

SLP Sequential Linear Programming.

(19)

Chapter 1

Introduction

The effects of increased population and economic growth has contributed to a steady increase of energy consumption all around the world. More specifically, the global energy demand has raised by 2.1 percent in 2017 and is expected to rise by 28 percent until 2040 [1]. The current situation of climate change and increased demand of electricity has lead to a global shift towards more use of renewable energy sources. Usage and development of renewable energy sources has therefore become a central subject in politics and economics.

Hydro power is one of the most important and used renewable power sources in the world, it utilizes the kinetic energy of running water and change in elevation. Energy is stored through water in reservoirs and may be used when needed within some limitations. Hydro power is a flexible energy source, which can be used for both base load power and balancing power supply to meet variations in demand of electricity consumption and production. This is crucial in order to balance the energy system and supplement other volatile energy sources, such as solar and wind energy. [2]

In Sweden 2017, approximately 80 percent of the total electricity production came from hydro and nuclear power, the remaining 20 percent from wind, thermal and solar power. Hydro power accounts for 40 percent and is of great importance for Sweden’s electricity production and energy system [3]. In order to meet the high demand of electricity, all resources need to be used in the best possible way. Therefore, optimization is an essential part to find optimal settings to produce as much power as possible under given operating conditions. The optimization is crucial from a micro and macro perspective. Each plant in a river has to be optimized, likewise, the river as a whole has to be optimized in order to plan how to dispatch the water optimally between the plants.

(20)

CHAPTER 1. INTRODUCTION

1.1

Background

At the moment, Vattenfall AB, further on denoted as Vattenfall, is using an internal optimization program called System of Effective Water Planning (SEVAP) in order to determine optimal settings to operate and plan hydro power plants during different conditions. SEVAP is used to optimize over 100 plants in Sweden and is based on Fletcher’s optimization algorithm. [4]

Plant data such as the efficiency of units (efficiency curves) and head losses between the upper and lower level of water, are conducted regularly by field tests and observations. These are referred to as efficiency tests and used as input for the optimization. Every time new plant data is conducted, a new optimization is performed for the plant. The optimization produces optimal settings to operate the plant during different conditions, the output is pre-sented in production tables and plots. These are used by Asset Optimization Nordic (AON) and Operation Centers (OC) at Vattenfall. Based on various forecasts, for example electricity consumption, prices and weather, AON plans operations of the energy system for every energy source Vattenfall possess, in-cluding a primary operation plan for each hydro power plant. OC operate, control and monitor plants based on the plan from AON and production ta-bles from the optimization. See Figure 1.1 for an overview of the process and SEVAP’s role. Hydro Power Plant Optimization (SEVAP) Operation Centers (OC) Asset Optimization

Nordic (AON) Operationplanning

SOPT-Table

OPT- & QP-Table Plant-data

Operation, control & monitor

Figure 1.1: Overview of the optimization and SEVAP’s role in Vattenfall’s system for operation and planning.

SEVAP was written 1977 in Fortran77, and only a few changes have been made since. The program is old and uncompromising to integrate with future digitalization projects, hence Vattenfall wants to implement SEVAP’s

(21)

func-1.2. OBJECTIVE

tionality in Matlab and at the same time investigate alternative optimization methods for the program.

According to Vattenfall’s documentation, two optimization algorithms be-yond Fletcher’s have been tested when the program was developed. These algorithms where gradient and iterative methods specifically adapted to SE-VAP, called REDGRD and REDGRC, constructed by Dennis Sjelvgren at AIZ. The result showed no significant difference between the algorithms. [4]

1.2

Objective

The main objective of this thesis is to investigate and test alternative opti-mization methods for operation and planning of hydro power plants in an optimized way concerning power output, efficiency and distribution of water. In addition to this, a good representation model will be created in Matlab, in order to test and validate different optimization algorithms.

The algorithms performance will be analysed and evaluated by comparing the result with SEVAP’s result.

1.3

Research Question

Based on the facts introduced in the background and objective, the problem can be summarized with the following research question:

• Are there any alternative methods for optimization of hydro power plants that can provide better results, concerning higher power output and efficiency in comparison to currently used program?

1.4

Limitations

Some limitations are set to clarify the scope of the study.

Three hydro power plants with different size and setup are considered, two optimization methods are selected based on the literature review. The meth-ods will be implemented in Matlab, evaluated and compared with the current optimization program SEVAP.

Focus will be on investigating alternative optimization methods, with the aim to give a general overview of the performance of different methods in comparison with SEVAP.

(22)

CHAPTER 1. INTRODUCTION

1.5

Outline

The remaining parts of this thesis will be structured the following way: • Chapter 2 - Previous Research

Main achievements from previous research of optimization concerning hydro power plants and systems are presented. In addition, basic theory of hydro power is presented.

• Chapter 3 - Mathematical Theory

The mathematical theory of optimization and employed methods are presented on a technical level.

• Chapter 4 - Mathematical Model

A brief formulation of the problem is presented along with a mathemat-ical model describing the optimization problem and modelling of hydro power plants.

• Chapter 5 - Method

The methodology of this thesis is presented. Description of used data, start-point strategies, heuristic rule for strategy selection, performance metrics and implementation of optimization algorithm.

• Chapter 6 - Results

The main results and performance of the selected and employed methods are presented.

• Chapter 7 -Discussion

Analysis and discussion of the results are presented. • Chapter 8 - Conclusion

(23)

Chapter 2

Previous Research

The literature review covers various optimization approaches of hydro power plants and systems. A large amount of articles presented below are considering optimization of large-scale hydro power system and real-time optimization. In addition, some basic theory about hydro power is presented.

2.1

Hydro Power Theory

Hydro power is a renewable power source that utilizes the potential energy from head differences between water levels and the continuous flow of water. Hydro power is used to both generate baseload power and balancing power to the energy system. Baseload power is the amount of electricity that is always needed and balancing power is the electricity output that quickly can be turned on to meet variations in demand. [5]

The most common hydro power plants are placed in a river and use a dam to store water in a reservoir. Kinetic energy is extracted by releasing water from a reservoir to a lower level through penstocks, where water flows through a turbine and make it rotate. A generator converts the kinetic energy from the rotating turbine into electrical energy, finally, a transformer is used to increase the voltage and transmit the electricity to the grid. See Figure 2.1 for a simple version of a hydro power plant.

The combination of a turbine, generator and transformer is referred to as a unit. A hydro power plant usually consists of multiple operating units to increase the power output and flexibility of the plant. The theoretical power

PN is described by the formula,

PN = gρQHbr, (2.1)

where g is the gravitational acceleration, ρ the density of water, Q the dis-patched water in m3/sand H

(24)

CHAPTER 2. PREVIOUS RESEARCH

Figure 2.1: Visualization of a hydro power plant. Figure modified from [5]. between the upper and lower water level of the plant. If ηP lant is the total efficiency of the plant, the electrical power output P0 from the unit is given

by,

P0 = gρQHbrηP lant. (2.2)

The total efficiency can be divided as follows,

ηP lant = ηPηTηGηT r, (2.3)

where ηP is the penstock efficiency, ηT the turbine efficiency, ηG the generator efficiency and ηT r the transformer efficiency. Each unit has its own distin-guishing features and behaviour, these are referred to as the characteristics.

The total efficiency of hydro power plants varies with the size of the plant, generally larger plants have an annual efficiency of 85-90 percent [6]. The plant efficiency is determined by dividing the electrical power output with the theoretical power,

ηP lant=

P0

PN

. (2.4)

The total power loss PF for a plant is the theoretical power minus the power output,

(25)

2.2. OPTIMIZATION OF HYDRO POWER PLANTS

2.2

Optimization of Hydro Power Plants

Jiang et al. [7] outlines a methodology for finding multiple optimal solutions to load distributions of dispatched water in hydro power plants, with the aim to minimize the total dispatch of water for a given power output. The authors describe the challenge of modelling all practical constrains for a hydro power plant, and the optimal solution found by these models might be limited to practical aspects, such as working units and stability of generators. There-fore, in order to be more flexible, multiple optimal solutions are provided to support the choices of decision making. A particular Dynamic Programming model is proposed. The model is a modified shortest path algorithm with a discretization scheme, which produce and keep track of multiple optimal solu-tions to the problem. In conclusion, this methodology works fine for smaller problems with few decision variables, but for larger system with a dozen of decision variables and complex objective function, it will be computationally heavy.

Sousa et al. [8] provide a methodology to obtain unit commitment in hydro power plants. The aim is to maximize the plants efficiency in relation to the active power generated. Furthermore, specific characteristics and efficiency evaluations of the plants are considered in the model. The proposed model is using a Lagrange function and Karush–Kuhn–Tucker (KKT) conditions to solve the optimization problem. It was tested and evaluated through a pilot project, and from the results, the authors conclude that at certain times, the units were operating below their optimal efficiency according to a reference case. The authors proposed further work with the model, mainly regarding the adjustment of restrictions imposed to the problem.

Bortoni et al. [9] conducted a study for real-time load distribution between generating units in a hydro power plant, with the objective to maximize the overall efficiency for a given power output. As in [8], the authors outline the importance of characteristics for the units. The characteristics are ap-proximated with linear models after field observations. Steepest-Ascent Hill Climbing heuristic is proposed to the problem, with an initial guess from the assumption that all machines are identical and have the same characteristics, which results in equally distributed load between all units. The method is based on always choosing the path with largest efficiency variation, which is done by knowing all possible efficiency variations for a given operational point. In conclusion, the result is adoptive to local optimum and fast convergence.

Finardi et al. [10] present a methodology for optimization of unit commit-ment of generating units in a hydro power plant, with the aim to maximize the plant efficiency associated to a given dispatch of water and effective head. Compared to previous studies presented, constraints and decision variables

(26)

CHAPTER 2. PREVIOUS RESEARCH

are dispatched water to each unit, and not dispatched power. The authors outline a detailed explanation behind turbine and generator efficiencies, for example, how a production function and unit hill diagram can be approxi-mated by polynomials. The proposed method is based on the Branch and Bound method, and Projected Gradient method. First, feasible states are de-termined by using a Branch and Bound method. Second, the optimization is solved for all feasible solutions by using Rosen’s Projected Gradient method. Finally, the optimum solution with maximum power output is selected. Due to the non-convexity, the authors point out that the proposed method can only guarantee local optimal solutions.

2.3

Optimization of Hydro Power Systems

Barros et al. [11] present a developed optimization model called SISOPT, with the purpose to monthly optimize the Brazilian hydro power system. It consider multiple objectives, were the objectives are combined by assigning weights on their importance. The model use three optimization techniques, Linear Programming (LP), Non-Linear Programming (NLP) and Sequential Linear Programming (SLP). The purpose is to use the solution of LP to provide a good initial strategy for SLP and NLP, with the aim to increase the possibility of reaching global optimum. The NLP model is linearized by using the L1

-norm and replacing the nonlinear functions with average values of the function, which corresponds to a good linear representation. The linearized problem is solved as a LP and the solution is provided as an initial strategy for the SLP and NLP models. The SLP use first order Taylor expansion with the initial strategy as start-point, the solution convergence to a local optimum by a sequence of linear programs. A comparison between SLP and NLP presents a significant better result for NLP, but the CPU time is reduced from hours to minutes for SLP. This study highlights SLP’s good results together with the fast convergence. However, the authors conclude that the combination of using a LP as an initial strategy and NLP as solver is the most accurate and suitable method for the optimization.

2.4

Conclusions and Insights

The type of optimization mentioned in the presented studies are real-time optimization for current conditions, i.e. a given head and dispatched amount of water, or dispatched power. Compared to this thesis, where the aim is to produce optimal production tables for various operating conditions.

(27)

2.4. CONCLUSIONS AND INSIGHTS

Several studies point out the importance and challenge of modelling the power output and associated losses to a plant. The model is often based on characteristics of the units which can be approximated by polynomials after field observations. This thesis will use the same model and characteristics as the current optimization program in order to perform a fair evaluation of the optimization.

The conclusion is that several approaches and methods can be used for the optimization. Each study presents a different approach to model and solve the optimization problem. The choice of method depends on how one choose to set up and model the problem.

The scope of this study is to investigate and provide a comparative study of different optimization methods, thus will not compare the performance across the presented studies.

(28)

Chapter 3

Mathematical Theory

In this chapter, a brief introduction to optimization and the mathematical theory behind the selected and employed algorithms will be presented.

3.1

Optimization

Optimization is the selection of values for a given set of decision variables with the purpose of minimize or maximize an objective function, under a set of given constraints, which limit the selection of values of the decision variables. In some cases, the problem is unconstrained. A general optimization problem with constraint are mathematically defined as,

minimize f(x)

subject to hi(x) = 0, i ∈ I = [1, 2, ..., m],

gj(x) ≤ 0, j ∈ J = [1, 2, ..., r], x ∈ S,

(3.1)

where the decision variables x are a n-dimensional vector of unknowns, x =

(x1, x2, ..., xn). The objective function f along with the constraints hi and gj

are real-value functions of the decision variables x. I and J are the set of equality and inequality constrains. The set S is a subset of the n-dimensional space. [12]

The most basic definition of a solution xthat minimize an objective

func-tion f is given by,

f(x) ≤ f(x) ∀x ∈ S. (3.2)

Optimization problems can be of different types, these are often divided into two subgroups, Linear Programming (LP) and Non-Linear Programming (NLP). Both with the same structure as the general formulation in Eq 3.1. The word

(29)

3.1. OPTIMIZATION

programming means planning which refers to the process of selecting the best

possible action from various alternatives. LP is an optimization problem where the objective function and constraints are linear, and NLP have at least one function that is nonlinear. [13]

3.1.1

Global and Local Optima

Optimization problems can have different types of optima, both global and local optimum. Global optima is a point where the objective value is optimal for all feasible points, local optima is a point where the objective value is optimal for all nearby points, but possibly not for a distant point. General definitions of global and local optima for a minimization problem are defined as:

Definition 3.1.1. A point xis a global optima if it is feasible and for all

feasible points x satisfy f(x) ≤ f(x).

Definition 3.1.2. A point xis a local optima if it is feasible and for some

 >0 such that all feasible points x with ||x− x|| ≤  satisfy f(x) ≤ f(x).

For linear problems, the solution is always a global optimum. However, non-linear problems may have several solutions that are local optima and in order to guarantee a global optima, information for each and every point in the feasible subset is needed. [13]

3.1.2

Convexity

An optimization problem is classified as a convex optimization problem if all functions in the problem are convex over a convex set. The property of convexity make the optimization generally easier. A set S is convex if, for any elements x and y in S,

αx+ (1 − α)y ∈ S , ∀α ∈ [0, 1]. (3.3)

Every set defined by a system of linear constraints is a convex set. A function

f is convex over a convex set S if, for all elements x and y in S,

f(αx + (1 − α)y) ≤ f(αx) + f((1 − α)y) , ∀α ∈ [0, 1]. (3.4)

Convex optimization problems guarantee a global solution, a local solution is also a global solution, proof can be found in [13].

(30)

CHAPTER 3. MATHEMATICAL THEORY

3.1.3

Optimality Conditions

The optimality conditions for a general optimization problem is defined by the Karush-Kuhn-Tucker (KKT) conditions. Consider the general (primal) problem, minimize f(x) subject to hi(x) = 0, i ∈ I = [1, 2, ..., m], gj(x) ≤ 0, j ∈ J = [1, 2, ..., r], x ∈ X ⊆ Rn. (3.5) Define the Lagrangian by multiply each equality and inequality constraint by a Lagrange multiplier, λi and µj,

L(x, λ, µ) = f(x) + m X i=1 λihi(x) + r X j=1 µjgj(x). (3.6)

For a local optimum x∈ X, the KKT conditions must be satisfied. The

condtions are as follows [14], 1. ∂f(x) + m X i=1 λi∂hi(x∗) + r X j=1 µj∂gj(x∗) = 0 (Stationarity)

2. hi(x) = 0, ∀i ∈ I (Primal feasibility)

gj(x) ≤ 0, ∀j ∈ J

3. µj0, ∀j ∈ J (Dual feasibility)

4. µigj(x) = 0, ∀j ∈ J (Complementary slackness)

3.1.4

Convergence

For iterative methods in optimization, convergence and the ability to efficiently perform repetitive operations are of great importance. In general, an initial point x0 is selected and the algorithm generates an improved point x1, the

process is repeated until a point is sufficiently close to the solution point. The approach is to find a descent direction for every iteration such as the objective function will decrease and advance towards a minimum. Two of the most common methods for guaranteeing convergence are line search and trust-region strategies. [12]

Line Search Method

Line search methods compute a search direction, and then a distance at the line of the search direction for each iteration. The iteration is given by,

(31)

3.1. OPTIMIZATION

where αk is the steplength and pk the search direction at xk, such as,

f(xk+1) < f(xk). (3.8)

The search direction is descent if the following two conditions are satisfied,

pTk∇f(xk) < 0 (3.9) and − p T k∇f(xk) ||pT k|| · ||∇f(xk)|| ≥  >0, (3.10)

where  is a positive specified tolerance. [13] Trust-Region Method

Trust-region methods use an approximated model of the objective function and defines a region of trust around xk to determine the next step. In general, the approximated model is defined as a quadratic function derived from a taylor series,

qk(p) = f(xk) + pTk∇f(xk) + 1

2pTk∇2f(xk)pk. (3.11) The trusted region is defined by a radius ∇k around the current point xk,

||pk|| ≤ ∇k. (3.12)

Next iteration is computed by approximately solving the subproblem, minimizep

k

qk(pk) subject to ||pk|| ≤ ∇k.

(3.13) For a successful step, the next iteration is given by,

xk+1 = xk+ pk. (3.14)

The choice of trust region ∇k affects both the search direction and steplength, compared to line search where the search direction is independent of the steplength. A more detailed description of the method and how to choose ∇k is described in [13].

(32)

CHAPTER 3. MATHEMATICAL THEORY

3.1.5

Penalization Method

Penalization methods are used to solve constrained optimization problems by a sequence of unconstrained optimization problems. These are divided into two groups of methods, classical penalty methods and barrier methods. These impose a penalty for violation of constraints and approaching the boundary of inequality constraints.

Classical Penalty Method

Classical penalty methods impose penalties for violation of constraints. Con-sider the equality constrained problem,

minimize f(x)

subject to hi(x) = 0, i = 1, 2, ..., m.

(3.15) The problem is rewritten as unconstrained by removing constraints and add a penalty function for violation of constraints in the objective function. The penalty function is a penalty parameter, ρ, multiplied with a measure of vi-olation, i.e. the greater vivi-olation, the greater is the cost. The measure of violation is a continuous function ψ(x) taking positive values for violation and zero for non-violation. One of the most common functions for violation is the quadratic loss function,

ψ(x) = 1 2 m X i=1 hi(x)2 = 1 2h(x)Th(x). (3.16)

By adding the penalty function to the objective function, the problem becomes a sequence of unconstrained problems,

minimize f(x) + ρψ(x) (3.17)

At each new iteration, the solution from previous iteration is used as initial guess, simultaneously as the penalty parameter increase and forces the itera-tions towards the feasible region. The solution will successively converge to a solution of the constrained optimization problem. [13]

Barrier Method

Barrier methods are another group of penalization methods, a penalty is im-posed for reaching the boundary of an inequality constraint. These are strictly feasible methods that maintain feasibility by creating a barrier that force the

(33)

3.2. OPTIMIZATION METHODS

iterations to remain in the feasible region. Consider the inequality constrained problem,

minimize f(x)

subject to gj(x) ≥ 0, j = 1, 2, ..., r.

(3.18) A barrier function is used to rewrite the problem as unconstrained, the bar-rier function penalizes points close to the boundary, and favour points in the interior of the feasible region. The barrier function is a barrier parameter, µ, multiplied with a continuous function φ(x) on the interior of the feasible set. A common function to use is the logarithmic function,

φ(x) = −

r

X

j=1

log(g(xj)). (3.19)

By adding the barrier function to the objective function, the problem becomes a sequence of unconstrained problems,

minimize f(x) + µφ(x). (3.20)

Similar to classical penalty methods, at each new iteration the solution from previous iteration is used as initial guess, simultaneously as the barrier pa-rameter decreases towards zero and the iterations can gradually approach the boundary. The solution will successively converge to a solution of the con-strained problem. [13]

3.2

Optimization Methods

This section presents the mathematical theory behind the selected and em-ployed methods in this thesis.

3.2.1

Interior-Point Method

Interior point methods (IPM) is a class of methods for linear and nonlinear optimization problems, IPMs can also be regarded as search algorithms. The approach is to find a solution by iterating in the set of feasible points, violations of inequality constraints are prevented by augmenting the objective function with a barrier term to force the points into the feasible space.

This section provide a description of the primal-dual IPM, which follows a barrier approach to solve a primal and dual problem simultaneously by applying Newton’s method to the KKT conditions.

(34)

CHAPTER 3. MATHEMATICAL THEORY

The presented algorithm combines a line search and trust region method to compute new steps. The algorithm first attempts to compute a new direct step by solving a primal-dual system of KKT-conditions with direct linear algebra. If a direct step is not possible or acceptable, the trust region method is invoked, it attempts to take a conjugate gradient step by using a trust region. Both exact second derivatives and Quasi-Newton approximations can be used. The algorithm is proposed in [15] and used in Matlabs Optimization

Toolbox software package [16].

Consider the primal problem in Eq 3.5 and assume all functions are twice continuously differentiable, the barrier subproblem becomes,

minimize f(x) − µXr j=1 ln(sj) subject to h(x) = 0, g(x) + s = 0, x ∈ Rn, s >0, µ > 0, (3.21)

where s is a positive slack variable and µ a positive barrier parameter. By letting the barrier parameter converge to zero as the number of iteration in-creases, the sequence of solutions will converge to a stationary point of the primal problem.

Define the Lagrangian as,

L(x, s, λh, λg) = f(x) − µ r X j=1 ln(sj) + λThh(x) + λ T g(g(x) + s), (3.22)

where λh ∈ Rm and λg ∈ Rr are Lagrange multipliers. The first-order opti-mality conditions for the barrier subproblem becomes,

xf(x) + Ah(x)Tλh+ Ag(x)Tλg = 0, SΛge − µe= 0, h(x) = 0, g(x) + s = 0, λg0, µ > 0, s > 0, (3.23)

where S and Λg denote diagonal matrices with elements from vector s and λg respectively, and e is a vector of ones with size r. The matrices Ah(x) and

Ag(x) are the Jacobian of the constraints,

Ah(x) = [∇h1(x), ..., ∇hm(x)], (3.24)

(35)

3.2. OPTIMIZATION METHODS

Applying Newtons method to the system of first-order optimality conditions in Eq 3.21, the primal-dual system becomes,

     ∇2 xxL 0 Ah(x) Ag(x) 0 S−1λg 0 I ATh(x) 0 0 0 AT g(x) I 0 0           dx ds dh dg      = −      ∇xLsL h(x) g(x) + s      . (3.26)

Define the variables as vectors,

z = " x s # , λ= " λh λg # , dz = " dx dz # , = " dh dg # , (3.27)

where dz and dλ are the determined direction for z and λ respectively. By solving the primal-dual system, a direct step and new iteration are given by,

z+= z + αzdz, (3.28)

λ+ = λ + αλdλ, (3.29)

where αz and αλ are steplengths, which are computed in two steps. First, for 0 < τ < 1, compute the maximum steplengths by following formulas,

αmaxz = max{α ∈ (0, 1] : s + αds(1 − τ)s}, (3.30)

αmaxλ = max{α ∈ (0, 1] : λg+ αdg(1 − τ)λg}. (3.31) Then, compute the steplengths by a backtracking line search,

αz(0, αmaxz ], (3.32)

αλ(0, αmaxλ ]. (3.33)

At each iteration, the algorithm attempts to decreases a merit function,

φv(z) = f(x) − µ r X j=1 ln(si) + v|| " h(x) g(x) + s # ||, (3.34)

where v is a positive penalty parameter that increases for each iteration in order to force the solution towards the feasible region. If an attempted step does not decrease the merit function, the step is rejected and attempts a new step.

The algorithm continues to iterate until a desired accuracy and tolerance are satisfied. A more detailed description of the interior-point algorithm is described in [15] and [17].

(36)

CHAPTER 3. MATHEMATICAL THEORY

3.2.2

Sequential Quadratic Programming

Sequential quadratic programming (SQP) is an iterative method for solving non-linear optimization problems with constraints, the concept is to generate a search direction by solving quadratic subproblems. The approach is a gener-alization of Newton’s method for unconstrained optimization. In comparison to IPM, SQP does not require the initial point or iterative steps to be feasible points. The method is presented in [18] and available in Matlabs Optimization

Toolbox software package [16].

Consider the primal problem in Eq 3.5 and assume all functions are twice continuously differentiable, the Lagrangian becomes,

L(x, λh, λg) = f(x) + λThh(x) + λ T

gg(x), (3.35)

where λh ∈ Rm and λg ∈ Rr are Lagrange multipliers. The first-order opti-mality conditions for the problem becomes,

xf(x) + Ah(x)Tλh+ Ag(x)Tλg = 0, h(x) = 0, g(x) ≤ 0, λg0, λgg(x) = 0, (3.36)

where Ah(x) and Ag(x) are the Jacobian matrix of equality and inequality constraints,

Ah(x) = [∇h1(x), ..., ∇hm(x)], (3.37)

Ag(x) = [∇g1(x), ..., ∇gr(x)]. (3.38)

Applying Newton’s method to the system of first-order optimality conditions, a quadratic representation of the objective function subject to linear con-straints are obtained. The quadratic subproblem is expressed as,

minimizep fk(xk) + ∇xfkT(xk)p + 1

2pT∇2xxLk(xk, λh, λg)p subject to Ah(xk)Tp+ h(xk) = 0,

Ag(xk)Tp+ g(xk) ≤ 0.

(3.39)

The subproblem is solved by quadratic programming (QP), the new iterations are given by (xk+1 = xk+ pk, λk+1), where pk and λk+1 are the solution of the optimization problem in Eq 3.39.

(37)

3.2. OPTIMIZATION METHODS

In order to accept or reject a step, the algorithm attempts to minimize a merit function subject to the relaxed constraints at each iteration. The following merit function is used,

ψ(x) = f(x) + m X i=1 ||∇f(x)|| ||∇hi(x)|| · hi(x) + r X j=1 ||∇f(x)|| ||∇gj(x)|| · max0, gj(x)  . (3.40)

If an attempted step does not decreases the merit function, the step is rejected and attempts a new step.

As in IPM, SQP continues to iterate until a desired accuracy and tolerance are satisfied. A more detailed description of the SQP and QP are described in [18].

(38)

Chapter 4

Mathematical Model

In this chapter, a formulation of the problem is presented along with a math-ematical model describing the optimization problem and modelling of hydro power plants. The same model and characteristics as Vattenfall is using for the current optimization program is employed. Definition of variables, param-eters, constants and sets can be found in the Nomenclature.

4.1

Problem Formulation

In this thesis, the objective is to investigate and test alternative optimization methods to operate and plan hydro power plants in an optimized way con-cerning power output, efficiency and distribution of water. The problem is an optimal load distribution (OLD) problem, i.e. how to dispatch the water to each operating unit in the best possible way, Q = (Q1, Q2, ..., Qn) ∈ Rn (m3/s), where n is the number of units. See Figure 4.1 for a schematic overview

of an operating hydro power plant.

Output for each plant are optimal settings to operate the plant during dif-ferent conditions, i.e. various effective heads, amount of dispatched water and combinations of operating units. These are presented in production tables and curves. A discrete set of five effective heads Hp, as well as a discrete set of dis-patched water for each combination Qc are given in advanced for each plant. The set of dispatched water may vary for different combinations, both in num-ber and step size between the discrete values, due to technical constraints of the operating units. These will be refereed to as operating information, which are input parameters for the optimization.

The total number of combinations, nc, for a plant with n units are deter-mined by the formula,

(39)

4.1. PROBLEM FORMULATION Upstream/water reservoir Qtot U1 U2 U3 ... Un Power plant Downstream Q3 Q1 Q2 Draft tubes Penstocks Qn Next power plant

Figure 4.1: Schematic overview of a hydro power plant with n operating units. Vattenfall posses plants with one unit up to six units, with exception for one plant which has 14 minor units. For a plant with six units, the number of combinations are 63 which is manageable. The plant with 14 units has not been considered in this thesis, however, currently the plant is considered as several separate plants when the optimization is performed.

Each combination is a set of operating units represented by Zc. See Table 4.1 for every possible combination and corresponding binary composition for a plant with three units.

Table 4.1: Combination, binary composition and operating units for a plant with three units.

Combination Binary Composition Operating Units Set Zc

123 111 1,2,3 Z1 120 110 1,2 Z2 103 101 1,3 Z3 100 100 1 Z4 023 011 2,3 Z5 020 010 2 Z6 003 001 3 Z7

(40)

CHAPTER 4. MATHEMATICAL MODEL

To define if a unit is operating for a particular combination, a binary parameter

zc,i is used,

zc,i =

 

1 , if unit i is operating for combination c

0 , otherwise (4.2)

The optimization is applied for every combination, every effective head in the set Hp and every step in the set of dispatched water Qc. Every combination is optimized separately, the process start optimize for the minimum allowed dispatched water of operating units, then iterates through the discrete set up to the maximum allowed dispatched water. See Figure 4.2 for an overview of the optimizations setup.

Plant c ... Hbr,1 ... Qmin,c Qmax,c Hbr,5 ... 2n-1 ... 1 Optimization

- Dispatched water to  each unit Qi , i∈I - Output power, P0

Output

Dispatched water, Qtot

Effective head, Hbr Combination

Figure 4.2: Overview of the optimization process. The optimization is applied for every combination, effective head and amount of dispatched water.

(41)

4.2. OUTPUT OPTIMIZATION

4.2

Output Optimization

Output from the optimization is presented by three tables with associated plots, these are referred to as the QP, OPT and SOPT. QP presents the rela-tionship between vane opening which guides the water into the turbine (A0%), power output (P0) and water flow (Q) for each unit, these are approximated

by polynomials based on the efficiency tests. The optimization is performed in two steps, referred to as the OPT- and SOPT-optimization.

First, the OPT is performed by optimization of hydro power plants with respect to the characteristics of the plant. The output provides optimal set-tings for every possible combination of units for a given set of effective heads

Hp and dispatched amount of water Qc.

Second, the SOPT is performed by adding head losses from one plant to another to the OPT-optimization, i.e. head losses along the river is included. The output presents the optimal combination of units which gives the highest power output for a given set of effective heads Hp and dispatched amount of water Qc. See Figure 4.3 for the procedure of the optimization.

Efficiency tests QP Output ".qp" Plant Data - Efficiency - Headlosses - Input parameters Polynomial fit - ηi (Qi) - A0i (PT,i) - Hf,i (Qi) Optimization OPT Plot - Plant efficiency - Relative efficiency - Limited efficiency Output ".op" Optimization SOPT/OPT+ Output ".so" Output ".op" SOPT OPT

Figure 4.3: Procedure of the optimization. Plant data are conducted from efficiency tests, perform polynomial fit for efficiency, head losses and vane opening for every unit. OPT and SOPT optimization are applied.

(42)

CHAPTER 4. MATHEMATICAL MODEL

4.3

Objective Function

As described in previous sections 4.1-4.2, an optimization is applied separately for every unit combination and for a given set of effective heads and dispatched amount of water. Assume a given combination of units, c, effective head, Hbr, and dispatched water flow, Qtot.

The objective is to minimize the total power loss of a hydro power plant under given conditions. The optimization variables are dispatched water into each unit, Q = (Q1, Q2, ..., Qn) ∈ Rn. The total power loss for a plant with n units is given by the formula,

PF(Qtot, Hbr) = PN(Qtot, Hbr) − P0(Qtot, Hbr), (4.3) where PF is the power loss, PN the theoretical power presented in Eq 2.1 and P0 the electrical output presented in Eq 2.2. For a fixed effective head

and dispatched amount of water, the theoretical power is constant and the optimization can therefore be reduced to maximize the electrical output P0.

The electrical output for a plant is the sum of electrical output for every operating unit,

P0(Qtot, Hbr) =

X

∀i∈I

zc,iPT r,i(Qi, Hbr), zc,i ∈ Zc, (4.4) where PT r,i is the electrical output from transformer i for a dispatched water flow Qi, and I is a set containing each unit for the plant. The binary parameter

zc,i represent if unit i is operating for combination c, and Zc is the set of operating units for combination c.

The electrical output from a transformer is dependent on the power output of the connected generator and turbine,

PT r,i(Qi, Hbr) = PT r,i  PG,i  PT ,i(Qi, Hbr)  , (4.5)

where PG,i and PT ,i are power output from the generator and turbine respec-tively.

Modelling of hydro power plants is a big challenge, particularly to determine and model the efficiency and associated losses for each unit, these are called characteristics. All units have different behaviour, for example, two turbines can be identical, have the same design, size and manufacture, but the output may be different for completely equal conditions. Characteristics are approxi-mated by efficiency tests, which are performed by field tests and observations. These are performed regularly about every 10th year for each unit at Vatten-falls plants. From the characteristics, the power output of the transformer,

(43)

4.3. OBJECTIVE FUNCTION

generator and turbine can be determined by the following formulas,

PT r,i(PG,i) =            −b1,i+1 2b2,i + r b 1,i+1 2b2,i 2 − b0,i−PG,i b2,i , if b2,i 6= 0 PG,i−b0,i 1+b1,i , if b2,i = 0 (4.6) PG,i(PT,i) =            −a1,i+1 2a2,i + r a 1,i+1 2a2,i 2 − a0,i−PT ,i a2,i , if a2,i 6= 0 PT ,i−a0,i

1+a1,i , if a2,i = 0

(4.7)

PT ,i(Qi, Hbr) = ηT(Qnom,i)Hnet,iQig. (4.8)

The parameters bi and ai are associated characteristics to the transformer and generator respectively. At the moment, Vattenfall neglects losses of the transformer in the optimization. The transformer power PT r in Eq 4.6 can therefore be simplified to,

PT r,i(PG,i) = PG,i. (4.9)

The turbine power PT ,i in Eq 4.8 is determined by using the scaled water flow

Qnom,i of Qi. The scaled water flow is determined by the formula,

Qnom,i= Qi

s Hnom,i

Hnet,i

, (4.10)

where Hnom,i is the effective head where the test was conducted and Hnet,i is the effective head of water minus every head loss connected to the unit,

Hnet,i = Hbr

X

∀j∈Ji

Hf,i,j(Qi). (4.11)

The head losses Hf,i,j(Qi) are estimated by polynomials from the efficiency tests and Ji is a set containing each headloss for unit i. From Eq 4.10-4.11, the turbine power presented in Eq 4.8 can be expressed as,

PT ,i(Qi, Hbr) = ηT  Qi s Hnom,i Hnet,i  Hbr− X ∀j∈Ji Hf,i,j(Qi)  gQi, (4.12)

where ηT is the unit efficiency for the turbine. The unit efficiency can be presented by a hill diagram, which is estimated by polynomials based on the dispatched water flow and net head, see Figure 4.4 for an illustration. A

(44)

CHAPTER 4. MATHEMATICAL MODEL

hill diagram presents the efficiency of a turbine as a function of net head and dispatched amount of water, along with operating constraints for the minimum and maximum allowed net head.

Efficiency tests and polynomials associated to the turbines efficiency and head losses will not be presented in the thesis report, due to confidentiality.

Figure 4.4: Visualization of a turbine hill diagram. Figure modified from [19].

4.4

Constraints

The constraints for the optimization are the amount of dispatched water, along with technical constraints for each unit. These constraints are specified for each combination, depending on operating units. The total amount of dispatched water for a plant Qtot is given by,

X

∀i∈I

Qizc,i+ Qleak,i(1 − zc,i) = Qtot, zc,i ∈ Zc, (4.13) where Qleak,i is the water leakage from unit i when not operating. When a unit is not operating, it is not possible to close the guide vanes completely, therefore a water leakage occurs. These are approximated in the efficiency test and specified as input parameters for the optimization.

The technical constraints are specified as the minimum and maximum dis-patched water flow each unit can manage, these are expressed as,

(45)

4.5. MODEL SETUP

where Qmin,iand Qmax,iare the minimum and maximum dispatched water flow unit i can manage. These are determined by the scaled water flow equation presented in Eq 4.10, Qmin,i = Qmin,nom,i s Hnet,i Hnom,i , (4.15) Qmax,i = Qmax,nom,i s Hnet,i Hnom,i . (4.16)

4.5

Model Setup

The optimization model can now be defined. All variables, parameters and constants have been defined in sections 4.3-4.4. The objective is to maximize the electrical output of a hydro power plant for a given combination of units, effective head and dispatched amount of water. The optimization variables are the dispatched amount of water into each unit, Q = (Q1, Q2, ..., Qn) ∈ Rn. A general model of the optimization problem can be expressed as,

minimize Q∈Rn − P0(Q, Hbr) = − X ∀i∈I zc,iPT r,i(Qi, Hbr) subject to X ∀i∈I

Qizc,i+ Qleak,i(1 − zc,i) = Qtot,

Qmin,izc,i ≤ Qi ≤ Qmax,izc,i, ∀i ∈ I,

zc,i ∈ Zc= {0, 1}.

(4.17)

The problem is a continuous nonlinear optimization problem with linear equal-ity and inequalequal-ity constraints. It is a non-convex optimization problem, since the objective function is not a convex function, which can be seen in Eq 4.18. All plants studied in this thesis neglects losses from the transformer and all parameters a2,i are non-zero, which is the most common setup for all plants

Vattenfall operate and possess. The objective function can then be written as, −P0(Q, Hbr) = − X ∀i∈I zc,iPT r,i(Qi, Hbr) = −X ∀i∈I zc,i  − a1,i+ 1 2a2,i + v u u t a1,i+ 1 2a2,i 2 −a0,i− PT,i(Qi, Hbr) a2,i  = X ∀i∈I zc,i 2a2,i  a1,i+ 1 − q

(a1,i+ 1)2 −4a2,i(a0,i− PT,i(Qi, Hbr))



(46)

CHAPTER 4. MATHEMATICAL MODEL where, PT ,i(Qi, Hbr) = ηT  Qi s Hnom,i Hnet,i  Hbr− X ∀j∈Ji Hf,i,j(Qi)  Qig. (4.19)

As described in section 4.3, both the turbine efficiency ηT and head loss Hf,i,j are nonlinear functions based on polynomials of the efficiency tests.

Finally, the optimization problem can now be expressed as, minimize Q∈Rn X ∀i∈I zc,i 2a2,i  a1,i+ 1 − q

(a1,i+ 1)2−4a2,i(a0,i− PT ,i(Qi, Hbr))



subject to X

∀i∈I

Qizc,i+ Qleak,i(1 − zc,i) = Qtot,

Qmin,izc,i ≤ Qi ≤ Qmax,izc,i, ∀i ∈ I,

zc,i ∈ Zc= {0, 1}.

(47)

Chapter 5

Method

In this chapter, the methodology of this thesis is presented. The original data and an explicit description for the implementation of the optimization methods are presented.

Throughout the work, all data handling and mathematical computation have employed Matlab version R2018b. The main Matlab package used is

Optimization Toolbox [16], which contain tools for solving linear, quadratic,

integer and nonlinear optimization problems. The optimization is executed by using a HP laptop with an Intel Core i7-6820HQ processor and 16 GB installed RAM-memory.

5.1

Data

The data required for the optimization was collected from previous efficiency tests. The algorithms performance will be analysed and evaluated by compar-ing the result with SEVAP’s result, where both are based on the same data, i.e. same efficiency tests and input parameters. In order to prevent calculations variations and errors in prior steps, SEVAP’s polynomial approximations of efficiency curves and head losses are used for the optimization.

Three hydro power plants with different size, setup and complexity are used in this thesis. See Table 5.1 for further description of the plants.

The set of dispatched water Qc for each combination and set of effective heads Hp, are given in advance as operation information (input parameters). The step size Qstep between the discrete values in Qc may vary between differ-ent combinations for a plant. Specific plant data for each plant is presdiffer-ented in Appendix A.

(48)

CHAPTER 5. METHOD

Table 5.1: Plant information of the tested plants.

Plant No. Units No. Comb. Step Size (m3/s) Effective Heads (m)

1 2 3 2 127,126,124,122,120

2 4 15 5,10 35,33,31,29,27

3 6 63 5,10,15,20,25 23.5,22,20,18,16

5.2

Start-Point Strategies

Since the objective function is non-convex, multiple optimal solutions can be obtained, both local and global optima. To increase the probability of finding a global optima, three start-point strategies are used for the optimization. Each strategy is used as a start-point for the optimization, thus three different optimizations are performed per combination, effective head and total amount of dispatched water. A start-point is initialized by dispatching water to each of the available units. The strategies need to satisfy every constraint defined in the optimization problem, i.e. total amount of dispatched water for the plant along with technical limitations for each operating unit. The three strategies are defined as:

• Strategy 1

Dispatch maximum amount of water to the unit that has the lowest allowed water flow, Qmin,i. Dispatch the remaining water to the unit with second lowest allowed water flow, and continue until the total amount of dispatched water is fulfilled.

• Strategy 2

Dispatch the water proportionally to the previous optimal load distri-bution,

Qk+1,i = Qk,i+ Qstep·

Qk,i

P

∀i∈IQk,i

, ∀i ∈ I. (5.1)

• Strategy 3

Dispatch the water proportionally to the available units based on the capacity range, i.e. the difference between minimum and maximum al-lowed amount of water,

Qk+1,i = Qk,i+ Qstep·

Qmax,i− Qmin,i

P

∀i∈IQmax,i− Qmin,i

, ∀i ∈ I. (5.2)

There are two cases in the process when no optimization is needed. First, for combinations with only one operating unit, dispatch the water to that unit.

(49)

5.3. HEURISTIC RULE FOR STRATEGY SELECTION

Second, for the first amount of dispatched water, every available unit is dis-patched the minimum allowed water flow and the water cannot be disdis-patched in any other way, no optimization is needed.

5.3

Heuristic Rule for Strategy Selection

Normally, the best result of the three strategies should be selected and used. However, there is a risk of rapid strategy changes for small variations in dis-patched water, which can affect the optimal load distribution. In the long run, it contributes to wear and can affect the performance of units, which may lead to breakdowns that are expensive in terms of money and time.

For example, consider a case when two units are operating, for a certain amount of dispatched water (say 100 m3/s) the optimal load distribution is

divided 80% and 20% for unit one and two respectively. Then the dispatched water increases with a certain amount (say 2 m3/s) and the optimal load

distribution is shifted to 20% and 80% for unit one and two respectively. In this case, there is a big change in load distribution between the units, and for it to be ”worth” changing, it should be a certain power profit.

To solve this problem, a factor P is introduced as a heuristic rule, also referred to as the Peps-factor. This is used to avoid rapid strategy changes and large shifts in load distribution for small variations of dispatched water. This factor is developed and used by Vattenfall in the current optimization program. This factor is stated in megawatt (MW) and indicate how large the power profit at least need to be to change strategy.

Define the choice of strategy for a certain amount of dispatched water Qk as,

Strategy(Qk) = S(Qk). (5.3)

For a dispatched amount of water Qk+1, the difference in power profit between the strategies and previous optimal strategy are defined as,

i(Qk+1) =    P0(Qk+1,S = i) − P0(Qk+1, S = S(Qk)) , if i 6= S(Qk) 0 , if i= S(Qk) (5.4) for every strategy, i = 1, 2, 3. The strategy with highest power output and consequently largest power profit will be selected,

[∆max(Qk+1), I] = max



∆1(Qk+1), ∆2(Qk+1), ∆3(Qk+1)



, (5.5)

where ∆max(Qk+1) is the largest power profit and I the corresponding strategy. The difference will be compared to the P-factor. If the profit difference is

(50)

CHAPTER 5. METHOD

greater than the P-factor, change strategy, otherwise use the same strategy as the previous optimal strategy,

S(Qk+1) =    I , ifmax(Qk+1) ≥ P S(Qk) , if ∆max(Qk+1) < P (5.6) There are no empirical studies how to determine or select a suitable value of the factor, the choice is completely based on the operators experience. A rule of thumb is to set the factor as 0.2 percent of the maximum power output of the plant,

P = 0.002 · Pmax. (5.7)

5.4

Performance Metrics

The performance metrics in this thesis are optimal production curves of the plants efficiency and power output. Due to confidentiality, the efficiency will be presented in relative plant efficiency for a given effective head, which is the ratio of the plants efficiency and the best possible plant efficiency. For a certain amount of dispatched water Qi, effective head Hbr and combination c, the relative efficiency ηRE is given by the formula,

ηRE(Qi, Hbr, c) = ηP lant(Qi, Hbr, c) · 1

maxηP lant(Hbr)

. (5.8)

In addition, the optimal combination of units which produce the highest power output will be compared to SEVAP’s corresponding result. The comparison will be presented as difference in power and percent.

5.5

Optimization Algorithm

To be able to perform the optimization, an algorithm is constructed, Algo-rithm 1 presents an overview of the optimization algoAlgo-rithm. The employed methods, IPM and SQP, are selected due to their good properties of solving constrained nonlinear optimization problems. The mathematical theory be-hind these methods are presented in Chapter 3.2. The optimization tolerance is set to 1e-04 (0.1 kW).

(51)

5.5. OPTIMIZATION ALGORITHM

Algorithm 1: Optimization algorithm for a Hydro Power Plant.

Data: Efficiency tests and input parameters for a plant;

Result: Optimal production tables and curves: QP, OPT and SOPT;

initialization;

extract QP-table as a .qp file;

for each combination c in parameter set Cp do

define parameter set of operating units, Zc ;

for each effective head Hbr in parameter set Hp do

determine Hnet;

determine operating set of dispatched water, Qc; remove waterleakage from the dispatched water, Qc; initialize optimization variables, Qi, i∀I;

for each Qtot in the parameter set, Qc do

determine start-point strategies; define constraints;

OPTIMIZATION; ifmax(Qtot) ≥ P then

change strategy; else

keep previous strategy; end

save solution in table; end

end end

extract OPT-table as a .op file; extract SOPT-table as a .so file; plot results;

References

Related documents

Based on estimate 1 in Table 6 it appears that the relative error in the computed value of the pressure recovery factor with the finest grid is about 10%. This is a surprisingly

The system provides the basic value-adding functionality (size- reduction and separation) to the aggregates production process for producing various aggregate products. For

In Figure 8 below the measured spectra, between midnight and 01:00 hrs 2004-07-11, from the Wave radar and the Valeport measurements are compared with the TMA spectrum using the

The Project consists of dam, flood release structures, power stations, and navigation structures with the full functions of flood control capacity of 700 MW [13] , it is the

For the 0.6 case this is due to the plant being able to operate without the inefficient turbine most of the time (when this is not true anymore, the efficiency gets closer to the

Optimization results for the six unit hydro power plant R¨ akneforsen kraftverk is presented in figure 15 as well as validation of power output calculation for this large set of

The prices of electricity are taken from Nordpool which handle the entire Nordic market of electricity.[5] Wind data was gathered from Svenska Kraftnät on

Figure 9 illustrates the optimal discharge plan for the period and Figure 10 illustrates at which hours the power is produced for the original and increased capacity together with